Created 10 detailed GitHub issues covering: - Project activation and management UI (#1-2) - Worker node coordination and visualization (#3-4) - Automated GitHub repository scanning (#5) - Intelligent model-to-issue matching (#6) - Multi-model task execution system (#7) - N8N workflow integration (#8) - Hive-Bzzz P2P bridge (#9) - Peer assistance protocol (#10) Each issue includes detailed specifications, acceptance criteria, technical implementation notes, and dependency mapping. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
79941 lines
2.8 MiB
79941 lines
2.8 MiB
import ESM_COMPAT_Module from "node:module";
|
|
import { fileURLToPath as ESM_COMPAT_fileURLToPath } from 'node:url';
|
|
import { dirname as ESM_COMPAT_dirname } from 'node:path';
|
|
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
|
|
const __dirname = ESM_COMPAT_dirname(__filename);
|
|
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
|
|
var dJ = Object.create;
|
|
var Lb = Object.defineProperty;
|
|
var pJ = Object.getOwnPropertyDescriptor;
|
|
var hJ = Object.getOwnPropertyNames;
|
|
var mJ = Object.getPrototypeOf, yJ = Object.prototype.hasOwnProperty;
|
|
var s = (e, t) => Lb(e, "name", { value: t, configurable: !0 }), V = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy <
|
|
"u" ? new Proxy(e, {
|
|
get: (t, r) => (typeof require < "u" ? require : t)[r]
|
|
}) : e)(function(e) {
|
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
throw Error('Dynamic require of "' + e + '" is not supported');
|
|
});
|
|
var E = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
|
|
var gJ = (e, t, r, i) => {
|
|
if (t && typeof t == "object" || typeof t == "function")
|
|
for (let n of hJ(t))
|
|
!yJ.call(e, n) && n !== r && Lb(e, n, { get: () => t[n], enumerable: !(i = pJ(t, n)) || i.enumerable });
|
|
return e;
|
|
};
|
|
var Rt = (e, t, r) => (r = e != null ? dJ(mJ(e)) : {}, gJ(
|
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
// file that has been converted to a CommonJS file using a Babel-
|
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
t || !e || !e.__esModule ? Lb(r, "default", { value: e, enumerable: !0 }) : r,
|
|
e
|
|
));
|
|
|
|
// ../node_modules/kleur/index.js
|
|
var sr = E((AYe, hF) => {
|
|
"use strict";
|
|
var { FORCE_COLOR: TJ, NODE_DISABLE_COLORS: CJ, TERM: wJ } = process.env, Ot = {
|
|
enabled: !CJ && wJ !== "dumb" && TJ !== "0",
|
|
// modifiers
|
|
reset: jt(0, 0),
|
|
bold: jt(1, 22),
|
|
dim: jt(2, 22),
|
|
italic: jt(3, 23),
|
|
underline: jt(4, 24),
|
|
inverse: jt(7, 27),
|
|
hidden: jt(8, 28),
|
|
strikethrough: jt(9, 29),
|
|
// colors
|
|
black: jt(30, 39),
|
|
red: jt(31, 39),
|
|
green: jt(32, 39),
|
|
yellow: jt(33, 39),
|
|
blue: jt(34, 39),
|
|
magenta: jt(35, 39),
|
|
cyan: jt(36, 39),
|
|
white: jt(37, 39),
|
|
gray: jt(90, 39),
|
|
grey: jt(90, 39),
|
|
// background colors
|
|
bgBlack: jt(40, 49),
|
|
bgRed: jt(41, 49),
|
|
bgGreen: jt(42, 49),
|
|
bgYellow: jt(43, 49),
|
|
bgBlue: jt(44, 49),
|
|
bgMagenta: jt(45, 49),
|
|
bgCyan: jt(46, 49),
|
|
bgWhite: jt(47, 49)
|
|
};
|
|
function pF(e, t) {
|
|
let r = 0, i, n = "", a = "";
|
|
for (; r < e.length; r++)
|
|
i = e[r], n += i.open, a += i.close, t.includes(i.close) && (t = t.replace(i.rgx, i.close + i.open));
|
|
return n + t + a;
|
|
}
|
|
s(pF, "run");
|
|
function AJ(e, t) {
|
|
let r = { has: e, keys: t };
|
|
return r.reset = Ot.reset.bind(r), r.bold = Ot.bold.bind(r), r.dim = Ot.dim.bind(r), r.italic = Ot.italic.bind(r), r.underline = Ot.underline.
|
|
bind(r), r.inverse = Ot.inverse.bind(r), r.hidden = Ot.hidden.bind(r), r.strikethrough = Ot.strikethrough.bind(r), r.black = Ot.black.bind(
|
|
r), r.red = Ot.red.bind(r), r.green = Ot.green.bind(r), r.yellow = Ot.yellow.bind(r), r.blue = Ot.blue.bind(r), r.magenta = Ot.magenta.bind(
|
|
r), r.cyan = Ot.cyan.bind(r), r.white = Ot.white.bind(r), r.gray = Ot.gray.bind(r), r.grey = Ot.grey.bind(r), r.bgBlack = Ot.bgBlack.bind(
|
|
r), r.bgRed = Ot.bgRed.bind(r), r.bgGreen = Ot.bgGreen.bind(r), r.bgYellow = Ot.bgYellow.bind(r), r.bgBlue = Ot.bgBlue.bind(r), r.bgMagenta =
|
|
Ot.bgMagenta.bind(r), r.bgCyan = Ot.bgCyan.bind(r), r.bgWhite = Ot.bgWhite.bind(r), r;
|
|
}
|
|
s(AJ, "chain");
|
|
function jt(e, t) {
|
|
let r = {
|
|
open: `\x1B[${e}m`,
|
|
close: `\x1B[${t}m`,
|
|
rgx: new RegExp(`\\x1b\\[${t}m`, "g")
|
|
};
|
|
return function(i) {
|
|
return this !== void 0 && this.has !== void 0 ? (this.has.includes(e) || (this.has.push(e), this.keys.push(r)), i === void 0 ? this : Ot.
|
|
enabled ? pF(this.keys, i + "") : i + "") : i === void 0 ? AJ([e], [r]) : Ot.enabled ? pF([r], i + "") : i + "";
|
|
};
|
|
}
|
|
s(jt, "init");
|
|
hF.exports = Ot;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/util/action.js
|
|
var yF = E((PYe, mF) => {
|
|
"use strict";
|
|
mF.exports = (e, t) => {
|
|
if (!(e.meta && e.name !== "escape")) {
|
|
if (e.ctrl) {
|
|
if (e.name === "a") return "first";
|
|
if (e.name === "c" || e.name === "d") return "abort";
|
|
if (e.name === "e") return "last";
|
|
if (e.name === "g") return "reset";
|
|
}
|
|
if (t) {
|
|
if (e.name === "j") return "down";
|
|
if (e.name === "k") return "up";
|
|
}
|
|
return e.name === "return" || e.name === "enter" ? "submit" : e.name === "backspace" ? "delete" : e.name === "delete" ? "deleteForward" :
|
|
e.name === "abort" ? "abort" : e.name === "escape" ? "exit" : e.name === "tab" ? "next" : e.name === "pagedown" ? "nextPage" : e.name ===
|
|
"pageup" ? "prevPage" : e.name === "home" ? "home" : e.name === "end" ? "end" : e.name === "up" ? "up" : e.name === "down" ? "down" : e.
|
|
name === "right" ? "right" : e.name === "left" ? "left" : !1;
|
|
}
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/util/strip.js
|
|
var zp = E((FYe, gF) => {
|
|
"use strict";
|
|
gF.exports = (e) => {
|
|
let t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"), r = new RegExp(t, "g");
|
|
return typeof e == "string" ? e.replace(r, "") : e;
|
|
};
|
|
});
|
|
|
|
// ../node_modules/sisteransi/src/index.js
|
|
var or = E((IYe, bF) => {
|
|
"use strict";
|
|
var Hb = "\x1B", ar = `${Hb}[`, _J = "\x07", Kb = {
|
|
to(e, t) {
|
|
return t ? `${ar}${t + 1};${e + 1}H` : `${ar}${e + 1}G`;
|
|
},
|
|
move(e, t) {
|
|
let r = "";
|
|
return e < 0 ? r += `${ar}${-e}D` : e > 0 && (r += `${ar}${e}C`), t < 0 ? r += `${ar}${-t}A` : t > 0 && (r += `${ar}${t}B`), r;
|
|
},
|
|
up: /* @__PURE__ */ s((e = 1) => `${ar}${e}A`, "up"),
|
|
down: /* @__PURE__ */ s((e = 1) => `${ar}${e}B`, "down"),
|
|
forward: /* @__PURE__ */ s((e = 1) => `${ar}${e}C`, "forward"),
|
|
backward: /* @__PURE__ */ s((e = 1) => `${ar}${e}D`, "backward"),
|
|
nextLine: /* @__PURE__ */ s((e = 1) => `${ar}E`.repeat(e), "nextLine"),
|
|
prevLine: /* @__PURE__ */ s((e = 1) => `${ar}F`.repeat(e), "prevLine"),
|
|
left: `${ar}G`,
|
|
hide: `${ar}?25l`,
|
|
show: `${ar}?25h`,
|
|
save: `${Hb}7`,
|
|
restore: `${Hb}8`
|
|
}, PJ = {
|
|
up: /* @__PURE__ */ s((e = 1) => `${ar}S`.repeat(e), "up"),
|
|
down: /* @__PURE__ */ s((e = 1) => `${ar}T`.repeat(e), "down")
|
|
}, FJ = {
|
|
screen: `${ar}2J`,
|
|
up: /* @__PURE__ */ s((e = 1) => `${ar}1J`.repeat(e), "up"),
|
|
down: /* @__PURE__ */ s((e = 1) => `${ar}J`.repeat(e), "down"),
|
|
line: `${ar}2K`,
|
|
lineEnd: `${ar}K`,
|
|
lineStart: `${ar}1K`,
|
|
lines(e) {
|
|
let t = "";
|
|
for (let r = 0; r < e; r++)
|
|
t += this.line + (r < e - 1 ? Kb.up() : "");
|
|
return e && (t += Kb.left), t;
|
|
}
|
|
};
|
|
bF.exports = { cursor: Kb, scroll: PJ, erase: FJ, beep: _J };
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/util/clear.js
|
|
var SF = E((kYe, xF) => {
|
|
"use strict";
|
|
function IJ(e, t) {
|
|
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
if (!r) {
|
|
if (Array.isArray(e) || (r = OJ(e)) || t && e && typeof e.length == "number") {
|
|
r && (e = r);
|
|
var i = 0, n = /* @__PURE__ */ s(function() {
|
|
}, "F");
|
|
return { s: n, n: /* @__PURE__ */ s(function() {
|
|
return i >= e.length ? { done: !0 } : { done: !1, value: e[i++] };
|
|
}, "n"), e: /* @__PURE__ */ s(function(c) {
|
|
throw c;
|
|
}, "e"), f: n };
|
|
}
|
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
}
|
|
var a = !0, o = !1, u;
|
|
return { s: /* @__PURE__ */ s(function() {
|
|
r = r.call(e);
|
|
}, "s"), n: /* @__PURE__ */ s(function() {
|
|
var c = r.next();
|
|
return a = c.done, c;
|
|
}, "n"), e: /* @__PURE__ */ s(function(c) {
|
|
o = !0, u = c;
|
|
}, "e"), f: /* @__PURE__ */ s(function() {
|
|
try {
|
|
!a && r.return != null && r.return();
|
|
} finally {
|
|
if (o) throw u;
|
|
}
|
|
}, "f") };
|
|
}
|
|
s(IJ, "_createForOfIteratorHelper");
|
|
function OJ(e, t) {
|
|
if (e) {
|
|
if (typeof e == "string") return DF(e, t);
|
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return DF(e, t);
|
|
}
|
|
}
|
|
s(OJ, "_unsupportedIterableToArray");
|
|
function DF(e, t) {
|
|
(t == null || t > e.length) && (t = e.length);
|
|
for (var r = 0, i = new Array(t); r < t; r++) i[r] = e[r];
|
|
return i;
|
|
}
|
|
s(DF, "_arrayLikeToArray");
|
|
var kJ = zp(), EF = or(), vF = EF.erase, BJ = EF.cursor, NJ = /* @__PURE__ */ s((e) => [...kJ(e)].length, "width");
|
|
xF.exports = function(e, t) {
|
|
if (!t) return vF.line + BJ.to(0);
|
|
let r = 0, i = e.split(/\r?\n/);
|
|
var n = IJ(i), a;
|
|
try {
|
|
for (n.s(); !(a = n.n()).done; ) {
|
|
let o = a.value;
|
|
r += 1 + Math.floor(Math.max(NJ(o) - 1, 0) / t);
|
|
}
|
|
} catch (o) {
|
|
n.e(o);
|
|
} finally {
|
|
n.f();
|
|
}
|
|
return vF.lines(r);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/util/figures.js
|
|
var zb = E((NYe, TF) => {
|
|
"use strict";
|
|
var Lc = {
|
|
arrowUp: "\u2191",
|
|
arrowDown: "\u2193",
|
|
arrowLeft: "\u2190",
|
|
arrowRight: "\u2192",
|
|
radioOn: "\u25C9",
|
|
radioOff: "\u25EF",
|
|
tick: "\u2714",
|
|
cross: "\u2716",
|
|
ellipsis: "\u2026",
|
|
pointerSmall: "\u203A",
|
|
line: "\u2500",
|
|
pointer: "\u276F"
|
|
}, MJ = {
|
|
arrowUp: Lc.arrowUp,
|
|
arrowDown: Lc.arrowDown,
|
|
arrowLeft: Lc.arrowLeft,
|
|
arrowRight: Lc.arrowRight,
|
|
radioOn: "(*)",
|
|
radioOff: "( )",
|
|
tick: "\u221A",
|
|
cross: "\xD7",
|
|
ellipsis: "...",
|
|
pointerSmall: "\xBB",
|
|
line: "\u2500",
|
|
pointer: ">"
|
|
}, RJ = process.platform === "win32" ? MJ : Lc;
|
|
TF.exports = RJ;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/util/style.js
|
|
var wF = E((MYe, CF) => {
|
|
"use strict";
|
|
var $u = sr(), go = zb(), Gb = Object.freeze({
|
|
password: {
|
|
scale: 1,
|
|
render: /* @__PURE__ */ s((e) => "*".repeat(e.length), "render")
|
|
},
|
|
emoji: {
|
|
scale: 2,
|
|
render: /* @__PURE__ */ s((e) => "\u{1F603}".repeat(e.length), "render")
|
|
},
|
|
invisible: {
|
|
scale: 0,
|
|
render: /* @__PURE__ */ s((e) => "", "render")
|
|
},
|
|
default: {
|
|
scale: 1,
|
|
render: /* @__PURE__ */ s((e) => `${e}`, "render")
|
|
}
|
|
}), jJ = /* @__PURE__ */ s((e) => Gb[e] || Gb.default, "render"), qc = Object.freeze({
|
|
aborted: $u.red(go.cross),
|
|
done: $u.green(go.tick),
|
|
exited: $u.yellow(go.cross),
|
|
default: $u.cyan("?")
|
|
}), LJ = /* @__PURE__ */ s((e, t, r) => t ? qc.aborted : r ? qc.exited : e ? qc.done : qc.default, "symbol"), qJ = /* @__PURE__ */ s((e) => $u.
|
|
gray(e ? go.ellipsis : go.pointerSmall), "delimiter"), UJ = /* @__PURE__ */ s((e, t) => $u.gray(e ? t ? go.pointerSmall : "+" : go.line), "\
|
|
item");
|
|
CF.exports = {
|
|
styles: Gb,
|
|
render: jJ,
|
|
symbols: qc,
|
|
symbol: LJ,
|
|
delimiter: qJ,
|
|
item: UJ
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/util/lines.js
|
|
var _F = E((jYe, AF) => {
|
|
"use strict";
|
|
var WJ = zp();
|
|
AF.exports = function(e, t) {
|
|
let r = String(WJ(e) || "").split(/\r?\n/);
|
|
return t ? r.map((i) => Math.ceil(i.length / t)).reduce((i, n) => i + n) : r.length;
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/util/wrap.js
|
|
var FF = E((LYe, PF) => {
|
|
"use strict";
|
|
PF.exports = (e, t = {}) => {
|
|
let r = Number.isSafeInteger(parseInt(t.margin)) ? new Array(parseInt(t.margin)).fill(" ").join("") : t.margin || "", i = t.width;
|
|
return (e || "").split(/\r?\n/g).map((n) => n.split(/\s+/g).reduce((a, o) => (o.length + r.length >= i || a[a.length - 1].length + o.length +
|
|
1 < i ? a[a.length - 1] += ` ${o}` : a.push(`${r}${o}`), a), [r]).join(`
|
|
`)).join(`
|
|
`);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/util/entriesToDisplay.js
|
|
var OF = E((qYe, IF) => {
|
|
"use strict";
|
|
IF.exports = (e, t, r) => {
|
|
r = r || t;
|
|
let i = Math.min(t - r, e - Math.floor(r / 2));
|
|
i < 0 && (i = 0);
|
|
let n = Math.min(i + r, t);
|
|
return {
|
|
startIndex: i,
|
|
endIndex: n
|
|
};
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/util/index.js
|
|
var bn = E((UYe, kF) => {
|
|
"use strict";
|
|
kF.exports = {
|
|
action: yF(),
|
|
clear: SF(),
|
|
style: wF(),
|
|
strip: zp(),
|
|
figures: zb(),
|
|
lines: _F(),
|
|
wrap: FF(),
|
|
entriesToDisplay: OF()
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/elements/prompt.js
|
|
var ys = E((WYe, MF) => {
|
|
"use strict";
|
|
var BF = V("readline"), $J = bn(), VJ = $J.action, HJ = V("events"), NF = or(), KJ = NF.beep, zJ = NF.cursor, GJ = sr(), Jb = class extends HJ {
|
|
static {
|
|
s(this, "Prompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(), this.firstRender = !0, this.in = t.stdin || process.stdin, this.out = t.stdout || process.stdout, this.onRender = (t.onRender ||
|
|
(() => {
|
|
})).bind(this);
|
|
let r = BF.createInterface({
|
|
input: this.in,
|
|
escapeCodeTimeout: 50
|
|
});
|
|
BF.emitKeypressEvents(this.in, r), this.in.isTTY && this.in.setRawMode(!0);
|
|
let i = ["SelectPrompt", "MultiselectPrompt"].indexOf(this.constructor.name) > -1, n = /* @__PURE__ */ s((a, o) => {
|
|
let u = VJ(o, i);
|
|
u === !1 ? this._ && this._(a, o) : typeof this[u] == "function" ? this[u](o) : this.bell();
|
|
}, "keypress");
|
|
this.close = () => {
|
|
this.out.write(zJ.show), this.in.removeListener("keypress", n), this.in.isTTY && this.in.setRawMode(!1), r.close(), this.emit(this.aborted ?
|
|
"abort" : this.exited ? "exit" : "submit", this.value), this.closed = !0;
|
|
}, this.in.on("keypress", n);
|
|
}
|
|
fire() {
|
|
this.emit("state", {
|
|
value: this.value,
|
|
aborted: !!this.aborted,
|
|
exited: !!this.exited
|
|
});
|
|
}
|
|
bell() {
|
|
this.out.write(KJ);
|
|
}
|
|
render() {
|
|
this.onRender(GJ), this.firstRender && (this.firstRender = !1);
|
|
}
|
|
};
|
|
MF.exports = Jb;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/elements/text.js
|
|
var UF = E((VYe, qF) => {
|
|
"use strict";
|
|
function RF(e, t, r, i, n, a, o) {
|
|
try {
|
|
var u = e[a](o), l = u.value;
|
|
} catch (c) {
|
|
r(c);
|
|
return;
|
|
}
|
|
u.done ? t(l) : Promise.resolve(l).then(i, n);
|
|
}
|
|
s(RF, "asyncGeneratorStep");
|
|
function jF(e) {
|
|
return function() {
|
|
var t = this, r = arguments;
|
|
return new Promise(function(i, n) {
|
|
var a = e.apply(t, r);
|
|
function o(l) {
|
|
RF(a, i, n, o, u, "next", l);
|
|
}
|
|
s(o, "_next");
|
|
function u(l) {
|
|
RF(a, i, n, o, u, "throw", l);
|
|
}
|
|
s(u, "_throw"), o(void 0);
|
|
});
|
|
};
|
|
}
|
|
s(jF, "_asyncToGenerator");
|
|
var Gp = sr(), JJ = ys(), LF = or(), XJ = LF.erase, Uc = LF.cursor, Jp = bn(), Xb = Jp.style, Yb = Jp.clear, YJ = Jp.lines, ZJ = Jp.figures,
|
|
Zb = class extends JJ {
|
|
static {
|
|
s(this, "TextPrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.transform = Xb.render(t.style), this.scale = this.transform.scale, this.msg = t.message, this.initial = t.initial || "",
|
|
this.validator = t.validate || (() => !0), this.value = "", this.errorMsg = t.error || "Please Enter A Valid Value", this.cursor = +!!this.
|
|
initial, this.cursorOffset = 0, this.clear = Yb("", this.out.columns), this.render();
|
|
}
|
|
set value(t) {
|
|
!t && this.initial ? (this.placeholder = !0, this.rendered = Gp.gray(this.transform.render(this.initial))) : (this.placeholder = !1, this.
|
|
rendered = this.transform.render(t)), this._value = t, this.fire();
|
|
}
|
|
get value() {
|
|
return this._value;
|
|
}
|
|
reset() {
|
|
this.value = "", this.cursor = +!!this.initial, this.cursorOffset = 0, this.fire(), this.render();
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
this.value = this.value || this.initial, this.done = this.aborted = !0, this.error = !1, this.red = !1, this.fire(), this.render(), this.
|
|
out.write(`
|
|
`), this.close();
|
|
}
|
|
validate() {
|
|
var t = this;
|
|
return jF(function* () {
|
|
let r = yield t.validator(t.value);
|
|
typeof r == "string" && (t.errorMsg = r, r = !1), t.error = !r;
|
|
})();
|
|
}
|
|
submit() {
|
|
var t = this;
|
|
return jF(function* () {
|
|
if (t.value = t.value || t.initial, t.cursorOffset = 0, t.cursor = t.rendered.length, yield t.validate(), t.error) {
|
|
t.red = !0, t.fire(), t.render();
|
|
return;
|
|
}
|
|
t.done = !0, t.aborted = !1, t.fire(), t.render(), t.out.write(`
|
|
`), t.close();
|
|
})();
|
|
}
|
|
next() {
|
|
if (!this.placeholder) return this.bell();
|
|
this.value = this.initial, this.cursor = this.rendered.length, this.fire(), this.render();
|
|
}
|
|
moveCursor(t) {
|
|
this.placeholder || (this.cursor = this.cursor + t, this.cursorOffset += t);
|
|
}
|
|
_(t, r) {
|
|
let i = this.value.slice(0, this.cursor), n = this.value.slice(this.cursor);
|
|
this.value = `${i}${t}${n}`, this.red = !1, this.cursor = this.placeholder ? 0 : i.length + 1, this.render();
|
|
}
|
|
delete() {
|
|
if (this.isCursorAtStart()) return this.bell();
|
|
let t = this.value.slice(0, this.cursor - 1), r = this.value.slice(this.cursor);
|
|
this.value = `${t}${r}`, this.red = !1, this.isCursorAtStart() ? this.cursorOffset = 0 : (this.cursorOffset++, this.moveCursor(-1)), this.
|
|
render();
|
|
}
|
|
deleteForward() {
|
|
if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();
|
|
let t = this.value.slice(0, this.cursor), r = this.value.slice(this.cursor + 1);
|
|
this.value = `${t}${r}`, this.red = !1, this.isCursorAtEnd() ? this.cursorOffset = 0 : this.cursorOffset++, this.render();
|
|
}
|
|
first() {
|
|
this.cursor = 0, this.render();
|
|
}
|
|
last() {
|
|
this.cursor = this.value.length, this.render();
|
|
}
|
|
left() {
|
|
if (this.cursor <= 0 || this.placeholder) return this.bell();
|
|
this.moveCursor(-1), this.render();
|
|
}
|
|
right() {
|
|
if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();
|
|
this.moveCursor(1), this.render();
|
|
}
|
|
isCursorAtStart() {
|
|
return this.cursor === 0 || this.placeholder && this.cursor === 1;
|
|
}
|
|
isCursorAtEnd() {
|
|
return this.cursor === this.rendered.length || this.placeholder && this.cursor === this.rendered.length + 1;
|
|
}
|
|
render() {
|
|
this.closed || (this.firstRender || (this.outputError && this.out.write(Uc.down(YJ(this.outputError, this.out.columns) - 1) + Yb(this.
|
|
outputError, this.out.columns)), this.out.write(Yb(this.outputText, this.out.columns))), super.render(), this.outputError = "", this.outputText =
|
|
[Xb.symbol(this.done, this.aborted), Gp.bold(this.msg), Xb.delimiter(this.done), this.red ? Gp.red(this.rendered) : this.rendered].join(
|
|
" "), this.error && (this.outputError += this.errorMsg.split(`
|
|
`).reduce((t, r, i) => t + `
|
|
${i ? " " : ZJ.pointerSmall} ${Gp.red().italic(r)}`, "")), this.out.write(XJ.line + Uc.to(0) + this.outputText + Uc.save + this.outputError +
|
|
Uc.restore + Uc.move(this.cursorOffset, 0)));
|
|
}
|
|
};
|
|
qF.exports = Zb;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/elements/select.js
|
|
var HF = E((KYe, VF) => {
|
|
"use strict";
|
|
var gs = sr(), QJ = ys(), Wc = bn(), WF = Wc.style, $F = Wc.clear, Xp = Wc.figures, eX = Wc.wrap, tX = Wc.entriesToDisplay, rX = or(), iX = rX.
|
|
cursor, Qb = class extends QJ {
|
|
static {
|
|
s(this, "SelectPrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.msg = t.message, this.hint = t.hint || "- Use arrow-keys. Return to submit.", this.warn = t.warn || "- This option is d\
|
|
isabled", this.cursor = t.initial || 0, this.choices = t.choices.map((r, i) => (typeof r == "string" && (r = {
|
|
title: r,
|
|
value: i
|
|
}), {
|
|
title: r && (r.title || r.value || r),
|
|
value: r && (r.value === void 0 ? i : r.value),
|
|
description: r && r.description,
|
|
selected: r && r.selected,
|
|
disabled: r && r.disabled
|
|
})), this.optionsPerPage = t.optionsPerPage || 10, this.value = (this.choices[this.cursor] || {}).value, this.clear = $F("", this.out.
|
|
columns), this.render();
|
|
}
|
|
moveCursor(t) {
|
|
this.cursor = t, this.value = this.choices[t].value, this.fire();
|
|
}
|
|
reset() {
|
|
this.moveCursor(0), this.fire(), this.render();
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
submit() {
|
|
this.selection.disabled ? this.bell() : (this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close());
|
|
}
|
|
first() {
|
|
this.moveCursor(0), this.render();
|
|
}
|
|
last() {
|
|
this.moveCursor(this.choices.length - 1), this.render();
|
|
}
|
|
up() {
|
|
this.cursor === 0 ? this.moveCursor(this.choices.length - 1) : this.moveCursor(this.cursor - 1), this.render();
|
|
}
|
|
down() {
|
|
this.cursor === this.choices.length - 1 ? this.moveCursor(0) : this.moveCursor(this.cursor + 1), this.render();
|
|
}
|
|
next() {
|
|
this.moveCursor((this.cursor + 1) % this.choices.length), this.render();
|
|
}
|
|
_(t, r) {
|
|
if (t === " ") return this.submit();
|
|
}
|
|
get selection() {
|
|
return this.choices[this.cursor];
|
|
}
|
|
render() {
|
|
if (this.closed) return;
|
|
this.firstRender ? this.out.write(iX.hide) : this.out.write($F(this.outputText, this.out.columns)), super.render();
|
|
let t = tX(this.cursor, this.choices.length, this.optionsPerPage), r = t.startIndex, i = t.endIndex;
|
|
if (this.outputText = [WF.symbol(this.done, this.aborted), gs.bold(this.msg), WF.delimiter(!1), this.done ? this.selection.title : this.
|
|
selection.disabled ? gs.yellow(this.warn) : gs.gray(this.hint)].join(" "), !this.done) {
|
|
this.outputText += `
|
|
`;
|
|
for (let n = r; n < i; n++) {
|
|
let a, o, u = "", l = this.choices[n];
|
|
n === r && r > 0 ? o = Xp.arrowUp : n === i - 1 && i < this.choices.length ? o = Xp.arrowDown : o = " ", l.disabled ? (a = this.cursor ===
|
|
n ? gs.gray().underline(l.title) : gs.strikethrough().gray(l.title), o = (this.cursor === n ? gs.bold().gray(Xp.pointer) + " " : "\
|
|
") + o) : (a = this.cursor === n ? gs.cyan().underline(l.title) : l.title, o = (this.cursor === n ? gs.cyan(Xp.pointer) + " " : " ") + o,
|
|
l.description && this.cursor === n && (u = ` - ${l.description}`, (o.length + a.length + u.length >= this.out.columns || l.description.
|
|
split(/\r?\n/).length > 1) && (u = `
|
|
` + eX(l.description, {
|
|
margin: 3,
|
|
width: this.out.columns
|
|
})))), this.outputText += `${o} ${a}${gs.gray(u)}
|
|
`;
|
|
}
|
|
}
|
|
this.out.write(this.outputText);
|
|
}
|
|
};
|
|
VF.exports = Qb;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/elements/toggle.js
|
|
var YF = E((GYe, XF) => {
|
|
"use strict";
|
|
var Yp = sr(), nX = ys(), GF = bn(), KF = GF.style, sX = GF.clear, JF = or(), zF = JF.cursor, aX = JF.erase, eD = class extends nX {
|
|
static {
|
|
s(this, "TogglePrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.msg = t.message, this.value = !!t.initial, this.active = t.active || "on", this.inactive = t.inactive || "off", this.initialValue =
|
|
this.value, this.render();
|
|
}
|
|
reset() {
|
|
this.value = this.initialValue, this.fire(), this.render();
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
submit() {
|
|
this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
deactivate() {
|
|
if (this.value === !1) return this.bell();
|
|
this.value = !1, this.render();
|
|
}
|
|
activate() {
|
|
if (this.value === !0) return this.bell();
|
|
this.value = !0, this.render();
|
|
}
|
|
delete() {
|
|
this.deactivate();
|
|
}
|
|
left() {
|
|
this.deactivate();
|
|
}
|
|
right() {
|
|
this.activate();
|
|
}
|
|
down() {
|
|
this.deactivate();
|
|
}
|
|
up() {
|
|
this.activate();
|
|
}
|
|
next() {
|
|
this.value = !this.value, this.fire(), this.render();
|
|
}
|
|
_(t, r) {
|
|
if (t === " ")
|
|
this.value = !this.value;
|
|
else if (t === "1")
|
|
this.value = !0;
|
|
else if (t === "0")
|
|
this.value = !1;
|
|
else return this.bell();
|
|
this.render();
|
|
}
|
|
render() {
|
|
this.closed || (this.firstRender ? this.out.write(zF.hide) : this.out.write(sX(this.outputText, this.out.columns)), super.render(), this.
|
|
outputText = [KF.symbol(this.done, this.aborted), Yp.bold(this.msg), KF.delimiter(this.done), this.value ? this.inactive : Yp.cyan().underline(
|
|
this.inactive), Yp.gray("/"), this.value ? Yp.cyan().underline(this.active) : this.active].join(" "), this.out.write(aX.line + zF.to(0) +
|
|
this.outputText));
|
|
}
|
|
};
|
|
XF.exports = eD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/dateparts/datepart.js
|
|
var jn = E((XYe, ZF) => {
|
|
"use strict";
|
|
var tD = class e {
|
|
static {
|
|
s(this, "DatePart");
|
|
}
|
|
constructor({
|
|
token: t,
|
|
date: r,
|
|
parts: i,
|
|
locales: n
|
|
}) {
|
|
this.token = t, this.date = r || /* @__PURE__ */ new Date(), this.parts = i || [this], this.locales = n || {};
|
|
}
|
|
up() {
|
|
}
|
|
down() {
|
|
}
|
|
next() {
|
|
let t = this.parts.indexOf(this);
|
|
return this.parts.find((r, i) => i > t && r instanceof e);
|
|
}
|
|
setTo(t) {
|
|
}
|
|
prev() {
|
|
let t = [].concat(this.parts).reverse(), r = t.indexOf(this);
|
|
return t.find((i, n) => n > r && i instanceof e);
|
|
}
|
|
toString() {
|
|
return String(this.date);
|
|
}
|
|
};
|
|
ZF.exports = tD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/dateparts/meridiem.js
|
|
var eI = E((ZYe, QF) => {
|
|
"use strict";
|
|
var oX = jn(), rD = class extends oX {
|
|
static {
|
|
s(this, "Meridiem");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setHours((this.date.getHours() + 12) % 24);
|
|
}
|
|
down() {
|
|
this.up();
|
|
}
|
|
toString() {
|
|
let t = this.date.getHours() > 12 ? "pm" : "am";
|
|
return /\A/.test(this.token) ? t.toUpperCase() : t;
|
|
}
|
|
};
|
|
QF.exports = rD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/dateparts/day.js
|
|
var rI = E((eZe, tI) => {
|
|
"use strict";
|
|
var uX = jn(), lX = /* @__PURE__ */ s((e) => (e = e % 10, e === 1 ? "st" : e === 2 ? "nd" : e === 3 ? "rd" : "th"), "pos"), iD = class extends uX {
|
|
static {
|
|
s(this, "Day");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setDate(this.date.getDate() + 1);
|
|
}
|
|
down() {
|
|
this.date.setDate(this.date.getDate() - 1);
|
|
}
|
|
setTo(t) {
|
|
this.date.setDate(parseInt(t.substr(-2)));
|
|
}
|
|
toString() {
|
|
let t = this.date.getDate(), r = this.date.getDay();
|
|
return this.token === "DD" ? String(t).padStart(2, "0") : this.token === "Do" ? t + lX(t) : this.token === "d" ? r + 1 : this.token ===
|
|
"ddd" ? this.locales.weekdaysShort[r] : this.token === "dddd" ? this.locales.weekdays[r] : t;
|
|
}
|
|
};
|
|
tI.exports = iD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/dateparts/hours.js
|
|
var nI = E((rZe, iI) => {
|
|
"use strict";
|
|
var cX = jn(), nD = class extends cX {
|
|
static {
|
|
s(this, "Hours");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setHours(this.date.getHours() + 1);
|
|
}
|
|
down() {
|
|
this.date.setHours(this.date.getHours() - 1);
|
|
}
|
|
setTo(t) {
|
|
this.date.setHours(parseInt(t.substr(-2)));
|
|
}
|
|
toString() {
|
|
let t = this.date.getHours();
|
|
return /h/.test(this.token) && (t = t % 12 || 12), this.token.length > 1 ? String(t).padStart(2, "0") : t;
|
|
}
|
|
};
|
|
iI.exports = nD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/dateparts/milliseconds.js
|
|
var aI = E((nZe, sI) => {
|
|
"use strict";
|
|
var fX = jn(), sD = class extends fX {
|
|
static {
|
|
s(this, "Milliseconds");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setMilliseconds(this.date.getMilliseconds() + 1);
|
|
}
|
|
down() {
|
|
this.date.setMilliseconds(this.date.getMilliseconds() - 1);
|
|
}
|
|
setTo(t) {
|
|
this.date.setMilliseconds(parseInt(t.substr(-this.token.length)));
|
|
}
|
|
toString() {
|
|
return String(this.date.getMilliseconds()).padStart(4, "0").substr(0, this.token.length);
|
|
}
|
|
};
|
|
sI.exports = sD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/dateparts/minutes.js
|
|
var uI = E((aZe, oI) => {
|
|
"use strict";
|
|
var dX = jn(), aD = class extends dX {
|
|
static {
|
|
s(this, "Minutes");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setMinutes(this.date.getMinutes() + 1);
|
|
}
|
|
down() {
|
|
this.date.setMinutes(this.date.getMinutes() - 1);
|
|
}
|
|
setTo(t) {
|
|
this.date.setMinutes(parseInt(t.substr(-2)));
|
|
}
|
|
toString() {
|
|
let t = this.date.getMinutes();
|
|
return this.token.length > 1 ? String(t).padStart(2, "0") : t;
|
|
}
|
|
};
|
|
oI.exports = aD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/dateparts/month.js
|
|
var cI = E((uZe, lI) => {
|
|
"use strict";
|
|
var pX = jn(), oD = class extends pX {
|
|
static {
|
|
s(this, "Month");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setMonth(this.date.getMonth() + 1);
|
|
}
|
|
down() {
|
|
this.date.setMonth(this.date.getMonth() - 1);
|
|
}
|
|
setTo(t) {
|
|
t = parseInt(t.substr(-2)) - 1, this.date.setMonth(t < 0 ? 0 : t);
|
|
}
|
|
toString() {
|
|
let t = this.date.getMonth(), r = this.token.length;
|
|
return r === 2 ? String(t + 1).padStart(2, "0") : r === 3 ? this.locales.monthsShort[t] : r === 4 ? this.locales.months[t] : String(t +
|
|
1);
|
|
}
|
|
};
|
|
lI.exports = oD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/dateparts/seconds.js
|
|
var dI = E((cZe, fI) => {
|
|
"use strict";
|
|
var hX = jn(), uD = class extends hX {
|
|
static {
|
|
s(this, "Seconds");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setSeconds(this.date.getSeconds() + 1);
|
|
}
|
|
down() {
|
|
this.date.setSeconds(this.date.getSeconds() - 1);
|
|
}
|
|
setTo(t) {
|
|
this.date.setSeconds(parseInt(t.substr(-2)));
|
|
}
|
|
toString() {
|
|
let t = this.date.getSeconds();
|
|
return this.token.length > 1 ? String(t).padStart(2, "0") : t;
|
|
}
|
|
};
|
|
fI.exports = uD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/dateparts/year.js
|
|
var hI = E((dZe, pI) => {
|
|
"use strict";
|
|
var mX = jn(), lD = class extends mX {
|
|
static {
|
|
s(this, "Year");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setFullYear(this.date.getFullYear() + 1);
|
|
}
|
|
down() {
|
|
this.date.setFullYear(this.date.getFullYear() - 1);
|
|
}
|
|
setTo(t) {
|
|
this.date.setFullYear(t.substr(-4));
|
|
}
|
|
toString() {
|
|
let t = String(this.date.getFullYear()).padStart(4, "0");
|
|
return this.token.length === 2 ? t.substr(-2) : t;
|
|
}
|
|
};
|
|
pI.exports = lD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/dateparts/index.js
|
|
var yI = E((hZe, mI) => {
|
|
"use strict";
|
|
mI.exports = {
|
|
DatePart: jn(),
|
|
Meridiem: eI(),
|
|
Day: rI(),
|
|
Hours: nI(),
|
|
Milliseconds: aI(),
|
|
Minutes: uI(),
|
|
Month: cI(),
|
|
Seconds: dI(),
|
|
Year: hI()
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/elements/date.js
|
|
var wI = E((mZe, CI) => {
|
|
"use strict";
|
|
function gI(e, t, r, i, n, a, o) {
|
|
try {
|
|
var u = e[a](o), l = u.value;
|
|
} catch (c) {
|
|
r(c);
|
|
return;
|
|
}
|
|
u.done ? t(l) : Promise.resolve(l).then(i, n);
|
|
}
|
|
s(gI, "asyncGeneratorStep");
|
|
function bI(e) {
|
|
return function() {
|
|
var t = this, r = arguments;
|
|
return new Promise(function(i, n) {
|
|
var a = e.apply(t, r);
|
|
function o(l) {
|
|
gI(a, i, n, o, u, "next", l);
|
|
}
|
|
s(o, "_next");
|
|
function u(l) {
|
|
gI(a, i, n, o, u, "throw", l);
|
|
}
|
|
s(u, "_throw"), o(void 0);
|
|
});
|
|
};
|
|
}
|
|
s(bI, "_asyncToGenerator");
|
|
var cD = sr(), yX = ys(), dD = bn(), DI = dD.style, vI = dD.clear, gX = dD.figures, TI = or(), bX = TI.erase, EI = TI.cursor, bs = yI(), xI = bs.
|
|
DatePart, DX = bs.Meridiem, vX = bs.Day, EX = bs.Hours, xX = bs.Milliseconds, SX = bs.Minutes, TX = bs.Month, CX = bs.Seconds, wX = bs.Year,
|
|
AX = /\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g, SI = {
|
|
1: ({
|
|
token: e
|
|
}) => e.replace(/\\(.)/g, "$1"),
|
|
2: (e) => new vX(e),
|
|
// Day // TODO
|
|
3: (e) => new TX(e),
|
|
// Month
|
|
4: (e) => new wX(e),
|
|
// Year
|
|
5: (e) => new DX(e),
|
|
// AM/PM // TODO (special)
|
|
6: (e) => new EX(e),
|
|
// Hours
|
|
7: (e) => new SX(e),
|
|
// Minutes
|
|
8: (e) => new CX(e),
|
|
// Seconds
|
|
9: (e) => new xX(e)
|
|
// Fractional seconds
|
|
}, _X = {
|
|
months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","),
|
|
monthsShort: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),
|
|
weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
|
|
weekdaysShort: "Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")
|
|
}, fD = class extends yX {
|
|
static {
|
|
s(this, "DatePrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.msg = t.message, this.cursor = 0, this.typed = "", this.locales = Object.assign(_X, t.locales), this._date = t.initial ||
|
|
/* @__PURE__ */ new Date(), this.errorMsg = t.error || "Please Enter A Valid Value", this.validator = t.validate || (() => !0), this.mask =
|
|
t.mask || "YYYY-MM-DD HH:mm:ss", this.clear = vI("", this.out.columns), this.render();
|
|
}
|
|
get value() {
|
|
return this.date;
|
|
}
|
|
get date() {
|
|
return this._date;
|
|
}
|
|
set date(t) {
|
|
t && this._date.setTime(t.getTime());
|
|
}
|
|
set mask(t) {
|
|
let r;
|
|
for (this.parts = []; r = AX.exec(t); ) {
|
|
let n = r.shift(), a = r.findIndex((o) => o != null);
|
|
this.parts.push(a in SI ? SI[a]({
|
|
token: r[a] || n,
|
|
date: this.date,
|
|
parts: this.parts,
|
|
locales: this.locales
|
|
}) : r[a] || n);
|
|
}
|
|
let i = this.parts.reduce((n, a) => (typeof a == "string" && typeof n[n.length - 1] == "string" ? n[n.length - 1] += a : n.push(a), n),
|
|
[]);
|
|
this.parts.splice(0), this.parts.push(...i), this.reset();
|
|
}
|
|
moveCursor(t) {
|
|
this.typed = "", this.cursor = t, this.fire();
|
|
}
|
|
reset() {
|
|
this.moveCursor(this.parts.findIndex((t) => t instanceof xI)), this.fire(), this.render();
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
this.done = this.aborted = !0, this.error = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
validate() {
|
|
var t = this;
|
|
return bI(function* () {
|
|
let r = yield t.validator(t.value);
|
|
typeof r == "string" && (t.errorMsg = r, r = !1), t.error = !r;
|
|
})();
|
|
}
|
|
submit() {
|
|
var t = this;
|
|
return bI(function* () {
|
|
if (yield t.validate(), t.error) {
|
|
t.color = "red", t.fire(), t.render();
|
|
return;
|
|
}
|
|
t.done = !0, t.aborted = !1, t.fire(), t.render(), t.out.write(`
|
|
`), t.close();
|
|
})();
|
|
}
|
|
up() {
|
|
this.typed = "", this.parts[this.cursor].up(), this.render();
|
|
}
|
|
down() {
|
|
this.typed = "", this.parts[this.cursor].down(), this.render();
|
|
}
|
|
left() {
|
|
let t = this.parts[this.cursor].prev();
|
|
if (t == null) return this.bell();
|
|
this.moveCursor(this.parts.indexOf(t)), this.render();
|
|
}
|
|
right() {
|
|
let t = this.parts[this.cursor].next();
|
|
if (t == null) return this.bell();
|
|
this.moveCursor(this.parts.indexOf(t)), this.render();
|
|
}
|
|
next() {
|
|
let t = this.parts[this.cursor].next();
|
|
this.moveCursor(t ? this.parts.indexOf(t) : this.parts.findIndex((r) => r instanceof xI)), this.render();
|
|
}
|
|
_(t) {
|
|
/\d/.test(t) && (this.typed += t, this.parts[this.cursor].setTo(this.typed), this.render());
|
|
}
|
|
render() {
|
|
this.closed || (this.firstRender ? this.out.write(EI.hide) : this.out.write(vI(this.outputText, this.out.columns)), super.render(), this.
|
|
outputText = [DI.symbol(this.done, this.aborted), cD.bold(this.msg), DI.delimiter(!1), this.parts.reduce((t, r, i) => t.concat(i === this.
|
|
cursor && !this.done ? cD.cyan().underline(r.toString()) : r), []).join("")].join(" "), this.error && (this.outputText += this.errorMsg.
|
|
split(`
|
|
`).reduce((t, r, i) => t + `
|
|
${i ? " " : gX.pointerSmall} ${cD.red().italic(r)}`, "")), this.out.write(bX.line + EI.to(0) + this.outputText));
|
|
}
|
|
};
|
|
CI.exports = fD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/elements/number.js
|
|
var kI = E((gZe, OI) => {
|
|
"use strict";
|
|
function AI(e, t, r, i, n, a, o) {
|
|
try {
|
|
var u = e[a](o), l = u.value;
|
|
} catch (c) {
|
|
r(c);
|
|
return;
|
|
}
|
|
u.done ? t(l) : Promise.resolve(l).then(i, n);
|
|
}
|
|
s(AI, "asyncGeneratorStep");
|
|
function _I(e) {
|
|
return function() {
|
|
var t = this, r = arguments;
|
|
return new Promise(function(i, n) {
|
|
var a = e.apply(t, r);
|
|
function o(l) {
|
|
AI(a, i, n, o, u, "next", l);
|
|
}
|
|
s(o, "_next");
|
|
function u(l) {
|
|
AI(a, i, n, o, u, "throw", l);
|
|
}
|
|
s(u, "_throw"), o(void 0);
|
|
});
|
|
};
|
|
}
|
|
s(_I, "_asyncToGenerator");
|
|
var Zp = sr(), PX = ys(), II = or(), Qp = II.cursor, FX = II.erase, eh = bn(), pD = eh.style, IX = eh.figures, PI = eh.clear, OX = eh.lines,
|
|
kX = /[0-9]/, hD = /* @__PURE__ */ s((e) => e !== void 0, "isDef"), FI = /* @__PURE__ */ s((e, t) => {
|
|
let r = Math.pow(10, t);
|
|
return Math.round(e * r) / r;
|
|
}, "round"), mD = class extends PX {
|
|
static {
|
|
s(this, "NumberPrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.transform = pD.render(t.style), this.msg = t.message, this.initial = hD(t.initial) ? t.initial : "", this.float = !!t.float,
|
|
this.round = t.round || 2, this.inc = t.increment || 1, this.min = hD(t.min) ? t.min : -1 / 0, this.max = hD(t.max) ? t.max : 1 / 0, this.
|
|
errorMsg = t.error || "Please Enter A Valid Value", this.validator = t.validate || (() => !0), this.color = "cyan", this.value = "", this.
|
|
typed = "", this.lastHit = 0, this.render();
|
|
}
|
|
set value(t) {
|
|
!t && t !== 0 ? (this.placeholder = !0, this.rendered = Zp.gray(this.transform.render(`${this.initial}`)), this._value = "") : (this.placeholder =
|
|
!1, this.rendered = this.transform.render(`${FI(t, this.round)}`), this._value = FI(t, this.round)), this.fire();
|
|
}
|
|
get value() {
|
|
return this._value;
|
|
}
|
|
parse(t) {
|
|
return this.float ? parseFloat(t) : parseInt(t);
|
|
}
|
|
valid(t) {
|
|
return t === "-" || t === "." && this.float || kX.test(t);
|
|
}
|
|
reset() {
|
|
this.typed = "", this.value = "", this.fire(), this.render();
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
let t = this.value;
|
|
this.value = t !== "" ? t : this.initial, this.done = this.aborted = !0, this.error = !1, this.fire(), this.render(), this.out.write(`\
|
|
|
|
`), this.close();
|
|
}
|
|
validate() {
|
|
var t = this;
|
|
return _I(function* () {
|
|
let r = yield t.validator(t.value);
|
|
typeof r == "string" && (t.errorMsg = r, r = !1), t.error = !r;
|
|
})();
|
|
}
|
|
submit() {
|
|
var t = this;
|
|
return _I(function* () {
|
|
if (yield t.validate(), t.error) {
|
|
t.color = "red", t.fire(), t.render();
|
|
return;
|
|
}
|
|
let r = t.value;
|
|
t.value = r !== "" ? r : t.initial, t.done = !0, t.aborted = !1, t.error = !1, t.fire(), t.render(), t.out.write(`
|
|
`), t.close();
|
|
})();
|
|
}
|
|
up() {
|
|
if (this.typed = "", this.value === "" && (this.value = this.min - this.inc), this.value >= this.max) return this.bell();
|
|
this.value += this.inc, this.color = "cyan", this.fire(), this.render();
|
|
}
|
|
down() {
|
|
if (this.typed = "", this.value === "" && (this.value = this.min + this.inc), this.value <= this.min) return this.bell();
|
|
this.value -= this.inc, this.color = "cyan", this.fire(), this.render();
|
|
}
|
|
delete() {
|
|
let t = this.value.toString();
|
|
if (t.length === 0) return this.bell();
|
|
this.value = this.parse(t = t.slice(0, -1)) || "", this.value !== "" && this.value < this.min && (this.value = this.min), this.color =
|
|
"cyan", this.fire(), this.render();
|
|
}
|
|
next() {
|
|
this.value = this.initial, this.fire(), this.render();
|
|
}
|
|
_(t, r) {
|
|
if (!this.valid(t)) return this.bell();
|
|
let i = Date.now();
|
|
if (i - this.lastHit > 1e3 && (this.typed = ""), this.typed += t, this.lastHit = i, this.color = "cyan", t === ".") return this.fire();
|
|
this.value = Math.min(this.parse(this.typed), this.max), this.value > this.max && (this.value = this.max), this.value < this.min && (this.
|
|
value = this.min), this.fire(), this.render();
|
|
}
|
|
render() {
|
|
this.closed || (this.firstRender || (this.outputError && this.out.write(Qp.down(OX(this.outputError, this.out.columns) - 1) + PI(this.
|
|
outputError, this.out.columns)), this.out.write(PI(this.outputText, this.out.columns))), super.render(), this.outputError = "", this.outputText =
|
|
[pD.symbol(this.done, this.aborted), Zp.bold(this.msg), pD.delimiter(this.done), !this.done || !this.done && !this.placeholder ? Zp[this.
|
|
color]().underline(this.rendered) : this.rendered].join(" "), this.error && (this.outputError += this.errorMsg.split(`
|
|
`).reduce((t, r, i) => t + `
|
|
${i ? " " : IX.pointerSmall} ${Zp.red().italic(r)}`, "")), this.out.write(FX.line + Qp.to(0) + this.outputText + Qp.save + this.outputError +
|
|
Qp.restore));
|
|
}
|
|
};
|
|
OI.exports = mD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/elements/multiselect.js
|
|
var gD = E((DZe, MI) => {
|
|
"use strict";
|
|
var Ln = sr(), BX = or(), NX = BX.cursor, MX = ys(), $c = bn(), BI = $c.clear, ma = $c.figures, NI = $c.style, RX = $c.wrap, jX = $c.entriesToDisplay,
|
|
yD = class extends MX {
|
|
static {
|
|
s(this, "MultiselectPrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.msg = t.message, this.cursor = t.cursor || 0, this.scrollIndex = t.cursor || 0, this.hint = t.hint || "", this.warn = t.
|
|
warn || "- This option is disabled -", this.minSelected = t.min, this.showMinError = !1, this.maxChoices = t.max, this.instructions = t.
|
|
instructions, this.optionsPerPage = t.optionsPerPage || 10, this.value = t.choices.map((r, i) => (typeof r == "string" && (r = {
|
|
title: r,
|
|
value: i
|
|
}), {
|
|
title: r && (r.title || r.value || r),
|
|
description: r && r.description,
|
|
value: r && (r.value === void 0 ? i : r.value),
|
|
selected: r && r.selected,
|
|
disabled: r && r.disabled
|
|
})), this.clear = BI("", this.out.columns), t.overrideRender || this.render();
|
|
}
|
|
reset() {
|
|
this.value.map((t) => !t.selected), this.cursor = 0, this.fire(), this.render();
|
|
}
|
|
selected() {
|
|
return this.value.filter((t) => t.selected);
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
submit() {
|
|
let t = this.value.filter((r) => r.selected);
|
|
this.minSelected && t.length < this.minSelected ? (this.showMinError = !0, this.render()) : (this.done = !0, this.aborted = !1, this.fire(),
|
|
this.render(), this.out.write(`
|
|
`), this.close());
|
|
}
|
|
first() {
|
|
this.cursor = 0, this.render();
|
|
}
|
|
last() {
|
|
this.cursor = this.value.length - 1, this.render();
|
|
}
|
|
next() {
|
|
this.cursor = (this.cursor + 1) % this.value.length, this.render();
|
|
}
|
|
up() {
|
|
this.cursor === 0 ? this.cursor = this.value.length - 1 : this.cursor--, this.render();
|
|
}
|
|
down() {
|
|
this.cursor === this.value.length - 1 ? this.cursor = 0 : this.cursor++, this.render();
|
|
}
|
|
left() {
|
|
this.value[this.cursor].selected = !1, this.render();
|
|
}
|
|
right() {
|
|
if (this.value.filter((t) => t.selected).length >= this.maxChoices) return this.bell();
|
|
this.value[this.cursor].selected = !0, this.render();
|
|
}
|
|
handleSpaceToggle() {
|
|
let t = this.value[this.cursor];
|
|
if (t.selected)
|
|
t.selected = !1, this.render();
|
|
else {
|
|
if (t.disabled || this.value.filter((r) => r.selected).length >= this.maxChoices)
|
|
return this.bell();
|
|
t.selected = !0, this.render();
|
|
}
|
|
}
|
|
toggleAll() {
|
|
if (this.maxChoices !== void 0 || this.value[this.cursor].disabled)
|
|
return this.bell();
|
|
let t = !this.value[this.cursor].selected;
|
|
this.value.filter((r) => !r.disabled).forEach((r) => r.selected = t), this.render();
|
|
}
|
|
_(t, r) {
|
|
if (t === " ")
|
|
this.handleSpaceToggle();
|
|
else if (t === "a")
|
|
this.toggleAll();
|
|
else
|
|
return this.bell();
|
|
}
|
|
renderInstructions() {
|
|
return this.instructions === void 0 || this.instructions ? typeof this.instructions == "string" ? this.instructions : `
|
|
Instructions:
|
|
${ma.arrowUp}/${ma.arrowDown}: Highlight option
|
|
${ma.arrowLeft}/${ma.arrowRight}/[space]: Toggle selection
|
|
` + (this.maxChoices === void 0 ? ` a: Toggle all
|
|
` : "") + " enter/return: Complete answer" : "";
|
|
}
|
|
renderOption(t, r, i, n) {
|
|
let a = (r.selected ? Ln.green(ma.radioOn) : ma.radioOff) + " " + n + " ", o, u;
|
|
return r.disabled ? o = t === i ? Ln.gray().underline(r.title) : Ln.strikethrough().gray(r.title) : (o = t === i ? Ln.cyan().underline(
|
|
r.title) : r.title, t === i && r.description && (u = ` - ${r.description}`, (a.length + o.length + u.length >= this.out.columns || r.description.
|
|
split(/\r?\n/).length > 1) && (u = `
|
|
` + RX(r.description, {
|
|
margin: a.length,
|
|
width: this.out.columns
|
|
})))), a + o + Ln.gray(u || "");
|
|
}
|
|
// shared with autocompleteMultiselect
|
|
paginateOptions(t) {
|
|
if (t.length === 0)
|
|
return Ln.red("No matches for this query.");
|
|
let r = jX(this.cursor, t.length, this.optionsPerPage), i = r.startIndex, n = r.endIndex, a, o = [];
|
|
for (let u = i; u < n; u++)
|
|
u === i && i > 0 ? a = ma.arrowUp : u === n - 1 && n < t.length ? a = ma.arrowDown : a = " ", o.push(this.renderOption(this.cursor, t[u],
|
|
u, a));
|
|
return `
|
|
` + o.join(`
|
|
`);
|
|
}
|
|
// shared with autocomleteMultiselect
|
|
renderOptions(t) {
|
|
return this.done ? "" : this.paginateOptions(t);
|
|
}
|
|
renderDoneOrInstructions() {
|
|
if (this.done)
|
|
return this.value.filter((r) => r.selected).map((r) => r.title).join(", ");
|
|
let t = [Ln.gray(this.hint), this.renderInstructions()];
|
|
return this.value[this.cursor].disabled && t.push(Ln.yellow(this.warn)), t.join(" ");
|
|
}
|
|
render() {
|
|
if (this.closed) return;
|
|
this.firstRender && this.out.write(NX.hide), super.render();
|
|
let t = [NI.symbol(this.done, this.aborted), Ln.bold(this.msg), NI.delimiter(!1), this.renderDoneOrInstructions()].join(" ");
|
|
this.showMinError && (t += Ln.red(`You must select a minimum of ${this.minSelected} choices.`), this.showMinError = !1), t += this.renderOptions(
|
|
this.value), this.out.write(this.clear + t), this.clear = BI(t, this.out.columns);
|
|
}
|
|
};
|
|
MI.exports = yD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/elements/autocomplete.js
|
|
var $I = E((EZe, WI) => {
|
|
"use strict";
|
|
function RI(e, t, r, i, n, a, o) {
|
|
try {
|
|
var u = e[a](o), l = u.value;
|
|
} catch (c) {
|
|
r(c);
|
|
return;
|
|
}
|
|
u.done ? t(l) : Promise.resolve(l).then(i, n);
|
|
}
|
|
s(RI, "asyncGeneratorStep");
|
|
function LX(e) {
|
|
return function() {
|
|
var t = this, r = arguments;
|
|
return new Promise(function(i, n) {
|
|
var a = e.apply(t, r);
|
|
function o(l) {
|
|
RI(a, i, n, o, u, "next", l);
|
|
}
|
|
s(o, "_next");
|
|
function u(l) {
|
|
RI(a, i, n, o, u, "throw", l);
|
|
}
|
|
s(u, "_throw"), o(void 0);
|
|
});
|
|
};
|
|
}
|
|
s(LX, "_asyncToGenerator");
|
|
var Vc = sr(), qX = ys(), UI = or(), UX = UI.erase, jI = UI.cursor, Hc = bn(), bD = Hc.style, LI = Hc.clear, DD = Hc.figures, WX = Hc.wrap,
|
|
$X = Hc.entriesToDisplay, qI = /* @__PURE__ */ s((e, t) => e[t] && (e[t].value || e[t].title || e[t]), "getVal"), VX = /* @__PURE__ */ s((e, t) => e[t] &&
|
|
(e[t].title || e[t].value || e[t]), "getTitle"), HX = /* @__PURE__ */ s((e, t) => {
|
|
let r = e.findIndex((i) => i.value === t || i.title === t);
|
|
return r > -1 ? r : void 0;
|
|
}, "getIndex"), vD = class extends qX {
|
|
static {
|
|
s(this, "AutocompletePrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.msg = t.message, this.suggest = t.suggest, this.choices = t.choices, this.initial = typeof t.initial == "number" ? t.initial :
|
|
HX(t.choices, t.initial), this.select = this.initial || t.cursor || 0, this.i18n = {
|
|
noMatches: t.noMatches || "no matches found"
|
|
}, this.fallback = t.fallback || this.initial, this.clearFirst = t.clearFirst || !1, this.suggestions = [], this.input = "", this.limit =
|
|
t.limit || 10, this.cursor = 0, this.transform = bD.render(t.style), this.scale = this.transform.scale, this.render = this.render.bind(
|
|
this), this.complete = this.complete.bind(this), this.clear = LI("", this.out.columns), this.complete(this.render), this.render();
|
|
}
|
|
set fallback(t) {
|
|
this._fb = Number.isSafeInteger(parseInt(t)) ? parseInt(t) : t;
|
|
}
|
|
get fallback() {
|
|
let t;
|
|
return typeof this._fb == "number" ? t = this.choices[this._fb] : typeof this._fb == "string" && (t = {
|
|
title: this._fb
|
|
}), t || this._fb || {
|
|
title: this.i18n.noMatches
|
|
};
|
|
}
|
|
moveSelect(t) {
|
|
this.select = t, this.suggestions.length > 0 ? this.value = qI(this.suggestions, t) : this.value = this.fallback.value, this.fire();
|
|
}
|
|
complete(t) {
|
|
var r = this;
|
|
return LX(function* () {
|
|
let i = r.completing = r.suggest(r.input, r.choices), n = yield i;
|
|
if (r.completing !== i) return;
|
|
r.suggestions = n.map((o, u, l) => ({
|
|
title: VX(l, u),
|
|
value: qI(l, u),
|
|
description: o.description
|
|
})), r.completing = !1;
|
|
let a = Math.max(n.length - 1, 0);
|
|
r.moveSelect(Math.min(a, r.select)), t && t();
|
|
})();
|
|
}
|
|
reset() {
|
|
this.input = "", this.complete(() => {
|
|
this.moveSelect(this.initial !== void 0 ? this.initial : 0), this.render();
|
|
}), this.render();
|
|
}
|
|
exit() {
|
|
this.clearFirst && this.input.length > 0 ? this.reset() : (this.done = this.exited = !0, this.aborted = !1, this.fire(), this.render(),
|
|
this.out.write(`
|
|
`), this.close());
|
|
}
|
|
abort() {
|
|
this.done = this.aborted = !0, this.exited = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
submit() {
|
|
this.done = !0, this.aborted = this.exited = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
_(t, r) {
|
|
let i = this.input.slice(0, this.cursor), n = this.input.slice(this.cursor);
|
|
this.input = `${i}${t}${n}`, this.cursor = i.length + 1, this.complete(this.render), this.render();
|
|
}
|
|
delete() {
|
|
if (this.cursor === 0) return this.bell();
|
|
let t = this.input.slice(0, this.cursor - 1), r = this.input.slice(this.cursor);
|
|
this.input = `${t}${r}`, this.complete(this.render), this.cursor = this.cursor - 1, this.render();
|
|
}
|
|
deleteForward() {
|
|
if (this.cursor * this.scale >= this.rendered.length) return this.bell();
|
|
let t = this.input.slice(0, this.cursor), r = this.input.slice(this.cursor + 1);
|
|
this.input = `${t}${r}`, this.complete(this.render), this.render();
|
|
}
|
|
first() {
|
|
this.moveSelect(0), this.render();
|
|
}
|
|
last() {
|
|
this.moveSelect(this.suggestions.length - 1), this.render();
|
|
}
|
|
up() {
|
|
this.select === 0 ? this.moveSelect(this.suggestions.length - 1) : this.moveSelect(this.select - 1), this.render();
|
|
}
|
|
down() {
|
|
this.select === this.suggestions.length - 1 ? this.moveSelect(0) : this.moveSelect(this.select + 1), this.render();
|
|
}
|
|
next() {
|
|
this.select === this.suggestions.length - 1 ? this.moveSelect(0) : this.moveSelect(this.select + 1), this.render();
|
|
}
|
|
nextPage() {
|
|
this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1)), this.render();
|
|
}
|
|
prevPage() {
|
|
this.moveSelect(Math.max(this.select - this.limit, 0)), this.render();
|
|
}
|
|
left() {
|
|
if (this.cursor <= 0) return this.bell();
|
|
this.cursor = this.cursor - 1, this.render();
|
|
}
|
|
right() {
|
|
if (this.cursor * this.scale >= this.rendered.length) return this.bell();
|
|
this.cursor = this.cursor + 1, this.render();
|
|
}
|
|
renderOption(t, r, i, n) {
|
|
let a, o = i ? DD.arrowUp : n ? DD.arrowDown : " ", u = r ? Vc.cyan().underline(t.title) : t.title;
|
|
return o = (r ? Vc.cyan(DD.pointer) + " " : " ") + o, t.description && (a = ` - ${t.description}`, (o.length + u.length + a.length >=
|
|
this.out.columns || t.description.split(/\r?\n/).length > 1) && (a = `
|
|
` + WX(t.description, {
|
|
margin: 3,
|
|
width: this.out.columns
|
|
}))), o + " " + u + Vc.gray(a || "");
|
|
}
|
|
render() {
|
|
if (this.closed) return;
|
|
this.firstRender ? this.out.write(jI.hide) : this.out.write(LI(this.outputText, this.out.columns)), super.render();
|
|
let t = $X(this.select, this.choices.length, this.limit), r = t.startIndex, i = t.endIndex;
|
|
if (this.outputText = [bD.symbol(this.done, this.aborted, this.exited), Vc.bold(this.msg), bD.delimiter(this.completing), this.done &&
|
|
this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)].join(" "), !this.
|
|
done) {
|
|
let n = this.suggestions.slice(r, i).map((a, o) => this.renderOption(a, this.select === o + r, o === 0 && r > 0, o + r === i - 1 && i <
|
|
this.choices.length)).join(`
|
|
`);
|
|
this.outputText += `
|
|
` + (n || Vc.gray(this.fallback.title));
|
|
}
|
|
this.out.write(UX.line + jI.to(0) + this.outputText);
|
|
}
|
|
};
|
|
WI.exports = vD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/elements/autocompleteMultiselect.js
|
|
var zI = E((SZe, KI) => {
|
|
"use strict";
|
|
var Ds = sr(), KX = or(), zX = KX.cursor, GX = gD(), xD = bn(), VI = xD.clear, HI = xD.style, Vu = xD.figures, ED = class extends GX {
|
|
static {
|
|
s(this, "AutocompleteMultiselectPrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
t.overrideRender = !0, super(t), this.inputValue = "", this.clear = VI("", this.out.columns), this.filteredOptions = this.value, this.
|
|
render();
|
|
}
|
|
last() {
|
|
this.cursor = this.filteredOptions.length - 1, this.render();
|
|
}
|
|
next() {
|
|
this.cursor = (this.cursor + 1) % this.filteredOptions.length, this.render();
|
|
}
|
|
up() {
|
|
this.cursor === 0 ? this.cursor = this.filteredOptions.length - 1 : this.cursor--, this.render();
|
|
}
|
|
down() {
|
|
this.cursor === this.filteredOptions.length - 1 ? this.cursor = 0 : this.cursor++, this.render();
|
|
}
|
|
left() {
|
|
this.filteredOptions[this.cursor].selected = !1, this.render();
|
|
}
|
|
right() {
|
|
if (this.value.filter((t) => t.selected).length >= this.maxChoices) return this.bell();
|
|
this.filteredOptions[this.cursor].selected = !0, this.render();
|
|
}
|
|
delete() {
|
|
this.inputValue.length && (this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1), this.updateFilteredOptions());
|
|
}
|
|
updateFilteredOptions() {
|
|
let t = this.filteredOptions[this.cursor];
|
|
this.filteredOptions = this.value.filter((i) => this.inputValue ? !!(typeof i.title == "string" && i.title.toLowerCase().includes(this.
|
|
inputValue.toLowerCase()) || typeof i.value == "string" && i.value.toLowerCase().includes(this.inputValue.toLowerCase())) : !0);
|
|
let r = this.filteredOptions.findIndex((i) => i === t);
|
|
this.cursor = r < 0 ? 0 : r, this.render();
|
|
}
|
|
handleSpaceToggle() {
|
|
let t = this.filteredOptions[this.cursor];
|
|
if (t.selected)
|
|
t.selected = !1, this.render();
|
|
else {
|
|
if (t.disabled || this.value.filter((r) => r.selected).length >= this.maxChoices)
|
|
return this.bell();
|
|
t.selected = !0, this.render();
|
|
}
|
|
}
|
|
handleInputChange(t) {
|
|
this.inputValue = this.inputValue + t, this.updateFilteredOptions();
|
|
}
|
|
_(t, r) {
|
|
t === " " ? this.handleSpaceToggle() : this.handleInputChange(t);
|
|
}
|
|
renderInstructions() {
|
|
return this.instructions === void 0 || this.instructions ? typeof this.instructions == "string" ? this.instructions : `
|
|
Instructions:
|
|
${Vu.arrowUp}/${Vu.arrowDown}: Highlight option
|
|
${Vu.arrowLeft}/${Vu.arrowRight}/[space]: Toggle selection
|
|
[a,b,c]/delete: Filter choices
|
|
enter/return: Complete answer
|
|
` : "";
|
|
}
|
|
renderCurrentInput() {
|
|
return `
|
|
Filtered results for: ${this.inputValue ? this.inputValue : Ds.gray("Enter something to filter")}
|
|
`;
|
|
}
|
|
renderOption(t, r, i) {
|
|
let n;
|
|
return r.disabled ? n = t === i ? Ds.gray().underline(r.title) : Ds.strikethrough().gray(r.title) : n = t === i ? Ds.cyan().underline(
|
|
r.title) : r.title, (r.selected ? Ds.green(Vu.radioOn) : Vu.radioOff) + " " + n;
|
|
}
|
|
renderDoneOrInstructions() {
|
|
if (this.done)
|
|
return this.value.filter((r) => r.selected).map((r) => r.title).join(", ");
|
|
let t = [Ds.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];
|
|
return this.filteredOptions.length && this.filteredOptions[this.cursor].disabled && t.push(Ds.yellow(this.warn)), t.join(" ");
|
|
}
|
|
render() {
|
|
if (this.closed) return;
|
|
this.firstRender && this.out.write(zX.hide), super.render();
|
|
let t = [HI.symbol(this.done, this.aborted), Ds.bold(this.msg), HI.delimiter(!1), this.renderDoneOrInstructions()].join(" ");
|
|
this.showMinError && (t += Ds.red(`You must select a minimum of ${this.minSelected} choices.`), this.showMinError = !1), t += this.renderOptions(
|
|
this.filteredOptions), this.out.write(this.clear + t), this.clear = VI(t, this.out.columns);
|
|
}
|
|
};
|
|
KI.exports = ED;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/elements/confirm.js
|
|
var eO = E((CZe, QI) => {
|
|
"use strict";
|
|
var GI = sr(), JX = ys(), YI = bn(), JI = YI.style, XX = YI.clear, ZI = or(), YX = ZI.erase, XI = ZI.cursor, SD = class extends JX {
|
|
static {
|
|
s(this, "ConfirmPrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.msg = t.message, this.value = t.initial, this.initialValue = !!t.initial, this.yesMsg = t.yes || "yes", this.yesOption =
|
|
t.yesOption || "(Y/n)", this.noMsg = t.no || "no", this.noOption = t.noOption || "(y/N)", this.render();
|
|
}
|
|
reset() {
|
|
this.value = this.initialValue, this.fire(), this.render();
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
submit() {
|
|
this.value = this.value || !1, this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
_(t, r) {
|
|
return t.toLowerCase() === "y" ? (this.value = !0, this.submit()) : t.toLowerCase() === "n" ? (this.value = !1, this.submit()) : this.
|
|
bell();
|
|
}
|
|
render() {
|
|
this.closed || (this.firstRender ? this.out.write(XI.hide) : this.out.write(XX(this.outputText, this.out.columns)), super.render(), this.
|
|
outputText = [JI.symbol(this.done, this.aborted), GI.bold(this.msg), JI.delimiter(this.done), this.done ? this.value ? this.yesMsg : this.
|
|
noMsg : GI.gray(this.initialValue ? this.yesOption : this.noOption)].join(" "), this.out.write(YX.line + XI.to(0) + this.outputText));
|
|
}
|
|
};
|
|
QI.exports = SD;
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/elements/index.js
|
|
var rO = E((AZe, tO) => {
|
|
"use strict";
|
|
tO.exports = {
|
|
TextPrompt: UF(),
|
|
SelectPrompt: HF(),
|
|
TogglePrompt: YF(),
|
|
DatePrompt: wI(),
|
|
NumberPrompt: kI(),
|
|
MultiselectPrompt: gD(),
|
|
AutocompletePrompt: $I(),
|
|
AutocompleteMultiselectPrompt: zI(),
|
|
ConfirmPrompt: eO()
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/prompts.js
|
|
var nO = E((iO) => {
|
|
"use strict";
|
|
var xi = iO, ZX = rO(), th = /* @__PURE__ */ s((e) => e, "noop");
|
|
function qn(e, t, r = {}) {
|
|
return new Promise((i, n) => {
|
|
let a = new ZX[e](t), o = r.onAbort || th, u = r.onSubmit || th, l = r.onExit || th;
|
|
a.on("state", t.onState || th), a.on("submit", (c) => i(u(c))), a.on("exit", (c) => i(l(c))), a.on("abort", (c) => n(o(c)));
|
|
});
|
|
}
|
|
s(qn, "toPrompt");
|
|
xi.text = (e) => qn("TextPrompt", e);
|
|
xi.password = (e) => (e.style = "password", xi.text(e));
|
|
xi.invisible = (e) => (e.style = "invisible", xi.text(e));
|
|
xi.number = (e) => qn("NumberPrompt", e);
|
|
xi.date = (e) => qn("DatePrompt", e);
|
|
xi.confirm = (e) => qn("ConfirmPrompt", e);
|
|
xi.list = (e) => {
|
|
let t = e.separator || ",";
|
|
return qn("TextPrompt", e, {
|
|
onSubmit: /* @__PURE__ */ s((r) => r.split(t).map((i) => i.trim()), "onSubmit")
|
|
});
|
|
};
|
|
xi.toggle = (e) => qn("TogglePrompt", e);
|
|
xi.select = (e) => qn("SelectPrompt", e);
|
|
xi.multiselect = (e) => {
|
|
e.choices = [].concat(e.choices || []);
|
|
let t = /* @__PURE__ */ s((r) => r.filter((i) => i.selected).map((i) => i.value), "toSelected");
|
|
return qn("MultiselectPrompt", e, {
|
|
onAbort: t,
|
|
onSubmit: t
|
|
});
|
|
};
|
|
xi.autocompleteMultiselect = (e) => {
|
|
e.choices = [].concat(e.choices || []);
|
|
let t = /* @__PURE__ */ s((r) => r.filter((i) => i.selected).map((i) => i.value), "toSelected");
|
|
return qn("AutocompleteMultiselectPrompt", e, {
|
|
onAbort: t,
|
|
onSubmit: t
|
|
});
|
|
};
|
|
var QX = /* @__PURE__ */ s((e, t) => Promise.resolve(t.filter((r) => r.title.slice(0, e.length).toLowerCase() === e.toLowerCase())), "byTi\
|
|
tle");
|
|
xi.autocomplete = (e) => (e.suggest = e.suggest || QX, e.choices = [].concat(e.choices || []), qn("AutocompletePrompt", e));
|
|
});
|
|
|
|
// ../node_modules/prompts/dist/index.js
|
|
var dO = E((FZe, fO) => {
|
|
"use strict";
|
|
function sO(e, t) {
|
|
var r = Object.keys(e);
|
|
if (Object.getOwnPropertySymbols) {
|
|
var i = Object.getOwnPropertySymbols(e);
|
|
t && (i = i.filter(function(n) {
|
|
return Object.getOwnPropertyDescriptor(e, n).enumerable;
|
|
})), r.push.apply(r, i);
|
|
}
|
|
return r;
|
|
}
|
|
s(sO, "ownKeys");
|
|
function aO(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
t % 2 ? sO(Object(r), !0).forEach(function(i) {
|
|
eY(e, i, r[i]);
|
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : sO(Object(r)).forEach(function(i) {
|
|
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(r, i));
|
|
});
|
|
}
|
|
return e;
|
|
}
|
|
s(aO, "_objectSpread");
|
|
function eY(e, t, r) {
|
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
}
|
|
s(eY, "_defineProperty");
|
|
function tY(e, t) {
|
|
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
if (!r) {
|
|
if (Array.isArray(e) || (r = rY(e)) || t && e && typeof e.length == "number") {
|
|
r && (e = r);
|
|
var i = 0, n = /* @__PURE__ */ s(function() {
|
|
}, "F");
|
|
return { s: n, n: /* @__PURE__ */ s(function() {
|
|
return i >= e.length ? { done: !0 } : { done: !1, value: e[i++] };
|
|
}, "n"), e: /* @__PURE__ */ s(function(c) {
|
|
throw c;
|
|
}, "e"), f: n };
|
|
}
|
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
}
|
|
var a = !0, o = !1, u;
|
|
return { s: /* @__PURE__ */ s(function() {
|
|
r = r.call(e);
|
|
}, "s"), n: /* @__PURE__ */ s(function() {
|
|
var c = r.next();
|
|
return a = c.done, c;
|
|
}, "n"), e: /* @__PURE__ */ s(function(c) {
|
|
o = !0, u = c;
|
|
}, "e"), f: /* @__PURE__ */ s(function() {
|
|
try {
|
|
!a && r.return != null && r.return();
|
|
} finally {
|
|
if (o) throw u;
|
|
}
|
|
}, "f") };
|
|
}
|
|
s(tY, "_createForOfIteratorHelper");
|
|
function rY(e, t) {
|
|
if (e) {
|
|
if (typeof e == "string") return oO(e, t);
|
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return oO(e, t);
|
|
}
|
|
}
|
|
s(rY, "_unsupportedIterableToArray");
|
|
function oO(e, t) {
|
|
(t == null || t > e.length) && (t = e.length);
|
|
for (var r = 0, i = new Array(t); r < t; r++) i[r] = e[r];
|
|
return i;
|
|
}
|
|
s(oO, "_arrayLikeToArray");
|
|
function uO(e, t, r, i, n, a, o) {
|
|
try {
|
|
var u = e[a](o), l = u.value;
|
|
} catch (c) {
|
|
r(c);
|
|
return;
|
|
}
|
|
u.done ? t(l) : Promise.resolve(l).then(i, n);
|
|
}
|
|
s(uO, "asyncGeneratorStep");
|
|
function lO(e) {
|
|
return function() {
|
|
var t = this, r = arguments;
|
|
return new Promise(function(i, n) {
|
|
var a = e.apply(t, r);
|
|
function o(l) {
|
|
uO(a, i, n, o, u, "next", l);
|
|
}
|
|
s(o, "_next");
|
|
function u(l) {
|
|
uO(a, i, n, o, u, "throw", l);
|
|
}
|
|
s(u, "_throw"), o(void 0);
|
|
});
|
|
};
|
|
}
|
|
s(lO, "_asyncToGenerator");
|
|
var TD = nO(), iY = ["suggest", "format", "onState", "validate", "onRender", "type"], cO = /* @__PURE__ */ s(() => {
|
|
}, "noop");
|
|
function ya() {
|
|
return CD.apply(this, arguments);
|
|
}
|
|
s(ya, "prompt");
|
|
function CD() {
|
|
return CD = lO(function* (e = [], {
|
|
onSubmit: t = cO,
|
|
onCancel: r = cO
|
|
} = {}) {
|
|
let i = {}, n = ya._override || {};
|
|
e = [].concat(e);
|
|
let a, o, u, l, c, f, m = /* @__PURE__ */ function() {
|
|
var g = lO(function* (b, D, v = !1) {
|
|
if (!(!v && b.validate && b.validate(D) !== !0))
|
|
return b.format ? yield b.format(D, i) : D;
|
|
});
|
|
return /* @__PURE__ */ s(function(D, v) {
|
|
return g.apply(this, arguments);
|
|
}, "getFormattedAnswer");
|
|
}();
|
|
var h = tY(e), d;
|
|
try {
|
|
for (h.s(); !(d = h.n()).done; ) {
|
|
o = d.value;
|
|
var y = o;
|
|
if (l = y.name, c = y.type, typeof c == "function" && (c = yield c(a, aO({}, i), o), o.type = c), !!c) {
|
|
for (let g in o) {
|
|
if (iY.includes(g)) continue;
|
|
let b = o[g];
|
|
o[g] = typeof b == "function" ? yield b(a, aO({}, i), f) : b;
|
|
}
|
|
if (f = o, typeof o.message != "string")
|
|
throw new Error("prompt message is required");
|
|
var p = o;
|
|
if (l = p.name, c = p.type, TD[c] === void 0)
|
|
throw new Error(`prompt type (${c}) is not defined`);
|
|
if (n[o.name] !== void 0 && (a = yield m(o, n[o.name]), a !== void 0)) {
|
|
i[l] = a;
|
|
continue;
|
|
}
|
|
try {
|
|
a = ya._injected ? nY(ya._injected, o.initial) : yield TD[c](o), i[l] = a = yield m(o, a, !0), u = yield t(o, a, i);
|
|
} catch {
|
|
u = !(yield r(o, i));
|
|
}
|
|
if (u) return i;
|
|
}
|
|
}
|
|
} catch (g) {
|
|
h.e(g);
|
|
} finally {
|
|
h.f();
|
|
}
|
|
return i;
|
|
}), CD.apply(this, arguments);
|
|
}
|
|
s(CD, "_prompt");
|
|
function nY(e, t) {
|
|
let r = e.shift();
|
|
if (r instanceof Error)
|
|
throw r;
|
|
return r === void 0 ? t : r;
|
|
}
|
|
s(nY, "getInjectedAnswer");
|
|
function sY(e) {
|
|
ya._injected = (ya._injected || []).concat(e);
|
|
}
|
|
s(sY, "inject");
|
|
function aY(e) {
|
|
ya._override = Object.assign({}, e);
|
|
}
|
|
s(aY, "override");
|
|
fO.exports = Object.assign(ya, {
|
|
prompt: ya,
|
|
prompts: TD,
|
|
inject: sY,
|
|
override: aY
|
|
});
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/util/action.js
|
|
var hO = E((OZe, pO) => {
|
|
"use strict";
|
|
pO.exports = (e, t) => {
|
|
if (!(e.meta && e.name !== "escape")) {
|
|
if (e.ctrl) {
|
|
if (e.name === "a") return "first";
|
|
if (e.name === "c" || e.name === "d") return "abort";
|
|
if (e.name === "e") return "last";
|
|
if (e.name === "g") return "reset";
|
|
}
|
|
if (t) {
|
|
if (e.name === "j") return "down";
|
|
if (e.name === "k") return "up";
|
|
}
|
|
return e.name === "return" || e.name === "enter" ? "submit" : e.name === "backspace" ? "delete" : e.name === "delete" ? "deleteForward" :
|
|
e.name === "abort" ? "abort" : e.name === "escape" ? "exit" : e.name === "tab" ? "next" : e.name === "pagedown" ? "nextPage" : e.name ===
|
|
"pageup" ? "prevPage" : e.name === "home" ? "home" : e.name === "end" ? "end" : e.name === "up" ? "up" : e.name === "down" ? "down" : e.
|
|
name === "right" ? "right" : e.name === "left" ? "left" : !1;
|
|
}
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/util/strip.js
|
|
var rh = E((kZe, mO) => {
|
|
"use strict";
|
|
mO.exports = (e) => {
|
|
let t = [
|
|
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"
|
|
].join("|"), r = new RegExp(t, "g");
|
|
return typeof e == "string" ? e.replace(r, "") : e;
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/util/clear.js
|
|
var bO = E((BZe, gO) => {
|
|
"use strict";
|
|
var oY = rh(), { erase: yO, cursor: uY } = or(), lY = /* @__PURE__ */ s((e) => [...oY(e)].length, "width");
|
|
gO.exports = function(e, t) {
|
|
if (!t) return yO.line + uY.to(0);
|
|
let r = 0, i = e.split(/\r?\n/);
|
|
for (let n of i)
|
|
r += 1 + Math.floor(Math.max(lY(n) - 1, 0) / t);
|
|
return yO.lines(r);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/util/figures.js
|
|
var wD = E((MZe, DO) => {
|
|
"use strict";
|
|
var Kc = {
|
|
arrowUp: "\u2191",
|
|
arrowDown: "\u2193",
|
|
arrowLeft: "\u2190",
|
|
arrowRight: "\u2192",
|
|
radioOn: "\u25C9",
|
|
radioOff: "\u25EF",
|
|
tick: "\u2714",
|
|
cross: "\u2716",
|
|
ellipsis: "\u2026",
|
|
pointerSmall: "\u203A",
|
|
line: "\u2500",
|
|
pointer: "\u276F"
|
|
}, cY = {
|
|
arrowUp: Kc.arrowUp,
|
|
arrowDown: Kc.arrowDown,
|
|
arrowLeft: Kc.arrowLeft,
|
|
arrowRight: Kc.arrowRight,
|
|
radioOn: "(*)",
|
|
radioOff: "( )",
|
|
tick: "\u221A",
|
|
cross: "\xD7",
|
|
ellipsis: "...",
|
|
pointerSmall: "\xBB",
|
|
line: "\u2500",
|
|
pointer: ">"
|
|
}, fY = process.platform === "win32" ? cY : Kc;
|
|
DO.exports = fY;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/util/style.js
|
|
var EO = E((RZe, vO) => {
|
|
"use strict";
|
|
var Hu = sr(), bo = wD(), AD = Object.freeze({
|
|
password: { scale: 1, render: /* @__PURE__ */ s((e) => "*".repeat(e.length), "render") },
|
|
emoji: { scale: 2, render: /* @__PURE__ */ s((e) => "\u{1F603}".repeat(e.length), "render") },
|
|
invisible: { scale: 0, render: /* @__PURE__ */ s((e) => "", "render") },
|
|
default: { scale: 1, render: /* @__PURE__ */ s((e) => `${e}`, "render") }
|
|
}), dY = /* @__PURE__ */ s((e) => AD[e] || AD.default, "render"), zc = Object.freeze({
|
|
aborted: Hu.red(bo.cross),
|
|
done: Hu.green(bo.tick),
|
|
exited: Hu.yellow(bo.cross),
|
|
default: Hu.cyan("?")
|
|
}), pY = /* @__PURE__ */ s((e, t, r) => t ? zc.aborted : r ? zc.exited : e ? zc.done : zc.default, "symbol"), hY = /* @__PURE__ */ s((e) => Hu.
|
|
gray(e ? bo.ellipsis : bo.pointerSmall), "delimiter"), mY = /* @__PURE__ */ s((e, t) => Hu.gray(e ? t ? bo.pointerSmall : "+" : bo.line), "\
|
|
item");
|
|
vO.exports = {
|
|
styles: AD,
|
|
render: dY,
|
|
symbols: zc,
|
|
symbol: pY,
|
|
delimiter: hY,
|
|
item: mY
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/util/lines.js
|
|
var SO = E((LZe, xO) => {
|
|
"use strict";
|
|
var yY = rh();
|
|
xO.exports = function(e, t) {
|
|
let r = String(yY(e) || "").split(/\r?\n/);
|
|
return t ? r.map((i) => Math.ceil(i.length / t)).reduce((i, n) => i + n) : r.length;
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/util/wrap.js
|
|
var CO = E((qZe, TO) => {
|
|
"use strict";
|
|
TO.exports = (e, t = {}) => {
|
|
let r = Number.isSafeInteger(parseInt(t.margin)) ? new Array(parseInt(t.margin)).fill(" ").join("") : t.margin || "", i = t.width;
|
|
return (e || "").split(/\r?\n/g).map((n) => n.split(/\s+/g).reduce((a, o) => (o.length + r.length >= i || a[a.length - 1].length + o.length +
|
|
1 < i ? a[a.length - 1] += ` ${o}` : a.push(`${r}${o}`), a), [r]).join(`
|
|
`)).join(`
|
|
`);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/util/entriesToDisplay.js
|
|
var AO = E((UZe, wO) => {
|
|
"use strict";
|
|
wO.exports = (e, t, r) => {
|
|
r = r || t;
|
|
let i = Math.min(t - r, e - Math.floor(r / 2));
|
|
i < 0 && (i = 0);
|
|
let n = Math.min(i + r, t);
|
|
return { startIndex: i, endIndex: n };
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/util/index.js
|
|
var Dn = E((WZe, _O) => {
|
|
"use strict";
|
|
_O.exports = {
|
|
action: hO(),
|
|
clear: bO(),
|
|
style: EO(),
|
|
strip: rh(),
|
|
figures: wD(),
|
|
lines: SO(),
|
|
wrap: CO(),
|
|
entriesToDisplay: AO()
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/elements/prompt.js
|
|
var vs = E(($Ze, FO) => {
|
|
"use strict";
|
|
var PO = V("readline"), { action: gY } = Dn(), bY = V("events"), { beep: DY, cursor: vY } = or(), EY = sr(), _D = class extends bY {
|
|
static {
|
|
s(this, "Prompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(), this.firstRender = !0, this.in = t.stdin || process.stdin, this.out = t.stdout || process.stdout, this.onRender = (t.onRender ||
|
|
(() => {
|
|
})).bind(this);
|
|
let r = PO.createInterface({ input: this.in, escapeCodeTimeout: 50 });
|
|
PO.emitKeypressEvents(this.in, r), this.in.isTTY && this.in.setRawMode(!0);
|
|
let i = ["SelectPrompt", "MultiselectPrompt"].indexOf(this.constructor.name) > -1, n = /* @__PURE__ */ s((a, o) => {
|
|
let u = gY(o, i);
|
|
u === !1 ? this._ && this._(a, o) : typeof this[u] == "function" ? this[u](o) : this.bell();
|
|
}, "keypress");
|
|
this.close = () => {
|
|
this.out.write(vY.show), this.in.removeListener("keypress", n), this.in.isTTY && this.in.setRawMode(!1), r.close(), this.emit(this.aborted ?
|
|
"abort" : this.exited ? "exit" : "submit", this.value), this.closed = !0;
|
|
}, this.in.on("keypress", n);
|
|
}
|
|
fire() {
|
|
this.emit("state", {
|
|
value: this.value,
|
|
aborted: !!this.aborted,
|
|
exited: !!this.exited
|
|
});
|
|
}
|
|
bell() {
|
|
this.out.write(DY);
|
|
}
|
|
render() {
|
|
this.onRender(EY), this.firstRender && (this.firstRender = !1);
|
|
}
|
|
};
|
|
FO.exports = _D;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/elements/text.js
|
|
var OO = E((HZe, IO) => {
|
|
var ih = sr(), xY = vs(), { erase: SY, cursor: Gc } = or(), { style: PD, clear: FD, lines: TY, figures: CY } = Dn(), ID = class extends xY {
|
|
static {
|
|
s(this, "TextPrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.transform = PD.render(t.style), this.scale = this.transform.scale, this.msg = t.message, this.initial = t.initial || "",
|
|
this.validator = t.validate || (() => !0), this.value = "", this.errorMsg = t.error || "Please Enter A Valid Value", this.cursor = +!!this.
|
|
initial, this.cursorOffset = 0, this.clear = FD("", this.out.columns), this.render();
|
|
}
|
|
set value(t) {
|
|
!t && this.initial ? (this.placeholder = !0, this.rendered = ih.gray(this.transform.render(this.initial))) : (this.placeholder = !1, this.
|
|
rendered = this.transform.render(t)), this._value = t, this.fire();
|
|
}
|
|
get value() {
|
|
return this._value;
|
|
}
|
|
reset() {
|
|
this.value = "", this.cursor = +!!this.initial, this.cursorOffset = 0, this.fire(), this.render();
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
this.value = this.value || this.initial, this.done = this.aborted = !0, this.error = !1, this.red = !1, this.fire(), this.render(), this.
|
|
out.write(`
|
|
`), this.close();
|
|
}
|
|
async validate() {
|
|
let t = await this.validator(this.value);
|
|
typeof t == "string" && (this.errorMsg = t, t = !1), this.error = !t;
|
|
}
|
|
async submit() {
|
|
if (this.value = this.value || this.initial, this.cursorOffset = 0, this.cursor = this.rendered.length, await this.validate(), this.error) {
|
|
this.red = !0, this.fire(), this.render();
|
|
return;
|
|
}
|
|
this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
next() {
|
|
if (!this.placeholder) return this.bell();
|
|
this.value = this.initial, this.cursor = this.rendered.length, this.fire(), this.render();
|
|
}
|
|
moveCursor(t) {
|
|
this.placeholder || (this.cursor = this.cursor + t, this.cursorOffset += t);
|
|
}
|
|
_(t, r) {
|
|
let i = this.value.slice(0, this.cursor), n = this.value.slice(this.cursor);
|
|
this.value = `${i}${t}${n}`, this.red = !1, this.cursor = this.placeholder ? 0 : i.length + 1, this.render();
|
|
}
|
|
delete() {
|
|
if (this.isCursorAtStart()) return this.bell();
|
|
let t = this.value.slice(0, this.cursor - 1), r = this.value.slice(this.cursor);
|
|
this.value = `${t}${r}`, this.red = !1, this.isCursorAtStart() ? this.cursorOffset = 0 : (this.cursorOffset++, this.moveCursor(-1)), this.
|
|
render();
|
|
}
|
|
deleteForward() {
|
|
if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();
|
|
let t = this.value.slice(0, this.cursor), r = this.value.slice(this.cursor + 1);
|
|
this.value = `${t}${r}`, this.red = !1, this.isCursorAtEnd() ? this.cursorOffset = 0 : this.cursorOffset++, this.render();
|
|
}
|
|
first() {
|
|
this.cursor = 0, this.render();
|
|
}
|
|
last() {
|
|
this.cursor = this.value.length, this.render();
|
|
}
|
|
left() {
|
|
if (this.cursor <= 0 || this.placeholder) return this.bell();
|
|
this.moveCursor(-1), this.render();
|
|
}
|
|
right() {
|
|
if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();
|
|
this.moveCursor(1), this.render();
|
|
}
|
|
isCursorAtStart() {
|
|
return this.cursor === 0 || this.placeholder && this.cursor === 1;
|
|
}
|
|
isCursorAtEnd() {
|
|
return this.cursor === this.rendered.length || this.placeholder && this.cursor === this.rendered.length + 1;
|
|
}
|
|
render() {
|
|
this.closed || (this.firstRender || (this.outputError && this.out.write(Gc.down(TY(this.outputError, this.out.columns) - 1) + FD(this.
|
|
outputError, this.out.columns)), this.out.write(FD(this.outputText, this.out.columns))), super.render(), this.outputError = "", this.outputText =
|
|
[
|
|
PD.symbol(this.done, this.aborted),
|
|
ih.bold(this.msg),
|
|
PD.delimiter(this.done),
|
|
this.red ? ih.red(this.rendered) : this.rendered
|
|
].join(" "), this.error && (this.outputError += this.errorMsg.split(`
|
|
`).reduce((t, r, i) => t + `
|
|
${i ? " " : CY.pointerSmall} ${ih.red().italic(r)}`, "")), this.out.write(SY.line + Gc.to(0) + this.outputText + Gc.save + this.outputError +
|
|
Gc.restore + Gc.move(this.cursorOffset, 0)));
|
|
}
|
|
};
|
|
IO.exports = ID;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/elements/select.js
|
|
var MO = E((zZe, NO) => {
|
|
"use strict";
|
|
var Es = sr(), wY = vs(), { style: kO, clear: BO, figures: nh, wrap: AY, entriesToDisplay: _Y } = Dn(), { cursor: PY } = or(), OD = class extends wY {
|
|
static {
|
|
s(this, "SelectPrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.msg = t.message, this.hint = t.hint || "- Use arrow-keys. Return to submit.", this.warn = t.warn || "- This option is d\
|
|
isabled", this.cursor = t.initial || 0, this.choices = t.choices.map((r, i) => (typeof r == "string" && (r = { title: r, value: i }), {
|
|
title: r && (r.title || r.value || r),
|
|
value: r && (r.value === void 0 ? i : r.value),
|
|
description: r && r.description,
|
|
selected: r && r.selected,
|
|
disabled: r && r.disabled
|
|
})), this.optionsPerPage = t.optionsPerPage || 10, this.value = (this.choices[this.cursor] || {}).value, this.clear = BO("", this.out.
|
|
columns), this.render();
|
|
}
|
|
moveCursor(t) {
|
|
this.cursor = t, this.value = this.choices[t].value, this.fire();
|
|
}
|
|
reset() {
|
|
this.moveCursor(0), this.fire(), this.render();
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
submit() {
|
|
this.selection.disabled ? this.bell() : (this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close());
|
|
}
|
|
first() {
|
|
this.moveCursor(0), this.render();
|
|
}
|
|
last() {
|
|
this.moveCursor(this.choices.length - 1), this.render();
|
|
}
|
|
up() {
|
|
this.cursor === 0 ? this.moveCursor(this.choices.length - 1) : this.moveCursor(this.cursor - 1), this.render();
|
|
}
|
|
down() {
|
|
this.cursor === this.choices.length - 1 ? this.moveCursor(0) : this.moveCursor(this.cursor + 1), this.render();
|
|
}
|
|
next() {
|
|
this.moveCursor((this.cursor + 1) % this.choices.length), this.render();
|
|
}
|
|
_(t, r) {
|
|
if (t === " ") return this.submit();
|
|
}
|
|
get selection() {
|
|
return this.choices[this.cursor];
|
|
}
|
|
render() {
|
|
if (this.closed) return;
|
|
this.firstRender ? this.out.write(PY.hide) : this.out.write(BO(this.outputText, this.out.columns)), super.render();
|
|
let { startIndex: t, endIndex: r } = _Y(this.cursor, this.choices.length, this.optionsPerPage);
|
|
if (this.outputText = [
|
|
kO.symbol(this.done, this.aborted),
|
|
Es.bold(this.msg),
|
|
kO.delimiter(!1),
|
|
this.done ? this.selection.title : this.selection.disabled ? Es.yellow(this.warn) : Es.gray(this.hint)
|
|
].join(" "), !this.done) {
|
|
this.outputText += `
|
|
`;
|
|
for (let i = t; i < r; i++) {
|
|
let n, a, o = "", u = this.choices[i];
|
|
i === t && t > 0 ? a = nh.arrowUp : i === r - 1 && r < this.choices.length ? a = nh.arrowDown : a = " ", u.disabled ? (n = this.cursor ===
|
|
i ? Es.gray().underline(u.title) : Es.strikethrough().gray(u.title), a = (this.cursor === i ? Es.bold().gray(nh.pointer) + " " : "\
|
|
") + a) : (n = this.cursor === i ? Es.cyan().underline(u.title) : u.title, a = (this.cursor === i ? Es.cyan(nh.pointer) + " " : " ") + a,
|
|
u.description && this.cursor === i && (o = ` - ${u.description}`, (a.length + n.length + o.length >= this.out.columns || u.description.
|
|
split(/\r?\n/).length > 1) && (o = `
|
|
` + AY(u.description, { margin: 3, width: this.out.columns })))), this.outputText += `${a} ${n}${Es.gray(o)}
|
|
`;
|
|
}
|
|
}
|
|
this.out.write(this.outputText);
|
|
}
|
|
};
|
|
NO.exports = OD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/elements/toggle.js
|
|
var qO = E((JZe, LO) => {
|
|
var sh = sr(), FY = vs(), { style: RO, clear: IY } = Dn(), { cursor: jO, erase: OY } = or(), kD = class extends FY {
|
|
static {
|
|
s(this, "TogglePrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.msg = t.message, this.value = !!t.initial, this.active = t.active || "on", this.inactive = t.inactive || "off", this.initialValue =
|
|
this.value, this.render();
|
|
}
|
|
reset() {
|
|
this.value = this.initialValue, this.fire(), this.render();
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
submit() {
|
|
this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
deactivate() {
|
|
if (this.value === !1) return this.bell();
|
|
this.value = !1, this.render();
|
|
}
|
|
activate() {
|
|
if (this.value === !0) return this.bell();
|
|
this.value = !0, this.render();
|
|
}
|
|
delete() {
|
|
this.deactivate();
|
|
}
|
|
left() {
|
|
this.deactivate();
|
|
}
|
|
right() {
|
|
this.activate();
|
|
}
|
|
down() {
|
|
this.deactivate();
|
|
}
|
|
up() {
|
|
this.activate();
|
|
}
|
|
next() {
|
|
this.value = !this.value, this.fire(), this.render();
|
|
}
|
|
_(t, r) {
|
|
if (t === " ")
|
|
this.value = !this.value;
|
|
else if (t === "1")
|
|
this.value = !0;
|
|
else if (t === "0")
|
|
this.value = !1;
|
|
else return this.bell();
|
|
this.render();
|
|
}
|
|
render() {
|
|
this.closed || (this.firstRender ? this.out.write(jO.hide) : this.out.write(IY(this.outputText, this.out.columns)), super.render(), this.
|
|
outputText = [
|
|
RO.symbol(this.done, this.aborted),
|
|
sh.bold(this.msg),
|
|
RO.delimiter(this.done),
|
|
this.value ? this.inactive : sh.cyan().underline(this.inactive),
|
|
sh.gray("/"),
|
|
this.value ? sh.cyan().underline(this.active) : this.active
|
|
].join(" "), this.out.write(OY.line + jO.to(0) + this.outputText));
|
|
}
|
|
};
|
|
LO.exports = kD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/dateparts/datepart.js
|
|
var Un = E((YZe, UO) => {
|
|
"use strict";
|
|
var BD = class e {
|
|
static {
|
|
s(this, "DatePart");
|
|
}
|
|
constructor({ token: t, date: r, parts: i, locales: n }) {
|
|
this.token = t, this.date = r || /* @__PURE__ */ new Date(), this.parts = i || [this], this.locales = n || {};
|
|
}
|
|
up() {
|
|
}
|
|
down() {
|
|
}
|
|
next() {
|
|
let t = this.parts.indexOf(this);
|
|
return this.parts.find((r, i) => i > t && r instanceof e);
|
|
}
|
|
setTo(t) {
|
|
}
|
|
prev() {
|
|
let t = [].concat(this.parts).reverse(), r = t.indexOf(this);
|
|
return t.find((i, n) => n > r && i instanceof e);
|
|
}
|
|
toString() {
|
|
return String(this.date);
|
|
}
|
|
};
|
|
UO.exports = BD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/dateparts/meridiem.js
|
|
var $O = E((QZe, WO) => {
|
|
"use strict";
|
|
var kY = Un(), ND = class extends kY {
|
|
static {
|
|
s(this, "Meridiem");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setHours((this.date.getHours() + 12) % 24);
|
|
}
|
|
down() {
|
|
this.up();
|
|
}
|
|
toString() {
|
|
let t = this.date.getHours() > 12 ? "pm" : "am";
|
|
return /\A/.test(this.token) ? t.toUpperCase() : t;
|
|
}
|
|
};
|
|
WO.exports = ND;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/dateparts/day.js
|
|
var HO = E((tQe, VO) => {
|
|
"use strict";
|
|
var BY = Un(), NY = /* @__PURE__ */ s((e) => (e = e % 10, e === 1 ? "st" : e === 2 ? "nd" : e === 3 ? "rd" : "th"), "pos"), MD = class extends BY {
|
|
static {
|
|
s(this, "Day");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setDate(this.date.getDate() + 1);
|
|
}
|
|
down() {
|
|
this.date.setDate(this.date.getDate() - 1);
|
|
}
|
|
setTo(t) {
|
|
this.date.setDate(parseInt(t.substr(-2)));
|
|
}
|
|
toString() {
|
|
let t = this.date.getDate(), r = this.date.getDay();
|
|
return this.token === "DD" ? String(t).padStart(2, "0") : this.token === "Do" ? t + NY(t) : this.token === "d" ? r + 1 : this.token ===
|
|
"ddd" ? this.locales.weekdaysShort[r] : this.token === "dddd" ? this.locales.weekdays[r] : t;
|
|
}
|
|
};
|
|
VO.exports = MD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/dateparts/hours.js
|
|
var zO = E((iQe, KO) => {
|
|
"use strict";
|
|
var MY = Un(), RD = class extends MY {
|
|
static {
|
|
s(this, "Hours");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setHours(this.date.getHours() + 1);
|
|
}
|
|
down() {
|
|
this.date.setHours(this.date.getHours() - 1);
|
|
}
|
|
setTo(t) {
|
|
this.date.setHours(parseInt(t.substr(-2)));
|
|
}
|
|
toString() {
|
|
let t = this.date.getHours();
|
|
return /h/.test(this.token) && (t = t % 12 || 12), this.token.length > 1 ? String(t).padStart(2, "0") : t;
|
|
}
|
|
};
|
|
KO.exports = RD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/dateparts/milliseconds.js
|
|
var JO = E((sQe, GO) => {
|
|
"use strict";
|
|
var RY = Un(), jD = class extends RY {
|
|
static {
|
|
s(this, "Milliseconds");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setMilliseconds(this.date.getMilliseconds() + 1);
|
|
}
|
|
down() {
|
|
this.date.setMilliseconds(this.date.getMilliseconds() - 1);
|
|
}
|
|
setTo(t) {
|
|
this.date.setMilliseconds(parseInt(t.substr(-this.token.length)));
|
|
}
|
|
toString() {
|
|
return String(this.date.getMilliseconds()).padStart(4, "0").substr(0, this.token.length);
|
|
}
|
|
};
|
|
GO.exports = jD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/dateparts/minutes.js
|
|
var YO = E((oQe, XO) => {
|
|
"use strict";
|
|
var jY = Un(), LD = class extends jY {
|
|
static {
|
|
s(this, "Minutes");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setMinutes(this.date.getMinutes() + 1);
|
|
}
|
|
down() {
|
|
this.date.setMinutes(this.date.getMinutes() - 1);
|
|
}
|
|
setTo(t) {
|
|
this.date.setMinutes(parseInt(t.substr(-2)));
|
|
}
|
|
toString() {
|
|
let t = this.date.getMinutes();
|
|
return this.token.length > 1 ? String(t).padStart(2, "0") : t;
|
|
}
|
|
};
|
|
XO.exports = LD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/dateparts/month.js
|
|
var QO = E((lQe, ZO) => {
|
|
"use strict";
|
|
var LY = Un(), qD = class extends LY {
|
|
static {
|
|
s(this, "Month");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setMonth(this.date.getMonth() + 1);
|
|
}
|
|
down() {
|
|
this.date.setMonth(this.date.getMonth() - 1);
|
|
}
|
|
setTo(t) {
|
|
t = parseInt(t.substr(-2)) - 1, this.date.setMonth(t < 0 ? 0 : t);
|
|
}
|
|
toString() {
|
|
let t = this.date.getMonth(), r = this.token.length;
|
|
return r === 2 ? String(t + 1).padStart(2, "0") : r === 3 ? this.locales.monthsShort[t] : r === 4 ? this.locales.months[t] : String(t +
|
|
1);
|
|
}
|
|
};
|
|
ZO.exports = qD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/dateparts/seconds.js
|
|
var t3 = E((fQe, e3) => {
|
|
"use strict";
|
|
var qY = Un(), UD = class extends qY {
|
|
static {
|
|
s(this, "Seconds");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setSeconds(this.date.getSeconds() + 1);
|
|
}
|
|
down() {
|
|
this.date.setSeconds(this.date.getSeconds() - 1);
|
|
}
|
|
setTo(t) {
|
|
this.date.setSeconds(parseInt(t.substr(-2)));
|
|
}
|
|
toString() {
|
|
let t = this.date.getSeconds();
|
|
return this.token.length > 1 ? String(t).padStart(2, "0") : t;
|
|
}
|
|
};
|
|
e3.exports = UD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/dateparts/year.js
|
|
var i3 = E((pQe, r3) => {
|
|
"use strict";
|
|
var UY = Un(), WD = class extends UY {
|
|
static {
|
|
s(this, "Year");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t);
|
|
}
|
|
up() {
|
|
this.date.setFullYear(this.date.getFullYear() + 1);
|
|
}
|
|
down() {
|
|
this.date.setFullYear(this.date.getFullYear() - 1);
|
|
}
|
|
setTo(t) {
|
|
this.date.setFullYear(t.substr(-4));
|
|
}
|
|
toString() {
|
|
let t = String(this.date.getFullYear()).padStart(4, "0");
|
|
return this.token.length === 2 ? t.substr(-2) : t;
|
|
}
|
|
};
|
|
r3.exports = WD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/dateparts/index.js
|
|
var s3 = E((mQe, n3) => {
|
|
"use strict";
|
|
n3.exports = {
|
|
DatePart: Un(),
|
|
Meridiem: $O(),
|
|
Day: HO(),
|
|
Hours: zO(),
|
|
Milliseconds: JO(),
|
|
Minutes: YO(),
|
|
Month: QO(),
|
|
Seconds: t3(),
|
|
Year: i3()
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/elements/date.js
|
|
var d3 = E((yQe, f3) => {
|
|
"use strict";
|
|
var $D = sr(), WY = vs(), { style: a3, clear: o3, figures: $Y } = Dn(), { erase: VY, cursor: u3 } = or(), { DatePart: l3, Meridiem: HY, Day: KY,
|
|
Hours: zY, Milliseconds: GY, Minutes: JY, Month: XY, Seconds: YY, Year: ZY } = s3(), QY = /\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,
|
|
c3 = {
|
|
1: ({ token: e }) => e.replace(/\\(.)/g, "$1"),
|
|
2: (e) => new KY(e),
|
|
// Day // TODO
|
|
3: (e) => new XY(e),
|
|
// Month
|
|
4: (e) => new ZY(e),
|
|
// Year
|
|
5: (e) => new HY(e),
|
|
// AM/PM // TODO (special)
|
|
6: (e) => new zY(e),
|
|
// Hours
|
|
7: (e) => new JY(e),
|
|
// Minutes
|
|
8: (e) => new YY(e),
|
|
// Seconds
|
|
9: (e) => new GY(e)
|
|
// Fractional seconds
|
|
}, eZ = {
|
|
months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","),
|
|
monthsShort: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),
|
|
weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
|
|
weekdaysShort: "Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")
|
|
}, VD = class extends WY {
|
|
static {
|
|
s(this, "DatePrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.msg = t.message, this.cursor = 0, this.typed = "", this.locales = Object.assign(eZ, t.locales), this._date = t.initial ||
|
|
/* @__PURE__ */ new Date(), this.errorMsg = t.error || "Please Enter A Valid Value", this.validator = t.validate || (() => !0), this.mask =
|
|
t.mask || "YYYY-MM-DD HH:mm:ss", this.clear = o3("", this.out.columns), this.render();
|
|
}
|
|
get value() {
|
|
return this.date;
|
|
}
|
|
get date() {
|
|
return this._date;
|
|
}
|
|
set date(t) {
|
|
t && this._date.setTime(t.getTime());
|
|
}
|
|
set mask(t) {
|
|
let r;
|
|
for (this.parts = []; r = QY.exec(t); ) {
|
|
let n = r.shift(), a = r.findIndex((o) => o != null);
|
|
this.parts.push(a in c3 ? c3[a]({ token: r[a] || n, date: this.date, parts: this.parts, locales: this.locales }) : r[a] || n);
|
|
}
|
|
let i = this.parts.reduce((n, a) => (typeof a == "string" && typeof n[n.length - 1] == "string" ? n[n.length - 1] += a : n.push(a), n),
|
|
[]);
|
|
this.parts.splice(0), this.parts.push(...i), this.reset();
|
|
}
|
|
moveCursor(t) {
|
|
this.typed = "", this.cursor = t, this.fire();
|
|
}
|
|
reset() {
|
|
this.moveCursor(this.parts.findIndex((t) => t instanceof l3)), this.fire(), this.render();
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
this.done = this.aborted = !0, this.error = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
async validate() {
|
|
let t = await this.validator(this.value);
|
|
typeof t == "string" && (this.errorMsg = t, t = !1), this.error = !t;
|
|
}
|
|
async submit() {
|
|
if (await this.validate(), this.error) {
|
|
this.color = "red", this.fire(), this.render();
|
|
return;
|
|
}
|
|
this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
up() {
|
|
this.typed = "", this.parts[this.cursor].up(), this.render();
|
|
}
|
|
down() {
|
|
this.typed = "", this.parts[this.cursor].down(), this.render();
|
|
}
|
|
left() {
|
|
let t = this.parts[this.cursor].prev();
|
|
if (t == null) return this.bell();
|
|
this.moveCursor(this.parts.indexOf(t)), this.render();
|
|
}
|
|
right() {
|
|
let t = this.parts[this.cursor].next();
|
|
if (t == null) return this.bell();
|
|
this.moveCursor(this.parts.indexOf(t)), this.render();
|
|
}
|
|
next() {
|
|
let t = this.parts[this.cursor].next();
|
|
this.moveCursor(t ? this.parts.indexOf(t) : this.parts.findIndex((r) => r instanceof l3)), this.render();
|
|
}
|
|
_(t) {
|
|
/\d/.test(t) && (this.typed += t, this.parts[this.cursor].setTo(this.typed), this.render());
|
|
}
|
|
render() {
|
|
this.closed || (this.firstRender ? this.out.write(u3.hide) : this.out.write(o3(this.outputText, this.out.columns)), super.render(), this.
|
|
outputText = [
|
|
a3.symbol(this.done, this.aborted),
|
|
$D.bold(this.msg),
|
|
a3.delimiter(!1),
|
|
this.parts.reduce((t, r, i) => t.concat(i === this.cursor && !this.done ? $D.cyan().underline(r.toString()) : r), []).join("")
|
|
].join(" "), this.error && (this.outputText += this.errorMsg.split(`
|
|
`).reduce(
|
|
(t, r, i) => t + `
|
|
${i ? " " : $Y.pointerSmall} ${$D.red().italic(r)}`,
|
|
""
|
|
)), this.out.write(VY.line + u3.to(0) + this.outputText));
|
|
}
|
|
};
|
|
f3.exports = VD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/elements/number.js
|
|
var y3 = E((bQe, m3) => {
|
|
var ah = sr(), tZ = vs(), { cursor: oh, erase: rZ } = or(), { style: HD, figures: iZ, clear: p3, lines: nZ } = Dn(), sZ = /[0-9]/, KD = /* @__PURE__ */ s(
|
|
(e) => e !== void 0, "isDef"), h3 = /* @__PURE__ */ s((e, t) => {
|
|
let r = Math.pow(10, t);
|
|
return Math.round(e * r) / r;
|
|
}, "round"), zD = class extends tZ {
|
|
static {
|
|
s(this, "NumberPrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.transform = HD.render(t.style), this.msg = t.message, this.initial = KD(t.initial) ? t.initial : "", this.float = !!t.float,
|
|
this.round = t.round || 2, this.inc = t.increment || 1, this.min = KD(t.min) ? t.min : -1 / 0, this.max = KD(t.max) ? t.max : 1 / 0, this.
|
|
errorMsg = t.error || "Please Enter A Valid Value", this.validator = t.validate || (() => !0), this.color = "cyan", this.value = "", this.
|
|
typed = "", this.lastHit = 0, this.render();
|
|
}
|
|
set value(t) {
|
|
!t && t !== 0 ? (this.placeholder = !0, this.rendered = ah.gray(this.transform.render(`${this.initial}`)), this._value = "") : (this.placeholder =
|
|
!1, this.rendered = this.transform.render(`${h3(t, this.round)}`), this._value = h3(t, this.round)), this.fire();
|
|
}
|
|
get value() {
|
|
return this._value;
|
|
}
|
|
parse(t) {
|
|
return this.float ? parseFloat(t) : parseInt(t);
|
|
}
|
|
valid(t) {
|
|
return t === "-" || t === "." && this.float || sZ.test(t);
|
|
}
|
|
reset() {
|
|
this.typed = "", this.value = "", this.fire(), this.render();
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
let t = this.value;
|
|
this.value = t !== "" ? t : this.initial, this.done = this.aborted = !0, this.error = !1, this.fire(), this.render(), this.out.write(`\
|
|
|
|
`), this.close();
|
|
}
|
|
async validate() {
|
|
let t = await this.validator(this.value);
|
|
typeof t == "string" && (this.errorMsg = t, t = !1), this.error = !t;
|
|
}
|
|
async submit() {
|
|
if (await this.validate(), this.error) {
|
|
this.color = "red", this.fire(), this.render();
|
|
return;
|
|
}
|
|
let t = this.value;
|
|
this.value = t !== "" ? t : this.initial, this.done = !0, this.aborted = !1, this.error = !1, this.fire(), this.render(), this.out.write(
|
|
`
|
|
`), this.close();
|
|
}
|
|
up() {
|
|
if (this.typed = "", this.value === "" && (this.value = this.min - this.inc), this.value >= this.max) return this.bell();
|
|
this.value += this.inc, this.color = "cyan", this.fire(), this.render();
|
|
}
|
|
down() {
|
|
if (this.typed = "", this.value === "" && (this.value = this.min + this.inc), this.value <= this.min) return this.bell();
|
|
this.value -= this.inc, this.color = "cyan", this.fire(), this.render();
|
|
}
|
|
delete() {
|
|
let t = this.value.toString();
|
|
if (t.length === 0) return this.bell();
|
|
this.value = this.parse(t = t.slice(0, -1)) || "", this.value !== "" && this.value < this.min && (this.value = this.min), this.color =
|
|
"cyan", this.fire(), this.render();
|
|
}
|
|
next() {
|
|
this.value = this.initial, this.fire(), this.render();
|
|
}
|
|
_(t, r) {
|
|
if (!this.valid(t)) return this.bell();
|
|
let i = Date.now();
|
|
if (i - this.lastHit > 1e3 && (this.typed = ""), this.typed += t, this.lastHit = i, this.color = "cyan", t === ".") return this.fire();
|
|
this.value = Math.min(this.parse(this.typed), this.max), this.value > this.max && (this.value = this.max), this.value < this.min && (this.
|
|
value = this.min), this.fire(), this.render();
|
|
}
|
|
render() {
|
|
this.closed || (this.firstRender || (this.outputError && this.out.write(oh.down(nZ(this.outputError, this.out.columns) - 1) + p3(this.
|
|
outputError, this.out.columns)), this.out.write(p3(this.outputText, this.out.columns))), super.render(), this.outputError = "", this.outputText =
|
|
[
|
|
HD.symbol(this.done, this.aborted),
|
|
ah.bold(this.msg),
|
|
HD.delimiter(this.done),
|
|
!this.done || !this.done && !this.placeholder ? ah[this.color]().underline(this.rendered) : this.rendered
|
|
].join(" "), this.error && (this.outputError += this.errorMsg.split(`
|
|
`).reduce((t, r, i) => t + `
|
|
${i ? " " : iZ.pointerSmall} ${ah.red().italic(r)}`, "")), this.out.write(rZ.line + oh.to(0) + this.outputText + oh.save + this.outputError +
|
|
oh.restore));
|
|
}
|
|
};
|
|
m3.exports = zD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/elements/multiselect.js
|
|
var JD = E((vQe, D3) => {
|
|
"use strict";
|
|
var Wn = sr(), { cursor: aZ } = or(), oZ = vs(), { clear: g3, figures: ga, style: b3, wrap: uZ, entriesToDisplay: lZ } = Dn(), GD = class extends oZ {
|
|
static {
|
|
s(this, "MultiselectPrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.msg = t.message, this.cursor = t.cursor || 0, this.scrollIndex = t.cursor || 0, this.hint = t.hint || "", this.warn = t.
|
|
warn || "- This option is disabled -", this.minSelected = t.min, this.showMinError = !1, this.maxChoices = t.max, this.instructions = t.
|
|
instructions, this.optionsPerPage = t.optionsPerPage || 10, this.value = t.choices.map((r, i) => (typeof r == "string" && (r = { title: r,
|
|
value: i }), {
|
|
title: r && (r.title || r.value || r),
|
|
description: r && r.description,
|
|
value: r && (r.value === void 0 ? i : r.value),
|
|
selected: r && r.selected,
|
|
disabled: r && r.disabled
|
|
})), this.clear = g3("", this.out.columns), t.overrideRender || this.render();
|
|
}
|
|
reset() {
|
|
this.value.map((t) => !t.selected), this.cursor = 0, this.fire(), this.render();
|
|
}
|
|
selected() {
|
|
return this.value.filter((t) => t.selected);
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
submit() {
|
|
let t = this.value.filter((r) => r.selected);
|
|
this.minSelected && t.length < this.minSelected ? (this.showMinError = !0, this.render()) : (this.done = !0, this.aborted = !1, this.fire(),
|
|
this.render(), this.out.write(`
|
|
`), this.close());
|
|
}
|
|
first() {
|
|
this.cursor = 0, this.render();
|
|
}
|
|
last() {
|
|
this.cursor = this.value.length - 1, this.render();
|
|
}
|
|
next() {
|
|
this.cursor = (this.cursor + 1) % this.value.length, this.render();
|
|
}
|
|
up() {
|
|
this.cursor === 0 ? this.cursor = this.value.length - 1 : this.cursor--, this.render();
|
|
}
|
|
down() {
|
|
this.cursor === this.value.length - 1 ? this.cursor = 0 : this.cursor++, this.render();
|
|
}
|
|
left() {
|
|
this.value[this.cursor].selected = !1, this.render();
|
|
}
|
|
right() {
|
|
if (this.value.filter((t) => t.selected).length >= this.maxChoices) return this.bell();
|
|
this.value[this.cursor].selected = !0, this.render();
|
|
}
|
|
handleSpaceToggle() {
|
|
let t = this.value[this.cursor];
|
|
if (t.selected)
|
|
t.selected = !1, this.render();
|
|
else {
|
|
if (t.disabled || this.value.filter((r) => r.selected).length >= this.maxChoices)
|
|
return this.bell();
|
|
t.selected = !0, this.render();
|
|
}
|
|
}
|
|
toggleAll() {
|
|
if (this.maxChoices !== void 0 || this.value[this.cursor].disabled)
|
|
return this.bell();
|
|
let t = !this.value[this.cursor].selected;
|
|
this.value.filter((r) => !r.disabled).forEach((r) => r.selected = t), this.render();
|
|
}
|
|
_(t, r) {
|
|
if (t === " ")
|
|
this.handleSpaceToggle();
|
|
else if (t === "a")
|
|
this.toggleAll();
|
|
else
|
|
return this.bell();
|
|
}
|
|
renderInstructions() {
|
|
return this.instructions === void 0 || this.instructions ? typeof this.instructions == "string" ? this.instructions : `
|
|
Instructions:
|
|
${ga.arrowUp}/${ga.arrowDown}: Highlight option
|
|
${ga.arrowLeft}/${ga.arrowRight}/[space]: Toggle selection
|
|
` + (this.maxChoices === void 0 ? ` a: Toggle all
|
|
` : "") + " enter/return: Complete answer" : "";
|
|
}
|
|
renderOption(t, r, i, n) {
|
|
let a = (r.selected ? Wn.green(ga.radioOn) : ga.radioOff) + " " + n + " ", o, u;
|
|
return r.disabled ? o = t === i ? Wn.gray().underline(r.title) : Wn.strikethrough().gray(r.title) : (o = t === i ? Wn.cyan().underline(
|
|
r.title) : r.title, t === i && r.description && (u = ` - ${r.description}`, (a.length + o.length + u.length >= this.out.columns || r.description.
|
|
split(/\r?\n/).length > 1) && (u = `
|
|
` + uZ(r.description, { margin: a.length, width: this.out.columns })))), a + o + Wn.gray(u || "");
|
|
}
|
|
// shared with autocompleteMultiselect
|
|
paginateOptions(t) {
|
|
if (t.length === 0)
|
|
return Wn.red("No matches for this query.");
|
|
let { startIndex: r, endIndex: i } = lZ(this.cursor, t.length, this.optionsPerPage), n, a = [];
|
|
for (let o = r; o < i; o++)
|
|
o === r && r > 0 ? n = ga.arrowUp : o === i - 1 && i < t.length ? n = ga.arrowDown : n = " ", a.push(this.renderOption(this.cursor, t[o],
|
|
o, n));
|
|
return `
|
|
` + a.join(`
|
|
`);
|
|
}
|
|
// shared with autocomleteMultiselect
|
|
renderOptions(t) {
|
|
return this.done ? "" : this.paginateOptions(t);
|
|
}
|
|
renderDoneOrInstructions() {
|
|
if (this.done)
|
|
return this.value.filter((r) => r.selected).map((r) => r.title).join(", ");
|
|
let t = [Wn.gray(this.hint), this.renderInstructions()];
|
|
return this.value[this.cursor].disabled && t.push(Wn.yellow(this.warn)), t.join(" ");
|
|
}
|
|
render() {
|
|
if (this.closed) return;
|
|
this.firstRender && this.out.write(aZ.hide), super.render();
|
|
let t = [
|
|
b3.symbol(this.done, this.aborted),
|
|
Wn.bold(this.msg),
|
|
b3.delimiter(!1),
|
|
this.renderDoneOrInstructions()
|
|
].join(" ");
|
|
this.showMinError && (t += Wn.red(`You must select a minimum of ${this.minSelected} choices.`), this.showMinError = !1), t += this.renderOptions(
|
|
this.value), this.out.write(this.clear + t), this.clear = g3(t, this.out.columns);
|
|
}
|
|
};
|
|
D3.exports = GD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/elements/autocomplete.js
|
|
var T3 = E((xQe, S3) => {
|
|
"use strict";
|
|
var Jc = sr(), cZ = vs(), { erase: fZ, cursor: v3 } = or(), { style: XD, clear: E3, figures: YD, wrap: dZ, entriesToDisplay: pZ } = Dn(), x3 = /* @__PURE__ */ s(
|
|
(e, t) => e[t] && (e[t].value || e[t].title || e[t]), "getVal"), hZ = /* @__PURE__ */ s((e, t) => e[t] && (e[t].title || e[t].value || e[t]),
|
|
"getTitle"), mZ = /* @__PURE__ */ s((e, t) => {
|
|
let r = e.findIndex((i) => i.value === t || i.title === t);
|
|
return r > -1 ? r : void 0;
|
|
}, "getIndex"), ZD = class extends cZ {
|
|
static {
|
|
s(this, "AutocompletePrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.msg = t.message, this.suggest = t.suggest, this.choices = t.choices, this.initial = typeof t.initial == "number" ? t.initial :
|
|
mZ(t.choices, t.initial), this.select = this.initial || t.cursor || 0, this.i18n = { noMatches: t.noMatches || "no matches found" }, this.
|
|
fallback = t.fallback || this.initial, this.clearFirst = t.clearFirst || !1, this.suggestions = [], this.input = "", this.limit = t.limit ||
|
|
10, this.cursor = 0, this.transform = XD.render(t.style), this.scale = this.transform.scale, this.render = this.render.bind(this), this.
|
|
complete = this.complete.bind(this), this.clear = E3("", this.out.columns), this.complete(this.render), this.render();
|
|
}
|
|
set fallback(t) {
|
|
this._fb = Number.isSafeInteger(parseInt(t)) ? parseInt(t) : t;
|
|
}
|
|
get fallback() {
|
|
let t;
|
|
return typeof this._fb == "number" ? t = this.choices[this._fb] : typeof this._fb == "string" && (t = { title: this._fb }), t || this.
|
|
_fb || { title: this.i18n.noMatches };
|
|
}
|
|
moveSelect(t) {
|
|
this.select = t, this.suggestions.length > 0 ? this.value = x3(this.suggestions, t) : this.value = this.fallback.value, this.fire();
|
|
}
|
|
async complete(t) {
|
|
let r = this.completing = this.suggest(this.input, this.choices), i = await r;
|
|
if (this.completing !== r) return;
|
|
this.suggestions = i.map((a, o, u) => ({ title: hZ(u, o), value: x3(u, o), description: a.description })), this.completing = !1;
|
|
let n = Math.max(i.length - 1, 0);
|
|
this.moveSelect(Math.min(n, this.select)), t && t();
|
|
}
|
|
reset() {
|
|
this.input = "", this.complete(() => {
|
|
this.moveSelect(this.initial !== void 0 ? this.initial : 0), this.render();
|
|
}), this.render();
|
|
}
|
|
exit() {
|
|
this.clearFirst && this.input.length > 0 ? this.reset() : (this.done = this.exited = !0, this.aborted = !1, this.fire(), this.render(),
|
|
this.out.write(`
|
|
`), this.close());
|
|
}
|
|
abort() {
|
|
this.done = this.aborted = !0, this.exited = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
submit() {
|
|
this.done = !0, this.aborted = this.exited = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
_(t, r) {
|
|
let i = this.input.slice(0, this.cursor), n = this.input.slice(this.cursor);
|
|
this.input = `${i}${t}${n}`, this.cursor = i.length + 1, this.complete(this.render), this.render();
|
|
}
|
|
delete() {
|
|
if (this.cursor === 0) return this.bell();
|
|
let t = this.input.slice(0, this.cursor - 1), r = this.input.slice(this.cursor);
|
|
this.input = `${t}${r}`, this.complete(this.render), this.cursor = this.cursor - 1, this.render();
|
|
}
|
|
deleteForward() {
|
|
if (this.cursor * this.scale >= this.rendered.length) return this.bell();
|
|
let t = this.input.slice(0, this.cursor), r = this.input.slice(this.cursor + 1);
|
|
this.input = `${t}${r}`, this.complete(this.render), this.render();
|
|
}
|
|
first() {
|
|
this.moveSelect(0), this.render();
|
|
}
|
|
last() {
|
|
this.moveSelect(this.suggestions.length - 1), this.render();
|
|
}
|
|
up() {
|
|
this.select === 0 ? this.moveSelect(this.suggestions.length - 1) : this.moveSelect(this.select - 1), this.render();
|
|
}
|
|
down() {
|
|
this.select === this.suggestions.length - 1 ? this.moveSelect(0) : this.moveSelect(this.select + 1), this.render();
|
|
}
|
|
next() {
|
|
this.select === this.suggestions.length - 1 ? this.moveSelect(0) : this.moveSelect(this.select + 1), this.render();
|
|
}
|
|
nextPage() {
|
|
this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1)), this.render();
|
|
}
|
|
prevPage() {
|
|
this.moveSelect(Math.max(this.select - this.limit, 0)), this.render();
|
|
}
|
|
left() {
|
|
if (this.cursor <= 0) return this.bell();
|
|
this.cursor = this.cursor - 1, this.render();
|
|
}
|
|
right() {
|
|
if (this.cursor * this.scale >= this.rendered.length) return this.bell();
|
|
this.cursor = this.cursor + 1, this.render();
|
|
}
|
|
renderOption(t, r, i, n) {
|
|
let a, o = i ? YD.arrowUp : n ? YD.arrowDown : " ", u = r ? Jc.cyan().underline(t.title) : t.title;
|
|
return o = (r ? Jc.cyan(YD.pointer) + " " : " ") + o, t.description && (a = ` - ${t.description}`, (o.length + u.length + a.length >=
|
|
this.out.columns || t.description.split(/\r?\n/).length > 1) && (a = `
|
|
` + dZ(t.description, { margin: 3, width: this.out.columns }))), o + " " + u + Jc.gray(a || "");
|
|
}
|
|
render() {
|
|
if (this.closed) return;
|
|
this.firstRender ? this.out.write(v3.hide) : this.out.write(E3(this.outputText, this.out.columns)), super.render();
|
|
let { startIndex: t, endIndex: r } = pZ(this.select, this.choices.length, this.limit);
|
|
if (this.outputText = [
|
|
XD.symbol(this.done, this.aborted, this.exited),
|
|
Jc.bold(this.msg),
|
|
XD.delimiter(this.completing),
|
|
this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)
|
|
].join(" "), !this.done) {
|
|
let i = this.suggestions.slice(t, r).map((n, a) => this.renderOption(
|
|
n,
|
|
this.select === a + t,
|
|
a === 0 && t > 0,
|
|
a + t === r - 1 && r < this.choices.length
|
|
)).join(`
|
|
`);
|
|
this.outputText += `
|
|
` + (i || Jc.gray(this.fallback.title));
|
|
}
|
|
this.out.write(fZ.line + v3.to(0) + this.outputText);
|
|
}
|
|
};
|
|
S3.exports = ZD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/elements/autocompleteMultiselect.js
|
|
var _3 = E((TQe, A3) => {
|
|
"use strict";
|
|
var xs = sr(), { cursor: yZ } = or(), gZ = JD(), { clear: C3, style: w3, figures: Ku } = Dn(), QD = class extends gZ {
|
|
static {
|
|
s(this, "AutocompleteMultiselectPrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
t.overrideRender = !0, super(t), this.inputValue = "", this.clear = C3("", this.out.columns), this.filteredOptions = this.value, this.
|
|
render();
|
|
}
|
|
last() {
|
|
this.cursor = this.filteredOptions.length - 1, this.render();
|
|
}
|
|
next() {
|
|
this.cursor = (this.cursor + 1) % this.filteredOptions.length, this.render();
|
|
}
|
|
up() {
|
|
this.cursor === 0 ? this.cursor = this.filteredOptions.length - 1 : this.cursor--, this.render();
|
|
}
|
|
down() {
|
|
this.cursor === this.filteredOptions.length - 1 ? this.cursor = 0 : this.cursor++, this.render();
|
|
}
|
|
left() {
|
|
this.filteredOptions[this.cursor].selected = !1, this.render();
|
|
}
|
|
right() {
|
|
if (this.value.filter((t) => t.selected).length >= this.maxChoices) return this.bell();
|
|
this.filteredOptions[this.cursor].selected = !0, this.render();
|
|
}
|
|
delete() {
|
|
this.inputValue.length && (this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1), this.updateFilteredOptions());
|
|
}
|
|
updateFilteredOptions() {
|
|
let t = this.filteredOptions[this.cursor];
|
|
this.filteredOptions = this.value.filter((i) => this.inputValue ? !!(typeof i.title == "string" && i.title.toLowerCase().includes(this.
|
|
inputValue.toLowerCase()) || typeof i.value == "string" && i.value.toLowerCase().includes(this.inputValue.toLowerCase())) : !0);
|
|
let r = this.filteredOptions.findIndex((i) => i === t);
|
|
this.cursor = r < 0 ? 0 : r, this.render();
|
|
}
|
|
handleSpaceToggle() {
|
|
let t = this.filteredOptions[this.cursor];
|
|
if (t.selected)
|
|
t.selected = !1, this.render();
|
|
else {
|
|
if (t.disabled || this.value.filter((r) => r.selected).length >= this.maxChoices)
|
|
return this.bell();
|
|
t.selected = !0, this.render();
|
|
}
|
|
}
|
|
handleInputChange(t) {
|
|
this.inputValue = this.inputValue + t, this.updateFilteredOptions();
|
|
}
|
|
_(t, r) {
|
|
t === " " ? this.handleSpaceToggle() : this.handleInputChange(t);
|
|
}
|
|
renderInstructions() {
|
|
return this.instructions === void 0 || this.instructions ? typeof this.instructions == "string" ? this.instructions : `
|
|
Instructions:
|
|
${Ku.arrowUp}/${Ku.arrowDown}: Highlight option
|
|
${Ku.arrowLeft}/${Ku.arrowRight}/[space]: Toggle selection
|
|
[a,b,c]/delete: Filter choices
|
|
enter/return: Complete answer
|
|
` : "";
|
|
}
|
|
renderCurrentInput() {
|
|
return `
|
|
Filtered results for: ${this.inputValue ? this.inputValue : xs.gray("Enter something to filter")}
|
|
`;
|
|
}
|
|
renderOption(t, r, i) {
|
|
let n;
|
|
return r.disabled ? n = t === i ? xs.gray().underline(r.title) : xs.strikethrough().gray(r.title) : n = t === i ? xs.cyan().underline(
|
|
r.title) : r.title, (r.selected ? xs.green(Ku.radioOn) : Ku.radioOff) + " " + n;
|
|
}
|
|
renderDoneOrInstructions() {
|
|
if (this.done)
|
|
return this.value.filter((r) => r.selected).map((r) => r.title).join(", ");
|
|
let t = [xs.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];
|
|
return this.filteredOptions.length && this.filteredOptions[this.cursor].disabled && t.push(xs.yellow(this.warn)), t.join(" ");
|
|
}
|
|
render() {
|
|
if (this.closed) return;
|
|
this.firstRender && this.out.write(yZ.hide), super.render();
|
|
let t = [
|
|
w3.symbol(this.done, this.aborted),
|
|
xs.bold(this.msg),
|
|
w3.delimiter(!1),
|
|
this.renderDoneOrInstructions()
|
|
].join(" ");
|
|
this.showMinError && (t += xs.red(`You must select a minimum of ${this.minSelected} choices.`), this.showMinError = !1), t += this.renderOptions(
|
|
this.filteredOptions), this.out.write(this.clear + t), this.clear = C3(t, this.out.columns);
|
|
}
|
|
};
|
|
A3.exports = QD;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/elements/confirm.js
|
|
var k3 = E((wQe, O3) => {
|
|
var P3 = sr(), bZ = vs(), { style: F3, clear: DZ } = Dn(), { erase: vZ, cursor: I3 } = or(), ev = class extends bZ {
|
|
static {
|
|
s(this, "ConfirmPrompt");
|
|
}
|
|
constructor(t = {}) {
|
|
super(t), this.msg = t.message, this.value = t.initial, this.initialValue = !!t.initial, this.yesMsg = t.yes || "yes", this.yesOption =
|
|
t.yesOption || "(Y/n)", this.noMsg = t.no || "no", this.noOption = t.noOption || "(y/N)", this.render();
|
|
}
|
|
reset() {
|
|
this.value = this.initialValue, this.fire(), this.render();
|
|
}
|
|
exit() {
|
|
this.abort();
|
|
}
|
|
abort() {
|
|
this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
submit() {
|
|
this.value = this.value || !1, this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(`
|
|
`), this.close();
|
|
}
|
|
_(t, r) {
|
|
return t.toLowerCase() === "y" ? (this.value = !0, this.submit()) : t.toLowerCase() === "n" ? (this.value = !1, this.submit()) : this.
|
|
bell();
|
|
}
|
|
render() {
|
|
this.closed || (this.firstRender ? this.out.write(I3.hide) : this.out.write(DZ(this.outputText, this.out.columns)), super.render(), this.
|
|
outputText = [
|
|
F3.symbol(this.done, this.aborted),
|
|
P3.bold(this.msg),
|
|
F3.delimiter(this.done),
|
|
this.done ? this.value ? this.yesMsg : this.noMsg : P3.gray(this.initialValue ? this.yesOption : this.noOption)
|
|
].join(" "), this.out.write(vZ.line + I3.to(0) + this.outputText));
|
|
}
|
|
};
|
|
O3.exports = ev;
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/elements/index.js
|
|
var N3 = E((_Qe, B3) => {
|
|
"use strict";
|
|
B3.exports = {
|
|
TextPrompt: OO(),
|
|
SelectPrompt: MO(),
|
|
TogglePrompt: qO(),
|
|
DatePrompt: d3(),
|
|
NumberPrompt: y3(),
|
|
MultiselectPrompt: JD(),
|
|
AutocompletePrompt: T3(),
|
|
AutocompleteMultiselectPrompt: _3(),
|
|
ConfirmPrompt: k3()
|
|
};
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/prompts.js
|
|
var R3 = E((M3) => {
|
|
"use strict";
|
|
var Si = M3, EZ = N3(), uh = /* @__PURE__ */ s((e) => e, "noop");
|
|
function $n(e, t, r = {}) {
|
|
return new Promise((i, n) => {
|
|
let a = new EZ[e](t), o = r.onAbort || uh, u = r.onSubmit || uh, l = r.onExit || uh;
|
|
a.on("state", t.onState || uh), a.on("submit", (c) => i(u(c))), a.on("exit", (c) => i(l(c))), a.on("abort", (c) => n(o(c)));
|
|
});
|
|
}
|
|
s($n, "toPrompt");
|
|
Si.text = (e) => $n("TextPrompt", e);
|
|
Si.password = (e) => (e.style = "password", Si.text(e));
|
|
Si.invisible = (e) => (e.style = "invisible", Si.text(e));
|
|
Si.number = (e) => $n("NumberPrompt", e);
|
|
Si.date = (e) => $n("DatePrompt", e);
|
|
Si.confirm = (e) => $n("ConfirmPrompt", e);
|
|
Si.list = (e) => {
|
|
let t = e.separator || ",";
|
|
return $n("TextPrompt", e, {
|
|
onSubmit: /* @__PURE__ */ s((r) => r.split(t).map((i) => i.trim()), "onSubmit")
|
|
});
|
|
};
|
|
Si.toggle = (e) => $n("TogglePrompt", e);
|
|
Si.select = (e) => $n("SelectPrompt", e);
|
|
Si.multiselect = (e) => {
|
|
e.choices = [].concat(e.choices || []);
|
|
let t = /* @__PURE__ */ s((r) => r.filter((i) => i.selected).map((i) => i.value), "toSelected");
|
|
return $n("MultiselectPrompt", e, {
|
|
onAbort: t,
|
|
onSubmit: t
|
|
});
|
|
};
|
|
Si.autocompleteMultiselect = (e) => {
|
|
e.choices = [].concat(e.choices || []);
|
|
let t = /* @__PURE__ */ s((r) => r.filter((i) => i.selected).map((i) => i.value), "toSelected");
|
|
return $n("AutocompleteMultiselectPrompt", e, {
|
|
onAbort: t,
|
|
onSubmit: t
|
|
});
|
|
};
|
|
var xZ = /* @__PURE__ */ s((e, t) => Promise.resolve(
|
|
t.filter((r) => r.title.slice(0, e.length).toLowerCase() === e.toLowerCase())
|
|
), "byTitle");
|
|
Si.autocomplete = (e) => (e.suggest = e.suggest || xZ, e.choices = [].concat(e.choices || []), $n("AutocompletePrompt", e));
|
|
});
|
|
|
|
// ../node_modules/prompts/lib/index.js
|
|
var q3 = E((IQe, L3) => {
|
|
"use strict";
|
|
var tv = R3(), SZ = ["suggest", "format", "onState", "validate", "onRender", "type"], j3 = /* @__PURE__ */ s(() => {
|
|
}, "noop");
|
|
async function ba(e = [], { onSubmit: t = j3, onCancel: r = j3 } = {}) {
|
|
let i = {}, n = ba._override || {};
|
|
e = [].concat(e);
|
|
let a, o, u, l, c, f, m = /* @__PURE__ */ s(async (h, d, y = !1) => {
|
|
if (!(!y && h.validate && h.validate(d) !== !0))
|
|
return h.format ? await h.format(d, i) : d;
|
|
}, "getFormattedAnswer");
|
|
for (o of e)
|
|
if ({ name: l, type: c } = o, typeof c == "function" && (c = await c(a, { ...i }, o), o.type = c), !!c) {
|
|
for (let h in o) {
|
|
if (SZ.includes(h)) continue;
|
|
let d = o[h];
|
|
o[h] = typeof d == "function" ? await d(a, { ...i }, f) : d;
|
|
}
|
|
if (f = o, typeof o.message != "string")
|
|
throw new Error("prompt message is required");
|
|
if ({ name: l, type: c } = o, tv[c] === void 0)
|
|
throw new Error(`prompt type (${c}) is not defined`);
|
|
if (n[o.name] !== void 0 && (a = await m(o, n[o.name]), a !== void 0)) {
|
|
i[l] = a;
|
|
continue;
|
|
}
|
|
try {
|
|
a = ba._injected ? TZ(ba._injected, o.initial) : await tv[c](o), i[l] = a = await m(o, a, !0), u = await t(o, a, i);
|
|
} catch {
|
|
u = !await r(o, i);
|
|
}
|
|
if (u) return i;
|
|
}
|
|
return i;
|
|
}
|
|
s(ba, "prompt");
|
|
function TZ(e, t) {
|
|
let r = e.shift();
|
|
if (r instanceof Error)
|
|
throw r;
|
|
return r === void 0 ? t : r;
|
|
}
|
|
s(TZ, "getInjectedAnswer");
|
|
function CZ(e) {
|
|
ba._injected = (ba._injected || []).concat(e);
|
|
}
|
|
s(CZ, "inject");
|
|
function wZ(e) {
|
|
ba._override = Object.assign({}, e);
|
|
}
|
|
s(wZ, "override");
|
|
L3.exports = Object.assign(ba, { prompt: ba, prompts: tv, inject: CZ, override: wZ });
|
|
});
|
|
|
|
// ../node_modules/prompts/index.js
|
|
var rv = E((kQe, U3) => {
|
|
function AZ(e) {
|
|
e = (Array.isArray(e) ? e : e.split(".")).map(Number);
|
|
let t = 0, r = process.versions.node.split(".").map(Number);
|
|
for (; t < e.length; t++) {
|
|
if (r[t] > e[t]) return !1;
|
|
if (e[t] > r[t]) return !0;
|
|
}
|
|
return !1;
|
|
}
|
|
s(AZ, "isNodeLT");
|
|
U3.exports = AZ("8.6.0") ? dO() : q3();
|
|
});
|
|
|
|
// ../node_modules/picocolors/picocolors.js
|
|
var fh = E((NQe, iv) => {
|
|
var ch = process || {}, W3 = ch.argv || [], lh = ch.env || {}, _Z = !(lh.NO_COLOR || W3.includes("--no-color")) && (!!lh.FORCE_COLOR || W3.
|
|
includes("--color") || ch.platform === "win32" || (ch.stdout || {}).isTTY && lh.TERM !== "dumb" || !!lh.CI), PZ = /* @__PURE__ */ s((e, t, r = e) => (i) => {
|
|
let n = "" + i, a = n.indexOf(t, e.length);
|
|
return ~a ? e + FZ(n, t, r, a) + t : e + n + t;
|
|
}, "formatter"), FZ = /* @__PURE__ */ s((e, t, r, i) => {
|
|
let n = "", a = 0;
|
|
do
|
|
n += e.substring(a, i) + r, a = i + t.length, i = e.indexOf(t, a);
|
|
while (~i);
|
|
return n + e.substring(a);
|
|
}, "replaceClose"), $3 = /* @__PURE__ */ s((e = _Z) => {
|
|
let t = e ? PZ : () => String;
|
|
return {
|
|
isColorSupported: e,
|
|
reset: t("\x1B[0m", "\x1B[0m"),
|
|
bold: t("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
dim: t("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
italic: t("\x1B[3m", "\x1B[23m"),
|
|
underline: t("\x1B[4m", "\x1B[24m"),
|
|
inverse: t("\x1B[7m", "\x1B[27m"),
|
|
hidden: t("\x1B[8m", "\x1B[28m"),
|
|
strikethrough: t("\x1B[9m", "\x1B[29m"),
|
|
black: t("\x1B[30m", "\x1B[39m"),
|
|
red: t("\x1B[31m", "\x1B[39m"),
|
|
green: t("\x1B[32m", "\x1B[39m"),
|
|
yellow: t("\x1B[33m", "\x1B[39m"),
|
|
blue: t("\x1B[34m", "\x1B[39m"),
|
|
magenta: t("\x1B[35m", "\x1B[39m"),
|
|
cyan: t("\x1B[36m", "\x1B[39m"),
|
|
white: t("\x1B[37m", "\x1B[39m"),
|
|
gray: t("\x1B[90m", "\x1B[39m"),
|
|
bgBlack: t("\x1B[40m", "\x1B[49m"),
|
|
bgRed: t("\x1B[41m", "\x1B[49m"),
|
|
bgGreen: t("\x1B[42m", "\x1B[49m"),
|
|
bgYellow: t("\x1B[43m", "\x1B[49m"),
|
|
bgBlue: t("\x1B[44m", "\x1B[49m"),
|
|
bgMagenta: t("\x1B[45m", "\x1B[49m"),
|
|
bgCyan: t("\x1B[46m", "\x1B[49m"),
|
|
bgWhite: t("\x1B[47m", "\x1B[49m"),
|
|
blackBright: t("\x1B[90m", "\x1B[39m"),
|
|
redBright: t("\x1B[91m", "\x1B[39m"),
|
|
greenBright: t("\x1B[92m", "\x1B[39m"),
|
|
yellowBright: t("\x1B[93m", "\x1B[39m"),
|
|
blueBright: t("\x1B[94m", "\x1B[39m"),
|
|
magentaBright: t("\x1B[95m", "\x1B[39m"),
|
|
cyanBright: t("\x1B[96m", "\x1B[39m"),
|
|
whiteBright: t("\x1B[97m", "\x1B[39m"),
|
|
bgBlackBright: t("\x1B[100m", "\x1B[49m"),
|
|
bgRedBright: t("\x1B[101m", "\x1B[49m"),
|
|
bgGreenBright: t("\x1B[102m", "\x1B[49m"),
|
|
bgYellowBright: t("\x1B[103m", "\x1B[49m"),
|
|
bgBlueBright: t("\x1B[104m", "\x1B[49m"),
|
|
bgMagentaBright: t("\x1B[105m", "\x1B[49m"),
|
|
bgCyanBright: t("\x1B[106m", "\x1B[49m"),
|
|
bgWhiteBright: t("\x1B[107m", "\x1B[49m")
|
|
};
|
|
}, "createColors");
|
|
iv.exports = $3();
|
|
iv.exports.createColors = $3;
|
|
});
|
|
|
|
// ../node_modules/wrappy/wrappy.js
|
|
var z3 = E((UQe, K3) => {
|
|
K3.exports = H3;
|
|
function H3(e, t) {
|
|
if (e && t) return H3(e)(t);
|
|
if (typeof e != "function")
|
|
throw new TypeError("need wrapper function");
|
|
return Object.keys(e).forEach(function(i) {
|
|
r[i] = e[i];
|
|
}), r;
|
|
function r() {
|
|
for (var i = new Array(arguments.length), n = 0; n < i.length; n++)
|
|
i[n] = arguments[n];
|
|
var a = e.apply(this, i), o = i[i.length - 1];
|
|
return typeof a == "function" && a !== o && Object.keys(o).forEach(function(u) {
|
|
a[u] = o[u];
|
|
}), a;
|
|
}
|
|
s(r, "wrapper");
|
|
}
|
|
s(H3, "wrappy");
|
|
});
|
|
|
|
// ../node_modules/once/once.js
|
|
var ph = E(($Qe, ov) => {
|
|
var G3 = z3();
|
|
ov.exports = G3(dh);
|
|
ov.exports.strict = G3(J3);
|
|
dh.proto = dh(function() {
|
|
Object.defineProperty(Function.prototype, "once", {
|
|
value: /* @__PURE__ */ s(function() {
|
|
return dh(this);
|
|
}, "value"),
|
|
configurable: !0
|
|
}), Object.defineProperty(Function.prototype, "onceStrict", {
|
|
value: /* @__PURE__ */ s(function() {
|
|
return J3(this);
|
|
}, "value"),
|
|
configurable: !0
|
|
});
|
|
});
|
|
function dh(e) {
|
|
var t = /* @__PURE__ */ s(function() {
|
|
return t.called ? t.value : (t.called = !0, t.value = e.apply(this, arguments));
|
|
}, "f");
|
|
return t.called = !1, t;
|
|
}
|
|
s(dh, "once");
|
|
function J3(e) {
|
|
var t = /* @__PURE__ */ s(function() {
|
|
if (t.called)
|
|
throw new Error(t.onceError);
|
|
return t.called = !0, t.value = e.apply(this, arguments);
|
|
}, "f"), r = e.name || "Function wrapped with `once`";
|
|
return t.onceError = r + " shouldn't be called more than once", t.called = !1, t;
|
|
}
|
|
s(J3, "onceStrict");
|
|
});
|
|
|
|
// ../node_modules/end-of-stream/index.js
|
|
var zu = E((HQe, Y3) => {
|
|
var NZ = ph(), MZ = /* @__PURE__ */ s(function() {
|
|
}, "noop"), RZ = /* @__PURE__ */ s(function(e) {
|
|
return e.setHeader && typeof e.abort == "function";
|
|
}, "isRequest"), jZ = /* @__PURE__ */ s(function(e) {
|
|
return e.stdio && Array.isArray(e.stdio) && e.stdio.length === 3;
|
|
}, "isChildProcess"), X3 = /* @__PURE__ */ s(function(e, t, r) {
|
|
if (typeof t == "function") return X3(e, null, t);
|
|
t || (t = {}), r = NZ(r || MZ);
|
|
var i = e._writableState, n = e._readableState, a = t.readable || t.readable !== !1 && e.readable, o = t.writable || t.writable !== !1 &&
|
|
e.writable, u = !1, l = /* @__PURE__ */ s(function() {
|
|
e.writable || c();
|
|
}, "onlegacyfinish"), c = /* @__PURE__ */ s(function() {
|
|
o = !1, a || r.call(e);
|
|
}, "onfinish"), f = /* @__PURE__ */ s(function() {
|
|
a = !1, o || r.call(e);
|
|
}, "onend"), m = /* @__PURE__ */ s(function(g) {
|
|
r.call(e, g ? new Error("exited with error code: " + g) : null);
|
|
}, "onexit"), h = /* @__PURE__ */ s(function(g) {
|
|
r.call(e, g);
|
|
}, "onerror"), d = /* @__PURE__ */ s(function() {
|
|
process.nextTick(y);
|
|
}, "onclose"), y = /* @__PURE__ */ s(function() {
|
|
if (!u) {
|
|
if (a && !(n && n.ended && !n.destroyed)) return r.call(e, new Error("premature close"));
|
|
if (o && !(i && i.ended && !i.destroyed)) return r.call(e, new Error("premature close"));
|
|
}
|
|
}, "onclosenexttick"), p = /* @__PURE__ */ s(function() {
|
|
e.req.on("finish", c);
|
|
}, "onrequest");
|
|
return RZ(e) ? (e.on("complete", c), e.on("abort", d), e.req ? p() : e.on("request", p)) : o && !i && (e.on("end", l), e.on("close", l)),
|
|
jZ(e) && e.on("exit", m), e.on("end", f), e.on("finish", c), t.error !== !1 && e.on("error", h), e.on("close", d), function() {
|
|
u = !0, e.removeListener("complete", c), e.removeListener("abort", d), e.removeListener("request", p), e.req && e.req.removeListener("\
|
|
finish", c), e.removeListener("end", l), e.removeListener("close", l), e.removeListener("finish", c), e.removeListener("exit", m), e.removeListener(
|
|
"end", f), e.removeListener("error", h), e.removeListener("close", d);
|
|
};
|
|
}, "eos");
|
|
Y3.exports = X3;
|
|
});
|
|
|
|
// ../node_modules/pump/index.js
|
|
var uv = E((zQe, Q3) => {
|
|
var LZ = ph(), qZ = zu(), hh;
|
|
try {
|
|
hh = V("fs");
|
|
} catch {
|
|
}
|
|
var Yc = /* @__PURE__ */ s(function() {
|
|
}, "noop"), UZ = /^v?\.0/.test(process.version), mh = /* @__PURE__ */ s(function(e) {
|
|
return typeof e == "function";
|
|
}, "isFn"), WZ = /* @__PURE__ */ s(function(e) {
|
|
return !UZ || !hh ? !1 : (e instanceof (hh.ReadStream || Yc) || e instanceof (hh.WriteStream || Yc)) && mh(e.close);
|
|
}, "isFS"), $Z = /* @__PURE__ */ s(function(e) {
|
|
return e.setHeader && mh(e.abort);
|
|
}, "isRequest"), VZ = /* @__PURE__ */ s(function(e, t, r, i) {
|
|
i = LZ(i);
|
|
var n = !1;
|
|
e.on("close", function() {
|
|
n = !0;
|
|
}), qZ(e, { readable: t, writable: r }, function(o) {
|
|
if (o) return i(o);
|
|
n = !0, i();
|
|
});
|
|
var a = !1;
|
|
return function(o) {
|
|
if (!n && !a) {
|
|
if (a = !0, WZ(e)) return e.close(Yc);
|
|
if ($Z(e)) return e.abort();
|
|
if (mh(e.destroy)) return e.destroy();
|
|
i(o || new Error("stream was destroyed"));
|
|
}
|
|
};
|
|
}, "destroyer"), Z3 = /* @__PURE__ */ s(function(e) {
|
|
e();
|
|
}, "call"), HZ = /* @__PURE__ */ s(function(e, t) {
|
|
return e.pipe(t);
|
|
}, "pipe"), KZ = /* @__PURE__ */ s(function() {
|
|
var e = Array.prototype.slice.call(arguments), t = mh(e[e.length - 1] || Yc) && e.pop() || Yc;
|
|
if (Array.isArray(e[0]) && (e = e[0]), e.length < 2) throw new Error("pump requires two streams per minimum");
|
|
var r, i = e.map(function(n, a) {
|
|
var o = a < e.length - 1, u = a > 0;
|
|
return VZ(n, o, u, function(l) {
|
|
r || (r = l), l && i.forEach(Z3), !o && (i.forEach(Z3), t(r));
|
|
});
|
|
});
|
|
return e.reduce(HZ);
|
|
}, "pump");
|
|
Q3.exports = KZ;
|
|
});
|
|
|
|
// ../node_modules/tar-fs/node_modules/chownr/chownr.js
|
|
var ak = E((JQe, sk) => {
|
|
"use strict";
|
|
var Vi = V("fs"), Do = V("path"), zZ = Vi.lchown ? "lchown" : "chown", GZ = Vi.lchownSync ? "lchownSync" : "chownSync", tk = Vi.lchown && !process.
|
|
version.match(/v1[1-9]+\./) && !process.version.match(/v10\.[6-9]/), ek = /* @__PURE__ */ s((e, t, r) => {
|
|
try {
|
|
return Vi[GZ](e, t, r);
|
|
} catch (i) {
|
|
if (i.code !== "ENOENT")
|
|
throw i;
|
|
}
|
|
}, "lchownSync"), JZ = /* @__PURE__ */ s((e, t, r) => {
|
|
try {
|
|
return Vi.chownSync(e, t, r);
|
|
} catch (i) {
|
|
if (i.code !== "ENOENT")
|
|
throw i;
|
|
}
|
|
}, "chownSync"), XZ = tk ? (e, t, r, i) => (n) => {
|
|
!n || n.code !== "EISDIR" ? i(n) : Vi.chown(e, t, r, i);
|
|
} : (e, t, r, i) => i, lv = tk ? (e, t, r) => {
|
|
try {
|
|
return ek(e, t, r);
|
|
} catch (i) {
|
|
if (i.code !== "EISDIR")
|
|
throw i;
|
|
JZ(e, t, r);
|
|
}
|
|
} : (e, t, r) => ek(e, t, r), YZ = process.version, rk = /* @__PURE__ */ s((e, t, r) => Vi.readdir(e, t, r), "readdir"), ZZ = /* @__PURE__ */ s(
|
|
(e, t) => Vi.readdirSync(e, t), "readdirSync");
|
|
/^v4\./.test(YZ) && (rk = /* @__PURE__ */ s((e, t, r) => Vi.readdir(e, r), "readdir"));
|
|
var yh = /* @__PURE__ */ s((e, t, r, i) => {
|
|
Vi[zZ](e, t, r, XZ(e, t, r, (n) => {
|
|
i(n && n.code !== "ENOENT" ? n : null);
|
|
}));
|
|
}, "chown"), ik = /* @__PURE__ */ s((e, t, r, i, n) => {
|
|
if (typeof t == "string")
|
|
return Vi.lstat(Do.resolve(e, t), (a, o) => {
|
|
if (a)
|
|
return n(a.code !== "ENOENT" ? a : null);
|
|
o.name = t, ik(e, o, r, i, n);
|
|
});
|
|
if (t.isDirectory())
|
|
cv(Do.resolve(e, t.name), r, i, (a) => {
|
|
if (a)
|
|
return n(a);
|
|
let o = Do.resolve(e, t.name);
|
|
yh(o, r, i, n);
|
|
});
|
|
else {
|
|
let a = Do.resolve(e, t.name);
|
|
yh(a, r, i, n);
|
|
}
|
|
}, "chownrKid"), cv = /* @__PURE__ */ s((e, t, r, i) => {
|
|
rk(e, { withFileTypes: !0 }, (n, a) => {
|
|
if (n) {
|
|
if (n.code === "ENOENT")
|
|
return i();
|
|
if (n.code !== "ENOTDIR" && n.code !== "ENOTSUP")
|
|
return i(n);
|
|
}
|
|
if (n || !a.length)
|
|
return yh(e, t, r, i);
|
|
let o = a.length, u = null, l = /* @__PURE__ */ s((c) => {
|
|
if (!u) {
|
|
if (c)
|
|
return i(u = c);
|
|
if (--o === 0)
|
|
return yh(e, t, r, i);
|
|
}
|
|
}, "then");
|
|
a.forEach((c) => ik(e, c, t, r, l));
|
|
});
|
|
}, "chownr"), QZ = /* @__PURE__ */ s((e, t, r, i) => {
|
|
if (typeof t == "string")
|
|
try {
|
|
let n = Vi.lstatSync(Do.resolve(e, t));
|
|
n.name = t, t = n;
|
|
} catch (n) {
|
|
if (n.code === "ENOENT")
|
|
return;
|
|
throw n;
|
|
}
|
|
t.isDirectory() && nk(Do.resolve(e, t.name), r, i), lv(Do.resolve(e, t.name), r, i);
|
|
}, "chownrKidSync"), nk = /* @__PURE__ */ s((e, t, r) => {
|
|
let i;
|
|
try {
|
|
i = ZZ(e, { withFileTypes: !0 });
|
|
} catch (n) {
|
|
if (n.code === "ENOENT")
|
|
return;
|
|
if (n.code === "ENOTDIR" || n.code === "ENOTSUP")
|
|
return lv(e, t, r);
|
|
throw n;
|
|
}
|
|
return i && i.length && i.forEach((n) => QZ(e, n, t, r)), lv(e, t, r);
|
|
}, "chownrSync");
|
|
sk.exports = cv;
|
|
cv.sync = nk;
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/internal/streams/stream.js
|
|
var fv = E((YQe, ok) => {
|
|
ok.exports = V("stream");
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/internal/streams/buffer_list.js
|
|
var pk = E((ZQe, dk) => {
|
|
"use strict";
|
|
function uk(e, t) {
|
|
var r = Object.keys(e);
|
|
if (Object.getOwnPropertySymbols) {
|
|
var i = Object.getOwnPropertySymbols(e);
|
|
t && (i = i.filter(function(n) {
|
|
return Object.getOwnPropertyDescriptor(e, n).enumerable;
|
|
})), r.push.apply(r, i);
|
|
}
|
|
return r;
|
|
}
|
|
s(uk, "ownKeys");
|
|
function lk(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
t % 2 ? uk(Object(r), !0).forEach(function(i) {
|
|
eQ(e, i, r[i]);
|
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : uk(Object(r)).forEach(function(i) {
|
|
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(r, i));
|
|
});
|
|
}
|
|
return e;
|
|
}
|
|
s(lk, "_objectSpread");
|
|
function eQ(e, t, r) {
|
|
return t = fk(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
}
|
|
s(eQ, "_defineProperty");
|
|
function tQ(e, t) {
|
|
if (!(e instanceof t))
|
|
throw new TypeError("Cannot call a class as a function");
|
|
}
|
|
s(tQ, "_classCallCheck");
|
|
function ck(e, t) {
|
|
for (var r = 0; r < t.length; r++) {
|
|
var i = t[r];
|
|
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, fk(i.key), i);
|
|
}
|
|
}
|
|
s(ck, "_defineProperties");
|
|
function rQ(e, t, r) {
|
|
return t && ck(e.prototype, t), r && ck(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
}
|
|
s(rQ, "_createClass");
|
|
function fk(e) {
|
|
var t = iQ(e, "string");
|
|
return typeof t == "symbol" ? t : String(t);
|
|
}
|
|
s(fk, "_toPropertyKey");
|
|
function iQ(e, t) {
|
|
if (typeof e != "object" || e === null) return e;
|
|
var r = e[Symbol.toPrimitive];
|
|
if (r !== void 0) {
|
|
var i = r.call(e, t || "default");
|
|
if (typeof i != "object") return i;
|
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
}
|
|
return (t === "string" ? String : Number)(e);
|
|
}
|
|
s(iQ, "_toPrimitive");
|
|
var nQ = V("buffer"), gh = nQ.Buffer, sQ = V("util"), dv = sQ.inspect, aQ = dv && dv.custom || "inspect";
|
|
function oQ(e, t, r) {
|
|
gh.prototype.copy.call(e, t, r);
|
|
}
|
|
s(oQ, "copyBuffer");
|
|
dk.exports = /* @__PURE__ */ function() {
|
|
function e() {
|
|
tQ(this, e), this.head = null, this.tail = null, this.length = 0;
|
|
}
|
|
return s(e, "BufferList"), rQ(e, [{
|
|
key: "push",
|
|
value: /* @__PURE__ */ s(function(r) {
|
|
var i = {
|
|
data: r,
|
|
next: null
|
|
};
|
|
this.length > 0 ? this.tail.next = i : this.head = i, this.tail = i, ++this.length;
|
|
}, "push")
|
|
}, {
|
|
key: "unshift",
|
|
value: /* @__PURE__ */ s(function(r) {
|
|
var i = {
|
|
data: r,
|
|
next: this.head
|
|
};
|
|
this.length === 0 && (this.tail = i), this.head = i, ++this.length;
|
|
}, "unshift")
|
|
}, {
|
|
key: "shift",
|
|
value: /* @__PURE__ */ s(function() {
|
|
if (this.length !== 0) {
|
|
var r = this.head.data;
|
|
return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, r;
|
|
}
|
|
}, "shift")
|
|
}, {
|
|
key: "clear",
|
|
value: /* @__PURE__ */ s(function() {
|
|
this.head = this.tail = null, this.length = 0;
|
|
}, "clear")
|
|
}, {
|
|
key: "join",
|
|
value: /* @__PURE__ */ s(function(r) {
|
|
if (this.length === 0) return "";
|
|
for (var i = this.head, n = "" + i.data; i = i.next; ) n += r + i.data;
|
|
return n;
|
|
}, "join")
|
|
}, {
|
|
key: "concat",
|
|
value: /* @__PURE__ */ s(function(r) {
|
|
if (this.length === 0) return gh.alloc(0);
|
|
for (var i = gh.allocUnsafe(r >>> 0), n = this.head, a = 0; n; )
|
|
oQ(n.data, i, a), a += n.data.length, n = n.next;
|
|
return i;
|
|
}, "concat")
|
|
// Consumes a specified amount of bytes or characters from the buffered data.
|
|
}, {
|
|
key: "consume",
|
|
value: /* @__PURE__ */ s(function(r, i) {
|
|
var n;
|
|
return r < this.head.data.length ? (n = this.head.data.slice(0, r), this.head.data = this.head.data.slice(r)) : r === this.head.data.
|
|
length ? n = this.shift() : n = i ? this._getString(r) : this._getBuffer(r), n;
|
|
}, "consume")
|
|
}, {
|
|
key: "first",
|
|
value: /* @__PURE__ */ s(function() {
|
|
return this.head.data;
|
|
}, "first")
|
|
// Consumes a specified amount of characters from the buffered data.
|
|
}, {
|
|
key: "_getString",
|
|
value: /* @__PURE__ */ s(function(r) {
|
|
var i = this.head, n = 1, a = i.data;
|
|
for (r -= a.length; i = i.next; ) {
|
|
var o = i.data, u = r > o.length ? o.length : r;
|
|
if (u === o.length ? a += o : a += o.slice(0, r), r -= u, r === 0) {
|
|
u === o.length ? (++n, i.next ? this.head = i.next : this.head = this.tail = null) : (this.head = i, i.data = o.slice(u));
|
|
break;
|
|
}
|
|
++n;
|
|
}
|
|
return this.length -= n, a;
|
|
}, "_getString")
|
|
// Consumes a specified amount of bytes from the buffered data.
|
|
}, {
|
|
key: "_getBuffer",
|
|
value: /* @__PURE__ */ s(function(r) {
|
|
var i = gh.allocUnsafe(r), n = this.head, a = 1;
|
|
for (n.data.copy(i), r -= n.data.length; n = n.next; ) {
|
|
var o = n.data, u = r > o.length ? o.length : r;
|
|
if (o.copy(i, i.length - r, 0, u), r -= u, r === 0) {
|
|
u === o.length ? (++a, n.next ? this.head = n.next : this.head = this.tail = null) : (this.head = n, n.data = o.slice(u));
|
|
break;
|
|
}
|
|
++a;
|
|
}
|
|
return this.length -= a, i;
|
|
}, "_getBuffer")
|
|
// Make sure the linked list only shows the minimal necessary information.
|
|
}, {
|
|
key: aQ,
|
|
value: /* @__PURE__ */ s(function(r, i) {
|
|
return dv(this, lk(lk({}, i), {}, {
|
|
// Only inspect one level.
|
|
depth: 0,
|
|
// It should not recurse.
|
|
customInspect: !1
|
|
}));
|
|
}, "value")
|
|
}]), e;
|
|
}();
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/internal/streams/destroy.js
|
|
var hv = E((eet, mk) => {
|
|
"use strict";
|
|
function uQ(e, t) {
|
|
var r = this, i = this._readableState && this._readableState.destroyed, n = this._writableState && this._writableState.destroyed;
|
|
return i || n ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, process.
|
|
nextTick(pv, this, e)) : process.nextTick(pv, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState &&
|
|
(this._writableState.destroyed = !0), this._destroy(e || null, function(a) {
|
|
!t && a ? r._writableState ? r._writableState.errorEmitted ? process.nextTick(bh, r) : (r._writableState.errorEmitted = !0, process.nextTick(
|
|
hk, r, a)) : process.nextTick(hk, r, a) : t ? (process.nextTick(bh, r), t(a)) : process.nextTick(bh, r);
|
|
}), this);
|
|
}
|
|
s(uQ, "destroy");
|
|
function hk(e, t) {
|
|
pv(e, t), bh(e);
|
|
}
|
|
s(hk, "emitErrorAndCloseNT");
|
|
function bh(e) {
|
|
e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit("close");
|
|
}
|
|
s(bh, "emitCloseNT");
|
|
function lQ() {
|
|
this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.
|
|
endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending =
|
|
!1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted =
|
|
!1);
|
|
}
|
|
s(lQ, "undestroy");
|
|
function pv(e, t) {
|
|
e.emit("error", t);
|
|
}
|
|
s(pv, "emitErrorNT");
|
|
function cQ(e, t) {
|
|
var r = e._readableState, i = e._writableState;
|
|
r && r.autoDestroy || i && i.autoDestroy ? e.destroy(t) : e.emit("error", t);
|
|
}
|
|
s(cQ, "errorOrDestroy");
|
|
mk.exports = {
|
|
destroy: uQ,
|
|
undestroy: lQ,
|
|
errorOrDestroy: cQ
|
|
};
|
|
});
|
|
|
|
// ../node_modules/readable-stream/errors.js
|
|
var Da = E((ret, bk) => {
|
|
"use strict";
|
|
var gk = {};
|
|
function Hi(e, t, r) {
|
|
r || (r = Error);
|
|
function i(a, o, u) {
|
|
return typeof t == "string" ? t : t(a, o, u);
|
|
}
|
|
s(i, "getMessage");
|
|
class n extends r {
|
|
static {
|
|
s(this, "NodeError");
|
|
}
|
|
constructor(o, u, l) {
|
|
super(i(o, u, l));
|
|
}
|
|
}
|
|
n.prototype.name = r.name, n.prototype.code = e, gk[e] = n;
|
|
}
|
|
s(Hi, "createErrorType");
|
|
function yk(e, t) {
|
|
if (Array.isArray(e)) {
|
|
let r = e.length;
|
|
return e = e.map((i) => String(i)), r > 2 ? `one of ${t} ${e.slice(0, r - 1).join(", ")}, or ` + e[r - 1] : r === 2 ? `one of ${t} ${e[0]}\
|
|
or ${e[1]}` : `of ${t} ${e[0]}`;
|
|
} else
|
|
return `of ${t} ${String(e)}`;
|
|
}
|
|
s(yk, "oneOf");
|
|
function fQ(e, t, r) {
|
|
return e.substr(!r || r < 0 ? 0 : +r, t.length) === t;
|
|
}
|
|
s(fQ, "startsWith");
|
|
function dQ(e, t, r) {
|
|
return (r === void 0 || r > e.length) && (r = e.length), e.substring(r - t.length, r) === t;
|
|
}
|
|
s(dQ, "endsWith");
|
|
function pQ(e, t, r) {
|
|
return typeof r != "number" && (r = 0), r + t.length > e.length ? !1 : e.indexOf(t, r) !== -1;
|
|
}
|
|
s(pQ, "includes");
|
|
Hi("ERR_INVALID_OPT_VALUE", function(e, t) {
|
|
return 'The value "' + t + '" is invalid for option "' + e + '"';
|
|
}, TypeError);
|
|
Hi("ERR_INVALID_ARG_TYPE", function(e, t, r) {
|
|
let i;
|
|
typeof t == "string" && fQ(t, "not ") ? (i = "must not be", t = t.replace(/^not /, "")) : i = "must be";
|
|
let n;
|
|
if (dQ(e, " argument"))
|
|
n = `The ${e} ${i} ${yk(t, "type")}`;
|
|
else {
|
|
let a = pQ(e, ".") ? "property" : "argument";
|
|
n = `The "${e}" ${a} ${i} ${yk(t, "type")}`;
|
|
}
|
|
return n += `. Received type ${typeof r}`, n;
|
|
}, TypeError);
|
|
Hi("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
|
|
Hi("ERR_METHOD_NOT_IMPLEMENTED", function(e) {
|
|
return "The " + e + " method is not implemented";
|
|
});
|
|
Hi("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
|
|
Hi("ERR_STREAM_DESTROYED", function(e) {
|
|
return "Cannot call " + e + " after a stream was destroyed";
|
|
});
|
|
Hi("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
|
|
Hi("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
|
|
Hi("ERR_STREAM_WRITE_AFTER_END", "write after end");
|
|
Hi("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError);
|
|
Hi("ERR_UNKNOWN_ENCODING", function(e) {
|
|
return "Unknown encoding: " + e;
|
|
}, TypeError);
|
|
Hi("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
|
|
bk.exports.codes = gk;
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/internal/streams/state.js
|
|
var mv = E((net, Dk) => {
|
|
"use strict";
|
|
var hQ = Da().codes.ERR_INVALID_OPT_VALUE;
|
|
function mQ(e, t, r) {
|
|
return e.highWaterMark != null ? e.highWaterMark : t ? e[r] : null;
|
|
}
|
|
s(mQ, "highWaterMarkFrom");
|
|
function yQ(e, t, r, i) {
|
|
var n = mQ(t, i, r);
|
|
if (n != null) {
|
|
if (!(isFinite(n) && Math.floor(n) === n) || n < 0) {
|
|
var a = i ? r : "highWaterMark";
|
|
throw new hQ(a, n);
|
|
}
|
|
return Math.floor(n);
|
|
}
|
|
return e.objectMode ? 16 : 16 * 1024;
|
|
}
|
|
s(yQ, "getHighWaterMark");
|
|
Dk.exports = {
|
|
getHighWaterMark: yQ
|
|
};
|
|
});
|
|
|
|
// ../node_modules/inherits/inherits_browser.js
|
|
var vk = E((aet, yv) => {
|
|
typeof Object.create == "function" ? yv.exports = /* @__PURE__ */ s(function(t, r) {
|
|
r && (t.super_ = r, t.prototype = Object.create(r.prototype, {
|
|
constructor: {
|
|
value: t,
|
|
enumerable: !1,
|
|
writable: !0,
|
|
configurable: !0
|
|
}
|
|
}));
|
|
}, "inherits") : yv.exports = /* @__PURE__ */ s(function(t, r) {
|
|
if (r) {
|
|
t.super_ = r;
|
|
var i = /* @__PURE__ */ s(function() {
|
|
}, "TempCtor");
|
|
i.prototype = r.prototype, t.prototype = new i(), t.prototype.constructor = t;
|
|
}
|
|
}, "inherits");
|
|
});
|
|
|
|
// ../node_modules/inherits/inherits.js
|
|
var Lt = E((uet, bv) => {
|
|
try {
|
|
if (gv = V("util"), typeof gv.inherits != "function") throw "";
|
|
bv.exports = gv.inherits;
|
|
} catch {
|
|
bv.exports = vk();
|
|
}
|
|
var gv;
|
|
});
|
|
|
|
// ../node_modules/util-deprecate/node.js
|
|
var Zc = E((cet, Ek) => {
|
|
Ek.exports = V("util").deprecate;
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/_stream_writable.js
|
|
var Ev = E((fet, Ak) => {
|
|
"use strict";
|
|
Ak.exports = lr;
|
|
function Sk(e) {
|
|
var t = this;
|
|
this.next = null, this.entry = null, this.finish = function() {
|
|
$Q(t, e);
|
|
};
|
|
}
|
|
s(Sk, "CorkedRequest");
|
|
var Gu;
|
|
lr.WritableState = ef;
|
|
var gQ = {
|
|
deprecate: Zc()
|
|
}, Tk = fv(), vh = V("buffer").Buffer, bQ = (typeof global < "u" ? global : typeof window < "u" ? window : typeof self < "u" ? self : {}).
|
|
Uint8Array || function() {
|
|
};
|
|
function DQ(e) {
|
|
return vh.from(e);
|
|
}
|
|
s(DQ, "_uint8ArrayToBuffer");
|
|
function vQ(e) {
|
|
return vh.isBuffer(e) || e instanceof bQ;
|
|
}
|
|
s(vQ, "_isUint8Array");
|
|
var vv = hv(), EQ = mv(), xQ = EQ.getHighWaterMark, va = Da().codes, SQ = va.ERR_INVALID_ARG_TYPE, TQ = va.ERR_METHOD_NOT_IMPLEMENTED, CQ = va.
|
|
ERR_MULTIPLE_CALLBACK, wQ = va.ERR_STREAM_CANNOT_PIPE, AQ = va.ERR_STREAM_DESTROYED, _Q = va.ERR_STREAM_NULL_VALUES, PQ = va.ERR_STREAM_WRITE_AFTER_END,
|
|
FQ = va.ERR_UNKNOWN_ENCODING, Ju = vv.errorOrDestroy;
|
|
Lt()(lr, Tk);
|
|
function IQ() {
|
|
}
|
|
s(IQ, "nop");
|
|
function ef(e, t, r) {
|
|
Gu = Gu || vo(), e = e || {}, typeof r != "boolean" && (r = t instanceof Gu), this.objectMode = !!e.objectMode, r && (this.objectMode = this.
|
|
objectMode || !!e.writableObjectMode), this.highWaterMark = xQ(this, e, "writableHighWaterMark", r), this.finalCalled = !1, this.needDrain =
|
|
!1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
|
|
var i = e.decodeStrings === !1;
|
|
this.decodeStrings = !i, this.defaultEncoding = e.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync =
|
|
!0, this.bufferProcessing = !1, this.onwrite = function(n) {
|
|
jQ(t, n);
|
|
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished =
|
|
!1, this.errorEmitted = !1, this.emitClose = e.emitClose !== !1, this.autoDestroy = !!e.autoDestroy, this.bufferedRequestCount = 0, this.
|
|
corkedRequestsFree = new Sk(this);
|
|
}
|
|
s(ef, "WritableState");
|
|
ef.prototype.getBuffer = /* @__PURE__ */ s(function() {
|
|
for (var t = this.bufferedRequest, r = []; t; )
|
|
r.push(t), t = t.next;
|
|
return r;
|
|
}, "getBuffer");
|
|
(function() {
|
|
try {
|
|
Object.defineProperty(ef.prototype, "buffer", {
|
|
get: gQ.deprecate(/* @__PURE__ */ s(function() {
|
|
return this.getBuffer();
|
|
}, "writableStateBufferGetter"), "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
|
|
});
|
|
} catch {
|
|
}
|
|
})();
|
|
var Dh;
|
|
typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (Dh = Function.prototype[Symbol.
|
|
hasInstance], Object.defineProperty(lr, Symbol.hasInstance, {
|
|
value: /* @__PURE__ */ s(function(t) {
|
|
return Dh.call(this, t) ? !0 : this !== lr ? !1 : t && t._writableState instanceof ef;
|
|
}, "value")
|
|
})) : Dh = /* @__PURE__ */ s(function(t) {
|
|
return t instanceof this;
|
|
}, "realHasInstance");
|
|
function lr(e) {
|
|
Gu = Gu || vo();
|
|
var t = this instanceof Gu;
|
|
if (!t && !Dh.call(lr, this)) return new lr(e);
|
|
this._writableState = new ef(e, this, t), this.writable = !0, e && (typeof e.write == "function" && (this._write = e.write), typeof e.writev ==
|
|
"function" && (this._writev = e.writev), typeof e.destroy == "function" && (this._destroy = e.destroy), typeof e.final == "function" && (this.
|
|
_final = e.final)), Tk.call(this);
|
|
}
|
|
s(lr, "Writable");
|
|
lr.prototype.pipe = function() {
|
|
Ju(this, new wQ());
|
|
};
|
|
function OQ(e, t) {
|
|
var r = new PQ();
|
|
Ju(e, r), process.nextTick(t, r);
|
|
}
|
|
s(OQ, "writeAfterEnd");
|
|
function kQ(e, t, r, i) {
|
|
var n;
|
|
return r === null ? n = new _Q() : typeof r != "string" && !t.objectMode && (n = new SQ("chunk", ["string", "Buffer"], r)), n ? (Ju(e, n),
|
|
process.nextTick(i, n), !1) : !0;
|
|
}
|
|
s(kQ, "validChunk");
|
|
lr.prototype.write = function(e, t, r) {
|
|
var i = this._writableState, n = !1, a = !i.objectMode && vQ(e);
|
|
return a && !vh.isBuffer(e) && (e = DQ(e)), typeof t == "function" && (r = t, t = null), a ? t = "buffer" : t || (t = i.defaultEncoding),
|
|
typeof r != "function" && (r = IQ), i.ending ? OQ(this, r) : (a || kQ(this, i, e, r)) && (i.pendingcb++, n = NQ(this, i, a, e, t, r)), n;
|
|
};
|
|
lr.prototype.cork = function() {
|
|
this._writableState.corked++;
|
|
};
|
|
lr.prototype.uncork = function() {
|
|
var e = this._writableState;
|
|
e.corked && (e.corked--, !e.writing && !e.corked && !e.bufferProcessing && e.bufferedRequest && Ck(this, e));
|
|
};
|
|
lr.prototype.setDefaultEncoding = /* @__PURE__ */ s(function(t) {
|
|
if (typeof t == "string" && (t = t.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "\
|
|
utf-16le", "raw"].indexOf((t + "").toLowerCase()) > -1)) throw new FQ(t);
|
|
return this._writableState.defaultEncoding = t, this;
|
|
}, "setDefaultEncoding");
|
|
Object.defineProperty(lr.prototype, "writableBuffer", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState && this._writableState.getBuffer();
|
|
}, "get")
|
|
});
|
|
function BQ(e, t, r) {
|
|
return !e.objectMode && e.decodeStrings !== !1 && typeof t == "string" && (t = vh.from(t, r)), t;
|
|
}
|
|
s(BQ, "decodeChunk");
|
|
Object.defineProperty(lr.prototype, "writableHighWaterMark", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState.highWaterMark;
|
|
}, "get")
|
|
});
|
|
function NQ(e, t, r, i, n, a) {
|
|
if (!r) {
|
|
var o = BQ(t, i, n);
|
|
i !== o && (r = !0, n = "buffer", i = o);
|
|
}
|
|
var u = t.objectMode ? 1 : i.length;
|
|
t.length += u;
|
|
var l = t.length < t.highWaterMark;
|
|
if (l || (t.needDrain = !0), t.writing || t.corked) {
|
|
var c = t.lastBufferedRequest;
|
|
t.lastBufferedRequest = {
|
|
chunk: i,
|
|
encoding: n,
|
|
isBuf: r,
|
|
callback: a,
|
|
next: null
|
|
}, c ? c.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest, t.bufferedRequestCount += 1;
|
|
} else
|
|
Dv(e, t, !1, u, i, n, a);
|
|
return l;
|
|
}
|
|
s(NQ, "writeOrBuffer");
|
|
function Dv(e, t, r, i, n, a, o) {
|
|
t.writelen = i, t.writecb = o, t.writing = !0, t.sync = !0, t.destroyed ? t.onwrite(new AQ("write")) : r ? e._writev(n, t.onwrite) : e._write(
|
|
n, a, t.onwrite), t.sync = !1;
|
|
}
|
|
s(Dv, "doWrite");
|
|
function MQ(e, t, r, i, n) {
|
|
--t.pendingcb, r ? (process.nextTick(n, i), process.nextTick(Qc, e, t), e._writableState.errorEmitted = !0, Ju(e, i)) : (n(i), e._writableState.
|
|
errorEmitted = !0, Ju(e, i), Qc(e, t));
|
|
}
|
|
s(MQ, "onwriteError");
|
|
function RQ(e) {
|
|
e.writing = !1, e.writecb = null, e.length -= e.writelen, e.writelen = 0;
|
|
}
|
|
s(RQ, "onwriteStateUpdate");
|
|
function jQ(e, t) {
|
|
var r = e._writableState, i = r.sync, n = r.writecb;
|
|
if (typeof n != "function") throw new CQ();
|
|
if (RQ(r), t) MQ(e, r, i, t, n);
|
|
else {
|
|
var a = wk(r) || e.destroyed;
|
|
!a && !r.corked && !r.bufferProcessing && r.bufferedRequest && Ck(e, r), i ? process.nextTick(xk, e, r, a, n) : xk(e, r, a, n);
|
|
}
|
|
}
|
|
s(jQ, "onwrite");
|
|
function xk(e, t, r, i) {
|
|
r || LQ(e, t), t.pendingcb--, i(), Qc(e, t);
|
|
}
|
|
s(xk, "afterWrite");
|
|
function LQ(e, t) {
|
|
t.length === 0 && t.needDrain && (t.needDrain = !1, e.emit("drain"));
|
|
}
|
|
s(LQ, "onwriteDrain");
|
|
function Ck(e, t) {
|
|
t.bufferProcessing = !0;
|
|
var r = t.bufferedRequest;
|
|
if (e._writev && r && r.next) {
|
|
var i = t.bufferedRequestCount, n = new Array(i), a = t.corkedRequestsFree;
|
|
a.entry = r;
|
|
for (var o = 0, u = !0; r; )
|
|
n[o] = r, r.isBuf || (u = !1), r = r.next, o += 1;
|
|
n.allBuffers = u, Dv(e, t, !0, t.length, n, "", a.finish), t.pendingcb++, t.lastBufferedRequest = null, a.next ? (t.corkedRequestsFree =
|
|
a.next, a.next = null) : t.corkedRequestsFree = new Sk(t), t.bufferedRequestCount = 0;
|
|
} else {
|
|
for (; r; ) {
|
|
var l = r.chunk, c = r.encoding, f = r.callback, m = t.objectMode ? 1 : l.length;
|
|
if (Dv(e, t, !1, m, l, c, f), r = r.next, t.bufferedRequestCount--, t.writing)
|
|
break;
|
|
}
|
|
r === null && (t.lastBufferedRequest = null);
|
|
}
|
|
t.bufferedRequest = r, t.bufferProcessing = !1;
|
|
}
|
|
s(Ck, "clearBuffer");
|
|
lr.prototype._write = function(e, t, r) {
|
|
r(new TQ("_write()"));
|
|
};
|
|
lr.prototype._writev = null;
|
|
lr.prototype.end = function(e, t, r) {
|
|
var i = this._writableState;
|
|
return typeof e == "function" ? (r = e, e = null, t = null) : typeof t == "function" && (r = t, t = null), e != null && this.write(e, t),
|
|
i.corked && (i.corked = 1, this.uncork()), i.ending || WQ(this, i, r), this;
|
|
};
|
|
Object.defineProperty(lr.prototype, "writableLength", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState.length;
|
|
}, "get")
|
|
});
|
|
function wk(e) {
|
|
return e.ending && e.length === 0 && e.bufferedRequest === null && !e.finished && !e.writing;
|
|
}
|
|
s(wk, "needFinish");
|
|
function qQ(e, t) {
|
|
e._final(function(r) {
|
|
t.pendingcb--, r && Ju(e, r), t.prefinished = !0, e.emit("prefinish"), Qc(e, t);
|
|
});
|
|
}
|
|
s(qQ, "callFinal");
|
|
function UQ(e, t) {
|
|
!t.prefinished && !t.finalCalled && (typeof e._final == "function" && !t.destroyed ? (t.pendingcb++, t.finalCalled = !0, process.nextTick(
|
|
qQ, e, t)) : (t.prefinished = !0, e.emit("prefinish")));
|
|
}
|
|
s(UQ, "prefinish");
|
|
function Qc(e, t) {
|
|
var r = wk(t);
|
|
if (r && (UQ(e, t), t.pendingcb === 0 && (t.finished = !0, e.emit("finish"), t.autoDestroy))) {
|
|
var i = e._readableState;
|
|
(!i || i.autoDestroy && i.endEmitted) && e.destroy();
|
|
}
|
|
return r;
|
|
}
|
|
s(Qc, "finishMaybe");
|
|
function WQ(e, t, r) {
|
|
t.ending = !0, Qc(e, t), r && (t.finished ? process.nextTick(r) : e.once("finish", r)), t.ended = !0, e.writable = !1;
|
|
}
|
|
s(WQ, "endWritable");
|
|
function $Q(e, t, r) {
|
|
var i = e.entry;
|
|
for (e.entry = null; i; ) {
|
|
var n = i.callback;
|
|
t.pendingcb--, n(r), i = i.next;
|
|
}
|
|
t.corkedRequestsFree.next = e;
|
|
}
|
|
s($Q, "onCorkedFinish");
|
|
Object.defineProperty(lr.prototype, "destroyed", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState === void 0 ? !1 : this._writableState.destroyed;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(t) {
|
|
this._writableState && (this._writableState.destroyed = t);
|
|
}, "set")
|
|
});
|
|
lr.prototype.destroy = vv.destroy;
|
|
lr.prototype._undestroy = vv.undestroy;
|
|
lr.prototype._destroy = function(e, t) {
|
|
t(e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/_stream_duplex.js
|
|
var vo = E((pet, Pk) => {
|
|
"use strict";
|
|
var VQ = Object.keys || function(e) {
|
|
var t = [];
|
|
for (var r in e) t.push(r);
|
|
return t;
|
|
};
|
|
Pk.exports = Vn;
|
|
var _k = Tv(), Sv = Ev();
|
|
Lt()(Vn, _k);
|
|
for (xv = VQ(Sv.prototype), Eh = 0; Eh < xv.length; Eh++)
|
|
xh = xv[Eh], Vn.prototype[xh] || (Vn.prototype[xh] = Sv.prototype[xh]);
|
|
var xv, xh, Eh;
|
|
function Vn(e) {
|
|
if (!(this instanceof Vn)) return new Vn(e);
|
|
_k.call(this, e), Sv.call(this, e), this.allowHalfOpen = !0, e && (e.readable === !1 && (this.readable = !1), e.writable === !1 && (this.
|
|
writable = !1), e.allowHalfOpen === !1 && (this.allowHalfOpen = !1, this.once("end", HQ)));
|
|
}
|
|
s(Vn, "Duplex");
|
|
Object.defineProperty(Vn.prototype, "writableHighWaterMark", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState.highWaterMark;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Vn.prototype, "writableBuffer", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState && this._writableState.getBuffer();
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Vn.prototype, "writableLength", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState.length;
|
|
}, "get")
|
|
});
|
|
function HQ() {
|
|
this._writableState.ended || process.nextTick(KQ, this);
|
|
}
|
|
s(HQ, "onend");
|
|
function KQ(e) {
|
|
e.end();
|
|
}
|
|
s(KQ, "onEndNT");
|
|
Object.defineProperty(Vn.prototype, "destroyed", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState === void 0 || this._writableState === void 0 ? !1 : this._readableState.destroyed && this._writableState.destroyed;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(t) {
|
|
this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = t, this._writableState.destroyed =
|
|
t);
|
|
}, "set")
|
|
});
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/internal/streams/end-of-stream.js
|
|
var Sh = E((met, Ok) => {
|
|
"use strict";
|
|
var Fk = Da().codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
function zQ(e) {
|
|
var t = !1;
|
|
return function() {
|
|
if (!t) {
|
|
t = !0;
|
|
for (var r = arguments.length, i = new Array(r), n = 0; n < r; n++)
|
|
i[n] = arguments[n];
|
|
e.apply(this, i);
|
|
}
|
|
};
|
|
}
|
|
s(zQ, "once");
|
|
function GQ() {
|
|
}
|
|
s(GQ, "noop");
|
|
function JQ(e) {
|
|
return e.setHeader && typeof e.abort == "function";
|
|
}
|
|
s(JQ, "isRequest");
|
|
function Ik(e, t, r) {
|
|
if (typeof t == "function") return Ik(e, null, t);
|
|
t || (t = {}), r = zQ(r || GQ);
|
|
var i = t.readable || t.readable !== !1 && e.readable, n = t.writable || t.writable !== !1 && e.writable, a = /* @__PURE__ */ s(function() {
|
|
e.writable || u();
|
|
}, "onlegacyfinish"), o = e._writableState && e._writableState.finished, u = /* @__PURE__ */ s(function() {
|
|
n = !1, o = !0, i || r.call(e);
|
|
}, "onfinish"), l = e._readableState && e._readableState.endEmitted, c = /* @__PURE__ */ s(function() {
|
|
i = !1, l = !0, n || r.call(e);
|
|
}, "onend"), f = /* @__PURE__ */ s(function(y) {
|
|
r.call(e, y);
|
|
}, "onerror"), m = /* @__PURE__ */ s(function() {
|
|
var y;
|
|
if (i && !l)
|
|
return (!e._readableState || !e._readableState.ended) && (y = new Fk()), r.call(e, y);
|
|
if (n && !o)
|
|
return (!e._writableState || !e._writableState.ended) && (y = new Fk()), r.call(e, y);
|
|
}, "onclose"), h = /* @__PURE__ */ s(function() {
|
|
e.req.on("finish", u);
|
|
}, "onrequest");
|
|
return JQ(e) ? (e.on("complete", u), e.on("abort", m), e.req ? h() : e.on("request", h)) : n && !e._writableState && (e.on("end", a), e.
|
|
on("close", a)), e.on("end", c), e.on("finish", u), t.error !== !1 && e.on("error", f), e.on("close", m), function() {
|
|
e.removeListener("complete", u), e.removeListener("abort", m), e.removeListener("request", h), e.req && e.req.removeListener("finish",
|
|
u), e.removeListener("end", a), e.removeListener("close", a), e.removeListener("finish", u), e.removeListener("end", c), e.removeListener(
|
|
"error", f), e.removeListener("close", m);
|
|
};
|
|
}
|
|
s(Ik, "eos");
|
|
Ok.exports = Ik;
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/internal/streams/async_iterator.js
|
|
var Bk = E((get, kk) => {
|
|
"use strict";
|
|
var Th;
|
|
function Ea(e, t, r) {
|
|
return t = XQ(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
}
|
|
s(Ea, "_defineProperty");
|
|
function XQ(e) {
|
|
var t = YQ(e, "string");
|
|
return typeof t == "symbol" ? t : String(t);
|
|
}
|
|
s(XQ, "_toPropertyKey");
|
|
function YQ(e, t) {
|
|
if (typeof e != "object" || e === null) return e;
|
|
var r = e[Symbol.toPrimitive];
|
|
if (r !== void 0) {
|
|
var i = r.call(e, t || "default");
|
|
if (typeof i != "object") return i;
|
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
}
|
|
return (t === "string" ? String : Number)(e);
|
|
}
|
|
s(YQ, "_toPrimitive");
|
|
var ZQ = Sh(), xa = Symbol("lastResolve"), Eo = Symbol("lastReject"), tf = Symbol("error"), Ch = Symbol("ended"), xo = Symbol("lastPromise"),
|
|
Cv = Symbol("handlePromise"), So = Symbol("stream");
|
|
function Sa(e, t) {
|
|
return {
|
|
value: e,
|
|
done: t
|
|
};
|
|
}
|
|
s(Sa, "createIterResult");
|
|
function QQ(e) {
|
|
var t = e[xa];
|
|
if (t !== null) {
|
|
var r = e[So].read();
|
|
r !== null && (e[xo] = null, e[xa] = null, e[Eo] = null, t(Sa(r, !1)));
|
|
}
|
|
}
|
|
s(QQ, "readAndResolve");
|
|
function eee(e) {
|
|
process.nextTick(QQ, e);
|
|
}
|
|
s(eee, "onReadable");
|
|
function tee(e, t) {
|
|
return function(r, i) {
|
|
e.then(function() {
|
|
if (t[Ch]) {
|
|
r(Sa(void 0, !0));
|
|
return;
|
|
}
|
|
t[Cv](r, i);
|
|
}, i);
|
|
};
|
|
}
|
|
s(tee, "wrapForNext");
|
|
var ree = Object.getPrototypeOf(function() {
|
|
}), iee = Object.setPrototypeOf((Th = {
|
|
get stream() {
|
|
return this[So];
|
|
},
|
|
next: /* @__PURE__ */ s(function() {
|
|
var t = this, r = this[tf];
|
|
if (r !== null)
|
|
return Promise.reject(r);
|
|
if (this[Ch])
|
|
return Promise.resolve(Sa(void 0, !0));
|
|
if (this[So].destroyed)
|
|
return new Promise(function(o, u) {
|
|
process.nextTick(function() {
|
|
t[tf] ? u(t[tf]) : o(Sa(void 0, !0));
|
|
});
|
|
});
|
|
var i = this[xo], n;
|
|
if (i)
|
|
n = new Promise(tee(i, this));
|
|
else {
|
|
var a = this[So].read();
|
|
if (a !== null)
|
|
return Promise.resolve(Sa(a, !1));
|
|
n = new Promise(this[Cv]);
|
|
}
|
|
return this[xo] = n, n;
|
|
}, "next")
|
|
}, Ea(Th, Symbol.asyncIterator, function() {
|
|
return this;
|
|
}), Ea(Th, "return", /* @__PURE__ */ s(function() {
|
|
var t = this;
|
|
return new Promise(function(r, i) {
|
|
t[So].destroy(null, function(n) {
|
|
if (n) {
|
|
i(n);
|
|
return;
|
|
}
|
|
r(Sa(void 0, !0));
|
|
});
|
|
});
|
|
}, "_return")), Th), ree), nee = /* @__PURE__ */ s(function(t) {
|
|
var r, i = Object.create(iee, (r = {}, Ea(r, So, {
|
|
value: t,
|
|
writable: !0
|
|
}), Ea(r, xa, {
|
|
value: null,
|
|
writable: !0
|
|
}), Ea(r, Eo, {
|
|
value: null,
|
|
writable: !0
|
|
}), Ea(r, tf, {
|
|
value: null,
|
|
writable: !0
|
|
}), Ea(r, Ch, {
|
|
value: t._readableState.endEmitted,
|
|
writable: !0
|
|
}), Ea(r, Cv, {
|
|
value: /* @__PURE__ */ s(function(a, o) {
|
|
var u = i[So].read();
|
|
u ? (i[xo] = null, i[xa] = null, i[Eo] = null, a(Sa(u, !1))) : (i[xa] = a, i[Eo] = o);
|
|
}, "value"),
|
|
writable: !0
|
|
}), r));
|
|
return i[xo] = null, ZQ(t, function(n) {
|
|
if (n && n.code !== "ERR_STREAM_PREMATURE_CLOSE") {
|
|
var a = i[Eo];
|
|
a !== null && (i[xo] = null, i[xa] = null, i[Eo] = null, a(n)), i[tf] = n;
|
|
return;
|
|
}
|
|
var o = i[xa];
|
|
o !== null && (i[xo] = null, i[xa] = null, i[Eo] = null, o(Sa(void 0, !0))), i[Ch] = !0;
|
|
}), t.on("readable", eee.bind(null, i)), i;
|
|
}, "createReadableStreamAsyncIterator");
|
|
kk.exports = nee;
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/internal/streams/from.js
|
|
var jk = E((Det, Rk) => {
|
|
"use strict";
|
|
function Nk(e, t, r, i, n, a, o) {
|
|
try {
|
|
var u = e[a](o), l = u.value;
|
|
} catch (c) {
|
|
r(c);
|
|
return;
|
|
}
|
|
u.done ? t(l) : Promise.resolve(l).then(i, n);
|
|
}
|
|
s(Nk, "asyncGeneratorStep");
|
|
function see(e) {
|
|
return function() {
|
|
var t = this, r = arguments;
|
|
return new Promise(function(i, n) {
|
|
var a = e.apply(t, r);
|
|
function o(l) {
|
|
Nk(a, i, n, o, u, "next", l);
|
|
}
|
|
s(o, "_next");
|
|
function u(l) {
|
|
Nk(a, i, n, o, u, "throw", l);
|
|
}
|
|
s(u, "_throw"), o(void 0);
|
|
});
|
|
};
|
|
}
|
|
s(see, "_asyncToGenerator");
|
|
function Mk(e, t) {
|
|
var r = Object.keys(e);
|
|
if (Object.getOwnPropertySymbols) {
|
|
var i = Object.getOwnPropertySymbols(e);
|
|
t && (i = i.filter(function(n) {
|
|
return Object.getOwnPropertyDescriptor(e, n).enumerable;
|
|
})), r.push.apply(r, i);
|
|
}
|
|
return r;
|
|
}
|
|
s(Mk, "ownKeys");
|
|
function aee(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
t % 2 ? Mk(Object(r), !0).forEach(function(i) {
|
|
oee(e, i, r[i]);
|
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Mk(Object(r)).forEach(function(i) {
|
|
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(r, i));
|
|
});
|
|
}
|
|
return e;
|
|
}
|
|
s(aee, "_objectSpread");
|
|
function oee(e, t, r) {
|
|
return t = uee(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
}
|
|
s(oee, "_defineProperty");
|
|
function uee(e) {
|
|
var t = lee(e, "string");
|
|
return typeof t == "symbol" ? t : String(t);
|
|
}
|
|
s(uee, "_toPropertyKey");
|
|
function lee(e, t) {
|
|
if (typeof e != "object" || e === null) return e;
|
|
var r = e[Symbol.toPrimitive];
|
|
if (r !== void 0) {
|
|
var i = r.call(e, t || "default");
|
|
if (typeof i != "object") return i;
|
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
}
|
|
return (t === "string" ? String : Number)(e);
|
|
}
|
|
s(lee, "_toPrimitive");
|
|
var cee = Da().codes.ERR_INVALID_ARG_TYPE;
|
|
function fee(e, t, r) {
|
|
var i;
|
|
if (t && typeof t.next == "function")
|
|
i = t;
|
|
else if (t && t[Symbol.asyncIterator]) i = t[Symbol.asyncIterator]();
|
|
else if (t && t[Symbol.iterator]) i = t[Symbol.iterator]();
|
|
else throw new cee("iterable", ["Iterable"], t);
|
|
var n = new e(aee({
|
|
objectMode: !0
|
|
}, r)), a = !1;
|
|
n._read = function() {
|
|
a || (a = !0, o());
|
|
};
|
|
function o() {
|
|
return u.apply(this, arguments);
|
|
}
|
|
s(o, "next");
|
|
function u() {
|
|
return u = see(function* () {
|
|
try {
|
|
var l = yield i.next(), c = l.value, f = l.done;
|
|
f ? n.push(null) : n.push(yield c) ? o() : a = !1;
|
|
} catch (m) {
|
|
n.destroy(m);
|
|
}
|
|
}), u.apply(this, arguments);
|
|
}
|
|
return s(u, "_next2"), n;
|
|
}
|
|
s(fee, "from");
|
|
Rk.exports = fee;
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/_stream_readable.js
|
|
var Tv = E((xet, Gk) => {
|
|
"use strict";
|
|
Gk.exports = bt;
|
|
var Xu;
|
|
bt.ReadableState = Wk;
|
|
var Eet = V("events").EventEmitter, Uk = /* @__PURE__ */ s(function(t, r) {
|
|
return t.listeners(r).length;
|
|
}, "EElistenerCount"), nf = fv(), wh = V("buffer").Buffer, dee = (typeof global < "u" ? global : typeof window < "u" ? window : typeof self <
|
|
"u" ? self : {}).Uint8Array || function() {
|
|
};
|
|
function pee(e) {
|
|
return wh.from(e);
|
|
}
|
|
s(pee, "_uint8ArrayToBuffer");
|
|
function hee(e) {
|
|
return wh.isBuffer(e) || e instanceof dee;
|
|
}
|
|
s(hee, "_isUint8Array");
|
|
var wv = V("util"), st;
|
|
wv && wv.debuglog ? st = wv.debuglog("stream") : st = /* @__PURE__ */ s(function() {
|
|
}, "debug");
|
|
var mee = pk(), kv = hv(), yee = mv(), gee = yee.getHighWaterMark, Ah = Da().codes, bee = Ah.ERR_INVALID_ARG_TYPE, Dee = Ah.ERR_STREAM_PUSH_AFTER_EOF,
|
|
vee = Ah.ERR_METHOD_NOT_IMPLEMENTED, Eee = Ah.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, Yu, Av, _v;
|
|
Lt()(bt, nf);
|
|
var rf = kv.errorOrDestroy, Pv = ["error", "close", "destroy", "pause", "resume"];
|
|
function xee(e, t, r) {
|
|
if (typeof e.prependListener == "function") return e.prependListener(t, r);
|
|
!e._events || !e._events[t] ? e.on(t, r) : Array.isArray(e._events[t]) ? e._events[t].unshift(r) : e._events[t] = [r, e._events[t]];
|
|
}
|
|
s(xee, "prependListener");
|
|
function Wk(e, t, r) {
|
|
Xu = Xu || vo(), e = e || {}, typeof r != "boolean" && (r = t instanceof Xu), this.objectMode = !!e.objectMode, r && (this.objectMode = this.
|
|
objectMode || !!e.readableObjectMode), this.highWaterMark = gee(this, e, "readableHighWaterMark", r), this.buffer = new mee(), this.length =
|
|
0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0,
|
|
this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose =
|
|
e.emitClose !== !1, this.autoDestroy = !!e.autoDestroy, this.destroyed = !1, this.defaultEncoding = e.defaultEncoding || "utf8", this.awaitDrain =
|
|
0, this.readingMore = !1, this.decoder = null, this.encoding = null, e.encoding && (Yu || (Yu = V("string_decoder/").StringDecoder), this.
|
|
decoder = new Yu(e.encoding), this.encoding = e.encoding);
|
|
}
|
|
s(Wk, "ReadableState");
|
|
function bt(e) {
|
|
if (Xu = Xu || vo(), !(this instanceof bt)) return new bt(e);
|
|
var t = this instanceof Xu;
|
|
this._readableState = new Wk(e, this, t), this.readable = !0, e && (typeof e.read == "function" && (this._read = e.read), typeof e.destroy ==
|
|
"function" && (this._destroy = e.destroy)), nf.call(this);
|
|
}
|
|
s(bt, "Readable");
|
|
Object.defineProperty(bt.prototype, "destroyed", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState === void 0 ? !1 : this._readableState.destroyed;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(t) {
|
|
this._readableState && (this._readableState.destroyed = t);
|
|
}, "set")
|
|
});
|
|
bt.prototype.destroy = kv.destroy;
|
|
bt.prototype._undestroy = kv.undestroy;
|
|
bt.prototype._destroy = function(e, t) {
|
|
t(e);
|
|
};
|
|
bt.prototype.push = function(e, t) {
|
|
var r = this._readableState, i;
|
|
return r.objectMode ? i = !0 : typeof e == "string" && (t = t || r.defaultEncoding, t !== r.encoding && (e = wh.from(e, t), t = ""), i =
|
|
!0), $k(this, e, t, !1, i);
|
|
};
|
|
bt.prototype.unshift = function(e) {
|
|
return $k(this, e, null, !0, !1);
|
|
};
|
|
function $k(e, t, r, i, n) {
|
|
st("readableAddChunk", t);
|
|
var a = e._readableState;
|
|
if (t === null)
|
|
a.reading = !1, Cee(e, a);
|
|
else {
|
|
var o;
|
|
if (n || (o = See(a, t)), o)
|
|
rf(e, o);
|
|
else if (a.objectMode || t && t.length > 0)
|
|
if (typeof t != "string" && !a.objectMode && Object.getPrototypeOf(t) !== wh.prototype && (t = pee(t)), i)
|
|
a.endEmitted ? rf(e, new Eee()) : Fv(e, a, t, !0);
|
|
else if (a.ended)
|
|
rf(e, new Dee());
|
|
else {
|
|
if (a.destroyed)
|
|
return !1;
|
|
a.reading = !1, a.decoder && !r ? (t = a.decoder.write(t), a.objectMode || t.length !== 0 ? Fv(e, a, t, !1) : Ov(e, a)) : Fv(e, a,
|
|
t, !1);
|
|
}
|
|
else i || (a.reading = !1, Ov(e, a));
|
|
}
|
|
return !a.ended && (a.length < a.highWaterMark || a.length === 0);
|
|
}
|
|
s($k, "readableAddChunk");
|
|
function Fv(e, t, r, i) {
|
|
t.flowing && t.length === 0 && !t.sync ? (t.awaitDrain = 0, e.emit("data", r)) : (t.length += t.objectMode ? 1 : r.length, i ? t.buffer.
|
|
unshift(r) : t.buffer.push(r), t.needReadable && _h(e)), Ov(e, t);
|
|
}
|
|
s(Fv, "addChunk");
|
|
function See(e, t) {
|
|
var r;
|
|
return !hee(t) && typeof t != "string" && t !== void 0 && !e.objectMode && (r = new bee("chunk", ["string", "Buffer", "Uint8Array"], t)),
|
|
r;
|
|
}
|
|
s(See, "chunkInvalid");
|
|
bt.prototype.isPaused = function() {
|
|
return this._readableState.flowing === !1;
|
|
};
|
|
bt.prototype.setEncoding = function(e) {
|
|
Yu || (Yu = V("string_decoder/").StringDecoder);
|
|
var t = new Yu(e);
|
|
this._readableState.decoder = t, this._readableState.encoding = this._readableState.decoder.encoding;
|
|
for (var r = this._readableState.buffer.head, i = ""; r !== null; )
|
|
i += t.write(r.data), r = r.next;
|
|
return this._readableState.buffer.clear(), i !== "" && this._readableState.buffer.push(i), this._readableState.length = i.length, this;
|
|
};
|
|
var Lk = 1073741824;
|
|
function Tee(e) {
|
|
return e >= Lk ? e = Lk : (e--, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e++), e;
|
|
}
|
|
s(Tee, "computeNewHighWaterMark");
|
|
function qk(e, t) {
|
|
return e <= 0 || t.length === 0 && t.ended ? 0 : t.objectMode ? 1 : e !== e ? t.flowing && t.length ? t.buffer.head.data.length : t.length :
|
|
(e > t.highWaterMark && (t.highWaterMark = Tee(e)), e <= t.length ? e : t.ended ? t.length : (t.needReadable = !0, 0));
|
|
}
|
|
s(qk, "howMuchToRead");
|
|
bt.prototype.read = function(e) {
|
|
st("read", e), e = parseInt(e, 10);
|
|
var t = this._readableState, r = e;
|
|
if (e !== 0 && (t.emittedReadable = !1), e === 0 && t.needReadable && ((t.highWaterMark !== 0 ? t.length >= t.highWaterMark : t.length >
|
|
0) || t.ended))
|
|
return st("read: emitReadable", t.length, t.ended), t.length === 0 && t.ended ? Iv(this) : _h(this), null;
|
|
if (e = qk(e, t), e === 0 && t.ended)
|
|
return t.length === 0 && Iv(this), null;
|
|
var i = t.needReadable;
|
|
st("need readable", i), (t.length === 0 || t.length - e < t.highWaterMark) && (i = !0, st("length less than watermark", i)), t.ended || t.
|
|
reading ? (i = !1, st("reading or ended", i)) : i && (st("do read"), t.reading = !0, t.sync = !0, t.length === 0 && (t.needReadable = !0),
|
|
this._read(t.highWaterMark), t.sync = !1, t.reading || (e = qk(r, t)));
|
|
var n;
|
|
return e > 0 ? n = Kk(e, t) : n = null, n === null ? (t.needReadable = t.length <= t.highWaterMark, e = 0) : (t.length -= e, t.awaitDrain =
|
|
0), t.length === 0 && (t.ended || (t.needReadable = !0), r !== e && t.ended && Iv(this)), n !== null && this.emit("data", n), n;
|
|
};
|
|
function Cee(e, t) {
|
|
if (st("onEofChunk"), !t.ended) {
|
|
if (t.decoder) {
|
|
var r = t.decoder.end();
|
|
r && r.length && (t.buffer.push(r), t.length += t.objectMode ? 1 : r.length);
|
|
}
|
|
t.ended = !0, t.sync ? _h(e) : (t.needReadable = !1, t.emittedReadable || (t.emittedReadable = !0, Vk(e)));
|
|
}
|
|
}
|
|
s(Cee, "onEofChunk");
|
|
function _h(e) {
|
|
var t = e._readableState;
|
|
st("emitReadable", t.needReadable, t.emittedReadable), t.needReadable = !1, t.emittedReadable || (st("emitReadable", t.flowing), t.emittedReadable =
|
|
!0, process.nextTick(Vk, e));
|
|
}
|
|
s(_h, "emitReadable");
|
|
function Vk(e) {
|
|
var t = e._readableState;
|
|
st("emitReadable_", t.destroyed, t.length, t.ended), !t.destroyed && (t.length || t.ended) && (e.emit("readable"), t.emittedReadable = !1),
|
|
t.needReadable = !t.flowing && !t.ended && t.length <= t.highWaterMark, Bv(e);
|
|
}
|
|
s(Vk, "emitReadable_");
|
|
function Ov(e, t) {
|
|
t.readingMore || (t.readingMore = !0, process.nextTick(wee, e, t));
|
|
}
|
|
s(Ov, "maybeReadMore");
|
|
function wee(e, t) {
|
|
for (; !t.reading && !t.ended && (t.length < t.highWaterMark || t.flowing && t.length === 0); ) {
|
|
var r = t.length;
|
|
if (st("maybeReadMore read 0"), e.read(0), r === t.length)
|
|
break;
|
|
}
|
|
t.readingMore = !1;
|
|
}
|
|
s(wee, "maybeReadMore_");
|
|
bt.prototype._read = function(e) {
|
|
rf(this, new vee("_read()"));
|
|
};
|
|
bt.prototype.pipe = function(e, t) {
|
|
var r = this, i = this._readableState;
|
|
switch (i.pipesCount) {
|
|
case 0:
|
|
i.pipes = e;
|
|
break;
|
|
case 1:
|
|
i.pipes = [i.pipes, e];
|
|
break;
|
|
default:
|
|
i.pipes.push(e);
|
|
break;
|
|
}
|
|
i.pipesCount += 1, st("pipe count=%d opts=%j", i.pipesCount, t);
|
|
var n = (!t || t.end !== !1) && e !== process.stdout && e !== process.stderr, a = n ? u : p;
|
|
i.endEmitted ? process.nextTick(a) : r.once("end", a), e.on("unpipe", o);
|
|
function o(g, b) {
|
|
st("onunpipe"), g === r && b && b.hasUnpiped === !1 && (b.hasUnpiped = !0, f());
|
|
}
|
|
s(o, "onunpipe");
|
|
function u() {
|
|
st("onend"), e.end();
|
|
}
|
|
s(u, "onend");
|
|
var l = Aee(r);
|
|
e.on("drain", l);
|
|
var c = !1;
|
|
function f() {
|
|
st("cleanup"), e.removeListener("close", d), e.removeListener("finish", y), e.removeListener("drain", l), e.removeListener("error", h),
|
|
e.removeListener("unpipe", o), r.removeListener("end", u), r.removeListener("end", p), r.removeListener("data", m), c = !0, i.awaitDrain &&
|
|
(!e._writableState || e._writableState.needDrain) && l();
|
|
}
|
|
s(f, "cleanup"), r.on("data", m);
|
|
function m(g) {
|
|
st("ondata");
|
|
var b = e.write(g);
|
|
st("dest.write", b), b === !1 && ((i.pipesCount === 1 && i.pipes === e || i.pipesCount > 1 && zk(i.pipes, e) !== -1) && !c && (st("fal\
|
|
se write response, pause", i.awaitDrain), i.awaitDrain++), r.pause());
|
|
}
|
|
s(m, "ondata");
|
|
function h(g) {
|
|
st("onerror", g), p(), e.removeListener("error", h), Uk(e, "error") === 0 && rf(e, g);
|
|
}
|
|
s(h, "onerror"), xee(e, "error", h);
|
|
function d() {
|
|
e.removeListener("finish", y), p();
|
|
}
|
|
s(d, "onclose"), e.once("close", d);
|
|
function y() {
|
|
st("onfinish"), e.removeListener("close", d), p();
|
|
}
|
|
s(y, "onfinish"), e.once("finish", y);
|
|
function p() {
|
|
st("unpipe"), r.unpipe(e);
|
|
}
|
|
return s(p, "unpipe"), e.emit("pipe", r), i.flowing || (st("pipe resume"), r.resume()), e;
|
|
};
|
|
function Aee(e) {
|
|
return /* @__PURE__ */ s(function() {
|
|
var r = e._readableState;
|
|
st("pipeOnDrain", r.awaitDrain), r.awaitDrain && r.awaitDrain--, r.awaitDrain === 0 && Uk(e, "data") && (r.flowing = !0, Bv(e));
|
|
}, "pipeOnDrainFunctionResult");
|
|
}
|
|
s(Aee, "pipeOnDrain");
|
|
bt.prototype.unpipe = function(e) {
|
|
var t = this._readableState, r = {
|
|
hasUnpiped: !1
|
|
};
|
|
if (t.pipesCount === 0) return this;
|
|
if (t.pipesCount === 1)
|
|
return e && e !== t.pipes ? this : (e || (e = t.pipes), t.pipes = null, t.pipesCount = 0, t.flowing = !1, e && e.emit("unpipe", this, r),
|
|
this);
|
|
if (!e) {
|
|
var i = t.pipes, n = t.pipesCount;
|
|
t.pipes = null, t.pipesCount = 0, t.flowing = !1;
|
|
for (var a = 0; a < n; a++) i[a].emit("unpipe", this, {
|
|
hasUnpiped: !1
|
|
});
|
|
return this;
|
|
}
|
|
var o = zk(t.pipes, e);
|
|
return o === -1 ? this : (t.pipes.splice(o, 1), t.pipesCount -= 1, t.pipesCount === 1 && (t.pipes = t.pipes[0]), e.emit("unpipe", this, r),
|
|
this);
|
|
};
|
|
bt.prototype.on = function(e, t) {
|
|
var r = nf.prototype.on.call(this, e, t), i = this._readableState;
|
|
return e === "data" ? (i.readableListening = this.listenerCount("readable") > 0, i.flowing !== !1 && this.resume()) : e === "readable" &&
|
|
!i.endEmitted && !i.readableListening && (i.readableListening = i.needReadable = !0, i.flowing = !1, i.emittedReadable = !1, st("on read\
|
|
able", i.length, i.reading), i.length ? _h(this) : i.reading || process.nextTick(_ee, this)), r;
|
|
};
|
|
bt.prototype.addListener = bt.prototype.on;
|
|
bt.prototype.removeListener = function(e, t) {
|
|
var r = nf.prototype.removeListener.call(this, e, t);
|
|
return e === "readable" && process.nextTick(Hk, this), r;
|
|
};
|
|
bt.prototype.removeAllListeners = function(e) {
|
|
var t = nf.prototype.removeAllListeners.apply(this, arguments);
|
|
return (e === "readable" || e === void 0) && process.nextTick(Hk, this), t;
|
|
};
|
|
function Hk(e) {
|
|
var t = e._readableState;
|
|
t.readableListening = e.listenerCount("readable") > 0, t.resumeScheduled && !t.paused ? t.flowing = !0 : e.listenerCount("data") > 0 && e.
|
|
resume();
|
|
}
|
|
s(Hk, "updateReadableListening");
|
|
function _ee(e) {
|
|
st("readable nexttick read 0"), e.read(0);
|
|
}
|
|
s(_ee, "nReadingNextTick");
|
|
bt.prototype.resume = function() {
|
|
var e = this._readableState;
|
|
return e.flowing || (st("resume"), e.flowing = !e.readableListening, Pee(this, e)), e.paused = !1, this;
|
|
};
|
|
function Pee(e, t) {
|
|
t.resumeScheduled || (t.resumeScheduled = !0, process.nextTick(Fee, e, t));
|
|
}
|
|
s(Pee, "resume");
|
|
function Fee(e, t) {
|
|
st("resume", t.reading), t.reading || e.read(0), t.resumeScheduled = !1, e.emit("resume"), Bv(e), t.flowing && !t.reading && e.read(0);
|
|
}
|
|
s(Fee, "resume_");
|
|
bt.prototype.pause = function() {
|
|
return st("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (st("pause"), this._readableState.
|
|
flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
|
|
};
|
|
function Bv(e) {
|
|
var t = e._readableState;
|
|
for (st("flow", t.flowing); t.flowing && e.read() !== null; ) ;
|
|
}
|
|
s(Bv, "flow");
|
|
bt.prototype.wrap = function(e) {
|
|
var t = this, r = this._readableState, i = !1;
|
|
e.on("end", function() {
|
|
if (st("wrapped end"), r.decoder && !r.ended) {
|
|
var o = r.decoder.end();
|
|
o && o.length && t.push(o);
|
|
}
|
|
t.push(null);
|
|
}), e.on("data", function(o) {
|
|
if (st("wrapped data"), r.decoder && (o = r.decoder.write(o)), !(r.objectMode && o == null) && !(!r.objectMode && (!o || !o.length))) {
|
|
var u = t.push(o);
|
|
u || (i = !0, e.pause());
|
|
}
|
|
});
|
|
for (var n in e)
|
|
this[n] === void 0 && typeof e[n] == "function" && (this[n] = (/* @__PURE__ */ s(function(u) {
|
|
return /* @__PURE__ */ s(function() {
|
|
return e[u].apply(e, arguments);
|
|
}, "methodWrapReturnFunction");
|
|
}, "methodWrap"))(n));
|
|
for (var a = 0; a < Pv.length; a++)
|
|
e.on(Pv[a], this.emit.bind(this, Pv[a]));
|
|
return this._read = function(o) {
|
|
st("wrapped _read", o), i && (i = !1, e.resume());
|
|
}, this;
|
|
};
|
|
typeof Symbol == "function" && (bt.prototype[Symbol.asyncIterator] = function() {
|
|
return Av === void 0 && (Av = Bk()), Av(this);
|
|
});
|
|
Object.defineProperty(bt.prototype, "readableHighWaterMark", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState.highWaterMark;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(bt.prototype, "readableBuffer", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState && this._readableState.buffer;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(bt.prototype, "readableFlowing", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState.flowing;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(t) {
|
|
this._readableState && (this._readableState.flowing = t);
|
|
}, "set")
|
|
});
|
|
bt._fromList = Kk;
|
|
Object.defineProperty(bt.prototype, "readableLength", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState.length;
|
|
}, "get")
|
|
});
|
|
function Kk(e, t) {
|
|
if (t.length === 0) return null;
|
|
var r;
|
|
return t.objectMode ? r = t.buffer.shift() : !e || e >= t.length ? (t.decoder ? r = t.buffer.join("") : t.buffer.length === 1 ? r = t.buffer.
|
|
first() : r = t.buffer.concat(t.length), t.buffer.clear()) : r = t.buffer.consume(e, t.decoder), r;
|
|
}
|
|
s(Kk, "fromList");
|
|
function Iv(e) {
|
|
var t = e._readableState;
|
|
st("endReadable", t.endEmitted), t.endEmitted || (t.ended = !0, process.nextTick(Iee, t, e));
|
|
}
|
|
s(Iv, "endReadable");
|
|
function Iee(e, t) {
|
|
if (st("endReadableNT", e.endEmitted, e.length), !e.endEmitted && e.length === 0 && (e.endEmitted = !0, t.readable = !1, t.emit("end"), e.
|
|
autoDestroy)) {
|
|
var r = t._writableState;
|
|
(!r || r.autoDestroy && r.finished) && t.destroy();
|
|
}
|
|
}
|
|
s(Iee, "endReadableNT");
|
|
typeof Symbol == "function" && (bt.from = function(e, t) {
|
|
return _v === void 0 && (_v = jk()), _v(bt, e, t);
|
|
});
|
|
function zk(e, t) {
|
|
for (var r = 0, i = e.length; r < i; r++)
|
|
if (e[r] === t) return r;
|
|
return -1;
|
|
}
|
|
s(zk, "indexOf");
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/_stream_transform.js
|
|
var Nv = E((Cet, Xk) => {
|
|
"use strict";
|
|
Xk.exports = Ss;
|
|
var Ph = Da().codes, Oee = Ph.ERR_METHOD_NOT_IMPLEMENTED, kee = Ph.ERR_MULTIPLE_CALLBACK, Bee = Ph.ERR_TRANSFORM_ALREADY_TRANSFORMING, Nee = Ph.
|
|
ERR_TRANSFORM_WITH_LENGTH_0, Fh = vo();
|
|
Lt()(Ss, Fh);
|
|
function Mee(e, t) {
|
|
var r = this._transformState;
|
|
r.transforming = !1;
|
|
var i = r.writecb;
|
|
if (i === null)
|
|
return this.emit("error", new kee());
|
|
r.writechunk = null, r.writecb = null, t != null && this.push(t), i(e);
|
|
var n = this._readableState;
|
|
n.reading = !1, (n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark);
|
|
}
|
|
s(Mee, "afterTransform");
|
|
function Ss(e) {
|
|
if (!(this instanceof Ss)) return new Ss(e);
|
|
Fh.call(this, e), this._transformState = {
|
|
afterTransform: Mee.bind(this),
|
|
needTransform: !1,
|
|
transforming: !1,
|
|
writecb: null,
|
|
writechunk: null,
|
|
writeencoding: null
|
|
}, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.
|
|
transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish", Ree);
|
|
}
|
|
s(Ss, "Transform");
|
|
function Ree() {
|
|
var e = this;
|
|
typeof this._flush == "function" && !this._readableState.destroyed ? this._flush(function(t, r) {
|
|
Jk(e, t, r);
|
|
}) : Jk(this, null, null);
|
|
}
|
|
s(Ree, "prefinish");
|
|
Ss.prototype.push = function(e, t) {
|
|
return this._transformState.needTransform = !1, Fh.prototype.push.call(this, e, t);
|
|
};
|
|
Ss.prototype._transform = function(e, t, r) {
|
|
r(new Oee("_transform()"));
|
|
};
|
|
Ss.prototype._write = function(e, t, r) {
|
|
var i = this._transformState;
|
|
if (i.writecb = r, i.writechunk = e, i.writeencoding = t, !i.transforming) {
|
|
var n = this._readableState;
|
|
(i.needTransform || n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark);
|
|
}
|
|
};
|
|
Ss.prototype._read = function(e) {
|
|
var t = this._transformState;
|
|
t.writechunk !== null && !t.transforming ? (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)) : t.needTransform =
|
|
!0;
|
|
};
|
|
Ss.prototype._destroy = function(e, t) {
|
|
Fh.prototype._destroy.call(this, e, function(r) {
|
|
t(r);
|
|
});
|
|
};
|
|
function Jk(e, t, r) {
|
|
if (t) return e.emit("error", t);
|
|
if (r != null && e.push(r), e._writableState.length) throw new Nee();
|
|
if (e._transformState.transforming) throw new Bee();
|
|
return e.push(null);
|
|
}
|
|
s(Jk, "done");
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/_stream_passthrough.js
|
|
var Qk = E((Aet, Zk) => {
|
|
"use strict";
|
|
Zk.exports = sf;
|
|
var Yk = Nv();
|
|
Lt()(sf, Yk);
|
|
function sf(e) {
|
|
if (!(this instanceof sf)) return new sf(e);
|
|
Yk.call(this, e);
|
|
}
|
|
s(sf, "PassThrough");
|
|
sf.prototype._transform = function(e, t, r) {
|
|
r(null, e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/readable-stream/lib/internal/streams/pipeline.js
|
|
var nB = E((Pet, iB) => {
|
|
"use strict";
|
|
var Mv;
|
|
function jee(e) {
|
|
var t = !1;
|
|
return function() {
|
|
t || (t = !0, e.apply(void 0, arguments));
|
|
};
|
|
}
|
|
s(jee, "once");
|
|
var rB = Da().codes, Lee = rB.ERR_MISSING_ARGS, qee = rB.ERR_STREAM_DESTROYED;
|
|
function eB(e) {
|
|
if (e) throw e;
|
|
}
|
|
s(eB, "noop");
|
|
function Uee(e) {
|
|
return e.setHeader && typeof e.abort == "function";
|
|
}
|
|
s(Uee, "isRequest");
|
|
function Wee(e, t, r, i) {
|
|
i = jee(i);
|
|
var n = !1;
|
|
e.on("close", function() {
|
|
n = !0;
|
|
}), Mv === void 0 && (Mv = Sh()), Mv(e, {
|
|
readable: t,
|
|
writable: r
|
|
}, function(o) {
|
|
if (o) return i(o);
|
|
n = !0, i();
|
|
});
|
|
var a = !1;
|
|
return function(o) {
|
|
if (!n && !a) {
|
|
if (a = !0, Uee(e)) return e.abort();
|
|
if (typeof e.destroy == "function") return e.destroy();
|
|
i(o || new qee("pipe"));
|
|
}
|
|
};
|
|
}
|
|
s(Wee, "destroyer");
|
|
function tB(e) {
|
|
e();
|
|
}
|
|
s(tB, "call");
|
|
function $ee(e, t) {
|
|
return e.pipe(t);
|
|
}
|
|
s($ee, "pipe");
|
|
function Vee(e) {
|
|
return !e.length || typeof e[e.length - 1] != "function" ? eB : e.pop();
|
|
}
|
|
s(Vee, "popCallback");
|
|
function Hee() {
|
|
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
t[r] = arguments[r];
|
|
var i = Vee(t);
|
|
if (Array.isArray(t[0]) && (t = t[0]), t.length < 2)
|
|
throw new Lee("streams");
|
|
var n, a = t.map(function(o, u) {
|
|
var l = u < t.length - 1, c = u > 0;
|
|
return Wee(o, l, c, function(f) {
|
|
n || (n = f), f && a.forEach(tB), !l && (a.forEach(tB), i(n));
|
|
});
|
|
});
|
|
return t.reduce($ee);
|
|
}
|
|
s(Hee, "pipeline");
|
|
iB.exports = Hee;
|
|
});
|
|
|
|
// ../node_modules/readable-stream/readable.js
|
|
var Zu = E((Ki, of) => {
|
|
var af = V("stream");
|
|
process.env.READABLE_STREAM === "disable" && af ? (of.exports = af.Readable, Object.assign(of.exports, af), of.exports.Stream = af) : (Ki =
|
|
of.exports = Tv(), Ki.Stream = af || Ki, Ki.Readable = Ki, Ki.Writable = Ev(), Ki.Duplex = vo(), Ki.Transform = Nv(), Ki.PassThrough = Qk(),
|
|
Ki.finished = Sh(), Ki.pipeline = nB());
|
|
});
|
|
|
|
// ../node_modules/bl/BufferList.js
|
|
var oB = E((Iet, aB) => {
|
|
"use strict";
|
|
var { Buffer: vn } = V("buffer"), sB = Symbol.for("BufferList");
|
|
function qt(e) {
|
|
if (!(this instanceof qt))
|
|
return new qt(e);
|
|
qt._init.call(this, e);
|
|
}
|
|
s(qt, "BufferList");
|
|
qt._init = /* @__PURE__ */ s(function(t) {
|
|
Object.defineProperty(this, sB, { value: !0 }), this._bufs = [], this.length = 0, t && this.append(t);
|
|
}, "_init");
|
|
qt.prototype._new = /* @__PURE__ */ s(function(t) {
|
|
return new qt(t);
|
|
}, "_new");
|
|
qt.prototype._offset = /* @__PURE__ */ s(function(t) {
|
|
if (t === 0)
|
|
return [0, 0];
|
|
let r = 0;
|
|
for (let i = 0; i < this._bufs.length; i++) {
|
|
let n = r + this._bufs[i].length;
|
|
if (t < n || i === this._bufs.length - 1)
|
|
return [i, t - r];
|
|
r = n;
|
|
}
|
|
}, "_offset");
|
|
qt.prototype._reverseOffset = function(e) {
|
|
let t = e[0], r = e[1];
|
|
for (let i = 0; i < t; i++)
|
|
r += this._bufs[i].length;
|
|
return r;
|
|
};
|
|
qt.prototype.get = /* @__PURE__ */ s(function(t) {
|
|
if (t > this.length || t < 0)
|
|
return;
|
|
let r = this._offset(t);
|
|
return this._bufs[r[0]][r[1]];
|
|
}, "get");
|
|
qt.prototype.slice = /* @__PURE__ */ s(function(t, r) {
|
|
return typeof t == "number" && t < 0 && (t += this.length), typeof r == "number" && r < 0 && (r += this.length), this.copy(null, 0, t, r);
|
|
}, "slice");
|
|
qt.prototype.copy = /* @__PURE__ */ s(function(t, r, i, n) {
|
|
if ((typeof i != "number" || i < 0) && (i = 0), (typeof n != "number" || n > this.length) && (n = this.length), i >= this.length || n <=
|
|
0)
|
|
return t || vn.alloc(0);
|
|
let a = !!t, o = this._offset(i), u = n - i, l = u, c = a && r || 0, f = o[1];
|
|
if (i === 0 && n === this.length) {
|
|
if (!a)
|
|
return this._bufs.length === 1 ? this._bufs[0] : vn.concat(this._bufs, this.length);
|
|
for (let m = 0; m < this._bufs.length; m++)
|
|
this._bufs[m].copy(t, c), c += this._bufs[m].length;
|
|
return t;
|
|
}
|
|
if (l <= this._bufs[o[0]].length - f)
|
|
return a ? this._bufs[o[0]].copy(t, r, f, f + l) : this._bufs[o[0]].slice(f, f + l);
|
|
a || (t = vn.allocUnsafe(u));
|
|
for (let m = o[0]; m < this._bufs.length; m++) {
|
|
let h = this._bufs[m].length - f;
|
|
if (l > h)
|
|
this._bufs[m].copy(t, c, f), c += h;
|
|
else {
|
|
this._bufs[m].copy(t, c, f, f + l), c += h;
|
|
break;
|
|
}
|
|
l -= h, f && (f = 0);
|
|
}
|
|
return t.length > c ? t.slice(0, c) : t;
|
|
}, "copy");
|
|
qt.prototype.shallowSlice = /* @__PURE__ */ s(function(t, r) {
|
|
if (t = t || 0, r = typeof r != "number" ? this.length : r, t < 0 && (t += this.length), r < 0 && (r += this.length), t === r)
|
|
return this._new();
|
|
let i = this._offset(t), n = this._offset(r), a = this._bufs.slice(i[0], n[0] + 1);
|
|
return n[1] === 0 ? a.pop() : a[a.length - 1] = a[a.length - 1].slice(0, n[1]), i[1] !== 0 && (a[0] = a[0].slice(i[1])), this._new(a);
|
|
}, "shallowSlice");
|
|
qt.prototype.toString = /* @__PURE__ */ s(function(t, r, i) {
|
|
return this.slice(r, i).toString(t);
|
|
}, "toString");
|
|
qt.prototype.consume = /* @__PURE__ */ s(function(t) {
|
|
if (t = Math.trunc(t), Number.isNaN(t) || t <= 0) return this;
|
|
for (; this._bufs.length; )
|
|
if (t >= this._bufs[0].length)
|
|
t -= this._bufs[0].length, this.length -= this._bufs[0].length, this._bufs.shift();
|
|
else {
|
|
this._bufs[0] = this._bufs[0].slice(t), this.length -= t;
|
|
break;
|
|
}
|
|
return this;
|
|
}, "consume");
|
|
qt.prototype.duplicate = /* @__PURE__ */ s(function() {
|
|
let t = this._new();
|
|
for (let r = 0; r < this._bufs.length; r++)
|
|
t.append(this._bufs[r]);
|
|
return t;
|
|
}, "duplicate");
|
|
qt.prototype.append = /* @__PURE__ */ s(function(t) {
|
|
if (t == null)
|
|
return this;
|
|
if (t.buffer)
|
|
this._appendBuffer(vn.from(t.buffer, t.byteOffset, t.byteLength));
|
|
else if (Array.isArray(t))
|
|
for (let r = 0; r < t.length; r++)
|
|
this.append(t[r]);
|
|
else if (this._isBufferList(t))
|
|
for (let r = 0; r < t._bufs.length; r++)
|
|
this.append(t._bufs[r]);
|
|
else
|
|
typeof t == "number" && (t = t.toString()), this._appendBuffer(vn.from(t));
|
|
return this;
|
|
}, "append");
|
|
qt.prototype._appendBuffer = /* @__PURE__ */ s(function(t) {
|
|
this._bufs.push(t), this.length += t.length;
|
|
}, "appendBuffer");
|
|
qt.prototype.indexOf = function(e, t, r) {
|
|
if (r === void 0 && typeof t == "string" && (r = t, t = void 0), typeof e == "function" || Array.isArray(e))
|
|
throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');
|
|
if (typeof e == "number" ? e = vn.from([e]) : typeof e == "string" ? e = vn.from(e, r) : this._isBufferList(e) ? e = e.slice() : Array.isArray(
|
|
e.buffer) ? e = vn.from(e.buffer, e.byteOffset, e.byteLength) : vn.isBuffer(e) || (e = vn.from(e)), t = Number(t || 0), isNaN(t) && (t =
|
|
0), t < 0 && (t = this.length + t), t < 0 && (t = 0), e.length === 0)
|
|
return t > this.length ? this.length : t;
|
|
let i = this._offset(t), n = i[0], a = i[1];
|
|
for (; n < this._bufs.length; n++) {
|
|
let o = this._bufs[n];
|
|
for (; a < o.length; )
|
|
if (o.length - a >= e.length) {
|
|
let l = o.indexOf(e, a);
|
|
if (l !== -1)
|
|
return this._reverseOffset([n, l]);
|
|
a = o.length - e.length + 1;
|
|
} else {
|
|
let l = this._reverseOffset([n, a]);
|
|
if (this._match(l, e))
|
|
return l;
|
|
a++;
|
|
}
|
|
a = 0;
|
|
}
|
|
return -1;
|
|
};
|
|
qt.prototype._match = function(e, t) {
|
|
if (this.length - e < t.length)
|
|
return !1;
|
|
for (let r = 0; r < t.length; r++)
|
|
if (this.get(e + r) !== t[r])
|
|
return !1;
|
|
return !0;
|
|
};
|
|
(function() {
|
|
let e = {
|
|
readDoubleBE: 8,
|
|
readDoubleLE: 8,
|
|
readFloatBE: 4,
|
|
readFloatLE: 4,
|
|
readInt32BE: 4,
|
|
readInt32LE: 4,
|
|
readUInt32BE: 4,
|
|
readUInt32LE: 4,
|
|
readInt16BE: 2,
|
|
readInt16LE: 2,
|
|
readUInt16BE: 2,
|
|
readUInt16LE: 2,
|
|
readInt8: 1,
|
|
readUInt8: 1,
|
|
readIntBE: null,
|
|
readIntLE: null,
|
|
readUIntBE: null,
|
|
readUIntLE: null
|
|
};
|
|
for (let t in e)
|
|
(function(r) {
|
|
e[r] === null ? qt.prototype[r] = function(i, n) {
|
|
return this.slice(i, i + n)[r](0, n);
|
|
} : qt.prototype[r] = function(i = 0) {
|
|
return this.slice(i, i + e[r])[r](0);
|
|
};
|
|
})(t);
|
|
})();
|
|
qt.prototype._isBufferList = /* @__PURE__ */ s(function(t) {
|
|
return t instanceof qt || qt.isBufferList(t);
|
|
}, "_isBufferList");
|
|
qt.isBufferList = /* @__PURE__ */ s(function(t) {
|
|
return t != null && t[sB];
|
|
}, "isBufferList");
|
|
aB.exports = qt;
|
|
});
|
|
|
|
// ../node_modules/bl/bl.js
|
|
var uB = E((ket, Ih) => {
|
|
"use strict";
|
|
var Rv = Zu().Duplex, Kee = Lt(), uf = oB();
|
|
function Qr(e) {
|
|
if (!(this instanceof Qr))
|
|
return new Qr(e);
|
|
if (typeof e == "function") {
|
|
this._callback = e;
|
|
let t = (/* @__PURE__ */ s(function(i) {
|
|
this._callback && (this._callback(i), this._callback = null);
|
|
}, "piper")).bind(this);
|
|
this.on("pipe", /* @__PURE__ */ s(function(i) {
|
|
i.on("error", t);
|
|
}, "onPipe")), this.on("unpipe", /* @__PURE__ */ s(function(i) {
|
|
i.removeListener("error", t);
|
|
}, "onUnpipe")), e = null;
|
|
}
|
|
uf._init.call(this, e), Rv.call(this);
|
|
}
|
|
s(Qr, "BufferListStream");
|
|
Kee(Qr, Rv);
|
|
Object.assign(Qr.prototype, uf.prototype);
|
|
Qr.prototype._new = /* @__PURE__ */ s(function(t) {
|
|
return new Qr(t);
|
|
}, "_new");
|
|
Qr.prototype._write = /* @__PURE__ */ s(function(t, r, i) {
|
|
this._appendBuffer(t), typeof i == "function" && i();
|
|
}, "_write");
|
|
Qr.prototype._read = /* @__PURE__ */ s(function(t) {
|
|
if (!this.length)
|
|
return this.push(null);
|
|
t = Math.min(t, this.length), this.push(this.slice(0, t)), this.consume(t);
|
|
}, "_read");
|
|
Qr.prototype.end = /* @__PURE__ */ s(function(t) {
|
|
Rv.prototype.end.call(this, t), this._callback && (this._callback(null, this.slice()), this._callback = null);
|
|
}, "end");
|
|
Qr.prototype._destroy = /* @__PURE__ */ s(function(t, r) {
|
|
this._bufs.length = 0, this.length = 0, r(t);
|
|
}, "_destroy");
|
|
Qr.prototype._isBufferList = /* @__PURE__ */ s(function(t) {
|
|
return t instanceof Qr || t instanceof uf || Qr.isBufferList(t);
|
|
}, "_isBufferList");
|
|
Qr.isBufferList = uf.isBufferList;
|
|
Ih.exports = Qr;
|
|
Ih.exports.BufferListStream = Qr;
|
|
Ih.exports.BufferList = uf;
|
|
});
|
|
|
|
// ../node_modules/tar-stream/headers.js
|
|
var qv = E((el) => {
|
|
var zee = Buffer.alloc, Gee = "0000000000000000000", Jee = "7777777777777777777", lB = 48, cB = Buffer.from("ustar\0", "binary"), Xee = Buffer.
|
|
from("00", "binary"), Yee = Buffer.from("ustar ", "binary"), Zee = Buffer.from(" \0", "binary"), Qee = parseInt("7777", 8), lf = 257, Lv = 263,
|
|
ete = /* @__PURE__ */ s(function(e, t, r) {
|
|
return typeof e != "number" ? r : (e = ~~e, e >= t ? t : e >= 0 || (e += t, e >= 0) ? e : 0);
|
|
}, "clamp"), tte = /* @__PURE__ */ s(function(e) {
|
|
switch (e) {
|
|
case 0:
|
|
return "file";
|
|
case 1:
|
|
return "link";
|
|
case 2:
|
|
return "symlink";
|
|
case 3:
|
|
return "character-device";
|
|
case 4:
|
|
return "block-device";
|
|
case 5:
|
|
return "directory";
|
|
case 6:
|
|
return "fifo";
|
|
case 7:
|
|
return "contiguous-file";
|
|
case 72:
|
|
return "pax-header";
|
|
case 55:
|
|
return "pax-global-header";
|
|
case 27:
|
|
return "gnu-long-link-path";
|
|
case 28:
|
|
case 30:
|
|
return "gnu-long-path";
|
|
}
|
|
return null;
|
|
}, "toType"), rte = /* @__PURE__ */ s(function(e) {
|
|
switch (e) {
|
|
case "file":
|
|
return 0;
|
|
case "link":
|
|
return 1;
|
|
case "symlink":
|
|
return 2;
|
|
case "character-device":
|
|
return 3;
|
|
case "block-device":
|
|
return 4;
|
|
case "directory":
|
|
return 5;
|
|
case "fifo":
|
|
return 6;
|
|
case "contiguous-file":
|
|
return 7;
|
|
case "pax-header":
|
|
return 72;
|
|
}
|
|
return 0;
|
|
}, "toTypeflag"), fB = /* @__PURE__ */ s(function(e, t, r, i) {
|
|
for (; r < i; r++)
|
|
if (e[r] === t) return r;
|
|
return i;
|
|
}, "indexOf"), dB = /* @__PURE__ */ s(function(e) {
|
|
for (var t = 256, r = 0; r < 148; r++) t += e[r];
|
|
for (var i = 156; i < 512; i++) t += e[i];
|
|
return t;
|
|
}, "cksum"), Ta = /* @__PURE__ */ s(function(e, t) {
|
|
return e = e.toString(8), e.length > t ? Jee.slice(0, t) + " " : Gee.slice(0, t - e.length) + e + " ";
|
|
}, "encodeOct");
|
|
function ite(e) {
|
|
var t;
|
|
if (e[0] === 128) t = !0;
|
|
else if (e[0] === 255) t = !1;
|
|
else return null;
|
|
for (var r = [], i = e.length - 1; i > 0; i--) {
|
|
var n = e[i];
|
|
t ? r.push(n) : r.push(255 - n);
|
|
}
|
|
var a = 0, o = r.length;
|
|
for (i = 0; i < o; i++)
|
|
a += r[i] * Math.pow(256, i);
|
|
return t ? a : -1 * a;
|
|
}
|
|
s(ite, "parse256");
|
|
var Ca = /* @__PURE__ */ s(function(e, t, r) {
|
|
if (e = e.slice(t, t + r), t = 0, e[t] & 128)
|
|
return ite(e);
|
|
for (; t < e.length && e[t] === 32; ) t++;
|
|
for (var i = ete(fB(e, 32, t, e.length), e.length, e.length); t < i && e[t] === 0; ) t++;
|
|
return i === t ? 0 : parseInt(e.slice(t, i).toString(), 8);
|
|
}, "decodeOct"), Qu = /* @__PURE__ */ s(function(e, t, r, i) {
|
|
return e.slice(t, fB(e, 0, t, t + r)).toString(i);
|
|
}, "decodeStr"), jv = /* @__PURE__ */ s(function(e) {
|
|
var t = Buffer.byteLength(e), r = Math.floor(Math.log(t) / Math.log(10)) + 1;
|
|
return t + r >= Math.pow(10, r) && r++, t + r + e;
|
|
}, "addLength");
|
|
el.decodeLongPath = function(e, t) {
|
|
return Qu(e, 0, e.length, t);
|
|
};
|
|
el.encodePax = function(e) {
|
|
var t = "";
|
|
e.name && (t += jv(" path=" + e.name + `
|
|
`)), e.linkname && (t += jv(" linkpath=" + e.linkname + `
|
|
`));
|
|
var r = e.pax;
|
|
if (r)
|
|
for (var i in r)
|
|
t += jv(" " + i + "=" + r[i] + `
|
|
`);
|
|
return Buffer.from(t);
|
|
};
|
|
el.decodePax = function(e) {
|
|
for (var t = {}; e.length; ) {
|
|
for (var r = 0; r < e.length && e[r] !== 32; ) r++;
|
|
var i = parseInt(e.slice(0, r).toString(), 10);
|
|
if (!i) return t;
|
|
var n = e.slice(r + 1, i - 1).toString(), a = n.indexOf("=");
|
|
if (a === -1) return t;
|
|
t[n.slice(0, a)] = n.slice(a + 1), e = e.slice(i);
|
|
}
|
|
return t;
|
|
};
|
|
el.encode = function(e) {
|
|
var t = zee(512), r = e.name, i = "";
|
|
if (e.typeflag === 5 && r[r.length - 1] !== "/" && (r += "/"), Buffer.byteLength(r) !== r.length) return null;
|
|
for (; Buffer.byteLength(r) > 100; ) {
|
|
var n = r.indexOf("/");
|
|
if (n === -1) return null;
|
|
i += i ? "/" + r.slice(0, n) : r.slice(0, n), r = r.slice(n + 1);
|
|
}
|
|
return Buffer.byteLength(r) > 100 || Buffer.byteLength(i) > 155 || e.linkname && Buffer.byteLength(e.linkname) > 100 ? null : (t.write(r),
|
|
t.write(Ta(e.mode & Qee, 6), 100), t.write(Ta(e.uid, 6), 108), t.write(Ta(e.gid, 6), 116), t.write(Ta(e.size, 11), 124), t.write(Ta(e.mtime.
|
|
getTime() / 1e3 | 0, 11), 136), t[156] = lB + rte(e.type), e.linkname && t.write(e.linkname, 157), cB.copy(t, lf), Xee.copy(t, Lv), e.uname &&
|
|
t.write(e.uname, 265), e.gname && t.write(e.gname, 297), t.write(Ta(e.devmajor || 0, 6), 329), t.write(Ta(e.devminor || 0, 6), 337), i &&
|
|
t.write(i, 345), t.write(Ta(dB(t), 6), 148), t);
|
|
};
|
|
el.decode = function(e, t, r) {
|
|
var i = e[156] === 0 ? 0 : e[156] - lB, n = Qu(e, 0, 100, t), a = Ca(e, 100, 8), o = Ca(e, 108, 8), u = Ca(e, 116, 8), l = Ca(e, 124, 12),
|
|
c = Ca(e, 136, 12), f = tte(i), m = e[157] === 0 ? null : Qu(e, 157, 100, t), h = Qu(e, 265, 32), d = Qu(e, 297, 32), y = Ca(e, 329, 8),
|
|
p = Ca(e, 337, 8), g = dB(e);
|
|
if (g === 8 * 32) return null;
|
|
if (g !== Ca(e, 148, 8)) throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");
|
|
if (cB.compare(e, lf, lf + 6) === 0)
|
|
e[345] && (n = Qu(e, 345, 155, t) + "/" + n);
|
|
else if (!(Yee.compare(e, lf, lf + 6) === 0 && Zee.compare(e, Lv, Lv + 2) === 0)) {
|
|
if (!r)
|
|
throw new Error("Invalid tar header: unknown format.");
|
|
}
|
|
return i === 0 && n && n[n.length - 1] === "/" && (i = 5), {
|
|
name: n,
|
|
mode: a,
|
|
uid: o,
|
|
gid: u,
|
|
size: l,
|
|
mtime: new Date(1e3 * c),
|
|
type: f,
|
|
linkname: m,
|
|
uname: h,
|
|
gname: d,
|
|
devmajor: y,
|
|
devminor: p
|
|
};
|
|
};
|
|
});
|
|
|
|
// ../node_modules/tar-stream/extract.js
|
|
var DB = E((Ret, bB) => {
|
|
var hB = V("util"), nte = uB(), cf = qv(), mB = Zu().Writable, yB = Zu().PassThrough, gB = /* @__PURE__ */ s(function() {
|
|
}, "noop"), pB = /* @__PURE__ */ s(function(e) {
|
|
return e &= 511, e && 512 - e;
|
|
}, "overflow"), ste = /* @__PURE__ */ s(function(e, t) {
|
|
var r = new Oh(e, t);
|
|
return r.end(), r;
|
|
}, "emptyStream"), ate = /* @__PURE__ */ s(function(e, t) {
|
|
return t.path && (e.name = t.path), t.linkpath && (e.linkname = t.linkpath), t.size && (e.size = parseInt(t.size, 10)), e.pax = t, e;
|
|
}, "mixinPax"), Oh = /* @__PURE__ */ s(function(e, t) {
|
|
this._parent = e, this.offset = t, yB.call(this, { autoDestroy: !1 });
|
|
}, "Source");
|
|
hB.inherits(Oh, yB);
|
|
Oh.prototype.destroy = function(e) {
|
|
this._parent.destroy(e);
|
|
};
|
|
var Ts = /* @__PURE__ */ s(function(e) {
|
|
if (!(this instanceof Ts)) return new Ts(e);
|
|
mB.call(this, e), e = e || {}, this._offset = 0, this._buffer = nte(), this._missing = 0, this._partial = !1, this._onparse = gB, this._header =
|
|
null, this._stream = null, this._overflow = null, this._cb = null, this._locked = !1, this._destroyed = !1, this._pax = null, this._paxGlobal =
|
|
null, this._gnuLongPath = null, this._gnuLongLinkPath = null;
|
|
var t = this, r = t._buffer, i = /* @__PURE__ */ s(function() {
|
|
t._continue();
|
|
}, "oncontinue"), n = /* @__PURE__ */ s(function(h) {
|
|
if (t._locked = !1, h) return t.destroy(h);
|
|
t._stream || i();
|
|
}, "onunlock"), a = /* @__PURE__ */ s(function() {
|
|
t._stream = null;
|
|
var h = pB(t._header.size);
|
|
h ? t._parse(h, o) : t._parse(512, m), t._locked || i();
|
|
}, "onstreamend"), o = /* @__PURE__ */ s(function() {
|
|
t._buffer.consume(pB(t._header.size)), t._parse(512, m), i();
|
|
}, "ondrain"), u = /* @__PURE__ */ s(function() {
|
|
var h = t._header.size;
|
|
t._paxGlobal = cf.decodePax(r.slice(0, h)), r.consume(h), a();
|
|
}, "onpaxglobalheader"), l = /* @__PURE__ */ s(function() {
|
|
var h = t._header.size;
|
|
t._pax = cf.decodePax(r.slice(0, h)), t._paxGlobal && (t._pax = Object.assign({}, t._paxGlobal, t._pax)), r.consume(h), a();
|
|
}, "onpaxheader"), c = /* @__PURE__ */ s(function() {
|
|
var h = t._header.size;
|
|
this._gnuLongPath = cf.decodeLongPath(r.slice(0, h), e.filenameEncoding), r.consume(h), a();
|
|
}, "ongnulongpath"), f = /* @__PURE__ */ s(function() {
|
|
var h = t._header.size;
|
|
this._gnuLongLinkPath = cf.decodeLongPath(r.slice(0, h), e.filenameEncoding), r.consume(h), a();
|
|
}, "ongnulonglinkpath"), m = /* @__PURE__ */ s(function() {
|
|
var h = t._offset, d;
|
|
try {
|
|
d = t._header = cf.decode(r.slice(0, 512), e.filenameEncoding, e.allowUnknownFormat);
|
|
} catch (y) {
|
|
t.emit("error", y);
|
|
}
|
|
if (r.consume(512), !d) {
|
|
t._parse(512, m), i();
|
|
return;
|
|
}
|
|
if (d.type === "gnu-long-path") {
|
|
t._parse(d.size, c), i();
|
|
return;
|
|
}
|
|
if (d.type === "gnu-long-link-path") {
|
|
t._parse(d.size, f), i();
|
|
return;
|
|
}
|
|
if (d.type === "pax-global-header") {
|
|
t._parse(d.size, u), i();
|
|
return;
|
|
}
|
|
if (d.type === "pax-header") {
|
|
t._parse(d.size, l), i();
|
|
return;
|
|
}
|
|
if (t._gnuLongPath && (d.name = t._gnuLongPath, t._gnuLongPath = null), t._gnuLongLinkPath && (d.linkname = t._gnuLongLinkPath, t._gnuLongLinkPath =
|
|
null), t._pax && (t._header = d = ate(d, t._pax), t._pax = null), t._locked = !0, !d.size || d.type === "directory") {
|
|
t._parse(512, m), t.emit("entry", d, ste(t, h), n);
|
|
return;
|
|
}
|
|
t._stream = new Oh(t, h), t.emit("entry", d, t._stream, n), t._parse(d.size, a), i();
|
|
}, "onheader");
|
|
this._onheader = m, this._parse(512, m);
|
|
}, "Extract");
|
|
hB.inherits(Ts, mB);
|
|
Ts.prototype.destroy = function(e) {
|
|
this._destroyed || (this._destroyed = !0, e && this.emit("error", e), this.emit("close"), this._stream && this._stream.emit("close"));
|
|
};
|
|
Ts.prototype._parse = function(e, t) {
|
|
this._destroyed || (this._offset += e, this._missing = e, t === this._onheader && (this._partial = !1), this._onparse = t);
|
|
};
|
|
Ts.prototype._continue = function() {
|
|
if (!this._destroyed) {
|
|
var e = this._cb;
|
|
this._cb = gB, this._overflow ? this._write(this._overflow, void 0, e) : e();
|
|
}
|
|
};
|
|
Ts.prototype._write = function(e, t, r) {
|
|
if (!this._destroyed) {
|
|
var i = this._stream, n = this._buffer, a = this._missing;
|
|
if (e.length && (this._partial = !0), e.length < a)
|
|
return this._missing -= e.length, this._overflow = null, i ? i.write(e, r) : (n.append(e), r());
|
|
this._cb = r, this._missing = 0;
|
|
var o = null;
|
|
e.length > a && (o = e.slice(a), e = e.slice(0, a)), i ? i.end(e) : n.append(e), this._overflow = o, this._onparse();
|
|
}
|
|
};
|
|
Ts.prototype._final = function(e) {
|
|
if (this._partial) return this.destroy(new Error("Unexpected end of data"));
|
|
e();
|
|
};
|
|
bB.exports = Ts;
|
|
});
|
|
|
|
// ../node_modules/fs-constants/index.js
|
|
var EB = E((Let, vB) => {
|
|
vB.exports = V("fs").constants || V("constants");
|
|
});
|
|
|
|
// ../node_modules/tar-stream/pack.js
|
|
var wB = E((qet, CB) => {
|
|
var tl = EB(), xB = zu(), Bh = Lt(), ote = Buffer.alloc, SB = Zu().Readable, rl = Zu().Writable, ute = V("string_decoder").StringDecoder, kh = qv(),
|
|
lte = parseInt("755", 8), cte = parseInt("644", 8), TB = ote(1024), Wv = /* @__PURE__ */ s(function() {
|
|
}, "noop"), Uv = /* @__PURE__ */ s(function(e, t) {
|
|
t &= 511, t && e.push(TB.slice(0, 512 - t));
|
|
}, "overflow");
|
|
function fte(e) {
|
|
switch (e & tl.S_IFMT) {
|
|
case tl.S_IFBLK:
|
|
return "block-device";
|
|
case tl.S_IFCHR:
|
|
return "character-device";
|
|
case tl.S_IFDIR:
|
|
return "directory";
|
|
case tl.S_IFIFO:
|
|
return "fifo";
|
|
case tl.S_IFLNK:
|
|
return "symlink";
|
|
}
|
|
return "file";
|
|
}
|
|
s(fte, "modeToType");
|
|
var Nh = /* @__PURE__ */ s(function(e) {
|
|
rl.call(this), this.written = 0, this._to = e, this._destroyed = !1;
|
|
}, "Sink");
|
|
Bh(Nh, rl);
|
|
Nh.prototype._write = function(e, t, r) {
|
|
if (this.written += e.length, this._to.push(e)) return r();
|
|
this._to._drain = r;
|
|
};
|
|
Nh.prototype.destroy = function() {
|
|
this._destroyed || (this._destroyed = !0, this.emit("close"));
|
|
};
|
|
var Mh = /* @__PURE__ */ s(function() {
|
|
rl.call(this), this.linkname = "", this._decoder = new ute("utf-8"), this._destroyed = !1;
|
|
}, "LinkSink");
|
|
Bh(Mh, rl);
|
|
Mh.prototype._write = function(e, t, r) {
|
|
this.linkname += this._decoder.write(e), r();
|
|
};
|
|
Mh.prototype.destroy = function() {
|
|
this._destroyed || (this._destroyed = !0, this.emit("close"));
|
|
};
|
|
var ff = /* @__PURE__ */ s(function() {
|
|
rl.call(this), this._destroyed = !1;
|
|
}, "Void");
|
|
Bh(ff, rl);
|
|
ff.prototype._write = function(e, t, r) {
|
|
r(new Error("No body allowed for this entry"));
|
|
};
|
|
ff.prototype.destroy = function() {
|
|
this._destroyed || (this._destroyed = !0, this.emit("close"));
|
|
};
|
|
var Hn = /* @__PURE__ */ s(function(e) {
|
|
if (!(this instanceof Hn)) return new Hn(e);
|
|
SB.call(this, e), this._drain = Wv, this._finalized = !1, this._finalizing = !1, this._destroyed = !1, this._stream = null;
|
|
}, "Pack");
|
|
Bh(Hn, SB);
|
|
Hn.prototype.entry = function(e, t, r) {
|
|
if (this._stream) throw new Error("already piping an entry");
|
|
if (!(this._finalized || this._destroyed)) {
|
|
typeof t == "function" && (r = t, t = null), r || (r = Wv);
|
|
var i = this;
|
|
if ((!e.size || e.type === "symlink") && (e.size = 0), e.type || (e.type = fte(e.mode)), e.mode || (e.mode = e.type === "directory" ? lte :
|
|
cte), e.uid || (e.uid = 0), e.gid || (e.gid = 0), e.mtime || (e.mtime = /* @__PURE__ */ new Date()), typeof t == "string" && (t = Buffer.
|
|
from(t)), Buffer.isBuffer(t)) {
|
|
e.size = t.length, this._encode(e);
|
|
var n = this.push(t);
|
|
return Uv(i, e.size), n ? process.nextTick(r) : this._drain = r, new ff();
|
|
}
|
|
if (e.type === "symlink" && !e.linkname) {
|
|
var a = new Mh();
|
|
return xB(a, function(u) {
|
|
if (u)
|
|
return i.destroy(), r(u);
|
|
e.linkname = a.linkname, i._encode(e), r();
|
|
}), a;
|
|
}
|
|
if (this._encode(e), e.type !== "file" && e.type !== "contiguous-file")
|
|
return process.nextTick(r), new ff();
|
|
var o = new Nh(this);
|
|
return this._stream = o, xB(o, function(u) {
|
|
if (i._stream = null, u)
|
|
return i.destroy(), r(u);
|
|
if (o.written !== e.size)
|
|
return i.destroy(), r(new Error("size mismatch"));
|
|
Uv(i, e.size), i._finalizing && i.finalize(), r();
|
|
}), o;
|
|
}
|
|
};
|
|
Hn.prototype.finalize = function() {
|
|
if (this._stream) {
|
|
this._finalizing = !0;
|
|
return;
|
|
}
|
|
this._finalized || (this._finalized = !0, this.push(TB), this.push(null));
|
|
};
|
|
Hn.prototype.destroy = function(e) {
|
|
this._destroyed || (this._destroyed = !0, e && this.emit("error", e), this.emit("close"), this._stream && this._stream.destroy && this._stream.
|
|
destroy());
|
|
};
|
|
Hn.prototype._encode = function(e) {
|
|
if (!e.pax) {
|
|
var t = kh.encode(e);
|
|
if (t) {
|
|
this.push(t);
|
|
return;
|
|
}
|
|
}
|
|
this._encodePax(e);
|
|
};
|
|
Hn.prototype._encodePax = function(e) {
|
|
var t = kh.encodePax({
|
|
name: e.name,
|
|
linkname: e.linkname,
|
|
pax: e.pax
|
|
}), r = {
|
|
name: "PaxHeader",
|
|
mode: e.mode,
|
|
uid: e.uid,
|
|
gid: e.gid,
|
|
size: t.length,
|
|
mtime: e.mtime,
|
|
type: "pax-header",
|
|
linkname: e.linkname && "PaxHeader",
|
|
uname: e.uname,
|
|
gname: e.gname,
|
|
devmajor: e.devmajor,
|
|
devminor: e.devminor
|
|
};
|
|
this.push(kh.encode(r)), this.push(t), Uv(this, t.length), r.size = e.size, r.type = e.type, this.push(kh.encode(r));
|
|
};
|
|
Hn.prototype._read = function(e) {
|
|
var t = this._drain;
|
|
this._drain = Wv, t();
|
|
};
|
|
CB.exports = Hn;
|
|
});
|
|
|
|
// ../node_modules/tar-stream/index.js
|
|
var AB = E(($v) => {
|
|
$v.extract = DB();
|
|
$v.pack = wB();
|
|
});
|
|
|
|
// ../node_modules/mkdirp-classic/index.js
|
|
var IB = E(($et, FB) => {
|
|
var Rh = V("path"), _B = V("fs"), PB = parseInt("0777", 8);
|
|
FB.exports = il.mkdirp = il.mkdirP = il;
|
|
function il(e, t, r, i) {
|
|
typeof t == "function" ? (r = t, t = {}) : (!t || typeof t != "object") && (t = { mode: t });
|
|
var n = t.mode, a = t.fs || _B;
|
|
n === void 0 && (n = PB & ~process.umask()), i || (i = null);
|
|
var o = r || function() {
|
|
};
|
|
e = Rh.resolve(e), a.mkdir(e, n, function(u) {
|
|
if (!u)
|
|
return i = i || e, o(null, i);
|
|
switch (u.code) {
|
|
case "ENOENT":
|
|
il(Rh.dirname(e), t, function(l, c) {
|
|
l ? o(l, c) : il(e, t, o, c);
|
|
});
|
|
break;
|
|
// In the case of any other error, just see if there's a dir
|
|
// there already. If so, then hooray! If not, then something
|
|
// is borked.
|
|
default:
|
|
a.stat(e, function(l, c) {
|
|
l || !c.isDirectory() ? o(u, i) : o(null, i);
|
|
});
|
|
break;
|
|
}
|
|
});
|
|
}
|
|
s(il, "mkdirP");
|
|
il.sync = /* @__PURE__ */ s(function e(t, r, i) {
|
|
(!r || typeof r != "object") && (r = { mode: r });
|
|
var n = r.mode, a = r.fs || _B;
|
|
n === void 0 && (n = PB & ~process.umask()), i || (i = null), t = Rh.resolve(t);
|
|
try {
|
|
a.mkdirSync(t, n), i = i || t;
|
|
} catch (u) {
|
|
switch (u.code) {
|
|
case "ENOENT":
|
|
i = e(Rh.dirname(t), r, i), e(t, r, i);
|
|
break;
|
|
// In the case of any other error, just see if there's a dir
|
|
// there already. If so, then hooray! If not, then something
|
|
// is borked.
|
|
default:
|
|
var o;
|
|
try {
|
|
o = a.statSync(t);
|
|
} catch {
|
|
throw u;
|
|
}
|
|
if (!o.isDirectory()) throw u;
|
|
break;
|
|
}
|
|
}
|
|
return i;
|
|
}, "sync");
|
|
});
|
|
|
|
// ../node_modules/tar-fs/index.js
|
|
var LB = E((Kv) => {
|
|
var dte = ak(), kB = AB(), BB = uv(), pte = IB(), NB = V("fs"), ei = V("path"), hte = V("os"), df = hte.platform() === "win32", pf = /* @__PURE__ */ s(
|
|
function() {
|
|
}, "noop"), Hv = /* @__PURE__ */ s(function(e) {
|
|
return e;
|
|
}, "echo"), Vv = df ? function(e) {
|
|
return e.replace(/\\/g, "/").replace(/[:?<>|]/g, "_");
|
|
} : Hv, mte = /* @__PURE__ */ s(function(e, t, r, i, n, a) {
|
|
var o = n || ["."];
|
|
return /* @__PURE__ */ s(function(l) {
|
|
if (!o.length) return l();
|
|
var c = o.shift(), f = ei.join(r, c);
|
|
t.call(e, f, function(m, h) {
|
|
if (m) return l(m);
|
|
if (!h.isDirectory()) return l(null, c, h);
|
|
e.readdir(f, function(d, y) {
|
|
if (d) return l(d);
|
|
a && y.sort();
|
|
for (var p = 0; p < y.length; p++)
|
|
i(ei.join(r, c, y[p])) || o.push(ei.join(c, y[p]));
|
|
l(null, c, h);
|
|
});
|
|
});
|
|
}, "loop");
|
|
}, "statAll"), MB = /* @__PURE__ */ s(function(e, t) {
|
|
return function(r) {
|
|
r.name = r.name.split("/").slice(t).join("/");
|
|
var i = r.linkname;
|
|
return i && (r.type === "link" || ei.isAbsolute(i)) && (r.linkname = i.split("/").slice(t).join("/")), e(r);
|
|
};
|
|
}, "strip");
|
|
Kv.pack = function(e, t) {
|
|
e || (e = "."), t || (t = {});
|
|
var r = t.fs || NB, i = t.ignore || t.filter || pf, n = t.map || pf, a = t.mapStream || Hv, o = mte(r, t.dereference ? r.stat : r.lstat,
|
|
e, i, t.entries, t.sort), u = t.strict !== !1, l = typeof t.umask == "number" ? ~t.umask : ~RB(), c = typeof t.dmode == "number" ? t.dmode :
|
|
0, f = typeof t.fmode == "number" ? t.fmode : 0, m = t.pack || kB.pack(), h = t.finish || pf;
|
|
t.strip && (n = MB(n, t.strip)), t.readable && (c |= parseInt(555, 8), f |= parseInt(444, 8)), t.writable && (c |= parseInt(333, 8), f |=
|
|
parseInt(222, 8));
|
|
var d = /* @__PURE__ */ s(function(g, b) {
|
|
r.readlink(ei.join(e, g), function(D, v) {
|
|
if (D) return m.destroy(D);
|
|
b.linkname = Vv(v), m.entry(b, p);
|
|
});
|
|
}, "onsymlink"), y = /* @__PURE__ */ s(function(g, b, D) {
|
|
if (g) return m.destroy(g);
|
|
if (!b)
|
|
return t.finalize !== !1 && m.finalize(), h(m);
|
|
if (D.isSocket()) return p();
|
|
var v = {
|
|
name: Vv(b),
|
|
mode: (D.mode | (D.isDirectory() ? c : f)) & l,
|
|
mtime: D.mtime,
|
|
size: D.size,
|
|
type: "file",
|
|
uid: D.uid,
|
|
gid: D.gid
|
|
};
|
|
if (D.isDirectory())
|
|
return v.size = 0, v.type = "directory", v = n(v) || v, m.entry(v, p);
|
|
if (D.isSymbolicLink())
|
|
return v.size = 0, v.type = "symlink", v = n(v) || v, d(b, v);
|
|
if (v = n(v) || v, !D.isFile())
|
|
return u ? m.destroy(new Error("unsupported type for " + b)) : p();
|
|
var S = m.entry(v, p);
|
|
if (S) {
|
|
var C = a(r.createReadStream(ei.join(e, b), { start: 0, end: v.size > 0 ? v.size - 1 : v.size }), v);
|
|
C.on("error", function(O) {
|
|
S.destroy(O);
|
|
}), BB(C, S);
|
|
}
|
|
}, "onstat"), p = /* @__PURE__ */ s(function(g) {
|
|
if (g) return m.destroy(g);
|
|
o(y);
|
|
}, "onnextentry");
|
|
return p(), m;
|
|
};
|
|
var yte = /* @__PURE__ */ s(function(e) {
|
|
return e.length ? e[e.length - 1] : null;
|
|
}, "head"), gte = /* @__PURE__ */ s(function() {
|
|
return process.getuid ? process.getuid() : -1;
|
|
}, "processGetuid"), RB = /* @__PURE__ */ s(function() {
|
|
return process.umask ? process.umask() : 0;
|
|
}, "processUmask");
|
|
Kv.extract = function(e, t) {
|
|
e || (e = "."), t || (t = {});
|
|
var r = t.fs || NB, i = t.ignore || t.filter || pf, n = t.map || pf, a = t.mapStream || Hv, o = t.chown !== !1 && !df && gte() === 0, u = t.
|
|
extract || kB.extract(), l = [], c = /* @__PURE__ */ new Date(), f = typeof t.umask == "number" ? ~t.umask : ~RB(), m = typeof t.dmode ==
|
|
"number" ? t.dmode : 0, h = typeof t.fmode == "number" ? t.fmode : 0, d = t.strict !== !1;
|
|
t.strip && (n = MB(n, t.strip)), t.readable && (m |= parseInt(555, 8), h |= parseInt(444, 8)), t.writable && (m |= parseInt(333, 8), h |=
|
|
parseInt(222, 8));
|
|
var y = /* @__PURE__ */ s(function(b, D) {
|
|
for (var v; (v = yte(l)) && b.slice(0, v[0].length) !== v[0]; ) l.pop();
|
|
if (!v) return D();
|
|
r.utimes(v[0], c, v[1], D);
|
|
}, "utimesParent"), p = /* @__PURE__ */ s(function(b, D, v) {
|
|
if (t.utimes === !1) return v();
|
|
if (D.type === "directory") return r.utimes(b, c, D.mtime, v);
|
|
if (D.type === "symlink") return y(b, v);
|
|
r.utimes(b, c, D.mtime, function(S) {
|
|
if (S) return v(S);
|
|
y(b, v);
|
|
});
|
|
}, "utimes"), g = /* @__PURE__ */ s(function(b, D, v) {
|
|
var S = D.type === "symlink", C = S ? r.lchmod : r.chmod, O = S ? r.lchown : r.chown;
|
|
if (!C) return v();
|
|
var k = (D.mode | (D.type === "directory" ? m : h)) & f;
|
|
O && o ? O.call(r, b, D.uid, D.gid, U) : U(null);
|
|
function U(j) {
|
|
if (j) return v(j);
|
|
if (!C) return v();
|
|
C.call(r, b, k, v);
|
|
}
|
|
s(U, "onchown");
|
|
}, "chperm");
|
|
return u.on("entry", function(b, D, v) {
|
|
b = n(b) || b, b.name = Vv(b.name);
|
|
var S = ei.join(e, ei.join("/", b.name));
|
|
if (i(S, b))
|
|
return D.resume(), v();
|
|
var C = /* @__PURE__ */ s(function(K) {
|
|
if (K) return v(K);
|
|
p(S, b, function(R) {
|
|
if (R) return v(R);
|
|
if (df) return v();
|
|
g(S, b, v);
|
|
});
|
|
}, "stat"), O = /* @__PURE__ */ s(function() {
|
|
if (df) return v();
|
|
r.unlink(S, function() {
|
|
var K = ei.resolve(ei.dirname(S), b.linkname);
|
|
if (!K.startsWith(ei.resolve(e))) return v(new Error(S + " is not a valid symlink"));
|
|
r.symlink(b.linkname, S, C);
|
|
});
|
|
}, "onsymlink"), k = /* @__PURE__ */ s(function() {
|
|
if (df) return v();
|
|
r.unlink(S, function() {
|
|
var K = ei.join(e, ei.join("/", b.linkname));
|
|
r.link(K, S, function(R) {
|
|
if (R && R.code === "EPERM" && t.hardlinkAsFilesFallback)
|
|
return D = r.createReadStream(K), U();
|
|
C(R);
|
|
});
|
|
});
|
|
}, "onlink"), U = /* @__PURE__ */ s(function() {
|
|
var K = r.createWriteStream(S), R = a(D, b);
|
|
K.on("error", function(ee) {
|
|
R.destroy(ee);
|
|
}), BB(R, K, function(ee) {
|
|
if (ee) return v(ee);
|
|
K.on("close", C);
|
|
});
|
|
}, "onfile");
|
|
if (b.type === "directory")
|
|
return l.push([S, b.mtime]), OB(S, {
|
|
fs: r,
|
|
own: o,
|
|
uid: b.uid,
|
|
gid: b.gid
|
|
}, C);
|
|
var j = ei.dirname(S);
|
|
jB(r, j, ei.join(e, "."), function(K, R) {
|
|
if (K) return v(K);
|
|
if (!R) return v(new Error(j + " is not a valid path"));
|
|
OB(j, {
|
|
fs: r,
|
|
own: o,
|
|
uid: b.uid,
|
|
gid: b.gid
|
|
}, function(ee) {
|
|
if (ee) return v(ee);
|
|
switch (b.type) {
|
|
case "file":
|
|
return U();
|
|
case "link":
|
|
return k();
|
|
case "symlink":
|
|
return O();
|
|
}
|
|
if (d) return v(new Error("unsupported type for " + S + " (" + b.type + ")"));
|
|
D.resume(), v();
|
|
});
|
|
});
|
|
}), t.finish && u.on("finish", t.finish), u;
|
|
};
|
|
function jB(e, t, r, i) {
|
|
if (t === r) return i(null, !0);
|
|
e.lstat(t, function(n, a) {
|
|
if (n && n.code !== "ENOENT") return i(n);
|
|
if (n || a.isDirectory()) return jB(e, ei.join(t, ".."), r, i);
|
|
i(null, !1);
|
|
});
|
|
}
|
|
s(jB, "validate");
|
|
function OB(e, t, r) {
|
|
pte(e, { fs: t.fs }, function(i, n) {
|
|
!i && n && t.own ? dte(n, t.uid, t.gid, r) : r(i);
|
|
});
|
|
}
|
|
s(OB, "mkdirfix");
|
|
});
|
|
|
|
// ../node_modules/process-nextick-args/index.js
|
|
var Ii = E((zet, zv) => {
|
|
"use strict";
|
|
typeof process > "u" || !process.version || process.version.indexOf("v0.") === 0 || process.version.indexOf("v1.") === 0 && process.version.
|
|
indexOf("v1.8.") !== 0 ? zv.exports = { nextTick: bte } : zv.exports = process;
|
|
function bte(e, t, r, i) {
|
|
if (typeof e != "function")
|
|
throw new TypeError('"callback" argument must be a function');
|
|
var n = arguments.length, a, o;
|
|
switch (n) {
|
|
case 0:
|
|
case 1:
|
|
return process.nextTick(e);
|
|
case 2:
|
|
return process.nextTick(/* @__PURE__ */ s(function() {
|
|
e.call(null, t);
|
|
}, "afterTickOne"));
|
|
case 3:
|
|
return process.nextTick(/* @__PURE__ */ s(function() {
|
|
e.call(null, t, r);
|
|
}, "afterTickTwo"));
|
|
case 4:
|
|
return process.nextTick(/* @__PURE__ */ s(function() {
|
|
e.call(null, t, r, i);
|
|
}, "afterTickThree"));
|
|
default:
|
|
for (a = new Array(n - 1), o = 0; o < a.length; )
|
|
a[o++] = arguments[o];
|
|
return process.nextTick(/* @__PURE__ */ s(function() {
|
|
e.apply(null, a);
|
|
}, "afterTick"));
|
|
}
|
|
}
|
|
s(bte, "nextTick");
|
|
});
|
|
|
|
// ../node_modules/peek-stream/node_modules/isarray/index.js
|
|
var UB = E((Jet, qB) => {
|
|
var Dte = {}.toString;
|
|
qB.exports = Array.isArray || function(e) {
|
|
return Dte.call(e) == "[object Array]";
|
|
};
|
|
});
|
|
|
|
// ../node_modules/peek-stream/node_modules/readable-stream/lib/internal/streams/stream.js
|
|
var Gv = E((Xet, WB) => {
|
|
WB.exports = V("stream");
|
|
});
|
|
|
|
// ../node_modules/peek-stream/node_modules/safe-buffer/index.js
|
|
var Lh = E((Jv, VB) => {
|
|
var jh = V("buffer"), Cs = jh.Buffer;
|
|
function $B(e, t) {
|
|
for (var r in e)
|
|
t[r] = e[r];
|
|
}
|
|
s($B, "copyProps");
|
|
Cs.from && Cs.alloc && Cs.allocUnsafe && Cs.allocUnsafeSlow ? VB.exports = jh : ($B(jh, Jv), Jv.Buffer = nl);
|
|
function nl(e, t, r) {
|
|
return Cs(e, t, r);
|
|
}
|
|
s(nl, "SafeBuffer");
|
|
$B(Cs, nl);
|
|
nl.from = function(e, t, r) {
|
|
if (typeof e == "number")
|
|
throw new TypeError("Argument must not be a number");
|
|
return Cs(e, t, r);
|
|
};
|
|
nl.alloc = function(e, t, r) {
|
|
if (typeof e != "number")
|
|
throw new TypeError("Argument must be a number");
|
|
var i = Cs(e);
|
|
return t !== void 0 ? typeof r == "string" ? i.fill(t, r) : i.fill(t) : i.fill(0), i;
|
|
};
|
|
nl.allocUnsafe = function(e) {
|
|
if (typeof e != "number")
|
|
throw new TypeError("Argument must be a number");
|
|
return Cs(e);
|
|
};
|
|
nl.allocUnsafeSlow = function(e) {
|
|
if (typeof e != "number")
|
|
throw new TypeError("Argument must be a number");
|
|
return jh.SlowBuffer(e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/core-util-is/lib/util.js
|
|
var _r = E((ti) => {
|
|
function vte(e) {
|
|
return Array.isArray ? Array.isArray(e) : qh(e) === "[object Array]";
|
|
}
|
|
s(vte, "isArray");
|
|
ti.isArray = vte;
|
|
function Ete(e) {
|
|
return typeof e == "boolean";
|
|
}
|
|
s(Ete, "isBoolean");
|
|
ti.isBoolean = Ete;
|
|
function xte(e) {
|
|
return e === null;
|
|
}
|
|
s(xte, "isNull");
|
|
ti.isNull = xte;
|
|
function Ste(e) {
|
|
return e == null;
|
|
}
|
|
s(Ste, "isNullOrUndefined");
|
|
ti.isNullOrUndefined = Ste;
|
|
function Tte(e) {
|
|
return typeof e == "number";
|
|
}
|
|
s(Tte, "isNumber");
|
|
ti.isNumber = Tte;
|
|
function Cte(e) {
|
|
return typeof e == "string";
|
|
}
|
|
s(Cte, "isString");
|
|
ti.isString = Cte;
|
|
function wte(e) {
|
|
return typeof e == "symbol";
|
|
}
|
|
s(wte, "isSymbol");
|
|
ti.isSymbol = wte;
|
|
function Ate(e) {
|
|
return e === void 0;
|
|
}
|
|
s(Ate, "isUndefined");
|
|
ti.isUndefined = Ate;
|
|
function _te(e) {
|
|
return qh(e) === "[object RegExp]";
|
|
}
|
|
s(_te, "isRegExp");
|
|
ti.isRegExp = _te;
|
|
function Pte(e) {
|
|
return typeof e == "object" && e !== null;
|
|
}
|
|
s(Pte, "isObject");
|
|
ti.isObject = Pte;
|
|
function Fte(e) {
|
|
return qh(e) === "[object Date]";
|
|
}
|
|
s(Fte, "isDate");
|
|
ti.isDate = Fte;
|
|
function Ite(e) {
|
|
return qh(e) === "[object Error]" || e instanceof Error;
|
|
}
|
|
s(Ite, "isError");
|
|
ti.isError = Ite;
|
|
function Ote(e) {
|
|
return typeof e == "function";
|
|
}
|
|
s(Ote, "isFunction");
|
|
ti.isFunction = Ote;
|
|
function kte(e) {
|
|
return e === null || typeof e == "boolean" || typeof e == "number" || typeof e == "string" || typeof e == "symbol" || // ES6 symbol
|
|
typeof e > "u";
|
|
}
|
|
s(kte, "isPrimitive");
|
|
ti.isPrimitive = kte;
|
|
ti.isBuffer = V("buffer").Buffer.isBuffer;
|
|
function qh(e) {
|
|
return Object.prototype.toString.call(e);
|
|
}
|
|
s(qh, "objectToString");
|
|
});
|
|
|
|
// ../node_modules/peek-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js
|
|
var KB = E((ett, Xv) => {
|
|
"use strict";
|
|
function Bte(e, t) {
|
|
if (!(e instanceof t))
|
|
throw new TypeError("Cannot call a class as a function");
|
|
}
|
|
s(Bte, "_classCallCheck");
|
|
var HB = Lh().Buffer, hf = V("util");
|
|
function Nte(e, t, r) {
|
|
e.copy(t, r);
|
|
}
|
|
s(Nte, "copyBuffer");
|
|
Xv.exports = function() {
|
|
function e() {
|
|
Bte(this, e), this.head = null, this.tail = null, this.length = 0;
|
|
}
|
|
return s(e, "BufferList"), e.prototype.push = /* @__PURE__ */ s(function(r) {
|
|
var i = { data: r, next: null };
|
|
this.length > 0 ? this.tail.next = i : this.head = i, this.tail = i, ++this.length;
|
|
}, "push"), e.prototype.unshift = /* @__PURE__ */ s(function(r) {
|
|
var i = { data: r, next: this.head };
|
|
this.length === 0 && (this.tail = i), this.head = i, ++this.length;
|
|
}, "unshift"), e.prototype.shift = /* @__PURE__ */ s(function() {
|
|
if (this.length !== 0) {
|
|
var r = this.head.data;
|
|
return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, r;
|
|
}
|
|
}, "shift"), e.prototype.clear = /* @__PURE__ */ s(function() {
|
|
this.head = this.tail = null, this.length = 0;
|
|
}, "clear"), e.prototype.join = /* @__PURE__ */ s(function(r) {
|
|
if (this.length === 0) return "";
|
|
for (var i = this.head, n = "" + i.data; i = i.next; )
|
|
n += r + i.data;
|
|
return n;
|
|
}, "join"), e.prototype.concat = /* @__PURE__ */ s(function(r) {
|
|
if (this.length === 0) return HB.alloc(0);
|
|
for (var i = HB.allocUnsafe(r >>> 0), n = this.head, a = 0; n; )
|
|
Nte(n.data, i, a), a += n.data.length, n = n.next;
|
|
return i;
|
|
}, "concat"), e;
|
|
}();
|
|
hf && hf.inspect && hf.inspect.custom && (Xv.exports.prototype[hf.inspect.custom] = function() {
|
|
var e = hf.inspect({ length: this.length });
|
|
return this.constructor.name + " " + e;
|
|
});
|
|
});
|
|
|
|
// ../node_modules/peek-stream/node_modules/readable-stream/lib/internal/streams/destroy.js
|
|
var Yv = E((rtt, zB) => {
|
|
"use strict";
|
|
var Uh = Ii();
|
|
function Mte(e, t) {
|
|
var r = this, i = this._readableState && this._readableState.destroyed, n = this._writableState && this._writableState.destroyed;
|
|
return i || n ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, Uh.nextTick(
|
|
Wh, this, e)) : Uh.nextTick(Wh, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this.
|
|
_writableState.destroyed = !0), this._destroy(e || null, function(a) {
|
|
!t && a ? r._writableState ? r._writableState.errorEmitted || (r._writableState.errorEmitted = !0, Uh.nextTick(Wh, r, a)) : Uh.nextTick(
|
|
Wh, r, a) : t && t(a);
|
|
}), this);
|
|
}
|
|
s(Mte, "destroy");
|
|
function Rte() {
|
|
this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.
|
|
endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending =
|
|
!1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted =
|
|
!1);
|
|
}
|
|
s(Rte, "undestroy");
|
|
function Wh(e, t) {
|
|
e.emit("error", t);
|
|
}
|
|
s(Wh, "emitErrorNT");
|
|
zB.exports = {
|
|
destroy: Mte,
|
|
undestroy: Rte
|
|
};
|
|
});
|
|
|
|
// ../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_writable.js
|
|
var Qv = E((ntt, tN) => {
|
|
"use strict";
|
|
var To = Ii();
|
|
tN.exports = xr;
|
|
function JB(e) {
|
|
var t = this;
|
|
this.next = null, this.entry = null, this.finish = function() {
|
|
tre(t, e);
|
|
};
|
|
}
|
|
s(JB, "CorkedRequest");
|
|
var jte = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : To.nextTick, sl;
|
|
xr.WritableState = yf;
|
|
var XB = Object.create(_r());
|
|
XB.inherits = Lt();
|
|
var Lte = {
|
|
deprecate: Zc()
|
|
}, YB = Gv(), Vh = Lh().Buffer, qte = (typeof global < "u" ? global : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array ||
|
|
function() {
|
|
};
|
|
function Ute(e) {
|
|
return Vh.from(e);
|
|
}
|
|
s(Ute, "_uint8ArrayToBuffer");
|
|
function Wte(e) {
|
|
return Vh.isBuffer(e) || e instanceof qte;
|
|
}
|
|
s(Wte, "_isUint8Array");
|
|
var ZB = Yv();
|
|
XB.inherits(xr, YB);
|
|
function $te() {
|
|
}
|
|
s($te, "nop");
|
|
function yf(e, t) {
|
|
sl = sl || Co(), e = e || {};
|
|
var r = t instanceof sl;
|
|
this.objectMode = !!e.objectMode, r && (this.objectMode = this.objectMode || !!e.writableObjectMode);
|
|
var i = e.highWaterMark, n = e.writableHighWaterMark, a = this.objectMode ? 16 : 16 * 1024;
|
|
i || i === 0 ? this.highWaterMark = i : r && (n || n === 0) ? this.highWaterMark = n : this.highWaterMark = a, this.highWaterMark = Math.
|
|
floor(this.highWaterMark), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed =
|
|
!1;
|
|
var o = e.decodeStrings === !1;
|
|
this.decodeStrings = !o, this.defaultEncoding = e.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync =
|
|
!0, this.bufferProcessing = !1, this.onwrite = function(u) {
|
|
Xte(t, u);
|
|
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished =
|
|
!1, this.errorEmitted = !1, this.bufferedRequestCount = 0, this.corkedRequestsFree = new JB(this);
|
|
}
|
|
s(yf, "WritableState");
|
|
yf.prototype.getBuffer = /* @__PURE__ */ s(function() {
|
|
for (var t = this.bufferedRequest, r = []; t; )
|
|
r.push(t), t = t.next;
|
|
return r;
|
|
}, "getBuffer");
|
|
(function() {
|
|
try {
|
|
Object.defineProperty(yf.prototype, "buffer", {
|
|
get: Lte.deprecate(function() {
|
|
return this.getBuffer();
|
|
}, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
|
|
});
|
|
} catch {
|
|
}
|
|
})();
|
|
var $h;
|
|
typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? ($h = Function.prototype[Symbol.
|
|
hasInstance], Object.defineProperty(xr, Symbol.hasInstance, {
|
|
value: /* @__PURE__ */ s(function(e) {
|
|
return $h.call(this, e) ? !0 : this !== xr ? !1 : e && e._writableState instanceof yf;
|
|
}, "value")
|
|
})) : $h = /* @__PURE__ */ s(function(e) {
|
|
return e instanceof this;
|
|
}, "realHasInstance");
|
|
function xr(e) {
|
|
if (sl = sl || Co(), !$h.call(xr, this) && !(this instanceof sl))
|
|
return new xr(e);
|
|
this._writableState = new yf(e, this), this.writable = !0, e && (typeof e.write == "function" && (this._write = e.write), typeof e.writev ==
|
|
"function" && (this._writev = e.writev), typeof e.destroy == "function" && (this._destroy = e.destroy), typeof e.final == "function" && (this.
|
|
_final = e.final)), YB.call(this);
|
|
}
|
|
s(xr, "Writable");
|
|
xr.prototype.pipe = function() {
|
|
this.emit("error", new Error("Cannot pipe, not readable"));
|
|
};
|
|
function Vte(e, t) {
|
|
var r = new Error("write after end");
|
|
e.emit("error", r), To.nextTick(t, r);
|
|
}
|
|
s(Vte, "writeAfterEnd");
|
|
function Hte(e, t, r, i) {
|
|
var n = !0, a = !1;
|
|
return r === null ? a = new TypeError("May not write null values to stream") : typeof r != "string" && r !== void 0 && !t.objectMode && (a =
|
|
new TypeError("Invalid non-string/buffer chunk")), a && (e.emit("error", a), To.nextTick(i, a), n = !1), n;
|
|
}
|
|
s(Hte, "validChunk");
|
|
xr.prototype.write = function(e, t, r) {
|
|
var i = this._writableState, n = !1, a = !i.objectMode && Wte(e);
|
|
return a && !Vh.isBuffer(e) && (e = Ute(e)), typeof t == "function" && (r = t, t = null), a ? t = "buffer" : t || (t = i.defaultEncoding),
|
|
typeof r != "function" && (r = $te), i.ended ? Vte(this, r) : (a || Hte(this, i, e, r)) && (i.pendingcb++, n = zte(this, i, a, e, t, r)),
|
|
n;
|
|
};
|
|
xr.prototype.cork = function() {
|
|
var e = this._writableState;
|
|
e.corked++;
|
|
};
|
|
xr.prototype.uncork = function() {
|
|
var e = this._writableState;
|
|
e.corked && (e.corked--, !e.writing && !e.corked && !e.bufferProcessing && e.bufferedRequest && QB(this, e));
|
|
};
|
|
xr.prototype.setDefaultEncoding = /* @__PURE__ */ s(function(t) {
|
|
if (typeof t == "string" && (t = t.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "\
|
|
utf-16le", "raw"].indexOf((t + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + t);
|
|
return this._writableState.defaultEncoding = t, this;
|
|
}, "setDefaultEncoding");
|
|
function Kte(e, t, r) {
|
|
return !e.objectMode && e.decodeStrings !== !1 && typeof t == "string" && (t = Vh.from(t, r)), t;
|
|
}
|
|
s(Kte, "decodeChunk");
|
|
Object.defineProperty(xr.prototype, "writableHighWaterMark", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState.highWaterMark;
|
|
}, "get")
|
|
});
|
|
function zte(e, t, r, i, n, a) {
|
|
if (!r) {
|
|
var o = Kte(t, i, n);
|
|
i !== o && (r = !0, n = "buffer", i = o);
|
|
}
|
|
var u = t.objectMode ? 1 : i.length;
|
|
t.length += u;
|
|
var l = t.length < t.highWaterMark;
|
|
if (l || (t.needDrain = !0), t.writing || t.corked) {
|
|
var c = t.lastBufferedRequest;
|
|
t.lastBufferedRequest = {
|
|
chunk: i,
|
|
encoding: n,
|
|
isBuf: r,
|
|
callback: a,
|
|
next: null
|
|
}, c ? c.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest, t.bufferedRequestCount += 1;
|
|
} else
|
|
Zv(e, t, !1, u, i, n, a);
|
|
return l;
|
|
}
|
|
s(zte, "writeOrBuffer");
|
|
function Zv(e, t, r, i, n, a, o) {
|
|
t.writelen = i, t.writecb = o, t.writing = !0, t.sync = !0, r ? e._writev(n, t.onwrite) : e._write(n, a, t.onwrite), t.sync = !1;
|
|
}
|
|
s(Zv, "doWrite");
|
|
function Gte(e, t, r, i, n) {
|
|
--t.pendingcb, r ? (To.nextTick(n, i), To.nextTick(mf, e, t), e._writableState.errorEmitted = !0, e.emit("error", i)) : (n(i), e._writableState.
|
|
errorEmitted = !0, e.emit("error", i), mf(e, t));
|
|
}
|
|
s(Gte, "onwriteError");
|
|
function Jte(e) {
|
|
e.writing = !1, e.writecb = null, e.length -= e.writelen, e.writelen = 0;
|
|
}
|
|
s(Jte, "onwriteStateUpdate");
|
|
function Xte(e, t) {
|
|
var r = e._writableState, i = r.sync, n = r.writecb;
|
|
if (Jte(r), t) Gte(e, r, i, t, n);
|
|
else {
|
|
var a = eN(r);
|
|
!a && !r.corked && !r.bufferProcessing && r.bufferedRequest && QB(e, r), i ? jte(GB, e, r, a, n) : GB(e, r, a, n);
|
|
}
|
|
}
|
|
s(Xte, "onwrite");
|
|
function GB(e, t, r, i) {
|
|
r || Yte(e, t), t.pendingcb--, i(), mf(e, t);
|
|
}
|
|
s(GB, "afterWrite");
|
|
function Yte(e, t) {
|
|
t.length === 0 && t.needDrain && (t.needDrain = !1, e.emit("drain"));
|
|
}
|
|
s(Yte, "onwriteDrain");
|
|
function QB(e, t) {
|
|
t.bufferProcessing = !0;
|
|
var r = t.bufferedRequest;
|
|
if (e._writev && r && r.next) {
|
|
var i = t.bufferedRequestCount, n = new Array(i), a = t.corkedRequestsFree;
|
|
a.entry = r;
|
|
for (var o = 0, u = !0; r; )
|
|
n[o] = r, r.isBuf || (u = !1), r = r.next, o += 1;
|
|
n.allBuffers = u, Zv(e, t, !0, t.length, n, "", a.finish), t.pendingcb++, t.lastBufferedRequest = null, a.next ? (t.corkedRequestsFree =
|
|
a.next, a.next = null) : t.corkedRequestsFree = new JB(t), t.bufferedRequestCount = 0;
|
|
} else {
|
|
for (; r; ) {
|
|
var l = r.chunk, c = r.encoding, f = r.callback, m = t.objectMode ? 1 : l.length;
|
|
if (Zv(e, t, !1, m, l, c, f), r = r.next, t.bufferedRequestCount--, t.writing)
|
|
break;
|
|
}
|
|
r === null && (t.lastBufferedRequest = null);
|
|
}
|
|
t.bufferedRequest = r, t.bufferProcessing = !1;
|
|
}
|
|
s(QB, "clearBuffer");
|
|
xr.prototype._write = function(e, t, r) {
|
|
r(new Error("_write() is not implemented"));
|
|
};
|
|
xr.prototype._writev = null;
|
|
xr.prototype.end = function(e, t, r) {
|
|
var i = this._writableState;
|
|
typeof e == "function" ? (r = e, e = null, t = null) : typeof t == "function" && (r = t, t = null), e != null && this.write(e, t), i.corked &&
|
|
(i.corked = 1, this.uncork()), i.ending || ere(this, i, r);
|
|
};
|
|
function eN(e) {
|
|
return e.ending && e.length === 0 && e.bufferedRequest === null && !e.finished && !e.writing;
|
|
}
|
|
s(eN, "needFinish");
|
|
function Zte(e, t) {
|
|
e._final(function(r) {
|
|
t.pendingcb--, r && e.emit("error", r), t.prefinished = !0, e.emit("prefinish"), mf(e, t);
|
|
});
|
|
}
|
|
s(Zte, "callFinal");
|
|
function Qte(e, t) {
|
|
!t.prefinished && !t.finalCalled && (typeof e._final == "function" ? (t.pendingcb++, t.finalCalled = !0, To.nextTick(Zte, e, t)) : (t.prefinished =
|
|
!0, e.emit("prefinish")));
|
|
}
|
|
s(Qte, "prefinish");
|
|
function mf(e, t) {
|
|
var r = eN(t);
|
|
return r && (Qte(e, t), t.pendingcb === 0 && (t.finished = !0, e.emit("finish"))), r;
|
|
}
|
|
s(mf, "finishMaybe");
|
|
function ere(e, t, r) {
|
|
t.ending = !0, mf(e, t), r && (t.finished ? To.nextTick(r) : e.once("finish", r)), t.ended = !0, e.writable = !1;
|
|
}
|
|
s(ere, "endWritable");
|
|
function tre(e, t, r) {
|
|
var i = e.entry;
|
|
for (e.entry = null; i; ) {
|
|
var n = i.callback;
|
|
t.pendingcb--, n(r), i = i.next;
|
|
}
|
|
t.corkedRequestsFree.next = e;
|
|
}
|
|
s(tre, "onCorkedFinish");
|
|
Object.defineProperty(xr.prototype, "destroyed", {
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState === void 0 ? !1 : this._writableState.destroyed;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(e) {
|
|
this._writableState && (this._writableState.destroyed = e);
|
|
}, "set")
|
|
});
|
|
xr.prototype.destroy = ZB.destroy;
|
|
xr.prototype._undestroy = ZB.undestroy;
|
|
xr.prototype._destroy = function(e, t) {
|
|
this.end(), t(e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_duplex.js
|
|
var Co = E((att, sN) => {
|
|
"use strict";
|
|
var rN = Ii(), rre = Object.keys || function(e) {
|
|
var t = [];
|
|
for (var r in e)
|
|
t.push(r);
|
|
return t;
|
|
};
|
|
sN.exports = ws;
|
|
var iN = Object.create(_r());
|
|
iN.inherits = Lt();
|
|
var nN = rE(), tE = Qv();
|
|
iN.inherits(ws, nN);
|
|
for (eE = rre(tE.prototype), Hh = 0; Hh < eE.length; Hh++)
|
|
Kh = eE[Hh], ws.prototype[Kh] || (ws.prototype[Kh] = tE.prototype[Kh]);
|
|
var eE, Kh, Hh;
|
|
function ws(e) {
|
|
if (!(this instanceof ws)) return new ws(e);
|
|
nN.call(this, e), tE.call(this, e), e && e.readable === !1 && (this.readable = !1), e && e.writable === !1 && (this.writable = !1), this.
|
|
allowHalfOpen = !0, e && e.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", ire);
|
|
}
|
|
s(ws, "Duplex");
|
|
Object.defineProperty(ws.prototype, "writableHighWaterMark", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState.highWaterMark;
|
|
}, "get")
|
|
});
|
|
function ire() {
|
|
this.allowHalfOpen || this._writableState.ended || rN.nextTick(nre, this);
|
|
}
|
|
s(ire, "onend");
|
|
function nre(e) {
|
|
e.end();
|
|
}
|
|
s(nre, "onEndNT");
|
|
Object.defineProperty(ws.prototype, "destroyed", {
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState === void 0 || this._writableState === void 0 ? !1 : this._readableState.destroyed && this._writableState.destroyed;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(e) {
|
|
this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = e, this._writableState.destroyed =
|
|
e);
|
|
}, "set")
|
|
});
|
|
ws.prototype._destroy = function(e, t) {
|
|
this.push(null), this.end(), rN.nextTick(t, e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_readable.js
|
|
var rE = E((ltt, gN) => {
|
|
"use strict";
|
|
var ol = Ii();
|
|
gN.exports = Kt;
|
|
var sre = UB(), gf;
|
|
Kt.ReadableState = dN;
|
|
var utt = V("events").EventEmitter, lN = /* @__PURE__ */ s(function(e, t) {
|
|
return e.listeners(t).length;
|
|
}, "EElistenerCount"), oE = Gv(), bf = Lh().Buffer, are = (typeof global < "u" ? global : typeof window < "u" ? window : typeof self < "u" ?
|
|
self : {}).Uint8Array || function() {
|
|
};
|
|
function ore(e) {
|
|
return bf.from(e);
|
|
}
|
|
s(ore, "_uint8ArrayToBuffer");
|
|
function ure(e) {
|
|
return bf.isBuffer(e) || e instanceof are;
|
|
}
|
|
s(ure, "_isUint8Array");
|
|
var cN = Object.create(_r());
|
|
cN.inherits = Lt();
|
|
var iE = V("util"), wt = void 0;
|
|
iE && iE.debuglog ? wt = iE.debuglog("stream") : wt = /* @__PURE__ */ s(function() {
|
|
}, "debug");
|
|
var lre = KB(), fN = Yv(), al;
|
|
cN.inherits(Kt, oE);
|
|
var nE = ["error", "close", "destroy", "pause", "resume"];
|
|
function cre(e, t, r) {
|
|
if (typeof e.prependListener == "function") return e.prependListener(t, r);
|
|
!e._events || !e._events[t] ? e.on(t, r) : sre(e._events[t]) ? e._events[t].unshift(r) : e._events[t] = [r, e._events[t]];
|
|
}
|
|
s(cre, "prependListener");
|
|
function dN(e, t) {
|
|
gf = gf || Co(), e = e || {};
|
|
var r = t instanceof gf;
|
|
this.objectMode = !!e.objectMode, r && (this.objectMode = this.objectMode || !!e.readableObjectMode);
|
|
var i = e.highWaterMark, n = e.readableHighWaterMark, a = this.objectMode ? 16 : 16 * 1024;
|
|
i || i === 0 ? this.highWaterMark = i : r && (n || n === 0) ? this.highWaterMark = n : this.highWaterMark = a, this.highWaterMark = Math.
|
|
floor(this.highWaterMark), this.buffer = new lre(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended =
|
|
!1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening =
|
|
!1, this.resumeScheduled = !1, this.destroyed = !1, this.defaultEncoding = e.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore =
|
|
!1, this.decoder = null, this.encoding = null, e.encoding && (al || (al = V("string_decoder/").StringDecoder), this.decoder = new al(e.encoding),
|
|
this.encoding = e.encoding);
|
|
}
|
|
s(dN, "ReadableState");
|
|
function Kt(e) {
|
|
if (gf = gf || Co(), !(this instanceof Kt)) return new Kt(e);
|
|
this._readableState = new dN(e, this), this.readable = !0, e && (typeof e.read == "function" && (this._read = e.read), typeof e.destroy ==
|
|
"function" && (this._destroy = e.destroy)), oE.call(this);
|
|
}
|
|
s(Kt, "Readable");
|
|
Object.defineProperty(Kt.prototype, "destroyed", {
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState === void 0 ? !1 : this._readableState.destroyed;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(e) {
|
|
this._readableState && (this._readableState.destroyed = e);
|
|
}, "set")
|
|
});
|
|
Kt.prototype.destroy = fN.destroy;
|
|
Kt.prototype._undestroy = fN.undestroy;
|
|
Kt.prototype._destroy = function(e, t) {
|
|
this.push(null), t(e);
|
|
};
|
|
Kt.prototype.push = function(e, t) {
|
|
var r = this._readableState, i;
|
|
return r.objectMode ? i = !0 : typeof e == "string" && (t = t || r.defaultEncoding, t !== r.encoding && (e = bf.from(e, t), t = ""), i =
|
|
!0), pN(this, e, t, !1, i);
|
|
};
|
|
Kt.prototype.unshift = function(e) {
|
|
return pN(this, e, null, !0, !1);
|
|
};
|
|
function pN(e, t, r, i, n) {
|
|
var a = e._readableState;
|
|
if (t === null)
|
|
a.reading = !1, hre(e, a);
|
|
else {
|
|
var o;
|
|
n || (o = fre(a, t)), o ? e.emit("error", o) : a.objectMode || t && t.length > 0 ? (typeof t != "string" && !a.objectMode && Object.getPrototypeOf(
|
|
t) !== bf.prototype && (t = ore(t)), i ? a.endEmitted ? e.emit("error", new Error("stream.unshift() after end event")) : sE(e, a, t, !0) :
|
|
a.ended ? e.emit("error", new Error("stream.push() after EOF")) : (a.reading = !1, a.decoder && !r ? (t = a.decoder.write(t), a.objectMode ||
|
|
t.length !== 0 ? sE(e, a, t, !1) : hN(e, a)) : sE(e, a, t, !1))) : i || (a.reading = !1);
|
|
}
|
|
return dre(a);
|
|
}
|
|
s(pN, "readableAddChunk");
|
|
function sE(e, t, r, i) {
|
|
t.flowing && t.length === 0 && !t.sync ? (e.emit("data", r), e.read(0)) : (t.length += t.objectMode ? 1 : r.length, i ? t.buffer.unshift(
|
|
r) : t.buffer.push(r), t.needReadable && zh(e)), hN(e, t);
|
|
}
|
|
s(sE, "addChunk");
|
|
function fre(e, t) {
|
|
var r;
|
|
return !ure(t) && typeof t != "string" && t !== void 0 && !e.objectMode && (r = new TypeError("Invalid non-string/buffer chunk")), r;
|
|
}
|
|
s(fre, "chunkInvalid");
|
|
function dre(e) {
|
|
return !e.ended && (e.needReadable || e.length < e.highWaterMark || e.length === 0);
|
|
}
|
|
s(dre, "needMoreData");
|
|
Kt.prototype.isPaused = function() {
|
|
return this._readableState.flowing === !1;
|
|
};
|
|
Kt.prototype.setEncoding = function(e) {
|
|
return al || (al = V("string_decoder/").StringDecoder), this._readableState.decoder = new al(e), this._readableState.encoding = e, this;
|
|
};
|
|
var aN = 8388608;
|
|
function pre(e) {
|
|
return e >= aN ? e = aN : (e--, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e++), e;
|
|
}
|
|
s(pre, "computeNewHighWaterMark");
|
|
function oN(e, t) {
|
|
return e <= 0 || t.length === 0 && t.ended ? 0 : t.objectMode ? 1 : e !== e ? t.flowing && t.length ? t.buffer.head.data.length : t.length :
|
|
(e > t.highWaterMark && (t.highWaterMark = pre(e)), e <= t.length ? e : t.ended ? t.length : (t.needReadable = !0, 0));
|
|
}
|
|
s(oN, "howMuchToRead");
|
|
Kt.prototype.read = function(e) {
|
|
wt("read", e), e = parseInt(e, 10);
|
|
var t = this._readableState, r = e;
|
|
if (e !== 0 && (t.emittedReadable = !1), e === 0 && t.needReadable && (t.length >= t.highWaterMark || t.ended))
|
|
return wt("read: emitReadable", t.length, t.ended), t.length === 0 && t.ended ? aE(this) : zh(this), null;
|
|
if (e = oN(e, t), e === 0 && t.ended)
|
|
return t.length === 0 && aE(this), null;
|
|
var i = t.needReadable;
|
|
wt("need readable", i), (t.length === 0 || t.length - e < t.highWaterMark) && (i = !0, wt("length less than watermark", i)), t.ended || t.
|
|
reading ? (i = !1, wt("reading or ended", i)) : i && (wt("do read"), t.reading = !0, t.sync = !0, t.length === 0 && (t.needReadable = !0),
|
|
this._read(t.highWaterMark), t.sync = !1, t.reading || (e = oN(r, t)));
|
|
var n;
|
|
return e > 0 ? n = mN(e, t) : n = null, n === null ? (t.needReadable = !0, e = 0) : t.length -= e, t.length === 0 && (t.ended || (t.needReadable =
|
|
!0), r !== e && t.ended && aE(this)), n !== null && this.emit("data", n), n;
|
|
};
|
|
function hre(e, t) {
|
|
if (!t.ended) {
|
|
if (t.decoder) {
|
|
var r = t.decoder.end();
|
|
r && r.length && (t.buffer.push(r), t.length += t.objectMode ? 1 : r.length);
|
|
}
|
|
t.ended = !0, zh(e);
|
|
}
|
|
}
|
|
s(hre, "onEofChunk");
|
|
function zh(e) {
|
|
var t = e._readableState;
|
|
t.needReadable = !1, t.emittedReadable || (wt("emitReadable", t.flowing), t.emittedReadable = !0, t.sync ? ol.nextTick(uN, e) : uN(e));
|
|
}
|
|
s(zh, "emitReadable");
|
|
function uN(e) {
|
|
wt("emit readable"), e.emit("readable"), uE(e);
|
|
}
|
|
s(uN, "emitReadable_");
|
|
function hN(e, t) {
|
|
t.readingMore || (t.readingMore = !0, ol.nextTick(mre, e, t));
|
|
}
|
|
s(hN, "maybeReadMore");
|
|
function mre(e, t) {
|
|
for (var r = t.length; !t.reading && !t.flowing && !t.ended && t.length < t.highWaterMark && (wt("maybeReadMore read 0"), e.read(0), r !==
|
|
t.length); )
|
|
r = t.length;
|
|
t.readingMore = !1;
|
|
}
|
|
s(mre, "maybeReadMore_");
|
|
Kt.prototype._read = function(e) {
|
|
this.emit("error", new Error("_read() is not implemented"));
|
|
};
|
|
Kt.prototype.pipe = function(e, t) {
|
|
var r = this, i = this._readableState;
|
|
switch (i.pipesCount) {
|
|
case 0:
|
|
i.pipes = e;
|
|
break;
|
|
case 1:
|
|
i.pipes = [i.pipes, e];
|
|
break;
|
|
default:
|
|
i.pipes.push(e);
|
|
break;
|
|
}
|
|
i.pipesCount += 1, wt("pipe count=%d opts=%j", i.pipesCount, t);
|
|
var n = (!t || t.end !== !1) && e !== process.stdout && e !== process.stderr, a = n ? u : g;
|
|
i.endEmitted ? ol.nextTick(a) : r.once("end", a), e.on("unpipe", o);
|
|
function o(b, D) {
|
|
wt("onunpipe"), b === r && D && D.hasUnpiped === !1 && (D.hasUnpiped = !0, f());
|
|
}
|
|
s(o, "onunpipe");
|
|
function u() {
|
|
wt("onend"), e.end();
|
|
}
|
|
s(u, "onend");
|
|
var l = yre(r);
|
|
e.on("drain", l);
|
|
var c = !1;
|
|
function f() {
|
|
wt("cleanup"), e.removeListener("close", y), e.removeListener("finish", p), e.removeListener("drain", l), e.removeListener("error", d),
|
|
e.removeListener("unpipe", o), r.removeListener("end", u), r.removeListener("end", g), r.removeListener("data", h), c = !0, i.awaitDrain &&
|
|
(!e._writableState || e._writableState.needDrain) && l();
|
|
}
|
|
s(f, "cleanup");
|
|
var m = !1;
|
|
r.on("data", h);
|
|
function h(b) {
|
|
wt("ondata"), m = !1;
|
|
var D = e.write(b);
|
|
D === !1 && !m && ((i.pipesCount === 1 && i.pipes === e || i.pipesCount > 1 && yN(i.pipes, e) !== -1) && !c && (wt("false write respon\
|
|
se, pause", i.awaitDrain), i.awaitDrain++, m = !0), r.pause());
|
|
}
|
|
s(h, "ondata");
|
|
function d(b) {
|
|
wt("onerror", b), g(), e.removeListener("error", d), lN(e, "error") === 0 && e.emit("error", b);
|
|
}
|
|
s(d, "onerror"), cre(e, "error", d);
|
|
function y() {
|
|
e.removeListener("finish", p), g();
|
|
}
|
|
s(y, "onclose"), e.once("close", y);
|
|
function p() {
|
|
wt("onfinish"), e.removeListener("close", y), g();
|
|
}
|
|
s(p, "onfinish"), e.once("finish", p);
|
|
function g() {
|
|
wt("unpipe"), r.unpipe(e);
|
|
}
|
|
return s(g, "unpipe"), e.emit("pipe", r), i.flowing || (wt("pipe resume"), r.resume()), e;
|
|
};
|
|
function yre(e) {
|
|
return function() {
|
|
var t = e._readableState;
|
|
wt("pipeOnDrain", t.awaitDrain), t.awaitDrain && t.awaitDrain--, t.awaitDrain === 0 && lN(e, "data") && (t.flowing = !0, uE(e));
|
|
};
|
|
}
|
|
s(yre, "pipeOnDrain");
|
|
Kt.prototype.unpipe = function(e) {
|
|
var t = this._readableState, r = { hasUnpiped: !1 };
|
|
if (t.pipesCount === 0) return this;
|
|
if (t.pipesCount === 1)
|
|
return e && e !== t.pipes ? this : (e || (e = t.pipes), t.pipes = null, t.pipesCount = 0, t.flowing = !1, e && e.emit("unpipe", this, r),
|
|
this);
|
|
if (!e) {
|
|
var i = t.pipes, n = t.pipesCount;
|
|
t.pipes = null, t.pipesCount = 0, t.flowing = !1;
|
|
for (var a = 0; a < n; a++)
|
|
i[a].emit("unpipe", this, { hasUnpiped: !1 });
|
|
return this;
|
|
}
|
|
var o = yN(t.pipes, e);
|
|
return o === -1 ? this : (t.pipes.splice(o, 1), t.pipesCount -= 1, t.pipesCount === 1 && (t.pipes = t.pipes[0]), e.emit("unpipe", this, r),
|
|
this);
|
|
};
|
|
Kt.prototype.on = function(e, t) {
|
|
var r = oE.prototype.on.call(this, e, t);
|
|
if (e === "data")
|
|
this._readableState.flowing !== !1 && this.resume();
|
|
else if (e === "readable") {
|
|
var i = this._readableState;
|
|
!i.endEmitted && !i.readableListening && (i.readableListening = i.needReadable = !0, i.emittedReadable = !1, i.reading ? i.length && zh(
|
|
this) : ol.nextTick(gre, this));
|
|
}
|
|
return r;
|
|
};
|
|
Kt.prototype.addListener = Kt.prototype.on;
|
|
function gre(e) {
|
|
wt("readable nexttick read 0"), e.read(0);
|
|
}
|
|
s(gre, "nReadingNextTick");
|
|
Kt.prototype.resume = function() {
|
|
var e = this._readableState;
|
|
return e.flowing || (wt("resume"), e.flowing = !0, bre(this, e)), this;
|
|
};
|
|
function bre(e, t) {
|
|
t.resumeScheduled || (t.resumeScheduled = !0, ol.nextTick(Dre, e, t));
|
|
}
|
|
s(bre, "resume");
|
|
function Dre(e, t) {
|
|
t.reading || (wt("resume read 0"), e.read(0)), t.resumeScheduled = !1, t.awaitDrain = 0, e.emit("resume"), uE(e), t.flowing && !t.reading &&
|
|
e.read(0);
|
|
}
|
|
s(Dre, "resume_");
|
|
Kt.prototype.pause = function() {
|
|
return wt("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (wt("pause"), this._readableState.
|
|
flowing = !1, this.emit("pause")), this;
|
|
};
|
|
function uE(e) {
|
|
var t = e._readableState;
|
|
for (wt("flow", t.flowing); t.flowing && e.read() !== null; )
|
|
;
|
|
}
|
|
s(uE, "flow");
|
|
Kt.prototype.wrap = function(e) {
|
|
var t = this, r = this._readableState, i = !1;
|
|
e.on("end", function() {
|
|
if (wt("wrapped end"), r.decoder && !r.ended) {
|
|
var o = r.decoder.end();
|
|
o && o.length && t.push(o);
|
|
}
|
|
t.push(null);
|
|
}), e.on("data", function(o) {
|
|
if (wt("wrapped data"), r.decoder && (o = r.decoder.write(o)), !(r.objectMode && o == null) && !(!r.objectMode && (!o || !o.length))) {
|
|
var u = t.push(o);
|
|
u || (i = !0, e.pause());
|
|
}
|
|
});
|
|
for (var n in e)
|
|
this[n] === void 0 && typeof e[n] == "function" && (this[n] = /* @__PURE__ */ function(o) {
|
|
return function() {
|
|
return e[o].apply(e, arguments);
|
|
};
|
|
}(n));
|
|
for (var a = 0; a < nE.length; a++)
|
|
e.on(nE[a], this.emit.bind(this, nE[a]));
|
|
return this._read = function(o) {
|
|
wt("wrapped _read", o), i && (i = !1, e.resume());
|
|
}, this;
|
|
};
|
|
Object.defineProperty(Kt.prototype, "readableHighWaterMark", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState.highWaterMark;
|
|
}, "get")
|
|
});
|
|
Kt._fromList = mN;
|
|
function mN(e, t) {
|
|
if (t.length === 0) return null;
|
|
var r;
|
|
return t.objectMode ? r = t.buffer.shift() : !e || e >= t.length ? (t.decoder ? r = t.buffer.join("") : t.buffer.length === 1 ? r = t.buffer.
|
|
head.data : r = t.buffer.concat(t.length), t.buffer.clear()) : r = vre(e, t.buffer, t.decoder), r;
|
|
}
|
|
s(mN, "fromList");
|
|
function vre(e, t, r) {
|
|
var i;
|
|
return e < t.head.data.length ? (i = t.head.data.slice(0, e), t.head.data = t.head.data.slice(e)) : e === t.head.data.length ? i = t.shift() :
|
|
i = r ? Ere(e, t) : xre(e, t), i;
|
|
}
|
|
s(vre, "fromListPartial");
|
|
function Ere(e, t) {
|
|
var r = t.head, i = 1, n = r.data;
|
|
for (e -= n.length; r = r.next; ) {
|
|
var a = r.data, o = e > a.length ? a.length : e;
|
|
if (o === a.length ? n += a : n += a.slice(0, e), e -= o, e === 0) {
|
|
o === a.length ? (++i, r.next ? t.head = r.next : t.head = t.tail = null) : (t.head = r, r.data = a.slice(o));
|
|
break;
|
|
}
|
|
++i;
|
|
}
|
|
return t.length -= i, n;
|
|
}
|
|
s(Ere, "copyFromBufferString");
|
|
function xre(e, t) {
|
|
var r = bf.allocUnsafe(e), i = t.head, n = 1;
|
|
for (i.data.copy(r), e -= i.data.length; i = i.next; ) {
|
|
var a = i.data, o = e > a.length ? a.length : e;
|
|
if (a.copy(r, r.length - e, 0, o), e -= o, e === 0) {
|
|
o === a.length ? (++n, i.next ? t.head = i.next : t.head = t.tail = null) : (t.head = i, i.data = a.slice(o));
|
|
break;
|
|
}
|
|
++n;
|
|
}
|
|
return t.length -= n, r;
|
|
}
|
|
s(xre, "copyFromBuffer");
|
|
function aE(e) {
|
|
var t = e._readableState;
|
|
if (t.length > 0) throw new Error('"endReadable()" called on non-empty stream');
|
|
t.endEmitted || (t.ended = !0, ol.nextTick(Sre, t, e));
|
|
}
|
|
s(aE, "endReadable");
|
|
function Sre(e, t) {
|
|
!e.endEmitted && e.length === 0 && (e.endEmitted = !0, t.readable = !1, t.emit("end"));
|
|
}
|
|
s(Sre, "endReadableNT");
|
|
function yN(e, t) {
|
|
for (var r = 0, i = e.length; r < i; r++)
|
|
if (e[r] === t) return r;
|
|
return -1;
|
|
}
|
|
s(yN, "indexOf");
|
|
});
|
|
|
|
// ../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_transform.js
|
|
var lE = E((ftt, vN) => {
|
|
"use strict";
|
|
vN.exports = As;
|
|
var Gh = Co(), DN = Object.create(_r());
|
|
DN.inherits = Lt();
|
|
DN.inherits(As, Gh);
|
|
function Tre(e, t) {
|
|
var r = this._transformState;
|
|
r.transforming = !1;
|
|
var i = r.writecb;
|
|
if (!i)
|
|
return this.emit("error", new Error("write callback called multiple times"));
|
|
r.writechunk = null, r.writecb = null, t != null && this.push(t), i(e);
|
|
var n = this._readableState;
|
|
n.reading = !1, (n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark);
|
|
}
|
|
s(Tre, "afterTransform");
|
|
function As(e) {
|
|
if (!(this instanceof As)) return new As(e);
|
|
Gh.call(this, e), this._transformState = {
|
|
afterTransform: Tre.bind(this),
|
|
needTransform: !1,
|
|
transforming: !1,
|
|
writecb: null,
|
|
writechunk: null,
|
|
writeencoding: null
|
|
}, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.
|
|
transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish", Cre);
|
|
}
|
|
s(As, "Transform");
|
|
function Cre() {
|
|
var e = this;
|
|
typeof this._flush == "function" ? this._flush(function(t, r) {
|
|
bN(e, t, r);
|
|
}) : bN(this, null, null);
|
|
}
|
|
s(Cre, "prefinish");
|
|
As.prototype.push = function(e, t) {
|
|
return this._transformState.needTransform = !1, Gh.prototype.push.call(this, e, t);
|
|
};
|
|
As.prototype._transform = function(e, t, r) {
|
|
throw new Error("_transform() is not implemented");
|
|
};
|
|
As.prototype._write = function(e, t, r) {
|
|
var i = this._transformState;
|
|
if (i.writecb = r, i.writechunk = e, i.writeencoding = t, !i.transforming) {
|
|
var n = this._readableState;
|
|
(i.needTransform || n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark);
|
|
}
|
|
};
|
|
As.prototype._read = function(e) {
|
|
var t = this._transformState;
|
|
t.writechunk !== null && t.writecb && !t.transforming ? (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)) :
|
|
t.needTransform = !0;
|
|
};
|
|
As.prototype._destroy = function(e, t) {
|
|
var r = this;
|
|
Gh.prototype._destroy.call(this, e, function(i) {
|
|
t(i), r.emit("close");
|
|
});
|
|
};
|
|
function bN(e, t, r) {
|
|
if (t) return e.emit("error", t);
|
|
if (r != null && e.push(r), e._writableState.length) throw new Error("Calling transform done when ws.length != 0");
|
|
if (e._transformState.transforming) throw new Error("Calling transform done when still transforming");
|
|
return e.push(null);
|
|
}
|
|
s(bN, "done");
|
|
});
|
|
|
|
// ../node_modules/peek-stream/node_modules/readable-stream/lib/_stream_passthrough.js
|
|
var TN = E((ptt, SN) => {
|
|
"use strict";
|
|
SN.exports = Df;
|
|
var EN = lE(), xN = Object.create(_r());
|
|
xN.inherits = Lt();
|
|
xN.inherits(Df, EN);
|
|
function Df(e) {
|
|
if (!(this instanceof Df)) return new Df(e);
|
|
EN.call(this, e);
|
|
}
|
|
s(Df, "PassThrough");
|
|
Df.prototype._transform = function(e, t, r) {
|
|
r(null, e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/peek-stream/node_modules/readable-stream/readable.js
|
|
var CN = E((Ur, Jh) => {
|
|
var Kn = V("stream");
|
|
process.env.READABLE_STREAM === "disable" && Kn ? (Jh.exports = Kn, Ur = Jh.exports = Kn.Readable, Ur.Readable = Kn.Readable, Ur.Writable =
|
|
Kn.Writable, Ur.Duplex = Kn.Duplex, Ur.Transform = Kn.Transform, Ur.PassThrough = Kn.PassThrough, Ur.Stream = Kn) : (Ur = Jh.exports = rE(),
|
|
Ur.Stream = Kn || Ur, Ur.Readable = Ur, Ur.Writable = Qv(), Ur.Duplex = Co(), Ur.Transform = lE(), Ur.PassThrough = TN());
|
|
});
|
|
|
|
// ../node_modules/stream-shift/index.js
|
|
var cE = E((mtt, wN) => {
|
|
wN.exports = wre;
|
|
function wre(e) {
|
|
var t = e._readableState;
|
|
return t ? t.objectMode || typeof e._duplexState == "number" ? e.read() : e.read(Are(t)) : null;
|
|
}
|
|
s(wre, "shift");
|
|
function Are(e) {
|
|
if (e.buffer.length) {
|
|
var t = e.bufferIndex || 0;
|
|
if (e.buffer.head)
|
|
return e.buffer.head.data.length;
|
|
if (e.buffer.length - t > 0 && e.buffer[t])
|
|
return e.buffer[t].length;
|
|
}
|
|
return e.length;
|
|
}
|
|
s(Are, "getStateLength");
|
|
});
|
|
|
|
// ../node_modules/peek-stream/node_modules/duplexify/index.js
|
|
var IN = E((gtt, FN) => {
|
|
var Xh = CN(), AN = zu(), _re = Lt(), Pre = cE(), _N = Buffer.from && Buffer.from !== Uint8Array.from ? Buffer.from([0]) : new Buffer([0]),
|
|
fE = /* @__PURE__ */ s(function(e, t) {
|
|
e._corked ? e.once("uncork", t) : t();
|
|
}, "onuncork"), Fre = /* @__PURE__ */ s(function(e, t) {
|
|
e._autoDestroy && e.destroy(t);
|
|
}, "autoDestroy"), PN = /* @__PURE__ */ s(function(e, t) {
|
|
return function(r) {
|
|
r ? Fre(e, r.message === "premature close" ? null : r) : t && !e._ended && e.end();
|
|
};
|
|
}, "destroyer"), Ire = /* @__PURE__ */ s(function(e, t) {
|
|
if (!e || e._writableState && e._writableState.finished) return t();
|
|
if (e._writableState) return e.end(t);
|
|
e.end(), t();
|
|
}, "end"), Ore = /* @__PURE__ */ s(function(e) {
|
|
return new Xh.Readable({ objectMode: !0, highWaterMark: 16 }).wrap(e);
|
|
}, "toStreams2"), Wr = /* @__PURE__ */ s(function(e, t, r) {
|
|
if (!(this instanceof Wr)) return new Wr(e, t, r);
|
|
Xh.Duplex.call(this, r), this._writable = null, this._readable = null, this._readable2 = null, this._autoDestroy = !r || r.autoDestroy !==
|
|
!1, this._forwardDestroy = !r || r.destroy !== !1, this._forwardEnd = !r || r.end !== !1, this._corked = 1, this._ondrain = null, this._drained =
|
|
!1, this._forwarding = !1, this._unwrite = null, this._unread = null, this._ended = !1, this.destroyed = !1, e && this.setWritable(e), t &&
|
|
this.setReadable(t);
|
|
}, "Duplexify");
|
|
_re(Wr, Xh.Duplex);
|
|
Wr.obj = function(e, t, r) {
|
|
return r || (r = {}), r.objectMode = !0, r.highWaterMark = 16, new Wr(e, t, r);
|
|
};
|
|
Wr.prototype.cork = function() {
|
|
++this._corked === 1 && this.emit("cork");
|
|
};
|
|
Wr.prototype.uncork = function() {
|
|
this._corked && --this._corked === 0 && this.emit("uncork");
|
|
};
|
|
Wr.prototype.setWritable = function(e) {
|
|
if (this._unwrite && this._unwrite(), this.destroyed) {
|
|
e && e.destroy && e.destroy();
|
|
return;
|
|
}
|
|
if (e === null || e === !1) {
|
|
this.end();
|
|
return;
|
|
}
|
|
var t = this, r = AN(e, { writable: !0, readable: !1 }, PN(this, this._forwardEnd)), i = /* @__PURE__ */ s(function() {
|
|
var a = t._ondrain;
|
|
t._ondrain = null, a && a();
|
|
}, "ondrain"), n = /* @__PURE__ */ s(function() {
|
|
t._writable.removeListener("drain", i), r();
|
|
}, "clear");
|
|
this._unwrite && process.nextTick(i), this._writable = e, this._writable.on("drain", i), this._unwrite = n, this.uncork();
|
|
};
|
|
Wr.prototype.setReadable = function(e) {
|
|
if (this._unread && this._unread(), this.destroyed) {
|
|
e && e.destroy && e.destroy();
|
|
return;
|
|
}
|
|
if (e === null || e === !1) {
|
|
this.push(null), this.resume();
|
|
return;
|
|
}
|
|
var t = this, r = AN(e, { writable: !1, readable: !0 }, PN(this)), i = /* @__PURE__ */ s(function() {
|
|
t._forward();
|
|
}, "onreadable"), n = /* @__PURE__ */ s(function() {
|
|
t.push(null);
|
|
}, "onend"), a = /* @__PURE__ */ s(function() {
|
|
t._readable2.removeListener("readable", i), t._readable2.removeListener("end", n), r();
|
|
}, "clear");
|
|
this._drained = !0, this._readable = e, this._readable2 = e._readableState ? e : Ore(e), this._readable2.on("readable", i), this._readable2.
|
|
on("end", n), this._unread = a, this._forward();
|
|
};
|
|
Wr.prototype._read = function() {
|
|
this._drained = !0, this._forward();
|
|
};
|
|
Wr.prototype._forward = function() {
|
|
if (!(this._forwarding || !this._readable2 || !this._drained)) {
|
|
this._forwarding = !0;
|
|
for (var e; this._drained && (e = Pre(this._readable2)) !== null; )
|
|
this.destroyed || (this._drained = this.push(e));
|
|
this._forwarding = !1;
|
|
}
|
|
};
|
|
Wr.prototype.destroy = function(e) {
|
|
if (!this.destroyed) {
|
|
this.destroyed = !0;
|
|
var t = this;
|
|
process.nextTick(function() {
|
|
t._destroy(e);
|
|
});
|
|
}
|
|
};
|
|
Wr.prototype._destroy = function(e) {
|
|
if (e) {
|
|
var t = this._ondrain;
|
|
this._ondrain = null, t ? t(e) : this.emit("error", e);
|
|
}
|
|
this._forwardDestroy && (this._readable && this._readable.destroy && this._readable.destroy(), this._writable && this._writable.destroy &&
|
|
this._writable.destroy()), this.emit("close");
|
|
};
|
|
Wr.prototype._write = function(e, t, r) {
|
|
if (this.destroyed) return r();
|
|
if (this._corked) return fE(this, this._write.bind(this, e, t, r));
|
|
if (e === _N) return this._finish(r);
|
|
if (!this._writable) return r();
|
|
this._writable.write(e) === !1 ? this._ondrain = r : r();
|
|
};
|
|
Wr.prototype._finish = function(e) {
|
|
var t = this;
|
|
this.emit("preend"), fE(this, function() {
|
|
Ire(t._forwardEnd && t._writable, function() {
|
|
t._writableState.prefinished === !1 && (t._writableState.prefinished = !0), t.emit("prefinish"), fE(t, e);
|
|
});
|
|
});
|
|
};
|
|
Wr.prototype.end = function(e, t, r) {
|
|
return typeof e == "function" ? this.end(null, null, e) : typeof t == "function" ? this.end(e, null, t) : (this._ended = !0, e && this.write(
|
|
e), this._writableState.ending || this.write(_N), Xh.Writable.prototype.end.call(this, r));
|
|
};
|
|
FN.exports = Wr;
|
|
});
|
|
|
|
// ../node_modules/through2/node_modules/isarray/index.js
|
|
var kN = E((Dtt, ON) => {
|
|
var kre = {}.toString;
|
|
ON.exports = Array.isArray || function(e) {
|
|
return kre.call(e) == "[object Array]";
|
|
};
|
|
});
|
|
|
|
// ../node_modules/through2/node_modules/readable-stream/lib/internal/streams/stream.js
|
|
var dE = E((vtt, BN) => {
|
|
BN.exports = V("stream");
|
|
});
|
|
|
|
// ../node_modules/through2/node_modules/safe-buffer/index.js
|
|
var Zh = E((pE, MN) => {
|
|
var Yh = V("buffer"), _s = Yh.Buffer;
|
|
function NN(e, t) {
|
|
for (var r in e)
|
|
t[r] = e[r];
|
|
}
|
|
s(NN, "copyProps");
|
|
_s.from && _s.alloc && _s.allocUnsafe && _s.allocUnsafeSlow ? MN.exports = Yh : (NN(Yh, pE), pE.Buffer = ul);
|
|
function ul(e, t, r) {
|
|
return _s(e, t, r);
|
|
}
|
|
s(ul, "SafeBuffer");
|
|
NN(_s, ul);
|
|
ul.from = function(e, t, r) {
|
|
if (typeof e == "number")
|
|
throw new TypeError("Argument must not be a number");
|
|
return _s(e, t, r);
|
|
};
|
|
ul.alloc = function(e, t, r) {
|
|
if (typeof e != "number")
|
|
throw new TypeError("Argument must be a number");
|
|
var i = _s(e);
|
|
return t !== void 0 ? typeof r == "string" ? i.fill(t, r) : i.fill(t) : i.fill(0), i;
|
|
};
|
|
ul.allocUnsafe = function(e) {
|
|
if (typeof e != "number")
|
|
throw new TypeError("Argument must be a number");
|
|
return _s(e);
|
|
};
|
|
ul.allocUnsafeSlow = function(e) {
|
|
if (typeof e != "number")
|
|
throw new TypeError("Argument must be a number");
|
|
return Yh.SlowBuffer(e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/through2/node_modules/readable-stream/lib/internal/streams/BufferList.js
|
|
var jN = E((xtt, hE) => {
|
|
"use strict";
|
|
function Bre(e, t) {
|
|
if (!(e instanceof t))
|
|
throw new TypeError("Cannot call a class as a function");
|
|
}
|
|
s(Bre, "_classCallCheck");
|
|
var RN = Zh().Buffer, vf = V("util");
|
|
function Nre(e, t, r) {
|
|
e.copy(t, r);
|
|
}
|
|
s(Nre, "copyBuffer");
|
|
hE.exports = function() {
|
|
function e() {
|
|
Bre(this, e), this.head = null, this.tail = null, this.length = 0;
|
|
}
|
|
return s(e, "BufferList"), e.prototype.push = /* @__PURE__ */ s(function(r) {
|
|
var i = { data: r, next: null };
|
|
this.length > 0 ? this.tail.next = i : this.head = i, this.tail = i, ++this.length;
|
|
}, "push"), e.prototype.unshift = /* @__PURE__ */ s(function(r) {
|
|
var i = { data: r, next: this.head };
|
|
this.length === 0 && (this.tail = i), this.head = i, ++this.length;
|
|
}, "unshift"), e.prototype.shift = /* @__PURE__ */ s(function() {
|
|
if (this.length !== 0) {
|
|
var r = this.head.data;
|
|
return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, r;
|
|
}
|
|
}, "shift"), e.prototype.clear = /* @__PURE__ */ s(function() {
|
|
this.head = this.tail = null, this.length = 0;
|
|
}, "clear"), e.prototype.join = /* @__PURE__ */ s(function(r) {
|
|
if (this.length === 0) return "";
|
|
for (var i = this.head, n = "" + i.data; i = i.next; )
|
|
n += r + i.data;
|
|
return n;
|
|
}, "join"), e.prototype.concat = /* @__PURE__ */ s(function(r) {
|
|
if (this.length === 0) return RN.alloc(0);
|
|
for (var i = RN.allocUnsafe(r >>> 0), n = this.head, a = 0; n; )
|
|
Nre(n.data, i, a), a += n.data.length, n = n.next;
|
|
return i;
|
|
}, "concat"), e;
|
|
}();
|
|
vf && vf.inspect && vf.inspect.custom && (hE.exports.prototype[vf.inspect.custom] = function() {
|
|
var e = vf.inspect({ length: this.length });
|
|
return this.constructor.name + " " + e;
|
|
});
|
|
});
|
|
|
|
// ../node_modules/through2/node_modules/readable-stream/lib/internal/streams/destroy.js
|
|
var mE = E((Ttt, LN) => {
|
|
"use strict";
|
|
var Qh = Ii();
|
|
function Mre(e, t) {
|
|
var r = this, i = this._readableState && this._readableState.destroyed, n = this._writableState && this._writableState.destroyed;
|
|
return i || n ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, Qh.nextTick(
|
|
em, this, e)) : Qh.nextTick(em, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this.
|
|
_writableState.destroyed = !0), this._destroy(e || null, function(a) {
|
|
!t && a ? r._writableState ? r._writableState.errorEmitted || (r._writableState.errorEmitted = !0, Qh.nextTick(em, r, a)) : Qh.nextTick(
|
|
em, r, a) : t && t(a);
|
|
}), this);
|
|
}
|
|
s(Mre, "destroy");
|
|
function Rre() {
|
|
this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.
|
|
endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending =
|
|
!1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted =
|
|
!1);
|
|
}
|
|
s(Rre, "undestroy");
|
|
function em(e, t) {
|
|
e.emit("error", t);
|
|
}
|
|
s(em, "emitErrorNT");
|
|
LN.exports = {
|
|
destroy: Mre,
|
|
undestroy: Rre
|
|
};
|
|
});
|
|
|
|
// ../node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js
|
|
var gE = E((wtt, zN) => {
|
|
"use strict";
|
|
var wo = Ii();
|
|
zN.exports = Sr;
|
|
function UN(e) {
|
|
var t = this;
|
|
this.next = null, this.entry = null, this.finish = function() {
|
|
tie(t, e);
|
|
};
|
|
}
|
|
s(UN, "CorkedRequest");
|
|
var jre = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : wo.nextTick, ll;
|
|
Sr.WritableState = xf;
|
|
var WN = Object.create(_r());
|
|
WN.inherits = Lt();
|
|
var Lre = {
|
|
deprecate: Zc()
|
|
}, $N = dE(), rm = Zh().Buffer, qre = (typeof global < "u" ? global : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array ||
|
|
function() {
|
|
};
|
|
function Ure(e) {
|
|
return rm.from(e);
|
|
}
|
|
s(Ure, "_uint8ArrayToBuffer");
|
|
function Wre(e) {
|
|
return rm.isBuffer(e) || e instanceof qre;
|
|
}
|
|
s(Wre, "_isUint8Array");
|
|
var VN = mE();
|
|
WN.inherits(Sr, $N);
|
|
function $re() {
|
|
}
|
|
s($re, "nop");
|
|
function xf(e, t) {
|
|
ll = ll || Ao(), e = e || {};
|
|
var r = t instanceof ll;
|
|
this.objectMode = !!e.objectMode, r && (this.objectMode = this.objectMode || !!e.writableObjectMode);
|
|
var i = e.highWaterMark, n = e.writableHighWaterMark, a = this.objectMode ? 16 : 16 * 1024;
|
|
i || i === 0 ? this.highWaterMark = i : r && (n || n === 0) ? this.highWaterMark = n : this.highWaterMark = a, this.highWaterMark = Math.
|
|
floor(this.highWaterMark), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed =
|
|
!1;
|
|
var o = e.decodeStrings === !1;
|
|
this.decodeStrings = !o, this.defaultEncoding = e.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync =
|
|
!0, this.bufferProcessing = !1, this.onwrite = function(u) {
|
|
Xre(t, u);
|
|
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished =
|
|
!1, this.errorEmitted = !1, this.bufferedRequestCount = 0, this.corkedRequestsFree = new UN(this);
|
|
}
|
|
s(xf, "WritableState");
|
|
xf.prototype.getBuffer = /* @__PURE__ */ s(function() {
|
|
for (var t = this.bufferedRequest, r = []; t; )
|
|
r.push(t), t = t.next;
|
|
return r;
|
|
}, "getBuffer");
|
|
(function() {
|
|
try {
|
|
Object.defineProperty(xf.prototype, "buffer", {
|
|
get: Lre.deprecate(function() {
|
|
return this.getBuffer();
|
|
}, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
|
|
});
|
|
} catch {
|
|
}
|
|
})();
|
|
var tm;
|
|
typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (tm = Function.prototype[Symbol.
|
|
hasInstance], Object.defineProperty(Sr, Symbol.hasInstance, {
|
|
value: /* @__PURE__ */ s(function(e) {
|
|
return tm.call(this, e) ? !0 : this !== Sr ? !1 : e && e._writableState instanceof xf;
|
|
}, "value")
|
|
})) : tm = /* @__PURE__ */ s(function(e) {
|
|
return e instanceof this;
|
|
}, "realHasInstance");
|
|
function Sr(e) {
|
|
if (ll = ll || Ao(), !tm.call(Sr, this) && !(this instanceof ll))
|
|
return new Sr(e);
|
|
this._writableState = new xf(e, this), this.writable = !0, e && (typeof e.write == "function" && (this._write = e.write), typeof e.writev ==
|
|
"function" && (this._writev = e.writev), typeof e.destroy == "function" && (this._destroy = e.destroy), typeof e.final == "function" && (this.
|
|
_final = e.final)), $N.call(this);
|
|
}
|
|
s(Sr, "Writable");
|
|
Sr.prototype.pipe = function() {
|
|
this.emit("error", new Error("Cannot pipe, not readable"));
|
|
};
|
|
function Vre(e, t) {
|
|
var r = new Error("write after end");
|
|
e.emit("error", r), wo.nextTick(t, r);
|
|
}
|
|
s(Vre, "writeAfterEnd");
|
|
function Hre(e, t, r, i) {
|
|
var n = !0, a = !1;
|
|
return r === null ? a = new TypeError("May not write null values to stream") : typeof r != "string" && r !== void 0 && !t.objectMode && (a =
|
|
new TypeError("Invalid non-string/buffer chunk")), a && (e.emit("error", a), wo.nextTick(i, a), n = !1), n;
|
|
}
|
|
s(Hre, "validChunk");
|
|
Sr.prototype.write = function(e, t, r) {
|
|
var i = this._writableState, n = !1, a = !i.objectMode && Wre(e);
|
|
return a && !rm.isBuffer(e) && (e = Ure(e)), typeof t == "function" && (r = t, t = null), a ? t = "buffer" : t || (t = i.defaultEncoding),
|
|
typeof r != "function" && (r = $re), i.ended ? Vre(this, r) : (a || Hre(this, i, e, r)) && (i.pendingcb++, n = zre(this, i, a, e, t, r)),
|
|
n;
|
|
};
|
|
Sr.prototype.cork = function() {
|
|
var e = this._writableState;
|
|
e.corked++;
|
|
};
|
|
Sr.prototype.uncork = function() {
|
|
var e = this._writableState;
|
|
e.corked && (e.corked--, !e.writing && !e.corked && !e.bufferProcessing && e.bufferedRequest && HN(this, e));
|
|
};
|
|
Sr.prototype.setDefaultEncoding = /* @__PURE__ */ s(function(t) {
|
|
if (typeof t == "string" && (t = t.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "\
|
|
utf-16le", "raw"].indexOf((t + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + t);
|
|
return this._writableState.defaultEncoding = t, this;
|
|
}, "setDefaultEncoding");
|
|
function Kre(e, t, r) {
|
|
return !e.objectMode && e.decodeStrings !== !1 && typeof t == "string" && (t = rm.from(t, r)), t;
|
|
}
|
|
s(Kre, "decodeChunk");
|
|
Object.defineProperty(Sr.prototype, "writableHighWaterMark", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState.highWaterMark;
|
|
}, "get")
|
|
});
|
|
function zre(e, t, r, i, n, a) {
|
|
if (!r) {
|
|
var o = Kre(t, i, n);
|
|
i !== o && (r = !0, n = "buffer", i = o);
|
|
}
|
|
var u = t.objectMode ? 1 : i.length;
|
|
t.length += u;
|
|
var l = t.length < t.highWaterMark;
|
|
if (l || (t.needDrain = !0), t.writing || t.corked) {
|
|
var c = t.lastBufferedRequest;
|
|
t.lastBufferedRequest = {
|
|
chunk: i,
|
|
encoding: n,
|
|
isBuf: r,
|
|
callback: a,
|
|
next: null
|
|
}, c ? c.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest, t.bufferedRequestCount += 1;
|
|
} else
|
|
yE(e, t, !1, u, i, n, a);
|
|
return l;
|
|
}
|
|
s(zre, "writeOrBuffer");
|
|
function yE(e, t, r, i, n, a, o) {
|
|
t.writelen = i, t.writecb = o, t.writing = !0, t.sync = !0, r ? e._writev(n, t.onwrite) : e._write(n, a, t.onwrite), t.sync = !1;
|
|
}
|
|
s(yE, "doWrite");
|
|
function Gre(e, t, r, i, n) {
|
|
--t.pendingcb, r ? (wo.nextTick(n, i), wo.nextTick(Ef, e, t), e._writableState.errorEmitted = !0, e.emit("error", i)) : (n(i), e._writableState.
|
|
errorEmitted = !0, e.emit("error", i), Ef(e, t));
|
|
}
|
|
s(Gre, "onwriteError");
|
|
function Jre(e) {
|
|
e.writing = !1, e.writecb = null, e.length -= e.writelen, e.writelen = 0;
|
|
}
|
|
s(Jre, "onwriteStateUpdate");
|
|
function Xre(e, t) {
|
|
var r = e._writableState, i = r.sync, n = r.writecb;
|
|
if (Jre(r), t) Gre(e, r, i, t, n);
|
|
else {
|
|
var a = KN(r);
|
|
!a && !r.corked && !r.bufferProcessing && r.bufferedRequest && HN(e, r), i ? jre(qN, e, r, a, n) : qN(e, r, a, n);
|
|
}
|
|
}
|
|
s(Xre, "onwrite");
|
|
function qN(e, t, r, i) {
|
|
r || Yre(e, t), t.pendingcb--, i(), Ef(e, t);
|
|
}
|
|
s(qN, "afterWrite");
|
|
function Yre(e, t) {
|
|
t.length === 0 && t.needDrain && (t.needDrain = !1, e.emit("drain"));
|
|
}
|
|
s(Yre, "onwriteDrain");
|
|
function HN(e, t) {
|
|
t.bufferProcessing = !0;
|
|
var r = t.bufferedRequest;
|
|
if (e._writev && r && r.next) {
|
|
var i = t.bufferedRequestCount, n = new Array(i), a = t.corkedRequestsFree;
|
|
a.entry = r;
|
|
for (var o = 0, u = !0; r; )
|
|
n[o] = r, r.isBuf || (u = !1), r = r.next, o += 1;
|
|
n.allBuffers = u, yE(e, t, !0, t.length, n, "", a.finish), t.pendingcb++, t.lastBufferedRequest = null, a.next ? (t.corkedRequestsFree =
|
|
a.next, a.next = null) : t.corkedRequestsFree = new UN(t), t.bufferedRequestCount = 0;
|
|
} else {
|
|
for (; r; ) {
|
|
var l = r.chunk, c = r.encoding, f = r.callback, m = t.objectMode ? 1 : l.length;
|
|
if (yE(e, t, !1, m, l, c, f), r = r.next, t.bufferedRequestCount--, t.writing)
|
|
break;
|
|
}
|
|
r === null && (t.lastBufferedRequest = null);
|
|
}
|
|
t.bufferedRequest = r, t.bufferProcessing = !1;
|
|
}
|
|
s(HN, "clearBuffer");
|
|
Sr.prototype._write = function(e, t, r) {
|
|
r(new Error("_write() is not implemented"));
|
|
};
|
|
Sr.prototype._writev = null;
|
|
Sr.prototype.end = function(e, t, r) {
|
|
var i = this._writableState;
|
|
typeof e == "function" ? (r = e, e = null, t = null) : typeof t == "function" && (r = t, t = null), e != null && this.write(e, t), i.corked &&
|
|
(i.corked = 1, this.uncork()), i.ending || eie(this, i, r);
|
|
};
|
|
function KN(e) {
|
|
return e.ending && e.length === 0 && e.bufferedRequest === null && !e.finished && !e.writing;
|
|
}
|
|
s(KN, "needFinish");
|
|
function Zre(e, t) {
|
|
e._final(function(r) {
|
|
t.pendingcb--, r && e.emit("error", r), t.prefinished = !0, e.emit("prefinish"), Ef(e, t);
|
|
});
|
|
}
|
|
s(Zre, "callFinal");
|
|
function Qre(e, t) {
|
|
!t.prefinished && !t.finalCalled && (typeof e._final == "function" ? (t.pendingcb++, t.finalCalled = !0, wo.nextTick(Zre, e, t)) : (t.prefinished =
|
|
!0, e.emit("prefinish")));
|
|
}
|
|
s(Qre, "prefinish");
|
|
function Ef(e, t) {
|
|
var r = KN(t);
|
|
return r && (Qre(e, t), t.pendingcb === 0 && (t.finished = !0, e.emit("finish"))), r;
|
|
}
|
|
s(Ef, "finishMaybe");
|
|
function eie(e, t, r) {
|
|
t.ending = !0, Ef(e, t), r && (t.finished ? wo.nextTick(r) : e.once("finish", r)), t.ended = !0, e.writable = !1;
|
|
}
|
|
s(eie, "endWritable");
|
|
function tie(e, t, r) {
|
|
var i = e.entry;
|
|
for (e.entry = null; i; ) {
|
|
var n = i.callback;
|
|
t.pendingcb--, n(r), i = i.next;
|
|
}
|
|
t.corkedRequestsFree.next = e;
|
|
}
|
|
s(tie, "onCorkedFinish");
|
|
Object.defineProperty(Sr.prototype, "destroyed", {
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState === void 0 ? !1 : this._writableState.destroyed;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(e) {
|
|
this._writableState && (this._writableState.destroyed = e);
|
|
}, "set")
|
|
});
|
|
Sr.prototype.destroy = VN.destroy;
|
|
Sr.prototype._undestroy = VN.undestroy;
|
|
Sr.prototype._destroy = function(e, t) {
|
|
this.end(), t(e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js
|
|
var Ao = E((_tt, YN) => {
|
|
"use strict";
|
|
var GN = Ii(), rie = Object.keys || function(e) {
|
|
var t = [];
|
|
for (var r in e)
|
|
t.push(r);
|
|
return t;
|
|
};
|
|
YN.exports = Ps;
|
|
var JN = Object.create(_r());
|
|
JN.inherits = Lt();
|
|
var XN = vE(), DE = gE();
|
|
JN.inherits(Ps, XN);
|
|
for (bE = rie(DE.prototype), im = 0; im < bE.length; im++)
|
|
nm = bE[im], Ps.prototype[nm] || (Ps.prototype[nm] = DE.prototype[nm]);
|
|
var bE, nm, im;
|
|
function Ps(e) {
|
|
if (!(this instanceof Ps)) return new Ps(e);
|
|
XN.call(this, e), DE.call(this, e), e && e.readable === !1 && (this.readable = !1), e && e.writable === !1 && (this.writable = !1), this.
|
|
allowHalfOpen = !0, e && e.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", iie);
|
|
}
|
|
s(Ps, "Duplex");
|
|
Object.defineProperty(Ps.prototype, "writableHighWaterMark", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState.highWaterMark;
|
|
}, "get")
|
|
});
|
|
function iie() {
|
|
this.allowHalfOpen || this._writableState.ended || GN.nextTick(nie, this);
|
|
}
|
|
s(iie, "onend");
|
|
function nie(e) {
|
|
e.end();
|
|
}
|
|
s(nie, "onEndNT");
|
|
Object.defineProperty(Ps.prototype, "destroyed", {
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState === void 0 || this._writableState === void 0 ? !1 : this._readableState.destroyed && this._writableState.destroyed;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(e) {
|
|
this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = e, this._writableState.destroyed =
|
|
e);
|
|
}, "set")
|
|
});
|
|
Ps.prototype._destroy = function(e, t) {
|
|
this.push(null), this.end(), GN.nextTick(t, e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js
|
|
var vE = E((Itt, l8) => {
|
|
"use strict";
|
|
var fl = Ii();
|
|
l8.exports = zt;
|
|
var sie = kN(), Sf;
|
|
zt.ReadableState = n8;
|
|
var Ftt = V("events").EventEmitter, t8 = /* @__PURE__ */ s(function(e, t) {
|
|
return e.listeners(t).length;
|
|
}, "EElistenerCount"), CE = dE(), Tf = Zh().Buffer, aie = (typeof global < "u" ? global : typeof window < "u" ? window : typeof self < "u" ?
|
|
self : {}).Uint8Array || function() {
|
|
};
|
|
function oie(e) {
|
|
return Tf.from(e);
|
|
}
|
|
s(oie, "_uint8ArrayToBuffer");
|
|
function uie(e) {
|
|
return Tf.isBuffer(e) || e instanceof aie;
|
|
}
|
|
s(uie, "_isUint8Array");
|
|
var r8 = Object.create(_r());
|
|
r8.inherits = Lt();
|
|
var EE = V("util"), At = void 0;
|
|
EE && EE.debuglog ? At = EE.debuglog("stream") : At = /* @__PURE__ */ s(function() {
|
|
}, "debug");
|
|
var lie = jN(), i8 = mE(), cl;
|
|
r8.inherits(zt, CE);
|
|
var xE = ["error", "close", "destroy", "pause", "resume"];
|
|
function cie(e, t, r) {
|
|
if (typeof e.prependListener == "function") return e.prependListener(t, r);
|
|
!e._events || !e._events[t] ? e.on(t, r) : sie(e._events[t]) ? e._events[t].unshift(r) : e._events[t] = [r, e._events[t]];
|
|
}
|
|
s(cie, "prependListener");
|
|
function n8(e, t) {
|
|
Sf = Sf || Ao(), e = e || {};
|
|
var r = t instanceof Sf;
|
|
this.objectMode = !!e.objectMode, r && (this.objectMode = this.objectMode || !!e.readableObjectMode);
|
|
var i = e.highWaterMark, n = e.readableHighWaterMark, a = this.objectMode ? 16 : 16 * 1024;
|
|
i || i === 0 ? this.highWaterMark = i : r && (n || n === 0) ? this.highWaterMark = n : this.highWaterMark = a, this.highWaterMark = Math.
|
|
floor(this.highWaterMark), this.buffer = new lie(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended =
|
|
!1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening =
|
|
!1, this.resumeScheduled = !1, this.destroyed = !1, this.defaultEncoding = e.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore =
|
|
!1, this.decoder = null, this.encoding = null, e.encoding && (cl || (cl = V("string_decoder/").StringDecoder), this.decoder = new cl(e.encoding),
|
|
this.encoding = e.encoding);
|
|
}
|
|
s(n8, "ReadableState");
|
|
function zt(e) {
|
|
if (Sf = Sf || Ao(), !(this instanceof zt)) return new zt(e);
|
|
this._readableState = new n8(e, this), this.readable = !0, e && (typeof e.read == "function" && (this._read = e.read), typeof e.destroy ==
|
|
"function" && (this._destroy = e.destroy)), CE.call(this);
|
|
}
|
|
s(zt, "Readable");
|
|
Object.defineProperty(zt.prototype, "destroyed", {
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState === void 0 ? !1 : this._readableState.destroyed;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(e) {
|
|
this._readableState && (this._readableState.destroyed = e);
|
|
}, "set")
|
|
});
|
|
zt.prototype.destroy = i8.destroy;
|
|
zt.prototype._undestroy = i8.undestroy;
|
|
zt.prototype._destroy = function(e, t) {
|
|
this.push(null), t(e);
|
|
};
|
|
zt.prototype.push = function(e, t) {
|
|
var r = this._readableState, i;
|
|
return r.objectMode ? i = !0 : typeof e == "string" && (t = t || r.defaultEncoding, t !== r.encoding && (e = Tf.from(e, t), t = ""), i =
|
|
!0), s8(this, e, t, !1, i);
|
|
};
|
|
zt.prototype.unshift = function(e) {
|
|
return s8(this, e, null, !0, !1);
|
|
};
|
|
function s8(e, t, r, i, n) {
|
|
var a = e._readableState;
|
|
if (t === null)
|
|
a.reading = !1, hie(e, a);
|
|
else {
|
|
var o;
|
|
n || (o = fie(a, t)), o ? e.emit("error", o) : a.objectMode || t && t.length > 0 ? (typeof t != "string" && !a.objectMode && Object.getPrototypeOf(
|
|
t) !== Tf.prototype && (t = oie(t)), i ? a.endEmitted ? e.emit("error", new Error("stream.unshift() after end event")) : SE(e, a, t, !0) :
|
|
a.ended ? e.emit("error", new Error("stream.push() after EOF")) : (a.reading = !1, a.decoder && !r ? (t = a.decoder.write(t), a.objectMode ||
|
|
t.length !== 0 ? SE(e, a, t, !1) : a8(e, a)) : SE(e, a, t, !1))) : i || (a.reading = !1);
|
|
}
|
|
return die(a);
|
|
}
|
|
s(s8, "readableAddChunk");
|
|
function SE(e, t, r, i) {
|
|
t.flowing && t.length === 0 && !t.sync ? (e.emit("data", r), e.read(0)) : (t.length += t.objectMode ? 1 : r.length, i ? t.buffer.unshift(
|
|
r) : t.buffer.push(r), t.needReadable && sm(e)), a8(e, t);
|
|
}
|
|
s(SE, "addChunk");
|
|
function fie(e, t) {
|
|
var r;
|
|
return !uie(t) && typeof t != "string" && t !== void 0 && !e.objectMode && (r = new TypeError("Invalid non-string/buffer chunk")), r;
|
|
}
|
|
s(fie, "chunkInvalid");
|
|
function die(e) {
|
|
return !e.ended && (e.needReadable || e.length < e.highWaterMark || e.length === 0);
|
|
}
|
|
s(die, "needMoreData");
|
|
zt.prototype.isPaused = function() {
|
|
return this._readableState.flowing === !1;
|
|
};
|
|
zt.prototype.setEncoding = function(e) {
|
|
return cl || (cl = V("string_decoder/").StringDecoder), this._readableState.decoder = new cl(e), this._readableState.encoding = e, this;
|
|
};
|
|
var ZN = 8388608;
|
|
function pie(e) {
|
|
return e >= ZN ? e = ZN : (e--, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e++), e;
|
|
}
|
|
s(pie, "computeNewHighWaterMark");
|
|
function QN(e, t) {
|
|
return e <= 0 || t.length === 0 && t.ended ? 0 : t.objectMode ? 1 : e !== e ? t.flowing && t.length ? t.buffer.head.data.length : t.length :
|
|
(e > t.highWaterMark && (t.highWaterMark = pie(e)), e <= t.length ? e : t.ended ? t.length : (t.needReadable = !0, 0));
|
|
}
|
|
s(QN, "howMuchToRead");
|
|
zt.prototype.read = function(e) {
|
|
At("read", e), e = parseInt(e, 10);
|
|
var t = this._readableState, r = e;
|
|
if (e !== 0 && (t.emittedReadable = !1), e === 0 && t.needReadable && (t.length >= t.highWaterMark || t.ended))
|
|
return At("read: emitReadable", t.length, t.ended), t.length === 0 && t.ended ? TE(this) : sm(this), null;
|
|
if (e = QN(e, t), e === 0 && t.ended)
|
|
return t.length === 0 && TE(this), null;
|
|
var i = t.needReadable;
|
|
At("need readable", i), (t.length === 0 || t.length - e < t.highWaterMark) && (i = !0, At("length less than watermark", i)), t.ended || t.
|
|
reading ? (i = !1, At("reading or ended", i)) : i && (At("do read"), t.reading = !0, t.sync = !0, t.length === 0 && (t.needReadable = !0),
|
|
this._read(t.highWaterMark), t.sync = !1, t.reading || (e = QN(r, t)));
|
|
var n;
|
|
return e > 0 ? n = o8(e, t) : n = null, n === null ? (t.needReadable = !0, e = 0) : t.length -= e, t.length === 0 && (t.ended || (t.needReadable =
|
|
!0), r !== e && t.ended && TE(this)), n !== null && this.emit("data", n), n;
|
|
};
|
|
function hie(e, t) {
|
|
if (!t.ended) {
|
|
if (t.decoder) {
|
|
var r = t.decoder.end();
|
|
r && r.length && (t.buffer.push(r), t.length += t.objectMode ? 1 : r.length);
|
|
}
|
|
t.ended = !0, sm(e);
|
|
}
|
|
}
|
|
s(hie, "onEofChunk");
|
|
function sm(e) {
|
|
var t = e._readableState;
|
|
t.needReadable = !1, t.emittedReadable || (At("emitReadable", t.flowing), t.emittedReadable = !0, t.sync ? fl.nextTick(e8, e) : e8(e));
|
|
}
|
|
s(sm, "emitReadable");
|
|
function e8(e) {
|
|
At("emit readable"), e.emit("readable"), wE(e);
|
|
}
|
|
s(e8, "emitReadable_");
|
|
function a8(e, t) {
|
|
t.readingMore || (t.readingMore = !0, fl.nextTick(mie, e, t));
|
|
}
|
|
s(a8, "maybeReadMore");
|
|
function mie(e, t) {
|
|
for (var r = t.length; !t.reading && !t.flowing && !t.ended && t.length < t.highWaterMark && (At("maybeReadMore read 0"), e.read(0), r !==
|
|
t.length); )
|
|
r = t.length;
|
|
t.readingMore = !1;
|
|
}
|
|
s(mie, "maybeReadMore_");
|
|
zt.prototype._read = function(e) {
|
|
this.emit("error", new Error("_read() is not implemented"));
|
|
};
|
|
zt.prototype.pipe = function(e, t) {
|
|
var r = this, i = this._readableState;
|
|
switch (i.pipesCount) {
|
|
case 0:
|
|
i.pipes = e;
|
|
break;
|
|
case 1:
|
|
i.pipes = [i.pipes, e];
|
|
break;
|
|
default:
|
|
i.pipes.push(e);
|
|
break;
|
|
}
|
|
i.pipesCount += 1, At("pipe count=%d opts=%j", i.pipesCount, t);
|
|
var n = (!t || t.end !== !1) && e !== process.stdout && e !== process.stderr, a = n ? u : g;
|
|
i.endEmitted ? fl.nextTick(a) : r.once("end", a), e.on("unpipe", o);
|
|
function o(b, D) {
|
|
At("onunpipe"), b === r && D && D.hasUnpiped === !1 && (D.hasUnpiped = !0, f());
|
|
}
|
|
s(o, "onunpipe");
|
|
function u() {
|
|
At("onend"), e.end();
|
|
}
|
|
s(u, "onend");
|
|
var l = yie(r);
|
|
e.on("drain", l);
|
|
var c = !1;
|
|
function f() {
|
|
At("cleanup"), e.removeListener("close", y), e.removeListener("finish", p), e.removeListener("drain", l), e.removeListener("error", d),
|
|
e.removeListener("unpipe", o), r.removeListener("end", u), r.removeListener("end", g), r.removeListener("data", h), c = !0, i.awaitDrain &&
|
|
(!e._writableState || e._writableState.needDrain) && l();
|
|
}
|
|
s(f, "cleanup");
|
|
var m = !1;
|
|
r.on("data", h);
|
|
function h(b) {
|
|
At("ondata"), m = !1;
|
|
var D = e.write(b);
|
|
D === !1 && !m && ((i.pipesCount === 1 && i.pipes === e || i.pipesCount > 1 && u8(i.pipes, e) !== -1) && !c && (At("false write respon\
|
|
se, pause", i.awaitDrain), i.awaitDrain++, m = !0), r.pause());
|
|
}
|
|
s(h, "ondata");
|
|
function d(b) {
|
|
At("onerror", b), g(), e.removeListener("error", d), t8(e, "error") === 0 && e.emit("error", b);
|
|
}
|
|
s(d, "onerror"), cie(e, "error", d);
|
|
function y() {
|
|
e.removeListener("finish", p), g();
|
|
}
|
|
s(y, "onclose"), e.once("close", y);
|
|
function p() {
|
|
At("onfinish"), e.removeListener("close", y), g();
|
|
}
|
|
s(p, "onfinish"), e.once("finish", p);
|
|
function g() {
|
|
At("unpipe"), r.unpipe(e);
|
|
}
|
|
return s(g, "unpipe"), e.emit("pipe", r), i.flowing || (At("pipe resume"), r.resume()), e;
|
|
};
|
|
function yie(e) {
|
|
return function() {
|
|
var t = e._readableState;
|
|
At("pipeOnDrain", t.awaitDrain), t.awaitDrain && t.awaitDrain--, t.awaitDrain === 0 && t8(e, "data") && (t.flowing = !0, wE(e));
|
|
};
|
|
}
|
|
s(yie, "pipeOnDrain");
|
|
zt.prototype.unpipe = function(e) {
|
|
var t = this._readableState, r = { hasUnpiped: !1 };
|
|
if (t.pipesCount === 0) return this;
|
|
if (t.pipesCount === 1)
|
|
return e && e !== t.pipes ? this : (e || (e = t.pipes), t.pipes = null, t.pipesCount = 0, t.flowing = !1, e && e.emit("unpipe", this, r),
|
|
this);
|
|
if (!e) {
|
|
var i = t.pipes, n = t.pipesCount;
|
|
t.pipes = null, t.pipesCount = 0, t.flowing = !1;
|
|
for (var a = 0; a < n; a++)
|
|
i[a].emit("unpipe", this, { hasUnpiped: !1 });
|
|
return this;
|
|
}
|
|
var o = u8(t.pipes, e);
|
|
return o === -1 ? this : (t.pipes.splice(o, 1), t.pipesCount -= 1, t.pipesCount === 1 && (t.pipes = t.pipes[0]), e.emit("unpipe", this, r),
|
|
this);
|
|
};
|
|
zt.prototype.on = function(e, t) {
|
|
var r = CE.prototype.on.call(this, e, t);
|
|
if (e === "data")
|
|
this._readableState.flowing !== !1 && this.resume();
|
|
else if (e === "readable") {
|
|
var i = this._readableState;
|
|
!i.endEmitted && !i.readableListening && (i.readableListening = i.needReadable = !0, i.emittedReadable = !1, i.reading ? i.length && sm(
|
|
this) : fl.nextTick(gie, this));
|
|
}
|
|
return r;
|
|
};
|
|
zt.prototype.addListener = zt.prototype.on;
|
|
function gie(e) {
|
|
At("readable nexttick read 0"), e.read(0);
|
|
}
|
|
s(gie, "nReadingNextTick");
|
|
zt.prototype.resume = function() {
|
|
var e = this._readableState;
|
|
return e.flowing || (At("resume"), e.flowing = !0, bie(this, e)), this;
|
|
};
|
|
function bie(e, t) {
|
|
t.resumeScheduled || (t.resumeScheduled = !0, fl.nextTick(Die, e, t));
|
|
}
|
|
s(bie, "resume");
|
|
function Die(e, t) {
|
|
t.reading || (At("resume read 0"), e.read(0)), t.resumeScheduled = !1, t.awaitDrain = 0, e.emit("resume"), wE(e), t.flowing && !t.reading &&
|
|
e.read(0);
|
|
}
|
|
s(Die, "resume_");
|
|
zt.prototype.pause = function() {
|
|
return At("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (At("pause"), this._readableState.
|
|
flowing = !1, this.emit("pause")), this;
|
|
};
|
|
function wE(e) {
|
|
var t = e._readableState;
|
|
for (At("flow", t.flowing); t.flowing && e.read() !== null; )
|
|
;
|
|
}
|
|
s(wE, "flow");
|
|
zt.prototype.wrap = function(e) {
|
|
var t = this, r = this._readableState, i = !1;
|
|
e.on("end", function() {
|
|
if (At("wrapped end"), r.decoder && !r.ended) {
|
|
var o = r.decoder.end();
|
|
o && o.length && t.push(o);
|
|
}
|
|
t.push(null);
|
|
}), e.on("data", function(o) {
|
|
if (At("wrapped data"), r.decoder && (o = r.decoder.write(o)), !(r.objectMode && o == null) && !(!r.objectMode && (!o || !o.length))) {
|
|
var u = t.push(o);
|
|
u || (i = !0, e.pause());
|
|
}
|
|
});
|
|
for (var n in e)
|
|
this[n] === void 0 && typeof e[n] == "function" && (this[n] = /* @__PURE__ */ function(o) {
|
|
return function() {
|
|
return e[o].apply(e, arguments);
|
|
};
|
|
}(n));
|
|
for (var a = 0; a < xE.length; a++)
|
|
e.on(xE[a], this.emit.bind(this, xE[a]));
|
|
return this._read = function(o) {
|
|
At("wrapped _read", o), i && (i = !1, e.resume());
|
|
}, this;
|
|
};
|
|
Object.defineProperty(zt.prototype, "readableHighWaterMark", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState.highWaterMark;
|
|
}, "get")
|
|
});
|
|
zt._fromList = o8;
|
|
function o8(e, t) {
|
|
if (t.length === 0) return null;
|
|
var r;
|
|
return t.objectMode ? r = t.buffer.shift() : !e || e >= t.length ? (t.decoder ? r = t.buffer.join("") : t.buffer.length === 1 ? r = t.buffer.
|
|
head.data : r = t.buffer.concat(t.length), t.buffer.clear()) : r = vie(e, t.buffer, t.decoder), r;
|
|
}
|
|
s(o8, "fromList");
|
|
function vie(e, t, r) {
|
|
var i;
|
|
return e < t.head.data.length ? (i = t.head.data.slice(0, e), t.head.data = t.head.data.slice(e)) : e === t.head.data.length ? i = t.shift() :
|
|
i = r ? Eie(e, t) : xie(e, t), i;
|
|
}
|
|
s(vie, "fromListPartial");
|
|
function Eie(e, t) {
|
|
var r = t.head, i = 1, n = r.data;
|
|
for (e -= n.length; r = r.next; ) {
|
|
var a = r.data, o = e > a.length ? a.length : e;
|
|
if (o === a.length ? n += a : n += a.slice(0, e), e -= o, e === 0) {
|
|
o === a.length ? (++i, r.next ? t.head = r.next : t.head = t.tail = null) : (t.head = r, r.data = a.slice(o));
|
|
break;
|
|
}
|
|
++i;
|
|
}
|
|
return t.length -= i, n;
|
|
}
|
|
s(Eie, "copyFromBufferString");
|
|
function xie(e, t) {
|
|
var r = Tf.allocUnsafe(e), i = t.head, n = 1;
|
|
for (i.data.copy(r), e -= i.data.length; i = i.next; ) {
|
|
var a = i.data, o = e > a.length ? a.length : e;
|
|
if (a.copy(r, r.length - e, 0, o), e -= o, e === 0) {
|
|
o === a.length ? (++n, i.next ? t.head = i.next : t.head = t.tail = null) : (t.head = i, i.data = a.slice(o));
|
|
break;
|
|
}
|
|
++n;
|
|
}
|
|
return t.length -= n, r;
|
|
}
|
|
s(xie, "copyFromBuffer");
|
|
function TE(e) {
|
|
var t = e._readableState;
|
|
if (t.length > 0) throw new Error('"endReadable()" called on non-empty stream');
|
|
t.endEmitted || (t.ended = !0, fl.nextTick(Sie, t, e));
|
|
}
|
|
s(TE, "endReadable");
|
|
function Sie(e, t) {
|
|
!e.endEmitted && e.length === 0 && (e.endEmitted = !0, t.readable = !1, t.emit("end"));
|
|
}
|
|
s(Sie, "endReadableNT");
|
|
function u8(e, t) {
|
|
for (var r = 0, i = e.length; r < i; r++)
|
|
if (e[r] === t) return r;
|
|
return -1;
|
|
}
|
|
s(u8, "indexOf");
|
|
});
|
|
|
|
// ../node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js
|
|
var AE = E((ktt, d8) => {
|
|
"use strict";
|
|
d8.exports = Fs;
|
|
var am = Ao(), f8 = Object.create(_r());
|
|
f8.inherits = Lt();
|
|
f8.inherits(Fs, am);
|
|
function Tie(e, t) {
|
|
var r = this._transformState;
|
|
r.transforming = !1;
|
|
var i = r.writecb;
|
|
if (!i)
|
|
return this.emit("error", new Error("write callback called multiple times"));
|
|
r.writechunk = null, r.writecb = null, t != null && this.push(t), i(e);
|
|
var n = this._readableState;
|
|
n.reading = !1, (n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark);
|
|
}
|
|
s(Tie, "afterTransform");
|
|
function Fs(e) {
|
|
if (!(this instanceof Fs)) return new Fs(e);
|
|
am.call(this, e), this._transformState = {
|
|
afterTransform: Tie.bind(this),
|
|
needTransform: !1,
|
|
transforming: !1,
|
|
writecb: null,
|
|
writechunk: null,
|
|
writeencoding: null
|
|
}, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.
|
|
transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish", Cie);
|
|
}
|
|
s(Fs, "Transform");
|
|
function Cie() {
|
|
var e = this;
|
|
typeof this._flush == "function" ? this._flush(function(t, r) {
|
|
c8(e, t, r);
|
|
}) : c8(this, null, null);
|
|
}
|
|
s(Cie, "prefinish");
|
|
Fs.prototype.push = function(e, t) {
|
|
return this._transformState.needTransform = !1, am.prototype.push.call(this, e, t);
|
|
};
|
|
Fs.prototype._transform = function(e, t, r) {
|
|
throw new Error("_transform() is not implemented");
|
|
};
|
|
Fs.prototype._write = function(e, t, r) {
|
|
var i = this._transformState;
|
|
if (i.writecb = r, i.writechunk = e, i.writeencoding = t, !i.transforming) {
|
|
var n = this._readableState;
|
|
(i.needTransform || n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark);
|
|
}
|
|
};
|
|
Fs.prototype._read = function(e) {
|
|
var t = this._transformState;
|
|
t.writechunk !== null && t.writecb && !t.transforming ? (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)) :
|
|
t.needTransform = !0;
|
|
};
|
|
Fs.prototype._destroy = function(e, t) {
|
|
var r = this;
|
|
am.prototype._destroy.call(this, e, function(i) {
|
|
t(i), r.emit("close");
|
|
});
|
|
};
|
|
function c8(e, t, r) {
|
|
if (t) return e.emit("error", t);
|
|
if (r != null && e.push(r), e._writableState.length) throw new Error("Calling transform done when ws.length != 0");
|
|
if (e._transformState.transforming) throw new Error("Calling transform done when still transforming");
|
|
return e.push(null);
|
|
}
|
|
s(c8, "done");
|
|
});
|
|
|
|
// ../node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js
|
|
var y8 = E((Ntt, m8) => {
|
|
"use strict";
|
|
m8.exports = Cf;
|
|
var p8 = AE(), h8 = Object.create(_r());
|
|
h8.inherits = Lt();
|
|
h8.inherits(Cf, p8);
|
|
function Cf(e) {
|
|
if (!(this instanceof Cf)) return new Cf(e);
|
|
p8.call(this, e);
|
|
}
|
|
s(Cf, "PassThrough");
|
|
Cf.prototype._transform = function(e, t, r) {
|
|
r(null, e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/through2/node_modules/readable-stream/readable.js
|
|
var g8 = E(($r, om) => {
|
|
var zn = V("stream");
|
|
process.env.READABLE_STREAM === "disable" && zn ? (om.exports = zn, $r = om.exports = zn.Readable, $r.Readable = zn.Readable, $r.Writable =
|
|
zn.Writable, $r.Duplex = zn.Duplex, $r.Transform = zn.Transform, $r.PassThrough = zn.PassThrough, $r.Stream = zn) : ($r = om.exports = vE(),
|
|
$r.Stream = zn || $r, $r.Readable = $r, $r.Writable = gE(), $r.Duplex = Ao(), $r.Transform = AE(), $r.PassThrough = y8());
|
|
});
|
|
|
|
// ../node_modules/xtend/immutable.js
|
|
var D8 = E((Rtt, b8) => {
|
|
b8.exports = Aie;
|
|
var wie = Object.prototype.hasOwnProperty;
|
|
function Aie() {
|
|
for (var e = {}, t = 0; t < arguments.length; t++) {
|
|
var r = arguments[t];
|
|
for (var i in r)
|
|
wie.call(r, i) && (e[i] = r[i]);
|
|
}
|
|
return e;
|
|
}
|
|
s(Aie, "extend");
|
|
});
|
|
|
|
// ../node_modules/through2/through2.js
|
|
var PE = E((Ltt, um) => {
|
|
var v8 = g8().Transform, E8 = V("util").inherits, x8 = D8();
|
|
function dl(e) {
|
|
v8.call(this, e), this._destroyed = !1;
|
|
}
|
|
s(dl, "DestroyableTransform");
|
|
E8(dl, v8);
|
|
dl.prototype.destroy = function(e) {
|
|
if (!this._destroyed) {
|
|
this._destroyed = !0;
|
|
var t = this;
|
|
process.nextTick(function() {
|
|
e && t.emit("error", e), t.emit("close");
|
|
});
|
|
}
|
|
};
|
|
function _ie(e, t, r) {
|
|
r(null, e);
|
|
}
|
|
s(_ie, "noop");
|
|
function _E(e) {
|
|
return function(t, r, i) {
|
|
return typeof t == "function" && (i = r, r = t, t = {}), typeof r != "function" && (r = _ie), typeof i != "function" && (i = null), e(
|
|
t, r, i);
|
|
};
|
|
}
|
|
s(_E, "through2");
|
|
um.exports = _E(function(e, t, r) {
|
|
var i = new dl(e);
|
|
return i._transform = t, r && (i._flush = r), i;
|
|
});
|
|
um.exports.ctor = _E(function(e, t, r) {
|
|
function i(n) {
|
|
if (!(this instanceof i))
|
|
return new i(n);
|
|
this.options = x8(e, n), dl.call(this, this.options);
|
|
}
|
|
return s(i, "Through2"), E8(i, dl), i.prototype._transform = t, r && (i.prototype._flush = r), i;
|
|
});
|
|
um.exports.obj = _E(function(e, t, r) {
|
|
var i = new dl(x8({ objectMode: !0, highWaterMark: 16 }, e));
|
|
return i._transform = t, r && (i._flush = r), i;
|
|
});
|
|
});
|
|
|
|
// ../node_modules/buffer-from/index.js
|
|
var T8 = E((Utt, S8) => {
|
|
var Pie = Object.prototype.toString, FE = typeof Buffer < "u" && typeof Buffer.alloc == "function" && typeof Buffer.allocUnsafe == "functi\
|
|
on" && typeof Buffer.from == "function";
|
|
function Fie(e) {
|
|
return Pie.call(e).slice(8, -1) === "ArrayBuffer";
|
|
}
|
|
s(Fie, "isArrayBuffer");
|
|
function Iie(e, t, r) {
|
|
t >>>= 0;
|
|
var i = e.byteLength - t;
|
|
if (i < 0)
|
|
throw new RangeError("'offset' is out of bounds");
|
|
if (r === void 0)
|
|
r = i;
|
|
else if (r >>>= 0, r > i)
|
|
throw new RangeError("'length' is out of bounds");
|
|
return FE ? Buffer.from(e.slice(t, t + r)) : new Buffer(new Uint8Array(e.slice(t, t + r)));
|
|
}
|
|
s(Iie, "fromArrayBuffer");
|
|
function Oie(e, t) {
|
|
if ((typeof t != "string" || t === "") && (t = "utf8"), !Buffer.isEncoding(t))
|
|
throw new TypeError('"encoding" must be a valid string encoding');
|
|
return FE ? Buffer.from(e, t) : new Buffer(e, t);
|
|
}
|
|
s(Oie, "fromString");
|
|
function kie(e, t, r) {
|
|
if (typeof e == "number")
|
|
throw new TypeError('"value" argument must not be a number');
|
|
return Fie(e) ? Iie(e, t, r) : typeof e == "string" ? Oie(e, t) : FE ? Buffer.from(e) : new Buffer(e);
|
|
}
|
|
s(kie, "bufferFrom");
|
|
S8.exports = kie;
|
|
});
|
|
|
|
// ../node_modules/peek-stream/index.js
|
|
var A8 = E(($tt, w8) => {
|
|
var Bie = IN(), Nie = PE(), Mie = T8(), Rie = /* @__PURE__ */ s(function(e) {
|
|
return !Buffer.isBuffer(e) && typeof e != "string";
|
|
}, "isObject"), C8 = /* @__PURE__ */ s(function(e, t) {
|
|
if (typeof e == "number" && (e = { maxBuffer: e }), typeof e == "function") return C8(null, e);
|
|
e || (e = {});
|
|
var r = typeof e.maxBuffer == "number" ? e.maxBuffer : 65535, i = e.strict, n = e.newline !== !1, a = [], o = 0, u = Bie.obj(), l = Nie.
|
|
obj({ highWaterMark: 1 }, function(m, h, d) {
|
|
if (Rie(m)) return f(m, null, d);
|
|
if (Buffer.isBuffer(m) || (m = Mie(m)), n) {
|
|
var y = Array.prototype.indexOf.call(m, 10);
|
|
if (y > 0 && m[y - 1] === 13 && y--, y > -1)
|
|
return a.push(m.slice(0, y)), f(Buffer.concat(a), m.slice(y), d);
|
|
}
|
|
if (a.push(m), o += m.length, o < r) return d();
|
|
if (i) return d(new Error("No newline found"));
|
|
f(Buffer.concat(a), null, d);
|
|
}), c = /* @__PURE__ */ s(function() {
|
|
if (i) return u.destroy(new Error("No newline found"));
|
|
u.cork(), f(Buffer.concat(a), null, function(m) {
|
|
if (m) return u.destroy(m);
|
|
u.uncork();
|
|
});
|
|
}, "onpreend"), f = /* @__PURE__ */ s(function(m, h, d) {
|
|
u.removeListener("preend", c), t(m, function(y, p) {
|
|
if (y) return d(y);
|
|
u.setWritable(p), u.setReadable(p), m && p.write(m), h && p.write(h), h = a = l = null, d();
|
|
});
|
|
}, "ready");
|
|
return u.on("preend", c), u.setWritable(l), u;
|
|
}, "peek");
|
|
w8.exports = C8;
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/pump/index.js
|
|
var F8 = E((Htt, P8) => {
|
|
var jie = ph(), Lie = zu(), IE = V("fs"), wf = /* @__PURE__ */ s(function() {
|
|
}, "noop"), qie = /^v?\.0/.test(process.version), lm = /* @__PURE__ */ s(function(e) {
|
|
return typeof e == "function";
|
|
}, "isFn"), Uie = /* @__PURE__ */ s(function(e) {
|
|
return !qie || !IE ? !1 : (e instanceof (IE.ReadStream || wf) || e instanceof (IE.WriteStream || wf)) && lm(e.close);
|
|
}, "isFS"), Wie = /* @__PURE__ */ s(function(e) {
|
|
return e.setHeader && lm(e.abort);
|
|
}, "isRequest"), $ie = /* @__PURE__ */ s(function(e, t, r, i) {
|
|
i = jie(i);
|
|
var n = !1;
|
|
e.on("close", function() {
|
|
n = !0;
|
|
}), Lie(e, { readable: t, writable: r }, function(o) {
|
|
if (o) return i(o);
|
|
n = !0, i();
|
|
});
|
|
var a = !1;
|
|
return function(o) {
|
|
if (!n && !a) {
|
|
if (a = !0, Uie(e)) return e.close(wf);
|
|
if (Wie(e)) return e.abort();
|
|
if (lm(e.destroy)) return e.destroy();
|
|
i(o || new Error("stream was destroyed"));
|
|
}
|
|
};
|
|
}, "destroyer"), _8 = /* @__PURE__ */ s(function(e) {
|
|
e();
|
|
}, "call"), Vie = /* @__PURE__ */ s(function(e, t) {
|
|
return e.pipe(t);
|
|
}, "pipe"), Hie = /* @__PURE__ */ s(function() {
|
|
var e = Array.prototype.slice.call(arguments), t = lm(e[e.length - 1] || wf) && e.pop() || wf;
|
|
if (Array.isArray(e[0]) && (e = e[0]), e.length < 2) throw new Error("pump requires two streams per minimum");
|
|
var r, i = e.map(function(n, a) {
|
|
var o = a < e.length - 1, u = a > 0;
|
|
return $ie(n, o, u, function(l) {
|
|
r || (r = l), l && i.forEach(_8), !o && (i.forEach(_8), t(r));
|
|
});
|
|
});
|
|
e.reduce(Vie);
|
|
}, "pump");
|
|
P8.exports = Hie;
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/isarray/index.js
|
|
var O8 = E((ztt, I8) => {
|
|
var Kie = {}.toString;
|
|
I8.exports = Array.isArray || function(e) {
|
|
return Kie.call(e) == "[object Array]";
|
|
};
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/readable-stream/lib/internal/streams/stream.js
|
|
var OE = E((Gtt, k8) => {
|
|
k8.exports = V("stream");
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/safe-buffer/index.js
|
|
var fm = E((kE, N8) => {
|
|
var cm = V("buffer"), Is = cm.Buffer;
|
|
function B8(e, t) {
|
|
for (var r in e)
|
|
t[r] = e[r];
|
|
}
|
|
s(B8, "copyProps");
|
|
Is.from && Is.alloc && Is.allocUnsafe && Is.allocUnsafeSlow ? N8.exports = cm : (B8(cm, kE), kE.Buffer = pl);
|
|
function pl(e, t, r) {
|
|
return Is(e, t, r);
|
|
}
|
|
s(pl, "SafeBuffer");
|
|
B8(Is, pl);
|
|
pl.from = function(e, t, r) {
|
|
if (typeof e == "number")
|
|
throw new TypeError("Argument must not be a number");
|
|
return Is(e, t, r);
|
|
};
|
|
pl.alloc = function(e, t, r) {
|
|
if (typeof e != "number")
|
|
throw new TypeError("Argument must be a number");
|
|
var i = Is(e);
|
|
return t !== void 0 ? typeof r == "string" ? i.fill(t, r) : i.fill(t) : i.fill(0), i;
|
|
};
|
|
pl.allocUnsafe = function(e) {
|
|
if (typeof e != "number")
|
|
throw new TypeError("Argument must be a number");
|
|
return Is(e);
|
|
};
|
|
pl.allocUnsafeSlow = function(e) {
|
|
if (typeof e != "number")
|
|
throw new TypeError("Argument must be a number");
|
|
return cm.SlowBuffer(e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/readable-stream/lib/internal/streams/BufferList.js
|
|
var R8 = E((Xtt, BE) => {
|
|
"use strict";
|
|
function zie(e, t) {
|
|
if (!(e instanceof t))
|
|
throw new TypeError("Cannot call a class as a function");
|
|
}
|
|
s(zie, "_classCallCheck");
|
|
var M8 = fm().Buffer, Af = V("util");
|
|
function Gie(e, t, r) {
|
|
e.copy(t, r);
|
|
}
|
|
s(Gie, "copyBuffer");
|
|
BE.exports = function() {
|
|
function e() {
|
|
zie(this, e), this.head = null, this.tail = null, this.length = 0;
|
|
}
|
|
return s(e, "BufferList"), e.prototype.push = /* @__PURE__ */ s(function(r) {
|
|
var i = { data: r, next: null };
|
|
this.length > 0 ? this.tail.next = i : this.head = i, this.tail = i, ++this.length;
|
|
}, "push"), e.prototype.unshift = /* @__PURE__ */ s(function(r) {
|
|
var i = { data: r, next: this.head };
|
|
this.length === 0 && (this.tail = i), this.head = i, ++this.length;
|
|
}, "unshift"), e.prototype.shift = /* @__PURE__ */ s(function() {
|
|
if (this.length !== 0) {
|
|
var r = this.head.data;
|
|
return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, r;
|
|
}
|
|
}, "shift"), e.prototype.clear = /* @__PURE__ */ s(function() {
|
|
this.head = this.tail = null, this.length = 0;
|
|
}, "clear"), e.prototype.join = /* @__PURE__ */ s(function(r) {
|
|
if (this.length === 0) return "";
|
|
for (var i = this.head, n = "" + i.data; i = i.next; )
|
|
n += r + i.data;
|
|
return n;
|
|
}, "join"), e.prototype.concat = /* @__PURE__ */ s(function(r) {
|
|
if (this.length === 0) return M8.alloc(0);
|
|
for (var i = M8.allocUnsafe(r >>> 0), n = this.head, a = 0; n; )
|
|
Gie(n.data, i, a), a += n.data.length, n = n.next;
|
|
return i;
|
|
}, "concat"), e;
|
|
}();
|
|
Af && Af.inspect && Af.inspect.custom && (BE.exports.prototype[Af.inspect.custom] = function() {
|
|
var e = Af.inspect({ length: this.length });
|
|
return this.constructor.name + " " + e;
|
|
});
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/readable-stream/lib/internal/streams/destroy.js
|
|
var NE = E((Ztt, j8) => {
|
|
"use strict";
|
|
var dm = Ii();
|
|
function Jie(e, t) {
|
|
var r = this, i = this._readableState && this._readableState.destroyed, n = this._writableState && this._writableState.destroyed;
|
|
return i || n ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, dm.nextTick(
|
|
pm, this, e)) : dm.nextTick(pm, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this.
|
|
_writableState.destroyed = !0), this._destroy(e || null, function(a) {
|
|
!t && a ? r._writableState ? r._writableState.errorEmitted || (r._writableState.errorEmitted = !0, dm.nextTick(pm, r, a)) : dm.nextTick(
|
|
pm, r, a) : t && t(a);
|
|
}), this);
|
|
}
|
|
s(Jie, "destroy");
|
|
function Xie() {
|
|
this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.
|
|
endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending =
|
|
!1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted =
|
|
!1);
|
|
}
|
|
s(Xie, "undestroy");
|
|
function pm(e, t) {
|
|
e.emit("error", t);
|
|
}
|
|
s(pm, "emitErrorNT");
|
|
j8.exports = {
|
|
destroy: Jie,
|
|
undestroy: Xie
|
|
};
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/readable-stream/lib/_stream_writable.js
|
|
var RE = E((ert, K8) => {
|
|
"use strict";
|
|
var _o = Ii();
|
|
K8.exports = Tr;
|
|
function q8(e) {
|
|
var t = this;
|
|
this.next = null, this.entry = null, this.finish = function() {
|
|
hne(t, e);
|
|
};
|
|
}
|
|
s(q8, "CorkedRequest");
|
|
var Yie = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : _o.nextTick, hl;
|
|
Tr.WritableState = Pf;
|
|
var U8 = Object.create(_r());
|
|
U8.inherits = Lt();
|
|
var Zie = {
|
|
deprecate: Zc()
|
|
}, W8 = OE(), mm = fm().Buffer, Qie = (typeof global < "u" ? global : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array ||
|
|
function() {
|
|
};
|
|
function ene(e) {
|
|
return mm.from(e);
|
|
}
|
|
s(ene, "_uint8ArrayToBuffer");
|
|
function tne(e) {
|
|
return mm.isBuffer(e) || e instanceof Qie;
|
|
}
|
|
s(tne, "_isUint8Array");
|
|
var $8 = NE();
|
|
U8.inherits(Tr, W8);
|
|
function rne() {
|
|
}
|
|
s(rne, "nop");
|
|
function Pf(e, t) {
|
|
hl = hl || Po(), e = e || {};
|
|
var r = t instanceof hl;
|
|
this.objectMode = !!e.objectMode, r && (this.objectMode = this.objectMode || !!e.writableObjectMode);
|
|
var i = e.highWaterMark, n = e.writableHighWaterMark, a = this.objectMode ? 16 : 16 * 1024;
|
|
i || i === 0 ? this.highWaterMark = i : r && (n || n === 0) ? this.highWaterMark = n : this.highWaterMark = a, this.highWaterMark = Math.
|
|
floor(this.highWaterMark), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed =
|
|
!1;
|
|
var o = e.decodeStrings === !1;
|
|
this.decodeStrings = !o, this.defaultEncoding = e.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync =
|
|
!0, this.bufferProcessing = !1, this.onwrite = function(u) {
|
|
lne(t, u);
|
|
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished =
|
|
!1, this.errorEmitted = !1, this.bufferedRequestCount = 0, this.corkedRequestsFree = new q8(this);
|
|
}
|
|
s(Pf, "WritableState");
|
|
Pf.prototype.getBuffer = /* @__PURE__ */ s(function() {
|
|
for (var t = this.bufferedRequest, r = []; t; )
|
|
r.push(t), t = t.next;
|
|
return r;
|
|
}, "getBuffer");
|
|
(function() {
|
|
try {
|
|
Object.defineProperty(Pf.prototype, "buffer", {
|
|
get: Zie.deprecate(function() {
|
|
return this.getBuffer();
|
|
}, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
|
|
});
|
|
} catch {
|
|
}
|
|
})();
|
|
var hm;
|
|
typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (hm = Function.prototype[Symbol.
|
|
hasInstance], Object.defineProperty(Tr, Symbol.hasInstance, {
|
|
value: /* @__PURE__ */ s(function(e) {
|
|
return hm.call(this, e) ? !0 : this !== Tr ? !1 : e && e._writableState instanceof Pf;
|
|
}, "value")
|
|
})) : hm = /* @__PURE__ */ s(function(e) {
|
|
return e instanceof this;
|
|
}, "realHasInstance");
|
|
function Tr(e) {
|
|
if (hl = hl || Po(), !hm.call(Tr, this) && !(this instanceof hl))
|
|
return new Tr(e);
|
|
this._writableState = new Pf(e, this), this.writable = !0, e && (typeof e.write == "function" && (this._write = e.write), typeof e.writev ==
|
|
"function" && (this._writev = e.writev), typeof e.destroy == "function" && (this._destroy = e.destroy), typeof e.final == "function" && (this.
|
|
_final = e.final)), W8.call(this);
|
|
}
|
|
s(Tr, "Writable");
|
|
Tr.prototype.pipe = function() {
|
|
this.emit("error", new Error("Cannot pipe, not readable"));
|
|
};
|
|
function ine(e, t) {
|
|
var r = new Error("write after end");
|
|
e.emit("error", r), _o.nextTick(t, r);
|
|
}
|
|
s(ine, "writeAfterEnd");
|
|
function nne(e, t, r, i) {
|
|
var n = !0, a = !1;
|
|
return r === null ? a = new TypeError("May not write null values to stream") : typeof r != "string" && r !== void 0 && !t.objectMode && (a =
|
|
new TypeError("Invalid non-string/buffer chunk")), a && (e.emit("error", a), _o.nextTick(i, a), n = !1), n;
|
|
}
|
|
s(nne, "validChunk");
|
|
Tr.prototype.write = function(e, t, r) {
|
|
var i = this._writableState, n = !1, a = !i.objectMode && tne(e);
|
|
return a && !mm.isBuffer(e) && (e = ene(e)), typeof t == "function" && (r = t, t = null), a ? t = "buffer" : t || (t = i.defaultEncoding),
|
|
typeof r != "function" && (r = rne), i.ended ? ine(this, r) : (a || nne(this, i, e, r)) && (i.pendingcb++, n = ane(this, i, a, e, t, r)),
|
|
n;
|
|
};
|
|
Tr.prototype.cork = function() {
|
|
var e = this._writableState;
|
|
e.corked++;
|
|
};
|
|
Tr.prototype.uncork = function() {
|
|
var e = this._writableState;
|
|
e.corked && (e.corked--, !e.writing && !e.corked && !e.bufferProcessing && e.bufferedRequest && V8(this, e));
|
|
};
|
|
Tr.prototype.setDefaultEncoding = /* @__PURE__ */ s(function(t) {
|
|
if (typeof t == "string" && (t = t.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "\
|
|
utf-16le", "raw"].indexOf((t + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + t);
|
|
return this._writableState.defaultEncoding = t, this;
|
|
}, "setDefaultEncoding");
|
|
function sne(e, t, r) {
|
|
return !e.objectMode && e.decodeStrings !== !1 && typeof t == "string" && (t = mm.from(t, r)), t;
|
|
}
|
|
s(sne, "decodeChunk");
|
|
Object.defineProperty(Tr.prototype, "writableHighWaterMark", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState.highWaterMark;
|
|
}, "get")
|
|
});
|
|
function ane(e, t, r, i, n, a) {
|
|
if (!r) {
|
|
var o = sne(t, i, n);
|
|
i !== o && (r = !0, n = "buffer", i = o);
|
|
}
|
|
var u = t.objectMode ? 1 : i.length;
|
|
t.length += u;
|
|
var l = t.length < t.highWaterMark;
|
|
if (l || (t.needDrain = !0), t.writing || t.corked) {
|
|
var c = t.lastBufferedRequest;
|
|
t.lastBufferedRequest = {
|
|
chunk: i,
|
|
encoding: n,
|
|
isBuf: r,
|
|
callback: a,
|
|
next: null
|
|
}, c ? c.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest, t.bufferedRequestCount += 1;
|
|
} else
|
|
ME(e, t, !1, u, i, n, a);
|
|
return l;
|
|
}
|
|
s(ane, "writeOrBuffer");
|
|
function ME(e, t, r, i, n, a, o) {
|
|
t.writelen = i, t.writecb = o, t.writing = !0, t.sync = !0, r ? e._writev(n, t.onwrite) : e._write(n, a, t.onwrite), t.sync = !1;
|
|
}
|
|
s(ME, "doWrite");
|
|
function one(e, t, r, i, n) {
|
|
--t.pendingcb, r ? (_o.nextTick(n, i), _o.nextTick(_f, e, t), e._writableState.errorEmitted = !0, e.emit("error", i)) : (n(i), e._writableState.
|
|
errorEmitted = !0, e.emit("error", i), _f(e, t));
|
|
}
|
|
s(one, "onwriteError");
|
|
function une(e) {
|
|
e.writing = !1, e.writecb = null, e.length -= e.writelen, e.writelen = 0;
|
|
}
|
|
s(une, "onwriteStateUpdate");
|
|
function lne(e, t) {
|
|
var r = e._writableState, i = r.sync, n = r.writecb;
|
|
if (une(r), t) one(e, r, i, t, n);
|
|
else {
|
|
var a = H8(r);
|
|
!a && !r.corked && !r.bufferProcessing && r.bufferedRequest && V8(e, r), i ? Yie(L8, e, r, a, n) : L8(e, r, a, n);
|
|
}
|
|
}
|
|
s(lne, "onwrite");
|
|
function L8(e, t, r, i) {
|
|
r || cne(e, t), t.pendingcb--, i(), _f(e, t);
|
|
}
|
|
s(L8, "afterWrite");
|
|
function cne(e, t) {
|
|
t.length === 0 && t.needDrain && (t.needDrain = !1, e.emit("drain"));
|
|
}
|
|
s(cne, "onwriteDrain");
|
|
function V8(e, t) {
|
|
t.bufferProcessing = !0;
|
|
var r = t.bufferedRequest;
|
|
if (e._writev && r && r.next) {
|
|
var i = t.bufferedRequestCount, n = new Array(i), a = t.corkedRequestsFree;
|
|
a.entry = r;
|
|
for (var o = 0, u = !0; r; )
|
|
n[o] = r, r.isBuf || (u = !1), r = r.next, o += 1;
|
|
n.allBuffers = u, ME(e, t, !0, t.length, n, "", a.finish), t.pendingcb++, t.lastBufferedRequest = null, a.next ? (t.corkedRequestsFree =
|
|
a.next, a.next = null) : t.corkedRequestsFree = new q8(t), t.bufferedRequestCount = 0;
|
|
} else {
|
|
for (; r; ) {
|
|
var l = r.chunk, c = r.encoding, f = r.callback, m = t.objectMode ? 1 : l.length;
|
|
if (ME(e, t, !1, m, l, c, f), r = r.next, t.bufferedRequestCount--, t.writing)
|
|
break;
|
|
}
|
|
r === null && (t.lastBufferedRequest = null);
|
|
}
|
|
t.bufferedRequest = r, t.bufferProcessing = !1;
|
|
}
|
|
s(V8, "clearBuffer");
|
|
Tr.prototype._write = function(e, t, r) {
|
|
r(new Error("_write() is not implemented"));
|
|
};
|
|
Tr.prototype._writev = null;
|
|
Tr.prototype.end = function(e, t, r) {
|
|
var i = this._writableState;
|
|
typeof e == "function" ? (r = e, e = null, t = null) : typeof t == "function" && (r = t, t = null), e != null && this.write(e, t), i.corked &&
|
|
(i.corked = 1, this.uncork()), i.ending || pne(this, i, r);
|
|
};
|
|
function H8(e) {
|
|
return e.ending && e.length === 0 && e.bufferedRequest === null && !e.finished && !e.writing;
|
|
}
|
|
s(H8, "needFinish");
|
|
function fne(e, t) {
|
|
e._final(function(r) {
|
|
t.pendingcb--, r && e.emit("error", r), t.prefinished = !0, e.emit("prefinish"), _f(e, t);
|
|
});
|
|
}
|
|
s(fne, "callFinal");
|
|
function dne(e, t) {
|
|
!t.prefinished && !t.finalCalled && (typeof e._final == "function" ? (t.pendingcb++, t.finalCalled = !0, _o.nextTick(fne, e, t)) : (t.prefinished =
|
|
!0, e.emit("prefinish")));
|
|
}
|
|
s(dne, "prefinish");
|
|
function _f(e, t) {
|
|
var r = H8(t);
|
|
return r && (dne(e, t), t.pendingcb === 0 && (t.finished = !0, e.emit("finish"))), r;
|
|
}
|
|
s(_f, "finishMaybe");
|
|
function pne(e, t, r) {
|
|
t.ending = !0, _f(e, t), r && (t.finished ? _o.nextTick(r) : e.once("finish", r)), t.ended = !0, e.writable = !1;
|
|
}
|
|
s(pne, "endWritable");
|
|
function hne(e, t, r) {
|
|
var i = e.entry;
|
|
for (e.entry = null; i; ) {
|
|
var n = i.callback;
|
|
t.pendingcb--, n(r), i = i.next;
|
|
}
|
|
t.corkedRequestsFree.next = e;
|
|
}
|
|
s(hne, "onCorkedFinish");
|
|
Object.defineProperty(Tr.prototype, "destroyed", {
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState === void 0 ? !1 : this._writableState.destroyed;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(e) {
|
|
this._writableState && (this._writableState.destroyed = e);
|
|
}, "set")
|
|
});
|
|
Tr.prototype.destroy = $8.destroy;
|
|
Tr.prototype._undestroy = $8.undestroy;
|
|
Tr.prototype._destroy = function(e, t) {
|
|
this.end(), t(e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/readable-stream/lib/_stream_duplex.js
|
|
var Po = E((rrt, X8) => {
|
|
"use strict";
|
|
var z8 = Ii(), mne = Object.keys || function(e) {
|
|
var t = [];
|
|
for (var r in e)
|
|
t.push(r);
|
|
return t;
|
|
};
|
|
X8.exports = Os;
|
|
var G8 = Object.create(_r());
|
|
G8.inherits = Lt();
|
|
var J8 = qE(), LE = RE();
|
|
G8.inherits(Os, J8);
|
|
for (jE = mne(LE.prototype), ym = 0; ym < jE.length; ym++)
|
|
gm = jE[ym], Os.prototype[gm] || (Os.prototype[gm] = LE.prototype[gm]);
|
|
var jE, gm, ym;
|
|
function Os(e) {
|
|
if (!(this instanceof Os)) return new Os(e);
|
|
J8.call(this, e), LE.call(this, e), e && e.readable === !1 && (this.readable = !1), e && e.writable === !1 && (this.writable = !1), this.
|
|
allowHalfOpen = !0, e && e.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", yne);
|
|
}
|
|
s(Os, "Duplex");
|
|
Object.defineProperty(Os.prototype, "writableHighWaterMark", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._writableState.highWaterMark;
|
|
}, "get")
|
|
});
|
|
function yne() {
|
|
this.allowHalfOpen || this._writableState.ended || z8.nextTick(gne, this);
|
|
}
|
|
s(yne, "onend");
|
|
function gne(e) {
|
|
e.end();
|
|
}
|
|
s(gne, "onEndNT");
|
|
Object.defineProperty(Os.prototype, "destroyed", {
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState === void 0 || this._writableState === void 0 ? !1 : this._readableState.destroyed && this._writableState.destroyed;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(e) {
|
|
this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = e, this._writableState.destroyed =
|
|
e);
|
|
}, "set")
|
|
});
|
|
Os.prototype._destroy = function(e, t) {
|
|
this.push(null), this.end(), z8.nextTick(t, e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/readable-stream/lib/_stream_readable.js
|
|
var qE = E((srt, u6) => {
|
|
"use strict";
|
|
var yl = Ii();
|
|
u6.exports = Gt;
|
|
var bne = O8(), Ff;
|
|
Gt.ReadableState = i6;
|
|
var nrt = V("events").EventEmitter, e6 = /* @__PURE__ */ s(function(e, t) {
|
|
return e.listeners(t).length;
|
|
}, "EElistenerCount"), HE = OE(), If = fm().Buffer, Dne = (typeof global < "u" ? global : typeof window < "u" ? window : typeof self < "u" ?
|
|
self : {}).Uint8Array || function() {
|
|
};
|
|
function vne(e) {
|
|
return If.from(e);
|
|
}
|
|
s(vne, "_uint8ArrayToBuffer");
|
|
function Ene(e) {
|
|
return If.isBuffer(e) || e instanceof Dne;
|
|
}
|
|
s(Ene, "_isUint8Array");
|
|
var t6 = Object.create(_r());
|
|
t6.inherits = Lt();
|
|
var UE = V("util"), _t = void 0;
|
|
UE && UE.debuglog ? _t = UE.debuglog("stream") : _t = /* @__PURE__ */ s(function() {
|
|
}, "debug");
|
|
var xne = R8(), r6 = NE(), ml;
|
|
t6.inherits(Gt, HE);
|
|
var WE = ["error", "close", "destroy", "pause", "resume"];
|
|
function Sne(e, t, r) {
|
|
if (typeof e.prependListener == "function") return e.prependListener(t, r);
|
|
!e._events || !e._events[t] ? e.on(t, r) : bne(e._events[t]) ? e._events[t].unshift(r) : e._events[t] = [r, e._events[t]];
|
|
}
|
|
s(Sne, "prependListener");
|
|
function i6(e, t) {
|
|
Ff = Ff || Po(), e = e || {};
|
|
var r = t instanceof Ff;
|
|
this.objectMode = !!e.objectMode, r && (this.objectMode = this.objectMode || !!e.readableObjectMode);
|
|
var i = e.highWaterMark, n = e.readableHighWaterMark, a = this.objectMode ? 16 : 16 * 1024;
|
|
i || i === 0 ? this.highWaterMark = i : r && (n || n === 0) ? this.highWaterMark = n : this.highWaterMark = a, this.highWaterMark = Math.
|
|
floor(this.highWaterMark), this.buffer = new xne(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended =
|
|
!1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening =
|
|
!1, this.resumeScheduled = !1, this.destroyed = !1, this.defaultEncoding = e.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore =
|
|
!1, this.decoder = null, this.encoding = null, e.encoding && (ml || (ml = V("string_decoder/").StringDecoder), this.decoder = new ml(e.encoding),
|
|
this.encoding = e.encoding);
|
|
}
|
|
s(i6, "ReadableState");
|
|
function Gt(e) {
|
|
if (Ff = Ff || Po(), !(this instanceof Gt)) return new Gt(e);
|
|
this._readableState = new i6(e, this), this.readable = !0, e && (typeof e.read == "function" && (this._read = e.read), typeof e.destroy ==
|
|
"function" && (this._destroy = e.destroy)), HE.call(this);
|
|
}
|
|
s(Gt, "Readable");
|
|
Object.defineProperty(Gt.prototype, "destroyed", {
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState === void 0 ? !1 : this._readableState.destroyed;
|
|
}, "get"),
|
|
set: /* @__PURE__ */ s(function(e) {
|
|
this._readableState && (this._readableState.destroyed = e);
|
|
}, "set")
|
|
});
|
|
Gt.prototype.destroy = r6.destroy;
|
|
Gt.prototype._undestroy = r6.undestroy;
|
|
Gt.prototype._destroy = function(e, t) {
|
|
this.push(null), t(e);
|
|
};
|
|
Gt.prototype.push = function(e, t) {
|
|
var r = this._readableState, i;
|
|
return r.objectMode ? i = !0 : typeof e == "string" && (t = t || r.defaultEncoding, t !== r.encoding && (e = If.from(e, t), t = ""), i =
|
|
!0), n6(this, e, t, !1, i);
|
|
};
|
|
Gt.prototype.unshift = function(e) {
|
|
return n6(this, e, null, !0, !1);
|
|
};
|
|
function n6(e, t, r, i, n) {
|
|
var a = e._readableState;
|
|
if (t === null)
|
|
a.reading = !1, Ane(e, a);
|
|
else {
|
|
var o;
|
|
n || (o = Tne(a, t)), o ? e.emit("error", o) : a.objectMode || t && t.length > 0 ? (typeof t != "string" && !a.objectMode && Object.getPrototypeOf(
|
|
t) !== If.prototype && (t = vne(t)), i ? a.endEmitted ? e.emit("error", new Error("stream.unshift() after end event")) : $E(e, a, t, !0) :
|
|
a.ended ? e.emit("error", new Error("stream.push() after EOF")) : (a.reading = !1, a.decoder && !r ? (t = a.decoder.write(t), a.objectMode ||
|
|
t.length !== 0 ? $E(e, a, t, !1) : s6(e, a)) : $E(e, a, t, !1))) : i || (a.reading = !1);
|
|
}
|
|
return Cne(a);
|
|
}
|
|
s(n6, "readableAddChunk");
|
|
function $E(e, t, r, i) {
|
|
t.flowing && t.length === 0 && !t.sync ? (e.emit("data", r), e.read(0)) : (t.length += t.objectMode ? 1 : r.length, i ? t.buffer.unshift(
|
|
r) : t.buffer.push(r), t.needReadable && bm(e)), s6(e, t);
|
|
}
|
|
s($E, "addChunk");
|
|
function Tne(e, t) {
|
|
var r;
|
|
return !Ene(t) && typeof t != "string" && t !== void 0 && !e.objectMode && (r = new TypeError("Invalid non-string/buffer chunk")), r;
|
|
}
|
|
s(Tne, "chunkInvalid");
|
|
function Cne(e) {
|
|
return !e.ended && (e.needReadable || e.length < e.highWaterMark || e.length === 0);
|
|
}
|
|
s(Cne, "needMoreData");
|
|
Gt.prototype.isPaused = function() {
|
|
return this._readableState.flowing === !1;
|
|
};
|
|
Gt.prototype.setEncoding = function(e) {
|
|
return ml || (ml = V("string_decoder/").StringDecoder), this._readableState.decoder = new ml(e), this._readableState.encoding = e, this;
|
|
};
|
|
var Y8 = 8388608;
|
|
function wne(e) {
|
|
return e >= Y8 ? e = Y8 : (e--, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e++), e;
|
|
}
|
|
s(wne, "computeNewHighWaterMark");
|
|
function Z8(e, t) {
|
|
return e <= 0 || t.length === 0 && t.ended ? 0 : t.objectMode ? 1 : e !== e ? t.flowing && t.length ? t.buffer.head.data.length : t.length :
|
|
(e > t.highWaterMark && (t.highWaterMark = wne(e)), e <= t.length ? e : t.ended ? t.length : (t.needReadable = !0, 0));
|
|
}
|
|
s(Z8, "howMuchToRead");
|
|
Gt.prototype.read = function(e) {
|
|
_t("read", e), e = parseInt(e, 10);
|
|
var t = this._readableState, r = e;
|
|
if (e !== 0 && (t.emittedReadable = !1), e === 0 && t.needReadable && (t.length >= t.highWaterMark || t.ended))
|
|
return _t("read: emitReadable", t.length, t.ended), t.length === 0 && t.ended ? VE(this) : bm(this), null;
|
|
if (e = Z8(e, t), e === 0 && t.ended)
|
|
return t.length === 0 && VE(this), null;
|
|
var i = t.needReadable;
|
|
_t("need readable", i), (t.length === 0 || t.length - e < t.highWaterMark) && (i = !0, _t("length less than watermark", i)), t.ended || t.
|
|
reading ? (i = !1, _t("reading or ended", i)) : i && (_t("do read"), t.reading = !0, t.sync = !0, t.length === 0 && (t.needReadable = !0),
|
|
this._read(t.highWaterMark), t.sync = !1, t.reading || (e = Z8(r, t)));
|
|
var n;
|
|
return e > 0 ? n = a6(e, t) : n = null, n === null ? (t.needReadable = !0, e = 0) : t.length -= e, t.length === 0 && (t.ended || (t.needReadable =
|
|
!0), r !== e && t.ended && VE(this)), n !== null && this.emit("data", n), n;
|
|
};
|
|
function Ane(e, t) {
|
|
if (!t.ended) {
|
|
if (t.decoder) {
|
|
var r = t.decoder.end();
|
|
r && r.length && (t.buffer.push(r), t.length += t.objectMode ? 1 : r.length);
|
|
}
|
|
t.ended = !0, bm(e);
|
|
}
|
|
}
|
|
s(Ane, "onEofChunk");
|
|
function bm(e) {
|
|
var t = e._readableState;
|
|
t.needReadable = !1, t.emittedReadable || (_t("emitReadable", t.flowing), t.emittedReadable = !0, t.sync ? yl.nextTick(Q8, e) : Q8(e));
|
|
}
|
|
s(bm, "emitReadable");
|
|
function Q8(e) {
|
|
_t("emit readable"), e.emit("readable"), KE(e);
|
|
}
|
|
s(Q8, "emitReadable_");
|
|
function s6(e, t) {
|
|
t.readingMore || (t.readingMore = !0, yl.nextTick(_ne, e, t));
|
|
}
|
|
s(s6, "maybeReadMore");
|
|
function _ne(e, t) {
|
|
for (var r = t.length; !t.reading && !t.flowing && !t.ended && t.length < t.highWaterMark && (_t("maybeReadMore read 0"), e.read(0), r !==
|
|
t.length); )
|
|
r = t.length;
|
|
t.readingMore = !1;
|
|
}
|
|
s(_ne, "maybeReadMore_");
|
|
Gt.prototype._read = function(e) {
|
|
this.emit("error", new Error("_read() is not implemented"));
|
|
};
|
|
Gt.prototype.pipe = function(e, t) {
|
|
var r = this, i = this._readableState;
|
|
switch (i.pipesCount) {
|
|
case 0:
|
|
i.pipes = e;
|
|
break;
|
|
case 1:
|
|
i.pipes = [i.pipes, e];
|
|
break;
|
|
default:
|
|
i.pipes.push(e);
|
|
break;
|
|
}
|
|
i.pipesCount += 1, _t("pipe count=%d opts=%j", i.pipesCount, t);
|
|
var n = (!t || t.end !== !1) && e !== process.stdout && e !== process.stderr, a = n ? u : g;
|
|
i.endEmitted ? yl.nextTick(a) : r.once("end", a), e.on("unpipe", o);
|
|
function o(b, D) {
|
|
_t("onunpipe"), b === r && D && D.hasUnpiped === !1 && (D.hasUnpiped = !0, f());
|
|
}
|
|
s(o, "onunpipe");
|
|
function u() {
|
|
_t("onend"), e.end();
|
|
}
|
|
s(u, "onend");
|
|
var l = Pne(r);
|
|
e.on("drain", l);
|
|
var c = !1;
|
|
function f() {
|
|
_t("cleanup"), e.removeListener("close", y), e.removeListener("finish", p), e.removeListener("drain", l), e.removeListener("error", d),
|
|
e.removeListener("unpipe", o), r.removeListener("end", u), r.removeListener("end", g), r.removeListener("data", h), c = !0, i.awaitDrain &&
|
|
(!e._writableState || e._writableState.needDrain) && l();
|
|
}
|
|
s(f, "cleanup");
|
|
var m = !1;
|
|
r.on("data", h);
|
|
function h(b) {
|
|
_t("ondata"), m = !1;
|
|
var D = e.write(b);
|
|
D === !1 && !m && ((i.pipesCount === 1 && i.pipes === e || i.pipesCount > 1 && o6(i.pipes, e) !== -1) && !c && (_t("false write respon\
|
|
se, pause", i.awaitDrain), i.awaitDrain++, m = !0), r.pause());
|
|
}
|
|
s(h, "ondata");
|
|
function d(b) {
|
|
_t("onerror", b), g(), e.removeListener("error", d), e6(e, "error") === 0 && e.emit("error", b);
|
|
}
|
|
s(d, "onerror"), Sne(e, "error", d);
|
|
function y() {
|
|
e.removeListener("finish", p), g();
|
|
}
|
|
s(y, "onclose"), e.once("close", y);
|
|
function p() {
|
|
_t("onfinish"), e.removeListener("close", y), g();
|
|
}
|
|
s(p, "onfinish"), e.once("finish", p);
|
|
function g() {
|
|
_t("unpipe"), r.unpipe(e);
|
|
}
|
|
return s(g, "unpipe"), e.emit("pipe", r), i.flowing || (_t("pipe resume"), r.resume()), e;
|
|
};
|
|
function Pne(e) {
|
|
return function() {
|
|
var t = e._readableState;
|
|
_t("pipeOnDrain", t.awaitDrain), t.awaitDrain && t.awaitDrain--, t.awaitDrain === 0 && e6(e, "data") && (t.flowing = !0, KE(e));
|
|
};
|
|
}
|
|
s(Pne, "pipeOnDrain");
|
|
Gt.prototype.unpipe = function(e) {
|
|
var t = this._readableState, r = { hasUnpiped: !1 };
|
|
if (t.pipesCount === 0) return this;
|
|
if (t.pipesCount === 1)
|
|
return e && e !== t.pipes ? this : (e || (e = t.pipes), t.pipes = null, t.pipesCount = 0, t.flowing = !1, e && e.emit("unpipe", this, r),
|
|
this);
|
|
if (!e) {
|
|
var i = t.pipes, n = t.pipesCount;
|
|
t.pipes = null, t.pipesCount = 0, t.flowing = !1;
|
|
for (var a = 0; a < n; a++)
|
|
i[a].emit("unpipe", this, { hasUnpiped: !1 });
|
|
return this;
|
|
}
|
|
var o = o6(t.pipes, e);
|
|
return o === -1 ? this : (t.pipes.splice(o, 1), t.pipesCount -= 1, t.pipesCount === 1 && (t.pipes = t.pipes[0]), e.emit("unpipe", this, r),
|
|
this);
|
|
};
|
|
Gt.prototype.on = function(e, t) {
|
|
var r = HE.prototype.on.call(this, e, t);
|
|
if (e === "data")
|
|
this._readableState.flowing !== !1 && this.resume();
|
|
else if (e === "readable") {
|
|
var i = this._readableState;
|
|
!i.endEmitted && !i.readableListening && (i.readableListening = i.needReadable = !0, i.emittedReadable = !1, i.reading ? i.length && bm(
|
|
this) : yl.nextTick(Fne, this));
|
|
}
|
|
return r;
|
|
};
|
|
Gt.prototype.addListener = Gt.prototype.on;
|
|
function Fne(e) {
|
|
_t("readable nexttick read 0"), e.read(0);
|
|
}
|
|
s(Fne, "nReadingNextTick");
|
|
Gt.prototype.resume = function() {
|
|
var e = this._readableState;
|
|
return e.flowing || (_t("resume"), e.flowing = !0, Ine(this, e)), this;
|
|
};
|
|
function Ine(e, t) {
|
|
t.resumeScheduled || (t.resumeScheduled = !0, yl.nextTick(One, e, t));
|
|
}
|
|
s(Ine, "resume");
|
|
function One(e, t) {
|
|
t.reading || (_t("resume read 0"), e.read(0)), t.resumeScheduled = !1, t.awaitDrain = 0, e.emit("resume"), KE(e), t.flowing && !t.reading &&
|
|
e.read(0);
|
|
}
|
|
s(One, "resume_");
|
|
Gt.prototype.pause = function() {
|
|
return _t("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (_t("pause"), this._readableState.
|
|
flowing = !1, this.emit("pause")), this;
|
|
};
|
|
function KE(e) {
|
|
var t = e._readableState;
|
|
for (_t("flow", t.flowing); t.flowing && e.read() !== null; )
|
|
;
|
|
}
|
|
s(KE, "flow");
|
|
Gt.prototype.wrap = function(e) {
|
|
var t = this, r = this._readableState, i = !1;
|
|
e.on("end", function() {
|
|
if (_t("wrapped end"), r.decoder && !r.ended) {
|
|
var o = r.decoder.end();
|
|
o && o.length && t.push(o);
|
|
}
|
|
t.push(null);
|
|
}), e.on("data", function(o) {
|
|
if (_t("wrapped data"), r.decoder && (o = r.decoder.write(o)), !(r.objectMode && o == null) && !(!r.objectMode && (!o || !o.length))) {
|
|
var u = t.push(o);
|
|
u || (i = !0, e.pause());
|
|
}
|
|
});
|
|
for (var n in e)
|
|
this[n] === void 0 && typeof e[n] == "function" && (this[n] = /* @__PURE__ */ function(o) {
|
|
return function() {
|
|
return e[o].apply(e, arguments);
|
|
};
|
|
}(n));
|
|
for (var a = 0; a < WE.length; a++)
|
|
e.on(WE[a], this.emit.bind(this, WE[a]));
|
|
return this._read = function(o) {
|
|
_t("wrapped _read", o), i && (i = !1, e.resume());
|
|
}, this;
|
|
};
|
|
Object.defineProperty(Gt.prototype, "readableHighWaterMark", {
|
|
// making it explicit this property is not enumerable
|
|
// because otherwise some prototype manipulation in
|
|
// userland will fail
|
|
enumerable: !1,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return this._readableState.highWaterMark;
|
|
}, "get")
|
|
});
|
|
Gt._fromList = a6;
|
|
function a6(e, t) {
|
|
if (t.length === 0) return null;
|
|
var r;
|
|
return t.objectMode ? r = t.buffer.shift() : !e || e >= t.length ? (t.decoder ? r = t.buffer.join("") : t.buffer.length === 1 ? r = t.buffer.
|
|
head.data : r = t.buffer.concat(t.length), t.buffer.clear()) : r = kne(e, t.buffer, t.decoder), r;
|
|
}
|
|
s(a6, "fromList");
|
|
function kne(e, t, r) {
|
|
var i;
|
|
return e < t.head.data.length ? (i = t.head.data.slice(0, e), t.head.data = t.head.data.slice(e)) : e === t.head.data.length ? i = t.shift() :
|
|
i = r ? Bne(e, t) : Nne(e, t), i;
|
|
}
|
|
s(kne, "fromListPartial");
|
|
function Bne(e, t) {
|
|
var r = t.head, i = 1, n = r.data;
|
|
for (e -= n.length; r = r.next; ) {
|
|
var a = r.data, o = e > a.length ? a.length : e;
|
|
if (o === a.length ? n += a : n += a.slice(0, e), e -= o, e === 0) {
|
|
o === a.length ? (++i, r.next ? t.head = r.next : t.head = t.tail = null) : (t.head = r, r.data = a.slice(o));
|
|
break;
|
|
}
|
|
++i;
|
|
}
|
|
return t.length -= i, n;
|
|
}
|
|
s(Bne, "copyFromBufferString");
|
|
function Nne(e, t) {
|
|
var r = If.allocUnsafe(e), i = t.head, n = 1;
|
|
for (i.data.copy(r), e -= i.data.length; i = i.next; ) {
|
|
var a = i.data, o = e > a.length ? a.length : e;
|
|
if (a.copy(r, r.length - e, 0, o), e -= o, e === 0) {
|
|
o === a.length ? (++n, i.next ? t.head = i.next : t.head = t.tail = null) : (t.head = i, i.data = a.slice(o));
|
|
break;
|
|
}
|
|
++n;
|
|
}
|
|
return t.length -= n, r;
|
|
}
|
|
s(Nne, "copyFromBuffer");
|
|
function VE(e) {
|
|
var t = e._readableState;
|
|
if (t.length > 0) throw new Error('"endReadable()" called on non-empty stream');
|
|
t.endEmitted || (t.ended = !0, yl.nextTick(Mne, t, e));
|
|
}
|
|
s(VE, "endReadable");
|
|
function Mne(e, t) {
|
|
!e.endEmitted && e.length === 0 && (e.endEmitted = !0, t.readable = !1, t.emit("end"));
|
|
}
|
|
s(Mne, "endReadableNT");
|
|
function o6(e, t) {
|
|
for (var r = 0, i = e.length; r < i; r++)
|
|
if (e[r] === t) return r;
|
|
return -1;
|
|
}
|
|
s(o6, "indexOf");
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/readable-stream/lib/_stream_transform.js
|
|
var zE = E((ort, f6) => {
|
|
"use strict";
|
|
f6.exports = ks;
|
|
var Dm = Po(), c6 = Object.create(_r());
|
|
c6.inherits = Lt();
|
|
c6.inherits(ks, Dm);
|
|
function Rne(e, t) {
|
|
var r = this._transformState;
|
|
r.transforming = !1;
|
|
var i = r.writecb;
|
|
if (!i)
|
|
return this.emit("error", new Error("write callback called multiple times"));
|
|
r.writechunk = null, r.writecb = null, t != null && this.push(t), i(e);
|
|
var n = this._readableState;
|
|
n.reading = !1, (n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark);
|
|
}
|
|
s(Rne, "afterTransform");
|
|
function ks(e) {
|
|
if (!(this instanceof ks)) return new ks(e);
|
|
Dm.call(this, e), this._transformState = {
|
|
afterTransform: Rne.bind(this),
|
|
needTransform: !1,
|
|
transforming: !1,
|
|
writecb: null,
|
|
writechunk: null,
|
|
writeencoding: null
|
|
}, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.
|
|
transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish", jne);
|
|
}
|
|
s(ks, "Transform");
|
|
function jne() {
|
|
var e = this;
|
|
typeof this._flush == "function" ? this._flush(function(t, r) {
|
|
l6(e, t, r);
|
|
}) : l6(this, null, null);
|
|
}
|
|
s(jne, "prefinish");
|
|
ks.prototype.push = function(e, t) {
|
|
return this._transformState.needTransform = !1, Dm.prototype.push.call(this, e, t);
|
|
};
|
|
ks.prototype._transform = function(e, t, r) {
|
|
throw new Error("_transform() is not implemented");
|
|
};
|
|
ks.prototype._write = function(e, t, r) {
|
|
var i = this._transformState;
|
|
if (i.writecb = r, i.writechunk = e, i.writeencoding = t, !i.transforming) {
|
|
var n = this._readableState;
|
|
(i.needTransform || n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark);
|
|
}
|
|
};
|
|
ks.prototype._read = function(e) {
|
|
var t = this._transformState;
|
|
t.writechunk !== null && t.writecb && !t.transforming ? (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)) :
|
|
t.needTransform = !0;
|
|
};
|
|
ks.prototype._destroy = function(e, t) {
|
|
var r = this;
|
|
Dm.prototype._destroy.call(this, e, function(i) {
|
|
t(i), r.emit("close");
|
|
});
|
|
};
|
|
function l6(e, t, r) {
|
|
if (t) return e.emit("error", t);
|
|
if (r != null && e.push(r), e._writableState.length) throw new Error("Calling transform done when ws.length != 0");
|
|
if (e._transformState.transforming) throw new Error("Calling transform done when still transforming");
|
|
return e.push(null);
|
|
}
|
|
s(l6, "done");
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/readable-stream/lib/_stream_passthrough.js
|
|
var m6 = E((lrt, h6) => {
|
|
"use strict";
|
|
h6.exports = Of;
|
|
var d6 = zE(), p6 = Object.create(_r());
|
|
p6.inherits = Lt();
|
|
p6.inherits(Of, d6);
|
|
function Of(e) {
|
|
if (!(this instanceof Of)) return new Of(e);
|
|
d6.call(this, e);
|
|
}
|
|
s(Of, "PassThrough");
|
|
Of.prototype._transform = function(e, t, r) {
|
|
r(null, e);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/readable-stream/readable.js
|
|
var y6 = E((Vr, vm) => {
|
|
var Gn = V("stream");
|
|
process.env.READABLE_STREAM === "disable" && Gn ? (vm.exports = Gn, Vr = vm.exports = Gn.Readable, Vr.Readable = Gn.Readable, Vr.Writable =
|
|
Gn.Writable, Vr.Duplex = Gn.Duplex, Vr.Transform = Gn.Transform, Vr.PassThrough = Gn.PassThrough, Vr.Stream = Gn) : (Vr = vm.exports = qE(),
|
|
Vr.Stream = Gn || Vr, Vr.Readable = Vr, Vr.Writable = RE(), Vr.Duplex = Po(), Vr.Transform = zE(), Vr.PassThrough = m6());
|
|
});
|
|
|
|
// ../node_modules/pumpify/node_modules/duplexify/index.js
|
|
var E6 = E((frt, v6) => {
|
|
var Em = y6(), g6 = zu(), Lne = Lt(), qne = cE(), b6 = Buffer.from && Buffer.from !== Uint8Array.from ? Buffer.from([0]) : new Buffer([0]),
|
|
GE = /* @__PURE__ */ s(function(e, t) {
|
|
e._corked ? e.once("uncork", t) : t();
|
|
}, "onuncork"), Une = /* @__PURE__ */ s(function(e, t) {
|
|
e._autoDestroy && e.destroy(t);
|
|
}, "autoDestroy"), D6 = /* @__PURE__ */ s(function(e, t) {
|
|
return function(r) {
|
|
r ? Une(e, r.message === "premature close" ? null : r) : t && !e._ended && e.end();
|
|
};
|
|
}, "destroyer"), Wne = /* @__PURE__ */ s(function(e, t) {
|
|
if (!e || e._writableState && e._writableState.finished) return t();
|
|
if (e._writableState) return e.end(t);
|
|
e.end(), t();
|
|
}, "end"), $ne = /* @__PURE__ */ s(function(e) {
|
|
return new Em.Readable({ objectMode: !0, highWaterMark: 16 }).wrap(e);
|
|
}, "toStreams2"), Hr = /* @__PURE__ */ s(function(e, t, r) {
|
|
if (!(this instanceof Hr)) return new Hr(e, t, r);
|
|
Em.Duplex.call(this, r), this._writable = null, this._readable = null, this._readable2 = null, this._autoDestroy = !r || r.autoDestroy !==
|
|
!1, this._forwardDestroy = !r || r.destroy !== !1, this._forwardEnd = !r || r.end !== !1, this._corked = 1, this._ondrain = null, this._drained =
|
|
!1, this._forwarding = !1, this._unwrite = null, this._unread = null, this._ended = !1, this.destroyed = !1, e && this.setWritable(e), t &&
|
|
this.setReadable(t);
|
|
}, "Duplexify");
|
|
Lne(Hr, Em.Duplex);
|
|
Hr.obj = function(e, t, r) {
|
|
return r || (r = {}), r.objectMode = !0, r.highWaterMark = 16, new Hr(e, t, r);
|
|
};
|
|
Hr.prototype.cork = function() {
|
|
++this._corked === 1 && this.emit("cork");
|
|
};
|
|
Hr.prototype.uncork = function() {
|
|
this._corked && --this._corked === 0 && this.emit("uncork");
|
|
};
|
|
Hr.prototype.setWritable = function(e) {
|
|
if (this._unwrite && this._unwrite(), this.destroyed) {
|
|
e && e.destroy && e.destroy();
|
|
return;
|
|
}
|
|
if (e === null || e === !1) {
|
|
this.end();
|
|
return;
|
|
}
|
|
var t = this, r = g6(e, { writable: !0, readable: !1 }, D6(this, this._forwardEnd)), i = /* @__PURE__ */ s(function() {
|
|
var a = t._ondrain;
|
|
t._ondrain = null, a && a();
|
|
}, "ondrain"), n = /* @__PURE__ */ s(function() {
|
|
t._writable.removeListener("drain", i), r();
|
|
}, "clear");
|
|
this._unwrite && process.nextTick(i), this._writable = e, this._writable.on("drain", i), this._unwrite = n, this.uncork();
|
|
};
|
|
Hr.prototype.setReadable = function(e) {
|
|
if (this._unread && this._unread(), this.destroyed) {
|
|
e && e.destroy && e.destroy();
|
|
return;
|
|
}
|
|
if (e === null || e === !1) {
|
|
this.push(null), this.resume();
|
|
return;
|
|
}
|
|
var t = this, r = g6(e, { writable: !1, readable: !0 }, D6(this)), i = /* @__PURE__ */ s(function() {
|
|
t._forward();
|
|
}, "onreadable"), n = /* @__PURE__ */ s(function() {
|
|
t.push(null);
|
|
}, "onend"), a = /* @__PURE__ */ s(function() {
|
|
t._readable2.removeListener("readable", i), t._readable2.removeListener("end", n), r();
|
|
}, "clear");
|
|
this._drained = !0, this._readable = e, this._readable2 = e._readableState ? e : $ne(e), this._readable2.on("readable", i), this._readable2.
|
|
on("end", n), this._unread = a, this._forward();
|
|
};
|
|
Hr.prototype._read = function() {
|
|
this._drained = !0, this._forward();
|
|
};
|
|
Hr.prototype._forward = function() {
|
|
if (!(this._forwarding || !this._readable2 || !this._drained)) {
|
|
this._forwarding = !0;
|
|
for (var e; this._drained && (e = qne(this._readable2)) !== null; )
|
|
this.destroyed || (this._drained = this.push(e));
|
|
this._forwarding = !1;
|
|
}
|
|
};
|
|
Hr.prototype.destroy = function(e) {
|
|
if (!this.destroyed) {
|
|
this.destroyed = !0;
|
|
var t = this;
|
|
process.nextTick(function() {
|
|
t._destroy(e);
|
|
});
|
|
}
|
|
};
|
|
Hr.prototype._destroy = function(e) {
|
|
if (e) {
|
|
var t = this._ondrain;
|
|
this._ondrain = null, t ? t(e) : this.emit("error", e);
|
|
}
|
|
this._forwardDestroy && (this._readable && this._readable.destroy && this._readable.destroy(), this._writable && this._writable.destroy &&
|
|
this._writable.destroy()), this.emit("close");
|
|
};
|
|
Hr.prototype._write = function(e, t, r) {
|
|
if (this.destroyed) return r();
|
|
if (this._corked) return GE(this, this._write.bind(this, e, t, r));
|
|
if (e === b6) return this._finish(r);
|
|
if (!this._writable) return r();
|
|
this._writable.write(e) === !1 ? this._ondrain = r : r();
|
|
};
|
|
Hr.prototype._finish = function(e) {
|
|
var t = this;
|
|
this.emit("preend"), GE(this, function() {
|
|
Wne(t._forwardEnd && t._writable, function() {
|
|
t._writableState.prefinished === !1 && (t._writableState.prefinished = !0), t.emit("prefinish"), GE(t, e);
|
|
});
|
|
});
|
|
};
|
|
Hr.prototype.end = function(e, t, r) {
|
|
return typeof e == "function" ? this.end(null, null, e) : typeof t == "function" ? this.end(e, null, t) : (this._ended = !0, e && this.write(
|
|
e), this._writableState.ending || this.write(b6), Em.Writable.prototype.end.call(this, r));
|
|
};
|
|
v6.exports = Hr;
|
|
});
|
|
|
|
// ../node_modules/pumpify/index.js
|
|
var T6 = E((prt, xm) => {
|
|
var Vne = F8(), Hne = Lt(), x6 = E6(), S6 = /* @__PURE__ */ s(function(e) {
|
|
return e.length ? Array.isArray(e[0]) ? e[0] : Array.prototype.slice.call(e) : [];
|
|
}, "toArray"), JE = /* @__PURE__ */ s(function(e) {
|
|
var t = /* @__PURE__ */ s(function() {
|
|
var r = S6(arguments);
|
|
if (!(this instanceof t)) return new t(r);
|
|
x6.call(this, null, null, e), r.length && this.setPipeline(r);
|
|
}, "Pumpify");
|
|
return Hne(t, x6), t.prototype.setPipeline = function() {
|
|
var r = S6(arguments), i = this, n = !1, a = r[0], o = r[r.length - 1];
|
|
o = o.readable ? o : null, a = a.writable ? a : null;
|
|
var u = /* @__PURE__ */ s(function() {
|
|
r[0].emit("error", new Error("stream was destroyed"));
|
|
}, "onclose");
|
|
if (this.on("close", u), this.on("prefinish", function() {
|
|
n || i.cork();
|
|
}), Vne(r, function(l) {
|
|
if (i.removeListener("close", u), l) return i.destroy(l.message === "premature close" ? null : l);
|
|
n = !0, i._autoDestroy === !1 && (i._autoDestroy = !0), i.uncork();
|
|
}), this.destroyed) return u();
|
|
this.setWritable(a), this.setReadable(o);
|
|
}, t;
|
|
}, "define");
|
|
xm.exports = JE({ autoDestroy: !1, destroy: !1 });
|
|
xm.exports.obj = JE({ autoDestroy: !1, destroy: !1, objectMode: !0, highWaterMark: 16 });
|
|
xm.exports.ctor = JE;
|
|
});
|
|
|
|
// ../node_modules/is-gzip/index.js
|
|
var w6 = E((mrt, C6) => {
|
|
"use strict";
|
|
C6.exports = function(e) {
|
|
return !e || e.length < 3 ? !1 : e[0] === 31 && e[1] === 139 && e[2] === 8;
|
|
};
|
|
});
|
|
|
|
// ../node_modules/is-deflate/index.js
|
|
var _6 = E((yrt, A6) => {
|
|
"use strict";
|
|
A6.exports = function(e) {
|
|
return !e || e.length < 2 ? !1 : e[0] === 120 && (e[1] === 1 || e[1] === 156 || e[1] === 218);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/gunzip-maybe/index.js
|
|
var O6 = E((grt, I6) => {
|
|
var P6 = V("zlib"), Kne = A8(), zne = PE(), F6 = T6(), Gne = w6(), Jne = _6(), Xne = /* @__PURE__ */ s(function(e) {
|
|
return Gne(e) ? 1 : Jne(e) ? 2 : 0;
|
|
}, "isCompressed"), XE = /* @__PURE__ */ s(function(e) {
|
|
return e === void 0 && (e = 3), Kne({ newline: !1, maxBuffer: 10 }, function(t, r) {
|
|
if (e < 0) return r(new Error("Maximum recursion reached"));
|
|
switch (Xne(t)) {
|
|
case 1:
|
|
r(null, F6(P6.createGunzip(), XE(e - 1)));
|
|
break;
|
|
case 2:
|
|
r(null, F6(P6.createInflate(), XE(e - 1)));
|
|
break;
|
|
default:
|
|
r(null, zne());
|
|
}
|
|
});
|
|
}, "gunzip");
|
|
I6.exports = XE;
|
|
});
|
|
|
|
// ../node_modules/@ndelangen/get-tarball/dist/index.js
|
|
var A4 = E((Ert, w4) => {
|
|
"use strict";
|
|
var Yne = Object.create, km = Object.defineProperty, Zne = Object.getOwnPropertyDescriptor, i4 = Object.getOwnPropertyNames, Qne = Object.
|
|
getPrototypeOf, ese = Object.prototype.hasOwnProperty, vt = /* @__PURE__ */ s((e, t) => /* @__PURE__ */ s(function() {
|
|
return t || (0, e[i4(e)[0]])((t = { exports: {} }).exports, t), t.exports;
|
|
}, "__require"), "__commonJS"), tse = /* @__PURE__ */ s((e, t) => {
|
|
for (var r in t)
|
|
km(e, r, { get: t[r], enumerable: !0 });
|
|
}, "__export"), n4 = /* @__PURE__ */ s((e, t, r, i) => {
|
|
if (t && typeof t == "object" || typeof t == "function")
|
|
for (let n of i4(t))
|
|
!ese.call(e, n) && n !== r && km(e, n, { get: /* @__PURE__ */ s(() => t[n], "get"), enumerable: !(i = Zne(t, n)) || i.enumerable });
|
|
return e;
|
|
}, "__copyProps"), Cr = /* @__PURE__ */ s((e, t, r) => (r = e != null ? Yne(Qne(e)) : {}, n4(
|
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
// file that has been converted to a CommonJS file using a Babel-
|
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
t || !e || !e.__esModule ? km(r, "default", { value: e, enumerable: !0 }) : r,
|
|
e
|
|
)), "__toESM"), rse = /* @__PURE__ */ s((e) => n4(km({}, "__esModule", { value: !0 }), e), "__toCommonJS"), ise = vt({
|
|
"node_modules/.pnpm/defer-to-connect@2.0.1/node_modules/defer-to-connect/dist/source/index.js"(e, t) {
|
|
"use strict";
|
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
function r(n) {
|
|
return n.encrypted;
|
|
}
|
|
s(r, "isTLSSocket");
|
|
var i = /* @__PURE__ */ s((n, a) => {
|
|
let o;
|
|
typeof a == "function" ? o = { connect: a } : o = a;
|
|
let u = typeof o.connect == "function", l = typeof o.secureConnect == "function", c = typeof o.close == "function", f = /* @__PURE__ */ s(
|
|
() => {
|
|
u && o.connect(), r(n) && l && (n.authorized ? o.secureConnect() : n.authorizationError || n.once("secureConnect", o.secureConnect)),
|
|
c && n.once("close", o.close);
|
|
}, "onConnect");
|
|
n.writable && !n.connecting ? f() : n.connecting ? n.once("connect", f) : n.destroyed && c && o.close(n._hadError);
|
|
}, "deferToConnect2");
|
|
e.default = i, t.exports = i, t.exports.default = i;
|
|
}
|
|
}), nse = vt({
|
|
"node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js"(e, t) {
|
|
"use strict";
|
|
var { PassThrough: r } = V("stream");
|
|
t.exports = (i) => {
|
|
i = { ...i };
|
|
let { array: n } = i, { encoding: a } = i, o = a === "buffer", u = !1;
|
|
n ? u = !(a || o) : a = a || "utf8", o && (a = null);
|
|
let l = new r({ objectMode: u });
|
|
a && l.setEncoding(a);
|
|
let c = 0, f = [];
|
|
return l.on("data", (m) => {
|
|
f.push(m), u ? c = f.length : c += m.length;
|
|
}), l.getBufferedValue = () => n ? f : o ? Buffer.concat(f, c) : f.join(""), l.getBufferedLength = () => c, l;
|
|
};
|
|
}
|
|
}), s4 = vt({
|
|
"node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js"(e, t) {
|
|
"use strict";
|
|
var { constants: r } = V("buffer"), i = V("stream"), { promisify: n } = V("util"), a = nse(), o = n(i.pipeline), u = class extends Error {
|
|
static {
|
|
s(this, "MaxBufferError");
|
|
}
|
|
constructor() {
|
|
super("maxBuffer exceeded"), this.name = "MaxBufferError";
|
|
}
|
|
};
|
|
async function l(c, f) {
|
|
if (!c)
|
|
throw new Error("Expected a stream");
|
|
f = {
|
|
maxBuffer: 1 / 0,
|
|
...f
|
|
};
|
|
let { maxBuffer: m } = f, h = a(f);
|
|
return await new Promise((d, y) => {
|
|
let p = /* @__PURE__ */ s((g) => {
|
|
g && h.getBufferedLength() <= r.MAX_LENGTH && (g.bufferedData = h.getBufferedValue()), y(g);
|
|
}, "rejectPromise");
|
|
(async () => {
|
|
try {
|
|
await o(c, h), d();
|
|
} catch (g) {
|
|
p(g);
|
|
}
|
|
})(), h.on("data", () => {
|
|
h.getBufferedLength() > m && p(new u());
|
|
});
|
|
}), h.getBufferedValue();
|
|
}
|
|
s(l, "getStream2"), t.exports = l, t.exports.buffer = (c, f) => l(c, { ...f, encoding: "buffer" }), t.exports.array = (c, f) => l(c, {
|
|
...f, array: !0 }), t.exports.MaxBufferError = u;
|
|
}
|
|
}), sse = vt({
|
|
"node_modules/.pnpm/http-cache-semantics@4.1.1/node_modules/http-cache-semantics/index.js"(e, t) {
|
|
"use strict";
|
|
var r = /* @__PURE__ */ new Set([
|
|
200,
|
|
203,
|
|
204,
|
|
206,
|
|
300,
|
|
301,
|
|
308,
|
|
404,
|
|
405,
|
|
410,
|
|
414,
|
|
501
|
|
]), i = /* @__PURE__ */ new Set([
|
|
200,
|
|
203,
|
|
204,
|
|
300,
|
|
301,
|
|
302,
|
|
303,
|
|
307,
|
|
308,
|
|
404,
|
|
405,
|
|
410,
|
|
414,
|
|
501
|
|
]), n = /* @__PURE__ */ new Set([
|
|
500,
|
|
502,
|
|
503,
|
|
504
|
|
]), a = {
|
|
date: !0,
|
|
// included, because we add Age update Date
|
|
connection: !0,
|
|
"keep-alive": !0,
|
|
"proxy-authenticate": !0,
|
|
"proxy-authorization": !0,
|
|
te: !0,
|
|
trailer: !0,
|
|
"transfer-encoding": !0,
|
|
upgrade: !0
|
|
}, o = {
|
|
// Since the old body is reused, it doesn't make sense to change properties of the body
|
|
"content-length": !0,
|
|
"content-encoding": !0,
|
|
"transfer-encoding": !0,
|
|
"content-range": !0
|
|
};
|
|
function u(m) {
|
|
let h = parseInt(m, 10);
|
|
return isFinite(h) ? h : 0;
|
|
}
|
|
s(u, "toNumberOrZero");
|
|
function l(m) {
|
|
return m ? n.has(m.status) : !0;
|
|
}
|
|
s(l, "isErrorResponse");
|
|
function c(m) {
|
|
let h = {};
|
|
if (!m)
|
|
return h;
|
|
let d = m.trim().split(/,/);
|
|
for (let y of d) {
|
|
let [p, g] = y.split(/=/, 2);
|
|
h[p.trim()] = g === void 0 ? !0 : g.trim().replace(/^"|"$/g, "");
|
|
}
|
|
return h;
|
|
}
|
|
s(c, "parseCacheControl");
|
|
function f(m) {
|
|
let h = [];
|
|
for (let d in m) {
|
|
let y = m[d];
|
|
h.push(y === !0 ? d : d + "=" + y);
|
|
}
|
|
if (h.length)
|
|
return h.join(", ");
|
|
}
|
|
s(f, "formatCacheControl"), t.exports = class {
|
|
static {
|
|
s(this, "CachePolicy");
|
|
}
|
|
constructor(h, d, {
|
|
shared: y,
|
|
cacheHeuristic: p,
|
|
immutableMinTimeToLive: g,
|
|
ignoreCargoCult: b,
|
|
_fromObject: D
|
|
} = {}) {
|
|
if (D) {
|
|
this._fromObject(D);
|
|
return;
|
|
}
|
|
if (!d || !d.headers)
|
|
throw Error("Response headers missing");
|
|
this._assertRequestHasHeaders(h), this._responseTime = this.now(), this._isShared = y !== !1, this._cacheHeuristic = p !== void 0 ?
|
|
p : 0.1, this._immutableMinTtl = g !== void 0 ? g : 24 * 3600 * 1e3, this._status = "status" in d ? d.status : 200, this._resHeaders =
|
|
d.headers, this._rescc = c(d.headers["cache-control"]), this._method = "method" in h ? h.method : "GET", this._url = h.url, this._host =
|
|
h.headers.host, this._noAuthorization = !h.headers.authorization, this._reqHeaders = d.headers.vary ? h.headers : null, this._reqcc =
|
|
c(h.headers["cache-control"]), b && "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-revalid\
|
|
ate"], this._resHeaders = Object.assign({}, this._resHeaders, {
|
|
"cache-control": f(this._rescc)
|
|
}), delete this._resHeaders.expires, delete this._resHeaders.pragma), d.headers["cache-control"] == null && /no-cache/.test(d.headers.
|
|
pragma) && (this._rescc["no-cache"] = !0);
|
|
}
|
|
now() {
|
|
return Date.now();
|
|
}
|
|
storable() {
|
|
return !!(!this._reqcc["no-store"] && // A cache MUST NOT store a response to any request, unless:
|
|
// The request method is understood by the cache and defined as being cacheable, and
|
|
(this._method === "GET" || this._method === "HEAD" || this._method === "POST" && this._hasExplicitExpiration()) && // the response status code is understood by the cache, and
|
|
i.has(this._status) && // the "no-store" cache directive does not appear in request or response header fields, and
|
|
!this._rescc["no-store"] && // the "private" response directive does not appear in the response, if the cache is shared, and
|
|
(!this._isShared || !this._rescc.private) && // the Authorization header field does not appear in the request, if the cache is shared,
|
|
(!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && // the response either:
|
|
// contains an Expires header field, or
|
|
(this._resHeaders.expires || // contains a max-age response directive, or
|
|
// contains a s-maxage response directive and the cache is shared, or
|
|
// contains a public response directive.
|
|
this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || // has a status code that is defined as cacheable by default
|
|
r.has(this._status)));
|
|
}
|
|
_hasExplicitExpiration() {
|
|
return this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires;
|
|
}
|
|
_assertRequestHasHeaders(h) {
|
|
if (!h || !h.headers)
|
|
throw Error("Request headers missing");
|
|
}
|
|
satisfiesWithoutRevalidation(h) {
|
|
this._assertRequestHasHeaders(h);
|
|
let d = c(h.headers["cache-control"]);
|
|
return d["no-cache"] || /no-cache/.test(h.headers.pragma) || d["max-age"] && this.age() > d["max-age"] || d["min-fresh"] && this.timeToLive() <
|
|
1e3 * d["min-fresh"] || this.stale() && !(d["max-stale"] && !this._rescc["must-revalidate"] && (d["max-stale"] === !0 || d["max-st\
|
|
ale"] > this.age() - this.maxAge())) ? !1 : this._requestMatches(h, !1);
|
|
}
|
|
_requestMatches(h, d) {
|
|
return (!this._url || this._url === h.url) && this._host === h.headers.host && // the request method associated with the stored response allows it to be used for the presented request, and
|
|
(!h.method || this._method === h.method || d && h.method === "HEAD") && // selecting header fields nominated by the stored response (if any) match those presented, and
|
|
this._varyMatches(h);
|
|
}
|
|
_allowsStoringAuthenticated() {
|
|
return this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"];
|
|
}
|
|
_varyMatches(h) {
|
|
if (!this._resHeaders.vary)
|
|
return !0;
|
|
if (this._resHeaders.vary === "*")
|
|
return !1;
|
|
let d = this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);
|
|
for (let y of d)
|
|
if (h.headers[y] !== this._reqHeaders[y])
|
|
return !1;
|
|
return !0;
|
|
}
|
|
_copyWithoutHopByHopHeaders(h) {
|
|
let d = {};
|
|
for (let y in h)
|
|
a[y] || (d[y] = h[y]);
|
|
if (h.connection) {
|
|
let y = h.connection.trim().split(/\s*,\s*/);
|
|
for (let p of y)
|
|
delete d[p];
|
|
}
|
|
if (d.warning) {
|
|
let y = d.warning.split(/,/).filter((p) => !/^\s*1[0-9][0-9]/.test(p));
|
|
y.length ? d.warning = y.join(",").trim() : delete d.warning;
|
|
}
|
|
return d;
|
|
}
|
|
responseHeaders() {
|
|
let h = this._copyWithoutHopByHopHeaders(this._resHeaders), d = this.age();
|
|
return d > 3600 * 24 && !this._hasExplicitExpiration() && this.maxAge() > 3600 * 24 && (h.warning = (h.warning ? `${h.warning}, ` :
|
|
"") + '113 - "rfc7234 5.5.4"'), h.age = `${Math.round(d)}`, h.date = new Date(this.now()).toUTCString(), h;
|
|
}
|
|
/**
|
|
* Value of the Date response header or current time if Date was invalid
|
|
* @return timestamp
|
|
*/
|
|
date() {
|
|
let h = Date.parse(this._resHeaders.date);
|
|
return isFinite(h) ? h : this._responseTime;
|
|
}
|
|
/**
|
|
* Value of the Age header, in seconds, updated for the current time.
|
|
* May be fractional.
|
|
*
|
|
* @return Number
|
|
*/
|
|
age() {
|
|
let h = this._ageValue(), d = (this.now() - this._responseTime) / 1e3;
|
|
return h + d;
|
|
}
|
|
_ageValue() {
|
|
return u(this._resHeaders.age);
|
|
}
|
|
/**
|
|
* Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`.
|
|
*
|
|
* For an up-to-date value, see `timeToLive()`.
|
|
*
|
|
* @return Number
|
|
*/
|
|
maxAge() {
|
|
if (!this.storable() || this._rescc["no-cache"] || this._isShared && this._resHeaders["set-cookie"] && !this._rescc.public && !this.
|
|
_rescc.immutable || this._resHeaders.vary === "*")
|
|
return 0;
|
|
if (this._isShared) {
|
|
if (this._rescc["proxy-revalidate"])
|
|
return 0;
|
|
if (this._rescc["s-maxage"])
|
|
return u(this._rescc["s-maxage"]);
|
|
}
|
|
if (this._rescc["max-age"])
|
|
return u(this._rescc["max-age"]);
|
|
let h = this._rescc.immutable ? this._immutableMinTtl : 0, d = this.date();
|
|
if (this._resHeaders.expires) {
|
|
let y = Date.parse(this._resHeaders.expires);
|
|
return Number.isNaN(y) || y < d ? 0 : Math.max(h, (y - d) / 1e3);
|
|
}
|
|
if (this._resHeaders["last-modified"]) {
|
|
let y = Date.parse(this._resHeaders["last-modified"]);
|
|
if (isFinite(y) && d > y)
|
|
return Math.max(
|
|
h,
|
|
(d - y) / 1e3 * this._cacheHeuristic
|
|
);
|
|
}
|
|
return h;
|
|
}
|
|
timeToLive() {
|
|
let h = this.maxAge() - this.age(), d = h + u(this._rescc["stale-if-error"]), y = h + u(this._rescc["stale-while-revalidate"]);
|
|
return Math.max(0, h, d, y) * 1e3;
|
|
}
|
|
stale() {
|
|
return this.maxAge() <= this.age();
|
|
}
|
|
_useStaleIfError() {
|
|
return this.maxAge() + u(this._rescc["stale-if-error"]) > this.age();
|
|
}
|
|
useStaleWhileRevalidate() {
|
|
return this.maxAge() + u(this._rescc["stale-while-revalidate"]) > this.age();
|
|
}
|
|
static fromObject(h) {
|
|
return new this(void 0, void 0, { _fromObject: h });
|
|
}
|
|
_fromObject(h) {
|
|
if (this._responseTime)
|
|
throw Error("Reinitialized");
|
|
if (!h || h.v !== 1)
|
|
throw Error("Invalid serialization");
|
|
this._responseTime = h.t, this._isShared = h.sh, this._cacheHeuristic = h.ch, this._immutableMinTtl = h.imm !== void 0 ? h.imm : 24 *
|
|
3600 * 1e3, this._status = h.st, this._resHeaders = h.resh, this._rescc = h.rescc, this._method = h.m, this._url = h.u, this._host =
|
|
h.h, this._noAuthorization = h.a, this._reqHeaders = h.reqh, this._reqcc = h.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
|
|
};
|
|
}
|
|
/**
|
|
* Headers for sending to the origin server to revalidate stale response.
|
|
* Allows server to return 304 to allow reuse of the previous response.
|
|
*
|
|
* Hop by hop headers are always stripped.
|
|
* Revalidation headers may be added or removed, depending on request.
|
|
*/
|
|
revalidationHeaders(h) {
|
|
this._assertRequestHasHeaders(h);
|
|
let d = this._copyWithoutHopByHopHeaders(h.headers);
|
|
if (delete d["if-range"], !this._requestMatches(h, !0) || !this.storable())
|
|
return delete d["if-none-match"], delete d["if-modified-since"], d;
|
|
if (this._resHeaders.etag && (d["if-none-match"] = d["if-none-match"] ? `${d["if-none-match"]}, ${this._resHeaders.etag}` : this._resHeaders.
|
|
etag), d["accept-ranges"] || d["if-match"] || d["if-unmodified-since"] || this._method && this._method != "GET") {
|
|
if (delete d["if-modified-since"], d["if-none-match"]) {
|
|
let p = d["if-none-match"].split(/,/).filter((g) => !/^\s*W\//.test(g));
|
|
p.length ? d["if-none-match"] = p.join(",").trim() : delete d["if-none-match"];
|
|
}
|
|
} else this._resHeaders["last-modified"] && !d["if-modified-since"] && (d["if-modified-since"] = this._resHeaders["last-modified"]);
|
|
return d;
|
|
}
|
|
/**
|
|
* Creates new CachePolicy with information combined from the previews response,
|
|
* and the new revalidation response.
|
|
*
|
|
* Returns {policy, modified} where modified is a boolean indicating
|
|
* whether the response body has been modified, and old cached body can't be used.
|
|
*
|
|
* @return {Object} {policy: CachePolicy, modified: Boolean}
|
|
*/
|
|
revalidatedPolicy(h, d) {
|
|
if (this._assertRequestHasHeaders(h), this._useStaleIfError() && l(d))
|
|
return {
|
|
modified: !1,
|
|
matches: !1,
|
|
policy: this
|
|
};
|
|
if (!d || !d.headers)
|
|
throw Error("Response headers missing");
|
|
let y = !1;
|
|
if (d.status !== void 0 && d.status != 304 ? y = !1 : d.headers.etag && !/^\s*W\//.test(d.headers.etag) ? y = this._resHeaders.etag &&
|
|
this._resHeaders.etag.replace(/^\s*W\//, "") === d.headers.etag : this._resHeaders.etag && d.headers.etag ? y = this._resHeaders.etag.
|
|
replace(/^\s*W\//, "") === d.headers.etag.replace(/^\s*W\//, "") : this._resHeaders["last-modified"] ? y = this._resHeaders["last-\
|
|
modified"] === d.headers["last-modified"] : !this._resHeaders.etag && !this._resHeaders["last-modified"] && !d.headers.etag && !d.headers["l\
|
|
ast-modified"] && (y = !0), !y)
|
|
return {
|
|
policy: new this.constructor(h, d),
|
|
// Client receiving 304 without body, even if it's invalid/mismatched has no option
|
|
// but to reuse a cached body. We don't have a good way to tell clients to do
|
|
// error recovery in such case.
|
|
modified: d.status != 304,
|
|
matches: !1
|
|
};
|
|
let p = {};
|
|
for (let b in this._resHeaders)
|
|
p[b] = b in d.headers && !o[b] ? d.headers[b] : this._resHeaders[b];
|
|
let g = Object.assign({}, d, {
|
|
status: this._status,
|
|
method: this._method,
|
|
headers: p
|
|
});
|
|
return {
|
|
policy: new this.constructor(h, g, {
|
|
shared: this._isShared,
|
|
cacheHeuristic: this._cacheHeuristic,
|
|
immutableMinTimeToLive: this._immutableMinTtl
|
|
}),
|
|
modified: !1,
|
|
matches: !0
|
|
};
|
|
}
|
|
};
|
|
}
|
|
}), ase = vt({
|
|
"node_modules/.pnpm/json-buffer@3.0.1/node_modules/json-buffer/index.js"(e) {
|
|
e.stringify = /* @__PURE__ */ s(function t(r) {
|
|
if (typeof r > "u")
|
|
return r;
|
|
if (r && Buffer.isBuffer(r))
|
|
return JSON.stringify(":base64:" + r.toString("base64"));
|
|
if (r && r.toJSON && (r = r.toJSON()), r && typeof r == "object") {
|
|
var i = "", n = Array.isArray(r);
|
|
i = n ? "[" : "{";
|
|
var a = !0;
|
|
for (var o in r) {
|
|
var u = typeof r[o] == "function" || !n && typeof r[o] > "u";
|
|
Object.hasOwnProperty.call(r, o) && !u && (a || (i += ","), a = !1, n ? r[o] == null ? i += "null" : i += t(r[o]) : r[o] !== void 0 &&
|
|
(i += t(o) + ":" + t(r[o])));
|
|
}
|
|
return i += n ? "]" : "}", i;
|
|
} else return typeof r == "string" ? JSON.stringify(/^:/.test(r) ? ":" + r : r) : typeof r > "u" ? "null" : JSON.stringify(r);
|
|
}, "stringify"), e.parse = function(t) {
|
|
return JSON.parse(t, function(r, i) {
|
|
return typeof i == "string" ? /^:base64:/.test(i) ? Buffer.from(i.substring(8), "base64") : /^:/.test(i) ? i.substring(1) : i : i;
|
|
});
|
|
};
|
|
}
|
|
}), ose = vt({
|
|
"node_modules/.pnpm/keyv@4.5.2/node_modules/keyv/src/index.js"(e, t) {
|
|
"use strict";
|
|
var r = V("events"), i = ase(), n = /* @__PURE__ */ s((u) => {
|
|
let l = {
|
|
redis: "@keyv/redis",
|
|
rediss: "@keyv/redis",
|
|
mongodb: "@keyv/mongo",
|
|
mongo: "@keyv/mongo",
|
|
sqlite: "@keyv/sqlite",
|
|
postgresql: "@keyv/postgres",
|
|
postgres: "@keyv/postgres",
|
|
mysql: "@keyv/mysql",
|
|
etcd: "@keyv/etcd",
|
|
offline: "@keyv/offline",
|
|
tiered: "@keyv/tiered"
|
|
};
|
|
if (u.adapter || u.uri) {
|
|
let c = u.adapter || /^[^:+]*/.exec(u.uri)[0];
|
|
return new (V(l[c]))(u);
|
|
}
|
|
return /* @__PURE__ */ new Map();
|
|
}, "loadStore"), a = [
|
|
"sqlite",
|
|
"postgres",
|
|
"mysql",
|
|
"mongo",
|
|
"redis",
|
|
"tiered"
|
|
], o = class extends r {
|
|
static {
|
|
s(this, "Keyv2");
|
|
}
|
|
constructor(u, { emitErrors: l = !0, ...c } = {}) {
|
|
if (super(), this.opts = {
|
|
namespace: "keyv",
|
|
serialize: i.stringify,
|
|
deserialize: i.parse,
|
|
...typeof u == "string" ? { uri: u } : u,
|
|
...c
|
|
}, !this.opts.store) {
|
|
let m = { ...this.opts };
|
|
this.opts.store = n(m);
|
|
}
|
|
if (this.opts.compression) {
|
|
let m = this.opts.compression;
|
|
this.opts.serialize = m.serialize.bind(m), this.opts.deserialize = m.deserialize.bind(m);
|
|
}
|
|
typeof this.opts.store.on == "function" && l && this.opts.store.on("error", (m) => this.emit("error", m)), this.opts.store.namespace =
|
|
this.opts.namespace;
|
|
let f = /* @__PURE__ */ s((m) => async function* () {
|
|
for await (let [h, d] of typeof m == "function" ? m(this.opts.store.namespace) : m) {
|
|
let y = this.opts.deserialize(d);
|
|
if (!(this.opts.store.namespace && !h.includes(this.opts.store.namespace))) {
|
|
if (typeof y.expires == "number" && Date.now() > y.expires) {
|
|
this.delete(h);
|
|
continue;
|
|
}
|
|
yield [this._getKeyUnprefix(h), y.value];
|
|
}
|
|
}
|
|
}, "generateIterator");
|
|
typeof this.opts.store[Symbol.iterator] == "function" && this.opts.store instanceof Map ? this.iterator = f(this.opts.store) : typeof this.
|
|
opts.store.iterator == "function" && this.opts.store.opts && this._checkIterableAdaptar() && (this.iterator = f(this.opts.store.iterator.
|
|
bind(this.opts.store)));
|
|
}
|
|
_checkIterableAdaptar() {
|
|
return a.includes(this.opts.store.opts.dialect) || a.findIndex((u) => this.opts.store.opts.url.includes(u)) >= 0;
|
|
}
|
|
_getKeyPrefix(u) {
|
|
return `${this.opts.namespace}:${u}`;
|
|
}
|
|
_getKeyPrefixArray(u) {
|
|
return u.map((l) => `${this.opts.namespace}:${l}`);
|
|
}
|
|
_getKeyUnprefix(u) {
|
|
return u.split(":").splice(1).join(":");
|
|
}
|
|
get(u, l) {
|
|
let { store: c } = this.opts, f = Array.isArray(u), m = f ? this._getKeyPrefixArray(u) : this._getKeyPrefix(u);
|
|
if (f && c.getMany === void 0) {
|
|
let h = [];
|
|
for (let d of m)
|
|
h.push(
|
|
Promise.resolve().then(() => c.get(d)).then((y) => typeof y == "string" ? this.opts.deserialize(y) : this.opts.compression ?
|
|
this.opts.deserialize(y) : y).then((y) => {
|
|
if (y != null)
|
|
return typeof y.expires == "number" && Date.now() > y.expires ? this.delete(d).then(() => {
|
|
}) : l && l.raw ? y : y.value;
|
|
})
|
|
);
|
|
return Promise.allSettled(h).then((d) => {
|
|
let y = [];
|
|
for (let p of d)
|
|
y.push(p.value);
|
|
return y;
|
|
});
|
|
}
|
|
return Promise.resolve().then(() => f ? c.getMany(m) : c.get(m)).then((h) => typeof h == "string" ? this.opts.deserialize(h) : this.
|
|
opts.compression ? this.opts.deserialize(h) : h).then((h) => {
|
|
if (h != null) {
|
|
if (f) {
|
|
let d = [];
|
|
for (let y of h) {
|
|
if (typeof y == "string" && (y = this.opts.deserialize(y)), y == null) {
|
|
d.push(void 0);
|
|
continue;
|
|
}
|
|
typeof y.expires == "number" && Date.now() > y.expires ? (this.delete(u).then(() => {
|
|
}), d.push(void 0)) : d.push(l && l.raw ? y : y.value);
|
|
}
|
|
return d;
|
|
}
|
|
return typeof h.expires == "number" && Date.now() > h.expires ? this.delete(u).then(() => {
|
|
}) : l && l.raw ? h : h.value;
|
|
}
|
|
});
|
|
}
|
|
set(u, l, c) {
|
|
let f = this._getKeyPrefix(u);
|
|
typeof c > "u" && (c = this.opts.ttl), c === 0 && (c = void 0);
|
|
let { store: m } = this.opts;
|
|
return Promise.resolve().then(() => {
|
|
let h = typeof c == "number" ? Date.now() + c : null;
|
|
return typeof l == "symbol" && this.emit("error", "symbol cannot be serialized"), l = { value: l, expires: h }, this.opts.serialize(
|
|
l);
|
|
}).then((h) => m.set(f, h, c)).then(() => !0);
|
|
}
|
|
delete(u) {
|
|
let { store: l } = this.opts;
|
|
if (Array.isArray(u)) {
|
|
let f = this._getKeyPrefixArray(u);
|
|
if (l.deleteMany === void 0) {
|
|
let m = [];
|
|
for (let h of f)
|
|
m.push(l.delete(h));
|
|
return Promise.allSettled(m).then((h) => h.every((d) => d.value === !0));
|
|
}
|
|
return Promise.resolve().then(() => l.deleteMany(f));
|
|
}
|
|
let c = this._getKeyPrefix(u);
|
|
return Promise.resolve().then(() => l.delete(c));
|
|
}
|
|
clear() {
|
|
let { store: u } = this.opts;
|
|
return Promise.resolve().then(() => u.clear());
|
|
}
|
|
has(u) {
|
|
let l = this._getKeyPrefix(u), { store: c } = this.opts;
|
|
return Promise.resolve().then(async () => typeof c.has == "function" ? c.has(l) : await c.get(l) !== void 0);
|
|
}
|
|
disconnect() {
|
|
let { store: u } = this.opts;
|
|
if (typeof u.disconnect == "function")
|
|
return u.disconnect();
|
|
}
|
|
};
|
|
t.exports = o;
|
|
}
|
|
}), use = vt({
|
|
"node_modules/.pnpm/mimic-response@3.1.0/node_modules/mimic-response/index.js"(e, t) {
|
|
"use strict";
|
|
var r = [
|
|
"aborted",
|
|
"complete",
|
|
"headers",
|
|
"httpVersion",
|
|
"httpVersionMinor",
|
|
"httpVersionMajor",
|
|
"method",
|
|
"rawHeaders",
|
|
"rawTrailers",
|
|
"setTimeout",
|
|
"socket",
|
|
"statusCode",
|
|
"statusMessage",
|
|
"trailers",
|
|
"url"
|
|
];
|
|
t.exports = (i, n) => {
|
|
if (n._readableState.autoDestroy)
|
|
throw new Error("The second stream must have the `autoDestroy` option set to `false`");
|
|
let a = new Set(Object.keys(i).concat(r)), o = {};
|
|
for (let u of a)
|
|
u in n || (o[u] = {
|
|
get() {
|
|
let l = i[u];
|
|
return typeof l == "function" ? l.bind(i) : l;
|
|
},
|
|
set(l) {
|
|
i[u] = l;
|
|
},
|
|
enumerable: !0,
|
|
configurable: !1
|
|
});
|
|
return Object.defineProperties(n, o), i.once("aborted", () => {
|
|
n.destroy(), n.emit("aborted");
|
|
}), i.once("close", () => {
|
|
i.complete && n.readable ? n.once("end", () => {
|
|
n.emit("close");
|
|
}) : n.emit("close");
|
|
}), n;
|
|
};
|
|
}
|
|
}), lse = vt({
|
|
"node_modules/.pnpm/decompress-response@6.0.0/node_modules/decompress-response/index.js"(e, t) {
|
|
"use strict";
|
|
var { Transform: r, PassThrough: i } = V("stream"), n = V("zlib"), a = use();
|
|
t.exports = (o) => {
|
|
let u = (o.headers["content-encoding"] || "").toLowerCase();
|
|
if (!["gzip", "deflate", "br"].includes(u))
|
|
return o;
|
|
let l = u === "br";
|
|
if (l && typeof n.createBrotliDecompress != "function")
|
|
return o.destroy(new Error("Brotli is not supported on Node.js < 12")), o;
|
|
let c = !0, f = new r({
|
|
transform(d, y, p) {
|
|
c = !1, p(null, d);
|
|
},
|
|
flush(d) {
|
|
d();
|
|
}
|
|
}), m = new i({
|
|
autoDestroy: !1,
|
|
destroy(d, y) {
|
|
o.destroy(), y(d);
|
|
}
|
|
}), h = l ? n.createBrotliDecompress() : n.createUnzip();
|
|
return h.once("error", (d) => {
|
|
if (c && !o.readable) {
|
|
m.end();
|
|
return;
|
|
}
|
|
m.destroy(d);
|
|
}), a(o, m), o.pipe(f).pipe(h).pipe(m), m;
|
|
};
|
|
}
|
|
}), a4 = vt({
|
|
"node_modules/.pnpm/quick-lru@5.1.1/node_modules/quick-lru/index.js"(e, t) {
|
|
"use strict";
|
|
var r = class {
|
|
static {
|
|
s(this, "QuickLRU");
|
|
}
|
|
constructor(i = {}) {
|
|
if (!(i.maxSize && i.maxSize > 0))
|
|
throw new TypeError("`maxSize` must be a number greater than 0");
|
|
this.maxSize = i.maxSize, this.onEviction = i.onEviction, this.cache = /* @__PURE__ */ new Map(), this.oldCache = /* @__PURE__ */ new Map(),
|
|
this._size = 0;
|
|
}
|
|
_set(i, n) {
|
|
if (this.cache.set(i, n), this._size++, this._size >= this.maxSize) {
|
|
if (this._size = 0, typeof this.onEviction == "function")
|
|
for (let [a, o] of this.oldCache.entries())
|
|
this.onEviction(a, o);
|
|
this.oldCache = this.cache, this.cache = /* @__PURE__ */ new Map();
|
|
}
|
|
}
|
|
get(i) {
|
|
if (this.cache.has(i))
|
|
return this.cache.get(i);
|
|
if (this.oldCache.has(i)) {
|
|
let n = this.oldCache.get(i);
|
|
return this.oldCache.delete(i), this._set(i, n), n;
|
|
}
|
|
}
|
|
set(i, n) {
|
|
return this.cache.has(i) ? this.cache.set(i, n) : this._set(i, n), this;
|
|
}
|
|
has(i) {
|
|
return this.cache.has(i) || this.oldCache.has(i);
|
|
}
|
|
peek(i) {
|
|
if (this.cache.has(i))
|
|
return this.cache.get(i);
|
|
if (this.oldCache.has(i))
|
|
return this.oldCache.get(i);
|
|
}
|
|
delete(i) {
|
|
let n = this.cache.delete(i);
|
|
return n && this._size--, this.oldCache.delete(i) || n;
|
|
}
|
|
clear() {
|
|
this.cache.clear(), this.oldCache.clear(), this._size = 0;
|
|
}
|
|
*keys() {
|
|
for (let [i] of this)
|
|
yield i;
|
|
}
|
|
*values() {
|
|
for (let [, i] of this)
|
|
yield i;
|
|
}
|
|
*[Symbol.iterator]() {
|
|
for (let i of this.cache)
|
|
yield i;
|
|
for (let i of this.oldCache) {
|
|
let [n] = i;
|
|
this.cache.has(n) || (yield i);
|
|
}
|
|
}
|
|
get size() {
|
|
let i = 0;
|
|
for (let n of this.oldCache.keys())
|
|
this.cache.has(n) || i++;
|
|
return Math.min(this._size + i, this.maxSize);
|
|
}
|
|
};
|
|
t.exports = r;
|
|
}
|
|
}), o4 = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/utils/delay-async-destroy.js"(e, t) {
|
|
"use strict";
|
|
t.exports = (r) => {
|
|
if (r.listenerCount("error") !== 0)
|
|
return r;
|
|
r.__destroy = r._destroy, r._destroy = (...n) => {
|
|
let a = n.pop();
|
|
r.__destroy(...n, async (o) => {
|
|
await Promise.resolve(), a(o);
|
|
});
|
|
};
|
|
let i = /* @__PURE__ */ s((n) => {
|
|
Promise.resolve().then(() => {
|
|
r.emit("error", n);
|
|
});
|
|
}, "onError");
|
|
return r.once("error", i), Promise.resolve().then(() => {
|
|
r.off("error", i);
|
|
}), r;
|
|
};
|
|
}
|
|
}), Dl = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/agent.js"(e, t) {
|
|
"use strict";
|
|
var { URL: r } = V("url"), i = V("events"), n = V("tls"), a = V("http2"), o = a4(), u = o4(), l = Symbol("currentStreamCount"), c = Symbol(
|
|
"request"), f = Symbol("cachedOriginSet"), m = Symbol("gracefullyClosing"), h = Symbol("length"), d = [
|
|
// Not an Agent option actually
|
|
"createConnection",
|
|
// `http2.connect()` options
|
|
"maxDeflateDynamicTableSize",
|
|
"maxSettings",
|
|
"maxSessionMemory",
|
|
"maxHeaderListPairs",
|
|
"maxOutstandingPings",
|
|
"maxReservedRemoteStreams",
|
|
"maxSendHeaderBlockLength",
|
|
"paddingStrategy",
|
|
"peerMaxConcurrentStreams",
|
|
"settings",
|
|
// `tls.connect()` source options
|
|
"family",
|
|
"localAddress",
|
|
"rejectUnauthorized",
|
|
// `tls.connect()` secure context options
|
|
"pskCallback",
|
|
"minDHSize",
|
|
// `tls.connect()` destination options
|
|
// - `servername` is automatically validated, skip it
|
|
// - `host` and `port` just describe the destination server,
|
|
"path",
|
|
"socket",
|
|
// `tls.createSecureContext()` options
|
|
"ca",
|
|
"cert",
|
|
"sigalgs",
|
|
"ciphers",
|
|
"clientCertEngine",
|
|
"crl",
|
|
"dhparam",
|
|
"ecdhCurve",
|
|
"honorCipherOrder",
|
|
"key",
|
|
"privateKeyEngine",
|
|
"privateKeyIdentifier",
|
|
"maxVersion",
|
|
"minVersion",
|
|
"pfx",
|
|
"secureOptions",
|
|
"secureProtocol",
|
|
"sessionIdContext",
|
|
"ticketKeys"
|
|
], y = /* @__PURE__ */ s((S, C, O) => {
|
|
let k = 0, U = S.length;
|
|
for (; k < U; ) {
|
|
let j = k + U >>> 1;
|
|
O(S[j], C) ? k = j + 1 : U = j;
|
|
}
|
|
return k;
|
|
}, "getSortedIndex"), p = /* @__PURE__ */ s((S, C) => S.remoteSettings.maxConcurrentStreams > C.remoteSettings.maxConcurrentStreams, "\
|
|
compareSessions"), g = /* @__PURE__ */ s((S, C) => {
|
|
for (let O = 0; O < S.length; O++) {
|
|
let k = S[O];
|
|
// Unfortunately `.every()` returns true for an empty array
|
|
k[f].length > 0 && k[f].length < C[f].length && k[f].every((U) => C[f].includes(U)) && k[l] + C[l] <= C.remoteSettings.maxConcurrentStreams &&
|
|
D(k);
|
|
}
|
|
}, "closeCoveredSessions"), b = /* @__PURE__ */ s((S, C) => {
|
|
for (let O = 0; O < S.length; O++) {
|
|
let k = S[O];
|
|
if (C[f].length > 0 && C[f].length < k[f].length && C[f].every((U) => k[f].includes(U)) && C[l] + k[l] <= k.remoteSettings.maxConcurrentStreams)
|
|
return D(C), !0;
|
|
}
|
|
return !1;
|
|
}, "closeSessionIfCovered"), D = /* @__PURE__ */ s((S) => {
|
|
S[m] = !0, S[l] === 0 && S.close();
|
|
}, "gracefullyClose"), v = class extends i {
|
|
static {
|
|
s(this, "Agent");
|
|
}
|
|
constructor({ timeout: S = 0, maxSessions: C = Number.POSITIVE_INFINITY, maxEmptySessions: O = 10, maxCachedTlsSessions: k = 100 } = {}) {
|
|
super(), this.sessions = {}, this.queue = {}, this.timeout = S, this.maxSessions = C, this.maxEmptySessions = O, this._emptySessionCount =
|
|
0, this._sessionCount = 0, this.settings = {
|
|
enablePush: !1,
|
|
initialWindowSize: 1024 * 1024 * 32
|
|
// 32MB, see https://github.com/nodejs/node/issues/38426
|
|
}, this.tlsSessionCache = new o({ maxSize: k });
|
|
}
|
|
get protocol() {
|
|
return "https:";
|
|
}
|
|
normalizeOptions(S) {
|
|
let C = "";
|
|
for (let O = 0; O < d.length; O++) {
|
|
let k = d[O];
|
|
C += ":", S && S[k] !== void 0 && (C += S[k]);
|
|
}
|
|
return C;
|
|
}
|
|
_processQueue() {
|
|
if (this._sessionCount >= this.maxSessions) {
|
|
this.closeEmptySessions(this.maxSessions - this._sessionCount + 1);
|
|
return;
|
|
}
|
|
for (let S in this.queue)
|
|
for (let C in this.queue[S]) {
|
|
let O = this.queue[S][C];
|
|
O.completed || (O.completed = !0, O());
|
|
}
|
|
}
|
|
_isBetterSession(S, C) {
|
|
return S > C;
|
|
}
|
|
_accept(S, C, O, k) {
|
|
let U = 0;
|
|
for (; U < C.length && S[l] < S.remoteSettings.maxConcurrentStreams; )
|
|
C[U].resolve(S), U++;
|
|
C.splice(0, U), C.length > 0 && (this.getSession(O, k, C), C.length = 0);
|
|
}
|
|
getSession(S, C, O) {
|
|
return new Promise((k, U) => {
|
|
Array.isArray(O) && O.length > 0 ? (O = [...O], k()) : O = [{ resolve: k, reject: U }];
|
|
try {
|
|
if (typeof S == "string")
|
|
S = new r(S);
|
|
else if (!(S instanceof r))
|
|
throw new TypeError("The `origin` argument needs to be a string or an URL object");
|
|
if (C) {
|
|
let { servername: re } = C, { hostname: te } = S;
|
|
if (re && te !== re)
|
|
throw new Error(`Origin ${te} differs from servername ${re}`);
|
|
}
|
|
} catch (re) {
|
|
for (let te = 0; te < O.length; te++)
|
|
O[te].reject(re);
|
|
return;
|
|
}
|
|
let j = this.normalizeOptions(C), K = S.origin;
|
|
if (j in this.sessions) {
|
|
let re = this.sessions[j], te = -1, Z = -1, ie;
|
|
for (let ae = 0; ae < re.length; ae++) {
|
|
let Y = re[ae], he = Y.remoteSettings.maxConcurrentStreams;
|
|
if (he < te)
|
|
break;
|
|
if (!Y[f].includes(K))
|
|
continue;
|
|
let ye = Y[l];
|
|
ye >= he || Y[m] || Y.destroyed || (ie || (te = he), this._isBetterSession(ye, Z) && (ie = Y, Z = ye));
|
|
}
|
|
if (ie) {
|
|
this._accept(ie, O, K, C);
|
|
return;
|
|
}
|
|
}
|
|
if (j in this.queue) {
|
|
if (K in this.queue[j]) {
|
|
this.queue[j][K].listeners.push(...O);
|
|
return;
|
|
}
|
|
} else
|
|
this.queue[j] = {
|
|
[h]: 0
|
|
};
|
|
let R = /* @__PURE__ */ s(() => {
|
|
j in this.queue && this.queue[j][K] === ee && (delete this.queue[j][K], --this.queue[j][h] === 0 && delete this.queue[j]);
|
|
}, "removeFromQueue"), ee = /* @__PURE__ */ s(async () => {
|
|
this._sessionCount++;
|
|
let re = `${K}:${j}`, te = !1, Z;
|
|
try {
|
|
let ie = { ...C };
|
|
ie.settings === void 0 && (ie.settings = this.settings), ie.session === void 0 && (ie.session = this.tlsSessionCache.get(re)),
|
|
Z = await (ie.createConnection || this.createConnection).call(this, S, ie), ie.createConnection = () => Z;
|
|
let Y = a.connect(S, ie);
|
|
Y[l] = 0, Y[m] = !1;
|
|
let he = /* @__PURE__ */ s(() => {
|
|
let { socket: de } = Y, be;
|
|
return de.servername === !1 ? (de.servername = de.remoteAddress, be = Y.originSet, de.servername = !1) : be = Y.originSet,
|
|
be;
|
|
}, "getOriginSet"), ye = /* @__PURE__ */ s(() => Y[l] < Y.remoteSettings.maxConcurrentStreams, "isFree");
|
|
Y.socket.once("session", (de) => {
|
|
this.tlsSessionCache.set(re, de);
|
|
}), Y.once("error", (de) => {
|
|
for (let be = 0; be < O.length; be++)
|
|
O[be].reject(de);
|
|
this.tlsSessionCache.delete(re);
|
|
}), Y.setTimeout(this.timeout, () => {
|
|
Y.destroy();
|
|
}), Y.once("close", () => {
|
|
if (this._sessionCount--, te) {
|
|
this._emptySessionCount--;
|
|
let de = this.sessions[j];
|
|
de.length === 1 ? delete this.sessions[j] : de.splice(de.indexOf(Y), 1);
|
|
} else {
|
|
R();
|
|
let de = new Error("Session closed without receiving a SETTINGS frame");
|
|
de.code = "HTTP2WRAPPER_NOSETTINGS";
|
|
for (let be = 0; be < O.length; be++)
|
|
O[be].reject(de);
|
|
}
|
|
this._processQueue();
|
|
});
|
|
let Be = /* @__PURE__ */ s(() => {
|
|
let de = this.queue[j];
|
|
if (!de)
|
|
return;
|
|
let be = Y[f];
|
|
for (let Me = 0; Me < be.length; Me++) {
|
|
let gt = be[Me];
|
|
if (gt in de) {
|
|
let { listeners: Dt, completed: $t } = de[gt], vr = 0;
|
|
for (; vr < Dt.length && ye(); )
|
|
Dt[vr].resolve(Y), vr++;
|
|
if (de[gt].listeners.splice(0, vr), de[gt].listeners.length === 0 && !$t && (delete de[gt], --de[h] === 0)) {
|
|
delete this.queue[j];
|
|
break;
|
|
}
|
|
if (!ye())
|
|
break;
|
|
}
|
|
}
|
|
}, "processListeners");
|
|
Y.on("origin", () => {
|
|
Y[f] = he() || [], Y[m] = !1, b(this.sessions[j], Y), !(Y[m] || !ye()) && (Be(), ye() && g(this.sessions[j], Y));
|
|
}), Y.once("remoteSettings", () => {
|
|
if (ee.destroyed) {
|
|
let de = new Error("Agent has been destroyed");
|
|
for (let be = 0; be < O.length; be++)
|
|
O[be].reject(de);
|
|
Y.destroy();
|
|
return;
|
|
}
|
|
if (Y.setLocalWindowSize && Y.setLocalWindowSize(1024 * 1024 * 4), Y[f] = he() || [], Y.socket.encrypted) {
|
|
let de = Y[f][0];
|
|
if (de !== K) {
|
|
let be = new Error(`Requested origin ${K} does not match server ${de}`);
|
|
for (let Me = 0; Me < O.length; Me++)
|
|
O[Me].reject(be);
|
|
Y.destroy();
|
|
return;
|
|
}
|
|
}
|
|
R();
|
|
{
|
|
let de = this.sessions;
|
|
if (j in de) {
|
|
let be = de[j];
|
|
be.splice(y(be, Y, p), 0, Y);
|
|
} else
|
|
de[j] = [Y];
|
|
}
|
|
te = !0, this._emptySessionCount++, this.emit("session", Y), this._accept(Y, O, K, C), Y[l] === 0 && this._emptySessionCount >
|
|
this.maxEmptySessions && this.closeEmptySessions(this._emptySessionCount - this.maxEmptySessions), Y.on("remoteSettings", () => {
|
|
ye() && (Be(), ye() && g(this.sessions[j], Y));
|
|
});
|
|
}), Y[c] = Y.request, Y.request = (de, be) => {
|
|
if (Y[m])
|
|
throw new Error("The session is gracefully closing. No new streams are allowed.");
|
|
let Me = Y[c](de, be);
|
|
return Y.ref(), Y[l]++ === 0 && this._emptySessionCount--, Me.once("close", () => {
|
|
if (--Y[l] === 0 && (this._emptySessionCount++, Y.unref(), this._emptySessionCount > this.maxEmptySessions || Y[m])) {
|
|
Y.close();
|
|
return;
|
|
}
|
|
Y.destroyed || Y.closed || ye() && !b(this.sessions[j], Y) && (g(this.sessions[j], Y), Be(), Y[l] === 0 && this._processQueue());
|
|
}), Me;
|
|
};
|
|
} catch (ie) {
|
|
R(), this._sessionCount--;
|
|
for (let ae = 0; ae < O.length; ae++)
|
|
O[ae].reject(ie);
|
|
}
|
|
}, "entry");
|
|
ee.listeners = O, ee.completed = !1, ee.destroyed = !1, this.queue[j][K] = ee, this.queue[j][h]++, this._processQueue();
|
|
});
|
|
}
|
|
request(S, C, O, k) {
|
|
return new Promise((U, j) => {
|
|
this.getSession(S, C, [{
|
|
reject: j,
|
|
resolve: /* @__PURE__ */ s((K) => {
|
|
try {
|
|
let R = K.request(O, k);
|
|
u(R), U(R);
|
|
} catch (R) {
|
|
j(R);
|
|
}
|
|
}, "resolve")
|
|
}]);
|
|
});
|
|
}
|
|
async createConnection(S, C) {
|
|
return v.connect(S, C);
|
|
}
|
|
static connect(S, C) {
|
|
C.ALPNProtocols = ["h2"];
|
|
let O = S.port || 443, k = S.hostname;
|
|
typeof C.servername > "u" && (C.servername = k);
|
|
let U = n.connect(O, k, C);
|
|
return C.socket && (U._peername = {
|
|
family: void 0,
|
|
address: void 0,
|
|
port: O
|
|
}), U;
|
|
}
|
|
closeEmptySessions(S = Number.POSITIVE_INFINITY) {
|
|
let C = 0, { sessions: O } = this;
|
|
for (let k in O) {
|
|
let U = O[k];
|
|
for (let j = 0; j < U.length; j++) {
|
|
let K = U[j];
|
|
if (K[l] === 0 && (C++, K.close(), C >= S))
|
|
return C;
|
|
}
|
|
}
|
|
return C;
|
|
}
|
|
destroy(S) {
|
|
let { sessions: C, queue: O } = this;
|
|
for (let k in C) {
|
|
let U = C[k];
|
|
for (let j = 0; j < U.length; j++)
|
|
U[j].destroy(S);
|
|
}
|
|
for (let k in O) {
|
|
let U = O[k];
|
|
for (let j in U)
|
|
U[j].destroyed = !0;
|
|
}
|
|
this.queue = {}, this.tlsSessionCache.clear();
|
|
}
|
|
get emptySessionCount() {
|
|
return this._emptySessionCount;
|
|
}
|
|
get pendingSessionCount() {
|
|
return this._sessionCount - this._emptySessionCount;
|
|
}
|
|
get sessionCount() {
|
|
return this._sessionCount;
|
|
}
|
|
};
|
|
v.kCurrentStreamCount = l, v.kGracefullyClosing = m, t.exports = {
|
|
Agent: v,
|
|
globalAgent: new v()
|
|
};
|
|
}
|
|
}), u4 = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/incoming-message.js"(e, t) {
|
|
"use strict";
|
|
var { Readable: r } = V("stream"), i = class extends r {
|
|
static {
|
|
s(this, "IncomingMessage");
|
|
}
|
|
constructor(n, a) {
|
|
super({
|
|
emitClose: !1,
|
|
autoDestroy: !0,
|
|
highWaterMark: a
|
|
}), this.statusCode = null, this.statusMessage = "", this.httpVersion = "2.0", this.httpVersionMajor = 2, this.httpVersionMinor = 0,
|
|
this.headers = {}, this.trailers = {}, this.req = null, this.aborted = !1, this.complete = !1, this.upgrade = null, this.rawHeaders =
|
|
[], this.rawTrailers = [], this.socket = n, this._dumped = !1;
|
|
}
|
|
get connection() {
|
|
return this.socket;
|
|
}
|
|
set connection(n) {
|
|
this.socket = n;
|
|
}
|
|
_destroy(n, a) {
|
|
this.readableEnded || (this.aborted = !0), a(), this.req._request.destroy(n);
|
|
}
|
|
setTimeout(n, a) {
|
|
return this.req.setTimeout(n, a), this;
|
|
}
|
|
_dump() {
|
|
this._dumped || (this._dumped = !0, this.removeAllListeners("data"), this.resume());
|
|
}
|
|
_read() {
|
|
this.req && this.req._request.resume();
|
|
}
|
|
};
|
|
t.exports = i;
|
|
}
|
|
}), cse = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/utils/proxy-events.js"(e, t) {
|
|
"use strict";
|
|
t.exports = (r, i, n) => {
|
|
for (let a of n)
|
|
r.on(a, (...o) => i.emit(a, ...o));
|
|
};
|
|
}
|
|
}), Bm = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/utils/errors.js"(e, t) {
|
|
"use strict";
|
|
var r = /* @__PURE__ */ s((i, n, a) => {
|
|
t.exports[n] = class extends i {
|
|
static {
|
|
s(this, "NodeError");
|
|
}
|
|
constructor(...u) {
|
|
super(typeof a == "string" ? a : a(u)), this.name = `${super.name} [${n}]`, this.code = n;
|
|
}
|
|
};
|
|
}, "makeError");
|
|
r(TypeError, "ERR_INVALID_ARG_TYPE", (i) => {
|
|
let n = i[0].includes(".") ? "property" : "argument", a = i[1], o = Array.isArray(a);
|
|
return o && (a = `${a.slice(0, -1).join(", ")} or ${a.slice(-1)}`), `The "${i[0]}" ${n} must be ${o ? "one of" : "of"} type ${a}. Re\
|
|
ceived ${typeof i[2]}`;
|
|
}), r(
|
|
TypeError,
|
|
"ERR_INVALID_PROTOCOL",
|
|
(i) => `Protocol "${i[0]}" not supported. Expected "${i[1]}"`
|
|
), r(
|
|
Error,
|
|
"ERR_HTTP_HEADERS_SENT",
|
|
(i) => `Cannot ${i[0]} headers after they are sent to the client`
|
|
), r(
|
|
TypeError,
|
|
"ERR_INVALID_HTTP_TOKEN",
|
|
(i) => `${i[0]} must be a valid HTTP token [${i[1]}]`
|
|
), r(
|
|
TypeError,
|
|
"ERR_HTTP_INVALID_HEADER_VALUE",
|
|
(i) => `Invalid value "${i[0]} for header "${i[1]}"`
|
|
), r(
|
|
TypeError,
|
|
"ERR_INVALID_CHAR",
|
|
(i) => `Invalid character in ${i[0]} [${i[1]}]`
|
|
), r(
|
|
Error,
|
|
"ERR_HTTP2_NO_SOCKET_MANIPULATION",
|
|
"HTTP/2 sockets should not be directly manipulated (e.g. read and written)"
|
|
);
|
|
}
|
|
}), fse = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js"(e, t) {
|
|
"use strict";
|
|
t.exports = (r) => {
|
|
switch (r) {
|
|
case ":method":
|
|
case ":scheme":
|
|
case ":authority":
|
|
case ":path":
|
|
return !0;
|
|
default:
|
|
return !1;
|
|
}
|
|
};
|
|
}
|
|
}), l4 = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/utils/validate-header-name.js"(e, t) {
|
|
"use strict";
|
|
var { ERR_INVALID_HTTP_TOKEN: r } = Bm(), i = fse(), n = /^[\^`\-\w!#$%&*+.|~]+$/;
|
|
t.exports = (a) => {
|
|
if (typeof a != "string" || !n.test(a) && !i(a))
|
|
throw new r("Header name", a);
|
|
};
|
|
}
|
|
}), c4 = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/utils/validate-header-value.js"(e, t) {
|
|
"use strict";
|
|
var {
|
|
ERR_HTTP_INVALID_HEADER_VALUE: r,
|
|
ERR_INVALID_CHAR: i
|
|
} = Bm(), n = /[^\t\u0020-\u007E\u0080-\u00FF]/;
|
|
t.exports = (a, o) => {
|
|
if (typeof o > "u")
|
|
throw new r(o, a);
|
|
if (n.test(o))
|
|
throw new i("header content", a);
|
|
};
|
|
}
|
|
}), dse = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/utils/proxy-socket-handler.js"(e, t) {
|
|
"use strict";
|
|
var { ERR_HTTP2_NO_SOCKET_MANIPULATION: r } = Bm(), i = {
|
|
has(n, a) {
|
|
let o = n.session === void 0 ? n : n.session.socket;
|
|
return a in n || a in o;
|
|
},
|
|
get(n, a) {
|
|
switch (a) {
|
|
case "on":
|
|
case "once":
|
|
case "end":
|
|
case "emit":
|
|
case "destroy":
|
|
return n[a].bind(n);
|
|
case "writable":
|
|
case "destroyed":
|
|
return n[a];
|
|
case "readable":
|
|
return n.destroyed ? !1 : n.readable;
|
|
case "setTimeout": {
|
|
let { session: o } = n;
|
|
return o !== void 0 ? o.setTimeout.bind(o) : n.setTimeout.bind(n);
|
|
}
|
|
case "write":
|
|
case "read":
|
|
case "pause":
|
|
case "resume":
|
|
throw new r();
|
|
default: {
|
|
let o = n.session === void 0 ? n : n.session.socket, u = o[a];
|
|
return typeof u == "function" ? u.bind(o) : u;
|
|
}
|
|
}
|
|
},
|
|
getPrototypeOf(n) {
|
|
return n.session !== void 0 ? Reflect.getPrototypeOf(n.session.socket) : Reflect.getPrototypeOf(n);
|
|
},
|
|
set(n, a, o) {
|
|
switch (a) {
|
|
case "writable":
|
|
case "readable":
|
|
case "destroyed":
|
|
case "on":
|
|
case "once":
|
|
case "end":
|
|
case "emit":
|
|
case "destroy":
|
|
return n[a] = o, !0;
|
|
case "setTimeout": {
|
|
let { session: u } = n;
|
|
return u === void 0 ? n.setTimeout = o : u.setTimeout = o, !0;
|
|
}
|
|
case "write":
|
|
case "read":
|
|
case "pause":
|
|
case "resume":
|
|
throw new r();
|
|
default: {
|
|
let u = n.session === void 0 ? n : n.session.socket;
|
|
return u[a] = o, !0;
|
|
}
|
|
}
|
|
}
|
|
};
|
|
t.exports = i;
|
|
}
|
|
}), f4 = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/client-request.js"(e, t) {
|
|
"use strict";
|
|
var { URL: r, urlToHttpOptions: i } = V("url"), n = V("http2"), { Writable: a } = V("stream"), { Agent: o, globalAgent: u } = Dl(), l = u4(),
|
|
c = cse(), {
|
|
ERR_INVALID_ARG_TYPE: f,
|
|
ERR_INVALID_PROTOCOL: m,
|
|
ERR_HTTP_HEADERS_SENT: h
|
|
} = Bm(), d = l4(), y = c4(), p = dse(), {
|
|
HTTP2_HEADER_STATUS: g,
|
|
HTTP2_HEADER_METHOD: b,
|
|
HTTP2_HEADER_PATH: D,
|
|
HTTP2_HEADER_AUTHORITY: v,
|
|
HTTP2_METHOD_CONNECT: S
|
|
} = n.constants, C = Symbol("headers"), O = Symbol("origin"), k = Symbol("session"), U = Symbol("options"), j = Symbol("flushedHeaders"),
|
|
K = Symbol("jobs"), R = Symbol("pendingAgentPromise"), ee = class extends a {
|
|
static {
|
|
s(this, "ClientRequest");
|
|
}
|
|
constructor(re, te, Z) {
|
|
if (super({
|
|
autoDestroy: !1,
|
|
emitClose: !1
|
|
}), typeof re == "string" ? re = i(new r(re)) : re instanceof r ? re = i(re) : re = { ...re }, typeof te == "function" || te === void 0 ?
|
|
(Z = te, te = re) : te = Object.assign(re, te), te.h2session) {
|
|
if (this[k] = te.h2session, this[k].destroyed)
|
|
throw new Error("The session has been closed already");
|
|
this.protocol = this[k].socket.encrypted ? "https:" : "http:";
|
|
} else if (te.agent === !1)
|
|
this.agent = new o({ maxEmptySessions: 0 });
|
|
else if (typeof te.agent > "u" || te.agent === null)
|
|
this.agent = u;
|
|
else if (typeof te.agent.request == "function")
|
|
this.agent = te.agent;
|
|
else
|
|
throw new f("options.agent", ["http2wrapper.Agent-like Object", "undefined", "false"], te.agent);
|
|
if (this.agent && (this.protocol = this.agent.protocol), te.protocol && te.protocol !== this.protocol)
|
|
throw new m(te.protocol, this.protocol);
|
|
te.port || (te.port = te.defaultPort || this.agent && this.agent.defaultPort || 443), te.host = te.hostname || te.host || "localho\
|
|
st", delete te.hostname;
|
|
let { timeout: ie } = te;
|
|
te.timeout = void 0, this[C] = /* @__PURE__ */ Object.create(null), this[K] = [], this[R] = void 0, this.socket = null, this.connection =
|
|
null, this.method = te.method || "GET", this.method === "CONNECT" && (te.path === "/" || te.path === void 0) || (this.path = te.path),
|
|
this.res = null, this.aborted = !1, this.reusedSocket = !1;
|
|
let { headers: ae } = te;
|
|
if (ae)
|
|
for (let he in ae)
|
|
this.setHeader(he, ae[he]);
|
|
te.auth && !("authorization" in this[C]) && (this[C].authorization = "Basic " + Buffer.from(te.auth).toString("base64")), te.session =
|
|
te.tlsSession, te.path = te.socketPath, this[U] = te, this[O] = new r(`${this.protocol}//${te.servername || te.host}:${te.port}`);
|
|
let Y = te._reuseSocket;
|
|
Y && (te.createConnection = (...he) => Y.destroyed ? this.agent.createConnection(...he) : Y, this.agent.getSession(this[O], this[U]).
|
|
catch(() => {
|
|
})), ie && this.setTimeout(ie), Z && this.once("response", Z), this[j] = !1;
|
|
}
|
|
get method() {
|
|
return this[C][b];
|
|
}
|
|
set method(re) {
|
|
re && (this[C][b] = re.toUpperCase());
|
|
}
|
|
get path() {
|
|
let re = this.method === "CONNECT" ? v : D;
|
|
return this[C][re];
|
|
}
|
|
set path(re) {
|
|
if (re) {
|
|
let te = this.method === "CONNECT" ? v : D;
|
|
this[C][te] = re;
|
|
}
|
|
}
|
|
get host() {
|
|
return this[O].hostname;
|
|
}
|
|
set host(re) {
|
|
}
|
|
get _mustNotHaveABody() {
|
|
return this.method === "GET" || this.method === "HEAD" || this.method === "DELETE";
|
|
}
|
|
_write(re, te, Z) {
|
|
if (this._mustNotHaveABody) {
|
|
Z(new Error("The GET, HEAD and DELETE methods must NOT have a body"));
|
|
return;
|
|
}
|
|
this.flushHeaders();
|
|
let ie = /* @__PURE__ */ s(() => this._request.write(re, te, Z), "callWrite");
|
|
this._request ? ie() : this[K].push(ie);
|
|
}
|
|
_final(re) {
|
|
this.flushHeaders();
|
|
let te = /* @__PURE__ */ s(() => {
|
|
if (this._mustNotHaveABody || this.method === "CONNECT") {
|
|
re();
|
|
return;
|
|
}
|
|
this._request.end(re);
|
|
}, "callEnd");
|
|
this._request ? te() : this[K].push(te);
|
|
}
|
|
abort() {
|
|
this.res && this.res.complete || (this.aborted || process.nextTick(() => this.emit("abort")), this.aborted = !0, this.destroy());
|
|
}
|
|
async _destroy(re, te) {
|
|
this.res && this.res._dump(), this._request ? this._request.destroy() : process.nextTick(() => {
|
|
this.emit("close");
|
|
});
|
|
try {
|
|
await this[R];
|
|
} catch (Z) {
|
|
this.aborted && (re = Z);
|
|
}
|
|
te(re);
|
|
}
|
|
async flushHeaders() {
|
|
if (this[j] || this.destroyed)
|
|
return;
|
|
this[j] = !0;
|
|
let re = this.method === S, te = /* @__PURE__ */ s((Z) => {
|
|
if (this._request = Z, this.destroyed) {
|
|
Z.destroy();
|
|
return;
|
|
}
|
|
re || c(Z, this, ["timeout", "continue"]), Z.once("error", (ae) => {
|
|
this.destroy(ae);
|
|
}), Z.once("aborted", () => {
|
|
let { res: ae } = this;
|
|
ae ? (ae.aborted = !0, ae.emit("aborted"), ae.destroy()) : this.destroy(new Error("The server aborted the HTTP/2 stream"));
|
|
});
|
|
let ie = /* @__PURE__ */ s((ae, Y, he) => {
|
|
let ye = new l(this.socket, Z.readableHighWaterMark);
|
|
this.res = ye, ye.url = `${this[O].origin}${this.path}`, ye.req = this, ye.statusCode = ae[g], ye.headers = ae, ye.rawHeaders =
|
|
he, ye.once("end", () => {
|
|
ye.complete = !0, ye.socket = null, ye.connection = null;
|
|
}), re ? (ye.upgrade = !0, this.emit("connect", ye, Z, Buffer.alloc(0)) ? this.emit("close") : Z.destroy()) : (Z.on("data", (Be) => {
|
|
!ye._dumped && !ye.push(Be) && Z.pause();
|
|
}), Z.once("end", () => {
|
|
this.aborted || ye.push(null);
|
|
}), this.emit("response", ye) || ye._dump());
|
|
}, "onResponse");
|
|
Z.once("response", ie), Z.once("headers", (ae) => this.emit("information", { statusCode: ae[g] })), Z.once("trailers", (ae, Y, he) => {
|
|
let { res: ye } = this;
|
|
if (ye === null) {
|
|
ie(ae, Y, he);
|
|
return;
|
|
}
|
|
ye.trailers = ae, ye.rawTrailers = he;
|
|
}), Z.once("close", () => {
|
|
let { aborted: ae, res: Y } = this;
|
|
if (Y) {
|
|
ae && (Y.aborted = !0, Y.emit("aborted"), Y.destroy());
|
|
let he = /* @__PURE__ */ s(() => {
|
|
Y.emit("close"), this.destroy(), this.emit("close");
|
|
}, "finish");
|
|
Y.readable ? Y.once("end", he) : he();
|
|
return;
|
|
}
|
|
if (!this.destroyed) {
|
|
this.destroy(new Error("The HTTP/2 stream has been early terminated")), this.emit("close");
|
|
return;
|
|
}
|
|
this.destroy(), this.emit("close");
|
|
}), this.socket = new Proxy(Z, p);
|
|
for (let ae of this[K])
|
|
ae();
|
|
this[K].length = 0, this.emit("socket", this.socket);
|
|
}, "onStream");
|
|
if (!(v in this[C]) && !re && (this[C][v] = this[O].host), this[k])
|
|
try {
|
|
te(this[k].request(this[C]));
|
|
} catch (Z) {
|
|
this.destroy(Z);
|
|
}
|
|
else {
|
|
this.reusedSocket = !0;
|
|
try {
|
|
let Z = this.agent.request(this[O], this[U], this[C]);
|
|
this[R] = Z, te(await Z), this[R] = !1;
|
|
} catch (Z) {
|
|
this[R] = !1, this.destroy(Z);
|
|
}
|
|
}
|
|
}
|
|
get connection() {
|
|
return this.socket;
|
|
}
|
|
set connection(re) {
|
|
this.socket = re;
|
|
}
|
|
getHeaderNames() {
|
|
return Object.keys(this[C]);
|
|
}
|
|
hasHeader(re) {
|
|
if (typeof re != "string")
|
|
throw new f("name", "string", re);
|
|
return !!this[C][re.toLowerCase()];
|
|
}
|
|
getHeader(re) {
|
|
if (typeof re != "string")
|
|
throw new f("name", "string", re);
|
|
return this[C][re.toLowerCase()];
|
|
}
|
|
get headersSent() {
|
|
return this[j];
|
|
}
|
|
removeHeader(re) {
|
|
if (typeof re != "string")
|
|
throw new f("name", "string", re);
|
|
if (this.headersSent)
|
|
throw new h("remove");
|
|
delete this[C][re.toLowerCase()];
|
|
}
|
|
setHeader(re, te) {
|
|
if (this.headersSent)
|
|
throw new h("set");
|
|
d(re), y(re, te);
|
|
let Z = re.toLowerCase();
|
|
if (Z === "connection") {
|
|
if (te.toLowerCase() === "keep-alive")
|
|
return;
|
|
throw new Error(`Invalid 'connection' header: ${te}`);
|
|
}
|
|
Z === "host" && this.method === "CONNECT" ? this[C][v] = te : this[C][Z] = te;
|
|
}
|
|
setNoDelay() {
|
|
}
|
|
setSocketKeepAlive() {
|
|
}
|
|
setTimeout(re, te) {
|
|
let Z = /* @__PURE__ */ s(() => this._request.setTimeout(re, te), "applyTimeout");
|
|
return this._request ? Z() : this[K].push(Z), this;
|
|
}
|
|
get maxHeadersCount() {
|
|
if (!this.destroyed && this._request)
|
|
return this._request.session.localSettings.maxHeaderListSize;
|
|
}
|
|
set maxHeadersCount(re) {
|
|
}
|
|
};
|
|
t.exports = ee;
|
|
}
|
|
}), pse = vt({
|
|
"node_modules/.pnpm/resolve-alpn@1.2.1/node_modules/resolve-alpn/index.js"(e, t) {
|
|
"use strict";
|
|
var r = V("tls");
|
|
t.exports = (i = {}, n = r.connect) => new Promise((a, o) => {
|
|
let u = !1, l, c = /* @__PURE__ */ s(async () => {
|
|
await m, l.off("timeout", f), l.off("error", o), i.resolveSocket ? (a({ alpnProtocol: l.alpnProtocol, socket: l, timeout: u }), u &&
|
|
(await Promise.resolve(), l.emit("timeout"))) : (l.destroy(), a({ alpnProtocol: l.alpnProtocol, timeout: u }));
|
|
}, "callback"), f = /* @__PURE__ */ s(async () => {
|
|
u = !0, c();
|
|
}, "onTimeout"), m = (async () => {
|
|
try {
|
|
l = await n(i, c), l.on("error", o), l.once("timeout", f);
|
|
} catch (h) {
|
|
o(h);
|
|
}
|
|
})();
|
|
});
|
|
}
|
|
}), hse = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/utils/calculate-server-name.js"(e, t) {
|
|
"use strict";
|
|
var { isIP: r } = V("net"), i = V("assert"), n = /* @__PURE__ */ s((a) => {
|
|
if (a[0] === "[") {
|
|
let u = a.indexOf("]");
|
|
return i(u !== -1), a.slice(1, u);
|
|
}
|
|
let o = a.indexOf(":");
|
|
return o === -1 ? a : a.slice(0, o);
|
|
}, "getHost");
|
|
t.exports = (a) => {
|
|
let o = n(a);
|
|
return r(o) ? "" : o;
|
|
};
|
|
}
|
|
}), mse = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/auto.js"(e, t) {
|
|
"use strict";
|
|
var { URL: r, urlToHttpOptions: i } = V("url"), n = V("http"), a = V("https"), o = pse(), u = a4(), { Agent: l, globalAgent: c } = Dl(),
|
|
f = f4(), m = hse(), h = o4(), d = new u({ maxSize: 100 }), y = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ s((D, v, S) => {
|
|
v._httpMessage = { shouldKeepAlive: !0 };
|
|
let C = /* @__PURE__ */ s(() => {
|
|
D.emit("free", v, S);
|
|
}, "onFree");
|
|
v.on("free", C);
|
|
let O = /* @__PURE__ */ s(() => {
|
|
D.removeSocket(v, S);
|
|
}, "onClose");
|
|
v.on("close", O);
|
|
let k = /* @__PURE__ */ s(() => {
|
|
let { freeSockets: j } = D;
|
|
for (let K of Object.values(j))
|
|
if (K.includes(v)) {
|
|
v.destroy();
|
|
return;
|
|
}
|
|
}, "onTimeout");
|
|
v.on("timeout", k);
|
|
let U = /* @__PURE__ */ s(() => {
|
|
D.removeSocket(v, S), v.off("close", O), v.off("free", C), v.off("timeout", k), v.off("agentRemove", U);
|
|
}, "onRemove");
|
|
v.on("agentRemove", U), D.emit("free", v, S);
|
|
}, "installSocket"), g = /* @__PURE__ */ s((D, v = /* @__PURE__ */ new Map(), S = void 0) => async (C) => {
|
|
let O = `${C.host}:${C.port}:${C.ALPNProtocols.sort()}`;
|
|
if (!D.has(O)) {
|
|
if (v.has(O))
|
|
return { alpnProtocol: (await v.get(O)).alpnProtocol };
|
|
let { path: k } = C;
|
|
C.path = C.socketPath;
|
|
let U = o(C, S);
|
|
v.set(O, U);
|
|
try {
|
|
let j = await U;
|
|
return D.set(O, j.alpnProtocol), v.delete(O), C.path = k, j;
|
|
} catch (j) {
|
|
throw v.delete(O), C.path = k, j;
|
|
}
|
|
}
|
|
return { alpnProtocol: D.get(O) };
|
|
}, "createResolveProtocol"), b = g(d, y);
|
|
t.exports = async (D, v, S) => {
|
|
if (typeof D == "string" ? D = i(new r(D)) : D instanceof r ? D = i(D) : D = { ...D }, typeof v == "function" || v === void 0 ? (S =
|
|
v, v = D) : v = Object.assign(D, v), v.ALPNProtocols = v.ALPNProtocols || ["h2", "http/1.1"], !Array.isArray(v.ALPNProtocols) || v.ALPNProtocols.
|
|
length === 0)
|
|
throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");
|
|
v.protocol = v.protocol || "https:";
|
|
let C = v.protocol === "https:";
|
|
v.host = v.hostname || v.host || "localhost", v.session = v.tlsSession, v.servername = v.servername || m(v.headers && v.headers.host ||
|
|
v.host), v.port = v.port || (C ? 443 : 80), v._defaultAgent = C ? a.globalAgent : n.globalAgent;
|
|
let O = v.resolveProtocol || b, { agent: k } = v;
|
|
if (k !== void 0 && k !== !1 && k.constructor.name !== "Object")
|
|
throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");
|
|
if (C) {
|
|
v.resolveSocket = !0;
|
|
let { socket: U, alpnProtocol: j, timeout: K } = await O(v);
|
|
if (K) {
|
|
U && U.destroy();
|
|
let ee = new Error(`Timed out resolving ALPN: ${v.timeout} ms`);
|
|
throw ee.code = "ETIMEDOUT", ee.ms = v.timeout, ee;
|
|
}
|
|
U && v.createConnection && (U.destroy(), U = void 0), delete v.resolveSocket;
|
|
let R = j === "h2";
|
|
if (k && (k = R ? k.http2 : k.https, v.agent = k), k === void 0 && (k = R ? c : a.globalAgent), U)
|
|
if (k === !1)
|
|
U.destroy();
|
|
else {
|
|
let ee = (R ? l : a.Agent).prototype.createConnection;
|
|
k.createConnection === ee ? R ? v._reuseSocket = U : p(k, U, v) : U.destroy();
|
|
}
|
|
if (R)
|
|
return h(new f(v, S));
|
|
} else k && (v.agent = k.http);
|
|
return h(n.request(v, S));
|
|
}, t.exports.protocolCache = d, t.exports.resolveProtocol = b, t.exports.createResolveProtocol = g;
|
|
}
|
|
}), d4 = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/utils/js-stream-socket.js"(e, t) {
|
|
"use strict";
|
|
var r = V("stream"), i = V("tls"), n = new i.TLSSocket(new r.PassThrough())._handle._parentWrap.constructor;
|
|
t.exports = n;
|
|
}
|
|
}), p4 = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/proxies/unexpected-status-code-error.js"(e, t) {
|
|
"use strict";
|
|
var r = class extends Error {
|
|
static {
|
|
s(this, "UnexpectedStatusCodeError");
|
|
}
|
|
constructor(i, n = "") {
|
|
super(`The proxy server rejected the request with status code ${i} (${n || "empty status message"})`), this.statusCode = i, this.statusMessage =
|
|
n;
|
|
}
|
|
};
|
|
t.exports = r;
|
|
}
|
|
}), yse = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/utils/check-type.js"(e, t) {
|
|
"use strict";
|
|
var r = /* @__PURE__ */ s((i, n, a) => {
|
|
if (!a.some((u) => typeof u === "string" ? typeof n === u : n instanceof u)) {
|
|
let u = a.map((l) => typeof l == "string" ? l : l.name);
|
|
throw new TypeError(`Expected '${i}' to be a type of ${u.join(" or ")}, got ${typeof n}`);
|
|
}
|
|
}, "checkType");
|
|
t.exports = r;
|
|
}
|
|
}), h4 = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/proxies/initialize.js"(e, t) {
|
|
"use strict";
|
|
var { URL: r } = V("url"), i = yse();
|
|
t.exports = (n, a) => {
|
|
i("proxyOptions", a, ["object"]), i("proxyOptions.headers", a.headers, ["object", "undefined"]), i("proxyOptions.raw", a.raw, ["bool\
|
|
ean", "undefined"]), i("proxyOptions.url", a.url, [r, "string"]);
|
|
let o = new r(a.url);
|
|
n.proxyOptions = {
|
|
raw: !0,
|
|
...a,
|
|
headers: { ...a.headers },
|
|
url: o
|
|
};
|
|
};
|
|
}
|
|
}), ux = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/proxies/get-auth-headers.js"(e, t) {
|
|
"use strict";
|
|
t.exports = (r) => {
|
|
let { username: i, password: n } = r.proxyOptions.url;
|
|
if (i || n) {
|
|
let a = `${i}:${n}`, o = `Basic ${Buffer.from(a).toString("base64")}`;
|
|
return {
|
|
"proxy-authorization": o,
|
|
authorization: o
|
|
};
|
|
}
|
|
return {};
|
|
};
|
|
}
|
|
}), gse = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/proxies/h1-over-h2.js"(e, t) {
|
|
"use strict";
|
|
var r = V("tls"), i = V("http"), n = V("https"), a = d4(), { globalAgent: o } = Dl(), u = p4(), l = h4(), c = ux(), f = /* @__PURE__ */ s(
|
|
(d, y, p) => {
|
|
(async () => {
|
|
try {
|
|
let { proxyOptions: g } = d, { url: b, headers: D, raw: v } = g, S = await o.request(b, g, {
|
|
...c(d),
|
|
...D,
|
|
":method": "CONNECT",
|
|
":authority": `${y.host}:${y.port}`
|
|
});
|
|
S.once("error", p), S.once("response", (C) => {
|
|
let O = C[":status"];
|
|
if (O !== 200) {
|
|
p(new u(O, ""));
|
|
return;
|
|
}
|
|
let k = d instanceof n.Agent;
|
|
if (v && k) {
|
|
y.socket = S;
|
|
let j = r.connect(y);
|
|
j.once("close", () => {
|
|
S.destroy();
|
|
}), p(null, j);
|
|
return;
|
|
}
|
|
let U = new a(S);
|
|
U.encrypted = !1, U._handle.getpeername = (j) => {
|
|
j.family = void 0, j.address = void 0, j.port = void 0;
|
|
}, p(null, U);
|
|
});
|
|
} catch (g) {
|
|
p(g);
|
|
}
|
|
})();
|
|
}, "createConnection"), m = class extends i.Agent {
|
|
static {
|
|
s(this, "HttpOverHttp2");
|
|
}
|
|
constructor(d) {
|
|
super(d), l(this, d.proxyOptions);
|
|
}
|
|
createConnection(d, y) {
|
|
f(this, d, y);
|
|
}
|
|
}, h = class extends n.Agent {
|
|
static {
|
|
s(this, "HttpsOverHttp2");
|
|
}
|
|
constructor(d) {
|
|
super(d), l(this, d.proxyOptions);
|
|
}
|
|
createConnection(d, y) {
|
|
f(this, d, y);
|
|
}
|
|
};
|
|
t.exports = {
|
|
HttpOverHttp2: m,
|
|
HttpsOverHttp2: h
|
|
};
|
|
}
|
|
}), m4 = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/proxies/h2-over-hx.js"(e, t) {
|
|
"use strict";
|
|
var { Agent: r } = Dl(), i = d4(), n = p4(), a = h4(), o = class extends r {
|
|
static {
|
|
s(this, "Http2OverHttpX");
|
|
}
|
|
constructor(u) {
|
|
super(u), a(this, u.proxyOptions);
|
|
}
|
|
async createConnection(u, l) {
|
|
let c = `${u.hostname}:${u.port || 443}`, [f, m, h] = await this._getProxyStream(c);
|
|
if (m !== 200)
|
|
throw new n(m, h);
|
|
if (this.proxyOptions.raw)
|
|
l.socket = f;
|
|
else {
|
|
let d = new i(f);
|
|
return d.encrypted = !1, d._handle.getpeername = (y) => {
|
|
y.family = void 0, y.address = void 0, y.port = void 0;
|
|
}, d;
|
|
}
|
|
return super.createConnection(u, l);
|
|
}
|
|
};
|
|
t.exports = o;
|
|
}
|
|
}), bse = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/proxies/h2-over-h2.js"(e, t) {
|
|
"use strict";
|
|
var { globalAgent: r } = Dl(), i = m4(), n = ux(), a = /* @__PURE__ */ s((u) => new Promise((l, c) => {
|
|
u.once("error", c), u.once("response", (f) => {
|
|
u.off("error", c), l(f[":status"]);
|
|
});
|
|
}), "getStatusCode"), o = class extends i {
|
|
static {
|
|
s(this, "Http2OverHttp2");
|
|
}
|
|
async _getProxyStream(u) {
|
|
let { proxyOptions: l } = this, c = {
|
|
...n(this),
|
|
...l.headers,
|
|
":method": "CONNECT",
|
|
":authority": u
|
|
}, f = await r.request(l.url, l, c), m = await a(f);
|
|
return [f, m, ""];
|
|
}
|
|
};
|
|
t.exports = o;
|
|
}
|
|
}), Dse = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/proxies/h2-over-h1.js"(e, t) {
|
|
"use strict";
|
|
var r = V("http"), i = V("https"), n = m4(), a = ux(), o = /* @__PURE__ */ s((l) => new Promise((c, f) => {
|
|
let m = /* @__PURE__ */ s((h, d, y) => {
|
|
d.unshift(y), l.off("error", f), c([d, h.statusCode, h.statusMessage]);
|
|
}, "onConnect");
|
|
l.once("error", f), l.once("connect", m);
|
|
}), "getStream2"), u = class extends n {
|
|
static {
|
|
s(this, "Http2OverHttp");
|
|
}
|
|
async _getProxyStream(l) {
|
|
let { proxyOptions: c } = this, { url: f, headers: m } = this.proxyOptions, d = (f.protocol === "https:" ? i : r).request({
|
|
...c,
|
|
hostname: f.hostname,
|
|
port: f.port,
|
|
path: l,
|
|
headers: {
|
|
...a(this),
|
|
...m,
|
|
host: l
|
|
},
|
|
method: "CONNECT"
|
|
}).end();
|
|
return o(d);
|
|
}
|
|
};
|
|
t.exports = {
|
|
Http2OverHttp: u,
|
|
Http2OverHttps: u
|
|
};
|
|
}
|
|
}), vse = vt({
|
|
"node_modules/.pnpm/http2-wrapper@2.2.0/node_modules/http2-wrapper/source/index.js"(e, t) {
|
|
"use strict";
|
|
var r = V("http2"), {
|
|
Agent: i,
|
|
globalAgent: n
|
|
} = Dl(), a = f4(), o = u4(), u = mse(), {
|
|
HttpOverHttp2: l,
|
|
HttpsOverHttp2: c
|
|
} = gse(), f = bse(), {
|
|
Http2OverHttp: m,
|
|
Http2OverHttps: h
|
|
} = Dse(), d = l4(), y = c4(), p = /* @__PURE__ */ s((b, D, v) => new a(b, D, v), "request"), g = /* @__PURE__ */ s((b, D, v) => {
|
|
let S = new a(b, D, v);
|
|
return S.end(), S;
|
|
}, "get");
|
|
t.exports = {
|
|
...r,
|
|
ClientRequest: a,
|
|
IncomingMessage: o,
|
|
Agent: i,
|
|
globalAgent: n,
|
|
request: p,
|
|
get: g,
|
|
auto: u,
|
|
proxies: {
|
|
HttpOverHttp2: l,
|
|
HttpsOverHttp2: c,
|
|
Http2OverHttp2: f,
|
|
Http2OverHttp: m,
|
|
Http2OverHttps: h
|
|
},
|
|
validateHeaderName: d,
|
|
validateHeaderValue: y
|
|
};
|
|
}
|
|
}), y4 = {};
|
|
tse(y4, {
|
|
default: /* @__PURE__ */ s(() => Eoe, "default")
|
|
});
|
|
w4.exports = rse(y4);
|
|
var Ese = V("http"), xse = V("https"), g4 = [
|
|
"Int8Array",
|
|
"Uint8Array",
|
|
"Uint8ClampedArray",
|
|
"Int16Array",
|
|
"Uint16Array",
|
|
"Int32Array",
|
|
"Uint32Array",
|
|
"Float32Array",
|
|
"Float64Array",
|
|
"BigInt64Array",
|
|
"BigUint64Array"
|
|
];
|
|
function Sse(e) {
|
|
return g4.includes(e);
|
|
}
|
|
s(Sse, "isTypedArrayName");
|
|
var Tse = [
|
|
"Function",
|
|
"Generator",
|
|
"AsyncGenerator",
|
|
"GeneratorFunction",
|
|
"AsyncGeneratorFunction",
|
|
"AsyncFunction",
|
|
"Observable",
|
|
"Array",
|
|
"Buffer",
|
|
"Blob",
|
|
"Object",
|
|
"RegExp",
|
|
"Date",
|
|
"Error",
|
|
"Map",
|
|
"Set",
|
|
"WeakMap",
|
|
"WeakSet",
|
|
"WeakRef",
|
|
"ArrayBuffer",
|
|
"SharedArrayBuffer",
|
|
"DataView",
|
|
"Promise",
|
|
"URL",
|
|
"FormData",
|
|
"URLSearchParams",
|
|
"HTMLElement",
|
|
"NaN",
|
|
...g4
|
|
];
|
|
function Cse(e) {
|
|
return Tse.includes(e);
|
|
}
|
|
s(Cse, "isObjectTypeName");
|
|
var wse = [
|
|
"null",
|
|
"undefined",
|
|
"string",
|
|
"number",
|
|
"bigint",
|
|
"boolean",
|
|
"symbol"
|
|
];
|
|
function Ase(e) {
|
|
return wse.includes(e);
|
|
}
|
|
s(Ase, "isPrimitiveTypeName");
|
|
function vl(e) {
|
|
return (t) => typeof t === e;
|
|
}
|
|
s(vl, "isOfType");
|
|
var { toString: _se } = Object.prototype, qf = /* @__PURE__ */ s((e) => {
|
|
let t = _se.call(e).slice(8, -1);
|
|
if (/HTML\w+Element/.test(t) && M.domElement(e))
|
|
return "HTMLElement";
|
|
if (Cse(t))
|
|
return t;
|
|
}, "getObjectType"), Nt = /* @__PURE__ */ s((e) => (t) => qf(t) === e, "isObjectOfType");
|
|
function M(e) {
|
|
if (e === null)
|
|
return "null";
|
|
switch (typeof e) {
|
|
case "undefined":
|
|
return "undefined";
|
|
case "string":
|
|
return "string";
|
|
case "number":
|
|
return Number.isNaN(e) ? "NaN" : "number";
|
|
case "boolean":
|
|
return "boolean";
|
|
case "function":
|
|
return "Function";
|
|
case "bigint":
|
|
return "bigint";
|
|
case "symbol":
|
|
return "symbol";
|
|
default:
|
|
}
|
|
if (M.observable(e))
|
|
return "Observable";
|
|
if (M.array(e))
|
|
return "Array";
|
|
if (M.buffer(e))
|
|
return "Buffer";
|
|
let t = qf(e);
|
|
if (t)
|
|
return t;
|
|
if (e instanceof String || e instanceof Boolean || e instanceof Number)
|
|
throw new TypeError("Please don't use object wrappers for primitive types");
|
|
return "Object";
|
|
}
|
|
s(M, "is");
|
|
M.undefined = vl("undefined");
|
|
M.string = vl("string");
|
|
var Pse = vl("number");
|
|
M.number = (e) => Pse(e) && !M.nan(e);
|
|
M.bigint = vl("bigint");
|
|
M.function_ = vl("function");
|
|
M.null_ = (e) => e === null;
|
|
M.class_ = (e) => M.function_(e) && e.toString().startsWith("class ");
|
|
M.boolean = (e) => e === !0 || e === !1;
|
|
M.symbol = vl("symbol");
|
|
M.numericString = (e) => M.string(e) && !M.emptyStringOrWhitespace(e) && !Number.isNaN(Number(e));
|
|
M.array = (e, t) => Array.isArray(e) ? M.function_(t) ? e.every((r) => t(r)) : !0 : !1;
|
|
M.buffer = (e) => {
|
|
var t, r;
|
|
return ((r = (t = e?.constructor) == null ? void 0 : t.isBuffer) == null ? void 0 : r.call(t, e)) ?? !1;
|
|
};
|
|
M.blob = (e) => Nt("Blob")(e);
|
|
M.nullOrUndefined = (e) => M.null_(e) || M.undefined(e);
|
|
M.object = (e) => !M.null_(e) && (typeof e == "object" || M.function_(e));
|
|
M.iterable = (e) => M.function_(e?.[Symbol.iterator]);
|
|
M.asyncIterable = (e) => M.function_(e?.[Symbol.asyncIterator]);
|
|
M.generator = (e) => M.iterable(e) && M.function_(e?.next) && M.function_(e?.throw);
|
|
M.asyncGenerator = (e) => M.asyncIterable(e) && M.function_(e.next) && M.function_(e.throw);
|
|
M.nativePromise = (e) => Nt("Promise")(e);
|
|
var Fse = /* @__PURE__ */ s((e) => M.function_(e?.then) && M.function_(e?.catch), "hasPromiseApi");
|
|
M.promise = (e) => M.nativePromise(e) || Fse(e);
|
|
M.generatorFunction = Nt("GeneratorFunction");
|
|
M.asyncGeneratorFunction = (e) => qf(e) === "AsyncGeneratorFunction";
|
|
M.asyncFunction = (e) => qf(e) === "AsyncFunction";
|
|
M.boundFunction = (e) => M.function_(e) && !e.hasOwnProperty("prototype");
|
|
M.regExp = Nt("RegExp");
|
|
M.date = Nt("Date");
|
|
M.error = Nt("Error");
|
|
M.map = (e) => Nt("Map")(e);
|
|
M.set = (e) => Nt("Set")(e);
|
|
M.weakMap = (e) => Nt("WeakMap")(e);
|
|
M.weakSet = (e) => Nt("WeakSet")(e);
|
|
M.weakRef = (e) => Nt("WeakRef")(e);
|
|
M.int8Array = Nt("Int8Array");
|
|
M.uint8Array = Nt("Uint8Array");
|
|
M.uint8ClampedArray = Nt("Uint8ClampedArray");
|
|
M.int16Array = Nt("Int16Array");
|
|
M.uint16Array = Nt("Uint16Array");
|
|
M.int32Array = Nt("Int32Array");
|
|
M.uint32Array = Nt("Uint32Array");
|
|
M.float32Array = Nt("Float32Array");
|
|
M.float64Array = Nt("Float64Array");
|
|
M.bigInt64Array = Nt("BigInt64Array");
|
|
M.bigUint64Array = Nt("BigUint64Array");
|
|
M.arrayBuffer = Nt("ArrayBuffer");
|
|
M.sharedArrayBuffer = Nt("SharedArrayBuffer");
|
|
M.dataView = Nt("DataView");
|
|
M.enumCase = (e, t) => Object.values(t).includes(e);
|
|
M.directInstanceOf = (e, t) => Object.getPrototypeOf(e) === t.prototype;
|
|
M.urlInstance = (e) => Nt("URL")(e);
|
|
M.urlString = (e) => {
|
|
if (!M.string(e))
|
|
return !1;
|
|
try {
|
|
return new URL(e), !0;
|
|
} catch {
|
|
return !1;
|
|
}
|
|
};
|
|
M.truthy = (e) => !!e;
|
|
M.falsy = (e) => !e;
|
|
M.nan = (e) => Number.isNaN(e);
|
|
M.primitive = (e) => M.null_(e) || Ase(typeof e);
|
|
M.integer = (e) => Number.isInteger(e);
|
|
M.safeInteger = (e) => Number.isSafeInteger(e);
|
|
M.plainObject = (e) => {
|
|
if (typeof e != "object" || e === null)
|
|
return !1;
|
|
let t = Object.getPrototypeOf(e);
|
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in
|
|
e);
|
|
};
|
|
M.typedArray = (e) => Sse(qf(e));
|
|
var Ise = /* @__PURE__ */ s((e) => M.safeInteger(e) && e >= 0, "isValidLength");
|
|
M.arrayLike = (e) => !M.nullOrUndefined(e) && !M.function_(e) && Ise(e.length);
|
|
M.inRange = (e, t) => {
|
|
if (M.number(t))
|
|
return e >= Math.min(0, t) && e <= Math.max(t, 0);
|
|
if (M.array(t) && t.length === 2)
|
|
return e >= Math.min(...t) && e <= Math.max(...t);
|
|
throw new TypeError(`Invalid range: ${JSON.stringify(t)}`);
|
|
};
|
|
var Ose = 1, kse = [
|
|
"innerHTML",
|
|
"ownerDocument",
|
|
"style",
|
|
"attributes",
|
|
"nodeValue"
|
|
];
|
|
M.domElement = (e) => M.object(e) && e.nodeType === Ose && M.string(e.nodeName) && !M.plainObject(e) && kse.every((t) => t in e);
|
|
M.observable = (e) => {
|
|
var t, r;
|
|
return e ? e === ((t = e[Symbol.observable]) == null ? void 0 : t.call(e)) || e === ((r = e["@@observable"]) == null ? void 0 : r.call(e)) :
|
|
!1;
|
|
};
|
|
M.nodeStream = (e) => M.object(e) && M.function_(e.pipe) && !M.observable(e);
|
|
M.infinite = (e) => e === Number.POSITIVE_INFINITY || e === Number.NEGATIVE_INFINITY;
|
|
var b4 = /* @__PURE__ */ s((e) => (t) => M.integer(t) && Math.abs(t % 2) === e, "isAbsoluteMod2");
|
|
M.evenInteger = b4(0);
|
|
M.oddInteger = b4(1);
|
|
M.emptyArray = (e) => M.array(e) && e.length === 0;
|
|
M.nonEmptyArray = (e) => M.array(e) && e.length > 0;
|
|
M.emptyString = (e) => M.string(e) && e.length === 0;
|
|
var Bse = /* @__PURE__ */ s((e) => M.string(e) && !/\S/.test(e), "isWhiteSpaceString");
|
|
M.emptyStringOrWhitespace = (e) => M.emptyString(e) || Bse(e);
|
|
M.nonEmptyString = (e) => M.string(e) && e.length > 0;
|
|
M.nonEmptyStringAndNotWhitespace = (e) => M.string(e) && !M.emptyStringOrWhitespace(e);
|
|
M.emptyObject = (e) => M.object(e) && !M.map(e) && !M.set(e) && Object.keys(e).length === 0;
|
|
M.nonEmptyObject = (e) => M.object(e) && !M.map(e) && !M.set(e) && Object.keys(e).length > 0;
|
|
M.emptySet = (e) => M.set(e) && e.size === 0;
|
|
M.nonEmptySet = (e) => M.set(e) && e.size > 0;
|
|
M.emptyMap = (e) => M.map(e) && e.size === 0;
|
|
M.nonEmptyMap = (e) => M.map(e) && e.size > 0;
|
|
M.propertyKey = (e) => M.any([M.string, M.number, M.symbol], e);
|
|
M.formData = (e) => Nt("FormData")(e);
|
|
M.urlSearchParams = (e) => Nt("URLSearchParams")(e);
|
|
var D4 = /* @__PURE__ */ s((e, t, r) => {
|
|
if (!M.function_(t))
|
|
throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`);
|
|
if (r.length === 0)
|
|
throw new TypeError("Invalid number of values");
|
|
return e.call(r, t);
|
|
}, "predicateOnArray");
|
|
M.any = (e, ...t) => (M.array(e) ? e : [e]).some((i) => D4(Array.prototype.some, i, t));
|
|
M.all = (e, ...t) => D4(Array.prototype.every, e, t);
|
|
var xe = /* @__PURE__ */ s((e, t, r, i = {}) => {
|
|
if (!e) {
|
|
let { multipleValues: n } = i, a = n ? `received values of types ${[
|
|
...new Set(r.map((o) => `\`${M(o)}\``))
|
|
].join(", ")}` : `received value of type \`${M(r)}\``;
|
|
throw new TypeError(`Expected value which is \`${t}\`, ${a}.`);
|
|
}
|
|
}, "assertType"), fe = {
|
|
// Unknowns.
|
|
undefined: /* @__PURE__ */ s((e) => xe(M.undefined(e), "undefined", e), "undefined"),
|
|
string: /* @__PURE__ */ s((e) => xe(M.string(e), "string", e), "string"),
|
|
number: /* @__PURE__ */ s((e) => xe(M.number(e), "number", e), "number"),
|
|
bigint: /* @__PURE__ */ s((e) => xe(M.bigint(e), "bigint", e), "bigint"),
|
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
function_: /* @__PURE__ */ s((e) => xe(M.function_(e), "Function", e), "function_"),
|
|
null_: /* @__PURE__ */ s((e) => xe(M.null_(e), "null", e), "null_"),
|
|
class_: /* @__PURE__ */ s((e) => xe(M.class_(e), "Class", e), "class_"),
|
|
boolean: /* @__PURE__ */ s((e) => xe(M.boolean(e), "boolean", e), "boolean"),
|
|
symbol: /* @__PURE__ */ s((e) => xe(M.symbol(e), "symbol", e), "symbol"),
|
|
numericString: /* @__PURE__ */ s((e) => xe(M.numericString(e), "string with a number", e), "numericString"),
|
|
array: /* @__PURE__ */ s((e, t) => {
|
|
xe(M.array(e), "Array", e), t && e.forEach(t);
|
|
}, "array"),
|
|
buffer: /* @__PURE__ */ s((e) => xe(M.buffer(e), "Buffer", e), "buffer"),
|
|
blob: /* @__PURE__ */ s((e) => xe(M.blob(e), "Blob", e), "blob"),
|
|
nullOrUndefined: /* @__PURE__ */ s((e) => xe(M.nullOrUndefined(e), "null or undefined", e), "nullOrUndefined"),
|
|
object: /* @__PURE__ */ s((e) => xe(M.object(e), "Object", e), "object"),
|
|
iterable: /* @__PURE__ */ s((e) => xe(M.iterable(e), "Iterable", e), "iterable"),
|
|
asyncIterable: /* @__PURE__ */ s((e) => xe(M.asyncIterable(e), "AsyncIterable", e), "asyncIterable"),
|
|
generator: /* @__PURE__ */ s((e) => xe(M.generator(e), "Generator", e), "generator"),
|
|
asyncGenerator: /* @__PURE__ */ s((e) => xe(M.asyncGenerator(e), "AsyncGenerator", e), "asyncGenerator"),
|
|
nativePromise: /* @__PURE__ */ s((e) => xe(M.nativePromise(e), "native Promise", e), "nativePromise"),
|
|
promise: /* @__PURE__ */ s((e) => xe(M.promise(e), "Promise", e), "promise"),
|
|
generatorFunction: /* @__PURE__ */ s((e) => xe(M.generatorFunction(e), "GeneratorFunction", e), "generatorFunction"),
|
|
asyncGeneratorFunction: /* @__PURE__ */ s((e) => xe(M.asyncGeneratorFunction(e), "AsyncGeneratorFunction", e), "asyncGeneratorFunction"),
|
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
asyncFunction: /* @__PURE__ */ s((e) => xe(M.asyncFunction(e), "AsyncFunction", e), "asyncFunction"),
|
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
boundFunction: /* @__PURE__ */ s((e) => xe(M.boundFunction(e), "Function", e), "boundFunction"),
|
|
regExp: /* @__PURE__ */ s((e) => xe(M.regExp(e), "RegExp", e), "regExp"),
|
|
date: /* @__PURE__ */ s((e) => xe(M.date(e), "Date", e), "date"),
|
|
error: /* @__PURE__ */ s((e) => xe(M.error(e), "Error", e), "error"),
|
|
map: /* @__PURE__ */ s((e) => xe(M.map(e), "Map", e), "map"),
|
|
set: /* @__PURE__ */ s((e) => xe(M.set(e), "Set", e), "set"),
|
|
weakMap: /* @__PURE__ */ s((e) => xe(M.weakMap(e), "WeakMap", e), "weakMap"),
|
|
weakSet: /* @__PURE__ */ s((e) => xe(M.weakSet(e), "WeakSet", e), "weakSet"),
|
|
weakRef: /* @__PURE__ */ s((e) => xe(M.weakRef(e), "WeakRef", e), "weakRef"),
|
|
int8Array: /* @__PURE__ */ s((e) => xe(M.int8Array(e), "Int8Array", e), "int8Array"),
|
|
uint8Array: /* @__PURE__ */ s((e) => xe(M.uint8Array(e), "Uint8Array", e), "uint8Array"),
|
|
uint8ClampedArray: /* @__PURE__ */ s((e) => xe(M.uint8ClampedArray(e), "Uint8ClampedArray", e), "uint8ClampedArray"),
|
|
int16Array: /* @__PURE__ */ s((e) => xe(M.int16Array(e), "Int16Array", e), "int16Array"),
|
|
uint16Array: /* @__PURE__ */ s((e) => xe(M.uint16Array(e), "Uint16Array", e), "uint16Array"),
|
|
int32Array: /* @__PURE__ */ s((e) => xe(M.int32Array(e), "Int32Array", e), "int32Array"),
|
|
uint32Array: /* @__PURE__ */ s((e) => xe(M.uint32Array(e), "Uint32Array", e), "uint32Array"),
|
|
float32Array: /* @__PURE__ */ s((e) => xe(M.float32Array(e), "Float32Array", e), "float32Array"),
|
|
float64Array: /* @__PURE__ */ s((e) => xe(M.float64Array(e), "Float64Array", e), "float64Array"),
|
|
bigInt64Array: /* @__PURE__ */ s((e) => xe(M.bigInt64Array(e), "BigInt64Array", e), "bigInt64Array"),
|
|
bigUint64Array: /* @__PURE__ */ s((e) => xe(M.bigUint64Array(e), "BigUint64Array", e), "bigUint64Array"),
|
|
arrayBuffer: /* @__PURE__ */ s((e) => xe(M.arrayBuffer(e), "ArrayBuffer", e), "arrayBuffer"),
|
|
sharedArrayBuffer: /* @__PURE__ */ s((e) => xe(M.sharedArrayBuffer(e), "SharedArrayBuffer", e), "sharedArrayBuffer"),
|
|
dataView: /* @__PURE__ */ s((e) => xe(M.dataView(e), "DataView", e), "dataView"),
|
|
enumCase: /* @__PURE__ */ s((e, t) => xe(M.enumCase(e, t), "EnumCase", e), "enumCase"),
|
|
urlInstance: /* @__PURE__ */ s((e) => xe(M.urlInstance(e), "URL", e), "urlInstance"),
|
|
urlString: /* @__PURE__ */ s((e) => xe(M.urlString(e), "string with a URL", e), "urlString"),
|
|
truthy: /* @__PURE__ */ s((e) => xe(M.truthy(e), "truthy", e), "truthy"),
|
|
falsy: /* @__PURE__ */ s((e) => xe(M.falsy(e), "falsy", e), "falsy"),
|
|
nan: /* @__PURE__ */ s((e) => xe(M.nan(e), "NaN", e), "nan"),
|
|
primitive: /* @__PURE__ */ s((e) => xe(M.primitive(e), "primitive", e), "primitive"),
|
|
integer: /* @__PURE__ */ s((e) => xe(M.integer(e), "integer", e), "integer"),
|
|
safeInteger: /* @__PURE__ */ s((e) => xe(M.safeInteger(e), "integer", e), "safeInteger"),
|
|
plainObject: /* @__PURE__ */ s((e) => xe(M.plainObject(e), "plain object", e), "plainObject"),
|
|
typedArray: /* @__PURE__ */ s((e) => xe(M.typedArray(e), "TypedArray", e), "typedArray"),
|
|
arrayLike: /* @__PURE__ */ s((e) => xe(M.arrayLike(e), "array-like", e), "arrayLike"),
|
|
domElement: /* @__PURE__ */ s((e) => xe(M.domElement(e), "HTMLElement", e), "domElement"),
|
|
observable: /* @__PURE__ */ s((e) => xe(M.observable(e), "Observable", e), "observable"),
|
|
nodeStream: /* @__PURE__ */ s((e) => xe(M.nodeStream(e), "Node.js Stream", e), "nodeStream"),
|
|
infinite: /* @__PURE__ */ s((e) => xe(M.infinite(e), "infinite number", e), "infinite"),
|
|
emptyArray: /* @__PURE__ */ s((e) => xe(M.emptyArray(e), "empty array", e), "emptyArray"),
|
|
nonEmptyArray: /* @__PURE__ */ s((e) => xe(M.nonEmptyArray(e), "non-empty array", e), "nonEmptyArray"),
|
|
emptyString: /* @__PURE__ */ s((e) => xe(M.emptyString(e), "empty string", e), "emptyString"),
|
|
emptyStringOrWhitespace: /* @__PURE__ */ s((e) => xe(M.emptyStringOrWhitespace(e), "empty string or whitespace", e), "emptyStringOrWhite\
|
|
space"),
|
|
nonEmptyString: /* @__PURE__ */ s((e) => xe(M.nonEmptyString(e), "non-empty string", e), "nonEmptyString"),
|
|
nonEmptyStringAndNotWhitespace: /* @__PURE__ */ s((e) => xe(M.nonEmptyStringAndNotWhitespace(e), "non-empty string and not whitespace", e),
|
|
"nonEmptyStringAndNotWhitespace"),
|
|
emptyObject: /* @__PURE__ */ s((e) => xe(M.emptyObject(e), "empty object", e), "emptyObject"),
|
|
nonEmptyObject: /* @__PURE__ */ s((e) => xe(M.nonEmptyObject(e), "non-empty object", e), "nonEmptyObject"),
|
|
emptySet: /* @__PURE__ */ s((e) => xe(M.emptySet(e), "empty set", e), "emptySet"),
|
|
nonEmptySet: /* @__PURE__ */ s((e) => xe(M.nonEmptySet(e), "non-empty set", e), "nonEmptySet"),
|
|
emptyMap: /* @__PURE__ */ s((e) => xe(M.emptyMap(e), "empty map", e), "emptyMap"),
|
|
nonEmptyMap: /* @__PURE__ */ s((e) => xe(M.nonEmptyMap(e), "non-empty map", e), "nonEmptyMap"),
|
|
propertyKey: /* @__PURE__ */ s((e) => xe(M.propertyKey(e), "PropertyKey", e), "propertyKey"),
|
|
formData: /* @__PURE__ */ s((e) => xe(M.formData(e), "FormData", e), "formData"),
|
|
urlSearchParams: /* @__PURE__ */ s((e) => xe(M.urlSearchParams(e), "URLSearchParams", e), "urlSearchParams"),
|
|
// Numbers.
|
|
evenInteger: /* @__PURE__ */ s((e) => xe(M.evenInteger(e), "even integer", e), "evenInteger"),
|
|
oddInteger: /* @__PURE__ */ s((e) => xe(M.oddInteger(e), "odd integer", e), "oddInteger"),
|
|
// Two arguments.
|
|
directInstanceOf: /* @__PURE__ */ s((e, t) => xe(M.directInstanceOf(e, t), "T", e), "directInstanceOf"),
|
|
inRange: /* @__PURE__ */ s((e, t) => xe(M.inRange(e, t), "in range", e), "inRange"),
|
|
// Variadic functions.
|
|
any: /* @__PURE__ */ s((e, ...t) => xe(M.any(e, ...t), "predicate returns truthy for any value", t, { multipleValues: !0 }), "any"),
|
|
all: /* @__PURE__ */ s((e, ...t) => xe(M.all(e, ...t), "predicate returns truthy for all values", t, { multipleValues: !0 }), "all")
|
|
};
|
|
Object.defineProperties(M, {
|
|
class: {
|
|
value: M.class_
|
|
},
|
|
function: {
|
|
value: M.function_
|
|
},
|
|
null: {
|
|
value: M.null_
|
|
}
|
|
});
|
|
Object.defineProperties(fe, {
|
|
class: {
|
|
value: fe.class_
|
|
},
|
|
function: {
|
|
value: fe.function_
|
|
},
|
|
null: {
|
|
value: fe.null_
|
|
}
|
|
});
|
|
var $ = M, Nse = V("events"), Mse = class extends Error {
|
|
static {
|
|
s(this, "CancelError");
|
|
}
|
|
constructor(e) {
|
|
super(e || "Promise was canceled"), this.name = "CancelError";
|
|
}
|
|
get isCanceled() {
|
|
return !0;
|
|
}
|
|
}, lx = class {
|
|
static {
|
|
s(this, "PCancelable");
|
|
}
|
|
static fn(e) {
|
|
return (...t) => new lx((r, i, n) => {
|
|
t.push(n), e(...t).then(r, i);
|
|
});
|
|
}
|
|
constructor(e) {
|
|
this._cancelHandlers = [], this._isPending = !0, this._isCanceled = !1, this._rejectOnCancel = !0, this._promise = new Promise((t, r) => {
|
|
this._reject = r;
|
|
let i = /* @__PURE__ */ s((o) => {
|
|
(!this._isCanceled || !a.shouldReject) && (this._isPending = !1, t(o));
|
|
}, "onResolve"), n = /* @__PURE__ */ s((o) => {
|
|
this._isPending = !1, r(o);
|
|
}, "onReject"), a = /* @__PURE__ */ s((o) => {
|
|
if (!this._isPending)
|
|
throw new Error("The `onCancel` handler was attached after the promise settled.");
|
|
this._cancelHandlers.push(o);
|
|
}, "onCancel");
|
|
Object.defineProperties(a, {
|
|
shouldReject: {
|
|
get: /* @__PURE__ */ s(() => this._rejectOnCancel, "get"),
|
|
set: /* @__PURE__ */ s((o) => {
|
|
this._rejectOnCancel = o;
|
|
}, "set")
|
|
}
|
|
}), e(i, n, a);
|
|
});
|
|
}
|
|
then(e, t) {
|
|
return this._promise.then(e, t);
|
|
}
|
|
catch(e) {
|
|
return this._promise.catch(e);
|
|
}
|
|
finally(e) {
|
|
return this._promise.finally(e);
|
|
}
|
|
cancel(e) {
|
|
if (!(!this._isPending || this._isCanceled)) {
|
|
if (this._isCanceled = !0, this._cancelHandlers.length > 0)
|
|
try {
|
|
for (let t of this._cancelHandlers)
|
|
t();
|
|
} catch (t) {
|
|
this._reject(t);
|
|
return;
|
|
}
|
|
this._rejectOnCancel && this._reject(new Mse(e));
|
|
}
|
|
}
|
|
get isCanceled() {
|
|
return this._isCanceled;
|
|
}
|
|
};
|
|
Object.setPrototypeOf(lx.prototype, Promise.prototype);
|
|
function Rse(e) {
|
|
return $.object(e) && "_onResponse" in e;
|
|
}
|
|
s(Rse, "isRequest");
|
|
var Pr = class extends Error {
|
|
static {
|
|
s(this, "RequestError");
|
|
}
|
|
constructor(e, t, r) {
|
|
var i;
|
|
if (super(e), Object.defineProperty(this, "input", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "code", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "stack", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "response", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "request", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "timings", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Error.captureStackTrace(this, this.constructor), this.name = "RequestError", this.code = t.code ?? "ERR_GOT_REQUEST_ERROR", this.input =
|
|
t.input, Rse(r) ? (Object.defineProperty(this, "request", {
|
|
enumerable: !1,
|
|
value: r
|
|
}), Object.defineProperty(this, "response", {
|
|
enumerable: !1,
|
|
value: r.response
|
|
}), this.options = r.options) : this.options = r, this.timings = (i = this.request) == null ? void 0 : i.timings, $.string(t.stack) &&
|
|
$.string(this.stack)) {
|
|
let n = this.stack.indexOf(this.message) + this.message.length, a = this.stack.slice(n).split(`
|
|
`).reverse(), o = t.stack.slice(t.stack.indexOf(t.message) + t.message.length).split(`
|
|
`).reverse();
|
|
for (; o.length > 0 && o[0] === a[0]; )
|
|
a.shift();
|
|
this.stack = `${this.stack.slice(0, n)}${a.reverse().join(`
|
|
`)}${o.reverse().join(`
|
|
`)}`;
|
|
}
|
|
}
|
|
}, jse = class extends Pr {
|
|
static {
|
|
s(this, "MaxRedirectsError");
|
|
}
|
|
constructor(e) {
|
|
super(`Redirected ${e.options.maxRedirects} times. Aborting.`, {}, e), this.name = "MaxRedirectsError", this.code = "ERR_TOO_MANY_REDI\
|
|
RECTS";
|
|
}
|
|
}, Im = class extends Pr {
|
|
static {
|
|
s(this, "HTTPError");
|
|
}
|
|
constructor(e) {
|
|
super(`Response code ${e.statusCode} (${e.statusMessage})`, {}, e.request), this.name = "HTTPError", this.code = "ERR_NON_2XX_3XX_RESP\
|
|
ONSE";
|
|
}
|
|
}, Lse = class extends Pr {
|
|
static {
|
|
s(this, "CacheError");
|
|
}
|
|
constructor(e, t) {
|
|
super(e.message, e, t), this.name = "CacheError", this.code = this.code === "ERR_GOT_REQUEST_ERROR" ? "ERR_CACHE_ACCESS" : this.code;
|
|
}
|
|
}, k6 = class extends Pr {
|
|
static {
|
|
s(this, "UploadError");
|
|
}
|
|
constructor(e, t) {
|
|
super(e.message, e, t), this.name = "UploadError", this.code = this.code === "ERR_GOT_REQUEST_ERROR" ? "ERR_UPLOAD" : this.code;
|
|
}
|
|
}, qse = class extends Pr {
|
|
static {
|
|
s(this, "TimeoutError");
|
|
}
|
|
constructor(e, t, r) {
|
|
super(e.message, e, r), Object.defineProperty(this, "timings", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "event", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), this.name = "TimeoutError", this.event = e.event, this.timings = t;
|
|
}
|
|
}, B6 = class extends Pr {
|
|
static {
|
|
s(this, "ReadError");
|
|
}
|
|
constructor(e, t) {
|
|
super(e.message, e, t), this.name = "ReadError", this.code = this.code === "ERR_GOT_REQUEST_ERROR" ? "ERR_READING_RESPONSE_STREAM" : this.
|
|
code;
|
|
}
|
|
}, Use = class extends Pr {
|
|
static {
|
|
s(this, "RetryError");
|
|
}
|
|
constructor(e) {
|
|
super("Retrying", {}, e), this.name = "RetryError", this.code = "ERR_RETRYING";
|
|
}
|
|
}, Wse = class extends Pr {
|
|
static {
|
|
s(this, "AbortError");
|
|
}
|
|
constructor(e) {
|
|
super("This operation was aborted.", {}, e), this.code = "ERR_ABORTED", this.name = "AbortError";
|
|
}
|
|
}, v4 = Cr(V("process"), 1), YE = V("buffer"), $se = V("stream"), N6 = V("url"), ZE = Cr(V("http"), 1), Vse = V("events"), Hse = V("util"),
|
|
Kse = Cr(ise(), 1), zse = /* @__PURE__ */ s((e) => {
|
|
if (e.timings)
|
|
return e.timings;
|
|
let t = {
|
|
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
|
|
}
|
|
};
|
|
e.timings = t;
|
|
let r = /* @__PURE__ */ s((o) => {
|
|
o.once(Vse.errorMonitor, () => {
|
|
t.error = Date.now(), t.phases.total = t.error - t.start;
|
|
});
|
|
}, "handleError");
|
|
r(e);
|
|
let i = /* @__PURE__ */ s(() => {
|
|
t.abort = Date.now(), t.phases.total = t.abort - t.start;
|
|
}, "onAbort");
|
|
e.prependOnceListener("abort", i);
|
|
let n = /* @__PURE__ */ s((o) => {
|
|
if (t.socket = Date.now(), t.phases.wait = t.socket - t.start, Hse.types.isProxy(o))
|
|
return;
|
|
let u = /* @__PURE__ */ s(() => {
|
|
t.lookup = Date.now(), t.phases.dns = t.lookup - t.socket;
|
|
}, "lookupListener");
|
|
o.prependOnceListener("lookup", u), (0, Kse.default)(o, {
|
|
connect: /* @__PURE__ */ s(() => {
|
|
t.connect = Date.now(), t.lookup === void 0 && (o.removeListener("lookup", u), t.lookup = t.connect, t.phases.dns = t.lookup - t.socket),
|
|
t.phases.tcp = t.connect - t.lookup;
|
|
}, "connect"),
|
|
secureConnect: /* @__PURE__ */ s(() => {
|
|
t.secureConnect = Date.now(), t.phases.tls = t.secureConnect - t.connect;
|
|
}, "secureConnect")
|
|
});
|
|
}, "onSocket");
|
|
e.socket ? n(e.socket) : e.prependOnceListener("socket", n);
|
|
let a = /* @__PURE__ */ s(() => {
|
|
t.upload = Date.now(), t.phases.request = t.upload - (t.secureConnect ?? t.connect);
|
|
}, "onUpload");
|
|
return e.writableFinished ? a() : e.prependOnceListener("finish", a), e.prependOnceListener("response", (o) => {
|
|
t.response = Date.now(), t.phases.firstByte = t.response - t.upload, o.timings = t, r(o), o.prependOnceListener("end", () => {
|
|
e.off("abort", i), o.off("aborted", i), !t.phases.total && (t.end = Date.now(), t.phases.download = t.end - t.response, t.phases.total =
|
|
t.end - t.start);
|
|
}), o.prependOnceListener("aborted", i);
|
|
}), t;
|
|
}, "timer"), Gse = zse, Jse = Cr(V("events"), 1), Sm = Cr(V("url"), 1), Xse = Cr(V("crypto"), 1), E4 = Cr(V("stream"), 1), Yse = "text/pla\
|
|
in", Zse = "us-ascii", QE = /* @__PURE__ */ s((e, t) => t.some((r) => r instanceof RegExp ? r.test(e) : r === e), "testParameter"), Qse = /* @__PURE__ */ new Set(
|
|
[
|
|
"https:",
|
|
"http:",
|
|
"file:"
|
|
]), eae = /* @__PURE__ */ s((e) => {
|
|
try {
|
|
let { protocol: t } = new URL(e);
|
|
return t.endsWith(":") && !Qse.has(t);
|
|
} catch {
|
|
return !1;
|
|
}
|
|
}, "hasCustomProtocol"), tae = /* @__PURE__ */ s((e, { stripHash: t }) => {
|
|
var r;
|
|
let i = /^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);
|
|
if (!i)
|
|
throw new Error(`Invalid URL: ${e}`);
|
|
let { type: n, data: a, hash: o } = i.groups, u = n.split(";");
|
|
o = t ? "" : o;
|
|
let l = !1;
|
|
u[u.length - 1] === "base64" && (u.pop(), l = !0);
|
|
let c = ((r = u.shift()) == null ? void 0 : r.toLowerCase()) ?? "", m = [
|
|
...u.map((h) => {
|
|
let [d, y = ""] = h.split("=").map((p) => p.trim());
|
|
return d === "charset" && (y = y.toLowerCase(), y === Zse) ? "" : `${d}${y ? `=${y}` : ""}`;
|
|
}).filter(Boolean)
|
|
];
|
|
return l && m.push("base64"), (m.length > 0 || c && c !== Yse) && m.unshift(c), `data:${m.join(";")},${l ? a.trim() : a}${o ? `#${o}` : ""}`;
|
|
}, "normalizeDataURL");
|
|
function rae(e, t) {
|
|
if (t = {
|
|
defaultProtocol: "http",
|
|
normalizeProtocol: !0,
|
|
forceHttp: !1,
|
|
forceHttps: !1,
|
|
stripAuthentication: !0,
|
|
stripHash: !1,
|
|
stripTextFragment: !0,
|
|
stripWWW: !0,
|
|
removeQueryParameters: [/^utm_\w+/i],
|
|
removeTrailingSlash: !0,
|
|
removeSingleSlash: !0,
|
|
removeDirectoryIndex: !1,
|
|
removeExplicitPort: !1,
|
|
sortQueryParameters: !0,
|
|
...t
|
|
}, typeof t.defaultProtocol == "string" && !t.defaultProtocol.endsWith(":") && (t.defaultProtocol = `${t.defaultProtocol}:`), e = e.trim(),
|
|
/^data:/i.test(e))
|
|
return tae(e, t);
|
|
if (eae(e))
|
|
return e;
|
|
let r = e.startsWith("//");
|
|
!r && /^\.*\//.test(e) || (e = e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, t.defaultProtocol));
|
|
let n = new URL(e);
|
|
if (t.forceHttp && t.forceHttps)
|
|
throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");
|
|
if (t.forceHttp && n.protocol === "https:" && (n.protocol = "http:"), t.forceHttps && n.protocol === "http:" && (n.protocol = "https:"),
|
|
t.stripAuthentication && (n.username = "", n.password = ""), t.stripHash ? n.hash = "" : t.stripTextFragment && (n.hash = n.hash.replace(
|
|
/#?:~:text.*?$/i, "")), n.pathname) {
|
|
let o = /\b[a-z][a-z\d+\-.]{1,50}:\/\//g, u = 0, l = "";
|
|
for (; ; ) {
|
|
let f = o.exec(n.pathname);
|
|
if (!f)
|
|
break;
|
|
let m = f[0], h = f.index, d = n.pathname.slice(u, h);
|
|
l += d.replace(/\/{2,}/g, "/"), l += m, u = h + m.length;
|
|
}
|
|
let c = n.pathname.slice(u, n.pathname.length);
|
|
l += c.replace(/\/{2,}/g, "/"), n.pathname = l;
|
|
}
|
|
if (n.pathname)
|
|
try {
|
|
n.pathname = decodeURI(n.pathname);
|
|
} catch {
|
|
}
|
|
if (t.removeDirectoryIndex === !0 && (t.removeDirectoryIndex = [/^index\.[a-z]+$/]), Array.isArray(t.removeDirectoryIndex) && t.removeDirectoryIndex.
|
|
length > 0) {
|
|
let o = n.pathname.split("/"), u = o[o.length - 1];
|
|
QE(u, t.removeDirectoryIndex) && (o = o.slice(0, -1), n.pathname = o.slice(1).join("/") + "/");
|
|
}
|
|
if (n.hostname && (n.hostname = n.hostname.replace(/\.$/, ""), t.stripWWW && /^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(n.
|
|
hostname) && (n.hostname = n.hostname.replace(/^www\./, ""))), Array.isArray(t.removeQueryParameters))
|
|
for (let o of [...n.searchParams.keys()])
|
|
QE(o, t.removeQueryParameters) && n.searchParams.delete(o);
|
|
if (!Array.isArray(t.keepQueryParameters) && t.removeQueryParameters === !0 && (n.search = ""), Array.isArray(t.keepQueryParameters) && t.
|
|
keepQueryParameters.length > 0)
|
|
for (let o of [...n.searchParams.keys()])
|
|
QE(o, t.keepQueryParameters) || n.searchParams.delete(o);
|
|
if (t.sortQueryParameters) {
|
|
n.searchParams.sort();
|
|
try {
|
|
n.search = decodeURIComponent(n.search);
|
|
} catch {
|
|
}
|
|
}
|
|
t.removeTrailingSlash && (n.pathname = n.pathname.replace(/\/$/, "")), t.removeExplicitPort && n.port && (n.port = "");
|
|
let a = e;
|
|
return e = n.toString(), !t.removeSingleSlash && n.pathname === "/" && !a.endsWith("/") && n.hash === "" && (e = e.replace(/\/$/, "")), (t.
|
|
removeTrailingSlash || n.pathname === "/") && n.hash === "" && t.removeSingleSlash && (e = e.replace(/\/$/, "")), r && !t.normalizeProtocol &&
|
|
(e = e.replace(/^http:\/\//, "//")), t.stripProtocol && (e = e.replace(/^(?:https?:)?\/\//, "")), e;
|
|
}
|
|
s(rae, "normalizeUrl");
|
|
var iae = Cr(s4(), 1), ex = Cr(sse(), 1), nae = V("stream");
|
|
function ox(e) {
|
|
return Object.fromEntries(Object.entries(e).map(([t, r]) => [t.toLowerCase(), r]));
|
|
}
|
|
s(ox, "lowercaseKeys");
|
|
var M6 = class extends nae.Readable {
|
|
static {
|
|
s(this, "Response");
|
|
}
|
|
statusCode;
|
|
headers;
|
|
body;
|
|
url;
|
|
constructor({ statusCode: e, headers: t, body: r, url: i }) {
|
|
if (typeof e != "number")
|
|
throw new TypeError("Argument `statusCode` should be a number");
|
|
if (typeof t != "object")
|
|
throw new TypeError("Argument `headers` should be an object");
|
|
if (!(r instanceof Uint8Array))
|
|
throw new TypeError("Argument `body` should be a buffer");
|
|
if (typeof i != "string")
|
|
throw new TypeError("Argument `url` should be a string");
|
|
super({
|
|
read() {
|
|
this.push(r), this.push(null);
|
|
}
|
|
}), this.statusCode = e, this.headers = ox(t), this.body = r, this.url = i;
|
|
}
|
|
}, Tm = Cr(ose(), 1), sae = [
|
|
"aborted",
|
|
"complete",
|
|
"headers",
|
|
"httpVersion",
|
|
"httpVersionMinor",
|
|
"httpVersionMajor",
|
|
"method",
|
|
"rawHeaders",
|
|
"rawTrailers",
|
|
"setTimeout",
|
|
"socket",
|
|
"statusCode",
|
|
"statusMessage",
|
|
"trailers",
|
|
"url"
|
|
];
|
|
function aae(e, t) {
|
|
if (t._readableState.autoDestroy)
|
|
throw new Error("The second stream must have the `autoDestroy` option set to `false`");
|
|
let r = /* @__PURE__ */ new Set([...Object.keys(e), ...sae]), i = {};
|
|
for (let n of r)
|
|
n in t || (i[n] = {
|
|
get() {
|
|
let a = e[n];
|
|
return typeof a == "function" ? a.bind(e) : a;
|
|
},
|
|
set(a) {
|
|
e[n] = a;
|
|
},
|
|
enumerable: !0,
|
|
configurable: !1
|
|
});
|
|
return Object.defineProperties(t, i), e.once("aborted", () => {
|
|
t.destroy(), t.emit("aborted");
|
|
}), e.once("close", () => {
|
|
e.complete && t.readable ? t.once("end", () => {
|
|
t.emit("close");
|
|
}) : t.emit("close");
|
|
}), t;
|
|
}
|
|
s(aae, "mimicResponse");
|
|
var oae = class extends Error {
|
|
static {
|
|
s(this, "RequestError2");
|
|
}
|
|
constructor(e) {
|
|
super(e.message), Object.assign(this, e);
|
|
}
|
|
}, Lf = class extends Error {
|
|
static {
|
|
s(this, "CacheError2");
|
|
}
|
|
constructor(e) {
|
|
super(e.message), Object.assign(this, e);
|
|
}
|
|
}, uae = class {
|
|
static {
|
|
s(this, "CacheableRequest");
|
|
}
|
|
constructor(e, t) {
|
|
this.hooks = /* @__PURE__ */ new Map(), this.request = () => (r, i) => {
|
|
let n;
|
|
if (typeof r == "string")
|
|
n = tx(Sm.default.parse(r)), r = {};
|
|
else if (r instanceof Sm.default.URL)
|
|
n = tx(Sm.default.parse(r.toString())), r = {};
|
|
else {
|
|
let [m, ...h] = (r.path ?? "").split("?"), d = h.length > 0 ? `?${h.join("?")}` : "";
|
|
n = tx({ ...r, pathname: m, search: d });
|
|
}
|
|
r = {
|
|
headers: {},
|
|
method: "GET",
|
|
cache: !0,
|
|
strictTtl: !1,
|
|
automaticFailover: !1,
|
|
...r,
|
|
...fae(n)
|
|
}, r.headers = Object.fromEntries(lae(r.headers).map(([m, h]) => [m.toLowerCase(), h]));
|
|
let a = new Jse.default(), o = rae(Sm.default.format(n), {
|
|
stripWWW: !1,
|
|
removeTrailingSlash: !1,
|
|
stripAuthentication: !1
|
|
}), u = `${r.method}:${o}`;
|
|
r.body && r.method !== void 0 && ["POST", "PATCH", "PUT"].includes(r.method) && (r.body instanceof E4.default.Readable ? r.cache = !1 :
|
|
u += `:${Xse.default.createHash("md5").update(r.body).digest("hex")}`);
|
|
let l = !1, c = !1, f = /* @__PURE__ */ s((m) => {
|
|
c = !0;
|
|
let h = !1, d = /* @__PURE__ */ s(() => {
|
|
}, "requestErrorCallback"), y = new Promise((g) => {
|
|
d = /* @__PURE__ */ s(() => {
|
|
h || (h = !0, g());
|
|
}, "requestErrorCallback");
|
|
}), p = /* @__PURE__ */ s(async (g) => {
|
|
if (l) {
|
|
g.status = g.statusCode;
|
|
let D = ex.default.fromObject(l.cachePolicy).revalidatedPolicy(m, g);
|
|
if (!D.modified) {
|
|
g.resume(), await new Promise((S) => {
|
|
g.once("end", S);
|
|
});
|
|
let v = R6(D.policy.responseHeaders());
|
|
g = new M6({ statusCode: l.statusCode, headers: v, body: l.body, url: l.url }), g.cachePolicy = D.policy, g.fromCache = !0;
|
|
}
|
|
}
|
|
g.fromCache || (g.cachePolicy = new ex.default(m, g, m), g.fromCache = !1);
|
|
let b;
|
|
m.cache && g.cachePolicy.storable() ? (b = cae(g), (async () => {
|
|
try {
|
|
let D = iae.default.buffer(g);
|
|
await Promise.race([
|
|
y,
|
|
new Promise((O) => g.once("end", O)),
|
|
new Promise((O) => g.once("close", O))
|
|
// eslint-disable-line no-promise-executor-return
|
|
]);
|
|
let v = await D, S = {
|
|
url: g.url,
|
|
statusCode: g.fromCache ? l.statusCode : g.statusCode,
|
|
body: v,
|
|
cachePolicy: g.cachePolicy.toObject()
|
|
}, C = m.strictTtl ? g.cachePolicy.timeToLive() : void 0;
|
|
if (m.maxTtl && (C = C ? Math.min(C, m.maxTtl) : m.maxTtl), this.hooks.size > 0)
|
|
for (let O of this.hooks.keys())
|
|
S = await this.runHook(O, S, g);
|
|
await this.cache.set(u, S, C);
|
|
} catch (D) {
|
|
a.emit("error", new Lf(D));
|
|
}
|
|
})()) : m.cache && l && (async () => {
|
|
try {
|
|
await this.cache.delete(u);
|
|
} catch (D) {
|
|
a.emit("error", new Lf(D));
|
|
}
|
|
})(), a.emit("response", b ?? g), typeof i == "function" && i(b ?? g);
|
|
}, "handler");
|
|
try {
|
|
let g = this.cacheRequest(m, p);
|
|
g.once("error", d), g.once("abort", d), g.once("destroy", d), a.emit("request", g);
|
|
} catch (g) {
|
|
a.emit("error", new oae(g));
|
|
}
|
|
}, "makeRequest");
|
|
return (async () => {
|
|
let m = /* @__PURE__ */ s(async (d) => {
|
|
await Promise.resolve();
|
|
let y = d.cache ? await this.cache.get(u) : void 0;
|
|
if (typeof y > "u" && !d.forceRefresh) {
|
|
f(d);
|
|
return;
|
|
}
|
|
let p = ex.default.fromObject(y.cachePolicy);
|
|
if (p.satisfiesWithoutRevalidation(d) && !d.forceRefresh) {
|
|
let g = R6(p.responseHeaders()), b = new M6({ statusCode: y.statusCode, headers: g, body: y.body, url: y.url });
|
|
b.cachePolicy = p, b.fromCache = !0, a.emit("response", b), typeof i == "function" && i(b);
|
|
} else p.satisfiesWithoutRevalidation(d) && Date.now() >= p.timeToLive() && d.forceRefresh ? (await this.cache.delete(u), d.headers =
|
|
p.revalidationHeaders(d), f(d)) : (l = y, d.headers = p.revalidationHeaders(d), f(d));
|
|
}, "get"), h = /* @__PURE__ */ s((d) => a.emit("error", new Lf(d)), "errorHandler");
|
|
if (this.cache instanceof Tm.default) {
|
|
let d = this.cache;
|
|
d.once("error", h), a.on("error", () => d.removeListener("error", h)), a.on("response", () => d.removeListener("error", h));
|
|
}
|
|
try {
|
|
await m(r);
|
|
} catch (d) {
|
|
r.automaticFailover && !c && f(r), a.emit("error", new Lf(d));
|
|
}
|
|
})(), a;
|
|
}, this.addHook = (r, i) => {
|
|
this.hooks.has(r) || this.hooks.set(r, i);
|
|
}, this.removeHook = (r) => this.hooks.delete(r), this.getHook = (r) => this.hooks.get(r), this.runHook = async (r, ...i) => {
|
|
var n;
|
|
return (n = this.hooks.get(r)) == null ? void 0 : n(...i);
|
|
}, t instanceof Tm.default ? this.cache = t : typeof t == "string" ? this.cache = new Tm.default({
|
|
uri: t,
|
|
namespace: "cacheable-request"
|
|
}) : this.cache = new Tm.default({
|
|
store: t,
|
|
namespace: "cacheable-request"
|
|
}), this.request = this.request.bind(this), this.cacheRequest = e;
|
|
}
|
|
}, lae = Object.entries, cae = /* @__PURE__ */ s((e) => {
|
|
let t = new E4.PassThrough({ autoDestroy: !1 });
|
|
return aae(e, t), e.pipe(t);
|
|
}, "cloneResponse"), fae = /* @__PURE__ */ s((e) => {
|
|
let t = { ...e };
|
|
return t.path = `${e.pathname || "/"}${e.search || ""}`, delete t.pathname, delete t.search, t;
|
|
}, "urlObjectToRequestOptions"), tx = /* @__PURE__ */ s((e) => (
|
|
// If url was parsed by url.parse or new URL:
|
|
// - hostname will be set
|
|
// - host will be hostname[:port]
|
|
// - port will be set if it was explicit in the parsed string
|
|
// Otherwise, url was from request options:
|
|
// - hostname or host may be set
|
|
// - host shall not have port encoded
|
|
{
|
|
protocol: e.protocol,
|
|
auth: e.auth,
|
|
hostname: e.hostname || e.host || "localhost",
|
|
port: e.port,
|
|
pathname: e.pathname,
|
|
search: e.search
|
|
}
|
|
), "normalizeUrlObject"), R6 = /* @__PURE__ */ s((e) => {
|
|
let t = [];
|
|
for (let r of Object.keys(e))
|
|
t[r.toLowerCase()] = e[r];
|
|
return t;
|
|
}, "convertHeaders"), dae = uae, pae = Cr(lse(), 1), hae = Cr(s4(), 1), Bs = /* @__PURE__ */ s((e) => typeof e == "function", "isFunction"),
|
|
mae = /* @__PURE__ */ s((e) => Bs(e[Symbol.asyncIterator]), "isAsyncIterable");
|
|
async function* yae(e) {
|
|
let t = e.getReader();
|
|
for (; ; ) {
|
|
let { done: r, value: i } = await t.read();
|
|
if (r)
|
|
break;
|
|
yield i;
|
|
}
|
|
}
|
|
s(yae, "readStream");
|
|
var gae = /* @__PURE__ */ s((e) => {
|
|
if (mae(e))
|
|
return e;
|
|
if (Bs(e.getReader))
|
|
return yae(e);
|
|
throw new TypeError("Unsupported data source: Expected either ReadableStream or async iterable.");
|
|
}, "getStreamIterator"), j6 = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
function bae() {
|
|
let e = 16, t = "";
|
|
for (; e--; )
|
|
t += j6[Math.random() * j6.length << 0];
|
|
return t;
|
|
}
|
|
s(bae, "createBoundary");
|
|
var L6 = /* @__PURE__ */ s((e) => String(e).replace(/\r|\n/g, (t, r, i) => t === "\r" && i[r + 1] !== `
|
|
` || t === `
|
|
` && i[r - 1] !== "\r" ? `\r
|
|
` : t), "normalizeValue"), Dae = /* @__PURE__ */ s((e) => Object.prototype.toString.call(e).slice(8, -1).toLowerCase(), "getType");
|
|
function q6(e) {
|
|
if (Dae(e) !== "object")
|
|
return !1;
|
|
let t = Object.getPrototypeOf(e);
|
|
return t == null ? !0 : (t.constructor && t.constructor.toString()) === Object.toString();
|
|
}
|
|
s(q6, "isPlainObject");
|
|
function U6(e, t) {
|
|
if (typeof t == "string") {
|
|
for (let [r, i] of Object.entries(e))
|
|
if (t.toLowerCase() === r.toLowerCase())
|
|
return i;
|
|
}
|
|
}
|
|
s(U6, "getProperty");
|
|
var vae = /* @__PURE__ */ s((e) => new Proxy(e, {
|
|
get: /* @__PURE__ */ s((t, r) => U6(t, r), "get"),
|
|
has: /* @__PURE__ */ s((t, r) => U6(t, r) !== void 0, "has")
|
|
}), "proxyHeaders"), cx = /* @__PURE__ */ s((e) => !!(e && Bs(e.constructor) && e[Symbol.toStringTag] === "FormData" && Bs(e.append) && Bs(
|
|
e.getAll) && Bs(e.entries) && Bs(e[Symbol.iterator])), "isFormData"), W6 = /* @__PURE__ */ s((e) => String(e).replace(/\r/g, "%0D").replace(
|
|
/\n/g, "%0A").replace(/"/g, "%22"), "escapeName"), Fo = /* @__PURE__ */ s((e) => !!(e && typeof e == "object" && Bs(e.constructor) && e[Symbol.
|
|
toStringTag] === "File" && Bs(e.stream) && e.name != null), "isFile"), kf = /* @__PURE__ */ s(function(e, t, r, i, n) {
|
|
if (i === "m")
|
|
throw new TypeError("Private method is not writable");
|
|
if (i === "a" && !n)
|
|
throw new TypeError("Private accessor was defined without a setter");
|
|
if (typeof t == "function" ? e !== t || !n : !t.has(e))
|
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
return i === "a" ? n.call(e, r) : n ? n.value = r : t.set(e, r), r;
|
|
}, "__classPrivateFieldSet"), Jt = /* @__PURE__ */ s(function(e, t, r, i) {
|
|
if (r === "a" && !i)
|
|
throw new TypeError("Private accessor was defined without a getter");
|
|
if (typeof t == "function" ? e !== t || !i : !t.has(e))
|
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
return r === "m" ? i : r === "a" ? i.call(e) : i ? i.value : t.get(e);
|
|
}, "__classPrivateFieldGet"), Bf, wa, Nf, Cm, Mf, Io, Rf, jf, wm, rx, $6, Eae = {
|
|
enableAdditionalHeaders: !1
|
|
}, Am = { writable: !1, configurable: !1 }, xae = class {
|
|
static {
|
|
s(this, "FormDataEncoder");
|
|
}
|
|
constructor(e, t, r) {
|
|
if (Bf.add(this), wa.set(this, `\r
|
|
`), Nf.set(this, void 0), Cm.set(this, void 0), Mf.set(this, "-".repeat(2)), Io.set(this, new TextEncoder()), Rf.set(this, void 0), jf.set(this,
|
|
void 0), wm.set(this, void 0), !cx(e))
|
|
throw new TypeError("Expected first argument to be a FormData instance.");
|
|
let i;
|
|
if (q6(t) ? r = t : i = t, i || (i = bae()), typeof i != "string")
|
|
throw new TypeError("Expected boundary argument to be a string.");
|
|
if (r && !q6(r))
|
|
throw new TypeError("Expected options argument to be an object.");
|
|
kf(this, jf, Array.from(e.entries()), "f"), kf(this, wm, { ...Eae, ...r }, "f"), kf(this, Nf, Jt(this, Io, "f").encode(Jt(this, wa, "f")),
|
|
"f"), kf(this, Cm, Jt(this, Nf, "f").byteLength, "f"), this.boundary = `form-data-boundary-${i}`, this.contentType = `multipart/form-d\
|
|
ata; boundary=${this.boundary}`, kf(this, Rf, Jt(this, Io, "f").encode(`${Jt(this, Mf, "f")}${this.boundary}${Jt(this, Mf, "f")}${Jt(this, wa,
|
|
"f").repeat(2)}`), "f");
|
|
let n = {
|
|
"Content-Type": this.contentType
|
|
}, a = Jt(this, Bf, "m", $6).call(this);
|
|
a && (this.contentLength = a, n["Content-Length"] = a), this.headers = vae(Object.freeze(n)), Object.defineProperties(this, {
|
|
boundary: Am,
|
|
contentType: Am,
|
|
contentLength: Am,
|
|
headers: Am
|
|
});
|
|
}
|
|
getContentLength() {
|
|
return this.contentLength == null ? void 0 : Number(this.contentLength);
|
|
}
|
|
*values() {
|
|
for (let [e, t] of Jt(this, jf, "f")) {
|
|
let r = Fo(t) ? t : Jt(this, Io, "f").encode(L6(t));
|
|
yield Jt(this, Bf, "m", rx).call(this, e, r), yield r, yield Jt(this, Nf, "f");
|
|
}
|
|
yield Jt(this, Rf, "f");
|
|
}
|
|
async *encode() {
|
|
for (let e of this.values())
|
|
Fo(e) ? yield* gae(e.stream()) : yield e;
|
|
}
|
|
[(wa = /* @__PURE__ */ new WeakMap(), Nf = /* @__PURE__ */ new WeakMap(), Cm = /* @__PURE__ */ new WeakMap(), Mf = /* @__PURE__ */ new WeakMap(),
|
|
Io = /* @__PURE__ */ new WeakMap(), Rf = /* @__PURE__ */ new WeakMap(), jf = /* @__PURE__ */ new WeakMap(), wm = /* @__PURE__ */ new WeakMap(),
|
|
Bf = /* @__PURE__ */ new WeakSet(), rx = /* @__PURE__ */ s(function(t, r) {
|
|
let i = "";
|
|
i += `${Jt(this, Mf, "f")}${this.boundary}${Jt(this, wa, "f")}`, i += `Content-Disposition: form-data; name="${W6(t)}"`, Fo(r) && (i +=
|
|
`; filename="${W6(r.name)}"${Jt(this, wa, "f")}`, i += `Content-Type: ${r.type || "application/octet-stream"}`);
|
|
let n = Fo(r) ? r.size : r.byteLength;
|
|
return Jt(this, wm, "f").enableAdditionalHeaders === !0 && n != null && !isNaN(n) && (i += `${Jt(this, wa, "f")}Content-Length: ${Fo(r) ?
|
|
r.size : r.byteLength}`), Jt(this, Io, "f").encode(`${i}${Jt(this, wa, "f").repeat(2)}`);
|
|
}, "_FormDataEncoder_getFieldHeader2"), $6 = /* @__PURE__ */ s(function() {
|
|
let t = 0;
|
|
for (let [r, i] of Jt(this, jf, "f")) {
|
|
let n = Fo(i) ? i : Jt(this, Io, "f").encode(L6(i)), a = Fo(n) ? n.size : n.byteLength;
|
|
if (a == null || isNaN(a))
|
|
return;
|
|
t += Jt(this, Bf, "m", rx).call(this, r, n).byteLength, t += a, t += Jt(this, Cm, "f");
|
|
}
|
|
return String(t + Jt(this, Rf, "f").byteLength);
|
|
}, "_FormDataEncoder_getContentLength2"), Symbol.iterator)]() {
|
|
return this.values();
|
|
}
|
|
[Symbol.asyncIterator]() {
|
|
return this.encode();
|
|
}
|
|
}, Sae = V("buffer"), Tae = V("util");
|
|
function x4(e) {
|
|
return $.nodeStream(e) && $.function_(e.getBoundary);
|
|
}
|
|
s(x4, "isFormData2");
|
|
async function Cae(e, t) {
|
|
if (t && "content-length" in t)
|
|
return Number(t["content-length"]);
|
|
if (!e)
|
|
return 0;
|
|
if ($.string(e))
|
|
return Sae.Buffer.byteLength(e);
|
|
if ($.buffer(e))
|
|
return e.length;
|
|
if (x4(e))
|
|
return (0, Tae.promisify)(e.getLength.bind(e))();
|
|
}
|
|
s(Cae, "getBodySize");
|
|
function S4(e, t, r) {
|
|
let i = {};
|
|
for (let n of r) {
|
|
let a = /* @__PURE__ */ s((...o) => {
|
|
t.emit(n, ...o);
|
|
}, "eventFunction");
|
|
i[n] = a, e.on(n, a);
|
|
}
|
|
return () => {
|
|
for (let [n, a] of Object.entries(i))
|
|
e.off(n, a);
|
|
};
|
|
}
|
|
s(S4, "proxyEvents");
|
|
var wae = Cr(V("net"), 1);
|
|
function Aae() {
|
|
let e = [];
|
|
return {
|
|
once(t, r, i) {
|
|
t.once(r, i), e.push({ origin: t, event: r, fn: i });
|
|
},
|
|
unhandleAll() {
|
|
for (let t of e) {
|
|
let { origin: r, event: i, fn: n } = t;
|
|
r.removeListener(i, n);
|
|
}
|
|
e.length = 0;
|
|
}
|
|
};
|
|
}
|
|
s(Aae, "unhandle");
|
|
var V6 = Symbol("reentry"), _ae = /* @__PURE__ */ s(() => {
|
|
}, "noop"), T4 = class extends Error {
|
|
static {
|
|
s(this, "TimeoutError2");
|
|
}
|
|
constructor(e, t) {
|
|
super(`Timeout awaiting '${t}' for ${e}ms`), Object.defineProperty(this, "event", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: t
|
|
}), Object.defineProperty(this, "code", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), this.name = "TimeoutError", this.code = "ETIMEDOUT";
|
|
}
|
|
};
|
|
function Pae(e, t, r) {
|
|
if (V6 in e)
|
|
return _ae;
|
|
e[V6] = !0;
|
|
let i = [], { once: n, unhandleAll: a } = Aae(), o = /* @__PURE__ */ s((p, g, b) => {
|
|
var D;
|
|
let v = setTimeout(g, p, p, b);
|
|
(D = v.unref) == null || D.call(v);
|
|
let S = /* @__PURE__ */ s(() => {
|
|
clearTimeout(v);
|
|
}, "cancel");
|
|
return i.push(S), S;
|
|
}, "addTimeout"), { host: u, hostname: l } = r, c = /* @__PURE__ */ s((p, g) => {
|
|
e.destroy(new T4(p, g));
|
|
}, "timeoutHandler"), f = /* @__PURE__ */ s(() => {
|
|
for (let p of i)
|
|
p();
|
|
a();
|
|
}, "cancelTimeouts");
|
|
if (e.once("error", (p) => {
|
|
if (f(), e.listenerCount("error") === 0)
|
|
throw p;
|
|
}), typeof t.request < "u") {
|
|
let p = o(t.request, c, "request");
|
|
n(e, "response", (g) => {
|
|
n(g, "end", p);
|
|
});
|
|
}
|
|
if (typeof t.socket < "u") {
|
|
let { socket: p } = t, g = /* @__PURE__ */ s(() => {
|
|
c(p, "socket");
|
|
}, "socketTimeoutHandler");
|
|
e.setTimeout(p, g), i.push(() => {
|
|
e.removeListener("timeout", g);
|
|
});
|
|
}
|
|
let m = typeof t.lookup < "u", h = typeof t.connect < "u", d = typeof t.secureConnect < "u", y = typeof t.send < "u";
|
|
return (m || h || d || y) && n(e, "socket", (p) => {
|
|
let { socketPath: g } = e;
|
|
if (p.connecting) {
|
|
let b = !!(g ?? wae.default.isIP(l ?? u ?? "") !== 0);
|
|
if (m && !b && typeof p.address().address > "u") {
|
|
let D = o(t.lookup, c, "lookup");
|
|
n(p, "lookup", D);
|
|
}
|
|
if (h) {
|
|
let D = /* @__PURE__ */ s(() => o(t.connect, c, "connect"), "timeConnect");
|
|
b ? n(p, "connect", D()) : n(p, "lookup", (v) => {
|
|
v === null && n(p, "connect", D());
|
|
});
|
|
}
|
|
d && r.protocol === "https:" && n(p, "connect", () => {
|
|
let D = o(t.secureConnect, c, "secureConnect");
|
|
n(p, "secureConnect", D);
|
|
});
|
|
}
|
|
if (y) {
|
|
let b = /* @__PURE__ */ s(() => o(t.send, c, "send"), "timeRequest");
|
|
p.connecting ? n(p, "connect", () => {
|
|
n(e, "upload-complete", b());
|
|
}) : n(e, "upload-complete", b());
|
|
}
|
|
}), typeof t.response < "u" && n(e, "upload-complete", () => {
|
|
let p = o(t.response, c, "response");
|
|
n(e, "response", p);
|
|
}), typeof t.read < "u" && n(e, "response", (p) => {
|
|
let g = o(t.read, c, "read");
|
|
n(p, "end", g);
|
|
}), f;
|
|
}
|
|
s(Pae, "timedOut");
|
|
function Fae(e) {
|
|
e = e;
|
|
let t = {
|
|
protocol: e.protocol,
|
|
hostname: $.string(e.hostname) && e.hostname.startsWith("[") ? e.hostname.slice(1, -1) : e.hostname,
|
|
host: e.host,
|
|
hash: e.hash,
|
|
search: e.search,
|
|
pathname: e.pathname,
|
|
href: e.href,
|
|
path: `${e.pathname || ""}${e.search || ""}`
|
|
};
|
|
return $.string(e.port) && e.port.length > 0 && (t.port = Number(e.port)), (e.username || e.password) && (t.auth = `${e.username || ""}:${e.
|
|
password || ""}`), t;
|
|
}
|
|
s(Fae, "urlToOptions");
|
|
var Iae = class {
|
|
static {
|
|
s(this, "WeakableMap");
|
|
}
|
|
constructor() {
|
|
Object.defineProperty(this, "weakMap", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "map", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), this.weakMap = /* @__PURE__ */ new WeakMap(), this.map = /* @__PURE__ */ new Map();
|
|
}
|
|
set(e, t) {
|
|
typeof e == "object" ? this.weakMap.set(e, t) : this.map.set(e, t);
|
|
}
|
|
get(e) {
|
|
return typeof e == "object" ? this.weakMap.get(e) : this.map.get(e);
|
|
}
|
|
has(e) {
|
|
return typeof e == "object" ? this.weakMap.has(e) : this.map.has(e);
|
|
}
|
|
}, Oae = /* @__PURE__ */ s(({ attemptCount: e, retryOptions: t, error: r, retryAfter: i, computedValue: n }) => {
|
|
if (r.name === "RetryError")
|
|
return 1;
|
|
if (e > t.limit)
|
|
return 0;
|
|
let a = t.methods.includes(r.options.method), o = t.errorCodes.includes(r.code), u = r.response && t.statusCodes.includes(r.response.statusCode);
|
|
if (!a || !o && !u)
|
|
return 0;
|
|
if (r.response) {
|
|
if (i)
|
|
return i > n ? 0 : i;
|
|
if (r.response.statusCode === 413)
|
|
return 0;
|
|
}
|
|
let l = Math.random() * t.noise;
|
|
return Math.min(2 ** (e - 1) * 1e3, t.backoffLimit) + l;
|
|
}, "calculateRetryDelay"), kae = Oae, Bae = Cr(V("process"), 1), ix = V("util"), Oo = V("url"), Nae = V("tls"), Mae = Cr(V("http"), 1), Rae = Cr(
|
|
V("https"), 1), bl = V("dns"), nx = V("util"), jae = Cr(V("os"), 1), { Resolver: H6 } = bl.promises, gl = Symbol("cacheableLookupCreateCon\
|
|
nection"), sx = Symbol("cacheableLookupInstance"), K6 = Symbol("expires"), Lae = typeof bl.ALL == "number", z6 = /* @__PURE__ */ s((e) => {
|
|
if (!(e && typeof e.createConnection == "function"))
|
|
throw new Error("Expected an Agent instance as the first argument");
|
|
}, "verifyAgent"), qae = /* @__PURE__ */ s((e) => {
|
|
for (let t of e)
|
|
t.family !== 6 && (t.address = `::ffff:${t.address}`, t.family = 6);
|
|
}, "map4to6"), G6 = /* @__PURE__ */ s(() => {
|
|
let e = !1, t = !1;
|
|
for (let r of Object.values(jae.default.networkInterfaces()))
|
|
for (let i of r)
|
|
if (!i.internal && (i.family === "IPv6" ? t = !0 : e = !0, e && t))
|
|
return { has4: e, has6: t };
|
|
return { has4: e, has6: t };
|
|
}, "getIfaceInfo"), Uae = /* @__PURE__ */ s((e) => Symbol.iterator in e, "isIterable"), _m = /* @__PURE__ */ s((e) => e.catch((t) => {
|
|
if (t.code === "ENODATA" || t.code === "ENOTFOUND" || t.code === "ENOENT")
|
|
return [];
|
|
throw t;
|
|
}), "ignoreNoResultErrors"), J6 = { ttl: !0 }, Wae = { all: !0 }, $ae = { all: !0, family: 4 }, Vae = { all: !0, family: 6 }, Hae = class {
|
|
static {
|
|
s(this, "CacheableLookup");
|
|
}
|
|
constructor({
|
|
cache: e = /* @__PURE__ */ new Map(),
|
|
maxTtl: t = 1 / 0,
|
|
fallbackDuration: r = 3600,
|
|
errorTtl: i = 0.15,
|
|
resolver: n = new H6(),
|
|
lookup: a = bl.lookup
|
|
} = {}) {
|
|
if (this.maxTtl = t, this.errorTtl = i, this._cache = e, this._resolver = n, this._dnsLookup = a && (0, nx.promisify)(a), this.stats =
|
|
{
|
|
cache: 0,
|
|
query: 0
|
|
}, this._resolver instanceof H6 ? (this._resolve4 = this._resolver.resolve4.bind(this._resolver), this._resolve6 = this._resolver.resolve6.
|
|
bind(this._resolver)) : (this._resolve4 = (0, nx.promisify)(this._resolver.resolve4.bind(this._resolver)), this._resolve6 = (0, nx.promisify)(
|
|
this._resolver.resolve6.bind(this._resolver))), this._iface = G6(), this._pending = {}, this._nextRemovalTime = !1, this._hostnamesToFallback =
|
|
/* @__PURE__ */ new Set(), this.fallbackDuration = r, r > 0) {
|
|
let o = setInterval(() => {
|
|
this._hostnamesToFallback.clear();
|
|
}, r * 1e3);
|
|
o.unref && o.unref(), this._fallbackInterval = o;
|
|
}
|
|
this.lookup = this.lookup.bind(this), this.lookupAsync = this.lookupAsync.bind(this);
|
|
}
|
|
set servers(e) {
|
|
this.clear(), this._resolver.setServers(e);
|
|
}
|
|
get servers() {
|
|
return this._resolver.getServers();
|
|
}
|
|
lookup(e, t, r) {
|
|
if (typeof t == "function" ? (r = t, t = {}) : typeof t == "number" && (t = {
|
|
family: t
|
|
}), !r)
|
|
throw new Error("Callback must be a function.");
|
|
this.lookupAsync(e, t).then((i) => {
|
|
t.all ? r(null, i) : r(null, i.address, i.family, i.expires, i.ttl, i.source);
|
|
}, r);
|
|
}
|
|
async lookupAsync(e, t = {}) {
|
|
typeof t == "number" && (t = {
|
|
family: t
|
|
});
|
|
let r = await this.query(e);
|
|
if (t.family === 6) {
|
|
let i = r.filter((n) => n.family === 6);
|
|
t.hints & bl.V4MAPPED && (Lae && t.hints & bl.ALL || i.length === 0) ? qae(r) : r = i;
|
|
} else t.family === 4 && (r = r.filter((i) => i.family === 4));
|
|
if (t.hints & bl.ADDRCONFIG) {
|
|
let { _iface: i } = this;
|
|
r = r.filter((n) => n.family === 6 ? i.has6 : i.has4);
|
|
}
|
|
if (r.length === 0) {
|
|
let i = new Error(`cacheableLookup ENOTFOUND ${e}`);
|
|
throw i.code = "ENOTFOUND", i.hostname = e, i;
|
|
}
|
|
return t.all ? r : r[0];
|
|
}
|
|
async query(e) {
|
|
let t = "cache", r = await this._cache.get(e);
|
|
if (r && this.stats.cache++, !r) {
|
|
let i = this._pending[e];
|
|
if (i)
|
|
this.stats.cache++, r = await i;
|
|
else {
|
|
t = "query";
|
|
let n = this.queryAndCache(e);
|
|
this._pending[e] = n, this.stats.query++;
|
|
try {
|
|
r = await n;
|
|
} finally {
|
|
delete this._pending[e];
|
|
}
|
|
}
|
|
}
|
|
return r = r.map((i) => ({ ...i, source: t })), r;
|
|
}
|
|
async _resolve(e) {
|
|
let [t, r] = await Promise.all([
|
|
_m(this._resolve4(e, J6)),
|
|
_m(this._resolve6(e, J6))
|
|
]), i = 0, n = 0, a = 0, o = Date.now();
|
|
for (let u of t)
|
|
u.family = 4, u.expires = o + u.ttl * 1e3, i = Math.max(i, u.ttl);
|
|
for (let u of r)
|
|
u.family = 6, u.expires = o + u.ttl * 1e3, n = Math.max(n, u.ttl);
|
|
return t.length > 0 ? r.length > 0 ? a = Math.min(i, n) : a = i : a = n, {
|
|
entries: [
|
|
...t,
|
|
...r
|
|
],
|
|
cacheTtl: a
|
|
};
|
|
}
|
|
async _lookup(e) {
|
|
try {
|
|
let [t, r] = await Promise.all([
|
|
// Passing {all: true} doesn't return all IPv4 and IPv6 entries.
|
|
// See https://github.com/szmarczak/cacheable-lookup/issues/42
|
|
_m(this._dnsLookup(e, $ae)),
|
|
_m(this._dnsLookup(e, Vae))
|
|
]);
|
|
return {
|
|
entries: [
|
|
...t,
|
|
...r
|
|
],
|
|
cacheTtl: 0
|
|
};
|
|
} catch {
|
|
return {
|
|
entries: [],
|
|
cacheTtl: 0
|
|
};
|
|
}
|
|
}
|
|
async _set(e, t, r) {
|
|
if (this.maxTtl > 0 && r > 0) {
|
|
r = Math.min(r, this.maxTtl) * 1e3, t[K6] = Date.now() + r;
|
|
try {
|
|
await this._cache.set(e, t, r);
|
|
} catch (i) {
|
|
this.lookupAsync = async () => {
|
|
let n = new Error("Cache Error. Please recreate the CacheableLookup instance.");
|
|
throw n.cause = i, n;
|
|
};
|
|
}
|
|
Uae(this._cache) && this._tick(r);
|
|
}
|
|
}
|
|
async queryAndCache(e) {
|
|
if (this._hostnamesToFallback.has(e))
|
|
return this._dnsLookup(e, Wae);
|
|
let t = await this._resolve(e);
|
|
t.entries.length === 0 && this._dnsLookup && (t = await this._lookup(e), t.entries.length !== 0 && this.fallbackDuration > 0 && this._hostnamesToFallback.
|
|
add(e));
|
|
let r = t.entries.length === 0 ? this.errorTtl : t.cacheTtl;
|
|
return await this._set(e, t.entries, r), t.entries;
|
|
}
|
|
_tick(e) {
|
|
let t = this._nextRemovalTime;
|
|
(!t || e < t) && (clearTimeout(this._removalTimeout), this._nextRemovalTime = e, this._removalTimeout = setTimeout(() => {
|
|
this._nextRemovalTime = !1;
|
|
let r = 1 / 0, i = Date.now();
|
|
for (let [n, a] of this._cache) {
|
|
let o = a[K6];
|
|
i >= o ? this._cache.delete(n) : o < r && (r = o);
|
|
}
|
|
r !== 1 / 0 && this._tick(r - i);
|
|
}, e), this._removalTimeout.unref && this._removalTimeout.unref());
|
|
}
|
|
install(e) {
|
|
if (z6(e), gl in e)
|
|
throw new Error("CacheableLookup has been already installed");
|
|
e[gl] = e.createConnection, e[sx] = this, e.createConnection = (t, r) => ("lookup" in t || (t.lookup = this.lookup), e[gl](t, r));
|
|
}
|
|
uninstall(e) {
|
|
if (z6(e), e[gl]) {
|
|
if (e[sx] !== this)
|
|
throw new Error("The agent is not owned by this CacheableLookup instance");
|
|
e.createConnection = e[gl], delete e[gl], delete e[sx];
|
|
}
|
|
}
|
|
updateInterfaceInfo() {
|
|
let { _iface: e } = this;
|
|
this._iface = G6(), (e.has4 && !this._iface.has4 || e.has6 && !this._iface.has6) && this._cache.clear();
|
|
}
|
|
clear(e) {
|
|
if (e) {
|
|
this._cache.delete(e);
|
|
return;
|
|
}
|
|
this._cache.clear();
|
|
}
|
|
}, Kae = Cr(vse(), 1);
|
|
function zae(e) {
|
|
let t = [], r = e.split(",");
|
|
for (let i of r) {
|
|
let [n, ...a] = i.split(";"), o = n.trim();
|
|
if (o[0] !== "<" || o[o.length - 1] !== ">")
|
|
throw new Error(`Invalid format of the Link header reference: ${o}`);
|
|
let u = o.slice(1, -1), l = {};
|
|
if (a.length === 0)
|
|
throw new Error(`Unexpected end of Link header parameters: ${a.join(";")}`);
|
|
for (let c of a) {
|
|
let f = c.trim(), m = f.indexOf("=");
|
|
if (m === -1)
|
|
throw new Error(`Failed to parse Link header: ${e}`);
|
|
let h = f.slice(0, m).trim(), d = f.slice(m + 1).trim();
|
|
l[h] = d;
|
|
}
|
|
t.push({
|
|
reference: u,
|
|
parameters: l
|
|
});
|
|
}
|
|
return t;
|
|
}
|
|
s(zae, "parseLinkHeader");
|
|
var [X6, Gae] = Bae.default.versions.node.split(".").map(Number);
|
|
function Jae(e) {
|
|
for (let t in e) {
|
|
let r = e[t];
|
|
fe.any([$.string, $.number, $.boolean, $.null_, $.undefined], r);
|
|
}
|
|
}
|
|
s(Jae, "validateSearchParameters");
|
|
var Xae = /* @__PURE__ */ new Map(), Pm, Yae = /* @__PURE__ */ s(() => Pm || (Pm = new Hae(), Pm), "getGlobalDnsCache"), Zae = {
|
|
request: void 0,
|
|
agent: {
|
|
http: void 0,
|
|
https: void 0,
|
|
http2: void 0
|
|
},
|
|
h2session: void 0,
|
|
decompress: !0,
|
|
timeout: {
|
|
connect: void 0,
|
|
lookup: void 0,
|
|
read: void 0,
|
|
request: void 0,
|
|
response: void 0,
|
|
secureConnect: void 0,
|
|
send: void 0,
|
|
socket: void 0
|
|
},
|
|
prefixUrl: "",
|
|
body: void 0,
|
|
form: void 0,
|
|
json: void 0,
|
|
cookieJar: void 0,
|
|
ignoreInvalidCookies: !1,
|
|
searchParams: void 0,
|
|
dnsLookup: void 0,
|
|
dnsCache: void 0,
|
|
context: {},
|
|
hooks: {
|
|
init: [],
|
|
beforeRequest: [],
|
|
beforeError: [],
|
|
beforeRedirect: [],
|
|
beforeRetry: [],
|
|
afterResponse: []
|
|
},
|
|
followRedirect: !0,
|
|
maxRedirects: 10,
|
|
cache: void 0,
|
|
throwHttpErrors: !0,
|
|
username: "",
|
|
password: "",
|
|
http2: !1,
|
|
allowGetBody: !1,
|
|
headers: {
|
|
"user-agent": "got (https://github.com/sindresorhus/got)"
|
|
},
|
|
methodRewriting: !1,
|
|
dnsLookupIpVersion: void 0,
|
|
parseJson: JSON.parse,
|
|
stringifyJson: JSON.stringify,
|
|
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: /* @__PURE__ */ s(({ computedValue: e }) => e, "calculateDelay"),
|
|
backoffLimit: Number.POSITIVE_INFINITY,
|
|
noise: 100
|
|
},
|
|
localAddress: void 0,
|
|
method: "GET",
|
|
createConnection: void 0,
|
|
cacheOptions: {
|
|
shared: void 0,
|
|
cacheHeuristic: void 0,
|
|
immutableMinTimeToLive: void 0,
|
|
ignoreCargoCult: void 0
|
|
},
|
|
https: {
|
|
alpnProtocols: void 0,
|
|
rejectUnauthorized: void 0,
|
|
checkServerIdentity: void 0,
|
|
certificateAuthority: void 0,
|
|
key: void 0,
|
|
certificate: void 0,
|
|
passphrase: void 0,
|
|
pfx: void 0,
|
|
ciphers: void 0,
|
|
honorCipherOrder: void 0,
|
|
minVersion: void 0,
|
|
maxVersion: void 0,
|
|
signatureAlgorithms: void 0,
|
|
tlsSessionLifetime: void 0,
|
|
dhparam: void 0,
|
|
ecdhCurve: void 0,
|
|
certificateRevocationLists: void 0
|
|
},
|
|
encoding: void 0,
|
|
resolveBodyOnly: !1,
|
|
isStream: !1,
|
|
responseType: "text",
|
|
url: void 0,
|
|
pagination: {
|
|
transform(e) {
|
|
return e.request.options.responseType === "json" ? e.body : JSON.parse(e.body);
|
|
},
|
|
paginate({ response: e }) {
|
|
let t = e.headers.link;
|
|
if (typeof t != "string" || t.trim() === "")
|
|
return !1;
|
|
let i = zae(t).find((n) => n.parameters.rel === "next" || n.parameters.rel === '"next"');
|
|
return i ? {
|
|
url: new Oo.URL(i.reference, e.url)
|
|
} : !1;
|
|
},
|
|
filter: /* @__PURE__ */ s(() => !0, "filter"),
|
|
shouldContinue: /* @__PURE__ */ s(() => !0, "shouldContinue"),
|
|
countLimit: Number.POSITIVE_INFINITY,
|
|
backoff: 0,
|
|
requestLimit: 1e4,
|
|
stackAllItems: !1
|
|
},
|
|
setHost: !0,
|
|
maxHeaderSize: void 0,
|
|
signal: void 0,
|
|
enableUnixSockets: !0
|
|
}, Qae = /* @__PURE__ */ s((e) => {
|
|
let { hooks: t, retry: r } = e, i = {
|
|
...e,
|
|
context: { ...e.context },
|
|
cacheOptions: { ...e.cacheOptions },
|
|
https: { ...e.https },
|
|
agent: { ...e.agent },
|
|
headers: { ...e.headers },
|
|
retry: {
|
|
...r,
|
|
errorCodes: [...r.errorCodes],
|
|
methods: [...r.methods],
|
|
statusCodes: [...r.statusCodes]
|
|
},
|
|
timeout: { ...e.timeout },
|
|
hooks: {
|
|
init: [...t.init],
|
|
beforeRequest: [...t.beforeRequest],
|
|
beforeError: [...t.beforeError],
|
|
beforeRedirect: [...t.beforeRedirect],
|
|
beforeRetry: [...t.beforeRetry],
|
|
afterResponse: [...t.afterResponse]
|
|
},
|
|
searchParams: e.searchParams ? new Oo.URLSearchParams(e.searchParams) : void 0,
|
|
pagination: { ...e.pagination }
|
|
};
|
|
return i.url !== void 0 && (i.prefixUrl = ""), i;
|
|
}, "cloneInternals"), eoe = /* @__PURE__ */ s((e) => {
|
|
let { hooks: t, retry: r } = e, i = { ...e };
|
|
return $.object(e.context) && (i.context = { ...e.context }), $.object(e.cacheOptions) && (i.cacheOptions = { ...e.cacheOptions }), $.object(
|
|
e.https) && (i.https = { ...e.https }), $.object(e.cacheOptions) && (i.cacheOptions = { ...i.cacheOptions }), $.object(e.agent) && (i.agent =
|
|
{ ...e.agent }), $.object(e.headers) && (i.headers = { ...e.headers }), $.object(r) && (i.retry = { ...r }, $.array(r.errorCodes) && (i.
|
|
retry.errorCodes = [...r.errorCodes]), $.array(r.methods) && (i.retry.methods = [...r.methods]), $.array(r.statusCodes) && (i.retry.statusCodes =
|
|
[...r.statusCodes])), $.object(e.timeout) && (i.timeout = { ...e.timeout }), $.object(t) && (i.hooks = {
|
|
...t
|
|
}, $.array(t.init) && (i.hooks.init = [...t.init]), $.array(t.beforeRequest) && (i.hooks.beforeRequest = [...t.beforeRequest]), $.array(
|
|
t.beforeError) && (i.hooks.beforeError = [...t.beforeError]), $.array(t.beforeRedirect) && (i.hooks.beforeRedirect = [...t.beforeRedirect]),
|
|
$.array(t.beforeRetry) && (i.hooks.beforeRetry = [...t.beforeRetry]), $.array(t.afterResponse) && (i.hooks.afterResponse = [...t.afterResponse])),
|
|
$.object(e.pagination) && (i.pagination = { ...e.pagination }), i;
|
|
}, "cloneRaw"), toe = /* @__PURE__ */ s((e) => {
|
|
let t = [e.timeout.socket, e.timeout.connect, e.timeout.lookup, e.timeout.request, e.timeout.secureConnect].filter((r) => typeof r == "n\
|
|
umber");
|
|
if (t.length > 0)
|
|
return Math.min(...t);
|
|
}, "getHttp2TimeoutOption"), Y6 = /* @__PURE__ */ s((e, t, r) => {
|
|
var i;
|
|
let n = (i = e.hooks) == null ? void 0 : i.init;
|
|
if (n)
|
|
for (let a of n)
|
|
a(t, r);
|
|
}, "init"), Ns = class {
|
|
static {
|
|
s(this, "Options");
|
|
}
|
|
constructor(e, t, r) {
|
|
if (Object.defineProperty(this, "_unixOptions", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_internals", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_merging", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_init", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), fe.any([$.string, $.urlInstance, $.object, $.undefined], e), fe.any([$.object, $.undefined], t), fe.any([$.object, $.undefined], r),
|
|
e instanceof Ns || t instanceof Ns)
|
|
throw new TypeError("The defaults must be passed as the third argument");
|
|
this._internals = Qae(r?._internals ?? r ?? Zae), this._init = [...r?._init ?? []], this._merging = !1, this._unixOptions = void 0;
|
|
try {
|
|
if ($.plainObject(e))
|
|
try {
|
|
this.merge(e), this.merge(t);
|
|
} finally {
|
|
this.url = e.url;
|
|
}
|
|
else
|
|
try {
|
|
this.merge(t);
|
|
} finally {
|
|
if (t?.url !== void 0)
|
|
if (e === void 0)
|
|
this.url = t.url;
|
|
else
|
|
throw new TypeError("The `url` option is mutually exclusive with the `input` argument");
|
|
else e !== void 0 && (this.url = e);
|
|
}
|
|
} catch (i) {
|
|
throw i.options = this, i;
|
|
}
|
|
}
|
|
merge(e) {
|
|
if (e) {
|
|
if (e instanceof Ns) {
|
|
for (let t of e._init)
|
|
this.merge(t);
|
|
return;
|
|
}
|
|
e = eoe(e), Y6(this, e, this), Y6(e, e, this), this._merging = !0, "isStream" in e && (this.isStream = e.isStream);
|
|
try {
|
|
let t = !1;
|
|
for (let r in e)
|
|
if (!(r === "mutableDefaults" || r === "handlers") && r !== "url") {
|
|
if (!(r in this))
|
|
throw new Error(`Unexpected option: ${r}`);
|
|
this[r] = e[r], t = !0;
|
|
}
|
|
t && this._init.push(e);
|
|
} finally {
|
|
this._merging = !1;
|
|
}
|
|
}
|
|
}
|
|
/**
|
|
Custom request function.
|
|
The main purpose of this is to [support HTTP2 using a wrapper](https://github.com/szmarczak/http2-wrapper).
|
|
|
|
@default http.request | https.request
|
|
*/
|
|
get request() {
|
|
return this._internals.request;
|
|
}
|
|
set request(e) {
|
|
fe.any([$.function_, $.undefined], e), this._internals.request = e;
|
|
}
|
|
/**
|
|
An object representing `http`, `https` and `http2` keys for [`http.Agent`](https://nodejs.org/api/http.html#http_class_http_agent), [`https.Agent`](https://nodejs.org/api/https.html#https_class_https_agent) and [`http2wrapper.Agent`](https://github.com/szmarczak/http2-wrapper#new-http2agentoptions) instance.
|
|
This is necessary because a request to one protocol might redirect to another.
|
|
In such a scenario, Got will switch over to the right protocol agent for you.
|
|
|
|
If a key is not present, it will default to a global agent.
|
|
|
|
@example
|
|
```
|
|
import got from 'got';
|
|
import HttpAgent from 'agentkeepalive';
|
|
|
|
const {HttpsAgent} = HttpAgent;
|
|
|
|
await got('https://sindresorhus.com', {
|
|
agent: {
|
|
http: new HttpAgent(),
|
|
https: new HttpsAgent()
|
|
}
|
|
});
|
|
```
|
|
*/
|
|
get agent() {
|
|
return this._internals.agent;
|
|
}
|
|
set agent(e) {
|
|
fe.plainObject(e);
|
|
for (let t in e) {
|
|
if (!(t in this._internals.agent))
|
|
throw new TypeError(`Unexpected agent option: ${t}`);
|
|
fe.any([$.object, $.undefined], e[t]);
|
|
}
|
|
this._merging ? Object.assign(this._internals.agent, e) : this._internals.agent = { ...e };
|
|
}
|
|
get h2session() {
|
|
return this._internals.h2session;
|
|
}
|
|
set h2session(e) {
|
|
this._internals.h2session = e;
|
|
}
|
|
/**
|
|
Decompress the response automatically.
|
|
|
|
This will set the `accept-encoding` header to `gzip, deflate, br` unless you set it yourself.
|
|
|
|
If this is disabled, a compressed response is returned as a `Buffer`.
|
|
This may be useful if you want to handle decompression yourself or stream the raw compressed data.
|
|
|
|
@default true
|
|
*/
|
|
get decompress() {
|
|
return this._internals.decompress;
|
|
}
|
|
set decompress(e) {
|
|
fe.boolean(e), this._internals.decompress = e;
|
|
}
|
|
/**
|
|
Milliseconds to wait for the server to end the response before aborting the request with `got.TimeoutError` error (a.k.a. `request` property).
|
|
By default, there's no timeout.
|
|
|
|
This also accepts an `object` with the following fields to constrain the duration of each phase of the request lifecycle:
|
|
|
|
- `lookup` starts when a socket is assigned and ends when the hostname has been resolved.
|
|
Does not apply when using a Unix domain socket.
|
|
- `connect` starts when `lookup` completes (or when the socket is assigned if lookup does not apply to the request) and ends when the socket is connected.
|
|
- `secureConnect` starts when `connect` completes and ends when the handshaking process completes (HTTPS only).
|
|
- `socket` starts when the socket is connected. See [request.setTimeout](https://nodejs.org/api/http.html#http_request_settimeout_timeout_callback).
|
|
- `response` starts when the request has been written to the socket and ends when the response headers are received.
|
|
- `send` starts when the socket is connected and ends with the request has been written to the socket.
|
|
- `request` starts when the request is initiated and ends when the response's end event fires.
|
|
*/
|
|
get timeout() {
|
|
return this._internals.timeout;
|
|
}
|
|
set timeout(e) {
|
|
fe.plainObject(e);
|
|
for (let t in e) {
|
|
if (!(t in this._internals.timeout))
|
|
throw new Error(`Unexpected timeout option: ${t}`);
|
|
fe.any([$.number, $.undefined], e[t]);
|
|
}
|
|
this._merging ? Object.assign(this._internals.timeout, e) : this._internals.timeout = { ...e };
|
|
}
|
|
/**
|
|
When specified, `prefixUrl` will be prepended to `url`.
|
|
The prefix can be any valid URL, either relative or absolute.
|
|
A trailing slash `/` is optional - one will be added automatically.
|
|
|
|
__Note__: `prefixUrl` will be ignored if the `url` argument is a URL instance.
|
|
|
|
__Note__: Leading slashes in `input` are disallowed when using this option to enforce consistency and avoid confusion.
|
|
For example, when the prefix URL is `https://example.com/foo` and the input is `/bar`, there's ambiguity whether the resulting URL would become `https://example.com/foo/bar` or `https://example.com/bar`.
|
|
The latter is used by browsers.
|
|
|
|
__Tip__: Useful when used with `got.extend()` to create niche-specific Got instances.
|
|
|
|
__Tip__: You can change `prefixUrl` using hooks as long as the URL still includes the `prefixUrl`.
|
|
If the URL doesn't include it anymore, it will throw.
|
|
|
|
@example
|
|
```
|
|
import got from 'got';
|
|
|
|
await got('unicorn', {prefixUrl: 'https://cats.com'});
|
|
//=> 'https://cats.com/unicorn'
|
|
|
|
const instance = got.extend({
|
|
prefixUrl: 'https://google.com'
|
|
});
|
|
|
|
await instance('unicorn', {
|
|
hooks: {
|
|
beforeRequest: [
|
|
options => {
|
|
options.prefixUrl = 'https://cats.com';
|
|
}
|
|
]
|
|
}
|
|
});
|
|
//=> 'https://cats.com/unicorn'
|
|
```
|
|
*/
|
|
get prefixUrl() {
|
|
return this._internals.prefixUrl;
|
|
}
|
|
set prefixUrl(e) {
|
|
if (fe.any([$.string, $.urlInstance], e), e === "") {
|
|
this._internals.prefixUrl = "";
|
|
return;
|
|
}
|
|
if (e = e.toString(), e.endsWith("/") || (e += "/"), this._internals.prefixUrl && this._internals.url) {
|
|
let { href: t } = this._internals.url;
|
|
this._internals.url.href = e + t.slice(this._internals.prefixUrl.length);
|
|
}
|
|
this._internals.prefixUrl = e;
|
|
}
|
|
/**
|
|
__Note #1__: The `body` option cannot be used with the `json` or `form` option.
|
|
|
|
__Note #2__: If you provide this option, `got.stream()` will be read-only.
|
|
|
|
__Note #3__: If you provide a payload with the `GET` or `HEAD` method, it will throw a `TypeError` unless the method is `GET` and the `allowGetBody` option is set to `true`.
|
|
|
|
__Note #4__: This option is not enumerable and will not be merged with the instance defaults.
|
|
|
|
The `content-length` header will be automatically set if `body` is a `string` / `Buffer` / [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) / [`form-data` instance](https://github.com/form-data/form-data), and `content-length` and `transfer-encoding` are not manually set in `options.headers`.
|
|
|
|
Since Got 12, the `content-length` is not automatically set when `body` is a `fs.createReadStream`.
|
|
*/
|
|
get body() {
|
|
return this._internals.body;
|
|
}
|
|
set body(e) {
|
|
fe.any([$.string, $.buffer, $.nodeStream, $.generator, $.asyncGenerator, cx, $.undefined], e), $.nodeStream(e) && fe.truthy(e.readable),
|
|
e !== void 0 && (fe.undefined(this._internals.form), fe.undefined(this._internals.json)), this._internals.body = e;
|
|
}
|
|
/**
|
|
The form body is converted to a query string using [`(new URLSearchParams(object)).toString()`](https://nodejs.org/api/url.html#url_constructor_new_urlsearchparams_obj).
|
|
|
|
If the `Content-Type` header is not present, it will be set to `application/x-www-form-urlencoded`.
|
|
|
|
__Note #1__: If you provide this option, `got.stream()` will be read-only.
|
|
|
|
__Note #2__: This option is not enumerable and will not be merged with the instance defaults.
|
|
*/
|
|
get form() {
|
|
return this._internals.form;
|
|
}
|
|
set form(e) {
|
|
fe.any([$.plainObject, $.undefined], e), e !== void 0 && (fe.undefined(this._internals.body), fe.undefined(this._internals.json)), this.
|
|
_internals.form = e;
|
|
}
|
|
/**
|
|
JSON body. If the `Content-Type` header is not set, it will be set to `application/json`.
|
|
|
|
__Note #1__: If you provide this option, `got.stream()` will be read-only.
|
|
|
|
__Note #2__: This option is not enumerable and will not be merged with the instance defaults.
|
|
*/
|
|
get json() {
|
|
return this._internals.json;
|
|
}
|
|
set json(e) {
|
|
e !== void 0 && (fe.undefined(this._internals.body), fe.undefined(this._internals.form)), this._internals.json = e;
|
|
}
|
|
/**
|
|
The URL to request, as a string, a [`https.request` options object](https://nodejs.org/api/https.html#https_https_request_options_callback), or a [WHATWG `URL`](https://nodejs.org/api/url.html#url_class_url).
|
|
|
|
Properties from `options` will override properties in the parsed `url`.
|
|
|
|
If no protocol is specified, it will throw a `TypeError`.
|
|
|
|
__Note__: The query string is **not** parsed as search params.
|
|
|
|
@example
|
|
```
|
|
await got('https://example.com/?query=a b'); //=> https://example.com/?query=a%20b
|
|
await got('https://example.com/', {searchParams: {query: 'a b'}}); //=> https://example.com/?query=a+b
|
|
|
|
// The query string is overridden by `searchParams`
|
|
await got('https://example.com/?query=a b', {searchParams: {query: 'a b'}}); //=> https://example.com/?query=a+b
|
|
```
|
|
*/
|
|
get url() {
|
|
return this._internals.url;
|
|
}
|
|
set url(e) {
|
|
if (fe.any([$.string, $.urlInstance, $.undefined], e), e === void 0) {
|
|
this._internals.url = void 0;
|
|
return;
|
|
}
|
|
if ($.string(e) && e.startsWith("/"))
|
|
throw new Error("`url` must not start with a slash");
|
|
let t = `${this.prefixUrl}${e.toString()}`, r = new Oo.URL(t);
|
|
if (this._internals.url = r, decodeURI(t), r.protocol === "unix:" && (r.href = `http://unix${r.pathname}${r.search}`), r.protocol !== "\
|
|
http:" && r.protocol !== "https:") {
|
|
let i = new Error(`Unsupported protocol: ${r.protocol}`);
|
|
throw i.code = "ERR_UNSUPPORTED_PROTOCOL", i;
|
|
}
|
|
if (this._internals.username && (r.username = this._internals.username, this._internals.username = ""), this._internals.password && (r.
|
|
password = this._internals.password, this._internals.password = ""), this._internals.searchParams && (r.search = this._internals.searchParams.
|
|
toString(), this._internals.searchParams = void 0), r.hostname === "unix") {
|
|
if (!this._internals.enableUnixSockets)
|
|
throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");
|
|
let i = /(?<socketPath>.+?):(?<path>.+)/.exec(`${r.pathname}${r.search}`);
|
|
if (i?.groups) {
|
|
let { socketPath: n, path: a } = i.groups;
|
|
this._unixOptions = {
|
|
socketPath: n,
|
|
path: a,
|
|
host: ""
|
|
};
|
|
} else
|
|
this._unixOptions = void 0;
|
|
return;
|
|
}
|
|
this._unixOptions = void 0;
|
|
}
|
|
/**
|
|
Cookie support. You don't have to care about parsing or how to store them.
|
|
|
|
__Note__: If you provide this option, `options.headers.cookie` will be overridden.
|
|
*/
|
|
get cookieJar() {
|
|
return this._internals.cookieJar;
|
|
}
|
|
set cookieJar(e) {
|
|
if (fe.any([$.object, $.undefined], e), e === void 0) {
|
|
this._internals.cookieJar = void 0;
|
|
return;
|
|
}
|
|
let { setCookie: t, getCookieString: r } = e;
|
|
fe.function_(t), fe.function_(r), t.length === 4 && r.length === 0 ? (t = (0, ix.promisify)(t.bind(e)), r = (0, ix.promisify)(r.bind(e)),
|
|
this._internals.cookieJar = {
|
|
setCookie: t,
|
|
getCookieString: r
|
|
}) : this._internals.cookieJar = e;
|
|
}
|
|
/**
|
|
You can abort the `request` using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).
|
|
|
|
*Requires Node.js 16 or later.*
|
|
|
|
@example
|
|
```
|
|
import got from 'got';
|
|
|
|
const abortController = new AbortController();
|
|
|
|
const request = got('https://httpbin.org/anything', {
|
|
signal: abortController.signal
|
|
});
|
|
|
|
setTimeout(() => {
|
|
abortController.abort();
|
|
}, 100);
|
|
```
|
|
*/
|
|
// TODO: Replace `any` with `AbortSignal` when targeting Node 16.
|
|
get signal() {
|
|
return this._internals.signal;
|
|
}
|
|
// TODO: Replace `any` with `AbortSignal` when targeting Node 16.
|
|
set signal(e) {
|
|
fe.object(e), this._internals.signal = e;
|
|
}
|
|
/**
|
|
Ignore invalid cookies instead of throwing an error.
|
|
Only useful when the `cookieJar` option has been set. Not recommended.
|
|
|
|
@default false
|
|
*/
|
|
get ignoreInvalidCookies() {
|
|
return this._internals.ignoreInvalidCookies;
|
|
}
|
|
set ignoreInvalidCookies(e) {
|
|
fe.boolean(e), this._internals.ignoreInvalidCookies = e;
|
|
}
|
|
/**
|
|
Query string that will be added to the request URL.
|
|
This will override the query string in `url`.
|
|
|
|
If you need to pass in an array, you can do it using a `URLSearchParams` instance.
|
|
|
|
@example
|
|
```
|
|
import got from 'got';
|
|
|
|
const searchParams = new URLSearchParams([['key', 'a'], ['key', 'b']]);
|
|
|
|
await got('https://example.com', {searchParams});
|
|
|
|
console.log(searchParams.toString());
|
|
//=> 'key=a&key=b'
|
|
```
|
|
*/
|
|
get searchParams() {
|
|
return this._internals.url ? this._internals.url.searchParams : (this._internals.searchParams === void 0 && (this._internals.searchParams =
|
|
new Oo.URLSearchParams()), this._internals.searchParams);
|
|
}
|
|
set searchParams(e) {
|
|
fe.any([$.string, $.object, $.undefined], e);
|
|
let t = this._internals.url;
|
|
if (e === void 0) {
|
|
this._internals.searchParams = void 0, t && (t.search = "");
|
|
return;
|
|
}
|
|
let r = this.searchParams, i;
|
|
if ($.string(e))
|
|
i = new Oo.URLSearchParams(e);
|
|
else if (e instanceof Oo.URLSearchParams)
|
|
i = e;
|
|
else {
|
|
Jae(e), i = new Oo.URLSearchParams();
|
|
for (let n in e) {
|
|
let a = e[n];
|
|
a === null ? i.append(n, "") : a === void 0 ? r.delete(n) : i.append(n, a);
|
|
}
|
|
}
|
|
if (this._merging) {
|
|
for (let n of i.keys())
|
|
r.delete(n);
|
|
for (let [n, a] of i)
|
|
r.append(n, a);
|
|
} else t ? t.search = r.toString() : this._internals.searchParams = r;
|
|
}
|
|
get searchParameters() {
|
|
throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.");
|
|
}
|
|
set searchParameters(e) {
|
|
throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.");
|
|
}
|
|
get dnsLookup() {
|
|
return this._internals.dnsLookup;
|
|
}
|
|
set dnsLookup(e) {
|
|
fe.any([$.function_, $.undefined], e), this._internals.dnsLookup = e;
|
|
}
|
|
/**
|
|
An instance of [`CacheableLookup`](https://github.com/szmarczak/cacheable-lookup) used for making DNS lookups.
|
|
Useful when making lots of requests to different *public* hostnames.
|
|
|
|
`CacheableLookup` uses `dns.resolver4(..)` and `dns.resolver6(...)` under the hood and fall backs to `dns.lookup(...)` when the first two fail, which may lead to additional delay.
|
|
|
|
__Note__: This should stay disabled when making requests to internal hostnames such as `localhost`, `database.local` etc.
|
|
|
|
@default false
|
|
*/
|
|
get dnsCache() {
|
|
return this._internals.dnsCache;
|
|
}
|
|
set dnsCache(e) {
|
|
fe.any([$.object, $.boolean, $.undefined], e), e === !0 ? this._internals.dnsCache = Yae() : e === !1 ? this._internals.dnsCache = void 0 :
|
|
this._internals.dnsCache = e;
|
|
}
|
|
/**
|
|
User data. `context` is shallow merged and enumerable. If it contains non-enumerable properties they will NOT be merged.
|
|
|
|
@example
|
|
```
|
|
import got from 'got';
|
|
|
|
const instance = got.extend({
|
|
hooks: {
|
|
beforeRequest: [
|
|
options => {
|
|
if (!options.context || !options.context.token) {
|
|
throw new Error('Token required');
|
|
}
|
|
|
|
options.headers.token = options.context.token;
|
|
}
|
|
]
|
|
}
|
|
});
|
|
|
|
const context = {
|
|
token: 'secret'
|
|
};
|
|
|
|
const response = await instance('https://httpbin.org/headers', {context});
|
|
|
|
// Let's see the headers
|
|
console.log(response.body);
|
|
```
|
|
*/
|
|
get context() {
|
|
return this._internals.context;
|
|
}
|
|
set context(e) {
|
|
fe.object(e), this._merging ? Object.assign(this._internals.context, e) : this._internals.context = { ...e };
|
|
}
|
|
/**
|
|
Hooks allow modifications during the request lifecycle.
|
|
Hook functions may be async and are run serially.
|
|
*/
|
|
get hooks() {
|
|
return this._internals.hooks;
|
|
}
|
|
set hooks(e) {
|
|
fe.object(e);
|
|
for (let t in e) {
|
|
if (!(t in this._internals.hooks))
|
|
throw new Error(`Unexpected hook event: ${t}`);
|
|
let r = t, i = e[r];
|
|
if (fe.any([$.array, $.undefined], i), i)
|
|
for (let n of i)
|
|
fe.function_(n);
|
|
if (this._merging)
|
|
i && this._internals.hooks[r].push(...i);
|
|
else {
|
|
if (!i)
|
|
throw new Error(`Missing hook event: ${t}`);
|
|
this._internals.hooks[t] = [...i];
|
|
}
|
|
}
|
|
}
|
|
/**
|
|
Defines if redirect responses should be followed automatically.
|
|
|
|
Note that if a `303` is sent by the server in response to any request type (`POST`, `DELETE`, etc.), Got will automatically request the resource pointed to in the location header via `GET`.
|
|
This is in accordance with [the spec](https://tools.ietf.org/html/rfc7231#section-6.4.4). You can optionally turn on this behavior also for other redirect codes - see `methodRewriting`.
|
|
|
|
@default true
|
|
*/
|
|
get followRedirect() {
|
|
return this._internals.followRedirect;
|
|
}
|
|
set followRedirect(e) {
|
|
fe.boolean(e), this._internals.followRedirect = e;
|
|
}
|
|
get followRedirects() {
|
|
throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");
|
|
}
|
|
set followRedirects(e) {
|
|
throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");
|
|
}
|
|
/**
|
|
If exceeded, the request will be aborted and a `MaxRedirectsError` will be thrown.
|
|
|
|
@default 10
|
|
*/
|
|
get maxRedirects() {
|
|
return this._internals.maxRedirects;
|
|
}
|
|
set maxRedirects(e) {
|
|
fe.number(e), this._internals.maxRedirects = e;
|
|
}
|
|
/**
|
|
A cache adapter instance for storing cached response data.
|
|
|
|
@default false
|
|
*/
|
|
get cache() {
|
|
return this._internals.cache;
|
|
}
|
|
set cache(e) {
|
|
fe.any([$.object, $.string, $.boolean, $.undefined], e), e === !0 ? this._internals.cache = Xae : e === !1 ? this._internals.cache = void 0 :
|
|
this._internals.cache = e;
|
|
}
|
|
/**
|
|
Determines if a `got.HTTPError` is thrown for unsuccessful responses.
|
|
|
|
If this is disabled, requests that encounter an error status code will be resolved with the `response` instead of throwing.
|
|
This may be useful if you are checking for resource availability and are expecting error responses.
|
|
|
|
@default true
|
|
*/
|
|
get throwHttpErrors() {
|
|
return this._internals.throwHttpErrors;
|
|
}
|
|
set throwHttpErrors(e) {
|
|
fe.boolean(e), this._internals.throwHttpErrors = e;
|
|
}
|
|
get username() {
|
|
let e = this._internals.url, t = e ? e.username : this._internals.username;
|
|
return decodeURIComponent(t);
|
|
}
|
|
set username(e) {
|
|
fe.string(e);
|
|
let t = this._internals.url, r = encodeURIComponent(e);
|
|
t ? t.username = r : this._internals.username = r;
|
|
}
|
|
get password() {
|
|
let e = this._internals.url, t = e ? e.password : this._internals.password;
|
|
return decodeURIComponent(t);
|
|
}
|
|
set password(e) {
|
|
fe.string(e);
|
|
let t = this._internals.url, r = encodeURIComponent(e);
|
|
t ? t.password = r : this._internals.password = r;
|
|
}
|
|
/**
|
|
If set to `true`, Got will additionally accept HTTP2 requests.
|
|
|
|
It will choose either HTTP/1.1 or HTTP/2 depending on the ALPN protocol.
|
|
|
|
__Note__: This option requires Node.js 15.10.0 or newer as HTTP/2 support on older Node.js versions is very buggy.
|
|
|
|
__Note__: Overriding `options.request` will disable HTTP2 support.
|
|
|
|
@default false
|
|
|
|
@example
|
|
```
|
|
import got from 'got';
|
|
|
|
const {headers} = await got('https://nghttp2.org/httpbin/anything', {http2: true});
|
|
|
|
console.log(headers.via);
|
|
//=> '2 nghttpx'
|
|
```
|
|
*/
|
|
get http2() {
|
|
return this._internals.http2;
|
|
}
|
|
set http2(e) {
|
|
fe.boolean(e), this._internals.http2 = e;
|
|
}
|
|
/**
|
|
Set this to `true` to allow sending body for the `GET` method.
|
|
However, the [HTTP/2 specification](https://tools.ietf.org/html/rfc7540#section-8.1.3) says that `An HTTP GET request includes request header fields and no payload body`, therefore when using the HTTP/2 protocol this option will have no effect.
|
|
This option is only meant to interact with non-compliant servers when you have no other choice.
|
|
|
|
__Note__: The [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1) doesn't specify any particular behavior for the GET method having a payload, therefore __it's considered an [anti-pattern](https://en.wikipedia.org/wiki/Anti-pattern)__.
|
|
|
|
@default false
|
|
*/
|
|
get allowGetBody() {
|
|
return this._internals.allowGetBody;
|
|
}
|
|
set allowGetBody(e) {
|
|
fe.boolean(e), this._internals.allowGetBody = e;
|
|
}
|
|
/**
|
|
Request headers.
|
|
|
|
Existing headers will be overwritten. Headers set to `undefined` will be omitted.
|
|
|
|
@default {}
|
|
*/
|
|
get headers() {
|
|
return this._internals.headers;
|
|
}
|
|
set headers(e) {
|
|
fe.plainObject(e), this._merging ? Object.assign(this._internals.headers, ox(e)) : this._internals.headers = ox(e);
|
|
}
|
|
/**
|
|
Specifies if the HTTP request method should be [rewritten as `GET`](https://tools.ietf.org/html/rfc7231#section-6.4) on redirects.
|
|
|
|
As the [specification](https://tools.ietf.org/html/rfc7231#section-6.4) prefers to rewrite the HTTP method only on `303` responses, this is Got's default behavior.
|
|
Setting `methodRewriting` to `true` will also rewrite `301` and `302` responses, as allowed by the spec. This is the behavior followed by `curl` and browsers.
|
|
|
|
__Note__: Got never performs method rewriting on `307` and `308` responses, as this is [explicitly prohibited by the specification](https://www.rfc-editor.org/rfc/rfc7231#section-6.4.7).
|
|
|
|
@default false
|
|
*/
|
|
get methodRewriting() {
|
|
return this._internals.methodRewriting;
|
|
}
|
|
set methodRewriting(e) {
|
|
fe.boolean(e), this._internals.methodRewriting = e;
|
|
}
|
|
/**
|
|
Indicates which DNS record family to use.
|
|
|
|
Values:
|
|
- `undefined`: IPv4 (if present) or IPv6
|
|
- `4`: Only IPv4
|
|
- `6`: Only IPv6
|
|
|
|
@default undefined
|
|
*/
|
|
get dnsLookupIpVersion() {
|
|
return this._internals.dnsLookupIpVersion;
|
|
}
|
|
set dnsLookupIpVersion(e) {
|
|
if (e !== void 0 && e !== 4 && e !== 6)
|
|
throw new TypeError(`Invalid DNS lookup IP version: ${e}`);
|
|
this._internals.dnsLookupIpVersion = e;
|
|
}
|
|
/**
|
|
A function used to parse JSON responses.
|
|
|
|
@example
|
|
```
|
|
import got from 'got';
|
|
import Bourne from '@hapi/bourne';
|
|
|
|
const parsed = await got('https://example.com', {
|
|
parseJson: text => Bourne.parse(text)
|
|
}).json();
|
|
|
|
console.log(parsed);
|
|
```
|
|
*/
|
|
get parseJson() {
|
|
return this._internals.parseJson;
|
|
}
|
|
set parseJson(e) {
|
|
fe.function_(e), this._internals.parseJson = e;
|
|
}
|
|
/**
|
|
A function used to stringify the body of JSON requests.
|
|
|
|
@example
|
|
```
|
|
import got from 'got';
|
|
|
|
await got.post('https://example.com', {
|
|
stringifyJson: object => JSON.stringify(object, (key, value) => {
|
|
if (key.startsWith('_')) {
|
|
return;
|
|
}
|
|
|
|
return value;
|
|
}),
|
|
json: {
|
|
some: 'payload',
|
|
_ignoreMe: 1234
|
|
}
|
|
});
|
|
```
|
|
|
|
@example
|
|
```
|
|
import got from 'got';
|
|
|
|
await got.post('https://example.com', {
|
|
stringifyJson: object => JSON.stringify(object, (key, value) => {
|
|
if (typeof value === 'number') {
|
|
return value.toString();
|
|
}
|
|
|
|
return value;
|
|
}),
|
|
json: {
|
|
some: 'payload',
|
|
number: 1
|
|
}
|
|
});
|
|
```
|
|
*/
|
|
get stringifyJson() {
|
|
return this._internals.stringifyJson;
|
|
}
|
|
set stringifyJson(e) {
|
|
fe.function_(e), this._internals.stringifyJson = e;
|
|
}
|
|
/**
|
|
An object representing `limit`, `calculateDelay`, `methods`, `statusCodes`, `maxRetryAfter` and `errorCodes` fields for maximum retry count, retry handler, allowed methods, allowed status codes, maximum [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) time and allowed error codes.
|
|
|
|
Delays between retries counts with function `1000 * Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 1).
|
|
|
|
The `calculateDelay` property is a `function` that receives an object with `attemptCount`, `retryOptions`, `error` and `computedValue` properties for current retry count, the retry options, error and default computed value.
|
|
The function must return a delay in milliseconds (or a Promise resolving with it) (`0` return value cancels retry).
|
|
|
|
By default, it retries *only* on the specified methods, status codes, and on these network errors:
|
|
|
|
- `ETIMEDOUT`: One of the [timeout](#timeout) limits were reached.
|
|
- `ECONNRESET`: Connection was forcibly closed by a peer.
|
|
- `EADDRINUSE`: Could not bind to any free port.
|
|
- `ECONNREFUSED`: Connection was refused by the server.
|
|
- `EPIPE`: The remote side of the stream being written has been closed.
|
|
- `ENOTFOUND`: Couldn't resolve the hostname to an IP address.
|
|
- `ENETUNREACH`: No internet connection.
|
|
- `EAI_AGAIN`: DNS lookup timed out.
|
|
|
|
__Note__: If `maxRetryAfter` is set to `undefined`, it will use `options.timeout`.
|
|
__Note__: If [`Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) header is greater than `maxRetryAfter`, it will cancel the request.
|
|
*/
|
|
get retry() {
|
|
return this._internals.retry;
|
|
}
|
|
set retry(e) {
|
|
if (fe.plainObject(e), fe.any([$.function_, $.undefined], e.calculateDelay), fe.any([$.number, $.undefined], e.maxRetryAfter), fe.any(
|
|
[$.number, $.undefined], e.limit), fe.any([$.array, $.undefined], e.methods), fe.any([$.array, $.undefined], e.statusCodes), fe.any([$.
|
|
array, $.undefined], e.errorCodes), fe.any([$.number, $.undefined], e.noise), e.noise && Math.abs(e.noise) > 100)
|
|
throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${e.noise}`);
|
|
for (let r in e)
|
|
if (!(r in this._internals.retry))
|
|
throw new Error(`Unexpected retry option: ${r}`);
|
|
this._merging ? Object.assign(this._internals.retry, e) : this._internals.retry = { ...e };
|
|
let { retry: t } = this._internals;
|
|
t.methods = [...new Set(t.methods.map((r) => r.toUpperCase()))], t.statusCodes = [...new Set(t.statusCodes)], t.errorCodes = [...new Set(
|
|
t.errorCodes)];
|
|
}
|
|
/**
|
|
From `http.RequestOptions`.
|
|
|
|
The IP address used to send the request from.
|
|
*/
|
|
get localAddress() {
|
|
return this._internals.localAddress;
|
|
}
|
|
set localAddress(e) {
|
|
fe.any([$.string, $.undefined], e), this._internals.localAddress = e;
|
|
}
|
|
/**
|
|
The HTTP method used to make the request.
|
|
|
|
@default 'GET'
|
|
*/
|
|
get method() {
|
|
return this._internals.method;
|
|
}
|
|
set method(e) {
|
|
fe.string(e), this._internals.method = e.toUpperCase();
|
|
}
|
|
get createConnection() {
|
|
return this._internals.createConnection;
|
|
}
|
|
set createConnection(e) {
|
|
fe.any([$.function_, $.undefined], e), this._internals.createConnection = e;
|
|
}
|
|
/**
|
|
From `http-cache-semantics`
|
|
|
|
@default {}
|
|
*/
|
|
get cacheOptions() {
|
|
return this._internals.cacheOptions;
|
|
}
|
|
set cacheOptions(e) {
|
|
fe.plainObject(e), fe.any([$.boolean, $.undefined], e.shared), fe.any([$.number, $.undefined], e.cacheHeuristic), fe.any([$.number, $.
|
|
undefined], e.immutableMinTimeToLive), fe.any([$.boolean, $.undefined], e.ignoreCargoCult);
|
|
for (let t in e)
|
|
if (!(t in this._internals.cacheOptions))
|
|
throw new Error(`Cache option \`${t}\` does not exist`);
|
|
this._merging ? Object.assign(this._internals.cacheOptions, e) : this._internals.cacheOptions = { ...e };
|
|
}
|
|
/**
|
|
Options for the advanced HTTPS API.
|
|
*/
|
|
get https() {
|
|
return this._internals.https;
|
|
}
|
|
set https(e) {
|
|
fe.plainObject(e), fe.any([$.boolean, $.undefined], e.rejectUnauthorized), fe.any([$.function_, $.undefined], e.checkServerIdentity), fe.
|
|
any([$.string, $.object, $.array, $.undefined], e.certificateAuthority), fe.any([$.string, $.object, $.array, $.undefined], e.key), fe.
|
|
any([$.string, $.object, $.array, $.undefined], e.certificate), fe.any([$.string, $.undefined], e.passphrase), fe.any([$.string, $.buffer,
|
|
$.array, $.undefined], e.pfx), fe.any([$.array, $.undefined], e.alpnProtocols), fe.any([$.string, $.undefined], e.ciphers), fe.any([$.
|
|
string, $.buffer, $.undefined], e.dhparam), fe.any([$.string, $.undefined], e.signatureAlgorithms), fe.any([$.string, $.undefined], e.
|
|
minVersion), fe.any([$.string, $.undefined], e.maxVersion), fe.any([$.boolean, $.undefined], e.honorCipherOrder), fe.any([$.number, $.
|
|
undefined], e.tlsSessionLifetime), fe.any([$.string, $.undefined], e.ecdhCurve), fe.any([$.string, $.buffer, $.array, $.undefined], e.
|
|
certificateRevocationLists);
|
|
for (let t in e)
|
|
if (!(t in this._internals.https))
|
|
throw new Error(`HTTPS option \`${t}\` does not exist`);
|
|
this._merging ? Object.assign(this._internals.https, e) : this._internals.https = { ...e };
|
|
}
|
|
/**
|
|
[Encoding](https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings) to be used on `setEncoding` of the response data.
|
|
|
|
To get a [`Buffer`](https://nodejs.org/api/buffer.html), you need to set `responseType` to `buffer` instead.
|
|
Don't set this option to `null`.
|
|
|
|
__Note__: This doesn't affect streams! Instead, you need to do `got.stream(...).setEncoding(encoding)`.
|
|
|
|
@default 'utf-8'
|
|
*/
|
|
get encoding() {
|
|
return this._internals.encoding;
|
|
}
|
|
set encoding(e) {
|
|
if (e === null)
|
|
throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");
|
|
fe.any([$.string, $.undefined], e), this._internals.encoding = e;
|
|
}
|
|
/**
|
|
When set to `true` the promise will return the Response body instead of the Response object.
|
|
|
|
@default false
|
|
*/
|
|
get resolveBodyOnly() {
|
|
return this._internals.resolveBodyOnly;
|
|
}
|
|
set resolveBodyOnly(e) {
|
|
fe.boolean(e), this._internals.resolveBodyOnly = e;
|
|
}
|
|
/**
|
|
Returns a `Stream` instead of a `Promise`.
|
|
This is equivalent to calling `got.stream(url, options?)`.
|
|
|
|
@default false
|
|
*/
|
|
get isStream() {
|
|
return this._internals.isStream;
|
|
}
|
|
set isStream(e) {
|
|
fe.boolean(e), this._internals.isStream = e;
|
|
}
|
|
/**
|
|
The parsing method.
|
|
|
|
The promise also has `.text()`, `.json()` and `.buffer()` methods which return another Got promise for the parsed body.
|
|
|
|
It's like setting the options to `{responseType: 'json', resolveBodyOnly: true}` but without affecting the main Got promise.
|
|
|
|
__Note__: When using streams, this option is ignored.
|
|
|
|
@example
|
|
```
|
|
const responsePromise = got(url);
|
|
const bufferPromise = responsePromise.buffer();
|
|
const jsonPromise = responsePromise.json();
|
|
|
|
const [response, buffer, json] = Promise.all([responsePromise, bufferPromise, jsonPromise]);
|
|
// `response` is an instance of Got Response
|
|
// `buffer` is an instance of Buffer
|
|
// `json` is an object
|
|
```
|
|
|
|
@example
|
|
```
|
|
// This
|
|
const body = await got(url).json();
|
|
|
|
// is semantically the same as this
|
|
const body = await got(url, {responseType: 'json', resolveBodyOnly: true});
|
|
```
|
|
*/
|
|
get responseType() {
|
|
return this._internals.responseType;
|
|
}
|
|
set responseType(e) {
|
|
if (e === void 0) {
|
|
this._internals.responseType = "text";
|
|
return;
|
|
}
|
|
if (e !== "text" && e !== "buffer" && e !== "json")
|
|
throw new Error(`Invalid \`responseType\` option: ${e}`);
|
|
this._internals.responseType = e;
|
|
}
|
|
get pagination() {
|
|
return this._internals.pagination;
|
|
}
|
|
set pagination(e) {
|
|
fe.object(e), this._merging ? Object.assign(this._internals.pagination, e) : this._internals.pagination = e;
|
|
}
|
|
get auth() {
|
|
throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.");
|
|
}
|
|
set auth(e) {
|
|
throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.");
|
|
}
|
|
get setHost() {
|
|
return this._internals.setHost;
|
|
}
|
|
set setHost(e) {
|
|
fe.boolean(e), this._internals.setHost = e;
|
|
}
|
|
get maxHeaderSize() {
|
|
return this._internals.maxHeaderSize;
|
|
}
|
|
set maxHeaderSize(e) {
|
|
fe.any([$.number, $.undefined], e), this._internals.maxHeaderSize = e;
|
|
}
|
|
get enableUnixSockets() {
|
|
return this._internals.enableUnixSockets;
|
|
}
|
|
set enableUnixSockets(e) {
|
|
fe.boolean(e), this._internals.enableUnixSockets = e;
|
|
}
|
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
toJSON() {
|
|
return { ...this._internals };
|
|
}
|
|
[Symbol.for("nodejs.util.inspect.custom")](e, t) {
|
|
return (0, ix.inspect)(this._internals, t);
|
|
}
|
|
createNativeRequestOptions() {
|
|
var e;
|
|
let t = this._internals, r = t.url, i;
|
|
r.protocol === "https:" ? i = t.http2 ? t.agent : t.agent.https : i = t.agent.http;
|
|
let { https: n } = t, { pfx: a } = n;
|
|
return $.array(a) && $.plainObject(a[0]) && (a = a.map((o) => ({
|
|
buf: o.buffer,
|
|
passphrase: o.passphrase
|
|
}))), {
|
|
...t.cacheOptions,
|
|
...this._unixOptions,
|
|
// HTTPS options
|
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
ALPNProtocols: n.alpnProtocols,
|
|
ca: n.certificateAuthority,
|
|
cert: n.certificate,
|
|
key: n.key,
|
|
passphrase: n.passphrase,
|
|
pfx: n.pfx,
|
|
rejectUnauthorized: n.rejectUnauthorized,
|
|
checkServerIdentity: n.checkServerIdentity ?? Nae.checkServerIdentity,
|
|
ciphers: n.ciphers,
|
|
honorCipherOrder: n.honorCipherOrder,
|
|
minVersion: n.minVersion,
|
|
maxVersion: n.maxVersion,
|
|
sigalgs: n.signatureAlgorithms,
|
|
sessionTimeout: n.tlsSessionLifetime,
|
|
dhparam: n.dhparam,
|
|
ecdhCurve: n.ecdhCurve,
|
|
crl: n.certificateRevocationLists,
|
|
// HTTP options
|
|
lookup: t.dnsLookup ?? ((e = t.dnsCache) == null ? void 0 : e.lookup),
|
|
family: t.dnsLookupIpVersion,
|
|
agent: i,
|
|
setHost: t.setHost,
|
|
method: t.method,
|
|
maxHeaderSize: t.maxHeaderSize,
|
|
localAddress: t.localAddress,
|
|
headers: t.headers,
|
|
createConnection: t.createConnection,
|
|
timeout: t.http2 ? toe(t) : void 0,
|
|
// HTTP/2 options
|
|
h2session: t.h2session
|
|
};
|
|
}
|
|
getRequestFunction() {
|
|
let e = this._internals.url, { request: t } = this._internals;
|
|
return !t && e ? this.getFallbackRequestFunction() : t;
|
|
}
|
|
getFallbackRequestFunction() {
|
|
let e = this._internals.url;
|
|
if (e) {
|
|
if (e.protocol === "https:") {
|
|
if (this._internals.http2) {
|
|
if (X6 < 15 || X6 === 15 && Gae < 10) {
|
|
let t = new Error("To use the `http2` option, install Node.js 15.10.0 or above");
|
|
throw t.code = "EUNSUPPORTED", t;
|
|
}
|
|
return Kae.default.auto;
|
|
}
|
|
return Rae.default.request;
|
|
}
|
|
return Mae.default.request;
|
|
}
|
|
}
|
|
freeze() {
|
|
let e = this._internals;
|
|
Object.freeze(e), Object.freeze(e.hooks), Object.freeze(e.hooks.afterResponse), Object.freeze(e.hooks.beforeError), Object.freeze(e.hooks.
|
|
beforeRedirect), Object.freeze(e.hooks.beforeRequest), Object.freeze(e.hooks.beforeRetry), Object.freeze(e.hooks.init), Object.freeze(
|
|
e.https), Object.freeze(e.cacheOptions), Object.freeze(e.agent), Object.freeze(e.headers), Object.freeze(e.timeout), Object.freeze(e.retry),
|
|
Object.freeze(e.retry.errorCodes), Object.freeze(e.retry.methods), Object.freeze(e.retry.statusCodes);
|
|
}
|
|
}, Om = /* @__PURE__ */ s((e) => {
|
|
let { statusCode: t } = e, r = e.request.options.followRedirect ? 299 : 399;
|
|
return t >= 200 && t <= r || t === 304;
|
|
}, "isResponseOk"), Z6 = class extends Pr {
|
|
static {
|
|
s(this, "ParseError");
|
|
}
|
|
constructor(e, t) {
|
|
let { options: r } = t.request;
|
|
super(`${e.message} in "${r.url.toString()}"`, e, t.request), this.name = "ParseError", this.code = "ERR_BODY_PARSE_FAILURE";
|
|
}
|
|
}, Q6 = /* @__PURE__ */ s((e, t, r, i) => {
|
|
let { rawBody: n } = e;
|
|
try {
|
|
if (t === "text")
|
|
return n.toString(i);
|
|
if (t === "json")
|
|
return n.length === 0 ? "" : r(n.toString(i));
|
|
if (t === "buffer")
|
|
return n;
|
|
} catch (a) {
|
|
throw new Z6(a, e);
|
|
}
|
|
throw new Z6({
|
|
message: `Unknown body type '${t}'`,
|
|
name: "Error"
|
|
}, e);
|
|
}, "parseBody");
|
|
function roe(e) {
|
|
return e.writable && !e.writableEnded;
|
|
}
|
|
s(roe, "isClientRequest");
|
|
var ioe = roe;
|
|
function e4(e) {
|
|
return e.protocol === "unix:" || e.hostname === "unix";
|
|
}
|
|
s(e4, "isUnixSocketURL");
|
|
var noe = $.string(v4.default.versions.brotli), soe = /* @__PURE__ */ new Set(["GET", "HEAD"]), ax = new Iae(), aoe = /* @__PURE__ */ new Set(
|
|
[300, 301, 302, 303, 304, 307, 308]), ooe = [
|
|
"socket",
|
|
"connect",
|
|
"continue",
|
|
"information",
|
|
"upgrade"
|
|
], Fm = /* @__PURE__ */ s(() => {
|
|
}, "noop2"), fx = class extends $se.Duplex {
|
|
static {
|
|
s(this, "Request");
|
|
}
|
|
constructor(e, t, r) {
|
|
super({
|
|
// Don't destroy immediately, as the error may be emitted on unsuccessful retry
|
|
autoDestroy: !1,
|
|
// It needs to be zero because we're just proxying the data to another stream
|
|
highWaterMark: 0
|
|
}), Object.defineProperty(this, "constructor", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_noPipe", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "options", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "response", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "requestUrl", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "redirectUrls", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "retryCount", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_stopRetry", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_downloadedSize", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_uploadedSize", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_stopReading", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_pipedServerResponses", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_request", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_responseSize", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_bodySize", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_unproxyEvents", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_isFromCache", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_cannotHaveBody", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_triggerRead", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_cancelTimeouts", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_removeListeners", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_nativeResponse", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_flushed", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_aborted", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), Object.defineProperty(this, "_requestInitialized", {
|
|
enumerable: !0,
|
|
configurable: !0,
|
|
writable: !0,
|
|
value: void 0
|
|
}), this._downloadedSize = 0, this._uploadedSize = 0, this._stopReading = !1, this._pipedServerResponses = /* @__PURE__ */ new Set(), this.
|
|
_cannotHaveBody = !1, this._unproxyEvents = Fm, this._triggerRead = !1, this._cancelTimeouts = Fm, this._removeListeners = Fm, this._jobs =
|
|
[], this._flushed = !1, this._requestInitialized = !1, this._aborted = !1, this.redirectUrls = [], this.retryCount = 0, this._stopRetry =
|
|
Fm, this.on("pipe", (n) => {
|
|
n.headers && Object.assign(this.options.headers, n.headers);
|
|
}), this.on("newListener", (n) => {
|
|
if (n === "retry" && this.listenerCount("retry") > 0)
|
|
throw new Error("A retry listener has been attached already.");
|
|
});
|
|
try {
|
|
if (this.options = new Ns(e, t, r), !this.options.url) {
|
|
if (this.options.prefixUrl === "")
|
|
throw new TypeError("Missing `url` property");
|
|
this.options.url = "";
|
|
}
|
|
this.requestUrl = this.options.url;
|
|
} catch (n) {
|
|
let { options: a } = n;
|
|
a && (this.options = a), this.flush = async () => {
|
|
this.flush = async () => {
|
|
}, this.destroy(n);
|
|
};
|
|
return;
|
|
}
|
|
let { body: i } = this.options;
|
|
if ($.nodeStream(i) && i.once("error", (n) => {
|
|
this._flushed ? this._beforeError(new k6(n, this)) : this.flush = async () => {
|
|
this.flush = async () => {
|
|
}, this._beforeError(new k6(n, this));
|
|
};
|
|
}), this.options.signal) {
|
|
let n = /* @__PURE__ */ s(() => {
|
|
this.destroy(new Wse(this));
|
|
}, "abort");
|
|
this.options.signal.aborted ? n() : (this.options.signal.addEventListener("abort", n), this._removeListeners = () => {
|
|
this.options.signal.removeEventListener("abort", n);
|
|
});
|
|
}
|
|
}
|
|
async flush() {
|
|
var e;
|
|
if (!this._flushed) {
|
|
this._flushed = !0;
|
|
try {
|
|
if (await this._finalizeBody(), this.destroyed)
|
|
return;
|
|
if (await this._makeRequest(), this.destroyed) {
|
|
(e = this._request) == null || e.destroy();
|
|
return;
|
|
}
|
|
for (let t of this._jobs)
|
|
t();
|
|
this._jobs.length = 0, this._requestInitialized = !0;
|
|
} catch (t) {
|
|
this._beforeError(t);
|
|
}
|
|
}
|
|
}
|
|
_beforeError(e) {
|
|
if (this._stopReading)
|
|
return;
|
|
let { response: t, options: r } = this, i = this.retryCount + (e.name === "RetryError" ? 0 : 1);
|
|
this._stopReading = !0, e instanceof Pr || (e = new Pr(e.message, e, this));
|
|
let n = e;
|
|
(async () => {
|
|
var a, o;
|
|
if (t?.readable && !t.rawBody && !((o = (a = this._request) == null ? void 0 : a.socket) != null && o.destroyed) && (t.setEncoding(this.
|
|
readableEncoding), await this._setRawBody(t) && (t.body = t.rawBody.toString())), this.listenerCount("retry") !== 0) {
|
|
let u;
|
|
try {
|
|
let l;
|
|
t && "retry-after" in t.headers && (l = Number(t.headers["retry-after"]), Number.isNaN(l) ? (l = Date.parse(t.headers["retry-aft\
|
|
er"]) - Date.now(), l <= 0 && (l = 1)) : l *= 1e3);
|
|
let c = r.retry;
|
|
u = await c.calculateDelay({
|
|
attemptCount: i,
|
|
retryOptions: c,
|
|
error: n,
|
|
retryAfter: l,
|
|
computedValue: kae({
|
|
attemptCount: i,
|
|
retryOptions: c,
|
|
error: n,
|
|
retryAfter: l,
|
|
computedValue: c.maxRetryAfter ?? r.timeout.request ?? Number.POSITIVE_INFINITY
|
|
})
|
|
});
|
|
} catch (l) {
|
|
this._error(new Pr(l.message, l, this));
|
|
return;
|
|
}
|
|
if (u) {
|
|
if (await new Promise((l) => {
|
|
let c = setTimeout(l, u);
|
|
this._stopRetry = () => {
|
|
clearTimeout(c), l();
|
|
};
|
|
}), this.destroyed)
|
|
return;
|
|
try {
|
|
for (let l of this.options.hooks.beforeRetry)
|
|
await l(n, this.retryCount + 1);
|
|
} catch (l) {
|
|
this._error(new Pr(l.message, e, this));
|
|
return;
|
|
}
|
|
if (this.destroyed)
|
|
return;
|
|
this.destroy(), this.emit("retry", this.retryCount + 1, e, (l) => {
|
|
let c = new fx(r.url, l, r);
|
|
return c.retryCount = this.retryCount + 1, v4.default.nextTick(() => {
|
|
c.flush();
|
|
}), c;
|
|
});
|
|
return;
|
|
}
|
|
}
|
|
this._error(n);
|
|
})();
|
|
}
|
|
_read() {
|
|
this._triggerRead = !0;
|
|
let { response: e } = this;
|
|
if (e && !this._stopReading) {
|
|
e.readableLength && (this._triggerRead = !1);
|
|
let t;
|
|
for (; (t = e.read()) !== null; ) {
|
|
this._downloadedSize += t.length;
|
|
let r = this.downloadProgress;
|
|
r.percent < 1 && this.emit("downloadProgress", r), this.push(t);
|
|
}
|
|
}
|
|
}
|
|
_write(e, t, r) {
|
|
let i = /* @__PURE__ */ s(() => {
|
|
this._writeRequest(e, t, r);
|
|
}, "write");
|
|
this._requestInitialized ? i() : this._jobs.push(i);
|
|
}
|
|
_final(e) {
|
|
let t = /* @__PURE__ */ s(() => {
|
|
if (!this._request || this._request.destroyed) {
|
|
e();
|
|
return;
|
|
}
|
|
this._request.end((r) => {
|
|
var i;
|
|
(i = this._request._writableState) != null && i.errored || (r || (this._bodySize = this._uploadedSize, this.emit("uploadProgress",
|
|
this.uploadProgress), this._request.emit("upload-complete")), e(r));
|
|
});
|
|
}, "endRequest");
|
|
this._requestInitialized ? t() : this._jobs.push(t);
|
|
}
|
|
_destroy(e, t) {
|
|
if (this._stopReading = !0, this.flush = async () => {
|
|
}, this._stopRetry(), this._cancelTimeouts(), this._removeListeners(), this.options) {
|
|
let { body: r } = this.options;
|
|
$.nodeStream(r) && r.destroy();
|
|
}
|
|
this._request && this._request.destroy(), e !== null && !$.undefined(e) && !(e instanceof Pr) && (e = new Pr(e.message, e, this)), t(e);
|
|
}
|
|
pipe(e, t) {
|
|
return e instanceof ZE.ServerResponse && this._pipedServerResponses.add(e), super.pipe(e, t);
|
|
}
|
|
unpipe(e) {
|
|
return e instanceof ZE.ServerResponse && this._pipedServerResponses.delete(e), super.unpipe(e), this;
|
|
}
|
|
async _finalizeBody() {
|
|
let { options: e } = this, { headers: t } = e, r = !$.undefined(e.form), i = !$.undefined(e.json), n = !$.undefined(e.body), a = soe.has(
|
|
e.method) && !(e.method === "GET" && e.allowGetBody);
|
|
if (this._cannotHaveBody = a, r || i || n) {
|
|
if (a)
|
|
throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);
|
|
let o = !$.string(t["content-type"]);
|
|
if (n) {
|
|
if (cx(e.body)) {
|
|
let l = new xae(e.body);
|
|
o && (t["content-type"] = l.headers["Content-Type"]), "Content-Length" in l.headers && (t["content-length"] = l.headers["Content\
|
|
-Length"]), e.body = l.encode();
|
|
}
|
|
x4(e.body) && o && (t["content-type"] = `multipart/form-data; boundary=${e.body.getBoundary()}`);
|
|
} else if (r) {
|
|
o && (t["content-type"] = "application/x-www-form-urlencoded");
|
|
let { form: l } = e;
|
|
e.form = void 0, e.body = new N6.URLSearchParams(l).toString();
|
|
} else {
|
|
o && (t["content-type"] = "application/json");
|
|
let { json: l } = e;
|
|
e.json = void 0, e.body = e.stringifyJson(l);
|
|
}
|
|
let u = await Cae(e.body, e.headers);
|
|
$.undefined(t["content-length"]) && $.undefined(t["transfer-encoding"]) && !a && !$.undefined(u) && (t["content-length"] = String(u));
|
|
}
|
|
e.responseType === "json" && !("accept" in e.headers) && (e.headers.accept = "application/json"), this._bodySize = Number(t["content-l\
|
|
ength"]) || void 0;
|
|
}
|
|
async _onResponseBase(e) {
|
|
if (this.isAborted)
|
|
return;
|
|
let { options: t } = this, { url: r } = t;
|
|
this._nativeResponse = e, t.decompress && (e = (0, pae.default)(e));
|
|
let i = e.statusCode, n = e;
|
|
n.statusMessage = n.statusMessage ? n.statusMessage : ZE.default.STATUS_CODES[i], n.url = t.url.toString(), n.requestUrl = this.requestUrl,
|
|
n.redirectUrls = this.redirectUrls, n.request = this, n.isFromCache = this._nativeResponse.fromCache ?? !1, n.ip = this.ip, n.retryCount =
|
|
this.retryCount, n.ok = Om(n), this._isFromCache = n.isFromCache, this._responseSize = Number(e.headers["content-length"]) || void 0, this.
|
|
response = n, e.once("end", () => {
|
|
this._responseSize = this._downloadedSize, this.emit("downloadProgress", this.downloadProgress);
|
|
}), e.once("error", (o) => {
|
|
this._aborted = !0, e.destroy(), this._beforeError(new B6(o, this));
|
|
}), e.once("aborted", () => {
|
|
this._aborted = !0, this._beforeError(new B6({
|
|
name: "Error",
|
|
message: "The server aborted pending request",
|
|
code: "ECONNRESET"
|
|
}, this));
|
|
}), this.emit("downloadProgress", this.downloadProgress);
|
|
let a = e.headers["set-cookie"];
|
|
if ($.object(t.cookieJar) && a) {
|
|
let o = a.map(async (u) => t.cookieJar.setCookie(u, r.toString()));
|
|
t.ignoreInvalidCookies && (o = o.map(async (u) => {
|
|
try {
|
|
await u;
|
|
} catch {
|
|
}
|
|
}));
|
|
try {
|
|
await Promise.all(o);
|
|
} catch (u) {
|
|
this._beforeError(u);
|
|
return;
|
|
}
|
|
}
|
|
if (!this.isAborted) {
|
|
if (t.followRedirect && e.headers.location && aoe.has(i)) {
|
|
if (e.resume(), this._cancelTimeouts(), this._unproxyEvents(), this.redirectUrls.length >= t.maxRedirects) {
|
|
this._beforeError(new jse(this));
|
|
return;
|
|
}
|
|
this._request = void 0;
|
|
let o = new Ns(void 0, void 0, this.options), u = i === 303 && o.method !== "GET" && o.method !== "HEAD", l = i !== 307 && i !== 308,
|
|
c = o.methodRewriting && l;
|
|
(u || c) && (o.method = "GET", o.body = void 0, o.json = void 0, o.form = void 0, delete o.headers["content-length"]);
|
|
try {
|
|
let f = YE.Buffer.from(e.headers.location, "binary").toString(), m = new N6.URL(f, r);
|
|
if (!e4(r) && e4(m)) {
|
|
this._beforeError(new Pr("Cannot redirect to UNIX socket", {}, this));
|
|
return;
|
|
}
|
|
m.hostname !== r.hostname || m.port !== r.port ? ("host" in o.headers && delete o.headers.host, "cookie" in o.headers && delete o.
|
|
headers.cookie, "authorization" in o.headers && delete o.headers.authorization, (o.username || o.password) && (o.username = "", o.
|
|
password = "")) : (m.username = o.username, m.password = o.password), this.redirectUrls.push(m), o.prefixUrl = "", o.url = m;
|
|
for (let h of o.hooks.beforeRedirect)
|
|
await h(o, n);
|
|
this.emit("redirect", o, n), this.options = o, await this._makeRequest();
|
|
} catch (f) {
|
|
this._beforeError(f);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if (t.isStream && t.throwHttpErrors && !Om(n)) {
|
|
this._beforeError(new Im(n));
|
|
return;
|
|
}
|
|
if (e.on("readable", () => {
|
|
this._triggerRead && this._read();
|
|
}), this.on("resume", () => {
|
|
e.resume();
|
|
}), this.on("pause", () => {
|
|
e.pause();
|
|
}), e.once("end", () => {
|
|
this.push(null);
|
|
}), this._noPipe) {
|
|
await this._setRawBody() && this.emit("response", e);
|
|
return;
|
|
}
|
|
this.emit("response", e);
|
|
for (let o of this._pipedServerResponses)
|
|
if (!o.headersSent) {
|
|
for (let u in e.headers) {
|
|
let l = t.decompress ? u !== "content-encoding" : !0, c = e.headers[u];
|
|
l && o.setHeader(u, c);
|
|
}
|
|
o.statusCode = i;
|
|
}
|
|
}
|
|
}
|
|
async _setRawBody(e = this) {
|
|
if (e.readableEnded)
|
|
return !1;
|
|
try {
|
|
let t = await (0, hae.buffer)(e);
|
|
if (!this.isAborted)
|
|
return this.response.rawBody = t, !0;
|
|
} catch {
|
|
}
|
|
return !1;
|
|
}
|
|
async _onResponse(e) {
|
|
try {
|
|
await this._onResponseBase(e);
|
|
} catch (t) {
|
|
this._beforeError(t);
|
|
}
|
|
}
|
|
_onRequest(e) {
|
|
let { options: t } = this, { timeout: r, url: i } = t;
|
|
Gse(e), this.options.http2 && e.setTimeout(0), this._cancelTimeouts = Pae(e, r, i);
|
|
let n = t.cache ? "cacheableResponse" : "response";
|
|
e.once(n, (a) => {
|
|
this._onResponse(a);
|
|
}), e.once("error", (a) => {
|
|
this._aborted = !0, e.destroy(), a = a instanceof T4 ? new qse(a, this.timings, this) : new Pr(a.message, a, this), this._beforeError(
|
|
a);
|
|
}), this._unproxyEvents = S4(e, this, ooe), this._request = e, this.emit("uploadProgress", this.uploadProgress), this._sendBody(), this.
|
|
emit("request", e);
|
|
}
|
|
async _asyncWrite(e) {
|
|
return new Promise((t, r) => {
|
|
super.write(e, (i) => {
|
|
if (i) {
|
|
r(i);
|
|
return;
|
|
}
|
|
t();
|
|
});
|
|
});
|
|
}
|
|
_sendBody() {
|
|
let { body: e } = this.options, t = this.redirectUrls.length === 0 ? this : this._request ?? this;
|
|
$.nodeStream(e) ? e.pipe(t) : $.generator(e) || $.asyncGenerator(e) ? (async () => {
|
|
try {
|
|
for await (let r of e)
|
|
await this._asyncWrite(r);
|
|
super.end();
|
|
} catch (r) {
|
|
this._beforeError(r);
|
|
}
|
|
})() : $.undefined(e) ? (this._cannotHaveBody || this._noPipe) && t.end() : (this._writeRequest(e, void 0, () => {
|
|
}), t.end());
|
|
}
|
|
_prepareCache(e) {
|
|
if (!ax.has(e)) {
|
|
let t = new dae((r, i) => {
|
|
let n = r._request(r, i);
|
|
return $.promise(n) && (n.once = (a, o) => {
|
|
if (a === "error")
|
|
(async () => {
|
|
try {
|
|
await n;
|
|
} catch (u) {
|
|
o(u);
|
|
}
|
|
})();
|
|
else if (a === "abort")
|
|
(async () => {
|
|
try {
|
|
(await n).once("abort", o);
|
|
} catch {
|
|
}
|
|
})();
|
|
else
|
|
throw new Error(`Unknown HTTP2 promise event: ${a}`);
|
|
return n;
|
|
}), n;
|
|
}, e);
|
|
ax.set(e, t.request());
|
|
}
|
|
}
|
|
async _createCacheableRequest(e, t) {
|
|
return new Promise((r, i) => {
|
|
Object.assign(t, Fae(e));
|
|
let n, a = ax.get(t.cache)(t, async (o) => {
|
|
if (o._readableState.autoDestroy = !1, n) {
|
|
let u = /* @__PURE__ */ s(() => {
|
|
o.req && (o.complete = o.req.res.complete);
|
|
}, "fix");
|
|
o.prependOnceListener("end", u), u(), (await n).emit("cacheableResponse", o);
|
|
}
|
|
r(o);
|
|
});
|
|
a.once("error", i), a.once("request", async (o) => {
|
|
n = o, r(n);
|
|
});
|
|
});
|
|
}
|
|
async _makeRequest() {
|
|
let { options: e } = this, { headers: t, username: r, password: i } = e, n = e.cookieJar;
|
|
for (let l in t)
|
|
if ($.undefined(t[l]))
|
|
delete t[l];
|
|
else if ($.null_(t[l]))
|
|
throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${l}\` header`);
|
|
if (e.decompress && $.undefined(t["accept-encoding"]) && (t["accept-encoding"] = noe ? "gzip, deflate, br" : "gzip, deflate"), r || i) {
|
|
let l = YE.Buffer.from(`${r}:${i}`).toString("base64");
|
|
t.authorization = `Basic ${l}`;
|
|
}
|
|
if (n) {
|
|
let l = await n.getCookieString(e.url.toString());
|
|
$.nonEmptyString(l) && (t.cookie = l);
|
|
}
|
|
e.prefixUrl = "";
|
|
let a;
|
|
for (let l of e.hooks.beforeRequest) {
|
|
let c = await l(e);
|
|
if (!$.undefined(c)) {
|
|
a = /* @__PURE__ */ s(() => c, "request");
|
|
break;
|
|
}
|
|
}
|
|
a || (a = e.getRequestFunction());
|
|
let o = e.url;
|
|
this._requestOptions = e.createNativeRequestOptions(), e.cache && (this._requestOptions._request = a, this._requestOptions.cache = e.cache,
|
|
this._requestOptions.body = e.body, this._prepareCache(e.cache));
|
|
let u = e.cache ? this._createCacheableRequest : a;
|
|
try {
|
|
let l = u(o, this._requestOptions);
|
|
$.promise(l) && (l = await l), $.undefined(l) && (l = e.getFallbackRequestFunction()(o, this._requestOptions), $.promise(l) && (l = await l)),
|
|
ioe(l) ? this._onRequest(l) : this.writable ? (this.once("finish", () => {
|
|
this._onResponse(l);
|
|
}), this._sendBody()) : this._onResponse(l);
|
|
} catch (l) {
|
|
throw l instanceof Lf ? new Lse(l, this) : l;
|
|
}
|
|
}
|
|
async _error(e) {
|
|
try {
|
|
if (!(e instanceof Im && !this.options.throwHttpErrors))
|
|
for (let t of this.options.hooks.beforeError)
|
|
e = await t(e);
|
|
} catch (t) {
|
|
e = new Pr(t.message, t, this);
|
|
}
|
|
this.destroy(e);
|
|
}
|
|
_writeRequest(e, t, r) {
|
|
!this._request || this._request.destroyed || this._request.write(e, t, (i) => {
|
|
if (!i && !this._request.destroyed) {
|
|
this._uploadedSize += YE.Buffer.byteLength(e, t);
|
|
let n = this.uploadProgress;
|
|
n.percent < 1 && this.emit("uploadProgress", n);
|
|
}
|
|
r(i);
|
|
});
|
|
}
|
|
/**
|
|
The remote IP address.
|
|
*/
|
|
get ip() {
|
|
var e;
|
|
return (e = this.socket) == null ? void 0 : e.remoteAddress;
|
|
}
|
|
/**
|
|
Indicates whether the request has been aborted or not.
|
|
*/
|
|
get isAborted() {
|
|
return this._aborted;
|
|
}
|
|
get socket() {
|
|
var e;
|
|
return ((e = this._request) == null ? void 0 : e.socket) ?? void 0;
|
|
}
|
|
/**
|
|
Progress event for downloading (receiving a response).
|
|
*/
|
|
get downloadProgress() {
|
|
let e;
|
|
return this._responseSize ? e = this._downloadedSize / this._responseSize : this._responseSize === this._downloadedSize ? e = 1 : e = 0,
|
|
{
|
|
percent: e,
|
|
transferred: this._downloadedSize,
|
|
total: this._responseSize
|
|
};
|
|
}
|
|
/**
|
|
Progress event for uploading (sending a request).
|
|
*/
|
|
get uploadProgress() {
|
|
let e;
|
|
return this._bodySize ? e = this._uploadedSize / this._bodySize : this._bodySize === this._uploadedSize ? e = 1 : e = 0, {
|
|
percent: e,
|
|
transferred: this._uploadedSize,
|
|
total: this._bodySize
|
|
};
|
|
}
|
|
/**
|
|
The object contains the following properties:
|
|
|
|
- `start` - Time when the request started.
|
|
- `socket` - Time when a socket was assigned to the request.
|
|
- `lookup` - Time when the DNS lookup finished.
|
|
- `connect` - Time when the socket successfully connected.
|
|
- `secureConnect` - Time when the socket securely connected.
|
|
- `upload` - Time when the request finished uploading.
|
|
- `response` - Time when the request fired `response` event.
|
|
- `end` - Time when the response fired `end` event.
|
|
- `error` - Time when the request fired `error` event.
|
|
- `abort` - Time when the request fired `abort` event.
|
|
- `phases`
|
|
- `wait` - `timings.socket - timings.start`
|
|
- `dns` - `timings.lookup - timings.socket`
|
|
- `tcp` - `timings.connect - timings.lookup`
|
|
- `tls` - `timings.secureConnect - timings.connect`
|
|
- `request` - `timings.upload - (timings.secureConnect || timings.connect)`
|
|
- `firstByte` - `timings.response - timings.upload`
|
|
- `download` - `timings.end - timings.response`
|
|
- `total` - `(timings.end || timings.error || timings.abort) - timings.start`
|
|
|
|
If something has not been measured yet, it will be `undefined`.
|
|
|
|
__Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
|
|
*/
|
|
get timings() {
|
|
var e;
|
|
return (e = this._request) == null ? void 0 : e.timings;
|
|
}
|
|
/**
|
|
Whether the response was retrieved from the cache.
|
|
*/
|
|
get isFromCache() {
|
|
return this._isFromCache;
|
|
}
|
|
get reusedSocket() {
|
|
var e;
|
|
return (e = this._request) == null ? void 0 : e.reusedSocket;
|
|
}
|
|
}, uoe = class extends Pr {
|
|
static {
|
|
s(this, "CancelError2");
|
|
}
|
|
constructor(e) {
|
|
super("Promise was canceled", {}, e), this.name = "CancelError", this.code = "ERR_CANCELED";
|
|
}
|
|
/**
|
|
Whether the promise is canceled.
|
|
*/
|
|
get isCanceled() {
|
|
return !0;
|
|
}
|
|
}, loe = [
|
|
"request",
|
|
"response",
|
|
"redirect",
|
|
"uploadProgress",
|
|
"downloadProgress"
|
|
];
|
|
function t4(e) {
|
|
let t, r, i, n = new Nse.EventEmitter(), a = new lx((u, l, c) => {
|
|
c(() => {
|
|
t.destroy();
|
|
}), c.shouldReject = !1, c(() => {
|
|
l(new uoe(t));
|
|
});
|
|
let f = /* @__PURE__ */ s((m) => {
|
|
var h;
|
|
c(() => {
|
|
});
|
|
let d = e ?? new fx(void 0, void 0, i);
|
|
d.retryCount = m, d._noPipe = !0, t = d, d.once("response", async (g) => {
|
|
let b = (g.headers["content-encoding"] ?? "").toLowerCase(), D = b === "gzip" || b === "deflate" || b === "br", { options: v } = d;
|
|
if (D && !v.decompress)
|
|
g.body = g.rawBody;
|
|
else
|
|
try {
|
|
g.body = Q6(g, v.responseType, v.parseJson, v.encoding);
|
|
} catch (S) {
|
|
if (g.body = g.rawBody.toString(), Om(g)) {
|
|
d._beforeError(S);
|
|
return;
|
|
}
|
|
}
|
|
try {
|
|
let S = v.hooks.afterResponse;
|
|
for (let [C, O] of S.entries())
|
|
if (g = await O(g, async (k) => {
|
|
throw v.merge(k), v.prefixUrl = "", k.url && (v.url = k.url), v.hooks.afterResponse = v.hooks.afterResponse.slice(0, C), new Use(
|
|
d);
|
|
}), !($.object(g) && $.number(g.statusCode) && !$.nullOrUndefined(g.body)))
|
|
throw new TypeError("The `afterResponse` hook returned an invalid value");
|
|
} catch (S) {
|
|
d._beforeError(S);
|
|
return;
|
|
}
|
|
if (r = g, !Om(g)) {
|
|
d._beforeError(new Im(g));
|
|
return;
|
|
}
|
|
d.destroy(), u(d.options.resolveBodyOnly ? g.body : g);
|
|
});
|
|
let y = /* @__PURE__ */ s((g) => {
|
|
if (a.isCanceled)
|
|
return;
|
|
let { options: b } = d;
|
|
if (g instanceof Im && !b.throwHttpErrors) {
|
|
let { response: D } = g;
|
|
d.destroy(), u(d.options.resolveBodyOnly ? D.body : D);
|
|
return;
|
|
}
|
|
l(g);
|
|
}, "onError");
|
|
d.once("error", y);
|
|
let p = (h = d.options) == null ? void 0 : h.body;
|
|
d.once("retry", (g, b) => {
|
|
e = void 0;
|
|
let D = d.options.body;
|
|
if (p === D && $.nodeStream(D)) {
|
|
b.message = "Cannot retry with consumed body stream", y(b);
|
|
return;
|
|
}
|
|
i = d.options, f(g);
|
|
}), S4(d, n, loe), $.undefined(e) && d.flush();
|
|
}, "makeRequest");
|
|
f(0);
|
|
});
|
|
a.on = (u, l) => (n.on(u, l), a), a.off = (u, l) => (n.off(u, l), a);
|
|
let o = /* @__PURE__ */ s((u) => {
|
|
let l = (async () => {
|
|
await a;
|
|
let { options: c } = r.request;
|
|
return Q6(r, u, c.parseJson, c.encoding);
|
|
})();
|
|
return Object.defineProperties(l, Object.getOwnPropertyDescriptors(a)), l;
|
|
}, "shortcut");
|
|
return a.json = () => {
|
|
if (t.options) {
|
|
let { headers: u } = t.options;
|
|
!t.writableFinished && !("accept" in u) && (u.accept = "application/json");
|
|
}
|
|
return o("json");
|
|
}, a.buffer = () => o("buffer"), a.text = () => o("text"), a;
|
|
}
|
|
s(t4, "asPromise");
|
|
var coe = /* @__PURE__ */ s(async (e) => new Promise((t) => {
|
|
setTimeout(t, e);
|
|
}), "delay"), foe = /* @__PURE__ */ s((e) => $.function_(e), "isGotInstance"), doe = [
|
|
"get",
|
|
"post",
|
|
"put",
|
|
"patch",
|
|
"head",
|
|
"delete"
|
|
], C4 = /* @__PURE__ */ s((e) => {
|
|
e = {
|
|
options: new Ns(void 0, void 0, e.options),
|
|
handlers: [...e.handlers],
|
|
mutableDefaults: e.mutableDefaults
|
|
}, Object.defineProperty(e, "mutableDefaults", {
|
|
enumerable: !0,
|
|
configurable: !1,
|
|
writable: !1
|
|
});
|
|
let t = /* @__PURE__ */ s((i, n, a = e.options) => {
|
|
let o = new fx(i, n, a), u, l = /* @__PURE__ */ s((m) => (o.options = m, o._noPipe = !m.isStream, o.flush(), m.isStream ? o : (u || (u =
|
|
t4(o)), u)), "lastHandler"), c = 0, f = /* @__PURE__ */ s((m) => {
|
|
let d = (e.handlers[c++] ?? l)(m, f);
|
|
if ($.promise(d) && !o.options.isStream && (u || (u = t4(o)), d !== u)) {
|
|
let y = Object.getOwnPropertyDescriptors(u);
|
|
for (let p in y)
|
|
p in d && delete y[p];
|
|
Object.defineProperties(d, y), d.cancel = u.cancel;
|
|
}
|
|
return d;
|
|
}, "iterateHandlers");
|
|
return f(o.options);
|
|
}, "got2");
|
|
t.extend = (...i) => {
|
|
let n = new Ns(void 0, void 0, e.options), a = [...e.handlers], o;
|
|
for (let u of i)
|
|
foe(u) ? (n.merge(u.defaults.options), a.push(...u.defaults.handlers), o = u.defaults.mutableDefaults) : (n.merge(u), u.handlers && a.
|
|
push(...u.handlers), o = u.mutableDefaults);
|
|
return C4({
|
|
options: n,
|
|
handlers: a,
|
|
mutableDefaults: !!o
|
|
});
|
|
};
|
|
let r = /* @__PURE__ */ s(async function* (i, n) {
|
|
let a = new Ns(i, n, e.options);
|
|
a.resolveBodyOnly = !1;
|
|
let { pagination: o } = a;
|
|
fe.function_(o.transform), fe.function_(o.shouldContinue), fe.function_(o.filter), fe.function_(o.paginate), fe.number(o.countLimit), fe.
|
|
number(o.requestLimit), fe.number(o.backoff);
|
|
let u = [], { countLimit: l } = o, c = 0;
|
|
for (; c < o.requestLimit; ) {
|
|
c !== 0 && await coe(o.backoff);
|
|
let f = await t(void 0, void 0, a), m = await o.transform(f), h = [];
|
|
fe.array(m);
|
|
for (let y of m)
|
|
if (o.filter({ item: y, currentItems: h, allItems: u }) && (!o.shouldContinue({ item: y, currentItems: h, allItems: u }) || (yield y,
|
|
o.stackAllItems && u.push(y), h.push(y), --l <= 0)))
|
|
return;
|
|
let d = o.paginate({
|
|
response: f,
|
|
currentItems: h,
|
|
allItems: u
|
|
});
|
|
if (d === !1)
|
|
return;
|
|
d === f.request.options ? a = f.request.options : (a.merge(d), fe.any([$.urlInstance, $.undefined], d.url), d.url !== void 0 && (a.prefixUrl =
|
|
"", a.url = d.url)), c++;
|
|
}
|
|
}, "paginateEach");
|
|
t.paginate = r, t.paginate.all = async (i, n) => {
|
|
let a = [];
|
|
for await (let o of r(i, n))
|
|
a.push(o);
|
|
return a;
|
|
}, t.paginate.each = r, t.stream = (i, n) => t(i, { ...n, isStream: !0 });
|
|
for (let i of doe)
|
|
t[i] = (n, a) => t(n, { ...a, method: i }), t.stream[i] = (n, a) => t(n, { ...a, method: i, isStream: !0 });
|
|
return e.mutableDefaults || (Object.freeze(e.handlers), e.options.freeze()), Object.defineProperty(t, "defaults", {
|
|
value: e,
|
|
writable: !1,
|
|
configurable: !1,
|
|
enumerable: !0
|
|
}), t;
|
|
}, "create"), poe = C4, hoe = {
|
|
options: new Ns(),
|
|
handlers: [],
|
|
mutableDefaults: !1
|
|
}, moe = poe(hoe), yoe = moe, goe = Cr(uv()), boe = LB(), Doe = Cr(O6()), r4 = {
|
|
keepAlive: !0,
|
|
maxSockets: 20
|
|
}, voe = {
|
|
http: new Ese.Agent(r4),
|
|
https: new xse.Agent(r4)
|
|
};
|
|
async function Eoe({ url: e, gotOpts: t, extractOpts: r, dir: i }) {
|
|
return new Promise((n, a) => {
|
|
let o = /* @__PURE__ */ s((u) => {
|
|
u ? a(u) : n();
|
|
}, "callback");
|
|
(0, goe.default)(
|
|
yoe.stream(e, Object.assign({ agent: voe }, t)),
|
|
(0, Doe.default)(),
|
|
(0, boe.extract)(i, r),
|
|
o
|
|
);
|
|
});
|
|
}
|
|
s(Eoe, "download");
|
|
});
|
|
|
|
// ../node_modules/get-npm-tarball-url/lib/index.js
|
|
var F4 = E((nit, P4) => {
|
|
var dx = Object.defineProperty, xoe = Object.getOwnPropertyDescriptor, Soe = Object.getOwnPropertyNames, Toe = Object.prototype.hasOwnProperty,
|
|
Coe = /* @__PURE__ */ s((e, t) => {
|
|
for (var r in t)
|
|
dx(e, r, { get: t[r], enumerable: !0 });
|
|
}, "__export"), woe = /* @__PURE__ */ s((e, t, r, i) => {
|
|
if (t && typeof t == "object" || typeof t == "function")
|
|
for (let n of Soe(t))
|
|
!Toe.call(e, n) && n !== r && dx(e, n, { get: /* @__PURE__ */ s(() => t[n], "get"), enumerable: !(i = xoe(t, n)) || i.enumerable });
|
|
return e;
|
|
}, "__copyProps"), Aoe = /* @__PURE__ */ s((e) => woe(dx({}, "__esModule", { value: !0 }), e), "__toCommonJS"), _4 = {};
|
|
Coe(_4, {
|
|
default: /* @__PURE__ */ s(() => _oe, "default")
|
|
});
|
|
P4.exports = Aoe(_4);
|
|
function _oe(e, t, r) {
|
|
let i;
|
|
r?.registry ? i = r.registry.endsWith("/") ? r.registry : `${r.registry}/` : i = "https://registry.npmjs.org/";
|
|
let n = Foe(e);
|
|
return `${i}${e}/-/${n}-${Poe(t)}.tgz`;
|
|
}
|
|
s(_oe, "src_default");
|
|
function Poe(e) {
|
|
let t = e.indexOf("+");
|
|
return t === -1 ? e : e.substring(0, t);
|
|
}
|
|
s(Poe, "removeBuildMetadataFromVersion");
|
|
function Foe(e) {
|
|
return e[0] !== "@" ? e : e.split("/")[1];
|
|
}
|
|
s(Foe, "getScopelessName");
|
|
});
|
|
|
|
// ../node_modules/eastasianwidth/eastasianwidth.js
|
|
var Dx = E((ont, bx) => {
|
|
var _a = {};
|
|
typeof bx > "u" ? window.eastasianwidth = _a : bx.exports = _a;
|
|
_a.eastAsianWidth = function(e) {
|
|
var t = e.charCodeAt(0), r = e.length == 2 ? e.charCodeAt(1) : 0, i = t;
|
|
return 55296 <= t && t <= 56319 && 56320 <= r && r <= 57343 && (t &= 1023, r &= 1023, i = t << 10 | r, i += 65536), i == 12288 || 65281 <=
|
|
i && i <= 65376 || 65504 <= i && i <= 65510 ? "F" : i == 8361 || 65377 <= i && i <= 65470 || 65474 <= i && i <= 65479 || 65482 <= i && i <=
|
|
65487 || 65490 <= i && i <= 65495 || 65498 <= i && i <= 65500 || 65512 <= i && i <= 65518 ? "H" : 4352 <= i && i <= 4447 || 4515 <= i &&
|
|
i <= 4519 || 4602 <= i && i <= 4607 || 9001 <= i && i <= 9002 || 11904 <= i && i <= 11929 || 11931 <= i && i <= 12019 || 12032 <= i && i <=
|
|
12245 || 12272 <= i && i <= 12283 || 12289 <= i && i <= 12350 || 12353 <= i && i <= 12438 || 12441 <= i && i <= 12543 || 12549 <= i && i <=
|
|
12589 || 12593 <= i && i <= 12686 || 12688 <= i && i <= 12730 || 12736 <= i && i <= 12771 || 12784 <= i && i <= 12830 || 12832 <= i && i <=
|
|
12871 || 12880 <= i && i <= 13054 || 13056 <= i && i <= 19903 || 19968 <= i && i <= 42124 || 42128 <= i && i <= 42182 || 43360 <= i && i <=
|
|
43388 || 44032 <= i && i <= 55203 || 55216 <= i && i <= 55238 || 55243 <= i && i <= 55291 || 63744 <= i && i <= 64255 || 65040 <= i && i <=
|
|
65049 || 65072 <= i && i <= 65106 || 65108 <= i && i <= 65126 || 65128 <= i && i <= 65131 || 110592 <= i && i <= 110593 || 127488 <= i &&
|
|
i <= 127490 || 127504 <= i && i <= 127546 || 127552 <= i && i <= 127560 || 127568 <= i && i <= 127569 || 131072 <= i && i <= 194367 || 177984 <=
|
|
i && i <= 196605 || 196608 <= i && i <= 262141 ? "W" : 32 <= i && i <= 126 || 162 <= i && i <= 163 || 165 <= i && i <= 166 || i == 172 ||
|
|
i == 175 || 10214 <= i && i <= 10221 || 10629 <= i && i <= 10630 ? "Na" : i == 161 || i == 164 || 167 <= i && i <= 168 || i == 170 || 173 <=
|
|
i && i <= 174 || 176 <= i && i <= 180 || 182 <= i && i <= 186 || 188 <= i && i <= 191 || i == 198 || i == 208 || 215 <= i && i <= 216 ||
|
|
222 <= i && i <= 225 || i == 230 || 232 <= i && i <= 234 || 236 <= i && i <= 237 || i == 240 || 242 <= i && i <= 243 || 247 <= i && i <=
|
|
250 || i == 252 || i == 254 || i == 257 || i == 273 || i == 275 || i == 283 || 294 <= i && i <= 295 || i == 299 || 305 <= i && i <= 307 ||
|
|
i == 312 || 319 <= i && i <= 322 || i == 324 || 328 <= i && i <= 331 || i == 333 || 338 <= i && i <= 339 || 358 <= i && i <= 359 || i ==
|
|
363 || i == 462 || i == 464 || i == 466 || i == 468 || i == 470 || i == 472 || i == 474 || i == 476 || i == 593 || i == 609 || i == 708 ||
|
|
i == 711 || 713 <= i && i <= 715 || i == 717 || i == 720 || 728 <= i && i <= 731 || i == 733 || i == 735 || 768 <= i && i <= 879 || 913 <=
|
|
i && i <= 929 || 931 <= i && i <= 937 || 945 <= i && i <= 961 || 963 <= i && i <= 969 || i == 1025 || 1040 <= i && i <= 1103 || i == 1105 ||
|
|
i == 8208 || 8211 <= i && i <= 8214 || 8216 <= i && i <= 8217 || 8220 <= i && i <= 8221 || 8224 <= i && i <= 8226 || 8228 <= i && i <= 8231 ||
|
|
i == 8240 || 8242 <= i && i <= 8243 || i == 8245 || i == 8251 || i == 8254 || i == 8308 || i == 8319 || 8321 <= i && i <= 8324 || i == 8364 ||
|
|
i == 8451 || i == 8453 || i == 8457 || i == 8467 || i == 8470 || 8481 <= i && i <= 8482 || i == 8486 || i == 8491 || 8531 <= i && i <= 8532 ||
|
|
8539 <= i && i <= 8542 || 8544 <= i && i <= 8555 || 8560 <= i && i <= 8569 || i == 8585 || 8592 <= i && i <= 8601 || 8632 <= i && i <= 8633 ||
|
|
i == 8658 || i == 8660 || i == 8679 || i == 8704 || 8706 <= i && i <= 8707 || 8711 <= i && i <= 8712 || i == 8715 || i == 8719 || i == 8721 ||
|
|
i == 8725 || i == 8730 || 8733 <= i && i <= 8736 || i == 8739 || i == 8741 || 8743 <= i && i <= 8748 || i == 8750 || 8756 <= i && i <= 8759 ||
|
|
8764 <= i && i <= 8765 || i == 8776 || i == 8780 || i == 8786 || 8800 <= i && i <= 8801 || 8804 <= i && i <= 8807 || 8810 <= i && i <= 8811 ||
|
|
8814 <= i && i <= 8815 || 8834 <= i && i <= 8835 || 8838 <= i && i <= 8839 || i == 8853 || i == 8857 || i == 8869 || i == 8895 || i == 8978 ||
|
|
9312 <= i && i <= 9449 || 9451 <= i && i <= 9547 || 9552 <= i && i <= 9587 || 9600 <= i && i <= 9615 || 9618 <= i && i <= 9621 || 9632 <=
|
|
i && i <= 9633 || 9635 <= i && i <= 9641 || 9650 <= i && i <= 9651 || 9654 <= i && i <= 9655 || 9660 <= i && i <= 9661 || 9664 <= i && i <=
|
|
9665 || 9670 <= i && i <= 9672 || i == 9675 || 9678 <= i && i <= 9681 || 9698 <= i && i <= 9701 || i == 9711 || 9733 <= i && i <= 9734 ||
|
|
i == 9737 || 9742 <= i && i <= 9743 || 9748 <= i && i <= 9749 || i == 9756 || i == 9758 || i == 9792 || i == 9794 || 9824 <= i && i <= 9825 ||
|
|
9827 <= i && i <= 9829 || 9831 <= i && i <= 9834 || 9836 <= i && i <= 9837 || i == 9839 || 9886 <= i && i <= 9887 || 9918 <= i && i <= 9919 ||
|
|
9924 <= i && i <= 9933 || 9935 <= i && i <= 9953 || i == 9955 || 9960 <= i && i <= 9983 || i == 10045 || i == 10071 || 10102 <= i && i <=
|
|
10111 || 11093 <= i && i <= 11097 || 12872 <= i && i <= 12879 || 57344 <= i && i <= 63743 || 65024 <= i && i <= 65039 || i == 65533 || 127232 <=
|
|
i && i <= 127242 || 127248 <= i && i <= 127277 || 127280 <= i && i <= 127337 || 127344 <= i && i <= 127386 || 917760 <= i && i <= 917999 ||
|
|
983040 <= i && i <= 1048573 || 1048576 <= i && i <= 1114109 ? "A" : "N";
|
|
};
|
|
_a.characterLength = function(e) {
|
|
var t = this.eastAsianWidth(e);
|
|
return t == "F" || t == "W" || t == "A" ? 2 : 1;
|
|
};
|
|
function H4(e) {
|
|
return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
}
|
|
s(H4, "stringToArray");
|
|
_a.length = function(e) {
|
|
for (var t = H4(e), r = 0, i = 0; i < t.length; i++)
|
|
r = r + this.characterLength(t[i]);
|
|
return r;
|
|
};
|
|
_a.slice = function(e, t, r) {
|
|
textLen = _a.length(e), t = t || 0, r = r || 1, t < 0 && (t = textLen + t), r < 0 && (r = textLen + r);
|
|
for (var i = "", n = 0, a = H4(e), o = 0; o < a.length; o++) {
|
|
var u = a[o], l = _a.length(u);
|
|
if (n >= t - (l == 2 ? 1 : 0))
|
|
if (n + l <= r)
|
|
i += u;
|
|
else
|
|
break;
|
|
n += l;
|
|
}
|
|
return i;
|
|
};
|
|
});
|
|
|
|
// ../node_modules/emoji-regex/index.js
|
|
var vx = E((lnt, K4) => {
|
|
"use strict";
|
|
K4.exports = function() {
|
|
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
};
|
|
});
|
|
|
|
// ../node_modules/cli-boxes/boxes.json
|
|
var aM = E((knt, Sue) => {
|
|
Sue.exports = {
|
|
single: {
|
|
topLeft: "\u250C",
|
|
top: "\u2500",
|
|
topRight: "\u2510",
|
|
right: "\u2502",
|
|
bottomRight: "\u2518",
|
|
bottom: "\u2500",
|
|
bottomLeft: "\u2514",
|
|
left: "\u2502"
|
|
},
|
|
double: {
|
|
topLeft: "\u2554",
|
|
top: "\u2550",
|
|
topRight: "\u2557",
|
|
right: "\u2551",
|
|
bottomRight: "\u255D",
|
|
bottom: "\u2550",
|
|
bottomLeft: "\u255A",
|
|
left: "\u2551"
|
|
},
|
|
round: {
|
|
topLeft: "\u256D",
|
|
top: "\u2500",
|
|
topRight: "\u256E",
|
|
right: "\u2502",
|
|
bottomRight: "\u256F",
|
|
bottom: "\u2500",
|
|
bottomLeft: "\u2570",
|
|
left: "\u2502"
|
|
},
|
|
bold: {
|
|
topLeft: "\u250F",
|
|
top: "\u2501",
|
|
topRight: "\u2513",
|
|
right: "\u2503",
|
|
bottomRight: "\u251B",
|
|
bottom: "\u2501",
|
|
bottomLeft: "\u2517",
|
|
left: "\u2503"
|
|
},
|
|
singleDouble: {
|
|
topLeft: "\u2553",
|
|
top: "\u2500",
|
|
topRight: "\u2556",
|
|
right: "\u2551",
|
|
bottomRight: "\u255C",
|
|
bottom: "\u2500",
|
|
bottomLeft: "\u2559",
|
|
left: "\u2551"
|
|
},
|
|
doubleSingle: {
|
|
topLeft: "\u2552",
|
|
top: "\u2550",
|
|
topRight: "\u2555",
|
|
right: "\u2502",
|
|
bottomRight: "\u255B",
|
|
bottom: "\u2550",
|
|
bottomLeft: "\u2558",
|
|
left: "\u2502"
|
|
},
|
|
classic: {
|
|
topLeft: "+",
|
|
top: "-",
|
|
topRight: "+",
|
|
right: "|",
|
|
bottomRight: "+",
|
|
bottom: "-",
|
|
bottomLeft: "+",
|
|
left: "|"
|
|
},
|
|
arrow: {
|
|
topLeft: "\u2198",
|
|
top: "\u2193",
|
|
topRight: "\u2199",
|
|
right: "\u2190",
|
|
bottomRight: "\u2196",
|
|
bottom: "\u2191",
|
|
bottomLeft: "\u2197",
|
|
left: "\u2192"
|
|
}
|
|
};
|
|
});
|
|
|
|
// ../node_modules/cli-boxes/index.js
|
|
var wx = E((Bnt, Cx) => {
|
|
"use strict";
|
|
var oM = aM();
|
|
Cx.exports = oM;
|
|
Cx.exports.default = oM;
|
|
});
|
|
|
|
// ../node_modules/string-width/node_modules/ansi-regex/index.js
|
|
var pM = E((Rnt, dM) => {
|
|
"use strict";
|
|
dM.exports = ({ onlyFirst: e = !1 } = {}) => {
|
|
let t = [
|
|
"[\\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(t, e ? void 0 : "g");
|
|
};
|
|
});
|
|
|
|
// ../node_modules/string-width/node_modules/strip-ansi/index.js
|
|
var mM = E((jnt, hM) => {
|
|
"use strict";
|
|
var Fue = pM();
|
|
hM.exports = (e) => typeof e == "string" ? e.replace(Fue(), "") : e;
|
|
});
|
|
|
|
// ../node_modules/is-fullwidth-code-point/index.js
|
|
var gM = E((Lnt, Px) => {
|
|
"use strict";
|
|
var yM = /* @__PURE__ */ s((e) => Number.isNaN(e) ? !1 : e >= 4352 && (e <= 4447 || // Hangul Jamo
|
|
e === 9001 || // LEFT-POINTING ANGLE BRACKET
|
|
e === 9002 || // RIGHT-POINTING ANGLE BRACKET
|
|
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
11904 <= e && e <= 12871 && e !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
12880 <= e && e <= 19903 || // CJK Unified Ideographs .. Yi Radicals
|
|
19968 <= e && e <= 42182 || // Hangul Jamo Extended-A
|
|
43360 <= e && e <= 43388 || // Hangul Syllables
|
|
44032 <= e && e <= 55203 || // CJK Compatibility Ideographs
|
|
63744 <= e && e <= 64255 || // Vertical Forms
|
|
65040 <= e && e <= 65049 || // CJK Compatibility Forms .. Small Form Variants
|
|
65072 <= e && e <= 65131 || // Halfwidth and Fullwidth Forms
|
|
65281 <= e && e <= 65376 || 65504 <= e && e <= 65510 || // Kana Supplement
|
|
110592 <= e && e <= 110593 || // Enclosed Ideographic Supplement
|
|
127488 <= e && e <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
131072 <= e && e <= 262141), "isFullwidthCodePoint");
|
|
Px.exports = yM;
|
|
Px.exports.default = yM;
|
|
});
|
|
|
|
// ../node_modules/string-width/node_modules/emoji-regex/index.js
|
|
var DM = E((Unt, bM) => {
|
|
"use strict";
|
|
bM.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 EM = E((Wnt, Fx) => {
|
|
"use strict";
|
|
var Iue = mM(), Oue = gM(), kue = DM(), vM = /* @__PURE__ */ s((e) => {
|
|
if (typeof e != "string" || e.length === 0 || (e = Iue(e), e.length === 0))
|
|
return 0;
|
|
e = e.replace(kue(), " ");
|
|
let t = 0;
|
|
for (let r = 0; r < e.length; r++) {
|
|
let i = e.codePointAt(r);
|
|
i <= 31 || i >= 127 && i <= 159 || i >= 768 && i <= 879 || (i > 65535 && r++, t += Oue(i) ? 2 : 1);
|
|
}
|
|
return t;
|
|
}, "stringWidth");
|
|
Fx.exports = vM;
|
|
Fx.exports.default = vM;
|
|
});
|
|
|
|
// ../node_modules/ansi-align/index.js
|
|
var SM = E((Vnt, xM) => {
|
|
"use strict";
|
|
var Bue = EM();
|
|
function No(e, t) {
|
|
if (!e) return e;
|
|
t = t || {};
|
|
let r = t.align || "center";
|
|
if (r === "left") return e;
|
|
let i = t.split || `
|
|
`, n = t.pad || " ", a = r !== "right" ? Nue : Mue, o = !1;
|
|
Array.isArray(e) || (o = !0, e = String(e).split(i));
|
|
let u, l = 0;
|
|
return e = e.map(function(c) {
|
|
return c = String(c), u = Bue(c), l = Math.max(u, l), {
|
|
str: c,
|
|
width: u
|
|
};
|
|
}).map(function(c) {
|
|
return new Array(a(l, c.width) + 1).join(n) + c.str;
|
|
}), o ? e.join(i) : e;
|
|
}
|
|
s(No, "ansiAlign");
|
|
No.left = /* @__PURE__ */ s(function(t) {
|
|
return No(t, { align: "left" });
|
|
}, "left");
|
|
No.center = /* @__PURE__ */ s(function(t) {
|
|
return No(t, { align: "center" });
|
|
}, "center");
|
|
No.right = /* @__PURE__ */ s(function(t) {
|
|
return No(t, { align: "right" });
|
|
}, "right");
|
|
xM.exports = No;
|
|
function Nue(e, t) {
|
|
return Math.floor((e - t) / 2);
|
|
}
|
|
s(Nue, "halfDiff");
|
|
function Mue(e, t) {
|
|
return e - t;
|
|
}
|
|
s(Mue, "fullDiff");
|
|
});
|
|
|
|
// ../node_modules/ts-dedent/dist/index.js
|
|
var Wm = E((zf) => {
|
|
"use strict";
|
|
Object.defineProperty(zf, "__esModule", { value: !0 });
|
|
zf.dedent = void 0;
|
|
function LM(e) {
|
|
for (var t = [], r = 1; r < arguments.length; r++)
|
|
t[r - 1] = arguments[r];
|
|
var i = Array.from(typeof e == "string" ? [e] : e);
|
|
i[i.length - 1] = i[i.length - 1].replace(/\r?\n([\t ]*)$/, "");
|
|
var n = i.reduce(function(u, l) {
|
|
var c = l.match(/\n([\t ]+|(?!\s).)/g);
|
|
return c ? u.concat(c.map(function(f) {
|
|
var m, h;
|
|
return (h = (m = f.match(/[\t ]/g)) === null || m === void 0 ? void 0 : m.length) !== null && h !== void 0 ? h : 0;
|
|
})) : u;
|
|
}, []);
|
|
if (n.length) {
|
|
var a = new RegExp(`
|
|
[ ]{` + Math.min.apply(Math, n) + "}", "g");
|
|
i = i.map(function(u) {
|
|
return u.replace(a, `
|
|
`);
|
|
});
|
|
}
|
|
i[0] = i[0].replace(/^\r?\n/, "");
|
|
var o = i[0];
|
|
return t.forEach(function(u, l) {
|
|
var c = o.match(/(?:^|\n)( *)$/), f = c ? c[1] : "", m = u;
|
|
typeof u == "string" && u.includes(`
|
|
`) && (m = String(u).split(`
|
|
`).map(function(h, d) {
|
|
return d === 0 ? h : "" + f + h;
|
|
}).join(`
|
|
`)), o += m + i[l + 1];
|
|
}), o;
|
|
}
|
|
s(LM, "dedent");
|
|
zf.dedent = LM;
|
|
zf.default = LM;
|
|
});
|
|
|
|
// ../node_modules/esprima/dist/esprima.js
|
|
var UM = E((Gf, Lx) => {
|
|
(/* @__PURE__ */ s(function(t, r) {
|
|
typeof Gf == "object" && typeof Lx == "object" ? Lx.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof Gf ==
|
|
"object" ? Gf.esprima = r() : t.esprima = r();
|
|
}, "webpackUniversalModuleDefinition"))(Gf, function() {
|
|
return (
|
|
/******/
|
|
function(e) {
|
|
var t = {};
|
|
function r(i) {
|
|
if (t[i])
|
|
return t[i].exports;
|
|
var n = t[i] = {
|
|
/******/
|
|
exports: {},
|
|
/******/
|
|
id: i,
|
|
/******/
|
|
loaded: !1
|
|
/******/
|
|
};
|
|
return e[i].call(n.exports, n, n.exports, r), n.loaded = !0, n.exports;
|
|
}
|
|
return s(r, "__webpack_require__"), r.m = e, r.c = t, r.p = "", r(0);
|
|
}([
|
|
/* 0 */
|
|
/***/
|
|
function(e, t, r) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
var i = r(1), n = r(3), a = r(8), o = r(15);
|
|
function u(h, d, y) {
|
|
var p = null, g = /* @__PURE__ */ s(function(U, j) {
|
|
y && y(U, j), p && p.visit(U, j);
|
|
}, "proxyDelegate"), b = typeof y == "function" ? g : null, D = !1;
|
|
if (d) {
|
|
D = typeof d.comment == "boolean" && d.comment;
|
|
var v = typeof d.attachComment == "boolean" && d.attachComment;
|
|
(D || v) && (p = new i.CommentHandler(), p.attach = v, d.comment = !0, b = g);
|
|
}
|
|
var S = !1;
|
|
d && typeof d.sourceType == "string" && (S = d.sourceType === "module");
|
|
var C;
|
|
d && typeof d.jsx == "boolean" && d.jsx ? C = new n.JSXParser(h, d, b) : C = new a.Parser(h, d, b);
|
|
var O = S ? C.parseModule() : C.parseScript(), k = O;
|
|
return D && p && (k.comments = p.comments), C.config.tokens && (k.tokens = C.tokens), C.config.tolerant && (k.errors = C.errorHandler.
|
|
errors), k;
|
|
}
|
|
s(u, "parse"), t.parse = u;
|
|
function l(h, d, y) {
|
|
var p = d || {};
|
|
return p.sourceType = "module", u(h, p, y);
|
|
}
|
|
s(l, "parseModule"), t.parseModule = l;
|
|
function c(h, d, y) {
|
|
var p = d || {};
|
|
return p.sourceType = "script", u(h, p, y);
|
|
}
|
|
s(c, "parseScript"), t.parseScript = c;
|
|
function f(h, d, y) {
|
|
var p = new o.Tokenizer(h, d), g;
|
|
g = [];
|
|
try {
|
|
for (; ; ) {
|
|
var b = p.getNextToken();
|
|
if (!b)
|
|
break;
|
|
y && (b = y(b)), g.push(b);
|
|
}
|
|
} catch (D) {
|
|
p.errorHandler.tolerate(D);
|
|
}
|
|
return p.errorHandler.tolerant && (g.errors = p.errors()), g;
|
|
}
|
|
s(f, "tokenize"), t.tokenize = f;
|
|
var m = r(2);
|
|
t.Syntax = m.Syntax, t.version = "4.0.1";
|
|
},
|
|
/* 1 */
|
|
/***/
|
|
function(e, t, r) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
var i = r(2), n = function() {
|
|
function a() {
|
|
this.attach = !1, this.comments = [], this.stack = [], this.leading = [], this.trailing = [];
|
|
}
|
|
return s(a, "CommentHandler"), a.prototype.insertInnerComments = function(o, u) {
|
|
if (o.type === i.Syntax.BlockStatement && o.body.length === 0) {
|
|
for (var l = [], c = this.leading.length - 1; c >= 0; --c) {
|
|
var f = this.leading[c];
|
|
u.end.offset >= f.start && (l.unshift(f.comment), this.leading.splice(c, 1), this.trailing.splice(c, 1));
|
|
}
|
|
l.length && (o.innerComments = l);
|
|
}
|
|
}, a.prototype.findTrailingComments = function(o) {
|
|
var u = [];
|
|
if (this.trailing.length > 0) {
|
|
for (var l = this.trailing.length - 1; l >= 0; --l) {
|
|
var c = this.trailing[l];
|
|
c.start >= o.end.offset && u.unshift(c.comment);
|
|
}
|
|
return this.trailing.length = 0, u;
|
|
}
|
|
var f = this.stack[this.stack.length - 1];
|
|
if (f && f.node.trailingComments) {
|
|
var m = f.node.trailingComments[0];
|
|
m && m.range[0] >= o.end.offset && (u = f.node.trailingComments, delete f.node.trailingComments);
|
|
}
|
|
return u;
|
|
}, a.prototype.findLeadingComments = function(o) {
|
|
for (var u = [], l; this.stack.length > 0; ) {
|
|
var c = this.stack[this.stack.length - 1];
|
|
if (c && c.start >= o.start.offset)
|
|
l = c.node, this.stack.pop();
|
|
else
|
|
break;
|
|
}
|
|
if (l) {
|
|
for (var f = l.leadingComments ? l.leadingComments.length : 0, m = f - 1; m >= 0; --m) {
|
|
var h = l.leadingComments[m];
|
|
h.range[1] <= o.start.offset && (u.unshift(h), l.leadingComments.splice(m, 1));
|
|
}
|
|
return l.leadingComments && l.leadingComments.length === 0 && delete l.leadingComments, u;
|
|
}
|
|
for (var m = this.leading.length - 1; m >= 0; --m) {
|
|
var c = this.leading[m];
|
|
c.start <= o.start.offset && (u.unshift(c.comment), this.leading.splice(m, 1));
|
|
}
|
|
return u;
|
|
}, a.prototype.visitNode = function(o, u) {
|
|
if (!(o.type === i.Syntax.Program && o.body.length > 0)) {
|
|
this.insertInnerComments(o, u);
|
|
var l = this.findTrailingComments(u), c = this.findLeadingComments(u);
|
|
c.length > 0 && (o.leadingComments = c), l.length > 0 && (o.trailingComments = l), this.stack.push({
|
|
node: o,
|
|
start: u.start.offset
|
|
});
|
|
}
|
|
}, a.prototype.visitComment = function(o, u) {
|
|
var l = o.type[0] === "L" ? "Line" : "Block", c = {
|
|
type: l,
|
|
value: o.value
|
|
};
|
|
if (o.range && (c.range = o.range), o.loc && (c.loc = o.loc), this.comments.push(c), this.attach) {
|
|
var f = {
|
|
comment: {
|
|
type: l,
|
|
value: o.value,
|
|
range: [u.start.offset, u.end.offset]
|
|
},
|
|
start: u.start.offset
|
|
};
|
|
o.loc && (f.comment.loc = o.loc), o.type = l, this.leading.push(f), this.trailing.push(f);
|
|
}
|
|
}, a.prototype.visit = function(o, u) {
|
|
o.type === "LineComment" ? this.visitComment(o, u) : o.type === "BlockComment" ? this.visitComment(o, u) : this.attach && this.
|
|
visitNode(o, u);
|
|
}, a;
|
|
}();
|
|
t.CommentHandler = n;
|
|
},
|
|
/* 2 */
|
|
/***/
|
|
function(e, t) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.Syntax = {
|
|
AssignmentExpression: "AssignmentExpression",
|
|
AssignmentPattern: "AssignmentPattern",
|
|
ArrayExpression: "ArrayExpression",
|
|
ArrayPattern: "ArrayPattern",
|
|
ArrowFunctionExpression: "ArrowFunctionExpression",
|
|
AwaitExpression: "AwaitExpression",
|
|
BlockStatement: "BlockStatement",
|
|
BinaryExpression: "BinaryExpression",
|
|
BreakStatement: "BreakStatement",
|
|
CallExpression: "CallExpression",
|
|
CatchClause: "CatchClause",
|
|
ClassBody: "ClassBody",
|
|
ClassDeclaration: "ClassDeclaration",
|
|
ClassExpression: "ClassExpression",
|
|
ConditionalExpression: "ConditionalExpression",
|
|
ContinueStatement: "ContinueStatement",
|
|
DoWhileStatement: "DoWhileStatement",
|
|
DebuggerStatement: "DebuggerStatement",
|
|
EmptyStatement: "EmptyStatement",
|
|
ExportAllDeclaration: "ExportAllDeclaration",
|
|
ExportDefaultDeclaration: "ExportDefaultDeclaration",
|
|
ExportNamedDeclaration: "ExportNamedDeclaration",
|
|
ExportSpecifier: "ExportSpecifier",
|
|
ExpressionStatement: "ExpressionStatement",
|
|
ForStatement: "ForStatement",
|
|
ForOfStatement: "ForOfStatement",
|
|
ForInStatement: "ForInStatement",
|
|
FunctionDeclaration: "FunctionDeclaration",
|
|
FunctionExpression: "FunctionExpression",
|
|
Identifier: "Identifier",
|
|
IfStatement: "IfStatement",
|
|
ImportDeclaration: "ImportDeclaration",
|
|
ImportDefaultSpecifier: "ImportDefaultSpecifier",
|
|
ImportNamespaceSpecifier: "ImportNamespaceSpecifier",
|
|
ImportSpecifier: "ImportSpecifier",
|
|
Literal: "Literal",
|
|
LabeledStatement: "LabeledStatement",
|
|
LogicalExpression: "LogicalExpression",
|
|
MemberExpression: "MemberExpression",
|
|
MetaProperty: "MetaProperty",
|
|
MethodDefinition: "MethodDefinition",
|
|
NewExpression: "NewExpression",
|
|
ObjectExpression: "ObjectExpression",
|
|
ObjectPattern: "ObjectPattern",
|
|
Program: "Program",
|
|
Property: "Property",
|
|
RestElement: "RestElement",
|
|
ReturnStatement: "ReturnStatement",
|
|
SequenceExpression: "SequenceExpression",
|
|
SpreadElement: "SpreadElement",
|
|
Super: "Super",
|
|
SwitchCase: "SwitchCase",
|
|
SwitchStatement: "SwitchStatement",
|
|
TaggedTemplateExpression: "TaggedTemplateExpression",
|
|
TemplateElement: "TemplateElement",
|
|
TemplateLiteral: "TemplateLiteral",
|
|
ThisExpression: "ThisExpression",
|
|
ThrowStatement: "ThrowStatement",
|
|
TryStatement: "TryStatement",
|
|
UnaryExpression: "UnaryExpression",
|
|
UpdateExpression: "UpdateExpression",
|
|
VariableDeclaration: "VariableDeclaration",
|
|
VariableDeclarator: "VariableDeclarator",
|
|
WhileStatement: "WhileStatement",
|
|
WithStatement: "WithStatement",
|
|
YieldExpression: "YieldExpression"
|
|
};
|
|
},
|
|
/* 3 */
|
|
/***/
|
|
function(e, t, r) {
|
|
"use strict";
|
|
var i = this && this.__extends || function() {
|
|
var d = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(y, p) {
|
|
y.__proto__ = p;
|
|
} || function(y, p) {
|
|
for (var g in p) p.hasOwnProperty(g) && (y[g] = p[g]);
|
|
};
|
|
return function(y, p) {
|
|
d(y, p);
|
|
function g() {
|
|
this.constructor = y;
|
|
}
|
|
s(g, "__"), y.prototype = p === null ? Object.create(p) : (g.prototype = p.prototype, new g());
|
|
};
|
|
}();
|
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
var n = r(4), a = r(5), o = r(6), u = r(7), l = r(8), c = r(13), f = r(14);
|
|
c.TokenName[
|
|
100
|
|
/* Identifier */
|
|
] = "JSXIdentifier", c.TokenName[
|
|
101
|
|
/* Text */
|
|
] = "JSXText";
|
|
function m(d) {
|
|
var y;
|
|
switch (d.type) {
|
|
case o.JSXSyntax.JSXIdentifier:
|
|
var p = d;
|
|
y = p.name;
|
|
break;
|
|
case o.JSXSyntax.JSXNamespacedName:
|
|
var g = d;
|
|
y = m(g.namespace) + ":" + m(g.name);
|
|
break;
|
|
case o.JSXSyntax.JSXMemberExpression:
|
|
var b = d;
|
|
y = m(b.object) + "." + m(b.property);
|
|
break;
|
|
/* istanbul ignore next */
|
|
default:
|
|
break;
|
|
}
|
|
return y;
|
|
}
|
|
s(m, "getQualifiedElementName");
|
|
var h = function(d) {
|
|
i(y, d);
|
|
function y(p, g, b) {
|
|
return d.call(this, p, g, b) || this;
|
|
}
|
|
return s(y, "JSXParser"), y.prototype.parsePrimaryExpression = function() {
|
|
return this.match("<") ? this.parseJSXRoot() : d.prototype.parsePrimaryExpression.call(this);
|
|
}, y.prototype.startJSX = function() {
|
|
this.scanner.index = this.startMarker.index, this.scanner.lineNumber = this.startMarker.line, this.scanner.lineStart = this.startMarker.
|
|
index - this.startMarker.column;
|
|
}, y.prototype.finishJSX = function() {
|
|
this.nextToken();
|
|
}, y.prototype.reenterJSX = function() {
|
|
this.startJSX(), this.expectJSX("}"), this.config.tokens && this.tokens.pop();
|
|
}, y.prototype.createJSXNode = function() {
|
|
return this.collectComments(), {
|
|
index: this.scanner.index,
|
|
line: this.scanner.lineNumber,
|
|
column: this.scanner.index - this.scanner.lineStart
|
|
};
|
|
}, y.prototype.createJSXChildNode = function() {
|
|
return {
|
|
index: this.scanner.index,
|
|
line: this.scanner.lineNumber,
|
|
column: this.scanner.index - this.scanner.lineStart
|
|
};
|
|
}, y.prototype.scanXHTMLEntity = function(p) {
|
|
for (var g = "&", b = !0, D = !1, v = !1, S = !1; !this.scanner.eof() && b && !D; ) {
|
|
var C = this.scanner.source[this.scanner.index];
|
|
if (C === p)
|
|
break;
|
|
if (D = C === ";", g += C, ++this.scanner.index, !D)
|
|
switch (g.length) {
|
|
case 2:
|
|
v = C === "#";
|
|
break;
|
|
case 3:
|
|
v && (S = C === "x", b = S || n.Character.isDecimalDigit(C.charCodeAt(0)), v = v && !S);
|
|
break;
|
|
default:
|
|
b = b && !(v && !n.Character.isDecimalDigit(C.charCodeAt(0))), b = b && !(S && !n.Character.isHexDigit(C.charCodeAt(0)));
|
|
break;
|
|
}
|
|
}
|
|
if (b && D && g.length > 2) {
|
|
var O = g.substr(1, g.length - 2);
|
|
v && O.length > 1 ? g = String.fromCharCode(parseInt(O.substr(1), 10)) : S && O.length > 2 ? g = String.fromCharCode(parseInt(
|
|
"0" + O.substr(1), 16)) : !v && !S && f.XHTMLEntities[O] && (g = f.XHTMLEntities[O]);
|
|
}
|
|
return g;
|
|
}, y.prototype.lexJSX = function() {
|
|
var p = this.scanner.source.charCodeAt(this.scanner.index);
|
|
if (p === 60 || p === 62 || p === 47 || p === 58 || p === 61 || p === 123 || p === 125) {
|
|
var g = this.scanner.source[this.scanner.index++];
|
|
return {
|
|
type: 7,
|
|
value: g,
|
|
lineNumber: this.scanner.lineNumber,
|
|
lineStart: this.scanner.lineStart,
|
|
start: this.scanner.index - 1,
|
|
end: this.scanner.index
|
|
};
|
|
}
|
|
if (p === 34 || p === 39) {
|
|
for (var b = this.scanner.index, D = this.scanner.source[this.scanner.index++], v = ""; !this.scanner.eof(); ) {
|
|
var S = this.scanner.source[this.scanner.index++];
|
|
if (S === D)
|
|
break;
|
|
S === "&" ? v += this.scanXHTMLEntity(D) : v += S;
|
|
}
|
|
return {
|
|
type: 8,
|
|
value: v,
|
|
lineNumber: this.scanner.lineNumber,
|
|
lineStart: this.scanner.lineStart,
|
|
start: b,
|
|
end: this.scanner.index
|
|
};
|
|
}
|
|
if (p === 46) {
|
|
var C = this.scanner.source.charCodeAt(this.scanner.index + 1), O = this.scanner.source.charCodeAt(this.scanner.index + 2), g = C ===
|
|
46 && O === 46 ? "..." : ".", b = this.scanner.index;
|
|
return this.scanner.index += g.length, {
|
|
type: 7,
|
|
value: g,
|
|
lineNumber: this.scanner.lineNumber,
|
|
lineStart: this.scanner.lineStart,
|
|
start: b,
|
|
end: this.scanner.index
|
|
};
|
|
}
|
|
if (p === 96)
|
|
return {
|
|
type: 10,
|
|
value: "",
|
|
lineNumber: this.scanner.lineNumber,
|
|
lineStart: this.scanner.lineStart,
|
|
start: this.scanner.index,
|
|
end: this.scanner.index
|
|
};
|
|
if (n.Character.isIdentifierStart(p) && p !== 92) {
|
|
var b = this.scanner.index;
|
|
for (++this.scanner.index; !this.scanner.eof(); ) {
|
|
var S = this.scanner.source.charCodeAt(this.scanner.index);
|
|
if (n.Character.isIdentifierPart(S) && S !== 92)
|
|
++this.scanner.index;
|
|
else if (S === 45)
|
|
++this.scanner.index;
|
|
else
|
|
break;
|
|
}
|
|
var k = this.scanner.source.slice(b, this.scanner.index);
|
|
return {
|
|
type: 100,
|
|
value: k,
|
|
lineNumber: this.scanner.lineNumber,
|
|
lineStart: this.scanner.lineStart,
|
|
start: b,
|
|
end: this.scanner.index
|
|
};
|
|
}
|
|
return this.scanner.lex();
|
|
}, y.prototype.nextJSXToken = function() {
|
|
this.collectComments(), this.startMarker.index = this.scanner.index, this.startMarker.line = this.scanner.lineNumber, this.startMarker.
|
|
column = this.scanner.index - this.scanner.lineStart;
|
|
var p = this.lexJSX();
|
|
return this.lastMarker.index = this.scanner.index, this.lastMarker.line = this.scanner.lineNumber, this.lastMarker.column = this.
|
|
scanner.index - this.scanner.lineStart, this.config.tokens && this.tokens.push(this.convertToken(p)), p;
|
|
}, y.prototype.nextJSXText = function() {
|
|
this.startMarker.index = this.scanner.index, this.startMarker.line = this.scanner.lineNumber, this.startMarker.column = this.scanner.
|
|
index - this.scanner.lineStart;
|
|
for (var p = this.scanner.index, g = ""; !this.scanner.eof(); ) {
|
|
var b = this.scanner.source[this.scanner.index];
|
|
if (b === "{" || b === "<")
|
|
break;
|
|
++this.scanner.index, g += b, n.Character.isLineTerminator(b.charCodeAt(0)) && (++this.scanner.lineNumber, b === "\r" && this.
|
|
scanner.source[this.scanner.index] === `
|
|
` && ++this.scanner.index, this.scanner.lineStart = this.scanner.index);
|
|
}
|
|
this.lastMarker.index = this.scanner.index, this.lastMarker.line = this.scanner.lineNumber, this.lastMarker.column = this.scanner.
|
|
index - this.scanner.lineStart;
|
|
var D = {
|
|
type: 101,
|
|
value: g,
|
|
lineNumber: this.scanner.lineNumber,
|
|
lineStart: this.scanner.lineStart,
|
|
start: p,
|
|
end: this.scanner.index
|
|
};
|
|
return g.length > 0 && this.config.tokens && this.tokens.push(this.convertToken(D)), D;
|
|
}, y.prototype.peekJSXToken = function() {
|
|
var p = this.scanner.saveState();
|
|
this.scanner.scanComments();
|
|
var g = this.lexJSX();
|
|
return this.scanner.restoreState(p), g;
|
|
}, y.prototype.expectJSX = function(p) {
|
|
var g = this.nextJSXToken();
|
|
(g.type !== 7 || g.value !== p) && this.throwUnexpectedToken(g);
|
|
}, y.prototype.matchJSX = function(p) {
|
|
var g = this.peekJSXToken();
|
|
return g.type === 7 && g.value === p;
|
|
}, y.prototype.parseJSXIdentifier = function() {
|
|
var p = this.createJSXNode(), g = this.nextJSXToken();
|
|
return g.type !== 100 && this.throwUnexpectedToken(g), this.finalize(p, new a.JSXIdentifier(g.value));
|
|
}, y.prototype.parseJSXElementName = function() {
|
|
var p = this.createJSXNode(), g = this.parseJSXIdentifier();
|
|
if (this.matchJSX(":")) {
|
|
var b = g;
|
|
this.expectJSX(":");
|
|
var D = this.parseJSXIdentifier();
|
|
g = this.finalize(p, new a.JSXNamespacedName(b, D));
|
|
} else if (this.matchJSX("."))
|
|
for (; this.matchJSX("."); ) {
|
|
var v = g;
|
|
this.expectJSX(".");
|
|
var S = this.parseJSXIdentifier();
|
|
g = this.finalize(p, new a.JSXMemberExpression(v, S));
|
|
}
|
|
return g;
|
|
}, y.prototype.parseJSXAttributeName = function() {
|
|
var p = this.createJSXNode(), g, b = this.parseJSXIdentifier();
|
|
if (this.matchJSX(":")) {
|
|
var D = b;
|
|
this.expectJSX(":");
|
|
var v = this.parseJSXIdentifier();
|
|
g = this.finalize(p, new a.JSXNamespacedName(D, v));
|
|
} else
|
|
g = b;
|
|
return g;
|
|
}, y.prototype.parseJSXStringLiteralAttribute = function() {
|
|
var p = this.createJSXNode(), g = this.nextJSXToken();
|
|
g.type !== 8 && this.throwUnexpectedToken(g);
|
|
var b = this.getTokenRaw(g);
|
|
return this.finalize(p, new u.Literal(g.value, b));
|
|
}, y.prototype.parseJSXExpressionAttribute = function() {
|
|
var p = this.createJSXNode();
|
|
this.expectJSX("{"), this.finishJSX(), this.match("}") && this.tolerateError("JSX attributes must only be assigned a non-empty\
|
|
expression");
|
|
var g = this.parseAssignmentExpression();
|
|
return this.reenterJSX(), this.finalize(p, new a.JSXExpressionContainer(g));
|
|
}, y.prototype.parseJSXAttributeValue = function() {
|
|
return this.matchJSX("{") ? this.parseJSXExpressionAttribute() : this.matchJSX("<") ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute();
|
|
}, y.prototype.parseJSXNameValueAttribute = function() {
|
|
var p = this.createJSXNode(), g = this.parseJSXAttributeName(), b = null;
|
|
return this.matchJSX("=") && (this.expectJSX("="), b = this.parseJSXAttributeValue()), this.finalize(p, new a.JSXAttribute(g, b));
|
|
}, y.prototype.parseJSXSpreadAttribute = function() {
|
|
var p = this.createJSXNode();
|
|
this.expectJSX("{"), this.expectJSX("..."), this.finishJSX();
|
|
var g = this.parseAssignmentExpression();
|
|
return this.reenterJSX(), this.finalize(p, new a.JSXSpreadAttribute(g));
|
|
}, y.prototype.parseJSXAttributes = function() {
|
|
for (var p = []; !this.matchJSX("/") && !this.matchJSX(">"); ) {
|
|
var g = this.matchJSX("{") ? this.parseJSXSpreadAttribute() : this.parseJSXNameValueAttribute();
|
|
p.push(g);
|
|
}
|
|
return p;
|
|
}, y.prototype.parseJSXOpeningElement = function() {
|
|
var p = this.createJSXNode();
|
|
this.expectJSX("<");
|
|
var g = this.parseJSXElementName(), b = this.parseJSXAttributes(), D = this.matchJSX("/");
|
|
return D && this.expectJSX("/"), this.expectJSX(">"), this.finalize(p, new a.JSXOpeningElement(g, D, b));
|
|
}, y.prototype.parseJSXBoundaryElement = function() {
|
|
var p = this.createJSXNode();
|
|
if (this.expectJSX("<"), this.matchJSX("/")) {
|
|
this.expectJSX("/");
|
|
var g = this.parseJSXElementName();
|
|
return this.expectJSX(">"), this.finalize(p, new a.JSXClosingElement(g));
|
|
}
|
|
var b = this.parseJSXElementName(), D = this.parseJSXAttributes(), v = this.matchJSX("/");
|
|
return v && this.expectJSX("/"), this.expectJSX(">"), this.finalize(p, new a.JSXOpeningElement(b, v, D));
|
|
}, y.prototype.parseJSXEmptyExpression = function() {
|
|
var p = this.createJSXChildNode();
|
|
return this.collectComments(), this.lastMarker.index = this.scanner.index, this.lastMarker.line = this.scanner.lineNumber, this.
|
|
lastMarker.column = this.scanner.index - this.scanner.lineStart, this.finalize(p, new a.JSXEmptyExpression());
|
|
}, y.prototype.parseJSXExpressionContainer = function() {
|
|
var p = this.createJSXNode();
|
|
this.expectJSX("{");
|
|
var g;
|
|
return this.matchJSX("}") ? (g = this.parseJSXEmptyExpression(), this.expectJSX("}")) : (this.finishJSX(), g = this.parseAssignmentExpression(),
|
|
this.reenterJSX()), this.finalize(p, new a.JSXExpressionContainer(g));
|
|
}, y.prototype.parseJSXChildren = function() {
|
|
for (var p = []; !this.scanner.eof(); ) {
|
|
var g = this.createJSXChildNode(), b = this.nextJSXText();
|
|
if (b.start < b.end) {
|
|
var D = this.getTokenRaw(b), v = this.finalize(g, new a.JSXText(b.value, D));
|
|
p.push(v);
|
|
}
|
|
if (this.scanner.source[this.scanner.index] === "{") {
|
|
var S = this.parseJSXExpressionContainer();
|
|
p.push(S);
|
|
} else
|
|
break;
|
|
}
|
|
return p;
|
|
}, y.prototype.parseComplexJSXElement = function(p) {
|
|
for (var g = []; !this.scanner.eof(); ) {
|
|
p.children = p.children.concat(this.parseJSXChildren());
|
|
var b = this.createJSXChildNode(), D = this.parseJSXBoundaryElement();
|
|
if (D.type === o.JSXSyntax.JSXOpeningElement) {
|
|
var v = D;
|
|
if (v.selfClosing) {
|
|
var S = this.finalize(b, new a.JSXElement(v, [], null));
|
|
p.children.push(S);
|
|
} else
|
|
g.push(p), p = { node: b, opening: v, closing: null, children: [] };
|
|
}
|
|
if (D.type === o.JSXSyntax.JSXClosingElement) {
|
|
p.closing = D;
|
|
var C = m(p.opening.name), O = m(p.closing.name);
|
|
if (C !== O && this.tolerateError("Expected corresponding JSX closing tag for %0", C), g.length > 0) {
|
|
var S = this.finalize(p.node, new a.JSXElement(p.opening, p.children, p.closing));
|
|
p = g[g.length - 1], p.children.push(S), g.pop();
|
|
} else
|
|
break;
|
|
}
|
|
}
|
|
return p;
|
|
}, y.prototype.parseJSXElement = function() {
|
|
var p = this.createJSXNode(), g = this.parseJSXOpeningElement(), b = [], D = null;
|
|
if (!g.selfClosing) {
|
|
var v = this.parseComplexJSXElement({ node: p, opening: g, closing: D, children: b });
|
|
b = v.children, D = v.closing;
|
|
}
|
|
return this.finalize(p, new a.JSXElement(g, b, D));
|
|
}, y.prototype.parseJSXRoot = function() {
|
|
this.config.tokens && this.tokens.pop(), this.startJSX();
|
|
var p = this.parseJSXElement();
|
|
return this.finishJSX(), p;
|
|
}, y.prototype.isStartOfExpression = function() {
|
|
return d.prototype.isStartOfExpression.call(this) || this.match("<");
|
|
}, y;
|
|
}(l.Parser);
|
|
t.JSXParser = h;
|
|
},
|
|
/* 4 */
|
|
/***/
|
|
function(e, t) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
var r = {
|
|
// Unicode v8.0.0 NonAsciiIdentifierStart:
|
|
NonAsciiIdentifierStart: /[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\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\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\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\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-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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-\u2C2E\u2C30-\u2C5E\u2C60-\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
|
|
// Unicode v8.0.0 NonAsciiIdentifierPart:
|
|
NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
|
|
};
|
|
t.Character = {
|
|
/* tslint:disable:no-bitwise */
|
|
fromCodePoint: /* @__PURE__ */ s(function(i) {
|
|
return i < 65536 ? String.fromCharCode(i) : String.fromCharCode(55296 + (i - 65536 >> 10)) + String.fromCharCode(56320 + (i - 65536 &
|
|
1023));
|
|
}, "fromCodePoint"),
|
|
// https://tc39.github.io/ecma262/#sec-white-space
|
|
isWhiteSpace: /* @__PURE__ */ s(function(i) {
|
|
return i === 32 || i === 9 || i === 11 || i === 12 || i === 160 || i >= 5760 && [5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198,
|
|
8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279].indexOf(i) >= 0;
|
|
}, "isWhiteSpace"),
|
|
// https://tc39.github.io/ecma262/#sec-line-terminators
|
|
isLineTerminator: /* @__PURE__ */ s(function(i) {
|
|
return i === 10 || i === 13 || i === 8232 || i === 8233;
|
|
}, "isLineTerminator"),
|
|
// https://tc39.github.io/ecma262/#sec-names-and-keywords
|
|
isIdentifierStart: /* @__PURE__ */ s(function(i) {
|
|
return i === 36 || i === 95 || i >= 65 && i <= 90 || i >= 97 && i <= 122 || i === 92 || i >= 128 && r.NonAsciiIdentifierStart.
|
|
test(t.Character.fromCodePoint(i));
|
|
}, "isIdentifierStart"),
|
|
isIdentifierPart: /* @__PURE__ */ s(function(i) {
|
|
return i === 36 || i === 95 || i >= 65 && i <= 90 || i >= 97 && i <= 122 || i >= 48 && i <= 57 || i === 92 || i >= 128 && r.NonAsciiIdentifierPart.
|
|
test(t.Character.fromCodePoint(i));
|
|
}, "isIdentifierPart"),
|
|
// https://tc39.github.io/ecma262/#sec-literals-numeric-literals
|
|
isDecimalDigit: /* @__PURE__ */ s(function(i) {
|
|
return i >= 48 && i <= 57;
|
|
}, "isDecimalDigit"),
|
|
isHexDigit: /* @__PURE__ */ s(function(i) {
|
|
return i >= 48 && i <= 57 || i >= 65 && i <= 70 || i >= 97 && i <= 102;
|
|
}, "isHexDigit"),
|
|
isOctalDigit: /* @__PURE__ */ s(function(i) {
|
|
return i >= 48 && i <= 55;
|
|
}, "isOctalDigit")
|
|
};
|
|
},
|
|
/* 5 */
|
|
/***/
|
|
function(e, t, r) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
var i = r(6), n = function() {
|
|
function p(g) {
|
|
this.type = i.JSXSyntax.JSXClosingElement, this.name = g;
|
|
}
|
|
return s(p, "JSXClosingElement"), p;
|
|
}();
|
|
t.JSXClosingElement = n;
|
|
var a = function() {
|
|
function p(g, b, D) {
|
|
this.type = i.JSXSyntax.JSXElement, this.openingElement = g, this.children = b, this.closingElement = D;
|
|
}
|
|
return s(p, "JSXElement"), p;
|
|
}();
|
|
t.JSXElement = a;
|
|
var o = function() {
|
|
function p() {
|
|
this.type = i.JSXSyntax.JSXEmptyExpression;
|
|
}
|
|
return s(p, "JSXEmptyExpression"), p;
|
|
}();
|
|
t.JSXEmptyExpression = o;
|
|
var u = function() {
|
|
function p(g) {
|
|
this.type = i.JSXSyntax.JSXExpressionContainer, this.expression = g;
|
|
}
|
|
return s(p, "JSXExpressionContainer"), p;
|
|
}();
|
|
t.JSXExpressionContainer = u;
|
|
var l = function() {
|
|
function p(g) {
|
|
this.type = i.JSXSyntax.JSXIdentifier, this.name = g;
|
|
}
|
|
return s(p, "JSXIdentifier"), p;
|
|
}();
|
|
t.JSXIdentifier = l;
|
|
var c = function() {
|
|
function p(g, b) {
|
|
this.type = i.JSXSyntax.JSXMemberExpression, this.object = g, this.property = b;
|
|
}
|
|
return s(p, "JSXMemberExpression"), p;
|
|
}();
|
|
t.JSXMemberExpression = c;
|
|
var f = function() {
|
|
function p(g, b) {
|
|
this.type = i.JSXSyntax.JSXAttribute, this.name = g, this.value = b;
|
|
}
|
|
return s(p, "JSXAttribute"), p;
|
|
}();
|
|
t.JSXAttribute = f;
|
|
var m = function() {
|
|
function p(g, b) {
|
|
this.type = i.JSXSyntax.JSXNamespacedName, this.namespace = g, this.name = b;
|
|
}
|
|
return s(p, "JSXNamespacedName"), p;
|
|
}();
|
|
t.JSXNamespacedName = m;
|
|
var h = function() {
|
|
function p(g, b, D) {
|
|
this.type = i.JSXSyntax.JSXOpeningElement, this.name = g, this.selfClosing = b, this.attributes = D;
|
|
}
|
|
return s(p, "JSXOpeningElement"), p;
|
|
}();
|
|
t.JSXOpeningElement = h;
|
|
var d = function() {
|
|
function p(g) {
|
|
this.type = i.JSXSyntax.JSXSpreadAttribute, this.argument = g;
|
|
}
|
|
return s(p, "JSXSpreadAttribute"), p;
|
|
}();
|
|
t.JSXSpreadAttribute = d;
|
|
var y = function() {
|
|
function p(g, b) {
|
|
this.type = i.JSXSyntax.JSXText, this.value = g, this.raw = b;
|
|
}
|
|
return s(p, "JSXText"), p;
|
|
}();
|
|
t.JSXText = y;
|
|
},
|
|
/* 6 */
|
|
/***/
|
|
function(e, t) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.JSXSyntax = {
|
|
JSXAttribute: "JSXAttribute",
|
|
JSXClosingElement: "JSXClosingElement",
|
|
JSXElement: "JSXElement",
|
|
JSXEmptyExpression: "JSXEmptyExpression",
|
|
JSXExpressionContainer: "JSXExpressionContainer",
|
|
JSXIdentifier: "JSXIdentifier",
|
|
JSXMemberExpression: "JSXMemberExpression",
|
|
JSXNamespacedName: "JSXNamespacedName",
|
|
JSXOpeningElement: "JSXOpeningElement",
|
|
JSXSpreadAttribute: "JSXSpreadAttribute",
|
|
JSXText: "JSXText"
|
|
};
|
|
},
|
|
/* 7 */
|
|
/***/
|
|
function(e, t, r) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
var i = r(2), n = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ArrayExpression, this.elements = Q;
|
|
}
|
|
return s(X, "ArrayExpression"), X;
|
|
}();
|
|
t.ArrayExpression = n;
|
|
var a = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ArrayPattern, this.elements = Q;
|
|
}
|
|
return s(X, "ArrayPattern"), X;
|
|
}();
|
|
t.ArrayPattern = a;
|
|
var o = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.ArrowFunctionExpression, this.id = null, this.params = Q, this.body = me, this.generator = !1, this.expression =
|
|
Xe, this.async = !1;
|
|
}
|
|
return s(X, "ArrowFunctionExpression"), X;
|
|
}();
|
|
t.ArrowFunctionExpression = o;
|
|
var u = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.AssignmentExpression, this.operator = Q, this.left = me, this.right = Xe;
|
|
}
|
|
return s(X, "AssignmentExpression"), X;
|
|
}();
|
|
t.AssignmentExpression = u;
|
|
var l = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.AssignmentPattern, this.left = Q, this.right = me;
|
|
}
|
|
return s(X, "AssignmentPattern"), X;
|
|
}();
|
|
t.AssignmentPattern = l;
|
|
var c = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.ArrowFunctionExpression, this.id = null, this.params = Q, this.body = me, this.generator = !1, this.expression =
|
|
Xe, this.async = !0;
|
|
}
|
|
return s(X, "AsyncArrowFunctionExpression"), X;
|
|
}();
|
|
t.AsyncArrowFunctionExpression = c;
|
|
var f = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.FunctionDeclaration, this.id = Q, this.params = me, this.body = Xe, this.generator = !1, this.expression =
|
|
!1, this.async = !0;
|
|
}
|
|
return s(X, "AsyncFunctionDeclaration"), X;
|
|
}();
|
|
t.AsyncFunctionDeclaration = f;
|
|
var m = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.FunctionExpression, this.id = Q, this.params = me, this.body = Xe, this.generator = !1, this.expression =
|
|
!1, this.async = !0;
|
|
}
|
|
return s(X, "AsyncFunctionExpression"), X;
|
|
}();
|
|
t.AsyncFunctionExpression = m;
|
|
var h = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.AwaitExpression, this.argument = Q;
|
|
}
|
|
return s(X, "AwaitExpression"), X;
|
|
}();
|
|
t.AwaitExpression = h;
|
|
var d = function() {
|
|
function X(Q, me, Xe) {
|
|
var Zr = Q === "||" || Q === "&&";
|
|
this.type = Zr ? i.Syntax.LogicalExpression : i.Syntax.BinaryExpression, this.operator = Q, this.left = me, this.right = Xe;
|
|
}
|
|
return s(X, "BinaryExpression"), X;
|
|
}();
|
|
t.BinaryExpression = d;
|
|
var y = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.BlockStatement, this.body = Q;
|
|
}
|
|
return s(X, "BlockStatement"), X;
|
|
}();
|
|
t.BlockStatement = y;
|
|
var p = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.BreakStatement, this.label = Q;
|
|
}
|
|
return s(X, "BreakStatement"), X;
|
|
}();
|
|
t.BreakStatement = p;
|
|
var g = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.CallExpression, this.callee = Q, this.arguments = me;
|
|
}
|
|
return s(X, "CallExpression"), X;
|
|
}();
|
|
t.CallExpression = g;
|
|
var b = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.CatchClause, this.param = Q, this.body = me;
|
|
}
|
|
return s(X, "CatchClause"), X;
|
|
}();
|
|
t.CatchClause = b;
|
|
var D = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ClassBody, this.body = Q;
|
|
}
|
|
return s(X, "ClassBody"), X;
|
|
}();
|
|
t.ClassBody = D;
|
|
var v = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.ClassDeclaration, this.id = Q, this.superClass = me, this.body = Xe;
|
|
}
|
|
return s(X, "ClassDeclaration"), X;
|
|
}();
|
|
t.ClassDeclaration = v;
|
|
var S = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.ClassExpression, this.id = Q, this.superClass = me, this.body = Xe;
|
|
}
|
|
return s(X, "ClassExpression"), X;
|
|
}();
|
|
t.ClassExpression = S;
|
|
var C = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.MemberExpression, this.computed = !0, this.object = Q, this.property = me;
|
|
}
|
|
return s(X, "ComputedMemberExpression"), X;
|
|
}();
|
|
t.ComputedMemberExpression = C;
|
|
var O = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.ConditionalExpression, this.test = Q, this.consequent = me, this.alternate = Xe;
|
|
}
|
|
return s(X, "ConditionalExpression"), X;
|
|
}();
|
|
t.ConditionalExpression = O;
|
|
var k = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ContinueStatement, this.label = Q;
|
|
}
|
|
return s(X, "ContinueStatement"), X;
|
|
}();
|
|
t.ContinueStatement = k;
|
|
var U = function() {
|
|
function X() {
|
|
this.type = i.Syntax.DebuggerStatement;
|
|
}
|
|
return s(X, "DebuggerStatement"), X;
|
|
}();
|
|
t.DebuggerStatement = U;
|
|
var j = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.ExpressionStatement, this.expression = Q, this.directive = me;
|
|
}
|
|
return s(X, "Directive"), X;
|
|
}();
|
|
t.Directive = j;
|
|
var K = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.DoWhileStatement, this.body = Q, this.test = me;
|
|
}
|
|
return s(X, "DoWhileStatement"), X;
|
|
}();
|
|
t.DoWhileStatement = K;
|
|
var R = function() {
|
|
function X() {
|
|
this.type = i.Syntax.EmptyStatement;
|
|
}
|
|
return s(X, "EmptyStatement"), X;
|
|
}();
|
|
t.EmptyStatement = R;
|
|
var ee = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ExportAllDeclaration, this.source = Q;
|
|
}
|
|
return s(X, "ExportAllDeclaration"), X;
|
|
}();
|
|
t.ExportAllDeclaration = ee;
|
|
var re = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ExportDefaultDeclaration, this.declaration = Q;
|
|
}
|
|
return s(X, "ExportDefaultDeclaration"), X;
|
|
}();
|
|
t.ExportDefaultDeclaration = re;
|
|
var te = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.ExportNamedDeclaration, this.declaration = Q, this.specifiers = me, this.source = Xe;
|
|
}
|
|
return s(X, "ExportNamedDeclaration"), X;
|
|
}();
|
|
t.ExportNamedDeclaration = te;
|
|
var Z = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.ExportSpecifier, this.exported = me, this.local = Q;
|
|
}
|
|
return s(X, "ExportSpecifier"), X;
|
|
}();
|
|
t.ExportSpecifier = Z;
|
|
var ie = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ExpressionStatement, this.expression = Q;
|
|
}
|
|
return s(X, "ExpressionStatement"), X;
|
|
}();
|
|
t.ExpressionStatement = ie;
|
|
var ae = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.ForInStatement, this.left = Q, this.right = me, this.body = Xe, this.each = !1;
|
|
}
|
|
return s(X, "ForInStatement"), X;
|
|
}();
|
|
t.ForInStatement = ae;
|
|
var Y = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.ForOfStatement, this.left = Q, this.right = me, this.body = Xe;
|
|
}
|
|
return s(X, "ForOfStatement"), X;
|
|
}();
|
|
t.ForOfStatement = Y;
|
|
var he = function() {
|
|
function X(Q, me, Xe, Zr) {
|
|
this.type = i.Syntax.ForStatement, this.init = Q, this.test = me, this.update = Xe, this.body = Zr;
|
|
}
|
|
return s(X, "ForStatement"), X;
|
|
}();
|
|
t.ForStatement = he;
|
|
var ye = function() {
|
|
function X(Q, me, Xe, Zr) {
|
|
this.type = i.Syntax.FunctionDeclaration, this.id = Q, this.params = me, this.body = Xe, this.generator = Zr, this.expression =
|
|
!1, this.async = !1;
|
|
}
|
|
return s(X, "FunctionDeclaration"), X;
|
|
}();
|
|
t.FunctionDeclaration = ye;
|
|
var Be = function() {
|
|
function X(Q, me, Xe, Zr) {
|
|
this.type = i.Syntax.FunctionExpression, this.id = Q, this.params = me, this.body = Xe, this.generator = Zr, this.expression =
|
|
!1, this.async = !1;
|
|
}
|
|
return s(X, "FunctionExpression"), X;
|
|
}();
|
|
t.FunctionExpression = Be;
|
|
var de = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.Identifier, this.name = Q;
|
|
}
|
|
return s(X, "Identifier"), X;
|
|
}();
|
|
t.Identifier = de;
|
|
var be = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.IfStatement, this.test = Q, this.consequent = me, this.alternate = Xe;
|
|
}
|
|
return s(X, "IfStatement"), X;
|
|
}();
|
|
t.IfStatement = be;
|
|
var Me = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.ImportDeclaration, this.specifiers = Q, this.source = me;
|
|
}
|
|
return s(X, "ImportDeclaration"), X;
|
|
}();
|
|
t.ImportDeclaration = Me;
|
|
var gt = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ImportDefaultSpecifier, this.local = Q;
|
|
}
|
|
return s(X, "ImportDefaultSpecifier"), X;
|
|
}();
|
|
t.ImportDefaultSpecifier = gt;
|
|
var Dt = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ImportNamespaceSpecifier, this.local = Q;
|
|
}
|
|
return s(X, "ImportNamespaceSpecifier"), X;
|
|
}();
|
|
t.ImportNamespaceSpecifier = Dt;
|
|
var $t = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.ImportSpecifier, this.local = Q, this.imported = me;
|
|
}
|
|
return s(X, "ImportSpecifier"), X;
|
|
}();
|
|
t.ImportSpecifier = $t;
|
|
var vr = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.LabeledStatement, this.label = Q, this.body = me;
|
|
}
|
|
return s(X, "LabeledStatement"), X;
|
|
}();
|
|
t.LabeledStatement = vr;
|
|
var Ir = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.Literal, this.value = Q, this.raw = me;
|
|
}
|
|
return s(X, "Literal"), X;
|
|
}();
|
|
t.Literal = Ir;
|
|
var Er = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.MetaProperty, this.meta = Q, this.property = me;
|
|
}
|
|
return s(X, "MetaProperty"), X;
|
|
}();
|
|
t.MetaProperty = Er;
|
|
var Vt = function() {
|
|
function X(Q, me, Xe, Zr, yo) {
|
|
this.type = i.Syntax.MethodDefinition, this.key = Q, this.computed = me, this.value = Xe, this.kind = Zr, this.static = yo;
|
|
}
|
|
return s(X, "MethodDefinition"), X;
|
|
}();
|
|
t.MethodDefinition = Vt;
|
|
var qr = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.Program, this.body = Q, this.sourceType = "module";
|
|
}
|
|
return s(X, "Module"), X;
|
|
}();
|
|
t.Module = qr;
|
|
var ci = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.NewExpression, this.callee = Q, this.arguments = me;
|
|
}
|
|
return s(X, "NewExpression"), X;
|
|
}();
|
|
t.NewExpression = ci;
|
|
var pa = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ObjectExpression, this.properties = Q;
|
|
}
|
|
return s(X, "ObjectExpression"), X;
|
|
}();
|
|
t.ObjectExpression = pa;
|
|
var $i = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ObjectPattern, this.properties = Q;
|
|
}
|
|
return s(X, "ObjectPattern"), X;
|
|
}();
|
|
t.ObjectPattern = $i;
|
|
var Ce = function() {
|
|
function X(Q, me, Xe, Zr, yo, ms) {
|
|
this.type = i.Syntax.Property, this.key = me, this.computed = Xe, this.value = Zr, this.kind = Q, this.method = yo, this.shorthand =
|
|
ms;
|
|
}
|
|
return s(X, "Property"), X;
|
|
}();
|
|
t.Property = Ce;
|
|
var ge = function() {
|
|
function X(Q, me, Xe, Zr) {
|
|
this.type = i.Syntax.Literal, this.value = Q, this.raw = me, this.regex = { pattern: Xe, flags: Zr };
|
|
}
|
|
return s(X, "RegexLiteral"), X;
|
|
}();
|
|
t.RegexLiteral = ge;
|
|
var ze = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.RestElement, this.argument = Q;
|
|
}
|
|
return s(X, "RestElement"), X;
|
|
}();
|
|
t.RestElement = ze;
|
|
var Ft = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ReturnStatement, this.argument = Q;
|
|
}
|
|
return s(X, "ReturnStatement"), X;
|
|
}();
|
|
t.ReturnStatement = Ft;
|
|
var Ht = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.Program, this.body = Q, this.sourceType = "script";
|
|
}
|
|
return s(X, "Script"), X;
|
|
}();
|
|
t.Script = Ht;
|
|
var J = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.SequenceExpression, this.expressions = Q;
|
|
}
|
|
return s(X, "SequenceExpression"), X;
|
|
}();
|
|
t.SequenceExpression = J;
|
|
var se = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.SpreadElement, this.argument = Q;
|
|
}
|
|
return s(X, "SpreadElement"), X;
|
|
}();
|
|
t.SpreadElement = se;
|
|
var le = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.MemberExpression, this.computed = !1, this.object = Q, this.property = me;
|
|
}
|
|
return s(X, "StaticMemberExpression"), X;
|
|
}();
|
|
t.StaticMemberExpression = le;
|
|
var pe = function() {
|
|
function X() {
|
|
this.type = i.Syntax.Super;
|
|
}
|
|
return s(X, "Super"), X;
|
|
}();
|
|
t.Super = pe;
|
|
var Pe = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.SwitchCase, this.test = Q, this.consequent = me;
|
|
}
|
|
return s(X, "SwitchCase"), X;
|
|
}();
|
|
t.SwitchCase = Pe;
|
|
var Ae = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.SwitchStatement, this.discriminant = Q, this.cases = me;
|
|
}
|
|
return s(X, "SwitchStatement"), X;
|
|
}();
|
|
t.SwitchStatement = Ae;
|
|
var We = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.TaggedTemplateExpression, this.tag = Q, this.quasi = me;
|
|
}
|
|
return s(X, "TaggedTemplateExpression"), X;
|
|
}();
|
|
t.TaggedTemplateExpression = We;
|
|
var ot = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.TemplateElement, this.value = Q, this.tail = me;
|
|
}
|
|
return s(X, "TemplateElement"), X;
|
|
}();
|
|
t.TemplateElement = ot;
|
|
var $e = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.TemplateLiteral, this.quasis = Q, this.expressions = me;
|
|
}
|
|
return s(X, "TemplateLiteral"), X;
|
|
}();
|
|
t.TemplateLiteral = $e;
|
|
var Je = function() {
|
|
function X() {
|
|
this.type = i.Syntax.ThisExpression;
|
|
}
|
|
return s(X, "ThisExpression"), X;
|
|
}();
|
|
t.ThisExpression = Je;
|
|
var Bt = function() {
|
|
function X(Q) {
|
|
this.type = i.Syntax.ThrowStatement, this.argument = Q;
|
|
}
|
|
return s(X, "ThrowStatement"), X;
|
|
}();
|
|
t.ThrowStatement = Bt;
|
|
var dt = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.TryStatement, this.block = Q, this.handler = me, this.finalizer = Xe;
|
|
}
|
|
return s(X, "TryStatement"), X;
|
|
}();
|
|
t.TryStatement = dt;
|
|
var pt = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.UnaryExpression, this.operator = Q, this.argument = me, this.prefix = !0;
|
|
}
|
|
return s(X, "UnaryExpression"), X;
|
|
}();
|
|
t.UnaryExpression = pt;
|
|
var br = function() {
|
|
function X(Q, me, Xe) {
|
|
this.type = i.Syntax.UpdateExpression, this.operator = Q, this.argument = me, this.prefix = Xe;
|
|
}
|
|
return s(X, "UpdateExpression"), X;
|
|
}();
|
|
t.UpdateExpression = br;
|
|
var Ei = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.VariableDeclaration, this.declarations = Q, this.kind = me;
|
|
}
|
|
return s(X, "VariableDeclaration"), X;
|
|
}();
|
|
t.VariableDeclaration = Ei;
|
|
var mn = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.VariableDeclarator, this.id = Q, this.init = me;
|
|
}
|
|
return s(X, "VariableDeclarator"), X;
|
|
}();
|
|
t.VariableDeclarator = mn;
|
|
var yn = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.WhileStatement, this.test = Q, this.body = me;
|
|
}
|
|
return s(X, "WhileStatement"), X;
|
|
}();
|
|
t.WhileStatement = yn;
|
|
var gn = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.WithStatement, this.object = Q, this.body = me;
|
|
}
|
|
return s(X, "WithStatement"), X;
|
|
}();
|
|
t.WithStatement = gn;
|
|
var ha = function() {
|
|
function X(Q, me) {
|
|
this.type = i.Syntax.YieldExpression, this.argument = Q, this.delegate = me;
|
|
}
|
|
return s(X, "YieldExpression"), X;
|
|
}();
|
|
t.YieldExpression = ha;
|
|
},
|
|
/* 8 */
|
|
/***/
|
|
function(e, t, r) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
var i = r(9), n = r(10), a = r(11), o = r(7), u = r(12), l = r(2), c = r(13), f = "ArrowParameterPlaceHolder", m = function() {
|
|
function h(d, y, p) {
|
|
y === void 0 && (y = {}), this.config = {
|
|
range: typeof y.range == "boolean" && y.range,
|
|
loc: typeof y.loc == "boolean" && y.loc,
|
|
source: null,
|
|
tokens: typeof y.tokens == "boolean" && y.tokens,
|
|
comment: typeof y.comment == "boolean" && y.comment,
|
|
tolerant: typeof y.tolerant == "boolean" && y.tolerant
|
|
}, this.config.loc && y.source && y.source !== null && (this.config.source = String(y.source)), this.delegate = p, this.errorHandler =
|
|
new n.ErrorHandler(), this.errorHandler.tolerant = this.config.tolerant, this.scanner = new u.Scanner(d, this.errorHandler), this.
|
|
scanner.trackComment = this.config.comment, this.operatorPrecedence = {
|
|
")": 0,
|
|
";": 0,
|
|
",": 0,
|
|
"=": 0,
|
|
"]": 0,
|
|
"||": 1,
|
|
"&&": 2,
|
|
"|": 3,
|
|
"^": 4,
|
|
"&": 5,
|
|
"==": 6,
|
|
"!=": 6,
|
|
"===": 6,
|
|
"!==": 6,
|
|
"<": 7,
|
|
">": 7,
|
|
"<=": 7,
|
|
">=": 7,
|
|
"<<": 8,
|
|
">>": 8,
|
|
">>>": 8,
|
|
"+": 9,
|
|
"-": 9,
|
|
"*": 11,
|
|
"/": 11,
|
|
"%": 11
|
|
}, this.lookahead = {
|
|
type: 2,
|
|
value: "",
|
|
lineNumber: this.scanner.lineNumber,
|
|
lineStart: 0,
|
|
start: 0,
|
|
end: 0
|
|
}, this.hasLineTerminator = !1, this.context = {
|
|
isModule: !1,
|
|
await: !1,
|
|
allowIn: !0,
|
|
allowStrictDirective: !0,
|
|
allowYield: !0,
|
|
firstCoverInitializedNameError: null,
|
|
isAssignmentTarget: !1,
|
|
isBindingElement: !1,
|
|
inFunctionBody: !1,
|
|
inIteration: !1,
|
|
inSwitch: !1,
|
|
labelSet: {},
|
|
strict: !1
|
|
}, this.tokens = [], this.startMarker = {
|
|
index: 0,
|
|
line: this.scanner.lineNumber,
|
|
column: 0
|
|
}, this.lastMarker = {
|
|
index: 0,
|
|
line: this.scanner.lineNumber,
|
|
column: 0
|
|
}, this.nextToken(), this.lastMarker = {
|
|
index: this.scanner.index,
|
|
line: this.scanner.lineNumber,
|
|
column: this.scanner.index - this.scanner.lineStart
|
|
};
|
|
}
|
|
return s(h, "Parser"), h.prototype.throwError = function(d) {
|
|
for (var y = [], p = 1; p < arguments.length; p++)
|
|
y[p - 1] = arguments[p];
|
|
var g = Array.prototype.slice.call(arguments, 1), b = d.replace(/%(\d)/g, function(C, O) {
|
|
return i.assert(O < g.length, "Message reference must be in range"), g[O];
|
|
}), D = this.lastMarker.index, v = this.lastMarker.line, S = this.lastMarker.column + 1;
|
|
throw this.errorHandler.createError(D, v, S, b);
|
|
}, h.prototype.tolerateError = function(d) {
|
|
for (var y = [], p = 1; p < arguments.length; p++)
|
|
y[p - 1] = arguments[p];
|
|
var g = Array.prototype.slice.call(arguments, 1), b = d.replace(/%(\d)/g, function(C, O) {
|
|
return i.assert(O < g.length, "Message reference must be in range"), g[O];
|
|
}), D = this.lastMarker.index, v = this.scanner.lineNumber, S = this.lastMarker.column + 1;
|
|
this.errorHandler.tolerateError(D, v, S, b);
|
|
}, h.prototype.unexpectedTokenError = function(d, y) {
|
|
var p = y || a.Messages.UnexpectedToken, g;
|
|
if (d ? (y || (p = d.type === 2 ? a.Messages.UnexpectedEOS : d.type === 3 ? a.Messages.UnexpectedIdentifier : d.type === 6 ? a.
|
|
Messages.UnexpectedNumber : d.type === 8 ? a.Messages.UnexpectedString : d.type === 10 ? a.Messages.UnexpectedTemplate : a.Messages.
|
|
UnexpectedToken, d.type === 4 && (this.scanner.isFutureReservedWord(d.value) ? p = a.Messages.UnexpectedReserved : this.context.
|
|
strict && this.scanner.isStrictModeReservedWord(d.value) && (p = a.Messages.StrictReservedWord))), g = d.value) : g = "ILLEGAL",
|
|
p = p.replace("%0", g), d && typeof d.lineNumber == "number") {
|
|
var b = d.start, D = d.lineNumber, v = this.lastMarker.index - this.lastMarker.column, S = d.start - v + 1;
|
|
return this.errorHandler.createError(b, D, S, p);
|
|
} else {
|
|
var b = this.lastMarker.index, D = this.lastMarker.line, S = this.lastMarker.column + 1;
|
|
return this.errorHandler.createError(b, D, S, p);
|
|
}
|
|
}, h.prototype.throwUnexpectedToken = function(d, y) {
|
|
throw this.unexpectedTokenError(d, y);
|
|
}, h.prototype.tolerateUnexpectedToken = function(d, y) {
|
|
this.errorHandler.tolerate(this.unexpectedTokenError(d, y));
|
|
}, h.prototype.collectComments = function() {
|
|
if (!this.config.comment)
|
|
this.scanner.scanComments();
|
|
else {
|
|
var d = this.scanner.scanComments();
|
|
if (d.length > 0 && this.delegate)
|
|
for (var y = 0; y < d.length; ++y) {
|
|
var p = d[y], g = void 0;
|
|
g = {
|
|
type: p.multiLine ? "BlockComment" : "LineComment",
|
|
value: this.scanner.source.slice(p.slice[0], p.slice[1])
|
|
}, this.config.range && (g.range = p.range), this.config.loc && (g.loc = p.loc);
|
|
var b = {
|
|
start: {
|
|
line: p.loc.start.line,
|
|
column: p.loc.start.column,
|
|
offset: p.range[0]
|
|
},
|
|
end: {
|
|
line: p.loc.end.line,
|
|
column: p.loc.end.column,
|
|
offset: p.range[1]
|
|
}
|
|
};
|
|
this.delegate(g, b);
|
|
}
|
|
}
|
|
}, h.prototype.getTokenRaw = function(d) {
|
|
return this.scanner.source.slice(d.start, d.end);
|
|
}, h.prototype.convertToken = function(d) {
|
|
var y = {
|
|
type: c.TokenName[d.type],
|
|
value: this.getTokenRaw(d)
|
|
};
|
|
if (this.config.range && (y.range = [d.start, d.end]), this.config.loc && (y.loc = {
|
|
start: {
|
|
line: this.startMarker.line,
|
|
column: this.startMarker.column
|
|
},
|
|
end: {
|
|
line: this.scanner.lineNumber,
|
|
column: this.scanner.index - this.scanner.lineStart
|
|
}
|
|
}), d.type === 9) {
|
|
var p = d.pattern, g = d.flags;
|
|
y.regex = { pattern: p, flags: g };
|
|
}
|
|
return y;
|
|
}, h.prototype.nextToken = function() {
|
|
var d = this.lookahead;
|
|
this.lastMarker.index = this.scanner.index, this.lastMarker.line = this.scanner.lineNumber, this.lastMarker.column = this.scanner.
|
|
index - this.scanner.lineStart, this.collectComments(), this.scanner.index !== this.startMarker.index && (this.startMarker.index =
|
|
this.scanner.index, this.startMarker.line = this.scanner.lineNumber, this.startMarker.column = this.scanner.index - this.scanner.
|
|
lineStart);
|
|
var y = this.scanner.lex();
|
|
return this.hasLineTerminator = d.lineNumber !== y.lineNumber, y && this.context.strict && y.type === 3 && this.scanner.isStrictModeReservedWord(
|
|
y.value) && (y.type = 4), this.lookahead = y, this.config.tokens && y.type !== 2 && this.tokens.push(this.convertToken(y)), d;
|
|
}, h.prototype.nextRegexToken = function() {
|
|
this.collectComments();
|
|
var d = this.scanner.scanRegExp();
|
|
return this.config.tokens && (this.tokens.pop(), this.tokens.push(this.convertToken(d))), this.lookahead = d, this.nextToken(),
|
|
d;
|
|
}, h.prototype.createNode = function() {
|
|
return {
|
|
index: this.startMarker.index,
|
|
line: this.startMarker.line,
|
|
column: this.startMarker.column
|
|
};
|
|
}, h.prototype.startNode = function(d, y) {
|
|
y === void 0 && (y = 0);
|
|
var p = d.start - d.lineStart, g = d.lineNumber;
|
|
return p < 0 && (p += y, g--), {
|
|
index: d.start,
|
|
line: g,
|
|
column: p
|
|
};
|
|
}, h.prototype.finalize = function(d, y) {
|
|
if (this.config.range && (y.range = [d.index, this.lastMarker.index]), this.config.loc && (y.loc = {
|
|
start: {
|
|
line: d.line,
|
|
column: d.column
|
|
},
|
|
end: {
|
|
line: this.lastMarker.line,
|
|
column: this.lastMarker.column
|
|
}
|
|
}, this.config.source && (y.loc.source = this.config.source)), this.delegate) {
|
|
var p = {
|
|
start: {
|
|
line: d.line,
|
|
column: d.column,
|
|
offset: d.index
|
|
},
|
|
end: {
|
|
line: this.lastMarker.line,
|
|
column: this.lastMarker.column,
|
|
offset: this.lastMarker.index
|
|
}
|
|
};
|
|
this.delegate(y, p);
|
|
}
|
|
return y;
|
|
}, h.prototype.expect = function(d) {
|
|
var y = this.nextToken();
|
|
(y.type !== 7 || y.value !== d) && this.throwUnexpectedToken(y);
|
|
}, h.prototype.expectCommaSeparator = function() {
|
|
if (this.config.tolerant) {
|
|
var d = this.lookahead;
|
|
d.type === 7 && d.value === "," ? this.nextToken() : d.type === 7 && d.value === ";" ? (this.nextToken(), this.tolerateUnexpectedToken(
|
|
d)) : this.tolerateUnexpectedToken(d, a.Messages.UnexpectedToken);
|
|
} else
|
|
this.expect(",");
|
|
}, h.prototype.expectKeyword = function(d) {
|
|
var y = this.nextToken();
|
|
(y.type !== 4 || y.value !== d) && this.throwUnexpectedToken(y);
|
|
}, h.prototype.match = function(d) {
|
|
return this.lookahead.type === 7 && this.lookahead.value === d;
|
|
}, h.prototype.matchKeyword = function(d) {
|
|
return this.lookahead.type === 4 && this.lookahead.value === d;
|
|
}, h.prototype.matchContextualKeyword = function(d) {
|
|
return this.lookahead.type === 3 && this.lookahead.value === d;
|
|
}, h.prototype.matchAssign = function() {
|
|
if (this.lookahead.type !== 7)
|
|
return !1;
|
|
var d = this.lookahead.value;
|
|
return d === "=" || d === "*=" || d === "**=" || d === "/=" || d === "%=" || d === "+=" || d === "-=" || d === "<<=" || d === "\
|
|
>>=" || d === ">>>=" || d === "&=" || d === "^=" || d === "|=";
|
|
}, h.prototype.isolateCoverGrammar = function(d) {
|
|
var y = this.context.isBindingElement, p = this.context.isAssignmentTarget, g = this.context.firstCoverInitializedNameError;
|
|
this.context.isBindingElement = !0, this.context.isAssignmentTarget = !0, this.context.firstCoverInitializedNameError = null;
|
|
var b = d.call(this);
|
|
return this.context.firstCoverInitializedNameError !== null && this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),
|
|
this.context.isBindingElement = y, this.context.isAssignmentTarget = p, this.context.firstCoverInitializedNameError = g, b;
|
|
}, h.prototype.inheritCoverGrammar = function(d) {
|
|
var y = this.context.isBindingElement, p = this.context.isAssignmentTarget, g = this.context.firstCoverInitializedNameError;
|
|
this.context.isBindingElement = !0, this.context.isAssignmentTarget = !0, this.context.firstCoverInitializedNameError = null;
|
|
var b = d.call(this);
|
|
return this.context.isBindingElement = this.context.isBindingElement && y, this.context.isAssignmentTarget = this.context.isAssignmentTarget &&
|
|
p, this.context.firstCoverInitializedNameError = g || this.context.firstCoverInitializedNameError, b;
|
|
}, h.prototype.consumeSemicolon = function() {
|
|
this.match(";") ? this.nextToken() : this.hasLineTerminator || (this.lookahead.type !== 2 && !this.match("}") && this.throwUnexpectedToken(
|
|
this.lookahead), this.lastMarker.index = this.startMarker.index, this.lastMarker.line = this.startMarker.line, this.lastMarker.
|
|
column = this.startMarker.column);
|
|
}, h.prototype.parsePrimaryExpression = function() {
|
|
var d = this.createNode(), y, p, g;
|
|
switch (this.lookahead.type) {
|
|
case 3:
|
|
(this.context.isModule || this.context.await) && this.lookahead.value === "await" && this.tolerateUnexpectedToken(this.lookahead),
|
|
y = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(d, new o.Identifier(this.nextToken().value));
|
|
break;
|
|
case 6:
|
|
case 8:
|
|
this.context.strict && this.lookahead.octal && this.tolerateUnexpectedToken(this.lookahead, a.Messages.StrictOctalLiteral),
|
|
this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1, p = this.nextToken(), g = this.getTokenRaw(p), y =
|
|
this.finalize(d, new o.Literal(p.value, g));
|
|
break;
|
|
case 1:
|
|
this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1, p = this.nextToken(), g = this.getTokenRaw(p), y =
|
|
this.finalize(d, new o.Literal(p.value === "true", g));
|
|
break;
|
|
case 5:
|
|
this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1, p = this.nextToken(), g = this.getTokenRaw(p), y =
|
|
this.finalize(d, new o.Literal(null, g));
|
|
break;
|
|
case 10:
|
|
y = this.parseTemplateLiteral();
|
|
break;
|
|
case 7:
|
|
switch (this.lookahead.value) {
|
|
case "(":
|
|
this.context.isBindingElement = !1, y = this.inheritCoverGrammar(this.parseGroupExpression);
|
|
break;
|
|
case "[":
|
|
y = this.inheritCoverGrammar(this.parseArrayInitializer);
|
|
break;
|
|
case "{":
|
|
y = this.inheritCoverGrammar(this.parseObjectInitializer);
|
|
break;
|
|
case "/":
|
|
case "/=":
|
|
this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1, this.scanner.index = this.startMarker.index,
|
|
p = this.nextRegexToken(), g = this.getTokenRaw(p), y = this.finalize(d, new o.RegexLiteral(p.regex, g, p.pattern, p.flags));
|
|
break;
|
|
default:
|
|
y = this.throwUnexpectedToken(this.nextToken());
|
|
}
|
|
break;
|
|
case 4:
|
|
!this.context.strict && this.context.allowYield && this.matchKeyword("yield") ? y = this.parseIdentifierName() : !this.context.
|
|
strict && this.matchKeyword("let") ? y = this.finalize(d, new o.Identifier(this.nextToken().value)) : (this.context.isAssignmentTarget =
|
|
!1, this.context.isBindingElement = !1, this.matchKeyword("function") ? y = this.parseFunctionExpression() : this.matchKeyword(
|
|
"this") ? (this.nextToken(), y = this.finalize(d, new o.ThisExpression())) : this.matchKeyword("class") ? y = this.parseClassExpression() :
|
|
y = this.throwUnexpectedToken(this.nextToken()));
|
|
break;
|
|
default:
|
|
y = this.throwUnexpectedToken(this.nextToken());
|
|
}
|
|
return y;
|
|
}, h.prototype.parseSpreadElement = function() {
|
|
var d = this.createNode();
|
|
this.expect("...");
|
|
var y = this.inheritCoverGrammar(this.parseAssignmentExpression);
|
|
return this.finalize(d, new o.SpreadElement(y));
|
|
}, h.prototype.parseArrayInitializer = function() {
|
|
var d = this.createNode(), y = [];
|
|
for (this.expect("["); !this.match("]"); )
|
|
if (this.match(","))
|
|
this.nextToken(), y.push(null);
|
|
else if (this.match("...")) {
|
|
var p = this.parseSpreadElement();
|
|
this.match("]") || (this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1, this.expect(",")), y.push(p);
|
|
} else
|
|
y.push(this.inheritCoverGrammar(this.parseAssignmentExpression)), this.match("]") || this.expect(",");
|
|
return this.expect("]"), this.finalize(d, new o.ArrayExpression(y));
|
|
}, h.prototype.parsePropertyMethod = function(d) {
|
|
this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1;
|
|
var y = this.context.strict, p = this.context.allowStrictDirective;
|
|
this.context.allowStrictDirective = d.simple;
|
|
var g = this.isolateCoverGrammar(this.parseFunctionSourceElements);
|
|
return this.context.strict && d.firstRestricted && this.tolerateUnexpectedToken(d.firstRestricted, d.message), this.context.strict &&
|
|
d.stricted && this.tolerateUnexpectedToken(d.stricted, d.message), this.context.strict = y, this.context.allowStrictDirective =
|
|
p, g;
|
|
}, h.prototype.parsePropertyMethodFunction = function() {
|
|
var d = !1, y = this.createNode(), p = this.context.allowYield;
|
|
this.context.allowYield = !0;
|
|
var g = this.parseFormalParameters(), b = this.parsePropertyMethod(g);
|
|
return this.context.allowYield = p, this.finalize(y, new o.FunctionExpression(null, g.params, b, d));
|
|
}, h.prototype.parsePropertyMethodAsyncFunction = function() {
|
|
var d = this.createNode(), y = this.context.allowYield, p = this.context.await;
|
|
this.context.allowYield = !1, this.context.await = !0;
|
|
var g = this.parseFormalParameters(), b = this.parsePropertyMethod(g);
|
|
return this.context.allowYield = y, this.context.await = p, this.finalize(d, new o.AsyncFunctionExpression(null, g.params, b));
|
|
}, h.prototype.parseObjectPropertyKey = function() {
|
|
var d = this.createNode(), y = this.nextToken(), p;
|
|
switch (y.type) {
|
|
case 8:
|
|
case 6:
|
|
this.context.strict && y.octal && this.tolerateUnexpectedToken(y, a.Messages.StrictOctalLiteral);
|
|
var g = this.getTokenRaw(y);
|
|
p = this.finalize(d, new o.Literal(y.value, g));
|
|
break;
|
|
case 3:
|
|
case 1:
|
|
case 5:
|
|
case 4:
|
|
p = this.finalize(d, new o.Identifier(y.value));
|
|
break;
|
|
case 7:
|
|
y.value === "[" ? (p = this.isolateCoverGrammar(this.parseAssignmentExpression), this.expect("]")) : p = this.throwUnexpectedToken(
|
|
y);
|
|
break;
|
|
default:
|
|
p = this.throwUnexpectedToken(y);
|
|
}
|
|
return p;
|
|
}, h.prototype.isPropertyKey = function(d, y) {
|
|
return d.type === l.Syntax.Identifier && d.name === y || d.type === l.Syntax.Literal && d.value === y;
|
|
}, h.prototype.parseObjectProperty = function(d) {
|
|
var y = this.createNode(), p = this.lookahead, g, b = null, D = null, v = !1, S = !1, C = !1, O = !1;
|
|
if (p.type === 3) {
|
|
var k = p.value;
|
|
this.nextToken(), v = this.match("["), O = !this.hasLineTerminator && k === "async" && !this.match(":") && !this.match("(") &&
|
|
!this.match("*") && !this.match(","), b = O ? this.parseObjectPropertyKey() : this.finalize(y, new o.Identifier(k));
|
|
} else this.match("*") ? this.nextToken() : (v = this.match("["), b = this.parseObjectPropertyKey());
|
|
var U = this.qualifiedPropertyName(this.lookahead);
|
|
if (p.type === 3 && !O && p.value === "get" && U)
|
|
g = "get", v = this.match("["), b = this.parseObjectPropertyKey(), this.context.allowYield = !1, D = this.parseGetterMethod();
|
|
else if (p.type === 3 && !O && p.value === "set" && U)
|
|
g = "set", v = this.match("["), b = this.parseObjectPropertyKey(), D = this.parseSetterMethod();
|
|
else if (p.type === 7 && p.value === "*" && U)
|
|
g = "init", v = this.match("["), b = this.parseObjectPropertyKey(), D = this.parseGeneratorMethod(), S = !0;
|
|
else if (b || this.throwUnexpectedToken(this.lookahead), g = "init", this.match(":") && !O)
|
|
!v && this.isPropertyKey(b, "__proto__") && (d.value && this.tolerateError(a.Messages.DuplicateProtoProperty), d.value = !0),
|
|
this.nextToken(), D = this.inheritCoverGrammar(this.parseAssignmentExpression);
|
|
else if (this.match("("))
|
|
D = O ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(), S = !0;
|
|
else if (p.type === 3) {
|
|
var k = this.finalize(y, new o.Identifier(p.value));
|
|
if (this.match("=")) {
|
|
this.context.firstCoverInitializedNameError = this.lookahead, this.nextToken(), C = !0;
|
|
var j = this.isolateCoverGrammar(this.parseAssignmentExpression);
|
|
D = this.finalize(y, new o.AssignmentPattern(k, j));
|
|
} else
|
|
C = !0, D = k;
|
|
} else
|
|
this.throwUnexpectedToken(this.nextToken());
|
|
return this.finalize(y, new o.Property(g, b, v, D, S, C));
|
|
}, h.prototype.parseObjectInitializer = function() {
|
|
var d = this.createNode();
|
|
this.expect("{");
|
|
for (var y = [], p = { value: !1 }; !this.match("}"); )
|
|
y.push(this.parseObjectProperty(p)), this.match("}") || this.expectCommaSeparator();
|
|
return this.expect("}"), this.finalize(d, new o.ObjectExpression(y));
|
|
}, h.prototype.parseTemplateHead = function() {
|
|
i.assert(this.lookahead.head, "Template literal must start with a template head");
|
|
var d = this.createNode(), y = this.nextToken(), p = y.value, g = y.cooked;
|
|
return this.finalize(d, new o.TemplateElement({ raw: p, cooked: g }, y.tail));
|
|
}, h.prototype.parseTemplateElement = function() {
|
|
this.lookahead.type !== 10 && this.throwUnexpectedToken();
|
|
var d = this.createNode(), y = this.nextToken(), p = y.value, g = y.cooked;
|
|
return this.finalize(d, new o.TemplateElement({ raw: p, cooked: g }, y.tail));
|
|
}, h.prototype.parseTemplateLiteral = function() {
|
|
var d = this.createNode(), y = [], p = [], g = this.parseTemplateHead();
|
|
for (p.push(g); !g.tail; )
|
|
y.push(this.parseExpression()), g = this.parseTemplateElement(), p.push(g);
|
|
return this.finalize(d, new o.TemplateLiteral(p, y));
|
|
}, h.prototype.reinterpretExpressionAsPattern = function(d) {
|
|
switch (d.type) {
|
|
case l.Syntax.Identifier:
|
|
case l.Syntax.MemberExpression:
|
|
case l.Syntax.RestElement:
|
|
case l.Syntax.AssignmentPattern:
|
|
break;
|
|
case l.Syntax.SpreadElement:
|
|
d.type = l.Syntax.RestElement, this.reinterpretExpressionAsPattern(d.argument);
|
|
break;
|
|
case l.Syntax.ArrayExpression:
|
|
d.type = l.Syntax.ArrayPattern;
|
|
for (var y = 0; y < d.elements.length; y++)
|
|
d.elements[y] !== null && this.reinterpretExpressionAsPattern(d.elements[y]);
|
|
break;
|
|
case l.Syntax.ObjectExpression:
|
|
d.type = l.Syntax.ObjectPattern;
|
|
for (var y = 0; y < d.properties.length; y++)
|
|
this.reinterpretExpressionAsPattern(d.properties[y].value);
|
|
break;
|
|
case l.Syntax.AssignmentExpression:
|
|
d.type = l.Syntax.AssignmentPattern, delete d.operator, this.reinterpretExpressionAsPattern(d.left);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}, h.prototype.parseGroupExpression = function() {
|
|
var d;
|
|
if (this.expect("("), this.match(")"))
|
|
this.nextToken(), this.match("=>") || this.expect("=>"), d = {
|
|
type: f,
|
|
params: [],
|
|
async: !1
|
|
};
|
|
else {
|
|
var y = this.lookahead, p = [];
|
|
if (this.match("..."))
|
|
d = this.parseRestElement(p), this.expect(")"), this.match("=>") || this.expect("=>"), d = {
|
|
type: f,
|
|
params: [d],
|
|
async: !1
|
|
};
|
|
else {
|
|
var g = !1;
|
|
if (this.context.isBindingElement = !0, d = this.inheritCoverGrammar(this.parseAssignmentExpression), this.match(",")) {
|
|
var b = [];
|
|
for (this.context.isAssignmentTarget = !1, b.push(d); this.lookahead.type !== 2 && this.match(","); ) {
|
|
if (this.nextToken(), this.match(")")) {
|
|
this.nextToken();
|
|
for (var D = 0; D < b.length; D++)
|
|
this.reinterpretExpressionAsPattern(b[D]);
|
|
g = !0, d = {
|
|
type: f,
|
|
params: b,
|
|
async: !1
|
|
};
|
|
} else if (this.match("...")) {
|
|
this.context.isBindingElement || this.throwUnexpectedToken(this.lookahead), b.push(this.parseRestElement(p)), this.expect(
|
|
")"), this.match("=>") || this.expect("=>"), this.context.isBindingElement = !1;
|
|
for (var D = 0; D < b.length; D++)
|
|
this.reinterpretExpressionAsPattern(b[D]);
|
|
g = !0, d = {
|
|
type: f,
|
|
params: b,
|
|
async: !1
|
|
};
|
|
} else
|
|
b.push(this.inheritCoverGrammar(this.parseAssignmentExpression));
|
|
if (g)
|
|
break;
|
|
}
|
|
g || (d = this.finalize(this.startNode(y), new o.SequenceExpression(b)));
|
|
}
|
|
if (!g) {
|
|
if (this.expect(")"), this.match("=>") && (d.type === l.Syntax.Identifier && d.name === "yield" && (g = !0, d = {
|
|
type: f,
|
|
params: [d],
|
|
async: !1
|
|
}), !g)) {
|
|
if (this.context.isBindingElement || this.throwUnexpectedToken(this.lookahead), d.type === l.Syntax.SequenceExpression)
|
|
for (var D = 0; D < d.expressions.length; D++)
|
|
this.reinterpretExpressionAsPattern(d.expressions[D]);
|
|
else
|
|
this.reinterpretExpressionAsPattern(d);
|
|
var v = d.type === l.Syntax.SequenceExpression ? d.expressions : [d];
|
|
d = {
|
|
type: f,
|
|
params: v,
|
|
async: !1
|
|
};
|
|
}
|
|
this.context.isBindingElement = !1;
|
|
}
|
|
}
|
|
}
|
|
return d;
|
|
}, h.prototype.parseArguments = function() {
|
|
this.expect("(");
|
|
var d = [];
|
|
if (!this.match(")"))
|
|
for (; ; ) {
|
|
var y = this.match("...") ? this.parseSpreadElement() : this.isolateCoverGrammar(this.parseAssignmentExpression);
|
|
if (d.push(y), this.match(")") || (this.expectCommaSeparator(), this.match(")")))
|
|
break;
|
|
}
|
|
return this.expect(")"), d;
|
|
}, h.prototype.isIdentifierName = function(d) {
|
|
return d.type === 3 || d.type === 4 || d.type === 1 || d.type === 5;
|
|
}, h.prototype.parseIdentifierName = function() {
|
|
var d = this.createNode(), y = this.nextToken();
|
|
return this.isIdentifierName(y) || this.throwUnexpectedToken(y), this.finalize(d, new o.Identifier(y.value));
|
|
}, h.prototype.parseNewExpression = function() {
|
|
var d = this.createNode(), y = this.parseIdentifierName();
|
|
i.assert(y.name === "new", "New expression must start with `new`");
|
|
var p;
|
|
if (this.match("."))
|
|
if (this.nextToken(), this.lookahead.type === 3 && this.context.inFunctionBody && this.lookahead.value === "target") {
|
|
var g = this.parseIdentifierName();
|
|
p = new o.MetaProperty(y, g);
|
|
} else
|
|
this.throwUnexpectedToken(this.lookahead);
|
|
else {
|
|
var b = this.isolateCoverGrammar(this.parseLeftHandSideExpression), D = this.match("(") ? this.parseArguments() : [];
|
|
p = new o.NewExpression(b, D), this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1;
|
|
}
|
|
return this.finalize(d, p);
|
|
}, h.prototype.parseAsyncArgument = function() {
|
|
var d = this.parseAssignmentExpression();
|
|
return this.context.firstCoverInitializedNameError = null, d;
|
|
}, h.prototype.parseAsyncArguments = function() {
|
|
this.expect("(");
|
|
var d = [];
|
|
if (!this.match(")"))
|
|
for (; ; ) {
|
|
var y = this.match("...") ? this.parseSpreadElement() : this.isolateCoverGrammar(this.parseAsyncArgument);
|
|
if (d.push(y), this.match(")") || (this.expectCommaSeparator(), this.match(")")))
|
|
break;
|
|
}
|
|
return this.expect(")"), d;
|
|
}, h.prototype.parseLeftHandSideExpressionAllowCall = function() {
|
|
var d = this.lookahead, y = this.matchContextualKeyword("async"), p = this.context.allowIn;
|
|
this.context.allowIn = !0;
|
|
var g;
|
|
for (this.matchKeyword("super") && this.context.inFunctionBody ? (g = this.createNode(), this.nextToken(), g = this.finalize(g,
|
|
new o.Super()), !this.match("(") && !this.match(".") && !this.match("[") && this.throwUnexpectedToken(this.lookahead)) : g = this.
|
|
inheritCoverGrammar(this.matchKeyword("new") ? this.parseNewExpression : this.parsePrimaryExpression); ; )
|
|
if (this.match(".")) {
|
|
this.context.isBindingElement = !1, this.context.isAssignmentTarget = !0, this.expect(".");
|
|
var b = this.parseIdentifierName();
|
|
g = this.finalize(this.startNode(d), new o.StaticMemberExpression(g, b));
|
|
} else if (this.match("(")) {
|
|
var D = y && d.lineNumber === this.lookahead.lineNumber;
|
|
this.context.isBindingElement = !1, this.context.isAssignmentTarget = !1;
|
|
var v = D ? this.parseAsyncArguments() : this.parseArguments();
|
|
if (g = this.finalize(this.startNode(d), new o.CallExpression(g, v)), D && this.match("=>")) {
|
|
for (var S = 0; S < v.length; ++S)
|
|
this.reinterpretExpressionAsPattern(v[S]);
|
|
g = {
|
|
type: f,
|
|
params: v,
|
|
async: !0
|
|
};
|
|
}
|
|
} else if (this.match("[")) {
|
|
this.context.isBindingElement = !1, this.context.isAssignmentTarget = !0, this.expect("[");
|
|
var b = this.isolateCoverGrammar(this.parseExpression);
|
|
this.expect("]"), g = this.finalize(this.startNode(d), new o.ComputedMemberExpression(g, b));
|
|
} else if (this.lookahead.type === 10 && this.lookahead.head) {
|
|
var C = this.parseTemplateLiteral();
|
|
g = this.finalize(this.startNode(d), new o.TaggedTemplateExpression(g, C));
|
|
} else
|
|
break;
|
|
return this.context.allowIn = p, g;
|
|
}, h.prototype.parseSuper = function() {
|
|
var d = this.createNode();
|
|
return this.expectKeyword("super"), !this.match("[") && !this.match(".") && this.throwUnexpectedToken(this.lookahead), this.finalize(
|
|
d, new o.Super());
|
|
}, h.prototype.parseLeftHandSideExpression = function() {
|
|
i.assert(this.context.allowIn, "callee of new expression always allow in keyword.");
|
|
for (var d = this.startNode(this.lookahead), y = this.matchKeyword("super") && this.context.inFunctionBody ? this.parseSuper() :
|
|
this.inheritCoverGrammar(this.matchKeyword("new") ? this.parseNewExpression : this.parsePrimaryExpression); ; )
|
|
if (this.match("[")) {
|
|
this.context.isBindingElement = !1, this.context.isAssignmentTarget = !0, this.expect("[");
|
|
var p = this.isolateCoverGrammar(this.parseExpression);
|
|
this.expect("]"), y = this.finalize(d, new o.ComputedMemberExpression(y, p));
|
|
} else if (this.match(".")) {
|
|
this.context.isBindingElement = !1, this.context.isAssignmentTarget = !0, this.expect(".");
|
|
var p = this.parseIdentifierName();
|
|
y = this.finalize(d, new o.StaticMemberExpression(y, p));
|
|
} else if (this.lookahead.type === 10 && this.lookahead.head) {
|
|
var g = this.parseTemplateLiteral();
|
|
y = this.finalize(d, new o.TaggedTemplateExpression(y, g));
|
|
} else
|
|
break;
|
|
return y;
|
|
}, h.prototype.parseUpdateExpression = function() {
|
|
var d, y = this.lookahead;
|
|
if (this.match("++") || this.match("--")) {
|
|
var p = this.startNode(y), g = this.nextToken();
|
|
d = this.inheritCoverGrammar(this.parseUnaryExpression), this.context.strict && d.type === l.Syntax.Identifier && this.scanner.
|
|
isRestrictedWord(d.name) && this.tolerateError(a.Messages.StrictLHSPrefix), this.context.isAssignmentTarget || this.tolerateError(
|
|
a.Messages.InvalidLHSInAssignment);
|
|
var b = !0;
|
|
d = this.finalize(p, new o.UpdateExpression(g.value, d, b)), this.context.isAssignmentTarget = !1, this.context.isBindingElement =
|
|
!1;
|
|
} else if (d = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall), !this.hasLineTerminator && this.lookahead.
|
|
type === 7 && (this.match("++") || this.match("--"))) {
|
|
this.context.strict && d.type === l.Syntax.Identifier && this.scanner.isRestrictedWord(d.name) && this.tolerateError(a.Messages.
|
|
StrictLHSPostfix), this.context.isAssignmentTarget || this.tolerateError(a.Messages.InvalidLHSInAssignment), this.context.isAssignmentTarget =
|
|
!1, this.context.isBindingElement = !1;
|
|
var D = this.nextToken().value, b = !1;
|
|
d = this.finalize(this.startNode(y), new o.UpdateExpression(D, d, b));
|
|
}
|
|
return d;
|
|
}, h.prototype.parseAwaitExpression = function() {
|
|
var d = this.createNode();
|
|
this.nextToken();
|
|
var y = this.parseUnaryExpression();
|
|
return this.finalize(d, new o.AwaitExpression(y));
|
|
}, h.prototype.parseUnaryExpression = function() {
|
|
var d;
|
|
if (this.match("+") || this.match("-") || this.match("~") || this.match("!") || this.matchKeyword("delete") || this.matchKeyword(
|
|
"void") || this.matchKeyword("typeof")) {
|
|
var y = this.startNode(this.lookahead), p = this.nextToken();
|
|
d = this.inheritCoverGrammar(this.parseUnaryExpression), d = this.finalize(y, new o.UnaryExpression(p.value, d)), this.context.
|
|
strict && d.operator === "delete" && d.argument.type === l.Syntax.Identifier && this.tolerateError(a.Messages.StrictDelete),
|
|
this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1;
|
|
} else this.context.await && this.matchContextualKeyword("await") ? d = this.parseAwaitExpression() : d = this.parseUpdateExpression();
|
|
return d;
|
|
}, h.prototype.parseExponentiationExpression = function() {
|
|
var d = this.lookahead, y = this.inheritCoverGrammar(this.parseUnaryExpression);
|
|
if (y.type !== l.Syntax.UnaryExpression && this.match("**")) {
|
|
this.nextToken(), this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1;
|
|
var p = y, g = this.isolateCoverGrammar(this.parseExponentiationExpression);
|
|
y = this.finalize(this.startNode(d), new o.BinaryExpression("**", p, g));
|
|
}
|
|
return y;
|
|
}, h.prototype.binaryPrecedence = function(d) {
|
|
var y = d.value, p;
|
|
return d.type === 7 ? p = this.operatorPrecedence[y] || 0 : d.type === 4 ? p = y === "instanceof" || this.context.allowIn && y ===
|
|
"in" ? 7 : 0 : p = 0, p;
|
|
}, h.prototype.parseBinaryExpression = function() {
|
|
var d = this.lookahead, y = this.inheritCoverGrammar(this.parseExponentiationExpression), p = this.lookahead, g = this.binaryPrecedence(
|
|
p);
|
|
if (g > 0) {
|
|
this.nextToken(), this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1;
|
|
for (var b = [d, this.lookahead], D = y, v = this.isolateCoverGrammar(this.parseExponentiationExpression), S = [D, p.value, v],
|
|
C = [g]; g = this.binaryPrecedence(this.lookahead), !(g <= 0); ) {
|
|
for (; S.length > 2 && g <= C[C.length - 1]; ) {
|
|
v = S.pop();
|
|
var O = S.pop();
|
|
C.pop(), D = S.pop(), b.pop();
|
|
var k = this.startNode(b[b.length - 1]);
|
|
S.push(this.finalize(k, new o.BinaryExpression(O, D, v)));
|
|
}
|
|
S.push(this.nextToken().value), C.push(g), b.push(this.lookahead), S.push(this.isolateCoverGrammar(this.parseExponentiationExpression));
|
|
}
|
|
var U = S.length - 1;
|
|
y = S[U];
|
|
for (var j = b.pop(); U > 1; ) {
|
|
var K = b.pop(), R = j && j.lineStart, k = this.startNode(K, R), O = S[U - 1];
|
|
y = this.finalize(k, new o.BinaryExpression(O, S[U - 2], y)), U -= 2, j = K;
|
|
}
|
|
}
|
|
return y;
|
|
}, h.prototype.parseConditionalExpression = function() {
|
|
var d = this.lookahead, y = this.inheritCoverGrammar(this.parseBinaryExpression);
|
|
if (this.match("?")) {
|
|
this.nextToken();
|
|
var p = this.context.allowIn;
|
|
this.context.allowIn = !0;
|
|
var g = this.isolateCoverGrammar(this.parseAssignmentExpression);
|
|
this.context.allowIn = p, this.expect(":");
|
|
var b = this.isolateCoverGrammar(this.parseAssignmentExpression);
|
|
y = this.finalize(this.startNode(d), new o.ConditionalExpression(y, g, b)), this.context.isAssignmentTarget = !1, this.context.
|
|
isBindingElement = !1;
|
|
}
|
|
return y;
|
|
}, h.prototype.checkPatternParam = function(d, y) {
|
|
switch (y.type) {
|
|
case l.Syntax.Identifier:
|
|
this.validateParam(d, y, y.name);
|
|
break;
|
|
case l.Syntax.RestElement:
|
|
this.checkPatternParam(d, y.argument);
|
|
break;
|
|
case l.Syntax.AssignmentPattern:
|
|
this.checkPatternParam(d, y.left);
|
|
break;
|
|
case l.Syntax.ArrayPattern:
|
|
for (var p = 0; p < y.elements.length; p++)
|
|
y.elements[p] !== null && this.checkPatternParam(d, y.elements[p]);
|
|
break;
|
|
case l.Syntax.ObjectPattern:
|
|
for (var p = 0; p < y.properties.length; p++)
|
|
this.checkPatternParam(d, y.properties[p].value);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
d.simple = d.simple && y instanceof o.Identifier;
|
|
}, h.prototype.reinterpretAsCoverFormalsList = function(d) {
|
|
var y = [d], p, g = !1;
|
|
switch (d.type) {
|
|
case l.Syntax.Identifier:
|
|
break;
|
|
case f:
|
|
y = d.params, g = d.async;
|
|
break;
|
|
default:
|
|
return null;
|
|
}
|
|
p = {
|
|
simple: !0,
|
|
paramSet: {}
|
|
};
|
|
for (var b = 0; b < y.length; ++b) {
|
|
var D = y[b];
|
|
D.type === l.Syntax.AssignmentPattern ? D.right.type === l.Syntax.YieldExpression && (D.right.argument && this.throwUnexpectedToken(
|
|
this.lookahead), D.right.type = l.Syntax.Identifier, D.right.name = "yield", delete D.right.argument, delete D.right.delegate) :
|
|
g && D.type === l.Syntax.Identifier && D.name === "await" && this.throwUnexpectedToken(this.lookahead), this.checkPatternParam(
|
|
p, D), y[b] = D;
|
|
}
|
|
if (this.context.strict || !this.context.allowYield)
|
|
for (var b = 0; b < y.length; ++b) {
|
|
var D = y[b];
|
|
D.type === l.Syntax.YieldExpression && this.throwUnexpectedToken(this.lookahead);
|
|
}
|
|
if (p.message === a.Messages.StrictParamDupe) {
|
|
var v = this.context.strict ? p.stricted : p.firstRestricted;
|
|
this.throwUnexpectedToken(v, p.message);
|
|
}
|
|
return {
|
|
simple: p.simple,
|
|
params: y,
|
|
stricted: p.stricted,
|
|
firstRestricted: p.firstRestricted,
|
|
message: p.message
|
|
};
|
|
}, h.prototype.parseAssignmentExpression = function() {
|
|
var d;
|
|
if (!this.context.allowYield && this.matchKeyword("yield"))
|
|
d = this.parseYieldExpression();
|
|
else {
|
|
var y = this.lookahead, p = y;
|
|
if (d = this.parseConditionalExpression(), p.type === 3 && p.lineNumber === this.lookahead.lineNumber && p.value === "async" &&
|
|
(this.lookahead.type === 3 || this.matchKeyword("yield"))) {
|
|
var g = this.parsePrimaryExpression();
|
|
this.reinterpretExpressionAsPattern(g), d = {
|
|
type: f,
|
|
params: [g],
|
|
async: !0
|
|
};
|
|
}
|
|
if (d.type === f || this.match("=>")) {
|
|
this.context.isAssignmentTarget = !1, this.context.isBindingElement = !1;
|
|
var b = d.async, D = this.reinterpretAsCoverFormalsList(d);
|
|
if (D) {
|
|
this.hasLineTerminator && this.tolerateUnexpectedToken(this.lookahead), this.context.firstCoverInitializedNameError = null;
|
|
var v = this.context.strict, S = this.context.allowStrictDirective;
|
|
this.context.allowStrictDirective = D.simple;
|
|
var C = this.context.allowYield, O = this.context.await;
|
|
this.context.allowYield = !0, this.context.await = b;
|
|
var k = this.startNode(y);
|
|
this.expect("=>");
|
|
var U = void 0;
|
|
if (this.match("{")) {
|
|
var j = this.context.allowIn;
|
|
this.context.allowIn = !0, U = this.parseFunctionSourceElements(), this.context.allowIn = j;
|
|
} else
|
|
U = this.isolateCoverGrammar(this.parseAssignmentExpression);
|
|
var K = U.type !== l.Syntax.BlockStatement;
|
|
this.context.strict && D.firstRestricted && this.throwUnexpectedToken(D.firstRestricted, D.message), this.context.strict &&
|
|
D.stricted && this.tolerateUnexpectedToken(D.stricted, D.message), d = b ? this.finalize(k, new o.AsyncArrowFunctionExpression(
|
|
D.params, U, K)) : this.finalize(k, new o.ArrowFunctionExpression(D.params, U, K)), this.context.strict = v, this.context.
|
|
allowStrictDirective = S, this.context.allowYield = C, this.context.await = O;
|
|
}
|
|
} else if (this.matchAssign()) {
|
|
if (this.context.isAssignmentTarget || this.tolerateError(a.Messages.InvalidLHSInAssignment), this.context.strict && d.type ===
|
|
l.Syntax.Identifier) {
|
|
var R = d;
|
|
this.scanner.isRestrictedWord(R.name) && this.tolerateUnexpectedToken(p, a.Messages.StrictLHSAssignment), this.scanner.isStrictModeReservedWord(
|
|
R.name) && this.tolerateUnexpectedToken(p, a.Messages.StrictReservedWord);
|
|
}
|
|
this.match("=") ? this.reinterpretExpressionAsPattern(d) : (this.context.isAssignmentTarget = !1, this.context.isBindingElement =
|
|
!1), p = this.nextToken();
|
|
var ee = p.value, re = this.isolateCoverGrammar(this.parseAssignmentExpression);
|
|
d = this.finalize(this.startNode(y), new o.AssignmentExpression(ee, d, re)), this.context.firstCoverInitializedNameError =
|
|
null;
|
|
}
|
|
}
|
|
return d;
|
|
}, h.prototype.parseExpression = function() {
|
|
var d = this.lookahead, y = this.isolateCoverGrammar(this.parseAssignmentExpression);
|
|
if (this.match(",")) {
|
|
var p = [];
|
|
for (p.push(y); this.lookahead.type !== 2 && this.match(","); )
|
|
this.nextToken(), p.push(this.isolateCoverGrammar(this.parseAssignmentExpression));
|
|
y = this.finalize(this.startNode(d), new o.SequenceExpression(p));
|
|
}
|
|
return y;
|
|
}, h.prototype.parseStatementListItem = function() {
|
|
var d;
|
|
if (this.context.isAssignmentTarget = !0, this.context.isBindingElement = !0, this.lookahead.type === 4)
|
|
switch (this.lookahead.value) {
|
|
case "export":
|
|
this.context.isModule || this.tolerateUnexpectedToken(this.lookahead, a.Messages.IllegalExportDeclaration), d = this.parseExportDeclaration();
|
|
break;
|
|
case "import":
|
|
this.context.isModule || this.tolerateUnexpectedToken(this.lookahead, a.Messages.IllegalImportDeclaration), d = this.parseImportDeclaration();
|
|
break;
|
|
case "const":
|
|
d = this.parseLexicalDeclaration({ inFor: !1 });
|
|
break;
|
|
case "function":
|
|
d = this.parseFunctionDeclaration();
|
|
break;
|
|
case "class":
|
|
d = this.parseClassDeclaration();
|
|
break;
|
|
case "let":
|
|
d = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: !1 }) : this.parseStatement();
|
|
break;
|
|
default:
|
|
d = this.parseStatement();
|
|
break;
|
|
}
|
|
else
|
|
d = this.parseStatement();
|
|
return d;
|
|
}, h.prototype.parseBlock = function() {
|
|
var d = this.createNode();
|
|
this.expect("{");
|
|
for (var y = []; !this.match("}"); )
|
|
y.push(this.parseStatementListItem());
|
|
return this.expect("}"), this.finalize(d, new o.BlockStatement(y));
|
|
}, h.prototype.parseLexicalBinding = function(d, y) {
|
|
var p = this.createNode(), g = [], b = this.parsePattern(g, d);
|
|
this.context.strict && b.type === l.Syntax.Identifier && this.scanner.isRestrictedWord(b.name) && this.tolerateError(a.Messages.
|
|
StrictVarName);
|
|
var D = null;
|
|
return d === "const" ? !this.matchKeyword("in") && !this.matchContextualKeyword("of") && (this.match("=") ? (this.nextToken(),
|
|
D = this.isolateCoverGrammar(this.parseAssignmentExpression)) : this.throwError(a.Messages.DeclarationMissingInitializer, "con\
|
|
st")) : (!y.inFor && b.type !== l.Syntax.Identifier || this.match("=")) && (this.expect("="), D = this.isolateCoverGrammar(this.parseAssignmentExpression)),
|
|
this.finalize(p, new o.VariableDeclarator(b, D));
|
|
}, h.prototype.parseBindingList = function(d, y) {
|
|
for (var p = [this.parseLexicalBinding(d, y)]; this.match(","); )
|
|
this.nextToken(), p.push(this.parseLexicalBinding(d, y));
|
|
return p;
|
|
}, h.prototype.isLexicalDeclaration = function() {
|
|
var d = this.scanner.saveState();
|
|
this.scanner.scanComments();
|
|
var y = this.scanner.lex();
|
|
return this.scanner.restoreState(d), y.type === 3 || y.type === 7 && y.value === "[" || y.type === 7 && y.value === "{" || y.type ===
|
|
4 && y.value === "let" || y.type === 4 && y.value === "yield";
|
|
}, h.prototype.parseLexicalDeclaration = function(d) {
|
|
var y = this.createNode(), p = this.nextToken().value;
|
|
i.assert(p === "let" || p === "const", "Lexical declaration must be either let or const");
|
|
var g = this.parseBindingList(p, d);
|
|
return this.consumeSemicolon(), this.finalize(y, new o.VariableDeclaration(g, p));
|
|
}, h.prototype.parseBindingRestElement = function(d, y) {
|
|
var p = this.createNode();
|
|
this.expect("...");
|
|
var g = this.parsePattern(d, y);
|
|
return this.finalize(p, new o.RestElement(g));
|
|
}, h.prototype.parseArrayPattern = function(d, y) {
|
|
var p = this.createNode();
|
|
this.expect("[");
|
|
for (var g = []; !this.match("]"); )
|
|
if (this.match(","))
|
|
this.nextToken(), g.push(null);
|
|
else {
|
|
if (this.match("...")) {
|
|
g.push(this.parseBindingRestElement(d, y));
|
|
break;
|
|
} else
|
|
g.push(this.parsePatternWithDefault(d, y));
|
|
this.match("]") || this.expect(",");
|
|
}
|
|
return this.expect("]"), this.finalize(p, new o.ArrayPattern(g));
|
|
}, h.prototype.parsePropertyPattern = function(d, y) {
|
|
var p = this.createNode(), g = !1, b = !1, D = !1, v, S;
|
|
if (this.lookahead.type === 3) {
|
|
var C = this.lookahead;
|
|
v = this.parseVariableIdentifier();
|
|
var O = this.finalize(p, new o.Identifier(C.value));
|
|
if (this.match("=")) {
|
|
d.push(C), b = !0, this.nextToken();
|
|
var k = this.parseAssignmentExpression();
|
|
S = this.finalize(this.startNode(C), new o.AssignmentPattern(O, k));
|
|
} else this.match(":") ? (this.expect(":"), S = this.parsePatternWithDefault(d, y)) : (d.push(C), b = !0, S = O);
|
|
} else
|
|
g = this.match("["), v = this.parseObjectPropertyKey(), this.expect(":"), S = this.parsePatternWithDefault(d, y);
|
|
return this.finalize(p, new o.Property("init", v, g, S, D, b));
|
|
}, h.prototype.parseObjectPattern = function(d, y) {
|
|
var p = this.createNode(), g = [];
|
|
for (this.expect("{"); !this.match("}"); )
|
|
g.push(this.parsePropertyPattern(d, y)), this.match("}") || this.expect(",");
|
|
return this.expect("}"), this.finalize(p, new o.ObjectPattern(g));
|
|
}, h.prototype.parsePattern = function(d, y) {
|
|
var p;
|
|
return this.match("[") ? p = this.parseArrayPattern(d, y) : this.match("{") ? p = this.parseObjectPattern(d, y) : (this.matchKeyword(
|
|
"let") && (y === "const" || y === "let") && this.tolerateUnexpectedToken(this.lookahead, a.Messages.LetInLexicalBinding), d.push(
|
|
this.lookahead), p = this.parseVariableIdentifier(y)), p;
|
|
}, h.prototype.parsePatternWithDefault = function(d, y) {
|
|
var p = this.lookahead, g = this.parsePattern(d, y);
|
|
if (this.match("=")) {
|
|
this.nextToken();
|
|
var b = this.context.allowYield;
|
|
this.context.allowYield = !0;
|
|
var D = this.isolateCoverGrammar(this.parseAssignmentExpression);
|
|
this.context.allowYield = b, g = this.finalize(this.startNode(p), new o.AssignmentPattern(g, D));
|
|
}
|
|
return g;
|
|
}, h.prototype.parseVariableIdentifier = function(d) {
|
|
var y = this.createNode(), p = this.nextToken();
|
|
return p.type === 4 && p.value === "yield" ? this.context.strict ? this.tolerateUnexpectedToken(p, a.Messages.StrictReservedWord) :
|
|
this.context.allowYield || this.throwUnexpectedToken(p) : p.type !== 3 ? this.context.strict && p.type === 4 && this.scanner.isStrictModeReservedWord(
|
|
p.value) ? this.tolerateUnexpectedToken(p, a.Messages.StrictReservedWord) : (this.context.strict || p.value !== "let" || d !==
|
|
"var") && this.throwUnexpectedToken(p) : (this.context.isModule || this.context.await) && p.type === 3 && p.value === "await" &&
|
|
this.tolerateUnexpectedToken(p), this.finalize(y, new o.Identifier(p.value));
|
|
}, h.prototype.parseVariableDeclaration = function(d) {
|
|
var y = this.createNode(), p = [], g = this.parsePattern(p, "var");
|
|
this.context.strict && g.type === l.Syntax.Identifier && this.scanner.isRestrictedWord(g.name) && this.tolerateError(a.Messages.
|
|
StrictVarName);
|
|
var b = null;
|
|
return this.match("=") ? (this.nextToken(), b = this.isolateCoverGrammar(this.parseAssignmentExpression)) : g.type !== l.Syntax.
|
|
Identifier && !d.inFor && this.expect("="), this.finalize(y, new o.VariableDeclarator(g, b));
|
|
}, h.prototype.parseVariableDeclarationList = function(d) {
|
|
var y = { inFor: d.inFor }, p = [];
|
|
for (p.push(this.parseVariableDeclaration(y)); this.match(","); )
|
|
this.nextToken(), p.push(this.parseVariableDeclaration(y));
|
|
return p;
|
|
}, h.prototype.parseVariableStatement = function() {
|
|
var d = this.createNode();
|
|
this.expectKeyword("var");
|
|
var y = this.parseVariableDeclarationList({ inFor: !1 });
|
|
return this.consumeSemicolon(), this.finalize(d, new o.VariableDeclaration(y, "var"));
|
|
}, h.prototype.parseEmptyStatement = function() {
|
|
var d = this.createNode();
|
|
return this.expect(";"), this.finalize(d, new o.EmptyStatement());
|
|
}, h.prototype.parseExpressionStatement = function() {
|
|
var d = this.createNode(), y = this.parseExpression();
|
|
return this.consumeSemicolon(), this.finalize(d, new o.ExpressionStatement(y));
|
|
}, h.prototype.parseIfClause = function() {
|
|
return this.context.strict && this.matchKeyword("function") && this.tolerateError(a.Messages.StrictFunction), this.parseStatement();
|
|
}, h.prototype.parseIfStatement = function() {
|
|
var d = this.createNode(), y, p = null;
|
|
this.expectKeyword("if"), this.expect("(");
|
|
var g = this.parseExpression();
|
|
return !this.match(")") && this.config.tolerant ? (this.tolerateUnexpectedToken(this.nextToken()), y = this.finalize(this.createNode(),
|
|
new o.EmptyStatement())) : (this.expect(")"), y = this.parseIfClause(), this.matchKeyword("else") && (this.nextToken(), p = this.
|
|
parseIfClause())), this.finalize(d, new o.IfStatement(g, y, p));
|
|
}, h.prototype.parseDoWhileStatement = function() {
|
|
var d = this.createNode();
|
|
this.expectKeyword("do");
|
|
var y = this.context.inIteration;
|
|
this.context.inIteration = !0;
|
|
var p = this.parseStatement();
|
|
this.context.inIteration = y, this.expectKeyword("while"), this.expect("(");
|
|
var g = this.parseExpression();
|
|
return !this.match(")") && this.config.tolerant ? this.tolerateUnexpectedToken(this.nextToken()) : (this.expect(")"), this.match(
|
|
";") && this.nextToken()), this.finalize(d, new o.DoWhileStatement(p, g));
|
|
}, h.prototype.parseWhileStatement = function() {
|
|
var d = this.createNode(), y;
|
|
this.expectKeyword("while"), this.expect("(");
|
|
var p = this.parseExpression();
|
|
if (!this.match(")") && this.config.tolerant)
|
|
this.tolerateUnexpectedToken(this.nextToken()), y = this.finalize(this.createNode(), new o.EmptyStatement());
|
|
else {
|
|
this.expect(")");
|
|
var g = this.context.inIteration;
|
|
this.context.inIteration = !0, y = this.parseStatement(), this.context.inIteration = g;
|
|
}
|
|
return this.finalize(d, new o.WhileStatement(p, y));
|
|
}, h.prototype.parseForStatement = function() {
|
|
var d = null, y = null, p = null, g = !0, b, D, v = this.createNode();
|
|
if (this.expectKeyword("for"), this.expect("("), this.match(";"))
|
|
this.nextToken();
|
|
else if (this.matchKeyword("var")) {
|
|
d = this.createNode(), this.nextToken();
|
|
var S = this.context.allowIn;
|
|
this.context.allowIn = !1;
|
|
var C = this.parseVariableDeclarationList({ inFor: !0 });
|
|
if (this.context.allowIn = S, C.length === 1 && this.matchKeyword("in")) {
|
|
var O = C[0];
|
|
O.init && (O.id.type === l.Syntax.ArrayPattern || O.id.type === l.Syntax.ObjectPattern || this.context.strict) && this.tolerateError(
|
|
a.Messages.ForInOfLoopInitializer, "for-in"), d = this.finalize(d, new o.VariableDeclaration(C, "var")), this.nextToken(),
|
|
b = d, D = this.parseExpression(), d = null;
|
|
} else C.length === 1 && C[0].init === null && this.matchContextualKeyword("of") ? (d = this.finalize(d, new o.VariableDeclaration(
|
|
C, "var")), this.nextToken(), b = d, D = this.parseAssignmentExpression(), d = null, g = !1) : (d = this.finalize(d, new o.VariableDeclaration(
|
|
C, "var")), this.expect(";"));
|
|
} else if (this.matchKeyword("const") || this.matchKeyword("let")) {
|
|
d = this.createNode();
|
|
var k = this.nextToken().value;
|
|
if (!this.context.strict && this.lookahead.value === "in")
|
|
d = this.finalize(d, new o.Identifier(k)), this.nextToken(), b = d, D = this.parseExpression(), d = null;
|
|
else {
|
|
var S = this.context.allowIn;
|
|
this.context.allowIn = !1;
|
|
var C = this.parseBindingList(k, { inFor: !0 });
|
|
this.context.allowIn = S, C.length === 1 && C[0].init === null && this.matchKeyword("in") ? (d = this.finalize(d, new o.VariableDeclaration(
|
|
C, k)), this.nextToken(), b = d, D = this.parseExpression(), d = null) : C.length === 1 && C[0].init === null && this.matchContextualKeyword(
|
|
"of") ? (d = this.finalize(d, new o.VariableDeclaration(C, k)), this.nextToken(), b = d, D = this.parseAssignmentExpression(),
|
|
d = null, g = !1) : (this.consumeSemicolon(), d = this.finalize(d, new o.VariableDeclaration(C, k)));
|
|
}
|
|
} else {
|
|
var U = this.lookahead, S = this.context.allowIn;
|
|
if (this.context.allowIn = !1, d = this.inheritCoverGrammar(this.parseAssignmentExpression), this.context.allowIn = S, this.
|
|
matchKeyword("in"))
|
|
(!this.context.isAssignmentTarget || d.type === l.Syntax.AssignmentExpression) && this.tolerateError(a.Messages.InvalidLHSInForIn),
|
|
this.nextToken(), this.reinterpretExpressionAsPattern(d), b = d, D = this.parseExpression(), d = null;
|
|
else if (this.matchContextualKeyword("of"))
|
|
(!this.context.isAssignmentTarget || d.type === l.Syntax.AssignmentExpression) && this.tolerateError(a.Messages.InvalidLHSInForLoop),
|
|
this.nextToken(), this.reinterpretExpressionAsPattern(d), b = d, D = this.parseAssignmentExpression(), d = null, g = !1;
|
|
else {
|
|
if (this.match(",")) {
|
|
for (var j = [d]; this.match(","); )
|
|
this.nextToken(), j.push(this.isolateCoverGrammar(this.parseAssignmentExpression));
|
|
d = this.finalize(this.startNode(U), new o.SequenceExpression(j));
|
|
}
|
|
this.expect(";");
|
|
}
|
|
}
|
|
typeof b > "u" && (this.match(";") || (y = this.parseExpression()), this.expect(";"), this.match(")") || (p = this.parseExpression()));
|
|
var K;
|
|
if (!this.match(")") && this.config.tolerant)
|
|
this.tolerateUnexpectedToken(this.nextToken()), K = this.finalize(this.createNode(), new o.EmptyStatement());
|
|
else {
|
|
this.expect(")");
|
|
var R = this.context.inIteration;
|
|
this.context.inIteration = !0, K = this.isolateCoverGrammar(this.parseStatement), this.context.inIteration = R;
|
|
}
|
|
return typeof b > "u" ? this.finalize(v, new o.ForStatement(d, y, p, K)) : g ? this.finalize(v, new o.ForInStatement(b, D, K)) :
|
|
this.finalize(v, new o.ForOfStatement(b, D, K));
|
|
}, h.prototype.parseContinueStatement = function() {
|
|
var d = this.createNode();
|
|
this.expectKeyword("continue");
|
|
var y = null;
|
|
if (this.lookahead.type === 3 && !this.hasLineTerminator) {
|
|
var p = this.parseVariableIdentifier();
|
|
y = p;
|
|
var g = "$" + p.name;
|
|
Object.prototype.hasOwnProperty.call(this.context.labelSet, g) || this.throwError(a.Messages.UnknownLabel, p.name);
|
|
}
|
|
return this.consumeSemicolon(), y === null && !this.context.inIteration && this.throwError(a.Messages.IllegalContinue), this.finalize(
|
|
d, new o.ContinueStatement(y));
|
|
}, h.prototype.parseBreakStatement = function() {
|
|
var d = this.createNode();
|
|
this.expectKeyword("break");
|
|
var y = null;
|
|
if (this.lookahead.type === 3 && !this.hasLineTerminator) {
|
|
var p = this.parseVariableIdentifier(), g = "$" + p.name;
|
|
Object.prototype.hasOwnProperty.call(this.context.labelSet, g) || this.throwError(a.Messages.UnknownLabel, p.name), y = p;
|
|
}
|
|
return this.consumeSemicolon(), y === null && !this.context.inIteration && !this.context.inSwitch && this.throwError(a.Messages.
|
|
IllegalBreak), this.finalize(d, new o.BreakStatement(y));
|
|
}, h.prototype.parseReturnStatement = function() {
|
|
this.context.inFunctionBody || this.tolerateError(a.Messages.IllegalReturn);
|
|
var d = this.createNode();
|
|
this.expectKeyword("return");
|
|
var y = !this.match(";") && !this.match("}") && !this.hasLineTerminator && this.lookahead.type !== 2 || this.lookahead.type ===
|
|
8 || this.lookahead.type === 10, p = y ? this.parseExpression() : null;
|
|
return this.consumeSemicolon(), this.finalize(d, new o.ReturnStatement(p));
|
|
}, h.prototype.parseWithStatement = function() {
|
|
this.context.strict && this.tolerateError(a.Messages.StrictModeWith);
|
|
var d = this.createNode(), y;
|
|
this.expectKeyword("with"), this.expect("(");
|
|
var p = this.parseExpression();
|
|
return !this.match(")") && this.config.tolerant ? (this.tolerateUnexpectedToken(this.nextToken()), y = this.finalize(this.createNode(),
|
|
new o.EmptyStatement())) : (this.expect(")"), y = this.parseStatement()), this.finalize(d, new o.WithStatement(p, y));
|
|
}, h.prototype.parseSwitchCase = function() {
|
|
var d = this.createNode(), y;
|
|
this.matchKeyword("default") ? (this.nextToken(), y = null) : (this.expectKeyword("case"), y = this.parseExpression()), this.expect(
|
|
":");
|
|
for (var p = []; !(this.match("}") || this.matchKeyword("default") || this.matchKeyword("case")); )
|
|
p.push(this.parseStatementListItem());
|
|
return this.finalize(d, new o.SwitchCase(y, p));
|
|
}, h.prototype.parseSwitchStatement = function() {
|
|
var d = this.createNode();
|
|
this.expectKeyword("switch"), this.expect("(");
|
|
var y = this.parseExpression();
|
|
this.expect(")");
|
|
var p = this.context.inSwitch;
|
|
this.context.inSwitch = !0;
|
|
var g = [], b = !1;
|
|
for (this.expect("{"); !this.match("}"); ) {
|
|
var D = this.parseSwitchCase();
|
|
D.test === null && (b && this.throwError(a.Messages.MultipleDefaultsInSwitch), b = !0), g.push(D);
|
|
}
|
|
return this.expect("}"), this.context.inSwitch = p, this.finalize(d, new o.SwitchStatement(y, g));
|
|
}, h.prototype.parseLabelledStatement = function() {
|
|
var d = this.createNode(), y = this.parseExpression(), p;
|
|
if (y.type === l.Syntax.Identifier && this.match(":")) {
|
|
this.nextToken();
|
|
var g = y, b = "$" + g.name;
|
|
Object.prototype.hasOwnProperty.call(this.context.labelSet, b) && this.throwError(a.Messages.Redeclaration, "Label", g.name),
|
|
this.context.labelSet[b] = !0;
|
|
var D = void 0;
|
|
if (this.matchKeyword("class"))
|
|
this.tolerateUnexpectedToken(this.lookahead), D = this.parseClassDeclaration();
|
|
else if (this.matchKeyword("function")) {
|
|
var v = this.lookahead, S = this.parseFunctionDeclaration();
|
|
this.context.strict ? this.tolerateUnexpectedToken(v, a.Messages.StrictFunction) : S.generator && this.tolerateUnexpectedToken(
|
|
v, a.Messages.GeneratorInLegacyContext), D = S;
|
|
} else
|
|
D = this.parseStatement();
|
|
delete this.context.labelSet[b], p = new o.LabeledStatement(g, D);
|
|
} else
|
|
this.consumeSemicolon(), p = new o.ExpressionStatement(y);
|
|
return this.finalize(d, p);
|
|
}, h.prototype.parseThrowStatement = function() {
|
|
var d = this.createNode();
|
|
this.expectKeyword("throw"), this.hasLineTerminator && this.throwError(a.Messages.NewlineAfterThrow);
|
|
var y = this.parseExpression();
|
|
return this.consumeSemicolon(), this.finalize(d, new o.ThrowStatement(y));
|
|
}, h.prototype.parseCatchClause = function() {
|
|
var d = this.createNode();
|
|
this.expectKeyword("catch"), this.expect("("), this.match(")") && this.throwUnexpectedToken(this.lookahead);
|
|
for (var y = [], p = this.parsePattern(y), g = {}, b = 0; b < y.length; b++) {
|
|
var D = "$" + y[b].value;
|
|
Object.prototype.hasOwnProperty.call(g, D) && this.tolerateError(a.Messages.DuplicateBinding, y[b].value), g[D] = !0;
|
|
}
|
|
this.context.strict && p.type === l.Syntax.Identifier && this.scanner.isRestrictedWord(p.name) && this.tolerateError(a.Messages.
|
|
StrictCatchVariable), this.expect(")");
|
|
var v = this.parseBlock();
|
|
return this.finalize(d, new o.CatchClause(p, v));
|
|
}, h.prototype.parseFinallyClause = function() {
|
|
return this.expectKeyword("finally"), this.parseBlock();
|
|
}, h.prototype.parseTryStatement = function() {
|
|
var d = this.createNode();
|
|
this.expectKeyword("try");
|
|
var y = this.parseBlock(), p = this.matchKeyword("catch") ? this.parseCatchClause() : null, g = this.matchKeyword("finally") ?
|
|
this.parseFinallyClause() : null;
|
|
return !p && !g && this.throwError(a.Messages.NoCatchOrFinally), this.finalize(d, new o.TryStatement(y, p, g));
|
|
}, h.prototype.parseDebuggerStatement = function() {
|
|
var d = this.createNode();
|
|
return this.expectKeyword("debugger"), this.consumeSemicolon(), this.finalize(d, new o.DebuggerStatement());
|
|
}, h.prototype.parseStatement = function() {
|
|
var d;
|
|
switch (this.lookahead.type) {
|
|
case 1:
|
|
case 5:
|
|
case 6:
|
|
case 8:
|
|
case 10:
|
|
case 9:
|
|
d = this.parseExpressionStatement();
|
|
break;
|
|
case 7:
|
|
var y = this.lookahead.value;
|
|
y === "{" ? d = this.parseBlock() : y === "(" ? d = this.parseExpressionStatement() : y === ";" ? d = this.parseEmptyStatement() :
|
|
d = this.parseExpressionStatement();
|
|
break;
|
|
case 3:
|
|
d = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement();
|
|
break;
|
|
case 4:
|
|
switch (this.lookahead.value) {
|
|
case "break":
|
|
d = this.parseBreakStatement();
|
|
break;
|
|
case "continue":
|
|
d = this.parseContinueStatement();
|
|
break;
|
|
case "debugger":
|
|
d = this.parseDebuggerStatement();
|
|
break;
|
|
case "do":
|
|
d = this.parseDoWhileStatement();
|
|
break;
|
|
case "for":
|
|
d = this.parseForStatement();
|
|
break;
|
|
case "function":
|
|
d = this.parseFunctionDeclaration();
|
|
break;
|
|
case "if":
|
|
d = this.parseIfStatement();
|
|
break;
|
|
case "return":
|
|
d = this.parseReturnStatement();
|
|
break;
|
|
case "switch":
|
|
d = this.parseSwitchStatement();
|
|
break;
|
|
case "throw":
|
|
d = this.parseThrowStatement();
|
|
break;
|
|
case "try":
|
|
d = this.parseTryStatement();
|
|
break;
|
|
case "var":
|
|
d = this.parseVariableStatement();
|
|
break;
|
|
case "while":
|
|
d = this.parseWhileStatement();
|
|
break;
|
|
case "with":
|
|
d = this.parseWithStatement();
|
|
break;
|
|
default:
|
|
d = this.parseExpressionStatement();
|
|
break;
|
|
}
|
|
break;
|
|
default:
|
|
d = this.throwUnexpectedToken(this.lookahead);
|
|
}
|
|
return d;
|
|
}, h.prototype.parseFunctionSourceElements = function() {
|
|
var d = this.createNode();
|
|
this.expect("{");
|
|
var y = this.parseDirectivePrologues(), p = this.context.labelSet, g = this.context.inIteration, b = this.context.inSwitch, D = this.
|
|
context.inFunctionBody;
|
|
for (this.context.labelSet = {}, this.context.inIteration = !1, this.context.inSwitch = !1, this.context.inFunctionBody = !0; this.
|
|
lookahead.type !== 2 && !this.match("}"); )
|
|
y.push(this.parseStatementListItem());
|
|
return this.expect("}"), this.context.labelSet = p, this.context.inIteration = g, this.context.inSwitch = b, this.context.inFunctionBody =
|
|
D, this.finalize(d, new o.BlockStatement(y));
|
|
}, h.prototype.validateParam = function(d, y, p) {
|
|
var g = "$" + p;
|
|
this.context.strict ? (this.scanner.isRestrictedWord(p) && (d.stricted = y, d.message = a.Messages.StrictParamName), Object.prototype.
|
|
hasOwnProperty.call(d.paramSet, g) && (d.stricted = y, d.message = a.Messages.StrictParamDupe)) : d.firstRestricted || (this.scanner.
|
|
isRestrictedWord(p) ? (d.firstRestricted = y, d.message = a.Messages.StrictParamName) : this.scanner.isStrictModeReservedWord(
|
|
p) ? (d.firstRestricted = y, d.message = a.Messages.StrictReservedWord) : Object.prototype.hasOwnProperty.call(d.paramSet, g) &&
|
|
(d.stricted = y, d.message = a.Messages.StrictParamDupe)), typeof Object.defineProperty == "function" ? Object.defineProperty(
|
|
d.paramSet, g, { value: !0, enumerable: !0, writable: !0, configurable: !0 }) : d.paramSet[g] = !0;
|
|
}, h.prototype.parseRestElement = function(d) {
|
|
var y = this.createNode();
|
|
this.expect("...");
|
|
var p = this.parsePattern(d);
|
|
return this.match("=") && this.throwError(a.Messages.DefaultRestParameter), this.match(")") || this.throwError(a.Messages.ParameterAfterRestParameter),
|
|
this.finalize(y, new o.RestElement(p));
|
|
}, h.prototype.parseFormalParameter = function(d) {
|
|
for (var y = [], p = this.match("...") ? this.parseRestElement(y) : this.parsePatternWithDefault(y), g = 0; g < y.length; g++)
|
|
this.validateParam(d, y[g], y[g].value);
|
|
d.simple = d.simple && p instanceof o.Identifier, d.params.push(p);
|
|
}, h.prototype.parseFormalParameters = function(d) {
|
|
var y;
|
|
if (y = {
|
|
simple: !0,
|
|
params: [],
|
|
firstRestricted: d
|
|
}, this.expect("("), !this.match(")"))
|
|
for (y.paramSet = {}; this.lookahead.type !== 2 && (this.parseFormalParameter(y), !(this.match(")") || (this.expect(","), this.
|
|
match(")")))); )
|
|
;
|
|
return this.expect(")"), {
|
|
simple: y.simple,
|
|
params: y.params,
|
|
stricted: y.stricted,
|
|
firstRestricted: y.firstRestricted,
|
|
message: y.message
|
|
};
|
|
}, h.prototype.matchAsyncFunction = function() {
|
|
var d = this.matchContextualKeyword("async");
|
|
if (d) {
|
|
var y = this.scanner.saveState();
|
|
this.scanner.scanComments();
|
|
var p = this.scanner.lex();
|
|
this.scanner.restoreState(y), d = y.lineNumber === p.lineNumber && p.type === 4 && p.value === "function";
|
|
}
|
|
return d;
|
|
}, h.prototype.parseFunctionDeclaration = function(d) {
|
|
var y = this.createNode(), p = this.matchContextualKeyword("async");
|
|
p && this.nextToken(), this.expectKeyword("function");
|
|
var g = p ? !1 : this.match("*");
|
|
g && this.nextToken();
|
|
var b, D = null, v = null;
|
|
if (!d || !this.match("(")) {
|
|
var S = this.lookahead;
|
|
D = this.parseVariableIdentifier(), this.context.strict ? this.scanner.isRestrictedWord(S.value) && this.tolerateUnexpectedToken(
|
|
S, a.Messages.StrictFunctionName) : this.scanner.isRestrictedWord(S.value) ? (v = S, b = a.Messages.StrictFunctionName) : this.
|
|
scanner.isStrictModeReservedWord(S.value) && (v = S, b = a.Messages.StrictReservedWord);
|
|
}
|
|
var C = this.context.await, O = this.context.allowYield;
|
|
this.context.await = p, this.context.allowYield = !g;
|
|
var k = this.parseFormalParameters(v), U = k.params, j = k.stricted;
|
|
v = k.firstRestricted, k.message && (b = k.message);
|
|
var K = this.context.strict, R = this.context.allowStrictDirective;
|
|
this.context.allowStrictDirective = k.simple;
|
|
var ee = this.parseFunctionSourceElements();
|
|
return this.context.strict && v && this.throwUnexpectedToken(v, b), this.context.strict && j && this.tolerateUnexpectedToken(j,
|
|
b), this.context.strict = K, this.context.allowStrictDirective = R, this.context.await = C, this.context.allowYield = O, p ? this.
|
|
finalize(y, new o.AsyncFunctionDeclaration(D, U, ee)) : this.finalize(y, new o.FunctionDeclaration(D, U, ee, g));
|
|
}, h.prototype.parseFunctionExpression = function() {
|
|
var d = this.createNode(), y = this.matchContextualKeyword("async");
|
|
y && this.nextToken(), this.expectKeyword("function");
|
|
var p = y ? !1 : this.match("*");
|
|
p && this.nextToken();
|
|
var g, b = null, D, v = this.context.await, S = this.context.allowYield;
|
|
if (this.context.await = y, this.context.allowYield = !p, !this.match("(")) {
|
|
var C = this.lookahead;
|
|
b = !this.context.strict && !p && this.matchKeyword("yield") ? this.parseIdentifierName() : this.parseVariableIdentifier(), this.
|
|
context.strict ? this.scanner.isRestrictedWord(C.value) && this.tolerateUnexpectedToken(C, a.Messages.StrictFunctionName) : this.
|
|
scanner.isRestrictedWord(C.value) ? (D = C, g = a.Messages.StrictFunctionName) : this.scanner.isStrictModeReservedWord(C.value) &&
|
|
(D = C, g = a.Messages.StrictReservedWord);
|
|
}
|
|
var O = this.parseFormalParameters(D), k = O.params, U = O.stricted;
|
|
D = O.firstRestricted, O.message && (g = O.message);
|
|
var j = this.context.strict, K = this.context.allowStrictDirective;
|
|
this.context.allowStrictDirective = O.simple;
|
|
var R = this.parseFunctionSourceElements();
|
|
return this.context.strict && D && this.throwUnexpectedToken(D, g), this.context.strict && U && this.tolerateUnexpectedToken(U,
|
|
g), this.context.strict = j, this.context.allowStrictDirective = K, this.context.await = v, this.context.allowYield = S, y ? this.
|
|
finalize(d, new o.AsyncFunctionExpression(b, k, R)) : this.finalize(d, new o.FunctionExpression(b, k, R, p));
|
|
}, h.prototype.parseDirective = function() {
|
|
var d = this.lookahead, y = this.createNode(), p = this.parseExpression(), g = p.type === l.Syntax.Literal ? this.getTokenRaw(
|
|
d).slice(1, -1) : null;
|
|
return this.consumeSemicolon(), this.finalize(y, g ? new o.Directive(p, g) : new o.ExpressionStatement(p));
|
|
}, h.prototype.parseDirectivePrologues = function() {
|
|
for (var d = null, y = []; ; ) {
|
|
var p = this.lookahead;
|
|
if (p.type !== 8)
|
|
break;
|
|
var g = this.parseDirective();
|
|
y.push(g);
|
|
var b = g.directive;
|
|
if (typeof b != "string")
|
|
break;
|
|
b === "use strict" ? (this.context.strict = !0, d && this.tolerateUnexpectedToken(d, a.Messages.StrictOctalLiteral), this.context.
|
|
allowStrictDirective || this.tolerateUnexpectedToken(p, a.Messages.IllegalLanguageModeDirective)) : !d && p.octal && (d = p);
|
|
}
|
|
return y;
|
|
}, h.prototype.qualifiedPropertyName = function(d) {
|
|
switch (d.type) {
|
|
case 3:
|
|
case 8:
|
|
case 1:
|
|
case 5:
|
|
case 6:
|
|
case 4:
|
|
return !0;
|
|
case 7:
|
|
return d.value === "[";
|
|
default:
|
|
break;
|
|
}
|
|
return !1;
|
|
}, h.prototype.parseGetterMethod = function() {
|
|
var d = this.createNode(), y = !1, p = this.context.allowYield;
|
|
this.context.allowYield = !y;
|
|
var g = this.parseFormalParameters();
|
|
g.params.length > 0 && this.tolerateError(a.Messages.BadGetterArity);
|
|
var b = this.parsePropertyMethod(g);
|
|
return this.context.allowYield = p, this.finalize(d, new o.FunctionExpression(null, g.params, b, y));
|
|
}, h.prototype.parseSetterMethod = function() {
|
|
var d = this.createNode(), y = !1, p = this.context.allowYield;
|
|
this.context.allowYield = !y;
|
|
var g = this.parseFormalParameters();
|
|
g.params.length !== 1 ? this.tolerateError(a.Messages.BadSetterArity) : g.params[0] instanceof o.RestElement && this.tolerateError(
|
|
a.Messages.BadSetterRestParameter);
|
|
var b = this.parsePropertyMethod(g);
|
|
return this.context.allowYield = p, this.finalize(d, new o.FunctionExpression(null, g.params, b, y));
|
|
}, h.prototype.parseGeneratorMethod = function() {
|
|
var d = this.createNode(), y = !0, p = this.context.allowYield;
|
|
this.context.allowYield = !0;
|
|
var g = this.parseFormalParameters();
|
|
this.context.allowYield = !1;
|
|
var b = this.parsePropertyMethod(g);
|
|
return this.context.allowYield = p, this.finalize(d, new o.FunctionExpression(null, g.params, b, y));
|
|
}, h.prototype.isStartOfExpression = function() {
|
|
var d = !0, y = this.lookahead.value;
|
|
switch (this.lookahead.type) {
|
|
case 7:
|
|
d = y === "[" || y === "(" || y === "{" || y === "+" || y === "-" || y === "!" || y === "~" || y === "++" || y === "--" ||
|
|
y === "/" || y === "/=";
|
|
break;
|
|
case 4:
|
|
d = y === "class" || y === "delete" || y === "function" || y === "let" || y === "new" || y === "super" || y === "this" || y ===
|
|
"typeof" || y === "void" || y === "yield";
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return d;
|
|
}, h.prototype.parseYieldExpression = function() {
|
|
var d = this.createNode();
|
|
this.expectKeyword("yield");
|
|
var y = null, p = !1;
|
|
if (!this.hasLineTerminator) {
|
|
var g = this.context.allowYield;
|
|
this.context.allowYield = !1, p = this.match("*"), p ? (this.nextToken(), y = this.parseAssignmentExpression()) : this.isStartOfExpression() &&
|
|
(y = this.parseAssignmentExpression()), this.context.allowYield = g;
|
|
}
|
|
return this.finalize(d, new o.YieldExpression(y, p));
|
|
}, h.prototype.parseClassElement = function(d) {
|
|
var y = this.lookahead, p = this.createNode(), g = "", b = null, D = null, v = !1, S = !1, C = !1, O = !1;
|
|
if (this.match("*"))
|
|
this.nextToken();
|
|
else {
|
|
v = this.match("["), b = this.parseObjectPropertyKey();
|
|
var k = b;
|
|
if (k.name === "static" && (this.qualifiedPropertyName(this.lookahead) || this.match("*")) && (y = this.lookahead, C = !0, v =
|
|
this.match("["), this.match("*") ? this.nextToken() : b = this.parseObjectPropertyKey()), y.type === 3 && !this.hasLineTerminator &&
|
|
y.value === "async") {
|
|
var U = this.lookahead.value;
|
|
U !== ":" && U !== "(" && U !== "*" && (O = !0, y = this.lookahead, b = this.parseObjectPropertyKey(), y.type === 3 && y.value ===
|
|
"constructor" && this.tolerateUnexpectedToken(y, a.Messages.ConstructorIsAsync));
|
|
}
|
|
}
|
|
var j = this.qualifiedPropertyName(this.lookahead);
|
|
return y.type === 3 ? y.value === "get" && j ? (g = "get", v = this.match("["), b = this.parseObjectPropertyKey(), this.context.
|
|
allowYield = !1, D = this.parseGetterMethod()) : y.value === "set" && j && (g = "set", v = this.match("["), b = this.parseObjectPropertyKey(),
|
|
D = this.parseSetterMethod()) : y.type === 7 && y.value === "*" && j && (g = "init", v = this.match("["), b = this.parseObjectPropertyKey(),
|
|
D = this.parseGeneratorMethod(), S = !0), !g && b && this.match("(") && (g = "init", D = O ? this.parsePropertyMethodAsyncFunction() :
|
|
this.parsePropertyMethodFunction(), S = !0), g || this.throwUnexpectedToken(this.lookahead), g === "init" && (g = "method"), v ||
|
|
(C && this.isPropertyKey(b, "prototype") && this.throwUnexpectedToken(y, a.Messages.StaticPrototype), !C && this.isPropertyKey(
|
|
b, "constructor") && ((g !== "method" || !S || D && D.generator) && this.throwUnexpectedToken(y, a.Messages.ConstructorSpecialMethod),
|
|
d.value ? this.throwUnexpectedToken(y, a.Messages.DuplicateConstructor) : d.value = !0, g = "constructor")), this.finalize(p, new o.
|
|
MethodDefinition(b, v, D, g, C));
|
|
}, h.prototype.parseClassElementList = function() {
|
|
var d = [], y = { value: !1 };
|
|
for (this.expect("{"); !this.match("}"); )
|
|
this.match(";") ? this.nextToken() : d.push(this.parseClassElement(y));
|
|
return this.expect("}"), d;
|
|
}, h.prototype.parseClassBody = function() {
|
|
var d = this.createNode(), y = this.parseClassElementList();
|
|
return this.finalize(d, new o.ClassBody(y));
|
|
}, h.prototype.parseClassDeclaration = function(d) {
|
|
var y = this.createNode(), p = this.context.strict;
|
|
this.context.strict = !0, this.expectKeyword("class");
|
|
var g = d && this.lookahead.type !== 3 ? null : this.parseVariableIdentifier(), b = null;
|
|
this.matchKeyword("extends") && (this.nextToken(), b = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));
|
|
var D = this.parseClassBody();
|
|
return this.context.strict = p, this.finalize(y, new o.ClassDeclaration(g, b, D));
|
|
}, h.prototype.parseClassExpression = function() {
|
|
var d = this.createNode(), y = this.context.strict;
|
|
this.context.strict = !0, this.expectKeyword("class");
|
|
var p = this.lookahead.type === 3 ? this.parseVariableIdentifier() : null, g = null;
|
|
this.matchKeyword("extends") && (this.nextToken(), g = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));
|
|
var b = this.parseClassBody();
|
|
return this.context.strict = y, this.finalize(d, new o.ClassExpression(p, g, b));
|
|
}, h.prototype.parseModule = function() {
|
|
this.context.strict = !0, this.context.isModule = !0, this.scanner.isModule = !0;
|
|
for (var d = this.createNode(), y = this.parseDirectivePrologues(); this.lookahead.type !== 2; )
|
|
y.push(this.parseStatementListItem());
|
|
return this.finalize(d, new o.Module(y));
|
|
}, h.prototype.parseScript = function() {
|
|
for (var d = this.createNode(), y = this.parseDirectivePrologues(); this.lookahead.type !== 2; )
|
|
y.push(this.parseStatementListItem());
|
|
return this.finalize(d, new o.Script(y));
|
|
}, h.prototype.parseModuleSpecifier = function() {
|
|
var d = this.createNode();
|
|
this.lookahead.type !== 8 && this.throwError(a.Messages.InvalidModuleSpecifier);
|
|
var y = this.nextToken(), p = this.getTokenRaw(y);
|
|
return this.finalize(d, new o.Literal(y.value, p));
|
|
}, h.prototype.parseImportSpecifier = function() {
|
|
var d = this.createNode(), y, p;
|
|
return this.lookahead.type === 3 ? (y = this.parseVariableIdentifier(), p = y, this.matchContextualKeyword("as") && (this.nextToken(),
|
|
p = this.parseVariableIdentifier())) : (y = this.parseIdentifierName(), p = y, this.matchContextualKeyword("as") ? (this.nextToken(),
|
|
p = this.parseVariableIdentifier()) : this.throwUnexpectedToken(this.nextToken())), this.finalize(d, new o.ImportSpecifier(p, y));
|
|
}, h.prototype.parseNamedImports = function() {
|
|
this.expect("{");
|
|
for (var d = []; !this.match("}"); )
|
|
d.push(this.parseImportSpecifier()), this.match("}") || this.expect(",");
|
|
return this.expect("}"), d;
|
|
}, h.prototype.parseImportDefaultSpecifier = function() {
|
|
var d = this.createNode(), y = this.parseIdentifierName();
|
|
return this.finalize(d, new o.ImportDefaultSpecifier(y));
|
|
}, h.prototype.parseImportNamespaceSpecifier = function() {
|
|
var d = this.createNode();
|
|
this.expect("*"), this.matchContextualKeyword("as") || this.throwError(a.Messages.NoAsAfterImportNamespace), this.nextToken();
|
|
var y = this.parseIdentifierName();
|
|
return this.finalize(d, new o.ImportNamespaceSpecifier(y));
|
|
}, h.prototype.parseImportDeclaration = function() {
|
|
this.context.inFunctionBody && this.throwError(a.Messages.IllegalImportDeclaration);
|
|
var d = this.createNode();
|
|
this.expectKeyword("import");
|
|
var y, p = [];
|
|
if (this.lookahead.type === 8)
|
|
y = this.parseModuleSpecifier();
|
|
else {
|
|
if (this.match("{") ? p = p.concat(this.parseNamedImports()) : this.match("*") ? p.push(this.parseImportNamespaceSpecifier()) :
|
|
this.isIdentifierName(this.lookahead) && !this.matchKeyword("default") ? (p.push(this.parseImportDefaultSpecifier()), this.match(
|
|
",") && (this.nextToken(), this.match("*") ? p.push(this.parseImportNamespaceSpecifier()) : this.match("{") ? p = p.concat(this.
|
|
parseNamedImports()) : this.throwUnexpectedToken(this.lookahead))) : this.throwUnexpectedToken(this.nextToken()), !this.matchContextualKeyword(
|
|
"from")) {
|
|
var g = this.lookahead.value ? a.Messages.UnexpectedToken : a.Messages.MissingFromClause;
|
|
this.throwError(g, this.lookahead.value);
|
|
}
|
|
this.nextToken(), y = this.parseModuleSpecifier();
|
|
}
|
|
return this.consumeSemicolon(), this.finalize(d, new o.ImportDeclaration(p, y));
|
|
}, h.prototype.parseExportSpecifier = function() {
|
|
var d = this.createNode(), y = this.parseIdentifierName(), p = y;
|
|
return this.matchContextualKeyword("as") && (this.nextToken(), p = this.parseIdentifierName()), this.finalize(d, new o.ExportSpecifier(
|
|
y, p));
|
|
}, h.prototype.parseExportDeclaration = function() {
|
|
this.context.inFunctionBody && this.throwError(a.Messages.IllegalExportDeclaration);
|
|
var d = this.createNode();
|
|
this.expectKeyword("export");
|
|
var y;
|
|
if (this.matchKeyword("default"))
|
|
if (this.nextToken(), this.matchKeyword("function")) {
|
|
var p = this.parseFunctionDeclaration(!0);
|
|
y = this.finalize(d, new o.ExportDefaultDeclaration(p));
|
|
} else if (this.matchKeyword("class")) {
|
|
var p = this.parseClassDeclaration(!0);
|
|
y = this.finalize(d, new o.ExportDefaultDeclaration(p));
|
|
} else if (this.matchContextualKeyword("async")) {
|
|
var p = this.matchAsyncFunction() ? this.parseFunctionDeclaration(!0) : this.parseAssignmentExpression();
|
|
y = this.finalize(d, new o.ExportDefaultDeclaration(p));
|
|
} else {
|
|
this.matchContextualKeyword("from") && this.throwError(a.Messages.UnexpectedToken, this.lookahead.value);
|
|
var p = this.match("{") ? this.parseObjectInitializer() : this.match("[") ? this.parseArrayInitializer() : this.parseAssignmentExpression();
|
|
this.consumeSemicolon(), y = this.finalize(d, new o.ExportDefaultDeclaration(p));
|
|
}
|
|
else if (this.match("*")) {
|
|
if (this.nextToken(), !this.matchContextualKeyword("from")) {
|
|
var g = this.lookahead.value ? a.Messages.UnexpectedToken : a.Messages.MissingFromClause;
|
|
this.throwError(g, this.lookahead.value);
|
|
}
|
|
this.nextToken();
|
|
var b = this.parseModuleSpecifier();
|
|
this.consumeSemicolon(), y = this.finalize(d, new o.ExportAllDeclaration(b));
|
|
} else if (this.lookahead.type === 4) {
|
|
var p = void 0;
|
|
switch (this.lookahead.value) {
|
|
case "let":
|
|
case "const":
|
|
p = this.parseLexicalDeclaration({ inFor: !1 });
|
|
break;
|
|
case "var":
|
|
case "class":
|
|
case "function":
|
|
p = this.parseStatementListItem();
|
|
break;
|
|
default:
|
|
this.throwUnexpectedToken(this.lookahead);
|
|
}
|
|
y = this.finalize(d, new o.ExportNamedDeclaration(p, [], null));
|
|
} else if (this.matchAsyncFunction()) {
|
|
var p = this.parseFunctionDeclaration();
|
|
y = this.finalize(d, new o.ExportNamedDeclaration(p, [], null));
|
|
} else {
|
|
var D = [], v = null, S = !1;
|
|
for (this.expect("{"); !this.match("}"); )
|
|
S = S || this.matchKeyword("default"), D.push(this.parseExportSpecifier()), this.match("}") || this.expect(",");
|
|
if (this.expect("}"), this.matchContextualKeyword("from"))
|
|
this.nextToken(), v = this.parseModuleSpecifier(), this.consumeSemicolon();
|
|
else if (S) {
|
|
var g = this.lookahead.value ? a.Messages.UnexpectedToken : a.Messages.MissingFromClause;
|
|
this.throwError(g, this.lookahead.value);
|
|
} else
|
|
this.consumeSemicolon();
|
|
y = this.finalize(d, new o.ExportNamedDeclaration(null, D, v));
|
|
}
|
|
return y;
|
|
}, h;
|
|
}();
|
|
t.Parser = m;
|
|
},
|
|
/* 9 */
|
|
/***/
|
|
function(e, t) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
function r(i, n) {
|
|
if (!i)
|
|
throw new Error("ASSERT: " + n);
|
|
}
|
|
s(r, "assert"), t.assert = r;
|
|
},
|
|
/* 10 */
|
|
/***/
|
|
function(e, t) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
var r = function() {
|
|
function i() {
|
|
this.errors = [], this.tolerant = !1;
|
|
}
|
|
return s(i, "ErrorHandler"), i.prototype.recordError = function(n) {
|
|
this.errors.push(n);
|
|
}, i.prototype.tolerate = function(n) {
|
|
if (this.tolerant)
|
|
this.recordError(n);
|
|
else
|
|
throw n;
|
|
}, i.prototype.constructError = function(n, a) {
|
|
var o = new Error(n);
|
|
try {
|
|
throw o;
|
|
} catch (u) {
|
|
Object.create && Object.defineProperty && (o = Object.create(u), Object.defineProperty(o, "column", { value: a }));
|
|
}
|
|
return o;
|
|
}, i.prototype.createError = function(n, a, o, u) {
|
|
var l = "Line " + a + ": " + u, c = this.constructError(l, o);
|
|
return c.index = n, c.lineNumber = a, c.description = u, c;
|
|
}, i.prototype.throwError = function(n, a, o, u) {
|
|
throw this.createError(n, a, o, u);
|
|
}, i.prototype.tolerateError = function(n, a, o, u) {
|
|
var l = this.createError(n, a, o, u);
|
|
if (this.tolerant)
|
|
this.recordError(l);
|
|
else
|
|
throw l;
|
|
}, i;
|
|
}();
|
|
t.ErrorHandler = r;
|
|
},
|
|
/* 11 */
|
|
/***/
|
|
function(e, t) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.Messages = {
|
|
BadGetterArity: "Getter must not have any formal parameters",
|
|
BadSetterArity: "Setter must have exactly one formal parameter",
|
|
BadSetterRestParameter: "Setter function argument must not be a rest parameter",
|
|
ConstructorIsAsync: "Class constructor may not be an async method",
|
|
ConstructorSpecialMethod: "Class constructor may not be an accessor",
|
|
DeclarationMissingInitializer: "Missing initializer in %0 declaration",
|
|
DefaultRestParameter: "Unexpected token =",
|
|
DuplicateBinding: "Duplicate binding %0",
|
|
DuplicateConstructor: "A class may only have one constructor",
|
|
DuplicateProtoProperty: "Duplicate __proto__ fields are not allowed in object literals",
|
|
ForInOfLoopInitializer: "%0 loop variable declaration may not have an initializer",
|
|
GeneratorInLegacyContext: "Generator declarations are not allowed in legacy contexts",
|
|
IllegalBreak: "Illegal break statement",
|
|
IllegalContinue: "Illegal continue statement",
|
|
IllegalExportDeclaration: "Unexpected token",
|
|
IllegalImportDeclaration: "Unexpected token",
|
|
IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list",
|
|
IllegalReturn: "Illegal return statement",
|
|
InvalidEscapedReservedWord: "Keyword must not contain escaped characters",
|
|
InvalidHexEscapeSequence: "Invalid hexadecimal escape sequence",
|
|
InvalidLHSInAssignment: "Invalid left-hand side in assignment",
|
|
InvalidLHSInForIn: "Invalid left-hand side in for-in",
|
|
InvalidLHSInForLoop: "Invalid left-hand side in for-loop",
|
|
InvalidModuleSpecifier: "Unexpected token",
|
|
InvalidRegExp: "Invalid regular expression",
|
|
LetInLexicalBinding: "let is disallowed as a lexically bound name",
|
|
MissingFromClause: "Unexpected token",
|
|
MultipleDefaultsInSwitch: "More than one default clause in switch statement",
|
|
NewlineAfterThrow: "Illegal newline after throw",
|
|
NoAsAfterImportNamespace: "Unexpected token",
|
|
NoCatchOrFinally: "Missing catch or finally after try",
|
|
ParameterAfterRestParameter: "Rest parameter must be last formal parameter",
|
|
Redeclaration: "%0 '%1' has already been declared",
|
|
StaticPrototype: "Classes may not have static property named prototype",
|
|
StrictCatchVariable: "Catch variable may not be eval or arguments in strict mode",
|
|
StrictDelete: "Delete of an unqualified identifier in strict mode.",
|
|
StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block",
|
|
StrictFunctionName: "Function name may not be eval or arguments in strict mode",
|
|
StrictLHSAssignment: "Assignment to eval or arguments is not allowed in strict mode",
|
|
StrictLHSPostfix: "Postfix increment/decrement may not have eval or arguments operand in strict mode",
|
|
StrictLHSPrefix: "Prefix increment/decrement may not have eval or arguments operand in strict mode",
|
|
StrictModeWith: "Strict mode code may not include a with statement",
|
|
StrictOctalLiteral: "Octal literals are not allowed in strict mode.",
|
|
StrictParamDupe: "Strict mode function may not have duplicate parameter names",
|
|
StrictParamName: "Parameter name eval or arguments is not allowed in strict mode",
|
|
StrictReservedWord: "Use of future reserved word in strict mode",
|
|
StrictVarName: "Variable name may not be eval or arguments in strict mode",
|
|
TemplateOctalLiteral: "Octal literals are not allowed in template strings.",
|
|
UnexpectedEOS: "Unexpected end of input",
|
|
UnexpectedIdentifier: "Unexpected identifier",
|
|
UnexpectedNumber: "Unexpected number",
|
|
UnexpectedReserved: "Unexpected reserved word",
|
|
UnexpectedString: "Unexpected string",
|
|
UnexpectedTemplate: "Unexpected quasi %0",
|
|
UnexpectedToken: "Unexpected token %0",
|
|
UnexpectedTokenIllegal: "Unexpected token ILLEGAL",
|
|
UnknownLabel: "Undefined label '%0'",
|
|
UnterminatedRegExp: "Invalid regular expression: missing /"
|
|
};
|
|
},
|
|
/* 12 */
|
|
/***/
|
|
function(e, t, r) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
var i = r(9), n = r(4), a = r(11);
|
|
function o(c) {
|
|
return "0123456789abcdef".indexOf(c.toLowerCase());
|
|
}
|
|
s(o, "hexValue");
|
|
function u(c) {
|
|
return "01234567".indexOf(c);
|
|
}
|
|
s(u, "octalValue");
|
|
var l = function() {
|
|
function c(f, m) {
|
|
this.source = f, this.errorHandler = m, this.trackComment = !1, this.isModule = !1, this.length = f.length, this.index = 0, this.
|
|
lineNumber = f.length > 0 ? 1 : 0, this.lineStart = 0, this.curlyStack = [];
|
|
}
|
|
return s(c, "Scanner"), c.prototype.saveState = function() {
|
|
return {
|
|
index: this.index,
|
|
lineNumber: this.lineNumber,
|
|
lineStart: this.lineStart
|
|
};
|
|
}, c.prototype.restoreState = function(f) {
|
|
this.index = f.index, this.lineNumber = f.lineNumber, this.lineStart = f.lineStart;
|
|
}, c.prototype.eof = function() {
|
|
return this.index >= this.length;
|
|
}, c.prototype.throwUnexpectedToken = function(f) {
|
|
return f === void 0 && (f = a.Messages.UnexpectedTokenIllegal), this.errorHandler.throwError(this.index, this.lineNumber, this.
|
|
index - this.lineStart + 1, f);
|
|
}, c.prototype.tolerateUnexpectedToken = function(f) {
|
|
f === void 0 && (f = a.Messages.UnexpectedTokenIllegal), this.errorHandler.tolerateError(this.index, this.lineNumber, this.index -
|
|
this.lineStart + 1, f);
|
|
}, c.prototype.skipSingleLineComment = function(f) {
|
|
var m = [], h, d;
|
|
for (this.trackComment && (m = [], h = this.index - f, d = {
|
|
start: {
|
|
line: this.lineNumber,
|
|
column: this.index - this.lineStart - f
|
|
},
|
|
end: {}
|
|
}); !this.eof(); ) {
|
|
var y = this.source.charCodeAt(this.index);
|
|
if (++this.index, n.Character.isLineTerminator(y)) {
|
|
if (this.trackComment) {
|
|
d.end = {
|
|
line: this.lineNumber,
|
|
column: this.index - this.lineStart - 1
|
|
};
|
|
var p = {
|
|
multiLine: !1,
|
|
slice: [h + f, this.index - 1],
|
|
range: [h, this.index - 1],
|
|
loc: d
|
|
};
|
|
m.push(p);
|
|
}
|
|
return y === 13 && this.source.charCodeAt(this.index) === 10 && ++this.index, ++this.lineNumber, this.lineStart = this.index,
|
|
m;
|
|
}
|
|
}
|
|
if (this.trackComment) {
|
|
d.end = {
|
|
line: this.lineNumber,
|
|
column: this.index - this.lineStart
|
|
};
|
|
var p = {
|
|
multiLine: !1,
|
|
slice: [h + f, this.index],
|
|
range: [h, this.index],
|
|
loc: d
|
|
};
|
|
m.push(p);
|
|
}
|
|
return m;
|
|
}, c.prototype.skipMultiLineComment = function() {
|
|
var f = [], m, h;
|
|
for (this.trackComment && (f = [], m = this.index - 2, h = {
|
|
start: {
|
|
line: this.lineNumber,
|
|
column: this.index - this.lineStart - 2
|
|
},
|
|
end: {}
|
|
}); !this.eof(); ) {
|
|
var d = this.source.charCodeAt(this.index);
|
|
if (n.Character.isLineTerminator(d))
|
|
d === 13 && this.source.charCodeAt(this.index + 1) === 10 && ++this.index, ++this.lineNumber, ++this.index, this.lineStart =
|
|
this.index;
|
|
else if (d === 42) {
|
|
if (this.source.charCodeAt(this.index + 1) === 47) {
|
|
if (this.index += 2, this.trackComment) {
|
|
h.end = {
|
|
line: this.lineNumber,
|
|
column: this.index - this.lineStart
|
|
};
|
|
var y = {
|
|
multiLine: !0,
|
|
slice: [m + 2, this.index - 2],
|
|
range: [m, this.index],
|
|
loc: h
|
|
};
|
|
f.push(y);
|
|
}
|
|
return f;
|
|
}
|
|
++this.index;
|
|
} else
|
|
++this.index;
|
|
}
|
|
if (this.trackComment) {
|
|
h.end = {
|
|
line: this.lineNumber,
|
|
column: this.index - this.lineStart
|
|
};
|
|
var y = {
|
|
multiLine: !0,
|
|
slice: [m + 2, this.index],
|
|
range: [m, this.index],
|
|
loc: h
|
|
};
|
|
f.push(y);
|
|
}
|
|
return this.tolerateUnexpectedToken(), f;
|
|
}, c.prototype.scanComments = function() {
|
|
var f;
|
|
this.trackComment && (f = []);
|
|
for (var m = this.index === 0; !this.eof(); ) {
|
|
var h = this.source.charCodeAt(this.index);
|
|
if (n.Character.isWhiteSpace(h))
|
|
++this.index;
|
|
else if (n.Character.isLineTerminator(h))
|
|
++this.index, h === 13 && this.source.charCodeAt(this.index) === 10 && ++this.index, ++this.lineNumber, this.lineStart = this.
|
|
index, m = !0;
|
|
else if (h === 47)
|
|
if (h = this.source.charCodeAt(this.index + 1), h === 47) {
|
|
this.index += 2;
|
|
var d = this.skipSingleLineComment(2);
|
|
this.trackComment && (f = f.concat(d)), m = !0;
|
|
} else if (h === 42) {
|
|
this.index += 2;
|
|
var d = this.skipMultiLineComment();
|
|
this.trackComment && (f = f.concat(d));
|
|
} else
|
|
break;
|
|
else if (m && h === 45)
|
|
if (this.source.charCodeAt(this.index + 1) === 45 && this.source.charCodeAt(this.index + 2) === 62) {
|
|
this.index += 3;
|
|
var d = this.skipSingleLineComment(3);
|
|
this.trackComment && (f = f.concat(d));
|
|
} else
|
|
break;
|
|
else if (h === 60 && !this.isModule)
|
|
if (this.source.slice(this.index + 1, this.index + 4) === "!--") {
|
|
this.index += 4;
|
|
var d = this.skipSingleLineComment(4);
|
|
this.trackComment && (f = f.concat(d));
|
|
} else
|
|
break;
|
|
else
|
|
break;
|
|
}
|
|
return f;
|
|
}, c.prototype.isFutureReservedWord = function(f) {
|
|
switch (f) {
|
|
case "enum":
|
|
case "export":
|
|
case "import":
|
|
case "super":
|
|
return !0;
|
|
default:
|
|
return !1;
|
|
}
|
|
}, c.prototype.isStrictModeReservedWord = function(f) {
|
|
switch (f) {
|
|
case "implements":
|
|
case "interface":
|
|
case "package":
|
|
case "private":
|
|
case "protected":
|
|
case "public":
|
|
case "static":
|
|
case "yield":
|
|
case "let":
|
|
return !0;
|
|
default:
|
|
return !1;
|
|
}
|
|
}, c.prototype.isRestrictedWord = function(f) {
|
|
return f === "eval" || f === "arguments";
|
|
}, c.prototype.isKeyword = function(f) {
|
|
switch (f.length) {
|
|
case 2:
|
|
return f === "if" || f === "in" || f === "do";
|
|
case 3:
|
|
return f === "var" || f === "for" || f === "new" || f === "try" || f === "let";
|
|
case 4:
|
|
return f === "this" || f === "else" || f === "case" || f === "void" || f === "with" || f === "enum";
|
|
case 5:
|
|
return f === "while" || f === "break" || f === "catch" || f === "throw" || f === "const" || f === "yield" || f === "class" ||
|
|
f === "super";
|
|
case 6:
|
|
return f === "return" || f === "typeof" || f === "delete" || f === "switch" || f === "export" || f === "import";
|
|
case 7:
|
|
return f === "default" || f === "finally" || f === "extends";
|
|
case 8:
|
|
return f === "function" || f === "continue" || f === "debugger";
|
|
case 10:
|
|
return f === "instanceof";
|
|
default:
|
|
return !1;
|
|
}
|
|
}, c.prototype.codePointAt = function(f) {
|
|
var m = this.source.charCodeAt(f);
|
|
if (m >= 55296 && m <= 56319) {
|
|
var h = this.source.charCodeAt(f + 1);
|
|
if (h >= 56320 && h <= 57343) {
|
|
var d = m;
|
|
m = (d - 55296) * 1024 + h - 56320 + 65536;
|
|
}
|
|
}
|
|
return m;
|
|
}, c.prototype.scanHexEscape = function(f) {
|
|
for (var m = f === "u" ? 4 : 2, h = 0, d = 0; d < m; ++d)
|
|
if (!this.eof() && n.Character.isHexDigit(this.source.charCodeAt(this.index)))
|
|
h = h * 16 + o(this.source[this.index++]);
|
|
else
|
|
return null;
|
|
return String.fromCharCode(h);
|
|
}, c.prototype.scanUnicodeCodePointEscape = function() {
|
|
var f = this.source[this.index], m = 0;
|
|
for (f === "}" && this.throwUnexpectedToken(); !this.eof() && (f = this.source[this.index++], !!n.Character.isHexDigit(f.charCodeAt(
|
|
0))); )
|
|
m = m * 16 + o(f);
|
|
return (m > 1114111 || f !== "}") && this.throwUnexpectedToken(), n.Character.fromCodePoint(m);
|
|
}, c.prototype.getIdentifier = function() {
|
|
for (var f = this.index++; !this.eof(); ) {
|
|
var m = this.source.charCodeAt(this.index);
|
|
if (m === 92)
|
|
return this.index = f, this.getComplexIdentifier();
|
|
if (m >= 55296 && m < 57343)
|
|
return this.index = f, this.getComplexIdentifier();
|
|
if (n.Character.isIdentifierPart(m))
|
|
++this.index;
|
|
else
|
|
break;
|
|
}
|
|
return this.source.slice(f, this.index);
|
|
}, c.prototype.getComplexIdentifier = function() {
|
|
var f = this.codePointAt(this.index), m = n.Character.fromCodePoint(f);
|
|
this.index += m.length;
|
|
var h;
|
|
for (f === 92 && (this.source.charCodeAt(this.index) !== 117 && this.throwUnexpectedToken(), ++this.index, this.source[this.index] ===
|
|
"{" ? (++this.index, h = this.scanUnicodeCodePointEscape()) : (h = this.scanHexEscape("u"), (h === null || h === "\\" || !n.Character.
|
|
isIdentifierStart(h.charCodeAt(0))) && this.throwUnexpectedToken()), m = h); !this.eof() && (f = this.codePointAt(this.index),
|
|
!!n.Character.isIdentifierPart(f)); )
|
|
h = n.Character.fromCodePoint(f), m += h, this.index += h.length, f === 92 && (m = m.substr(0, m.length - 1), this.source.charCodeAt(
|
|
this.index) !== 117 && this.throwUnexpectedToken(), ++this.index, this.source[this.index] === "{" ? (++this.index, h = this.
|
|
scanUnicodeCodePointEscape()) : (h = this.scanHexEscape("u"), (h === null || h === "\\" || !n.Character.isIdentifierPart(h.charCodeAt(
|
|
0))) && this.throwUnexpectedToken()), m += h);
|
|
return m;
|
|
}, c.prototype.octalToDecimal = function(f) {
|
|
var m = f !== "0", h = u(f);
|
|
return !this.eof() && n.Character.isOctalDigit(this.source.charCodeAt(this.index)) && (m = !0, h = h * 8 + u(this.source[this.
|
|
index++]), "0123".indexOf(f) >= 0 && !this.eof() && n.Character.isOctalDigit(this.source.charCodeAt(this.index)) && (h = h * 8 +
|
|
u(this.source[this.index++]))), {
|
|
code: h,
|
|
octal: m
|
|
};
|
|
}, c.prototype.scanIdentifier = function() {
|
|
var f, m = this.index, h = this.source.charCodeAt(m) === 92 ? this.getComplexIdentifier() : this.getIdentifier();
|
|
if (h.length === 1 ? f = 3 : this.isKeyword(h) ? f = 4 : h === "null" ? f = 5 : h === "true" || h === "false" ? f = 1 : f = 3,
|
|
f !== 3 && m + h.length !== this.index) {
|
|
var d = this.index;
|
|
this.index = m, this.tolerateUnexpectedToken(a.Messages.InvalidEscapedReservedWord), this.index = d;
|
|
}
|
|
return {
|
|
type: f,
|
|
value: h,
|
|
lineNumber: this.lineNumber,
|
|
lineStart: this.lineStart,
|
|
start: m,
|
|
end: this.index
|
|
};
|
|
}, c.prototype.scanPunctuator = function() {
|
|
var f = this.index, m = this.source[this.index];
|
|
switch (m) {
|
|
case "(":
|
|
case "{":
|
|
m === "{" && this.curlyStack.push("{"), ++this.index;
|
|
break;
|
|
case ".":
|
|
++this.index, this.source[this.index] === "." && this.source[this.index + 1] === "." && (this.index += 2, m = "...");
|
|
break;
|
|
case "}":
|
|
++this.index, this.curlyStack.pop();
|
|
break;
|
|
case ")":
|
|
case ";":
|
|
case ",":
|
|
case "[":
|
|
case "]":
|
|
case ":":
|
|
case "?":
|
|
case "~":
|
|
++this.index;
|
|
break;
|
|
default:
|
|
m = this.source.substr(this.index, 4), m === ">>>=" ? this.index += 4 : (m = m.substr(0, 3), m === "===" || m === "!==" ||
|
|
m === ">>>" || m === "<<=" || m === ">>=" || m === "**=" ? this.index += 3 : (m = m.substr(0, 2), m === "&&" || m === "||" ||
|
|
m === "==" || m === "!=" || m === "+=" || m === "-=" || m === "*=" || m === "/=" || m === "++" || m === "--" || m === "<<" ||
|
|
m === ">>" || m === "&=" || m === "|=" || m === "^=" || m === "%=" || m === "<=" || m === ">=" || m === "=>" || m === "**" ?
|
|
this.index += 2 : (m = this.source[this.index], "<>=!+-*%&|^/".indexOf(m) >= 0 && ++this.index)));
|
|
}
|
|
return this.index === f && this.throwUnexpectedToken(), {
|
|
type: 7,
|
|
value: m,
|
|
lineNumber: this.lineNumber,
|
|
lineStart: this.lineStart,
|
|
start: f,
|
|
end: this.index
|
|
};
|
|
}, c.prototype.scanHexLiteral = function(f) {
|
|
for (var m = ""; !this.eof() && n.Character.isHexDigit(this.source.charCodeAt(this.index)); )
|
|
m += this.source[this.index++];
|
|
return m.length === 0 && this.throwUnexpectedToken(), n.Character.isIdentifierStart(this.source.charCodeAt(this.index)) && this.
|
|
throwUnexpectedToken(), {
|
|
type: 6,
|
|
value: parseInt("0x" + m, 16),
|
|
lineNumber: this.lineNumber,
|
|
lineStart: this.lineStart,
|
|
start: f,
|
|
end: this.index
|
|
};
|
|
}, c.prototype.scanBinaryLiteral = function(f) {
|
|
for (var m = "", h; !this.eof() && (h = this.source[this.index], !(h !== "0" && h !== "1")); )
|
|
m += this.source[this.index++];
|
|
return m.length === 0 && this.throwUnexpectedToken(), this.eof() || (h = this.source.charCodeAt(this.index), (n.Character.isIdentifierStart(
|
|
h) || n.Character.isDecimalDigit(h)) && this.throwUnexpectedToken()), {
|
|
type: 6,
|
|
value: parseInt(m, 2),
|
|
lineNumber: this.lineNumber,
|
|
lineStart: this.lineStart,
|
|
start: f,
|
|
end: this.index
|
|
};
|
|
}, c.prototype.scanOctalLiteral = function(f, m) {
|
|
var h = "", d = !1;
|
|
for (n.Character.isOctalDigit(f.charCodeAt(0)) ? (d = !0, h = "0" + this.source[this.index++]) : ++this.index; !this.eof() && n.
|
|
Character.isOctalDigit(this.source.charCodeAt(this.index)); )
|
|
h += this.source[this.index++];
|
|
return !d && h.length === 0 && this.throwUnexpectedToken(), (n.Character.isIdentifierStart(this.source.charCodeAt(this.index)) ||
|
|
n.Character.isDecimalDigit(this.source.charCodeAt(this.index))) && this.throwUnexpectedToken(), {
|
|
type: 6,
|
|
value: parseInt(h, 8),
|
|
octal: d,
|
|
lineNumber: this.lineNumber,
|
|
lineStart: this.lineStart,
|
|
start: m,
|
|
end: this.index
|
|
};
|
|
}, c.prototype.isImplicitOctalLiteral = function() {
|
|
for (var f = this.index + 1; f < this.length; ++f) {
|
|
var m = this.source[f];
|
|
if (m === "8" || m === "9")
|
|
return !1;
|
|
if (!n.Character.isOctalDigit(m.charCodeAt(0)))
|
|
return !0;
|
|
}
|
|
return !0;
|
|
}, c.prototype.scanNumericLiteral = function() {
|
|
var f = this.index, m = this.source[f];
|
|
i.assert(n.Character.isDecimalDigit(m.charCodeAt(0)) || m === ".", "Numeric literal must start with a decimal digit or a decim\
|
|
al point");
|
|
var h = "";
|
|
if (m !== ".") {
|
|
if (h = this.source[this.index++], m = this.source[this.index], h === "0") {
|
|
if (m === "x" || m === "X")
|
|
return ++this.index, this.scanHexLiteral(f);
|
|
if (m === "b" || m === "B")
|
|
return ++this.index, this.scanBinaryLiteral(f);
|
|
if (m === "o" || m === "O")
|
|
return this.scanOctalLiteral(m, f);
|
|
if (m && n.Character.isOctalDigit(m.charCodeAt(0)) && this.isImplicitOctalLiteral())
|
|
return this.scanOctalLiteral(m, f);
|
|
}
|
|
for (; n.Character.isDecimalDigit(this.source.charCodeAt(this.index)); )
|
|
h += this.source[this.index++];
|
|
m = this.source[this.index];
|
|
}
|
|
if (m === ".") {
|
|
for (h += this.source[this.index++]; n.Character.isDecimalDigit(this.source.charCodeAt(this.index)); )
|
|
h += this.source[this.index++];
|
|
m = this.source[this.index];
|
|
}
|
|
if (m === "e" || m === "E")
|
|
if (h += this.source[this.index++], m = this.source[this.index], (m === "+" || m === "-") && (h += this.source[this.index++]),
|
|
n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))
|
|
for (; n.Character.isDecimalDigit(this.source.charCodeAt(this.index)); )
|
|
h += this.source[this.index++];
|
|
else
|
|
this.throwUnexpectedToken();
|
|
return n.Character.isIdentifierStart(this.source.charCodeAt(this.index)) && this.throwUnexpectedToken(), {
|
|
type: 6,
|
|
value: parseFloat(h),
|
|
lineNumber: this.lineNumber,
|
|
lineStart: this.lineStart,
|
|
start: f,
|
|
end: this.index
|
|
};
|
|
}, c.prototype.scanStringLiteral = function() {
|
|
var f = this.index, m = this.source[f];
|
|
i.assert(m === "'" || m === '"', "String literal must starts with a quote"), ++this.index;
|
|
for (var h = !1, d = ""; !this.eof(); ) {
|
|
var y = this.source[this.index++];
|
|
if (y === m) {
|
|
m = "";
|
|
break;
|
|
} else if (y === "\\")
|
|
if (y = this.source[this.index++], !y || !n.Character.isLineTerminator(y.charCodeAt(0)))
|
|
switch (y) {
|
|
case "u":
|
|
if (this.source[this.index] === "{")
|
|
++this.index, d += this.scanUnicodeCodePointEscape();
|
|
else {
|
|
var p = this.scanHexEscape(y);
|
|
p === null && this.throwUnexpectedToken(), d += p;
|
|
}
|
|
break;
|
|
case "x":
|
|
var g = this.scanHexEscape(y);
|
|
g === null && this.throwUnexpectedToken(a.Messages.InvalidHexEscapeSequence), d += g;
|
|
break;
|
|
case "n":
|
|
d += `
|
|
`;
|
|
break;
|
|
case "r":
|
|
d += "\r";
|
|
break;
|
|
case "t":
|
|
d += " ";
|
|
break;
|
|
case "b":
|
|
d += "\b";
|
|
break;
|
|
case "f":
|
|
d += "\f";
|
|
break;
|
|
case "v":
|
|
d += "\v";
|
|
break;
|
|
case "8":
|
|
case "9":
|
|
d += y, this.tolerateUnexpectedToken();
|
|
break;
|
|
default:
|
|
if (y && n.Character.isOctalDigit(y.charCodeAt(0))) {
|
|
var b = this.octalToDecimal(y);
|
|
h = b.octal || h, d += String.fromCharCode(b.code);
|
|
} else
|
|
d += y;
|
|
break;
|
|
}
|
|
else
|
|
++this.lineNumber, y === "\r" && this.source[this.index] === `
|
|
` && ++this.index, this.lineStart = this.index;
|
|
else {
|
|
if (n.Character.isLineTerminator(y.charCodeAt(0)))
|
|
break;
|
|
d += y;
|
|
}
|
|
}
|
|
return m !== "" && (this.index = f, this.throwUnexpectedToken()), {
|
|
type: 8,
|
|
value: d,
|
|
octal: h,
|
|
lineNumber: this.lineNumber,
|
|
lineStart: this.lineStart,
|
|
start: f,
|
|
end: this.index
|
|
};
|
|
}, c.prototype.scanTemplate = function() {
|
|
var f = "", m = !1, h = this.index, d = this.source[h] === "`", y = !1, p = 2;
|
|
for (++this.index; !this.eof(); ) {
|
|
var g = this.source[this.index++];
|
|
if (g === "`") {
|
|
p = 1, y = !0, m = !0;
|
|
break;
|
|
} else if (g === "$") {
|
|
if (this.source[this.index] === "{") {
|
|
this.curlyStack.push("${"), ++this.index, m = !0;
|
|
break;
|
|
}
|
|
f += g;
|
|
} else if (g === "\\")
|
|
if (g = this.source[this.index++], n.Character.isLineTerminator(g.charCodeAt(0)))
|
|
++this.lineNumber, g === "\r" && this.source[this.index] === `
|
|
` && ++this.index, this.lineStart = this.index;
|
|
else
|
|
switch (g) {
|
|
case "n":
|
|
f += `
|
|
`;
|
|
break;
|
|
case "r":
|
|
f += "\r";
|
|
break;
|
|
case "t":
|
|
f += " ";
|
|
break;
|
|
case "u":
|
|
if (this.source[this.index] === "{")
|
|
++this.index, f += this.scanUnicodeCodePointEscape();
|
|
else {
|
|
var b = this.index, D = this.scanHexEscape(g);
|
|
D !== null ? f += D : (this.index = b, f += g);
|
|
}
|
|
break;
|
|
case "x":
|
|
var v = this.scanHexEscape(g);
|
|
v === null && this.throwUnexpectedToken(a.Messages.InvalidHexEscapeSequence), f += v;
|
|
break;
|
|
case "b":
|
|
f += "\b";
|
|
break;
|
|
case "f":
|
|
f += "\f";
|
|
break;
|
|
case "v":
|
|
f += "\v";
|
|
break;
|
|
default:
|
|
g === "0" ? (n.Character.isDecimalDigit(this.source.charCodeAt(this.index)) && this.throwUnexpectedToken(a.Messages.
|
|
TemplateOctalLiteral), f += "\0") : n.Character.isOctalDigit(g.charCodeAt(0)) ? this.throwUnexpectedToken(a.Messages.
|
|
TemplateOctalLiteral) : f += g;
|
|
break;
|
|
}
|
|
else n.Character.isLineTerminator(g.charCodeAt(0)) ? (++this.lineNumber, g === "\r" && this.source[this.index] === `
|
|
` && ++this.index, this.lineStart = this.index, f += `
|
|
`) : f += g;
|
|
}
|
|
return m || this.throwUnexpectedToken(), d || this.curlyStack.pop(), {
|
|
type: 10,
|
|
value: this.source.slice(h + 1, this.index - p),
|
|
cooked: f,
|
|
head: d,
|
|
tail: y,
|
|
lineNumber: this.lineNumber,
|
|
lineStart: this.lineStart,
|
|
start: h,
|
|
end: this.index
|
|
};
|
|
}, c.prototype.testRegExp = function(f, m) {
|
|
var h = "\uFFFF", d = f, y = this;
|
|
m.indexOf("u") >= 0 && (d = d.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function(p, g, b) {
|
|
var D = parseInt(g || b, 16);
|
|
return D > 1114111 && y.throwUnexpectedToken(a.Messages.InvalidRegExp), D <= 65535 ? String.fromCharCode(D) : h;
|
|
}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, h));
|
|
try {
|
|
RegExp(d);
|
|
} catch {
|
|
this.throwUnexpectedToken(a.Messages.InvalidRegExp);
|
|
}
|
|
try {
|
|
return new RegExp(f, m);
|
|
} catch {
|
|
return null;
|
|
}
|
|
}, c.prototype.scanRegExpBody = function() {
|
|
var f = this.source[this.index];
|
|
i.assert(f === "/", "Regular expression literal must start with a slash");
|
|
for (var m = this.source[this.index++], h = !1, d = !1; !this.eof(); )
|
|
if (f = this.source[this.index++], m += f, f === "\\")
|
|
f = this.source[this.index++], n.Character.isLineTerminator(f.charCodeAt(0)) && this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),
|
|
m += f;
|
|
else if (n.Character.isLineTerminator(f.charCodeAt(0)))
|
|
this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);
|
|
else if (h)
|
|
f === "]" && (h = !1);
|
|
else if (f === "/") {
|
|
d = !0;
|
|
break;
|
|
} else f === "[" && (h = !0);
|
|
return d || this.throwUnexpectedToken(a.Messages.UnterminatedRegExp), m.substr(1, m.length - 2);
|
|
}, c.prototype.scanRegExpFlags = function() {
|
|
for (var f = "", m = ""; !this.eof(); ) {
|
|
var h = this.source[this.index];
|
|
if (!n.Character.isIdentifierPart(h.charCodeAt(0)))
|
|
break;
|
|
if (++this.index, h === "\\" && !this.eof())
|
|
if (h = this.source[this.index], h === "u") {
|
|
++this.index;
|
|
var d = this.index, y = this.scanHexEscape("u");
|
|
if (y !== null)
|
|
for (m += y, f += "\\u"; d < this.index; ++d)
|
|
f += this.source[d];
|
|
else
|
|
this.index = d, m += "u", f += "\\u";
|
|
this.tolerateUnexpectedToken();
|
|
} else
|
|
f += "\\", this.tolerateUnexpectedToken();
|
|
else
|
|
m += h, f += h;
|
|
}
|
|
return m;
|
|
}, c.prototype.scanRegExp = function() {
|
|
var f = this.index, m = this.scanRegExpBody(), h = this.scanRegExpFlags(), d = this.testRegExp(m, h);
|
|
return {
|
|
type: 9,
|
|
value: "",
|
|
pattern: m,
|
|
flags: h,
|
|
regex: d,
|
|
lineNumber: this.lineNumber,
|
|
lineStart: this.lineStart,
|
|
start: f,
|
|
end: this.index
|
|
};
|
|
}, c.prototype.lex = function() {
|
|
if (this.eof())
|
|
return {
|
|
type: 2,
|
|
value: "",
|
|
lineNumber: this.lineNumber,
|
|
lineStart: this.lineStart,
|
|
start: this.index,
|
|
end: this.index
|
|
};
|
|
var f = this.source.charCodeAt(this.index);
|
|
return n.Character.isIdentifierStart(f) ? this.scanIdentifier() : f === 40 || f === 41 || f === 59 ? this.scanPunctuator() : f ===
|
|
39 || f === 34 ? this.scanStringLiteral() : f === 46 ? n.Character.isDecimalDigit(this.source.charCodeAt(this.index + 1)) ? this.
|
|
scanNumericLiteral() : this.scanPunctuator() : n.Character.isDecimalDigit(f) ? this.scanNumericLiteral() : f === 96 || f === 125 &&
|
|
this.curlyStack[this.curlyStack.length - 1] === "${" ? this.scanTemplate() : f >= 55296 && f < 57343 && n.Character.isIdentifierStart(
|
|
this.codePointAt(this.index)) ? this.scanIdentifier() : this.scanPunctuator();
|
|
}, c;
|
|
}();
|
|
t.Scanner = l;
|
|
},
|
|
/* 13 */
|
|
/***/
|
|
function(e, t) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.TokenName = {}, t.TokenName[
|
|
1
|
|
/* BooleanLiteral */
|
|
] = "Boolean", t.TokenName[
|
|
2
|
|
/* EOF */
|
|
] = "<end>", t.TokenName[
|
|
3
|
|
/* Identifier */
|
|
] = "Identifier", t.TokenName[
|
|
4
|
|
/* Keyword */
|
|
] = "Keyword", t.TokenName[
|
|
5
|
|
/* NullLiteral */
|
|
] = "Null", t.TokenName[
|
|
6
|
|
/* NumericLiteral */
|
|
] = "Numeric", t.TokenName[
|
|
7
|
|
/* Punctuator */
|
|
] = "Punctuator", t.TokenName[
|
|
8
|
|
/* StringLiteral */
|
|
] = "String", t.TokenName[
|
|
9
|
|
/* RegularExpression */
|
|
] = "RegularExpression", t.TokenName[
|
|
10
|
|
/* Template */
|
|
] = "Template";
|
|
},
|
|
/* 14 */
|
|
/***/
|
|
function(e, t) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.XHTMLEntities = {
|
|
quot: '"',
|
|
amp: "&",
|
|
apos: "'",
|
|
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",
|
|
loz: "\u25CA",
|
|
spades: "\u2660",
|
|
clubs: "\u2663",
|
|
hearts: "\u2665",
|
|
diams: "\u2666",
|
|
lang: "\u27E8",
|
|
rang: "\u27E9"
|
|
};
|
|
},
|
|
/* 15 */
|
|
/***/
|
|
function(e, t, r) {
|
|
"use strict";
|
|
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
var i = r(10), n = r(12), a = r(13), o = function() {
|
|
function l() {
|
|
this.values = [], this.curly = this.paren = -1;
|
|
}
|
|
return s(l, "Reader"), l.prototype.beforeFunctionExpression = function(c) {
|
|
return [
|
|
"(",
|
|
"{",
|
|
"[",
|
|
"in",
|
|
"typeof",
|
|
"instanceof",
|
|
"new",
|
|
"return",
|
|
"case",
|
|
"delete",
|
|
"throw",
|
|
"void",
|
|
// assignment operators
|
|
"=",
|
|
"+=",
|
|
"-=",
|
|
"*=",
|
|
"**=",
|
|
"/=",
|
|
"%=",
|
|
"<<=",
|
|
">>=",
|
|
">>>=",
|
|
"&=",
|
|
"|=",
|
|
"^=",
|
|
",",
|
|
// binary/unary operators
|
|
"+",
|
|
"-",
|
|
"*",
|
|
"**",
|
|
"/",
|
|
"%",
|
|
"++",
|
|
"--",
|
|
"<<",
|
|
">>",
|
|
">>>",
|
|
"&",
|
|
"|",
|
|
"^",
|
|
"!",
|
|
"~",
|
|
"&&",
|
|
"||",
|
|
"?",
|
|
":",
|
|
"===",
|
|
"==",
|
|
">=",
|
|
"<=",
|
|
"<",
|
|
">",
|
|
"!=",
|
|
"!=="
|
|
].indexOf(c) >= 0;
|
|
}, l.prototype.isRegexStart = function() {
|
|
var c = this.values[this.values.length - 1], f = c !== null;
|
|
switch (c) {
|
|
case "this":
|
|
case "]":
|
|
f = !1;
|
|
break;
|
|
case ")":
|
|
var m = this.values[this.paren - 1];
|
|
f = m === "if" || m === "while" || m === "for" || m === "with";
|
|
break;
|
|
case "}":
|
|
if (f = !1, this.values[this.curly - 3] === "function") {
|
|
var h = this.values[this.curly - 4];
|
|
f = h ? !this.beforeFunctionExpression(h) : !1;
|
|
} else if (this.values[this.curly - 4] === "function") {
|
|
var h = this.values[this.curly - 5];
|
|
f = h ? !this.beforeFunctionExpression(h) : !0;
|
|
}
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return f;
|
|
}, l.prototype.push = function(c) {
|
|
c.type === 7 || c.type === 4 ? (c.value === "{" ? this.curly = this.values.length : c.value === "(" && (this.paren = this.values.
|
|
length), this.values.push(c.value)) : this.values.push(null);
|
|
}, l;
|
|
}(), u = function() {
|
|
function l(c, f) {
|
|
this.errorHandler = new i.ErrorHandler(), this.errorHandler.tolerant = f ? typeof f.tolerant == "boolean" && f.tolerant : !1, this.
|
|
scanner = new n.Scanner(c, this.errorHandler), this.scanner.trackComment = f ? typeof f.comment == "boolean" && f.comment : !1,
|
|
this.trackRange = f ? typeof f.range == "boolean" && f.range : !1, this.trackLoc = f ? typeof f.loc == "boolean" && f.loc : !1,
|
|
this.buffer = [], this.reader = new o();
|
|
}
|
|
return s(l, "Tokenizer"), l.prototype.errors = function() {
|
|
return this.errorHandler.errors;
|
|
}, l.prototype.getNextToken = function() {
|
|
if (this.buffer.length === 0) {
|
|
var c = this.scanner.scanComments();
|
|
if (this.scanner.trackComment)
|
|
for (var f = 0; f < c.length; ++f) {
|
|
var m = c[f], h = this.scanner.source.slice(m.slice[0], m.slice[1]), d = {
|
|
type: m.multiLine ? "BlockComment" : "LineComment",
|
|
value: h
|
|
};
|
|
this.trackRange && (d.range = m.range), this.trackLoc && (d.loc = m.loc), this.buffer.push(d);
|
|
}
|
|
if (!this.scanner.eof()) {
|
|
var y = void 0;
|
|
this.trackLoc && (y = {
|
|
start: {
|
|
line: this.scanner.lineNumber,
|
|
column: this.scanner.index - this.scanner.lineStart
|
|
},
|
|
end: {}
|
|
});
|
|
var p = this.scanner.source[this.scanner.index] === "/" && this.reader.isRegexStart(), g = p ? this.scanner.scanRegExp() :
|
|
this.scanner.lex();
|
|
this.reader.push(g);
|
|
var b = {
|
|
type: a.TokenName[g.type],
|
|
value: this.scanner.source.slice(g.start, g.end)
|
|
};
|
|
if (this.trackRange && (b.range = [g.start, g.end]), this.trackLoc && (y.end = {
|
|
line: this.scanner.lineNumber,
|
|
column: this.scanner.index - this.scanner.lineStart
|
|
}, b.loc = y), g.type === 9) {
|
|
var D = g.pattern, v = g.flags;
|
|
b.regex = { pattern: D, flags: v };
|
|
}
|
|
this.buffer.push(b);
|
|
}
|
|
}
|
|
return this.buffer.shift();
|
|
}, l;
|
|
}();
|
|
t.Tokenizer = u;
|
|
}
|
|
/******/
|
|
])
|
|
);
|
|
});
|
|
});
|
|
|
|
// ../node_modules/array-timsort/src/index.js
|
|
var JM = E((Tst, GM) => {
|
|
var WM = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9], Le, $M = /* @__PURE__ */ s((e) => e < 1e5 ? e < 100 ? e < 10 ? 0 : 1 : e < 1e4 ?
|
|
e < 1e3 ? 2 : 3 : 4 : e < 1e7 ? e < 1e6 ? 5 : 6 : e < 1e9 ? e < 1e8 ? 7 : 8 : 9, "log10");
|
|
function VM(e, t) {
|
|
if (e === t)
|
|
return 0;
|
|
if (~~e === e && ~~t === t) {
|
|
if (e === 0 || t === 0)
|
|
return e < t ? -1 : 1;
|
|
if (e < 0 || t < 0) {
|
|
if (t >= 0)
|
|
return -1;
|
|
if (e >= 0)
|
|
return 1;
|
|
e = -e, t = -t;
|
|
}
|
|
let n = $M(e), a = $M(t), o = 0;
|
|
return n < a ? (e *= WM[a - n - 1], t /= 10, o = -1) : n > a && (t *= WM[n - a - 1], e /= 10, o = 1), e === t ? o : e < t ? -1 : 1;
|
|
}
|
|
let r = String(e), i = String(t);
|
|
return r === i ? 0 : r < i ? -1 : 1;
|
|
}
|
|
s(VM, "alphabeticalCompare");
|
|
function ole(e) {
|
|
let t = 0;
|
|
for (; e >= 32; )
|
|
t |= e & 1, e >>= 1;
|
|
return e + t;
|
|
}
|
|
s(ole, "minRunLength");
|
|
function HM(e, t, r, i) {
|
|
let n = t + 1;
|
|
if (n === r)
|
|
return 1;
|
|
if (i(e[n++], e[t]) < 0) {
|
|
for (; n < r && i(e[n], e[n - 1]) < 0; )
|
|
n++;
|
|
KM(e, t, n), KM(Le, t, n);
|
|
} else
|
|
for (; n < r && i(e[n], e[n - 1]) >= 0; )
|
|
n++;
|
|
return n - t;
|
|
}
|
|
s(HM, "makeAscendingRun");
|
|
function KM(e, t, r) {
|
|
for (r--; t < r; ) {
|
|
let i = e[t];
|
|
e[t++] = e[r], e[r--] = i;
|
|
}
|
|
}
|
|
s(KM, "reverseRun");
|
|
function zM(e, t, r, i, n) {
|
|
for (i === t && i++; i < r; i++) {
|
|
let a = e[i], o = Le[i], u = t, l = i;
|
|
for (; u < l; ) {
|
|
let f = u + l >>> 1;
|
|
n(a, e[f]) < 0 ? l = f : u = f + 1;
|
|
}
|
|
let c = i - u;
|
|
switch (c) {
|
|
case 3:
|
|
e[u + 3] = e[u + 2], Le[u + 3] = Le[u + 2];
|
|
/* falls through */
|
|
case 2:
|
|
e[u + 2] = e[u + 1], Le[u + 2] = Le[u + 1];
|
|
/* falls through */
|
|
case 1:
|
|
e[u + 1] = e[u], Le[u + 1] = Le[u];
|
|
break;
|
|
default:
|
|
for (; c > 0; )
|
|
e[u + c] = e[u + c - 1], Le[u + c] = Le[u + c - 1], c--;
|
|
}
|
|
e[u] = a, Le[u] = o;
|
|
}
|
|
}
|
|
s(zM, "binaryInsertionSort");
|
|
function qx(e, t, r, i, n, a) {
|
|
let o = 0, u = 0, l = 1;
|
|
if (a(e, t[r + n]) > 0) {
|
|
for (u = i - n; l < u && a(e, t[r + n + l]) > 0; )
|
|
o = l, l = (l << 1) + 1, l <= 0 && (l = u);
|
|
l > u && (l = u), o += n, l += n;
|
|
} else {
|
|
for (u = n + 1; l < u && a(e, t[r + n - l]) <= 0; )
|
|
o = l, l = (l << 1) + 1, l <= 0 && (l = u);
|
|
l > u && (l = u);
|
|
let c = o;
|
|
o = n - l, l = n - c;
|
|
}
|
|
for (o++; o < l; ) {
|
|
let c = o + (l - o >>> 1);
|
|
a(e, t[r + c]) > 0 ? o = c + 1 : l = c;
|
|
}
|
|
return l;
|
|
}
|
|
s(qx, "gallopLeft");
|
|
function Ux(e, t, r, i, n, a) {
|
|
let o = 0, u = 0, l = 1;
|
|
if (a(e, t[r + n]) < 0) {
|
|
for (u = n + 1; l < u && a(e, t[r + n - l]) < 0; )
|
|
o = l, l = (l << 1) + 1, l <= 0 && (l = u);
|
|
l > u && (l = u);
|
|
let c = o;
|
|
o = n - l, l = n - c;
|
|
} else {
|
|
for (u = i - n; l < u && a(e, t[r + n + l]) >= 0; )
|
|
o = l, l = (l << 1) + 1, l <= 0 && (l = u);
|
|
l > u && (l = u), o += n, l += n;
|
|
}
|
|
for (o++; o < l; ) {
|
|
let c = o + (l - o >>> 1);
|
|
a(e, t[r + c]) < 0 ? l = c : o = c + 1;
|
|
}
|
|
return l;
|
|
}
|
|
s(Ux, "gallopRight");
|
|
var Wx = class {
|
|
static {
|
|
s(this, "TimSort");
|
|
}
|
|
constructor(t, r) {
|
|
this.array = t, this.compare = r;
|
|
let { length: i } = t;
|
|
this.length = i, this.minGallop = 7, this.tmpStorageLength = i < 2 * 256 ? i >>> 1 : 256, this.tmp = new Array(this.tmpStorageLength),
|
|
this.tmpIndex = new Array(this.tmpStorageLength), this.stackLength = i < 120 ? 5 : i < 1542 ? 10 : i < 119151 ? 19 : 40, this.runStart =
|
|
new Array(this.stackLength), this.runLength = new Array(this.stackLength), this.stackSize = 0;
|
|
}
|
|
/**
|
|
* Push a new run on TimSort's stack.
|
|
*
|
|
* @param {number} runStart - Start index of the run in the original array.
|
|
* @param {number} runLength - Length of the run;
|
|
*/
|
|
pushRun(t, r) {
|
|
this.runStart[this.stackSize] = t, this.runLength[this.stackSize] = r, this.stackSize += 1;
|
|
}
|
|
/**
|
|
* Merge runs on TimSort's stack so that the following holds for all i:
|
|
* 1) runLength[i - 3] > runLength[i - 2] + runLength[i - 1]
|
|
* 2) runLength[i - 2] > runLength[i - 1]
|
|
*/
|
|
mergeRuns() {
|
|
for (; this.stackSize > 1; ) {
|
|
let t = this.stackSize - 2;
|
|
if (t >= 1 && this.runLength[t - 1] <= this.runLength[t] + this.runLength[t + 1] || t >= 2 && this.runLength[t - 2] <= this.runLength[t] +
|
|
this.runLength[t - 1])
|
|
this.runLength[t - 1] < this.runLength[t + 1] && t--;
|
|
else if (this.runLength[t] > this.runLength[t + 1])
|
|
break;
|
|
this.mergeAt(t);
|
|
}
|
|
}
|
|
/**
|
|
* Merge all runs on TimSort's stack until only one remains.
|
|
*/
|
|
forceMergeRuns() {
|
|
for (; this.stackSize > 1; ) {
|
|
let t = this.stackSize - 2;
|
|
t > 0 && this.runLength[t - 1] < this.runLength[t + 1] && t--, this.mergeAt(t);
|
|
}
|
|
}
|
|
/**
|
|
* Merge the runs on the stack at positions i and i+1. Must be always be called
|
|
* with i=stackSize-2 or i=stackSize-3 (that is, we merge on top of the stack).
|
|
*
|
|
* @param {number} i - Index of the run to merge in TimSort's stack.
|
|
*/
|
|
mergeAt(t) {
|
|
let { compare: r } = this, { array: i } = this, n = this.runStart[t], a = this.runLength[t], o = this.runStart[t + 1], u = this.runLength[t +
|
|
1];
|
|
this.runLength[t] = a + u, t === this.stackSize - 3 && (this.runStart[t + 1] = this.runStart[t + 2], this.runLength[t + 1] = this.runLength[t +
|
|
2]), this.stackSize--;
|
|
let l = Ux(i[o], i, n, a, 0, r);
|
|
n += l, a -= l, a !== 0 && (u = qx(
|
|
i[n + a - 1],
|
|
i,
|
|
o,
|
|
u,
|
|
u - 1,
|
|
r
|
|
), u !== 0 && (a <= u ? this.mergeLow(n, a, o, u) : this.mergeHigh(n, a, o, u)));
|
|
}
|
|
/**
|
|
* Merge two adjacent runs in a stable way. The runs must be such that the
|
|
* first element of run1 is bigger than the first element in run2 and the
|
|
* last element of run1 is greater than all the elements in run2.
|
|
* The method should be called when run1.length <= run2.length as it uses
|
|
* TimSort temporary array to store run1. Use mergeHigh if run1.length >
|
|
* run2.length.
|
|
*
|
|
* @param {number} start1 - First element in run1.
|
|
* @param {number} length1 - Length of run1.
|
|
* @param {number} start2 - First element in run2.
|
|
* @param {number} length2 - Length of run2.
|
|
*/
|
|
mergeLow(t, r, i, n) {
|
|
let { compare: a } = this, { array: o } = this, { tmp: u } = this, { tmpIndex: l } = this, c = 0;
|
|
for (c = 0; c < r; c++)
|
|
u[c] = o[t + c], l[c] = Le[t + c];
|
|
let f = 0, m = i, h = t;
|
|
if (o[h] = o[m], Le[h] = Le[m], h++, m++, --n === 0) {
|
|
for (c = 0; c < r; c++)
|
|
o[h + c] = u[f + c], Le[h + c] = l[f + c];
|
|
return;
|
|
}
|
|
if (r === 1) {
|
|
for (c = 0; c < n; c++)
|
|
o[h + c] = o[m + c], Le[h + c] = Le[m + c];
|
|
o[h + n] = u[f], Le[h + n] = l[f];
|
|
return;
|
|
}
|
|
let { minGallop: d } = this;
|
|
for (; ; ) {
|
|
let y = 0, p = 0, g = !1;
|
|
do
|
|
if (a(o[m], u[f]) < 0) {
|
|
if (o[h] = o[m], Le[h] = Le[m], h++, m++, p++, y = 0, --n === 0) {
|
|
g = !0;
|
|
break;
|
|
}
|
|
} else if (o[h] = u[f], Le[h] = l[f], h++, f++, y++, p = 0, --r === 1) {
|
|
g = !0;
|
|
break;
|
|
}
|
|
while ((y | p) < d);
|
|
if (g)
|
|
break;
|
|
do {
|
|
if (y = Ux(o[m], u, f, r, 0, a), y !== 0) {
|
|
for (c = 0; c < y; c++)
|
|
o[h + c] = u[f + c], Le[h + c] = l[f + c];
|
|
if (h += y, f += y, r -= y, r <= 1) {
|
|
g = !0;
|
|
break;
|
|
}
|
|
}
|
|
if (o[h] = o[m], Le[h] = Le[m], h++, m++, --n === 0) {
|
|
g = !0;
|
|
break;
|
|
}
|
|
if (p = qx(u[f], o, m, n, 0, a), p !== 0) {
|
|
for (c = 0; c < p; c++)
|
|
o[h + c] = o[m + c], Le[h + c] = Le[m + c];
|
|
if (h += p, m += p, n -= p, n === 0) {
|
|
g = !0;
|
|
break;
|
|
}
|
|
}
|
|
if (o[h] = u[f], Le[h] = l[f], h++, f++, --r === 1) {
|
|
g = !0;
|
|
break;
|
|
}
|
|
d--;
|
|
} while (y >= 7 || p >= 7);
|
|
if (g)
|
|
break;
|
|
d < 0 && (d = 0), d += 2;
|
|
}
|
|
if (this.minGallop = d, d < 1 && (this.minGallop = 1), r === 1) {
|
|
for (c = 0; c < n; c++)
|
|
o[h + c] = o[m + c], Le[h + c] = Le[m + c];
|
|
o[h + n] = u[f], Le[h + n] = l[f];
|
|
} else {
|
|
if (r === 0)
|
|
throw new Error("mergeLow preconditions were not respected");
|
|
for (c = 0; c < r; c++)
|
|
o[h + c] = u[f + c], Le[h + c] = l[f + c];
|
|
}
|
|
}
|
|
/**
|
|
* Merge two adjacent runs in a stable way. The runs must be such that the
|
|
* first element of run1 is bigger than the first element in run2 and the
|
|
* last element of run1 is greater than all the elements in run2.
|
|
* The method should be called when run1.length > run2.length as it uses
|
|
* TimSort temporary array to store run2. Use mergeLow if run1.length <=
|
|
* run2.length.
|
|
*
|
|
* @param {number} start1 - First element in run1.
|
|
* @param {number} length1 - Length of run1.
|
|
* @param {number} start2 - First element in run2.
|
|
* @param {number} length2 - Length of run2.
|
|
*/
|
|
mergeHigh(t, r, i, n) {
|
|
let { compare: a } = this, { array: o } = this, { tmp: u } = this, { tmpIndex: l } = this, c = 0;
|
|
for (c = 0; c < n; c++)
|
|
u[c] = o[i + c], l[c] = Le[i + c];
|
|
let f = t + r - 1, m = n - 1, h = i + n - 1, d = 0, y = 0;
|
|
if (o[h] = o[f], Le[h] = Le[f], h--, f--, --r === 0) {
|
|
for (d = h - (n - 1), c = 0; c < n; c++)
|
|
o[d + c] = u[c], Le[d + c] = l[c];
|
|
return;
|
|
}
|
|
if (n === 1) {
|
|
for (h -= r, f -= r, y = h + 1, d = f + 1, c = r - 1; c >= 0; c--)
|
|
o[y + c] = o[d + c], Le[y + c] = Le[d + c];
|
|
o[h] = u[m], Le[h] = l[m];
|
|
return;
|
|
}
|
|
let { minGallop: p } = this;
|
|
for (; ; ) {
|
|
let g = 0, b = 0, D = !1;
|
|
do
|
|
if (a(u[m], o[f]) < 0) {
|
|
if (o[h] = o[f], Le[h] = Le[f], h--, f--, g++, b = 0, --r === 0) {
|
|
D = !0;
|
|
break;
|
|
}
|
|
} else if (o[h] = u[m], Le[h] = l[m], h--, m--, b++, g = 0, --n === 1) {
|
|
D = !0;
|
|
break;
|
|
}
|
|
while ((g | b) < p);
|
|
if (D)
|
|
break;
|
|
do {
|
|
if (g = r - Ux(
|
|
u[m],
|
|
o,
|
|
t,
|
|
r,
|
|
r - 1,
|
|
a
|
|
), g !== 0) {
|
|
for (h -= g, f -= g, r -= g, y = h + 1, d = f + 1, c = g - 1; c >= 0; c--)
|
|
o[y + c] = o[d + c], Le[y + c] = Le[d + c];
|
|
if (r === 0) {
|
|
D = !0;
|
|
break;
|
|
}
|
|
}
|
|
if (o[h] = u[m], Le[h] = l[m], h--, m--, --n === 1) {
|
|
D = !0;
|
|
break;
|
|
}
|
|
if (b = n - qx(
|
|
o[f],
|
|
u,
|
|
0,
|
|
n,
|
|
n - 1,
|
|
a
|
|
), b !== 0) {
|
|
for (h -= b, m -= b, n -= b, y = h + 1, d = m + 1, c = 0; c < b; c++)
|
|
o[y + c] = u[d + c], Le[y + c] = l[d + c];
|
|
if (n <= 1) {
|
|
D = !0;
|
|
break;
|
|
}
|
|
}
|
|
if (o[h] = o[f], Le[h] = Le[f], h--, f--, --r === 0) {
|
|
D = !0;
|
|
break;
|
|
}
|
|
p--;
|
|
} while (g >= 7 || b >= 7);
|
|
if (D)
|
|
break;
|
|
p < 0 && (p = 0), p += 2;
|
|
}
|
|
if (this.minGallop = p, p < 1 && (this.minGallop = 1), n === 1) {
|
|
for (h -= r, f -= r, y = h + 1, d = f + 1, c = r - 1; c >= 0; c--)
|
|
o[y + c] = o[d + c], Le[y + c] = Le[d + c];
|
|
o[h] = u[m], Le[h] = l[m];
|
|
} else {
|
|
if (n === 0)
|
|
throw new Error("mergeHigh preconditions were not respected");
|
|
for (d = h - (n - 1), c = 0; c < n; c++)
|
|
o[d + c] = u[c], Le[d + c] = l[c];
|
|
}
|
|
}
|
|
};
|
|
function ule(e, t, r, i) {
|
|
if (!Array.isArray(e))
|
|
throw new TypeError(
|
|
`The "array" argument must be an array. Received ${e}`
|
|
);
|
|
Le = [];
|
|
let { length: n } = e, a = 0;
|
|
for (; a < n; )
|
|
Le[a] = a++;
|
|
t ? typeof t != "function" && (i = r, r = t, t = VM) : t = VM, r || (r = 0), i || (i = n);
|
|
let o = i - r;
|
|
if (o < 2)
|
|
return Le;
|
|
let u = 0;
|
|
if (o < 32)
|
|
return u = HM(e, r, i, t), zM(e, r, i, r + u, t), Le;
|
|
let l = new Wx(e, t), c = ole(o);
|
|
do {
|
|
if (u = HM(e, r, i, t), u < c) {
|
|
let f = o;
|
|
f > c && (f = c), zM(e, r, r + f, r + u, t), u = f;
|
|
}
|
|
l.pushRun(r, u), l.mergeRuns(), o -= u, r += u;
|
|
} while (o !== 0);
|
|
return l.forceMergeRuns(), Le;
|
|
}
|
|
s(ule, "sort");
|
|
GM.exports = {
|
|
sort: ule
|
|
};
|
|
});
|
|
|
|
// ../node_modules/has-own-prop/index.js
|
|
var YM = E((wst, XM) => {
|
|
"use strict";
|
|
var lle = Object.prototype.hasOwnProperty;
|
|
XM.exports = (e, t) => lle.call(e, t);
|
|
});
|
|
|
|
// ../node_modules/comment-json/src/common.js
|
|
var Xf = E((Ast, uR) => {
|
|
var Hx = YM(), {
|
|
isObject: ZM,
|
|
isArray: cle,
|
|
isString: fle,
|
|
isNumber: dle
|
|
} = _r(), Kx = "before", eR = "after-prop", tR = "after-colon", rR = "after-value", iR = "after", nR = "before-all", sR = "after-all", ple = "\
|
|
[", hle = "]", mle = "{", yle = "}", gle = ",", ble = "", Dle = "-", zx = [
|
|
Kx,
|
|
eR,
|
|
tR,
|
|
rR,
|
|
iR
|
|
], vle = [
|
|
Kx,
|
|
nR,
|
|
sR
|
|
].map(Symbol.for), aR = ":", QM = void 0, Jf = /* @__PURE__ */ s((e, t) => Symbol.for(e + aR + t), "symbol"), Vm = /* @__PURE__ */ s((e, t, r) => Object.
|
|
defineProperty(e, t, {
|
|
value: r,
|
|
writable: !0,
|
|
configurable: !0
|
|
}), "define"), Vx = /* @__PURE__ */ s((e, t, r, i, n, a) => {
|
|
let o = Jf(n, i);
|
|
if (!Hx(t, o))
|
|
return;
|
|
let u = r === i ? o : Jf(n, r);
|
|
Vm(e, u, t[o]), a && delete t[o];
|
|
}, "copy_comments_by_kind"), oR = /* @__PURE__ */ s((e, t, r, i, n) => {
|
|
zx.forEach((a) => {
|
|
Vx(
|
|
e,
|
|
t,
|
|
r,
|
|
i,
|
|
a,
|
|
n
|
|
);
|
|
});
|
|
}, "copy_comments"), Ele = /* @__PURE__ */ s((e, t, r) => {
|
|
t !== r && zx.forEach((i) => {
|
|
let n = Jf(i, r);
|
|
if (!Hx(e, n)) {
|
|
Vx(e, e, r, t, i, !0);
|
|
return;
|
|
}
|
|
let a = e[n];
|
|
delete e[n], Vx(e, e, r, t, i, !0), Vm(e, Jf(i, t), a);
|
|
});
|
|
}, "swap_comments"), $x = /* @__PURE__ */ s((e, t) => {
|
|
vle.forEach((r) => {
|
|
let i = t[r];
|
|
i && Vm(e, r, i);
|
|
});
|
|
}, "assign_non_prop_comments"), xle = /* @__PURE__ */ s((e, t, r) => (r.forEach((i) => {
|
|
!fle(i) && !dle(i) || Hx(t, i) && (e[i] = t[i], oR(e, t, i, i));
|
|
}), e), "assign");
|
|
uR.exports = {
|
|
SYMBOL_PREFIXES: zx,
|
|
PREFIX_BEFORE: Kx,
|
|
PREFIX_AFTER_PROP: eR,
|
|
PREFIX_AFTER_COLON: tR,
|
|
PREFIX_AFTER_VALUE: rR,
|
|
PREFIX_AFTER: iR,
|
|
PREFIX_BEFORE_ALL: nR,
|
|
PREFIX_AFTER_ALL: sR,
|
|
BRACKET_OPEN: ple,
|
|
BRACKET_CLOSE: hle,
|
|
CURLY_BRACKET_OPEN: mle,
|
|
CURLY_BRACKET_CLOSE: yle,
|
|
COLON: aR,
|
|
COMMA: gle,
|
|
MINUS: Dle,
|
|
EMPTY: ble,
|
|
UNDEFINED: QM,
|
|
symbol: Jf,
|
|
define: Vm,
|
|
copy_comments: oR,
|
|
swap_comments: Ele,
|
|
assign_non_prop_comments: $x,
|
|
assign(e, t, r) {
|
|
if (!ZM(e))
|
|
throw new TypeError("Cannot convert undefined or null to object");
|
|
if (!ZM(t))
|
|
return e;
|
|
if (r === QM)
|
|
r = Object.keys(t), $x(e, t);
|
|
else if (cle(r))
|
|
r.length === 0 && $x(e, t);
|
|
else throw new TypeError("keys must be array or undefined");
|
|
return xle(e, t, r);
|
|
}
|
|
};
|
|
});
|
|
|
|
// ../node_modules/comment-json/src/array.js
|
|
var Jx = E((Pst, pR) => {
|
|
var { isArray: Sle } = _r(), { sort: Tle } = JM(), {
|
|
SYMBOL_PREFIXES: Cle,
|
|
UNDEFINED: lR,
|
|
symbol: wle,
|
|
copy_comments: Ale,
|
|
swap_comments: dR
|
|
} = Xf(), _le = /* @__PURE__ */ s((e) => {
|
|
let { length: t } = e, r = 0, i = t / 2;
|
|
for (; r < i; r++)
|
|
dR(e, r, t - r - 1);
|
|
}, "reverse_comments"), cR = /* @__PURE__ */ s((e, t, r, i, n) => {
|
|
Ale(e, t, r + i, r, n);
|
|
}, "move_comment"), Sl = /* @__PURE__ */ s((e, t, r, i, n, a) => {
|
|
if (n > 0) {
|
|
let u = i;
|
|
for (; u-- > 0; )
|
|
cR(e, t, r + u, n, a);
|
|
return;
|
|
}
|
|
let o = 0;
|
|
for (; o < i; ) {
|
|
let u = o++;
|
|
cR(e, t, r + u, n, a);
|
|
}
|
|
}, "move_comments"), fR = /* @__PURE__ */ s((e, t) => {
|
|
Cle.forEach((r) => {
|
|
let i = wle(r, t);
|
|
delete e[i];
|
|
});
|
|
}, "remove_comments"), Ple = /* @__PURE__ */ s((e, t) => {
|
|
let r = t;
|
|
for (; r in e; )
|
|
r = e[r];
|
|
return r;
|
|
}, "get_mapped"), Gx = class e extends Array {
|
|
static {
|
|
s(this, "CommentArray");
|
|
}
|
|
// - deleteCount + items.length
|
|
// We should avoid `splice(begin, deleteCount, ...items)`,
|
|
// because `splice(0, undefined)` is not equivalent to `splice(0)`,
|
|
// as well as:
|
|
// - slice
|
|
splice(...t) {
|
|
let { length: r } = this, i = super.splice(...t), [n, a, ...o] = t;
|
|
n < 0 && (n += r), arguments.length === 1 ? a = r - n : a = Math.min(r - n, a);
|
|
let {
|
|
length: u
|
|
} = o, l = u - a, c = n + a, f = r - c;
|
|
return Sl(this, this, c, f, l, !0), i;
|
|
}
|
|
slice(...t) {
|
|
let { length: r } = this, i = super.slice(...t);
|
|
if (!i.length)
|
|
return new e();
|
|
let [n, a] = t;
|
|
return a === lR ? a = r : a < 0 && (a += r), n < 0 ? n += r : n === lR && (n = 0), Sl(i, this, n, a - n, -n), i;
|
|
}
|
|
unshift(...t) {
|
|
let { length: r } = this, i = super.unshift(...t), {
|
|
length: n
|
|
} = t;
|
|
return n > 0 && Sl(this, this, 0, r, n, !0), i;
|
|
}
|
|
shift() {
|
|
let t = super.shift(), { length: r } = this;
|
|
return fR(this, 0), Sl(this, this, 1, r, -1, !0), t;
|
|
}
|
|
reverse() {
|
|
return super.reverse(), _le(this), this;
|
|
}
|
|
pop() {
|
|
let t = super.pop();
|
|
return fR(this, this.length), t;
|
|
}
|
|
concat(...t) {
|
|
let { length: r } = this, i = super.concat(...t);
|
|
return t.length && (Sl(i, this, 0, this.length, 0), t.forEach((n) => {
|
|
let a = r;
|
|
r += Sle(n) ? n.length : 1, n instanceof e && Sl(i, n, 0, n.length, a);
|
|
})), i;
|
|
}
|
|
sort(...t) {
|
|
let r = Tle(
|
|
this,
|
|
...t.slice(0, 1)
|
|
), i = /* @__PURE__ */ Object.create(null);
|
|
return r.forEach((n, a) => {
|
|
if (n === a)
|
|
return;
|
|
let o = Ple(i, n);
|
|
o !== a && (i[a] = o, dR(this, a, o));
|
|
}), this;
|
|
}
|
|
};
|
|
pR.exports = {
|
|
CommentArray: Gx
|
|
};
|
|
});
|
|
|
|
// ../node_modules/comment-json/src/parse.js
|
|
var FR = E((Ist, PR) => {
|
|
var Fle = UM(), {
|
|
CommentArray: Ile
|
|
} = Jx(), {
|
|
PREFIX_BEFORE: Km,
|
|
PREFIX_AFTER_PROP: Ole,
|
|
PREFIX_AFTER_COLON: kle,
|
|
PREFIX_AFTER_VALUE: gR,
|
|
PREFIX_AFTER: Yx,
|
|
PREFIX_BEFORE_ALL: Ble,
|
|
PREFIX_AFTER_ALL: Nle,
|
|
BRACKET_OPEN: Mle,
|
|
BRACKET_CLOSE: hR,
|
|
CURLY_BRACKET_OPEN: Rle,
|
|
CURLY_BRACKET_CLOSE: mR,
|
|
COLON: bR,
|
|
COMMA: DR,
|
|
MINUS: yR,
|
|
EMPTY: jle,
|
|
UNDEFINED: Jm,
|
|
define: Zx,
|
|
assign_non_prop_comments: Lle
|
|
} = Xf(), vR = /* @__PURE__ */ s((e) => Fle.tokenize(e, {
|
|
comment: !0,
|
|
loc: !0
|
|
}), "tokenize"), Qx = [], Ia = null, Jn = null, e1 = [], Oa, ER = !1, xR = !1, Yf = null, Zf = null, ri = null, SR, zm = null, TR = /* @__PURE__ */ s(
|
|
() => {
|
|
e1.length = Qx.length = 0, Zf = null, Oa = Jm;
|
|
}, "clean"), qle = /* @__PURE__ */ s(() => {
|
|
TR(), Yf.length = 0, Jn = Ia = Yf = Zf = ri = zm = null;
|
|
}, "free"), t1 = /* @__PURE__ */ s((e) => Symbol.for(
|
|
Oa !== Jm ? e + bR + Oa : e
|
|
), "symbolFor"), r1 = /* @__PURE__ */ s((e, t) => zm ? zm(e, t) : t, "transform"), CR = /* @__PURE__ */ s(() => {
|
|
let e = new SyntaxError(`Unexpected token ${ri.value.slice(0, 1)}`);
|
|
throw Object.assign(e, ri.loc.start), e;
|
|
}, "unexpected"), wR = /* @__PURE__ */ s(() => {
|
|
let e = new SyntaxError("Unexpected end of JSON input");
|
|
throw Object.assign(e, Zf ? Zf.loc.end : {
|
|
line: 1,
|
|
column: 0
|
|
}), e;
|
|
}, "unexpected_end"), Ji = /* @__PURE__ */ s(() => {
|
|
let e = Yf[++SR];
|
|
xR = ri && e && ri.loc.end.line === e.loc.start.line || !1, Zf = ri, ri = e;
|
|
}, "next"), Xx = /* @__PURE__ */ s(() => (ri || wR(), ri.type === "Punctuator" ? ri.value : ri.type), "type"), Ro = /* @__PURE__ */ s((e) => Xx() ===
|
|
e, "is"), Hm = /* @__PURE__ */ s((e) => {
|
|
Ro(e) || CR();
|
|
}, "expect"), i1 = /* @__PURE__ */ s((e) => {
|
|
Qx.push(Ia), Ia = e;
|
|
}, "set_comments_host"), n1 = /* @__PURE__ */ s(() => {
|
|
Ia = Qx.pop();
|
|
}, "restore_comments_host"), AR = /* @__PURE__ */ s(() => {
|
|
if (!Jn)
|
|
return;
|
|
let e = [];
|
|
for (let r of Jn)
|
|
if (r.inline)
|
|
e.push(r);
|
|
else
|
|
break;
|
|
let { length: t } = e;
|
|
t && (t === Jn.length ? Jn = null : Jn.splice(0, t), Zx(Ia, t1(Yx), e));
|
|
}, "assign_after_comments"), Fa = /* @__PURE__ */ s((e) => {
|
|
Jn && (Zx(Ia, t1(e), Jn), Jn = null);
|
|
}, "assign_comments"), Xn = /* @__PURE__ */ s((e) => {
|
|
let t = [];
|
|
for (; ri && (Ro("LineComment") || Ro("BlockComment")); ) {
|
|
let r = {
|
|
...ri,
|
|
inline: xR
|
|
};
|
|
t.push(r), Ji();
|
|
}
|
|
if (!ER && t.length) {
|
|
if (e) {
|
|
Zx(Ia, t1(e), t);
|
|
return;
|
|
}
|
|
Jn = t;
|
|
}
|
|
}, "parse_comments"), Gm = /* @__PURE__ */ s((e, t) => {
|
|
t && e1.push(Oa), Oa = e;
|
|
}, "set_prop"), _R = /* @__PURE__ */ s(() => {
|
|
Oa = e1.pop();
|
|
}, "restore_prop"), Ule = /* @__PURE__ */ s(() => {
|
|
let e = {};
|
|
i1(e), Gm(Jm, !0);
|
|
let t = !1, r;
|
|
for (Xn(); !Ro(mR) && !(t && (Fa(gR), Hm(DR), Ji(), Xn(), AR(), Ro(mR))); )
|
|
t = !0, Hm("String"), r = JSON.parse(ri.value), Gm(r), Fa(Km), Ji(), Xn(Ole), Hm(bR), Ji(), Xn(kle), e[r] = r1(r, s1()), Xn();
|
|
return t && Fa(Yx), Ji(), Oa = void 0, t || Fa(Km), n1(), _R(), e;
|
|
}, "parse_object"), Wle = /* @__PURE__ */ s(() => {
|
|
let e = new Ile();
|
|
i1(e), Gm(Jm, !0);
|
|
let t = !1, r = 0;
|
|
for (Xn(); !Ro(hR) && !(t && (Fa(gR), Hm(DR), Ji(), Xn(), AR(), Ro(hR))); )
|
|
t = !0, Gm(r), Fa(Km), e[r] = r1(r, s1()), r++, Xn();
|
|
return t && Fa(Yx), Ji(), Oa = void 0, t || Fa(Km), n1(), _R(), e;
|
|
}, "parse_array");
|
|
function s1() {
|
|
let e = Xx();
|
|
if (e === Rle)
|
|
return Ji(), Ule();
|
|
if (e === Mle)
|
|
return Ji(), Wle();
|
|
let t = jle;
|
|
e === yR && (Ji(), e = Xx(), t = yR);
|
|
let r;
|
|
switch (e) {
|
|
case "String":
|
|
case "Boolean":
|
|
case "Null":
|
|
case "Numeric":
|
|
return r = ri.value, Ji(), JSON.parse(t + r);
|
|
default:
|
|
}
|
|
}
|
|
s(s1, "walk");
|
|
var $le = /* @__PURE__ */ s((e) => Object(e) === e, "isObject"), Vle = /* @__PURE__ */ s((e, t, r) => {
|
|
TR(), Yf = vR(e), zm = t, ER = r, Yf.length || wR(), SR = -1, Ji(), i1({}), Xn(Ble);
|
|
let i = s1();
|
|
return Xn(Nle), ri && CR(), !r && i !== null && ($le(i) || (i = new Object(i)), Lle(i, Ia)), n1(), i = r1("", i), qle(), i;
|
|
}, "parse");
|
|
PR.exports = {
|
|
parse: Vle,
|
|
tokenize: vR
|
|
};
|
|
});
|
|
|
|
// ../node_modules/repeat-string/index.js
|
|
var OR = E((kst, IR) => {
|
|
"use strict";
|
|
var Ms = "", a1;
|
|
IR.exports = Hle;
|
|
function Hle(e, t) {
|
|
if (typeof e != "string")
|
|
throw new TypeError("expected a string");
|
|
if (t === 1) return e;
|
|
if (t === 2) return e + e;
|
|
var r = e.length * t;
|
|
if (a1 !== e || typeof a1 > "u")
|
|
a1 = e, Ms = "";
|
|
else if (Ms.length >= r)
|
|
return Ms.substr(0, r);
|
|
for (; r > Ms.length && t > 1; )
|
|
t & 1 && (Ms += e), t >>= 1, e += e;
|
|
return Ms += e, Ms = Ms.substr(0, r), Ms;
|
|
}
|
|
s(Hle, "repeat");
|
|
});
|
|
|
|
// ../node_modules/comment-json/src/stringify.js
|
|
var $R = E((Nst, WR) => {
|
|
var {
|
|
isArray: l1,
|
|
isObject: kR,
|
|
isFunction: u1,
|
|
isNumber: Kle,
|
|
isString: zle
|
|
} = _r(), Gle = OR(), {
|
|
PREFIX_BEFORE_ALL: Jle,
|
|
PREFIX_BEFORE: BR,
|
|
PREFIX_AFTER_PROP: Xle,
|
|
PREFIX_AFTER_COLON: Yle,
|
|
PREFIX_AFTER_VALUE: Zle,
|
|
PREFIX_AFTER: c1,
|
|
PREFIX_AFTER_ALL: Qle,
|
|
BRACKET_OPEN: ece,
|
|
BRACKET_CLOSE: tce,
|
|
CURLY_BRACKET_OPEN: rce,
|
|
CURLY_BRACKET_CLOSE: ice,
|
|
COLON: nce,
|
|
COMMA: NR,
|
|
EMPTY: ki,
|
|
UNDEFINED: sce
|
|
} = Xf(), o1 = /[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, f1 = "\
|
|
", jo = `
|
|
`, MR = "null", RR = /* @__PURE__ */ s((e) => `${BR}:${e}`, "BEFORE"), ace = /* @__PURE__ */ s((e) => `${Xle}:${e}`, "AFTER_PROP"), oce = /* @__PURE__ */ s(
|
|
(e) => `${Yle}:${e}`, "AFTER_COLON"), jR = /* @__PURE__ */ s((e) => `${Zle}:${e}`, "AFTER_VALUE"), LR = /* @__PURE__ */ s((e) => `${c1}:${e}`,
|
|
"AFTER"), uce = {
|
|
"\b": "\\b",
|
|
" ": "\\t",
|
|
"\n": "\\n",
|
|
"\f": "\\f",
|
|
"\r": "\\r",
|
|
'"': '\\"',
|
|
"\\": "\\\\"
|
|
}, lce = /* @__PURE__ */ s((e) => (o1.lastIndex = 0, o1.test(e) ? e.replace(o1, (t) => {
|
|
let r = uce[t];
|
|
return typeof r == "string" ? r : t;
|
|
}) : e), "escape"), qR = /* @__PURE__ */ s((e) => `"${lce(e)}"`, "quote"), cce = /* @__PURE__ */ s((e, t) => t ? `//${e}` : `/*${e}*/`, "c\
|
|
omment_stringify"), Oi = /* @__PURE__ */ s((e, t, r, i) => {
|
|
let n = e[Symbol.for(t)];
|
|
if (!n || !n.length)
|
|
return ki;
|
|
let a = !1, o = n.reduce((u, {
|
|
inline: l,
|
|
type: c,
|
|
value: f
|
|
}) => {
|
|
let m = l ? f1 : jo + r;
|
|
return a = c === "LineComment", u + m + cce(f, a);
|
|
}, ki);
|
|
return i || a ? o + jo + r : o;
|
|
}, "process_comments"), Tl = null, ed = ki, fce = /* @__PURE__ */ s(() => {
|
|
Tl = null, ed = ki;
|
|
}, "clean"), Qf = /* @__PURE__ */ s((e, t, r) => e ? t ? e + t.trim() + jo + r : e.trimRight() + jo + r : t ? t.trimRight() + jo + r : ki,
|
|
"join"), UR = /* @__PURE__ */ s((e, t, r) => {
|
|
let i = Oi(t, BR, r + ed, !0);
|
|
return Qf(i, e, r);
|
|
}, "join_content"), dce = /* @__PURE__ */ s((e, t) => {
|
|
let r = t + ed, { length: i } = e, n = ki, a = ki;
|
|
for (let o = 0; o < i; o++) {
|
|
o !== 0 && (n += NR);
|
|
let u = Qf(
|
|
a,
|
|
Oi(e, RR(o), r),
|
|
r
|
|
);
|
|
n += u || jo + r, n += d1(o, e, r) || MR, n += Oi(e, jR(o), r), a = Oi(e, LR(o), r);
|
|
}
|
|
return n += Qf(
|
|
a,
|
|
Oi(e, c1, r),
|
|
r
|
|
), ece + UR(n, e, t) + tce;
|
|
}, "array_stringify"), pce = /* @__PURE__ */ s((e, t) => {
|
|
if (!e)
|
|
return "null";
|
|
let r = t + ed, i = ki, n = ki, a = !0, o = l1(Tl) ? Tl : Object.keys(e), u = /* @__PURE__ */ s((l) => {
|
|
let c = d1(l, e, r);
|
|
if (c === sce)
|
|
return;
|
|
a || (i += NR), a = !1;
|
|
let f = Qf(
|
|
n,
|
|
Oi(e, RR(l), r),
|
|
r
|
|
);
|
|
i += f || jo + r, i += qR(l) + Oi(e, ace(l), r) + nce + Oi(e, oce(l), r) + f1 + c + Oi(e, jR(l), r), n = Oi(e, LR(l), r);
|
|
}, "iteratee");
|
|
return o.forEach(u), i += Qf(
|
|
n,
|
|
Oi(e, c1, r),
|
|
r
|
|
), rce + UR(i, e, t) + ice;
|
|
}, "object_stringify");
|
|
function d1(e, t, r) {
|
|
let i = t[e];
|
|
switch (kR(i) && u1(i.toJSON) && (i = i.toJSON(e)), u1(Tl) && (i = Tl.call(t, e, i)), typeof i) {
|
|
case "string":
|
|
return qR(i);
|
|
case "number":
|
|
return Number.isFinite(i) ? String(i) : MR;
|
|
case "boolean":
|
|
case "null":
|
|
return String(i);
|
|
// If the type is 'object', we might be dealing with an object or an array or
|
|
// null.
|
|
case "object":
|
|
return l1(i) ? dce(i, r) : pce(i, r);
|
|
// undefined
|
|
default:
|
|
}
|
|
}
|
|
s(d1, "stringify");
|
|
var hce = /* @__PURE__ */ s((e) => zle(e) ? e : Kle(e) ? Gle(f1, e) : ki, "get_indent"), { toString: mce } = Object.prototype, yce = [
|
|
"[object Number]",
|
|
"[object String]",
|
|
"[object Boolean]"
|
|
], gce = /* @__PURE__ */ s((e) => {
|
|
if (typeof e != "object")
|
|
return !1;
|
|
let t = mce.call(e);
|
|
return yce.includes(t);
|
|
}, "is_primitive_object");
|
|
WR.exports = (e, t, r) => {
|
|
let i = hce(r);
|
|
if (!i)
|
|
return JSON.stringify(e, t);
|
|
!u1(t) && !l1(t) && (t = null), Tl = t, ed = i;
|
|
let n = gce(e) ? JSON.stringify(e) : d1("", { "": e }, ki);
|
|
return fce(), kR(e) ? Oi(e, Jle, ki).trimLeft() + n + Oi(e, Qle, ki).trimRight() : n;
|
|
};
|
|
});
|
|
|
|
// ../node_modules/comment-json/src/index.js
|
|
var HR = E((Rst, VR) => {
|
|
var { parse: bce, tokenize: Dce } = FR(), vce = $R(), { CommentArray: Ece } = Jx(), { assign: xce } = Xf();
|
|
VR.exports = {
|
|
parse: bce,
|
|
stringify: vce,
|
|
tokenize: Dce,
|
|
CommentArray: Ece,
|
|
assign: xce
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/utils/shallowEqual.js
|
|
var Xm = E((h1) => {
|
|
"use strict";
|
|
Object.defineProperty(h1, "__esModule", {
|
|
value: !0
|
|
});
|
|
h1.default = _ce;
|
|
function _ce(e, t) {
|
|
let r = Object.keys(t);
|
|
for (let i of r)
|
|
if (e[i] !== t[i])
|
|
return !1;
|
|
return !0;
|
|
}
|
|
s(_ce, "shallowEqual");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/utils/deprecationWarning.js
|
|
var rd = E((m1) => {
|
|
"use strict";
|
|
Object.defineProperty(m1, "__esModule", {
|
|
value: !0
|
|
});
|
|
m1.default = Pce;
|
|
var GR = /* @__PURE__ */ new Set();
|
|
function Pce(e, t, r = "") {
|
|
if (GR.has(e)) return;
|
|
GR.add(e);
|
|
let {
|
|
internal: i,
|
|
trace: n
|
|
} = Fce(1, 2);
|
|
i || console.warn(`${r}\`${e}\` has been deprecated, please migrate to \`${t}\`
|
|
${n}`);
|
|
}
|
|
s(Pce, "deprecationWarning");
|
|
function Fce(e, t) {
|
|
let {
|
|
stackTraceLimit: r,
|
|
prepareStackTrace: i
|
|
} = Error, n;
|
|
if (Error.stackTraceLimit = 1 + e + t, Error.prepareStackTrace = function(o, u) {
|
|
n = u;
|
|
}, new Error().stack, Error.stackTraceLimit = r, Error.prepareStackTrace = i, !n) return {
|
|
internal: !1,
|
|
trace: ""
|
|
};
|
|
let a = n.slice(1 + e, 1 + e + t);
|
|
return {
|
|
internal: /[\\/]@babel[\\/]/.test(a[1].getFileName()),
|
|
trace: a.map((o) => ` at ${o}`).join(`
|
|
`)
|
|
};
|
|
}
|
|
s(Fce, "captureShortStackTrace");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/generated/index.js
|
|
var fr = E((w) => {
|
|
"use strict";
|
|
Object.defineProperty(w, "__esModule", {
|
|
value: !0
|
|
});
|
|
w.isAccessor = Kme;
|
|
w.isAnyTypeAnnotation = dde;
|
|
w.isArgumentPlaceholder = Upe;
|
|
w.isArrayExpression = Ice;
|
|
w.isArrayPattern = Pfe;
|
|
w.isArrayTypeAnnotation = pde;
|
|
w.isArrowFunctionExpression = Ffe;
|
|
w.isAssignmentExpression = Oce;
|
|
w.isAssignmentPattern = _fe;
|
|
w.isAwaitExpression = Qfe;
|
|
w.isBigIntLiteral = tde;
|
|
w.isBinary = mme;
|
|
w.isBinaryExpression = kce;
|
|
w.isBindExpression = Wpe;
|
|
w.isBlock = bme;
|
|
w.isBlockParent = gme;
|
|
w.isBlockStatement = Rce;
|
|
w.isBooleanLiteral = nfe;
|
|
w.isBooleanLiteralTypeAnnotation = mde;
|
|
w.isBooleanTypeAnnotation = hde;
|
|
w.isBreakStatement = jce;
|
|
w.isCallExpression = Lce;
|
|
w.isCatchClause = qce;
|
|
w.isClass = $me;
|
|
w.isClassAccessorProperty = ade;
|
|
w.isClassBody = Ife;
|
|
w.isClassDeclaration = kfe;
|
|
w.isClassExpression = Ofe;
|
|
w.isClassImplements = gde;
|
|
w.isClassMethod = Hfe;
|
|
w.isClassPrivateMethod = ude;
|
|
w.isClassPrivateProperty = ode;
|
|
w.isClassProperty = sde;
|
|
w.isCompletionStatement = Eme;
|
|
w.isConditional = xme;
|
|
w.isConditionalExpression = Uce;
|
|
w.isContinueStatement = Wce;
|
|
w.isDebuggerStatement = $ce;
|
|
w.isDecimalLiteral = Gpe;
|
|
w.isDeclaration = Ime;
|
|
w.isDeclareClass = bde;
|
|
w.isDeclareExportAllDeclaration = Ade;
|
|
w.isDeclareExportDeclaration = wde;
|
|
w.isDeclareFunction = Dde;
|
|
w.isDeclareInterface = vde;
|
|
w.isDeclareModule = Ede;
|
|
w.isDeclareModuleExports = xde;
|
|
w.isDeclareOpaqueType = Tde;
|
|
w.isDeclareTypeAlias = Sde;
|
|
w.isDeclareVariable = Cde;
|
|
w.isDeclaredPredicate = _de;
|
|
w.isDecorator = $pe;
|
|
w.isDirective = Nce;
|
|
w.isDirectiveLiteral = Mce;
|
|
w.isDoExpression = Vpe;
|
|
w.isDoWhileStatement = Vce;
|
|
w.isEmptyStatement = Hce;
|
|
w.isEmptyTypeAnnotation = Lde;
|
|
w.isEnumBody = Qme;
|
|
w.isEnumBooleanBody = ppe;
|
|
w.isEnumBooleanMember = gpe;
|
|
w.isEnumDeclaration = dpe;
|
|
w.isEnumDefaultedMember = vpe;
|
|
w.isEnumMember = eye;
|
|
w.isEnumNumberBody = hpe;
|
|
w.isEnumNumberMember = bpe;
|
|
w.isEnumStringBody = mpe;
|
|
w.isEnumStringMember = Dpe;
|
|
w.isEnumSymbolBody = ype;
|
|
w.isExistsTypeAnnotation = Pde;
|
|
w.isExportAllDeclaration = Bfe;
|
|
w.isExportDeclaration = Vme;
|
|
w.isExportDefaultDeclaration = Nfe;
|
|
w.isExportDefaultSpecifier = Hpe;
|
|
w.isExportNamedDeclaration = Mfe;
|
|
w.isExportNamespaceSpecifier = rde;
|
|
w.isExportSpecifier = Rfe;
|
|
w.isExpression = hme;
|
|
w.isExpressionStatement = Kce;
|
|
w.isExpressionWrapper = Cme;
|
|
w.isFile = zce;
|
|
w.isFlow = Gme;
|
|
w.isFlowBaseAnnotation = Xme;
|
|
w.isFlowDeclaration = Yme;
|
|
w.isFlowPredicate = Zme;
|
|
w.isFlowType = Jme;
|
|
w.isFor = wme;
|
|
w.isForInStatement = Gce;
|
|
w.isForOfStatement = jfe;
|
|
w.isForStatement = Jce;
|
|
w.isForXStatement = Ame;
|
|
w.isFunction = _me;
|
|
w.isFunctionDeclaration = Xce;
|
|
w.isFunctionExpression = Yce;
|
|
w.isFunctionParent = Pme;
|
|
w.isFunctionTypeAnnotation = Fde;
|
|
w.isFunctionTypeParam = Ide;
|
|
w.isGenericTypeAnnotation = Ode;
|
|
w.isIdentifier = Zce;
|
|
w.isIfStatement = Qce;
|
|
w.isImmutable = Mme;
|
|
w.isImport = ede;
|
|
w.isImportAttribute = fde;
|
|
w.isImportDeclaration = Lfe;
|
|
w.isImportDefaultSpecifier = qfe;
|
|
w.isImportExpression = $fe;
|
|
w.isImportNamespaceSpecifier = Ufe;
|
|
w.isImportOrExportDeclaration = JR;
|
|
w.isImportSpecifier = Wfe;
|
|
w.isIndexedAccessType = Epe;
|
|
w.isInferredPredicate = kde;
|
|
w.isInterfaceDeclaration = Nde;
|
|
w.isInterfaceExtends = Bde;
|
|
w.isInterfaceTypeAnnotation = Mde;
|
|
w.isInterpreterDirective = Bce;
|
|
w.isIntersectionTypeAnnotation = Rde;
|
|
w.isJSX = tye;
|
|
w.isJSXAttribute = Spe;
|
|
w.isJSXClosingElement = Tpe;
|
|
w.isJSXClosingFragment = Rpe;
|
|
w.isJSXElement = Cpe;
|
|
w.isJSXEmptyExpression = wpe;
|
|
w.isJSXExpressionContainer = Ape;
|
|
w.isJSXFragment = Npe;
|
|
w.isJSXIdentifier = Ppe;
|
|
w.isJSXMemberExpression = Fpe;
|
|
w.isJSXNamespacedName = Ipe;
|
|
w.isJSXOpeningElement = Ope;
|
|
w.isJSXOpeningFragment = Mpe;
|
|
w.isJSXSpreadAttribute = kpe;
|
|
w.isJSXSpreadChild = _pe;
|
|
w.isJSXText = Bpe;
|
|
w.isLVal = kme;
|
|
w.isLabeledStatement = efe;
|
|
w.isLiteral = Nme;
|
|
w.isLogicalExpression = afe;
|
|
w.isLoop = Sme;
|
|
w.isMemberExpression = ofe;
|
|
w.isMetaProperty = Vfe;
|
|
w.isMethod = jme;
|
|
w.isMiscellaneous = rye;
|
|
w.isMixedTypeAnnotation = jde;
|
|
w.isModuleDeclaration = fye;
|
|
w.isModuleExpression = Jpe;
|
|
w.isModuleSpecifier = Hme;
|
|
w.isNewExpression = ufe;
|
|
w.isNoop = jpe;
|
|
w.isNullLiteral = ife;
|
|
w.isNullLiteralTypeAnnotation = yde;
|
|
w.isNullableTypeAnnotation = qde;
|
|
w.isNumberLiteral = oye;
|
|
w.isNumberLiteralTypeAnnotation = Ude;
|
|
w.isNumberTypeAnnotation = Wde;
|
|
w.isNumericLiteral = rfe;
|
|
w.isObjectExpression = cfe;
|
|
w.isObjectMember = Lme;
|
|
w.isObjectMethod = ffe;
|
|
w.isObjectPattern = Kfe;
|
|
w.isObjectProperty = dfe;
|
|
w.isObjectTypeAnnotation = $de;
|
|
w.isObjectTypeCallProperty = Hde;
|
|
w.isObjectTypeIndexer = Kde;
|
|
w.isObjectTypeInternalSlot = Vde;
|
|
w.isObjectTypeProperty = zde;
|
|
w.isObjectTypeSpreadProperty = Gde;
|
|
w.isOpaqueType = Jde;
|
|
w.isOptionalCallExpression = nde;
|
|
w.isOptionalIndexedAccessType = xpe;
|
|
w.isOptionalMemberExpression = ide;
|
|
w.isParenthesizedExpression = yfe;
|
|
w.isPattern = Wme;
|
|
w.isPatternLike = Ome;
|
|
w.isPipelineBareFunction = Zpe;
|
|
w.isPipelinePrimaryTopicReference = Qpe;
|
|
w.isPipelineTopicExpression = Ype;
|
|
w.isPlaceholder = Lpe;
|
|
w.isPrivate = zme;
|
|
w.isPrivateName = lde;
|
|
w.isProgram = lfe;
|
|
w.isProperty = qme;
|
|
w.isPureish = Fme;
|
|
w.isQualifiedTypeIdentifier = Xde;
|
|
w.isRecordExpression = Kpe;
|
|
w.isRegExpLiteral = sfe;
|
|
w.isRegexLiteral = uye;
|
|
w.isRestElement = pfe;
|
|
w.isRestProperty = lye;
|
|
w.isReturnStatement = hfe;
|
|
w.isScopable = yme;
|
|
w.isSequenceExpression = mfe;
|
|
w.isSpreadElement = zfe;
|
|
w.isSpreadProperty = cye;
|
|
w.isStandardized = pme;
|
|
w.isStatement = Dme;
|
|
w.isStaticBlock = cde;
|
|
w.isStringLiteral = tfe;
|
|
w.isStringLiteralTypeAnnotation = Yde;
|
|
w.isStringTypeAnnotation = Zde;
|
|
w.isSuper = Gfe;
|
|
w.isSwitchCase = gfe;
|
|
w.isSwitchStatement = bfe;
|
|
w.isSymbolTypeAnnotation = Qde;
|
|
w.isTSAnyKeyword = lhe;
|
|
w.isTSArrayType = Phe;
|
|
w.isTSAsExpression = Jhe;
|
|
w.isTSBaseType = aye;
|
|
w.isTSBigIntKeyword = fhe;
|
|
w.isTSBooleanKeyword = che;
|
|
w.isTSCallSignatureDeclaration = nhe;
|
|
w.isTSConditionalType = Mhe;
|
|
w.isTSConstructSignatureDeclaration = she;
|
|
w.isTSConstructorType = The;
|
|
w.isTSDeclareFunction = the;
|
|
w.isTSDeclareMethod = rhe;
|
|
w.isTSEntityName = Bme;
|
|
w.isTSEnumBody = Zhe;
|
|
w.isTSEnumDeclaration = Qhe;
|
|
w.isTSEnumMember = eme;
|
|
w.isTSExportAssignment = ome;
|
|
w.isTSExpressionWithTypeArguments = Vhe;
|
|
w.isTSExternalModuleReference = sme;
|
|
w.isTSFunctionType = She;
|
|
w.isTSImportEqualsDeclaration = nme;
|
|
w.isTSImportType = ime;
|
|
w.isTSIndexSignature = uhe;
|
|
w.isTSIndexedAccessType = qhe;
|
|
w.isTSInferType = Rhe;
|
|
w.isTSInstantiationExpression = Ghe;
|
|
w.isTSInterfaceBody = Khe;
|
|
w.isTSInterfaceDeclaration = Hhe;
|
|
w.isTSIntersectionType = Nhe;
|
|
w.isTSIntrinsicKeyword = dhe;
|
|
w.isTSLiteralType = $he;
|
|
w.isTSMappedType = Uhe;
|
|
w.isTSMethodSignature = ohe;
|
|
w.isTSModuleBlock = rme;
|
|
w.isTSModuleDeclaration = tme;
|
|
w.isTSNamedTupleMember = khe;
|
|
w.isTSNamespaceExportDeclaration = ume;
|
|
w.isTSNeverKeyword = phe;
|
|
w.isTSNonNullExpression = ame;
|
|
w.isTSNullKeyword = hhe;
|
|
w.isTSNumberKeyword = mhe;
|
|
w.isTSObjectKeyword = yhe;
|
|
w.isTSOptionalType = Ihe;
|
|
w.isTSParameterProperty = ehe;
|
|
w.isTSParenthesizedType = jhe;
|
|
w.isTSPropertySignature = ahe;
|
|
w.isTSQualifiedName = ihe;
|
|
w.isTSRestType = Ohe;
|
|
w.isTSSatisfiesExpression = Xhe;
|
|
w.isTSStringKeyword = ghe;
|
|
w.isTSSymbolKeyword = bhe;
|
|
w.isTSTemplateLiteralType = Whe;
|
|
w.isTSThisType = xhe;
|
|
w.isTSTupleType = Fhe;
|
|
w.isTSType = sye;
|
|
w.isTSTypeAliasDeclaration = zhe;
|
|
w.isTSTypeAnnotation = lme;
|
|
w.isTSTypeAssertion = Yhe;
|
|
w.isTSTypeElement = nye;
|
|
w.isTSTypeLiteral = _he;
|
|
w.isTSTypeOperator = Lhe;
|
|
w.isTSTypeParameter = dme;
|
|
w.isTSTypeParameterDeclaration = fme;
|
|
w.isTSTypeParameterInstantiation = cme;
|
|
w.isTSTypePredicate = whe;
|
|
w.isTSTypeQuery = Ahe;
|
|
w.isTSTypeReference = Che;
|
|
w.isTSUndefinedKeyword = Dhe;
|
|
w.isTSUnionType = Bhe;
|
|
w.isTSUnknownKeyword = vhe;
|
|
w.isTSVoidKeyword = Ehe;
|
|
w.isTaggedTemplateExpression = Jfe;
|
|
w.isTemplateElement = Xfe;
|
|
w.isTemplateLiteral = Yfe;
|
|
w.isTerminatorless = vme;
|
|
w.isThisExpression = Dfe;
|
|
w.isThisTypeAnnotation = epe;
|
|
w.isThrowStatement = vfe;
|
|
w.isTopicReference = Xpe;
|
|
w.isTryStatement = Efe;
|
|
w.isTupleExpression = zpe;
|
|
w.isTupleTypeAnnotation = tpe;
|
|
w.isTypeAlias = ipe;
|
|
w.isTypeAnnotation = npe;
|
|
w.isTypeCastExpression = spe;
|
|
w.isTypeParameter = ape;
|
|
w.isTypeParameterDeclaration = ope;
|
|
w.isTypeParameterInstantiation = upe;
|
|
w.isTypeScript = iye;
|
|
w.isTypeofTypeAnnotation = rpe;
|
|
w.isUnaryExpression = xfe;
|
|
w.isUnaryLike = Ume;
|
|
w.isUnionTypeAnnotation = lpe;
|
|
w.isUpdateExpression = Sfe;
|
|
w.isUserWhitespacable = Rme;
|
|
w.isV8IntrinsicIdentifier = qpe;
|
|
w.isVariableDeclaration = Tfe;
|
|
w.isVariableDeclarator = Cfe;
|
|
w.isVariance = cpe;
|
|
w.isVoidTypeAnnotation = fpe;
|
|
w.isWhile = Tme;
|
|
w.isWhileStatement = wfe;
|
|
w.isWithStatement = Afe;
|
|
w.isYieldExpression = Zfe;
|
|
var P = Xm(), id = rd();
|
|
function Ice(e, t) {
|
|
return !e || e.type !== "ArrayExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ice, "isArrayExpression");
|
|
function Oce(e, t) {
|
|
return !e || e.type !== "AssignmentExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Oce, "isAssignmentExpression");
|
|
function kce(e, t) {
|
|
return !e || e.type !== "BinaryExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(kce, "isBinaryExpression");
|
|
function Bce(e, t) {
|
|
return !e || e.type !== "InterpreterDirective" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Bce, "isInterpreterDirective");
|
|
function Nce(e, t) {
|
|
return !e || e.type !== "Directive" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Nce, "isDirective");
|
|
function Mce(e, t) {
|
|
return !e || e.type !== "DirectiveLiteral" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Mce, "isDirectiveLiteral");
|
|
function Rce(e, t) {
|
|
return !e || e.type !== "BlockStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Rce, "isBlockStatement");
|
|
function jce(e, t) {
|
|
return !e || e.type !== "BreakStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(jce, "isBreakStatement");
|
|
function Lce(e, t) {
|
|
return !e || e.type !== "CallExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Lce, "isCallExpression");
|
|
function qce(e, t) {
|
|
return !e || e.type !== "CatchClause" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(qce, "isCatchClause");
|
|
function Uce(e, t) {
|
|
return !e || e.type !== "ConditionalExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Uce, "isConditionalExpression");
|
|
function Wce(e, t) {
|
|
return !e || e.type !== "ContinueStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Wce, "isContinueStatement");
|
|
function $ce(e, t) {
|
|
return !e || e.type !== "DebuggerStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s($ce, "isDebuggerStatement");
|
|
function Vce(e, t) {
|
|
return !e || e.type !== "DoWhileStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Vce, "isDoWhileStatement");
|
|
function Hce(e, t) {
|
|
return !e || e.type !== "EmptyStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Hce, "isEmptyStatement");
|
|
function Kce(e, t) {
|
|
return !e || e.type !== "ExpressionStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Kce, "isExpressionStatement");
|
|
function zce(e, t) {
|
|
return !e || e.type !== "File" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(zce, "isFile");
|
|
function Gce(e, t) {
|
|
return !e || e.type !== "ForInStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Gce, "isForInStatement");
|
|
function Jce(e, t) {
|
|
return !e || e.type !== "ForStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Jce, "isForStatement");
|
|
function Xce(e, t) {
|
|
return !e || e.type !== "FunctionDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Xce, "isFunctionDeclaration");
|
|
function Yce(e, t) {
|
|
return !e || e.type !== "FunctionExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Yce, "isFunctionExpression");
|
|
function Zce(e, t) {
|
|
return !e || e.type !== "Identifier" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Zce, "isIdentifier");
|
|
function Qce(e, t) {
|
|
return !e || e.type !== "IfStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Qce, "isIfStatement");
|
|
function efe(e, t) {
|
|
return !e || e.type !== "LabeledStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(efe, "isLabeledStatement");
|
|
function tfe(e, t) {
|
|
return !e || e.type !== "StringLiteral" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(tfe, "isStringLiteral");
|
|
function rfe(e, t) {
|
|
return !e || e.type !== "NumericLiteral" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(rfe, "isNumericLiteral");
|
|
function ife(e, t) {
|
|
return !e || e.type !== "NullLiteral" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ife, "isNullLiteral");
|
|
function nfe(e, t) {
|
|
return !e || e.type !== "BooleanLiteral" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(nfe, "isBooleanLiteral");
|
|
function sfe(e, t) {
|
|
return !e || e.type !== "RegExpLiteral" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(sfe, "isRegExpLiteral");
|
|
function afe(e, t) {
|
|
return !e || e.type !== "LogicalExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(afe, "isLogicalExpression");
|
|
function ofe(e, t) {
|
|
return !e || e.type !== "MemberExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ofe, "isMemberExpression");
|
|
function ufe(e, t) {
|
|
return !e || e.type !== "NewExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ufe, "isNewExpression");
|
|
function lfe(e, t) {
|
|
return !e || e.type !== "Program" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(lfe, "isProgram");
|
|
function cfe(e, t) {
|
|
return !e || e.type !== "ObjectExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(cfe, "isObjectExpression");
|
|
function ffe(e, t) {
|
|
return !e || e.type !== "ObjectMethod" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ffe, "isObjectMethod");
|
|
function dfe(e, t) {
|
|
return !e || e.type !== "ObjectProperty" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(dfe, "isObjectProperty");
|
|
function pfe(e, t) {
|
|
return !e || e.type !== "RestElement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(pfe, "isRestElement");
|
|
function hfe(e, t) {
|
|
return !e || e.type !== "ReturnStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(hfe, "isReturnStatement");
|
|
function mfe(e, t) {
|
|
return !e || e.type !== "SequenceExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(mfe, "isSequenceExpression");
|
|
function yfe(e, t) {
|
|
return !e || e.type !== "ParenthesizedExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(yfe, "isParenthesizedExpression");
|
|
function gfe(e, t) {
|
|
return !e || e.type !== "SwitchCase" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(gfe, "isSwitchCase");
|
|
function bfe(e, t) {
|
|
return !e || e.type !== "SwitchStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(bfe, "isSwitchStatement");
|
|
function Dfe(e, t) {
|
|
return !e || e.type !== "ThisExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Dfe, "isThisExpression");
|
|
function vfe(e, t) {
|
|
return !e || e.type !== "ThrowStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(vfe, "isThrowStatement");
|
|
function Efe(e, t) {
|
|
return !e || e.type !== "TryStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Efe, "isTryStatement");
|
|
function xfe(e, t) {
|
|
return !e || e.type !== "UnaryExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(xfe, "isUnaryExpression");
|
|
function Sfe(e, t) {
|
|
return !e || e.type !== "UpdateExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Sfe, "isUpdateExpression");
|
|
function Tfe(e, t) {
|
|
return !e || e.type !== "VariableDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Tfe, "isVariableDeclaration");
|
|
function Cfe(e, t) {
|
|
return !e || e.type !== "VariableDeclarator" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Cfe, "isVariableDeclarator");
|
|
function wfe(e, t) {
|
|
return !e || e.type !== "WhileStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(wfe, "isWhileStatement");
|
|
function Afe(e, t) {
|
|
return !e || e.type !== "WithStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Afe, "isWithStatement");
|
|
function _fe(e, t) {
|
|
return !e || e.type !== "AssignmentPattern" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(_fe, "isAssignmentPattern");
|
|
function Pfe(e, t) {
|
|
return !e || e.type !== "ArrayPattern" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Pfe, "isArrayPattern");
|
|
function Ffe(e, t) {
|
|
return !e || e.type !== "ArrowFunctionExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ffe, "isArrowFunctionExpression");
|
|
function Ife(e, t) {
|
|
return !e || e.type !== "ClassBody" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ife, "isClassBody");
|
|
function Ofe(e, t) {
|
|
return !e || e.type !== "ClassExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ofe, "isClassExpression");
|
|
function kfe(e, t) {
|
|
return !e || e.type !== "ClassDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(kfe, "isClassDeclaration");
|
|
function Bfe(e, t) {
|
|
return !e || e.type !== "ExportAllDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Bfe, "isExportAllDeclaration");
|
|
function Nfe(e, t) {
|
|
return !e || e.type !== "ExportDefaultDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Nfe, "isExportDefaultDeclaration");
|
|
function Mfe(e, t) {
|
|
return !e || e.type !== "ExportNamedDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Mfe, "isExportNamedDeclaration");
|
|
function Rfe(e, t) {
|
|
return !e || e.type !== "ExportSpecifier" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Rfe, "isExportSpecifier");
|
|
function jfe(e, t) {
|
|
return !e || e.type !== "ForOfStatement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(jfe, "isForOfStatement");
|
|
function Lfe(e, t) {
|
|
return !e || e.type !== "ImportDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Lfe, "isImportDeclaration");
|
|
function qfe(e, t) {
|
|
return !e || e.type !== "ImportDefaultSpecifier" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(qfe, "isImportDefaultSpecifier");
|
|
function Ufe(e, t) {
|
|
return !e || e.type !== "ImportNamespaceSpecifier" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ufe, "isImportNamespaceSpecifier");
|
|
function Wfe(e, t) {
|
|
return !e || e.type !== "ImportSpecifier" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Wfe, "isImportSpecifier");
|
|
function $fe(e, t) {
|
|
return !e || e.type !== "ImportExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s($fe, "isImportExpression");
|
|
function Vfe(e, t) {
|
|
return !e || e.type !== "MetaProperty" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Vfe, "isMetaProperty");
|
|
function Hfe(e, t) {
|
|
return !e || e.type !== "ClassMethod" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Hfe, "isClassMethod");
|
|
function Kfe(e, t) {
|
|
return !e || e.type !== "ObjectPattern" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Kfe, "isObjectPattern");
|
|
function zfe(e, t) {
|
|
return !e || e.type !== "SpreadElement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(zfe, "isSpreadElement");
|
|
function Gfe(e, t) {
|
|
return !e || e.type !== "Super" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Gfe, "isSuper");
|
|
function Jfe(e, t) {
|
|
return !e || e.type !== "TaggedTemplateExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Jfe, "isTaggedTemplateExpression");
|
|
function Xfe(e, t) {
|
|
return !e || e.type !== "TemplateElement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Xfe, "isTemplateElement");
|
|
function Yfe(e, t) {
|
|
return !e || e.type !== "TemplateLiteral" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Yfe, "isTemplateLiteral");
|
|
function Zfe(e, t) {
|
|
return !e || e.type !== "YieldExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Zfe, "isYieldExpression");
|
|
function Qfe(e, t) {
|
|
return !e || e.type !== "AwaitExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Qfe, "isAwaitExpression");
|
|
function ede(e, t) {
|
|
return !e || e.type !== "Import" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ede, "isImport");
|
|
function tde(e, t) {
|
|
return !e || e.type !== "BigIntLiteral" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(tde, "isBigIntLiteral");
|
|
function rde(e, t) {
|
|
return !e || e.type !== "ExportNamespaceSpecifier" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(rde, "isExportNamespaceSpecifier");
|
|
function ide(e, t) {
|
|
return !e || e.type !== "OptionalMemberExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ide, "isOptionalMemberExpression");
|
|
function nde(e, t) {
|
|
return !e || e.type !== "OptionalCallExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(nde, "isOptionalCallExpression");
|
|
function sde(e, t) {
|
|
return !e || e.type !== "ClassProperty" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(sde, "isClassProperty");
|
|
function ade(e, t) {
|
|
return !e || e.type !== "ClassAccessorProperty" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ade, "isClassAccessorProperty");
|
|
function ode(e, t) {
|
|
return !e || e.type !== "ClassPrivateProperty" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ode, "isClassPrivateProperty");
|
|
function ude(e, t) {
|
|
return !e || e.type !== "ClassPrivateMethod" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ude, "isClassPrivateMethod");
|
|
function lde(e, t) {
|
|
return !e || e.type !== "PrivateName" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(lde, "isPrivateName");
|
|
function cde(e, t) {
|
|
return !e || e.type !== "StaticBlock" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(cde, "isStaticBlock");
|
|
function fde(e, t) {
|
|
return !e || e.type !== "ImportAttribute" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(fde, "isImportAttribute");
|
|
function dde(e, t) {
|
|
return !e || e.type !== "AnyTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(dde, "isAnyTypeAnnotation");
|
|
function pde(e, t) {
|
|
return !e || e.type !== "ArrayTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(pde, "isArrayTypeAnnotation");
|
|
function hde(e, t) {
|
|
return !e || e.type !== "BooleanTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(hde, "isBooleanTypeAnnotation");
|
|
function mde(e, t) {
|
|
return !e || e.type !== "BooleanLiteralTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(mde, "isBooleanLiteralTypeAnnotation");
|
|
function yde(e, t) {
|
|
return !e || e.type !== "NullLiteralTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(yde, "isNullLiteralTypeAnnotation");
|
|
function gde(e, t) {
|
|
return !e || e.type !== "ClassImplements" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(gde, "isClassImplements");
|
|
function bde(e, t) {
|
|
return !e || e.type !== "DeclareClass" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(bde, "isDeclareClass");
|
|
function Dde(e, t) {
|
|
return !e || e.type !== "DeclareFunction" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Dde, "isDeclareFunction");
|
|
function vde(e, t) {
|
|
return !e || e.type !== "DeclareInterface" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(vde, "isDeclareInterface");
|
|
function Ede(e, t) {
|
|
return !e || e.type !== "DeclareModule" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ede, "isDeclareModule");
|
|
function xde(e, t) {
|
|
return !e || e.type !== "DeclareModuleExports" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(xde, "isDeclareModuleExports");
|
|
function Sde(e, t) {
|
|
return !e || e.type !== "DeclareTypeAlias" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Sde, "isDeclareTypeAlias");
|
|
function Tde(e, t) {
|
|
return !e || e.type !== "DeclareOpaqueType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Tde, "isDeclareOpaqueType");
|
|
function Cde(e, t) {
|
|
return !e || e.type !== "DeclareVariable" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Cde, "isDeclareVariable");
|
|
function wde(e, t) {
|
|
return !e || e.type !== "DeclareExportDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(wde, "isDeclareExportDeclaration");
|
|
function Ade(e, t) {
|
|
return !e || e.type !== "DeclareExportAllDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ade, "isDeclareExportAllDeclaration");
|
|
function _de(e, t) {
|
|
return !e || e.type !== "DeclaredPredicate" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(_de, "isDeclaredPredicate");
|
|
function Pde(e, t) {
|
|
return !e || e.type !== "ExistsTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Pde, "isExistsTypeAnnotation");
|
|
function Fde(e, t) {
|
|
return !e || e.type !== "FunctionTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Fde, "isFunctionTypeAnnotation");
|
|
function Ide(e, t) {
|
|
return !e || e.type !== "FunctionTypeParam" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ide, "isFunctionTypeParam");
|
|
function Ode(e, t) {
|
|
return !e || e.type !== "GenericTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ode, "isGenericTypeAnnotation");
|
|
function kde(e, t) {
|
|
return !e || e.type !== "InferredPredicate" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(kde, "isInferredPredicate");
|
|
function Bde(e, t) {
|
|
return !e || e.type !== "InterfaceExtends" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Bde, "isInterfaceExtends");
|
|
function Nde(e, t) {
|
|
return !e || e.type !== "InterfaceDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Nde, "isInterfaceDeclaration");
|
|
function Mde(e, t) {
|
|
return !e || e.type !== "InterfaceTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Mde, "isInterfaceTypeAnnotation");
|
|
function Rde(e, t) {
|
|
return !e || e.type !== "IntersectionTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Rde, "isIntersectionTypeAnnotation");
|
|
function jde(e, t) {
|
|
return !e || e.type !== "MixedTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(jde, "isMixedTypeAnnotation");
|
|
function Lde(e, t) {
|
|
return !e || e.type !== "EmptyTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Lde, "isEmptyTypeAnnotation");
|
|
function qde(e, t) {
|
|
return !e || e.type !== "NullableTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(qde, "isNullableTypeAnnotation");
|
|
function Ude(e, t) {
|
|
return !e || e.type !== "NumberLiteralTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ude, "isNumberLiteralTypeAnnotation");
|
|
function Wde(e, t) {
|
|
return !e || e.type !== "NumberTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Wde, "isNumberTypeAnnotation");
|
|
function $de(e, t) {
|
|
return !e || e.type !== "ObjectTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s($de, "isObjectTypeAnnotation");
|
|
function Vde(e, t) {
|
|
return !e || e.type !== "ObjectTypeInternalSlot" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Vde, "isObjectTypeInternalSlot");
|
|
function Hde(e, t) {
|
|
return !e || e.type !== "ObjectTypeCallProperty" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Hde, "isObjectTypeCallProperty");
|
|
function Kde(e, t) {
|
|
return !e || e.type !== "ObjectTypeIndexer" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Kde, "isObjectTypeIndexer");
|
|
function zde(e, t) {
|
|
return !e || e.type !== "ObjectTypeProperty" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(zde, "isObjectTypeProperty");
|
|
function Gde(e, t) {
|
|
return !e || e.type !== "ObjectTypeSpreadProperty" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Gde, "isObjectTypeSpreadProperty");
|
|
function Jde(e, t) {
|
|
return !e || e.type !== "OpaqueType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Jde, "isOpaqueType");
|
|
function Xde(e, t) {
|
|
return !e || e.type !== "QualifiedTypeIdentifier" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Xde, "isQualifiedTypeIdentifier");
|
|
function Yde(e, t) {
|
|
return !e || e.type !== "StringLiteralTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Yde, "isStringLiteralTypeAnnotation");
|
|
function Zde(e, t) {
|
|
return !e || e.type !== "StringTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Zde, "isStringTypeAnnotation");
|
|
function Qde(e, t) {
|
|
return !e || e.type !== "SymbolTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Qde, "isSymbolTypeAnnotation");
|
|
function epe(e, t) {
|
|
return !e || e.type !== "ThisTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(epe, "isThisTypeAnnotation");
|
|
function tpe(e, t) {
|
|
return !e || e.type !== "TupleTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(tpe, "isTupleTypeAnnotation");
|
|
function rpe(e, t) {
|
|
return !e || e.type !== "TypeofTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(rpe, "isTypeofTypeAnnotation");
|
|
function ipe(e, t) {
|
|
return !e || e.type !== "TypeAlias" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ipe, "isTypeAlias");
|
|
function npe(e, t) {
|
|
return !e || e.type !== "TypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(npe, "isTypeAnnotation");
|
|
function spe(e, t) {
|
|
return !e || e.type !== "TypeCastExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(spe, "isTypeCastExpression");
|
|
function ape(e, t) {
|
|
return !e || e.type !== "TypeParameter" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ape, "isTypeParameter");
|
|
function ope(e, t) {
|
|
return !e || e.type !== "TypeParameterDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ope, "isTypeParameterDeclaration");
|
|
function upe(e, t) {
|
|
return !e || e.type !== "TypeParameterInstantiation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(upe, "isTypeParameterInstantiation");
|
|
function lpe(e, t) {
|
|
return !e || e.type !== "UnionTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(lpe, "isUnionTypeAnnotation");
|
|
function cpe(e, t) {
|
|
return !e || e.type !== "Variance" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(cpe, "isVariance");
|
|
function fpe(e, t) {
|
|
return !e || e.type !== "VoidTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(fpe, "isVoidTypeAnnotation");
|
|
function dpe(e, t) {
|
|
return !e || e.type !== "EnumDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(dpe, "isEnumDeclaration");
|
|
function ppe(e, t) {
|
|
return !e || e.type !== "EnumBooleanBody" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ppe, "isEnumBooleanBody");
|
|
function hpe(e, t) {
|
|
return !e || e.type !== "EnumNumberBody" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(hpe, "isEnumNumberBody");
|
|
function mpe(e, t) {
|
|
return !e || e.type !== "EnumStringBody" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(mpe, "isEnumStringBody");
|
|
function ype(e, t) {
|
|
return !e || e.type !== "EnumSymbolBody" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ype, "isEnumSymbolBody");
|
|
function gpe(e, t) {
|
|
return !e || e.type !== "EnumBooleanMember" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(gpe, "isEnumBooleanMember");
|
|
function bpe(e, t) {
|
|
return !e || e.type !== "EnumNumberMember" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(bpe, "isEnumNumberMember");
|
|
function Dpe(e, t) {
|
|
return !e || e.type !== "EnumStringMember" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Dpe, "isEnumStringMember");
|
|
function vpe(e, t) {
|
|
return !e || e.type !== "EnumDefaultedMember" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(vpe, "isEnumDefaultedMember");
|
|
function Epe(e, t) {
|
|
return !e || e.type !== "IndexedAccessType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Epe, "isIndexedAccessType");
|
|
function xpe(e, t) {
|
|
return !e || e.type !== "OptionalIndexedAccessType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(xpe, "isOptionalIndexedAccessType");
|
|
function Spe(e, t) {
|
|
return !e || e.type !== "JSXAttribute" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Spe, "isJSXAttribute");
|
|
function Tpe(e, t) {
|
|
return !e || e.type !== "JSXClosingElement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Tpe, "isJSXClosingElement");
|
|
function Cpe(e, t) {
|
|
return !e || e.type !== "JSXElement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Cpe, "isJSXElement");
|
|
function wpe(e, t) {
|
|
return !e || e.type !== "JSXEmptyExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(wpe, "isJSXEmptyExpression");
|
|
function Ape(e, t) {
|
|
return !e || e.type !== "JSXExpressionContainer" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ape, "isJSXExpressionContainer");
|
|
function _pe(e, t) {
|
|
return !e || e.type !== "JSXSpreadChild" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(_pe, "isJSXSpreadChild");
|
|
function Ppe(e, t) {
|
|
return !e || e.type !== "JSXIdentifier" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ppe, "isJSXIdentifier");
|
|
function Fpe(e, t) {
|
|
return !e || e.type !== "JSXMemberExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Fpe, "isJSXMemberExpression");
|
|
function Ipe(e, t) {
|
|
return !e || e.type !== "JSXNamespacedName" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ipe, "isJSXNamespacedName");
|
|
function Ope(e, t) {
|
|
return !e || e.type !== "JSXOpeningElement" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ope, "isJSXOpeningElement");
|
|
function kpe(e, t) {
|
|
return !e || e.type !== "JSXSpreadAttribute" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(kpe, "isJSXSpreadAttribute");
|
|
function Bpe(e, t) {
|
|
return !e || e.type !== "JSXText" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Bpe, "isJSXText");
|
|
function Npe(e, t) {
|
|
return !e || e.type !== "JSXFragment" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Npe, "isJSXFragment");
|
|
function Mpe(e, t) {
|
|
return !e || e.type !== "JSXOpeningFragment" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Mpe, "isJSXOpeningFragment");
|
|
function Rpe(e, t) {
|
|
return !e || e.type !== "JSXClosingFragment" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Rpe, "isJSXClosingFragment");
|
|
function jpe(e, t) {
|
|
return !e || e.type !== "Noop" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(jpe, "isNoop");
|
|
function Lpe(e, t) {
|
|
return !e || e.type !== "Placeholder" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Lpe, "isPlaceholder");
|
|
function qpe(e, t) {
|
|
return !e || e.type !== "V8IntrinsicIdentifier" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(qpe, "isV8IntrinsicIdentifier");
|
|
function Upe(e, t) {
|
|
return !e || e.type !== "ArgumentPlaceholder" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Upe, "isArgumentPlaceholder");
|
|
function Wpe(e, t) {
|
|
return !e || e.type !== "BindExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Wpe, "isBindExpression");
|
|
function $pe(e, t) {
|
|
return !e || e.type !== "Decorator" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s($pe, "isDecorator");
|
|
function Vpe(e, t) {
|
|
return !e || e.type !== "DoExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Vpe, "isDoExpression");
|
|
function Hpe(e, t) {
|
|
return !e || e.type !== "ExportDefaultSpecifier" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Hpe, "isExportDefaultSpecifier");
|
|
function Kpe(e, t) {
|
|
return !e || e.type !== "RecordExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Kpe, "isRecordExpression");
|
|
function zpe(e, t) {
|
|
return !e || e.type !== "TupleExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(zpe, "isTupleExpression");
|
|
function Gpe(e, t) {
|
|
return !e || e.type !== "DecimalLiteral" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Gpe, "isDecimalLiteral");
|
|
function Jpe(e, t) {
|
|
return !e || e.type !== "ModuleExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Jpe, "isModuleExpression");
|
|
function Xpe(e, t) {
|
|
return !e || e.type !== "TopicReference" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Xpe, "isTopicReference");
|
|
function Ype(e, t) {
|
|
return !e || e.type !== "PipelineTopicExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ype, "isPipelineTopicExpression");
|
|
function Zpe(e, t) {
|
|
return !e || e.type !== "PipelineBareFunction" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Zpe, "isPipelineBareFunction");
|
|
function Qpe(e, t) {
|
|
return !e || e.type !== "PipelinePrimaryTopicReference" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Qpe, "isPipelinePrimaryTopicReference");
|
|
function ehe(e, t) {
|
|
return !e || e.type !== "TSParameterProperty" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ehe, "isTSParameterProperty");
|
|
function the(e, t) {
|
|
return !e || e.type !== "TSDeclareFunction" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(the, "isTSDeclareFunction");
|
|
function rhe(e, t) {
|
|
return !e || e.type !== "TSDeclareMethod" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(rhe, "isTSDeclareMethod");
|
|
function ihe(e, t) {
|
|
return !e || e.type !== "TSQualifiedName" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ihe, "isTSQualifiedName");
|
|
function nhe(e, t) {
|
|
return !e || e.type !== "TSCallSignatureDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(nhe, "isTSCallSignatureDeclaration");
|
|
function she(e, t) {
|
|
return !e || e.type !== "TSConstructSignatureDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(she, "isTSConstructSignatureDeclaration");
|
|
function ahe(e, t) {
|
|
return !e || e.type !== "TSPropertySignature" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ahe, "isTSPropertySignature");
|
|
function ohe(e, t) {
|
|
return !e || e.type !== "TSMethodSignature" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ohe, "isTSMethodSignature");
|
|
function uhe(e, t) {
|
|
return !e || e.type !== "TSIndexSignature" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(uhe, "isTSIndexSignature");
|
|
function lhe(e, t) {
|
|
return !e || e.type !== "TSAnyKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(lhe, "isTSAnyKeyword");
|
|
function che(e, t) {
|
|
return !e || e.type !== "TSBooleanKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(che, "isTSBooleanKeyword");
|
|
function fhe(e, t) {
|
|
return !e || e.type !== "TSBigIntKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(fhe, "isTSBigIntKeyword");
|
|
function dhe(e, t) {
|
|
return !e || e.type !== "TSIntrinsicKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(dhe, "isTSIntrinsicKeyword");
|
|
function phe(e, t) {
|
|
return !e || e.type !== "TSNeverKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(phe, "isTSNeverKeyword");
|
|
function hhe(e, t) {
|
|
return !e || e.type !== "TSNullKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(hhe, "isTSNullKeyword");
|
|
function mhe(e, t) {
|
|
return !e || e.type !== "TSNumberKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(mhe, "isTSNumberKeyword");
|
|
function yhe(e, t) {
|
|
return !e || e.type !== "TSObjectKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(yhe, "isTSObjectKeyword");
|
|
function ghe(e, t) {
|
|
return !e || e.type !== "TSStringKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ghe, "isTSStringKeyword");
|
|
function bhe(e, t) {
|
|
return !e || e.type !== "TSSymbolKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(bhe, "isTSSymbolKeyword");
|
|
function Dhe(e, t) {
|
|
return !e || e.type !== "TSUndefinedKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Dhe, "isTSUndefinedKeyword");
|
|
function vhe(e, t) {
|
|
return !e || e.type !== "TSUnknownKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(vhe, "isTSUnknownKeyword");
|
|
function Ehe(e, t) {
|
|
return !e || e.type !== "TSVoidKeyword" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ehe, "isTSVoidKeyword");
|
|
function xhe(e, t) {
|
|
return !e || e.type !== "TSThisType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(xhe, "isTSThisType");
|
|
function She(e, t) {
|
|
return !e || e.type !== "TSFunctionType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(She, "isTSFunctionType");
|
|
function The(e, t) {
|
|
return !e || e.type !== "TSConstructorType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(The, "isTSConstructorType");
|
|
function Che(e, t) {
|
|
return !e || e.type !== "TSTypeReference" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Che, "isTSTypeReference");
|
|
function whe(e, t) {
|
|
return !e || e.type !== "TSTypePredicate" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(whe, "isTSTypePredicate");
|
|
function Ahe(e, t) {
|
|
return !e || e.type !== "TSTypeQuery" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ahe, "isTSTypeQuery");
|
|
function _he(e, t) {
|
|
return !e || e.type !== "TSTypeLiteral" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(_he, "isTSTypeLiteral");
|
|
function Phe(e, t) {
|
|
return !e || e.type !== "TSArrayType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Phe, "isTSArrayType");
|
|
function Fhe(e, t) {
|
|
return !e || e.type !== "TSTupleType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Fhe, "isTSTupleType");
|
|
function Ihe(e, t) {
|
|
return !e || e.type !== "TSOptionalType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ihe, "isTSOptionalType");
|
|
function Ohe(e, t) {
|
|
return !e || e.type !== "TSRestType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ohe, "isTSRestType");
|
|
function khe(e, t) {
|
|
return !e || e.type !== "TSNamedTupleMember" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(khe, "isTSNamedTupleMember");
|
|
function Bhe(e, t) {
|
|
return !e || e.type !== "TSUnionType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Bhe, "isTSUnionType");
|
|
function Nhe(e, t) {
|
|
return !e || e.type !== "TSIntersectionType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Nhe, "isTSIntersectionType");
|
|
function Mhe(e, t) {
|
|
return !e || e.type !== "TSConditionalType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Mhe, "isTSConditionalType");
|
|
function Rhe(e, t) {
|
|
return !e || e.type !== "TSInferType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Rhe, "isTSInferType");
|
|
function jhe(e, t) {
|
|
return !e || e.type !== "TSParenthesizedType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(jhe, "isTSParenthesizedType");
|
|
function Lhe(e, t) {
|
|
return !e || e.type !== "TSTypeOperator" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Lhe, "isTSTypeOperator");
|
|
function qhe(e, t) {
|
|
return !e || e.type !== "TSIndexedAccessType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(qhe, "isTSIndexedAccessType");
|
|
function Uhe(e, t) {
|
|
return !e || e.type !== "TSMappedType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Uhe, "isTSMappedType");
|
|
function Whe(e, t) {
|
|
return !e || e.type !== "TSTemplateLiteralType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Whe, "isTSTemplateLiteralType");
|
|
function $he(e, t) {
|
|
return !e || e.type !== "TSLiteralType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s($he, "isTSLiteralType");
|
|
function Vhe(e, t) {
|
|
return !e || e.type !== "TSExpressionWithTypeArguments" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Vhe, "isTSExpressionWithTypeArguments");
|
|
function Hhe(e, t) {
|
|
return !e || e.type !== "TSInterfaceDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Hhe, "isTSInterfaceDeclaration");
|
|
function Khe(e, t) {
|
|
return !e || e.type !== "TSInterfaceBody" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Khe, "isTSInterfaceBody");
|
|
function zhe(e, t) {
|
|
return !e || e.type !== "TSTypeAliasDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(zhe, "isTSTypeAliasDeclaration");
|
|
function Ghe(e, t) {
|
|
return !e || e.type !== "TSInstantiationExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ghe, "isTSInstantiationExpression");
|
|
function Jhe(e, t) {
|
|
return !e || e.type !== "TSAsExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Jhe, "isTSAsExpression");
|
|
function Xhe(e, t) {
|
|
return !e || e.type !== "TSSatisfiesExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Xhe, "isTSSatisfiesExpression");
|
|
function Yhe(e, t) {
|
|
return !e || e.type !== "TSTypeAssertion" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Yhe, "isTSTypeAssertion");
|
|
function Zhe(e, t) {
|
|
return !e || e.type !== "TSEnumBody" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Zhe, "isTSEnumBody");
|
|
function Qhe(e, t) {
|
|
return !e || e.type !== "TSEnumDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Qhe, "isTSEnumDeclaration");
|
|
function eme(e, t) {
|
|
return !e || e.type !== "TSEnumMember" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(eme, "isTSEnumMember");
|
|
function tme(e, t) {
|
|
return !e || e.type !== "TSModuleDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(tme, "isTSModuleDeclaration");
|
|
function rme(e, t) {
|
|
return !e || e.type !== "TSModuleBlock" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(rme, "isTSModuleBlock");
|
|
function ime(e, t) {
|
|
return !e || e.type !== "TSImportType" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ime, "isTSImportType");
|
|
function nme(e, t) {
|
|
return !e || e.type !== "TSImportEqualsDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(nme, "isTSImportEqualsDeclaration");
|
|
function sme(e, t) {
|
|
return !e || e.type !== "TSExternalModuleReference" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(sme, "isTSExternalModuleReference");
|
|
function ame(e, t) {
|
|
return !e || e.type !== "TSNonNullExpression" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ame, "isTSNonNullExpression");
|
|
function ome(e, t) {
|
|
return !e || e.type !== "TSExportAssignment" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ome, "isTSExportAssignment");
|
|
function ume(e, t) {
|
|
return !e || e.type !== "TSNamespaceExportDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(ume, "isTSNamespaceExportDeclaration");
|
|
function lme(e, t) {
|
|
return !e || e.type !== "TSTypeAnnotation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(lme, "isTSTypeAnnotation");
|
|
function cme(e, t) {
|
|
return !e || e.type !== "TSTypeParameterInstantiation" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(cme, "isTSTypeParameterInstantiation");
|
|
function fme(e, t) {
|
|
return !e || e.type !== "TSTypeParameterDeclaration" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(fme, "isTSTypeParameterDeclaration");
|
|
function dme(e, t) {
|
|
return !e || e.type !== "TSTypeParameter" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(dme, "isTSTypeParameter");
|
|
function pme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ArrayExpression":
|
|
case "AssignmentExpression":
|
|
case "BinaryExpression":
|
|
case "InterpreterDirective":
|
|
case "Directive":
|
|
case "DirectiveLiteral":
|
|
case "BlockStatement":
|
|
case "BreakStatement":
|
|
case "CallExpression":
|
|
case "CatchClause":
|
|
case "ConditionalExpression":
|
|
case "ContinueStatement":
|
|
case "DebuggerStatement":
|
|
case "DoWhileStatement":
|
|
case "EmptyStatement":
|
|
case "ExpressionStatement":
|
|
case "File":
|
|
case "ForInStatement":
|
|
case "ForStatement":
|
|
case "FunctionDeclaration":
|
|
case "FunctionExpression":
|
|
case "Identifier":
|
|
case "IfStatement":
|
|
case "LabeledStatement":
|
|
case "StringLiteral":
|
|
case "NumericLiteral":
|
|
case "NullLiteral":
|
|
case "BooleanLiteral":
|
|
case "RegExpLiteral":
|
|
case "LogicalExpression":
|
|
case "MemberExpression":
|
|
case "NewExpression":
|
|
case "Program":
|
|
case "ObjectExpression":
|
|
case "ObjectMethod":
|
|
case "ObjectProperty":
|
|
case "RestElement":
|
|
case "ReturnStatement":
|
|
case "SequenceExpression":
|
|
case "ParenthesizedExpression":
|
|
case "SwitchCase":
|
|
case "SwitchStatement":
|
|
case "ThisExpression":
|
|
case "ThrowStatement":
|
|
case "TryStatement":
|
|
case "UnaryExpression":
|
|
case "UpdateExpression":
|
|
case "VariableDeclaration":
|
|
case "VariableDeclarator":
|
|
case "WhileStatement":
|
|
case "WithStatement":
|
|
case "AssignmentPattern":
|
|
case "ArrayPattern":
|
|
case "ArrowFunctionExpression":
|
|
case "ClassBody":
|
|
case "ClassExpression":
|
|
case "ClassDeclaration":
|
|
case "ExportAllDeclaration":
|
|
case "ExportDefaultDeclaration":
|
|
case "ExportNamedDeclaration":
|
|
case "ExportSpecifier":
|
|
case "ForOfStatement":
|
|
case "ImportDeclaration":
|
|
case "ImportDefaultSpecifier":
|
|
case "ImportNamespaceSpecifier":
|
|
case "ImportSpecifier":
|
|
case "ImportExpression":
|
|
case "MetaProperty":
|
|
case "ClassMethod":
|
|
case "ObjectPattern":
|
|
case "SpreadElement":
|
|
case "Super":
|
|
case "TaggedTemplateExpression":
|
|
case "TemplateElement":
|
|
case "TemplateLiteral":
|
|
case "YieldExpression":
|
|
case "AwaitExpression":
|
|
case "Import":
|
|
case "BigIntLiteral":
|
|
case "ExportNamespaceSpecifier":
|
|
case "OptionalMemberExpression":
|
|
case "OptionalCallExpression":
|
|
case "ClassProperty":
|
|
case "ClassAccessorProperty":
|
|
case "ClassPrivateProperty":
|
|
case "ClassPrivateMethod":
|
|
case "PrivateName":
|
|
case "StaticBlock":
|
|
case "ImportAttribute":
|
|
break;
|
|
case "Placeholder":
|
|
switch (e.expectedNode) {
|
|
case "Identifier":
|
|
case "StringLiteral":
|
|
case "BlockStatement":
|
|
case "ClassBody":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(pme, "isStandardized");
|
|
function hme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ArrayExpression":
|
|
case "AssignmentExpression":
|
|
case "BinaryExpression":
|
|
case "CallExpression":
|
|
case "ConditionalExpression":
|
|
case "FunctionExpression":
|
|
case "Identifier":
|
|
case "StringLiteral":
|
|
case "NumericLiteral":
|
|
case "NullLiteral":
|
|
case "BooleanLiteral":
|
|
case "RegExpLiteral":
|
|
case "LogicalExpression":
|
|
case "MemberExpression":
|
|
case "NewExpression":
|
|
case "ObjectExpression":
|
|
case "SequenceExpression":
|
|
case "ParenthesizedExpression":
|
|
case "ThisExpression":
|
|
case "UnaryExpression":
|
|
case "UpdateExpression":
|
|
case "ArrowFunctionExpression":
|
|
case "ClassExpression":
|
|
case "ImportExpression":
|
|
case "MetaProperty":
|
|
case "Super":
|
|
case "TaggedTemplateExpression":
|
|
case "TemplateLiteral":
|
|
case "YieldExpression":
|
|
case "AwaitExpression":
|
|
case "Import":
|
|
case "BigIntLiteral":
|
|
case "OptionalMemberExpression":
|
|
case "OptionalCallExpression":
|
|
case "TypeCastExpression":
|
|
case "JSXElement":
|
|
case "JSXFragment":
|
|
case "BindExpression":
|
|
case "DoExpression":
|
|
case "RecordExpression":
|
|
case "TupleExpression":
|
|
case "DecimalLiteral":
|
|
case "ModuleExpression":
|
|
case "TopicReference":
|
|
case "PipelineTopicExpression":
|
|
case "PipelineBareFunction":
|
|
case "PipelinePrimaryTopicReference":
|
|
case "TSInstantiationExpression":
|
|
case "TSAsExpression":
|
|
case "TSSatisfiesExpression":
|
|
case "TSTypeAssertion":
|
|
case "TSNonNullExpression":
|
|
break;
|
|
case "Placeholder":
|
|
switch (e.expectedNode) {
|
|
case "Expression":
|
|
case "Identifier":
|
|
case "StringLiteral":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(hme, "isExpression");
|
|
function mme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "BinaryExpression":
|
|
case "LogicalExpression":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(mme, "isBinary");
|
|
function yme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "BlockStatement":
|
|
case "CatchClause":
|
|
case "DoWhileStatement":
|
|
case "ForInStatement":
|
|
case "ForStatement":
|
|
case "FunctionDeclaration":
|
|
case "FunctionExpression":
|
|
case "Program":
|
|
case "ObjectMethod":
|
|
case "SwitchStatement":
|
|
case "WhileStatement":
|
|
case "ArrowFunctionExpression":
|
|
case "ClassExpression":
|
|
case "ClassDeclaration":
|
|
case "ForOfStatement":
|
|
case "ClassMethod":
|
|
case "ClassPrivateMethod":
|
|
case "StaticBlock":
|
|
case "TSModuleBlock":
|
|
break;
|
|
case "Placeholder":
|
|
if (e.expectedNode === "BlockStatement") break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(yme, "isScopable");
|
|
function gme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "BlockStatement":
|
|
case "CatchClause":
|
|
case "DoWhileStatement":
|
|
case "ForInStatement":
|
|
case "ForStatement":
|
|
case "FunctionDeclaration":
|
|
case "FunctionExpression":
|
|
case "Program":
|
|
case "ObjectMethod":
|
|
case "SwitchStatement":
|
|
case "WhileStatement":
|
|
case "ArrowFunctionExpression":
|
|
case "ForOfStatement":
|
|
case "ClassMethod":
|
|
case "ClassPrivateMethod":
|
|
case "StaticBlock":
|
|
case "TSModuleBlock":
|
|
break;
|
|
case "Placeholder":
|
|
if (e.expectedNode === "BlockStatement") break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(gme, "isBlockParent");
|
|
function bme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "BlockStatement":
|
|
case "Program":
|
|
case "TSModuleBlock":
|
|
break;
|
|
case "Placeholder":
|
|
if (e.expectedNode === "BlockStatement") break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(bme, "isBlock");
|
|
function Dme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "BlockStatement":
|
|
case "BreakStatement":
|
|
case "ContinueStatement":
|
|
case "DebuggerStatement":
|
|
case "DoWhileStatement":
|
|
case "EmptyStatement":
|
|
case "ExpressionStatement":
|
|
case "ForInStatement":
|
|
case "ForStatement":
|
|
case "FunctionDeclaration":
|
|
case "IfStatement":
|
|
case "LabeledStatement":
|
|
case "ReturnStatement":
|
|
case "SwitchStatement":
|
|
case "ThrowStatement":
|
|
case "TryStatement":
|
|
case "VariableDeclaration":
|
|
case "WhileStatement":
|
|
case "WithStatement":
|
|
case "ClassDeclaration":
|
|
case "ExportAllDeclaration":
|
|
case "ExportDefaultDeclaration":
|
|
case "ExportNamedDeclaration":
|
|
case "ForOfStatement":
|
|
case "ImportDeclaration":
|
|
case "DeclareClass":
|
|
case "DeclareFunction":
|
|
case "DeclareInterface":
|
|
case "DeclareModule":
|
|
case "DeclareModuleExports":
|
|
case "DeclareTypeAlias":
|
|
case "DeclareOpaqueType":
|
|
case "DeclareVariable":
|
|
case "DeclareExportDeclaration":
|
|
case "DeclareExportAllDeclaration":
|
|
case "InterfaceDeclaration":
|
|
case "OpaqueType":
|
|
case "TypeAlias":
|
|
case "EnumDeclaration":
|
|
case "TSDeclareFunction":
|
|
case "TSInterfaceDeclaration":
|
|
case "TSTypeAliasDeclaration":
|
|
case "TSEnumDeclaration":
|
|
case "TSModuleDeclaration":
|
|
case "TSImportEqualsDeclaration":
|
|
case "TSExportAssignment":
|
|
case "TSNamespaceExportDeclaration":
|
|
break;
|
|
case "Placeholder":
|
|
switch (e.expectedNode) {
|
|
case "Statement":
|
|
case "Declaration":
|
|
case "BlockStatement":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Dme, "isStatement");
|
|
function vme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "BreakStatement":
|
|
case "ContinueStatement":
|
|
case "ReturnStatement":
|
|
case "ThrowStatement":
|
|
case "YieldExpression":
|
|
case "AwaitExpression":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(vme, "isTerminatorless");
|
|
function Eme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "BreakStatement":
|
|
case "ContinueStatement":
|
|
case "ReturnStatement":
|
|
case "ThrowStatement":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Eme, "isCompletionStatement");
|
|
function xme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ConditionalExpression":
|
|
case "IfStatement":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(xme, "isConditional");
|
|
function Sme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "DoWhileStatement":
|
|
case "ForInStatement":
|
|
case "ForStatement":
|
|
case "WhileStatement":
|
|
case "ForOfStatement":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Sme, "isLoop");
|
|
function Tme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "DoWhileStatement":
|
|
case "WhileStatement":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Tme, "isWhile");
|
|
function Cme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ExpressionStatement":
|
|
case "ParenthesizedExpression":
|
|
case "TypeCastExpression":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Cme, "isExpressionWrapper");
|
|
function wme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ForInStatement":
|
|
case "ForStatement":
|
|
case "ForOfStatement":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(wme, "isFor");
|
|
function Ame(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ForInStatement":
|
|
case "ForOfStatement":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ame, "isForXStatement");
|
|
function _me(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "FunctionDeclaration":
|
|
case "FunctionExpression":
|
|
case "ObjectMethod":
|
|
case "ArrowFunctionExpression":
|
|
case "ClassMethod":
|
|
case "ClassPrivateMethod":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(_me, "isFunction");
|
|
function Pme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "FunctionDeclaration":
|
|
case "FunctionExpression":
|
|
case "ObjectMethod":
|
|
case "ArrowFunctionExpression":
|
|
case "ClassMethod":
|
|
case "ClassPrivateMethod":
|
|
case "StaticBlock":
|
|
case "TSModuleBlock":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Pme, "isFunctionParent");
|
|
function Fme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "FunctionDeclaration":
|
|
case "FunctionExpression":
|
|
case "StringLiteral":
|
|
case "NumericLiteral":
|
|
case "NullLiteral":
|
|
case "BooleanLiteral":
|
|
case "RegExpLiteral":
|
|
case "ArrowFunctionExpression":
|
|
case "BigIntLiteral":
|
|
case "DecimalLiteral":
|
|
break;
|
|
case "Placeholder":
|
|
if (e.expectedNode === "StringLiteral") break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Fme, "isPureish");
|
|
function Ime(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "FunctionDeclaration":
|
|
case "VariableDeclaration":
|
|
case "ClassDeclaration":
|
|
case "ExportAllDeclaration":
|
|
case "ExportDefaultDeclaration":
|
|
case "ExportNamedDeclaration":
|
|
case "ImportDeclaration":
|
|
case "DeclareClass":
|
|
case "DeclareFunction":
|
|
case "DeclareInterface":
|
|
case "DeclareModule":
|
|
case "DeclareModuleExports":
|
|
case "DeclareTypeAlias":
|
|
case "DeclareOpaqueType":
|
|
case "DeclareVariable":
|
|
case "DeclareExportDeclaration":
|
|
case "DeclareExportAllDeclaration":
|
|
case "InterfaceDeclaration":
|
|
case "OpaqueType":
|
|
case "TypeAlias":
|
|
case "EnumDeclaration":
|
|
case "TSDeclareFunction":
|
|
case "TSInterfaceDeclaration":
|
|
case "TSTypeAliasDeclaration":
|
|
case "TSEnumDeclaration":
|
|
case "TSModuleDeclaration":
|
|
case "TSImportEqualsDeclaration":
|
|
break;
|
|
case "Placeholder":
|
|
if (e.expectedNode === "Declaration") break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ime, "isDeclaration");
|
|
function Ome(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "Identifier":
|
|
case "RestElement":
|
|
case "AssignmentPattern":
|
|
case "ArrayPattern":
|
|
case "ObjectPattern":
|
|
case "TSAsExpression":
|
|
case "TSSatisfiesExpression":
|
|
case "TSTypeAssertion":
|
|
case "TSNonNullExpression":
|
|
break;
|
|
case "Placeholder":
|
|
switch (e.expectedNode) {
|
|
case "Pattern":
|
|
case "Identifier":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ome, "isPatternLike");
|
|
function kme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "Identifier":
|
|
case "MemberExpression":
|
|
case "RestElement":
|
|
case "AssignmentPattern":
|
|
case "ArrayPattern":
|
|
case "ObjectPattern":
|
|
case "TSParameterProperty":
|
|
case "TSAsExpression":
|
|
case "TSSatisfiesExpression":
|
|
case "TSTypeAssertion":
|
|
case "TSNonNullExpression":
|
|
break;
|
|
case "Placeholder":
|
|
switch (e.expectedNode) {
|
|
case "Pattern":
|
|
case "Identifier":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(kme, "isLVal");
|
|
function Bme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "Identifier":
|
|
case "TSQualifiedName":
|
|
break;
|
|
case "Placeholder":
|
|
if (e.expectedNode === "Identifier") break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Bme, "isTSEntityName");
|
|
function Nme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "StringLiteral":
|
|
case "NumericLiteral":
|
|
case "NullLiteral":
|
|
case "BooleanLiteral":
|
|
case "RegExpLiteral":
|
|
case "TemplateLiteral":
|
|
case "BigIntLiteral":
|
|
case "DecimalLiteral":
|
|
break;
|
|
case "Placeholder":
|
|
if (e.expectedNode === "StringLiteral") break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Nme, "isLiteral");
|
|
function Mme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "StringLiteral":
|
|
case "NumericLiteral":
|
|
case "NullLiteral":
|
|
case "BooleanLiteral":
|
|
case "BigIntLiteral":
|
|
case "JSXAttribute":
|
|
case "JSXClosingElement":
|
|
case "JSXElement":
|
|
case "JSXExpressionContainer":
|
|
case "JSXSpreadChild":
|
|
case "JSXOpeningElement":
|
|
case "JSXText":
|
|
case "JSXFragment":
|
|
case "JSXOpeningFragment":
|
|
case "JSXClosingFragment":
|
|
case "DecimalLiteral":
|
|
break;
|
|
case "Placeholder":
|
|
if (e.expectedNode === "StringLiteral") break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Mme, "isImmutable");
|
|
function Rme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ObjectMethod":
|
|
case "ObjectProperty":
|
|
case "ObjectTypeInternalSlot":
|
|
case "ObjectTypeCallProperty":
|
|
case "ObjectTypeIndexer":
|
|
case "ObjectTypeProperty":
|
|
case "ObjectTypeSpreadProperty":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Rme, "isUserWhitespacable");
|
|
function jme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ObjectMethod":
|
|
case "ClassMethod":
|
|
case "ClassPrivateMethod":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(jme, "isMethod");
|
|
function Lme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ObjectMethod":
|
|
case "ObjectProperty":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Lme, "isObjectMember");
|
|
function qme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ObjectProperty":
|
|
case "ClassProperty":
|
|
case "ClassAccessorProperty":
|
|
case "ClassPrivateProperty":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(qme, "isProperty");
|
|
function Ume(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "UnaryExpression":
|
|
case "SpreadElement":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Ume, "isUnaryLike");
|
|
function Wme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "AssignmentPattern":
|
|
case "ArrayPattern":
|
|
case "ObjectPattern":
|
|
break;
|
|
case "Placeholder":
|
|
if (e.expectedNode === "Pattern") break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Wme, "isPattern");
|
|
function $me(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ClassExpression":
|
|
case "ClassDeclaration":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s($me, "isClass");
|
|
function JR(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ExportAllDeclaration":
|
|
case "ExportDefaultDeclaration":
|
|
case "ExportNamedDeclaration":
|
|
case "ImportDeclaration":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(JR, "isImportOrExportDeclaration");
|
|
function Vme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ExportAllDeclaration":
|
|
case "ExportDefaultDeclaration":
|
|
case "ExportNamedDeclaration":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Vme, "isExportDeclaration");
|
|
function Hme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ExportSpecifier":
|
|
case "ImportDefaultSpecifier":
|
|
case "ImportNamespaceSpecifier":
|
|
case "ImportSpecifier":
|
|
case "ExportNamespaceSpecifier":
|
|
case "ExportDefaultSpecifier":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Hme, "isModuleSpecifier");
|
|
function Kme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ClassAccessorProperty":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Kme, "isAccessor");
|
|
function zme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "ClassPrivateProperty":
|
|
case "ClassPrivateMethod":
|
|
case "PrivateName":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(zme, "isPrivate");
|
|
function Gme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "AnyTypeAnnotation":
|
|
case "ArrayTypeAnnotation":
|
|
case "BooleanTypeAnnotation":
|
|
case "BooleanLiteralTypeAnnotation":
|
|
case "NullLiteralTypeAnnotation":
|
|
case "ClassImplements":
|
|
case "DeclareClass":
|
|
case "DeclareFunction":
|
|
case "DeclareInterface":
|
|
case "DeclareModule":
|
|
case "DeclareModuleExports":
|
|
case "DeclareTypeAlias":
|
|
case "DeclareOpaqueType":
|
|
case "DeclareVariable":
|
|
case "DeclareExportDeclaration":
|
|
case "DeclareExportAllDeclaration":
|
|
case "DeclaredPredicate":
|
|
case "ExistsTypeAnnotation":
|
|
case "FunctionTypeAnnotation":
|
|
case "FunctionTypeParam":
|
|
case "GenericTypeAnnotation":
|
|
case "InferredPredicate":
|
|
case "InterfaceExtends":
|
|
case "InterfaceDeclaration":
|
|
case "InterfaceTypeAnnotation":
|
|
case "IntersectionTypeAnnotation":
|
|
case "MixedTypeAnnotation":
|
|
case "EmptyTypeAnnotation":
|
|
case "NullableTypeAnnotation":
|
|
case "NumberLiteralTypeAnnotation":
|
|
case "NumberTypeAnnotation":
|
|
case "ObjectTypeAnnotation":
|
|
case "ObjectTypeInternalSlot":
|
|
case "ObjectTypeCallProperty":
|
|
case "ObjectTypeIndexer":
|
|
case "ObjectTypeProperty":
|
|
case "ObjectTypeSpreadProperty":
|
|
case "OpaqueType":
|
|
case "QualifiedTypeIdentifier":
|
|
case "StringLiteralTypeAnnotation":
|
|
case "StringTypeAnnotation":
|
|
case "SymbolTypeAnnotation":
|
|
case "ThisTypeAnnotation":
|
|
case "TupleTypeAnnotation":
|
|
case "TypeofTypeAnnotation":
|
|
case "TypeAlias":
|
|
case "TypeAnnotation":
|
|
case "TypeCastExpression":
|
|
case "TypeParameter":
|
|
case "TypeParameterDeclaration":
|
|
case "TypeParameterInstantiation":
|
|
case "UnionTypeAnnotation":
|
|
case "Variance":
|
|
case "VoidTypeAnnotation":
|
|
case "EnumDeclaration":
|
|
case "EnumBooleanBody":
|
|
case "EnumNumberBody":
|
|
case "EnumStringBody":
|
|
case "EnumSymbolBody":
|
|
case "EnumBooleanMember":
|
|
case "EnumNumberMember":
|
|
case "EnumStringMember":
|
|
case "EnumDefaultedMember":
|
|
case "IndexedAccessType":
|
|
case "OptionalIndexedAccessType":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Gme, "isFlow");
|
|
function Jme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "AnyTypeAnnotation":
|
|
case "ArrayTypeAnnotation":
|
|
case "BooleanTypeAnnotation":
|
|
case "BooleanLiteralTypeAnnotation":
|
|
case "NullLiteralTypeAnnotation":
|
|
case "ExistsTypeAnnotation":
|
|
case "FunctionTypeAnnotation":
|
|
case "GenericTypeAnnotation":
|
|
case "InterfaceTypeAnnotation":
|
|
case "IntersectionTypeAnnotation":
|
|
case "MixedTypeAnnotation":
|
|
case "EmptyTypeAnnotation":
|
|
case "NullableTypeAnnotation":
|
|
case "NumberLiteralTypeAnnotation":
|
|
case "NumberTypeAnnotation":
|
|
case "ObjectTypeAnnotation":
|
|
case "StringLiteralTypeAnnotation":
|
|
case "StringTypeAnnotation":
|
|
case "SymbolTypeAnnotation":
|
|
case "ThisTypeAnnotation":
|
|
case "TupleTypeAnnotation":
|
|
case "TypeofTypeAnnotation":
|
|
case "UnionTypeAnnotation":
|
|
case "VoidTypeAnnotation":
|
|
case "IndexedAccessType":
|
|
case "OptionalIndexedAccessType":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Jme, "isFlowType");
|
|
function Xme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "AnyTypeAnnotation":
|
|
case "BooleanTypeAnnotation":
|
|
case "NullLiteralTypeAnnotation":
|
|
case "MixedTypeAnnotation":
|
|
case "EmptyTypeAnnotation":
|
|
case "NumberTypeAnnotation":
|
|
case "StringTypeAnnotation":
|
|
case "SymbolTypeAnnotation":
|
|
case "ThisTypeAnnotation":
|
|
case "VoidTypeAnnotation":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Xme, "isFlowBaseAnnotation");
|
|
function Yme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "DeclareClass":
|
|
case "DeclareFunction":
|
|
case "DeclareInterface":
|
|
case "DeclareModule":
|
|
case "DeclareModuleExports":
|
|
case "DeclareTypeAlias":
|
|
case "DeclareOpaqueType":
|
|
case "DeclareVariable":
|
|
case "DeclareExportDeclaration":
|
|
case "DeclareExportAllDeclaration":
|
|
case "InterfaceDeclaration":
|
|
case "OpaqueType":
|
|
case "TypeAlias":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Yme, "isFlowDeclaration");
|
|
function Zme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "DeclaredPredicate":
|
|
case "InferredPredicate":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Zme, "isFlowPredicate");
|
|
function Qme(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "EnumBooleanBody":
|
|
case "EnumNumberBody":
|
|
case "EnumStringBody":
|
|
case "EnumSymbolBody":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(Qme, "isEnumBody");
|
|
function eye(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "EnumBooleanMember":
|
|
case "EnumNumberMember":
|
|
case "EnumStringMember":
|
|
case "EnumDefaultedMember":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(eye, "isEnumMember");
|
|
function tye(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "JSXAttribute":
|
|
case "JSXClosingElement":
|
|
case "JSXElement":
|
|
case "JSXEmptyExpression":
|
|
case "JSXExpressionContainer":
|
|
case "JSXSpreadChild":
|
|
case "JSXIdentifier":
|
|
case "JSXMemberExpression":
|
|
case "JSXNamespacedName":
|
|
case "JSXOpeningElement":
|
|
case "JSXSpreadAttribute":
|
|
case "JSXText":
|
|
case "JSXFragment":
|
|
case "JSXOpeningFragment":
|
|
case "JSXClosingFragment":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(tye, "isJSX");
|
|
function rye(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "Noop":
|
|
case "Placeholder":
|
|
case "V8IntrinsicIdentifier":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(rye, "isMiscellaneous");
|
|
function iye(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "TSParameterProperty":
|
|
case "TSDeclareFunction":
|
|
case "TSDeclareMethod":
|
|
case "TSQualifiedName":
|
|
case "TSCallSignatureDeclaration":
|
|
case "TSConstructSignatureDeclaration":
|
|
case "TSPropertySignature":
|
|
case "TSMethodSignature":
|
|
case "TSIndexSignature":
|
|
case "TSAnyKeyword":
|
|
case "TSBooleanKeyword":
|
|
case "TSBigIntKeyword":
|
|
case "TSIntrinsicKeyword":
|
|
case "TSNeverKeyword":
|
|
case "TSNullKeyword":
|
|
case "TSNumberKeyword":
|
|
case "TSObjectKeyword":
|
|
case "TSStringKeyword":
|
|
case "TSSymbolKeyword":
|
|
case "TSUndefinedKeyword":
|
|
case "TSUnknownKeyword":
|
|
case "TSVoidKeyword":
|
|
case "TSThisType":
|
|
case "TSFunctionType":
|
|
case "TSConstructorType":
|
|
case "TSTypeReference":
|
|
case "TSTypePredicate":
|
|
case "TSTypeQuery":
|
|
case "TSTypeLiteral":
|
|
case "TSArrayType":
|
|
case "TSTupleType":
|
|
case "TSOptionalType":
|
|
case "TSRestType":
|
|
case "TSNamedTupleMember":
|
|
case "TSUnionType":
|
|
case "TSIntersectionType":
|
|
case "TSConditionalType":
|
|
case "TSInferType":
|
|
case "TSParenthesizedType":
|
|
case "TSTypeOperator":
|
|
case "TSIndexedAccessType":
|
|
case "TSMappedType":
|
|
case "TSTemplateLiteralType":
|
|
case "TSLiteralType":
|
|
case "TSExpressionWithTypeArguments":
|
|
case "TSInterfaceDeclaration":
|
|
case "TSInterfaceBody":
|
|
case "TSTypeAliasDeclaration":
|
|
case "TSInstantiationExpression":
|
|
case "TSAsExpression":
|
|
case "TSSatisfiesExpression":
|
|
case "TSTypeAssertion":
|
|
case "TSEnumBody":
|
|
case "TSEnumDeclaration":
|
|
case "TSEnumMember":
|
|
case "TSModuleDeclaration":
|
|
case "TSModuleBlock":
|
|
case "TSImportType":
|
|
case "TSImportEqualsDeclaration":
|
|
case "TSExternalModuleReference":
|
|
case "TSNonNullExpression":
|
|
case "TSExportAssignment":
|
|
case "TSNamespaceExportDeclaration":
|
|
case "TSTypeAnnotation":
|
|
case "TSTypeParameterInstantiation":
|
|
case "TSTypeParameterDeclaration":
|
|
case "TSTypeParameter":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(iye, "isTypeScript");
|
|
function nye(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "TSCallSignatureDeclaration":
|
|
case "TSConstructSignatureDeclaration":
|
|
case "TSPropertySignature":
|
|
case "TSMethodSignature":
|
|
case "TSIndexSignature":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(nye, "isTSTypeElement");
|
|
function sye(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "TSAnyKeyword":
|
|
case "TSBooleanKeyword":
|
|
case "TSBigIntKeyword":
|
|
case "TSIntrinsicKeyword":
|
|
case "TSNeverKeyword":
|
|
case "TSNullKeyword":
|
|
case "TSNumberKeyword":
|
|
case "TSObjectKeyword":
|
|
case "TSStringKeyword":
|
|
case "TSSymbolKeyword":
|
|
case "TSUndefinedKeyword":
|
|
case "TSUnknownKeyword":
|
|
case "TSVoidKeyword":
|
|
case "TSThisType":
|
|
case "TSFunctionType":
|
|
case "TSConstructorType":
|
|
case "TSTypeReference":
|
|
case "TSTypePredicate":
|
|
case "TSTypeQuery":
|
|
case "TSTypeLiteral":
|
|
case "TSArrayType":
|
|
case "TSTupleType":
|
|
case "TSOptionalType":
|
|
case "TSRestType":
|
|
case "TSUnionType":
|
|
case "TSIntersectionType":
|
|
case "TSConditionalType":
|
|
case "TSInferType":
|
|
case "TSParenthesizedType":
|
|
case "TSTypeOperator":
|
|
case "TSIndexedAccessType":
|
|
case "TSMappedType":
|
|
case "TSTemplateLiteralType":
|
|
case "TSLiteralType":
|
|
case "TSExpressionWithTypeArguments":
|
|
case "TSImportType":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(sye, "isTSType");
|
|
function aye(e, t) {
|
|
if (!e) return !1;
|
|
switch (e.type) {
|
|
case "TSAnyKeyword":
|
|
case "TSBooleanKeyword":
|
|
case "TSBigIntKeyword":
|
|
case "TSIntrinsicKeyword":
|
|
case "TSNeverKeyword":
|
|
case "TSNullKeyword":
|
|
case "TSNumberKeyword":
|
|
case "TSObjectKeyword":
|
|
case "TSStringKeyword":
|
|
case "TSSymbolKeyword":
|
|
case "TSUndefinedKeyword":
|
|
case "TSUnknownKeyword":
|
|
case "TSVoidKeyword":
|
|
case "TSThisType":
|
|
case "TSTemplateLiteralType":
|
|
case "TSLiteralType":
|
|
break;
|
|
default:
|
|
return !1;
|
|
}
|
|
return t == null || (0, P.default)(e, t);
|
|
}
|
|
s(aye, "isTSBaseType");
|
|
function oye(e, t) {
|
|
return (0, id.default)("isNumberLiteral", "isNumericLiteral"), !e || e.type !== "NumberLiteral" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(oye, "isNumberLiteral");
|
|
function uye(e, t) {
|
|
return (0, id.default)("isRegexLiteral", "isRegExpLiteral"), !e || e.type !== "RegexLiteral" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(uye, "isRegexLiteral");
|
|
function lye(e, t) {
|
|
return (0, id.default)("isRestProperty", "isRestElement"), !e || e.type !== "RestProperty" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(lye, "isRestProperty");
|
|
function cye(e, t) {
|
|
return (0, id.default)("isSpreadProperty", "isSpreadElement"), !e || e.type !== "SpreadProperty" ? !1 : t == null || (0, P.default)(e, t);
|
|
}
|
|
s(cye, "isSpreadProperty");
|
|
function fye(e, t) {
|
|
return (0, id.default)("isModuleDeclaration", "isImportOrExportDeclaration"), JR(e, t);
|
|
}
|
|
s(fye, "isModuleDeclaration");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/matchesPattern.js
|
|
var g1 = E((y1) => {
|
|
"use strict";
|
|
Object.defineProperty(y1, "__esModule", {
|
|
value: !0
|
|
});
|
|
y1.default = dye;
|
|
var nd = fr();
|
|
function dye(e, t, r) {
|
|
if (!(0, nd.isMemberExpression)(e)) return !1;
|
|
let i = Array.isArray(t) ? t : t.split("."), n = [], a;
|
|
for (a = e; (0, nd.isMemberExpression)(a); a = a.object)
|
|
n.push(a.property);
|
|
if (n.push(a), n.length < i.length || !r && n.length > i.length) return !1;
|
|
for (let o = 0, u = n.length - 1; o < i.length; o++, u--) {
|
|
let l = n[u], c;
|
|
if ((0, nd.isIdentifier)(l))
|
|
c = l.name;
|
|
else if ((0, nd.isStringLiteral)(l))
|
|
c = l.value;
|
|
else if ((0, nd.isThisExpression)(l))
|
|
c = "this";
|
|
else
|
|
return !1;
|
|
if (i[o] !== c) return !1;
|
|
}
|
|
return !0;
|
|
}
|
|
s(dye, "matchesPattern");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
|
|
var D1 = E((b1) => {
|
|
"use strict";
|
|
Object.defineProperty(b1, "__esModule", {
|
|
value: !0
|
|
});
|
|
b1.default = hye;
|
|
var pye = g1();
|
|
function hye(e, t) {
|
|
let r = e.split(".");
|
|
return (i) => (0, pye.default)(i, r, t);
|
|
}
|
|
s(hye, "buildMatchMemberExpression");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/react/isReactComponent.js
|
|
var XR = E((Ym) => {
|
|
"use strict";
|
|
Object.defineProperty(Ym, "__esModule", {
|
|
value: !0
|
|
});
|
|
Ym.default = void 0;
|
|
var mye = D1(), yye = (0, mye.default)("React.Component"), Xst = Ym.default = yye;
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/react/isCompatTag.js
|
|
var YR = E((v1) => {
|
|
"use strict";
|
|
Object.defineProperty(v1, "__esModule", {
|
|
value: !0
|
|
});
|
|
v1.default = gye;
|
|
function gye(e) {
|
|
return !!e && /^[a-z]/.test(e);
|
|
}
|
|
s(gye, "isCompatTag");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isType.js
|
|
var Zm = E((E1) => {
|
|
"use strict";
|
|
Object.defineProperty(E1, "__esModule", {
|
|
value: !0
|
|
});
|
|
E1.default = bye;
|
|
var ZR = Xi();
|
|
function bye(e, t) {
|
|
if (e === t) return !0;
|
|
if (e == null || ZR.ALIAS_KEYS[t]) return !1;
|
|
let r = ZR.FLIPPED_ALIAS_KEYS[t];
|
|
return !!(r != null && r.includes(e));
|
|
}
|
|
s(bye, "isType");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isPlaceholderType.js
|
|
var S1 = E((x1) => {
|
|
"use strict";
|
|
Object.defineProperty(x1, "__esModule", {
|
|
value: !0
|
|
});
|
|
x1.default = vye;
|
|
var Dye = Xi();
|
|
function vye(e, t) {
|
|
if (e === t) return !0;
|
|
let r = Dye.PLACEHOLDERS_ALIAS[e];
|
|
return !!(r != null && r.includes(t));
|
|
}
|
|
s(vye, "isPlaceholderType");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/is.js
|
|
var Cl = E((T1) => {
|
|
"use strict";
|
|
Object.defineProperty(T1, "__esModule", {
|
|
value: !0
|
|
});
|
|
T1.default = Cye;
|
|
var Eye = Xm(), xye = Zm(), Sye = S1(), Tye = Xi();
|
|
function Cye(e, t, r) {
|
|
return t ? (0, xye.default)(t.type, e) ? r === void 0 ? !0 : (0, Eye.default)(t, r) : !r && t.type === "Placeholder" && e in Tye.FLIPPED_ALIAS_KEYS ?
|
|
(0, Sye.default)(t.expectedNode, e) : !1 : !1;
|
|
}
|
|
s(Cye, "is");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-validator-identifier/lib/identifier.js
|
|
var ij = E((sd) => {
|
|
"use strict";
|
|
Object.defineProperty(sd, "__esModule", {
|
|
value: !0
|
|
});
|
|
sd.isIdentifierChar = rj;
|
|
sd.isIdentifierName = Pye;
|
|
sd.isIdentifierStart = tj;
|
|
var w1 = "\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-\u1C8A\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-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\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",
|
|
QR = "\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\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\
|
|
\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\
|
|
\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6\
|
|
-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20\
|
|
-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65", wye = new RegExp("[" + w1 + "]"), Aye = new RegExp("[" + w1 + QR + "]");
|
|
w1 = QR = null;
|
|
var ej = [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, 4, 51, 13, 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, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17,
|
|
47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64,
|
|
6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45,
|
|
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, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29,
|
|
113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071,
|
|
18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12,
|
|
65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991,
|
|
84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30,
|
|
2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3,
|
|
0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2,
|
|
2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153,
|
|
7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], _ye = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5,
|
|
0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13,
|
|
2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4,
|
|
68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58,
|
|
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, 343, 9, 54,
|
|
7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350,
|
|
0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543,
|
|
4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6,
|
|
10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
function C1(e, t) {
|
|
let r = 65536;
|
|
for (let i = 0, n = t.length; i < n; i += 2) {
|
|
if (r += t[i], r > e) return !1;
|
|
if (r += t[i + 1], r >= e) return !0;
|
|
}
|
|
return !1;
|
|
}
|
|
s(C1, "isInAstralSet");
|
|
function tj(e) {
|
|
return e < 65 ? e === 36 : e <= 90 ? !0 : e < 97 ? e === 95 : e <= 122 ? !0 : e <= 65535 ? e >= 170 && wye.test(String.fromCharCode(e)) :
|
|
C1(e, ej);
|
|
}
|
|
s(tj, "isIdentifierStart");
|
|
function rj(e) {
|
|
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e <= 90 ? !0 : e < 97 ? e === 95 : e <= 122 ? !0 : e <= 65535 ? e >= 170 && Aye.test(
|
|
String.fromCharCode(e)) : C1(e, ej) || C1(e, _ye);
|
|
}
|
|
s(rj, "isIdentifierChar");
|
|
function Pye(e) {
|
|
let t = !0;
|
|
for (let r = 0; r < e.length; r++) {
|
|
let i = e.charCodeAt(r);
|
|
if ((i & 64512) === 55296 && r + 1 < e.length) {
|
|
let n = e.charCodeAt(++r);
|
|
(n & 64512) === 56320 && (i = 65536 + ((i & 1023) << 10) + (n & 1023));
|
|
}
|
|
if (t) {
|
|
if (t = !1, !tj(i))
|
|
return !1;
|
|
} else if (!rj(i))
|
|
return !1;
|
|
}
|
|
return !t;
|
|
}
|
|
s(Pye, "isIdentifierName");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-validator-identifier/lib/keyword.js
|
|
var oj = E((Lo) => {
|
|
"use strict";
|
|
Object.defineProperty(Lo, "__esModule", {
|
|
value: !0
|
|
});
|
|
Lo.isKeyword = Bye;
|
|
Lo.isReservedWord = nj;
|
|
Lo.isStrictBindOnlyReservedWord = aj;
|
|
Lo.isStrictBindReservedWord = kye;
|
|
Lo.isStrictReservedWord = sj;
|
|
var A1 = {
|
|
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "swit\
|
|
ch", "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"]
|
|
}, Fye = new Set(A1.keyword), Iye = new Set(A1.strict), Oye = new Set(A1.strictBind);
|
|
function nj(e, t) {
|
|
return t && e === "await" || e === "enum";
|
|
}
|
|
s(nj, "isReservedWord");
|
|
function sj(e, t) {
|
|
return nj(e, t) || Iye.has(e);
|
|
}
|
|
s(sj, "isStrictReservedWord");
|
|
function aj(e) {
|
|
return Oye.has(e);
|
|
}
|
|
s(aj, "isStrictBindOnlyReservedWord");
|
|
function kye(e, t) {
|
|
return sj(e, t) || aj(e);
|
|
}
|
|
s(kye, "isStrictBindReservedWord");
|
|
function Bye(e) {
|
|
return Fye.has(e);
|
|
}
|
|
s(Bye, "isKeyword");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-validator-identifier/lib/index.js
|
|
var wl = E((Yn) => {
|
|
"use strict";
|
|
Object.defineProperty(Yn, "__esModule", {
|
|
value: !0
|
|
});
|
|
Object.defineProperty(Yn, "isIdentifierChar", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return _1.isIdentifierChar;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Yn, "isIdentifierName", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return _1.isIdentifierName;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Yn, "isIdentifierStart", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return _1.isIdentifierStart;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Yn, "isKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return ad.isKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Yn, "isReservedWord", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return ad.isReservedWord;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Yn, "isStrictBindOnlyReservedWord", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return ad.isStrictBindOnlyReservedWord;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Yn, "isStrictBindReservedWord", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return ad.isStrictBindReservedWord;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Yn, "isStrictReservedWord", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return ad.isStrictReservedWord;
|
|
}, "get")
|
|
});
|
|
var _1 = ij(), ad = oj();
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isValidIdentifier.js
|
|
var Al = E((F1) => {
|
|
"use strict";
|
|
Object.defineProperty(F1, "__esModule", {
|
|
value: !0
|
|
});
|
|
F1.default = Nye;
|
|
var P1 = wl();
|
|
function Nye(e, t = !0) {
|
|
return typeof e != "string" || t && ((0, P1.isKeyword)(e) || (0, P1.isStrictReservedWord)(e, !0)) ? !1 : (0, P1.isIdentifierName)(e);
|
|
}
|
|
s(Nye, "isValidIdentifier");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-string-parser/lib/index.js
|
|
var fj = E((od) => {
|
|
"use strict";
|
|
Object.defineProperty(od, "__esModule", {
|
|
value: !0
|
|
});
|
|
od.readCodePoint = cj;
|
|
od.readInt = lj;
|
|
od.readStringContents = Rye;
|
|
var Mye = /* @__PURE__ */ s(function(t) {
|
|
return t >= 48 && t <= 57;
|
|
}, "isDigit"), uj = {
|
|
decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]),
|
|
hex: /* @__PURE__ */ new Set([46, 88, 95, 120])
|
|
}, Qm = {
|
|
bin: /* @__PURE__ */ s((e) => e === 48 || e === 49, "bin"),
|
|
oct: /* @__PURE__ */ s((e) => e >= 48 && e <= 55, "oct"),
|
|
dec: /* @__PURE__ */ s((e) => e >= 48 && e <= 57, "dec"),
|
|
hex: /* @__PURE__ */ s((e) => e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102, "hex")
|
|
};
|
|
function Rye(e, t, r, i, n, a) {
|
|
let o = r, u = i, l = n, c = "", f = null, m = r, {
|
|
length: h
|
|
} = t;
|
|
for (; ; ) {
|
|
if (r >= h) {
|
|
a.unterminated(o, u, l), c += t.slice(m, r);
|
|
break;
|
|
}
|
|
let d = t.charCodeAt(r);
|
|
if (jye(e, d, t, r)) {
|
|
c += t.slice(m, r);
|
|
break;
|
|
}
|
|
if (d === 92) {
|
|
c += t.slice(m, r);
|
|
let y = Lye(t, r, i, n, e === "template", a);
|
|
y.ch === null && !f ? f = {
|
|
pos: r,
|
|
lineStart: i,
|
|
curLine: n
|
|
} : c += y.ch, {
|
|
pos: r,
|
|
lineStart: i,
|
|
curLine: n
|
|
} = y, m = r;
|
|
} else d === 8232 || d === 8233 ? (++r, ++n, i = r) : d === 10 || d === 13 ? e === "template" ? (c += t.slice(m, r) + `
|
|
`, ++r, d === 13 && t.charCodeAt(r) === 10 && ++r, ++n, m = i = r) : a.unterminated(o, u, l) : ++r;
|
|
}
|
|
return {
|
|
pos: r,
|
|
str: c,
|
|
firstInvalidLoc: f,
|
|
lineStart: i,
|
|
curLine: n,
|
|
containsInvalid: !!f
|
|
};
|
|
}
|
|
s(Rye, "readStringContents");
|
|
function jye(e, t, r, i) {
|
|
return e === "template" ? t === 96 || t === 36 && r.charCodeAt(i + 1) === 123 : t === (e === "double" ? 34 : 39);
|
|
}
|
|
s(jye, "isStringEnd");
|
|
function Lye(e, t, r, i, n, a) {
|
|
let o = !n;
|
|
t++;
|
|
let u = /* @__PURE__ */ s((c) => ({
|
|
pos: t,
|
|
ch: c,
|
|
lineStart: r,
|
|
curLine: i
|
|
}), "res"), l = e.charCodeAt(t++);
|
|
switch (l) {
|
|
case 110:
|
|
return u(`
|
|
`);
|
|
case 114:
|
|
return u("\r");
|
|
case 120: {
|
|
let c;
|
|
return {
|
|
code: c,
|
|
pos: t
|
|
} = I1(e, t, r, i, 2, !1, o, a), u(c === null ? null : String.fromCharCode(c));
|
|
}
|
|
case 117: {
|
|
let c;
|
|
return {
|
|
code: c,
|
|
pos: t
|
|
} = cj(e, t, r, i, o, a), u(c === null ? null : String.fromCodePoint(c));
|
|
}
|
|
case 116:
|
|
return u(" ");
|
|
case 98:
|
|
return u("\b");
|
|
case 118:
|
|
return u("\v");
|
|
case 102:
|
|
return u("\f");
|
|
case 13:
|
|
e.charCodeAt(t) === 10 && ++t;
|
|
case 10:
|
|
r = t, ++i;
|
|
case 8232:
|
|
case 8233:
|
|
return u("");
|
|
case 56:
|
|
case 57:
|
|
if (n)
|
|
return u(null);
|
|
a.strictNumericEscape(t - 1, r, i);
|
|
default:
|
|
if (l >= 48 && l <= 55) {
|
|
let c = t - 1, m = /^[0-7]+/.exec(e.slice(c, t + 2))[0], h = parseInt(m, 8);
|
|
h > 255 && (m = m.slice(0, -1), h = parseInt(m, 8)), t += m.length - 1;
|
|
let d = e.charCodeAt(t);
|
|
if (m !== "0" || d === 56 || d === 57) {
|
|
if (n)
|
|
return u(null);
|
|
a.strictNumericEscape(c, r, i);
|
|
}
|
|
return u(String.fromCharCode(h));
|
|
}
|
|
return u(String.fromCharCode(l));
|
|
}
|
|
}
|
|
s(Lye, "readEscapedChar");
|
|
function I1(e, t, r, i, n, a, o, u) {
|
|
let l = t, c;
|
|
return {
|
|
n: c,
|
|
pos: t
|
|
} = lj(e, t, r, i, 16, n, a, !1, u, !o), c === null && (o ? u.invalidEscapeSequence(l, r, i) : t = l - 1), {
|
|
code: c,
|
|
pos: t
|
|
};
|
|
}
|
|
s(I1, "readHexChar");
|
|
function lj(e, t, r, i, n, a, o, u, l, c) {
|
|
let f = t, m = n === 16 ? uj.hex : uj.decBinOct, h = n === 16 ? Qm.hex : n === 10 ? Qm.dec : n === 8 ? Qm.oct : Qm.bin, d = !1, y = 0;
|
|
for (let p = 0, g = a ?? 1 / 0; p < g; ++p) {
|
|
let b = e.charCodeAt(t), D;
|
|
if (b === 95 && u !== "bail") {
|
|
let v = e.charCodeAt(t - 1), S = e.charCodeAt(t + 1);
|
|
if (u) {
|
|
if (Number.isNaN(S) || !h(S) || m.has(v) || m.has(S)) {
|
|
if (c) return {
|
|
n: null,
|
|
pos: t
|
|
};
|
|
l.unexpectedNumericSeparator(t, r, i);
|
|
}
|
|
} else {
|
|
if (c) return {
|
|
n: null,
|
|
pos: t
|
|
};
|
|
l.numericSeparatorInEscapeSequence(t, r, i);
|
|
}
|
|
++t;
|
|
continue;
|
|
}
|
|
if (b >= 97 ? D = b - 97 + 10 : b >= 65 ? D = b - 65 + 10 : Mye(b) ? D = b - 48 : D = 1 / 0, D >= n) {
|
|
if (D <= 9 && c)
|
|
return {
|
|
n: null,
|
|
pos: t
|
|
};
|
|
if (D <= 9 && l.invalidDigit(t, r, i, n))
|
|
D = 0;
|
|
else if (o)
|
|
D = 0, d = !0;
|
|
else
|
|
break;
|
|
}
|
|
++t, y = y * n + D;
|
|
}
|
|
return t === f || a != null && t - f !== a || d ? {
|
|
n: null,
|
|
pos: t
|
|
} : {
|
|
n: y,
|
|
pos: t
|
|
};
|
|
}
|
|
s(lj, "readInt");
|
|
function cj(e, t, r, i, n, a) {
|
|
let o = e.charCodeAt(t), u;
|
|
if (o === 123) {
|
|
if (++t, {
|
|
code: u,
|
|
pos: t
|
|
} = I1(e, t, r, i, e.indexOf("}", t) - t, !0, n, a), ++t, u !== null && u > 1114111)
|
|
if (n)
|
|
a.invalidCodePoint(t, r, i);
|
|
else
|
|
return {
|
|
code: null,
|
|
pos: t
|
|
};
|
|
} else
|
|
({
|
|
code: u,
|
|
pos: t
|
|
} = I1(e, t, r, i, 4, !1, n, a));
|
|
return {
|
|
code: u,
|
|
pos: t
|
|
};
|
|
}
|
|
s(cj, "readCodePoint");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/constants/index.js
|
|
var _l = E((tt) => {
|
|
"use strict";
|
|
Object.defineProperty(tt, "__esModule", {
|
|
value: !0
|
|
});
|
|
tt.UPDATE_OPERATORS = tt.UNARY_OPERATORS = tt.STRING_UNARY_OPERATORS = tt.STATEMENT_OR_BLOCK_KEYS = tt.NUMBER_UNARY_OPERATORS = tt.NUMBER_BINARY_OPERATORS =
|
|
tt.LOGICAL_OPERATORS = tt.INHERIT_KEYS = tt.FOR_INIT_KEYS = tt.FLATTENABLE_KEYS = tt.EQUALITY_BINARY_OPERATORS = tt.COMPARISON_BINARY_OPERATORS =
|
|
tt.COMMENT_KEYS = tt.BOOLEAN_UNARY_OPERATORS = tt.BOOLEAN_NUMBER_BINARY_OPERATORS = tt.BOOLEAN_BINARY_OPERATORS = tt.BINARY_OPERATORS = tt.
|
|
ASSIGNMENT_OPERATORS = void 0;
|
|
var yat = tt.STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"], gat = tt.FLATTENABLE_KEYS = ["body", "expressions"], bat = tt.
|
|
FOR_INIT_KEYS = ["left", "init"], Dat = tt.COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"], qye = tt.LOGICAL_OPERATORS =
|
|
["||", "&&", "??"], vat = tt.UPDATE_OPERATORS = ["++", "--"], Uye = tt.BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="], Wye = tt.
|
|
EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="], $ye = tt.COMPARISON_BINARY_OPERATORS = [...Wye, "in", "instanceof"], Vye = tt.BOOLEAN_BINARY_OPERATORS =
|
|
[...$ye, ...Uye], dj = tt.NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"], Eat = tt.BINARY_OPERATORS =
|
|
["+", ...dj, ...Vye, "|>"], xat = tt.ASSIGNMENT_OPERATORS = ["=", "+=", ...dj.map((e) => e + "="), ...qye.map((e) => e + "=")], Hye = tt.BOOLEAN_UNARY_OPERATORS =
|
|
["delete", "!"], Kye = tt.NUMBER_UNARY_OPERATORS = ["+", "-", "~"], zye = tt.STRING_UNARY_OPERATORS = ["typeof"], Sat = tt.UNARY_OPERATORS =
|
|
["void", "throw", ...Hye, ...Kye, ...zye], Tat = tt.INHERIT_KEYS = {
|
|
optional: ["typeAnnotation", "typeParameters", "returnType"],
|
|
force: ["start", "loc", "end"]
|
|
};
|
|
tt.BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"), tt.NOT_LOCAL_BINDING = Symbol.for("should not be considered a local bi\
|
|
nding");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/definitions/utils.js
|
|
var Zn = E((ht) => {
|
|
"use strict";
|
|
Object.defineProperty(ht, "__esModule", {
|
|
value: !0
|
|
});
|
|
ht.allExpandedTypes = ht.VISITOR_KEYS = ht.NODE_PARENT_VALIDATIONS = ht.NODE_FIELDS = ht.FLIPPED_ALIAS_KEYS = ht.DEPRECATED_KEYS = ht.BUILDER_KEYS =
|
|
ht.ALIAS_KEYS = void 0;
|
|
ht.arrayOf = hj;
|
|
ht.arrayOfType = mj;
|
|
ht.assertEach = yj;
|
|
ht.assertNodeOrValueType = a0e;
|
|
ht.assertNodeType = ty;
|
|
ht.assertOneOf = n0e;
|
|
ht.assertOptionalChainStart = u0e;
|
|
ht.assertShape = o0e;
|
|
ht.assertValueType = N1;
|
|
ht.chain = gj;
|
|
ht.default = bj;
|
|
ht.defineAliasedType = f0e;
|
|
ht.validate = B1;
|
|
ht.validateArrayOfType = i0e;
|
|
ht.validateOptional = t0e;
|
|
ht.validateOptionalType = r0e;
|
|
ht.validateType = e0e;
|
|
var pj = Cl(), ud = ry(), Gye = ht.VISITOR_KEYS = {}, Jye = ht.ALIAS_KEYS = {}, O1 = ht.FLIPPED_ALIAS_KEYS = {}, Xye = ht.NODE_FIELDS = {},
|
|
Yye = ht.BUILDER_KEYS = {}, Zye = ht.DEPRECATED_KEYS = {}, Qye = ht.NODE_PARENT_VALIDATIONS = {};
|
|
function ey(e) {
|
|
return Array.isArray(e) ? "array" : e === null ? "null" : typeof e;
|
|
}
|
|
s(ey, "getType");
|
|
function B1(e) {
|
|
return {
|
|
validate: e
|
|
};
|
|
}
|
|
s(B1, "validate");
|
|
function e0e(...e) {
|
|
return B1(ty(...e));
|
|
}
|
|
s(e0e, "validateType");
|
|
function t0e(e) {
|
|
return {
|
|
validate: e,
|
|
optional: !0
|
|
};
|
|
}
|
|
s(t0e, "validateOptional");
|
|
function r0e(...e) {
|
|
return {
|
|
validate: ty(...e),
|
|
optional: !0
|
|
};
|
|
}
|
|
s(r0e, "validateOptionalType");
|
|
function hj(e) {
|
|
return gj(N1("array"), yj(e));
|
|
}
|
|
s(hj, "arrayOf");
|
|
function mj(...e) {
|
|
return hj(ty(...e));
|
|
}
|
|
s(mj, "arrayOfType");
|
|
function i0e(...e) {
|
|
return B1(mj(...e));
|
|
}
|
|
s(i0e, "validateArrayOfType");
|
|
function yj(e) {
|
|
let t = process.env.BABEL_TYPES_8_BREAKING ? ud.validateChild : () => {
|
|
};
|
|
function r(i, n, a) {
|
|
if (!Array.isArray(a)) return;
|
|
let o = 0, u = {
|
|
toString() {
|
|
return `${n}[${o}]`;
|
|
}
|
|
};
|
|
for (; o < a.length; o++) {
|
|
let l = a[o];
|
|
e(i, u, l), t(i, u, l);
|
|
}
|
|
}
|
|
return s(r, "validator"), r.each = e, r;
|
|
}
|
|
s(yj, "assertEach");
|
|
function n0e(...e) {
|
|
function t(r, i, n) {
|
|
if (!e.includes(n))
|
|
throw new TypeError(`Property ${i} expected value to be one of ${JSON.stringify(e)} but got ${JSON.stringify(n)}`);
|
|
}
|
|
return s(t, "validate"), t.oneOf = e, t;
|
|
}
|
|
s(n0e, "assertOneOf");
|
|
var s0e = ht.allExpandedTypes = [];
|
|
function ty(...e) {
|
|
let t = /* @__PURE__ */ new Set();
|
|
s0e.push({
|
|
types: e,
|
|
set: t
|
|
});
|
|
function r(i, n, a) {
|
|
let o = a?.type;
|
|
if (o != null) {
|
|
if (t.has(o)) {
|
|
(0, ud.validateChild)(i, n, a);
|
|
return;
|
|
}
|
|
if (o === "Placeholder") {
|
|
for (let u of e)
|
|
if ((0, pj.default)(u, a)) {
|
|
(0, ud.validateChild)(i, n, a);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
throw new TypeError(`Property ${n} of ${i.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(o)}`);
|
|
}
|
|
return s(r, "validate"), r.oneOfNodeTypes = e, r;
|
|
}
|
|
s(ty, "assertNodeType");
|
|
function a0e(...e) {
|
|
function t(r, i, n) {
|
|
let a = ey(n);
|
|
for (let o of e)
|
|
if (a === o || (0, pj.default)(o, n)) {
|
|
(0, ud.validateChild)(r, i, n);
|
|
return;
|
|
}
|
|
throw new TypeError(`Property ${i} of ${r.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(n?.
|
|
type)}`);
|
|
}
|
|
return s(t, "validate"), t.oneOfNodeOrValueTypes = e, t;
|
|
}
|
|
s(a0e, "assertNodeOrValueType");
|
|
function N1(e) {
|
|
function t(r, i, n) {
|
|
if (ey(n) !== e)
|
|
throw new TypeError(`Property ${i} expected type of ${e} but got ${ey(n)}`);
|
|
}
|
|
return s(t, "validate"), t.type = e, t;
|
|
}
|
|
s(N1, "assertValueType");
|
|
function o0e(e) {
|
|
let t = Object.keys(e);
|
|
function r(i, n, a) {
|
|
let o = [];
|
|
for (let u of t)
|
|
try {
|
|
(0, ud.validateField)(i, u, a[u], e[u]);
|
|
} catch (l) {
|
|
if (l instanceof TypeError) {
|
|
o.push(l.message);
|
|
continue;
|
|
}
|
|
throw l;
|
|
}
|
|
if (o.length)
|
|
throw new TypeError(`Property ${n} of ${i.type} expected to have the following:
|
|
${o.join(`
|
|
`)}`);
|
|
}
|
|
return s(r, "validate"), r.shapeOf = e, r;
|
|
}
|
|
s(o0e, "assertShape");
|
|
function u0e() {
|
|
function e(t) {
|
|
var r;
|
|
let i = t;
|
|
for (; t; ) {
|
|
let {
|
|
type: n
|
|
} = i;
|
|
if (n === "OptionalCallExpression") {
|
|
if (i.optional) return;
|
|
i = i.callee;
|
|
continue;
|
|
}
|
|
if (n === "OptionalMemberExpression") {
|
|
if (i.optional) return;
|
|
i = i.object;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
throw new TypeError(`Non-optional ${t.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chai\
|
|
n from ${(r = i) == null ? void 0 : r.type}`);
|
|
}
|
|
return s(e, "validate"), e;
|
|
}
|
|
s(u0e, "assertOptionalChainStart");
|
|
function gj(...e) {
|
|
function t(...r) {
|
|
for (let i of e)
|
|
i(...r);
|
|
}
|
|
if (s(t, "validate"), t.chainOf = e, e.length >= 2 && "type" in e[0] && e[0].type === "array" && !("each" in e[1]))
|
|
throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');
|
|
return t;
|
|
}
|
|
s(gj, "chain");
|
|
var l0e = /* @__PURE__ */ new Set(["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"]), c0e = /* @__PURE__ */ new Set(
|
|
["default", "optional", "deprecated", "validate"]), k1 = {};
|
|
function f0e(...e) {
|
|
return (t, r = {}) => {
|
|
let i = r.aliases;
|
|
if (!i) {
|
|
var n;
|
|
r.inherits && (i = (n = k1[r.inherits].aliases) == null ? void 0 : n.slice()), i ?? (i = []), r.aliases = i;
|
|
}
|
|
let a = e.filter((o) => !i.includes(o));
|
|
i.unshift(...a), bj(t, r);
|
|
};
|
|
}
|
|
s(f0e, "defineAliasedType");
|
|
function bj(e, t = {}) {
|
|
let r = t.inherits && k1[t.inherits] || {}, i = t.fields;
|
|
if (!i && (i = {}, r.fields)) {
|
|
let u = Object.getOwnPropertyNames(r.fields);
|
|
for (let l of u) {
|
|
let c = r.fields[l], f = c.default;
|
|
if (Array.isArray(f) ? f.length > 0 : f && typeof f == "object")
|
|
throw new Error("field defaults can only be primitives or empty arrays currently");
|
|
i[l] = {
|
|
default: Array.isArray(f) ? [] : f,
|
|
optional: c.optional,
|
|
deprecated: c.deprecated,
|
|
validate: c.validate
|
|
};
|
|
}
|
|
}
|
|
let n = t.visitor || r.visitor || [], a = t.aliases || r.aliases || [], o = t.builder || r.builder || t.visitor || [];
|
|
for (let u of Object.keys(t))
|
|
if (!l0e.has(u))
|
|
throw new Error(`Unknown type option "${u}" on ${e}`);
|
|
t.deprecatedAlias && (Zye[t.deprecatedAlias] = e);
|
|
for (let u of n.concat(o))
|
|
i[u] = i[u] || {};
|
|
for (let u of Object.keys(i)) {
|
|
let l = i[u];
|
|
l.default !== void 0 && !o.includes(u) && (l.optional = !0), l.default === void 0 ? l.default = null : !l.validate && l.default != null &&
|
|
(l.validate = N1(ey(l.default)));
|
|
for (let c of Object.keys(l))
|
|
if (!c0e.has(c))
|
|
throw new Error(`Unknown field key "${c}" on ${e}.${u}`);
|
|
}
|
|
Gye[e] = t.visitor = n, Yye[e] = t.builder = o, Xye[e] = t.fields = i, Jye[e] = t.aliases = a, a.forEach((u) => {
|
|
O1[u] = O1[u] || [], O1[u].push(e);
|
|
}), t.validate && (Qye[e] = t.validate), k1[e] = t;
|
|
}
|
|
s(bj, "defineType");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/definitions/core.js
|
|
var cd = E((ii) => {
|
|
"use strict";
|
|
Object.defineProperty(ii, "__esModule", {
|
|
value: !0
|
|
});
|
|
ii.patternLikeCommon = ii.importAttributes = ii.functionTypeAnnotationCommon = ii.functionDeclarationCommon = ii.functionCommon = ii.classMethodOrPropertyCommon =
|
|
ii.classMethodOrDeclareMethodCommon = void 0;
|
|
var di = Cl(), d0e = Al(), Dj = wl(), p0e = fj(), ld = _l(), I = Zn(), De = (0, I.defineAliasedType)("Standardized");
|
|
De("ArrayExpression", {
|
|
fields: {
|
|
elements: {
|
|
validate: (0, I.arrayOf)((0, I.assertNodeOrValueType)("null", "Expression", "SpreadElement")),
|
|
default: process.env.BABEL_TYPES_8_BREAKING ? void 0 : []
|
|
}
|
|
},
|
|
visitor: ["elements"],
|
|
aliases: ["Expression"]
|
|
});
|
|
De("AssignmentExpression", {
|
|
fields: {
|
|
operator: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? Object.assign(function() {
|
|
let e = (0, I.assertOneOf)(...ld.ASSIGNMENT_OPERATORS), t = (0, I.assertOneOf)("=");
|
|
return function(r, i, n) {
|
|
((0, di.default)("Pattern", r.left) ? t : e)(r, i, n);
|
|
};
|
|
}(), {
|
|
type: "string"
|
|
}) : (0, I.assertValueType)("string")
|
|
},
|
|
left: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.assertNodeType)("Identifier", "MemberExpression", "OptionalMemberExpression", "\
|
|
ArrayPattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression") : (0, I.assertNodeType)(
|
|
"LVal", "OptionalMemberExpression")
|
|
},
|
|
right: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
}
|
|
},
|
|
builder: ["operator", "left", "right"],
|
|
visitor: ["left", "right"],
|
|
aliases: ["Expression"]
|
|
});
|
|
De("BinaryExpression", {
|
|
builder: ["operator", "left", "right"],
|
|
fields: {
|
|
operator: {
|
|
validate: (0, I.assertOneOf)(...ld.BINARY_OPERATORS)
|
|
},
|
|
left: {
|
|
validate: function() {
|
|
let e = (0, I.assertNodeType)("Expression"), t = (0, I.assertNodeType)("Expression", "PrivateName");
|
|
return Object.assign(function(i, n, a) {
|
|
(i.operator === "in" ? t : e)(i, n, a);
|
|
}, {
|
|
oneOfNodeTypes: ["Expression", "PrivateName"]
|
|
});
|
|
}()
|
|
},
|
|
right: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
}
|
|
},
|
|
visitor: ["left", "right"],
|
|
aliases: ["Binary", "Expression"]
|
|
});
|
|
De("InterpreterDirective", {
|
|
builder: ["value"],
|
|
fields: {
|
|
value: {
|
|
validate: (0, I.assertValueType)("string")
|
|
}
|
|
}
|
|
});
|
|
De("Directive", {
|
|
visitor: ["value"],
|
|
fields: {
|
|
value: {
|
|
validate: (0, I.assertNodeType)("DirectiveLiteral")
|
|
}
|
|
}
|
|
});
|
|
De("DirectiveLiteral", {
|
|
builder: ["value"],
|
|
fields: {
|
|
value: {
|
|
validate: (0, I.assertValueType)("string")
|
|
}
|
|
}
|
|
});
|
|
De("BlockStatement", {
|
|
builder: ["body", "directives"],
|
|
visitor: ["directives", "body"],
|
|
fields: {
|
|
directives: {
|
|
validate: (0, I.arrayOfType)("Directive"),
|
|
default: []
|
|
},
|
|
body: (0, I.validateArrayOfType)("Statement")
|
|
},
|
|
aliases: ["Scopable", "BlockParent", "Block", "Statement"]
|
|
});
|
|
De("BreakStatement", {
|
|
visitor: ["label"],
|
|
fields: {
|
|
label: {
|
|
validate: (0, I.assertNodeType)("Identifier"),
|
|
optional: !0
|
|
}
|
|
},
|
|
aliases: ["Statement", "Terminatorless", "CompletionStatement"]
|
|
});
|
|
De("CallExpression", {
|
|
visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
|
|
builder: ["callee", "arguments"],
|
|
aliases: ["Expression"],
|
|
fields: Object.assign({
|
|
callee: {
|
|
validate: (0, I.assertNodeType)("Expression", "Super", "V8IntrinsicIdentifier")
|
|
},
|
|
arguments: (0, I.validateArrayOfType)("Expression", "SpreadElement", "ArgumentPlaceholder"),
|
|
typeArguments: {
|
|
validate: (0, I.assertNodeType)("TypeParameterInstantiation"),
|
|
optional: !0
|
|
}
|
|
}, {
|
|
optional: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
typeParameters: {
|
|
validate: (0, I.assertNodeType)("TSTypeParameterInstantiation"),
|
|
optional: !0
|
|
}
|
|
}, process.env.BABEL_TYPES_8_BREAKING ? {} : {
|
|
optional: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
}
|
|
})
|
|
});
|
|
De("CatchClause", {
|
|
visitor: ["param", "body"],
|
|
fields: {
|
|
param: {
|
|
validate: (0, I.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
|
|
optional: !0
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("BlockStatement")
|
|
}
|
|
},
|
|
aliases: ["Scopable", "BlockParent"]
|
|
});
|
|
De("ConditionalExpression", {
|
|
visitor: ["test", "consequent", "alternate"],
|
|
fields: {
|
|
test: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
consequent: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
alternate: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
}
|
|
},
|
|
aliases: ["Expression", "Conditional"]
|
|
});
|
|
De("ContinueStatement", {
|
|
visitor: ["label"],
|
|
fields: {
|
|
label: {
|
|
validate: (0, I.assertNodeType)("Identifier"),
|
|
optional: !0
|
|
}
|
|
},
|
|
aliases: ["Statement", "Terminatorless", "CompletionStatement"]
|
|
});
|
|
De("DebuggerStatement", {
|
|
aliases: ["Statement"]
|
|
});
|
|
De("DoWhileStatement", {
|
|
builder: ["test", "body"],
|
|
visitor: ["body", "test"],
|
|
fields: {
|
|
test: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("Statement")
|
|
}
|
|
},
|
|
aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
|
|
});
|
|
De("EmptyStatement", {
|
|
aliases: ["Statement"]
|
|
});
|
|
De("ExpressionStatement", {
|
|
visitor: ["expression"],
|
|
fields: {
|
|
expression: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
}
|
|
},
|
|
aliases: ["Statement", "ExpressionWrapper"]
|
|
});
|
|
De("File", {
|
|
builder: ["program", "comments", "tokens"],
|
|
visitor: ["program"],
|
|
fields: {
|
|
program: {
|
|
validate: (0, I.assertNodeType)("Program")
|
|
},
|
|
comments: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.assertEach)((0, I.assertNodeType)("CommentBlock", "CommentLine")) : Object.assign(
|
|
() => {
|
|
}, {
|
|
each: {
|
|
oneOfNodeTypes: ["CommentBlock", "CommentLine"]
|
|
}
|
|
}),
|
|
optional: !0
|
|
},
|
|
tokens: {
|
|
validate: (0, I.assertEach)(Object.assign(() => {
|
|
}, {
|
|
type: "any"
|
|
})),
|
|
optional: !0
|
|
}
|
|
}
|
|
});
|
|
De("ForInStatement", {
|
|
visitor: ["left", "right", "body"],
|
|
aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
|
|
fields: {
|
|
left: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "Array\
|
|
Pattern", "ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression") : (0, I.assertNodeType)("Var\
|
|
iableDeclaration", "LVal")
|
|
},
|
|
right: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("Statement")
|
|
}
|
|
}
|
|
});
|
|
De("ForStatement", {
|
|
visitor: ["init", "test", "update", "body"],
|
|
aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
|
|
fields: {
|
|
init: {
|
|
validate: (0, I.assertNodeType)("VariableDeclaration", "Expression"),
|
|
optional: !0
|
|
},
|
|
test: {
|
|
validate: (0, I.assertNodeType)("Expression"),
|
|
optional: !0
|
|
},
|
|
update: {
|
|
validate: (0, I.assertNodeType)("Expression"),
|
|
optional: !0
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("Statement")
|
|
}
|
|
}
|
|
});
|
|
var Pl = /* @__PURE__ */ s(() => ({
|
|
params: (0, I.validateArrayOfType)("Identifier", "Pattern", "RestElement"),
|
|
generator: {
|
|
default: !1
|
|
},
|
|
async: {
|
|
default: !1
|
|
}
|
|
}), "functionCommon");
|
|
ii.functionCommon = Pl;
|
|
var qo = /* @__PURE__ */ s(() => ({
|
|
returnType: {
|
|
validate: (0, I.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
|
|
optional: !0
|
|
},
|
|
typeParameters: {
|
|
validate: (0, I.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
|
|
optional: !0
|
|
}
|
|
}), "functionTypeAnnotationCommon");
|
|
ii.functionTypeAnnotationCommon = qo;
|
|
var vj = /* @__PURE__ */ s(() => Object.assign({}, Pl(), {
|
|
declare: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
id: {
|
|
validate: (0, I.assertNodeType)("Identifier"),
|
|
optional: !0
|
|
}
|
|
}), "functionDeclarationCommon");
|
|
ii.functionDeclarationCommon = vj;
|
|
De("FunctionDeclaration", {
|
|
builder: ["id", "params", "body", "generator", "async"],
|
|
visitor: ["id", "typeParameters", "params", "predicate", "returnType", "body"],
|
|
fields: Object.assign({}, vj(), qo(), {
|
|
body: {
|
|
validate: (0, I.assertNodeType)("BlockStatement")
|
|
},
|
|
predicate: {
|
|
validate: (0, I.assertNodeType)("DeclaredPredicate", "InferredPredicate"),
|
|
optional: !0
|
|
}
|
|
}),
|
|
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? function() {
|
|
let e = (0, I.assertNodeType)("Identifier");
|
|
return function(t, r, i) {
|
|
(0, di.default)("ExportDefaultDeclaration", t) || e(i, "id", i.id);
|
|
};
|
|
}() : void 0
|
|
});
|
|
De("FunctionExpression", {
|
|
inherits: "FunctionDeclaration",
|
|
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
|
|
fields: Object.assign({}, Pl(), qo(), {
|
|
id: {
|
|
validate: (0, I.assertNodeType)("Identifier"),
|
|
optional: !0
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("BlockStatement")
|
|
},
|
|
predicate: {
|
|
validate: (0, I.assertNodeType)("DeclaredPredicate", "InferredPredicate"),
|
|
optional: !0
|
|
}
|
|
})
|
|
});
|
|
var Fl = /* @__PURE__ */ s(() => ({
|
|
typeAnnotation: {
|
|
validate: (0, I.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
|
|
optional: !0
|
|
},
|
|
optional: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
decorators: {
|
|
validate: (0, I.arrayOfType)("Decorator"),
|
|
optional: !0
|
|
}
|
|
}), "patternLikeCommon");
|
|
ii.patternLikeCommon = Fl;
|
|
De("Identifier", {
|
|
builder: ["name"],
|
|
visitor: ["typeAnnotation", "decorators"],
|
|
aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
|
|
fields: Object.assign({}, Fl(), {
|
|
name: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.chain)((0, I.assertValueType)("string"), Object.assign(function(e, t, r) {
|
|
if (!(0, d0e.default)(r, !1))
|
|
throw new TypeError(`"${r}" is not a valid identifier name`);
|
|
}, {
|
|
type: "string"
|
|
})) : (0, I.assertValueType)("string")
|
|
}
|
|
}),
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? function(e, t, r) {
|
|
let i = /\.(\w+)$/.exec(t.toString());
|
|
if (!i) return;
|
|
let [, n] = i, a = {
|
|
computed: !1
|
|
};
|
|
if (n === "property") {
|
|
if ((0, di.default)("MemberExpression", e, a) || (0, di.default)("OptionalMemberExpression", e, a)) return;
|
|
} else if (n === "key") {
|
|
if ((0, di.default)("Property", e, a) || (0, di.default)("Method", e, a)) return;
|
|
} else if (n === "exported") {
|
|
if ((0, di.default)("ExportSpecifier", e)) return;
|
|
} else if (n === "imported") {
|
|
if ((0, di.default)("ImportSpecifier", e, {
|
|
imported: r
|
|
})) return;
|
|
} else if (n === "meta" && (0, di.default)("MetaProperty", e, {
|
|
meta: r
|
|
}))
|
|
return;
|
|
if (((0, Dj.isKeyword)(r.name) || (0, Dj.isReservedWord)(r.name, !1)) && r.name !== "this")
|
|
throw new TypeError(`"${r.name}" is not a valid identifier`);
|
|
} : void 0
|
|
});
|
|
De("IfStatement", {
|
|
visitor: ["test", "consequent", "alternate"],
|
|
aliases: ["Statement", "Conditional"],
|
|
fields: {
|
|
test: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
consequent: {
|
|
validate: (0, I.assertNodeType)("Statement")
|
|
},
|
|
alternate: {
|
|
optional: !0,
|
|
validate: (0, I.assertNodeType)("Statement")
|
|
}
|
|
}
|
|
});
|
|
De("LabeledStatement", {
|
|
visitor: ["label", "body"],
|
|
aliases: ["Statement"],
|
|
fields: {
|
|
label: {
|
|
validate: (0, I.assertNodeType)("Identifier")
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("Statement")
|
|
}
|
|
}
|
|
});
|
|
De("StringLiteral", {
|
|
builder: ["value"],
|
|
fields: {
|
|
value: {
|
|
validate: (0, I.assertValueType)("string")
|
|
}
|
|
},
|
|
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
|
|
});
|
|
De("NumericLiteral", {
|
|
builder: ["value"],
|
|
deprecatedAlias: "NumberLiteral",
|
|
fields: {
|
|
value: {
|
|
validate: (0, I.chain)((0, I.assertValueType)("number"), Object.assign(function(e, t, r) {
|
|
if (1 / r < 0 || !Number.isFinite(r)) {
|
|
let i = new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${r}) instead.`);
|
|
}
|
|
}, {
|
|
type: "number"
|
|
}))
|
|
}
|
|
},
|
|
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
|
|
});
|
|
De("NullLiteral", {
|
|
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
|
|
});
|
|
De("BooleanLiteral", {
|
|
builder: ["value"],
|
|
fields: {
|
|
value: {
|
|
validate: (0, I.assertValueType)("boolean")
|
|
}
|
|
},
|
|
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
|
|
});
|
|
De("RegExpLiteral", {
|
|
builder: ["pattern", "flags"],
|
|
deprecatedAlias: "RegexLiteral",
|
|
aliases: ["Expression", "Pureish", "Literal"],
|
|
fields: {
|
|
pattern: {
|
|
validate: (0, I.assertValueType)("string")
|
|
},
|
|
flags: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.chain)((0, I.assertValueType)("string"), Object.assign(function(e, t, r) {
|
|
let i = /[^gimsuy]/.exec(r);
|
|
if (i)
|
|
throw new TypeError(`"${i[0]}" is not a valid RegExp flag`);
|
|
}, {
|
|
type: "string"
|
|
})) : (0, I.assertValueType)("string"),
|
|
default: ""
|
|
}
|
|
}
|
|
});
|
|
De("LogicalExpression", {
|
|
builder: ["operator", "left", "right"],
|
|
visitor: ["left", "right"],
|
|
aliases: ["Binary", "Expression"],
|
|
fields: {
|
|
operator: {
|
|
validate: (0, I.assertOneOf)(...ld.LOGICAL_OPERATORS)
|
|
},
|
|
left: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
right: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
}
|
|
}
|
|
});
|
|
De("MemberExpression", {
|
|
builder: ["object", "property", "computed", ...process.env.BABEL_TYPES_8_BREAKING ? [] : ["optional"]],
|
|
visitor: ["object", "property"],
|
|
aliases: ["Expression", "LVal"],
|
|
fields: Object.assign({
|
|
object: {
|
|
validate: (0, I.assertNodeType)("Expression", "Super")
|
|
},
|
|
property: {
|
|
validate: function() {
|
|
let e = (0, I.assertNodeType)("Identifier", "PrivateName"), t = (0, I.assertNodeType)("Expression"), r = /* @__PURE__ */ s(function(i, n, a) {
|
|
(i.computed ? t : e)(i, n, a);
|
|
}, "validator");
|
|
return r.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"], r;
|
|
}()
|
|
},
|
|
computed: {
|
|
default: !1
|
|
}
|
|
}, process.env.BABEL_TYPES_8_BREAKING ? {} : {
|
|
optional: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
}
|
|
})
|
|
});
|
|
De("NewExpression", {
|
|
inherits: "CallExpression"
|
|
});
|
|
De("Program", {
|
|
visitor: ["directives", "body"],
|
|
builder: ["body", "directives", "sourceType", "interpreter"],
|
|
fields: {
|
|
sourceType: {
|
|
validate: (0, I.assertOneOf)("script", "module"),
|
|
default: "script"
|
|
},
|
|
interpreter: {
|
|
validate: (0, I.assertNodeType)("InterpreterDirective"),
|
|
default: null,
|
|
optional: !0
|
|
},
|
|
directives: {
|
|
validate: (0, I.arrayOfType)("Directive"),
|
|
default: []
|
|
},
|
|
body: (0, I.validateArrayOfType)("Statement")
|
|
},
|
|
aliases: ["Scopable", "BlockParent", "Block"]
|
|
});
|
|
De("ObjectExpression", {
|
|
visitor: ["properties"],
|
|
aliases: ["Expression"],
|
|
fields: {
|
|
properties: (0, I.validateArrayOfType)("ObjectMethod", "ObjectProperty", "SpreadElement")
|
|
}
|
|
});
|
|
De("ObjectMethod", {
|
|
builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
|
|
visitor: ["decorators", "key", "typeParameters", "params", "returnType", "body"],
|
|
fields: Object.assign({}, Pl(), qo(), {
|
|
kind: Object.assign({
|
|
validate: (0, I.assertOneOf)("method", "get", "set")
|
|
}, process.env.BABEL_TYPES_8_BREAKING ? {} : {
|
|
default: "method"
|
|
}),
|
|
computed: {
|
|
default: !1
|
|
},
|
|
key: {
|
|
validate: function() {
|
|
let e = (0, I.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral"), t = (0, I.assertNodeType)("Expres\
|
|
sion"), r = /* @__PURE__ */ s(function(i, n, a) {
|
|
(i.computed ? t : e)(i, n, a);
|
|
}, "validator");
|
|
return r.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral"], r;
|
|
}()
|
|
},
|
|
decorators: {
|
|
validate: (0, I.arrayOfType)("Decorator"),
|
|
optional: !0
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("BlockStatement")
|
|
}
|
|
}),
|
|
aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
|
|
});
|
|
De("ObjectProperty", {
|
|
builder: ["key", "value", "computed", "shorthand", ...process.env.BABEL_TYPES_8_BREAKING ? [] : ["decorators"]],
|
|
fields: {
|
|
computed: {
|
|
default: !1
|
|
},
|
|
key: {
|
|
validate: function() {
|
|
let e = (0, I.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "DecimalLiteral", "PrivateName"), t = (0, I.
|
|
assertNodeType)("Expression");
|
|
return Object.assign(function(i, n, a) {
|
|
(i.computed ? t : e)(i, n, a);
|
|
}, {
|
|
oneOfNodeTypes: ["Expression", "Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "DecimalLiteral", "PrivateName"]
|
|
});
|
|
}()
|
|
},
|
|
value: {
|
|
validate: (0, I.assertNodeType)("Expression", "PatternLike")
|
|
},
|
|
shorthand: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.chain)((0, I.assertValueType)("boolean"), Object.assign(function(e, t, r) {
|
|
if (r) {
|
|
if (e.computed)
|
|
throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
|
|
if (!(0, di.default)("Identifier", e.key))
|
|
throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
|
|
}
|
|
}, {
|
|
type: "boolean"
|
|
})) : (0, I.assertValueType)("boolean"),
|
|
default: !1
|
|
},
|
|
decorators: {
|
|
validate: (0, I.arrayOfType)("Decorator"),
|
|
optional: !0
|
|
}
|
|
},
|
|
visitor: ["key", "value", "decorators"],
|
|
aliases: ["UserWhitespacable", "Property", "ObjectMember"],
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? function() {
|
|
let e = (0, I.assertNodeType)("Identifier", "Pattern", "TSAsExpression", "TSSatisfiesExpression", "TSNonNullExpression", "TSTypeAssert\
|
|
ion"), t = (0, I.assertNodeType)("Expression");
|
|
return function(r, i, n) {
|
|
((0, di.default)("ObjectPattern", r) ? e : t)(n, "value", n.value);
|
|
};
|
|
}() : void 0
|
|
});
|
|
De("RestElement", {
|
|
visitor: ["argument", "typeAnnotation"],
|
|
builder: ["argument"],
|
|
aliases: ["LVal", "PatternLike"],
|
|
deprecatedAlias: "RestProperty",
|
|
fields: Object.assign({}, Fl(), {
|
|
argument: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern", "MemberExpressio\
|
|
n", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression") : (0, I.assertNodeType)("LVal")
|
|
}
|
|
}),
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? function(e, t) {
|
|
let r = /(\w+)\[(\d+)\]/.exec(t.toString());
|
|
if (!r) throw new Error("Internal Babel error: malformed key.");
|
|
let [, i, n] = r;
|
|
if (e[i].length > +n + 1)
|
|
throw new TypeError(`RestElement must be last element of ${i}`);
|
|
} : void 0
|
|
});
|
|
De("ReturnStatement", {
|
|
visitor: ["argument"],
|
|
aliases: ["Statement", "Terminatorless", "CompletionStatement"],
|
|
fields: {
|
|
argument: {
|
|
validate: (0, I.assertNodeType)("Expression"),
|
|
optional: !0
|
|
}
|
|
}
|
|
});
|
|
De("SequenceExpression", {
|
|
visitor: ["expressions"],
|
|
fields: {
|
|
expressions: (0, I.validateArrayOfType)("Expression")
|
|
},
|
|
aliases: ["Expression"]
|
|
});
|
|
De("ParenthesizedExpression", {
|
|
visitor: ["expression"],
|
|
aliases: ["Expression", "ExpressionWrapper"],
|
|
fields: {
|
|
expression: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
}
|
|
}
|
|
});
|
|
De("SwitchCase", {
|
|
visitor: ["test", "consequent"],
|
|
fields: {
|
|
test: {
|
|
validate: (0, I.assertNodeType)("Expression"),
|
|
optional: !0
|
|
},
|
|
consequent: (0, I.validateArrayOfType)("Statement")
|
|
}
|
|
});
|
|
De("SwitchStatement", {
|
|
visitor: ["discriminant", "cases"],
|
|
aliases: ["Statement", "BlockParent", "Scopable"],
|
|
fields: {
|
|
discriminant: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
cases: (0, I.validateArrayOfType)("SwitchCase")
|
|
}
|
|
});
|
|
De("ThisExpression", {
|
|
aliases: ["Expression"]
|
|
});
|
|
De("ThrowStatement", {
|
|
visitor: ["argument"],
|
|
aliases: ["Statement", "Terminatorless", "CompletionStatement"],
|
|
fields: {
|
|
argument: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
}
|
|
}
|
|
});
|
|
De("TryStatement", {
|
|
visitor: ["block", "handler", "finalizer"],
|
|
aliases: ["Statement"],
|
|
fields: {
|
|
block: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.chain)((0, I.assertNodeType)("BlockStatement"), Object.assign(function(e) {
|
|
if (!e.handler && !e.finalizer)
|
|
throw new TypeError("TryStatement expects either a handler or finalizer, or both");
|
|
}, {
|
|
oneOfNodeTypes: ["BlockStatement"]
|
|
})) : (0, I.assertNodeType)("BlockStatement")
|
|
},
|
|
handler: {
|
|
optional: !0,
|
|
validate: (0, I.assertNodeType)("CatchClause")
|
|
},
|
|
finalizer: {
|
|
optional: !0,
|
|
validate: (0, I.assertNodeType)("BlockStatement")
|
|
}
|
|
}
|
|
});
|
|
De("UnaryExpression", {
|
|
builder: ["operator", "argument", "prefix"],
|
|
fields: {
|
|
prefix: {
|
|
default: !0
|
|
},
|
|
argument: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
operator: {
|
|
validate: (0, I.assertOneOf)(...ld.UNARY_OPERATORS)
|
|
}
|
|
},
|
|
visitor: ["argument"],
|
|
aliases: ["UnaryLike", "Expression"]
|
|
});
|
|
De("UpdateExpression", {
|
|
builder: ["operator", "argument", "prefix"],
|
|
fields: {
|
|
prefix: {
|
|
default: !1
|
|
},
|
|
argument: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.assertNodeType)("Identifier", "MemberExpression") : (0, I.assertNodeType)("Expr\
|
|
ession")
|
|
},
|
|
operator: {
|
|
validate: (0, I.assertOneOf)(...ld.UPDATE_OPERATORS)
|
|
}
|
|
},
|
|
visitor: ["argument"],
|
|
aliases: ["Expression"]
|
|
});
|
|
De("VariableDeclaration", {
|
|
builder: ["kind", "declarations"],
|
|
visitor: ["declarations"],
|
|
aliases: ["Statement", "Declaration"],
|
|
fields: {
|
|
declare: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
kind: {
|
|
validate: (0, I.assertOneOf)("var", "let", "const", "using", "await using")
|
|
},
|
|
declarations: (0, I.validateArrayOfType)("VariableDeclarator")
|
|
},
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (() => {
|
|
let e = (0, I.assertNodeType)("Identifier");
|
|
return function(t, r, i) {
|
|
if ((0, di.default)("ForXStatement", t, {
|
|
left: i
|
|
})) {
|
|
if (i.declarations.length !== 1)
|
|
throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${t.type}`);
|
|
} else
|
|
i.declarations.forEach((n) => {
|
|
n.init || e(n, "id", n.id);
|
|
});
|
|
};
|
|
})() : void 0
|
|
});
|
|
De("VariableDeclarator", {
|
|
visitor: ["id", "init"],
|
|
fields: {
|
|
id: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern") : (0, I.assertNodeType)(
|
|
"LVal")
|
|
},
|
|
definite: {
|
|
optional: !0,
|
|
validate: (0, I.assertValueType)("boolean")
|
|
},
|
|
init: {
|
|
optional: !0,
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
}
|
|
}
|
|
});
|
|
De("WhileStatement", {
|
|
visitor: ["test", "body"],
|
|
aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
|
|
fields: {
|
|
test: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("Statement")
|
|
}
|
|
}
|
|
});
|
|
De("WithStatement", {
|
|
visitor: ["object", "body"],
|
|
aliases: ["Statement"],
|
|
fields: {
|
|
object: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("Statement")
|
|
}
|
|
}
|
|
});
|
|
De("AssignmentPattern", {
|
|
visitor: ["left", "right", "decorators"],
|
|
builder: ["left", "right"],
|
|
aliases: ["Pattern", "PatternLike", "LVal"],
|
|
fields: Object.assign({}, Fl(), {
|
|
left: {
|
|
validate: (0, I.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression", "TSAsExpression", "TSSatisfiesExp\
|
|
ression", "TSTypeAssertion", "TSNonNullExpression")
|
|
},
|
|
right: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
decorators: {
|
|
validate: (0, I.arrayOfType)("Decorator"),
|
|
optional: !0
|
|
}
|
|
})
|
|
});
|
|
De("ArrayPattern", {
|
|
visitor: ["elements", "typeAnnotation"],
|
|
builder: ["elements"],
|
|
aliases: ["Pattern", "PatternLike", "LVal"],
|
|
fields: Object.assign({}, Fl(), {
|
|
elements: {
|
|
validate: (0, I.chain)((0, I.assertValueType)("array"), (0, I.assertEach)((0, I.assertNodeOrValueType)("null", "PatternLike", "LVal")))
|
|
}
|
|
})
|
|
});
|
|
De("ArrowFunctionExpression", {
|
|
builder: ["params", "body", "async"],
|
|
visitor: ["typeParameters", "params", "predicate", "returnType", "body"],
|
|
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
|
|
fields: Object.assign({}, Pl(), qo(), {
|
|
expression: {
|
|
validate: (0, I.assertValueType)("boolean")
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("BlockStatement", "Expression")
|
|
},
|
|
predicate: {
|
|
validate: (0, I.assertNodeType)("DeclaredPredicate", "InferredPredicate"),
|
|
optional: !0
|
|
}
|
|
})
|
|
});
|
|
De("ClassBody", {
|
|
visitor: ["body"],
|
|
fields: {
|
|
body: (0, I.validateArrayOfType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "ClassAccessorProperty",
|
|
"TSDeclareMethod", "TSIndexSignature", "StaticBlock")
|
|
}
|
|
});
|
|
De("ClassExpression", {
|
|
builder: ["id", "superClass", "body", "decorators"],
|
|
visitor: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "mixins", "implements", "body"],
|
|
aliases: ["Scopable", "Class", "Expression"],
|
|
fields: {
|
|
id: {
|
|
validate: (0, I.assertNodeType)("Identifier"),
|
|
optional: !0
|
|
},
|
|
typeParameters: {
|
|
validate: (0, I.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
|
|
optional: !0
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("ClassBody")
|
|
},
|
|
superClass: {
|
|
optional: !0,
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
superTypeParameters: {
|
|
validate: (0, I.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
optional: !0
|
|
},
|
|
implements: {
|
|
validate: (0, I.arrayOfType)("TSExpressionWithTypeArguments", "ClassImplements"),
|
|
optional: !0
|
|
},
|
|
decorators: {
|
|
validate: (0, I.arrayOfType)("Decorator"),
|
|
optional: !0
|
|
},
|
|
mixins: {
|
|
validate: (0, I.assertNodeType)("InterfaceExtends"),
|
|
optional: !0
|
|
}
|
|
}
|
|
});
|
|
De("ClassDeclaration", {
|
|
inherits: "ClassExpression",
|
|
aliases: ["Scopable", "Class", "Statement", "Declaration"],
|
|
fields: {
|
|
id: {
|
|
validate: (0, I.assertNodeType)("Identifier"),
|
|
optional: !0
|
|
},
|
|
typeParameters: {
|
|
validate: (0, I.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
|
|
optional: !0
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("ClassBody")
|
|
},
|
|
superClass: {
|
|
optional: !0,
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
superTypeParameters: {
|
|
validate: (0, I.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
optional: !0
|
|
},
|
|
implements: {
|
|
validate: (0, I.arrayOfType)("TSExpressionWithTypeArguments", "ClassImplements"),
|
|
optional: !0
|
|
},
|
|
decorators: {
|
|
validate: (0, I.arrayOfType)("Decorator"),
|
|
optional: !0
|
|
},
|
|
mixins: {
|
|
validate: (0, I.assertNodeType)("InterfaceExtends"),
|
|
optional: !0
|
|
},
|
|
declare: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
abstract: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
}
|
|
},
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? function() {
|
|
let e = (0, I.assertNodeType)("Identifier");
|
|
return function(t, r, i) {
|
|
(0, di.default)("ExportDefaultDeclaration", t) || e(i, "id", i.id);
|
|
};
|
|
}() : void 0
|
|
});
|
|
var M1 = ii.importAttributes = {
|
|
attributes: {
|
|
optional: !0,
|
|
validate: (0, I.arrayOfType)("ImportAttribute")
|
|
},
|
|
assertions: {
|
|
deprecated: !0,
|
|
optional: !0,
|
|
validate: (0, I.arrayOfType)("ImportAttribute")
|
|
}
|
|
};
|
|
De("ExportAllDeclaration", {
|
|
builder: ["source"],
|
|
visitor: ["source", "attributes", "assertions"],
|
|
aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"],
|
|
fields: Object.assign({
|
|
source: {
|
|
validate: (0, I.assertNodeType)("StringLiteral")
|
|
},
|
|
exportKind: (0, I.validateOptional)((0, I.assertOneOf)("type", "value"))
|
|
}, M1)
|
|
});
|
|
De("ExportDefaultDeclaration", {
|
|
visitor: ["declaration"],
|
|
aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"],
|
|
fields: {
|
|
declaration: (0, I.validateType)("TSDeclareFunction", "FunctionDeclaration", "ClassDeclaration", "Expression"),
|
|
exportKind: (0, I.validateOptional)((0, I.assertOneOf)("value"))
|
|
}
|
|
});
|
|
De("ExportNamedDeclaration", {
|
|
builder: ["declaration", "specifiers", "source"],
|
|
visitor: process.env ? ["declaration", "specifiers", "source", "attributes"] : ["declaration", "specifiers", "source", "attributes", "as\
|
|
sertions"],
|
|
aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"],
|
|
fields: Object.assign({
|
|
declaration: {
|
|
optional: !0,
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.chain)((0, I.assertNodeType)("Declaration"), Object.assign(function(e, t, r) {
|
|
if (r && e.specifiers.length)
|
|
throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
|
|
if (r && e.source)
|
|
throw new TypeError("Cannot export a declaration from a source");
|
|
}, {
|
|
oneOfNodeTypes: ["Declaration"]
|
|
})) : (0, I.assertNodeType)("Declaration")
|
|
}
|
|
}, M1, {
|
|
specifiers: {
|
|
default: [],
|
|
validate: (0, I.arrayOf)(function() {
|
|
let e = (0, I.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"), t = (0, I.assertNodeType)(
|
|
"ExportSpecifier");
|
|
return process.env.BABEL_TYPES_8_BREAKING ? Object.assign(function(r, i, n) {
|
|
(r.source ? e : t)(r, i, n);
|
|
}, {
|
|
oneOfNodeTypes: ["ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"]
|
|
}) : e;
|
|
}())
|
|
},
|
|
source: {
|
|
validate: (0, I.assertNodeType)("StringLiteral"),
|
|
optional: !0
|
|
},
|
|
exportKind: (0, I.validateOptional)((0, I.assertOneOf)("type", "value"))
|
|
})
|
|
});
|
|
De("ExportSpecifier", {
|
|
visitor: ["local", "exported"],
|
|
aliases: ["ModuleSpecifier"],
|
|
fields: {
|
|
local: {
|
|
validate: (0, I.assertNodeType)("Identifier")
|
|
},
|
|
exported: {
|
|
validate: (0, I.assertNodeType)("Identifier", "StringLiteral")
|
|
},
|
|
exportKind: {
|
|
validate: (0, I.assertOneOf)("type", "value"),
|
|
optional: !0
|
|
}
|
|
}
|
|
});
|
|
De("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, I.assertNodeType)("VariableDeclaration", "LVal");
|
|
let e = (0, I.assertNodeType)("VariableDeclaration"), t = (0, I.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "\
|
|
ObjectPattern", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression");
|
|
return Object.assign(function(r, i, n) {
|
|
(0, di.default)("VariableDeclaration", n) ? e(r, i, n) : t(r, i, n);
|
|
}, {
|
|
oneOfNodeTypes: ["VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern", "TSAsExpression", "TS\
|
|
SatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression"]
|
|
});
|
|
}()
|
|
},
|
|
right: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("Statement")
|
|
},
|
|
await: {
|
|
default: !1
|
|
}
|
|
}
|
|
});
|
|
De("ImportDeclaration", {
|
|
builder: ["specifiers", "source"],
|
|
visitor: ["specifiers", "source", "attributes", "assertions"],
|
|
aliases: ["Statement", "Declaration", "ImportOrExportDeclaration"],
|
|
fields: Object.assign({}, M1, {
|
|
module: {
|
|
optional: !0,
|
|
validate: (0, I.assertValueType)("boolean")
|
|
},
|
|
phase: {
|
|
default: null,
|
|
validate: (0, I.assertOneOf)("source", "defer")
|
|
},
|
|
specifiers: (0, I.validateArrayOfType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"),
|
|
source: {
|
|
validate: (0, I.assertNodeType)("StringLiteral")
|
|
},
|
|
importKind: {
|
|
validate: (0, I.assertOneOf)("type", "typeof", "value"),
|
|
optional: !0
|
|
}
|
|
})
|
|
});
|
|
De("ImportDefaultSpecifier", {
|
|
visitor: ["local"],
|
|
aliases: ["ModuleSpecifier"],
|
|
fields: {
|
|
local: {
|
|
validate: (0, I.assertNodeType)("Identifier")
|
|
}
|
|
}
|
|
});
|
|
De("ImportNamespaceSpecifier", {
|
|
visitor: ["local"],
|
|
aliases: ["ModuleSpecifier"],
|
|
fields: {
|
|
local: {
|
|
validate: (0, I.assertNodeType)("Identifier")
|
|
}
|
|
}
|
|
});
|
|
De("ImportSpecifier", {
|
|
visitor: ["imported", "local"],
|
|
builder: ["local", "imported"],
|
|
aliases: ["ModuleSpecifier"],
|
|
fields: {
|
|
local: {
|
|
validate: (0, I.assertNodeType)("Identifier")
|
|
},
|
|
imported: {
|
|
validate: (0, I.assertNodeType)("Identifier", "StringLiteral")
|
|
},
|
|
importKind: {
|
|
validate: (0, I.assertOneOf)("type", "typeof", "value"),
|
|
optional: !0
|
|
}
|
|
}
|
|
});
|
|
De("ImportExpression", {
|
|
visitor: ["source", "options"],
|
|
aliases: ["Expression"],
|
|
fields: {
|
|
phase: {
|
|
default: null,
|
|
validate: (0, I.assertOneOf)("source", "defer")
|
|
},
|
|
source: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
options: {
|
|
validate: (0, I.assertNodeType)("Expression"),
|
|
optional: !0
|
|
}
|
|
}
|
|
});
|
|
De("MetaProperty", {
|
|
visitor: ["meta", "property"],
|
|
aliases: ["Expression"],
|
|
fields: {
|
|
meta: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.chain)((0, I.assertNodeType)("Identifier"), Object.assign(function(e, t, r) {
|
|
let i;
|
|
switch (r.name) {
|
|
case "function":
|
|
i = "sent";
|
|
break;
|
|
case "new":
|
|
i = "target";
|
|
break;
|
|
case "import":
|
|
i = "meta";
|
|
break;
|
|
}
|
|
if (!(0, di.default)("Identifier", e.property, {
|
|
name: i
|
|
}))
|
|
throw new TypeError("Unrecognised MetaProperty");
|
|
}, {
|
|
oneOfNodeTypes: ["Identifier"]
|
|
})) : (0, I.assertNodeType)("Identifier")
|
|
},
|
|
property: {
|
|
validate: (0, I.assertNodeType)("Identifier")
|
|
}
|
|
}
|
|
});
|
|
var iy = /* @__PURE__ */ s(() => ({
|
|
abstract: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
accessibility: {
|
|
validate: (0, I.assertOneOf)("public", "private", "protected"),
|
|
optional: !0
|
|
},
|
|
static: {
|
|
default: !1
|
|
},
|
|
override: {
|
|
default: !1
|
|
},
|
|
computed: {
|
|
default: !1
|
|
},
|
|
optional: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
key: {
|
|
validate: (0, I.chain)(function() {
|
|
let e = (0, I.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral"), t = (0, I.assertNodeType)("Expressi\
|
|
on");
|
|
return function(r, i, n) {
|
|
(r.computed ? t : e)(r, i, n);
|
|
};
|
|
}(), (0, I.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "Expression"))
|
|
}
|
|
}), "classMethodOrPropertyCommon");
|
|
ii.classMethodOrPropertyCommon = iy;
|
|
var R1 = /* @__PURE__ */ s(() => Object.assign({}, Pl(), iy(), {
|
|
params: (0, I.validateArrayOfType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"),
|
|
kind: {
|
|
validate: (0, I.assertOneOf)("get", "set", "method", "constructor"),
|
|
default: "method"
|
|
},
|
|
access: {
|
|
validate: (0, I.chain)((0, I.assertValueType)("string"), (0, I.assertOneOf)("public", "private", "protected")),
|
|
optional: !0
|
|
},
|
|
decorators: {
|
|
validate: (0, I.arrayOfType)("Decorator"),
|
|
optional: !0
|
|
}
|
|
}), "classMethodOrDeclareMethodCommon");
|
|
ii.classMethodOrDeclareMethodCommon = R1;
|
|
De("ClassMethod", {
|
|
aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
|
|
builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
|
|
visitor: ["decorators", "key", "typeParameters", "params", "returnType", "body"],
|
|
fields: Object.assign({}, R1(), qo(), {
|
|
body: {
|
|
validate: (0, I.assertNodeType)("BlockStatement")
|
|
}
|
|
})
|
|
});
|
|
De("ObjectPattern", {
|
|
visitor: ["properties", "typeAnnotation", "decorators"],
|
|
builder: ["properties"],
|
|
aliases: ["Pattern", "PatternLike", "LVal"],
|
|
fields: Object.assign({}, Fl(), {
|
|
properties: (0, I.validateArrayOfType)("RestElement", "ObjectProperty")
|
|
})
|
|
});
|
|
De("SpreadElement", {
|
|
visitor: ["argument"],
|
|
aliases: ["UnaryLike"],
|
|
deprecatedAlias: "SpreadProperty",
|
|
fields: {
|
|
argument: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
}
|
|
}
|
|
});
|
|
De("Super", {
|
|
aliases: ["Expression"]
|
|
});
|
|
De("TaggedTemplateExpression", {
|
|
visitor: ["tag", "typeParameters", "quasi"],
|
|
builder: ["tag", "quasi"],
|
|
aliases: ["Expression"],
|
|
fields: {
|
|
tag: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
quasi: {
|
|
validate: (0, I.assertNodeType)("TemplateLiteral")
|
|
},
|
|
typeParameters: {
|
|
validate: (0, I.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
optional: !0
|
|
}
|
|
}
|
|
});
|
|
De("TemplateElement", {
|
|
builder: ["value", "tail"],
|
|
fields: {
|
|
value: {
|
|
validate: (0, I.chain)((0, I.assertShape)({
|
|
raw: {
|
|
validate: (0, I.assertValueType)("string")
|
|
},
|
|
cooked: {
|
|
validate: (0, I.assertValueType)("string"),
|
|
optional: !0
|
|
}
|
|
}), /* @__PURE__ */ s(function(t) {
|
|
let r = t.value.raw, i = !1, n = /* @__PURE__ */ s(() => {
|
|
throw new Error("Internal @babel/types error.");
|
|
}, "error"), {
|
|
str: a,
|
|
firstInvalidLoc: o
|
|
} = (0, p0e.readStringContents)("template", r, 0, 0, 0, {
|
|
unterminated() {
|
|
i = !0;
|
|
},
|
|
strictNumericEscape: n,
|
|
invalidEscapeSequence: n,
|
|
numericSeparatorInEscapeSequence: n,
|
|
unexpectedNumericSeparator: n,
|
|
invalidDigit: n,
|
|
invalidCodePoint: n
|
|
});
|
|
if (!i) throw new Error("Invalid raw");
|
|
t.value.cooked = o ? null : a;
|
|
}, "templateElementCookedValidator"))
|
|
},
|
|
tail: {
|
|
default: !1
|
|
}
|
|
}
|
|
});
|
|
De("TemplateLiteral", {
|
|
visitor: ["quasis", "expressions"],
|
|
aliases: ["Expression", "Literal"],
|
|
fields: {
|
|
quasis: (0, I.validateArrayOfType)("TemplateElement"),
|
|
expressions: {
|
|
validate: (0, I.chain)((0, I.assertValueType)("array"), (0, I.assertEach)((0, I.assertNodeType)("Expression", "TSType")), function(e, t, r) {
|
|
if (e.quasis.length !== r.length + 1)
|
|
throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of expressions.
|
|
Expected ${r.length + 1} quasis but got ${e.quasis.length}`);
|
|
})
|
|
}
|
|
}
|
|
});
|
|
De("YieldExpression", {
|
|
builder: ["argument", "delegate"],
|
|
visitor: ["argument"],
|
|
aliases: ["Expression", "Terminatorless"],
|
|
fields: {
|
|
delegate: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.chain)((0, I.assertValueType)("boolean"), Object.assign(function(e, t, r) {
|
|
if (r && !e.argument)
|
|
throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
|
|
}, {
|
|
type: "boolean"
|
|
})) : (0, I.assertValueType)("boolean"),
|
|
default: !1
|
|
},
|
|
argument: {
|
|
optional: !0,
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
}
|
|
}
|
|
});
|
|
De("AwaitExpression", {
|
|
builder: ["argument"],
|
|
visitor: ["argument"],
|
|
aliases: ["Expression", "Terminatorless"],
|
|
fields: {
|
|
argument: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
}
|
|
}
|
|
});
|
|
De("Import", {
|
|
aliases: ["Expression"]
|
|
});
|
|
De("BigIntLiteral", {
|
|
builder: ["value"],
|
|
fields: {
|
|
value: {
|
|
validate: (0, I.assertValueType)("string")
|
|
}
|
|
},
|
|
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
|
|
});
|
|
De("ExportNamespaceSpecifier", {
|
|
visitor: ["exported"],
|
|
aliases: ["ModuleSpecifier"],
|
|
fields: {
|
|
exported: {
|
|
validate: (0, I.assertNodeType)("Identifier")
|
|
}
|
|
}
|
|
});
|
|
De("OptionalMemberExpression", {
|
|
builder: ["object", "property", "computed", "optional"],
|
|
visitor: ["object", "property"],
|
|
aliases: ["Expression"],
|
|
fields: {
|
|
object: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
property: {
|
|
validate: function() {
|
|
let e = (0, I.assertNodeType)("Identifier"), t = (0, I.assertNodeType)("Expression");
|
|
return Object.assign(function(i, n, a) {
|
|
(i.computed ? t : e)(i, n, a);
|
|
}, {
|
|
oneOfNodeTypes: ["Expression", "Identifier"]
|
|
});
|
|
}()
|
|
},
|
|
computed: {
|
|
default: !1
|
|
},
|
|
optional: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.chain)((0, I.assertValueType)("boolean"), (0, I.assertOptionalChainStart)()) : (0, I.
|
|
assertValueType)("boolean")
|
|
}
|
|
}
|
|
});
|
|
De("OptionalCallExpression", {
|
|
visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
|
|
builder: ["callee", "arguments", "optional"],
|
|
aliases: ["Expression"],
|
|
fields: Object.assign({
|
|
callee: {
|
|
validate: (0, I.assertNodeType)("Expression")
|
|
},
|
|
arguments: (0, I.validateArrayOfType)("Expression", "SpreadElement", "ArgumentPlaceholder"),
|
|
optional: {
|
|
validate: process.env.BABEL_TYPES_8_BREAKING ? (0, I.chain)((0, I.assertValueType)("boolean"), (0, I.assertOptionalChainStart)()) : (0, I.
|
|
assertValueType)("boolean")
|
|
},
|
|
typeArguments: {
|
|
validate: (0, I.assertNodeType)("TypeParameterInstantiation"),
|
|
optional: !0
|
|
}
|
|
}, {
|
|
typeParameters: {
|
|
validate: (0, I.assertNodeType)("TSTypeParameterInstantiation"),
|
|
optional: !0
|
|
}
|
|
})
|
|
});
|
|
De("ClassProperty", {
|
|
visitor: ["decorators", "variance", "key", "typeAnnotation", "value"],
|
|
builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
|
|
aliases: ["Property"],
|
|
fields: Object.assign({}, iy(), {
|
|
value: {
|
|
validate: (0, I.assertNodeType)("Expression"),
|
|
optional: !0
|
|
},
|
|
definite: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
typeAnnotation: {
|
|
validate: (0, I.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
|
|
optional: !0
|
|
},
|
|
decorators: {
|
|
validate: (0, I.arrayOfType)("Decorator"),
|
|
optional: !0
|
|
},
|
|
readonly: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
declare: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
variance: {
|
|
validate: (0, I.assertNodeType)("Variance"),
|
|
optional: !0
|
|
}
|
|
})
|
|
});
|
|
De("ClassAccessorProperty", {
|
|
visitor: ["decorators", "key", "typeAnnotation", "value"],
|
|
builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
|
|
aliases: ["Property", "Accessor"],
|
|
fields: Object.assign({}, iy(), {
|
|
key: {
|
|
validate: (0, I.chain)(function() {
|
|
let e = (0, I.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "PrivateName"), t = (0, I.assertNodeType)(
|
|
"Expression");
|
|
return function(r, i, n) {
|
|
(r.computed ? t : e)(r, i, n);
|
|
};
|
|
}(), (0, I.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "Expression", "PrivateName"))
|
|
},
|
|
value: {
|
|
validate: (0, I.assertNodeType)("Expression"),
|
|
optional: !0
|
|
},
|
|
definite: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
typeAnnotation: {
|
|
validate: (0, I.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
|
|
optional: !0
|
|
},
|
|
decorators: {
|
|
validate: (0, I.arrayOfType)("Decorator"),
|
|
optional: !0
|
|
},
|
|
readonly: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
declare: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
variance: {
|
|
validate: (0, I.assertNodeType)("Variance"),
|
|
optional: !0
|
|
}
|
|
})
|
|
});
|
|
De("ClassPrivateProperty", {
|
|
visitor: ["decorators", "variance", "key", "typeAnnotation", "value"],
|
|
builder: ["key", "value", "decorators", "static"],
|
|
aliases: ["Property", "Private"],
|
|
fields: {
|
|
key: {
|
|
validate: (0, I.assertNodeType)("PrivateName")
|
|
},
|
|
value: {
|
|
validate: (0, I.assertNodeType)("Expression"),
|
|
optional: !0
|
|
},
|
|
typeAnnotation: {
|
|
validate: (0, I.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
|
|
optional: !0
|
|
},
|
|
decorators: {
|
|
validate: (0, I.arrayOfType)("Decorator"),
|
|
optional: !0
|
|
},
|
|
static: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
default: !1
|
|
},
|
|
readonly: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
optional: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
definite: {
|
|
validate: (0, I.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
variance: {
|
|
validate: (0, I.assertNodeType)("Variance"),
|
|
optional: !0
|
|
}
|
|
}
|
|
});
|
|
De("ClassPrivateMethod", {
|
|
builder: ["kind", "key", "params", "body", "static"],
|
|
visitor: ["decorators", "key", "typeParameters", "params", "returnType", "body"],
|
|
aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
|
|
fields: Object.assign({}, R1(), qo(), {
|
|
kind: {
|
|
validate: (0, I.assertOneOf)("get", "set", "method"),
|
|
default: "method"
|
|
},
|
|
key: {
|
|
validate: (0, I.assertNodeType)("PrivateName")
|
|
},
|
|
body: {
|
|
validate: (0, I.assertNodeType)("BlockStatement")
|
|
}
|
|
})
|
|
});
|
|
De("PrivateName", {
|
|
visitor: ["id"],
|
|
aliases: ["Private"],
|
|
fields: {
|
|
id: {
|
|
validate: (0, I.assertNodeType)("Identifier")
|
|
}
|
|
}
|
|
});
|
|
De("StaticBlock", {
|
|
visitor: ["body"],
|
|
fields: {
|
|
body: (0, I.validateArrayOfType)("Statement")
|
|
},
|
|
aliases: ["Scopable", "BlockParent", "FunctionParent"]
|
|
});
|
|
De("ImportAttribute", {
|
|
visitor: ["key", "value"],
|
|
fields: {
|
|
key: {
|
|
validate: (0, I.assertNodeType)("Identifier", "StringLiteral")
|
|
},
|
|
value: {
|
|
validate: (0, I.assertNodeType)("StringLiteral")
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/definitions/flow.js
|
|
var xj = E(() => {
|
|
"use strict";
|
|
var Ej = cd(), G = Zn(), Ie = (0, G.defineAliasedType)("Flow"), j1 = /* @__PURE__ */ s((e) => {
|
|
let t = e === "DeclareClass";
|
|
Ie(e, {
|
|
builder: ["id", "typeParameters", "extends", "body"],
|
|
visitor: ["id", "typeParameters", "extends", ...t ? ["mixins", "implements"] : [], "body"],
|
|
aliases: ["FlowDeclaration", "Statement", "Declaration"],
|
|
fields: Object.assign({
|
|
id: (0, G.validateType)("Identifier"),
|
|
typeParameters: (0, G.validateOptionalType)("TypeParameterDeclaration"),
|
|
extends: (0, G.validateOptional)((0, G.arrayOfType)("InterfaceExtends"))
|
|
}, t ? {
|
|
mixins: (0, G.validateOptional)((0, G.arrayOfType)("InterfaceExtends")),
|
|
implements: (0, G.validateOptional)((0, G.arrayOfType)("ClassImplements"))
|
|
} : {}, {
|
|
body: (0, G.validateType)("ObjectTypeAnnotation")
|
|
})
|
|
});
|
|
}, "defineInterfaceishType");
|
|
Ie("AnyTypeAnnotation", {
|
|
aliases: ["FlowType", "FlowBaseAnnotation"]
|
|
});
|
|
Ie("ArrayTypeAnnotation", {
|
|
visitor: ["elementType"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
elementType: (0, G.validateType)("FlowType")
|
|
}
|
|
});
|
|
Ie("BooleanTypeAnnotation", {
|
|
aliases: ["FlowType", "FlowBaseAnnotation"]
|
|
});
|
|
Ie("BooleanLiteralTypeAnnotation", {
|
|
builder: ["value"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
value: (0, G.validate)((0, G.assertValueType)("boolean"))
|
|
}
|
|
});
|
|
Ie("NullLiteralTypeAnnotation", {
|
|
aliases: ["FlowType", "FlowBaseAnnotation"]
|
|
});
|
|
Ie("ClassImplements", {
|
|
visitor: ["id", "typeParameters"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier"),
|
|
typeParameters: (0, G.validateOptionalType)("TypeParameterInstantiation")
|
|
}
|
|
});
|
|
j1("DeclareClass");
|
|
Ie("DeclareFunction", {
|
|
builder: ["id"],
|
|
visitor: ["id", "predicate"],
|
|
aliases: ["FlowDeclaration", "Statement", "Declaration"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier"),
|
|
predicate: (0, G.validateOptionalType)("DeclaredPredicate")
|
|
}
|
|
});
|
|
j1("DeclareInterface");
|
|
Ie("DeclareModule", {
|
|
builder: ["id", "body", "kind"],
|
|
visitor: ["id", "body"],
|
|
aliases: ["FlowDeclaration", "Statement", "Declaration"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier", "StringLiteral"),
|
|
body: (0, G.validateType)("BlockStatement"),
|
|
kind: (0, G.validateOptional)((0, G.assertOneOf)("CommonJS", "ES"))
|
|
}
|
|
});
|
|
Ie("DeclareModuleExports", {
|
|
visitor: ["typeAnnotation"],
|
|
aliases: ["FlowDeclaration", "Statement", "Declaration"],
|
|
fields: {
|
|
typeAnnotation: (0, G.validateType)("TypeAnnotation")
|
|
}
|
|
});
|
|
Ie("DeclareTypeAlias", {
|
|
visitor: ["id", "typeParameters", "right"],
|
|
aliases: ["FlowDeclaration", "Statement", "Declaration"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier"),
|
|
typeParameters: (0, G.validateOptionalType)("TypeParameterDeclaration"),
|
|
right: (0, G.validateType)("FlowType")
|
|
}
|
|
});
|
|
Ie("DeclareOpaqueType", {
|
|
visitor: ["id", "typeParameters", "supertype"],
|
|
aliases: ["FlowDeclaration", "Statement", "Declaration"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier"),
|
|
typeParameters: (0, G.validateOptionalType)("TypeParameterDeclaration"),
|
|
supertype: (0, G.validateOptionalType)("FlowType"),
|
|
impltype: (0, G.validateOptionalType)("FlowType")
|
|
}
|
|
});
|
|
Ie("DeclareVariable", {
|
|
visitor: ["id"],
|
|
aliases: ["FlowDeclaration", "Statement", "Declaration"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier")
|
|
}
|
|
});
|
|
Ie("DeclareExportDeclaration", {
|
|
visitor: ["declaration", "specifiers", "source", "attributes"],
|
|
aliases: ["FlowDeclaration", "Statement", "Declaration"],
|
|
fields: Object.assign({
|
|
declaration: (0, G.validateOptionalType)("Flow"),
|
|
specifiers: (0, G.validateOptional)((0, G.arrayOfType)("ExportSpecifier", "ExportNamespaceSpecifier")),
|
|
source: (0, G.validateOptionalType)("StringLiteral"),
|
|
default: (0, G.validateOptional)((0, G.assertValueType)("boolean"))
|
|
}, Ej.importAttributes)
|
|
});
|
|
Ie("DeclareExportAllDeclaration", {
|
|
visitor: ["source", "attributes"],
|
|
aliases: ["FlowDeclaration", "Statement", "Declaration"],
|
|
fields: Object.assign({
|
|
source: (0, G.validateType)("StringLiteral"),
|
|
exportKind: (0, G.validateOptional)((0, G.assertOneOf)("type", "value"))
|
|
}, Ej.importAttributes)
|
|
});
|
|
Ie("DeclaredPredicate", {
|
|
visitor: ["value"],
|
|
aliases: ["FlowPredicate"],
|
|
fields: {
|
|
value: (0, G.validateType)("Flow")
|
|
}
|
|
});
|
|
Ie("ExistsTypeAnnotation", {
|
|
aliases: ["FlowType"]
|
|
});
|
|
Ie("FunctionTypeAnnotation", {
|
|
builder: ["typeParameters", "params", "rest", "returnType"],
|
|
visitor: ["typeParameters", "this", "params", "rest", "returnType"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
typeParameters: (0, G.validateOptionalType)("TypeParameterDeclaration"),
|
|
params: (0, G.validateArrayOfType)("FunctionTypeParam"),
|
|
rest: (0, G.validateOptionalType)("FunctionTypeParam"),
|
|
this: (0, G.validateOptionalType)("FunctionTypeParam"),
|
|
returnType: (0, G.validateType)("FlowType")
|
|
}
|
|
});
|
|
Ie("FunctionTypeParam", {
|
|
visitor: ["name", "typeAnnotation"],
|
|
fields: {
|
|
name: (0, G.validateOptionalType)("Identifier"),
|
|
typeAnnotation: (0, G.validateType)("FlowType"),
|
|
optional: (0, G.validateOptional)((0, G.assertValueType)("boolean"))
|
|
}
|
|
});
|
|
Ie("GenericTypeAnnotation", {
|
|
visitor: ["id", "typeParameters"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier", "QualifiedTypeIdentifier"),
|
|
typeParameters: (0, G.validateOptionalType)("TypeParameterInstantiation")
|
|
}
|
|
});
|
|
Ie("InferredPredicate", {
|
|
aliases: ["FlowPredicate"]
|
|
});
|
|
Ie("InterfaceExtends", {
|
|
visitor: ["id", "typeParameters"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier", "QualifiedTypeIdentifier"),
|
|
typeParameters: (0, G.validateOptionalType)("TypeParameterInstantiation")
|
|
}
|
|
});
|
|
j1("InterfaceDeclaration");
|
|
Ie("InterfaceTypeAnnotation", {
|
|
visitor: ["extends", "body"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
extends: (0, G.validateOptional)((0, G.arrayOfType)("InterfaceExtends")),
|
|
body: (0, G.validateType)("ObjectTypeAnnotation")
|
|
}
|
|
});
|
|
Ie("IntersectionTypeAnnotation", {
|
|
visitor: ["types"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
types: (0, G.validate)((0, G.arrayOfType)("FlowType"))
|
|
}
|
|
});
|
|
Ie("MixedTypeAnnotation", {
|
|
aliases: ["FlowType", "FlowBaseAnnotation"]
|
|
});
|
|
Ie("EmptyTypeAnnotation", {
|
|
aliases: ["FlowType", "FlowBaseAnnotation"]
|
|
});
|
|
Ie("NullableTypeAnnotation", {
|
|
visitor: ["typeAnnotation"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
typeAnnotation: (0, G.validateType)("FlowType")
|
|
}
|
|
});
|
|
Ie("NumberLiteralTypeAnnotation", {
|
|
builder: ["value"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
value: (0, G.validate)((0, G.assertValueType)("number"))
|
|
}
|
|
});
|
|
Ie("NumberTypeAnnotation", {
|
|
aliases: ["FlowType", "FlowBaseAnnotation"]
|
|
});
|
|
Ie("ObjectTypeAnnotation", {
|
|
visitor: ["properties", "indexers", "callProperties", "internalSlots"],
|
|
aliases: ["FlowType"],
|
|
builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
|
|
fields: {
|
|
properties: (0, G.validate)((0, G.arrayOfType)("ObjectTypeProperty", "ObjectTypeSpreadProperty")),
|
|
indexers: {
|
|
validate: (0, G.arrayOfType)("ObjectTypeIndexer"),
|
|
optional: !0,
|
|
default: []
|
|
},
|
|
callProperties: {
|
|
validate: (0, G.arrayOfType)("ObjectTypeCallProperty"),
|
|
optional: !0,
|
|
default: []
|
|
},
|
|
internalSlots: {
|
|
validate: (0, G.arrayOfType)("ObjectTypeInternalSlot"),
|
|
optional: !0,
|
|
default: []
|
|
},
|
|
exact: {
|
|
validate: (0, G.assertValueType)("boolean"),
|
|
default: !1
|
|
},
|
|
inexact: (0, G.validateOptional)((0, G.assertValueType)("boolean"))
|
|
}
|
|
});
|
|
Ie("ObjectTypeInternalSlot", {
|
|
visitor: ["id", "value"],
|
|
builder: ["id", "value", "optional", "static", "method"],
|
|
aliases: ["UserWhitespacable"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier"),
|
|
value: (0, G.validateType)("FlowType"),
|
|
optional: (0, G.validate)((0, G.assertValueType)("boolean")),
|
|
static: (0, G.validate)((0, G.assertValueType)("boolean")),
|
|
method: (0, G.validate)((0, G.assertValueType)("boolean"))
|
|
}
|
|
});
|
|
Ie("ObjectTypeCallProperty", {
|
|
visitor: ["value"],
|
|
aliases: ["UserWhitespacable"],
|
|
fields: {
|
|
value: (0, G.validateType)("FlowType"),
|
|
static: (0, G.validate)((0, G.assertValueType)("boolean"))
|
|
}
|
|
});
|
|
Ie("ObjectTypeIndexer", {
|
|
visitor: ["variance", "id", "key", "value"],
|
|
builder: ["id", "key", "value", "variance"],
|
|
aliases: ["UserWhitespacable"],
|
|
fields: {
|
|
id: (0, G.validateOptionalType)("Identifier"),
|
|
key: (0, G.validateType)("FlowType"),
|
|
value: (0, G.validateType)("FlowType"),
|
|
static: (0, G.validate)((0, G.assertValueType)("boolean")),
|
|
variance: (0, G.validateOptionalType)("Variance")
|
|
}
|
|
});
|
|
Ie("ObjectTypeProperty", {
|
|
visitor: ["key", "value", "variance"],
|
|
aliases: ["UserWhitespacable"],
|
|
fields: {
|
|
key: (0, G.validateType)("Identifier", "StringLiteral"),
|
|
value: (0, G.validateType)("FlowType"),
|
|
kind: (0, G.validate)((0, G.assertOneOf)("init", "get", "set")),
|
|
static: (0, G.validate)((0, G.assertValueType)("boolean")),
|
|
proto: (0, G.validate)((0, G.assertValueType)("boolean")),
|
|
optional: (0, G.validate)((0, G.assertValueType)("boolean")),
|
|
variance: (0, G.validateOptionalType)("Variance"),
|
|
method: (0, G.validate)((0, G.assertValueType)("boolean"))
|
|
}
|
|
});
|
|
Ie("ObjectTypeSpreadProperty", {
|
|
visitor: ["argument"],
|
|
aliases: ["UserWhitespacable"],
|
|
fields: {
|
|
argument: (0, G.validateType)("FlowType")
|
|
}
|
|
});
|
|
Ie("OpaqueType", {
|
|
visitor: ["id", "typeParameters", "supertype", "impltype"],
|
|
aliases: ["FlowDeclaration", "Statement", "Declaration"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier"),
|
|
typeParameters: (0, G.validateOptionalType)("TypeParameterDeclaration"),
|
|
supertype: (0, G.validateOptionalType)("FlowType"),
|
|
impltype: (0, G.validateType)("FlowType")
|
|
}
|
|
});
|
|
Ie("QualifiedTypeIdentifier", {
|
|
visitor: ["qualification", "id"],
|
|
builder: ["id", "qualification"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier"),
|
|
qualification: (0, G.validateType)("Identifier", "QualifiedTypeIdentifier")
|
|
}
|
|
});
|
|
Ie("StringLiteralTypeAnnotation", {
|
|
builder: ["value"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
value: (0, G.validate)((0, G.assertValueType)("string"))
|
|
}
|
|
});
|
|
Ie("StringTypeAnnotation", {
|
|
aliases: ["FlowType", "FlowBaseAnnotation"]
|
|
});
|
|
Ie("SymbolTypeAnnotation", {
|
|
aliases: ["FlowType", "FlowBaseAnnotation"]
|
|
});
|
|
Ie("ThisTypeAnnotation", {
|
|
aliases: ["FlowType", "FlowBaseAnnotation"]
|
|
});
|
|
Ie("TupleTypeAnnotation", {
|
|
visitor: ["types"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
types: (0, G.validate)((0, G.arrayOfType)("FlowType"))
|
|
}
|
|
});
|
|
Ie("TypeofTypeAnnotation", {
|
|
visitor: ["argument"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
argument: (0, G.validateType)("FlowType")
|
|
}
|
|
});
|
|
Ie("TypeAlias", {
|
|
visitor: ["id", "typeParameters", "right"],
|
|
aliases: ["FlowDeclaration", "Statement", "Declaration"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier"),
|
|
typeParameters: (0, G.validateOptionalType)("TypeParameterDeclaration"),
|
|
right: (0, G.validateType)("FlowType")
|
|
}
|
|
});
|
|
Ie("TypeAnnotation", {
|
|
visitor: ["typeAnnotation"],
|
|
fields: {
|
|
typeAnnotation: (0, G.validateType)("FlowType")
|
|
}
|
|
});
|
|
Ie("TypeCastExpression", {
|
|
visitor: ["expression", "typeAnnotation"],
|
|
aliases: ["ExpressionWrapper", "Expression"],
|
|
fields: {
|
|
expression: (0, G.validateType)("Expression"),
|
|
typeAnnotation: (0, G.validateType)("TypeAnnotation")
|
|
}
|
|
});
|
|
Ie("TypeParameter", {
|
|
visitor: ["bound", "default", "variance"],
|
|
fields: {
|
|
name: (0, G.validate)((0, G.assertValueType)("string")),
|
|
bound: (0, G.validateOptionalType)("TypeAnnotation"),
|
|
default: (0, G.validateOptionalType)("FlowType"),
|
|
variance: (0, G.validateOptionalType)("Variance")
|
|
}
|
|
});
|
|
Ie("TypeParameterDeclaration", {
|
|
visitor: ["params"],
|
|
fields: {
|
|
params: (0, G.validate)((0, G.arrayOfType)("TypeParameter"))
|
|
}
|
|
});
|
|
Ie("TypeParameterInstantiation", {
|
|
visitor: ["params"],
|
|
fields: {
|
|
params: (0, G.validate)((0, G.arrayOfType)("FlowType"))
|
|
}
|
|
});
|
|
Ie("UnionTypeAnnotation", {
|
|
visitor: ["types"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
types: (0, G.validate)((0, G.arrayOfType)("FlowType"))
|
|
}
|
|
});
|
|
Ie("Variance", {
|
|
builder: ["kind"],
|
|
fields: {
|
|
kind: (0, G.validate)((0, G.assertOneOf)("minus", "plus"))
|
|
}
|
|
});
|
|
Ie("VoidTypeAnnotation", {
|
|
aliases: ["FlowType", "FlowBaseAnnotation"]
|
|
});
|
|
Ie("EnumDeclaration", {
|
|
aliases: ["Statement", "Declaration"],
|
|
visitor: ["id", "body"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier"),
|
|
body: (0, G.validateType)("EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody")
|
|
}
|
|
});
|
|
Ie("EnumBooleanBody", {
|
|
aliases: ["EnumBody"],
|
|
visitor: ["members"],
|
|
fields: {
|
|
explicitType: (0, G.validate)((0, G.assertValueType)("boolean")),
|
|
members: (0, G.validateArrayOfType)("EnumBooleanMember"),
|
|
hasUnknownMembers: (0, G.validate)((0, G.assertValueType)("boolean"))
|
|
}
|
|
});
|
|
Ie("EnumNumberBody", {
|
|
aliases: ["EnumBody"],
|
|
visitor: ["members"],
|
|
fields: {
|
|
explicitType: (0, G.validate)((0, G.assertValueType)("boolean")),
|
|
members: (0, G.validateArrayOfType)("EnumNumberMember"),
|
|
hasUnknownMembers: (0, G.validate)((0, G.assertValueType)("boolean"))
|
|
}
|
|
});
|
|
Ie("EnumStringBody", {
|
|
aliases: ["EnumBody"],
|
|
visitor: ["members"],
|
|
fields: {
|
|
explicitType: (0, G.validate)((0, G.assertValueType)("boolean")),
|
|
members: (0, G.validateArrayOfType)("EnumStringMember", "EnumDefaultedMember"),
|
|
hasUnknownMembers: (0, G.validate)((0, G.assertValueType)("boolean"))
|
|
}
|
|
});
|
|
Ie("EnumSymbolBody", {
|
|
aliases: ["EnumBody"],
|
|
visitor: ["members"],
|
|
fields: {
|
|
members: (0, G.validateArrayOfType)("EnumDefaultedMember"),
|
|
hasUnknownMembers: (0, G.validate)((0, G.assertValueType)("boolean"))
|
|
}
|
|
});
|
|
Ie("EnumBooleanMember", {
|
|
aliases: ["EnumMember"],
|
|
builder: ["id"],
|
|
visitor: ["id", "init"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier"),
|
|
init: (0, G.validateType)("BooleanLiteral")
|
|
}
|
|
});
|
|
Ie("EnumNumberMember", {
|
|
aliases: ["EnumMember"],
|
|
visitor: ["id", "init"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier"),
|
|
init: (0, G.validateType)("NumericLiteral")
|
|
}
|
|
});
|
|
Ie("EnumStringMember", {
|
|
aliases: ["EnumMember"],
|
|
visitor: ["id", "init"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier"),
|
|
init: (0, G.validateType)("StringLiteral")
|
|
}
|
|
});
|
|
Ie("EnumDefaultedMember", {
|
|
aliases: ["EnumMember"],
|
|
visitor: ["id"],
|
|
fields: {
|
|
id: (0, G.validateType)("Identifier")
|
|
}
|
|
});
|
|
Ie("IndexedAccessType", {
|
|
visitor: ["objectType", "indexType"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
objectType: (0, G.validateType)("FlowType"),
|
|
indexType: (0, G.validateType)("FlowType")
|
|
}
|
|
});
|
|
Ie("OptionalIndexedAccessType", {
|
|
visitor: ["objectType", "indexType"],
|
|
aliases: ["FlowType"],
|
|
fields: {
|
|
objectType: (0, G.validateType)("FlowType"),
|
|
indexType: (0, G.validateType)("FlowType"),
|
|
optional: (0, G.validate)((0, G.assertValueType)("boolean"))
|
|
}
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/definitions/jsx.js
|
|
var Sj = E(() => {
|
|
"use strict";
|
|
var rr = Zn(), pi = (0, rr.defineAliasedType)("JSX");
|
|
pi("JSXAttribute", {
|
|
visitor: ["name", "value"],
|
|
aliases: ["Immutable"],
|
|
fields: {
|
|
name: {
|
|
validate: (0, rr.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
|
|
},
|
|
value: {
|
|
optional: !0,
|
|
validate: (0, rr.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
|
|
}
|
|
}
|
|
});
|
|
pi("JSXClosingElement", {
|
|
visitor: ["name"],
|
|
aliases: ["Immutable"],
|
|
fields: {
|
|
name: {
|
|
validate: (0, rr.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
|
|
}
|
|
}
|
|
});
|
|
pi("JSXElement", {
|
|
builder: ["openingElement", "closingElement", "children", "selfClosing"],
|
|
visitor: ["openingElement", "children", "closingElement"],
|
|
aliases: ["Immutable", "Expression"],
|
|
fields: Object.assign({
|
|
openingElement: {
|
|
validate: (0, rr.assertNodeType)("JSXOpeningElement")
|
|
},
|
|
closingElement: {
|
|
optional: !0,
|
|
validate: (0, rr.assertNodeType)("JSXClosingElement")
|
|
},
|
|
children: (0, rr.validateArrayOfType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")
|
|
}, {
|
|
selfClosing: {
|
|
validate: (0, rr.assertValueType)("boolean"),
|
|
optional: !0
|
|
}
|
|
})
|
|
});
|
|
pi("JSXEmptyExpression", {});
|
|
pi("JSXExpressionContainer", {
|
|
visitor: ["expression"],
|
|
aliases: ["Immutable"],
|
|
fields: {
|
|
expression: {
|
|
validate: (0, rr.assertNodeType)("Expression", "JSXEmptyExpression")
|
|
}
|
|
}
|
|
});
|
|
pi("JSXSpreadChild", {
|
|
visitor: ["expression"],
|
|
aliases: ["Immutable"],
|
|
fields: {
|
|
expression: {
|
|
validate: (0, rr.assertNodeType)("Expression")
|
|
}
|
|
}
|
|
});
|
|
pi("JSXIdentifier", {
|
|
builder: ["name"],
|
|
fields: {
|
|
name: {
|
|
validate: (0, rr.assertValueType)("string")
|
|
}
|
|
}
|
|
});
|
|
pi("JSXMemberExpression", {
|
|
visitor: ["object", "property"],
|
|
fields: {
|
|
object: {
|
|
validate: (0, rr.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
|
|
},
|
|
property: {
|
|
validate: (0, rr.assertNodeType)("JSXIdentifier")
|
|
}
|
|
}
|
|
});
|
|
pi("JSXNamespacedName", {
|
|
visitor: ["namespace", "name"],
|
|
fields: {
|
|
namespace: {
|
|
validate: (0, rr.assertNodeType)("JSXIdentifier")
|
|
},
|
|
name: {
|
|
validate: (0, rr.assertNodeType)("JSXIdentifier")
|
|
}
|
|
}
|
|
});
|
|
pi("JSXOpeningElement", {
|
|
builder: ["name", "attributes", "selfClosing"],
|
|
visitor: ["name", "typeParameters", "typeArguments", "attributes"],
|
|
aliases: ["Immutable"],
|
|
fields: Object.assign({
|
|
name: {
|
|
validate: (0, rr.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
|
|
},
|
|
selfClosing: {
|
|
default: !1
|
|
},
|
|
attributes: (0, rr.validateArrayOfType)("JSXAttribute", "JSXSpreadAttribute"),
|
|
typeArguments: {
|
|
validate: (0, rr.assertNodeType)("TypeParameterInstantiation"),
|
|
optional: !0
|
|
}
|
|
}, {
|
|
typeParameters: {
|
|
validate: (0, rr.assertNodeType)("TSTypeParameterInstantiation"),
|
|
optional: !0
|
|
}
|
|
})
|
|
});
|
|
pi("JSXSpreadAttribute", {
|
|
visitor: ["argument"],
|
|
fields: {
|
|
argument: {
|
|
validate: (0, rr.assertNodeType)("Expression")
|
|
}
|
|
}
|
|
});
|
|
pi("JSXText", {
|
|
aliases: ["Immutable"],
|
|
builder: ["value"],
|
|
fields: {
|
|
value: {
|
|
validate: (0, rr.assertValueType)("string")
|
|
}
|
|
}
|
|
});
|
|
pi("JSXFragment", {
|
|
builder: ["openingFragment", "closingFragment", "children"],
|
|
visitor: ["openingFragment", "children", "closingFragment"],
|
|
aliases: ["Immutable", "Expression"],
|
|
fields: {
|
|
openingFragment: {
|
|
validate: (0, rr.assertNodeType)("JSXOpeningFragment")
|
|
},
|
|
closingFragment: {
|
|
validate: (0, rr.assertNodeType)("JSXClosingFragment")
|
|
},
|
|
children: (0, rr.validateArrayOfType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")
|
|
}
|
|
});
|
|
pi("JSXOpeningFragment", {
|
|
aliases: ["Immutable"]
|
|
});
|
|
pi("JSXClosingFragment", {
|
|
aliases: ["Immutable"]
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/definitions/placeholders.js
|
|
var U1 = E((ka) => {
|
|
"use strict";
|
|
Object.defineProperty(ka, "__esModule", {
|
|
value: !0
|
|
});
|
|
ka.PLACEHOLDERS_FLIPPED_ALIAS = ka.PLACEHOLDERS_ALIAS = ka.PLACEHOLDERS = void 0;
|
|
var h0e = Zn(), m0e = ka.PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "Class\
|
|
Body", "Pattern"], q1 = ka.PLACEHOLDERS_ALIAS = {
|
|
Declaration: ["Statement"],
|
|
Pattern: ["PatternLike", "LVal"]
|
|
};
|
|
for (let e of m0e) {
|
|
let t = h0e.ALIAS_KEYS[e];
|
|
t != null && t.length && (q1[e] = t);
|
|
}
|
|
var L1 = ka.PLACEHOLDERS_FLIPPED_ALIAS = {};
|
|
Object.keys(q1).forEach((e) => {
|
|
q1[e].forEach((t) => {
|
|
hasOwnProperty.call(L1, t) || (L1[t] = []), L1[t].push(e);
|
|
});
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/definitions/misc.js
|
|
var Tj = E(() => {
|
|
"use strict";
|
|
var ny = Zn(), y0e = U1(), g0e = cd(), W1 = (0, ny.defineAliasedType)("Miscellaneous");
|
|
W1("Noop", {
|
|
visitor: []
|
|
});
|
|
W1("Placeholder", {
|
|
visitor: [],
|
|
builder: ["expectedNode", "name"],
|
|
fields: Object.assign({
|
|
name: {
|
|
validate: (0, ny.assertNodeType)("Identifier")
|
|
},
|
|
expectedNode: {
|
|
validate: (0, ny.assertOneOf)(...y0e.PLACEHOLDERS)
|
|
}
|
|
}, (0, g0e.patternLikeCommon)())
|
|
});
|
|
W1("V8IntrinsicIdentifier", {
|
|
builder: ["name"],
|
|
fields: {
|
|
name: {
|
|
validate: (0, ny.assertValueType)("string")
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/definitions/experimental.js
|
|
var Cj = E(() => {
|
|
"use strict";
|
|
var Xt = Zn();
|
|
(0, Xt.default)("ArgumentPlaceholder", {});
|
|
(0, Xt.default)("BindExpression", {
|
|
visitor: ["object", "callee"],
|
|
aliases: ["Expression"],
|
|
fields: process.env.BABEL_TYPES_8_BREAKING ? {
|
|
object: {
|
|
validate: (0, Xt.assertNodeType)("Expression")
|
|
},
|
|
callee: {
|
|
validate: (0, Xt.assertNodeType)("Expression")
|
|
}
|
|
} : {
|
|
object: {
|
|
validate: Object.assign(() => {
|
|
}, {
|
|
oneOfNodeTypes: ["Expression"]
|
|
})
|
|
},
|
|
callee: {
|
|
validate: Object.assign(() => {
|
|
}, {
|
|
oneOfNodeTypes: ["Expression"]
|
|
})
|
|
}
|
|
}
|
|
});
|
|
(0, Xt.default)("Decorator", {
|
|
visitor: ["expression"],
|
|
fields: {
|
|
expression: {
|
|
validate: (0, Xt.assertNodeType)("Expression")
|
|
}
|
|
}
|
|
});
|
|
(0, Xt.default)("DoExpression", {
|
|
visitor: ["body"],
|
|
builder: ["body", "async"],
|
|
aliases: ["Expression"],
|
|
fields: {
|
|
body: {
|
|
validate: (0, Xt.assertNodeType)("BlockStatement")
|
|
},
|
|
async: {
|
|
validate: (0, Xt.assertValueType)("boolean"),
|
|
default: !1
|
|
}
|
|
}
|
|
});
|
|
(0, Xt.default)("ExportDefaultSpecifier", {
|
|
visitor: ["exported"],
|
|
aliases: ["ModuleSpecifier"],
|
|
fields: {
|
|
exported: {
|
|
validate: (0, Xt.assertNodeType)("Identifier")
|
|
}
|
|
}
|
|
});
|
|
(0, Xt.default)("RecordExpression", {
|
|
visitor: ["properties"],
|
|
aliases: ["Expression"],
|
|
fields: {
|
|
properties: (0, Xt.validateArrayOfType)("ObjectProperty", "SpreadElement")
|
|
}
|
|
});
|
|
(0, Xt.default)("TupleExpression", {
|
|
fields: {
|
|
elements: {
|
|
validate: (0, Xt.arrayOfType)("Expression", "SpreadElement"),
|
|
default: []
|
|
}
|
|
},
|
|
visitor: ["elements"],
|
|
aliases: ["Expression"]
|
|
});
|
|
(0, Xt.default)("DecimalLiteral", {
|
|
builder: ["value"],
|
|
fields: {
|
|
value: {
|
|
validate: (0, Xt.assertValueType)("string")
|
|
}
|
|
},
|
|
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
|
|
});
|
|
(0, Xt.default)("ModuleExpression", {
|
|
visitor: ["body"],
|
|
fields: {
|
|
body: {
|
|
validate: (0, Xt.assertNodeType)("Program")
|
|
}
|
|
},
|
|
aliases: ["Expression"]
|
|
});
|
|
(0, Xt.default)("TopicReference", {
|
|
aliases: ["Expression"]
|
|
});
|
|
(0, Xt.default)("PipelineTopicExpression", {
|
|
builder: ["expression"],
|
|
visitor: ["expression"],
|
|
fields: {
|
|
expression: {
|
|
validate: (0, Xt.assertNodeType)("Expression")
|
|
}
|
|
},
|
|
aliases: ["Expression"]
|
|
});
|
|
(0, Xt.default)("PipelineBareFunction", {
|
|
builder: ["callee"],
|
|
visitor: ["callee"],
|
|
fields: {
|
|
callee: {
|
|
validate: (0, Xt.assertNodeType)("Expression")
|
|
}
|
|
},
|
|
aliases: ["Expression"]
|
|
});
|
|
(0, Xt.default)("PipelinePrimaryTopicReference", {
|
|
aliases: ["Expression"]
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/definitions/typescript.js
|
|
var kj = E(() => {
|
|
"use strict";
|
|
var ne = Zn(), wj = cd(), b0e = Cl(), qe = (0, ne.defineAliasedType)("TypeScript"), Ti = (0, ne.assertValueType)("boolean"), Aj = /* @__PURE__ */ s(
|
|
() => ({
|
|
returnType: {
|
|
validate: (0, ne.assertNodeType)("TSTypeAnnotation", "Noop"),
|
|
optional: !0
|
|
},
|
|
typeParameters: {
|
|
validate: (0, ne.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
|
|
optional: !0
|
|
}
|
|
}), "tSFunctionTypeAnnotationCommon");
|
|
qe("TSParameterProperty", {
|
|
aliases: ["LVal"],
|
|
visitor: ["parameter"],
|
|
fields: {
|
|
accessibility: {
|
|
validate: (0, ne.assertOneOf)("public", "private", "protected"),
|
|
optional: !0
|
|
},
|
|
readonly: {
|
|
validate: (0, ne.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
parameter: {
|
|
validate: (0, ne.assertNodeType)("Identifier", "AssignmentPattern")
|
|
},
|
|
override: {
|
|
validate: (0, ne.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
decorators: {
|
|
validate: (0, ne.arrayOfType)("Decorator"),
|
|
optional: !0
|
|
}
|
|
}
|
|
});
|
|
qe("TSDeclareFunction", {
|
|
aliases: ["Statement", "Declaration"],
|
|
visitor: ["id", "typeParameters", "params", "returnType"],
|
|
fields: Object.assign({}, (0, wj.functionDeclarationCommon)(), Aj())
|
|
});
|
|
qe("TSDeclareMethod", {
|
|
visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
|
|
fields: Object.assign({}, (0, wj.classMethodOrDeclareMethodCommon)(), Aj())
|
|
});
|
|
qe("TSQualifiedName", {
|
|
aliases: ["TSEntityName"],
|
|
visitor: ["left", "right"],
|
|
fields: {
|
|
left: (0, ne.validateType)("TSEntityName"),
|
|
right: (0, ne.validateType)("Identifier")
|
|
}
|
|
});
|
|
var sy = /* @__PURE__ */ s(() => ({
|
|
typeParameters: (0, ne.validateOptionalType)("TSTypeParameterDeclaration"),
|
|
parameters: (0, ne.validateArrayOfType)("ArrayPattern", "Identifier", "ObjectPattern", "RestElement"),
|
|
typeAnnotation: (0, ne.validateOptionalType)("TSTypeAnnotation")
|
|
}), "signatureDeclarationCommon"), _j = {
|
|
aliases: ["TSTypeElement"],
|
|
visitor: ["typeParameters", "parameters", "typeAnnotation"],
|
|
fields: sy()
|
|
};
|
|
qe("TSCallSignatureDeclaration", _j);
|
|
qe("TSConstructSignatureDeclaration", _j);
|
|
var Pj = /* @__PURE__ */ s(() => ({
|
|
key: (0, ne.validateType)("Expression"),
|
|
computed: {
|
|
default: !1
|
|
},
|
|
optional: (0, ne.validateOptional)(Ti)
|
|
}), "namedTypeElementCommon");
|
|
qe("TSPropertySignature", {
|
|
aliases: ["TSTypeElement"],
|
|
visitor: ["key", "typeAnnotation"],
|
|
fields: Object.assign({}, Pj(), {
|
|
readonly: (0, ne.validateOptional)(Ti),
|
|
typeAnnotation: (0, ne.validateOptionalType)("TSTypeAnnotation"),
|
|
kind: {
|
|
optional: !0,
|
|
validate: (0, ne.assertOneOf)("get", "set")
|
|
}
|
|
})
|
|
});
|
|
qe("TSMethodSignature", {
|
|
aliases: ["TSTypeElement"],
|
|
visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
|
|
fields: Object.assign({}, sy(), Pj(), {
|
|
kind: {
|
|
validate: (0, ne.assertOneOf)("method", "get", "set")
|
|
}
|
|
})
|
|
});
|
|
qe("TSIndexSignature", {
|
|
aliases: ["TSTypeElement"],
|
|
visitor: ["parameters", "typeAnnotation"],
|
|
fields: {
|
|
readonly: (0, ne.validateOptional)(Ti),
|
|
static: (0, ne.validateOptional)(Ti),
|
|
parameters: (0, ne.validateArrayOfType)("Identifier"),
|
|
typeAnnotation: (0, ne.validateOptionalType)("TSTypeAnnotation")
|
|
}
|
|
});
|
|
var D0e = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeywor\
|
|
d", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
|
|
for (let e of D0e)
|
|
qe(e, {
|
|
aliases: ["TSType", "TSBaseType"],
|
|
visitor: [],
|
|
fields: {}
|
|
});
|
|
qe("TSThisType", {
|
|
aliases: ["TSType", "TSBaseType"],
|
|
visitor: [],
|
|
fields: {}
|
|
});
|
|
var Fj = {
|
|
aliases: ["TSType"],
|
|
visitor: ["typeParameters", "parameters", "typeAnnotation"]
|
|
};
|
|
qe("TSFunctionType", Object.assign({}, Fj, {
|
|
fields: sy()
|
|
}));
|
|
qe("TSConstructorType", Object.assign({}, Fj, {
|
|
fields: Object.assign({}, sy(), {
|
|
abstract: (0, ne.validateOptional)(Ti)
|
|
})
|
|
}));
|
|
qe("TSTypeReference", {
|
|
aliases: ["TSType"],
|
|
visitor: ["typeName", "typeParameters"],
|
|
fields: {
|
|
typeName: (0, ne.validateType)("TSEntityName"),
|
|
typeParameters: (0, ne.validateOptionalType)("TSTypeParameterInstantiation")
|
|
}
|
|
});
|
|
qe("TSTypePredicate", {
|
|
aliases: ["TSType"],
|
|
visitor: ["parameterName", "typeAnnotation"],
|
|
builder: ["parameterName", "typeAnnotation", "asserts"],
|
|
fields: {
|
|
parameterName: (0, ne.validateType)("Identifier", "TSThisType"),
|
|
typeAnnotation: (0, ne.validateOptionalType)("TSTypeAnnotation"),
|
|
asserts: (0, ne.validateOptional)(Ti)
|
|
}
|
|
});
|
|
qe("TSTypeQuery", {
|
|
aliases: ["TSType"],
|
|
visitor: ["exprName", "typeParameters"],
|
|
fields: {
|
|
exprName: (0, ne.validateType)("TSEntityName", "TSImportType"),
|
|
typeParameters: (0, ne.validateOptionalType)("TSTypeParameterInstantiation")
|
|
}
|
|
});
|
|
qe("TSTypeLiteral", {
|
|
aliases: ["TSType"],
|
|
visitor: ["members"],
|
|
fields: {
|
|
members: (0, ne.validateArrayOfType)("TSTypeElement")
|
|
}
|
|
});
|
|
qe("TSArrayType", {
|
|
aliases: ["TSType"],
|
|
visitor: ["elementType"],
|
|
fields: {
|
|
elementType: (0, ne.validateType)("TSType")
|
|
}
|
|
});
|
|
qe("TSTupleType", {
|
|
aliases: ["TSType"],
|
|
visitor: ["elementTypes"],
|
|
fields: {
|
|
elementTypes: (0, ne.validateArrayOfType)("TSType", "TSNamedTupleMember")
|
|
}
|
|
});
|
|
qe("TSOptionalType", {
|
|
aliases: ["TSType"],
|
|
visitor: ["typeAnnotation"],
|
|
fields: {
|
|
typeAnnotation: (0, ne.validateType)("TSType")
|
|
}
|
|
});
|
|
qe("TSRestType", {
|
|
aliases: ["TSType"],
|
|
visitor: ["typeAnnotation"],
|
|
fields: {
|
|
typeAnnotation: (0, ne.validateType)("TSType")
|
|
}
|
|
});
|
|
qe("TSNamedTupleMember", {
|
|
visitor: ["label", "elementType"],
|
|
builder: ["label", "elementType", "optional"],
|
|
fields: {
|
|
label: (0, ne.validateType)("Identifier"),
|
|
optional: {
|
|
validate: Ti,
|
|
default: !1
|
|
},
|
|
elementType: (0, ne.validateType)("TSType")
|
|
}
|
|
});
|
|
var Ij = {
|
|
aliases: ["TSType"],
|
|
visitor: ["types"],
|
|
fields: {
|
|
types: (0, ne.validateArrayOfType)("TSType")
|
|
}
|
|
};
|
|
qe("TSUnionType", Ij);
|
|
qe("TSIntersectionType", Ij);
|
|
qe("TSConditionalType", {
|
|
aliases: ["TSType"],
|
|
visitor: ["checkType", "extendsType", "trueType", "falseType"],
|
|
fields: {
|
|
checkType: (0, ne.validateType)("TSType"),
|
|
extendsType: (0, ne.validateType)("TSType"),
|
|
trueType: (0, ne.validateType)("TSType"),
|
|
falseType: (0, ne.validateType)("TSType")
|
|
}
|
|
});
|
|
qe("TSInferType", {
|
|
aliases: ["TSType"],
|
|
visitor: ["typeParameter"],
|
|
fields: {
|
|
typeParameter: (0, ne.validateType)("TSTypeParameter")
|
|
}
|
|
});
|
|
qe("TSParenthesizedType", {
|
|
aliases: ["TSType"],
|
|
visitor: ["typeAnnotation"],
|
|
fields: {
|
|
typeAnnotation: (0, ne.validateType)("TSType")
|
|
}
|
|
});
|
|
qe("TSTypeOperator", {
|
|
aliases: ["TSType"],
|
|
visitor: ["typeAnnotation"],
|
|
fields: {
|
|
operator: (0, ne.validate)((0, ne.assertValueType)("string")),
|
|
typeAnnotation: (0, ne.validateType)("TSType")
|
|
}
|
|
});
|
|
qe("TSIndexedAccessType", {
|
|
aliases: ["TSType"],
|
|
visitor: ["objectType", "indexType"],
|
|
fields: {
|
|
objectType: (0, ne.validateType)("TSType"),
|
|
indexType: (0, ne.validateType)("TSType")
|
|
}
|
|
});
|
|
qe("TSMappedType", {
|
|
aliases: ["TSType"],
|
|
visitor: ["typeParameter", "nameType", "typeAnnotation"],
|
|
builder: ["typeParameter", "typeAnnotation", "nameType"],
|
|
fields: Object.assign({}, {
|
|
typeParameter: (0, ne.validateType)("TSTypeParameter")
|
|
}, {
|
|
readonly: (0, ne.validateOptional)((0, ne.assertOneOf)(!0, !1, "+", "-")),
|
|
optional: (0, ne.validateOptional)((0, ne.assertOneOf)(!0, !1, "+", "-")),
|
|
typeAnnotation: (0, ne.validateOptionalType)("TSType"),
|
|
nameType: (0, ne.validateOptionalType)("TSType")
|
|
})
|
|
});
|
|
qe("TSTemplateLiteralType", {
|
|
aliases: ["TSType", "TSBaseType"],
|
|
visitor: ["quasis", "types"],
|
|
fields: {
|
|
quasis: (0, ne.validateArrayOfType)("TemplateElement"),
|
|
types: {
|
|
validate: (0, ne.chain)((0, ne.assertValueType)("array"), (0, ne.assertEach)((0, ne.assertNodeType)("TSType")), function(e, t, r) {
|
|
if (e.quasis.length !== r.length + 1)
|
|
throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of types.
|
|
Expected ${r.length + 1} quasis but got ${e.quasis.length}`);
|
|
})
|
|
}
|
|
}
|
|
});
|
|
qe("TSLiteralType", {
|
|
aliases: ["TSType", "TSBaseType"],
|
|
visitor: ["literal"],
|
|
fields: {
|
|
literal: {
|
|
validate: function() {
|
|
let e = (0, ne.assertNodeType)("NumericLiteral", "BigIntLiteral"), t = (0, ne.assertOneOf)("-"), r = (0, ne.assertNodeType)("Numer\
|
|
icLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "TemplateLiteral");
|
|
function i(n, a, o) {
|
|
(0, b0e.default)("UnaryExpression", o) ? (t(o, "operator", o.operator), e(o, "argument", o.argument)) : r(n, a, o);
|
|
}
|
|
return s(i, "validator"), i.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "TemplateLiter\
|
|
al", "UnaryExpression"], i;
|
|
}()
|
|
}
|
|
}
|
|
});
|
|
qe("TSExpressionWithTypeArguments", {
|
|
aliases: ["TSType"],
|
|
visitor: ["expression", "typeParameters"],
|
|
fields: {
|
|
expression: (0, ne.validateType)("TSEntityName"),
|
|
typeParameters: (0, ne.validateOptionalType)("TSTypeParameterInstantiation")
|
|
}
|
|
});
|
|
qe("TSInterfaceDeclaration", {
|
|
aliases: ["Statement", "Declaration"],
|
|
visitor: ["id", "typeParameters", "extends", "body"],
|
|
fields: {
|
|
declare: (0, ne.validateOptional)(Ti),
|
|
id: (0, ne.validateType)("Identifier"),
|
|
typeParameters: (0, ne.validateOptionalType)("TSTypeParameterDeclaration"),
|
|
extends: (0, ne.validateOptional)((0, ne.arrayOfType)("TSExpressionWithTypeArguments")),
|
|
body: (0, ne.validateType)("TSInterfaceBody")
|
|
}
|
|
});
|
|
qe("TSInterfaceBody", {
|
|
visitor: ["body"],
|
|
fields: {
|
|
body: (0, ne.validateArrayOfType)("TSTypeElement")
|
|
}
|
|
});
|
|
qe("TSTypeAliasDeclaration", {
|
|
aliases: ["Statement", "Declaration"],
|
|
visitor: ["id", "typeParameters", "typeAnnotation"],
|
|
fields: {
|
|
declare: (0, ne.validateOptional)(Ti),
|
|
id: (0, ne.validateType)("Identifier"),
|
|
typeParameters: (0, ne.validateOptionalType)("TSTypeParameterDeclaration"),
|
|
typeAnnotation: (0, ne.validateType)("TSType")
|
|
}
|
|
});
|
|
qe("TSInstantiationExpression", {
|
|
aliases: ["Expression"],
|
|
visitor: ["expression", "typeParameters"],
|
|
fields: {
|
|
expression: (0, ne.validateType)("Expression"),
|
|
typeParameters: (0, ne.validateOptionalType)("TSTypeParameterInstantiation")
|
|
}
|
|
});
|
|
var Oj = {
|
|
aliases: ["Expression", "LVal", "PatternLike"],
|
|
visitor: ["expression", "typeAnnotation"],
|
|
fields: {
|
|
expression: (0, ne.validateType)("Expression"),
|
|
typeAnnotation: (0, ne.validateType)("TSType")
|
|
}
|
|
};
|
|
qe("TSAsExpression", Oj);
|
|
qe("TSSatisfiesExpression", Oj);
|
|
qe("TSTypeAssertion", {
|
|
aliases: ["Expression", "LVal", "PatternLike"],
|
|
visitor: ["typeAnnotation", "expression"],
|
|
fields: {
|
|
typeAnnotation: (0, ne.validateType)("TSType"),
|
|
expression: (0, ne.validateType)("Expression")
|
|
}
|
|
});
|
|
qe("TSEnumBody", {
|
|
visitor: ["members"],
|
|
fields: {
|
|
members: (0, ne.validateArrayOfType)("TSEnumMember")
|
|
}
|
|
});
|
|
qe("TSEnumDeclaration", {
|
|
aliases: ["Statement", "Declaration"],
|
|
visitor: ["id", "members"],
|
|
fields: {
|
|
declare: (0, ne.validateOptional)(Ti),
|
|
const: (0, ne.validateOptional)(Ti),
|
|
id: (0, ne.validateType)("Identifier"),
|
|
members: (0, ne.validateArrayOfType)("TSEnumMember"),
|
|
initializer: (0, ne.validateOptionalType)("Expression"),
|
|
body: (0, ne.validateOptionalType)("TSEnumBody")
|
|
}
|
|
});
|
|
qe("TSEnumMember", {
|
|
visitor: ["id", "initializer"],
|
|
fields: {
|
|
id: (0, ne.validateType)("Identifier", "StringLiteral"),
|
|
initializer: (0, ne.validateOptionalType)("Expression")
|
|
}
|
|
});
|
|
qe("TSModuleDeclaration", {
|
|
aliases: ["Statement", "Declaration"],
|
|
visitor: ["id", "body"],
|
|
fields: Object.assign({
|
|
kind: {
|
|
validate: (0, ne.assertOneOf)("global", "module", "namespace")
|
|
},
|
|
declare: (0, ne.validateOptional)(Ti)
|
|
}, {
|
|
global: (0, ne.validateOptional)(Ti)
|
|
}, {
|
|
id: (0, ne.validateType)("Identifier", "StringLiteral"),
|
|
body: (0, ne.validateType)("TSModuleBlock", "TSModuleDeclaration")
|
|
})
|
|
});
|
|
qe("TSModuleBlock", {
|
|
aliases: ["Scopable", "Block", "BlockParent", "FunctionParent"],
|
|
visitor: ["body"],
|
|
fields: {
|
|
body: (0, ne.validateArrayOfType)("Statement")
|
|
}
|
|
});
|
|
qe("TSImportType", {
|
|
aliases: ["TSType"],
|
|
builder: ["argument", "qualifier", "typeParameters"],
|
|
visitor: ["argument", "options", "qualifier", "typeParameters"],
|
|
fields: {
|
|
argument: (0, ne.validateType)("StringLiteral"),
|
|
qualifier: (0, ne.validateOptionalType)("TSEntityName"),
|
|
typeParameters: (0, ne.validateOptionalType)("TSTypeParameterInstantiation"),
|
|
options: {
|
|
validate: (0, ne.assertNodeType)("Expression"),
|
|
optional: !0
|
|
}
|
|
}
|
|
});
|
|
qe("TSImportEqualsDeclaration", {
|
|
aliases: ["Statement", "Declaration"],
|
|
visitor: ["id", "moduleReference"],
|
|
fields: Object.assign({}, {
|
|
isExport: (0, ne.validate)(Ti)
|
|
}, {
|
|
id: (0, ne.validateType)("Identifier"),
|
|
moduleReference: (0, ne.validateType)("TSEntityName", "TSExternalModuleReference"),
|
|
importKind: {
|
|
validate: (0, ne.assertOneOf)("type", "value"),
|
|
optional: !0
|
|
}
|
|
})
|
|
});
|
|
qe("TSExternalModuleReference", {
|
|
visitor: ["expression"],
|
|
fields: {
|
|
expression: (0, ne.validateType)("StringLiteral")
|
|
}
|
|
});
|
|
qe("TSNonNullExpression", {
|
|
aliases: ["Expression", "LVal", "PatternLike"],
|
|
visitor: ["expression"],
|
|
fields: {
|
|
expression: (0, ne.validateType)("Expression")
|
|
}
|
|
});
|
|
qe("TSExportAssignment", {
|
|
aliases: ["Statement"],
|
|
visitor: ["expression"],
|
|
fields: {
|
|
expression: (0, ne.validateType)("Expression")
|
|
}
|
|
});
|
|
qe("TSNamespaceExportDeclaration", {
|
|
aliases: ["Statement"],
|
|
visitor: ["id"],
|
|
fields: {
|
|
id: (0, ne.validateType)("Identifier")
|
|
}
|
|
});
|
|
qe("TSTypeAnnotation", {
|
|
visitor: ["typeAnnotation"],
|
|
fields: {
|
|
typeAnnotation: {
|
|
validate: (0, ne.assertNodeType)("TSType")
|
|
}
|
|
}
|
|
});
|
|
qe("TSTypeParameterInstantiation", {
|
|
visitor: ["params"],
|
|
fields: {
|
|
params: (0, ne.validateArrayOfType)("TSType")
|
|
}
|
|
});
|
|
qe("TSTypeParameterDeclaration", {
|
|
visitor: ["params"],
|
|
fields: {
|
|
params: (0, ne.validateArrayOfType)("TSTypeParameter")
|
|
}
|
|
});
|
|
qe("TSTypeParameter", {
|
|
builder: ["constraint", "default", "name"],
|
|
visitor: ["constraint", "default"],
|
|
fields: {
|
|
name: {
|
|
validate: (0, ne.assertValueType)("string")
|
|
},
|
|
in: {
|
|
validate: (0, ne.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
out: {
|
|
validate: (0, ne.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
const: {
|
|
validate: (0, ne.assertValueType)("boolean"),
|
|
optional: !0
|
|
},
|
|
constraint: {
|
|
validate: (0, ne.assertNodeType)("TSType"),
|
|
optional: !0
|
|
},
|
|
default: {
|
|
validate: (0, ne.assertNodeType)("TSType"),
|
|
optional: !0
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/definitions/deprecated-aliases.js
|
|
var Bj = E((ay) => {
|
|
"use strict";
|
|
Object.defineProperty(ay, "__esModule", {
|
|
value: !0
|
|
});
|
|
ay.DEPRECATED_ALIASES = void 0;
|
|
var $at = ay.DEPRECATED_ALIASES = {
|
|
ModuleDeclaration: "ImportOrExportDeclaration"
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/definitions/index.js
|
|
var Xi = E((hi) => {
|
|
"use strict";
|
|
Object.defineProperty(hi, "__esModule", {
|
|
value: !0
|
|
});
|
|
Object.defineProperty(hi, "ALIAS_KEYS", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Ci.ALIAS_KEYS;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(hi, "BUILDER_KEYS", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Ci.BUILDER_KEYS;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(hi, "DEPRECATED_ALIASES", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return $1.DEPRECATED_ALIASES;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(hi, "DEPRECATED_KEYS", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Ci.DEPRECATED_KEYS;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(hi, "FLIPPED_ALIAS_KEYS", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Ci.FLIPPED_ALIAS_KEYS;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(hi, "NODE_FIELDS", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Ci.NODE_FIELDS;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(hi, "NODE_PARENT_VALIDATIONS", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Ci.NODE_PARENT_VALIDATIONS;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(hi, "PLACEHOLDERS", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return V1.PLACEHOLDERS;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(hi, "PLACEHOLDERS_ALIAS", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return V1.PLACEHOLDERS_ALIAS;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(hi, "PLACEHOLDERS_FLIPPED_ALIAS", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return V1.PLACEHOLDERS_FLIPPED_ALIAS;
|
|
}, "get")
|
|
});
|
|
hi.TYPES = void 0;
|
|
Object.defineProperty(hi, "VISITOR_KEYS", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Ci.VISITOR_KEYS;
|
|
}, "get")
|
|
});
|
|
cd();
|
|
xj();
|
|
Sj();
|
|
Tj();
|
|
Cj();
|
|
kj();
|
|
var Ci = Zn(), V1 = U1(), $1 = Bj();
|
|
Object.keys($1.DEPRECATED_ALIASES).forEach((e) => {
|
|
Ci.FLIPPED_ALIAS_KEYS[e] = Ci.FLIPPED_ALIAS_KEYS[$1.DEPRECATED_ALIASES[e]];
|
|
});
|
|
for (let {
|
|
types: e,
|
|
set: t
|
|
} of Ci.allExpandedTypes)
|
|
for (let r of e) {
|
|
let i = Ci.FLIPPED_ALIAS_KEYS[r];
|
|
i ? i.forEach(t.add, t) : t.add(r);
|
|
}
|
|
var Hat = hi.TYPES = [].concat(Object.keys(Ci.VISITOR_KEYS), Object.keys(Ci.FLIPPED_ALIAS_KEYS), Object.keys(Ci.DEPRECATED_KEYS));
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/validate.js
|
|
var ry = E((Il) => {
|
|
"use strict";
|
|
Object.defineProperty(Il, "__esModule", {
|
|
value: !0
|
|
});
|
|
Il.default = v0e;
|
|
Il.validateChild = Mj;
|
|
Il.validateField = Nj;
|
|
Il.validateInternal = E0e;
|
|
var fd = Xi();
|
|
function v0e(e, t, r) {
|
|
if (!e) return;
|
|
let i = fd.NODE_FIELDS[e.type];
|
|
if (!i) return;
|
|
let n = i[t];
|
|
Nj(e, t, r, n), Mj(e, t, r);
|
|
}
|
|
s(v0e, "validate");
|
|
function E0e(e, t, r, i, n) {
|
|
if (e != null && e.validate && !(e.optional && i == null) && (e.validate(t, r, i), n)) {
|
|
var a;
|
|
let o = i.type;
|
|
if (o == null) return;
|
|
(a = fd.NODE_PARENT_VALIDATIONS[o]) == null || a.call(fd.NODE_PARENT_VALIDATIONS, t, r, i);
|
|
}
|
|
}
|
|
s(E0e, "validateInternal");
|
|
function Nj(e, t, r, i) {
|
|
i != null && i.validate && (i.optional && r == null || i.validate(e, t, r));
|
|
}
|
|
s(Nj, "validateField");
|
|
function Mj(e, t, r) {
|
|
var i;
|
|
let n = r?.type;
|
|
n != null && ((i = fd.NODE_PARENT_VALIDATIONS[n]) == null || i.call(fd.NODE_PARENT_VALIDATIONS, e, t, r));
|
|
}
|
|
s(Mj, "validateChild");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/builders/generated/lowercase.js
|
|
var H1 = E((T) => {
|
|
"use strict";
|
|
Object.defineProperty(T, "__esModule", {
|
|
value: !0
|
|
});
|
|
T.anyTypeAnnotation = tbe;
|
|
T.argumentPlaceholder = FDe;
|
|
T.arrayExpression = T0e;
|
|
T.arrayPattern = Dge;
|
|
T.arrayTypeAnnotation = rbe;
|
|
T.arrowFunctionExpression = vge;
|
|
T.assignmentExpression = C0e;
|
|
T.assignmentPattern = bge;
|
|
T.awaitExpression = Wge;
|
|
T.bigIntLiteral = Vge;
|
|
T.binaryExpression = w0e;
|
|
T.bindExpression = IDe;
|
|
T.blockStatement = F0e;
|
|
T.booleanLiteral = X0e;
|
|
T.booleanLiteralTypeAnnotation = nbe;
|
|
T.booleanTypeAnnotation = ibe;
|
|
T.breakStatement = I0e;
|
|
T.callExpression = O0e;
|
|
T.catchClause = k0e;
|
|
T.classAccessorProperty = Jge;
|
|
T.classBody = Ege;
|
|
T.classDeclaration = Sge;
|
|
T.classExpression = xge;
|
|
T.classImplements = abe;
|
|
T.classMethod = Nge;
|
|
T.classPrivateMethod = Yge;
|
|
T.classPrivateProperty = Xge;
|
|
T.classProperty = Gge;
|
|
T.conditionalExpression = B0e;
|
|
T.continueStatement = N0e;
|
|
T.debuggerStatement = M0e;
|
|
T.decimalLiteral = RDe;
|
|
T.declareClass = obe;
|
|
T.declareExportAllDeclaration = ybe;
|
|
T.declareExportDeclaration = mbe;
|
|
T.declareFunction = ube;
|
|
T.declareInterface = lbe;
|
|
T.declareModule = cbe;
|
|
T.declareModuleExports = fbe;
|
|
T.declareOpaqueType = pbe;
|
|
T.declareTypeAlias = dbe;
|
|
T.declareVariable = hbe;
|
|
T.declaredPredicate = gbe;
|
|
T.decorator = ODe;
|
|
T.directive = _0e;
|
|
T.directiveLiteral = P0e;
|
|
T.doExpression = kDe;
|
|
T.doWhileStatement = R0e;
|
|
T.emptyStatement = j0e;
|
|
T.emptyTypeAnnotation = _be;
|
|
T.enumBooleanBody = rDe;
|
|
T.enumBooleanMember = aDe;
|
|
T.enumDeclaration = tDe;
|
|
T.enumDefaultedMember = lDe;
|
|
T.enumNumberBody = iDe;
|
|
T.enumNumberMember = oDe;
|
|
T.enumStringBody = nDe;
|
|
T.enumStringMember = uDe;
|
|
T.enumSymbolBody = sDe;
|
|
T.existsTypeAnnotation = bbe;
|
|
T.exportAllDeclaration = Tge;
|
|
T.exportDefaultDeclaration = Cge;
|
|
T.exportDefaultSpecifier = BDe;
|
|
T.exportNamedDeclaration = wge;
|
|
T.exportNamespaceSpecifier = Hge;
|
|
T.exportSpecifier = Age;
|
|
T.expressionStatement = L0e;
|
|
T.file = q0e;
|
|
T.forInStatement = U0e;
|
|
T.forOfStatement = _ge;
|
|
T.forStatement = W0e;
|
|
T.functionDeclaration = $0e;
|
|
T.functionExpression = V0e;
|
|
T.functionTypeAnnotation = Dbe;
|
|
T.functionTypeParam = vbe;
|
|
T.genericTypeAnnotation = Ebe;
|
|
T.identifier = H0e;
|
|
T.ifStatement = K0e;
|
|
T.import = $ge;
|
|
T.importAttribute = ebe;
|
|
T.importDeclaration = Pge;
|
|
T.importDefaultSpecifier = Fge;
|
|
T.importExpression = kge;
|
|
T.importNamespaceSpecifier = Ige;
|
|
T.importSpecifier = Oge;
|
|
T.indexedAccessType = cDe;
|
|
T.inferredPredicate = xbe;
|
|
T.interfaceDeclaration = Tbe;
|
|
T.interfaceExtends = Sbe;
|
|
T.interfaceTypeAnnotation = Cbe;
|
|
T.interpreterDirective = A0e;
|
|
T.intersectionTypeAnnotation = wbe;
|
|
T.jSXAttribute = T.jsxAttribute = dDe;
|
|
T.jSXClosingElement = T.jsxClosingElement = pDe;
|
|
T.jSXClosingFragment = T.jsxClosingFragment = wDe;
|
|
T.jSXElement = T.jsxElement = hDe;
|
|
T.jSXEmptyExpression = T.jsxEmptyExpression = mDe;
|
|
T.jSXExpressionContainer = T.jsxExpressionContainer = yDe;
|
|
T.jSXFragment = T.jsxFragment = TDe;
|
|
T.jSXIdentifier = T.jsxIdentifier = bDe;
|
|
T.jSXMemberExpression = T.jsxMemberExpression = DDe;
|
|
T.jSXNamespacedName = T.jsxNamespacedName = vDe;
|
|
T.jSXOpeningElement = T.jsxOpeningElement = EDe;
|
|
T.jSXOpeningFragment = T.jsxOpeningFragment = CDe;
|
|
T.jSXSpreadAttribute = T.jsxSpreadAttribute = xDe;
|
|
T.jSXSpreadChild = T.jsxSpreadChild = gDe;
|
|
T.jSXText = T.jsxText = SDe;
|
|
T.labeledStatement = z0e;
|
|
T.logicalExpression = Y0e;
|
|
T.memberExpression = Z0e;
|
|
T.metaProperty = Bge;
|
|
T.mixedTypeAnnotation = Abe;
|
|
T.moduleExpression = jDe;
|
|
T.newExpression = Q0e;
|
|
T.noop = ADe;
|
|
T.nullLiteral = J0e;
|
|
T.nullLiteralTypeAnnotation = sbe;
|
|
T.nullableTypeAnnotation = Pbe;
|
|
T.numberLiteral = rEe;
|
|
T.numberLiteralTypeAnnotation = Fbe;
|
|
T.numberTypeAnnotation = Ibe;
|
|
T.numericLiteral = Rj;
|
|
T.objectExpression = tge;
|
|
T.objectMethod = rge;
|
|
T.objectPattern = Mge;
|
|
T.objectProperty = ige;
|
|
T.objectTypeAnnotation = Obe;
|
|
T.objectTypeCallProperty = Bbe;
|
|
T.objectTypeIndexer = Nbe;
|
|
T.objectTypeInternalSlot = kbe;
|
|
T.objectTypeProperty = Mbe;
|
|
T.objectTypeSpreadProperty = Rbe;
|
|
T.opaqueType = jbe;
|
|
T.optionalCallExpression = zge;
|
|
T.optionalIndexedAccessType = fDe;
|
|
T.optionalMemberExpression = Kge;
|
|
T.parenthesizedExpression = age;
|
|
T.pipelineBareFunction = UDe;
|
|
T.pipelinePrimaryTopicReference = WDe;
|
|
T.pipelineTopicExpression = qDe;
|
|
T.placeholder = _De;
|
|
T.privateName = Zge;
|
|
T.program = ege;
|
|
T.qualifiedTypeIdentifier = Lbe;
|
|
T.recordExpression = NDe;
|
|
T.regExpLiteral = jj;
|
|
T.regexLiteral = iEe;
|
|
T.restElement = Lj;
|
|
T.restProperty = nEe;
|
|
T.returnStatement = nge;
|
|
T.sequenceExpression = sge;
|
|
T.spreadElement = qj;
|
|
T.spreadProperty = sEe;
|
|
T.staticBlock = Qge;
|
|
T.stringLiteral = G0e;
|
|
T.stringLiteralTypeAnnotation = qbe;
|
|
T.stringTypeAnnotation = Ube;
|
|
T.super = Rge;
|
|
T.switchCase = oge;
|
|
T.switchStatement = uge;
|
|
T.symbolTypeAnnotation = Wbe;
|
|
T.taggedTemplateExpression = jge;
|
|
T.templateElement = Lge;
|
|
T.templateLiteral = qge;
|
|
T.thisExpression = lge;
|
|
T.thisTypeAnnotation = $be;
|
|
T.throwStatement = cge;
|
|
T.topicReference = LDe;
|
|
T.tryStatement = fge;
|
|
T.tSAnyKeyword = T.tsAnyKeyword = ZDe;
|
|
T.tSArrayType = T.tsArrayType = bve;
|
|
T.tSAsExpression = T.tsAsExpression = jve;
|
|
T.tSBigIntKeyword = T.tsBigIntKeyword = eve;
|
|
T.tSBooleanKeyword = T.tsBooleanKeyword = QDe;
|
|
T.tSCallSignatureDeclaration = T.tsCallSignatureDeclaration = zDe;
|
|
T.tSConditionalType = T.tsConditionalType = Cve;
|
|
T.tSConstructSignatureDeclaration = T.tsConstructSignatureDeclaration = GDe;
|
|
T.tSConstructorType = T.tsConstructorType = pve;
|
|
T.tSDeclareFunction = T.tsDeclareFunction = VDe;
|
|
T.tSDeclareMethod = T.tsDeclareMethod = HDe;
|
|
T.tSEnumBody = T.tsEnumBody = Uve;
|
|
T.tSEnumDeclaration = T.tsEnumDeclaration = Wve;
|
|
T.tSEnumMember = T.tsEnumMember = $ve;
|
|
T.tSExportAssignment = T.tsExportAssignment = Xve;
|
|
T.tSExpressionWithTypeArguments = T.tsExpressionWithTypeArguments = kve;
|
|
T.tSExternalModuleReference = T.tsExternalModuleReference = Gve;
|
|
T.tSFunctionType = T.tsFunctionType = dve;
|
|
T.tSImportEqualsDeclaration = T.tsImportEqualsDeclaration = zve;
|
|
T.tSImportType = T.tsImportType = Kve;
|
|
T.tSIndexSignature = T.tsIndexSignature = YDe;
|
|
T.tSIndexedAccessType = T.tsIndexedAccessType = Pve;
|
|
T.tSInferType = T.tsInferType = wve;
|
|
T.tSInstantiationExpression = T.tsInstantiationExpression = Rve;
|
|
T.tSInterfaceBody = T.tsInterfaceBody = Nve;
|
|
T.tSInterfaceDeclaration = T.tsInterfaceDeclaration = Bve;
|
|
T.tSIntersectionType = T.tsIntersectionType = Tve;
|
|
T.tSIntrinsicKeyword = T.tsIntrinsicKeyword = tve;
|
|
T.tSLiteralType = T.tsLiteralType = Ove;
|
|
T.tSMappedType = T.tsMappedType = Fve;
|
|
T.tSMethodSignature = T.tsMethodSignature = XDe;
|
|
T.tSModuleBlock = T.tsModuleBlock = Hve;
|
|
T.tSModuleDeclaration = T.tsModuleDeclaration = Vve;
|
|
T.tSNamedTupleMember = T.tsNamedTupleMember = xve;
|
|
T.tSNamespaceExportDeclaration = T.tsNamespaceExportDeclaration = Yve;
|
|
T.tSNeverKeyword = T.tsNeverKeyword = rve;
|
|
T.tSNonNullExpression = T.tsNonNullExpression = Jve;
|
|
T.tSNullKeyword = T.tsNullKeyword = ive;
|
|
T.tSNumberKeyword = T.tsNumberKeyword = nve;
|
|
T.tSObjectKeyword = T.tsObjectKeyword = sve;
|
|
T.tSOptionalType = T.tsOptionalType = vve;
|
|
T.tSParameterProperty = T.tsParameterProperty = $De;
|
|
T.tSParenthesizedType = T.tsParenthesizedType = Ave;
|
|
T.tSPropertySignature = T.tsPropertySignature = JDe;
|
|
T.tSQualifiedName = T.tsQualifiedName = KDe;
|
|
T.tSRestType = T.tsRestType = Eve;
|
|
T.tSSatisfiesExpression = T.tsSatisfiesExpression = Lve;
|
|
T.tSStringKeyword = T.tsStringKeyword = ave;
|
|
T.tSSymbolKeyword = T.tsSymbolKeyword = ove;
|
|
T.tSTemplateLiteralType = T.tsTemplateLiteralType = Ive;
|
|
T.tSThisType = T.tsThisType = fve;
|
|
T.tSTupleType = T.tsTupleType = Dve;
|
|
T.tSTypeAliasDeclaration = T.tsTypeAliasDeclaration = Mve;
|
|
T.tSTypeAnnotation = T.tsTypeAnnotation = Zve;
|
|
T.tSTypeAssertion = T.tsTypeAssertion = qve;
|
|
T.tSTypeLiteral = T.tsTypeLiteral = gve;
|
|
T.tSTypeOperator = T.tsTypeOperator = _ve;
|
|
T.tSTypeParameter = T.tsTypeParameter = tEe;
|
|
T.tSTypeParameterDeclaration = T.tsTypeParameterDeclaration = eEe;
|
|
T.tSTypeParameterInstantiation = T.tsTypeParameterInstantiation = Qve;
|
|
T.tSTypePredicate = T.tsTypePredicate = mve;
|
|
T.tSTypeQuery = T.tsTypeQuery = yve;
|
|
T.tSTypeReference = T.tsTypeReference = hve;
|
|
T.tSUndefinedKeyword = T.tsUndefinedKeyword = uve;
|
|
T.tSUnionType = T.tsUnionType = Sve;
|
|
T.tSUnknownKeyword = T.tsUnknownKeyword = lve;
|
|
T.tSVoidKeyword = T.tsVoidKeyword = cve;
|
|
T.tupleExpression = MDe;
|
|
T.tupleTypeAnnotation = Vbe;
|
|
T.typeAlias = Kbe;
|
|
T.typeAnnotation = zbe;
|
|
T.typeCastExpression = Gbe;
|
|
T.typeParameter = Jbe;
|
|
T.typeParameterDeclaration = Xbe;
|
|
T.typeParameterInstantiation = Ybe;
|
|
T.typeofTypeAnnotation = Hbe;
|
|
T.unaryExpression = dge;
|
|
T.unionTypeAnnotation = Zbe;
|
|
T.updateExpression = pge;
|
|
T.v8IntrinsicIdentifier = PDe;
|
|
T.variableDeclaration = hge;
|
|
T.variableDeclarator = mge;
|
|
T.variance = Qbe;
|
|
T.voidTypeAnnotation = eDe;
|
|
T.whileStatement = yge;
|
|
T.withStatement = gge;
|
|
T.yieldExpression = Uge;
|
|
var x0e = ry(), oy = rd(), S0e = Zn(), {
|
|
validateInternal: x
|
|
} = x0e, {
|
|
NODE_FIELDS: q
|
|
} = S0e;
|
|
function T0e(e = []) {
|
|
let t = {
|
|
type: "ArrayExpression",
|
|
elements: e
|
|
}, r = q.ArrayExpression;
|
|
return x(r.elements, t, "elements", e, 1), t;
|
|
}
|
|
s(T0e, "arrayExpression");
|
|
function C0e(e, t, r) {
|
|
let i = {
|
|
type: "AssignmentExpression",
|
|
operator: e,
|
|
left: t,
|
|
right: r
|
|
}, n = q.AssignmentExpression;
|
|
return x(n.operator, i, "operator", e), x(n.left, i, "left", t, 1), x(n.right, i, "right", r, 1), i;
|
|
}
|
|
s(C0e, "assignmentExpression");
|
|
function w0e(e, t, r) {
|
|
let i = {
|
|
type: "BinaryExpression",
|
|
operator: e,
|
|
left: t,
|
|
right: r
|
|
}, n = q.BinaryExpression;
|
|
return x(n.operator, i, "operator", e), x(n.left, i, "left", t, 1), x(n.right, i, "right", r, 1), i;
|
|
}
|
|
s(w0e, "binaryExpression");
|
|
function A0e(e) {
|
|
let t = {
|
|
type: "InterpreterDirective",
|
|
value: e
|
|
}, r = q.InterpreterDirective;
|
|
return x(r.value, t, "value", e), t;
|
|
}
|
|
s(A0e, "interpreterDirective");
|
|
function _0e(e) {
|
|
let t = {
|
|
type: "Directive",
|
|
value: e
|
|
}, r = q.Directive;
|
|
return x(r.value, t, "value", e, 1), t;
|
|
}
|
|
s(_0e, "directive");
|
|
function P0e(e) {
|
|
let t = {
|
|
type: "DirectiveLiteral",
|
|
value: e
|
|
}, r = q.DirectiveLiteral;
|
|
return x(r.value, t, "value", e), t;
|
|
}
|
|
s(P0e, "directiveLiteral");
|
|
function F0e(e, t = []) {
|
|
let r = {
|
|
type: "BlockStatement",
|
|
body: e,
|
|
directives: t
|
|
}, i = q.BlockStatement;
|
|
return x(i.body, r, "body", e, 1), x(i.directives, r, "directives", t, 1), r;
|
|
}
|
|
s(F0e, "blockStatement");
|
|
function I0e(e = null) {
|
|
let t = {
|
|
type: "BreakStatement",
|
|
label: e
|
|
}, r = q.BreakStatement;
|
|
return x(r.label, t, "label", e, 1), t;
|
|
}
|
|
s(I0e, "breakStatement");
|
|
function O0e(e, t) {
|
|
let r = {
|
|
type: "CallExpression",
|
|
callee: e,
|
|
arguments: t
|
|
}, i = q.CallExpression;
|
|
return x(i.callee, r, "callee", e, 1), x(i.arguments, r, "arguments", t, 1), r;
|
|
}
|
|
s(O0e, "callExpression");
|
|
function k0e(e = null, t) {
|
|
let r = {
|
|
type: "CatchClause",
|
|
param: e,
|
|
body: t
|
|
}, i = q.CatchClause;
|
|
return x(i.param, r, "param", e, 1), x(i.body, r, "body", t, 1), r;
|
|
}
|
|
s(k0e, "catchClause");
|
|
function B0e(e, t, r) {
|
|
let i = {
|
|
type: "ConditionalExpression",
|
|
test: e,
|
|
consequent: t,
|
|
alternate: r
|
|
}, n = q.ConditionalExpression;
|
|
return x(n.test, i, "test", e, 1), x(n.consequent, i, "consequent", t, 1), x(n.alternate, i, "alternate", r, 1), i;
|
|
}
|
|
s(B0e, "conditionalExpression");
|
|
function N0e(e = null) {
|
|
let t = {
|
|
type: "ContinueStatement",
|
|
label: e
|
|
}, r = q.ContinueStatement;
|
|
return x(r.label, t, "label", e, 1), t;
|
|
}
|
|
s(N0e, "continueStatement");
|
|
function M0e() {
|
|
return {
|
|
type: "DebuggerStatement"
|
|
};
|
|
}
|
|
s(M0e, "debuggerStatement");
|
|
function R0e(e, t) {
|
|
let r = {
|
|
type: "DoWhileStatement",
|
|
test: e,
|
|
body: t
|
|
}, i = q.DoWhileStatement;
|
|
return x(i.test, r, "test", e, 1), x(i.body, r, "body", t, 1), r;
|
|
}
|
|
s(R0e, "doWhileStatement");
|
|
function j0e() {
|
|
return {
|
|
type: "EmptyStatement"
|
|
};
|
|
}
|
|
s(j0e, "emptyStatement");
|
|
function L0e(e) {
|
|
let t = {
|
|
type: "ExpressionStatement",
|
|
expression: e
|
|
}, r = q.ExpressionStatement;
|
|
return x(r.expression, t, "expression", e, 1), t;
|
|
}
|
|
s(L0e, "expressionStatement");
|
|
function q0e(e, t = null, r = null) {
|
|
let i = {
|
|
type: "File",
|
|
program: e,
|
|
comments: t,
|
|
tokens: r
|
|
}, n = q.File;
|
|
return x(n.program, i, "program", e, 1), x(n.comments, i, "comments", t, 1), x(n.tokens, i, "tokens", r), i;
|
|
}
|
|
s(q0e, "file");
|
|
function U0e(e, t, r) {
|
|
let i = {
|
|
type: "ForInStatement",
|
|
left: e,
|
|
right: t,
|
|
body: r
|
|
}, n = q.ForInStatement;
|
|
return x(n.left, i, "left", e, 1), x(n.right, i, "right", t, 1), x(n.body, i, "body", r, 1), i;
|
|
}
|
|
s(U0e, "forInStatement");
|
|
function W0e(e = null, t = null, r = null, i) {
|
|
let n = {
|
|
type: "ForStatement",
|
|
init: e,
|
|
test: t,
|
|
update: r,
|
|
body: i
|
|
}, a = q.ForStatement;
|
|
return x(a.init, n, "init", e, 1), x(a.test, n, "test", t, 1), x(a.update, n, "update", r, 1), x(a.body, n, "body", i, 1), n;
|
|
}
|
|
s(W0e, "forStatement");
|
|
function $0e(e = null, t, r, i = !1, n = !1) {
|
|
let a = {
|
|
type: "FunctionDeclaration",
|
|
id: e,
|
|
params: t,
|
|
body: r,
|
|
generator: i,
|
|
async: n
|
|
}, o = q.FunctionDeclaration;
|
|
return x(o.id, a, "id", e, 1), x(o.params, a, "params", t, 1), x(o.body, a, "body", r, 1), x(o.generator, a, "generator", i), x(o.async,
|
|
a, "async", n), a;
|
|
}
|
|
s($0e, "functionDeclaration");
|
|
function V0e(e = null, t, r, i = !1, n = !1) {
|
|
let a = {
|
|
type: "FunctionExpression",
|
|
id: e,
|
|
params: t,
|
|
body: r,
|
|
generator: i,
|
|
async: n
|
|
}, o = q.FunctionExpression;
|
|
return x(o.id, a, "id", e, 1), x(o.params, a, "params", t, 1), x(o.body, a, "body", r, 1), x(o.generator, a, "generator", i), x(o.async,
|
|
a, "async", n), a;
|
|
}
|
|
s(V0e, "functionExpression");
|
|
function H0e(e) {
|
|
let t = {
|
|
type: "Identifier",
|
|
name: e
|
|
}, r = q.Identifier;
|
|
return x(r.name, t, "name", e), t;
|
|
}
|
|
s(H0e, "identifier");
|
|
function K0e(e, t, r = null) {
|
|
let i = {
|
|
type: "IfStatement",
|
|
test: e,
|
|
consequent: t,
|
|
alternate: r
|
|
}, n = q.IfStatement;
|
|
return x(n.test, i, "test", e, 1), x(n.consequent, i, "consequent", t, 1), x(n.alternate, i, "alternate", r, 1), i;
|
|
}
|
|
s(K0e, "ifStatement");
|
|
function z0e(e, t) {
|
|
let r = {
|
|
type: "LabeledStatement",
|
|
label: e,
|
|
body: t
|
|
}, i = q.LabeledStatement;
|
|
return x(i.label, r, "label", e, 1), x(i.body, r, "body", t, 1), r;
|
|
}
|
|
s(z0e, "labeledStatement");
|
|
function G0e(e) {
|
|
let t = {
|
|
type: "StringLiteral",
|
|
value: e
|
|
}, r = q.StringLiteral;
|
|
return x(r.value, t, "value", e), t;
|
|
}
|
|
s(G0e, "stringLiteral");
|
|
function Rj(e) {
|
|
let t = {
|
|
type: "NumericLiteral",
|
|
value: e
|
|
}, r = q.NumericLiteral;
|
|
return x(r.value, t, "value", e), t;
|
|
}
|
|
s(Rj, "numericLiteral");
|
|
function J0e() {
|
|
return {
|
|
type: "NullLiteral"
|
|
};
|
|
}
|
|
s(J0e, "nullLiteral");
|
|
function X0e(e) {
|
|
let t = {
|
|
type: "BooleanLiteral",
|
|
value: e
|
|
}, r = q.BooleanLiteral;
|
|
return x(r.value, t, "value", e), t;
|
|
}
|
|
s(X0e, "booleanLiteral");
|
|
function jj(e, t = "") {
|
|
let r = {
|
|
type: "RegExpLiteral",
|
|
pattern: e,
|
|
flags: t
|
|
}, i = q.RegExpLiteral;
|
|
return x(i.pattern, r, "pattern", e), x(i.flags, r, "flags", t), r;
|
|
}
|
|
s(jj, "regExpLiteral");
|
|
function Y0e(e, t, r) {
|
|
let i = {
|
|
type: "LogicalExpression",
|
|
operator: e,
|
|
left: t,
|
|
right: r
|
|
}, n = q.LogicalExpression;
|
|
return x(n.operator, i, "operator", e), x(n.left, i, "left", t, 1), x(n.right, i, "right", r, 1), i;
|
|
}
|
|
s(Y0e, "logicalExpression");
|
|
function Z0e(e, t, r = !1, i = null) {
|
|
let n = {
|
|
type: "MemberExpression",
|
|
object: e,
|
|
property: t,
|
|
computed: r,
|
|
optional: i
|
|
}, a = q.MemberExpression;
|
|
return x(a.object, n, "object", e, 1), x(a.property, n, "property", t, 1), x(a.computed, n, "computed", r), x(a.optional, n, "optional",
|
|
i), n;
|
|
}
|
|
s(Z0e, "memberExpression");
|
|
function Q0e(e, t) {
|
|
let r = {
|
|
type: "NewExpression",
|
|
callee: e,
|
|
arguments: t
|
|
}, i = q.NewExpression;
|
|
return x(i.callee, r, "callee", e, 1), x(i.arguments, r, "arguments", t, 1), r;
|
|
}
|
|
s(Q0e, "newExpression");
|
|
function ege(e, t = [], r = "script", i = null) {
|
|
let n = {
|
|
type: "Program",
|
|
body: e,
|
|
directives: t,
|
|
sourceType: r,
|
|
interpreter: i
|
|
}, a = q.Program;
|
|
return x(a.body, n, "body", e, 1), x(a.directives, n, "directives", t, 1), x(a.sourceType, n, "sourceType", r), x(a.interpreter, n, "int\
|
|
erpreter", i, 1), n;
|
|
}
|
|
s(ege, "program");
|
|
function tge(e) {
|
|
let t = {
|
|
type: "ObjectExpression",
|
|
properties: e
|
|
}, r = q.ObjectExpression;
|
|
return x(r.properties, t, "properties", e, 1), t;
|
|
}
|
|
s(tge, "objectExpression");
|
|
function rge(e = "method", t, r, i, n = !1, a = !1, o = !1) {
|
|
let u = {
|
|
type: "ObjectMethod",
|
|
kind: e,
|
|
key: t,
|
|
params: r,
|
|
body: i,
|
|
computed: n,
|
|
generator: a,
|
|
async: o
|
|
}, l = q.ObjectMethod;
|
|
return x(l.kind, u, "kind", e), x(l.key, u, "key", t, 1), x(l.params, u, "params", r, 1), x(l.body, u, "body", i, 1), x(l.computed, u, "\
|
|
computed", n), x(l.generator, u, "generator", a), x(l.async, u, "async", o), u;
|
|
}
|
|
s(rge, "objectMethod");
|
|
function ige(e, t, r = !1, i = !1, n = null) {
|
|
let a = {
|
|
type: "ObjectProperty",
|
|
key: e,
|
|
value: t,
|
|
computed: r,
|
|
shorthand: i,
|
|
decorators: n
|
|
}, o = q.ObjectProperty;
|
|
return x(o.key, a, "key", e, 1), x(o.value, a, "value", t, 1), x(o.computed, a, "computed", r), x(o.shorthand, a, "shorthand", i), x(o.decorators,
|
|
a, "decorators", n, 1), a;
|
|
}
|
|
s(ige, "objectProperty");
|
|
function Lj(e) {
|
|
let t = {
|
|
type: "RestElement",
|
|
argument: e
|
|
}, r = q.RestElement;
|
|
return x(r.argument, t, "argument", e, 1), t;
|
|
}
|
|
s(Lj, "restElement");
|
|
function nge(e = null) {
|
|
let t = {
|
|
type: "ReturnStatement",
|
|
argument: e
|
|
}, r = q.ReturnStatement;
|
|
return x(r.argument, t, "argument", e, 1), t;
|
|
}
|
|
s(nge, "returnStatement");
|
|
function sge(e) {
|
|
let t = {
|
|
type: "SequenceExpression",
|
|
expressions: e
|
|
}, r = q.SequenceExpression;
|
|
return x(r.expressions, t, "expressions", e, 1), t;
|
|
}
|
|
s(sge, "sequenceExpression");
|
|
function age(e) {
|
|
let t = {
|
|
type: "ParenthesizedExpression",
|
|
expression: e
|
|
}, r = q.ParenthesizedExpression;
|
|
return x(r.expression, t, "expression", e, 1), t;
|
|
}
|
|
s(age, "parenthesizedExpression");
|
|
function oge(e = null, t) {
|
|
let r = {
|
|
type: "SwitchCase",
|
|
test: e,
|
|
consequent: t
|
|
}, i = q.SwitchCase;
|
|
return x(i.test, r, "test", e, 1), x(i.consequent, r, "consequent", t, 1), r;
|
|
}
|
|
s(oge, "switchCase");
|
|
function uge(e, t) {
|
|
let r = {
|
|
type: "SwitchStatement",
|
|
discriminant: e,
|
|
cases: t
|
|
}, i = q.SwitchStatement;
|
|
return x(i.discriminant, r, "discriminant", e, 1), x(i.cases, r, "cases", t, 1), r;
|
|
}
|
|
s(uge, "switchStatement");
|
|
function lge() {
|
|
return {
|
|
type: "ThisExpression"
|
|
};
|
|
}
|
|
s(lge, "thisExpression");
|
|
function cge(e) {
|
|
let t = {
|
|
type: "ThrowStatement",
|
|
argument: e
|
|
}, r = q.ThrowStatement;
|
|
return x(r.argument, t, "argument", e, 1), t;
|
|
}
|
|
s(cge, "throwStatement");
|
|
function fge(e, t = null, r = null) {
|
|
let i = {
|
|
type: "TryStatement",
|
|
block: e,
|
|
handler: t,
|
|
finalizer: r
|
|
}, n = q.TryStatement;
|
|
return x(n.block, i, "block", e, 1), x(n.handler, i, "handler", t, 1), x(n.finalizer, i, "finalizer", r, 1), i;
|
|
}
|
|
s(fge, "tryStatement");
|
|
function dge(e, t, r = !0) {
|
|
let i = {
|
|
type: "UnaryExpression",
|
|
operator: e,
|
|
argument: t,
|
|
prefix: r
|
|
}, n = q.UnaryExpression;
|
|
return x(n.operator, i, "operator", e), x(n.argument, i, "argument", t, 1), x(n.prefix, i, "prefix", r), i;
|
|
}
|
|
s(dge, "unaryExpression");
|
|
function pge(e, t, r = !1) {
|
|
let i = {
|
|
type: "UpdateExpression",
|
|
operator: e,
|
|
argument: t,
|
|
prefix: r
|
|
}, n = q.UpdateExpression;
|
|
return x(n.operator, i, "operator", e), x(n.argument, i, "argument", t, 1), x(n.prefix, i, "prefix", r), i;
|
|
}
|
|
s(pge, "updateExpression");
|
|
function hge(e, t) {
|
|
let r = {
|
|
type: "VariableDeclaration",
|
|
kind: e,
|
|
declarations: t
|
|
}, i = q.VariableDeclaration;
|
|
return x(i.kind, r, "kind", e), x(i.declarations, r, "declarations", t, 1), r;
|
|
}
|
|
s(hge, "variableDeclaration");
|
|
function mge(e, t = null) {
|
|
let r = {
|
|
type: "VariableDeclarator",
|
|
id: e,
|
|
init: t
|
|
}, i = q.VariableDeclarator;
|
|
return x(i.id, r, "id", e, 1), x(i.init, r, "init", t, 1), r;
|
|
}
|
|
s(mge, "variableDeclarator");
|
|
function yge(e, t) {
|
|
let r = {
|
|
type: "WhileStatement",
|
|
test: e,
|
|
body: t
|
|
}, i = q.WhileStatement;
|
|
return x(i.test, r, "test", e, 1), x(i.body, r, "body", t, 1), r;
|
|
}
|
|
s(yge, "whileStatement");
|
|
function gge(e, t) {
|
|
let r = {
|
|
type: "WithStatement",
|
|
object: e,
|
|
body: t
|
|
}, i = q.WithStatement;
|
|
return x(i.object, r, "object", e, 1), x(i.body, r, "body", t, 1), r;
|
|
}
|
|
s(gge, "withStatement");
|
|
function bge(e, t) {
|
|
let r = {
|
|
type: "AssignmentPattern",
|
|
left: e,
|
|
right: t
|
|
}, i = q.AssignmentPattern;
|
|
return x(i.left, r, "left", e, 1), x(i.right, r, "right", t, 1), r;
|
|
}
|
|
s(bge, "assignmentPattern");
|
|
function Dge(e) {
|
|
let t = {
|
|
type: "ArrayPattern",
|
|
elements: e
|
|
}, r = q.ArrayPattern;
|
|
return x(r.elements, t, "elements", e, 1), t;
|
|
}
|
|
s(Dge, "arrayPattern");
|
|
function vge(e, t, r = !1) {
|
|
let i = {
|
|
type: "ArrowFunctionExpression",
|
|
params: e,
|
|
body: t,
|
|
async: r,
|
|
expression: null
|
|
}, n = q.ArrowFunctionExpression;
|
|
return x(n.params, i, "params", e, 1), x(n.body, i, "body", t, 1), x(n.async, i, "async", r), i;
|
|
}
|
|
s(vge, "arrowFunctionExpression");
|
|
function Ege(e) {
|
|
let t = {
|
|
type: "ClassBody",
|
|
body: e
|
|
}, r = q.ClassBody;
|
|
return x(r.body, t, "body", e, 1), t;
|
|
}
|
|
s(Ege, "classBody");
|
|
function xge(e = null, t = null, r, i = null) {
|
|
let n = {
|
|
type: "ClassExpression",
|
|
id: e,
|
|
superClass: t,
|
|
body: r,
|
|
decorators: i
|
|
}, a = q.ClassExpression;
|
|
return x(a.id, n, "id", e, 1), x(a.superClass, n, "superClass", t, 1), x(a.body, n, "body", r, 1), x(a.decorators, n, "decorators", i, 1),
|
|
n;
|
|
}
|
|
s(xge, "classExpression");
|
|
function Sge(e = null, t = null, r, i = null) {
|
|
let n = {
|
|
type: "ClassDeclaration",
|
|
id: e,
|
|
superClass: t,
|
|
body: r,
|
|
decorators: i
|
|
}, a = q.ClassDeclaration;
|
|
return x(a.id, n, "id", e, 1), x(a.superClass, n, "superClass", t, 1), x(a.body, n, "body", r, 1), x(a.decorators, n, "decorators", i, 1),
|
|
n;
|
|
}
|
|
s(Sge, "classDeclaration");
|
|
function Tge(e) {
|
|
let t = {
|
|
type: "ExportAllDeclaration",
|
|
source: e
|
|
}, r = q.ExportAllDeclaration;
|
|
return x(r.source, t, "source", e, 1), t;
|
|
}
|
|
s(Tge, "exportAllDeclaration");
|
|
function Cge(e) {
|
|
let t = {
|
|
type: "ExportDefaultDeclaration",
|
|
declaration: e
|
|
}, r = q.ExportDefaultDeclaration;
|
|
return x(r.declaration, t, "declaration", e, 1), t;
|
|
}
|
|
s(Cge, "exportDefaultDeclaration");
|
|
function wge(e = null, t = [], r = null) {
|
|
let i = {
|
|
type: "ExportNamedDeclaration",
|
|
declaration: e,
|
|
specifiers: t,
|
|
source: r
|
|
}, n = q.ExportNamedDeclaration;
|
|
return x(n.declaration, i, "declaration", e, 1), x(n.specifiers, i, "specifiers", t, 1), x(n.source, i, "source", r, 1), i;
|
|
}
|
|
s(wge, "exportNamedDeclaration");
|
|
function Age(e, t) {
|
|
let r = {
|
|
type: "ExportSpecifier",
|
|
local: e,
|
|
exported: t
|
|
}, i = q.ExportSpecifier;
|
|
return x(i.local, r, "local", e, 1), x(i.exported, r, "exported", t, 1), r;
|
|
}
|
|
s(Age, "exportSpecifier");
|
|
function _ge(e, t, r, i = !1) {
|
|
let n = {
|
|
type: "ForOfStatement",
|
|
left: e,
|
|
right: t,
|
|
body: r,
|
|
await: i
|
|
}, a = q.ForOfStatement;
|
|
return x(a.left, n, "left", e, 1), x(a.right, n, "right", t, 1), x(a.body, n, "body", r, 1), x(a.await, n, "await", i), n;
|
|
}
|
|
s(_ge, "forOfStatement");
|
|
function Pge(e, t) {
|
|
let r = {
|
|
type: "ImportDeclaration",
|
|
specifiers: e,
|
|
source: t
|
|
}, i = q.ImportDeclaration;
|
|
return x(i.specifiers, r, "specifiers", e, 1), x(i.source, r, "source", t, 1), r;
|
|
}
|
|
s(Pge, "importDeclaration");
|
|
function Fge(e) {
|
|
let t = {
|
|
type: "ImportDefaultSpecifier",
|
|
local: e
|
|
}, r = q.ImportDefaultSpecifier;
|
|
return x(r.local, t, "local", e, 1), t;
|
|
}
|
|
s(Fge, "importDefaultSpecifier");
|
|
function Ige(e) {
|
|
let t = {
|
|
type: "ImportNamespaceSpecifier",
|
|
local: e
|
|
}, r = q.ImportNamespaceSpecifier;
|
|
return x(r.local, t, "local", e, 1), t;
|
|
}
|
|
s(Ige, "importNamespaceSpecifier");
|
|
function Oge(e, t) {
|
|
let r = {
|
|
type: "ImportSpecifier",
|
|
local: e,
|
|
imported: t
|
|
}, i = q.ImportSpecifier;
|
|
return x(i.local, r, "local", e, 1), x(i.imported, r, "imported", t, 1), r;
|
|
}
|
|
s(Oge, "importSpecifier");
|
|
function kge(e, t = null) {
|
|
let r = {
|
|
type: "ImportExpression",
|
|
source: e,
|
|
options: t
|
|
}, i = q.ImportExpression;
|
|
return x(i.source, r, "source", e, 1), x(i.options, r, "options", t, 1), r;
|
|
}
|
|
s(kge, "importExpression");
|
|
function Bge(e, t) {
|
|
let r = {
|
|
type: "MetaProperty",
|
|
meta: e,
|
|
property: t
|
|
}, i = q.MetaProperty;
|
|
return x(i.meta, r, "meta", e, 1), x(i.property, r, "property", t, 1), r;
|
|
}
|
|
s(Bge, "metaProperty");
|
|
function Nge(e = "method", t, r, i, n = !1, a = !1, o = !1, u = !1) {
|
|
let l = {
|
|
type: "ClassMethod",
|
|
kind: e,
|
|
key: t,
|
|
params: r,
|
|
body: i,
|
|
computed: n,
|
|
static: a,
|
|
generator: o,
|
|
async: u
|
|
}, c = q.ClassMethod;
|
|
return x(c.kind, l, "kind", e), x(c.key, l, "key", t, 1), x(c.params, l, "params", r, 1), x(c.body, l, "body", i, 1), x(c.computed, l, "\
|
|
computed", n), x(c.static, l, "static", a), x(c.generator, l, "generator", o), x(c.async, l, "async", u), l;
|
|
}
|
|
s(Nge, "classMethod");
|
|
function Mge(e) {
|
|
let t = {
|
|
type: "ObjectPattern",
|
|
properties: e
|
|
}, r = q.ObjectPattern;
|
|
return x(r.properties, t, "properties", e, 1), t;
|
|
}
|
|
s(Mge, "objectPattern");
|
|
function qj(e) {
|
|
let t = {
|
|
type: "SpreadElement",
|
|
argument: e
|
|
}, r = q.SpreadElement;
|
|
return x(r.argument, t, "argument", e, 1), t;
|
|
}
|
|
s(qj, "spreadElement");
|
|
function Rge() {
|
|
return {
|
|
type: "Super"
|
|
};
|
|
}
|
|
s(Rge, "_super");
|
|
function jge(e, t) {
|
|
let r = {
|
|
type: "TaggedTemplateExpression",
|
|
tag: e,
|
|
quasi: t
|
|
}, i = q.TaggedTemplateExpression;
|
|
return x(i.tag, r, "tag", e, 1), x(i.quasi, r, "quasi", t, 1), r;
|
|
}
|
|
s(jge, "taggedTemplateExpression");
|
|
function Lge(e, t = !1) {
|
|
let r = {
|
|
type: "TemplateElement",
|
|
value: e,
|
|
tail: t
|
|
}, i = q.TemplateElement;
|
|
return x(i.value, r, "value", e), x(i.tail, r, "tail", t), r;
|
|
}
|
|
s(Lge, "templateElement");
|
|
function qge(e, t) {
|
|
let r = {
|
|
type: "TemplateLiteral",
|
|
quasis: e,
|
|
expressions: t
|
|
}, i = q.TemplateLiteral;
|
|
return x(i.quasis, r, "quasis", e, 1), x(i.expressions, r, "expressions", t, 1), r;
|
|
}
|
|
s(qge, "templateLiteral");
|
|
function Uge(e = null, t = !1) {
|
|
let r = {
|
|
type: "YieldExpression",
|
|
argument: e,
|
|
delegate: t
|
|
}, i = q.YieldExpression;
|
|
return x(i.argument, r, "argument", e, 1), x(i.delegate, r, "delegate", t), r;
|
|
}
|
|
s(Uge, "yieldExpression");
|
|
function Wge(e) {
|
|
let t = {
|
|
type: "AwaitExpression",
|
|
argument: e
|
|
}, r = q.AwaitExpression;
|
|
return x(r.argument, t, "argument", e, 1), t;
|
|
}
|
|
s(Wge, "awaitExpression");
|
|
function $ge() {
|
|
return {
|
|
type: "Import"
|
|
};
|
|
}
|
|
s($ge, "_import");
|
|
function Vge(e) {
|
|
let t = {
|
|
type: "BigIntLiteral",
|
|
value: e
|
|
}, r = q.BigIntLiteral;
|
|
return x(r.value, t, "value", e), t;
|
|
}
|
|
s(Vge, "bigIntLiteral");
|
|
function Hge(e) {
|
|
let t = {
|
|
type: "ExportNamespaceSpecifier",
|
|
exported: e
|
|
}, r = q.ExportNamespaceSpecifier;
|
|
return x(r.exported, t, "exported", e, 1), t;
|
|
}
|
|
s(Hge, "exportNamespaceSpecifier");
|
|
function Kge(e, t, r = !1, i) {
|
|
let n = {
|
|
type: "OptionalMemberExpression",
|
|
object: e,
|
|
property: t,
|
|
computed: r,
|
|
optional: i
|
|
}, a = q.OptionalMemberExpression;
|
|
return x(a.object, n, "object", e, 1), x(a.property, n, "property", t, 1), x(a.computed, n, "computed", r), x(a.optional, n, "optional",
|
|
i), n;
|
|
}
|
|
s(Kge, "optionalMemberExpression");
|
|
function zge(e, t, r) {
|
|
let i = {
|
|
type: "OptionalCallExpression",
|
|
callee: e,
|
|
arguments: t,
|
|
optional: r
|
|
}, n = q.OptionalCallExpression;
|
|
return x(n.callee, i, "callee", e, 1), x(n.arguments, i, "arguments", t, 1), x(n.optional, i, "optional", r), i;
|
|
}
|
|
s(zge, "optionalCallExpression");
|
|
function Gge(e, t = null, r = null, i = null, n = !1, a = !1) {
|
|
let o = {
|
|
type: "ClassProperty",
|
|
key: e,
|
|
value: t,
|
|
typeAnnotation: r,
|
|
decorators: i,
|
|
computed: n,
|
|
static: a
|
|
}, u = q.ClassProperty;
|
|
return x(u.key, o, "key", e, 1), x(u.value, o, "value", t, 1), x(u.typeAnnotation, o, "typeAnnotation", r, 1), x(u.decorators, o, "decor\
|
|
ators", i, 1), x(u.computed, o, "computed", n), x(u.static, o, "static", a), o;
|
|
}
|
|
s(Gge, "classProperty");
|
|
function Jge(e, t = null, r = null, i = null, n = !1, a = !1) {
|
|
let o = {
|
|
type: "ClassAccessorProperty",
|
|
key: e,
|
|
value: t,
|
|
typeAnnotation: r,
|
|
decorators: i,
|
|
computed: n,
|
|
static: a
|
|
}, u = q.ClassAccessorProperty;
|
|
return x(u.key, o, "key", e, 1), x(u.value, o, "value", t, 1), x(u.typeAnnotation, o, "typeAnnotation", r, 1), x(u.decorators, o, "decor\
|
|
ators", i, 1), x(u.computed, o, "computed", n), x(u.static, o, "static", a), o;
|
|
}
|
|
s(Jge, "classAccessorProperty");
|
|
function Xge(e, t = null, r = null, i = !1) {
|
|
let n = {
|
|
type: "ClassPrivateProperty",
|
|
key: e,
|
|
value: t,
|
|
decorators: r,
|
|
static: i
|
|
}, a = q.ClassPrivateProperty;
|
|
return x(a.key, n, "key", e, 1), x(a.value, n, "value", t, 1), x(a.decorators, n, "decorators", r, 1), x(a.static, n, "static", i), n;
|
|
}
|
|
s(Xge, "classPrivateProperty");
|
|
function Yge(e = "method", t, r, i, n = !1) {
|
|
let a = {
|
|
type: "ClassPrivateMethod",
|
|
kind: e,
|
|
key: t,
|
|
params: r,
|
|
body: i,
|
|
static: n
|
|
}, o = q.ClassPrivateMethod;
|
|
return x(o.kind, a, "kind", e), x(o.key, a, "key", t, 1), x(o.params, a, "params", r, 1), x(o.body, a, "body", i, 1), x(o.static, a, "st\
|
|
atic", n), a;
|
|
}
|
|
s(Yge, "classPrivateMethod");
|
|
function Zge(e) {
|
|
let t = {
|
|
type: "PrivateName",
|
|
id: e
|
|
}, r = q.PrivateName;
|
|
return x(r.id, t, "id", e, 1), t;
|
|
}
|
|
s(Zge, "privateName");
|
|
function Qge(e) {
|
|
let t = {
|
|
type: "StaticBlock",
|
|
body: e
|
|
}, r = q.StaticBlock;
|
|
return x(r.body, t, "body", e, 1), t;
|
|
}
|
|
s(Qge, "staticBlock");
|
|
function ebe(e, t) {
|
|
let r = {
|
|
type: "ImportAttribute",
|
|
key: e,
|
|
value: t
|
|
}, i = q.ImportAttribute;
|
|
return x(i.key, r, "key", e, 1), x(i.value, r, "value", t, 1), r;
|
|
}
|
|
s(ebe, "importAttribute");
|
|
function tbe() {
|
|
return {
|
|
type: "AnyTypeAnnotation"
|
|
};
|
|
}
|
|
s(tbe, "anyTypeAnnotation");
|
|
function rbe(e) {
|
|
let t = {
|
|
type: "ArrayTypeAnnotation",
|
|
elementType: e
|
|
}, r = q.ArrayTypeAnnotation;
|
|
return x(r.elementType, t, "elementType", e, 1), t;
|
|
}
|
|
s(rbe, "arrayTypeAnnotation");
|
|
function ibe() {
|
|
return {
|
|
type: "BooleanTypeAnnotation"
|
|
};
|
|
}
|
|
s(ibe, "booleanTypeAnnotation");
|
|
function nbe(e) {
|
|
let t = {
|
|
type: "BooleanLiteralTypeAnnotation",
|
|
value: e
|
|
}, r = q.BooleanLiteralTypeAnnotation;
|
|
return x(r.value, t, "value", e), t;
|
|
}
|
|
s(nbe, "booleanLiteralTypeAnnotation");
|
|
function sbe() {
|
|
return {
|
|
type: "NullLiteralTypeAnnotation"
|
|
};
|
|
}
|
|
s(sbe, "nullLiteralTypeAnnotation");
|
|
function abe(e, t = null) {
|
|
let r = {
|
|
type: "ClassImplements",
|
|
id: e,
|
|
typeParameters: t
|
|
}, i = q.ClassImplements;
|
|
return x(i.id, r, "id", e, 1), x(i.typeParameters, r, "typeParameters", t, 1), r;
|
|
}
|
|
s(abe, "classImplements");
|
|
function obe(e, t = null, r = null, i) {
|
|
let n = {
|
|
type: "DeclareClass",
|
|
id: e,
|
|
typeParameters: t,
|
|
extends: r,
|
|
body: i
|
|
}, a = q.DeclareClass;
|
|
return x(a.id, n, "id", e, 1), x(a.typeParameters, n, "typeParameters", t, 1), x(a.extends, n, "extends", r, 1), x(a.body, n, "body", i,
|
|
1), n;
|
|
}
|
|
s(obe, "declareClass");
|
|
function ube(e) {
|
|
let t = {
|
|
type: "DeclareFunction",
|
|
id: e
|
|
}, r = q.DeclareFunction;
|
|
return x(r.id, t, "id", e, 1), t;
|
|
}
|
|
s(ube, "declareFunction");
|
|
function lbe(e, t = null, r = null, i) {
|
|
let n = {
|
|
type: "DeclareInterface",
|
|
id: e,
|
|
typeParameters: t,
|
|
extends: r,
|
|
body: i
|
|
}, a = q.DeclareInterface;
|
|
return x(a.id, n, "id", e, 1), x(a.typeParameters, n, "typeParameters", t, 1), x(a.extends, n, "extends", r, 1), x(a.body, n, "body", i,
|
|
1), n;
|
|
}
|
|
s(lbe, "declareInterface");
|
|
function cbe(e, t, r = null) {
|
|
let i = {
|
|
type: "DeclareModule",
|
|
id: e,
|
|
body: t,
|
|
kind: r
|
|
}, n = q.DeclareModule;
|
|
return x(n.id, i, "id", e, 1), x(n.body, i, "body", t, 1), x(n.kind, i, "kind", r), i;
|
|
}
|
|
s(cbe, "declareModule");
|
|
function fbe(e) {
|
|
let t = {
|
|
type: "DeclareModuleExports",
|
|
typeAnnotation: e
|
|
}, r = q.DeclareModuleExports;
|
|
return x(r.typeAnnotation, t, "typeAnnotation", e, 1), t;
|
|
}
|
|
s(fbe, "declareModuleExports");
|
|
function dbe(e, t = null, r) {
|
|
let i = {
|
|
type: "DeclareTypeAlias",
|
|
id: e,
|
|
typeParameters: t,
|
|
right: r
|
|
}, n = q.DeclareTypeAlias;
|
|
return x(n.id, i, "id", e, 1), x(n.typeParameters, i, "typeParameters", t, 1), x(n.right, i, "right", r, 1), i;
|
|
}
|
|
s(dbe, "declareTypeAlias");
|
|
function pbe(e, t = null, r = null) {
|
|
let i = {
|
|
type: "DeclareOpaqueType",
|
|
id: e,
|
|
typeParameters: t,
|
|
supertype: r
|
|
}, n = q.DeclareOpaqueType;
|
|
return x(n.id, i, "id", e, 1), x(n.typeParameters, i, "typeParameters", t, 1), x(n.supertype, i, "supertype", r, 1), i;
|
|
}
|
|
s(pbe, "declareOpaqueType");
|
|
function hbe(e) {
|
|
let t = {
|
|
type: "DeclareVariable",
|
|
id: e
|
|
}, r = q.DeclareVariable;
|
|
return x(r.id, t, "id", e, 1), t;
|
|
}
|
|
s(hbe, "declareVariable");
|
|
function mbe(e = null, t = null, r = null, i = null) {
|
|
let n = {
|
|
type: "DeclareExportDeclaration",
|
|
declaration: e,
|
|
specifiers: t,
|
|
source: r,
|
|
attributes: i
|
|
}, a = q.DeclareExportDeclaration;
|
|
return x(a.declaration, n, "declaration", e, 1), x(a.specifiers, n, "specifiers", t, 1), x(a.source, n, "source", r, 1), x(a.attributes,
|
|
n, "attributes", i, 1), n;
|
|
}
|
|
s(mbe, "declareExportDeclaration");
|
|
function ybe(e, t = null) {
|
|
let r = {
|
|
type: "DeclareExportAllDeclaration",
|
|
source: e,
|
|
attributes: t
|
|
}, i = q.DeclareExportAllDeclaration;
|
|
return x(i.source, r, "source", e, 1), x(i.attributes, r, "attributes", t, 1), r;
|
|
}
|
|
s(ybe, "declareExportAllDeclaration");
|
|
function gbe(e) {
|
|
let t = {
|
|
type: "DeclaredPredicate",
|
|
value: e
|
|
}, r = q.DeclaredPredicate;
|
|
return x(r.value, t, "value", e, 1), t;
|
|
}
|
|
s(gbe, "declaredPredicate");
|
|
function bbe() {
|
|
return {
|
|
type: "ExistsTypeAnnotation"
|
|
};
|
|
}
|
|
s(bbe, "existsTypeAnnotation");
|
|
function Dbe(e = null, t, r = null, i) {
|
|
let n = {
|
|
type: "FunctionTypeAnnotation",
|
|
typeParameters: e,
|
|
params: t,
|
|
rest: r,
|
|
returnType: i
|
|
}, a = q.FunctionTypeAnnotation;
|
|
return x(a.typeParameters, n, "typeParameters", e, 1), x(a.params, n, "params", t, 1), x(a.rest, n, "rest", r, 1), x(a.returnType, n, "r\
|
|
eturnType", i, 1), n;
|
|
}
|
|
s(Dbe, "functionTypeAnnotation");
|
|
function vbe(e = null, t) {
|
|
let r = {
|
|
type: "FunctionTypeParam",
|
|
name: e,
|
|
typeAnnotation: t
|
|
}, i = q.FunctionTypeParam;
|
|
return x(i.name, r, "name", e, 1), x(i.typeAnnotation, r, "typeAnnotation", t, 1), r;
|
|
}
|
|
s(vbe, "functionTypeParam");
|
|
function Ebe(e, t = null) {
|
|
let r = {
|
|
type: "GenericTypeAnnotation",
|
|
id: e,
|
|
typeParameters: t
|
|
}, i = q.GenericTypeAnnotation;
|
|
return x(i.id, r, "id", e, 1), x(i.typeParameters, r, "typeParameters", t, 1), r;
|
|
}
|
|
s(Ebe, "genericTypeAnnotation");
|
|
function xbe() {
|
|
return {
|
|
type: "InferredPredicate"
|
|
};
|
|
}
|
|
s(xbe, "inferredPredicate");
|
|
function Sbe(e, t = null) {
|
|
let r = {
|
|
type: "InterfaceExtends",
|
|
id: e,
|
|
typeParameters: t
|
|
}, i = q.InterfaceExtends;
|
|
return x(i.id, r, "id", e, 1), x(i.typeParameters, r, "typeParameters", t, 1), r;
|
|
}
|
|
s(Sbe, "interfaceExtends");
|
|
function Tbe(e, t = null, r = null, i) {
|
|
let n = {
|
|
type: "InterfaceDeclaration",
|
|
id: e,
|
|
typeParameters: t,
|
|
extends: r,
|
|
body: i
|
|
}, a = q.InterfaceDeclaration;
|
|
return x(a.id, n, "id", e, 1), x(a.typeParameters, n, "typeParameters", t, 1), x(a.extends, n, "extends", r, 1), x(a.body, n, "body", i,
|
|
1), n;
|
|
}
|
|
s(Tbe, "interfaceDeclaration");
|
|
function Cbe(e = null, t) {
|
|
let r = {
|
|
type: "InterfaceTypeAnnotation",
|
|
extends: e,
|
|
body: t
|
|
}, i = q.InterfaceTypeAnnotation;
|
|
return x(i.extends, r, "extends", e, 1), x(i.body, r, "body", t, 1), r;
|
|
}
|
|
s(Cbe, "interfaceTypeAnnotation");
|
|
function wbe(e) {
|
|
let t = {
|
|
type: "IntersectionTypeAnnotation",
|
|
types: e
|
|
}, r = q.IntersectionTypeAnnotation;
|
|
return x(r.types, t, "types", e, 1), t;
|
|
}
|
|
s(wbe, "intersectionTypeAnnotation");
|
|
function Abe() {
|
|
return {
|
|
type: "MixedTypeAnnotation"
|
|
};
|
|
}
|
|
s(Abe, "mixedTypeAnnotation");
|
|
function _be() {
|
|
return {
|
|
type: "EmptyTypeAnnotation"
|
|
};
|
|
}
|
|
s(_be, "emptyTypeAnnotation");
|
|
function Pbe(e) {
|
|
let t = {
|
|
type: "NullableTypeAnnotation",
|
|
typeAnnotation: e
|
|
}, r = q.NullableTypeAnnotation;
|
|
return x(r.typeAnnotation, t, "typeAnnotation", e, 1), t;
|
|
}
|
|
s(Pbe, "nullableTypeAnnotation");
|
|
function Fbe(e) {
|
|
let t = {
|
|
type: "NumberLiteralTypeAnnotation",
|
|
value: e
|
|
}, r = q.NumberLiteralTypeAnnotation;
|
|
return x(r.value, t, "value", e), t;
|
|
}
|
|
s(Fbe, "numberLiteralTypeAnnotation");
|
|
function Ibe() {
|
|
return {
|
|
type: "NumberTypeAnnotation"
|
|
};
|
|
}
|
|
s(Ibe, "numberTypeAnnotation");
|
|
function Obe(e, t = [], r = [], i = [], n = !1) {
|
|
let a = {
|
|
type: "ObjectTypeAnnotation",
|
|
properties: e,
|
|
indexers: t,
|
|
callProperties: r,
|
|
internalSlots: i,
|
|
exact: n
|
|
}, o = q.ObjectTypeAnnotation;
|
|
return x(o.properties, a, "properties", e, 1), x(o.indexers, a, "indexers", t, 1), x(o.callProperties, a, "callProperties", r, 1), x(o.internalSlots,
|
|
a, "internalSlots", i, 1), x(o.exact, a, "exact", n), a;
|
|
}
|
|
s(Obe, "objectTypeAnnotation");
|
|
function kbe(e, t, r, i, n) {
|
|
let a = {
|
|
type: "ObjectTypeInternalSlot",
|
|
id: e,
|
|
value: t,
|
|
optional: r,
|
|
static: i,
|
|
method: n
|
|
}, o = q.ObjectTypeInternalSlot;
|
|
return x(o.id, a, "id", e, 1), x(o.value, a, "value", t, 1), x(o.optional, a, "optional", r), x(o.static, a, "static", i), x(o.method, a,
|
|
"method", n), a;
|
|
}
|
|
s(kbe, "objectTypeInternalSlot");
|
|
function Bbe(e) {
|
|
let t = {
|
|
type: "ObjectTypeCallProperty",
|
|
value: e,
|
|
static: null
|
|
}, r = q.ObjectTypeCallProperty;
|
|
return x(r.value, t, "value", e, 1), t;
|
|
}
|
|
s(Bbe, "objectTypeCallProperty");
|
|
function Nbe(e = null, t, r, i = null) {
|
|
let n = {
|
|
type: "ObjectTypeIndexer",
|
|
id: e,
|
|
key: t,
|
|
value: r,
|
|
variance: i,
|
|
static: null
|
|
}, a = q.ObjectTypeIndexer;
|
|
return x(a.id, n, "id", e, 1), x(a.key, n, "key", t, 1), x(a.value, n, "value", r, 1), x(a.variance, n, "variance", i, 1), n;
|
|
}
|
|
s(Nbe, "objectTypeIndexer");
|
|
function Mbe(e, t, r = null) {
|
|
let i = {
|
|
type: "ObjectTypeProperty",
|
|
key: e,
|
|
value: t,
|
|
variance: r,
|
|
kind: null,
|
|
method: null,
|
|
optional: null,
|
|
proto: null,
|
|
static: null
|
|
}, n = q.ObjectTypeProperty;
|
|
return x(n.key, i, "key", e, 1), x(n.value, i, "value", t, 1), x(n.variance, i, "variance", r, 1), i;
|
|
}
|
|
s(Mbe, "objectTypeProperty");
|
|
function Rbe(e) {
|
|
let t = {
|
|
type: "ObjectTypeSpreadProperty",
|
|
argument: e
|
|
}, r = q.ObjectTypeSpreadProperty;
|
|
return x(r.argument, t, "argument", e, 1), t;
|
|
}
|
|
s(Rbe, "objectTypeSpreadProperty");
|
|
function jbe(e, t = null, r = null, i) {
|
|
let n = {
|
|
type: "OpaqueType",
|
|
id: e,
|
|
typeParameters: t,
|
|
supertype: r,
|
|
impltype: i
|
|
}, a = q.OpaqueType;
|
|
return x(a.id, n, "id", e, 1), x(a.typeParameters, n, "typeParameters", t, 1), x(a.supertype, n, "supertype", r, 1), x(a.impltype, n, "i\
|
|
mpltype", i, 1), n;
|
|
}
|
|
s(jbe, "opaqueType");
|
|
function Lbe(e, t) {
|
|
let r = {
|
|
type: "QualifiedTypeIdentifier",
|
|
id: e,
|
|
qualification: t
|
|
}, i = q.QualifiedTypeIdentifier;
|
|
return x(i.id, r, "id", e, 1), x(i.qualification, r, "qualification", t, 1), r;
|
|
}
|
|
s(Lbe, "qualifiedTypeIdentifier");
|
|
function qbe(e) {
|
|
let t = {
|
|
type: "StringLiteralTypeAnnotation",
|
|
value: e
|
|
}, r = q.StringLiteralTypeAnnotation;
|
|
return x(r.value, t, "value", e), t;
|
|
}
|
|
s(qbe, "stringLiteralTypeAnnotation");
|
|
function Ube() {
|
|
return {
|
|
type: "StringTypeAnnotation"
|
|
};
|
|
}
|
|
s(Ube, "stringTypeAnnotation");
|
|
function Wbe() {
|
|
return {
|
|
type: "SymbolTypeAnnotation"
|
|
};
|
|
}
|
|
s(Wbe, "symbolTypeAnnotation");
|
|
function $be() {
|
|
return {
|
|
type: "ThisTypeAnnotation"
|
|
};
|
|
}
|
|
s($be, "thisTypeAnnotation");
|
|
function Vbe(e) {
|
|
let t = {
|
|
type: "TupleTypeAnnotation",
|
|
types: e
|
|
}, r = q.TupleTypeAnnotation;
|
|
return x(r.types, t, "types", e, 1), t;
|
|
}
|
|
s(Vbe, "tupleTypeAnnotation");
|
|
function Hbe(e) {
|
|
let t = {
|
|
type: "TypeofTypeAnnotation",
|
|
argument: e
|
|
}, r = q.TypeofTypeAnnotation;
|
|
return x(r.argument, t, "argument", e, 1), t;
|
|
}
|
|
s(Hbe, "typeofTypeAnnotation");
|
|
function Kbe(e, t = null, r) {
|
|
let i = {
|
|
type: "TypeAlias",
|
|
id: e,
|
|
typeParameters: t,
|
|
right: r
|
|
}, n = q.TypeAlias;
|
|
return x(n.id, i, "id", e, 1), x(n.typeParameters, i, "typeParameters", t, 1), x(n.right, i, "right", r, 1), i;
|
|
}
|
|
s(Kbe, "typeAlias");
|
|
function zbe(e) {
|
|
let t = {
|
|
type: "TypeAnnotation",
|
|
typeAnnotation: e
|
|
}, r = q.TypeAnnotation;
|
|
return x(r.typeAnnotation, t, "typeAnnotation", e, 1), t;
|
|
}
|
|
s(zbe, "typeAnnotation");
|
|
function Gbe(e, t) {
|
|
let r = {
|
|
type: "TypeCastExpression",
|
|
expression: e,
|
|
typeAnnotation: t
|
|
}, i = q.TypeCastExpression;
|
|
return x(i.expression, r, "expression", e, 1), x(i.typeAnnotation, r, "typeAnnotation", t, 1), r;
|
|
}
|
|
s(Gbe, "typeCastExpression");
|
|
function Jbe(e = null, t = null, r = null) {
|
|
let i = {
|
|
type: "TypeParameter",
|
|
bound: e,
|
|
default: t,
|
|
variance: r,
|
|
name: null
|
|
}, n = q.TypeParameter;
|
|
return x(n.bound, i, "bound", e, 1), x(n.default, i, "default", t, 1), x(n.variance, i, "variance", r, 1), i;
|
|
}
|
|
s(Jbe, "typeParameter");
|
|
function Xbe(e) {
|
|
let t = {
|
|
type: "TypeParameterDeclaration",
|
|
params: e
|
|
}, r = q.TypeParameterDeclaration;
|
|
return x(r.params, t, "params", e, 1), t;
|
|
}
|
|
s(Xbe, "typeParameterDeclaration");
|
|
function Ybe(e) {
|
|
let t = {
|
|
type: "TypeParameterInstantiation",
|
|
params: e
|
|
}, r = q.TypeParameterInstantiation;
|
|
return x(r.params, t, "params", e, 1), t;
|
|
}
|
|
s(Ybe, "typeParameterInstantiation");
|
|
function Zbe(e) {
|
|
let t = {
|
|
type: "UnionTypeAnnotation",
|
|
types: e
|
|
}, r = q.UnionTypeAnnotation;
|
|
return x(r.types, t, "types", e, 1), t;
|
|
}
|
|
s(Zbe, "unionTypeAnnotation");
|
|
function Qbe(e) {
|
|
let t = {
|
|
type: "Variance",
|
|
kind: e
|
|
}, r = q.Variance;
|
|
return x(r.kind, t, "kind", e), t;
|
|
}
|
|
s(Qbe, "variance");
|
|
function eDe() {
|
|
return {
|
|
type: "VoidTypeAnnotation"
|
|
};
|
|
}
|
|
s(eDe, "voidTypeAnnotation");
|
|
function tDe(e, t) {
|
|
let r = {
|
|
type: "EnumDeclaration",
|
|
id: e,
|
|
body: t
|
|
}, i = q.EnumDeclaration;
|
|
return x(i.id, r, "id", e, 1), x(i.body, r, "body", t, 1), r;
|
|
}
|
|
s(tDe, "enumDeclaration");
|
|
function rDe(e) {
|
|
let t = {
|
|
type: "EnumBooleanBody",
|
|
members: e,
|
|
explicitType: null,
|
|
hasUnknownMembers: null
|
|
}, r = q.EnumBooleanBody;
|
|
return x(r.members, t, "members", e, 1), t;
|
|
}
|
|
s(rDe, "enumBooleanBody");
|
|
function iDe(e) {
|
|
let t = {
|
|
type: "EnumNumberBody",
|
|
members: e,
|
|
explicitType: null,
|
|
hasUnknownMembers: null
|
|
}, r = q.EnumNumberBody;
|
|
return x(r.members, t, "members", e, 1), t;
|
|
}
|
|
s(iDe, "enumNumberBody");
|
|
function nDe(e) {
|
|
let t = {
|
|
type: "EnumStringBody",
|
|
members: e,
|
|
explicitType: null,
|
|
hasUnknownMembers: null
|
|
}, r = q.EnumStringBody;
|
|
return x(r.members, t, "members", e, 1), t;
|
|
}
|
|
s(nDe, "enumStringBody");
|
|
function sDe(e) {
|
|
let t = {
|
|
type: "EnumSymbolBody",
|
|
members: e,
|
|
hasUnknownMembers: null
|
|
}, r = q.EnumSymbolBody;
|
|
return x(r.members, t, "members", e, 1), t;
|
|
}
|
|
s(sDe, "enumSymbolBody");
|
|
function aDe(e) {
|
|
let t = {
|
|
type: "EnumBooleanMember",
|
|
id: e,
|
|
init: null
|
|
}, r = q.EnumBooleanMember;
|
|
return x(r.id, t, "id", e, 1), t;
|
|
}
|
|
s(aDe, "enumBooleanMember");
|
|
function oDe(e, t) {
|
|
let r = {
|
|
type: "EnumNumberMember",
|
|
id: e,
|
|
init: t
|
|
}, i = q.EnumNumberMember;
|
|
return x(i.id, r, "id", e, 1), x(i.init, r, "init", t, 1), r;
|
|
}
|
|
s(oDe, "enumNumberMember");
|
|
function uDe(e, t) {
|
|
let r = {
|
|
type: "EnumStringMember",
|
|
id: e,
|
|
init: t
|
|
}, i = q.EnumStringMember;
|
|
return x(i.id, r, "id", e, 1), x(i.init, r, "init", t, 1), r;
|
|
}
|
|
s(uDe, "enumStringMember");
|
|
function lDe(e) {
|
|
let t = {
|
|
type: "EnumDefaultedMember",
|
|
id: e
|
|
}, r = q.EnumDefaultedMember;
|
|
return x(r.id, t, "id", e, 1), t;
|
|
}
|
|
s(lDe, "enumDefaultedMember");
|
|
function cDe(e, t) {
|
|
let r = {
|
|
type: "IndexedAccessType",
|
|
objectType: e,
|
|
indexType: t
|
|
}, i = q.IndexedAccessType;
|
|
return x(i.objectType, r, "objectType", e, 1), x(i.indexType, r, "indexType", t, 1), r;
|
|
}
|
|
s(cDe, "indexedAccessType");
|
|
function fDe(e, t) {
|
|
let r = {
|
|
type: "OptionalIndexedAccessType",
|
|
objectType: e,
|
|
indexType: t,
|
|
optional: null
|
|
}, i = q.OptionalIndexedAccessType;
|
|
return x(i.objectType, r, "objectType", e, 1), x(i.indexType, r, "indexType", t, 1), r;
|
|
}
|
|
s(fDe, "optionalIndexedAccessType");
|
|
function dDe(e, t = null) {
|
|
let r = {
|
|
type: "JSXAttribute",
|
|
name: e,
|
|
value: t
|
|
}, i = q.JSXAttribute;
|
|
return x(i.name, r, "name", e, 1), x(i.value, r, "value", t, 1), r;
|
|
}
|
|
s(dDe, "jsxAttribute");
|
|
function pDe(e) {
|
|
let t = {
|
|
type: "JSXClosingElement",
|
|
name: e
|
|
}, r = q.JSXClosingElement;
|
|
return x(r.name, t, "name", e, 1), t;
|
|
}
|
|
s(pDe, "jsxClosingElement");
|
|
function hDe(e, t = null, r, i = null) {
|
|
let n = {
|
|
type: "JSXElement",
|
|
openingElement: e,
|
|
closingElement: t,
|
|
children: r,
|
|
selfClosing: i
|
|
}, a = q.JSXElement;
|
|
return x(a.openingElement, n, "openingElement", e, 1), x(a.closingElement, n, "closingElement", t, 1), x(a.children, n, "children", r, 1),
|
|
x(a.selfClosing, n, "selfClosing", i), n;
|
|
}
|
|
s(hDe, "jsxElement");
|
|
function mDe() {
|
|
return {
|
|
type: "JSXEmptyExpression"
|
|
};
|
|
}
|
|
s(mDe, "jsxEmptyExpression");
|
|
function yDe(e) {
|
|
let t = {
|
|
type: "JSXExpressionContainer",
|
|
expression: e
|
|
}, r = q.JSXExpressionContainer;
|
|
return x(r.expression, t, "expression", e, 1), t;
|
|
}
|
|
s(yDe, "jsxExpressionContainer");
|
|
function gDe(e) {
|
|
let t = {
|
|
type: "JSXSpreadChild",
|
|
expression: e
|
|
}, r = q.JSXSpreadChild;
|
|
return x(r.expression, t, "expression", e, 1), t;
|
|
}
|
|
s(gDe, "jsxSpreadChild");
|
|
function bDe(e) {
|
|
let t = {
|
|
type: "JSXIdentifier",
|
|
name: e
|
|
}, r = q.JSXIdentifier;
|
|
return x(r.name, t, "name", e), t;
|
|
}
|
|
s(bDe, "jsxIdentifier");
|
|
function DDe(e, t) {
|
|
let r = {
|
|
type: "JSXMemberExpression",
|
|
object: e,
|
|
property: t
|
|
}, i = q.JSXMemberExpression;
|
|
return x(i.object, r, "object", e, 1), x(i.property, r, "property", t, 1), r;
|
|
}
|
|
s(DDe, "jsxMemberExpression");
|
|
function vDe(e, t) {
|
|
let r = {
|
|
type: "JSXNamespacedName",
|
|
namespace: e,
|
|
name: t
|
|
}, i = q.JSXNamespacedName;
|
|
return x(i.namespace, r, "namespace", e, 1), x(i.name, r, "name", t, 1), r;
|
|
}
|
|
s(vDe, "jsxNamespacedName");
|
|
function EDe(e, t, r = !1) {
|
|
let i = {
|
|
type: "JSXOpeningElement",
|
|
name: e,
|
|
attributes: t,
|
|
selfClosing: r
|
|
}, n = q.JSXOpeningElement;
|
|
return x(n.name, i, "name", e, 1), x(n.attributes, i, "attributes", t, 1), x(n.selfClosing, i, "selfClosing", r), i;
|
|
}
|
|
s(EDe, "jsxOpeningElement");
|
|
function xDe(e) {
|
|
let t = {
|
|
type: "JSXSpreadAttribute",
|
|
argument: e
|
|
}, r = q.JSXSpreadAttribute;
|
|
return x(r.argument, t, "argument", e, 1), t;
|
|
}
|
|
s(xDe, "jsxSpreadAttribute");
|
|
function SDe(e) {
|
|
let t = {
|
|
type: "JSXText",
|
|
value: e
|
|
}, r = q.JSXText;
|
|
return x(r.value, t, "value", e), t;
|
|
}
|
|
s(SDe, "jsxText");
|
|
function TDe(e, t, r) {
|
|
let i = {
|
|
type: "JSXFragment",
|
|
openingFragment: e,
|
|
closingFragment: t,
|
|
children: r
|
|
}, n = q.JSXFragment;
|
|
return x(n.openingFragment, i, "openingFragment", e, 1), x(n.closingFragment, i, "closingFragment", t, 1), x(n.children, i, "children", r,
|
|
1), i;
|
|
}
|
|
s(TDe, "jsxFragment");
|
|
function CDe() {
|
|
return {
|
|
type: "JSXOpeningFragment"
|
|
};
|
|
}
|
|
s(CDe, "jsxOpeningFragment");
|
|
function wDe() {
|
|
return {
|
|
type: "JSXClosingFragment"
|
|
};
|
|
}
|
|
s(wDe, "jsxClosingFragment");
|
|
function ADe() {
|
|
return {
|
|
type: "Noop"
|
|
};
|
|
}
|
|
s(ADe, "noop");
|
|
function _De(e, t) {
|
|
let r = {
|
|
type: "Placeholder",
|
|
expectedNode: e,
|
|
name: t
|
|
}, i = q.Placeholder;
|
|
return x(i.expectedNode, r, "expectedNode", e), x(i.name, r, "name", t, 1), r;
|
|
}
|
|
s(_De, "placeholder");
|
|
function PDe(e) {
|
|
let t = {
|
|
type: "V8IntrinsicIdentifier",
|
|
name: e
|
|
}, r = q.V8IntrinsicIdentifier;
|
|
return x(r.name, t, "name", e), t;
|
|
}
|
|
s(PDe, "v8IntrinsicIdentifier");
|
|
function FDe() {
|
|
return {
|
|
type: "ArgumentPlaceholder"
|
|
};
|
|
}
|
|
s(FDe, "argumentPlaceholder");
|
|
function IDe(e, t) {
|
|
let r = {
|
|
type: "BindExpression",
|
|
object: e,
|
|
callee: t
|
|
}, i = q.BindExpression;
|
|
return x(i.object, r, "object", e, 1), x(i.callee, r, "callee", t, 1), r;
|
|
}
|
|
s(IDe, "bindExpression");
|
|
function ODe(e) {
|
|
let t = {
|
|
type: "Decorator",
|
|
expression: e
|
|
}, r = q.Decorator;
|
|
return x(r.expression, t, "expression", e, 1), t;
|
|
}
|
|
s(ODe, "decorator");
|
|
function kDe(e, t = !1) {
|
|
let r = {
|
|
type: "DoExpression",
|
|
body: e,
|
|
async: t
|
|
}, i = q.DoExpression;
|
|
return x(i.body, r, "body", e, 1), x(i.async, r, "async", t), r;
|
|
}
|
|
s(kDe, "doExpression");
|
|
function BDe(e) {
|
|
let t = {
|
|
type: "ExportDefaultSpecifier",
|
|
exported: e
|
|
}, r = q.ExportDefaultSpecifier;
|
|
return x(r.exported, t, "exported", e, 1), t;
|
|
}
|
|
s(BDe, "exportDefaultSpecifier");
|
|
function NDe(e) {
|
|
let t = {
|
|
type: "RecordExpression",
|
|
properties: e
|
|
}, r = q.RecordExpression;
|
|
return x(r.properties, t, "properties", e, 1), t;
|
|
}
|
|
s(NDe, "recordExpression");
|
|
function MDe(e = []) {
|
|
let t = {
|
|
type: "TupleExpression",
|
|
elements: e
|
|
}, r = q.TupleExpression;
|
|
return x(r.elements, t, "elements", e, 1), t;
|
|
}
|
|
s(MDe, "tupleExpression");
|
|
function RDe(e) {
|
|
let t = {
|
|
type: "DecimalLiteral",
|
|
value: e
|
|
}, r = q.DecimalLiteral;
|
|
return x(r.value, t, "value", e), t;
|
|
}
|
|
s(RDe, "decimalLiteral");
|
|
function jDe(e) {
|
|
let t = {
|
|
type: "ModuleExpression",
|
|
body: e
|
|
}, r = q.ModuleExpression;
|
|
return x(r.body, t, "body", e, 1), t;
|
|
}
|
|
s(jDe, "moduleExpression");
|
|
function LDe() {
|
|
return {
|
|
type: "TopicReference"
|
|
};
|
|
}
|
|
s(LDe, "topicReference");
|
|
function qDe(e) {
|
|
let t = {
|
|
type: "PipelineTopicExpression",
|
|
expression: e
|
|
}, r = q.PipelineTopicExpression;
|
|
return x(r.expression, t, "expression", e, 1), t;
|
|
}
|
|
s(qDe, "pipelineTopicExpression");
|
|
function UDe(e) {
|
|
let t = {
|
|
type: "PipelineBareFunction",
|
|
callee: e
|
|
}, r = q.PipelineBareFunction;
|
|
return x(r.callee, t, "callee", e, 1), t;
|
|
}
|
|
s(UDe, "pipelineBareFunction");
|
|
function WDe() {
|
|
return {
|
|
type: "PipelinePrimaryTopicReference"
|
|
};
|
|
}
|
|
s(WDe, "pipelinePrimaryTopicReference");
|
|
function $De(e) {
|
|
let t = {
|
|
type: "TSParameterProperty",
|
|
parameter: e
|
|
}, r = q.TSParameterProperty;
|
|
return x(r.parameter, t, "parameter", e, 1), t;
|
|
}
|
|
s($De, "tsParameterProperty");
|
|
function VDe(e = null, t = null, r, i = null) {
|
|
let n = {
|
|
type: "TSDeclareFunction",
|
|
id: e,
|
|
typeParameters: t,
|
|
params: r,
|
|
returnType: i
|
|
}, a = q.TSDeclareFunction;
|
|
return x(a.id, n, "id", e, 1), x(a.typeParameters, n, "typeParameters", t, 1), x(a.params, n, "params", r, 1), x(a.returnType, n, "retur\
|
|
nType", i, 1), n;
|
|
}
|
|
s(VDe, "tsDeclareFunction");
|
|
function HDe(e = null, t, r = null, i, n = null) {
|
|
let a = {
|
|
type: "TSDeclareMethod",
|
|
decorators: e,
|
|
key: t,
|
|
typeParameters: r,
|
|
params: i,
|
|
returnType: n
|
|
}, o = q.TSDeclareMethod;
|
|
return x(o.decorators, a, "decorators", e, 1), x(o.key, a, "key", t, 1), x(o.typeParameters, a, "typeParameters", r, 1), x(o.params, a, "\
|
|
params", i, 1), x(o.returnType, a, "returnType", n, 1), a;
|
|
}
|
|
s(HDe, "tsDeclareMethod");
|
|
function KDe(e, t) {
|
|
let r = {
|
|
type: "TSQualifiedName",
|
|
left: e,
|
|
right: t
|
|
}, i = q.TSQualifiedName;
|
|
return x(i.left, r, "left", e, 1), x(i.right, r, "right", t, 1), r;
|
|
}
|
|
s(KDe, "tsQualifiedName");
|
|
function zDe(e = null, t, r = null) {
|
|
let i = {
|
|
type: "TSCallSignatureDeclaration",
|
|
typeParameters: e,
|
|
parameters: t,
|
|
typeAnnotation: r
|
|
}, n = q.TSCallSignatureDeclaration;
|
|
return x(n.typeParameters, i, "typeParameters", e, 1), x(n.parameters, i, "parameters", t, 1), x(n.typeAnnotation, i, "typeAnnotation", r,
|
|
1), i;
|
|
}
|
|
s(zDe, "tsCallSignatureDeclaration");
|
|
function GDe(e = null, t, r = null) {
|
|
let i = {
|
|
type: "TSConstructSignatureDeclaration",
|
|
typeParameters: e,
|
|
parameters: t,
|
|
typeAnnotation: r
|
|
}, n = q.TSConstructSignatureDeclaration;
|
|
return x(n.typeParameters, i, "typeParameters", e, 1), x(n.parameters, i, "parameters", t, 1), x(n.typeAnnotation, i, "typeAnnotation", r,
|
|
1), i;
|
|
}
|
|
s(GDe, "tsConstructSignatureDeclaration");
|
|
function JDe(e, t = null) {
|
|
let r = {
|
|
type: "TSPropertySignature",
|
|
key: e,
|
|
typeAnnotation: t
|
|
}, i = q.TSPropertySignature;
|
|
return x(i.key, r, "key", e, 1), x(i.typeAnnotation, r, "typeAnnotation", t, 1), r;
|
|
}
|
|
s(JDe, "tsPropertySignature");
|
|
function XDe(e, t = null, r, i = null) {
|
|
let n = {
|
|
type: "TSMethodSignature",
|
|
key: e,
|
|
typeParameters: t,
|
|
parameters: r,
|
|
typeAnnotation: i,
|
|
kind: null
|
|
}, a = q.TSMethodSignature;
|
|
return x(a.key, n, "key", e, 1), x(a.typeParameters, n, "typeParameters", t, 1), x(a.parameters, n, "parameters", r, 1), x(a.typeAnnotation,
|
|
n, "typeAnnotation", i, 1), n;
|
|
}
|
|
s(XDe, "tsMethodSignature");
|
|
function YDe(e, t = null) {
|
|
let r = {
|
|
type: "TSIndexSignature",
|
|
parameters: e,
|
|
typeAnnotation: t
|
|
}, i = q.TSIndexSignature;
|
|
return x(i.parameters, r, "parameters", e, 1), x(i.typeAnnotation, r, "typeAnnotation", t, 1), r;
|
|
}
|
|
s(YDe, "tsIndexSignature");
|
|
function ZDe() {
|
|
return {
|
|
type: "TSAnyKeyword"
|
|
};
|
|
}
|
|
s(ZDe, "tsAnyKeyword");
|
|
function QDe() {
|
|
return {
|
|
type: "TSBooleanKeyword"
|
|
};
|
|
}
|
|
s(QDe, "tsBooleanKeyword");
|
|
function eve() {
|
|
return {
|
|
type: "TSBigIntKeyword"
|
|
};
|
|
}
|
|
s(eve, "tsBigIntKeyword");
|
|
function tve() {
|
|
return {
|
|
type: "TSIntrinsicKeyword"
|
|
};
|
|
}
|
|
s(tve, "tsIntrinsicKeyword");
|
|
function rve() {
|
|
return {
|
|
type: "TSNeverKeyword"
|
|
};
|
|
}
|
|
s(rve, "tsNeverKeyword");
|
|
function ive() {
|
|
return {
|
|
type: "TSNullKeyword"
|
|
};
|
|
}
|
|
s(ive, "tsNullKeyword");
|
|
function nve() {
|
|
return {
|
|
type: "TSNumberKeyword"
|
|
};
|
|
}
|
|
s(nve, "tsNumberKeyword");
|
|
function sve() {
|
|
return {
|
|
type: "TSObjectKeyword"
|
|
};
|
|
}
|
|
s(sve, "tsObjectKeyword");
|
|
function ave() {
|
|
return {
|
|
type: "TSStringKeyword"
|
|
};
|
|
}
|
|
s(ave, "tsStringKeyword");
|
|
function ove() {
|
|
return {
|
|
type: "TSSymbolKeyword"
|
|
};
|
|
}
|
|
s(ove, "tsSymbolKeyword");
|
|
function uve() {
|
|
return {
|
|
type: "TSUndefinedKeyword"
|
|
};
|
|
}
|
|
s(uve, "tsUndefinedKeyword");
|
|
function lve() {
|
|
return {
|
|
type: "TSUnknownKeyword"
|
|
};
|
|
}
|
|
s(lve, "tsUnknownKeyword");
|
|
function cve() {
|
|
return {
|
|
type: "TSVoidKeyword"
|
|
};
|
|
}
|
|
s(cve, "tsVoidKeyword");
|
|
function fve() {
|
|
return {
|
|
type: "TSThisType"
|
|
};
|
|
}
|
|
s(fve, "tsThisType");
|
|
function dve(e = null, t, r = null) {
|
|
let i = {
|
|
type: "TSFunctionType",
|
|
typeParameters: e,
|
|
parameters: t,
|
|
typeAnnotation: r
|
|
}, n = q.TSFunctionType;
|
|
return x(n.typeParameters, i, "typeParameters", e, 1), x(n.parameters, i, "parameters", t, 1), x(n.typeAnnotation, i, "typeAnnotation", r,
|
|
1), i;
|
|
}
|
|
s(dve, "tsFunctionType");
|
|
function pve(e = null, t, r = null) {
|
|
let i = {
|
|
type: "TSConstructorType",
|
|
typeParameters: e,
|
|
parameters: t,
|
|
typeAnnotation: r
|
|
}, n = q.TSConstructorType;
|
|
return x(n.typeParameters, i, "typeParameters", e, 1), x(n.parameters, i, "parameters", t, 1), x(n.typeAnnotation, i, "typeAnnotation", r,
|
|
1), i;
|
|
}
|
|
s(pve, "tsConstructorType");
|
|
function hve(e, t = null) {
|
|
let r = {
|
|
type: "TSTypeReference",
|
|
typeName: e,
|
|
typeParameters: t
|
|
}, i = q.TSTypeReference;
|
|
return x(i.typeName, r, "typeName", e, 1), x(i.typeParameters, r, "typeParameters", t, 1), r;
|
|
}
|
|
s(hve, "tsTypeReference");
|
|
function mve(e, t = null, r = null) {
|
|
let i = {
|
|
type: "TSTypePredicate",
|
|
parameterName: e,
|
|
typeAnnotation: t,
|
|
asserts: r
|
|
}, n = q.TSTypePredicate;
|
|
return x(n.parameterName, i, "parameterName", e, 1), x(n.typeAnnotation, i, "typeAnnotation", t, 1), x(n.asserts, i, "asserts", r), i;
|
|
}
|
|
s(mve, "tsTypePredicate");
|
|
function yve(e, t = null) {
|
|
let r = {
|
|
type: "TSTypeQuery",
|
|
exprName: e,
|
|
typeParameters: t
|
|
}, i = q.TSTypeQuery;
|
|
return x(i.exprName, r, "exprName", e, 1), x(i.typeParameters, r, "typeParameters", t, 1), r;
|
|
}
|
|
s(yve, "tsTypeQuery");
|
|
function gve(e) {
|
|
let t = {
|
|
type: "TSTypeLiteral",
|
|
members: e
|
|
}, r = q.TSTypeLiteral;
|
|
return x(r.members, t, "members", e, 1), t;
|
|
}
|
|
s(gve, "tsTypeLiteral");
|
|
function bve(e) {
|
|
let t = {
|
|
type: "TSArrayType",
|
|
elementType: e
|
|
}, r = q.TSArrayType;
|
|
return x(r.elementType, t, "elementType", e, 1), t;
|
|
}
|
|
s(bve, "tsArrayType");
|
|
function Dve(e) {
|
|
let t = {
|
|
type: "TSTupleType",
|
|
elementTypes: e
|
|
}, r = q.TSTupleType;
|
|
return x(r.elementTypes, t, "elementTypes", e, 1), t;
|
|
}
|
|
s(Dve, "tsTupleType");
|
|
function vve(e) {
|
|
let t = {
|
|
type: "TSOptionalType",
|
|
typeAnnotation: e
|
|
}, r = q.TSOptionalType;
|
|
return x(r.typeAnnotation, t, "typeAnnotation", e, 1), t;
|
|
}
|
|
s(vve, "tsOptionalType");
|
|
function Eve(e) {
|
|
let t = {
|
|
type: "TSRestType",
|
|
typeAnnotation: e
|
|
}, r = q.TSRestType;
|
|
return x(r.typeAnnotation, t, "typeAnnotation", e, 1), t;
|
|
}
|
|
s(Eve, "tsRestType");
|
|
function xve(e, t, r = !1) {
|
|
let i = {
|
|
type: "TSNamedTupleMember",
|
|
label: e,
|
|
elementType: t,
|
|
optional: r
|
|
}, n = q.TSNamedTupleMember;
|
|
return x(n.label, i, "label", e, 1), x(n.elementType, i, "elementType", t, 1), x(n.optional, i, "optional", r), i;
|
|
}
|
|
s(xve, "tsNamedTupleMember");
|
|
function Sve(e) {
|
|
let t = {
|
|
type: "TSUnionType",
|
|
types: e
|
|
}, r = q.TSUnionType;
|
|
return x(r.types, t, "types", e, 1), t;
|
|
}
|
|
s(Sve, "tsUnionType");
|
|
function Tve(e) {
|
|
let t = {
|
|
type: "TSIntersectionType",
|
|
types: e
|
|
}, r = q.TSIntersectionType;
|
|
return x(r.types, t, "types", e, 1), t;
|
|
}
|
|
s(Tve, "tsIntersectionType");
|
|
function Cve(e, t, r, i) {
|
|
let n = {
|
|
type: "TSConditionalType",
|
|
checkType: e,
|
|
extendsType: t,
|
|
trueType: r,
|
|
falseType: i
|
|
}, a = q.TSConditionalType;
|
|
return x(a.checkType, n, "checkType", e, 1), x(a.extendsType, n, "extendsType", t, 1), x(a.trueType, n, "trueType", r, 1), x(a.falseType,
|
|
n, "falseType", i, 1), n;
|
|
}
|
|
s(Cve, "tsConditionalType");
|
|
function wve(e) {
|
|
let t = {
|
|
type: "TSInferType",
|
|
typeParameter: e
|
|
}, r = q.TSInferType;
|
|
return x(r.typeParameter, t, "typeParameter", e, 1), t;
|
|
}
|
|
s(wve, "tsInferType");
|
|
function Ave(e) {
|
|
let t = {
|
|
type: "TSParenthesizedType",
|
|
typeAnnotation: e
|
|
}, r = q.TSParenthesizedType;
|
|
return x(r.typeAnnotation, t, "typeAnnotation", e, 1), t;
|
|
}
|
|
s(Ave, "tsParenthesizedType");
|
|
function _ve(e) {
|
|
let t = {
|
|
type: "TSTypeOperator",
|
|
typeAnnotation: e,
|
|
operator: null
|
|
}, r = q.TSTypeOperator;
|
|
return x(r.typeAnnotation, t, "typeAnnotation", e, 1), t;
|
|
}
|
|
s(_ve, "tsTypeOperator");
|
|
function Pve(e, t) {
|
|
let r = {
|
|
type: "TSIndexedAccessType",
|
|
objectType: e,
|
|
indexType: t
|
|
}, i = q.TSIndexedAccessType;
|
|
return x(i.objectType, r, "objectType", e, 1), x(i.indexType, r, "indexType", t, 1), r;
|
|
}
|
|
s(Pve, "tsIndexedAccessType");
|
|
function Fve(e, t = null, r = null) {
|
|
let i = {
|
|
type: "TSMappedType",
|
|
typeParameter: e,
|
|
typeAnnotation: t,
|
|
nameType: r
|
|
}, n = q.TSMappedType;
|
|
return x(n.typeParameter, i, "typeParameter", e, 1), x(n.typeAnnotation, i, "typeAnnotation", t, 1), x(n.nameType, i, "nameType", r, 1),
|
|
i;
|
|
}
|
|
s(Fve, "tsMappedType");
|
|
function Ive(e, t) {
|
|
let r = {
|
|
type: "TSTemplateLiteralType",
|
|
quasis: e,
|
|
types: t
|
|
}, i = q.TSTemplateLiteralType;
|
|
return x(i.quasis, r, "quasis", e, 1), x(i.types, r, "types", t, 1), r;
|
|
}
|
|
s(Ive, "tsTemplateLiteralType");
|
|
function Ove(e) {
|
|
let t = {
|
|
type: "TSLiteralType",
|
|
literal: e
|
|
}, r = q.TSLiteralType;
|
|
return x(r.literal, t, "literal", e, 1), t;
|
|
}
|
|
s(Ove, "tsLiteralType");
|
|
function kve(e, t = null) {
|
|
let r = {
|
|
type: "TSExpressionWithTypeArguments",
|
|
expression: e,
|
|
typeParameters: t
|
|
}, i = q.TSExpressionWithTypeArguments;
|
|
return x(i.expression, r, "expression", e, 1), x(i.typeParameters, r, "typeParameters", t, 1), r;
|
|
}
|
|
s(kve, "tsExpressionWithTypeArguments");
|
|
function Bve(e, t = null, r = null, i) {
|
|
let n = {
|
|
type: "TSInterfaceDeclaration",
|
|
id: e,
|
|
typeParameters: t,
|
|
extends: r,
|
|
body: i
|
|
}, a = q.TSInterfaceDeclaration;
|
|
return x(a.id, n, "id", e, 1), x(a.typeParameters, n, "typeParameters", t, 1), x(a.extends, n, "extends", r, 1), x(a.body, n, "body", i,
|
|
1), n;
|
|
}
|
|
s(Bve, "tsInterfaceDeclaration");
|
|
function Nve(e) {
|
|
let t = {
|
|
type: "TSInterfaceBody",
|
|
body: e
|
|
}, r = q.TSInterfaceBody;
|
|
return x(r.body, t, "body", e, 1), t;
|
|
}
|
|
s(Nve, "tsInterfaceBody");
|
|
function Mve(e, t = null, r) {
|
|
let i = {
|
|
type: "TSTypeAliasDeclaration",
|
|
id: e,
|
|
typeParameters: t,
|
|
typeAnnotation: r
|
|
}, n = q.TSTypeAliasDeclaration;
|
|
return x(n.id, i, "id", e, 1), x(n.typeParameters, i, "typeParameters", t, 1), x(n.typeAnnotation, i, "typeAnnotation", r, 1), i;
|
|
}
|
|
s(Mve, "tsTypeAliasDeclaration");
|
|
function Rve(e, t = null) {
|
|
let r = {
|
|
type: "TSInstantiationExpression",
|
|
expression: e,
|
|
typeParameters: t
|
|
}, i = q.TSInstantiationExpression;
|
|
return x(i.expression, r, "expression", e, 1), x(i.typeParameters, r, "typeParameters", t, 1), r;
|
|
}
|
|
s(Rve, "tsInstantiationExpression");
|
|
function jve(e, t) {
|
|
let r = {
|
|
type: "TSAsExpression",
|
|
expression: e,
|
|
typeAnnotation: t
|
|
}, i = q.TSAsExpression;
|
|
return x(i.expression, r, "expression", e, 1), x(i.typeAnnotation, r, "typeAnnotation", t, 1), r;
|
|
}
|
|
s(jve, "tsAsExpression");
|
|
function Lve(e, t) {
|
|
let r = {
|
|
type: "TSSatisfiesExpression",
|
|
expression: e,
|
|
typeAnnotation: t
|
|
}, i = q.TSSatisfiesExpression;
|
|
return x(i.expression, r, "expression", e, 1), x(i.typeAnnotation, r, "typeAnnotation", t, 1), r;
|
|
}
|
|
s(Lve, "tsSatisfiesExpression");
|
|
function qve(e, t) {
|
|
let r = {
|
|
type: "TSTypeAssertion",
|
|
typeAnnotation: e,
|
|
expression: t
|
|
}, i = q.TSTypeAssertion;
|
|
return x(i.typeAnnotation, r, "typeAnnotation", e, 1), x(i.expression, r, "expression", t, 1), r;
|
|
}
|
|
s(qve, "tsTypeAssertion");
|
|
function Uve(e) {
|
|
let t = {
|
|
type: "TSEnumBody",
|
|
members: e
|
|
}, r = q.TSEnumBody;
|
|
return x(r.members, t, "members", e, 1), t;
|
|
}
|
|
s(Uve, "tsEnumBody");
|
|
function Wve(e, t) {
|
|
let r = {
|
|
type: "TSEnumDeclaration",
|
|
id: e,
|
|
members: t
|
|
}, i = q.TSEnumDeclaration;
|
|
return x(i.id, r, "id", e, 1), x(i.members, r, "members", t, 1), r;
|
|
}
|
|
s(Wve, "tsEnumDeclaration");
|
|
function $ve(e, t = null) {
|
|
let r = {
|
|
type: "TSEnumMember",
|
|
id: e,
|
|
initializer: t
|
|
}, i = q.TSEnumMember;
|
|
return x(i.id, r, "id", e, 1), x(i.initializer, r, "initializer", t, 1), r;
|
|
}
|
|
s($ve, "tsEnumMember");
|
|
function Vve(e, t) {
|
|
let r = {
|
|
type: "TSModuleDeclaration",
|
|
id: e,
|
|
body: t,
|
|
kind: null
|
|
}, i = q.TSModuleDeclaration;
|
|
return x(i.id, r, "id", e, 1), x(i.body, r, "body", t, 1), r;
|
|
}
|
|
s(Vve, "tsModuleDeclaration");
|
|
function Hve(e) {
|
|
let t = {
|
|
type: "TSModuleBlock",
|
|
body: e
|
|
}, r = q.TSModuleBlock;
|
|
return x(r.body, t, "body", e, 1), t;
|
|
}
|
|
s(Hve, "tsModuleBlock");
|
|
function Kve(e, t = null, r = null) {
|
|
let i = {
|
|
type: "TSImportType",
|
|
argument: e,
|
|
qualifier: t,
|
|
typeParameters: r
|
|
}, n = q.TSImportType;
|
|
return x(n.argument, i, "argument", e, 1), x(n.qualifier, i, "qualifier", t, 1), x(n.typeParameters, i, "typeParameters", r, 1), i;
|
|
}
|
|
s(Kve, "tsImportType");
|
|
function zve(e, t) {
|
|
let r = {
|
|
type: "TSImportEqualsDeclaration",
|
|
id: e,
|
|
moduleReference: t,
|
|
isExport: null
|
|
}, i = q.TSImportEqualsDeclaration;
|
|
return x(i.id, r, "id", e, 1), x(i.moduleReference, r, "moduleReference", t, 1), r;
|
|
}
|
|
s(zve, "tsImportEqualsDeclaration");
|
|
function Gve(e) {
|
|
let t = {
|
|
type: "TSExternalModuleReference",
|
|
expression: e
|
|
}, r = q.TSExternalModuleReference;
|
|
return x(r.expression, t, "expression", e, 1), t;
|
|
}
|
|
s(Gve, "tsExternalModuleReference");
|
|
function Jve(e) {
|
|
let t = {
|
|
type: "TSNonNullExpression",
|
|
expression: e
|
|
}, r = q.TSNonNullExpression;
|
|
return x(r.expression, t, "expression", e, 1), t;
|
|
}
|
|
s(Jve, "tsNonNullExpression");
|
|
function Xve(e) {
|
|
let t = {
|
|
type: "TSExportAssignment",
|
|
expression: e
|
|
}, r = q.TSExportAssignment;
|
|
return x(r.expression, t, "expression", e, 1), t;
|
|
}
|
|
s(Xve, "tsExportAssignment");
|
|
function Yve(e) {
|
|
let t = {
|
|
type: "TSNamespaceExportDeclaration",
|
|
id: e
|
|
}, r = q.TSNamespaceExportDeclaration;
|
|
return x(r.id, t, "id", e, 1), t;
|
|
}
|
|
s(Yve, "tsNamespaceExportDeclaration");
|
|
function Zve(e) {
|
|
let t = {
|
|
type: "TSTypeAnnotation",
|
|
typeAnnotation: e
|
|
}, r = q.TSTypeAnnotation;
|
|
return x(r.typeAnnotation, t, "typeAnnotation", e, 1), t;
|
|
}
|
|
s(Zve, "tsTypeAnnotation");
|
|
function Qve(e) {
|
|
let t = {
|
|
type: "TSTypeParameterInstantiation",
|
|
params: e
|
|
}, r = q.TSTypeParameterInstantiation;
|
|
return x(r.params, t, "params", e, 1), t;
|
|
}
|
|
s(Qve, "tsTypeParameterInstantiation");
|
|
function eEe(e) {
|
|
let t = {
|
|
type: "TSTypeParameterDeclaration",
|
|
params: e
|
|
}, r = q.TSTypeParameterDeclaration;
|
|
return x(r.params, t, "params", e, 1), t;
|
|
}
|
|
s(eEe, "tsTypeParameterDeclaration");
|
|
function tEe(e = null, t = null, r) {
|
|
let i = {
|
|
type: "TSTypeParameter",
|
|
constraint: e,
|
|
default: t,
|
|
name: r
|
|
}, n = q.TSTypeParameter;
|
|
return x(n.constraint, i, "constraint", e, 1), x(n.default, i, "default", t, 1), x(n.name, i, "name", r), i;
|
|
}
|
|
s(tEe, "tsTypeParameter");
|
|
function rEe(e) {
|
|
return (0, oy.default)("NumberLiteral", "NumericLiteral", "The node type "), Rj(e);
|
|
}
|
|
s(rEe, "NumberLiteral");
|
|
function iEe(e, t = "") {
|
|
return (0, oy.default)("RegexLiteral", "RegExpLiteral", "The node type "), jj(e, t);
|
|
}
|
|
s(iEe, "RegexLiteral");
|
|
function nEe(e) {
|
|
return (0, oy.default)("RestProperty", "RestElement", "The node type "), Lj(e);
|
|
}
|
|
s(nEe, "RestProperty");
|
|
function sEe(e) {
|
|
return (0, oy.default)("SpreadProperty", "SpreadElement", "The node type "), qj(e);
|
|
}
|
|
s(sEe, "SpreadProperty");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/builders/generated/uppercase.js
|
|
var Uj = E((B) => {
|
|
"use strict";
|
|
Object.defineProperty(B, "__esModule", {
|
|
value: !0
|
|
});
|
|
Object.defineProperty(B, "AnyTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.anyTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ArgumentPlaceholder", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.argumentPlaceholder;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ArrayExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.arrayExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ArrayPattern", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.arrayPattern;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ArrayTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.arrayTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ArrowFunctionExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.arrowFunctionExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "AssignmentExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.assignmentExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "AssignmentPattern", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.assignmentPattern;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "AwaitExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.awaitExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "BigIntLiteral", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.bigIntLiteral;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "BinaryExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.binaryExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "BindExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.bindExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "BlockStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.blockStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "BooleanLiteral", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.booleanLiteral;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "BooleanLiteralTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.booleanLiteralTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "BooleanTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.booleanTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "BreakStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.breakStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "CallExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.callExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "CatchClause", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.catchClause;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ClassAccessorProperty", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.classAccessorProperty;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ClassBody", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.classBody;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ClassDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.classDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ClassExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.classExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ClassImplements", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.classImplements;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ClassMethod", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.classMethod;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ClassPrivateMethod", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.classPrivateMethod;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ClassPrivateProperty", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.classPrivateProperty;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ClassProperty", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.classProperty;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ConditionalExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.conditionalExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ContinueStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.continueStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DebuggerStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.debuggerStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DecimalLiteral", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.decimalLiteral;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DeclareClass", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.declareClass;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DeclareExportAllDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.declareExportAllDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DeclareExportDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.declareExportDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DeclareFunction", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.declareFunction;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DeclareInterface", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.declareInterface;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DeclareModule", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.declareModule;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DeclareModuleExports", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.declareModuleExports;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DeclareOpaqueType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.declareOpaqueType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DeclareTypeAlias", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.declareTypeAlias;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DeclareVariable", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.declareVariable;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DeclaredPredicate", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.declaredPredicate;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "Decorator", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.decorator;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "Directive", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.directive;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DirectiveLiteral", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.directiveLiteral;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DoExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.doExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "DoWhileStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.doWhileStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "EmptyStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.emptyStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "EmptyTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.emptyTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "EnumBooleanBody", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.enumBooleanBody;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "EnumBooleanMember", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.enumBooleanMember;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "EnumDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.enumDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "EnumDefaultedMember", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.enumDefaultedMember;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "EnumNumberBody", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.enumNumberBody;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "EnumNumberMember", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.enumNumberMember;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "EnumStringBody", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.enumStringBody;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "EnumStringMember", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.enumStringMember;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "EnumSymbolBody", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.enumSymbolBody;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ExistsTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.existsTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ExportAllDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.exportAllDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ExportDefaultDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.exportDefaultDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ExportDefaultSpecifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.exportDefaultSpecifier;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ExportNamedDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.exportNamedDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ExportNamespaceSpecifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.exportNamespaceSpecifier;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ExportSpecifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.exportSpecifier;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ExpressionStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.expressionStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "File", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.file;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ForInStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.forInStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ForOfStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.forOfStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ForStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.forStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "FunctionDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.functionDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "FunctionExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.functionExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "FunctionTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.functionTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "FunctionTypeParam", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.functionTypeParam;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "GenericTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.genericTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "Identifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.identifier;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "IfStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.ifStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "Import", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.import;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ImportAttribute", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.importAttribute;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ImportDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.importDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ImportDefaultSpecifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.importDefaultSpecifier;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ImportExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.importExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ImportNamespaceSpecifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.importNamespaceSpecifier;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ImportSpecifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.importSpecifier;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "IndexedAccessType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.indexedAccessType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "InferredPredicate", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.inferredPredicate;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "InterfaceDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.interfaceDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "InterfaceExtends", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.interfaceExtends;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "InterfaceTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.interfaceTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "InterpreterDirective", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.interpreterDirective;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "IntersectionTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.intersectionTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXAttribute", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxAttribute;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXClosingElement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxClosingElement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXClosingFragment", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxClosingFragment;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXElement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxElement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXEmptyExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxEmptyExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXExpressionContainer", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxExpressionContainer;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXFragment", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxFragment;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXIdentifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxIdentifier;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXMemberExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxMemberExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXNamespacedName", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxNamespacedName;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXOpeningElement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxOpeningElement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXOpeningFragment", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxOpeningFragment;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXSpreadAttribute", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxSpreadAttribute;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXSpreadChild", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxSpreadChild;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "JSXText", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.jsxText;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "LabeledStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.labeledStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "LogicalExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.logicalExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "MemberExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.memberExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "MetaProperty", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.metaProperty;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "MixedTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.mixedTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ModuleExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.moduleExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "NewExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.newExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "Noop", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.noop;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "NullLiteral", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.nullLiteral;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "NullLiteralTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.nullLiteralTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "NullableTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.nullableTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "NumberLiteral", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.numberLiteral;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "NumberLiteralTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.numberLiteralTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "NumberTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.numberTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "NumericLiteral", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.numericLiteral;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ObjectExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.objectExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ObjectMethod", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.objectMethod;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ObjectPattern", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.objectPattern;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ObjectProperty", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.objectProperty;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ObjectTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.objectTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ObjectTypeCallProperty", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.objectTypeCallProperty;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ObjectTypeIndexer", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.objectTypeIndexer;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ObjectTypeInternalSlot", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.objectTypeInternalSlot;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ObjectTypeProperty", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.objectTypeProperty;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ObjectTypeSpreadProperty", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.objectTypeSpreadProperty;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "OpaqueType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.opaqueType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "OptionalCallExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.optionalCallExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "OptionalIndexedAccessType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.optionalIndexedAccessType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "OptionalMemberExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.optionalMemberExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ParenthesizedExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.parenthesizedExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "PipelineBareFunction", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.pipelineBareFunction;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "PipelinePrimaryTopicReference", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.pipelinePrimaryTopicReference;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "PipelineTopicExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.pipelineTopicExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "Placeholder", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.placeholder;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "PrivateName", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.privateName;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "Program", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.program;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "QualifiedTypeIdentifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.qualifiedTypeIdentifier;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "RecordExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.recordExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "RegExpLiteral", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.regExpLiteral;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "RegexLiteral", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.regexLiteral;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "RestElement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.restElement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "RestProperty", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.restProperty;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ReturnStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.returnStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "SequenceExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.sequenceExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "SpreadElement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.spreadElement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "SpreadProperty", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.spreadProperty;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "StaticBlock", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.staticBlock;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "StringLiteral", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.stringLiteral;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "StringLiteralTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.stringLiteralTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "StringTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.stringTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "Super", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.super;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "SwitchCase", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.switchCase;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "SwitchStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.switchStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "SymbolTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.symbolTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSAnyKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsAnyKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSArrayType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsArrayType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSAsExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsAsExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSBigIntKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsBigIntKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSBooleanKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsBooleanKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSCallSignatureDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsCallSignatureDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSConditionalType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsConditionalType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSConstructSignatureDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsConstructSignatureDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSConstructorType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsConstructorType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSDeclareFunction", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsDeclareFunction;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSDeclareMethod", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsDeclareMethod;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSEnumBody", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsEnumBody;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSEnumDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsEnumDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSEnumMember", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsEnumMember;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSExportAssignment", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsExportAssignment;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSExpressionWithTypeArguments", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsExpressionWithTypeArguments;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSExternalModuleReference", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsExternalModuleReference;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSFunctionType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsFunctionType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSImportEqualsDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsImportEqualsDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSImportType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsImportType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSIndexSignature", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsIndexSignature;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSIndexedAccessType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsIndexedAccessType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSInferType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsInferType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSInstantiationExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsInstantiationExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSInterfaceBody", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsInterfaceBody;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSInterfaceDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsInterfaceDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSIntersectionType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsIntersectionType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSIntrinsicKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsIntrinsicKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSLiteralType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsLiteralType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSMappedType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsMappedType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSMethodSignature", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsMethodSignature;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSModuleBlock", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsModuleBlock;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSModuleDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsModuleDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSNamedTupleMember", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsNamedTupleMember;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSNamespaceExportDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsNamespaceExportDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSNeverKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsNeverKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSNonNullExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsNonNullExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSNullKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsNullKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSNumberKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsNumberKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSObjectKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsObjectKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSOptionalType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsOptionalType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSParameterProperty", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsParameterProperty;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSParenthesizedType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsParenthesizedType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSPropertySignature", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsPropertySignature;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSQualifiedName", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsQualifiedName;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSRestType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsRestType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSSatisfiesExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsSatisfiesExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSStringKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsStringKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSSymbolKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsSymbolKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTemplateLiteralType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTemplateLiteralType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSThisType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsThisType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTupleType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTupleType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTypeAliasDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTypeAliasDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTypeAssertion", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTypeAssertion;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTypeLiteral", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTypeLiteral;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTypeOperator", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTypeOperator;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTypeParameter", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTypeParameter;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTypeParameterDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTypeParameterDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTypeParameterInstantiation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTypeParameterInstantiation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTypePredicate", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTypePredicate;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTypeQuery", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTypeQuery;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSTypeReference", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsTypeReference;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSUndefinedKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsUndefinedKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSUnionType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsUnionType;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSUnknownKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsUnknownKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TSVoidKeyword", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tsVoidKeyword;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TaggedTemplateExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.taggedTemplateExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TemplateElement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.templateElement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TemplateLiteral", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.templateLiteral;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ThisExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.thisExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ThisTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.thisTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "ThrowStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.throwStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TopicReference", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.topicReference;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TryStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tryStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TupleExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tupleExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TupleTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.tupleTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TypeAlias", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.typeAlias;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.typeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TypeCastExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.typeCastExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TypeParameter", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.typeParameter;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TypeParameterDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.typeParameterDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TypeParameterInstantiation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.typeParameterInstantiation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "TypeofTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.typeofTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "UnaryExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.unaryExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "UnionTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.unionTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "UpdateExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.updateExpression;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "V8IntrinsicIdentifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.v8IntrinsicIdentifier;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "VariableDeclaration", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.variableDeclaration;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "VariableDeclarator", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.variableDeclarator;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "Variance", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.variance;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "VoidTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.voidTypeAnnotation;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "WhileStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.whileStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "WithStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.withStatement;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(B, "YieldExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N.yieldExpression;
|
|
}, "get")
|
|
});
|
|
var N = H1();
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/builders/generated/index.js
|
|
var wi = E((Ba) => {
|
|
"use strict";
|
|
Object.defineProperty(Ba, "__esModule", {
|
|
value: !0
|
|
});
|
|
var K1 = H1();
|
|
Object.keys(K1).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in Ba && Ba[e] === K1[e] || Object.defineProperty(Ba, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return K1[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var z1 = Uj();
|
|
Object.keys(z1).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in Ba && Ba[e] === z1[e] || Object.defineProperty(Ba, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return z1[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
|
|
var Wj = E((G1) => {
|
|
"use strict";
|
|
Object.defineProperty(G1, "__esModule", {
|
|
value: !0
|
|
});
|
|
G1.default = uEe;
|
|
var aEe = wi(), oEe = Ve();
|
|
function uEe(e, t) {
|
|
let r = e.value.split(/\r\n|\n|\r/), i = 0;
|
|
for (let a = 0; a < r.length; a++)
|
|
/[^ \t]/.exec(r[a]) && (i = a);
|
|
let n = "";
|
|
for (let a = 0; a < r.length; a++) {
|
|
let o = r[a], u = a === 0, l = a === r.length - 1, c = a === i, f = o.replace(/\t/g, " ");
|
|
u || (f = f.replace(/^ +/, "")), l || (f = f.replace(/ +$/, "")), f && (c || (f += " "), n += f);
|
|
}
|
|
n && t.push((0, oEe.inherits)((0, aEe.stringLiteral)(n), e));
|
|
}
|
|
s(uEe, "cleanJSXElementLiteralChild");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/builders/react/buildChildren.js
|
|
var $j = E((X1) => {
|
|
"use strict";
|
|
Object.defineProperty(X1, "__esModule", {
|
|
value: !0
|
|
});
|
|
X1.default = cEe;
|
|
var J1 = fr(), lEe = Wj();
|
|
function cEe(e) {
|
|
let t = [];
|
|
for (let r = 0; r < e.children.length; r++) {
|
|
let i = e.children[r];
|
|
if ((0, J1.isJSXText)(i)) {
|
|
(0, lEe.default)(i, t);
|
|
continue;
|
|
}
|
|
(0, J1.isJSXExpressionContainer)(i) && (i = i.expression), !(0, J1.isJSXEmptyExpression)(i) && t.push(i);
|
|
}
|
|
return t;
|
|
}
|
|
s(cEe, "buildChildren");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isNode.js
|
|
var Z1 = E((Y1) => {
|
|
"use strict";
|
|
Object.defineProperty(Y1, "__esModule", {
|
|
value: !0
|
|
});
|
|
Y1.default = dEe;
|
|
var fEe = Xi();
|
|
function dEe(e) {
|
|
return !!(e && fEe.VISITOR_KEYS[e.type]);
|
|
}
|
|
s(dEe, "isNode");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/asserts/assertNode.js
|
|
var Vj = E((Q1) => {
|
|
"use strict";
|
|
Object.defineProperty(Q1, "__esModule", {
|
|
value: !0
|
|
});
|
|
Q1.default = hEe;
|
|
var pEe = Z1();
|
|
function hEe(e) {
|
|
if (!(0, pEe.default)(e)) {
|
|
var t;
|
|
let r = (t = e?.type) != null ? t : JSON.stringify(e);
|
|
throw new TypeError(`Not a valid node of type "${r}"`);
|
|
}
|
|
}
|
|
s(hEe, "assertNode");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/asserts/generated/index.js
|
|
var Hj = E((A) => {
|
|
"use strict";
|
|
Object.defineProperty(A, "__esModule", {
|
|
value: !0
|
|
});
|
|
A.assertAccessor = OCe;
|
|
A.assertAnyTypeAnnotation = Yxe;
|
|
A.assertArgumentPlaceholder = wSe;
|
|
A.assertArrayExpression = yEe;
|
|
A.assertArrayPattern = hxe;
|
|
A.assertArrayTypeAnnotation = Zxe;
|
|
A.assertArrowFunctionExpression = mxe;
|
|
A.assertAssignmentExpression = gEe;
|
|
A.assertAssignmentPattern = pxe;
|
|
A.assertAwaitExpression = jxe;
|
|
A.assertBigIntLiteral = qxe;
|
|
A.assertBinary = eCe;
|
|
A.assertBinaryExpression = bEe;
|
|
A.assertBindExpression = ASe;
|
|
A.assertBlock = iCe;
|
|
A.assertBlockParent = rCe;
|
|
A.assertBlockStatement = xEe;
|
|
A.assertBooleanLiteral = $Ee;
|
|
A.assertBooleanLiteralTypeAnnotation = e1e;
|
|
A.assertBooleanTypeAnnotation = Qxe;
|
|
A.assertBreakStatement = SEe;
|
|
A.assertCallExpression = TEe;
|
|
A.assertCatchClause = CEe;
|
|
A.assertClass = _Ce;
|
|
A.assertClassAccessorProperty = Hxe;
|
|
A.assertClassBody = yxe;
|
|
A.assertClassDeclaration = bxe;
|
|
A.assertClassExpression = gxe;
|
|
A.assertClassImplements = r1e;
|
|
A.assertClassMethod = Fxe;
|
|
A.assertClassPrivateMethod = zxe;
|
|
A.assertClassPrivateProperty = Kxe;
|
|
A.assertClassProperty = Vxe;
|
|
A.assertCompletionStatement = aCe;
|
|
A.assertConditional = oCe;
|
|
A.assertConditionalExpression = wEe;
|
|
A.assertContinueStatement = AEe;
|
|
A.assertDebuggerStatement = _Ee;
|
|
A.assertDecimalLiteral = kSe;
|
|
A.assertDeclaration = yCe;
|
|
A.assertDeclareClass = i1e;
|
|
A.assertDeclareExportAllDeclaration = d1e;
|
|
A.assertDeclareExportDeclaration = f1e;
|
|
A.assertDeclareFunction = n1e;
|
|
A.assertDeclareInterface = s1e;
|
|
A.assertDeclareModule = a1e;
|
|
A.assertDeclareModuleExports = o1e;
|
|
A.assertDeclareOpaqueType = l1e;
|
|
A.assertDeclareTypeAlias = u1e;
|
|
A.assertDeclareVariable = c1e;
|
|
A.assertDeclaredPredicate = p1e;
|
|
A.assertDecorator = _Se;
|
|
A.assertDirective = vEe;
|
|
A.assertDirectiveLiteral = EEe;
|
|
A.assertDoExpression = PSe;
|
|
A.assertDoWhileStatement = PEe;
|
|
A.assertEmptyStatement = FEe;
|
|
A.assertEmptyTypeAnnotation = T1e;
|
|
A.assertEnumBody = LCe;
|
|
A.assertEnumBooleanBody = Z1e;
|
|
A.assertEnumBooleanMember = rSe;
|
|
A.assertEnumDeclaration = Y1e;
|
|
A.assertEnumDefaultedMember = sSe;
|
|
A.assertEnumMember = qCe;
|
|
A.assertEnumNumberBody = Q1e;
|
|
A.assertEnumNumberMember = iSe;
|
|
A.assertEnumStringBody = eSe;
|
|
A.assertEnumStringMember = nSe;
|
|
A.assertEnumSymbolBody = tSe;
|
|
A.assertExistsTypeAnnotation = h1e;
|
|
A.assertExportAllDeclaration = Dxe;
|
|
A.assertExportDeclaration = FCe;
|
|
A.assertExportDefaultDeclaration = vxe;
|
|
A.assertExportDefaultSpecifier = FSe;
|
|
A.assertExportNamedDeclaration = Exe;
|
|
A.assertExportNamespaceSpecifier = Uxe;
|
|
A.assertExportSpecifier = xxe;
|
|
A.assertExpression = QTe;
|
|
A.assertExpressionStatement = IEe;
|
|
A.assertExpressionWrapper = cCe;
|
|
A.assertFile = OEe;
|
|
A.assertFlow = BCe;
|
|
A.assertFlowBaseAnnotation = MCe;
|
|
A.assertFlowDeclaration = RCe;
|
|
A.assertFlowPredicate = jCe;
|
|
A.assertFlowType = NCe;
|
|
A.assertFor = fCe;
|
|
A.assertForInStatement = kEe;
|
|
A.assertForOfStatement = Sxe;
|
|
A.assertForStatement = BEe;
|
|
A.assertForXStatement = dCe;
|
|
A.assertFunction = pCe;
|
|
A.assertFunctionDeclaration = NEe;
|
|
A.assertFunctionExpression = MEe;
|
|
A.assertFunctionParent = hCe;
|
|
A.assertFunctionTypeAnnotation = m1e;
|
|
A.assertFunctionTypeParam = y1e;
|
|
A.assertGenericTypeAnnotation = g1e;
|
|
A.assertIdentifier = REe;
|
|
A.assertIfStatement = jEe;
|
|
A.assertImmutable = ECe;
|
|
A.assertImport = Lxe;
|
|
A.assertImportAttribute = Xxe;
|
|
A.assertImportDeclaration = Txe;
|
|
A.assertImportDefaultSpecifier = Cxe;
|
|
A.assertImportExpression = _xe;
|
|
A.assertImportNamespaceSpecifier = wxe;
|
|
A.assertImportOrExportDeclaration = PCe;
|
|
A.assertImportSpecifier = Axe;
|
|
A.assertIndexedAccessType = aSe;
|
|
A.assertInferredPredicate = b1e;
|
|
A.assertInterfaceDeclaration = v1e;
|
|
A.assertInterfaceExtends = D1e;
|
|
A.assertInterfaceTypeAnnotation = E1e;
|
|
A.assertInterpreterDirective = DEe;
|
|
A.assertIntersectionTypeAnnotation = x1e;
|
|
A.assertJSX = UCe;
|
|
A.assertJSXAttribute = uSe;
|
|
A.assertJSXClosingElement = lSe;
|
|
A.assertJSXClosingFragment = xSe;
|
|
A.assertJSXElement = cSe;
|
|
A.assertJSXEmptyExpression = fSe;
|
|
A.assertJSXExpressionContainer = dSe;
|
|
A.assertJSXFragment = vSe;
|
|
A.assertJSXIdentifier = hSe;
|
|
A.assertJSXMemberExpression = mSe;
|
|
A.assertJSXNamespacedName = ySe;
|
|
A.assertJSXOpeningElement = gSe;
|
|
A.assertJSXOpeningFragment = ESe;
|
|
A.assertJSXSpreadAttribute = bSe;
|
|
A.assertJSXSpreadChild = pSe;
|
|
A.assertJSXText = DSe;
|
|
A.assertLVal = bCe;
|
|
A.assertLabeledStatement = LEe;
|
|
A.assertLiteral = vCe;
|
|
A.assertLogicalExpression = HEe;
|
|
A.assertLoop = uCe;
|
|
A.assertMemberExpression = KEe;
|
|
A.assertMetaProperty = Pxe;
|
|
A.assertMethod = SCe;
|
|
A.assertMiscellaneous = WCe;
|
|
A.assertMixedTypeAnnotation = S1e;
|
|
A.assertModuleDeclaration = YCe;
|
|
A.assertModuleExpression = BSe;
|
|
A.assertModuleSpecifier = ICe;
|
|
A.assertNewExpression = zEe;
|
|
A.assertNoop = SSe;
|
|
A.assertNullLiteral = WEe;
|
|
A.assertNullLiteralTypeAnnotation = t1e;
|
|
A.assertNullableTypeAnnotation = C1e;
|
|
A.assertNumberLiteral = zCe;
|
|
A.assertNumberLiteralTypeAnnotation = w1e;
|
|
A.assertNumberTypeAnnotation = A1e;
|
|
A.assertNumericLiteral = UEe;
|
|
A.assertObjectExpression = JEe;
|
|
A.assertObjectMember = TCe;
|
|
A.assertObjectMethod = XEe;
|
|
A.assertObjectPattern = Ixe;
|
|
A.assertObjectProperty = YEe;
|
|
A.assertObjectTypeAnnotation = _1e;
|
|
A.assertObjectTypeCallProperty = F1e;
|
|
A.assertObjectTypeIndexer = I1e;
|
|
A.assertObjectTypeInternalSlot = P1e;
|
|
A.assertObjectTypeProperty = O1e;
|
|
A.assertObjectTypeSpreadProperty = k1e;
|
|
A.assertOpaqueType = B1e;
|
|
A.assertOptionalCallExpression = $xe;
|
|
A.assertOptionalIndexedAccessType = oSe;
|
|
A.assertOptionalMemberExpression = Wxe;
|
|
A.assertParenthesizedExpression = txe;
|
|
A.assertPattern = ACe;
|
|
A.assertPatternLike = gCe;
|
|
A.assertPipelineBareFunction = RSe;
|
|
A.assertPipelinePrimaryTopicReference = jSe;
|
|
A.assertPipelineTopicExpression = MSe;
|
|
A.assertPlaceholder = TSe;
|
|
A.assertPrivate = kCe;
|
|
A.assertPrivateName = Gxe;
|
|
A.assertProgram = GEe;
|
|
A.assertProperty = CCe;
|
|
A.assertPureish = mCe;
|
|
A.assertQualifiedTypeIdentifier = N1e;
|
|
A.assertRecordExpression = ISe;
|
|
A.assertRegExpLiteral = VEe;
|
|
A.assertRegexLiteral = GCe;
|
|
A.assertRestElement = ZEe;
|
|
A.assertRestProperty = JCe;
|
|
A.assertReturnStatement = QEe;
|
|
A.assertScopable = tCe;
|
|
A.assertSequenceExpression = exe;
|
|
A.assertSpreadElement = Oxe;
|
|
A.assertSpreadProperty = XCe;
|
|
A.assertStandardized = ZTe;
|
|
A.assertStatement = nCe;
|
|
A.assertStaticBlock = Jxe;
|
|
A.assertStringLiteral = qEe;
|
|
A.assertStringLiteralTypeAnnotation = M1e;
|
|
A.assertStringTypeAnnotation = R1e;
|
|
A.assertSuper = kxe;
|
|
A.assertSwitchCase = rxe;
|
|
A.assertSwitchStatement = ixe;
|
|
A.assertSymbolTypeAnnotation = j1e;
|
|
A.assertTSAnyKeyword = GSe;
|
|
A.assertTSArrayType = hTe;
|
|
A.assertTSAsExpression = BTe;
|
|
A.assertTSBaseType = KCe;
|
|
A.assertTSBigIntKeyword = XSe;
|
|
A.assertTSBooleanKeyword = JSe;
|
|
A.assertTSCallSignatureDeclaration = $Se;
|
|
A.assertTSConditionalType = ETe;
|
|
A.assertTSConstructSignatureDeclaration = VSe;
|
|
A.assertTSConstructorType = lTe;
|
|
A.assertTSDeclareFunction = qSe;
|
|
A.assertTSDeclareMethod = USe;
|
|
A.assertTSEntityName = DCe;
|
|
A.assertTSEnumBody = RTe;
|
|
A.assertTSEnumDeclaration = jTe;
|
|
A.assertTSEnumMember = LTe;
|
|
A.assertTSExportAssignment = KTe;
|
|
A.assertTSExpressionWithTypeArguments = PTe;
|
|
A.assertTSExternalModuleReference = VTe;
|
|
A.assertTSFunctionType = uTe;
|
|
A.assertTSImportEqualsDeclaration = $Te;
|
|
A.assertTSImportType = WTe;
|
|
A.assertTSIndexSignature = zSe;
|
|
A.assertTSIndexedAccessType = CTe;
|
|
A.assertTSInferType = xTe;
|
|
A.assertTSInstantiationExpression = kTe;
|
|
A.assertTSInterfaceBody = ITe;
|
|
A.assertTSInterfaceDeclaration = FTe;
|
|
A.assertTSIntersectionType = vTe;
|
|
A.assertTSIntrinsicKeyword = YSe;
|
|
A.assertTSLiteralType = _Te;
|
|
A.assertTSMappedType = wTe;
|
|
A.assertTSMethodSignature = KSe;
|
|
A.assertTSModuleBlock = UTe;
|
|
A.assertTSModuleDeclaration = qTe;
|
|
A.assertTSNamedTupleMember = bTe;
|
|
A.assertTSNamespaceExportDeclaration = zTe;
|
|
A.assertTSNeverKeyword = ZSe;
|
|
A.assertTSNonNullExpression = HTe;
|
|
A.assertTSNullKeyword = QSe;
|
|
A.assertTSNumberKeyword = eTe;
|
|
A.assertTSObjectKeyword = tTe;
|
|
A.assertTSOptionalType = yTe;
|
|
A.assertTSParameterProperty = LSe;
|
|
A.assertTSParenthesizedType = STe;
|
|
A.assertTSPropertySignature = HSe;
|
|
A.assertTSQualifiedName = WSe;
|
|
A.assertTSRestType = gTe;
|
|
A.assertTSSatisfiesExpression = NTe;
|
|
A.assertTSStringKeyword = rTe;
|
|
A.assertTSSymbolKeyword = iTe;
|
|
A.assertTSTemplateLiteralType = ATe;
|
|
A.assertTSThisType = oTe;
|
|
A.assertTSTupleType = mTe;
|
|
A.assertTSType = HCe;
|
|
A.assertTSTypeAliasDeclaration = OTe;
|
|
A.assertTSTypeAnnotation = GTe;
|
|
A.assertTSTypeAssertion = MTe;
|
|
A.assertTSTypeElement = VCe;
|
|
A.assertTSTypeLiteral = pTe;
|
|
A.assertTSTypeOperator = TTe;
|
|
A.assertTSTypeParameter = YTe;
|
|
A.assertTSTypeParameterDeclaration = XTe;
|
|
A.assertTSTypeParameterInstantiation = JTe;
|
|
A.assertTSTypePredicate = fTe;
|
|
A.assertTSTypeQuery = dTe;
|
|
A.assertTSTypeReference = cTe;
|
|
A.assertTSUndefinedKeyword = nTe;
|
|
A.assertTSUnionType = DTe;
|
|
A.assertTSUnknownKeyword = sTe;
|
|
A.assertTSVoidKeyword = aTe;
|
|
A.assertTaggedTemplateExpression = Bxe;
|
|
A.assertTemplateElement = Nxe;
|
|
A.assertTemplateLiteral = Mxe;
|
|
A.assertTerminatorless = sCe;
|
|
A.assertThisExpression = nxe;
|
|
A.assertThisTypeAnnotation = L1e;
|
|
A.assertThrowStatement = sxe;
|
|
A.assertTopicReference = NSe;
|
|
A.assertTryStatement = axe;
|
|
A.assertTupleExpression = OSe;
|
|
A.assertTupleTypeAnnotation = q1e;
|
|
A.assertTypeAlias = W1e;
|
|
A.assertTypeAnnotation = $1e;
|
|
A.assertTypeCastExpression = V1e;
|
|
A.assertTypeParameter = H1e;
|
|
A.assertTypeParameterDeclaration = K1e;
|
|
A.assertTypeParameterInstantiation = z1e;
|
|
A.assertTypeScript = $Ce;
|
|
A.assertTypeofTypeAnnotation = U1e;
|
|
A.assertUnaryExpression = oxe;
|
|
A.assertUnaryLike = wCe;
|
|
A.assertUnionTypeAnnotation = G1e;
|
|
A.assertUpdateExpression = uxe;
|
|
A.assertUserWhitespacable = xCe;
|
|
A.assertV8IntrinsicIdentifier = CSe;
|
|
A.assertVariableDeclaration = lxe;
|
|
A.assertVariableDeclarator = cxe;
|
|
A.assertVariance = J1e;
|
|
A.assertVoidTypeAnnotation = X1e;
|
|
A.assertWhile = lCe;
|
|
A.assertWhileStatement = fxe;
|
|
A.assertWithStatement = dxe;
|
|
A.assertYieldExpression = Rxe;
|
|
var mEe = Cl(), dd = rd();
|
|
function _(e, t, r) {
|
|
if (!(0, mEe.default)(e, t, r))
|
|
throw new Error(`Expected type "${e}" with option ${JSON.stringify(r)}, but instead got "${t.type}".`);
|
|
}
|
|
s(_, "assert");
|
|
function yEe(e, t) {
|
|
_("ArrayExpression", e, t);
|
|
}
|
|
s(yEe, "assertArrayExpression");
|
|
function gEe(e, t) {
|
|
_("AssignmentExpression", e, t);
|
|
}
|
|
s(gEe, "assertAssignmentExpression");
|
|
function bEe(e, t) {
|
|
_("BinaryExpression", e, t);
|
|
}
|
|
s(bEe, "assertBinaryExpression");
|
|
function DEe(e, t) {
|
|
_("InterpreterDirective", e, t);
|
|
}
|
|
s(DEe, "assertInterpreterDirective");
|
|
function vEe(e, t) {
|
|
_("Directive", e, t);
|
|
}
|
|
s(vEe, "assertDirective");
|
|
function EEe(e, t) {
|
|
_("DirectiveLiteral", e, t);
|
|
}
|
|
s(EEe, "assertDirectiveLiteral");
|
|
function xEe(e, t) {
|
|
_("BlockStatement", e, t);
|
|
}
|
|
s(xEe, "assertBlockStatement");
|
|
function SEe(e, t) {
|
|
_("BreakStatement", e, t);
|
|
}
|
|
s(SEe, "assertBreakStatement");
|
|
function TEe(e, t) {
|
|
_("CallExpression", e, t);
|
|
}
|
|
s(TEe, "assertCallExpression");
|
|
function CEe(e, t) {
|
|
_("CatchClause", e, t);
|
|
}
|
|
s(CEe, "assertCatchClause");
|
|
function wEe(e, t) {
|
|
_("ConditionalExpression", e, t);
|
|
}
|
|
s(wEe, "assertConditionalExpression");
|
|
function AEe(e, t) {
|
|
_("ContinueStatement", e, t);
|
|
}
|
|
s(AEe, "assertContinueStatement");
|
|
function _Ee(e, t) {
|
|
_("DebuggerStatement", e, t);
|
|
}
|
|
s(_Ee, "assertDebuggerStatement");
|
|
function PEe(e, t) {
|
|
_("DoWhileStatement", e, t);
|
|
}
|
|
s(PEe, "assertDoWhileStatement");
|
|
function FEe(e, t) {
|
|
_("EmptyStatement", e, t);
|
|
}
|
|
s(FEe, "assertEmptyStatement");
|
|
function IEe(e, t) {
|
|
_("ExpressionStatement", e, t);
|
|
}
|
|
s(IEe, "assertExpressionStatement");
|
|
function OEe(e, t) {
|
|
_("File", e, t);
|
|
}
|
|
s(OEe, "assertFile");
|
|
function kEe(e, t) {
|
|
_("ForInStatement", e, t);
|
|
}
|
|
s(kEe, "assertForInStatement");
|
|
function BEe(e, t) {
|
|
_("ForStatement", e, t);
|
|
}
|
|
s(BEe, "assertForStatement");
|
|
function NEe(e, t) {
|
|
_("FunctionDeclaration", e, t);
|
|
}
|
|
s(NEe, "assertFunctionDeclaration");
|
|
function MEe(e, t) {
|
|
_("FunctionExpression", e, t);
|
|
}
|
|
s(MEe, "assertFunctionExpression");
|
|
function REe(e, t) {
|
|
_("Identifier", e, t);
|
|
}
|
|
s(REe, "assertIdentifier");
|
|
function jEe(e, t) {
|
|
_("IfStatement", e, t);
|
|
}
|
|
s(jEe, "assertIfStatement");
|
|
function LEe(e, t) {
|
|
_("LabeledStatement", e, t);
|
|
}
|
|
s(LEe, "assertLabeledStatement");
|
|
function qEe(e, t) {
|
|
_("StringLiteral", e, t);
|
|
}
|
|
s(qEe, "assertStringLiteral");
|
|
function UEe(e, t) {
|
|
_("NumericLiteral", e, t);
|
|
}
|
|
s(UEe, "assertNumericLiteral");
|
|
function WEe(e, t) {
|
|
_("NullLiteral", e, t);
|
|
}
|
|
s(WEe, "assertNullLiteral");
|
|
function $Ee(e, t) {
|
|
_("BooleanLiteral", e, t);
|
|
}
|
|
s($Ee, "assertBooleanLiteral");
|
|
function VEe(e, t) {
|
|
_("RegExpLiteral", e, t);
|
|
}
|
|
s(VEe, "assertRegExpLiteral");
|
|
function HEe(e, t) {
|
|
_("LogicalExpression", e, t);
|
|
}
|
|
s(HEe, "assertLogicalExpression");
|
|
function KEe(e, t) {
|
|
_("MemberExpression", e, t);
|
|
}
|
|
s(KEe, "assertMemberExpression");
|
|
function zEe(e, t) {
|
|
_("NewExpression", e, t);
|
|
}
|
|
s(zEe, "assertNewExpression");
|
|
function GEe(e, t) {
|
|
_("Program", e, t);
|
|
}
|
|
s(GEe, "assertProgram");
|
|
function JEe(e, t) {
|
|
_("ObjectExpression", e, t);
|
|
}
|
|
s(JEe, "assertObjectExpression");
|
|
function XEe(e, t) {
|
|
_("ObjectMethod", e, t);
|
|
}
|
|
s(XEe, "assertObjectMethod");
|
|
function YEe(e, t) {
|
|
_("ObjectProperty", e, t);
|
|
}
|
|
s(YEe, "assertObjectProperty");
|
|
function ZEe(e, t) {
|
|
_("RestElement", e, t);
|
|
}
|
|
s(ZEe, "assertRestElement");
|
|
function QEe(e, t) {
|
|
_("ReturnStatement", e, t);
|
|
}
|
|
s(QEe, "assertReturnStatement");
|
|
function exe(e, t) {
|
|
_("SequenceExpression", e, t);
|
|
}
|
|
s(exe, "assertSequenceExpression");
|
|
function txe(e, t) {
|
|
_("ParenthesizedExpression", e, t);
|
|
}
|
|
s(txe, "assertParenthesizedExpression");
|
|
function rxe(e, t) {
|
|
_("SwitchCase", e, t);
|
|
}
|
|
s(rxe, "assertSwitchCase");
|
|
function ixe(e, t) {
|
|
_("SwitchStatement", e, t);
|
|
}
|
|
s(ixe, "assertSwitchStatement");
|
|
function nxe(e, t) {
|
|
_("ThisExpression", e, t);
|
|
}
|
|
s(nxe, "assertThisExpression");
|
|
function sxe(e, t) {
|
|
_("ThrowStatement", e, t);
|
|
}
|
|
s(sxe, "assertThrowStatement");
|
|
function axe(e, t) {
|
|
_("TryStatement", e, t);
|
|
}
|
|
s(axe, "assertTryStatement");
|
|
function oxe(e, t) {
|
|
_("UnaryExpression", e, t);
|
|
}
|
|
s(oxe, "assertUnaryExpression");
|
|
function uxe(e, t) {
|
|
_("UpdateExpression", e, t);
|
|
}
|
|
s(uxe, "assertUpdateExpression");
|
|
function lxe(e, t) {
|
|
_("VariableDeclaration", e, t);
|
|
}
|
|
s(lxe, "assertVariableDeclaration");
|
|
function cxe(e, t) {
|
|
_("VariableDeclarator", e, t);
|
|
}
|
|
s(cxe, "assertVariableDeclarator");
|
|
function fxe(e, t) {
|
|
_("WhileStatement", e, t);
|
|
}
|
|
s(fxe, "assertWhileStatement");
|
|
function dxe(e, t) {
|
|
_("WithStatement", e, t);
|
|
}
|
|
s(dxe, "assertWithStatement");
|
|
function pxe(e, t) {
|
|
_("AssignmentPattern", e, t);
|
|
}
|
|
s(pxe, "assertAssignmentPattern");
|
|
function hxe(e, t) {
|
|
_("ArrayPattern", e, t);
|
|
}
|
|
s(hxe, "assertArrayPattern");
|
|
function mxe(e, t) {
|
|
_("ArrowFunctionExpression", e, t);
|
|
}
|
|
s(mxe, "assertArrowFunctionExpression");
|
|
function yxe(e, t) {
|
|
_("ClassBody", e, t);
|
|
}
|
|
s(yxe, "assertClassBody");
|
|
function gxe(e, t) {
|
|
_("ClassExpression", e, t);
|
|
}
|
|
s(gxe, "assertClassExpression");
|
|
function bxe(e, t) {
|
|
_("ClassDeclaration", e, t);
|
|
}
|
|
s(bxe, "assertClassDeclaration");
|
|
function Dxe(e, t) {
|
|
_("ExportAllDeclaration", e, t);
|
|
}
|
|
s(Dxe, "assertExportAllDeclaration");
|
|
function vxe(e, t) {
|
|
_("ExportDefaultDeclaration", e, t);
|
|
}
|
|
s(vxe, "assertExportDefaultDeclaration");
|
|
function Exe(e, t) {
|
|
_("ExportNamedDeclaration", e, t);
|
|
}
|
|
s(Exe, "assertExportNamedDeclaration");
|
|
function xxe(e, t) {
|
|
_("ExportSpecifier", e, t);
|
|
}
|
|
s(xxe, "assertExportSpecifier");
|
|
function Sxe(e, t) {
|
|
_("ForOfStatement", e, t);
|
|
}
|
|
s(Sxe, "assertForOfStatement");
|
|
function Txe(e, t) {
|
|
_("ImportDeclaration", e, t);
|
|
}
|
|
s(Txe, "assertImportDeclaration");
|
|
function Cxe(e, t) {
|
|
_("ImportDefaultSpecifier", e, t);
|
|
}
|
|
s(Cxe, "assertImportDefaultSpecifier");
|
|
function wxe(e, t) {
|
|
_("ImportNamespaceSpecifier", e, t);
|
|
}
|
|
s(wxe, "assertImportNamespaceSpecifier");
|
|
function Axe(e, t) {
|
|
_("ImportSpecifier", e, t);
|
|
}
|
|
s(Axe, "assertImportSpecifier");
|
|
function _xe(e, t) {
|
|
_("ImportExpression", e, t);
|
|
}
|
|
s(_xe, "assertImportExpression");
|
|
function Pxe(e, t) {
|
|
_("MetaProperty", e, t);
|
|
}
|
|
s(Pxe, "assertMetaProperty");
|
|
function Fxe(e, t) {
|
|
_("ClassMethod", e, t);
|
|
}
|
|
s(Fxe, "assertClassMethod");
|
|
function Ixe(e, t) {
|
|
_("ObjectPattern", e, t);
|
|
}
|
|
s(Ixe, "assertObjectPattern");
|
|
function Oxe(e, t) {
|
|
_("SpreadElement", e, t);
|
|
}
|
|
s(Oxe, "assertSpreadElement");
|
|
function kxe(e, t) {
|
|
_("Super", e, t);
|
|
}
|
|
s(kxe, "assertSuper");
|
|
function Bxe(e, t) {
|
|
_("TaggedTemplateExpression", e, t);
|
|
}
|
|
s(Bxe, "assertTaggedTemplateExpression");
|
|
function Nxe(e, t) {
|
|
_("TemplateElement", e, t);
|
|
}
|
|
s(Nxe, "assertTemplateElement");
|
|
function Mxe(e, t) {
|
|
_("TemplateLiteral", e, t);
|
|
}
|
|
s(Mxe, "assertTemplateLiteral");
|
|
function Rxe(e, t) {
|
|
_("YieldExpression", e, t);
|
|
}
|
|
s(Rxe, "assertYieldExpression");
|
|
function jxe(e, t) {
|
|
_("AwaitExpression", e, t);
|
|
}
|
|
s(jxe, "assertAwaitExpression");
|
|
function Lxe(e, t) {
|
|
_("Import", e, t);
|
|
}
|
|
s(Lxe, "assertImport");
|
|
function qxe(e, t) {
|
|
_("BigIntLiteral", e, t);
|
|
}
|
|
s(qxe, "assertBigIntLiteral");
|
|
function Uxe(e, t) {
|
|
_("ExportNamespaceSpecifier", e, t);
|
|
}
|
|
s(Uxe, "assertExportNamespaceSpecifier");
|
|
function Wxe(e, t) {
|
|
_("OptionalMemberExpression", e, t);
|
|
}
|
|
s(Wxe, "assertOptionalMemberExpression");
|
|
function $xe(e, t) {
|
|
_("OptionalCallExpression", e, t);
|
|
}
|
|
s($xe, "assertOptionalCallExpression");
|
|
function Vxe(e, t) {
|
|
_("ClassProperty", e, t);
|
|
}
|
|
s(Vxe, "assertClassProperty");
|
|
function Hxe(e, t) {
|
|
_("ClassAccessorProperty", e, t);
|
|
}
|
|
s(Hxe, "assertClassAccessorProperty");
|
|
function Kxe(e, t) {
|
|
_("ClassPrivateProperty", e, t);
|
|
}
|
|
s(Kxe, "assertClassPrivateProperty");
|
|
function zxe(e, t) {
|
|
_("ClassPrivateMethod", e, t);
|
|
}
|
|
s(zxe, "assertClassPrivateMethod");
|
|
function Gxe(e, t) {
|
|
_("PrivateName", e, t);
|
|
}
|
|
s(Gxe, "assertPrivateName");
|
|
function Jxe(e, t) {
|
|
_("StaticBlock", e, t);
|
|
}
|
|
s(Jxe, "assertStaticBlock");
|
|
function Xxe(e, t) {
|
|
_("ImportAttribute", e, t);
|
|
}
|
|
s(Xxe, "assertImportAttribute");
|
|
function Yxe(e, t) {
|
|
_("AnyTypeAnnotation", e, t);
|
|
}
|
|
s(Yxe, "assertAnyTypeAnnotation");
|
|
function Zxe(e, t) {
|
|
_("ArrayTypeAnnotation", e, t);
|
|
}
|
|
s(Zxe, "assertArrayTypeAnnotation");
|
|
function Qxe(e, t) {
|
|
_("BooleanTypeAnnotation", e, t);
|
|
}
|
|
s(Qxe, "assertBooleanTypeAnnotation");
|
|
function e1e(e, t) {
|
|
_("BooleanLiteralTypeAnnotation", e, t);
|
|
}
|
|
s(e1e, "assertBooleanLiteralTypeAnnotation");
|
|
function t1e(e, t) {
|
|
_("NullLiteralTypeAnnotation", e, t);
|
|
}
|
|
s(t1e, "assertNullLiteralTypeAnnotation");
|
|
function r1e(e, t) {
|
|
_("ClassImplements", e, t);
|
|
}
|
|
s(r1e, "assertClassImplements");
|
|
function i1e(e, t) {
|
|
_("DeclareClass", e, t);
|
|
}
|
|
s(i1e, "assertDeclareClass");
|
|
function n1e(e, t) {
|
|
_("DeclareFunction", e, t);
|
|
}
|
|
s(n1e, "assertDeclareFunction");
|
|
function s1e(e, t) {
|
|
_("DeclareInterface", e, t);
|
|
}
|
|
s(s1e, "assertDeclareInterface");
|
|
function a1e(e, t) {
|
|
_("DeclareModule", e, t);
|
|
}
|
|
s(a1e, "assertDeclareModule");
|
|
function o1e(e, t) {
|
|
_("DeclareModuleExports", e, t);
|
|
}
|
|
s(o1e, "assertDeclareModuleExports");
|
|
function u1e(e, t) {
|
|
_("DeclareTypeAlias", e, t);
|
|
}
|
|
s(u1e, "assertDeclareTypeAlias");
|
|
function l1e(e, t) {
|
|
_("DeclareOpaqueType", e, t);
|
|
}
|
|
s(l1e, "assertDeclareOpaqueType");
|
|
function c1e(e, t) {
|
|
_("DeclareVariable", e, t);
|
|
}
|
|
s(c1e, "assertDeclareVariable");
|
|
function f1e(e, t) {
|
|
_("DeclareExportDeclaration", e, t);
|
|
}
|
|
s(f1e, "assertDeclareExportDeclaration");
|
|
function d1e(e, t) {
|
|
_("DeclareExportAllDeclaration", e, t);
|
|
}
|
|
s(d1e, "assertDeclareExportAllDeclaration");
|
|
function p1e(e, t) {
|
|
_("DeclaredPredicate", e, t);
|
|
}
|
|
s(p1e, "assertDeclaredPredicate");
|
|
function h1e(e, t) {
|
|
_("ExistsTypeAnnotation", e, t);
|
|
}
|
|
s(h1e, "assertExistsTypeAnnotation");
|
|
function m1e(e, t) {
|
|
_("FunctionTypeAnnotation", e, t);
|
|
}
|
|
s(m1e, "assertFunctionTypeAnnotation");
|
|
function y1e(e, t) {
|
|
_("FunctionTypeParam", e, t);
|
|
}
|
|
s(y1e, "assertFunctionTypeParam");
|
|
function g1e(e, t) {
|
|
_("GenericTypeAnnotation", e, t);
|
|
}
|
|
s(g1e, "assertGenericTypeAnnotation");
|
|
function b1e(e, t) {
|
|
_("InferredPredicate", e, t);
|
|
}
|
|
s(b1e, "assertInferredPredicate");
|
|
function D1e(e, t) {
|
|
_("InterfaceExtends", e, t);
|
|
}
|
|
s(D1e, "assertInterfaceExtends");
|
|
function v1e(e, t) {
|
|
_("InterfaceDeclaration", e, t);
|
|
}
|
|
s(v1e, "assertInterfaceDeclaration");
|
|
function E1e(e, t) {
|
|
_("InterfaceTypeAnnotation", e, t);
|
|
}
|
|
s(E1e, "assertInterfaceTypeAnnotation");
|
|
function x1e(e, t) {
|
|
_("IntersectionTypeAnnotation", e, t);
|
|
}
|
|
s(x1e, "assertIntersectionTypeAnnotation");
|
|
function S1e(e, t) {
|
|
_("MixedTypeAnnotation", e, t);
|
|
}
|
|
s(S1e, "assertMixedTypeAnnotation");
|
|
function T1e(e, t) {
|
|
_("EmptyTypeAnnotation", e, t);
|
|
}
|
|
s(T1e, "assertEmptyTypeAnnotation");
|
|
function C1e(e, t) {
|
|
_("NullableTypeAnnotation", e, t);
|
|
}
|
|
s(C1e, "assertNullableTypeAnnotation");
|
|
function w1e(e, t) {
|
|
_("NumberLiteralTypeAnnotation", e, t);
|
|
}
|
|
s(w1e, "assertNumberLiteralTypeAnnotation");
|
|
function A1e(e, t) {
|
|
_("NumberTypeAnnotation", e, t);
|
|
}
|
|
s(A1e, "assertNumberTypeAnnotation");
|
|
function _1e(e, t) {
|
|
_("ObjectTypeAnnotation", e, t);
|
|
}
|
|
s(_1e, "assertObjectTypeAnnotation");
|
|
function P1e(e, t) {
|
|
_("ObjectTypeInternalSlot", e, t);
|
|
}
|
|
s(P1e, "assertObjectTypeInternalSlot");
|
|
function F1e(e, t) {
|
|
_("ObjectTypeCallProperty", e, t);
|
|
}
|
|
s(F1e, "assertObjectTypeCallProperty");
|
|
function I1e(e, t) {
|
|
_("ObjectTypeIndexer", e, t);
|
|
}
|
|
s(I1e, "assertObjectTypeIndexer");
|
|
function O1e(e, t) {
|
|
_("ObjectTypeProperty", e, t);
|
|
}
|
|
s(O1e, "assertObjectTypeProperty");
|
|
function k1e(e, t) {
|
|
_("ObjectTypeSpreadProperty", e, t);
|
|
}
|
|
s(k1e, "assertObjectTypeSpreadProperty");
|
|
function B1e(e, t) {
|
|
_("OpaqueType", e, t);
|
|
}
|
|
s(B1e, "assertOpaqueType");
|
|
function N1e(e, t) {
|
|
_("QualifiedTypeIdentifier", e, t);
|
|
}
|
|
s(N1e, "assertQualifiedTypeIdentifier");
|
|
function M1e(e, t) {
|
|
_("StringLiteralTypeAnnotation", e, t);
|
|
}
|
|
s(M1e, "assertStringLiteralTypeAnnotation");
|
|
function R1e(e, t) {
|
|
_("StringTypeAnnotation", e, t);
|
|
}
|
|
s(R1e, "assertStringTypeAnnotation");
|
|
function j1e(e, t) {
|
|
_("SymbolTypeAnnotation", e, t);
|
|
}
|
|
s(j1e, "assertSymbolTypeAnnotation");
|
|
function L1e(e, t) {
|
|
_("ThisTypeAnnotation", e, t);
|
|
}
|
|
s(L1e, "assertThisTypeAnnotation");
|
|
function q1e(e, t) {
|
|
_("TupleTypeAnnotation", e, t);
|
|
}
|
|
s(q1e, "assertTupleTypeAnnotation");
|
|
function U1e(e, t) {
|
|
_("TypeofTypeAnnotation", e, t);
|
|
}
|
|
s(U1e, "assertTypeofTypeAnnotation");
|
|
function W1e(e, t) {
|
|
_("TypeAlias", e, t);
|
|
}
|
|
s(W1e, "assertTypeAlias");
|
|
function $1e(e, t) {
|
|
_("TypeAnnotation", e, t);
|
|
}
|
|
s($1e, "assertTypeAnnotation");
|
|
function V1e(e, t) {
|
|
_("TypeCastExpression", e, t);
|
|
}
|
|
s(V1e, "assertTypeCastExpression");
|
|
function H1e(e, t) {
|
|
_("TypeParameter", e, t);
|
|
}
|
|
s(H1e, "assertTypeParameter");
|
|
function K1e(e, t) {
|
|
_("TypeParameterDeclaration", e, t);
|
|
}
|
|
s(K1e, "assertTypeParameterDeclaration");
|
|
function z1e(e, t) {
|
|
_("TypeParameterInstantiation", e, t);
|
|
}
|
|
s(z1e, "assertTypeParameterInstantiation");
|
|
function G1e(e, t) {
|
|
_("UnionTypeAnnotation", e, t);
|
|
}
|
|
s(G1e, "assertUnionTypeAnnotation");
|
|
function J1e(e, t) {
|
|
_("Variance", e, t);
|
|
}
|
|
s(J1e, "assertVariance");
|
|
function X1e(e, t) {
|
|
_("VoidTypeAnnotation", e, t);
|
|
}
|
|
s(X1e, "assertVoidTypeAnnotation");
|
|
function Y1e(e, t) {
|
|
_("EnumDeclaration", e, t);
|
|
}
|
|
s(Y1e, "assertEnumDeclaration");
|
|
function Z1e(e, t) {
|
|
_("EnumBooleanBody", e, t);
|
|
}
|
|
s(Z1e, "assertEnumBooleanBody");
|
|
function Q1e(e, t) {
|
|
_("EnumNumberBody", e, t);
|
|
}
|
|
s(Q1e, "assertEnumNumberBody");
|
|
function eSe(e, t) {
|
|
_("EnumStringBody", e, t);
|
|
}
|
|
s(eSe, "assertEnumStringBody");
|
|
function tSe(e, t) {
|
|
_("EnumSymbolBody", e, t);
|
|
}
|
|
s(tSe, "assertEnumSymbolBody");
|
|
function rSe(e, t) {
|
|
_("EnumBooleanMember", e, t);
|
|
}
|
|
s(rSe, "assertEnumBooleanMember");
|
|
function iSe(e, t) {
|
|
_("EnumNumberMember", e, t);
|
|
}
|
|
s(iSe, "assertEnumNumberMember");
|
|
function nSe(e, t) {
|
|
_("EnumStringMember", e, t);
|
|
}
|
|
s(nSe, "assertEnumStringMember");
|
|
function sSe(e, t) {
|
|
_("EnumDefaultedMember", e, t);
|
|
}
|
|
s(sSe, "assertEnumDefaultedMember");
|
|
function aSe(e, t) {
|
|
_("IndexedAccessType", e, t);
|
|
}
|
|
s(aSe, "assertIndexedAccessType");
|
|
function oSe(e, t) {
|
|
_("OptionalIndexedAccessType", e, t);
|
|
}
|
|
s(oSe, "assertOptionalIndexedAccessType");
|
|
function uSe(e, t) {
|
|
_("JSXAttribute", e, t);
|
|
}
|
|
s(uSe, "assertJSXAttribute");
|
|
function lSe(e, t) {
|
|
_("JSXClosingElement", e, t);
|
|
}
|
|
s(lSe, "assertJSXClosingElement");
|
|
function cSe(e, t) {
|
|
_("JSXElement", e, t);
|
|
}
|
|
s(cSe, "assertJSXElement");
|
|
function fSe(e, t) {
|
|
_("JSXEmptyExpression", e, t);
|
|
}
|
|
s(fSe, "assertJSXEmptyExpression");
|
|
function dSe(e, t) {
|
|
_("JSXExpressionContainer", e, t);
|
|
}
|
|
s(dSe, "assertJSXExpressionContainer");
|
|
function pSe(e, t) {
|
|
_("JSXSpreadChild", e, t);
|
|
}
|
|
s(pSe, "assertJSXSpreadChild");
|
|
function hSe(e, t) {
|
|
_("JSXIdentifier", e, t);
|
|
}
|
|
s(hSe, "assertJSXIdentifier");
|
|
function mSe(e, t) {
|
|
_("JSXMemberExpression", e, t);
|
|
}
|
|
s(mSe, "assertJSXMemberExpression");
|
|
function ySe(e, t) {
|
|
_("JSXNamespacedName", e, t);
|
|
}
|
|
s(ySe, "assertJSXNamespacedName");
|
|
function gSe(e, t) {
|
|
_("JSXOpeningElement", e, t);
|
|
}
|
|
s(gSe, "assertJSXOpeningElement");
|
|
function bSe(e, t) {
|
|
_("JSXSpreadAttribute", e, t);
|
|
}
|
|
s(bSe, "assertJSXSpreadAttribute");
|
|
function DSe(e, t) {
|
|
_("JSXText", e, t);
|
|
}
|
|
s(DSe, "assertJSXText");
|
|
function vSe(e, t) {
|
|
_("JSXFragment", e, t);
|
|
}
|
|
s(vSe, "assertJSXFragment");
|
|
function ESe(e, t) {
|
|
_("JSXOpeningFragment", e, t);
|
|
}
|
|
s(ESe, "assertJSXOpeningFragment");
|
|
function xSe(e, t) {
|
|
_("JSXClosingFragment", e, t);
|
|
}
|
|
s(xSe, "assertJSXClosingFragment");
|
|
function SSe(e, t) {
|
|
_("Noop", e, t);
|
|
}
|
|
s(SSe, "assertNoop");
|
|
function TSe(e, t) {
|
|
_("Placeholder", e, t);
|
|
}
|
|
s(TSe, "assertPlaceholder");
|
|
function CSe(e, t) {
|
|
_("V8IntrinsicIdentifier", e, t);
|
|
}
|
|
s(CSe, "assertV8IntrinsicIdentifier");
|
|
function wSe(e, t) {
|
|
_("ArgumentPlaceholder", e, t);
|
|
}
|
|
s(wSe, "assertArgumentPlaceholder");
|
|
function ASe(e, t) {
|
|
_("BindExpression", e, t);
|
|
}
|
|
s(ASe, "assertBindExpression");
|
|
function _Se(e, t) {
|
|
_("Decorator", e, t);
|
|
}
|
|
s(_Se, "assertDecorator");
|
|
function PSe(e, t) {
|
|
_("DoExpression", e, t);
|
|
}
|
|
s(PSe, "assertDoExpression");
|
|
function FSe(e, t) {
|
|
_("ExportDefaultSpecifier", e, t);
|
|
}
|
|
s(FSe, "assertExportDefaultSpecifier");
|
|
function ISe(e, t) {
|
|
_("RecordExpression", e, t);
|
|
}
|
|
s(ISe, "assertRecordExpression");
|
|
function OSe(e, t) {
|
|
_("TupleExpression", e, t);
|
|
}
|
|
s(OSe, "assertTupleExpression");
|
|
function kSe(e, t) {
|
|
_("DecimalLiteral", e, t);
|
|
}
|
|
s(kSe, "assertDecimalLiteral");
|
|
function BSe(e, t) {
|
|
_("ModuleExpression", e, t);
|
|
}
|
|
s(BSe, "assertModuleExpression");
|
|
function NSe(e, t) {
|
|
_("TopicReference", e, t);
|
|
}
|
|
s(NSe, "assertTopicReference");
|
|
function MSe(e, t) {
|
|
_("PipelineTopicExpression", e, t);
|
|
}
|
|
s(MSe, "assertPipelineTopicExpression");
|
|
function RSe(e, t) {
|
|
_("PipelineBareFunction", e, t);
|
|
}
|
|
s(RSe, "assertPipelineBareFunction");
|
|
function jSe(e, t) {
|
|
_("PipelinePrimaryTopicReference", e, t);
|
|
}
|
|
s(jSe, "assertPipelinePrimaryTopicReference");
|
|
function LSe(e, t) {
|
|
_("TSParameterProperty", e, t);
|
|
}
|
|
s(LSe, "assertTSParameterProperty");
|
|
function qSe(e, t) {
|
|
_("TSDeclareFunction", e, t);
|
|
}
|
|
s(qSe, "assertTSDeclareFunction");
|
|
function USe(e, t) {
|
|
_("TSDeclareMethod", e, t);
|
|
}
|
|
s(USe, "assertTSDeclareMethod");
|
|
function WSe(e, t) {
|
|
_("TSQualifiedName", e, t);
|
|
}
|
|
s(WSe, "assertTSQualifiedName");
|
|
function $Se(e, t) {
|
|
_("TSCallSignatureDeclaration", e, t);
|
|
}
|
|
s($Se, "assertTSCallSignatureDeclaration");
|
|
function VSe(e, t) {
|
|
_("TSConstructSignatureDeclaration", e, t);
|
|
}
|
|
s(VSe, "assertTSConstructSignatureDeclaration");
|
|
function HSe(e, t) {
|
|
_("TSPropertySignature", e, t);
|
|
}
|
|
s(HSe, "assertTSPropertySignature");
|
|
function KSe(e, t) {
|
|
_("TSMethodSignature", e, t);
|
|
}
|
|
s(KSe, "assertTSMethodSignature");
|
|
function zSe(e, t) {
|
|
_("TSIndexSignature", e, t);
|
|
}
|
|
s(zSe, "assertTSIndexSignature");
|
|
function GSe(e, t) {
|
|
_("TSAnyKeyword", e, t);
|
|
}
|
|
s(GSe, "assertTSAnyKeyword");
|
|
function JSe(e, t) {
|
|
_("TSBooleanKeyword", e, t);
|
|
}
|
|
s(JSe, "assertTSBooleanKeyword");
|
|
function XSe(e, t) {
|
|
_("TSBigIntKeyword", e, t);
|
|
}
|
|
s(XSe, "assertTSBigIntKeyword");
|
|
function YSe(e, t) {
|
|
_("TSIntrinsicKeyword", e, t);
|
|
}
|
|
s(YSe, "assertTSIntrinsicKeyword");
|
|
function ZSe(e, t) {
|
|
_("TSNeverKeyword", e, t);
|
|
}
|
|
s(ZSe, "assertTSNeverKeyword");
|
|
function QSe(e, t) {
|
|
_("TSNullKeyword", e, t);
|
|
}
|
|
s(QSe, "assertTSNullKeyword");
|
|
function eTe(e, t) {
|
|
_("TSNumberKeyword", e, t);
|
|
}
|
|
s(eTe, "assertTSNumberKeyword");
|
|
function tTe(e, t) {
|
|
_("TSObjectKeyword", e, t);
|
|
}
|
|
s(tTe, "assertTSObjectKeyword");
|
|
function rTe(e, t) {
|
|
_("TSStringKeyword", e, t);
|
|
}
|
|
s(rTe, "assertTSStringKeyword");
|
|
function iTe(e, t) {
|
|
_("TSSymbolKeyword", e, t);
|
|
}
|
|
s(iTe, "assertTSSymbolKeyword");
|
|
function nTe(e, t) {
|
|
_("TSUndefinedKeyword", e, t);
|
|
}
|
|
s(nTe, "assertTSUndefinedKeyword");
|
|
function sTe(e, t) {
|
|
_("TSUnknownKeyword", e, t);
|
|
}
|
|
s(sTe, "assertTSUnknownKeyword");
|
|
function aTe(e, t) {
|
|
_("TSVoidKeyword", e, t);
|
|
}
|
|
s(aTe, "assertTSVoidKeyword");
|
|
function oTe(e, t) {
|
|
_("TSThisType", e, t);
|
|
}
|
|
s(oTe, "assertTSThisType");
|
|
function uTe(e, t) {
|
|
_("TSFunctionType", e, t);
|
|
}
|
|
s(uTe, "assertTSFunctionType");
|
|
function lTe(e, t) {
|
|
_("TSConstructorType", e, t);
|
|
}
|
|
s(lTe, "assertTSConstructorType");
|
|
function cTe(e, t) {
|
|
_("TSTypeReference", e, t);
|
|
}
|
|
s(cTe, "assertTSTypeReference");
|
|
function fTe(e, t) {
|
|
_("TSTypePredicate", e, t);
|
|
}
|
|
s(fTe, "assertTSTypePredicate");
|
|
function dTe(e, t) {
|
|
_("TSTypeQuery", e, t);
|
|
}
|
|
s(dTe, "assertTSTypeQuery");
|
|
function pTe(e, t) {
|
|
_("TSTypeLiteral", e, t);
|
|
}
|
|
s(pTe, "assertTSTypeLiteral");
|
|
function hTe(e, t) {
|
|
_("TSArrayType", e, t);
|
|
}
|
|
s(hTe, "assertTSArrayType");
|
|
function mTe(e, t) {
|
|
_("TSTupleType", e, t);
|
|
}
|
|
s(mTe, "assertTSTupleType");
|
|
function yTe(e, t) {
|
|
_("TSOptionalType", e, t);
|
|
}
|
|
s(yTe, "assertTSOptionalType");
|
|
function gTe(e, t) {
|
|
_("TSRestType", e, t);
|
|
}
|
|
s(gTe, "assertTSRestType");
|
|
function bTe(e, t) {
|
|
_("TSNamedTupleMember", e, t);
|
|
}
|
|
s(bTe, "assertTSNamedTupleMember");
|
|
function DTe(e, t) {
|
|
_("TSUnionType", e, t);
|
|
}
|
|
s(DTe, "assertTSUnionType");
|
|
function vTe(e, t) {
|
|
_("TSIntersectionType", e, t);
|
|
}
|
|
s(vTe, "assertTSIntersectionType");
|
|
function ETe(e, t) {
|
|
_("TSConditionalType", e, t);
|
|
}
|
|
s(ETe, "assertTSConditionalType");
|
|
function xTe(e, t) {
|
|
_("TSInferType", e, t);
|
|
}
|
|
s(xTe, "assertTSInferType");
|
|
function STe(e, t) {
|
|
_("TSParenthesizedType", e, t);
|
|
}
|
|
s(STe, "assertTSParenthesizedType");
|
|
function TTe(e, t) {
|
|
_("TSTypeOperator", e, t);
|
|
}
|
|
s(TTe, "assertTSTypeOperator");
|
|
function CTe(e, t) {
|
|
_("TSIndexedAccessType", e, t);
|
|
}
|
|
s(CTe, "assertTSIndexedAccessType");
|
|
function wTe(e, t) {
|
|
_("TSMappedType", e, t);
|
|
}
|
|
s(wTe, "assertTSMappedType");
|
|
function ATe(e, t) {
|
|
_("TSTemplateLiteralType", e, t);
|
|
}
|
|
s(ATe, "assertTSTemplateLiteralType");
|
|
function _Te(e, t) {
|
|
_("TSLiteralType", e, t);
|
|
}
|
|
s(_Te, "assertTSLiteralType");
|
|
function PTe(e, t) {
|
|
_("TSExpressionWithTypeArguments", e, t);
|
|
}
|
|
s(PTe, "assertTSExpressionWithTypeArguments");
|
|
function FTe(e, t) {
|
|
_("TSInterfaceDeclaration", e, t);
|
|
}
|
|
s(FTe, "assertTSInterfaceDeclaration");
|
|
function ITe(e, t) {
|
|
_("TSInterfaceBody", e, t);
|
|
}
|
|
s(ITe, "assertTSInterfaceBody");
|
|
function OTe(e, t) {
|
|
_("TSTypeAliasDeclaration", e, t);
|
|
}
|
|
s(OTe, "assertTSTypeAliasDeclaration");
|
|
function kTe(e, t) {
|
|
_("TSInstantiationExpression", e, t);
|
|
}
|
|
s(kTe, "assertTSInstantiationExpression");
|
|
function BTe(e, t) {
|
|
_("TSAsExpression", e, t);
|
|
}
|
|
s(BTe, "assertTSAsExpression");
|
|
function NTe(e, t) {
|
|
_("TSSatisfiesExpression", e, t);
|
|
}
|
|
s(NTe, "assertTSSatisfiesExpression");
|
|
function MTe(e, t) {
|
|
_("TSTypeAssertion", e, t);
|
|
}
|
|
s(MTe, "assertTSTypeAssertion");
|
|
function RTe(e, t) {
|
|
_("TSEnumBody", e, t);
|
|
}
|
|
s(RTe, "assertTSEnumBody");
|
|
function jTe(e, t) {
|
|
_("TSEnumDeclaration", e, t);
|
|
}
|
|
s(jTe, "assertTSEnumDeclaration");
|
|
function LTe(e, t) {
|
|
_("TSEnumMember", e, t);
|
|
}
|
|
s(LTe, "assertTSEnumMember");
|
|
function qTe(e, t) {
|
|
_("TSModuleDeclaration", e, t);
|
|
}
|
|
s(qTe, "assertTSModuleDeclaration");
|
|
function UTe(e, t) {
|
|
_("TSModuleBlock", e, t);
|
|
}
|
|
s(UTe, "assertTSModuleBlock");
|
|
function WTe(e, t) {
|
|
_("TSImportType", e, t);
|
|
}
|
|
s(WTe, "assertTSImportType");
|
|
function $Te(e, t) {
|
|
_("TSImportEqualsDeclaration", e, t);
|
|
}
|
|
s($Te, "assertTSImportEqualsDeclaration");
|
|
function VTe(e, t) {
|
|
_("TSExternalModuleReference", e, t);
|
|
}
|
|
s(VTe, "assertTSExternalModuleReference");
|
|
function HTe(e, t) {
|
|
_("TSNonNullExpression", e, t);
|
|
}
|
|
s(HTe, "assertTSNonNullExpression");
|
|
function KTe(e, t) {
|
|
_("TSExportAssignment", e, t);
|
|
}
|
|
s(KTe, "assertTSExportAssignment");
|
|
function zTe(e, t) {
|
|
_("TSNamespaceExportDeclaration", e, t);
|
|
}
|
|
s(zTe, "assertTSNamespaceExportDeclaration");
|
|
function GTe(e, t) {
|
|
_("TSTypeAnnotation", e, t);
|
|
}
|
|
s(GTe, "assertTSTypeAnnotation");
|
|
function JTe(e, t) {
|
|
_("TSTypeParameterInstantiation", e, t);
|
|
}
|
|
s(JTe, "assertTSTypeParameterInstantiation");
|
|
function XTe(e, t) {
|
|
_("TSTypeParameterDeclaration", e, t);
|
|
}
|
|
s(XTe, "assertTSTypeParameterDeclaration");
|
|
function YTe(e, t) {
|
|
_("TSTypeParameter", e, t);
|
|
}
|
|
s(YTe, "assertTSTypeParameter");
|
|
function ZTe(e, t) {
|
|
_("Standardized", e, t);
|
|
}
|
|
s(ZTe, "assertStandardized");
|
|
function QTe(e, t) {
|
|
_("Expression", e, t);
|
|
}
|
|
s(QTe, "assertExpression");
|
|
function eCe(e, t) {
|
|
_("Binary", e, t);
|
|
}
|
|
s(eCe, "assertBinary");
|
|
function tCe(e, t) {
|
|
_("Scopable", e, t);
|
|
}
|
|
s(tCe, "assertScopable");
|
|
function rCe(e, t) {
|
|
_("BlockParent", e, t);
|
|
}
|
|
s(rCe, "assertBlockParent");
|
|
function iCe(e, t) {
|
|
_("Block", e, t);
|
|
}
|
|
s(iCe, "assertBlock");
|
|
function nCe(e, t) {
|
|
_("Statement", e, t);
|
|
}
|
|
s(nCe, "assertStatement");
|
|
function sCe(e, t) {
|
|
_("Terminatorless", e, t);
|
|
}
|
|
s(sCe, "assertTerminatorless");
|
|
function aCe(e, t) {
|
|
_("CompletionStatement", e, t);
|
|
}
|
|
s(aCe, "assertCompletionStatement");
|
|
function oCe(e, t) {
|
|
_("Conditional", e, t);
|
|
}
|
|
s(oCe, "assertConditional");
|
|
function uCe(e, t) {
|
|
_("Loop", e, t);
|
|
}
|
|
s(uCe, "assertLoop");
|
|
function lCe(e, t) {
|
|
_("While", e, t);
|
|
}
|
|
s(lCe, "assertWhile");
|
|
function cCe(e, t) {
|
|
_("ExpressionWrapper", e, t);
|
|
}
|
|
s(cCe, "assertExpressionWrapper");
|
|
function fCe(e, t) {
|
|
_("For", e, t);
|
|
}
|
|
s(fCe, "assertFor");
|
|
function dCe(e, t) {
|
|
_("ForXStatement", e, t);
|
|
}
|
|
s(dCe, "assertForXStatement");
|
|
function pCe(e, t) {
|
|
_("Function", e, t);
|
|
}
|
|
s(pCe, "assertFunction");
|
|
function hCe(e, t) {
|
|
_("FunctionParent", e, t);
|
|
}
|
|
s(hCe, "assertFunctionParent");
|
|
function mCe(e, t) {
|
|
_("Pureish", e, t);
|
|
}
|
|
s(mCe, "assertPureish");
|
|
function yCe(e, t) {
|
|
_("Declaration", e, t);
|
|
}
|
|
s(yCe, "assertDeclaration");
|
|
function gCe(e, t) {
|
|
_("PatternLike", e, t);
|
|
}
|
|
s(gCe, "assertPatternLike");
|
|
function bCe(e, t) {
|
|
_("LVal", e, t);
|
|
}
|
|
s(bCe, "assertLVal");
|
|
function DCe(e, t) {
|
|
_("TSEntityName", e, t);
|
|
}
|
|
s(DCe, "assertTSEntityName");
|
|
function vCe(e, t) {
|
|
_("Literal", e, t);
|
|
}
|
|
s(vCe, "assertLiteral");
|
|
function ECe(e, t) {
|
|
_("Immutable", e, t);
|
|
}
|
|
s(ECe, "assertImmutable");
|
|
function xCe(e, t) {
|
|
_("UserWhitespacable", e, t);
|
|
}
|
|
s(xCe, "assertUserWhitespacable");
|
|
function SCe(e, t) {
|
|
_("Method", e, t);
|
|
}
|
|
s(SCe, "assertMethod");
|
|
function TCe(e, t) {
|
|
_("ObjectMember", e, t);
|
|
}
|
|
s(TCe, "assertObjectMember");
|
|
function CCe(e, t) {
|
|
_("Property", e, t);
|
|
}
|
|
s(CCe, "assertProperty");
|
|
function wCe(e, t) {
|
|
_("UnaryLike", e, t);
|
|
}
|
|
s(wCe, "assertUnaryLike");
|
|
function ACe(e, t) {
|
|
_("Pattern", e, t);
|
|
}
|
|
s(ACe, "assertPattern");
|
|
function _Ce(e, t) {
|
|
_("Class", e, t);
|
|
}
|
|
s(_Ce, "assertClass");
|
|
function PCe(e, t) {
|
|
_("ImportOrExportDeclaration", e, t);
|
|
}
|
|
s(PCe, "assertImportOrExportDeclaration");
|
|
function FCe(e, t) {
|
|
_("ExportDeclaration", e, t);
|
|
}
|
|
s(FCe, "assertExportDeclaration");
|
|
function ICe(e, t) {
|
|
_("ModuleSpecifier", e, t);
|
|
}
|
|
s(ICe, "assertModuleSpecifier");
|
|
function OCe(e, t) {
|
|
_("Accessor", e, t);
|
|
}
|
|
s(OCe, "assertAccessor");
|
|
function kCe(e, t) {
|
|
_("Private", e, t);
|
|
}
|
|
s(kCe, "assertPrivate");
|
|
function BCe(e, t) {
|
|
_("Flow", e, t);
|
|
}
|
|
s(BCe, "assertFlow");
|
|
function NCe(e, t) {
|
|
_("FlowType", e, t);
|
|
}
|
|
s(NCe, "assertFlowType");
|
|
function MCe(e, t) {
|
|
_("FlowBaseAnnotation", e, t);
|
|
}
|
|
s(MCe, "assertFlowBaseAnnotation");
|
|
function RCe(e, t) {
|
|
_("FlowDeclaration", e, t);
|
|
}
|
|
s(RCe, "assertFlowDeclaration");
|
|
function jCe(e, t) {
|
|
_("FlowPredicate", e, t);
|
|
}
|
|
s(jCe, "assertFlowPredicate");
|
|
function LCe(e, t) {
|
|
_("EnumBody", e, t);
|
|
}
|
|
s(LCe, "assertEnumBody");
|
|
function qCe(e, t) {
|
|
_("EnumMember", e, t);
|
|
}
|
|
s(qCe, "assertEnumMember");
|
|
function UCe(e, t) {
|
|
_("JSX", e, t);
|
|
}
|
|
s(UCe, "assertJSX");
|
|
function WCe(e, t) {
|
|
_("Miscellaneous", e, t);
|
|
}
|
|
s(WCe, "assertMiscellaneous");
|
|
function $Ce(e, t) {
|
|
_("TypeScript", e, t);
|
|
}
|
|
s($Ce, "assertTypeScript");
|
|
function VCe(e, t) {
|
|
_("TSTypeElement", e, t);
|
|
}
|
|
s(VCe, "assertTSTypeElement");
|
|
function HCe(e, t) {
|
|
_("TSType", e, t);
|
|
}
|
|
s(HCe, "assertTSType");
|
|
function KCe(e, t) {
|
|
_("TSBaseType", e, t);
|
|
}
|
|
s(KCe, "assertTSBaseType");
|
|
function zCe(e, t) {
|
|
(0, dd.default)("assertNumberLiteral", "assertNumericLiteral"), _("NumberLiteral", e, t);
|
|
}
|
|
s(zCe, "assertNumberLiteral");
|
|
function GCe(e, t) {
|
|
(0, dd.default)("assertRegexLiteral", "assertRegExpLiteral"), _("RegexLiteral", e, t);
|
|
}
|
|
s(GCe, "assertRegexLiteral");
|
|
function JCe(e, t) {
|
|
(0, dd.default)("assertRestProperty", "assertRestElement"), _("RestProperty", e, t);
|
|
}
|
|
s(JCe, "assertRestProperty");
|
|
function XCe(e, t) {
|
|
(0, dd.default)("assertSpreadProperty", "assertSpreadElement"), _("SpreadProperty", e, t);
|
|
}
|
|
s(XCe, "assertSpreadProperty");
|
|
function YCe(e, t) {
|
|
(0, dd.default)("assertModuleDeclaration", "assertImportOrExportDeclaration"), _("ModuleDeclaration", e, t);
|
|
}
|
|
s(YCe, "assertModuleDeclaration");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
|
|
var Kj = E((uy) => {
|
|
"use strict";
|
|
Object.defineProperty(uy, "__esModule", {
|
|
value: !0
|
|
});
|
|
uy.default = void 0;
|
|
var xn = wi(), dot = uy.default = ZCe;
|
|
function ZCe(e) {
|
|
switch (e) {
|
|
case "string":
|
|
return (0, xn.stringTypeAnnotation)();
|
|
case "number":
|
|
return (0, xn.numberTypeAnnotation)();
|
|
case "undefined":
|
|
return (0, xn.voidTypeAnnotation)();
|
|
case "boolean":
|
|
return (0, xn.booleanTypeAnnotation)();
|
|
case "function":
|
|
return (0, xn.genericTypeAnnotation)((0, xn.identifier)("Function"));
|
|
case "object":
|
|
return (0, xn.genericTypeAnnotation)((0, xn.identifier)("Object"));
|
|
case "symbol":
|
|
return (0, xn.genericTypeAnnotation)((0, xn.identifier)("Symbol"));
|
|
case "bigint":
|
|
return (0, xn.anyTypeAnnotation)();
|
|
}
|
|
throw new Error("Invalid typeof value: " + e);
|
|
}
|
|
s(ZCe, "createTypeAnnotationBasedOnTypeof");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
|
|
var tS = E((eS) => {
|
|
"use strict";
|
|
Object.defineProperty(eS, "__esModule", {
|
|
value: !0
|
|
});
|
|
eS.default = Gj;
|
|
var pd = fr();
|
|
function zj(e) {
|
|
return (0, pd.isIdentifier)(e) ? e.name : `${e.id.name}.${zj(e.qualification)}`;
|
|
}
|
|
s(zj, "getQualifiedName");
|
|
function Gj(e) {
|
|
let t = Array.from(e), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), a = [];
|
|
for (let o = 0; o < t.length; o++) {
|
|
let u = t[o];
|
|
if (u && !a.includes(u)) {
|
|
if ((0, pd.isAnyTypeAnnotation)(u))
|
|
return [u];
|
|
if ((0, pd.isFlowBaseAnnotation)(u)) {
|
|
i.set(u.type, u);
|
|
continue;
|
|
}
|
|
if ((0, pd.isUnionTypeAnnotation)(u)) {
|
|
n.has(u.types) || (t.push(...u.types), n.add(u.types));
|
|
continue;
|
|
}
|
|
if ((0, pd.isGenericTypeAnnotation)(u)) {
|
|
let l = zj(u.id);
|
|
if (r.has(l)) {
|
|
let c = r.get(l);
|
|
c.typeParameters ? u.typeParameters && (c.typeParameters.params.push(...u.typeParameters.params), c.typeParameters.params = Gj(c.
|
|
typeParameters.params)) : c = u.typeParameters;
|
|
} else
|
|
r.set(l, u);
|
|
continue;
|
|
}
|
|
a.push(u);
|
|
}
|
|
}
|
|
for (let [, o] of i)
|
|
a.push(o);
|
|
for (let [, o] of r)
|
|
a.push(o);
|
|
return a;
|
|
}
|
|
s(Gj, "removeTypeDuplicates");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
|
|
var Jj = E((rS) => {
|
|
"use strict";
|
|
Object.defineProperty(rS, "__esModule", {
|
|
value: !0
|
|
});
|
|
rS.default = twe;
|
|
var QCe = wi(), ewe = tS();
|
|
function twe(e) {
|
|
let t = (0, ewe.default)(e);
|
|
return t.length === 1 ? t[0] : (0, QCe.unionTypeAnnotation)(t);
|
|
}
|
|
s(twe, "createFlowUnionType");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
|
|
var Zj = E((iS) => {
|
|
"use strict";
|
|
Object.defineProperty(iS, "__esModule", {
|
|
value: !0
|
|
});
|
|
iS.default = Yj;
|
|
var Ol = fr();
|
|
function Xj(e) {
|
|
return (0, Ol.isIdentifier)(e) ? e.name : (0, Ol.isThisExpression)(e) ? "this" : `${e.right.name}.${Xj(e.left)}`;
|
|
}
|
|
s(Xj, "getQualifiedName");
|
|
function Yj(e) {
|
|
let t = Array.from(e), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), a = [];
|
|
for (let o = 0; o < t.length; o++) {
|
|
let u = t[o];
|
|
if (!u || a.includes(u))
|
|
continue;
|
|
if ((0, Ol.isTSAnyKeyword)(u))
|
|
return [u];
|
|
if ((0, Ol.isTSBaseType)(u)) {
|
|
i.set(u.type, u);
|
|
continue;
|
|
}
|
|
if ((0, Ol.isTSUnionType)(u)) {
|
|
n.has(u.types) || (t.push(...u.types), n.add(u.types));
|
|
continue;
|
|
}
|
|
let l = "typeParameters";
|
|
if ((0, Ol.isTSTypeReference)(u) && u[l]) {
|
|
let c = u[l], f = Xj(u.typeName);
|
|
if (r.has(f)) {
|
|
let m = r.get(f), h = m[l];
|
|
h ? (h.params.push(...c.params), h.params = Yj(h.params)) : m = c;
|
|
} else
|
|
r.set(f, u);
|
|
continue;
|
|
}
|
|
a.push(u);
|
|
}
|
|
for (let [, o] of i)
|
|
a.push(o);
|
|
for (let [, o] of r)
|
|
a.push(o);
|
|
return a;
|
|
}
|
|
s(Yj, "removeTypeDuplicates");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
|
|
var Qj = E((nS) => {
|
|
"use strict";
|
|
Object.defineProperty(nS, "__esModule", {
|
|
value: !0
|
|
});
|
|
nS.default = swe;
|
|
var rwe = wi(), iwe = Zj(), nwe = fr();
|
|
function swe(e) {
|
|
let t = e.map((i) => (0, nwe.isTSTypeAnnotation)(i) ? i.typeAnnotation : i), r = (0, iwe.default)(t);
|
|
return r.length === 1 ? r[0] : (0, rwe.tsUnionType)(r);
|
|
}
|
|
s(swe, "createTSUnionType");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/builders/productions.js
|
|
var aS = E((sS) => {
|
|
"use strict";
|
|
Object.defineProperty(sS, "__esModule", {
|
|
value: !0
|
|
});
|
|
sS.buildUndefinedNode = awe;
|
|
var eL = wi();
|
|
function awe() {
|
|
return (0, eL.unaryExpression)("void", (0, eL.numericLiteral)(0), !0);
|
|
}
|
|
s(awe, "buildUndefinedNode");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/clone/cloneNode.js
|
|
var Na = E((uS) => {
|
|
"use strict";
|
|
Object.defineProperty(uS, "__esModule", {
|
|
value: !0
|
|
});
|
|
uS.default = owe;
|
|
var tL = Xi(), rL = fr(), {
|
|
hasOwn: Qn
|
|
} = {
|
|
hasOwn: Function.call.bind(Object.prototype.hasOwnProperty)
|
|
};
|
|
function iL(e, t, r, i) {
|
|
return e && typeof e.type == "string" ? nL(e, t, r, i) : e;
|
|
}
|
|
s(iL, "cloneIfNode");
|
|
function oS(e, t, r, i) {
|
|
return Array.isArray(e) ? e.map((n) => iL(n, t, r, i)) : iL(e, t, r, i);
|
|
}
|
|
s(oS, "cloneIfNodeOrArray");
|
|
function owe(e, t = !0, r = !1) {
|
|
return nL(e, t, r, /* @__PURE__ */ new Map());
|
|
}
|
|
s(owe, "cloneNode");
|
|
function nL(e, t = !0, r = !1, i) {
|
|
if (!e) return e;
|
|
let {
|
|
type: n
|
|
} = e, a = {
|
|
type: e.type
|
|
};
|
|
if ((0, rL.isIdentifier)(e))
|
|
a.name = e.name, Qn(e, "optional") && typeof e.optional == "boolean" && (a.optional = e.optional), Qn(e, "typeAnnotation") && (a.typeAnnotation =
|
|
t ? oS(e.typeAnnotation, !0, r, i) : e.typeAnnotation), Qn(e, "decorators") && (a.decorators = t ? oS(e.decorators, !0, r, i) : e.decorators);
|
|
else if (Qn(tL.NODE_FIELDS, n))
|
|
for (let o of Object.keys(tL.NODE_FIELDS[n]))
|
|
Qn(e, o) && (t ? a[o] = (0, rL.isFile)(e) && o === "comments" ? ly(e.comments, t, r, i) : oS(e[o], !0, r, i) : a[o] = e[o]);
|
|
else
|
|
throw new Error(`Unknown node type: "${n}"`);
|
|
return Qn(e, "loc") && (r ? a.loc = null : a.loc = e.loc), Qn(e, "leadingComments") && (a.leadingComments = ly(e.leadingComments, t, r, i)),
|
|
Qn(e, "innerComments") && (a.innerComments = ly(e.innerComments, t, r, i)), Qn(e, "trailingComments") && (a.trailingComments = ly(e.trailingComments,
|
|
t, r, i)), Qn(e, "extra") && (a.extra = Object.assign({}, e.extra)), a;
|
|
}
|
|
s(nL, "cloneNodeInternal");
|
|
function ly(e, t, r, i) {
|
|
return !e || !t ? e : e.map((n) => {
|
|
let a = i.get(n);
|
|
if (a) return a;
|
|
let {
|
|
type: o,
|
|
value: u,
|
|
loc: l
|
|
} = n, c = {
|
|
type: o,
|
|
value: u,
|
|
loc: l
|
|
};
|
|
return r && (c.loc = null), i.set(n, c), c;
|
|
});
|
|
}
|
|
s(ly, "maybeCloneComments");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/clone/clone.js
|
|
var sL = E((lS) => {
|
|
"use strict";
|
|
Object.defineProperty(lS, "__esModule", {
|
|
value: !0
|
|
});
|
|
lS.default = lwe;
|
|
var uwe = Na();
|
|
function lwe(e) {
|
|
return (0, uwe.default)(e, !1);
|
|
}
|
|
s(lwe, "clone");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/clone/cloneDeep.js
|
|
var aL = E((cS) => {
|
|
"use strict";
|
|
Object.defineProperty(cS, "__esModule", {
|
|
value: !0
|
|
});
|
|
cS.default = fwe;
|
|
var cwe = Na();
|
|
function fwe(e) {
|
|
return (0, cwe.default)(e);
|
|
}
|
|
s(fwe, "cloneDeep");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
|
|
var oL = E((fS) => {
|
|
"use strict";
|
|
Object.defineProperty(fS, "__esModule", {
|
|
value: !0
|
|
});
|
|
fS.default = pwe;
|
|
var dwe = Na();
|
|
function pwe(e) {
|
|
return (0, dwe.default)(e, !0, !0);
|
|
}
|
|
s(pwe, "cloneDeepWithoutLoc");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
|
|
var uL = E((dS) => {
|
|
"use strict";
|
|
Object.defineProperty(dS, "__esModule", {
|
|
value: !0
|
|
});
|
|
dS.default = mwe;
|
|
var hwe = Na();
|
|
function mwe(e) {
|
|
return (0, hwe.default)(e, !1, !0);
|
|
}
|
|
s(mwe, "cloneWithoutLoc");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/comments/addComments.js
|
|
var hS = E((pS) => {
|
|
"use strict";
|
|
Object.defineProperty(pS, "__esModule", {
|
|
value: !0
|
|
});
|
|
pS.default = ywe;
|
|
function ywe(e, t, r) {
|
|
if (!r || !e) return e;
|
|
let i = `${t}Comments`;
|
|
return e[i] ? t === "leading" ? e[i] = r.concat(e[i]) : e[i].push(...r) : e[i] = r, e;
|
|
}
|
|
s(ywe, "addComments");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/comments/addComment.js
|
|
var lL = E((mS) => {
|
|
"use strict";
|
|
Object.defineProperty(mS, "__esModule", {
|
|
value: !0
|
|
});
|
|
mS.default = bwe;
|
|
var gwe = hS();
|
|
function bwe(e, t, r, i) {
|
|
return (0, gwe.default)(e, t, [{
|
|
type: i ? "CommentLine" : "CommentBlock",
|
|
value: r
|
|
}]);
|
|
}
|
|
s(bwe, "addComment");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/utils/inherit.js
|
|
var cy = E((yS) => {
|
|
"use strict";
|
|
Object.defineProperty(yS, "__esModule", {
|
|
value: !0
|
|
});
|
|
yS.default = Dwe;
|
|
function Dwe(e, t, r) {
|
|
t && r && (t[e] = Array.from(new Set([].concat(t[e], r[e]).filter(Boolean))));
|
|
}
|
|
s(Dwe, "inherit");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/comments/inheritInnerComments.js
|
|
var bS = E((gS) => {
|
|
"use strict";
|
|
Object.defineProperty(gS, "__esModule", {
|
|
value: !0
|
|
});
|
|
gS.default = Ewe;
|
|
var vwe = cy();
|
|
function Ewe(e, t) {
|
|
(0, vwe.default)("innerComments", e, t);
|
|
}
|
|
s(Ewe, "inheritInnerComments");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/comments/inheritLeadingComments.js
|
|
var vS = E((DS) => {
|
|
"use strict";
|
|
Object.defineProperty(DS, "__esModule", {
|
|
value: !0
|
|
});
|
|
DS.default = Swe;
|
|
var xwe = cy();
|
|
function Swe(e, t) {
|
|
(0, xwe.default)("leadingComments", e, t);
|
|
}
|
|
s(Swe, "inheritLeadingComments");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/comments/inheritTrailingComments.js
|
|
var xS = E((ES) => {
|
|
"use strict";
|
|
Object.defineProperty(ES, "__esModule", {
|
|
value: !0
|
|
});
|
|
ES.default = Cwe;
|
|
var Twe = cy();
|
|
function Cwe(e, t) {
|
|
(0, Twe.default)("trailingComments", e, t);
|
|
}
|
|
s(Cwe, "inheritTrailingComments");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/comments/inheritsComments.js
|
|
var TS = E((SS) => {
|
|
"use strict";
|
|
Object.defineProperty(SS, "__esModule", {
|
|
value: !0
|
|
});
|
|
SS.default = Pwe;
|
|
var wwe = xS(), Awe = vS(), _we = bS();
|
|
function Pwe(e, t) {
|
|
return (0, wwe.default)(e, t), (0, Awe.default)(e, t), (0, _we.default)(e, t), e;
|
|
}
|
|
s(Pwe, "inheritsComments");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/comments/removeComments.js
|
|
var cL = E((CS) => {
|
|
"use strict";
|
|
Object.defineProperty(CS, "__esModule", {
|
|
value: !0
|
|
});
|
|
CS.default = Iwe;
|
|
var Fwe = _l();
|
|
function Iwe(e) {
|
|
return Fwe.COMMENT_KEYS.forEach((t) => {
|
|
e[t] = null;
|
|
}), e;
|
|
}
|
|
s(Iwe, "removeComments");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/constants/generated/index.js
|
|
var fL = E((ce) => {
|
|
"use strict";
|
|
Object.defineProperty(ce, "__esModule", {
|
|
value: !0
|
|
});
|
|
ce.WHILE_TYPES = ce.USERWHITESPACABLE_TYPES = ce.UNARYLIKE_TYPES = ce.TYPESCRIPT_TYPES = ce.TSTYPE_TYPES = ce.TSTYPEELEMENT_TYPES = ce.TSENTITYNAME_TYPES =
|
|
ce.TSBASETYPE_TYPES = ce.TERMINATORLESS_TYPES = ce.STATEMENT_TYPES = ce.STANDARDIZED_TYPES = ce.SCOPABLE_TYPES = ce.PUREISH_TYPES = ce.PROPERTY_TYPES =
|
|
ce.PRIVATE_TYPES = ce.PATTERN_TYPES = ce.PATTERNLIKE_TYPES = ce.OBJECTMEMBER_TYPES = ce.MODULESPECIFIER_TYPES = ce.MODULEDECLARATION_TYPES =
|
|
ce.MISCELLANEOUS_TYPES = ce.METHOD_TYPES = ce.LVAL_TYPES = ce.LOOP_TYPES = ce.LITERAL_TYPES = ce.JSX_TYPES = ce.IMPORTOREXPORTDECLARATION_TYPES =
|
|
ce.IMMUTABLE_TYPES = ce.FUNCTION_TYPES = ce.FUNCTIONPARENT_TYPES = ce.FOR_TYPES = ce.FORXSTATEMENT_TYPES = ce.FLOW_TYPES = ce.FLOWTYPE_TYPES =
|
|
ce.FLOWPREDICATE_TYPES = ce.FLOWDECLARATION_TYPES = ce.FLOWBASEANNOTATION_TYPES = ce.EXPRESSION_TYPES = ce.EXPRESSIONWRAPPER_TYPES = ce.EXPORTDECLARATION_TYPES =
|
|
ce.ENUMMEMBER_TYPES = ce.ENUMBODY_TYPES = ce.DECLARATION_TYPES = ce.CONDITIONAL_TYPES = ce.COMPLETIONSTATEMENT_TYPES = ce.CLASS_TYPES = ce.
|
|
BLOCK_TYPES = ce.BLOCKPARENT_TYPES = ce.BINARY_TYPES = ce.ACCESSOR_TYPES = void 0;
|
|
var Ke = Xi(), Yot = ce.STANDARDIZED_TYPES = Ke.FLIPPED_ALIAS_KEYS.Standardized, Zot = ce.EXPRESSION_TYPES = Ke.FLIPPED_ALIAS_KEYS.Expression,
|
|
Qot = ce.BINARY_TYPES = Ke.FLIPPED_ALIAS_KEYS.Binary, eut = ce.SCOPABLE_TYPES = Ke.FLIPPED_ALIAS_KEYS.Scopable, tut = ce.BLOCKPARENT_TYPES =
|
|
Ke.FLIPPED_ALIAS_KEYS.BlockParent, rut = ce.BLOCK_TYPES = Ke.FLIPPED_ALIAS_KEYS.Block, iut = ce.STATEMENT_TYPES = Ke.FLIPPED_ALIAS_KEYS.Statement,
|
|
nut = ce.TERMINATORLESS_TYPES = Ke.FLIPPED_ALIAS_KEYS.Terminatorless, sut = ce.COMPLETIONSTATEMENT_TYPES = Ke.FLIPPED_ALIAS_KEYS.CompletionStatement,
|
|
aut = ce.CONDITIONAL_TYPES = Ke.FLIPPED_ALIAS_KEYS.Conditional, out = ce.LOOP_TYPES = Ke.FLIPPED_ALIAS_KEYS.Loop, uut = ce.WHILE_TYPES = Ke.
|
|
FLIPPED_ALIAS_KEYS.While, lut = ce.EXPRESSIONWRAPPER_TYPES = Ke.FLIPPED_ALIAS_KEYS.ExpressionWrapper, cut = ce.FOR_TYPES = Ke.FLIPPED_ALIAS_KEYS.
|
|
For, fut = ce.FORXSTATEMENT_TYPES = Ke.FLIPPED_ALIAS_KEYS.ForXStatement, dut = ce.FUNCTION_TYPES = Ke.FLIPPED_ALIAS_KEYS.Function, put = ce.
|
|
FUNCTIONPARENT_TYPES = Ke.FLIPPED_ALIAS_KEYS.FunctionParent, hut = ce.PUREISH_TYPES = Ke.FLIPPED_ALIAS_KEYS.Pureish, mut = ce.DECLARATION_TYPES =
|
|
Ke.FLIPPED_ALIAS_KEYS.Declaration, yut = ce.PATTERNLIKE_TYPES = Ke.FLIPPED_ALIAS_KEYS.PatternLike, gut = ce.LVAL_TYPES = Ke.FLIPPED_ALIAS_KEYS.
|
|
LVal, but = ce.TSENTITYNAME_TYPES = Ke.FLIPPED_ALIAS_KEYS.TSEntityName, Dut = ce.LITERAL_TYPES = Ke.FLIPPED_ALIAS_KEYS.Literal, vut = ce.IMMUTABLE_TYPES =
|
|
Ke.FLIPPED_ALIAS_KEYS.Immutable, Eut = ce.USERWHITESPACABLE_TYPES = Ke.FLIPPED_ALIAS_KEYS.UserWhitespacable, xut = ce.METHOD_TYPES = Ke.FLIPPED_ALIAS_KEYS.
|
|
Method, Sut = ce.OBJECTMEMBER_TYPES = Ke.FLIPPED_ALIAS_KEYS.ObjectMember, Tut = ce.PROPERTY_TYPES = Ke.FLIPPED_ALIAS_KEYS.Property, Cut = ce.
|
|
UNARYLIKE_TYPES = Ke.FLIPPED_ALIAS_KEYS.UnaryLike, wut = ce.PATTERN_TYPES = Ke.FLIPPED_ALIAS_KEYS.Pattern, Aut = ce.CLASS_TYPES = Ke.FLIPPED_ALIAS_KEYS.
|
|
Class, Owe = ce.IMPORTOREXPORTDECLARATION_TYPES = Ke.FLIPPED_ALIAS_KEYS.ImportOrExportDeclaration, _ut = ce.EXPORTDECLARATION_TYPES = Ke.FLIPPED_ALIAS_KEYS.
|
|
ExportDeclaration, Put = ce.MODULESPECIFIER_TYPES = Ke.FLIPPED_ALIAS_KEYS.ModuleSpecifier, Fut = ce.ACCESSOR_TYPES = Ke.FLIPPED_ALIAS_KEYS.
|
|
Accessor, Iut = ce.PRIVATE_TYPES = Ke.FLIPPED_ALIAS_KEYS.Private, Out = ce.FLOW_TYPES = Ke.FLIPPED_ALIAS_KEYS.Flow, kut = ce.FLOWTYPE_TYPES =
|
|
Ke.FLIPPED_ALIAS_KEYS.FlowType, But = ce.FLOWBASEANNOTATION_TYPES = Ke.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation, Nut = ce.FLOWDECLARATION_TYPES =
|
|
Ke.FLIPPED_ALIAS_KEYS.FlowDeclaration, Mut = ce.FLOWPREDICATE_TYPES = Ke.FLIPPED_ALIAS_KEYS.FlowPredicate, Rut = ce.ENUMBODY_TYPES = Ke.FLIPPED_ALIAS_KEYS.
|
|
EnumBody, jut = ce.ENUMMEMBER_TYPES = Ke.FLIPPED_ALIAS_KEYS.EnumMember, Lut = ce.JSX_TYPES = Ke.FLIPPED_ALIAS_KEYS.JSX, qut = ce.MISCELLANEOUS_TYPES =
|
|
Ke.FLIPPED_ALIAS_KEYS.Miscellaneous, Uut = ce.TYPESCRIPT_TYPES = Ke.FLIPPED_ALIAS_KEYS.TypeScript, Wut = ce.TSTYPEELEMENT_TYPES = Ke.FLIPPED_ALIAS_KEYS.
|
|
TSTypeElement, $ut = ce.TSTYPE_TYPES = Ke.FLIPPED_ALIAS_KEYS.TSType, Vut = ce.TSBASETYPE_TYPES = Ke.FLIPPED_ALIAS_KEYS.TSBaseType, Hut = ce.
|
|
MODULEDECLARATION_TYPES = Owe;
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/converters/toBlock.js
|
|
var _S = E((AS) => {
|
|
"use strict";
|
|
Object.defineProperty(AS, "__esModule", {
|
|
value: !0
|
|
});
|
|
AS.default = kwe;
|
|
var fy = fr(), wS = wi();
|
|
function kwe(e, t) {
|
|
if ((0, fy.isBlockStatement)(e))
|
|
return e;
|
|
let r = [];
|
|
return (0, fy.isEmptyStatement)(e) ? r = [] : ((0, fy.isStatement)(e) || ((0, fy.isFunction)(t) ? e = (0, wS.returnStatement)(e) : e = (0, wS.
|
|
expressionStatement)(e)), r = [e]), (0, wS.blockStatement)(r);
|
|
}
|
|
s(kwe, "toBlock");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/converters/ensureBlock.js
|
|
var dL = E((PS) => {
|
|
"use strict";
|
|
Object.defineProperty(PS, "__esModule", {
|
|
value: !0
|
|
});
|
|
PS.default = Nwe;
|
|
var Bwe = _S();
|
|
function Nwe(e, t = "body") {
|
|
let r = (0, Bwe.default)(e[t], e);
|
|
return e[t] = r, r;
|
|
}
|
|
s(Nwe, "ensureBlock");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/converters/toIdentifier.js
|
|
var IS = E((FS) => {
|
|
"use strict";
|
|
Object.defineProperty(FS, "__esModule", {
|
|
value: !0
|
|
});
|
|
FS.default = jwe;
|
|
var Mwe = Al(), Rwe = wl();
|
|
function jwe(e) {
|
|
e = e + "";
|
|
let t = "";
|
|
for (let r of e)
|
|
t += (0, Rwe.isIdentifierChar)(r.codePointAt(0)) ? r : "-";
|
|
return t = t.replace(/^[-0-9]+/, ""), t = t.replace(/[-\s]+(.)?/g, function(r, i) {
|
|
return i ? i.toUpperCase() : "";
|
|
}), (0, Mwe.default)(t) || (t = `_${t}`), t || "_";
|
|
}
|
|
s(jwe, "toIdentifier");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
|
|
var pL = E((OS) => {
|
|
"use strict";
|
|
Object.defineProperty(OS, "__esModule", {
|
|
value: !0
|
|
});
|
|
OS.default = qwe;
|
|
var Lwe = IS();
|
|
function qwe(e) {
|
|
return e = (0, Lwe.default)(e), (e === "eval" || e === "arguments") && (e = "_" + e), e;
|
|
}
|
|
s(qwe, "toBindingIdentifierName");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/converters/toComputedKey.js
|
|
var hL = E((kS) => {
|
|
"use strict";
|
|
Object.defineProperty(kS, "__esModule", {
|
|
value: !0
|
|
});
|
|
kS.default = $we;
|
|
var Uwe = fr(), Wwe = wi();
|
|
function $we(e, t = e.key || e.property) {
|
|
return !e.computed && (0, Uwe.isIdentifier)(t) && (t = (0, Wwe.stringLiteral)(t.name)), t;
|
|
}
|
|
s($we, "toComputedKey");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/converters/toExpression.js
|
|
var mL = E((dy) => {
|
|
"use strict";
|
|
Object.defineProperty(dy, "__esModule", {
|
|
value: !0
|
|
});
|
|
dy.default = void 0;
|
|
var hd = fr(), ilt = dy.default = Vwe;
|
|
function Vwe(e) {
|
|
if ((0, hd.isExpressionStatement)(e) && (e = e.expression), (0, hd.isExpression)(e))
|
|
return e;
|
|
if ((0, hd.isClass)(e) ? e.type = "ClassExpression" : (0, hd.isFunction)(e) && (e.type = "FunctionExpression"), !(0, hd.isExpression)(e))
|
|
throw new Error(`cannot turn ${e.type} to an expression`);
|
|
return e;
|
|
}
|
|
s(Vwe, "toExpression");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/traverse/traverseFast.js
|
|
var NS = E((BS) => {
|
|
"use strict";
|
|
Object.defineProperty(BS, "__esModule", {
|
|
value: !0
|
|
});
|
|
BS.default = md;
|
|
var Hwe = Xi(), yL = Symbol(), gL = Symbol();
|
|
function md(e, t, r) {
|
|
if (!e) return !1;
|
|
let i = Hwe.VISITOR_KEYS[e.type];
|
|
if (!i) return !1;
|
|
r = r || {};
|
|
let n = t(e, r);
|
|
if (n !== void 0)
|
|
switch (n) {
|
|
case yL:
|
|
return !1;
|
|
case gL:
|
|
return !0;
|
|
}
|
|
for (let a of i) {
|
|
let o = e[a];
|
|
if (o) {
|
|
if (Array.isArray(o)) {
|
|
for (let u of o)
|
|
if (md(u, t, r)) return !0;
|
|
} else if (md(o, t, r)) return !0;
|
|
}
|
|
}
|
|
return !1;
|
|
}
|
|
s(md, "traverseFast");
|
|
md.skip = yL;
|
|
md.stop = gL;
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/modifications/removeProperties.js
|
|
var RS = E((MS) => {
|
|
"use strict";
|
|
Object.defineProperty(MS, "__esModule", {
|
|
value: !0
|
|
});
|
|
MS.default = Gwe;
|
|
var Kwe = _l(), bL = ["tokens", "start", "end", "loc", "raw", "rawValue"], zwe = [...Kwe.COMMENT_KEYS, "comments", ...bL];
|
|
function Gwe(e, t = {}) {
|
|
let r = t.preserveComments ? bL : zwe;
|
|
for (let n of r)
|
|
e[n] != null && (e[n] = void 0);
|
|
for (let n of Object.keys(e))
|
|
n[0] === "_" && e[n] != null && (e[n] = void 0);
|
|
let i = Object.getOwnPropertySymbols(e);
|
|
for (let n of i)
|
|
e[n] = null;
|
|
}
|
|
s(Gwe, "removeProperties");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
|
|
var LS = E((jS) => {
|
|
"use strict";
|
|
Object.defineProperty(jS, "__esModule", {
|
|
value: !0
|
|
});
|
|
jS.default = Ywe;
|
|
var Jwe = NS(), Xwe = RS();
|
|
function Ywe(e, t) {
|
|
return (0, Jwe.default)(e, Xwe.default, t), e;
|
|
}
|
|
s(Ywe, "removePropertiesDeep");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/converters/toKeyAlias.js
|
|
var vL = E((qS) => {
|
|
"use strict";
|
|
Object.defineProperty(qS, "__esModule", {
|
|
value: !0
|
|
});
|
|
qS.default = Uo;
|
|
var DL = fr(), Zwe = Na(), Qwe = LS();
|
|
function Uo(e, t = e.key) {
|
|
let r;
|
|
return e.kind === "method" ? Uo.increment() + "" : ((0, DL.isIdentifier)(t) ? r = t.name : (0, DL.isStringLiteral)(t) ? r = JSON.stringify(
|
|
t.value) : r = JSON.stringify((0, Qwe.default)((0, Zwe.default)(t))), e.computed && (r = `[${r}]`), e.static && (r = `static:${r}`), r);
|
|
}
|
|
s(Uo, "toKeyAlias");
|
|
Uo.uid = 0;
|
|
Uo.increment = function() {
|
|
return Uo.uid >= Number.MAX_SAFE_INTEGER ? Uo.uid = 0 : Uo.uid++;
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/converters/toStatement.js
|
|
var EL = E((hy) => {
|
|
"use strict";
|
|
Object.defineProperty(hy, "__esModule", {
|
|
value: !0
|
|
});
|
|
hy.default = void 0;
|
|
var py = fr(), eAe = wi(), hlt = hy.default = tAe;
|
|
function tAe(e, t) {
|
|
if ((0, py.isStatement)(e))
|
|
return e;
|
|
let r = !1, i;
|
|
if ((0, py.isClass)(e))
|
|
r = !0, i = "ClassDeclaration";
|
|
else if ((0, py.isFunction)(e))
|
|
r = !0, i = "FunctionDeclaration";
|
|
else if ((0, py.isAssignmentExpression)(e))
|
|
return (0, eAe.expressionStatement)(e);
|
|
if (r && !e.id && (i = !1), !i) {
|
|
if (t)
|
|
return !1;
|
|
throw new Error(`cannot turn ${e.type} to a statement`);
|
|
}
|
|
return e.type = i, e;
|
|
}
|
|
s(tAe, "toStatement");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/converters/valueToNode.js
|
|
var xL = E((my) => {
|
|
"use strict";
|
|
Object.defineProperty(my, "__esModule", {
|
|
value: !0
|
|
});
|
|
my.default = void 0;
|
|
var rAe = Al(), Or = wi(), glt = my.default = US, iAe = Function.call.bind(Object.prototype.toString);
|
|
function nAe(e) {
|
|
return iAe(e) === "[object RegExp]";
|
|
}
|
|
s(nAe, "isRegExp");
|
|
function sAe(e) {
|
|
if (typeof e != "object" || e === null || Object.prototype.toString.call(e) !== "[object Object]")
|
|
return !1;
|
|
let t = Object.getPrototypeOf(e);
|
|
return t === null || Object.getPrototypeOf(t) === null;
|
|
}
|
|
s(sAe, "isPlainObject");
|
|
function US(e) {
|
|
if (e === void 0)
|
|
return (0, Or.identifier)("undefined");
|
|
if (e === !0 || e === !1)
|
|
return (0, Or.booleanLiteral)(e);
|
|
if (e === null)
|
|
return (0, Or.nullLiteral)();
|
|
if (typeof e == "string")
|
|
return (0, Or.stringLiteral)(e);
|
|
if (typeof e == "number") {
|
|
let t;
|
|
if (Number.isFinite(e))
|
|
t = (0, Or.numericLiteral)(Math.abs(e));
|
|
else {
|
|
let r;
|
|
Number.isNaN(e) ? r = (0, Or.numericLiteral)(0) : r = (0, Or.numericLiteral)(1), t = (0, Or.binaryExpression)("/", r, (0, Or.numericLiteral)(
|
|
0));
|
|
}
|
|
return (e < 0 || Object.is(e, -0)) && (t = (0, Or.unaryExpression)("-", t)), t;
|
|
}
|
|
if (typeof e == "bigint")
|
|
return (0, Or.bigIntLiteral)(e.toString());
|
|
if (nAe(e)) {
|
|
let t = e.source, r = /\/([a-z]*)$/.exec(e.toString())[1];
|
|
return (0, Or.regExpLiteral)(t, r);
|
|
}
|
|
if (Array.isArray(e))
|
|
return (0, Or.arrayExpression)(e.map(US));
|
|
if (sAe(e)) {
|
|
let t = [];
|
|
for (let r of Object.keys(e)) {
|
|
let i, n = !1;
|
|
(0, rAe.default)(r) ? r === "__proto__" ? (n = !0, i = (0, Or.stringLiteral)(r)) : i = (0, Or.identifier)(r) : i = (0, Or.stringLiteral)(
|
|
r), t.push((0, Or.objectProperty)(i, US(e[r]), n));
|
|
}
|
|
return (0, Or.objectExpression)(t);
|
|
}
|
|
throw new Error("don't know how to turn this value into a node");
|
|
}
|
|
s(US, "valueToNode");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
|
|
var SL = E((WS) => {
|
|
"use strict";
|
|
Object.defineProperty(WS, "__esModule", {
|
|
value: !0
|
|
});
|
|
WS.default = oAe;
|
|
var aAe = wi();
|
|
function oAe(e, t, r = !1) {
|
|
return e.object = (0, aAe.memberExpression)(e.object, e.property, e.computed), e.property = t, e.computed = !!r, e;
|
|
}
|
|
s(oAe, "appendToMemberExpression");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/modifications/inherits.js
|
|
var CL = E(($S) => {
|
|
"use strict";
|
|
Object.defineProperty($S, "__esModule", {
|
|
value: !0
|
|
});
|
|
$S.default = lAe;
|
|
var TL = _l(), uAe = TS();
|
|
function lAe(e, t) {
|
|
if (!e || !t) return e;
|
|
for (let r of TL.INHERIT_KEYS.optional)
|
|
e[r] == null && (e[r] = t[r]);
|
|
for (let r of Object.keys(t))
|
|
r[0] === "_" && r !== "__clone" && (e[r] = t[r]);
|
|
for (let r of TL.INHERIT_KEYS.force)
|
|
e[r] = t[r];
|
|
return (0, uAe.default)(e, t), e;
|
|
}
|
|
s(lAe, "inherits");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
|
|
var wL = E((VS) => {
|
|
"use strict";
|
|
Object.defineProperty(VS, "__esModule", {
|
|
value: !0
|
|
});
|
|
VS.default = dAe;
|
|
var cAe = wi(), fAe = Ve();
|
|
function dAe(e, t) {
|
|
if ((0, fAe.isSuper)(e.object))
|
|
throw new Error("Cannot prepend node to super property access (`super.foo`).");
|
|
return e.object = (0, cAe.memberExpression)(t, e.object), e;
|
|
}
|
|
s(dAe, "prependToMemberExpression");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js
|
|
var AL = E((HS) => {
|
|
"use strict";
|
|
Object.defineProperty(HS, "__esModule", {
|
|
value: !0
|
|
});
|
|
HS.default = pAe;
|
|
function pAe(e) {
|
|
let t = [].concat(e), r = /* @__PURE__ */ Object.create(null);
|
|
for (; t.length; ) {
|
|
let i = t.pop();
|
|
if (i)
|
|
switch (i.type) {
|
|
case "ArrayPattern":
|
|
t.push(...i.elements);
|
|
break;
|
|
case "AssignmentExpression":
|
|
case "AssignmentPattern":
|
|
case "ForInStatement":
|
|
case "ForOfStatement":
|
|
t.push(i.left);
|
|
break;
|
|
case "ObjectPattern":
|
|
t.push(...i.properties);
|
|
break;
|
|
case "ObjectProperty":
|
|
t.push(i.value);
|
|
break;
|
|
case "RestElement":
|
|
case "UpdateExpression":
|
|
t.push(i.argument);
|
|
break;
|
|
case "UnaryExpression":
|
|
i.operator === "delete" && t.push(i.argument);
|
|
break;
|
|
case "Identifier":
|
|
r[i.name] = i;
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
return r;
|
|
}
|
|
s(pAe, "getAssignmentIdentifiers");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
|
|
var yd = E((zS) => {
|
|
"use strict";
|
|
Object.defineProperty(zS, "__esModule", {
|
|
value: !0
|
|
});
|
|
zS.default = KS;
|
|
var Rs = fr();
|
|
function KS(e, t, r, i) {
|
|
let n = [].concat(e), a = /* @__PURE__ */ Object.create(null);
|
|
for (; n.length; ) {
|
|
let o = n.shift();
|
|
if (!o || i && ((0, Rs.isAssignmentExpression)(o) || (0, Rs.isUnaryExpression)(o) || (0, Rs.isUpdateExpression)(o)))
|
|
continue;
|
|
if ((0, Rs.isIdentifier)(o)) {
|
|
t ? (a[o.name] = a[o.name] || []).push(o) : a[o.name] = o;
|
|
continue;
|
|
}
|
|
if ((0, Rs.isExportDeclaration)(o) && !(0, Rs.isExportAllDeclaration)(o)) {
|
|
(0, Rs.isDeclaration)(o.declaration) && n.push(o.declaration);
|
|
continue;
|
|
}
|
|
if (r) {
|
|
if ((0, Rs.isFunctionDeclaration)(o)) {
|
|
n.push(o.id);
|
|
continue;
|
|
}
|
|
if ((0, Rs.isFunctionExpression)(o))
|
|
continue;
|
|
}
|
|
let u = KS.keys[o.type];
|
|
if (u)
|
|
for (let l = 0; l < u.length; l++) {
|
|
let c = u[l], f = o[c];
|
|
f && (Array.isArray(f) ? n.push(...f) : n.push(f));
|
|
}
|
|
}
|
|
return a;
|
|
}
|
|
s(KS, "getBindingIdentifiers");
|
|
var hAe = {
|
|
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"],
|
|
TSImportEqualsDeclaration: ["id"],
|
|
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"]
|
|
};
|
|
KS.keys = hAe;
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
|
|
var _L = E((yy) => {
|
|
"use strict";
|
|
Object.defineProperty(yy, "__esModule", {
|
|
value: !0
|
|
});
|
|
yy.default = void 0;
|
|
var mAe = yd(), Flt = yy.default = yAe;
|
|
function yAe(e, t) {
|
|
return (0, mAe.default)(e, t, !0);
|
|
}
|
|
s(yAe, "getOuterBindingIdentifiers");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/retrievers/getFunctionName.js
|
|
var FL = E((GS) => {
|
|
"use strict";
|
|
Object.defineProperty(GS, "__esModule", {
|
|
value: !0
|
|
});
|
|
GS.default = bAe;
|
|
var Yi = fr();
|
|
function gAe(e) {
|
|
return (0, Yi.isNullLiteral)(e) ? "null" : (0, Yi.isRegExpLiteral)(e) ? `/${e.pattern}/${e.flags}` : (0, Yi.isTemplateLiteral)(e) ? e.quasis.
|
|
map((t) => t.value.raw).join("") : e.value !== void 0 ? String(e.value) : null;
|
|
}
|
|
s(gAe, "getNameFromLiteralId");
|
|
function PL(e) {
|
|
if (!e.computed || (0, Yi.isLiteral)(e.key))
|
|
return e.key;
|
|
}
|
|
s(PL, "getObjectMemberKey");
|
|
function bAe(e, t) {
|
|
if ("id" in e && e.id)
|
|
return {
|
|
name: e.id.name,
|
|
originalNode: e.id
|
|
};
|
|
let r = "", i;
|
|
if ((0, Yi.isObjectProperty)(t, {
|
|
value: e
|
|
}) ? i = PL(t) : (0, Yi.isObjectMethod)(e) || (0, Yi.isClassMethod)(e) ? (i = PL(e), e.kind === "get" ? r = "get " : e.kind === "set" &&
|
|
(r = "set ")) : (0, Yi.isVariableDeclarator)(t, {
|
|
init: e
|
|
}) ? i = t.id : (0, Yi.isAssignmentExpression)(t, {
|
|
operator: "=",
|
|
right: e
|
|
}) && (i = t.left), !i) return null;
|
|
let n = (0, Yi.isLiteral)(i) ? gAe(i) : (0, Yi.isIdentifier)(i) ? i.name : (0, Yi.isPrivateName)(i) ? i.id.name : null;
|
|
return n == null ? null : {
|
|
name: r + n,
|
|
originalNode: i
|
|
};
|
|
}
|
|
s(bAe, "getFunctionName");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/traverse/traverse.js
|
|
var IL = E((XS) => {
|
|
"use strict";
|
|
Object.defineProperty(XS, "__esModule", {
|
|
value: !0
|
|
});
|
|
XS.default = vAe;
|
|
var DAe = Xi();
|
|
function vAe(e, t, r) {
|
|
typeof t == "function" && (t = {
|
|
enter: t
|
|
});
|
|
let {
|
|
enter: i,
|
|
exit: n
|
|
} = t;
|
|
JS(e, i, n, r, []);
|
|
}
|
|
s(vAe, "traverse");
|
|
function JS(e, t, r, i, n) {
|
|
let a = DAe.VISITOR_KEYS[e.type];
|
|
if (a) {
|
|
t && t(e, n, i);
|
|
for (let o of a) {
|
|
let u = e[o];
|
|
if (Array.isArray(u))
|
|
for (let l = 0; l < u.length; l++) {
|
|
let c = u[l];
|
|
c && (n.push({
|
|
node: e,
|
|
key: o,
|
|
index: l
|
|
}), JS(c, t, r, i, n), n.pop());
|
|
}
|
|
else u && (n.push({
|
|
node: e,
|
|
key: o
|
|
}), JS(u, t, r, i, n), n.pop());
|
|
}
|
|
r && r(e, n, i);
|
|
}
|
|
}
|
|
s(JS, "traverseSimpleImpl");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isBinding.js
|
|
var OL = E((YS) => {
|
|
"use strict";
|
|
Object.defineProperty(YS, "__esModule", {
|
|
value: !0
|
|
});
|
|
YS.default = xAe;
|
|
var EAe = yd();
|
|
function xAe(e, t, r) {
|
|
if (r && e.type === "Identifier" && t.type === "ObjectProperty" && r.type === "ObjectExpression")
|
|
return !1;
|
|
let i = EAe.default.keys[t.type];
|
|
if (i)
|
|
for (let n = 0; n < i.length; n++) {
|
|
let a = i[n], o = t[a];
|
|
if (Array.isArray(o)) {
|
|
if (o.includes(e)) return !0;
|
|
} else if (o === e) return !0;
|
|
}
|
|
return !1;
|
|
}
|
|
s(xAe, "isBinding");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isLet.js
|
|
var QS = E((ZS) => {
|
|
"use strict";
|
|
Object.defineProperty(ZS, "__esModule", {
|
|
value: !0
|
|
});
|
|
ZS.default = TAe;
|
|
var SAe = fr();
|
|
kL = Symbol.for("var used to be block scoped");
|
|
var kL;
|
|
function TAe(e) {
|
|
return (0, SAe.isVariableDeclaration)(e) && (e.kind !== "var" || e[kL]);
|
|
}
|
|
s(TAe, "isLet");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isBlockScoped.js
|
|
var NL = E((eT) => {
|
|
"use strict";
|
|
Object.defineProperty(eT, "__esModule", {
|
|
value: !0
|
|
});
|
|
eT.default = wAe;
|
|
var BL = fr(), CAe = QS();
|
|
function wAe(e) {
|
|
return (0, BL.isFunctionDeclaration)(e) || (0, BL.isClassDeclaration)(e) || (0, CAe.default)(e);
|
|
}
|
|
s(wAe, "isBlockScoped");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isImmutable.js
|
|
var ML = E((tT) => {
|
|
"use strict";
|
|
Object.defineProperty(tT, "__esModule", {
|
|
value: !0
|
|
});
|
|
tT.default = PAe;
|
|
var AAe = Zm(), _Ae = fr();
|
|
function PAe(e) {
|
|
return (0, AAe.default)(e.type, "Immutable") ? !0 : (0, _Ae.isIdentifier)(e) ? e.name === "undefined" : !1;
|
|
}
|
|
s(PAe, "isImmutable");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isNodesEquivalent.js
|
|
var jL = E((iT) => {
|
|
"use strict";
|
|
Object.defineProperty(iT, "__esModule", {
|
|
value: !0
|
|
});
|
|
iT.default = rT;
|
|
var RL = Xi();
|
|
function rT(e, t) {
|
|
if (typeof e != "object" || typeof t != "object" || e == null || t == null)
|
|
return e === t;
|
|
if (e.type !== t.type)
|
|
return !1;
|
|
let r = Object.keys(RL.NODE_FIELDS[e.type] || e.type), i = RL.VISITOR_KEYS[e.type];
|
|
for (let n of r) {
|
|
let a = e[n], o = t[n];
|
|
if (typeof a != typeof o)
|
|
return !1;
|
|
if (!(a == null && o == null)) {
|
|
if (a == null || o == null)
|
|
return !1;
|
|
if (Array.isArray(a)) {
|
|
if (!Array.isArray(o) || a.length !== o.length)
|
|
return !1;
|
|
for (let u = 0; u < a.length; u++)
|
|
if (!rT(a[u], o[u]))
|
|
return !1;
|
|
continue;
|
|
}
|
|
if (typeof a == "object" && !(i != null && i.includes(n))) {
|
|
for (let u of Object.keys(a))
|
|
if (a[u] !== o[u])
|
|
return !1;
|
|
continue;
|
|
}
|
|
if (!rT(a, o))
|
|
return !1;
|
|
}
|
|
}
|
|
return !0;
|
|
}
|
|
s(rT, "isNodesEquivalent");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isReferenced.js
|
|
var LL = E((nT) => {
|
|
"use strict";
|
|
Object.defineProperty(nT, "__esModule", {
|
|
value: !0
|
|
});
|
|
nT.default = FAe;
|
|
function FAe(e, t, r) {
|
|
switch (t.type) {
|
|
case "MemberExpression":
|
|
case "OptionalMemberExpression":
|
|
return t.property === e ? !!t.computed : t.object === e;
|
|
case "JSXMemberExpression":
|
|
return t.object === e;
|
|
case "VariableDeclarator":
|
|
return t.init === e;
|
|
case "ArrowFunctionExpression":
|
|
return t.body === e;
|
|
case "PrivateName":
|
|
return !1;
|
|
case "ClassMethod":
|
|
case "ClassPrivateMethod":
|
|
case "ObjectMethod":
|
|
return t.key === e ? !!t.computed : !1;
|
|
case "ObjectProperty":
|
|
return t.key === e ? !!t.computed : !r || r.type !== "ObjectPattern";
|
|
case "ClassProperty":
|
|
case "ClassAccessorProperty":
|
|
return t.key === e ? !!t.computed : !0;
|
|
case "ClassPrivateProperty":
|
|
return t.key !== e;
|
|
case "ClassDeclaration":
|
|
case "ClassExpression":
|
|
return t.superClass === e;
|
|
case "AssignmentExpression":
|
|
return t.right === e;
|
|
case "AssignmentPattern":
|
|
return t.right === e;
|
|
case "LabeledStatement":
|
|
return !1;
|
|
case "CatchClause":
|
|
return !1;
|
|
case "RestElement":
|
|
return !1;
|
|
case "BreakStatement":
|
|
case "ContinueStatement":
|
|
return !1;
|
|
case "FunctionDeclaration":
|
|
case "FunctionExpression":
|
|
return !1;
|
|
case "ExportNamespaceSpecifier":
|
|
case "ExportDefaultSpecifier":
|
|
return !1;
|
|
case "ExportSpecifier":
|
|
return r != null && r.source ? !1 : t.local === e;
|
|
case "ImportDefaultSpecifier":
|
|
case "ImportNamespaceSpecifier":
|
|
case "ImportSpecifier":
|
|
return !1;
|
|
case "ImportAttribute":
|
|
return !1;
|
|
case "JSXAttribute":
|
|
return !1;
|
|
case "ObjectPattern":
|
|
case "ArrayPattern":
|
|
return !1;
|
|
case "MetaProperty":
|
|
return !1;
|
|
case "ObjectTypeProperty":
|
|
return t.key !== e;
|
|
case "TSEnumMember":
|
|
return t.id !== e;
|
|
case "TSPropertySignature":
|
|
return t.key === e ? !!t.computed : !0;
|
|
}
|
|
return !0;
|
|
}
|
|
s(FAe, "isReferenced");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isScope.js
|
|
var qL = E((sT) => {
|
|
"use strict";
|
|
Object.defineProperty(sT, "__esModule", {
|
|
value: !0
|
|
});
|
|
sT.default = IAe;
|
|
var Wo = fr();
|
|
function IAe(e, t) {
|
|
return (0, Wo.isBlockStatement)(e) && ((0, Wo.isFunction)(t) || (0, Wo.isCatchClause)(t)) ? !1 : (0, Wo.isPattern)(e) && ((0, Wo.isFunction)(
|
|
t) || (0, Wo.isCatchClause)(t)) ? !0 : (0, Wo.isScopable)(e);
|
|
}
|
|
s(IAe, "isScope");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isSpecifierDefault.js
|
|
var WL = E((aT) => {
|
|
"use strict";
|
|
Object.defineProperty(aT, "__esModule", {
|
|
value: !0
|
|
});
|
|
aT.default = OAe;
|
|
var UL = fr();
|
|
function OAe(e) {
|
|
return (0, UL.isImportDefaultSpecifier)(e) || (0, UL.isIdentifier)(e.imported || e.exported, {
|
|
name: "default"
|
|
});
|
|
}
|
|
s(OAe, "isSpecifierDefault");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isValidES3Identifier.js
|
|
var $L = E((oT) => {
|
|
"use strict";
|
|
Object.defineProperty(oT, "__esModule", {
|
|
value: !0
|
|
});
|
|
oT.default = NAe;
|
|
var kAe = Al(), BAe = /* @__PURE__ */ new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "impleme\
|
|
nts", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "trans\
|
|
ient", "volatile"]);
|
|
function NAe(e) {
|
|
return (0, kAe.default)(e) && !BAe.has(e);
|
|
}
|
|
s(NAe, "isValidES3Identifier");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/validators/isVar.js
|
|
var HL = E((uT) => {
|
|
"use strict";
|
|
Object.defineProperty(uT, "__esModule", {
|
|
value: !0
|
|
});
|
|
uT.default = RAe;
|
|
var MAe = fr();
|
|
VL = Symbol.for("var used to be block scoped");
|
|
var VL;
|
|
function RAe(e) {
|
|
return (0, MAe.isVariableDeclaration)(e, {
|
|
kind: "var"
|
|
}) && !e[VL];
|
|
}
|
|
s(RAe, "isVar");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
|
|
var KL = E((fT) => {
|
|
"use strict";
|
|
Object.defineProperty(fT, "__esModule", {
|
|
value: !0
|
|
});
|
|
fT.default = gy;
|
|
var jAe = yd(), $o = fr(), lT = wi(), cT = aS(), LAe = Na();
|
|
function gy(e, t) {
|
|
let r = [], i = !0;
|
|
for (let n of e)
|
|
if ((0, $o.isEmptyStatement)(n) || (i = !1), (0, $o.isExpression)(n))
|
|
r.push(n);
|
|
else if ((0, $o.isExpressionStatement)(n))
|
|
r.push(n.expression);
|
|
else if ((0, $o.isVariableDeclaration)(n)) {
|
|
if (n.kind !== "var") return;
|
|
for (let a of n.declarations) {
|
|
let o = (0, jAe.default)(a);
|
|
for (let u of Object.keys(o))
|
|
t.push({
|
|
kind: n.kind,
|
|
id: (0, LAe.default)(o[u])
|
|
});
|
|
a.init && r.push((0, lT.assignmentExpression)("=", a.id, a.init));
|
|
}
|
|
i = !0;
|
|
} else if ((0, $o.isIfStatement)(n)) {
|
|
let a = n.consequent ? gy([n.consequent], t) : (0, cT.buildUndefinedNode)(), o = n.alternate ? gy([n.alternate], t) : (0, cT.buildUndefinedNode)();
|
|
if (!a || !o) return;
|
|
r.push((0, lT.conditionalExpression)(n.test, a, o));
|
|
} else if ((0, $o.isBlockStatement)(n)) {
|
|
let a = gy(n.body, t);
|
|
if (!a) return;
|
|
r.push(a);
|
|
} else if ((0, $o.isEmptyStatement)(n))
|
|
e.indexOf(n) === 0 && (i = !0);
|
|
else
|
|
return;
|
|
return i && r.push((0, cT.buildUndefinedNode)()), r.length === 1 ? r[0] : (0, lT.sequenceExpression)(r);
|
|
}
|
|
s(gy, "gatherSequenceExpressions");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/converters/toSequenceExpression.js
|
|
var zL = E((dT) => {
|
|
"use strict";
|
|
Object.defineProperty(dT, "__esModule", {
|
|
value: !0
|
|
});
|
|
dT.default = UAe;
|
|
var qAe = KL();
|
|
function UAe(e, t) {
|
|
if (!(e != null && e.length)) return;
|
|
let r = [], i = (0, qAe.default)(e, r);
|
|
if (i) {
|
|
for (let n of r)
|
|
t.push(n);
|
|
return i;
|
|
}
|
|
}
|
|
s(UAe, "toSequenceExpression");
|
|
});
|
|
|
|
// ../node_modules/@babel/types/lib/index.js
|
|
var Ve = E((ve) => {
|
|
"use strict";
|
|
Object.defineProperty(ve, "__esModule", {
|
|
value: !0
|
|
});
|
|
var Ma = {
|
|
react: !0,
|
|
assertNode: !0,
|
|
createTypeAnnotationBasedOnTypeof: !0,
|
|
createUnionTypeAnnotation: !0,
|
|
createFlowUnionType: !0,
|
|
createTSUnionType: !0,
|
|
cloneNode: !0,
|
|
clone: !0,
|
|
cloneDeep: !0,
|
|
cloneDeepWithoutLoc: !0,
|
|
cloneWithoutLoc: !0,
|
|
addComment: !0,
|
|
addComments: !0,
|
|
inheritInnerComments: !0,
|
|
inheritLeadingComments: !0,
|
|
inheritsComments: !0,
|
|
inheritTrailingComments: !0,
|
|
removeComments: !0,
|
|
ensureBlock: !0,
|
|
toBindingIdentifierName: !0,
|
|
toBlock: !0,
|
|
toComputedKey: !0,
|
|
toExpression: !0,
|
|
toIdentifier: !0,
|
|
toKeyAlias: !0,
|
|
toStatement: !0,
|
|
valueToNode: !0,
|
|
appendToMemberExpression: !0,
|
|
inherits: !0,
|
|
prependToMemberExpression: !0,
|
|
removeProperties: !0,
|
|
removePropertiesDeep: !0,
|
|
removeTypeDuplicates: !0,
|
|
getAssignmentIdentifiers: !0,
|
|
getBindingIdentifiers: !0,
|
|
getOuterBindingIdentifiers: !0,
|
|
getFunctionName: !0,
|
|
traverse: !0,
|
|
traverseFast: !0,
|
|
shallowEqual: !0,
|
|
is: !0,
|
|
isBinding: !0,
|
|
isBlockScoped: !0,
|
|
isImmutable: !0,
|
|
isLet: !0,
|
|
isNode: !0,
|
|
isNodesEquivalent: !0,
|
|
isPlaceholderType: !0,
|
|
isReferenced: !0,
|
|
isScope: !0,
|
|
isSpecifierDefault: !0,
|
|
isType: !0,
|
|
isValidES3Identifier: !0,
|
|
isValidIdentifier: !0,
|
|
isVar: !0,
|
|
matchesPattern: !0,
|
|
validate: !0,
|
|
buildMatchMemberExpression: !0,
|
|
__internal__deprecationWarning: !0
|
|
};
|
|
Object.defineProperty(ve, "__internal__deprecationWarning", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return H_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "addComment", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return QAe.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "addComments", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return e_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "appendToMemberExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return m_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "assertNode", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return HAe.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "buildMatchMemberExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return V_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "clone", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return JAe.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "cloneDeep", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return XAe.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "cloneDeepWithoutLoc", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return YAe.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "cloneNode", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return GAe.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "cloneWithoutLoc", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return ZAe.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "createFlowUnionType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return GL.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "createTSUnionType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return zAe.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "createTypeAnnotationBasedOnTypeof", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return KAe.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "createUnionTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return GL.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "ensureBlock", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return a_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "getAssignmentIdentifiers", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return E_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "getBindingIdentifiers", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return x_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "getFunctionName", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return T_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "getOuterBindingIdentifiers", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return S_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "inheritInnerComments", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return t_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "inheritLeadingComments", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return r_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "inheritTrailingComments", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return n_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "inherits", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return y_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "inheritsComments", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return i_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "is", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return A_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isBinding", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return __e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isBlockScoped", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return P_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isImmutable", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return F_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isLet", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return I_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isNode", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return O_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isNodesEquivalent", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return k_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isPlaceholderType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return B_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isReferenced", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isScope", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return M_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isSpecifierDefault", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return R_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isType", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return j_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isValidES3Identifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return L_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isValidIdentifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return q_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "isVar", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return U_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "matchesPattern", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return W_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "prependToMemberExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return g_e.default;
|
|
}, "get")
|
|
});
|
|
ve.react = void 0;
|
|
Object.defineProperty(ve, "removeComments", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return s_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "removeProperties", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return b_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "removePropertiesDeep", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return D_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "removeTypeDuplicates", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return v_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "shallowEqual", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return w_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "toBindingIdentifierName", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return o_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "toBlock", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return u_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "toComputedKey", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return l_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "toExpression", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return c_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "toIdentifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return f_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "toKeyAlias", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return d_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "toStatement", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return p_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "traverse", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return by.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "traverseFast", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return C_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "validate", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return $_e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ve, "valueToNode", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return h_e.default;
|
|
}, "get")
|
|
});
|
|
var WAe = XR(), $Ae = YR(), VAe = $j(), HAe = Vj(), pT = Hj();
|
|
Object.keys(pT).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || Object.prototype.hasOwnProperty.call(Ma, e) || e in ve && ve[e] === pT[e] || Object.defineProperty(
|
|
ve, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return pT[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var KAe = Kj(), GL = Jj(), zAe = Qj(), hT = aS();
|
|
Object.keys(hT).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || Object.prototype.hasOwnProperty.call(Ma, e) || e in ve && ve[e] === hT[e] || Object.defineProperty(
|
|
ve, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return hT[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var mT = wi();
|
|
Object.keys(mT).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || Object.prototype.hasOwnProperty.call(Ma, e) || e in ve && ve[e] === mT[e] || Object.defineProperty(
|
|
ve, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return mT[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var GAe = Na(), JAe = sL(), XAe = aL(), YAe = oL(), ZAe = uL(), QAe = lL(), e_e = hS(), t_e = bS(), r_e = vS(), i_e = TS(), n_e = xS(), s_e = cL(),
|
|
yT = fL();
|
|
Object.keys(yT).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || Object.prototype.hasOwnProperty.call(Ma, e) || e in ve && ve[e] === yT[e] || Object.defineProperty(
|
|
ve, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return yT[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var gT = _l();
|
|
Object.keys(gT).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || Object.prototype.hasOwnProperty.call(Ma, e) || e in ve && ve[e] === gT[e] || Object.defineProperty(
|
|
ve, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return gT[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var a_e = dL(), o_e = pL(), u_e = _S(), l_e = hL(), c_e = mL(), f_e = IS(), d_e = vL(), p_e = EL(), h_e = xL(), bT = Xi();
|
|
Object.keys(bT).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || Object.prototype.hasOwnProperty.call(Ma, e) || e in ve && ve[e] === bT[e] || Object.defineProperty(
|
|
ve, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return bT[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var m_e = SL(), y_e = CL(), g_e = wL(), b_e = RS(), D_e = LS(), v_e = tS(), E_e = AL(), x_e = yd(), S_e = _L(), T_e = FL(), by = IL();
|
|
Object.keys(by).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || Object.prototype.hasOwnProperty.call(Ma, e) || e in ve && ve[e] === by[e] || Object.defineProperty(
|
|
ve, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return by[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var C_e = NS(), w_e = Xm(), A_e = Cl(), __e = OL(), P_e = NL(), F_e = ML(), I_e = QS(), O_e = Z1(), k_e = jL(), B_e = S1(), N_e = LL(), M_e = qL(),
|
|
R_e = WL(), j_e = Zm(), L_e = $L(), q_e = Al(), U_e = HL(), W_e = g1(), $_e = ry(), V_e = D1(), DT = fr();
|
|
Object.keys(DT).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || Object.prototype.hasOwnProperty.call(Ma, e) || e in ve && ve[e] === DT[e] || Object.defineProperty(
|
|
ve, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return DT[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var H_e = rd(), K_e = zL(), oct = ve.react = {
|
|
isReactComponent: WAe.default,
|
|
isCompatTag: $Ae.default,
|
|
buildChildren: VAe.default
|
|
};
|
|
ve.toSequenceExpression = K_e.default;
|
|
process.env.BABEL_TYPES_8_BREAKING && console.warn("BABEL_TYPES_8_BREAKING is not supported anymore. Use the latest Babel 8.0.0 pre-releas\
|
|
e instead!");
|
|
});
|
|
|
|
// ../node_modules/@babel/template/lib/formatters.js
|
|
var JL = E((Zi) => {
|
|
"use strict";
|
|
Object.defineProperty(Zi, "__esModule", {
|
|
value: !0
|
|
});
|
|
Zi.statements = Zi.statement = Zi.smart = Zi.program = Zi.expression = void 0;
|
|
var z_e = Ve(), {
|
|
assertExpressionStatement: G_e
|
|
} = z_e;
|
|
function vT(e) {
|
|
return {
|
|
code: /* @__PURE__ */ s((t) => `/* @babel/template */;
|
|
${t}`, "code"),
|
|
validate: /* @__PURE__ */ s(() => {
|
|
}, "validate"),
|
|
unwrap: /* @__PURE__ */ s((t) => e(t.program.body.slice(1)), "unwrap")
|
|
};
|
|
}
|
|
s(vT, "makeStatementFormatter");
|
|
var cct = Zi.smart = vT((e) => e.length > 1 ? e : e[0]), fct = Zi.statements = vT((e) => e), dct = Zi.statement = vT((e) => {
|
|
if (e.length === 0)
|
|
throw new Error("Found nothing to return.");
|
|
if (e.length > 1)
|
|
throw new Error("Found multiple statements but wanted one");
|
|
return e[0];
|
|
}), J_e = Zi.expression = {
|
|
code: /* @__PURE__ */ s((e) => `(
|
|
${e}
|
|
)`, "code"),
|
|
validate: /* @__PURE__ */ s((e) => {
|
|
if (e.program.body.length > 1)
|
|
throw new Error("Found multiple statements but wanted one");
|
|
if (J_e.unwrap(e).start === 0)
|
|
throw new Error("Parse result included parens.");
|
|
}, "validate"),
|
|
unwrap: /* @__PURE__ */ s(({
|
|
program: e
|
|
}) => {
|
|
let [t] = e.body;
|
|
return G_e(t), t.expression;
|
|
}, "unwrap")
|
|
}, pct = Zi.program = {
|
|
code: /* @__PURE__ */ s((e) => e, "code"),
|
|
validate: /* @__PURE__ */ s(() => {
|
|
}, "validate"),
|
|
unwrap: /* @__PURE__ */ s((e) => e.program, "unwrap")
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/template/lib/options.js
|
|
var Dy = E((gd) => {
|
|
"use strict";
|
|
Object.defineProperty(gd, "__esModule", {
|
|
value: !0
|
|
});
|
|
gd.merge = Z_e;
|
|
gd.normalizeReplacements = e2e;
|
|
gd.validate = Q_e;
|
|
var X_e = ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"];
|
|
function Y_e(e, t) {
|
|
if (e == null) return {};
|
|
var r = {};
|
|
for (var i in e) if ({}.hasOwnProperty.call(e, i)) {
|
|
if (t.indexOf(i) !== -1) continue;
|
|
r[i] = e[i];
|
|
}
|
|
return r;
|
|
}
|
|
s(Y_e, "_objectWithoutPropertiesLoose");
|
|
function Z_e(e, t) {
|
|
let {
|
|
placeholderWhitelist: r = e.placeholderWhitelist,
|
|
placeholderPattern: i = e.placeholderPattern,
|
|
preserveComments: n = e.preserveComments,
|
|
syntacticPlaceholders: a = e.syntacticPlaceholders
|
|
} = t;
|
|
return {
|
|
parser: Object.assign({}, e.parser, t.parser),
|
|
placeholderWhitelist: r,
|
|
placeholderPattern: i,
|
|
preserveComments: n,
|
|
syntacticPlaceholders: a
|
|
};
|
|
}
|
|
s(Z_e, "merge");
|
|
function Q_e(e) {
|
|
if (e != null && typeof e != "object")
|
|
throw new Error("Unknown template options.");
|
|
let t = e || {}, {
|
|
placeholderWhitelist: r,
|
|
placeholderPattern: i,
|
|
preserveComments: n,
|
|
syntacticPlaceholders: a
|
|
} = t, o = Y_e(t, X_e);
|
|
if (r != null && !(r instanceof Set))
|
|
throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
|
|
if (i != null && !(i instanceof RegExp) && i !== !1)
|
|
throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");
|
|
if (n != null && typeof n != "boolean")
|
|
throw new Error("'.preserveComments' must be a boolean, null, or undefined");
|
|
if (a != null && typeof a != "boolean")
|
|
throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");
|
|
if (a === !0 && (r != null || i != null))
|
|
throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");
|
|
return {
|
|
parser: o,
|
|
placeholderWhitelist: r || void 0,
|
|
placeholderPattern: i ?? void 0,
|
|
preserveComments: n ?? void 0,
|
|
syntacticPlaceholders: a ?? void 0
|
|
};
|
|
}
|
|
s(Q_e, "validate");
|
|
function e2e(e) {
|
|
if (Array.isArray(e))
|
|
return e.reduce((t, r, i) => (t["$" + i] = r, t), {});
|
|
if (typeof e == "object" || e == null)
|
|
return e || void 0;
|
|
throw new Error("Template replacements must be an array, object, null, or undefined");
|
|
}
|
|
s(e2e, "normalizeReplacements");
|
|
});
|
|
|
|
// ../node_modules/@babel/parser/lib/index.js
|
|
var zo = E((Ad) => {
|
|
"use strict";
|
|
Object.defineProperty(Ad, "__esModule", {
|
|
value: !0
|
|
});
|
|
function t2e(e, t) {
|
|
if (e == null) return {};
|
|
var r = {};
|
|
for (var i in e) if ({}.hasOwnProperty.call(e, i)) {
|
|
if (t.indexOf(i) !== -1) continue;
|
|
r[i] = e[i];
|
|
}
|
|
return r;
|
|
}
|
|
s(t2e, "_objectWithoutPropertiesLoose");
|
|
var ts = class {
|
|
static {
|
|
s(this, "Position");
|
|
}
|
|
constructor(t, r, i) {
|
|
this.line = void 0, this.column = void 0, this.index = void 0, this.line = t, this.column = r, this.index = i;
|
|
}
|
|
}, Rl = class {
|
|
static {
|
|
s(this, "SourceLocation");
|
|
}
|
|
constructor(t, r) {
|
|
this.start = void 0, this.end = void 0, this.filename = void 0, this.identifierName = void 0, this.start = t, this.end = r;
|
|
}
|
|
};
|
|
function yi(e, t) {
|
|
let {
|
|
line: r,
|
|
column: i,
|
|
index: n
|
|
} = e;
|
|
return new ts(r, i + t, n + t);
|
|
}
|
|
s(yi, "createPositionWithColumnOffset");
|
|
var XL = "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED", r2e = {
|
|
ImportMetaOutsideModule: {
|
|
message: `import.meta may appear only with 'sourceType: "module"'`,
|
|
code: XL
|
|
},
|
|
ImportOutsideModule: {
|
|
message: `'import' and 'export' may appear only with 'sourceType: "module"'`,
|
|
code: XL
|
|
}
|
|
}, YL = {
|
|
ArrayPattern: "array destructuring pattern",
|
|
AssignmentExpression: "assignment expression",
|
|
AssignmentPattern: "assignment expression",
|
|
ArrowFunctionExpression: "arrow function expression",
|
|
ConditionalExpression: "conditional expression",
|
|
CatchClause: "catch clause",
|
|
ForOfStatement: "for-of statement",
|
|
ForInStatement: "for-in statement",
|
|
ForStatement: "for-loop",
|
|
FormalParameters: "function parameter list",
|
|
Identifier: "identifier",
|
|
ImportSpecifier: "import specifier",
|
|
ImportDefaultSpecifier: "import default specifier",
|
|
ImportNamespaceSpecifier: "import namespace specifier",
|
|
ObjectPattern: "object destructuring pattern",
|
|
ParenthesizedExpression: "parenthesized expression",
|
|
RestElement: "rest element",
|
|
UpdateExpression: {
|
|
true: "prefix operation",
|
|
false: "postfix operation"
|
|
},
|
|
VariableDeclarator: "variable declaration",
|
|
YieldExpression: "yield expression"
|
|
}, xy = /* @__PURE__ */ s((e) => e.type === "UpdateExpression" ? YL.UpdateExpression[`${e.prefix}`] : YL[e.type], "toNodeDescription"), i2e = {
|
|
AccessorIsGenerator: /* @__PURE__ */ s(({
|
|
kind: e
|
|
}) => `A ${e}ter cannot be a generator.`, "AccessorIsGenerator"),
|
|
ArgumentsInClass: "'arguments' is only allowed in functions and class methods.",
|
|
AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.",
|
|
AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.",
|
|
AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.",
|
|
AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
|
|
AwaitUsingNotInAsyncContext: "'await using' is only allowed within async functions and at the top levels of modules.",
|
|
AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
|
|
BadGetterArity: "A 'get' accessor must not have any formal parameters.",
|
|
BadSetterArity: "A 'set' accessor must have exactly one formal parameter.",
|
|
BadSetterRestParameter: "A 'set' accessor function argument must not be a rest parameter.",
|
|
ConstructorClassField: "Classes may not have a field named 'constructor'.",
|
|
ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",
|
|
ConstructorIsAccessor: "Class constructor may not be an accessor.",
|
|
ConstructorIsAsync: "Constructor can't be an async function.",
|
|
ConstructorIsGenerator: "Constructor can't be a generator.",
|
|
DeclarationMissingInitializer: /* @__PURE__ */ s(({
|
|
kind: e
|
|
}) => `Missing initializer in ${e} declaration.`, "DeclarationMissingInitializer"),
|
|
DecoratorArgumentsOutsideParentheses: "Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(deco\
|
|
rator)(args)'.",
|
|
DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use\
|
|
the 'export @decorator class {}' syntax.",
|
|
DecoratorsBeforeAfterExport: "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the s\
|
|
ame time.",
|
|
DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",
|
|
DecoratorExportClass: "Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use \
|
|
the '@decorator export class {}' syntax.",
|
|
DecoratorSemicolon: "Decorators must not be followed by a semicolon.",
|
|
DecoratorStaticBlock: "Decorators can't be used with a static block.",
|
|
DeferImportRequiresNamespace: 'Only `import defer * as x from "./module"` is valid.',
|
|
DeletePrivateField: "Deleting a private field is not allowed.",
|
|
DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.",
|
|
DuplicateConstructor: "Duplicate constructor in the same class.",
|
|
DuplicateDefaultExport: "Only one default export allowed per module.",
|
|
DuplicateExport: /* @__PURE__ */ s(({
|
|
exportName: e
|
|
}) => `\`${e}\` has already been exported. Exported identifiers must be unique.`, "DuplicateExport"),
|
|
DuplicateProto: "Redefinition of __proto__ property.",
|
|
DuplicateRegExpFlags: "Duplicate regular expression flag.",
|
|
DynamicImportPhaseRequiresImportExpressions: /* @__PURE__ */ s(({
|
|
phase: e
|
|
}) => `'import.${e}(...)' can only be parsed when using the 'createImportExpressions' option.`, "DynamicImportPhaseRequiresImportExpress\
|
|
ions"),
|
|
ElementAfterRest: "Rest element must be last element.",
|
|
EscapedCharNotAnIdentifier: "Invalid Unicode escape.",
|
|
ExportBindingIsString: /* @__PURE__ */ s(({
|
|
localName: e,
|
|
exportName: t
|
|
}) => `A string literal cannot be used as an exported binding without \`from\`.
|
|
- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`, "ExportBindingIsString"),
|
|
ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.",
|
|
ForInOfLoopInitializer: /* @__PURE__ */ s(({
|
|
type: e
|
|
}) => `'${e === "ForInStatement" ? "for-in" : "for-of"}' loop variable declaration may not have an initializer.`, "ForInOfLoopInitialize\
|
|
r"),
|
|
ForInUsing: "For-in loop may not start with 'using' declaration.",
|
|
ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.",
|
|
ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.",
|
|
GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.",
|
|
IllegalBreakContinue: /* @__PURE__ */ s(({
|
|
type: e
|
|
}) => `Unsyntactic ${e === "BreakStatement" ? "break" : "continue"}.`, "IllegalBreakContinue"),
|
|
IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.",
|
|
IllegalReturn: "'return' outside of function.",
|
|
ImportAttributesUseAssert: "The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You \
|
|
can enable the `deprecatedImportAssert` parser plugin to suppress this error.",
|
|
ImportBindingIsString: /* @__PURE__ */ s(({
|
|
importName: e
|
|
}) => `A string literal cannot be used as an imported binding.
|
|
- Did you mean \`import { "${e}" as foo }\`?`, "ImportBindingIsString"),
|
|
ImportCallArity: "`import()` requires exactly one or two arguments.",
|
|
ImportCallNotNewExpression: "Cannot use new with import(...).",
|
|
ImportCallSpreadArgument: "`...` is not allowed in `import()`.",
|
|
ImportJSONBindingNotDefault: "A JSON module can only be imported with `default`.",
|
|
ImportReflectionHasAssertion: "`import module x` cannot have assertions.",
|
|
ImportReflectionNotBinding: 'Only `import module x from "./module"` is valid.',
|
|
IncompatibleRegExpUVFlags: "The 'u' and 'v' regular expression flags cannot be enabled at the same time.",
|
|
InvalidBigIntLiteral: "Invalid BigIntLiteral.",
|
|
InvalidCodePoint: "Code point out of bounds.",
|
|
InvalidCoverInitializedName: "Invalid shorthand property initializer.",
|
|
InvalidDecimal: "Invalid decimal.",
|
|
InvalidDigit: /* @__PURE__ */ s(({
|
|
radix: e
|
|
}) => `Expected number in radix ${e}.`, "InvalidDigit"),
|
|
InvalidEscapeSequence: "Bad character escape sequence.",
|
|
InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.",
|
|
InvalidEscapedReservedWord: /* @__PURE__ */ s(({
|
|
reservedWord: e
|
|
}) => `Escape sequence in keyword ${e}.`, "InvalidEscapedReservedWord"),
|
|
InvalidIdentifier: /* @__PURE__ */ s(({
|
|
identifierName: e
|
|
}) => `Invalid identifier ${e}.`, "InvalidIdentifier"),
|
|
InvalidLhs: /* @__PURE__ */ s(({
|
|
ancestor: e
|
|
}) => `Invalid left-hand side in ${xy(e)}.`, "InvalidLhs"),
|
|
InvalidLhsBinding: /* @__PURE__ */ s(({
|
|
ancestor: e
|
|
}) => `Binding invalid left-hand side in ${xy(e)}.`, "InvalidLhsBinding"),
|
|
InvalidLhsOptionalChaining: /* @__PURE__ */ s(({
|
|
ancestor: e
|
|
}) => `Invalid optional chaining in the left-hand side of ${xy(e)}.`, "InvalidLhsOptionalChaining"),
|
|
InvalidNumber: "Invalid number.",
|
|
InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",
|
|
InvalidOrUnexpectedToken: /* @__PURE__ */ s(({
|
|
unexpected: e
|
|
}) => `Unexpected character '${e}'.`, "InvalidOrUnexpectedToken"),
|
|
InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.",
|
|
InvalidPrivateFieldResolution: /* @__PURE__ */ s(({
|
|
identifierName: e
|
|
}) => `Private name #${e} is not defined.`, "InvalidPrivateFieldResolution"),
|
|
InvalidPropertyBindingPattern: "Binding member expression.",
|
|
InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.",
|
|
InvalidRestAssignmentPattern: "Invalid rest operator's argument.",
|
|
LabelRedeclaration: /* @__PURE__ */ s(({
|
|
labelName: e
|
|
}) => `Label '${e}' is already declared.`, "LabelRedeclaration"),
|
|
LetInLexicalBinding: "'let' is disallowed as a lexically bound name.",
|
|
LineTerminatorBeforeArrow: "No line break is allowed before '=>'.",
|
|
MalformedRegExpFlags: "Invalid regular expression flag.",
|
|
MissingClassName: "A class name is required.",
|
|
MissingEqInAssignment: "Only '=' operator can be used for specifying default value.",
|
|
MissingSemicolon: "Missing semicolon.",
|
|
MissingPlugin: /* @__PURE__ */ s(({
|
|
missingPlugin: e
|
|
}) => `This experimental syntax requires enabling the parser plugin: ${e.map((t) => JSON.stringify(t)).join(", ")}.`, "MissingPlugin"),
|
|
MissingOneOfPlugins: /* @__PURE__ */ s(({
|
|
missingPlugin: e
|
|
}) => `This experimental syntax requires enabling one of the following parser plugin(s): ${e.map((t) => JSON.stringify(t)).join(", ")}.`,
|
|
"MissingOneOfPlugins"),
|
|
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: /* @__PURE__ */ s(({
|
|
key: e
|
|
}) => `Duplicate key "${e}" is not allowed in module attributes.`, "ModuleAttributesWithDuplicateKeys"),
|
|
ModuleExportNameHasLoneSurrogate: /* @__PURE__ */ s(({
|
|
surrogateCharCode: e
|
|
}) => `An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`, "ModuleExportNameHasLoneSurrogate"),
|
|
ModuleExportUndefined: /* @__PURE__ */ s(({
|
|
localName: e
|
|
}) => `Export '${e}' is not defined.`, "ModuleExportUndefined"),
|
|
MultipleDefaultsInSwitch: "Multiple default clauses.",
|
|
NewlineAfterThrow: "Illegal newline after throw.",
|
|
NoCatchOrFinally: "Missing catch or finally clause.",
|
|
NumberIdentifier: "Identifier directly after number.",
|
|
NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",
|
|
ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.",
|
|
OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.",
|
|
OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.",
|
|
OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.",
|
|
ParamDupe: "Argument name clash.",
|
|
PatternHasAccessor: "Object pattern can't contain getter or setter.",
|
|
PatternHasMethod: "Object pattern can't contain methods.",
|
|
PrivateInExpectedIn: /* @__PURE__ */ s(({
|
|
identifierName: e
|
|
}) => `Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`, "PrivateInExpe\
|
|
ctedIn"),
|
|
PrivateNameRedeclaration: /* @__PURE__ */ s(({
|
|
identifierName: e
|
|
}) => `Duplicate private name #${e}.`, "PrivateNameRedeclaration"),
|
|
RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 're\
|
|
cordAndTuple' 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 th\
|
|
e 'recordAndTuple' plugin is set to 'hash'.",
|
|
RecordNoProto: "'__proto__' is not allowed in Record expressions.",
|
|
RestTrailingComma: "Unexpected trailing comma after rest element.",
|
|
SloppyFunction: "In non-strict mode code, functions can only be declared at top level or inside a block.",
|
|
SloppyFunctionAnnexB: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if sta\
|
|
tement.",
|
|
SourcePhaseImportRequiresDefault: 'Only `import source x from "./module"` is valid.',
|
|
StaticPrototype: "Classes may not have static property named prototype.",
|
|
SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or n\
|
|
ot 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 'reco\
|
|
rdAndTuple' 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: /* @__PURE__ */ s(({
|
|
keyword: e
|
|
}) => `Unexpected keyword '${e}'.`, "UnexpectedKeyword"),
|
|
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: /* @__PURE__ */ s(({
|
|
reservedWord: e
|
|
}) => `Unexpected reserved word '${e}'.`, "UnexpectedReservedWord"),
|
|
UnexpectedSuper: "'super' is only allowed in object methods and classes.",
|
|
UnexpectedToken: /* @__PURE__ */ s(({
|
|
expected: e,
|
|
unexpected: t
|
|
}) => `Unexpected token${t ? ` '${t}'.` : ""}${e ? `, expected "${e}"` : ""}`, "UnexpectedToken"),
|
|
UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
|
|
UnexpectedUsingDeclaration: "Using declaration cannot appear in the top level when source type is `script`.",
|
|
UnsupportedBind: "Binding should be performed on object property.",
|
|
UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
|
|
UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
|
|
UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
|
|
UnsupportedMetaProperty: /* @__PURE__ */ s(({
|
|
target: e,
|
|
onlyValidPropertyName: t
|
|
}) => `The only valid meta property for ${e} is ${e}.${t}.`, "UnsupportedMetaProperty"),
|
|
UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.",
|
|
UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.",
|
|
UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",
|
|
UnterminatedComment: "Unterminated comment.",
|
|
UnterminatedRegExp: "Unterminated regular expression.",
|
|
UnterminatedString: "Unterminated string constant.",
|
|
UnterminatedTemplate: "Unterminated template.",
|
|
UsingDeclarationExport: "Using declaration cannot be exported.",
|
|
UsingDeclarationHasBindingPattern: "Using declaration cannot have destructuring patterns.",
|
|
VarRedeclaration: /* @__PURE__ */ s(({
|
|
identifierName: e
|
|
}) => `Identifier '${e}' has already been declared.`, "VarRedeclaration"),
|
|
YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.",
|
|
YieldInParameter: "Yield expression is not allowed in formal parameters.",
|
|
YieldNotInGeneratorFunction: "'yield' is only allowed within generator functions.",
|
|
ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
|
|
}, n2e = {
|
|
StrictDelete: "Deleting local variable in strict mode.",
|
|
StrictEvalArguments: /* @__PURE__ */ s(({
|
|
referenceName: e
|
|
}) => `Assigning to '${e}' in strict mode.`, "StrictEvalArguments"),
|
|
StrictEvalArgumentsBinding: /* @__PURE__ */ s(({
|
|
bindingName: e
|
|
}) => `Binding '${e}' in strict mode.`, "StrictEvalArgumentsBinding"),
|
|
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."
|
|
}, s2e = /* @__PURE__ */ new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]), a2e = Object.
|
|
assign({
|
|
PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due \
|
|
to its loose operator precedence.",
|
|
PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" opt\
|
|
ion.',
|
|
PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.",
|
|
PipeTopicUnconfiguredToken: /* @__PURE__ */ s(({
|
|
token: e
|
|
}) => `Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "propo\
|
|
sal": "hack", "topicToken": "${e}" }.`, "PipeTopicUnconfiguredToken"),
|
|
PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",
|
|
PipeUnparenthesizedBody: /* @__PURE__ */ s(({
|
|
type: e
|
|
}) => `Hack-style pipe body cannot be an unparenthesized ${xy({
|
|
type: e
|
|
})}; please wrap it in parentheses.`, "PipeUnparenthesizedBody")
|
|
}, {
|
|
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 "sma\
|
|
rt" option.'
|
|
}), o2e = ["message"];
|
|
function ZL(e, t, r) {
|
|
Object.defineProperty(e, t, {
|
|
enumerable: !1,
|
|
configurable: !0,
|
|
value: r
|
|
});
|
|
}
|
|
s(ZL, "defineHidden");
|
|
function u2e({
|
|
toMessage: e,
|
|
code: t,
|
|
reasonCode: r,
|
|
syntaxPlugin: i
|
|
}) {
|
|
let n = r === "MissingPlugin" || r === "MissingOneOfPlugins";
|
|
{
|
|
let a = {
|
|
AccessorCannotDeclareThisParameter: "AccesorCannotDeclareThisParameter",
|
|
AccessorCannotHaveTypeParameters: "AccesorCannotHaveTypeParameters",
|
|
ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumRefer\
|
|
ence",
|
|
SetAccessorCannotHaveOptionalParameter: "SetAccesorCannotHaveOptionalParameter",
|
|
SetAccessorCannotHaveRestParameter: "SetAccesorCannotHaveRestParameter",
|
|
SetAccessorCannotHaveReturnType: "SetAccesorCannotHaveReturnType"
|
|
};
|
|
a[r] && (r = a[r]);
|
|
}
|
|
return /* @__PURE__ */ s(function a(o, u) {
|
|
let l = new SyntaxError();
|
|
return l.code = t, l.reasonCode = r, l.loc = o, l.pos = o.index, l.syntaxPlugin = i, n && (l.missingPlugin = u.missingPlugin), ZL(l, "\
|
|
clone", /* @__PURE__ */ s(function(f = {}) {
|
|
var m;
|
|
let {
|
|
line: h,
|
|
column: d,
|
|
index: y
|
|
} = (m = f.loc) != null ? m : o;
|
|
return a(new ts(h, d, y), Object.assign({}, u, f.details));
|
|
}, "clone")), ZL(l, "details", u), Object.defineProperty(l, "message", {
|
|
configurable: !0,
|
|
get() {
|
|
let c = `${e(u)} (${o.line}:${o.column})`;
|
|
return this.message = c, c;
|
|
},
|
|
set(c) {
|
|
Object.defineProperty(this, "message", {
|
|
value: c,
|
|
writable: !0
|
|
});
|
|
}
|
|
}), l;
|
|
}, "constructor");
|
|
}
|
|
s(u2e, "toParseErrorConstructor");
|
|
function Us(e, t) {
|
|
if (Array.isArray(e))
|
|
return (i) => Us(i, e[0]);
|
|
let r = {};
|
|
for (let i of Object.keys(e)) {
|
|
let n = e[i], a = typeof n == "string" ? {
|
|
message: /* @__PURE__ */ s(() => n, "message")
|
|
} : typeof n == "function" ? {
|
|
message: n
|
|
} : n, {
|
|
message: o
|
|
} = a, u = t2e(a, o2e), l = typeof o == "string" ? () => o : o;
|
|
r[i] = u2e(Object.assign({
|
|
code: "BABEL_PARSER_SYNTAX_ERROR",
|
|
reasonCode: i,
|
|
toMessage: l
|
|
}, t ? {
|
|
syntaxPlugin: t
|
|
} : {}, u));
|
|
}
|
|
return r;
|
|
}
|
|
s(Us, "ParseErrorEnum");
|
|
var L = Object.assign({}, Us(r2e), Us(i2e), Us(n2e), Us`pipelineOperator`(a2e));
|
|
function l2e() {
|
|
return {
|
|
sourceType: "script",
|
|
sourceFilename: void 0,
|
|
startIndex: 0,
|
|
startColumn: 0,
|
|
startLine: 1,
|
|
allowAwaitOutsideFunction: !1,
|
|
allowReturnOutsideFunction: !1,
|
|
allowNewTargetOutsideFunction: !1,
|
|
allowImportExportEverywhere: !1,
|
|
allowSuperOutsideMethod: !1,
|
|
allowUndeclaredExports: !1,
|
|
allowYieldOutsideFunction: !1,
|
|
plugins: [],
|
|
strictMode: null,
|
|
ranges: !1,
|
|
tokens: !1,
|
|
createImportExpressions: !1,
|
|
createParenthesizedExpressions: !1,
|
|
errorRecovery: !1,
|
|
attachComment: !0,
|
|
annexB: !0
|
|
};
|
|
}
|
|
s(l2e, "createDefaultOptions");
|
|
function c2e(e) {
|
|
let t = l2e();
|
|
if (e == null)
|
|
return t;
|
|
if (e.annexB != null && e.annexB !== !1)
|
|
throw new Error("The `annexB` option can only be set to `false`.");
|
|
for (let r of Object.keys(t))
|
|
e[r] != null && (t[r] = e[r]);
|
|
if (t.startLine === 1)
|
|
e.startIndex == null && t.startColumn > 0 ? t.startIndex = t.startColumn : e.startColumn == null && t.startIndex > 0 && (t.startColumn =
|
|
t.startIndex);
|
|
else if ((e.startColumn == null || e.startIndex == null) && e.startIndex != null)
|
|
throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");
|
|
return t;
|
|
}
|
|
s(c2e, "getOptions");
|
|
var {
|
|
defineProperty: f2e
|
|
} = Object, QL = /* @__PURE__ */ s((e, t) => {
|
|
e && f2e(e, t, {
|
|
enumerable: !1,
|
|
value: e[t]
|
|
});
|
|
}, "toUnenumerable");
|
|
function bd(e) {
|
|
return QL(e.loc.start, "index"), QL(e.loc.end, "index"), e;
|
|
}
|
|
s(bd, "toESTreeLocation");
|
|
var d2e = /* @__PURE__ */ s((e) => class extends e {
|
|
static {
|
|
s(this, "ESTreeParserMixin");
|
|
}
|
|
parse() {
|
|
let r = bd(super.parse());
|
|
return this.optionFlags & 256 && (r.tokens = r.tokens.map(bd)), r;
|
|
}
|
|
parseRegExpLiteral({
|
|
pattern: r,
|
|
flags: i
|
|
}) {
|
|
let n = null;
|
|
try {
|
|
n = new RegExp(r, i);
|
|
} catch {
|
|
}
|
|
let a = this.estreeParseLiteral(n);
|
|
return a.regex = {
|
|
pattern: r,
|
|
flags: i
|
|
}, a;
|
|
}
|
|
parseBigIntLiteral(r) {
|
|
let i;
|
|
try {
|
|
i = BigInt(r);
|
|
} catch {
|
|
i = null;
|
|
}
|
|
let n = this.estreeParseLiteral(i);
|
|
return n.bigint = String(n.value || r), n;
|
|
}
|
|
parseDecimalLiteral(r) {
|
|
let n = this.estreeParseLiteral(null);
|
|
return n.decimal = String(n.value || r), n;
|
|
}
|
|
estreeParseLiteral(r) {
|
|
return this.parseLiteral(r, "Literal");
|
|
}
|
|
parseStringLiteral(r) {
|
|
return this.estreeParseLiteral(r);
|
|
}
|
|
parseNumericLiteral(r) {
|
|
return this.estreeParseLiteral(r);
|
|
}
|
|
parseNullLiteral() {
|
|
return this.estreeParseLiteral(null);
|
|
}
|
|
parseBooleanLiteral(r) {
|
|
return this.estreeParseLiteral(r);
|
|
}
|
|
directiveToStmt(r) {
|
|
let i = r.value;
|
|
delete r.value, i.type = "Literal", i.raw = i.extra.raw, i.value = i.extra.expressionValue;
|
|
let n = r;
|
|
return n.type = "ExpressionStatement", n.expression = i, n.directive = i.extra.rawValue, delete i.extra, n;
|
|
}
|
|
initFunction(r, i) {
|
|
super.initFunction(r, i), r.expression = !1;
|
|
}
|
|
checkDeclaration(r) {
|
|
r != null && this.isObjectProperty(r) ? this.checkDeclaration(r.value) : super.checkDeclaration(r);
|
|
}
|
|
getObjectOrClassMethodParams(r) {
|
|
return r.value.params;
|
|
}
|
|
isValidDirective(r) {
|
|
var i;
|
|
return r.type === "ExpressionStatement" && r.expression.type === "Literal" && typeof r.expression.value == "string" && !((i = r.expression.
|
|
extra) != null && i.parenthesized);
|
|
}
|
|
parseBlockBody(r, i, n, a, o) {
|
|
super.parseBlockBody(r, i, n, a, o);
|
|
let u = r.directives.map((l) => this.directiveToStmt(l));
|
|
r.body = u.concat(r.body), delete r.directives;
|
|
}
|
|
parsePrivateName() {
|
|
let r = super.parsePrivateName();
|
|
return this.getPluginOption("estree", "classFeatures") ? this.convertPrivateNameToPrivateIdentifier(r) : r;
|
|
}
|
|
convertPrivateNameToPrivateIdentifier(r) {
|
|
let i = super.getPrivateNameSV(r);
|
|
return r = r, delete r.id, r.name = i, r.type = "PrivateIdentifier", r;
|
|
}
|
|
isPrivateName(r) {
|
|
return this.getPluginOption("estree", "classFeatures") ? r.type === "PrivateIdentifier" : super.isPrivateName(r);
|
|
}
|
|
getPrivateNameSV(r) {
|
|
return this.getPluginOption("estree", "classFeatures") ? r.name : super.getPrivateNameSV(r);
|
|
}
|
|
parseLiteral(r, i) {
|
|
let n = super.parseLiteral(r, i);
|
|
return n.raw = n.extra.raw, delete n.extra, n;
|
|
}
|
|
parseFunctionBody(r, i, n = !1) {
|
|
super.parseFunctionBody(r, i, n), r.expression = r.body.type !== "BlockStatement";
|
|
}
|
|
parseMethod(r, i, n, a, o, u, l = !1) {
|
|
let c = this.startNode();
|
|
c.kind = r.kind, c = super.parseMethod(c, i, n, a, o, u, l), c.type = "FunctionExpression", delete c.kind, r.value = c;
|
|
let {
|
|
typeParameters: f
|
|
} = r;
|
|
return f && (delete r.typeParameters, c.typeParameters = f, this.resetStartLocationFromNode(c, f)), u === "ClassPrivateMethod" && (r.computed =
|
|
!1), this.finishNode(r, "MethodDefinition");
|
|
}
|
|
nameIsConstructor(r) {
|
|
return r.type === "Literal" ? r.value === "constructor" : super.nameIsConstructor(r);
|
|
}
|
|
parseClassProperty(...r) {
|
|
let i = super.parseClassProperty(...r);
|
|
return this.getPluginOption("estree", "classFeatures") && (i.type = "PropertyDefinition"), i;
|
|
}
|
|
parseClassPrivateProperty(...r) {
|
|
let i = super.parseClassPrivateProperty(...r);
|
|
return this.getPluginOption("estree", "classFeatures") && (i.type = "PropertyDefinition", i.computed = !1), i;
|
|
}
|
|
parseClassAccessorProperty(r) {
|
|
let i = super.parseClassAccessorProperty(r);
|
|
return this.getPluginOption("estree", "classFeatures") && (i.type = "AccessorProperty"), i;
|
|
}
|
|
parseObjectMethod(r, i, n, a, o) {
|
|
let u = super.parseObjectMethod(r, i, n, a, o);
|
|
return u && (u.type = "Property", u.kind === "method" && (u.kind = "init"), u.shorthand = !1), u;
|
|
}
|
|
parseObjectProperty(r, i, n, a) {
|
|
let o = super.parseObjectProperty(r, i, n, a);
|
|
return o && (o.kind = "init", o.type = "Property"), o;
|
|
}
|
|
isValidLVal(r, i, n) {
|
|
return r === "Property" ? "value" : super.isValidLVal(r, i, n);
|
|
}
|
|
isAssignable(r, i) {
|
|
return r != null && this.isObjectProperty(r) ? this.isAssignable(r.value, i) : super.isAssignable(r, i);
|
|
}
|
|
toAssignable(r, i = !1) {
|
|
if (r != null && this.isObjectProperty(r)) {
|
|
let {
|
|
key: n,
|
|
value: a
|
|
} = r;
|
|
this.isPrivateName(n) && this.classScope.usePrivateName(this.getPrivateNameSV(n), n.loc.start), this.toAssignable(a, i);
|
|
} else
|
|
super.toAssignable(r, i);
|
|
}
|
|
toAssignableObjectExpressionProp(r, i, n) {
|
|
r.type === "Property" && (r.kind === "get" || r.kind === "set") ? this.raise(L.PatternHasAccessor, r.key) : r.type === "Property" && r.
|
|
method ? this.raise(L.PatternHasMethod, r.key) : super.toAssignableObjectExpressionProp(r, i, n);
|
|
}
|
|
finishCallExpression(r, i) {
|
|
let n = super.finishCallExpression(r, i);
|
|
if (n.callee.type === "Import") {
|
|
var a, o;
|
|
n.type = "ImportExpression", n.source = n.arguments[0], n.options = (a = n.arguments[1]) != null ? a : null, n.attributes = (o = n.arguments[1]) !=
|
|
null ? o : null, delete n.arguments, delete n.callee;
|
|
}
|
|
return n;
|
|
}
|
|
toReferencedArguments(r) {
|
|
r.type !== "ImportExpression" && super.toReferencedArguments(r);
|
|
}
|
|
parseExport(r, i) {
|
|
let n = this.state.lastTokStartLoc, a = super.parseExport(r, i);
|
|
switch (a.type) {
|
|
case "ExportAllDeclaration":
|
|
a.exported = null;
|
|
break;
|
|
case "ExportNamedDeclaration":
|
|
a.specifiers.length === 1 && a.specifiers[0].type === "ExportNamespaceSpecifier" && (a.type = "ExportAllDeclaration", a.exported =
|
|
a.specifiers[0].exported, delete a.specifiers);
|
|
case "ExportDefaultDeclaration":
|
|
{
|
|
var o;
|
|
let {
|
|
declaration: u
|
|
} = a;
|
|
u?.type === "ClassDeclaration" && ((o = u.decorators) == null ? void 0 : o.length) > 0 && u.start === a.start && this.resetStartLocation(
|
|
a, n);
|
|
}
|
|
break;
|
|
}
|
|
return a;
|
|
}
|
|
parseSubscript(r, i, n, a) {
|
|
let o = super.parseSubscript(r, i, n, a);
|
|
if (a.optionalChainMember) {
|
|
if ((o.type === "OptionalMemberExpression" || o.type === "OptionalCallExpression") && (o.type = o.type.substring(8)), a.stop) {
|
|
let u = this.startNodeAtNode(o);
|
|
return u.expression = o, this.finishNode(u, "ChainExpression");
|
|
}
|
|
} else (o.type === "MemberExpression" || o.type === "CallExpression") && (o.optional = !1);
|
|
return o;
|
|
}
|
|
isOptionalMemberExpression(r) {
|
|
return r.type === "ChainExpression" ? r.expression.type === "MemberExpression" : super.isOptionalMemberExpression(r);
|
|
}
|
|
hasPropertyAsPrivateName(r) {
|
|
return r.type === "ChainExpression" && (r = r.expression), super.hasPropertyAsPrivateName(r);
|
|
}
|
|
isObjectProperty(r) {
|
|
return r.type === "Property" && r.kind === "init" && !r.method;
|
|
}
|
|
isObjectMethod(r) {
|
|
return r.type === "Property" && (r.method || r.kind === "get" || r.kind === "set");
|
|
}
|
|
finishNodeAt(r, i, n) {
|
|
return bd(super.finishNodeAt(r, i, n));
|
|
}
|
|
resetStartLocation(r, i) {
|
|
super.resetStartLocation(r, i), bd(r);
|
|
}
|
|
resetEndLocation(r, i = this.state.lastTokEndLoc) {
|
|
super.resetEndLocation(r, i), bd(r);
|
|
}
|
|
}, "estree"), Ko = class {
|
|
static {
|
|
s(this, "TokContext");
|
|
}
|
|
constructor(t, r) {
|
|
this.token = void 0, this.preserveSpace = void 0, this.token = t, this.preserveSpace = !!r;
|
|
}
|
|
}, Et = {
|
|
brace: new Ko("{"),
|
|
j_oTag: new Ko("<tag"),
|
|
j_cTag: new Ko("</tag"),
|
|
j_expr: new Ko("<tag>...</tag>", !0)
|
|
};
|
|
Et.template = new Ko("`", !0);
|
|
var nt = !0, Te = !0, ET = !0, Dd = !0, Ra = !0, p2e = !0, Cy = class {
|
|
static {
|
|
s(this, "ExportedTokenType");
|
|
}
|
|
constructor(t, r = {}) {
|
|
this.label = void 0, this.keyword = void 0, this.beforeExpr = void 0, this.startsExpr = void 0, this.rightAssociative = void 0, this.isLoop =
|
|
void 0, this.isAssign = void 0, this.prefix = void 0, this.postfix = void 0, this.binop = void 0, this.label = t, this.keyword = r.keyword,
|
|
this.beforeExpr = !!r.beforeExpr, this.startsExpr = !!r.startsExpr, this.rightAssociative = !!r.rightAssociative, this.isLoop = !!r.isLoop,
|
|
this.isAssign = !!r.isAssign, this.prefix = !!r.prefix, this.postfix = !!r.postfix, this.binop = r.binop != null ? r.binop : null, this.
|
|
updateContext = null;
|
|
}
|
|
}, HT = /* @__PURE__ */ new Map();
|
|
function mt(e, t = {}) {
|
|
t.keyword = e;
|
|
let r = Re(e, t);
|
|
return HT.set(e, r), r;
|
|
}
|
|
s(mt, "createKeyword");
|
|
function mi(e, t) {
|
|
return Re(e, {
|
|
beforeExpr: nt,
|
|
binop: t
|
|
});
|
|
}
|
|
s(mi, "createBinop");
|
|
var Sd = -1, Ls = [], KT = [], zT = [], GT = [], JT = [], XT = [];
|
|
function Re(e, t = {}) {
|
|
var r, i, n, a;
|
|
return ++Sd, KT.push(e), zT.push((r = t.binop) != null ? r : -1), GT.push((i = t.beforeExpr) != null ? i : !1), JT.push((n = t.startsExpr) !=
|
|
null ? n : !1), XT.push((a = t.prefix) != null ? a : !1), Ls.push(new Cy(e, t)), Sd;
|
|
}
|
|
s(Re, "createToken");
|
|
function it(e, t = {}) {
|
|
var r, i, n, a;
|
|
return ++Sd, HT.set(e, Sd), KT.push(e), zT.push((r = t.binop) != null ? r : -1), GT.push((i = t.beforeExpr) != null ? i : !1), JT.push((n =
|
|
t.startsExpr) != null ? n : !1), XT.push((a = t.prefix) != null ? a : !1), Ls.push(new Cy("name", t)), Sd;
|
|
}
|
|
s(it, "createKeywordLike");
|
|
var h2e = {
|
|
bracketL: Re("[", {
|
|
beforeExpr: nt,
|
|
startsExpr: Te
|
|
}),
|
|
bracketHashL: Re("#[", {
|
|
beforeExpr: nt,
|
|
startsExpr: Te
|
|
}),
|
|
bracketBarL: Re("[|", {
|
|
beforeExpr: nt,
|
|
startsExpr: Te
|
|
}),
|
|
bracketR: Re("]"),
|
|
bracketBarR: Re("|]"),
|
|
braceL: Re("{", {
|
|
beforeExpr: nt,
|
|
startsExpr: Te
|
|
}),
|
|
braceBarL: Re("{|", {
|
|
beforeExpr: nt,
|
|
startsExpr: Te
|
|
}),
|
|
braceHashL: Re("#{", {
|
|
beforeExpr: nt,
|
|
startsExpr: Te
|
|
}),
|
|
braceR: Re("}"),
|
|
braceBarR: Re("|}"),
|
|
parenL: Re("(", {
|
|
beforeExpr: nt,
|
|
startsExpr: Te
|
|
}),
|
|
parenR: Re(")"),
|
|
comma: Re(",", {
|
|
beforeExpr: nt
|
|
}),
|
|
semi: Re(";", {
|
|
beforeExpr: nt
|
|
}),
|
|
colon: Re(":", {
|
|
beforeExpr: nt
|
|
}),
|
|
doubleColon: Re("::", {
|
|
beforeExpr: nt
|
|
}),
|
|
dot: Re("."),
|
|
question: Re("?", {
|
|
beforeExpr: nt
|
|
}),
|
|
questionDot: Re("?."),
|
|
arrow: Re("=>", {
|
|
beforeExpr: nt
|
|
}),
|
|
template: Re("template"),
|
|
ellipsis: Re("...", {
|
|
beforeExpr: nt
|
|
}),
|
|
backQuote: Re("`", {
|
|
startsExpr: Te
|
|
}),
|
|
dollarBraceL: Re("${", {
|
|
beforeExpr: nt,
|
|
startsExpr: Te
|
|
}),
|
|
templateTail: Re("...`", {
|
|
startsExpr: Te
|
|
}),
|
|
templateNonTail: Re("...${", {
|
|
beforeExpr: nt,
|
|
startsExpr: Te
|
|
}),
|
|
at: Re("@"),
|
|
hash: Re("#", {
|
|
startsExpr: Te
|
|
}),
|
|
interpreterDirective: Re("#!..."),
|
|
eq: Re("=", {
|
|
beforeExpr: nt,
|
|
isAssign: Dd
|
|
}),
|
|
assign: Re("_=", {
|
|
beforeExpr: nt,
|
|
isAssign: Dd
|
|
}),
|
|
slashAssign: Re("_=", {
|
|
beforeExpr: nt,
|
|
isAssign: Dd
|
|
}),
|
|
xorAssign: Re("_=", {
|
|
beforeExpr: nt,
|
|
isAssign: Dd
|
|
}),
|
|
moduloAssign: Re("_=", {
|
|
beforeExpr: nt,
|
|
isAssign: Dd
|
|
}),
|
|
incDec: Re("++/--", {
|
|
prefix: Ra,
|
|
postfix: p2e,
|
|
startsExpr: Te
|
|
}),
|
|
bang: Re("!", {
|
|
beforeExpr: nt,
|
|
prefix: Ra,
|
|
startsExpr: Te
|
|
}),
|
|
tilde: Re("~", {
|
|
beforeExpr: nt,
|
|
prefix: Ra,
|
|
startsExpr: Te
|
|
}),
|
|
doubleCaret: Re("^^", {
|
|
startsExpr: Te
|
|
}),
|
|
doubleAt: Re("@@", {
|
|
startsExpr: Te
|
|
}),
|
|
pipeline: mi("|>", 0),
|
|
nullishCoalescing: mi("??", 1),
|
|
logicalOR: mi("||", 1),
|
|
logicalAND: mi("&&", 2),
|
|
bitwiseOR: mi("|", 3),
|
|
bitwiseXOR: mi("^", 4),
|
|
bitwiseAND: mi("&", 5),
|
|
equality: mi("==/!=/===/!==", 6),
|
|
lt: mi("</>/<=/>=", 7),
|
|
gt: mi("</>/<=/>=", 7),
|
|
relational: mi("</>/<=/>=", 7),
|
|
bitShift: mi("<</>>/>>>", 8),
|
|
bitShiftL: mi("<</>>/>>>", 8),
|
|
bitShiftR: mi("<</>>/>>>", 8),
|
|
plusMin: Re("+/-", {
|
|
beforeExpr: nt,
|
|
binop: 9,
|
|
prefix: Ra,
|
|
startsExpr: Te
|
|
}),
|
|
modulo: Re("%", {
|
|
binop: 10,
|
|
startsExpr: Te
|
|
}),
|
|
star: Re("*", {
|
|
binop: 10
|
|
}),
|
|
slash: mi("/", 10),
|
|
exponent: Re("**", {
|
|
beforeExpr: nt,
|
|
binop: 11,
|
|
rightAssociative: !0
|
|
}),
|
|
_in: mt("in", {
|
|
beforeExpr: nt,
|
|
binop: 7
|
|
}),
|
|
_instanceof: mt("instanceof", {
|
|
beforeExpr: nt,
|
|
binop: 7
|
|
}),
|
|
_break: mt("break"),
|
|
_case: mt("case", {
|
|
beforeExpr: nt
|
|
}),
|
|
_catch: mt("catch"),
|
|
_continue: mt("continue"),
|
|
_debugger: mt("debugger"),
|
|
_default: mt("default", {
|
|
beforeExpr: nt
|
|
}),
|
|
_else: mt("else", {
|
|
beforeExpr: nt
|
|
}),
|
|
_finally: mt("finally"),
|
|
_function: mt("function", {
|
|
startsExpr: Te
|
|
}),
|
|
_if: mt("if"),
|
|
_return: mt("return", {
|
|
beforeExpr: nt
|
|
}),
|
|
_switch: mt("switch"),
|
|
_throw: mt("throw", {
|
|
beforeExpr: nt,
|
|
prefix: Ra,
|
|
startsExpr: Te
|
|
}),
|
|
_try: mt("try"),
|
|
_var: mt("var"),
|
|
_const: mt("const"),
|
|
_with: mt("with"),
|
|
_new: mt("new", {
|
|
beforeExpr: nt,
|
|
startsExpr: Te
|
|
}),
|
|
_this: mt("this", {
|
|
startsExpr: Te
|
|
}),
|
|
_super: mt("super", {
|
|
startsExpr: Te
|
|
}),
|
|
_class: mt("class", {
|
|
startsExpr: Te
|
|
}),
|
|
_extends: mt("extends", {
|
|
beforeExpr: nt
|
|
}),
|
|
_export: mt("export"),
|
|
_import: mt("import", {
|
|
startsExpr: Te
|
|
}),
|
|
_null: mt("null", {
|
|
startsExpr: Te
|
|
}),
|
|
_true: mt("true", {
|
|
startsExpr: Te
|
|
}),
|
|
_false: mt("false", {
|
|
startsExpr: Te
|
|
}),
|
|
_typeof: mt("typeof", {
|
|
beforeExpr: nt,
|
|
prefix: Ra,
|
|
startsExpr: Te
|
|
}),
|
|
_void: mt("void", {
|
|
beforeExpr: nt,
|
|
prefix: Ra,
|
|
startsExpr: Te
|
|
}),
|
|
_delete: mt("delete", {
|
|
beforeExpr: nt,
|
|
prefix: Ra,
|
|
startsExpr: Te
|
|
}),
|
|
_do: mt("do", {
|
|
isLoop: ET,
|
|
beforeExpr: nt
|
|
}),
|
|
_for: mt("for", {
|
|
isLoop: ET
|
|
}),
|
|
_while: mt("while", {
|
|
isLoop: ET
|
|
}),
|
|
_as: it("as", {
|
|
startsExpr: Te
|
|
}),
|
|
_assert: it("assert", {
|
|
startsExpr: Te
|
|
}),
|
|
_async: it("async", {
|
|
startsExpr: Te
|
|
}),
|
|
_await: it("await", {
|
|
startsExpr: Te
|
|
}),
|
|
_defer: it("defer", {
|
|
startsExpr: Te
|
|
}),
|
|
_from: it("from", {
|
|
startsExpr: Te
|
|
}),
|
|
_get: it("get", {
|
|
startsExpr: Te
|
|
}),
|
|
_let: it("let", {
|
|
startsExpr: Te
|
|
}),
|
|
_meta: it("meta", {
|
|
startsExpr: Te
|
|
}),
|
|
_of: it("of", {
|
|
startsExpr: Te
|
|
}),
|
|
_sent: it("sent", {
|
|
startsExpr: Te
|
|
}),
|
|
_set: it("set", {
|
|
startsExpr: Te
|
|
}),
|
|
_source: it("source", {
|
|
startsExpr: Te
|
|
}),
|
|
_static: it("static", {
|
|
startsExpr: Te
|
|
}),
|
|
_using: it("using", {
|
|
startsExpr: Te
|
|
}),
|
|
_yield: it("yield", {
|
|
startsExpr: Te
|
|
}),
|
|
_asserts: it("asserts", {
|
|
startsExpr: Te
|
|
}),
|
|
_checks: it("checks", {
|
|
startsExpr: Te
|
|
}),
|
|
_exports: it("exports", {
|
|
startsExpr: Te
|
|
}),
|
|
_global: it("global", {
|
|
startsExpr: Te
|
|
}),
|
|
_implements: it("implements", {
|
|
startsExpr: Te
|
|
}),
|
|
_intrinsic: it("intrinsic", {
|
|
startsExpr: Te
|
|
}),
|
|
_infer: it("infer", {
|
|
startsExpr: Te
|
|
}),
|
|
_is: it("is", {
|
|
startsExpr: Te
|
|
}),
|
|
_mixins: it("mixins", {
|
|
startsExpr: Te
|
|
}),
|
|
_proto: it("proto", {
|
|
startsExpr: Te
|
|
}),
|
|
_require: it("require", {
|
|
startsExpr: Te
|
|
}),
|
|
_satisfies: it("satisfies", {
|
|
startsExpr: Te
|
|
}),
|
|
_keyof: it("keyof", {
|
|
startsExpr: Te
|
|
}),
|
|
_readonly: it("readonly", {
|
|
startsExpr: Te
|
|
}),
|
|
_unique: it("unique", {
|
|
startsExpr: Te
|
|
}),
|
|
_abstract: it("abstract", {
|
|
startsExpr: Te
|
|
}),
|
|
_declare: it("declare", {
|
|
startsExpr: Te
|
|
}),
|
|
_enum: it("enum", {
|
|
startsExpr: Te
|
|
}),
|
|
_module: it("module", {
|
|
startsExpr: Te
|
|
}),
|
|
_namespace: it("namespace", {
|
|
startsExpr: Te
|
|
}),
|
|
_interface: it("interface", {
|
|
startsExpr: Te
|
|
}),
|
|
_type: it("type", {
|
|
startsExpr: Te
|
|
}),
|
|
_opaque: it("opaque", {
|
|
startsExpr: Te
|
|
}),
|
|
name: Re("name", {
|
|
startsExpr: Te
|
|
}),
|
|
placeholder: Re("%%", {
|
|
startsExpr: !0
|
|
}),
|
|
string: Re("string", {
|
|
startsExpr: Te
|
|
}),
|
|
num: Re("num", {
|
|
startsExpr: Te
|
|
}),
|
|
bigint: Re("bigint", {
|
|
startsExpr: Te
|
|
}),
|
|
decimal: Re("decimal", {
|
|
startsExpr: Te
|
|
}),
|
|
regexp: Re("regexp", {
|
|
startsExpr: Te
|
|
}),
|
|
privateName: Re("#name", {
|
|
startsExpr: Te
|
|
}),
|
|
eof: Re("eof"),
|
|
jsxName: Re("jsxName"),
|
|
jsxText: Re("jsxText", {
|
|
beforeExpr: !0
|
|
}),
|
|
jsxTagStart: Re("jsxTagStart", {
|
|
startsExpr: !0
|
|
}),
|
|
jsxTagEnd: Re("jsxTagEnd")
|
|
};
|
|
function xt(e) {
|
|
return e >= 93 && e <= 133;
|
|
}
|
|
s(xt, "tokenIsIdentifier");
|
|
function m2e(e) {
|
|
return e <= 92;
|
|
}
|
|
s(m2e, "tokenKeywordOrIdentifierIsKeyword");
|
|
function Sn(e) {
|
|
return e >= 58 && e <= 133;
|
|
}
|
|
s(Sn, "tokenIsKeywordOrIdentifier");
|
|
function f9(e) {
|
|
return e >= 58 && e <= 137;
|
|
}
|
|
s(f9, "tokenIsLiteralPropertyName");
|
|
function y2e(e) {
|
|
return GT[e];
|
|
}
|
|
s(y2e, "tokenComesBeforeExpression");
|
|
function Ed(e) {
|
|
return JT[e];
|
|
}
|
|
s(Ed, "tokenCanStartExpression");
|
|
function g2e(e) {
|
|
return e >= 29 && e <= 33;
|
|
}
|
|
s(g2e, "tokenIsAssignment");
|
|
function e9(e) {
|
|
return e >= 129 && e <= 131;
|
|
}
|
|
s(e9, "tokenIsFlowInterfaceOrTypeOrOpaque");
|
|
function b2e(e) {
|
|
return e >= 90 && e <= 92;
|
|
}
|
|
s(b2e, "tokenIsLoop");
|
|
function YT(e) {
|
|
return e >= 58 && e <= 92;
|
|
}
|
|
s(YT, "tokenIsKeyword");
|
|
function D2e(e) {
|
|
return e >= 39 && e <= 59;
|
|
}
|
|
s(D2e, "tokenIsOperator");
|
|
function v2e(e) {
|
|
return e === 34;
|
|
}
|
|
s(v2e, "tokenIsPostfix");
|
|
function E2e(e) {
|
|
return XT[e];
|
|
}
|
|
s(E2e, "tokenIsPrefix");
|
|
function x2e(e) {
|
|
return e >= 121 && e <= 123;
|
|
}
|
|
s(x2e, "tokenIsTSTypeOperator");
|
|
function S2e(e) {
|
|
return e >= 124 && e <= 130;
|
|
}
|
|
s(S2e, "tokenIsTSDeclarationStart");
|
|
function La(e) {
|
|
return KT[e];
|
|
}
|
|
s(La, "tokenLabelName");
|
|
function Sy(e) {
|
|
return zT[e];
|
|
}
|
|
s(Sy, "tokenOperatorPrecedence");
|
|
function T2e(e) {
|
|
return e === 57;
|
|
}
|
|
s(T2e, "tokenIsRightAssociative");
|
|
function wy(e) {
|
|
return e >= 24 && e <= 25;
|
|
}
|
|
s(wy, "tokenIsTemplate");
|
|
function js(e) {
|
|
return Ls[e];
|
|
}
|
|
s(js, "getExportedToken");
|
|
Ls[8].updateContext = (e) => {
|
|
e.pop();
|
|
}, Ls[5].updateContext = Ls[7].updateContext = Ls[23].updateContext = (e) => {
|
|
e.push(Et.brace);
|
|
}, Ls[22].updateContext = (e) => {
|
|
e[e.length - 1] === Et.template ? e.pop() : e.push(Et.template);
|
|
}, Ls[143].updateContext = (e) => {
|
|
e.push(Et.j_expr, Et.j_oTag);
|
|
};
|
|
var ZT = "\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-\u1C8A\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-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\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",
|
|
d9 = "\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\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\
|
|
\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\
|
|
\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6\
|
|
-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20\
|
|
-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65", C2e = new RegExp("[" + ZT + "]"), w2e = new RegExp("[" + ZT + d9 + "]");
|
|
ZT = d9 = null;
|
|
var p9 = [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, 4, 51, 13, 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, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17,
|
|
47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64,
|
|
6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45,
|
|
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, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29,
|
|
113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071,
|
|
18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12,
|
|
65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991,
|
|
84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30,
|
|
2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3,
|
|
0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2,
|
|
2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153,
|
|
7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], A2e = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5,
|
|
0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13,
|
|
2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4,
|
|
68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58,
|
|
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, 343, 9, 54,
|
|
7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350,
|
|
0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543,
|
|
4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6,
|
|
10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
function wT(e, t) {
|
|
let r = 65536;
|
|
for (let i = 0, n = t.length; i < n; i += 2) {
|
|
if (r += t[i], r > e) return !1;
|
|
if (r += t[i + 1], r >= e) return !0;
|
|
}
|
|
return !1;
|
|
}
|
|
s(wT, "isInAstralSet");
|
|
function qs(e) {
|
|
return e < 65 ? e === 36 : e <= 90 ? !0 : e < 97 ? e === 95 : e <= 122 ? !0 : e <= 65535 ? e >= 170 && C2e.test(String.fromCharCode(e)) :
|
|
wT(e, p9);
|
|
}
|
|
s(qs, "isIdentifierStart");
|
|
function Bl(e) {
|
|
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e <= 90 ? !0 : e < 97 ? e === 95 : e <= 122 ? !0 : e <= 65535 ? e >= 170 && w2e.test(
|
|
String.fromCharCode(e)) : wT(e, p9) || wT(e, A2e);
|
|
}
|
|
s(Bl, "isIdentifierChar");
|
|
var QT = {
|
|
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "swit\
|
|
ch", "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"]
|
|
}, _2e = new Set(QT.keyword), P2e = new Set(QT.strict), F2e = new Set(QT.strictBind);
|
|
function h9(e, t) {
|
|
return t && e === "await" || e === "enum";
|
|
}
|
|
s(h9, "isReservedWord");
|
|
function m9(e, t) {
|
|
return h9(e, t) || P2e.has(e);
|
|
}
|
|
s(m9, "isStrictReservedWord");
|
|
function y9(e) {
|
|
return F2e.has(e);
|
|
}
|
|
s(y9, "isStrictBindOnlyReservedWord");
|
|
function g9(e, t) {
|
|
return m9(e, t) || y9(e);
|
|
}
|
|
s(g9, "isStrictBindReservedWord");
|
|
function I2e(e) {
|
|
return _2e.has(e);
|
|
}
|
|
s(I2e, "isKeyword");
|
|
function O2e(e, t, r) {
|
|
return e === 64 && t === 64 && qs(r);
|
|
}
|
|
s(O2e, "isIteratorStart");
|
|
var k2e = /* @__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", "protecte\
|
|
d", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
|
|
function B2e(e) {
|
|
return k2e.has(e);
|
|
}
|
|
s(B2e, "canBeReservedWord");
|
|
var Td = class {
|
|
static {
|
|
s(this, "Scope");
|
|
}
|
|
constructor(t) {
|
|
this.flags = 0, this.names = /* @__PURE__ */ new Map(), this.firstLexicalName = "", this.flags = t;
|
|
}
|
|
}, Cd = class {
|
|
static {
|
|
s(this, "ScopeHandler");
|
|
}
|
|
constructor(t, r) {
|
|
this.parser = void 0, this.scopeStack = [], this.inModule = void 0, this.undefinedExports = /* @__PURE__ */ new Map(), this.parser = t,
|
|
this.inModule = r;
|
|
}
|
|
get inTopLevel() {
|
|
return (this.currentScope().flags & 1) > 0;
|
|
}
|
|
get inFunction() {
|
|
return (this.currentVarScopeFlags() & 2) > 0;
|
|
}
|
|
get allowSuper() {
|
|
return (this.currentThisScopeFlags() & 16) > 0;
|
|
}
|
|
get allowDirectSuper() {
|
|
return (this.currentThisScopeFlags() & 32) > 0;
|
|
}
|
|
get inClass() {
|
|
return (this.currentThisScopeFlags() & 64) > 0;
|
|
}
|
|
get inClassAndNotInNonArrowFunction() {
|
|
let t = this.currentThisScopeFlags();
|
|
return (t & 64) > 0 && (t & 2) === 0;
|
|
}
|
|
get inStaticBlock() {
|
|
for (let t = this.scopeStack.length - 1; ; t--) {
|
|
let {
|
|
flags: r
|
|
} = this.scopeStack[t];
|
|
if (r & 128)
|
|
return !0;
|
|
if (r & 451)
|
|
return !1;
|
|
}
|
|
}
|
|
get inNonArrowFunction() {
|
|
return (this.currentThisScopeFlags() & 2) > 0;
|
|
}
|
|
get treatFunctionsAsVar() {
|
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
}
|
|
createScope(t) {
|
|
return new Td(t);
|
|
}
|
|
enter(t) {
|
|
this.scopeStack.push(this.createScope(t));
|
|
}
|
|
exit() {
|
|
return this.scopeStack.pop().flags;
|
|
}
|
|
treatFunctionsAsVarInScope(t) {
|
|
return !!(t.flags & 130 || !this.parser.inModule && t.flags & 1);
|
|
}
|
|
declareName(t, r, i) {
|
|
let n = this.currentScope();
|
|
if (r & 8 || r & 16) {
|
|
this.checkRedeclarationInScope(n, t, r, i);
|
|
let a = n.names.get(t) || 0;
|
|
r & 16 ? a = a | 4 : (n.firstLexicalName || (n.firstLexicalName = t), a = a | 2), n.names.set(t, a), r & 8 && this.maybeExportDefined(
|
|
n, t);
|
|
} else if (r & 4)
|
|
for (let a = this.scopeStack.length - 1; a >= 0 && (n = this.scopeStack[a], this.checkRedeclarationInScope(n, t, r, i), n.names.set(
|
|
t, (n.names.get(t) || 0) | 1), this.maybeExportDefined(n, t), !(n.flags & 387)); --a)
|
|
;
|
|
this.parser.inModule && n.flags & 1 && this.undefinedExports.delete(t);
|
|
}
|
|
maybeExportDefined(t, r) {
|
|
this.parser.inModule && t.flags & 1 && this.undefinedExports.delete(r);
|
|
}
|
|
checkRedeclarationInScope(t, r, i, n) {
|
|
this.isRedeclaredInScope(t, r, i) && this.parser.raise(L.VarRedeclaration, n, {
|
|
identifierName: r
|
|
});
|
|
}
|
|
isRedeclaredInScope(t, r, i) {
|
|
if (!(i & 1)) return !1;
|
|
if (i & 8)
|
|
return t.names.has(r);
|
|
let n = t.names.get(r);
|
|
return i & 16 ? (n & 2) > 0 || !this.treatFunctionsAsVarInScope(t) && (n & 1) > 0 : (n & 2) > 0 && !(t.flags & 8 && t.firstLexicalName ===
|
|
r) || !this.treatFunctionsAsVarInScope(t) && (n & 4) > 0;
|
|
}
|
|
checkLocalExport(t) {
|
|
let {
|
|
name: r
|
|
} = t;
|
|
this.scopeStack[0].names.has(r) || this.undefinedExports.set(r, t.loc.start);
|
|
}
|
|
currentScope() {
|
|
return this.scopeStack[this.scopeStack.length - 1];
|
|
}
|
|
currentVarScopeFlags() {
|
|
for (let t = this.scopeStack.length - 1; ; t--) {
|
|
let {
|
|
flags: r
|
|
} = this.scopeStack[t];
|
|
if (r & 387)
|
|
return r;
|
|
}
|
|
}
|
|
currentThisScopeFlags() {
|
|
for (let t = this.scopeStack.length - 1; ; t--) {
|
|
let {
|
|
flags: r
|
|
} = this.scopeStack[t];
|
|
if (r & 451 && !(r & 4))
|
|
return r;
|
|
}
|
|
}
|
|
}, AT = class extends Td {
|
|
static {
|
|
s(this, "FlowScope");
|
|
}
|
|
constructor(...t) {
|
|
super(...t), this.declareFunctions = /* @__PURE__ */ new Set();
|
|
}
|
|
}, _T = class extends Cd {
|
|
static {
|
|
s(this, "FlowScopeHandler");
|
|
}
|
|
createScope(t) {
|
|
return new AT(t);
|
|
}
|
|
declareName(t, r, i) {
|
|
let n = this.currentScope();
|
|
if (r & 2048) {
|
|
this.checkRedeclarationInScope(n, t, r, i), this.maybeExportDefined(n, t), n.declareFunctions.add(t);
|
|
return;
|
|
}
|
|
super.declareName(t, r, i);
|
|
}
|
|
isRedeclaredInScope(t, r, i) {
|
|
if (super.isRedeclaredInScope(t, r, i)) return !0;
|
|
if (i & 2048 && !t.declareFunctions.has(r)) {
|
|
let n = t.names.get(r);
|
|
return (n & 4) > 0 || (n & 2) > 0;
|
|
}
|
|
return !1;
|
|
}
|
|
checkLocalExport(t) {
|
|
this.scopeStack[0].declareFunctions.has(t.name) || super.checkLocalExport(t);
|
|
}
|
|
}, PT = class {
|
|
static {
|
|
s(this, "BaseParser");
|
|
}
|
|
constructor() {
|
|
this.sawUnambiguousESM = !1, this.ambiguousScriptDifferentAst = !1;
|
|
}
|
|
sourceToOffsetPos(t) {
|
|
return t + this.startIndex;
|
|
}
|
|
offsetToSourcePos(t) {
|
|
return t - this.startIndex;
|
|
}
|
|
hasPlugin(t) {
|
|
if (typeof t == "string")
|
|
return this.plugins.has(t);
|
|
{
|
|
let [r, i] = t;
|
|
if (!this.hasPlugin(r))
|
|
return !1;
|
|
let n = this.plugins.get(r);
|
|
for (let a of Object.keys(i))
|
|
if (n?.[a] !== i[a])
|
|
return !1;
|
|
return !0;
|
|
}
|
|
}
|
|
getPluginOption(t, r) {
|
|
var i;
|
|
return (i = this.plugins.get(t)) == null ? void 0 : i[r];
|
|
}
|
|
};
|
|
function b9(e, t) {
|
|
e.trailingComments === void 0 ? e.trailingComments = t : e.trailingComments.unshift(...t);
|
|
}
|
|
s(b9, "setTrailingComments");
|
|
function N2e(e, t) {
|
|
e.leadingComments === void 0 ? e.leadingComments = t : e.leadingComments.unshift(...t);
|
|
}
|
|
s(N2e, "setLeadingComments");
|
|
function wd(e, t) {
|
|
e.innerComments === void 0 ? e.innerComments = t : e.innerComments.unshift(...t);
|
|
}
|
|
s(wd, "setInnerComments");
|
|
function Vo(e, t, r) {
|
|
let i = null, n = t.length;
|
|
for (; i === null && n > 0; )
|
|
i = t[--n];
|
|
i === null || i.start > r.start ? wd(e, r.comments) : b9(i, r.comments);
|
|
}
|
|
s(Vo, "adjustInnerComments");
|
|
var FT = class extends PT {
|
|
static {
|
|
s(this, "CommentsParser");
|
|
}
|
|
addComment(t) {
|
|
this.filename && (t.loc.filename = this.filename);
|
|
let {
|
|
commentsLen: r
|
|
} = this.state;
|
|
this.comments.length !== r && (this.comments.length = r), this.comments.push(t), this.state.commentsLen++;
|
|
}
|
|
processComment(t) {
|
|
let {
|
|
commentStack: r
|
|
} = this.state, i = r.length;
|
|
if (i === 0) return;
|
|
let n = i - 1, a = r[n];
|
|
a.start === t.end && (a.leadingNode = t, n--);
|
|
let {
|
|
start: o
|
|
} = t;
|
|
for (; n >= 0; n--) {
|
|
let u = r[n], l = u.end;
|
|
if (l > o)
|
|
u.containingNode = t, this.finalizeComment(u), r.splice(n, 1);
|
|
else {
|
|
l === o && (u.trailingNode = t);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
finalizeComment(t) {
|
|
let {
|
|
comments: r
|
|
} = t;
|
|
if (t.leadingNode !== null || t.trailingNode !== null)
|
|
t.leadingNode !== null && b9(t.leadingNode, r), t.trailingNode !== null && N2e(t.trailingNode, r);
|
|
else {
|
|
let {
|
|
containingNode: i,
|
|
start: n
|
|
} = t;
|
|
if (this.input.charCodeAt(this.offsetToSourcePos(n) - 1) === 44)
|
|
switch (i.type) {
|
|
case "ObjectExpression":
|
|
case "ObjectPattern":
|
|
case "RecordExpression":
|
|
Vo(i, i.properties, t);
|
|
break;
|
|
case "CallExpression":
|
|
case "OptionalCallExpression":
|
|
Vo(i, i.arguments, t);
|
|
break;
|
|
case "FunctionDeclaration":
|
|
case "FunctionExpression":
|
|
case "ArrowFunctionExpression":
|
|
case "ObjectMethod":
|
|
case "ClassMethod":
|
|
case "ClassPrivateMethod":
|
|
Vo(i, i.params, t);
|
|
break;
|
|
case "ArrayExpression":
|
|
case "ArrayPattern":
|
|
case "TupleExpression":
|
|
Vo(i, i.elements, t);
|
|
break;
|
|
case "ExportNamedDeclaration":
|
|
case "ImportDeclaration":
|
|
Vo(i, i.specifiers, t);
|
|
break;
|
|
case "TSEnumDeclaration":
|
|
Vo(i, i.members, t);
|
|
break;
|
|
case "TSEnumBody":
|
|
Vo(i, i.members, t);
|
|
break;
|
|
default:
|
|
wd(i, r);
|
|
}
|
|
else
|
|
wd(i, r);
|
|
}
|
|
}
|
|
finalizeRemainingComments() {
|
|
let {
|
|
commentStack: t
|
|
} = this.state;
|
|
for (let r = t.length - 1; r >= 0; r--)
|
|
this.finalizeComment(t[r]);
|
|
this.state.commentStack = [];
|
|
}
|
|
resetPreviousNodeTrailingComments(t) {
|
|
let {
|
|
commentStack: r
|
|
} = this.state, {
|
|
length: i
|
|
} = r;
|
|
if (i === 0) return;
|
|
let n = r[i - 1];
|
|
n.leadingNode === t && (n.leadingNode = null);
|
|
}
|
|
resetPreviousIdentifierLeadingComments(t) {
|
|
let {
|
|
commentStack: r
|
|
} = this.state, {
|
|
length: i
|
|
} = r;
|
|
i !== 0 && (r[i - 1].trailingNode === t ? r[i - 1].trailingNode = null : i >= 2 && r[i - 2].trailingNode === t && (r[i - 2].trailingNode =
|
|
null));
|
|
}
|
|
takeSurroundingComments(t, r, i) {
|
|
let {
|
|
commentStack: n
|
|
} = this.state, a = n.length;
|
|
if (a === 0) return;
|
|
let o = a - 1;
|
|
for (; o >= 0; o--) {
|
|
let u = n[o], l = u.end;
|
|
if (u.start === i)
|
|
u.leadingNode = t;
|
|
else if (l === r)
|
|
u.trailingNode = t;
|
|
else if (l < r)
|
|
break;
|
|
}
|
|
}
|
|
}, M2e = /\r\n|[\r\n\u2028\u2029]/, vy = new RegExp(M2e.source, "g");
|
|
function Nl(e) {
|
|
switch (e) {
|
|
case 10:
|
|
case 13:
|
|
case 8232:
|
|
case 8233:
|
|
return !0;
|
|
default:
|
|
return !1;
|
|
}
|
|
}
|
|
s(Nl, "isNewLine");
|
|
function t9(e, t, r) {
|
|
for (let i = t; i < r; i++)
|
|
if (Nl(e.charCodeAt(i)))
|
|
return !0;
|
|
return !1;
|
|
}
|
|
s(t9, "hasNewLine");
|
|
var xT = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, ST = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;
|
|
function R2e(e) {
|
|
switch (e) {
|
|
case 9:
|
|
case 11:
|
|
case 12:
|
|
case 32:
|
|
case 160:
|
|
case 5760:
|
|
case 8192:
|
|
case 8193:
|
|
case 8194:
|
|
case 8195:
|
|
case 8196:
|
|
case 8197:
|
|
case 8198:
|
|
case 8199:
|
|
case 8200:
|
|
case 8201:
|
|
case 8202:
|
|
case 8239:
|
|
case 8287:
|
|
case 12288:
|
|
case 65279:
|
|
return !0;
|
|
default:
|
|
return !1;
|
|
}
|
|
}
|
|
s(R2e, "isWhitespace");
|
|
var IT = class e {
|
|
static {
|
|
s(this, "State");
|
|
}
|
|
constructor() {
|
|
this.flags = 1024, this.startIndex = 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.topicContext = {
|
|
maxNumOfResolvableTopics: 0,
|
|
maxTopicIndex: null
|
|
}, this.labels = [], this.commentsLen = 0, this.commentStack = [], this.pos = 0, this.type = 140, this.value = null, this.start = 0, this.
|
|
end = 0, this.lastTokEndLoc = null, this.lastTokStartLoc = null, this.context = [Et.brace], this.firstInvalidTemplateEscapePos = null,
|
|
this.strictErrors = /* @__PURE__ */ new Map(), this.tokensLength = 0;
|
|
}
|
|
get strict() {
|
|
return (this.flags & 1) > 0;
|
|
}
|
|
set strict(t) {
|
|
t ? this.flags |= 1 : this.flags &= -2;
|
|
}
|
|
init({
|
|
strictMode: t,
|
|
sourceType: r,
|
|
startIndex: i,
|
|
startLine: n,
|
|
startColumn: a
|
|
}) {
|
|
this.strict = t === !1 ? !1 : t === !0 ? !0 : r === "module", this.startIndex = i, this.curLine = n, this.lineStart = -a, this.startLoc =
|
|
this.endLoc = new ts(n, a, i);
|
|
}
|
|
get maybeInArrowParameters() {
|
|
return (this.flags & 2) > 0;
|
|
}
|
|
set maybeInArrowParameters(t) {
|
|
t ? this.flags |= 2 : this.flags &= -3;
|
|
}
|
|
get inType() {
|
|
return (this.flags & 4) > 0;
|
|
}
|
|
set inType(t) {
|
|
t ? this.flags |= 4 : this.flags &= -5;
|
|
}
|
|
get noAnonFunctionType() {
|
|
return (this.flags & 8) > 0;
|
|
}
|
|
set noAnonFunctionType(t) {
|
|
t ? this.flags |= 8 : this.flags &= -9;
|
|
}
|
|
get hasFlowComment() {
|
|
return (this.flags & 16) > 0;
|
|
}
|
|
set hasFlowComment(t) {
|
|
t ? this.flags |= 16 : this.flags &= -17;
|
|
}
|
|
get isAmbientContext() {
|
|
return (this.flags & 32) > 0;
|
|
}
|
|
set isAmbientContext(t) {
|
|
t ? this.flags |= 32 : this.flags &= -33;
|
|
}
|
|
get inAbstractClass() {
|
|
return (this.flags & 64) > 0;
|
|
}
|
|
set inAbstractClass(t) {
|
|
t ? this.flags |= 64 : this.flags &= -65;
|
|
}
|
|
get inDisallowConditionalTypesContext() {
|
|
return (this.flags & 128) > 0;
|
|
}
|
|
set inDisallowConditionalTypesContext(t) {
|
|
t ? this.flags |= 128 : this.flags &= -129;
|
|
}
|
|
get soloAwait() {
|
|
return (this.flags & 256) > 0;
|
|
}
|
|
set soloAwait(t) {
|
|
t ? this.flags |= 256 : this.flags &= -257;
|
|
}
|
|
get inFSharpPipelineDirectBody() {
|
|
return (this.flags & 512) > 0;
|
|
}
|
|
set inFSharpPipelineDirectBody(t) {
|
|
t ? this.flags |= 512 : this.flags &= -513;
|
|
}
|
|
get canStartJSXElement() {
|
|
return (this.flags & 1024) > 0;
|
|
}
|
|
set canStartJSXElement(t) {
|
|
t ? this.flags |= 1024 : this.flags &= -1025;
|
|
}
|
|
get containsEsc() {
|
|
return (this.flags & 2048) > 0;
|
|
}
|
|
set containsEsc(t) {
|
|
t ? this.flags |= 2048 : this.flags &= -2049;
|
|
}
|
|
get hasTopLevelAwait() {
|
|
return (this.flags & 4096) > 0;
|
|
}
|
|
set hasTopLevelAwait(t) {
|
|
t ? this.flags |= 4096 : this.flags &= -4097;
|
|
}
|
|
curPosition() {
|
|
return new ts(this.curLine, this.pos - this.lineStart, this.pos + this.startIndex);
|
|
}
|
|
clone() {
|
|
let t = new e();
|
|
return t.flags = this.flags, t.startIndex = this.startIndex, t.curLine = this.curLine, t.lineStart = this.lineStart, t.startLoc = this.
|
|
startLoc, t.endLoc = this.endLoc, t.errors = this.errors.slice(), t.potentialArrowAt = this.potentialArrowAt, t.noArrowAt = this.noArrowAt.
|
|
slice(), t.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice(), t.topicContext = this.topicContext, t.labels = this.labels.
|
|
slice(), t.commentsLen = this.commentsLen, t.commentStack = this.commentStack.slice(), t.pos = this.pos, t.type = this.type, t.value =
|
|
this.value, t.start = this.start, t.end = this.end, t.lastTokEndLoc = this.lastTokEndLoc, t.lastTokStartLoc = this.lastTokStartLoc, t.
|
|
context = this.context.slice(), t.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos, t.strictErrors = this.strictErrors,
|
|
t.tokensLength = this.tokensLength, t;
|
|
}
|
|
}, j2e = /* @__PURE__ */ s(function(t) {
|
|
return t >= 48 && t <= 57;
|
|
}, "isDigit"), r9 = {
|
|
decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]),
|
|
hex: /* @__PURE__ */ new Set([46, 88, 95, 120])
|
|
}, Ey = {
|
|
bin: /* @__PURE__ */ s((e) => e === 48 || e === 49, "bin"),
|
|
oct: /* @__PURE__ */ s((e) => e >= 48 && e <= 55, "oct"),
|
|
dec: /* @__PURE__ */ s((e) => e >= 48 && e <= 57, "dec"),
|
|
hex: /* @__PURE__ */ s((e) => e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102, "hex")
|
|
};
|
|
function i9(e, t, r, i, n, a) {
|
|
let o = r, u = i, l = n, c = "", f = null, m = r, {
|
|
length: h
|
|
} = t;
|
|
for (; ; ) {
|
|
if (r >= h) {
|
|
a.unterminated(o, u, l), c += t.slice(m, r);
|
|
break;
|
|
}
|
|
let d = t.charCodeAt(r);
|
|
if (L2e(e, d, t, r)) {
|
|
c += t.slice(m, r);
|
|
break;
|
|
}
|
|
if (d === 92) {
|
|
c += t.slice(m, r);
|
|
let y = q2e(t, r, i, n, e === "template", a);
|
|
y.ch === null && !f ? f = {
|
|
pos: r,
|
|
lineStart: i,
|
|
curLine: n
|
|
} : c += y.ch, {
|
|
pos: r,
|
|
lineStart: i,
|
|
curLine: n
|
|
} = y, m = r;
|
|
} else d === 8232 || d === 8233 ? (++r, ++n, i = r) : d === 10 || d === 13 ? e === "template" ? (c += t.slice(m, r) + `
|
|
`, ++r, d === 13 && t.charCodeAt(r) === 10 && ++r, ++n, m = i = r) : a.unterminated(o, u, l) : ++r;
|
|
}
|
|
return {
|
|
pos: r,
|
|
str: c,
|
|
firstInvalidLoc: f,
|
|
lineStart: i,
|
|
curLine: n,
|
|
containsInvalid: !!f
|
|
};
|
|
}
|
|
s(i9, "readStringContents");
|
|
function L2e(e, t, r, i) {
|
|
return e === "template" ? t === 96 || t === 36 && r.charCodeAt(i + 1) === 123 : t === (e === "double" ? 34 : 39);
|
|
}
|
|
s(L2e, "isStringEnd");
|
|
function q2e(e, t, r, i, n, a) {
|
|
let o = !n;
|
|
t++;
|
|
let u = /* @__PURE__ */ s((c) => ({
|
|
pos: t,
|
|
ch: c,
|
|
lineStart: r,
|
|
curLine: i
|
|
}), "res"), l = e.charCodeAt(t++);
|
|
switch (l) {
|
|
case 110:
|
|
return u(`
|
|
`);
|
|
case 114:
|
|
return u("\r");
|
|
case 120: {
|
|
let c;
|
|
return {
|
|
code: c,
|
|
pos: t
|
|
} = OT(e, t, r, i, 2, !1, o, a), u(c === null ? null : String.fromCharCode(c));
|
|
}
|
|
case 117: {
|
|
let c;
|
|
return {
|
|
code: c,
|
|
pos: t
|
|
} = v9(e, t, r, i, o, a), u(c === null ? null : String.fromCodePoint(c));
|
|
}
|
|
case 116:
|
|
return u(" ");
|
|
case 98:
|
|
return u("\b");
|
|
case 118:
|
|
return u("\v");
|
|
case 102:
|
|
return u("\f");
|
|
case 13:
|
|
e.charCodeAt(t) === 10 && ++t;
|
|
case 10:
|
|
r = t, ++i;
|
|
case 8232:
|
|
case 8233:
|
|
return u("");
|
|
case 56:
|
|
case 57:
|
|
if (n)
|
|
return u(null);
|
|
a.strictNumericEscape(t - 1, r, i);
|
|
default:
|
|
if (l >= 48 && l <= 55) {
|
|
let c = t - 1, m = /^[0-7]+/.exec(e.slice(c, t + 2))[0], h = parseInt(m, 8);
|
|
h > 255 && (m = m.slice(0, -1), h = parseInt(m, 8)), t += m.length - 1;
|
|
let d = e.charCodeAt(t);
|
|
if (m !== "0" || d === 56 || d === 57) {
|
|
if (n)
|
|
return u(null);
|
|
a.strictNumericEscape(c, r, i);
|
|
}
|
|
return u(String.fromCharCode(h));
|
|
}
|
|
return u(String.fromCharCode(l));
|
|
}
|
|
}
|
|
s(q2e, "readEscapedChar");
|
|
function OT(e, t, r, i, n, a, o, u) {
|
|
let l = t, c;
|
|
return {
|
|
n: c,
|
|
pos: t
|
|
} = D9(e, t, r, i, 16, n, a, !1, u, !o), c === null && (o ? u.invalidEscapeSequence(l, r, i) : t = l - 1), {
|
|
code: c,
|
|
pos: t
|
|
};
|
|
}
|
|
s(OT, "readHexChar");
|
|
function D9(e, t, r, i, n, a, o, u, l, c) {
|
|
let f = t, m = n === 16 ? r9.hex : r9.decBinOct, h = n === 16 ? Ey.hex : n === 10 ? Ey.dec : n === 8 ? Ey.oct : Ey.bin, d = !1, y = 0;
|
|
for (let p = 0, g = a ?? 1 / 0; p < g; ++p) {
|
|
let b = e.charCodeAt(t), D;
|
|
if (b === 95 && u !== "bail") {
|
|
let v = e.charCodeAt(t - 1), S = e.charCodeAt(t + 1);
|
|
if (u) {
|
|
if (Number.isNaN(S) || !h(S) || m.has(v) || m.has(S)) {
|
|
if (c) return {
|
|
n: null,
|
|
pos: t
|
|
};
|
|
l.unexpectedNumericSeparator(t, r, i);
|
|
}
|
|
} else {
|
|
if (c) return {
|
|
n: null,
|
|
pos: t
|
|
};
|
|
l.numericSeparatorInEscapeSequence(t, r, i);
|
|
}
|
|
++t;
|
|
continue;
|
|
}
|
|
if (b >= 97 ? D = b - 97 + 10 : b >= 65 ? D = b - 65 + 10 : j2e(b) ? D = b - 48 : D = 1 / 0, D >= n) {
|
|
if (D <= 9 && c)
|
|
return {
|
|
n: null,
|
|
pos: t
|
|
};
|
|
if (D <= 9 && l.invalidDigit(t, r, i, n))
|
|
D = 0;
|
|
else if (o)
|
|
D = 0, d = !0;
|
|
else
|
|
break;
|
|
}
|
|
++t, y = y * n + D;
|
|
}
|
|
return t === f || a != null && t - f !== a || d ? {
|
|
n: null,
|
|
pos: t
|
|
} : {
|
|
n: y,
|
|
pos: t
|
|
};
|
|
}
|
|
s(D9, "readInt");
|
|
function v9(e, t, r, i, n, a) {
|
|
let o = e.charCodeAt(t), u;
|
|
if (o === 123) {
|
|
if (++t, {
|
|
code: u,
|
|
pos: t
|
|
} = OT(e, t, r, i, e.indexOf("}", t) - t, !0, n, a), ++t, u !== null && u > 1114111)
|
|
if (n)
|
|
a.invalidCodePoint(t, r, i);
|
|
else
|
|
return {
|
|
code: null,
|
|
pos: t
|
|
};
|
|
} else
|
|
({
|
|
code: u,
|
|
pos: t
|
|
} = OT(e, t, r, i, 4, !1, n, a));
|
|
return {
|
|
code: u,
|
|
pos: t
|
|
};
|
|
}
|
|
s(v9, "readCodePoint");
|
|
function vd(e, t, r) {
|
|
return new ts(r, e - t, e);
|
|
}
|
|
s(vd, "buildPosition");
|
|
var U2e = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100, 118]), es = class {
|
|
static {
|
|
s(this, "Token");
|
|
}
|
|
constructor(t) {
|
|
let r = t.startIndex || 0;
|
|
this.type = t.type, this.value = t.value, this.start = r + t.start, this.end = r + t.end, this.loc = new Rl(t.startLoc, t.endLoc);
|
|
}
|
|
}, kT = class extends FT {
|
|
static {
|
|
s(this, "Tokenizer");
|
|
}
|
|
constructor(t, r) {
|
|
super(), this.isLookahead = void 0, this.tokens = [], this.errorHandlers_readInt = {
|
|
invalidDigit: /* @__PURE__ */ s((i, n, a, o) => this.optionFlags & 2048 ? (this.raise(L.InvalidDigit, vd(i, n, a), {
|
|
radix: o
|
|
}), !0) : !1, "invalidDigit"),
|
|
numericSeparatorInEscapeSequence: this.errorBuilder(L.NumericSeparatorInEscapeSequence),
|
|
unexpectedNumericSeparator: this.errorBuilder(L.UnexpectedNumericSeparator)
|
|
}, this.errorHandlers_readCodePoint = Object.assign({}, this.errorHandlers_readInt, {
|
|
invalidEscapeSequence: this.errorBuilder(L.InvalidEscapeSequence),
|
|
invalidCodePoint: this.errorBuilder(L.InvalidCodePoint)
|
|
}), this.errorHandlers_readStringContents_string = Object.assign({}, this.errorHandlers_readCodePoint, {
|
|
strictNumericEscape: /* @__PURE__ */ s((i, n, a) => {
|
|
this.recordStrictModeErrors(L.StrictNumericEscape, vd(i, n, a));
|
|
}, "strictNumericEscape"),
|
|
unterminated: /* @__PURE__ */ s((i, n, a) => {
|
|
throw this.raise(L.UnterminatedString, vd(i - 1, n, a));
|
|
}, "unterminated")
|
|
}), this.errorHandlers_readStringContents_template = Object.assign({}, this.errorHandlers_readCodePoint, {
|
|
strictNumericEscape: this.errorBuilder(L.StrictNumericEscape),
|
|
unterminated: /* @__PURE__ */ s((i, n, a) => {
|
|
throw this.raise(L.UnterminatedTemplate, vd(i, n, a));
|
|
}, "unterminated")
|
|
}), this.state = new IT(), this.state.init(t), this.input = r, this.length = r.length, this.comments = [], this.isLookahead = !1;
|
|
}
|
|
pushToken(t) {
|
|
this.tokens.length = this.state.tokensLength, this.tokens.push(t), ++this.state.tokensLength;
|
|
}
|
|
next() {
|
|
this.checkKeywordEscapes(), this.optionFlags & 256 && this.pushToken(new es(this.state)), this.state.lastTokEndLoc = this.state.endLoc,
|
|
this.state.lastTokStartLoc = this.state.startLoc, this.nextToken();
|
|
}
|
|
eat(t) {
|
|
return this.match(t) ? (this.next(), !0) : !1;
|
|
}
|
|
match(t) {
|
|
return this.state.type === t;
|
|
}
|
|
createLookaheadState(t) {
|
|
return {
|
|
pos: t.pos,
|
|
value: null,
|
|
type: t.type,
|
|
start: t.start,
|
|
end: t.end,
|
|
context: [this.curContext()],
|
|
inType: t.inType,
|
|
startLoc: t.startLoc,
|
|
lastTokEndLoc: t.lastTokEndLoc,
|
|
curLine: t.curLine,
|
|
lineStart: t.lineStart,
|
|
curPosition: t.curPosition
|
|
};
|
|
}
|
|
lookahead() {
|
|
let t = this.state;
|
|
this.state = this.createLookaheadState(t), this.isLookahead = !0, this.nextToken(), this.isLookahead = !1;
|
|
let r = this.state;
|
|
return this.state = t, r;
|
|
}
|
|
nextTokenStart() {
|
|
return this.nextTokenStartSince(this.state.pos);
|
|
}
|
|
nextTokenStartSince(t) {
|
|
return xT.lastIndex = t, xT.test(this.input) ? xT.lastIndex : t;
|
|
}
|
|
lookaheadCharCode() {
|
|
return this.input.charCodeAt(this.nextTokenStart());
|
|
}
|
|
nextTokenInLineStart() {
|
|
return this.nextTokenInLineStartSince(this.state.pos);
|
|
}
|
|
nextTokenInLineStartSince(t) {
|
|
return ST.lastIndex = t, ST.test(this.input) ? ST.lastIndex : t;
|
|
}
|
|
lookaheadInLineCharCode() {
|
|
return this.input.charCodeAt(this.nextTokenInLineStart());
|
|
}
|
|
codePointAtPos(t) {
|
|
let r = this.input.charCodeAt(t);
|
|
if ((r & 64512) === 55296 && ++t < this.input.length) {
|
|
let i = this.input.charCodeAt(t);
|
|
(i & 64512) === 56320 && (r = 65536 + ((r & 1023) << 10) + (i & 1023));
|
|
}
|
|
return r;
|
|
}
|
|
setStrict(t) {
|
|
this.state.strict = t, t && (this.state.strictErrors.forEach(([r, i]) => this.raise(r, i)), this.state.strictErrors.clear());
|
|
}
|
|
curContext() {
|
|
return this.state.context[this.state.context.length - 1];
|
|
}
|
|
nextToken() {
|
|
if (this.skipSpace(), this.state.start = this.state.pos, this.isLookahead || (this.state.startLoc = this.state.curPosition()), this.state.
|
|
pos >= this.length) {
|
|
this.finishToken(140);
|
|
return;
|
|
}
|
|
this.getTokenFromCode(this.codePointAtPos(this.state.pos));
|
|
}
|
|
skipBlockComment(t) {
|
|
let r;
|
|
this.isLookahead || (r = this.state.curPosition());
|
|
let i = this.state.pos, n = this.input.indexOf(t, i + 2);
|
|
if (n === -1)
|
|
throw this.raise(L.UnterminatedComment, this.state.curPosition());
|
|
for (this.state.pos = n + t.length, vy.lastIndex = i + 2; vy.test(this.input) && vy.lastIndex <= n; )
|
|
++this.state.curLine, this.state.lineStart = vy.lastIndex;
|
|
if (this.isLookahead) return;
|
|
let a = {
|
|
type: "CommentBlock",
|
|
value: this.input.slice(i + 2, n),
|
|
start: this.sourceToOffsetPos(i),
|
|
end: this.sourceToOffsetPos(n + t.length),
|
|
loc: new Rl(r, this.state.curPosition())
|
|
};
|
|
return this.optionFlags & 256 && this.pushToken(a), a;
|
|
}
|
|
skipLineComment(t) {
|
|
let r = this.state.pos, i;
|
|
this.isLookahead || (i = this.state.curPosition());
|
|
let n = this.input.charCodeAt(this.state.pos += t);
|
|
if (this.state.pos < this.length)
|
|
for (; !Nl(n) && ++this.state.pos < this.length; )
|
|
n = this.input.charCodeAt(this.state.pos);
|
|
if (this.isLookahead) return;
|
|
let a = this.state.pos, u = {
|
|
type: "CommentLine",
|
|
value: this.input.slice(r + t, a),
|
|
start: this.sourceToOffsetPos(r),
|
|
end: this.sourceToOffsetPos(a),
|
|
loc: new Rl(i, this.state.curPosition())
|
|
};
|
|
return this.optionFlags & 256 && this.pushToken(u), u;
|
|
}
|
|
skipSpace() {
|
|
let t = this.state.pos, r = this.optionFlags & 4096 ? [] : null;
|
|
e: for (; this.state.pos < this.length; ) {
|
|
let i = this.input.charCodeAt(this.state.pos);
|
|
switch (i) {
|
|
case 32:
|
|
case 160:
|
|
case 9:
|
|
++this.state.pos;
|
|
break;
|
|
case 13:
|
|
this.input.charCodeAt(this.state.pos + 1) === 10 && ++this.state.pos;
|
|
case 10:
|
|
case 8232:
|
|
case 8233:
|
|
++this.state.pos, ++this.state.curLine, this.state.lineStart = this.state.pos;
|
|
break;
|
|
case 47:
|
|
switch (this.input.charCodeAt(this.state.pos + 1)) {
|
|
case 42: {
|
|
let n = this.skipBlockComment("*/");
|
|
n !== void 0 && (this.addComment(n), r?.push(n));
|
|
break;
|
|
}
|
|
case 47: {
|
|
let n = this.skipLineComment(2);
|
|
n !== void 0 && (this.addComment(n), r?.push(n));
|
|
break;
|
|
}
|
|
default:
|
|
break e;
|
|
}
|
|
break;
|
|
default:
|
|
if (R2e(i))
|
|
++this.state.pos;
|
|
else if (i === 45 && !this.inModule && this.optionFlags & 8192) {
|
|
let n = this.state.pos;
|
|
if (this.input.charCodeAt(n + 1) === 45 && this.input.charCodeAt(n + 2) === 62 && (t === 0 || this.state.lineStart > t)) {
|
|
let a = this.skipLineComment(3);
|
|
a !== void 0 && (this.addComment(a), r?.push(a));
|
|
} else
|
|
break e;
|
|
} else if (i === 60 && !this.inModule && this.optionFlags & 8192) {
|
|
let n = this.state.pos;
|
|
if (this.input.charCodeAt(n + 1) === 33 && this.input.charCodeAt(n + 2) === 45 && this.input.charCodeAt(n + 3) === 45) {
|
|
let a = this.skipLineComment(4);
|
|
a !== void 0 && (this.addComment(a), r?.push(a));
|
|
} else
|
|
break e;
|
|
} else
|
|
break e;
|
|
}
|
|
}
|
|
if (r?.length > 0) {
|
|
let i = this.state.pos, n = {
|
|
start: this.sourceToOffsetPos(t),
|
|
end: this.sourceToOffsetPos(i),
|
|
comments: r,
|
|
leadingNode: null,
|
|
trailingNode: null,
|
|
containingNode: null
|
|
};
|
|
this.state.commentStack.push(n);
|
|
}
|
|
}
|
|
finishToken(t, r) {
|
|
this.state.end = this.state.pos, this.state.endLoc = this.state.curPosition();
|
|
let i = this.state.type;
|
|
this.state.type = t, this.state.value = r, this.isLookahead || this.updateContext(i);
|
|
}
|
|
replaceToken(t) {
|
|
this.state.type = t, this.updateContext();
|
|
}
|
|
readToken_numberSign() {
|
|
if (this.state.pos === 0 && this.readToken_interpreter())
|
|
return;
|
|
let t = this.state.pos + 1, r = this.codePointAtPos(t);
|
|
if (r >= 48 && r <= 57)
|
|
throw this.raise(L.UnexpectedDigitAfterHash, this.state.curPosition());
|
|
if (r === 123 || r === 91 && this.hasPlugin("recordAndTuple")) {
|
|
if (this.expectPlugin("recordAndTuple"), this.getPluginOption("recordAndTuple", "syntaxType") === "bar")
|
|
throw this.raise(r === 123 ? L.RecordExpressionHashIncorrectStartSyntaxType : L.TupleExpressionHashIncorrectStartSyntaxType, this.
|
|
state.curPosition());
|
|
this.state.pos += 2, r === 123 ? this.finishToken(7) : this.finishToken(1);
|
|
} else qs(r) ? (++this.state.pos, this.finishToken(139, this.readWord1(r))) : r === 92 ? (++this.state.pos, this.finishToken(139, this.
|
|
readWord1())) : this.finishOp(27, 1);
|
|
}
|
|
readToken_dot() {
|
|
let t = this.input.charCodeAt(this.state.pos + 1);
|
|
if (t >= 48 && t <= 57) {
|
|
this.readNumber(!0);
|
|
return;
|
|
}
|
|
t === 46 && this.input.charCodeAt(this.state.pos + 2) === 46 ? (this.state.pos += 3, this.finishToken(21)) : (++this.state.pos, this.finishToken(
|
|
16));
|
|
}
|
|
readToken_slash() {
|
|
this.input.charCodeAt(this.state.pos + 1) === 61 ? this.finishOp(31, 2) : this.finishOp(56, 1);
|
|
}
|
|
readToken_interpreter() {
|
|
if (this.state.pos !== 0 || this.length < 2) return !1;
|
|
let t = this.input.charCodeAt(this.state.pos + 1);
|
|
if (t !== 33) return !1;
|
|
let r = this.state.pos;
|
|
for (this.state.pos += 1; !Nl(t) && ++this.state.pos < this.length; )
|
|
t = this.input.charCodeAt(this.state.pos);
|
|
let i = this.input.slice(r + 2, this.state.pos);
|
|
return this.finishToken(28, i), !0;
|
|
}
|
|
readToken_mult_modulo(t) {
|
|
let r = t === 42 ? 55 : 54, i = 1, n = this.input.charCodeAt(this.state.pos + 1);
|
|
t === 42 && n === 42 && (i++, n = this.input.charCodeAt(this.state.pos + 2), r = 57), n === 61 && !this.state.inType && (i++, r = t ===
|
|
37 ? 33 : 30), this.finishOp(r, i);
|
|
}
|
|
readToken_pipe_amp(t) {
|
|
let r = this.input.charCodeAt(this.state.pos + 1);
|
|
if (r === t) {
|
|
this.input.charCodeAt(this.state.pos + 2) === 61 ? this.finishOp(30, 3) : this.finishOp(t === 124 ? 41 : 42, 2);
|
|
return;
|
|
}
|
|
if (t === 124) {
|
|
if (r === 62) {
|
|
this.finishOp(39, 2);
|
|
return;
|
|
}
|
|
if (this.hasPlugin("recordAndTuple") && r === 125) {
|
|
if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar")
|
|
throw this.raise(L.RecordExpressionBarIncorrectEndSyntaxType, this.state.curPosition());
|
|
this.state.pos += 2, this.finishToken(9);
|
|
return;
|
|
}
|
|
if (this.hasPlugin("recordAndTuple") && r === 93) {
|
|
if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar")
|
|
throw this.raise(L.TupleExpressionBarIncorrectEndSyntaxType, this.state.curPosition());
|
|
this.state.pos += 2, this.finishToken(4);
|
|
return;
|
|
}
|
|
}
|
|
if (r === 61) {
|
|
this.finishOp(30, 2);
|
|
return;
|
|
}
|
|
this.finishOp(t === 124 ? 43 : 45, 1);
|
|
}
|
|
readToken_caret() {
|
|
let t = this.input.charCodeAt(this.state.pos + 1);
|
|
t === 61 && !this.state.inType ? this.finishOp(32, 2) : t === 94 && this.hasPlugin(["pipelineOperator", {
|
|
proposal: "hack",
|
|
topicToken: "^^"
|
|
}]) ? (this.finishOp(37, 2), this.input.codePointAt(this.state.pos) === 94 && this.unexpected()) : this.finishOp(44, 1);
|
|
}
|
|
readToken_atSign() {
|
|
this.input.charCodeAt(this.state.pos + 1) === 64 && this.hasPlugin(["pipelineOperator", {
|
|
proposal: "hack",
|
|
topicToken: "@@"
|
|
}]) ? this.finishOp(38, 2) : this.finishOp(26, 1);
|
|
}
|
|
readToken_plus_min(t) {
|
|
let r = this.input.charCodeAt(this.state.pos + 1);
|
|
if (r === t) {
|
|
this.finishOp(34, 2);
|
|
return;
|
|
}
|
|
r === 61 ? this.finishOp(30, 2) : this.finishOp(53, 1);
|
|
}
|
|
readToken_lt() {
|
|
let {
|
|
pos: t
|
|
} = this.state, r = this.input.charCodeAt(t + 1);
|
|
if (r === 60) {
|
|
if (this.input.charCodeAt(t + 2) === 61) {
|
|
this.finishOp(30, 3);
|
|
return;
|
|
}
|
|
this.finishOp(51, 2);
|
|
return;
|
|
}
|
|
if (r === 61) {
|
|
this.finishOp(49, 2);
|
|
return;
|
|
}
|
|
this.finishOp(47, 1);
|
|
}
|
|
readToken_gt() {
|
|
let {
|
|
pos: t
|
|
} = this.state, r = this.input.charCodeAt(t + 1);
|
|
if (r === 62) {
|
|
let i = this.input.charCodeAt(t + 2) === 62 ? 3 : 2;
|
|
if (this.input.charCodeAt(t + i) === 61) {
|
|
this.finishOp(30, i + 1);
|
|
return;
|
|
}
|
|
this.finishOp(52, i);
|
|
return;
|
|
}
|
|
if (r === 61) {
|
|
this.finishOp(49, 2);
|
|
return;
|
|
}
|
|
this.finishOp(48, 1);
|
|
}
|
|
readToken_eq_excl(t) {
|
|
let r = this.input.charCodeAt(this.state.pos + 1);
|
|
if (r === 61) {
|
|
this.finishOp(46, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
|
|
return;
|
|
}
|
|
if (t === 61 && r === 62) {
|
|
this.state.pos += 2, this.finishToken(19);
|
|
return;
|
|
}
|
|
this.finishOp(t === 61 ? 29 : 35, 1);
|
|
}
|
|
readToken_question() {
|
|
let t = this.input.charCodeAt(this.state.pos + 1), r = this.input.charCodeAt(this.state.pos + 2);
|
|
t === 63 ? r === 61 ? this.finishOp(30, 3) : this.finishOp(40, 2) : t === 46 && !(r >= 48 && r <= 57) ? (this.state.pos += 2, this.finishToken(
|
|
18)) : (++this.state.pos, this.finishToken(17));
|
|
}
|
|
getTokenFromCode(t) {
|
|
switch (t) {
|
|
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(L.TupleExpressionBarIncorrectStartSyntaxType, this.state.curPosition());
|
|
this.state.pos += 2, this.finishToken(2);
|
|
} else
|
|
++this.state.pos, this.finishToken(0);
|
|
return;
|
|
case 93:
|
|
++this.state.pos, this.finishToken(3);
|
|
return;
|
|
case 123:
|
|
if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
|
|
if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar")
|
|
throw this.raise(L.RecordExpressionBarIncorrectStartSyntaxType, this.state.curPosition());
|
|
this.state.pos += 2, this.finishToken(6);
|
|
} else
|
|
++this.state.pos, this.finishToken(5);
|
|
return;
|
|
case 125:
|
|
++this.state.pos, this.finishToken(8);
|
|
return;
|
|
case 58:
|
|
this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58 ? this.finishOp(15, 2) : (++this.state.pos, this.
|
|
finishToken(14));
|
|
return;
|
|
case 63:
|
|
this.readToken_question();
|
|
return;
|
|
case 96:
|
|
this.readTemplateToken();
|
|
return;
|
|
case 48: {
|
|
let r = this.input.charCodeAt(this.state.pos + 1);
|
|
if (r === 120 || r === 88) {
|
|
this.readRadixNumber(16);
|
|
return;
|
|
}
|
|
if (r === 111 || r === 79) {
|
|
this.readRadixNumber(8);
|
|
return;
|
|
}
|
|
if (r === 98 || r === 66) {
|
|
this.readRadixNumber(2);
|
|
return;
|
|
}
|
|
}
|
|
case 49:
|
|
case 50:
|
|
case 51:
|
|
case 52:
|
|
case 53:
|
|
case 54:
|
|
case 55:
|
|
case 56:
|
|
case 57:
|
|
this.readNumber(!1);
|
|
return;
|
|
case 34:
|
|
case 39:
|
|
this.readString(t);
|
|
return;
|
|
case 47:
|
|
this.readToken_slash();
|
|
return;
|
|
case 37:
|
|
case 42:
|
|
this.readToken_mult_modulo(t);
|
|
return;
|
|
case 124:
|
|
case 38:
|
|
this.readToken_pipe_amp(t);
|
|
return;
|
|
case 94:
|
|
this.readToken_caret();
|
|
return;
|
|
case 43:
|
|
case 45:
|
|
this.readToken_plus_min(t);
|
|
return;
|
|
case 60:
|
|
this.readToken_lt();
|
|
return;
|
|
case 62:
|
|
this.readToken_gt();
|
|
return;
|
|
case 61:
|
|
case 33:
|
|
this.readToken_eq_excl(t);
|
|
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 (qs(t)) {
|
|
this.readWord(t);
|
|
return;
|
|
}
|
|
}
|
|
throw this.raise(L.InvalidOrUnexpectedToken, this.state.curPosition(), {
|
|
unexpected: String.fromCodePoint(t)
|
|
});
|
|
}
|
|
finishOp(t, r) {
|
|
let i = this.input.slice(this.state.pos, this.state.pos + r);
|
|
this.state.pos += r, this.finishToken(t, i);
|
|
}
|
|
readRegexp() {
|
|
let t = this.state.startLoc, r = this.state.start + 1, i, n, {
|
|
pos: a
|
|
} = this.state;
|
|
for (; ; ++a) {
|
|
if (a >= this.length)
|
|
throw this.raise(L.UnterminatedRegExp, yi(t, 1));
|
|
let c = this.input.charCodeAt(a);
|
|
if (Nl(c))
|
|
throw this.raise(L.UnterminatedRegExp, yi(t, 1));
|
|
if (i)
|
|
i = !1;
|
|
else {
|
|
if (c === 91)
|
|
n = !0;
|
|
else if (c === 93 && n)
|
|
n = !1;
|
|
else if (c === 47 && !n)
|
|
break;
|
|
i = c === 92;
|
|
}
|
|
}
|
|
let o = this.input.slice(r, a);
|
|
++a;
|
|
let u = "", l = /* @__PURE__ */ s(() => yi(t, a + 2 - r), "nextPos");
|
|
for (; a < this.length; ) {
|
|
let c = this.codePointAtPos(a), f = String.fromCharCode(c);
|
|
if (U2e.has(c))
|
|
c === 118 ? u.includes("u") && this.raise(L.IncompatibleRegExpUVFlags, l()) : c === 117 && u.includes("v") && this.raise(L.IncompatibleRegExpUVFlags,
|
|
l()), u.includes(f) && this.raise(L.DuplicateRegExpFlags, l());
|
|
else if (Bl(c) || c === 92)
|
|
this.raise(L.MalformedRegExpFlags, l());
|
|
else
|
|
break;
|
|
++a, u += f;
|
|
}
|
|
this.state.pos = a, this.finishToken(138, {
|
|
pattern: o,
|
|
flags: u
|
|
});
|
|
}
|
|
readInt(t, r, i = !1, n = !0) {
|
|
let {
|
|
n: a,
|
|
pos: o
|
|
} = D9(this.input, this.state.pos, this.state.lineStart, this.state.curLine, t, r, i, n, this.errorHandlers_readInt, !1);
|
|
return this.state.pos = o, a;
|
|
}
|
|
readRadixNumber(t) {
|
|
let r = this.state.pos, i = this.state.curPosition(), n = !1;
|
|
this.state.pos += 2;
|
|
let a = this.readInt(t);
|
|
a == null && this.raise(L.InvalidDigit, yi(i, 2), {
|
|
radix: t
|
|
});
|
|
let o = this.input.charCodeAt(this.state.pos);
|
|
if (o === 110)
|
|
++this.state.pos, n = !0;
|
|
else if (o === 109)
|
|
throw this.raise(L.InvalidDecimal, i);
|
|
if (qs(this.codePointAtPos(this.state.pos)))
|
|
throw this.raise(L.NumberIdentifier, this.state.curPosition());
|
|
if (n) {
|
|
let u = this.input.slice(r, this.state.pos).replace(/[_n]/g, "");
|
|
this.finishToken(136, u);
|
|
return;
|
|
}
|
|
this.finishToken(135, a);
|
|
}
|
|
readNumber(t) {
|
|
let r = this.state.pos, i = this.state.curPosition(), n = !1, a = !1, o = !1, u = !1;
|
|
!t && this.readInt(10) === null && this.raise(L.InvalidNumber, this.state.curPosition());
|
|
let l = this.state.pos - r >= 2 && this.input.charCodeAt(r) === 48;
|
|
if (l) {
|
|
let d = this.input.slice(r, this.state.pos);
|
|
if (this.recordStrictModeErrors(L.StrictOctalLiteral, i), !this.state.strict) {
|
|
let y = d.indexOf("_");
|
|
y > 0 && this.raise(L.ZeroDigitNumericSeparator, yi(i, y));
|
|
}
|
|
u = l && !/[89]/.test(d);
|
|
}
|
|
let c = this.input.charCodeAt(this.state.pos);
|
|
if (c === 46 && !u && (++this.state.pos, this.readInt(10), n = !0, c = this.input.charCodeAt(this.state.pos)), (c === 69 || c === 101) &&
|
|
!u && (c = this.input.charCodeAt(++this.state.pos), (c === 43 || c === 45) && ++this.state.pos, this.readInt(10) === null && this.raise(
|
|
L.InvalidOrMissingExponent, i), n = !0, o = !0, c = this.input.charCodeAt(this.state.pos)), c === 110 && ((n || l) && this.raise(L.InvalidBigIntLiteral,
|
|
i), ++this.state.pos, a = !0), c === 109) {
|
|
this.expectPlugin("decimal", this.state.curPosition()), (o || l) && this.raise(L.InvalidDecimal, i), ++this.state.pos;
|
|
var f = !0;
|
|
}
|
|
if (qs(this.codePointAtPos(this.state.pos)))
|
|
throw this.raise(L.NumberIdentifier, this.state.curPosition());
|
|
let m = this.input.slice(r, this.state.pos).replace(/[_mn]/g, "");
|
|
if (a) {
|
|
this.finishToken(136, m);
|
|
return;
|
|
}
|
|
if (f) {
|
|
this.finishToken(137, m);
|
|
return;
|
|
}
|
|
let h = u ? parseInt(m, 8) : parseFloat(m);
|
|
this.finishToken(135, h);
|
|
}
|
|
readCodePoint(t) {
|
|
let {
|
|
code: r,
|
|
pos: i
|
|
} = v9(this.input, this.state.pos, this.state.lineStart, this.state.curLine, t, this.errorHandlers_readCodePoint);
|
|
return this.state.pos = i, r;
|
|
}
|
|
readString(t) {
|
|
let {
|
|
str: r,
|
|
pos: i,
|
|
curLine: n,
|
|
lineStart: a
|
|
} = i9(t === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string);
|
|
this.state.pos = i + 1, this.state.lineStart = a, this.state.curLine = n, this.finishToken(134, r);
|
|
}
|
|
readTemplateContinuation() {
|
|
this.match(8) || this.unexpected(null, 8), this.state.pos--, this.readTemplateToken();
|
|
}
|
|
readTemplateToken() {
|
|
let t = this.input[this.state.pos], {
|
|
str: r,
|
|
firstInvalidLoc: i,
|
|
pos: n,
|
|
curLine: a,
|
|
lineStart: o
|
|
} = i9("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template);
|
|
this.state.pos = n + 1, this.state.lineStart = o, this.state.curLine = a, i && (this.state.firstInvalidTemplateEscapePos = new ts(i.curLine,
|
|
i.pos - i.lineStart, this.sourceToOffsetPos(i.pos))), this.input.codePointAt(n) === 96 ? this.finishToken(24, i ? null : t + r + "`") :
|
|
(this.state.pos++, this.finishToken(25, i ? null : t + r + "${"));
|
|
}
|
|
recordStrictModeErrors(t, r) {
|
|
let i = r.index;
|
|
this.state.strict && !this.state.strictErrors.has(i) ? this.raise(t, r) : this.state.strictErrors.set(i, [t, r]);
|
|
}
|
|
readWord1(t) {
|
|
this.state.containsEsc = !1;
|
|
let r = "", i = this.state.pos, n = this.state.pos;
|
|
for (t !== void 0 && (this.state.pos += t <= 65535 ? 1 : 2); this.state.pos < this.length; ) {
|
|
let a = this.codePointAtPos(this.state.pos);
|
|
if (Bl(a))
|
|
this.state.pos += a <= 65535 ? 1 : 2;
|
|
else if (a === 92) {
|
|
this.state.containsEsc = !0, r += this.input.slice(n, this.state.pos);
|
|
let o = this.state.curPosition(), u = this.state.pos === i ? qs : Bl;
|
|
if (this.input.charCodeAt(++this.state.pos) !== 117) {
|
|
this.raise(L.MissingUnicodeEscape, this.state.curPosition()), n = this.state.pos - 1;
|
|
continue;
|
|
}
|
|
++this.state.pos;
|
|
let l = this.readCodePoint(!0);
|
|
l !== null && (u(l) || this.raise(L.EscapedCharNotAnIdentifier, o), r += String.fromCodePoint(l)), n = this.state.pos;
|
|
} else
|
|
break;
|
|
}
|
|
return r + this.input.slice(n, this.state.pos);
|
|
}
|
|
readWord(t) {
|
|
let r = this.readWord1(t), i = HT.get(r);
|
|
i !== void 0 ? this.finishToken(i, La(i)) : this.finishToken(132, r);
|
|
}
|
|
checkKeywordEscapes() {
|
|
let {
|
|
type: t
|
|
} = this.state;
|
|
YT(t) && this.state.containsEsc && this.raise(L.InvalidEscapedReservedWord, this.state.startLoc, {
|
|
reservedWord: La(t)
|
|
});
|
|
}
|
|
raise(t, r, i = {}) {
|
|
let n = r instanceof ts ? r : r.loc.start, a = t(n, i);
|
|
if (!(this.optionFlags & 2048)) throw a;
|
|
return this.isLookahead || this.state.errors.push(a), a;
|
|
}
|
|
raiseOverwrite(t, r, i = {}) {
|
|
let n = r instanceof ts ? r : r.loc.start, a = n.index, o = this.state.errors;
|
|
for (let u = o.length - 1; u >= 0; u--) {
|
|
let l = o[u];
|
|
if (l.loc.index === a)
|
|
return o[u] = t(n, i);
|
|
if (l.loc.index < a) break;
|
|
}
|
|
return this.raise(t, r, i);
|
|
}
|
|
updateContext(t) {
|
|
}
|
|
unexpected(t, r) {
|
|
throw this.raise(L.UnexpectedToken, t ?? this.state.startLoc, {
|
|
expected: r ? La(r) : null
|
|
});
|
|
}
|
|
expectPlugin(t, r) {
|
|
if (this.hasPlugin(t))
|
|
return !0;
|
|
throw this.raise(L.MissingPlugin, r ?? this.state.startLoc, {
|
|
missingPlugin: [t]
|
|
});
|
|
}
|
|
expectOnePlugin(t) {
|
|
if (!t.some((r) => this.hasPlugin(r)))
|
|
throw this.raise(L.MissingOneOfPlugins, this.state.startLoc, {
|
|
missingPlugin: t
|
|
});
|
|
}
|
|
errorBuilder(t) {
|
|
return (r, i, n) => {
|
|
this.raise(t, vd(r, i, n));
|
|
};
|
|
}
|
|
}, BT = class {
|
|
static {
|
|
s(this, "ClassScope");
|
|
}
|
|
constructor() {
|
|
this.privateNames = /* @__PURE__ */ new Set(), this.loneAccessors = /* @__PURE__ */ new Map(), this.undefinedPrivateNames = /* @__PURE__ */ new Map();
|
|
}
|
|
}, NT = class {
|
|
static {
|
|
s(this, "ClassScopeHandler");
|
|
}
|
|
constructor(t) {
|
|
this.parser = void 0, this.stack = [], this.undefinedPrivateNames = /* @__PURE__ */ new Map(), this.parser = t;
|
|
}
|
|
current() {
|
|
return this.stack[this.stack.length - 1];
|
|
}
|
|
enter() {
|
|
this.stack.push(new BT());
|
|
}
|
|
exit() {
|
|
let t = this.stack.pop(), r = this.current();
|
|
for (let [i, n] of Array.from(t.undefinedPrivateNames))
|
|
r ? r.undefinedPrivateNames.has(i) || r.undefinedPrivateNames.set(i, n) : this.parser.raise(L.InvalidPrivateFieldResolution, n, {
|
|
identifierName: i
|
|
});
|
|
}
|
|
declarePrivateName(t, r, i) {
|
|
let {
|
|
privateNames: n,
|
|
loneAccessors: a,
|
|
undefinedPrivateNames: o
|
|
} = this.current(), u = n.has(t);
|
|
if (r & 3) {
|
|
let l = u && a.get(t);
|
|
if (l) {
|
|
let c = l & 4, f = r & 4, m = l & 3, h = r & 3;
|
|
u = m === h || c !== f, u || a.delete(t);
|
|
} else u || a.set(t, r);
|
|
}
|
|
u && this.parser.raise(L.PrivateNameRedeclaration, i, {
|
|
identifierName: t
|
|
}), n.add(t), o.delete(t);
|
|
}
|
|
usePrivateName(t, r) {
|
|
let i;
|
|
for (i of this.stack)
|
|
if (i.privateNames.has(t)) return;
|
|
i ? i.undefinedPrivateNames.set(t, r) : this.parser.raise(L.InvalidPrivateFieldResolution, r, {
|
|
identifierName: t
|
|
});
|
|
}
|
|
}, jl = class {
|
|
static {
|
|
s(this, "ExpressionScope");
|
|
}
|
|
constructor(t = 0) {
|
|
this.type = t;
|
|
}
|
|
canBeArrowParameterDeclaration() {
|
|
return this.type === 2 || this.type === 1;
|
|
}
|
|
isCertainlyParameterDeclaration() {
|
|
return this.type === 3;
|
|
}
|
|
}, Ay = class extends jl {
|
|
static {
|
|
s(this, "ArrowHeadParsingScope");
|
|
}
|
|
constructor(t) {
|
|
super(t), this.declarationErrors = /* @__PURE__ */ new Map();
|
|
}
|
|
recordDeclarationError(t, r) {
|
|
let i = r.index;
|
|
this.declarationErrors.set(i, [t, r]);
|
|
}
|
|
clearDeclarationError(t) {
|
|
this.declarationErrors.delete(t);
|
|
}
|
|
iterateErrors(t) {
|
|
this.declarationErrors.forEach(t);
|
|
}
|
|
}, MT = class {
|
|
static {
|
|
s(this, "ExpressionScopeHandler");
|
|
}
|
|
constructor(t) {
|
|
this.parser = void 0, this.stack = [new jl()], this.parser = t;
|
|
}
|
|
enter(t) {
|
|
this.stack.push(t);
|
|
}
|
|
exit() {
|
|
this.stack.pop();
|
|
}
|
|
recordParameterInitializerError(t, r) {
|
|
let i = r.loc.start, {
|
|
stack: n
|
|
} = this, a = n.length - 1, o = n[a];
|
|
for (; !o.isCertainlyParameterDeclaration(); ) {
|
|
if (o.canBeArrowParameterDeclaration())
|
|
o.recordDeclarationError(t, i);
|
|
else
|
|
return;
|
|
o = n[--a];
|
|
}
|
|
this.parser.raise(t, i);
|
|
}
|
|
recordArrowParameterBindingError(t, r) {
|
|
let {
|
|
stack: i
|
|
} = this, n = i[i.length - 1], a = r.loc.start;
|
|
if (n.isCertainlyParameterDeclaration())
|
|
this.parser.raise(t, a);
|
|
else if (n.canBeArrowParameterDeclaration())
|
|
n.recordDeclarationError(t, a);
|
|
else
|
|
return;
|
|
}
|
|
recordAsyncArrowParametersError(t) {
|
|
let {
|
|
stack: r
|
|
} = this, i = r.length - 1, n = r[i];
|
|
for (; n.canBeArrowParameterDeclaration(); )
|
|
n.type === 2 && n.recordDeclarationError(L.AwaitBindingIdentifier, t), n = r[--i];
|
|
}
|
|
validateAsPattern() {
|
|
let {
|
|
stack: t
|
|
} = this, r = t[t.length - 1];
|
|
r.canBeArrowParameterDeclaration() && r.iterateErrors(([i, n]) => {
|
|
this.parser.raise(i, n);
|
|
let a = t.length - 2, o = t[a];
|
|
for (; o.canBeArrowParameterDeclaration(); )
|
|
o.clearDeclarationError(n.index), o = t[--a];
|
|
});
|
|
}
|
|
};
|
|
function W2e() {
|
|
return new jl(3);
|
|
}
|
|
s(W2e, "newParameterDeclarationScope");
|
|
function $2e() {
|
|
return new Ay(1);
|
|
}
|
|
s($2e, "newArrowHeadScope");
|
|
function V2e() {
|
|
return new Ay(2);
|
|
}
|
|
s(V2e, "newAsyncArrowScope");
|
|
function E9() {
|
|
return new jl();
|
|
}
|
|
s(E9, "newExpressionScope");
|
|
var RT = class {
|
|
static {
|
|
s(this, "ProductionParameterHandler");
|
|
}
|
|
constructor() {
|
|
this.stacks = [];
|
|
}
|
|
enter(t) {
|
|
this.stacks.push(t);
|
|
}
|
|
exit() {
|
|
this.stacks.pop();
|
|
}
|
|
currentFlags() {
|
|
return this.stacks[this.stacks.length - 1];
|
|
}
|
|
get hasAwait() {
|
|
return (this.currentFlags() & 2) > 0;
|
|
}
|
|
get hasYield() {
|
|
return (this.currentFlags() & 1) > 0;
|
|
}
|
|
get hasReturn() {
|
|
return (this.currentFlags() & 4) > 0;
|
|
}
|
|
get hasIn() {
|
|
return (this.currentFlags() & 8) > 0;
|
|
}
|
|
};
|
|
function Ty(e, t) {
|
|
return (e ? 2 : 0) | (t ? 1 : 0);
|
|
}
|
|
s(Ty, "functionFlags");
|
|
var jT = class extends kT {
|
|
static {
|
|
s(this, "UtilParser");
|
|
}
|
|
addExtra(t, r, i, n = !0) {
|
|
if (!t) return;
|
|
let {
|
|
extra: a
|
|
} = t;
|
|
a == null && (a = {}, t.extra = a), n ? a[r] = i : Object.defineProperty(a, r, {
|
|
enumerable: n,
|
|
value: i
|
|
});
|
|
}
|
|
isContextual(t) {
|
|
return this.state.type === t && !this.state.containsEsc;
|
|
}
|
|
isUnparsedContextual(t, r) {
|
|
let i = t + r.length;
|
|
if (this.input.slice(t, i) === r) {
|
|
let n = this.input.charCodeAt(i);
|
|
return !(Bl(n) || (n & 64512) === 55296);
|
|
}
|
|
return !1;
|
|
}
|
|
isLookaheadContextual(t) {
|
|
let r = this.nextTokenStart();
|
|
return this.isUnparsedContextual(r, t);
|
|
}
|
|
eatContextual(t) {
|
|
return this.isContextual(t) ? (this.next(), !0) : !1;
|
|
}
|
|
expectContextual(t, r) {
|
|
if (!this.eatContextual(t)) {
|
|
if (r != null)
|
|
throw this.raise(r, this.state.startLoc);
|
|
this.unexpected(null, t);
|
|
}
|
|
}
|
|
canInsertSemicolon() {
|
|
return this.match(140) || this.match(8) || this.hasPrecedingLineBreak();
|
|
}
|
|
hasPrecedingLineBreak() {
|
|
return t9(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start);
|
|
}
|
|
hasFollowingLineBreak() {
|
|
return t9(this.input, this.state.end, this.nextTokenStart());
|
|
}
|
|
isLineTerminator() {
|
|
return this.eat(13) || this.canInsertSemicolon();
|
|
}
|
|
semicolon(t = !0) {
|
|
(t ? this.isLineTerminator() : this.eat(13)) || this.raise(L.MissingSemicolon, this.state.lastTokEndLoc);
|
|
}
|
|
expect(t, r) {
|
|
this.eat(t) || this.unexpected(r, t);
|
|
}
|
|
tryParse(t, r = this.state.clone()) {
|
|
let i = {
|
|
node: null
|
|
};
|
|
try {
|
|
let n = t((a = null) => {
|
|
throw i.node = a, i;
|
|
});
|
|
if (this.state.errors.length > r.errors.length) {
|
|
let a = this.state;
|
|
return this.state = r, this.state.tokensLength = a.tokensLength, {
|
|
node: n,
|
|
error: a.errors[r.errors.length],
|
|
thrown: !1,
|
|
aborted: !1,
|
|
failState: a
|
|
};
|
|
}
|
|
return {
|
|
node: n,
|
|
error: null,
|
|
thrown: !1,
|
|
aborted: !1,
|
|
failState: null
|
|
};
|
|
} catch (n) {
|
|
let a = this.state;
|
|
if (this.state = r, n instanceof SyntaxError)
|
|
return {
|
|
node: null,
|
|
error: n,
|
|
thrown: !0,
|
|
aborted: !1,
|
|
failState: a
|
|
};
|
|
if (n === i)
|
|
return {
|
|
node: i.node,
|
|
error: null,
|
|
thrown: !1,
|
|
aborted: !0,
|
|
failState: a
|
|
};
|
|
throw n;
|
|
}
|
|
}
|
|
checkExpressionErrors(t, r) {
|
|
if (!t) return !1;
|
|
let {
|
|
shorthandAssignLoc: i,
|
|
doubleProtoLoc: n,
|
|
privateKeyLoc: a,
|
|
optionalParametersLoc: o
|
|
} = t, u = !!i || !!n || !!o || !!a;
|
|
if (!r)
|
|
return u;
|
|
i != null && this.raise(L.InvalidCoverInitializedName, i), n != null && this.raise(L.DuplicateProto, n), a != null && this.raise(L.UnexpectedPrivateField,
|
|
a), o != null && this.unexpected(o);
|
|
}
|
|
isLiteralPropertyName() {
|
|
return f9(this.state.type);
|
|
}
|
|
isPrivateName(t) {
|
|
return t.type === "PrivateName";
|
|
}
|
|
getPrivateNameSV(t) {
|
|
return t.id.name;
|
|
}
|
|
hasPropertyAsPrivateName(t) {
|
|
return (t.type === "MemberExpression" || t.type === "OptionalMemberExpression") && this.isPrivateName(t.property);
|
|
}
|
|
isObjectProperty(t) {
|
|
return t.type === "ObjectProperty";
|
|
}
|
|
isObjectMethod(t) {
|
|
return t.type === "ObjectMethod";
|
|
}
|
|
initializeScopes(t = this.options.sourceType === "module") {
|
|
let r = this.state.labels;
|
|
this.state.labels = [];
|
|
let i = this.exportedIdentifiers;
|
|
this.exportedIdentifiers = /* @__PURE__ */ new Set();
|
|
let n = this.inModule;
|
|
this.inModule = t;
|
|
let a = this.scope, o = this.getScopeHandler();
|
|
this.scope = new o(this, t);
|
|
let u = this.prodParam;
|
|
this.prodParam = new RT();
|
|
let l = this.classScope;
|
|
this.classScope = new NT(this);
|
|
let c = this.expressionScope;
|
|
return this.expressionScope = new MT(this), () => {
|
|
this.state.labels = r, this.exportedIdentifiers = i, this.inModule = n, this.scope = a, this.prodParam = u, this.classScope = l, this.
|
|
expressionScope = c;
|
|
};
|
|
}
|
|
enterInitialScopes() {
|
|
let t = 0;
|
|
this.inModule && (t |= 2), this.optionFlags & 32 && (t |= 1), this.scope.enter(1), this.prodParam.enter(t);
|
|
}
|
|
checkDestructuringPrivate(t) {
|
|
let {
|
|
privateKeyLoc: r
|
|
} = t;
|
|
r !== null && this.expectPlugin("destructuringPrivate", r);
|
|
}
|
|
}, Ml = class {
|
|
static {
|
|
s(this, "ExpressionErrors");
|
|
}
|
|
constructor() {
|
|
this.shorthandAssignLoc = null, this.doubleProtoLoc = null, this.privateKeyLoc = null, this.optionalParametersLoc = null;
|
|
}
|
|
}, Ll = class {
|
|
static {
|
|
s(this, "Node");
|
|
}
|
|
constructor(t, r, i) {
|
|
this.type = "", this.start = r, this.end = 0, this.loc = new Rl(i), t?.optionFlags & 128 && (this.range = [r, 0]), t != null && t.filename &&
|
|
(this.loc.filename = t.filename);
|
|
}
|
|
}, eC = Ll.prototype;
|
|
eC.__clone = function() {
|
|
let e = new Ll(void 0, this.start, this.loc.start), t = Object.keys(this);
|
|
for (let r = 0, i = t.length; r < i; r++) {
|
|
let n = t[r];
|
|
n !== "leadingComments" && n !== "trailingComments" && n !== "innerComments" && (e[n] = this[n]);
|
|
}
|
|
return e;
|
|
};
|
|
function H2e(e) {
|
|
return Ws(e);
|
|
}
|
|
s(H2e, "clonePlaceholder");
|
|
function Ws(e) {
|
|
let {
|
|
type: t,
|
|
start: r,
|
|
end: i,
|
|
loc: n,
|
|
range: a,
|
|
extra: o,
|
|
name: u
|
|
} = e, l = Object.create(eC);
|
|
return l.type = t, l.start = r, l.end = i, l.loc = n, l.range = a, l.extra = o, l.name = u, t === "Placeholder" && (l.expectedNode = e.expectedNode),
|
|
l;
|
|
}
|
|
s(Ws, "cloneIdentifier");
|
|
function K2e(e) {
|
|
let {
|
|
type: t,
|
|
start: r,
|
|
end: i,
|
|
loc: n,
|
|
range: a,
|
|
extra: o
|
|
} = e;
|
|
if (t === "Placeholder")
|
|
return H2e(e);
|
|
let u = Object.create(eC);
|
|
return u.type = t, u.start = r, u.end = i, u.loc = n, u.range = a, e.raw !== void 0 ? u.raw = e.raw : u.extra = o, u.value = e.value, u;
|
|
}
|
|
s(K2e, "cloneStringLiteral");
|
|
var LT = class extends jT {
|
|
static {
|
|
s(this, "NodeUtils");
|
|
}
|
|
startNode() {
|
|
let t = this.state.startLoc;
|
|
return new Ll(this, t.index, t);
|
|
}
|
|
startNodeAt(t) {
|
|
return new Ll(this, t.index, t);
|
|
}
|
|
startNodeAtNode(t) {
|
|
return this.startNodeAt(t.loc.start);
|
|
}
|
|
finishNode(t, r) {
|
|
return this.finishNodeAt(t, r, this.state.lastTokEndLoc);
|
|
}
|
|
finishNodeAt(t, r, i) {
|
|
return t.type = r, t.end = i.index, t.loc.end = i, this.optionFlags & 128 && (t.range[1] = i.index), this.optionFlags & 4096 && this.processComment(
|
|
t), t;
|
|
}
|
|
resetStartLocation(t, r) {
|
|
t.start = r.index, t.loc.start = r, this.optionFlags & 128 && (t.range[0] = r.index);
|
|
}
|
|
resetEndLocation(t, r = this.state.lastTokEndLoc) {
|
|
t.end = r.index, t.loc.end = r, this.optionFlags & 128 && (t.range[1] = r.index);
|
|
}
|
|
resetStartLocationFromNode(t, r) {
|
|
this.resetStartLocation(t, r.loc.start);
|
|
}
|
|
}, z2e = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "sta\
|
|
tic", "string", "true", "typeof", "void"]), Ue = Us`flow`({
|
|
AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
|
|
AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since \
|
|
they are either an ES module or they are a CommonJS module.",
|
|
AssignReservedType: /* @__PURE__ */ s(({
|
|
reservedType: e
|
|
}) => `Cannot overwrite reserved type ${e}.`, "AssignReservedType"),
|
|
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: /* @__PURE__ */ s(({
|
|
memberName: e,
|
|
enumName: t
|
|
}) => `Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`, "EnumBooleanMem\
|
|
berNotInitialized"),
|
|
EnumDuplicateMemberName: /* @__PURE__ */ s(({
|
|
memberName: e,
|
|
enumName: t
|
|
}) => `Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`, "EnumDuplicateMemberN\
|
|
ame"),
|
|
EnumInconsistentMemberValues: /* @__PURE__ */ s(({
|
|
enumName: e
|
|
}) => `Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, num\
|
|
bers, or strings) for all member initializers.`, "EnumInconsistentMemberValues"),
|
|
EnumInvalidExplicitType: /* @__PURE__ */ s(({
|
|
invalidEnumType: e,
|
|
enumName: t
|
|
}) => `Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`, "EnumInvalidEx\
|
|
plicitType"),
|
|
EnumInvalidExplicitTypeUnknownSupplied: /* @__PURE__ */ s(({
|
|
enumName: e
|
|
}) => `Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`, "EnumInvalidEx\
|
|
plicitTypeUnknownSupplied"),
|
|
EnumInvalidMemberInitializerPrimaryType: /* @__PURE__ */ s(({
|
|
enumName: e,
|
|
memberName: t,
|
|
explicitType: r
|
|
}) => `Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`, "EnumInvalidMemberInitializerPrimar\
|
|
yType"),
|
|
EnumInvalidMemberInitializerSymbolType: /* @__PURE__ */ s(({
|
|
enumName: e,
|
|
memberName: t
|
|
}) => `Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`, "EnumInvalidMemberInitializerSymbolType"),
|
|
EnumInvalidMemberInitializerUnknownType: /* @__PURE__ */ s(({
|
|
enumName: e,
|
|
memberName: t
|
|
}) => `The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`, "EnumInv\
|
|
alidMemberInitializerUnknownType"),
|
|
EnumInvalidMemberName: /* @__PURE__ */ s(({
|
|
enumName: e,
|
|
memberName: t,
|
|
suggestion: r
|
|
}) => `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${r}\`, in enum \`${e}\
|
|
\`.`, "EnumInvalidMemberName"),
|
|
EnumNumberMemberNotInitialized: /* @__PURE__ */ s(({
|
|
enumName: e,
|
|
memberName: t
|
|
}) => `Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`, "EnumNumberMemberNotInitialized"),
|
|
EnumStringMemberInconsistentlyInitialized: /* @__PURE__ */ s(({
|
|
enumName: e
|
|
}) => `String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`, "EnumStringMemb\
|
|
erInconsistentlyInitialized"),
|
|
GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.",
|
|
ImportReflectionHasImportType: "An `import module` declaration can not use `type` or `typeof` keyword.",
|
|
ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements.\
|
|
It cannot be used with `import type` or `import typeof` statements.",
|
|
InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.",
|
|
InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.",
|
|
InexactVariance: "Explicit inexact syntax cannot have variance.",
|
|
InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.",
|
|
MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",
|
|
NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.",
|
|
NestedFlowComment: "Cannot have a flow comment inside another flow comment.",
|
|
PatternIsOptional: Object.assign({
|
|
message: "A binding pattern parameter cannot be optional in an implementation signature."
|
|
}, {
|
|
reasonCode: "OptionalBindingPattern"
|
|
}),
|
|
SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.",
|
|
SpreadVariance: "Spread properties cannot have variance.",
|
|
ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.",
|
|
ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",
|
|
ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.",
|
|
ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.",
|
|
ThisParamNoDefault: "The `this` parameter may not have a default value.",
|
|
TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`\
|
|
.",
|
|
TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.",
|
|
UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.",
|
|
UnexpectedReservedType: /* @__PURE__ */ s(({
|
|
reservedType: e
|
|
}) => `Unexpected reserved type ${e}.`, "UnexpectedReservedType"),
|
|
UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.",
|
|
UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.",
|
|
UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.",
|
|
UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".',
|
|
UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.",
|
|
UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}\
|
|
`, use `async <T>() => {}`.",
|
|
UnsupportedDeclareExportKind: /* @__PURE__ */ s(({
|
|
unsupportedExportKind: e,
|
|
suggestion: t
|
|
}) => `\`declare export ${e}\` is not supported. Use \`${t}\` instead.`, "UnsupportedDeclareExportKind"),
|
|
UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.",
|
|
UnterminatedFlowComment: "Unterminated flow-comment."
|
|
});
|
|
function G2e(e) {
|
|
return e.type === "DeclareExportAllDeclaration" || e.type === "DeclareExportDeclaration" && (!e.declaration || e.declaration.type !== "T\
|
|
ypeAlias" && e.declaration.type !== "InterfaceDeclaration");
|
|
}
|
|
s(G2e, "isEsModuleType");
|
|
function n9(e) {
|
|
return e.importKind === "type" || e.importKind === "typeof";
|
|
}
|
|
s(n9, "hasTypeImportKind");
|
|
var J2e = {
|
|
const: "declare export var",
|
|
let: "declare export var",
|
|
type: "export type",
|
|
interface: "export interface"
|
|
};
|
|
function X2e(e, t) {
|
|
let r = [], i = [];
|
|
for (let n = 0; n < e.length; n++)
|
|
(t(e[n], n, e) ? r : i).push(e[n]);
|
|
return [r, i];
|
|
}
|
|
s(X2e, "partition");
|
|
var Y2e = /\*?\s*@((?:no)?flow)\b/, Z2e = /* @__PURE__ */ s((e) => class extends e {
|
|
static {
|
|
s(this, "FlowParserMixin");
|
|
}
|
|
constructor(...r) {
|
|
super(...r), this.flowPragma = void 0;
|
|
}
|
|
getScopeHandler() {
|
|
return _T;
|
|
}
|
|
shouldParseTypes() {
|
|
return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
|
|
}
|
|
finishToken(r, i) {
|
|
r !== 134 && r !== 13 && r !== 28 && this.flowPragma === void 0 && (this.flowPragma = null), super.finishToken(r, i);
|
|
}
|
|
addComment(r) {
|
|
if (this.flowPragma === void 0) {
|
|
let i = Y2e.exec(r.value);
|
|
if (i) if (i[1] === "flow")
|
|
this.flowPragma = "flow";
|
|
else if (i[1] === "noflow")
|
|
this.flowPragma = "noflow";
|
|
else
|
|
throw new Error("Unexpected flow pragma");
|
|
}
|
|
super.addComment(r);
|
|
}
|
|
flowParseTypeInitialiser(r) {
|
|
let i = this.state.inType;
|
|
this.state.inType = !0, this.expect(r || 14);
|
|
let n = this.flowParseType();
|
|
return this.state.inType = i, n;
|
|
}
|
|
flowParsePredicate() {
|
|
let r = this.startNode(), i = this.state.startLoc;
|
|
return this.next(), this.expectContextual(110), this.state.lastTokStartLoc.index > i.index + 1 && this.raise(Ue.UnexpectedSpaceBetweenModuloChecks,
|
|
i), this.eat(10) ? (r.value = super.parseExpression(), this.expect(11), this.finishNode(r, "DeclaredPredicate")) : this.finishNode(r, "\
|
|
InferredPredicate");
|
|
}
|
|
flowParseTypeAndPredicateInitialiser() {
|
|
let r = this.state.inType;
|
|
this.state.inType = !0, this.expect(14);
|
|
let i = null, n = null;
|
|
return this.match(54) ? (this.state.inType = r, n = this.flowParsePredicate()) : (i = this.flowParseType(), this.state.inType = r, this.
|
|
match(54) && (n = this.flowParsePredicate())), [i, n];
|
|
}
|
|
flowParseDeclareClass(r) {
|
|
return this.next(), this.flowParseInterfaceish(r, !0), this.finishNode(r, "DeclareClass");
|
|
}
|
|
flowParseDeclareFunction(r) {
|
|
this.next();
|
|
let i = r.id = this.parseIdentifier(), n = this.startNode(), a = this.startNode();
|
|
this.match(47) ? n.typeParameters = this.flowParseTypeParameterDeclaration() : n.typeParameters = null, this.expect(10);
|
|
let o = this.flowParseFunctionTypeParams();
|
|
return n.params = o.params, n.rest = o.rest, n.this = o._this, this.expect(11), [n.returnType, r.predicate] = this.flowParseTypeAndPredicateInitialiser(),
|
|
a.typeAnnotation = this.finishNode(n, "FunctionTypeAnnotation"), i.typeAnnotation = this.finishNode(a, "TypeAnnotation"), this.resetEndLocation(
|
|
i), this.semicolon(), this.scope.declareName(r.id.name, 2048, r.id.loc.start), this.finishNode(r, "DeclareFunction");
|
|
}
|
|
flowParseDeclare(r, i) {
|
|
if (this.match(80))
|
|
return this.flowParseDeclareClass(r);
|
|
if (this.match(68))
|
|
return this.flowParseDeclareFunction(r);
|
|
if (this.match(74))
|
|
return this.flowParseDeclareVariable(r);
|
|
if (this.eatContextual(127))
|
|
return this.match(16) ? this.flowParseDeclareModuleExports(r) : (i && this.raise(Ue.NestedDeclareModule, this.state.lastTokStartLoc),
|
|
this.flowParseDeclareModule(r));
|
|
if (this.isContextual(130))
|
|
return this.flowParseDeclareTypeAlias(r);
|
|
if (this.isContextual(131))
|
|
return this.flowParseDeclareOpaqueType(r);
|
|
if (this.isContextual(129))
|
|
return this.flowParseDeclareInterface(r);
|
|
if (this.match(82))
|
|
return this.flowParseDeclareExportDeclaration(r, i);
|
|
this.unexpected();
|
|
}
|
|
flowParseDeclareVariable(r) {
|
|
return this.next(), r.id = this.flowParseTypeAnnotatableIdentifier(!0), this.scope.declareName(r.id.name, 5, r.id.loc.start), this.semicolon(),
|
|
this.finishNode(r, "DeclareVariable");
|
|
}
|
|
flowParseDeclareModule(r) {
|
|
this.scope.enter(0), this.match(134) ? r.id = super.parseExprAtom() : r.id = this.parseIdentifier();
|
|
let i = r.body = this.startNode(), n = i.body = [];
|
|
for (this.expect(5); !this.match(8); ) {
|
|
let u = this.startNode();
|
|
this.match(83) ? (this.next(), !this.isContextual(130) && !this.match(87) && this.raise(Ue.InvalidNonTypeImportInDeclareModule, this.
|
|
state.lastTokStartLoc), super.parseImport(u)) : (this.expectContextual(125, Ue.UnsupportedStatementInDeclareModule), u = this.flowParseDeclare(
|
|
u, !0)), n.push(u);
|
|
}
|
|
this.scope.exit(), this.expect(8), this.finishNode(i, "BlockStatement");
|
|
let a = null, o = !1;
|
|
return n.forEach((u) => {
|
|
G2e(u) ? (a === "CommonJS" && this.raise(Ue.AmbiguousDeclareModuleKind, u), a = "ES") : u.type === "DeclareModuleExports" && (o && this.
|
|
raise(Ue.DuplicateDeclareModuleExports, u), a === "ES" && this.raise(Ue.AmbiguousDeclareModuleKind, u), a = "CommonJS", o = !0);
|
|
}), r.kind = a || "CommonJS", this.finishNode(r, "DeclareModule");
|
|
}
|
|
flowParseDeclareExportDeclaration(r, i) {
|
|
if (this.expect(82), this.eat(65))
|
|
return this.match(68) || this.match(80) ? r.declaration = this.flowParseDeclare(this.startNode()) : (r.declaration = this.flowParseType(),
|
|
this.semicolon()), r.default = !0, this.finishNode(r, "DeclareExportDeclaration");
|
|
if (this.match(75) || this.isLet() || (this.isContextual(130) || this.isContextual(129)) && !i) {
|
|
let n = this.state.value;
|
|
throw this.raise(Ue.UnsupportedDeclareExportKind, this.state.startLoc, {
|
|
unsupportedExportKind: n,
|
|
suggestion: J2e[n]
|
|
});
|
|
}
|
|
if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(131))
|
|
return r.declaration = this.flowParseDeclare(this.startNode()), r.default = !1, this.finishNode(r, "DeclareExportDeclaration");
|
|
if (this.match(55) || this.match(5) || this.isContextual(129) || this.isContextual(130) || this.isContextual(131))
|
|
return r = this.parseExport(r, null), r.type === "ExportNamedDeclaration" && (r.type = "ExportDeclaration", r.default = !1, delete r.
|
|
exportKind), r.type = "Declare" + r.type, r;
|
|
this.unexpected();
|
|
}
|
|
flowParseDeclareModuleExports(r) {
|
|
return this.next(), this.expectContextual(111), r.typeAnnotation = this.flowParseTypeAnnotation(), this.semicolon(), this.finishNode(r,
|
|
"DeclareModuleExports");
|
|
}
|
|
flowParseDeclareTypeAlias(r) {
|
|
this.next();
|
|
let i = this.flowParseTypeAlias(r);
|
|
return i.type = "DeclareTypeAlias", i;
|
|
}
|
|
flowParseDeclareOpaqueType(r) {
|
|
this.next();
|
|
let i = this.flowParseOpaqueType(r, !0);
|
|
return i.type = "DeclareOpaqueType", i;
|
|
}
|
|
flowParseDeclareInterface(r) {
|
|
return this.next(), this.flowParseInterfaceish(r, !1), this.finishNode(r, "DeclareInterface");
|
|
}
|
|
flowParseInterfaceish(r, i) {
|
|
if (r.id = this.flowParseRestrictedIdentifier(!i, !0), this.scope.declareName(r.id.name, i ? 17 : 8201, r.id.loc.start), this.match(47) ?
|
|
r.typeParameters = this.flowParseTypeParameterDeclaration() : r.typeParameters = null, r.extends = [], this.eat(81))
|
|
do
|
|
r.extends.push(this.flowParseInterfaceExtends());
|
|
while (!i && this.eat(12));
|
|
if (i) {
|
|
if (r.implements = [], r.mixins = [], this.eatContextual(117))
|
|
do
|
|
r.mixins.push(this.flowParseInterfaceExtends());
|
|
while (this.eat(12));
|
|
if (this.eatContextual(113))
|
|
do
|
|
r.implements.push(this.flowParseInterfaceExtends());
|
|
while (this.eat(12));
|
|
}
|
|
r.body = this.flowParseObjectType({
|
|
allowStatic: i,
|
|
allowExact: !1,
|
|
allowSpread: !1,
|
|
allowProto: i,
|
|
allowInexact: !1
|
|
});
|
|
}
|
|
flowParseInterfaceExtends() {
|
|
let r = this.startNode();
|
|
return r.id = this.flowParseQualifiedTypeIdentifier(), this.match(47) ? r.typeParameters = this.flowParseTypeParameterInstantiation() :
|
|
r.typeParameters = null, this.finishNode(r, "InterfaceExtends");
|
|
}
|
|
flowParseInterface(r) {
|
|
return this.flowParseInterfaceish(r, !1), this.finishNode(r, "InterfaceDeclaration");
|
|
}
|
|
checkNotUnderscore(r) {
|
|
r === "_" && this.raise(Ue.UnexpectedReservedUnderscore, this.state.startLoc);
|
|
}
|
|
checkReservedType(r, i, n) {
|
|
z2e.has(r) && this.raise(n ? Ue.AssignReservedType : Ue.UnexpectedReservedType, i, {
|
|
reservedType: r
|
|
});
|
|
}
|
|
flowParseRestrictedIdentifier(r, i) {
|
|
return this.checkReservedType(this.state.value, this.state.startLoc, i), this.parseIdentifier(r);
|
|
}
|
|
flowParseTypeAlias(r) {
|
|
return r.id = this.flowParseRestrictedIdentifier(!1, !0), this.scope.declareName(r.id.name, 8201, r.id.loc.start), this.match(47) ? r.
|
|
typeParameters = this.flowParseTypeParameterDeclaration() : r.typeParameters = null, r.right = this.flowParseTypeInitialiser(29), this.
|
|
semicolon(), this.finishNode(r, "TypeAlias");
|
|
}
|
|
flowParseOpaqueType(r, i) {
|
|
return this.expectContextual(130), r.id = this.flowParseRestrictedIdentifier(!0, !0), this.scope.declareName(r.id.name, 8201, r.id.loc.
|
|
start), this.match(47) ? r.typeParameters = this.flowParseTypeParameterDeclaration() : r.typeParameters = null, r.supertype = null, this.
|
|
match(14) && (r.supertype = this.flowParseTypeInitialiser(14)), r.impltype = null, i || (r.impltype = this.flowParseTypeInitialiser(29)),
|
|
this.semicolon(), this.finishNode(r, "OpaqueType");
|
|
}
|
|
flowParseTypeParameter(r = !1) {
|
|
let i = this.state.startLoc, n = this.startNode(), a = this.flowParseVariance(), o = this.flowParseTypeAnnotatableIdentifier();
|
|
return n.name = o.name, n.variance = a, n.bound = o.typeAnnotation, this.match(29) ? (this.eat(29), n.default = this.flowParseType()) :
|
|
r && this.raise(Ue.MissingTypeParamDefault, i), this.finishNode(n, "TypeParameter");
|
|
}
|
|
flowParseTypeParameterDeclaration() {
|
|
let r = this.state.inType, i = this.startNode();
|
|
i.params = [], this.state.inType = !0, this.match(47) || this.match(143) ? this.next() : this.unexpected();
|
|
let n = !1;
|
|
do {
|
|
let a = this.flowParseTypeParameter(n);
|
|
i.params.push(a), a.default && (n = !0), this.match(48) || this.expect(12);
|
|
} while (!this.match(48));
|
|
return this.expect(48), this.state.inType = r, this.finishNode(i, "TypeParameterDeclaration");
|
|
}
|
|
flowInTopLevelContext(r) {
|
|
if (this.curContext() !== Et.brace) {
|
|
let i = this.state.context;
|
|
this.state.context = [i[0]];
|
|
try {
|
|
return r();
|
|
} finally {
|
|
this.state.context = i;
|
|
}
|
|
} else
|
|
return r();
|
|
}
|
|
flowParseTypeParameterInstantiationInExpression() {
|
|
if (this.reScan_lt() === 47)
|
|
return this.flowParseTypeParameterInstantiation();
|
|
}
|
|
flowParseTypeParameterInstantiation() {
|
|
let r = this.startNode(), i = this.state.inType;
|
|
return this.state.inType = !0, r.params = [], this.flowInTopLevelContext(() => {
|
|
this.expect(47);
|
|
let n = this.state.noAnonFunctionType;
|
|
for (this.state.noAnonFunctionType = !1; !this.match(48); )
|
|
r.params.push(this.flowParseType()), this.match(48) || this.expect(12);
|
|
this.state.noAnonFunctionType = n;
|
|
}), this.state.inType = i, !this.state.inType && this.curContext() === Et.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(
|
|
r, "TypeParameterInstantiation");
|
|
}
|
|
flowParseTypeParameterInstantiationCallOrNew() {
|
|
if (this.reScan_lt() !== 47) return;
|
|
let r = this.startNode(), i = this.state.inType;
|
|
for (r.params = [], this.state.inType = !0, this.expect(47); !this.match(48); )
|
|
r.params.push(this.flowParseTypeOrImplicitInstantiation()), this.match(48) || this.expect(12);
|
|
return this.expect(48), this.state.inType = i, this.finishNode(r, "TypeParameterInstantiation");
|
|
}
|
|
flowParseInterfaceType() {
|
|
let r = this.startNode();
|
|
if (this.expectContextual(129), r.extends = [], this.eat(81))
|
|
do
|
|
r.extends.push(this.flowParseInterfaceExtends());
|
|
while (this.eat(12));
|
|
return r.body = this.flowParseObjectType({
|
|
allowStatic: !1,
|
|
allowExact: !1,
|
|
allowSpread: !1,
|
|
allowProto: !1,
|
|
allowInexact: !1
|
|
}), this.finishNode(r, "InterfaceTypeAnnotation");
|
|
}
|
|
flowParseObjectPropertyKey() {
|
|
return this.match(135) || this.match(134) ? super.parseExprAtom() : this.parseIdentifier(!0);
|
|
}
|
|
flowParseObjectTypeIndexer(r, i, n) {
|
|
return r.static = i, this.lookahead().type === 14 ? (r.id = this.flowParseObjectPropertyKey(), r.key = this.flowParseTypeInitialiser()) :
|
|
(r.id = null, r.key = this.flowParseType()), this.expect(3), r.value = this.flowParseTypeInitialiser(), r.variance = n, this.finishNode(
|
|
r, "ObjectTypeIndexer");
|
|
}
|
|
flowParseObjectTypeInternalSlot(r, i) {
|
|
return r.static = i, r.id = this.flowParseObjectPropertyKey(), this.expect(3), this.expect(3), this.match(47) || this.match(10) ? (r.method =
|
|
!0, r.optional = !1, r.value = this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start))) : (r.method = !1, this.eat(17) && (r.
|
|
optional = !0), r.value = this.flowParseTypeInitialiser()), this.finishNode(r, "ObjectTypeInternalSlot");
|
|
}
|
|
flowParseObjectTypeMethodish(r) {
|
|
for (r.params = [], r.rest = null, r.typeParameters = null, r.this = null, this.match(47) && (r.typeParameters = this.flowParseTypeParameterDeclaration()),
|
|
this.expect(10), this.match(78) && (r.this = this.flowParseFunctionTypeParam(!0), r.this.name = null, this.match(11) || this.expect(12)); !this.
|
|
match(11) && !this.match(21); )
|
|
r.params.push(this.flowParseFunctionTypeParam(!1)), this.match(11) || this.expect(12);
|
|
return this.eat(21) && (r.rest = this.flowParseFunctionTypeParam(!1)), this.expect(11), r.returnType = this.flowParseTypeInitialiser(),
|
|
this.finishNode(r, "FunctionTypeAnnotation");
|
|
}
|
|
flowParseObjectTypeCallProperty(r, i) {
|
|
let n = this.startNode();
|
|
return r.static = i, r.value = this.flowParseObjectTypeMethodish(n), this.finishNode(r, "ObjectTypeCallProperty");
|
|
}
|
|
flowParseObjectType({
|
|
allowStatic: r,
|
|
allowExact: i,
|
|
allowSpread: n,
|
|
allowProto: a,
|
|
allowInexact: o
|
|
}) {
|
|
let u = this.state.inType;
|
|
this.state.inType = !0;
|
|
let l = this.startNode();
|
|
l.callProperties = [], l.properties = [], l.indexers = [], l.internalSlots = [];
|
|
let c, f, m = !1;
|
|
for (i && this.match(6) ? (this.expect(6), c = 9, f = !0) : (this.expect(5), c = 8, f = !1), l.exact = f; !this.match(c); ) {
|
|
let d = !1, y = null, p = null, g = this.startNode();
|
|
if (a && this.isContextual(118)) {
|
|
let D = this.lookahead();
|
|
D.type !== 14 && D.type !== 17 && (this.next(), y = this.state.startLoc, r = !1);
|
|
}
|
|
if (r && this.isContextual(106)) {
|
|
let D = this.lookahead();
|
|
D.type !== 14 && D.type !== 17 && (this.next(), d = !0);
|
|
}
|
|
let b = this.flowParseVariance();
|
|
if (this.eat(0))
|
|
y != null && this.unexpected(y), this.eat(0) ? (b && this.unexpected(b.loc.start), l.internalSlots.push(this.flowParseObjectTypeInternalSlot(
|
|
g, d))) : l.indexers.push(this.flowParseObjectTypeIndexer(g, d, b));
|
|
else if (this.match(10) || this.match(47))
|
|
y != null && this.unexpected(y), b && this.unexpected(b.loc.start), l.callProperties.push(this.flowParseObjectTypeCallProperty(g, d));
|
|
else {
|
|
let D = "init";
|
|
if (this.isContextual(99) || this.isContextual(104)) {
|
|
let S = this.lookahead();
|
|
f9(S.type) && (D = this.state.value, this.next());
|
|
}
|
|
let v = this.flowParseObjectTypeProperty(g, d, y, b, D, n, o ?? !f);
|
|
v === null ? (m = !0, p = this.state.lastTokStartLoc) : l.properties.push(v);
|
|
}
|
|
this.flowObjectTypeSemicolon(), p && !this.match(8) && !this.match(9) && this.raise(Ue.UnexpectedExplicitInexactInObject, p);
|
|
}
|
|
this.expect(c), n && (l.inexact = m);
|
|
let h = this.finishNode(l, "ObjectTypeAnnotation");
|
|
return this.state.inType = u, h;
|
|
}
|
|
flowParseObjectTypeProperty(r, i, n, a, o, u, l) {
|
|
if (this.eat(21))
|
|
return this.match(12) || this.match(13) || this.match(8) || this.match(9) ? (u ? l || this.raise(Ue.InexactInsideExact, this.state.lastTokStartLoc) :
|
|
this.raise(Ue.InexactInsideNonObject, this.state.lastTokStartLoc), a && this.raise(Ue.InexactVariance, a), null) : (u || this.raise(
|
|
Ue.UnexpectedSpreadType, this.state.lastTokStartLoc), n != null && this.unexpected(n), a && this.raise(Ue.SpreadVariance, a), r.argument =
|
|
this.flowParseType(), this.finishNode(r, "ObjectTypeSpreadProperty"));
|
|
{
|
|
r.key = this.flowParseObjectPropertyKey(), r.static = i, r.proto = n != null, r.kind = o;
|
|
let c = !1;
|
|
return this.match(47) || this.match(10) ? (r.method = !0, n != null && this.unexpected(n), a && this.unexpected(a.loc.start), r.value =
|
|
this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start)), (o === "get" || o === "set") && this.flowCheckGetterSetterParams(r),
|
|
!u && r.key.name === "constructor" && r.value.this && this.raise(Ue.ThisParamBannedInConstructor, r.value.this)) : (o !== "init" && this.
|
|
unexpected(), r.method = !1, this.eat(17) && (c = !0), r.value = this.flowParseTypeInitialiser(), r.variance = a), r.optional = c, this.
|
|
finishNode(r, "ObjectTypeProperty");
|
|
}
|
|
}
|
|
flowCheckGetterSetterParams(r) {
|
|
let i = r.kind === "get" ? 0 : 1, n = r.value.params.length + (r.value.rest ? 1 : 0);
|
|
r.value.this && this.raise(r.kind === "get" ? Ue.GetterMayNotHaveThisParam : Ue.SetterMayNotHaveThisParam, r.value.this), n !== i && this.
|
|
raise(r.kind === "get" ? L.BadGetterArity : L.BadSetterArity, r), r.kind === "set" && r.value.rest && this.raise(L.BadSetterRestParameter,
|
|
r);
|
|
}
|
|
flowObjectTypeSemicolon() {
|
|
!this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9) && this.unexpected();
|
|
}
|
|
flowParseQualifiedTypeIdentifier(r, i) {
|
|
r ?? (r = this.state.startLoc);
|
|
let n = i || this.flowParseRestrictedIdentifier(!0);
|
|
for (; this.eat(16); ) {
|
|
let a = this.startNodeAt(r);
|
|
a.qualification = n, a.id = this.flowParseRestrictedIdentifier(!0), n = this.finishNode(a, "QualifiedTypeIdentifier");
|
|
}
|
|
return n;
|
|
}
|
|
flowParseGenericType(r, i) {
|
|
let n = this.startNodeAt(r);
|
|
return n.typeParameters = null, n.id = this.flowParseQualifiedTypeIdentifier(r, i), this.match(47) && (n.typeParameters = this.flowParseTypeParameterInstantiation()),
|
|
this.finishNode(n, "GenericTypeAnnotation");
|
|
}
|
|
flowParseTypeofType() {
|
|
let r = this.startNode();
|
|
return this.expect(87), r.argument = this.flowParsePrimaryType(), this.finishNode(r, "TypeofTypeAnnotation");
|
|
}
|
|
flowParseTupleType() {
|
|
let r = this.startNode();
|
|
for (r.types = [], this.expect(0); this.state.pos < this.length && !this.match(3) && (r.types.push(this.flowParseType()), !this.match(
|
|
3)); )
|
|
this.expect(12);
|
|
return this.expect(3), this.finishNode(r, "TupleTypeAnnotation");
|
|
}
|
|
flowParseFunctionTypeParam(r) {
|
|
let i = null, n = !1, a = null, o = this.startNode(), u = this.lookahead(), l = this.state.type === 78;
|
|
return u.type === 14 || u.type === 17 ? (l && !r && this.raise(Ue.ThisParamMustBeFirst, o), i = this.parseIdentifier(l), this.eat(17) &&
|
|
(n = !0, l && this.raise(Ue.ThisParamMayNotBeOptional, o)), a = this.flowParseTypeInitialiser()) : a = this.flowParseType(), o.name = i,
|
|
o.optional = n, o.typeAnnotation = a, this.finishNode(o, "FunctionTypeParam");
|
|
}
|
|
reinterpretTypeAsFunctionTypeParam(r) {
|
|
let i = this.startNodeAt(r.loc.start);
|
|
return i.name = null, i.optional = !1, i.typeAnnotation = r, this.finishNode(i, "FunctionTypeParam");
|
|
}
|
|
flowParseFunctionTypeParams(r = []) {
|
|
let i = null, n = null;
|
|
for (this.match(78) && (n = this.flowParseFunctionTypeParam(!0), n.name = null, this.match(11) || this.expect(12)); !this.match(11) &&
|
|
!this.match(21); )
|
|
r.push(this.flowParseFunctionTypeParam(!1)), this.match(11) || this.expect(12);
|
|
return this.eat(21) && (i = this.flowParseFunctionTypeParam(!1)), {
|
|
params: r,
|
|
rest: i,
|
|
_this: n
|
|
};
|
|
}
|
|
flowIdentToTypeAnnotation(r, i, n) {
|
|
switch (n.name) {
|
|
case "any":
|
|
return this.finishNode(i, "AnyTypeAnnotation");
|
|
case "bool":
|
|
case "boolean":
|
|
return this.finishNode(i, "BooleanTypeAnnotation");
|
|
case "mixed":
|
|
return this.finishNode(i, "MixedTypeAnnotation");
|
|
case "empty":
|
|
return this.finishNode(i, "EmptyTypeAnnotation");
|
|
case "number":
|
|
return this.finishNode(i, "NumberTypeAnnotation");
|
|
case "string":
|
|
return this.finishNode(i, "StringTypeAnnotation");
|
|
case "symbol":
|
|
return this.finishNode(i, "SymbolTypeAnnotation");
|
|
default:
|
|
return this.checkNotUnderscore(n.name), this.flowParseGenericType(r, n);
|
|
}
|
|
}
|
|
flowParsePrimaryType() {
|
|
let r = this.state.startLoc, i = this.startNode(), n, a, o = !1, u = this.state.noAnonFunctionType;
|
|
switch (this.state.type) {
|
|
case 5:
|
|
return this.flowParseObjectType({
|
|
allowStatic: !1,
|
|
allowExact: !1,
|
|
allowSpread: !0,
|
|
allowProto: !1,
|
|
allowInexact: !0
|
|
});
|
|
case 6:
|
|
return this.flowParseObjectType({
|
|
allowStatic: !1,
|
|
allowExact: !0,
|
|
allowSpread: !0,
|
|
allowProto: !1,
|
|
allowInexact: !1
|
|
});
|
|
case 0:
|
|
return this.state.noAnonFunctionType = !1, a = this.flowParseTupleType(), this.state.noAnonFunctionType = u, a;
|
|
case 47: {
|
|
let l = this.startNode();
|
|
return l.typeParameters = this.flowParseTypeParameterDeclaration(), this.expect(10), n = this.flowParseFunctionTypeParams(), l.params =
|
|
n.params, l.rest = n.rest, l.this = n._this, this.expect(11), this.expect(19), l.returnType = this.flowParseType(), this.finishNode(
|
|
l, "FunctionTypeAnnotation");
|
|
}
|
|
case 10: {
|
|
let l = this.startNode();
|
|
if (this.next(), !this.match(11) && !this.match(21))
|
|
if (xt(this.state.type) || this.match(78)) {
|
|
let c = this.lookahead().type;
|
|
o = c !== 17 && c !== 14;
|
|
} else
|
|
o = !0;
|
|
if (o) {
|
|
if (this.state.noAnonFunctionType = !1, a = this.flowParseType(), this.state.noAnonFunctionType = u, this.state.noAnonFunctionType ||
|
|
!(this.match(12) || this.match(11) && this.lookahead().type === 19))
|
|
return this.expect(11), a;
|
|
this.eat(12);
|
|
}
|
|
return a ? n = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(a)]) : n = this.flowParseFunctionTypeParams(),
|
|
l.params = n.params, l.rest = n.rest, l.this = n._this, this.expect(11), this.expect(19), l.returnType = this.flowParseType(), l.typeParameters =
|
|
null, this.finishNode(l, "FunctionTypeAnnotation");
|
|
}
|
|
case 134:
|
|
return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
|
|
case 85:
|
|
case 86:
|
|
return i.value = this.match(85), this.next(), this.finishNode(i, "BooleanLiteralTypeAnnotation");
|
|
case 53:
|
|
if (this.state.value === "-") {
|
|
if (this.next(), this.match(135))
|
|
return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", i);
|
|
if (this.match(136))
|
|
return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", i);
|
|
throw this.raise(Ue.UnexpectedSubtractionOperand, this.state.startLoc);
|
|
}
|
|
this.unexpected();
|
|
return;
|
|
case 135:
|
|
return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
|
|
case 136:
|
|
return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
|
|
case 88:
|
|
return this.next(), this.finishNode(i, "VoidTypeAnnotation");
|
|
case 84:
|
|
return this.next(), this.finishNode(i, "NullLiteralTypeAnnotation");
|
|
case 78:
|
|
return this.next(), this.finishNode(i, "ThisTypeAnnotation");
|
|
case 55:
|
|
return this.next(), this.finishNode(i, "ExistsTypeAnnotation");
|
|
case 87:
|
|
return this.flowParseTypeofType();
|
|
default:
|
|
if (YT(this.state.type)) {
|
|
let l = La(this.state.type);
|
|
return this.next(), super.createIdentifier(i, l);
|
|
} else if (xt(this.state.type))
|
|
return this.isContextual(129) ? this.flowParseInterfaceType() : this.flowIdentToTypeAnnotation(r, i, this.parseIdentifier());
|
|
}
|
|
this.unexpected();
|
|
}
|
|
flowParsePostfixType() {
|
|
let r = this.state.startLoc, i = this.flowParsePrimaryType(), n = !1;
|
|
for (; (this.match(0) || this.match(18)) && !this.canInsertSemicolon(); ) {
|
|
let a = this.startNodeAt(r), o = this.eat(18);
|
|
n = n || o, this.expect(0), !o && this.match(3) ? (a.elementType = i, this.next(), i = this.finishNode(a, "ArrayTypeAnnotation")) : (a.
|
|
objectType = i, a.indexType = this.flowParseType(), this.expect(3), n ? (a.optional = o, i = this.finishNode(a, "OptionalIndexedAcce\
|
|
ssType")) : i = this.finishNode(a, "IndexedAccessType"));
|
|
}
|
|
return i;
|
|
}
|
|
flowParsePrefixType() {
|
|
let r = this.startNode();
|
|
return this.eat(17) ? (r.typeAnnotation = this.flowParsePrefixType(), this.finishNode(r, "NullableTypeAnnotation")) : this.flowParsePostfixType();
|
|
}
|
|
flowParseAnonFunctionWithoutParens() {
|
|
let r = this.flowParsePrefixType();
|
|
if (!this.state.noAnonFunctionType && this.eat(19)) {
|
|
let i = this.startNodeAt(r.loc.start);
|
|
return i.params = [this.reinterpretTypeAsFunctionTypeParam(r)], i.rest = null, i.this = null, i.returnType = this.flowParseType(), i.
|
|
typeParameters = null, this.finishNode(i, "FunctionTypeAnnotation");
|
|
}
|
|
return r;
|
|
}
|
|
flowParseIntersectionType() {
|
|
let r = this.startNode();
|
|
this.eat(45);
|
|
let i = this.flowParseAnonFunctionWithoutParens();
|
|
for (r.types = [i]; this.eat(45); )
|
|
r.types.push(this.flowParseAnonFunctionWithoutParens());
|
|
return r.types.length === 1 ? i : this.finishNode(r, "IntersectionTypeAnnotation");
|
|
}
|
|
flowParseUnionType() {
|
|
let r = this.startNode();
|
|
this.eat(43);
|
|
let i = this.flowParseIntersectionType();
|
|
for (r.types = [i]; this.eat(43); )
|
|
r.types.push(this.flowParseIntersectionType());
|
|
return r.types.length === 1 ? i : this.finishNode(r, "UnionTypeAnnotation");
|
|
}
|
|
flowParseType() {
|
|
let r = this.state.inType;
|
|
this.state.inType = !0;
|
|
let i = this.flowParseUnionType();
|
|
return this.state.inType = r, i;
|
|
}
|
|
flowParseTypeOrImplicitInstantiation() {
|
|
if (this.state.type === 132 && this.state.value === "_") {
|
|
let r = this.state.startLoc, i = this.parseIdentifier();
|
|
return this.flowParseGenericType(r, i);
|
|
} else
|
|
return this.flowParseType();
|
|
}
|
|
flowParseTypeAnnotation() {
|
|
let r = this.startNode();
|
|
return r.typeAnnotation = this.flowParseTypeInitialiser(), this.finishNode(r, "TypeAnnotation");
|
|
}
|
|
flowParseTypeAnnotatableIdentifier(r) {
|
|
let i = r ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
|
|
return this.match(14) && (i.typeAnnotation = this.flowParseTypeAnnotation(), this.resetEndLocation(i)), i;
|
|
}
|
|
typeCastToParameter(r) {
|
|
return r.expression.typeAnnotation = r.typeAnnotation, this.resetEndLocation(r.expression, r.typeAnnotation.loc.end), r.expression;
|
|
}
|
|
flowParseVariance() {
|
|
let r = null;
|
|
return this.match(53) ? (r = this.startNode(), this.state.value === "+" ? r.kind = "plus" : r.kind = "minus", this.next(), this.finishNode(
|
|
r, "Variance")) : r;
|
|
}
|
|
parseFunctionBody(r, i, n = !1) {
|
|
if (i) {
|
|
this.forwardNoArrowParamsConversionAt(r, () => super.parseFunctionBody(r, !0, n));
|
|
return;
|
|
}
|
|
super.parseFunctionBody(r, !1, n);
|
|
}
|
|
parseFunctionBodyAndFinish(r, i, n = !1) {
|
|
if (this.match(14)) {
|
|
let a = this.startNode();
|
|
[a.typeAnnotation, r.predicate] = this.flowParseTypeAndPredicateInitialiser(), r.returnType = a.typeAnnotation ? this.finishNode(a, "\
|
|
TypeAnnotation") : null;
|
|
}
|
|
return super.parseFunctionBodyAndFinish(r, i, n);
|
|
}
|
|
parseStatementLike(r) {
|
|
if (this.state.strict && this.isContextual(129)) {
|
|
let n = this.lookahead();
|
|
if (Sn(n.type)) {
|
|
let a = this.startNode();
|
|
return this.next(), this.flowParseInterface(a);
|
|
}
|
|
} else if (this.isContextual(126)) {
|
|
let n = this.startNode();
|
|
return this.next(), this.flowParseEnumDeclaration(n);
|
|
}
|
|
let i = super.parseStatementLike(r);
|
|
return this.flowPragma === void 0 && !this.isValidDirective(i) && (this.flowPragma = null), i;
|
|
}
|
|
parseExpressionStatement(r, i, n) {
|
|
if (i.type === "Identifier") {
|
|
if (i.name === "declare") {
|
|
if (this.match(80) || xt(this.state.type) || this.match(68) || this.match(74) || this.match(82))
|
|
return this.flowParseDeclare(r);
|
|
} else if (xt(this.state.type)) {
|
|
if (i.name === "interface")
|
|
return this.flowParseInterface(r);
|
|
if (i.name === "type")
|
|
return this.flowParseTypeAlias(r);
|
|
if (i.name === "opaque")
|
|
return this.flowParseOpaqueType(r, !1);
|
|
}
|
|
}
|
|
return super.parseExpressionStatement(r, i, n);
|
|
}
|
|
shouldParseExportDeclaration() {
|
|
let {
|
|
type: r
|
|
} = this.state;
|
|
return r === 126 || e9(r) ? !this.state.containsEsc : super.shouldParseExportDeclaration();
|
|
}
|
|
isExportDefaultSpecifier() {
|
|
let {
|
|
type: r
|
|
} = this.state;
|
|
return r === 126 || e9(r) ? this.state.containsEsc : super.isExportDefaultSpecifier();
|
|
}
|
|
parseExportDefaultExpression() {
|
|
if (this.isContextual(126)) {
|
|
let r = this.startNode();
|
|
return this.next(), this.flowParseEnumDeclaration(r);
|
|
}
|
|
return super.parseExportDefaultExpression();
|
|
}
|
|
parseConditional(r, i, n) {
|
|
if (!this.match(17)) return r;
|
|
if (this.state.maybeInArrowParameters) {
|
|
let h = this.lookaheadCharCode();
|
|
if (h === 44 || h === 61 || h === 58 || h === 41)
|
|
return this.setOptionalParametersError(n), r;
|
|
}
|
|
this.expect(17);
|
|
let a = this.state.clone(), o = this.state.noArrowAt, u = this.startNodeAt(i), {
|
|
consequent: l,
|
|
failed: c
|
|
} = this.tryParseConditionalConsequent(), [f, m] = this.getArrowLikeExpressions(l);
|
|
if (c || m.length > 0) {
|
|
let h = [...o];
|
|
if (m.length > 0) {
|
|
this.state = a, this.state.noArrowAt = h;
|
|
for (let d = 0; d < m.length; d++)
|
|
h.push(m[d].start);
|
|
({
|
|
consequent: l,
|
|
failed: c
|
|
} = this.tryParseConditionalConsequent()), [f, m] = this.getArrowLikeExpressions(l);
|
|
}
|
|
c && f.length > 1 && this.raise(Ue.AmbiguousConditionalArrow, a.startLoc), c && f.length === 1 && (this.state = a, h.push(f[0].start),
|
|
this.state.noArrowAt = h, {
|
|
consequent: l,
|
|
failed: c
|
|
} = this.tryParseConditionalConsequent());
|
|
}
|
|
return this.getArrowLikeExpressions(l, !0), this.state.noArrowAt = o, this.expect(14), u.test = r, u.consequent = l, u.alternate = this.
|
|
forwardNoArrowParamsConversionAt(u, () => this.parseMaybeAssign(void 0, void 0)), this.finishNode(u, "ConditionalExpression");
|
|
}
|
|
tryParseConditionalConsequent() {
|
|
this.state.noArrowParamsConversionAt.push(this.state.start);
|
|
let r = this.parseMaybeAssignAllowIn(), i = !this.match(14);
|
|
return this.state.noArrowParamsConversionAt.pop(), {
|
|
consequent: r,
|
|
failed: i
|
|
};
|
|
}
|
|
getArrowLikeExpressions(r, i) {
|
|
let n = [r], a = [];
|
|
for (; n.length !== 0; ) {
|
|
let o = n.pop();
|
|
o.type === "ArrowFunctionExpression" && o.body.type !== "BlockStatement" ? (o.typeParameters || !o.returnType ? this.finishArrowValidation(
|
|
o) : a.push(o), n.push(o.body)) : o.type === "ConditionalExpression" && (n.push(o.consequent), n.push(o.alternate));
|
|
}
|
|
return i ? (a.forEach((o) => this.finishArrowValidation(o)), [a, []]) : X2e(a, (o) => o.params.every((u) => this.isAssignable(u, !0)));
|
|
}
|
|
finishArrowValidation(r) {
|
|
var i;
|
|
this.toAssignableList(r.params, (i = r.extra) == null ? void 0 : i.trailingCommaLoc, !1), this.scope.enter(6), super.checkParams(r, !1,
|
|
!0), this.scope.exit();
|
|
}
|
|
forwardNoArrowParamsConversionAt(r, i) {
|
|
let n;
|
|
return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start)) ? (this.state.noArrowParamsConversionAt.push(this.
|
|
state.start), n = i(), this.state.noArrowParamsConversionAt.pop()) : n = i(), n;
|
|
}
|
|
parseParenItem(r, i) {
|
|
let n = super.parseParenItem(r, i);
|
|
if (this.eat(17) && (n.optional = !0, this.resetEndLocation(r)), this.match(14)) {
|
|
let a = this.startNodeAt(i);
|
|
return a.expression = n, a.typeAnnotation = this.flowParseTypeAnnotation(), this.finishNode(a, "TypeCastExpression");
|
|
}
|
|
return n;
|
|
}
|
|
assertModuleNodeAllowed(r) {
|
|
r.type === "ImportDeclaration" && (r.importKind === "type" || r.importKind === "typeof") || r.type === "ExportNamedDeclaration" && r.exportKind ===
|
|
"type" || r.type === "ExportAllDeclaration" && r.exportKind === "type" || super.assertModuleNodeAllowed(r);
|
|
}
|
|
parseExportDeclaration(r) {
|
|
if (this.isContextual(130)) {
|
|
r.exportKind = "type";
|
|
let i = this.startNode();
|
|
return this.next(), this.match(5) ? (r.specifiers = this.parseExportSpecifiers(!0), super.parseExportFrom(r), null) : this.flowParseTypeAlias(
|
|
i);
|
|
} else if (this.isContextual(131)) {
|
|
r.exportKind = "type";
|
|
let i = this.startNode();
|
|
return this.next(), this.flowParseOpaqueType(i, !1);
|
|
} else if (this.isContextual(129)) {
|
|
r.exportKind = "type";
|
|
let i = this.startNode();
|
|
return this.next(), this.flowParseInterface(i);
|
|
} else if (this.isContextual(126)) {
|
|
r.exportKind = "value";
|
|
let i = this.startNode();
|
|
return this.next(), this.flowParseEnumDeclaration(i);
|
|
} else
|
|
return super.parseExportDeclaration(r);
|
|
}
|
|
eatExportStar(r) {
|
|
return super.eatExportStar(r) ? !0 : this.isContextual(130) && this.lookahead().type === 55 ? (r.exportKind = "type", this.next(), this.
|
|
next(), !0) : !1;
|
|
}
|
|
maybeParseExportNamespaceSpecifier(r) {
|
|
let {
|
|
startLoc: i
|
|
} = this.state, n = super.maybeParseExportNamespaceSpecifier(r);
|
|
return n && r.exportKind === "type" && this.unexpected(i), n;
|
|
}
|
|
parseClassId(r, i, n) {
|
|
super.parseClassId(r, i, n), this.match(47) && (r.typeParameters = this.flowParseTypeParameterDeclaration());
|
|
}
|
|
parseClassMember(r, i, n) {
|
|
let {
|
|
startLoc: a
|
|
} = this.state;
|
|
if (this.isContextual(125)) {
|
|
if (super.parseClassMemberFromModifier(r, i))
|
|
return;
|
|
i.declare = !0;
|
|
}
|
|
super.parseClassMember(r, i, n), i.declare && (i.type !== "ClassProperty" && i.type !== "ClassPrivateProperty" && i.type !== "Property\
|
|
Definition" ? this.raise(Ue.DeclareClassElement, a) : i.value && this.raise(Ue.DeclareClassFieldInitializer, i.value));
|
|
}
|
|
isIterator(r) {
|
|
return r === "iterator" || r === "asyncIterator";
|
|
}
|
|
readIterator() {
|
|
let r = super.readWord1(), i = "@@" + r;
|
|
(!this.isIterator(r) || !this.state.inType) && this.raise(L.InvalidIdentifier, this.state.curPosition(), {
|
|
identifierName: i
|
|
}), this.finishToken(132, i);
|
|
}
|
|
getTokenFromCode(r) {
|
|
let i = this.input.charCodeAt(this.state.pos + 1);
|
|
r === 123 && i === 124 ? this.finishOp(6, 2) : this.state.inType && (r === 62 || r === 60) ? this.finishOp(r === 62 ? 48 : 47, 1) : this.
|
|
state.inType && r === 63 ? i === 46 ? this.finishOp(18, 2) : this.finishOp(17, 1) : O2e(r, i, this.input.charCodeAt(this.state.pos + 2)) ?
|
|
(this.state.pos += 2, this.readIterator()) : super.getTokenFromCode(r);
|
|
}
|
|
isAssignable(r, i) {
|
|
return r.type === "TypeCastExpression" ? this.isAssignable(r.expression, i) : super.isAssignable(r, i);
|
|
}
|
|
toAssignable(r, i = !1) {
|
|
!i && r.type === "AssignmentExpression" && r.left.type === "TypeCastExpression" && (r.left = this.typeCastToParameter(r.left)), super.
|
|
toAssignable(r, i);
|
|
}
|
|
toAssignableList(r, i, n) {
|
|
for (let a = 0; a < r.length; a++) {
|
|
let o = r[a];
|
|
o?.type === "TypeCastExpression" && (r[a] = this.typeCastToParameter(o));
|
|
}
|
|
super.toAssignableList(r, i, n);
|
|
}
|
|
toReferencedList(r, i) {
|
|
for (let a = 0; a < r.length; a++) {
|
|
var n;
|
|
let o = r[a];
|
|
o && o.type === "TypeCastExpression" && !((n = o.extra) != null && n.parenthesized) && (r.length > 1 || !i) && this.raise(Ue.TypeCastInPattern,
|
|
o.typeAnnotation);
|
|
}
|
|
return r;
|
|
}
|
|
parseArrayLike(r, i, n, a) {
|
|
let o = super.parseArrayLike(r, i, n, a);
|
|
return i && !this.state.maybeInArrowParameters && this.toReferencedList(o.elements), o;
|
|
}
|
|
isValidLVal(r, i, n) {
|
|
return r === "TypeCastExpression" || super.isValidLVal(r, i, n);
|
|
}
|
|
parseClassProperty(r) {
|
|
return this.match(14) && (r.typeAnnotation = this.flowParseTypeAnnotation()), super.parseClassProperty(r);
|
|
}
|
|
parseClassPrivateProperty(r) {
|
|
return this.match(14) && (r.typeAnnotation = this.flowParseTypeAnnotation()), super.parseClassPrivateProperty(r);
|
|
}
|
|
isClassMethod() {
|
|
return this.match(47) || super.isClassMethod();
|
|
}
|
|
isClassProperty() {
|
|
return this.match(14) || super.isClassProperty();
|
|
}
|
|
isNonstaticConstructor(r) {
|
|
return !this.match(14) && super.isNonstaticConstructor(r);
|
|
}
|
|
pushClassMethod(r, i, n, a, o, u) {
|
|
if (i.variance && this.unexpected(i.variance.loc.start), delete i.variance, this.match(47) && (i.typeParameters = this.flowParseTypeParameterDeclaration()),
|
|
super.pushClassMethod(r, i, n, a, o, u), i.params && o) {
|
|
let l = i.params;
|
|
l.length > 0 && this.isThisParam(l[0]) && this.raise(Ue.ThisParamBannedInConstructor, i);
|
|
} else if (i.type === "MethodDefinition" && o && i.value.params) {
|
|
let l = i.value.params;
|
|
l.length > 0 && this.isThisParam(l[0]) && this.raise(Ue.ThisParamBannedInConstructor, i);
|
|
}
|
|
}
|
|
pushClassPrivateMethod(r, i, n, a) {
|
|
i.variance && this.unexpected(i.variance.loc.start), delete i.variance, this.match(47) && (i.typeParameters = this.flowParseTypeParameterDeclaration()),
|
|
super.pushClassPrivateMethod(r, i, n, a);
|
|
}
|
|
parseClassSuper(r) {
|
|
if (super.parseClassSuper(r), r.superClass && (this.match(47) || this.match(51)) && (r.superTypeParameters = this.flowParseTypeParameterInstantiationInExpression()),
|
|
this.isContextual(113)) {
|
|
this.next();
|
|
let i = r.implements = [];
|
|
do {
|
|
let n = this.startNode();
|
|
n.id = this.flowParseRestrictedIdentifier(!0), this.match(47) ? n.typeParameters = this.flowParseTypeParameterInstantiation() : n.
|
|
typeParameters = null, i.push(this.finishNode(n, "ClassImplements"));
|
|
} while (this.eat(12));
|
|
}
|
|
}
|
|
checkGetterSetterParams(r) {
|
|
super.checkGetterSetterParams(r);
|
|
let i = this.getObjectOrClassMethodParams(r);
|
|
if (i.length > 0) {
|
|
let n = i[0];
|
|
this.isThisParam(n) && r.kind === "get" ? this.raise(Ue.GetterMayNotHaveThisParam, n) : this.isThisParam(n) && this.raise(Ue.SetterMayNotHaveThisParam,
|
|
n);
|
|
}
|
|
}
|
|
parsePropertyNamePrefixOperator(r) {
|
|
r.variance = this.flowParseVariance();
|
|
}
|
|
parseObjPropValue(r, i, n, a, o, u, l) {
|
|
r.variance && this.unexpected(r.variance.loc.start), delete r.variance;
|
|
let c;
|
|
this.match(47) && !u && (c = this.flowParseTypeParameterDeclaration(), this.match(10) || this.unexpected());
|
|
let f = super.parseObjPropValue(r, i, n, a, o, u, l);
|
|
return c && ((f.value || f).typeParameters = c), f;
|
|
}
|
|
parseFunctionParamType(r) {
|
|
return this.eat(17) && (r.type !== "Identifier" && this.raise(Ue.PatternIsOptional, r), this.isThisParam(r) && this.raise(Ue.ThisParamMayNotBeOptional,
|
|
r), r.optional = !0), this.match(14) ? r.typeAnnotation = this.flowParseTypeAnnotation() : this.isThisParam(r) && this.raise(Ue.ThisParamAnnotationRequired,
|
|
r), this.match(29) && this.isThisParam(r) && this.raise(Ue.ThisParamNoDefault, r), this.resetEndLocation(r), r;
|
|
}
|
|
parseMaybeDefault(r, i) {
|
|
let n = super.parseMaybeDefault(r, i);
|
|
return n.type === "AssignmentPattern" && n.typeAnnotation && n.right.start < n.typeAnnotation.start && this.raise(Ue.TypeBeforeInitializer,
|
|
n.typeAnnotation), n;
|
|
}
|
|
checkImportReflection(r) {
|
|
super.checkImportReflection(r), r.module && r.importKind !== "value" && this.raise(Ue.ImportReflectionHasImportType, r.specifiers[0].loc.
|
|
start);
|
|
}
|
|
parseImportSpecifierLocal(r, i, n) {
|
|
i.local = n9(r) ? this.flowParseRestrictedIdentifier(!0, !0) : this.parseIdentifier(), r.specifiers.push(this.finishImportSpecifier(i,
|
|
n));
|
|
}
|
|
isPotentialImportPhase(r) {
|
|
if (super.isPotentialImportPhase(r)) return !0;
|
|
if (this.isContextual(130)) {
|
|
if (!r) return !0;
|
|
let i = this.lookaheadCharCode();
|
|
return i === 123 || i === 42;
|
|
}
|
|
return !r && this.isContextual(87);
|
|
}
|
|
applyImportPhase(r, i, n, a) {
|
|
if (super.applyImportPhase(r, i, n, a), i) {
|
|
if (!n && this.match(65))
|
|
return;
|
|
r.exportKind = n === "type" ? n : "value";
|
|
} else
|
|
n === "type" && this.match(55) && this.unexpected(), r.importKind = n === "type" || n === "typeof" ? n : "value";
|
|
}
|
|
parseImportSpecifier(r, i, n, a, o) {
|
|
let u = r.imported, l = null;
|
|
u.type === "Identifier" && (u.name === "type" ? l = "type" : u.name === "typeof" && (l = "typeof"));
|
|
let c = !1;
|
|
if (this.isContextual(93) && !this.isLookaheadContextual("as")) {
|
|
let m = this.parseIdentifier(!0);
|
|
l !== null && !Sn(this.state.type) ? (r.imported = m, r.importKind = l, r.local = Ws(m)) : (r.imported = u, r.importKind = null, r.local =
|
|
this.parseIdentifier());
|
|
} else {
|
|
if (l !== null && Sn(this.state.type))
|
|
r.imported = this.parseIdentifier(!0), r.importKind = l;
|
|
else {
|
|
if (i)
|
|
throw this.raise(L.ImportBindingIsString, r, {
|
|
importName: u.value
|
|
});
|
|
r.imported = u, r.importKind = null;
|
|
}
|
|
this.eatContextual(93) ? r.local = this.parseIdentifier() : (c = !0, r.local = Ws(r.imported));
|
|
}
|
|
let f = n9(r);
|
|
return n && f && this.raise(Ue.ImportTypeShorthandOnlyInPureImport, r), (n || f) && this.checkReservedType(r.local.name, r.local.loc.start,
|
|
!0), c && !n && !f && this.checkReservedWord(r.local.name, r.loc.start, !0, !0), this.finishImportSpecifier(r, "ImportSpecifier");
|
|
}
|
|
parseBindingAtom() {
|
|
switch (this.state.type) {
|
|
case 78:
|
|
return this.parseIdentifier(!0);
|
|
default:
|
|
return super.parseBindingAtom();
|
|
}
|
|
}
|
|
parseFunctionParams(r, i) {
|
|
let n = r.kind;
|
|
n !== "get" && n !== "set" && this.match(47) && (r.typeParameters = this.flowParseTypeParameterDeclaration()), super.parseFunctionParams(
|
|
r, i);
|
|
}
|
|
parseVarId(r, i) {
|
|
super.parseVarId(r, i), this.match(14) && (r.id.typeAnnotation = this.flowParseTypeAnnotation(), this.resetEndLocation(r.id));
|
|
}
|
|
parseAsyncArrowFromCallExpression(r, i) {
|
|
if (this.match(14)) {
|
|
let n = this.state.noAnonFunctionType;
|
|
this.state.noAnonFunctionType = !0, r.returnType = this.flowParseTypeAnnotation(), this.state.noAnonFunctionType = n;
|
|
}
|
|
return super.parseAsyncArrowFromCallExpression(r, i);
|
|
}
|
|
shouldParseAsyncArrow() {
|
|
return this.match(14) || super.shouldParseAsyncArrow();
|
|
}
|
|
parseMaybeAssign(r, i) {
|
|
var n;
|
|
let a = null, o;
|
|
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
if (a = this.state.clone(), o = this.tryParse(() => super.parseMaybeAssign(r, i), a), !o.error) return o.node;
|
|
let {
|
|
context: c
|
|
} = this.state, f = c[c.length - 1];
|
|
(f === Et.j_oTag || f === Et.j_expr) && c.pop();
|
|
}
|
|
if ((n = o) != null && n.error || this.match(47)) {
|
|
var u, l;
|
|
a = a || this.state.clone();
|
|
let c, f = this.tryParse((h) => {
|
|
var d;
|
|
c = this.flowParseTypeParameterDeclaration();
|
|
let y = this.forwardNoArrowParamsConversionAt(c, () => {
|
|
let g = super.parseMaybeAssign(r, i);
|
|
return this.resetStartLocationFromNode(g, c), g;
|
|
});
|
|
(d = y.extra) != null && d.parenthesized && h();
|
|
let p = this.maybeUnwrapTypeCastExpression(y);
|
|
return p.type !== "ArrowFunctionExpression" && h(), p.typeParameters = c, this.resetStartLocationFromNode(p, c), y;
|
|
}, a), m = null;
|
|
if (f.node && this.maybeUnwrapTypeCastExpression(f.node).type === "ArrowFunctionExpression") {
|
|
if (!f.error && !f.aborted)
|
|
return f.node.async && this.raise(Ue.UnexpectedTypeParameterBeforeAsyncArrowFunction, c), f.node;
|
|
m = f.node;
|
|
}
|
|
if ((u = o) != null && u.node)
|
|
return this.state = o.failState, o.node;
|
|
if (m)
|
|
return this.state = f.failState, m;
|
|
throw (l = o) != null && l.thrown ? o.error : f.thrown ? f.error : this.raise(Ue.UnexpectedTokenAfterTypeParameter, c);
|
|
}
|
|
return super.parseMaybeAssign(r, i);
|
|
}
|
|
parseArrow(r) {
|
|
if (this.match(14)) {
|
|
let i = this.tryParse(() => {
|
|
let n = this.state.noAnonFunctionType;
|
|
this.state.noAnonFunctionType = !0;
|
|
let a = this.startNode();
|
|
return [a.typeAnnotation, r.predicate] = this.flowParseTypeAndPredicateInitialiser(), this.state.noAnonFunctionType = n, this.canInsertSemicolon() &&
|
|
this.unexpected(), this.match(19) || this.unexpected(), a;
|
|
});
|
|
if (i.thrown) return null;
|
|
i.error && (this.state = i.failState), r.returnType = i.node.typeAnnotation ? this.finishNode(i.node, "TypeAnnotation") : null;
|
|
}
|
|
return super.parseArrow(r);
|
|
}
|
|
shouldParseArrow(r) {
|
|
return this.match(14) || super.shouldParseArrow(r);
|
|
}
|
|
setArrowFunctionParameters(r, i) {
|
|
this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start)) ? r.params = i : super.setArrowFunctionParameters(r, i);
|
|
}
|
|
checkParams(r, i, n, a = !0) {
|
|
if (!(n && this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start)))) {
|
|
for (let o = 0; o < r.params.length; o++)
|
|
this.isThisParam(r.params[o]) && o > 0 && this.raise(Ue.ThisParamMustBeFirst, r.params[o]);
|
|
super.checkParams(r, i, n, a);
|
|
}
|
|
}
|
|
parseParenAndDistinguishExpression(r) {
|
|
return super.parseParenAndDistinguishExpression(r && !this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)));
|
|
}
|
|
parseSubscripts(r, i, n) {
|
|
if (r.type === "Identifier" && r.name === "async" && this.state.noArrowAt.includes(i.index)) {
|
|
this.next();
|
|
let a = this.startNodeAt(i);
|
|
a.callee = r, a.arguments = super.parseCallExpressionArguments(11), r = this.finishNode(a, "CallExpression");
|
|
} else if (r.type === "Identifier" && r.name === "async" && this.match(47)) {
|
|
let a = this.state.clone(), o = this.tryParse((l) => this.parseAsyncArrowWithTypeParameters(i) || l(), a);
|
|
if (!o.error && !o.aborted) return o.node;
|
|
let u = this.tryParse(() => super.parseSubscripts(r, i, n), a);
|
|
if (u.node && !u.error) return u.node;
|
|
if (o.node)
|
|
return this.state = o.failState, o.node;
|
|
if (u.node)
|
|
return this.state = u.failState, u.node;
|
|
throw o.error || u.error;
|
|
}
|
|
return super.parseSubscripts(r, i, n);
|
|
}
|
|
parseSubscript(r, i, n, a) {
|
|
if (this.match(18) && this.isLookaheadToken_lt()) {
|
|
if (a.optionalChainMember = !0, n)
|
|
return a.stop = !0, r;
|
|
this.next();
|
|
let o = this.startNodeAt(i);
|
|
return o.callee = r, o.typeArguments = this.flowParseTypeParameterInstantiationInExpression(), this.expect(10), o.arguments = this.parseCallExpressionArguments(
|
|
11), o.optional = !0, this.finishCallExpression(o, !0);
|
|
} else if (!n && this.shouldParseTypes() && (this.match(47) || this.match(51))) {
|
|
let o = this.startNodeAt(i);
|
|
o.callee = r;
|
|
let u = this.tryParse(() => (o.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(), this.expect(10), o.arguments = super.
|
|
parseCallExpressionArguments(11), a.optionalChainMember && (o.optional = !1), this.finishCallExpression(o, a.optionalChainMember)));
|
|
if (u.node)
|
|
return u.error && (this.state = u.failState), u.node;
|
|
}
|
|
return super.parseSubscript(r, i, n, a);
|
|
}
|
|
parseNewCallee(r) {
|
|
super.parseNewCallee(r);
|
|
let i = null;
|
|
this.shouldParseTypes() && this.match(47) && (i = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node), r.typeArguments =
|
|
i;
|
|
}
|
|
parseAsyncArrowWithTypeParameters(r) {
|
|
let i = this.startNodeAt(r);
|
|
if (this.parseFunctionParams(i, !1), !!this.parseArrow(i))
|
|
return super.parseArrowExpression(i, void 0, !0);
|
|
}
|
|
readToken_mult_modulo(r) {
|
|
let i = this.input.charCodeAt(this.state.pos + 1);
|
|
if (r === 42 && i === 47 && this.state.hasFlowComment) {
|
|
this.state.hasFlowComment = !1, this.state.pos += 2, this.nextToken();
|
|
return;
|
|
}
|
|
super.readToken_mult_modulo(r);
|
|
}
|
|
readToken_pipe_amp(r) {
|
|
let i = this.input.charCodeAt(this.state.pos + 1);
|
|
if (r === 124 && i === 125) {
|
|
this.finishOp(9, 2);
|
|
return;
|
|
}
|
|
super.readToken_pipe_amp(r);
|
|
}
|
|
parseTopLevel(r, i) {
|
|
let n = super.parseTopLevel(r, i);
|
|
return this.state.hasFlowComment && this.raise(Ue.UnterminatedFlowComment, this.state.curPosition()), n;
|
|
}
|
|
skipBlockComment() {
|
|
if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
|
|
if (this.state.hasFlowComment)
|
|
throw this.raise(Ue.NestedFlowComment, this.state.startLoc);
|
|
this.hasFlowCommentCompletion();
|
|
let r = this.skipFlowComment();
|
|
r && (this.state.pos += r, this.state.hasFlowComment = !0);
|
|
return;
|
|
}
|
|
return super.skipBlockComment(this.state.hasFlowComment ? "*-/" : "*/");
|
|
}
|
|
skipFlowComment() {
|
|
let {
|
|
pos: r
|
|
} = this.state, i = 2;
|
|
for (; [32, 9].includes(this.input.charCodeAt(r + i)); )
|
|
i++;
|
|
let n = this.input.charCodeAt(i + r), a = this.input.charCodeAt(i + r + 1);
|
|
return n === 58 && a === 58 ? i + 2 : this.input.slice(i + r, i + r + 12) === "flow-include" ? i + 12 : n === 58 && a !== 58 ? i : !1;
|
|
}
|
|
hasFlowCommentCompletion() {
|
|
if (this.input.indexOf("*/", this.state.pos) === -1)
|
|
throw this.raise(L.UnterminatedComment, this.state.curPosition());
|
|
}
|
|
flowEnumErrorBooleanMemberNotInitialized(r, {
|
|
enumName: i,
|
|
memberName: n
|
|
}) {
|
|
this.raise(Ue.EnumBooleanMemberNotInitialized, r, {
|
|
memberName: n,
|
|
enumName: i
|
|
});
|
|
}
|
|
flowEnumErrorInvalidMemberInitializer(r, i) {
|
|
return this.raise(i.explicitType ? i.explicitType === "symbol" ? Ue.EnumInvalidMemberInitializerSymbolType : Ue.EnumInvalidMemberInitializerPrimaryType :
|
|
Ue.EnumInvalidMemberInitializerUnknownType, r, i);
|
|
}
|
|
flowEnumErrorNumberMemberNotInitialized(r, i) {
|
|
this.raise(Ue.EnumNumberMemberNotInitialized, r, i);
|
|
}
|
|
flowEnumErrorStringMemberInconsistentlyInitialized(r, i) {
|
|
this.raise(Ue.EnumStringMemberInconsistentlyInitialized, r, i);
|
|
}
|
|
flowEnumMemberInit() {
|
|
let r = this.state.startLoc, i = /* @__PURE__ */ s(() => this.match(12) || this.match(8), "endOfInit");
|
|
switch (this.state.type) {
|
|
case 135: {
|
|
let n = this.parseNumericLiteral(this.state.value);
|
|
return i() ? {
|
|
type: "number",
|
|
loc: n.loc.start,
|
|
value: n
|
|
} : {
|
|
type: "invalid",
|
|
loc: r
|
|
};
|
|
}
|
|
case 134: {
|
|
let n = this.parseStringLiteral(this.state.value);
|
|
return i() ? {
|
|
type: "string",
|
|
loc: n.loc.start,
|
|
value: n
|
|
} : {
|
|
type: "invalid",
|
|
loc: r
|
|
};
|
|
}
|
|
case 85:
|
|
case 86: {
|
|
let n = this.parseBooleanLiteral(this.match(85));
|
|
return i() ? {
|
|
type: "boolean",
|
|
loc: n.loc.start,
|
|
value: n
|
|
} : {
|
|
type: "invalid",
|
|
loc: r
|
|
};
|
|
}
|
|
default:
|
|
return {
|
|
type: "invalid",
|
|
loc: r
|
|
};
|
|
}
|
|
}
|
|
flowEnumMemberRaw() {
|
|
let r = this.state.startLoc, i = this.parseIdentifier(!0), n = this.eat(29) ? this.flowEnumMemberInit() : {
|
|
type: "none",
|
|
loc: r
|
|
};
|
|
return {
|
|
id: i,
|
|
init: n
|
|
};
|
|
}
|
|
flowEnumCheckExplicitTypeMismatch(r, i, n) {
|
|
let {
|
|
explicitType: a
|
|
} = i;
|
|
a !== null && a !== n && this.flowEnumErrorInvalidMemberInitializer(r, i);
|
|
}
|
|
flowEnumMembers({
|
|
enumName: r,
|
|
explicitType: i
|
|
}) {
|
|
let n = /* @__PURE__ */ new Set(), a = {
|
|
booleanMembers: [],
|
|
numberMembers: [],
|
|
stringMembers: [],
|
|
defaultedMembers: []
|
|
}, o = !1;
|
|
for (; !this.match(8); ) {
|
|
if (this.eat(21)) {
|
|
o = !0;
|
|
break;
|
|
}
|
|
let u = this.startNode(), {
|
|
id: l,
|
|
init: c
|
|
} = this.flowEnumMemberRaw(), f = l.name;
|
|
if (f === "")
|
|
continue;
|
|
/^[a-z]/.test(f) && this.raise(Ue.EnumInvalidMemberName, l, {
|
|
memberName: f,
|
|
suggestion: f[0].toUpperCase() + f.slice(1),
|
|
enumName: r
|
|
}), n.has(f) && this.raise(Ue.EnumDuplicateMemberName, l, {
|
|
memberName: f,
|
|
enumName: r
|
|
}), n.add(f);
|
|
let m = {
|
|
enumName: r,
|
|
explicitType: i,
|
|
memberName: f
|
|
};
|
|
switch (u.id = l, c.type) {
|
|
case "boolean": {
|
|
this.flowEnumCheckExplicitTypeMismatch(c.loc, m, "boolean"), u.init = c.value, a.booleanMembers.push(this.finishNode(u, "EnumBoo\
|
|
leanMember"));
|
|
break;
|
|
}
|
|
case "number": {
|
|
this.flowEnumCheckExplicitTypeMismatch(c.loc, m, "number"), u.init = c.value, a.numberMembers.push(this.finishNode(u, "EnumNumbe\
|
|
rMember"));
|
|
break;
|
|
}
|
|
case "string": {
|
|
this.flowEnumCheckExplicitTypeMismatch(c.loc, m, "string"), u.init = c.value, a.stringMembers.push(this.finishNode(u, "EnumStrin\
|
|
gMember"));
|
|
break;
|
|
}
|
|
case "invalid":
|
|
throw this.flowEnumErrorInvalidMemberInitializer(c.loc, m);
|
|
case "none":
|
|
switch (i) {
|
|
case "boolean":
|
|
this.flowEnumErrorBooleanMemberNotInitialized(c.loc, m);
|
|
break;
|
|
case "number":
|
|
this.flowEnumErrorNumberMemberNotInitialized(c.loc, m);
|
|
break;
|
|
default:
|
|
a.defaultedMembers.push(this.finishNode(u, "EnumDefaultedMember"));
|
|
}
|
|
}
|
|
this.match(8) || this.expect(12);
|
|
}
|
|
return {
|
|
members: a,
|
|
hasUnknownMembers: o
|
|
};
|
|
}
|
|
flowEnumStringMembers(r, i, {
|
|
enumName: n
|
|
}) {
|
|
if (r.length === 0)
|
|
return i;
|
|
if (i.length === 0)
|
|
return r;
|
|
if (i.length > r.length) {
|
|
for (let a of r)
|
|
this.flowEnumErrorStringMemberInconsistentlyInitialized(a, {
|
|
enumName: n
|
|
});
|
|
return i;
|
|
} else {
|
|
for (let a of i)
|
|
this.flowEnumErrorStringMemberInconsistentlyInitialized(a, {
|
|
enumName: n
|
|
});
|
|
return r;
|
|
}
|
|
}
|
|
flowEnumParseExplicitType({
|
|
enumName: r
|
|
}) {
|
|
if (!this.eatContextual(102)) return null;
|
|
if (!xt(this.state.type))
|
|
throw this.raise(Ue.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, {
|
|
enumName: r
|
|
});
|
|
let {
|
|
value: i
|
|
} = this.state;
|
|
return this.next(), i !== "boolean" && i !== "number" && i !== "string" && i !== "symbol" && this.raise(Ue.EnumInvalidExplicitType, this.
|
|
state.startLoc, {
|
|
enumName: r,
|
|
invalidEnumType: i
|
|
}), i;
|
|
}
|
|
flowEnumBody(r, i) {
|
|
let n = i.name, a = i.loc.start, o = this.flowEnumParseExplicitType({
|
|
enumName: n
|
|
});
|
|
this.expect(5);
|
|
let {
|
|
members: u,
|
|
hasUnknownMembers: l
|
|
} = this.flowEnumMembers({
|
|
enumName: n,
|
|
explicitType: o
|
|
});
|
|
switch (r.hasUnknownMembers = l, o) {
|
|
case "boolean":
|
|
return r.explicitType = !0, r.members = u.booleanMembers, this.expect(8), this.finishNode(r, "EnumBooleanBody");
|
|
case "number":
|
|
return r.explicitType = !0, r.members = u.numberMembers, this.expect(8), this.finishNode(r, "EnumNumberBody");
|
|
case "string":
|
|
return r.explicitType = !0, r.members = this.flowEnumStringMembers(u.stringMembers, u.defaultedMembers, {
|
|
enumName: n
|
|
}), this.expect(8), this.finishNode(r, "EnumStringBody");
|
|
case "symbol":
|
|
return r.members = u.defaultedMembers, this.expect(8), this.finishNode(r, "EnumSymbolBody");
|
|
default: {
|
|
let c = /* @__PURE__ */ s(() => (r.members = [], this.expect(8), this.finishNode(r, "EnumStringBody")), "empty");
|
|
r.explicitType = !1;
|
|
let f = u.booleanMembers.length, m = u.numberMembers.length, h = u.stringMembers.length, d = u.defaultedMembers.length;
|
|
if (!f && !m && !h && !d)
|
|
return c();
|
|
if (!f && !m)
|
|
return r.members = this.flowEnumStringMembers(u.stringMembers, u.defaultedMembers, {
|
|
enumName: n
|
|
}), this.expect(8), this.finishNode(r, "EnumStringBody");
|
|
if (!m && !h && f >= d) {
|
|
for (let y of u.defaultedMembers)
|
|
this.flowEnumErrorBooleanMemberNotInitialized(y.loc.start, {
|
|
enumName: n,
|
|
memberName: y.id.name
|
|
});
|
|
return r.members = u.booleanMembers, this.expect(8), this.finishNode(r, "EnumBooleanBody");
|
|
} else if (!f && !h && m >= d) {
|
|
for (let y of u.defaultedMembers)
|
|
this.flowEnumErrorNumberMemberNotInitialized(y.loc.start, {
|
|
enumName: n,
|
|
memberName: y.id.name
|
|
});
|
|
return r.members = u.numberMembers, this.expect(8), this.finishNode(r, "EnumNumberBody");
|
|
} else
|
|
return this.raise(Ue.EnumInconsistentMemberValues, a, {
|
|
enumName: n
|
|
}), c();
|
|
}
|
|
}
|
|
}
|
|
flowParseEnumDeclaration(r) {
|
|
let i = this.parseIdentifier();
|
|
return r.id = i, r.body = this.flowEnumBody(this.startNode(), i), this.finishNode(r, "EnumDeclaration");
|
|
}
|
|
jsxParseOpeningElementAfterName(r) {
|
|
return this.shouldParseTypes() && (this.match(47) || this.match(51)) && (r.typeArguments = this.flowParseTypeParameterInstantiationInExpression()),
|
|
super.jsxParseOpeningElementAfterName(r);
|
|
}
|
|
isLookaheadToken_lt() {
|
|
let r = this.nextTokenStart();
|
|
if (this.input.charCodeAt(r) === 60) {
|
|
let i = this.input.charCodeAt(r + 1);
|
|
return i !== 60 && i !== 61;
|
|
}
|
|
return !1;
|
|
}
|
|
reScan_lt_gt() {
|
|
let {
|
|
type: r
|
|
} = this.state;
|
|
r === 47 ? (this.state.pos -= 1, this.readToken_lt()) : r === 48 && (this.state.pos -= 1, this.readToken_gt());
|
|
}
|
|
reScan_lt() {
|
|
let {
|
|
type: r
|
|
} = this.state;
|
|
return r === 51 ? (this.state.pos -= 2, this.finishOp(47, 1), 47) : r;
|
|
}
|
|
maybeUnwrapTypeCastExpression(r) {
|
|
return r.type === "TypeCastExpression" ? r.expression : r;
|
|
}
|
|
}, "flow"), Q2e = {
|
|
__proto__: null,
|
|
quot: '"',
|
|
amp: "&",
|
|
apos: "'",
|
|
lt: "<",
|
|
gt: ">",
|
|
nbsp: "\xA0",
|
|
iexcl: "\xA1",
|
|
cent: "\xA2",
|
|
pound: "\xA3",
|
|
curren: "\xA4",
|
|
yen: "\xA5",
|
|
brvbar: "\xA6",
|
|
sect: "\xA7",
|
|
uml: "\xA8",
|
|
copy: "\xA9",
|
|
ordf: "\xAA",
|
|
laquo: "\xAB",
|
|
not: "\xAC",
|
|
shy: "\xAD",
|
|
reg: "\xAE",
|
|
macr: "\xAF",
|
|
deg: "\xB0",
|
|
plusmn: "\xB1",
|
|
sup2: "\xB2",
|
|
sup3: "\xB3",
|
|
acute: "\xB4",
|
|
micro: "\xB5",
|
|
para: "\xB6",
|
|
middot: "\xB7",
|
|
cedil: "\xB8",
|
|
sup1: "\xB9",
|
|
ordm: "\xBA",
|
|
raquo: "\xBB",
|
|
frac14: "\xBC",
|
|
frac12: "\xBD",
|
|
frac34: "\xBE",
|
|
iquest: "\xBF",
|
|
Agrave: "\xC0",
|
|
Aacute: "\xC1",
|
|
Acirc: "\xC2",
|
|
Atilde: "\xC3",
|
|
Auml: "\xC4",
|
|
Aring: "\xC5",
|
|
AElig: "\xC6",
|
|
Ccedil: "\xC7",
|
|
Egrave: "\xC8",
|
|
Eacute: "\xC9",
|
|
Ecirc: "\xCA",
|
|
Euml: "\xCB",
|
|
Igrave: "\xCC",
|
|
Iacute: "\xCD",
|
|
Icirc: "\xCE",
|
|
Iuml: "\xCF",
|
|
ETH: "\xD0",
|
|
Ntilde: "\xD1",
|
|
Ograve: "\xD2",
|
|
Oacute: "\xD3",
|
|
Ocirc: "\xD4",
|
|
Otilde: "\xD5",
|
|
Ouml: "\xD6",
|
|
times: "\xD7",
|
|
Oslash: "\xD8",
|
|
Ugrave: "\xD9",
|
|
Uacute: "\xDA",
|
|
Ucirc: "\xDB",
|
|
Uuml: "\xDC",
|
|
Yacute: "\xDD",
|
|
THORN: "\xDE",
|
|
szlig: "\xDF",
|
|
agrave: "\xE0",
|
|
aacute: "\xE1",
|
|
acirc: "\xE2",
|
|
atilde: "\xE3",
|
|
auml: "\xE4",
|
|
aring: "\xE5",
|
|
aelig: "\xE6",
|
|
ccedil: "\xE7",
|
|
egrave: "\xE8",
|
|
eacute: "\xE9",
|
|
ecirc: "\xEA",
|
|
euml: "\xEB",
|
|
igrave: "\xEC",
|
|
iacute: "\xED",
|
|
icirc: "\xEE",
|
|
iuml: "\xEF",
|
|
eth: "\xF0",
|
|
ntilde: "\xF1",
|
|
ograve: "\xF2",
|
|
oacute: "\xF3",
|
|
ocirc: "\xF4",
|
|
otilde: "\xF5",
|
|
ouml: "\xF6",
|
|
divide: "\xF7",
|
|
oslash: "\xF8",
|
|
ugrave: "\xF9",
|
|
uacute: "\xFA",
|
|
ucirc: "\xFB",
|
|
uuml: "\xFC",
|
|
yacute: "\xFD",
|
|
thorn: "\xFE",
|
|
yuml: "\xFF",
|
|
OElig: "\u0152",
|
|
oelig: "\u0153",
|
|
Scaron: "\u0160",
|
|
scaron: "\u0161",
|
|
Yuml: "\u0178",
|
|
fnof: "\u0192",
|
|
circ: "\u02C6",
|
|
tilde: "\u02DC",
|
|
Alpha: "\u0391",
|
|
Beta: "\u0392",
|
|
Gamma: "\u0393",
|
|
Delta: "\u0394",
|
|
Epsilon: "\u0395",
|
|
Zeta: "\u0396",
|
|
Eta: "\u0397",
|
|
Theta: "\u0398",
|
|
Iota: "\u0399",
|
|
Kappa: "\u039A",
|
|
Lambda: "\u039B",
|
|
Mu: "\u039C",
|
|
Nu: "\u039D",
|
|
Xi: "\u039E",
|
|
Omicron: "\u039F",
|
|
Pi: "\u03A0",
|
|
Rho: "\u03A1",
|
|
Sigma: "\u03A3",
|
|
Tau: "\u03A4",
|
|
Upsilon: "\u03A5",
|
|
Phi: "\u03A6",
|
|
Chi: "\u03A7",
|
|
Psi: "\u03A8",
|
|
Omega: "\u03A9",
|
|
alpha: "\u03B1",
|
|
beta: "\u03B2",
|
|
gamma: "\u03B3",
|
|
delta: "\u03B4",
|
|
epsilon: "\u03B5",
|
|
zeta: "\u03B6",
|
|
eta: "\u03B7",
|
|
theta: "\u03B8",
|
|
iota: "\u03B9",
|
|
kappa: "\u03BA",
|
|
lambda: "\u03BB",
|
|
mu: "\u03BC",
|
|
nu: "\u03BD",
|
|
xi: "\u03BE",
|
|
omicron: "\u03BF",
|
|
pi: "\u03C0",
|
|
rho: "\u03C1",
|
|
sigmaf: "\u03C2",
|
|
sigma: "\u03C3",
|
|
tau: "\u03C4",
|
|
upsilon: "\u03C5",
|
|
phi: "\u03C6",
|
|
chi: "\u03C7",
|
|
psi: "\u03C8",
|
|
omega: "\u03C9",
|
|
thetasym: "\u03D1",
|
|
upsih: "\u03D2",
|
|
piv: "\u03D6",
|
|
ensp: "\u2002",
|
|
emsp: "\u2003",
|
|
thinsp: "\u2009",
|
|
zwnj: "\u200C",
|
|
zwj: "\u200D",
|
|
lrm: "\u200E",
|
|
rlm: "\u200F",
|
|
ndash: "\u2013",
|
|
mdash: "\u2014",
|
|
lsquo: "\u2018",
|
|
rsquo: "\u2019",
|
|
sbquo: "\u201A",
|
|
ldquo: "\u201C",
|
|
rdquo: "\u201D",
|
|
bdquo: "\u201E",
|
|
dagger: "\u2020",
|
|
Dagger: "\u2021",
|
|
bull: "\u2022",
|
|
hellip: "\u2026",
|
|
permil: "\u2030",
|
|
prime: "\u2032",
|
|
Prime: "\u2033",
|
|
lsaquo: "\u2039",
|
|
rsaquo: "\u203A",
|
|
oline: "\u203E",
|
|
frasl: "\u2044",
|
|
euro: "\u20AC",
|
|
image: "\u2111",
|
|
weierp: "\u2118",
|
|
real: "\u211C",
|
|
trade: "\u2122",
|
|
alefsym: "\u2135",
|
|
larr: "\u2190",
|
|
uarr: "\u2191",
|
|
rarr: "\u2192",
|
|
darr: "\u2193",
|
|
harr: "\u2194",
|
|
crarr: "\u21B5",
|
|
lArr: "\u21D0",
|
|
uArr: "\u21D1",
|
|
rArr: "\u21D2",
|
|
dArr: "\u21D3",
|
|
hArr: "\u21D4",
|
|
forall: "\u2200",
|
|
part: "\u2202",
|
|
exist: "\u2203",
|
|
empty: "\u2205",
|
|
nabla: "\u2207",
|
|
isin: "\u2208",
|
|
notin: "\u2209",
|
|
ni: "\u220B",
|
|
prod: "\u220F",
|
|
sum: "\u2211",
|
|
minus: "\u2212",
|
|
lowast: "\u2217",
|
|
radic: "\u221A",
|
|
prop: "\u221D",
|
|
infin: "\u221E",
|
|
ang: "\u2220",
|
|
and: "\u2227",
|
|
or: "\u2228",
|
|
cap: "\u2229",
|
|
cup: "\u222A",
|
|
int: "\u222B",
|
|
there4: "\u2234",
|
|
sim: "\u223C",
|
|
cong: "\u2245",
|
|
asymp: "\u2248",
|
|
ne: "\u2260",
|
|
equiv: "\u2261",
|
|
le: "\u2264",
|
|
ge: "\u2265",
|
|
sub: "\u2282",
|
|
sup: "\u2283",
|
|
nsub: "\u2284",
|
|
sube: "\u2286",
|
|
supe: "\u2287",
|
|
oplus: "\u2295",
|
|
otimes: "\u2297",
|
|
perp: "\u22A5",
|
|
sdot: "\u22C5",
|
|
lceil: "\u2308",
|
|
rceil: "\u2309",
|
|
lfloor: "\u230A",
|
|
rfloor: "\u230B",
|
|
lang: "\u2329",
|
|
rang: "\u232A",
|
|
loz: "\u25CA",
|
|
spades: "\u2660",
|
|
clubs: "\u2663",
|
|
hearts: "\u2665",
|
|
diams: "\u2666"
|
|
}, Ho = Us`jsx`({
|
|
AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.",
|
|
MissingClosingTagElement: /* @__PURE__ */ s(({
|
|
openingTagName: e
|
|
}) => `Expected corresponding JSX closing tag for <${e}>.`, "MissingClosingTagElement"),
|
|
MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.",
|
|
UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",
|
|
UnexpectedToken: /* @__PURE__ */ s(({
|
|
unexpected: e,
|
|
HTMLEntity: t
|
|
}) => `Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`, "UnexpectedToken"),
|
|
UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.",
|
|
UnterminatedJsxContent: "Unterminated JSX contents.",
|
|
UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"
|
|
});
|
|
function ja(e) {
|
|
return e ? e.type === "JSXOpeningFragment" || e.type === "JSXClosingFragment" : !1;
|
|
}
|
|
s(ja, "isFragment");
|
|
function kl(e) {
|
|
if (e.type === "JSXIdentifier")
|
|
return e.name;
|
|
if (e.type === "JSXNamespacedName")
|
|
return e.namespace.name + ":" + e.name.name;
|
|
if (e.type === "JSXMemberExpression")
|
|
return kl(e.object) + "." + kl(e.property);
|
|
throw new Error("Node had unexpected type: " + e.type);
|
|
}
|
|
s(kl, "getQualifiedJSXName");
|
|
var ePe = /* @__PURE__ */ s((e) => class extends e {
|
|
static {
|
|
s(this, "JSXParserMixin");
|
|
}
|
|
jsxReadToken() {
|
|
let r = "", i = this.state.pos;
|
|
for (; ; ) {
|
|
if (this.state.pos >= this.length)
|
|
throw this.raise(Ho.UnterminatedJsxContent, this.state.startLoc);
|
|
let n = this.input.charCodeAt(this.state.pos);
|
|
switch (n) {
|
|
case 60:
|
|
case 123:
|
|
if (this.state.pos === this.state.start) {
|
|
n === 60 && this.state.canStartJSXElement ? (++this.state.pos, this.finishToken(143)) : super.getTokenFromCode(n);
|
|
return;
|
|
}
|
|
r += this.input.slice(i, this.state.pos), this.finishToken(142, r);
|
|
return;
|
|
case 38:
|
|
r += this.input.slice(i, this.state.pos), r += this.jsxReadEntity(), i = this.state.pos;
|
|
break;
|
|
case 62:
|
|
case 125:
|
|
default:
|
|
Nl(n) ? (r += this.input.slice(i, this.state.pos), r += this.jsxReadNewLine(!0), i = this.state.pos) : ++this.state.pos;
|
|
}
|
|
}
|
|
}
|
|
jsxReadNewLine(r) {
|
|
let i = this.input.charCodeAt(this.state.pos), n;
|
|
return ++this.state.pos, i === 13 && this.input.charCodeAt(this.state.pos) === 10 ? (++this.state.pos, n = r ? `
|
|
` : `\r
|
|
`) : n = String.fromCharCode(i), ++this.state.curLine, this.state.lineStart = this.state.pos, n;
|
|
}
|
|
jsxReadString(r) {
|
|
let i = "", n = ++this.state.pos;
|
|
for (; ; ) {
|
|
if (this.state.pos >= this.length)
|
|
throw this.raise(L.UnterminatedString, this.state.startLoc);
|
|
let a = this.input.charCodeAt(this.state.pos);
|
|
if (a === r) break;
|
|
a === 38 ? (i += this.input.slice(n, this.state.pos), i += this.jsxReadEntity(), n = this.state.pos) : Nl(a) ? (i += this.input.slice(
|
|
n, this.state.pos), i += this.jsxReadNewLine(!1), n = this.state.pos) : ++this.state.pos;
|
|
}
|
|
i += this.input.slice(n, this.state.pos++), this.finishToken(134, i);
|
|
}
|
|
jsxReadEntity() {
|
|
let r = ++this.state.pos;
|
|
if (this.codePointAtPos(this.state.pos) === 35) {
|
|
++this.state.pos;
|
|
let i = 10;
|
|
this.codePointAtPos(this.state.pos) === 120 && (i = 16, ++this.state.pos);
|
|
let n = this.readInt(i, void 0, !1, "bail");
|
|
if (n !== null && this.codePointAtPos(this.state.pos) === 59)
|
|
return ++this.state.pos, String.fromCodePoint(n);
|
|
} else {
|
|
let i = 0, n = !1;
|
|
for (; i++ < 10 && this.state.pos < this.length && !(n = this.codePointAtPos(this.state.pos) === 59); )
|
|
++this.state.pos;
|
|
if (n) {
|
|
let a = this.input.slice(r, this.state.pos), o = Q2e[a];
|
|
if (++this.state.pos, o)
|
|
return o;
|
|
}
|
|
}
|
|
return this.state.pos = r, "&";
|
|
}
|
|
jsxReadWord() {
|
|
let r, i = this.state.pos;
|
|
do
|
|
r = this.input.charCodeAt(++this.state.pos);
|
|
while (Bl(r) || r === 45);
|
|
this.finishToken(141, this.input.slice(i, this.state.pos));
|
|
}
|
|
jsxParseIdentifier() {
|
|
let r = this.startNode();
|
|
return this.match(141) ? r.name = this.state.value : YT(this.state.type) ? r.name = La(this.state.type) : this.unexpected(), this.next(),
|
|
this.finishNode(r, "JSXIdentifier");
|
|
}
|
|
jsxParseNamespacedName() {
|
|
let r = this.state.startLoc, i = this.jsxParseIdentifier();
|
|
if (!this.eat(14)) return i;
|
|
let n = this.startNodeAt(r);
|
|
return n.namespace = i, n.name = this.jsxParseIdentifier(), this.finishNode(n, "JSXNamespacedName");
|
|
}
|
|
jsxParseElementName() {
|
|
let r = this.state.startLoc, i = this.jsxParseNamespacedName();
|
|
if (i.type === "JSXNamespacedName")
|
|
return i;
|
|
for (; this.eat(16); ) {
|
|
let n = this.startNodeAt(r);
|
|
n.object = i, n.property = this.jsxParseIdentifier(), i = this.finishNode(n, "JSXMemberExpression");
|
|
}
|
|
return i;
|
|
}
|
|
jsxParseAttributeValue() {
|
|
let r;
|
|
switch (this.state.type) {
|
|
case 5:
|
|
return r = this.startNode(), this.setContext(Et.brace), this.next(), r = this.jsxParseExpressionContainer(r, Et.j_oTag), r.expression.
|
|
type === "JSXEmptyExpression" && this.raise(Ho.AttributeIsEmpty, r), r;
|
|
case 143:
|
|
case 134:
|
|
return this.parseExprAtom();
|
|
default:
|
|
throw this.raise(Ho.UnsupportedJsxValue, this.state.startLoc);
|
|
}
|
|
}
|
|
jsxParseEmptyExpression() {
|
|
let r = this.startNodeAt(this.state.lastTokEndLoc);
|
|
return this.finishNodeAt(r, "JSXEmptyExpression", this.state.startLoc);
|
|
}
|
|
jsxParseSpreadChild(r) {
|
|
return this.next(), r.expression = this.parseExpression(), this.setContext(Et.j_expr), this.state.canStartJSXElement = !0, this.expect(
|
|
8), this.finishNode(r, "JSXSpreadChild");
|
|
}
|
|
jsxParseExpressionContainer(r, i) {
|
|
if (this.match(8))
|
|
r.expression = this.jsxParseEmptyExpression();
|
|
else {
|
|
let n = this.parseExpression();
|
|
r.expression = n;
|
|
}
|
|
return this.setContext(i), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(r, "JSXExpressionContainer");
|
|
}
|
|
jsxParseAttribute() {
|
|
let r = this.startNode();
|
|
return this.match(5) ? (this.setContext(Et.brace), this.next(), this.expect(21), r.argument = this.parseMaybeAssignAllowIn(), this.setContext(
|
|
Et.j_oTag), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(r, "JSXSpreadAttribute")) : (r.name = this.jsxParseNamespacedName(),
|
|
r.value = this.eat(29) ? this.jsxParseAttributeValue() : null, this.finishNode(r, "JSXAttribute"));
|
|
}
|
|
jsxParseOpeningElementAt(r) {
|
|
let i = this.startNodeAt(r);
|
|
return this.eat(144) ? this.finishNode(i, "JSXOpeningFragment") : (i.name = this.jsxParseElementName(), this.jsxParseOpeningElementAfterName(
|
|
i));
|
|
}
|
|
jsxParseOpeningElementAfterName(r) {
|
|
let i = [];
|
|
for (; !this.match(56) && !this.match(144); )
|
|
i.push(this.jsxParseAttribute());
|
|
return r.attributes = i, r.selfClosing = this.eat(56), this.expect(144), this.finishNode(r, "JSXOpeningElement");
|
|
}
|
|
jsxParseClosingElementAt(r) {
|
|
let i = this.startNodeAt(r);
|
|
return this.eat(144) ? this.finishNode(i, "JSXClosingFragment") : (i.name = this.jsxParseElementName(), this.expect(144), this.finishNode(
|
|
i, "JSXClosingElement"));
|
|
}
|
|
jsxParseElementAt(r) {
|
|
let i = this.startNodeAt(r), n = [], a = this.jsxParseOpeningElementAt(r), o = null;
|
|
if (!a.selfClosing) {
|
|
e: for (; ; )
|
|
switch (this.state.type) {
|
|
case 143:
|
|
if (r = this.state.startLoc, this.next(), this.eat(56)) {
|
|
o = this.jsxParseClosingElementAt(r);
|
|
break e;
|
|
}
|
|
n.push(this.jsxParseElementAt(r));
|
|
break;
|
|
case 142:
|
|
n.push(this.parseLiteral(this.state.value, "JSXText"));
|
|
break;
|
|
case 5: {
|
|
let u = this.startNode();
|
|
this.setContext(Et.brace), this.next(), this.match(21) ? n.push(this.jsxParseSpreadChild(u)) : n.push(this.jsxParseExpressionContainer(
|
|
u, Et.j_expr));
|
|
break;
|
|
}
|
|
default:
|
|
this.unexpected();
|
|
}
|
|
ja(a) && !ja(o) && o !== null ? this.raise(Ho.MissingClosingTagFragment, o) : !ja(a) && ja(o) ? this.raise(Ho.MissingClosingTagElement,
|
|
o, {
|
|
openingTagName: kl(a.name)
|
|
}) : !ja(a) && !ja(o) && kl(o.name) !== kl(a.name) && this.raise(Ho.MissingClosingTagElement, o, {
|
|
openingTagName: kl(a.name)
|
|
});
|
|
}
|
|
if (ja(a) ? (i.openingFragment = a, i.closingFragment = o) : (i.openingElement = a, i.closingElement = o), i.children = n, this.match(
|
|
47))
|
|
throw this.raise(Ho.UnwrappedAdjacentJSXElements, this.state.startLoc);
|
|
return ja(a) ? this.finishNode(i, "JSXFragment") : this.finishNode(i, "JSXElement");
|
|
}
|
|
jsxParseElement() {
|
|
let r = this.state.startLoc;
|
|
return this.next(), this.jsxParseElementAt(r);
|
|
}
|
|
setContext(r) {
|
|
let {
|
|
context: i
|
|
} = this.state;
|
|
i[i.length - 1] = r;
|
|
}
|
|
parseExprAtom(r) {
|
|
return this.match(143) ? this.jsxParseElement() : this.match(47) && this.input.charCodeAt(this.state.pos) !== 33 ? (this.replaceToken(
|
|
143), this.jsxParseElement()) : super.parseExprAtom(r);
|
|
}
|
|
skipSpace() {
|
|
this.curContext().preserveSpace || super.skipSpace();
|
|
}
|
|
getTokenFromCode(r) {
|
|
let i = this.curContext();
|
|
if (i === Et.j_expr) {
|
|
this.jsxReadToken();
|
|
return;
|
|
}
|
|
if (i === Et.j_oTag || i === Et.j_cTag) {
|
|
if (qs(r)) {
|
|
this.jsxReadWord();
|
|
return;
|
|
}
|
|
if (r === 62) {
|
|
++this.state.pos, this.finishToken(144);
|
|
return;
|
|
}
|
|
if ((r === 34 || r === 39) && i === Et.j_oTag) {
|
|
this.jsxReadString(r);
|
|
return;
|
|
}
|
|
}
|
|
if (r === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) {
|
|
++this.state.pos, this.finishToken(143);
|
|
return;
|
|
}
|
|
super.getTokenFromCode(r);
|
|
}
|
|
updateContext(r) {
|
|
let {
|
|
context: i,
|
|
type: n
|
|
} = this.state;
|
|
if (n === 56 && r === 143)
|
|
i.splice(-2, 2, Et.j_cTag), this.state.canStartJSXElement = !1;
|
|
else if (n === 143)
|
|
i.push(Et.j_oTag);
|
|
else if (n === 144) {
|
|
let a = i[i.length - 1];
|
|
a === Et.j_oTag && r === 56 || a === Et.j_cTag ? (i.pop(), this.state.canStartJSXElement = i[i.length - 1] === Et.j_expr) : (this.setContext(
|
|
Et.j_expr), this.state.canStartJSXElement = !0);
|
|
} else
|
|
this.state.canStartJSXElement = y2e(n);
|
|
}
|
|
}, "jsx"), qT = class extends Td {
|
|
static {
|
|
s(this, "TypeScriptScope");
|
|
}
|
|
constructor(...t) {
|
|
super(...t), this.tsNames = /* @__PURE__ */ new Map();
|
|
}
|
|
}, UT = class extends Cd {
|
|
static {
|
|
s(this, "TypeScriptScopeHandler");
|
|
}
|
|
constructor(...t) {
|
|
super(...t), this.importsStack = [];
|
|
}
|
|
createScope(t) {
|
|
return this.importsStack.push(/* @__PURE__ */ new Set()), new qT(t);
|
|
}
|
|
enter(t) {
|
|
t === 256 && this.importsStack.push(/* @__PURE__ */ new Set()), super.enter(t);
|
|
}
|
|
exit() {
|
|
let t = super.exit();
|
|
return t === 256 && this.importsStack.pop(), t;
|
|
}
|
|
hasImport(t, r) {
|
|
let i = this.importsStack.length;
|
|
if (this.importsStack[i - 1].has(t))
|
|
return !0;
|
|
if (!r && i > 1) {
|
|
for (let n = 0; n < i - 1; n++)
|
|
if (this.importsStack[n].has(t)) return !0;
|
|
}
|
|
return !1;
|
|
}
|
|
declareName(t, r, i) {
|
|
if (r & 4096) {
|
|
this.hasImport(t, !0) && this.parser.raise(L.VarRedeclaration, i, {
|
|
identifierName: t
|
|
}), this.importsStack[this.importsStack.length - 1].add(t);
|
|
return;
|
|
}
|
|
let n = this.currentScope(), a = n.tsNames.get(t) || 0;
|
|
if (r & 1024) {
|
|
this.maybeExportDefined(n, t), n.tsNames.set(t, a | 16);
|
|
return;
|
|
}
|
|
super.declareName(t, r, i), r & 2 && (r & 1 || (this.checkRedeclarationInScope(n, t, r, i), this.maybeExportDefined(n, t)), a = a | 1),
|
|
r & 256 && (a = a | 2), r & 512 && (a = a | 4), r & 128 && (a = a | 8), a && n.tsNames.set(t, a);
|
|
}
|
|
isRedeclaredInScope(t, r, i) {
|
|
let n = t.tsNames.get(r);
|
|
if ((n & 2) > 0) {
|
|
if (i & 256) {
|
|
let a = !!(i & 512), o = (n & 4) > 0;
|
|
return a !== o;
|
|
}
|
|
return !0;
|
|
}
|
|
return i & 128 && (n & 8) > 0 ? t.names.get(r) & 2 ? !!(i & 1) : !1 : i & 2 && (n & 1) > 0 ? !0 : super.isRedeclaredInScope(t, r, i);
|
|
}
|
|
checkLocalExport(t) {
|
|
let {
|
|
name: r
|
|
} = t;
|
|
if (this.hasImport(r)) return;
|
|
let i = this.scopeStack.length;
|
|
for (let n = i - 1; n >= 0; n--) {
|
|
let o = this.scopeStack[n].tsNames.get(r);
|
|
if ((o & 1) > 0 || (o & 16) > 0)
|
|
return;
|
|
}
|
|
super.checkLocalExport(t);
|
|
}
|
|
}, x9 = /* @__PURE__ */ s((e) => e.type === "ParenthesizedExpression" ? x9(e.expression) : e, "unwrapParenthesizedExpression"), WT = class extends LT {
|
|
static {
|
|
s(this, "LValParser");
|
|
}
|
|
toAssignable(t, r = !1) {
|
|
var i, n;
|
|
let a;
|
|
switch ((t.type === "ParenthesizedExpression" || (i = t.extra) != null && i.parenthesized) && (a = x9(t), r ? a.type === "Identifier" ?
|
|
this.expressionScope.recordArrowParameterBindingError(L.InvalidParenthesizedAssignment, t) : a.type !== "MemberExpression" && !this.isOptionalMemberExpression(
|
|
a) && this.raise(L.InvalidParenthesizedAssignment, t) : this.raise(L.InvalidParenthesizedAssignment, t)), t.type) {
|
|
case "Identifier":
|
|
case "ObjectPattern":
|
|
case "ArrayPattern":
|
|
case "AssignmentPattern":
|
|
case "RestElement":
|
|
break;
|
|
case "ObjectExpression":
|
|
t.type = "ObjectPattern";
|
|
for (let u = 0, l = t.properties.length, c = l - 1; u < l; u++) {
|
|
var o;
|
|
let f = t.properties[u], m = u === c;
|
|
this.toAssignableObjectExpressionProp(f, m, r), m && f.type === "RestElement" && (o = t.extra) != null && o.trailingCommaLoc && this.
|
|
raise(L.RestTrailingComma, t.extra.trailingCommaLoc);
|
|
}
|
|
break;
|
|
case "ObjectProperty": {
|
|
let {
|
|
key: u,
|
|
value: l
|
|
} = t;
|
|
this.isPrivateName(u) && this.classScope.usePrivateName(this.getPrivateNameSV(u), u.loc.start), this.toAssignable(l, r);
|
|
break;
|
|
}
|
|
case "SpreadElement":
|
|
throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignabl\
|
|
e's caller.");
|
|
case "ArrayExpression":
|
|
t.type = "ArrayPattern", this.toAssignableList(t.elements, (n = t.extra) == null ? void 0 : n.trailingCommaLoc, r);
|
|
break;
|
|
case "AssignmentExpression":
|
|
t.operator !== "=" && this.raise(L.MissingEqInAssignment, t.left.loc.end), t.type = "AssignmentPattern", delete t.operator, this.toAssignable(
|
|
t.left, r);
|
|
break;
|
|
case "ParenthesizedExpression":
|
|
this.toAssignable(a, r);
|
|
break;
|
|
}
|
|
}
|
|
toAssignableObjectExpressionProp(t, r, i) {
|
|
if (t.type === "ObjectMethod")
|
|
this.raise(t.kind === "get" || t.kind === "set" ? L.PatternHasAccessor : L.PatternHasMethod, t.key);
|
|
else if (t.type === "SpreadElement") {
|
|
t.type = "RestElement";
|
|
let n = t.argument;
|
|
this.checkToRestConversion(n, !1), this.toAssignable(n, i), r || this.raise(L.RestTrailingComma, t);
|
|
} else
|
|
this.toAssignable(t, i);
|
|
}
|
|
toAssignableList(t, r, i) {
|
|
let n = t.length - 1;
|
|
for (let a = 0; a <= n; a++) {
|
|
let o = t[a];
|
|
o && (this.toAssignableListItem(t, a, i), o.type === "RestElement" && (a < n ? this.raise(L.RestTrailingComma, o) : r && this.raise(
|
|
L.RestTrailingComma, r)));
|
|
}
|
|
}
|
|
toAssignableListItem(t, r, i) {
|
|
let n = t[r];
|
|
if (n.type === "SpreadElement") {
|
|
n.type = "RestElement";
|
|
let a = n.argument;
|
|
this.checkToRestConversion(a, !0), this.toAssignable(a, i);
|
|
} else
|
|
this.toAssignable(n, i);
|
|
}
|
|
isAssignable(t, r) {
|
|
switch (t.type) {
|
|
case "Identifier":
|
|
case "ObjectPattern":
|
|
case "ArrayPattern":
|
|
case "AssignmentPattern":
|
|
case "RestElement":
|
|
return !0;
|
|
case "ObjectExpression": {
|
|
let i = t.properties.length - 1;
|
|
return t.properties.every((n, a) => n.type !== "ObjectMethod" && (a === i || n.type !== "SpreadElement") && this.isAssignable(n));
|
|
}
|
|
case "ObjectProperty":
|
|
return this.isAssignable(t.value);
|
|
case "SpreadElement":
|
|
return this.isAssignable(t.argument);
|
|
case "ArrayExpression":
|
|
return t.elements.every((i) => i === null || this.isAssignable(i));
|
|
case "AssignmentExpression":
|
|
return t.operator === "=";
|
|
case "ParenthesizedExpression":
|
|
return this.isAssignable(t.expression);
|
|
case "MemberExpression":
|
|
case "OptionalMemberExpression":
|
|
return !r;
|
|
default:
|
|
return !1;
|
|
}
|
|
}
|
|
toReferencedList(t, r) {
|
|
return t;
|
|
}
|
|
toReferencedListDeep(t, r) {
|
|
this.toReferencedList(t, r);
|
|
for (let i of t)
|
|
i?.type === "ArrayExpression" && this.toReferencedListDeep(i.elements);
|
|
}
|
|
parseSpread(t) {
|
|
let r = this.startNode();
|
|
return this.next(), r.argument = this.parseMaybeAssignAllowIn(t, void 0), this.finishNode(r, "SpreadElement");
|
|
}
|
|
parseRestBinding() {
|
|
let t = this.startNode();
|
|
return this.next(), t.argument = this.parseBindingAtom(), this.finishNode(t, "RestElement");
|
|
}
|
|
parseBindingAtom() {
|
|
switch (this.state.type) {
|
|
case 0: {
|
|
let t = this.startNode();
|
|
return this.next(), t.elements = this.parseBindingList(3, 93, 1), this.finishNode(t, "ArrayPattern");
|
|
}
|
|
case 5:
|
|
return this.parseObjectLike(8, !0);
|
|
}
|
|
return this.parseIdentifier();
|
|
}
|
|
parseBindingList(t, r, i) {
|
|
let n = i & 1, a = [], o = !0;
|
|
for (; !this.eat(t); )
|
|
if (o ? o = !1 : this.expect(12), n && this.match(12))
|
|
a.push(null);
|
|
else {
|
|
if (this.eat(t))
|
|
break;
|
|
if (this.match(21)) {
|
|
let u = this.parseRestBinding();
|
|
if ((this.hasPlugin("flow") || i & 2) && (u = this.parseFunctionParamType(u)), a.push(u), !this.checkCommaAfterRest(r)) {
|
|
this.expect(t);
|
|
break;
|
|
}
|
|
} else {
|
|
let u = [];
|
|
if (i & 2)
|
|
for (this.match(26) && this.hasPlugin("decorators") && this.raise(L.UnsupportedParameterDecorator, this.state.startLoc); this.
|
|
match(26); )
|
|
u.push(this.parseDecorator());
|
|
a.push(this.parseBindingElement(i, u));
|
|
}
|
|
}
|
|
return a;
|
|
}
|
|
parseBindingRestProperty(t) {
|
|
return this.next(), t.argument = this.parseIdentifier(), this.checkCommaAfterRest(125), this.finishNode(t, "RestElement");
|
|
}
|
|
parseBindingProperty() {
|
|
let {
|
|
type: t,
|
|
startLoc: r
|
|
} = this.state;
|
|
if (t === 21)
|
|
return this.parseBindingRestProperty(this.startNode());
|
|
let i = this.startNode();
|
|
return t === 139 ? (this.expectPlugin("destructuringPrivate", r), this.classScope.usePrivateName(this.state.value, r), i.key = this.parsePrivateName()) :
|
|
this.parsePropertyName(i), i.method = !1, this.parseObjPropValue(i, r, !1, !1, !0, !1);
|
|
}
|
|
parseBindingElement(t, r) {
|
|
let i = this.parseMaybeDefault();
|
|
(this.hasPlugin("flow") || t & 2) && this.parseFunctionParamType(i);
|
|
let n = this.parseMaybeDefault(i.loc.start, i);
|
|
return r.length && (i.decorators = r), n;
|
|
}
|
|
parseFunctionParamType(t) {
|
|
return t;
|
|
}
|
|
parseMaybeDefault(t, r) {
|
|
if (t ?? (t = this.state.startLoc), r = r ?? this.parseBindingAtom(), !this.eat(29)) return r;
|
|
let i = this.startNodeAt(t);
|
|
return i.left = r, i.right = this.parseMaybeAssignAllowIn(), this.finishNode(i, "AssignmentPattern");
|
|
}
|
|
isValidLVal(t, r, i) {
|
|
switch (t) {
|
|
case "AssignmentPattern":
|
|
return "left";
|
|
case "RestElement":
|
|
return "argument";
|
|
case "ObjectProperty":
|
|
return "value";
|
|
case "ParenthesizedExpression":
|
|
return "expression";
|
|
case "ArrayPattern":
|
|
return "elements";
|
|
case "ObjectPattern":
|
|
return "properties";
|
|
}
|
|
return !1;
|
|
}
|
|
isOptionalMemberExpression(t) {
|
|
return t.type === "OptionalMemberExpression";
|
|
}
|
|
checkLVal(t, r, i = 64, n = !1, a = !1, o = !1) {
|
|
var u;
|
|
let l = t.type;
|
|
if (this.isObjectMethod(t)) return;
|
|
let c = this.isOptionalMemberExpression(t);
|
|
if (c || l === "MemberExpression") {
|
|
c && (this.expectPlugin("optionalChainingAssign", t.loc.start), r.type !== "AssignmentExpression" && this.raise(L.InvalidLhsOptionalChaining,
|
|
t, {
|
|
ancestor: r
|
|
})), i !== 64 && this.raise(L.InvalidPropertyBindingPattern, t);
|
|
return;
|
|
}
|
|
if (l === "Identifier") {
|
|
this.checkIdentifier(t, i, a);
|
|
let {
|
|
name: p
|
|
} = t;
|
|
n && (n.has(p) ? this.raise(L.ParamDupe, t) : n.add(p));
|
|
return;
|
|
}
|
|
let f = this.isValidLVal(l, !(o || (u = t.extra) != null && u.parenthesized) && r.type === "AssignmentExpression", i);
|
|
if (f === !0) return;
|
|
if (f === !1) {
|
|
let p = i === 64 ? L.InvalidLhs : L.InvalidLhsBinding;
|
|
this.raise(p, t, {
|
|
ancestor: r
|
|
});
|
|
return;
|
|
}
|
|
let m, h;
|
|
typeof f == "string" ? (m = f, h = l === "ParenthesizedExpression") : [m, h] = f;
|
|
let d = l === "ArrayPattern" || l === "ObjectPattern" ? {
|
|
type: l
|
|
} : r, y = t[m];
|
|
if (Array.isArray(y))
|
|
for (let p of y)
|
|
p && this.checkLVal(p, d, i, n, a, h);
|
|
else y && this.checkLVal(y, d, i, n, a, h);
|
|
}
|
|
checkIdentifier(t, r, i = !1) {
|
|
this.state.strict && (i ? g9(t.name, this.inModule) : y9(t.name)) && (r === 64 ? this.raise(L.StrictEvalArguments, t, {
|
|
referenceName: t.name
|
|
}) : this.raise(L.StrictEvalArgumentsBinding, t, {
|
|
bindingName: t.name
|
|
})), r & 8192 && t.name === "let" && this.raise(L.LetInLexicalBinding, t), r & 64 || this.declareNameFromIdentifier(t, r);
|
|
}
|
|
declareNameFromIdentifier(t, r) {
|
|
this.scope.declareName(t.name, r, t.loc.start);
|
|
}
|
|
checkToRestConversion(t, r) {
|
|
switch (t.type) {
|
|
case "ParenthesizedExpression":
|
|
this.checkToRestConversion(t.expression, r);
|
|
break;
|
|
case "Identifier":
|
|
case "MemberExpression":
|
|
break;
|
|
case "ArrayExpression":
|
|
case "ObjectExpression":
|
|
if (r) break;
|
|
default:
|
|
this.raise(L.InvalidRestAssignmentPattern, t);
|
|
}
|
|
}
|
|
checkCommaAfterRest(t) {
|
|
return this.match(12) ? (this.raise(this.lookaheadCharCode() === t ? L.RestTrailingComma : L.ElementAfterRest, this.state.startLoc), !0) :
|
|
!1;
|
|
}
|
|
};
|
|
function tPe(e) {
|
|
if (e == null)
|
|
throw new Error(`Unexpected ${e} value.`);
|
|
return e;
|
|
}
|
|
s(tPe, "nonNull");
|
|
function s9(e) {
|
|
if (!e)
|
|
throw new Error("Assert fail");
|
|
}
|
|
s(s9, "assert");
|
|
var Fe = Us`typescript`({
|
|
AbstractMethodHasImplementation: /* @__PURE__ */ s(({
|
|
methodName: e
|
|
}) => `Method '${e}' cannot have an implementation because it is marked abstract.`, "AbstractMethodHasImplementation"),
|
|
AbstractPropertyHasInitializer: /* @__PURE__ */ s(({
|
|
propertyName: e
|
|
}) => `Property '${e}' cannot have an initializer because it is marked abstract.`, "AbstractPropertyHasInitializer"),
|
|
AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.",
|
|
AccessorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.",
|
|
AccessorCannotHaveTypeParameters: "An accessor cannot have type parameters.",
|
|
ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
|
|
ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.",
|
|
ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or num\
|
|
eric literal or literal enum reference.",
|
|
ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.",
|
|
DeclareAccessor: /* @__PURE__ */ s(({
|
|
kind: e
|
|
}) => `'declare' is not allowed in ${e}ters.`, "DeclareAccessor"),
|
|
DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.",
|
|
DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.",
|
|
DuplicateAccessibilityModifier: /* @__PURE__ */ s(({
|
|
modifier: e
|
|
}) => "Accessibility modifier already seen.", "DuplicateAccessibilityModifier"),
|
|
DuplicateModifier: /* @__PURE__ */ s(({
|
|
modifier: e
|
|
}) => `Duplicate modifier: '${e}'.`, "DuplicateModifier"),
|
|
EmptyHeritageClauseType: /* @__PURE__ */ s(({
|
|
token: e
|
|
}) => `'${e}' list cannot be empty.`, "EmptyHeritageClauseType"),
|
|
EmptyTypeArguments: "Type argument list cannot be empty.",
|
|
EmptyTypeParameters: "Type parameter list cannot be empty.",
|
|
ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.",
|
|
ImportAliasHasImportType: "An import alias can not use 'import type'.",
|
|
ImportReflectionHasImportType: "An `import module` declaration can not use `type` modifier",
|
|
IncompatibleModifiers: /* @__PURE__ */ s(({
|
|
modifiers: e
|
|
}) => `'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`, "IncompatibleModifiers"),
|
|
IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.",
|
|
IndexSignatureHasAccessibility: /* @__PURE__ */ s(({
|
|
modifier: e
|
|
}) => `Index signatures cannot have an accessibility modifier ('${e}').`, "IndexSignatureHasAccessibility"),
|
|
IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.",
|
|
IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.",
|
|
IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.",
|
|
InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.",
|
|
InvalidHeritageClauseType: /* @__PURE__ */ s(({
|
|
token: e
|
|
}) => `'${e}' list can only include identifiers or qualified-names with optional type arguments.`, "InvalidHeritageClauseType"),
|
|
InvalidModifierOnTypeMember: /* @__PURE__ */ s(({
|
|
modifier: e
|
|
}) => `'${e}' modifier cannot appear on a type member.`, "InvalidModifierOnTypeMember"),
|
|
InvalidModifierOnTypeParameter: /* @__PURE__ */ s(({
|
|
modifier: e
|
|
}) => `'${e}' modifier cannot appear on a type parameter.`, "InvalidModifierOnTypeParameter"),
|
|
InvalidModifierOnTypeParameterPositions: /* @__PURE__ */ s(({
|
|
modifier: e
|
|
}) => `'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`, "InvalidModifierOnTypeParameterPositio\
|
|
ns"),
|
|
InvalidModifiersOrder: /* @__PURE__ */ s(({
|
|
orderedModifiers: e
|
|
}) => `'${e[0]}' modifier must precede '${e[1]}' modifier.`, "InvalidModifiersOrder"),
|
|
InvalidPropertyAccessAfterInstantiationExpression: "Invalid property access after an instantiation expression. You can either wrap the i\
|
|
nstantiation expression in parentheses, or delete the type arguments.",
|
|
InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.",
|
|
MissingInterfaceName: "'interface' declarations must be followed by an identifier.",
|
|
NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.",
|
|
NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.",
|
|
OptionalTypeBeforeRequired: "A required element cannot follow an optional element.",
|
|
OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.",
|
|
PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.",
|
|
PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.",
|
|
PrivateElementHasAccessibility: /* @__PURE__ */ s(({
|
|
modifier: e
|
|
}) => `Private elements cannot have an accessibility modifier ('${e}').`, "PrivateElementHasAccessibility"),
|
|
ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.",
|
|
ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",
|
|
ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",
|
|
SetAccessorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.",
|
|
SetAccessorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.",
|
|
SetAccessorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.",
|
|
SingleTypeParameterWithoutTrailingComma: /* @__PURE__ */ s(({
|
|
typeParameterName: e
|
|
}) => `Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`, "SingleTypeParameterWithoutTrailingComma"),
|
|
StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.",
|
|
TupleOptionalAfterType: "A labeled tuple optional element must be declared using a question mark after the name and before the colon (`n\
|
|
ame?: type`), rather than after the type (`name: type?`).",
|
|
TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number =\
|
|
25`.",
|
|
TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.",
|
|
TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statemen\
|
|
t.",
|
|
TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statemen\
|
|
t.",
|
|
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: /* @__PURE__ */ s(({
|
|
type: e
|
|
}) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`, "UnsupportedSignatureParameterKind")
|
|
});
|
|
function rPe(e) {
|
|
switch (e) {
|
|
case "any":
|
|
return "TSAnyKeyword";
|
|
case "boolean":
|
|
return "TSBooleanKeyword";
|
|
case "bigint":
|
|
return "TSBigIntKeyword";
|
|
case "never":
|
|
return "TSNeverKeyword";
|
|
case "number":
|
|
return "TSNumberKeyword";
|
|
case "object":
|
|
return "TSObjectKeyword";
|
|
case "string":
|
|
return "TSStringKeyword";
|
|
case "symbol":
|
|
return "TSSymbolKeyword";
|
|
case "undefined":
|
|
return "TSUndefinedKeyword";
|
|
case "unknown":
|
|
return "TSUnknownKeyword";
|
|
default:
|
|
return;
|
|
}
|
|
}
|
|
s(rPe, "keywordTypeFromName");
|
|
function a9(e) {
|
|
return e === "private" || e === "public" || e === "protected";
|
|
}
|
|
s(a9, "tsIsAccessModifier");
|
|
function iPe(e) {
|
|
return e === "in" || e === "out";
|
|
}
|
|
s(iPe, "tsIsVarianceAnnotations");
|
|
var nPe = /* @__PURE__ */ s((e) => class extends e {
|
|
static {
|
|
s(this, "TypeScriptParserMixin");
|
|
}
|
|
constructor(...r) {
|
|
super(...r), this.tsParseInOutModifiers = this.tsParseModifiers.bind(this, {
|
|
allowedModifiers: ["in", "out"],
|
|
disallowedModifiers: ["const", "public", "private", "protected", "readonly", "declare", "abstract", "override"],
|
|
errorTemplate: Fe.InvalidModifierOnTypeParameter
|
|
}), this.tsParseConstModifier = this.tsParseModifiers.bind(this, {
|
|
allowedModifiers: ["const"],
|
|
disallowedModifiers: ["in", "out"],
|
|
errorTemplate: Fe.InvalidModifierOnTypeParameterPositions
|
|
}), this.tsParseInOutConstModifiers = this.tsParseModifiers.bind(this, {
|
|
allowedModifiers: ["in", "out", "const"],
|
|
disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"],
|
|
errorTemplate: Fe.InvalidModifierOnTypeParameter
|
|
});
|
|
}
|
|
getScopeHandler() {
|
|
return UT;
|
|
}
|
|
tsIsIdentifier() {
|
|
return xt(this.state.type);
|
|
}
|
|
tsTokenCanFollowModifier() {
|
|
return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(139) || this.isLiteralPropertyName();
|
|
}
|
|
tsNextTokenOnSameLineAndCanFollowModifier() {
|
|
return this.next(), this.hasPrecedingLineBreak() ? !1 : this.tsTokenCanFollowModifier();
|
|
}
|
|
tsNextTokenCanFollowModifier() {
|
|
return this.match(106) ? (this.next(), this.tsTokenCanFollowModifier()) : this.tsNextTokenOnSameLineAndCanFollowModifier();
|
|
}
|
|
tsParseModifier(r, i) {
|
|
if (!xt(this.state.type) && this.state.type !== 58 && this.state.type !== 75)
|
|
return;
|
|
let n = this.state.value;
|
|
if (r.includes(n)) {
|
|
if (i && this.tsIsStartOfStaticBlocks())
|
|
return;
|
|
if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))
|
|
return n;
|
|
}
|
|
}
|
|
tsParseModifiers({
|
|
allowedModifiers: r,
|
|
disallowedModifiers: i,
|
|
stopOnStartOfClassStaticBlock: n,
|
|
errorTemplate: a = Fe.InvalidModifierOnTypeMember
|
|
}, o) {
|
|
let u = /* @__PURE__ */ s((c, f, m, h) => {
|
|
f === m && o[h] && this.raise(Fe.InvalidModifiersOrder, c, {
|
|
orderedModifiers: [m, h]
|
|
});
|
|
}, "enforceOrder"), l = /* @__PURE__ */ s((c, f, m, h) => {
|
|
(o[m] && f === h || o[h] && f === m) && this.raise(Fe.IncompatibleModifiers, c, {
|
|
modifiers: [m, h]
|
|
});
|
|
}, "incompatible");
|
|
for (; ; ) {
|
|
let {
|
|
startLoc: c
|
|
} = this.state, f = this.tsParseModifier(r.concat(i ?? []), n);
|
|
if (!f) break;
|
|
a9(f) ? o.accessibility ? this.raise(Fe.DuplicateAccessibilityModifier, c, {
|
|
modifier: f
|
|
}) : (u(c, f, f, "override"), u(c, f, f, "static"), u(c, f, f, "readonly"), o.accessibility = f) : iPe(f) ? (o[f] && this.raise(Fe.DuplicateModifier,
|
|
c, {
|
|
modifier: f
|
|
}), o[f] = !0, u(c, f, "in", "out")) : (hasOwnProperty.call(o, f) ? this.raise(Fe.DuplicateModifier, c, {
|
|
modifier: f
|
|
}) : (u(c, f, "static", "readonly"), u(c, f, "static", "override"), u(c, f, "override", "readonly"), u(c, f, "abstract", "override"),
|
|
l(c, f, "declare", "override"), l(c, f, "static", "abstract")), o[f] = !0), i != null && i.includes(f) && this.raise(a, c, {
|
|
modifier: f
|
|
});
|
|
}
|
|
}
|
|
tsIsListTerminator(r) {
|
|
switch (r) {
|
|
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);
|
|
}
|
|
}
|
|
tsParseList(r, i) {
|
|
let n = [];
|
|
for (; !this.tsIsListTerminator(r); )
|
|
n.push(i());
|
|
return n;
|
|
}
|
|
tsParseDelimitedList(r, i, n) {
|
|
return tPe(this.tsParseDelimitedListWorker(r, i, !0, n));
|
|
}
|
|
tsParseDelimitedListWorker(r, i, n, a) {
|
|
let o = [], u = -1;
|
|
for (; !this.tsIsListTerminator(r); ) {
|
|
u = -1;
|
|
let l = i();
|
|
if (l == null)
|
|
return;
|
|
if (o.push(l), this.eat(12)) {
|
|
u = this.state.lastTokStartLoc.index;
|
|
continue;
|
|
}
|
|
if (this.tsIsListTerminator(r))
|
|
break;
|
|
n && this.expect(12);
|
|
return;
|
|
}
|
|
return a && (a.value = u), o;
|
|
}
|
|
tsParseBracketedList(r, i, n, a, o) {
|
|
a || (n ? this.expect(0) : this.expect(47));
|
|
let u = this.tsParseDelimitedList(r, i, o);
|
|
return n ? this.expect(3) : this.expect(48), u;
|
|
}
|
|
tsParseImportType() {
|
|
let r = this.startNode();
|
|
return this.expect(83), this.expect(10), this.match(134) ? r.argument = this.parseStringLiteral(this.state.value) : (this.raise(Fe.UnsupportedImportTypeArgument,
|
|
this.state.startLoc), r.argument = super.parseExprAtom()), this.eat(12) && !this.match(11) ? (r.options = super.parseMaybeAssignAllowIn(),
|
|
this.eat(12)) : r.options = null, this.expect(11), this.eat(16) && (r.qualifier = this.tsParseEntityName(3)), this.match(47) && (r.typeParameters =
|
|
this.tsParseTypeArguments()), this.finishNode(r, "TSImportType");
|
|
}
|
|
tsParseEntityName(r) {
|
|
let i;
|
|
if (r & 1 && this.match(78))
|
|
if (r & 2)
|
|
i = this.parseIdentifier(!0);
|
|
else {
|
|
let n = this.startNode();
|
|
this.next(), i = this.finishNode(n, "ThisExpression");
|
|
}
|
|
else
|
|
i = this.parseIdentifier(!!(r & 1));
|
|
for (; this.eat(16); ) {
|
|
let n = this.startNodeAtNode(i);
|
|
n.left = i, n.right = this.parseIdentifier(!!(r & 1)), i = this.finishNode(n, "TSQualifiedName");
|
|
}
|
|
return i;
|
|
}
|
|
tsParseTypeReference() {
|
|
let r = this.startNode();
|
|
return r.typeName = this.tsParseEntityName(1), !this.hasPrecedingLineBreak() && this.match(47) && (r.typeParameters = this.tsParseTypeArguments()),
|
|
this.finishNode(r, "TSTypeReference");
|
|
}
|
|
tsParseThisTypePredicate(r) {
|
|
this.next();
|
|
let i = this.startNodeAtNode(r);
|
|
return i.parameterName = r, i.typeAnnotation = this.tsParseTypeAnnotation(!1), i.asserts = !1, this.finishNode(i, "TSTypePredicate");
|
|
}
|
|
tsParseThisTypeNode() {
|
|
let r = this.startNode();
|
|
return this.next(), this.finishNode(r, "TSThisType");
|
|
}
|
|
tsParseTypeQuery() {
|
|
let r = this.startNode();
|
|
return this.expect(87), this.match(83) ? r.exprName = this.tsParseImportType() : r.exprName = this.tsParseEntityName(3), !this.hasPrecedingLineBreak() &&
|
|
this.match(47) && (r.typeParameters = this.tsParseTypeArguments()), this.finishNode(r, "TSTypeQuery");
|
|
}
|
|
tsParseTypeParameter(r) {
|
|
let i = this.startNode();
|
|
return r(i), i.name = this.tsParseTypeParameterName(), i.constraint = this.tsEatThenParseType(81), i.default = this.tsEatThenParseType(
|
|
29), this.finishNode(i, "TSTypeParameter");
|
|
}
|
|
tsTryParseTypeParameters(r) {
|
|
if (this.match(47))
|
|
return this.tsParseTypeParameters(r);
|
|
}
|
|
tsParseTypeParameters(r) {
|
|
let i = this.startNode();
|
|
this.match(47) || this.match(143) ? this.next() : this.unexpected();
|
|
let n = {
|
|
value: -1
|
|
};
|
|
return i.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, r), !1, !0, n), i.params.
|
|
length === 0 && this.raise(Fe.EmptyTypeParameters, i), n.value !== -1 && this.addExtra(i, "trailingComma", n.value), this.finishNode(i,
|
|
"TSTypeParameterDeclaration");
|
|
}
|
|
tsFillSignature(r, i) {
|
|
let n = r === 19, a = "parameters", o = "typeAnnotation";
|
|
i.typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier), this.expect(10), i[a] = this.tsParseBindingListForSignature(),
|
|
n ? i[o] = this.tsParseTypeOrTypePredicateAnnotation(r) : this.match(r) && (i[o] = this.tsParseTypeOrTypePredicateAnnotation(r));
|
|
}
|
|
tsParseBindingListForSignature() {
|
|
let r = super.parseBindingList(11, 41, 2);
|
|
for (let i of r) {
|
|
let {
|
|
type: n
|
|
} = i;
|
|
(n === "AssignmentPattern" || n === "TSParameterProperty") && this.raise(Fe.UnsupportedSignatureParameterKind, i, {
|
|
type: n
|
|
});
|
|
}
|
|
return r;
|
|
}
|
|
tsParseTypeMemberSemicolon() {
|
|
!this.eat(12) && !this.isLineTerminator() && this.expect(13);
|
|
}
|
|
tsParseSignatureMember(r, i) {
|
|
return this.tsFillSignature(14, i), this.tsParseTypeMemberSemicolon(), this.finishNode(i, r);
|
|
}
|
|
tsIsUnambiguouslyIndexSignature() {
|
|
return this.next(), xt(this.state.type) ? (this.next(), this.match(14)) : !1;
|
|
}
|
|
tsTryParseIndexSignature(r) {
|
|
if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))
|
|
return;
|
|
this.expect(0);
|
|
let i = this.parseIdentifier();
|
|
i.typeAnnotation = this.tsParseTypeAnnotation(), this.resetEndLocation(i), this.expect(3), r.parameters = [i];
|
|
let n = this.tsTryParseTypeAnnotation();
|
|
return n && (r.typeAnnotation = n), this.tsParseTypeMemberSemicolon(), this.finishNode(r, "TSIndexSignature");
|
|
}
|
|
tsParsePropertyOrMethodSignature(r, i) {
|
|
this.eat(17) && (r.optional = !0);
|
|
let n = r;
|
|
if (this.match(10) || this.match(47)) {
|
|
i && this.raise(Fe.ReadonlyForMethodSignature, r);
|
|
let a = n;
|
|
a.kind && this.match(47) && this.raise(Fe.AccessorCannotHaveTypeParameters, this.state.curPosition()), this.tsFillSignature(14, a), this.
|
|
tsParseTypeMemberSemicolon();
|
|
let o = "parameters", u = "typeAnnotation";
|
|
if (a.kind === "get")
|
|
a[o].length > 0 && (this.raise(L.BadGetterArity, this.state.curPosition()), this.isThisParam(a[o][0]) && this.raise(Fe.AccessorCannotDeclareThisParameter,
|
|
this.state.curPosition()));
|
|
else if (a.kind === "set") {
|
|
if (a[o].length !== 1)
|
|
this.raise(L.BadSetterArity, this.state.curPosition());
|
|
else {
|
|
let l = a[o][0];
|
|
this.isThisParam(l) && this.raise(Fe.AccessorCannotDeclareThisParameter, this.state.curPosition()), l.type === "Identifier" && l.
|
|
optional && this.raise(Fe.SetAccessorCannotHaveOptionalParameter, this.state.curPosition()), l.type === "RestElement" && this.raise(
|
|
Fe.SetAccessorCannotHaveRestParameter, this.state.curPosition());
|
|
}
|
|
a[u] && this.raise(Fe.SetAccessorCannotHaveReturnType, a[u]);
|
|
} else
|
|
a.kind = "method";
|
|
return this.finishNode(a, "TSMethodSignature");
|
|
} else {
|
|
let a = n;
|
|
i && (a.readonly = !0);
|
|
let o = this.tsTryParseTypeAnnotation();
|
|
return o && (a.typeAnnotation = o), this.tsParseTypeMemberSemicolon(), this.finishNode(a, "TSPropertySignature");
|
|
}
|
|
}
|
|
tsParseTypeMember() {
|
|
let r = this.startNode();
|
|
if (this.match(10) || this.match(47))
|
|
return this.tsParseSignatureMember("TSCallSignatureDeclaration", r);
|
|
if (this.match(77)) {
|
|
let n = this.startNode();
|
|
return this.next(), this.match(10) || this.match(47) ? this.tsParseSignatureMember("TSConstructSignatureDeclaration", r) : (r.key = this.
|
|
createIdentifier(n, "new"), this.tsParsePropertyOrMethodSignature(r, !1));
|
|
}
|
|
this.tsParseModifiers({
|
|
allowedModifiers: ["readonly"],
|
|
disallowedModifiers: ["declare", "abstract", "private", "protected", "public", "static", "override"]
|
|
}, r);
|
|
let i = this.tsTryParseIndexSignature(r);
|
|
return i || (super.parsePropertyName(r), !r.computed && r.key.type === "Identifier" && (r.key.name === "get" || r.key.name === "set") &&
|
|
this.tsTokenCanFollowModifier() && (r.kind = r.key.name, super.parsePropertyName(r)), this.tsParsePropertyOrMethodSignature(r, !!r.readonly));
|
|
}
|
|
tsParseTypeLiteral() {
|
|
let r = this.startNode();
|
|
return r.members = this.tsParseObjectTypeMembers(), this.finishNode(r, "TSTypeLiteral");
|
|
}
|
|
tsParseObjectTypeMembers() {
|
|
this.expect(5);
|
|
let r = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
|
|
return this.expect(8), r;
|
|
}
|
|
tsIsStartOfMappedType() {
|
|
return this.next(), this.eat(53) ? this.isContextual(122) : (this.isContextual(122) && this.next(), !this.match(0) || (this.next(), !this.
|
|
tsIsIdentifier()) ? !1 : (this.next(), this.match(58)));
|
|
}
|
|
tsParseMappedType() {
|
|
let r = this.startNode();
|
|
this.expect(5), this.match(53) ? (r.readonly = this.state.value, this.next(), this.expectContextual(122)) : this.eatContextual(122) &&
|
|
(r.readonly = !0), this.expect(0);
|
|
{
|
|
let i = this.startNode();
|
|
i.name = this.tsParseTypeParameterName(), i.constraint = this.tsExpectThenParseType(58), r.typeParameter = this.finishNode(i, "TSTyp\
|
|
eParameter");
|
|
}
|
|
return r.nameType = this.eatContextual(93) ? this.tsParseType() : null, this.expect(3), this.match(53) ? (r.optional = this.state.value,
|
|
this.next(), this.expect(17)) : this.eat(17) && (r.optional = !0), r.typeAnnotation = this.tsTryParseType(), this.semicolon(), this.expect(
|
|
8), this.finishNode(r, "TSMappedType");
|
|
}
|
|
tsParseTupleType() {
|
|
let r = this.startNode();
|
|
r.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), !0, !1);
|
|
let i = !1;
|
|
return r.elementTypes.forEach((n) => {
|
|
let {
|
|
type: a
|
|
} = n;
|
|
i && a !== "TSRestType" && a !== "TSOptionalType" && !(a === "TSNamedTupleMember" && n.optional) && this.raise(Fe.OptionalTypeBeforeRequired,
|
|
n), i || (i = a === "TSNamedTupleMember" && n.optional || a === "TSOptionalType");
|
|
}), this.finishNode(r, "TSTupleType");
|
|
}
|
|
tsParseTupleElementType() {
|
|
let r = this.state.startLoc, i = this.eat(21), {
|
|
startLoc: n
|
|
} = this.state, a, o, u, l, f = Sn(this.state.type) ? this.lookaheadCharCode() : null;
|
|
if (f === 58)
|
|
a = !0, u = !1, o = this.parseIdentifier(!0), this.expect(14), l = this.tsParseType();
|
|
else if (f === 63) {
|
|
u = !0;
|
|
let m = this.state.value, h = this.tsParseNonArrayType();
|
|
this.lookaheadCharCode() === 58 ? (a = !0, o = this.createIdentifier(this.startNodeAt(n), m), this.expect(17), this.expect(14), l = this.
|
|
tsParseType()) : (a = !1, l = h, this.expect(17));
|
|
} else
|
|
l = this.tsParseType(), u = this.eat(17), a = this.eat(14);
|
|
if (a) {
|
|
let m;
|
|
o ? (m = this.startNodeAt(n), m.optional = u, m.label = o, m.elementType = l, this.eat(17) && (m.optional = !0, this.raise(Fe.TupleOptionalAfterType,
|
|
this.state.lastTokStartLoc))) : (m = this.startNodeAt(n), m.optional = u, this.raise(Fe.InvalidTupleMemberLabel, l), m.label = l, m.
|
|
elementType = this.tsParseType()), l = this.finishNode(m, "TSNamedTupleMember");
|
|
} else if (u) {
|
|
let m = this.startNodeAt(n);
|
|
m.typeAnnotation = l, l = this.finishNode(m, "TSOptionalType");
|
|
}
|
|
if (i) {
|
|
let m = this.startNodeAt(r);
|
|
m.typeAnnotation = l, l = this.finishNode(m, "TSRestType");
|
|
}
|
|
return l;
|
|
}
|
|
tsParseParenthesizedType() {
|
|
let r = this.startNode();
|
|
return this.expect(10), r.typeAnnotation = this.tsParseType(), this.expect(11), this.finishNode(r, "TSParenthesizedType");
|
|
}
|
|
tsParseFunctionOrConstructorType(r, i) {
|
|
let n = this.startNode();
|
|
return r === "TSConstructorType" && (n.abstract = !!i, i && this.next(), this.next()), this.tsInAllowConditionalTypesContext(() => this.
|
|
tsFillSignature(19, n)), this.finishNode(n, r);
|
|
}
|
|
tsParseLiteralTypeNode() {
|
|
let r = this.startNode();
|
|
switch (this.state.type) {
|
|
case 135:
|
|
case 136:
|
|
case 134:
|
|
case 85:
|
|
case 86:
|
|
r.literal = super.parseExprAtom();
|
|
break;
|
|
default:
|
|
this.unexpected();
|
|
}
|
|
return this.finishNode(r, "TSLiteralType");
|
|
}
|
|
tsParseTemplateLiteralType() {
|
|
{
|
|
let r = this.startNode();
|
|
return r.literal = super.parseTemplate(!1), this.finishNode(r, "TSLiteralType");
|
|
}
|
|
}
|
|
parseTemplateSubstitution() {
|
|
return this.state.inType ? this.tsParseType() : super.parseTemplateSubstitution();
|
|
}
|
|
tsParseThisTypeOrThisTypePredicate() {
|
|
let r = this.tsParseThisTypeNode();
|
|
return this.isContextual(116) && !this.hasPrecedingLineBreak() ? this.tsParseThisTypePredicate(r) : r;
|
|
}
|
|
tsParseNonArrayType() {
|
|
switch (this.state.type) {
|
|
case 134:
|
|
case 135:
|
|
case 136:
|
|
case 85:
|
|
case 86:
|
|
return this.tsParseLiteralTypeNode();
|
|
case 53:
|
|
if (this.state.value === "-") {
|
|
let r = this.startNode(), i = this.lookahead();
|
|
return i.type !== 135 && i.type !== 136 && this.unexpected(), r.literal = this.parseMaybeUnary(), this.finishNode(r, "TSLiteralT\
|
|
ype");
|
|
}
|
|
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: {
|
|
let {
|
|
type: r
|
|
} = this.state;
|
|
if (xt(r) || r === 88 || r === 84) {
|
|
let i = r === 88 ? "TSVoidKeyword" : r === 84 ? "TSNullKeyword" : rPe(this.state.value);
|
|
if (i !== void 0 && this.lookaheadCharCode() !== 46) {
|
|
let n = this.startNode();
|
|
return this.next(), this.finishNode(n, i);
|
|
}
|
|
return this.tsParseTypeReference();
|
|
}
|
|
}
|
|
}
|
|
this.unexpected();
|
|
}
|
|
tsParseArrayTypeOrHigher() {
|
|
let {
|
|
startLoc: r
|
|
} = this.state, i = this.tsParseNonArrayType();
|
|
for (; !this.hasPrecedingLineBreak() && this.eat(0); )
|
|
if (this.match(3)) {
|
|
let n = this.startNodeAt(r);
|
|
n.elementType = i, this.expect(3), i = this.finishNode(n, "TSArrayType");
|
|
} else {
|
|
let n = this.startNodeAt(r);
|
|
n.objectType = i, n.indexType = this.tsParseType(), this.expect(3), i = this.finishNode(n, "TSIndexedAccessType");
|
|
}
|
|
return i;
|
|
}
|
|
tsParseTypeOperator() {
|
|
let r = this.startNode(), i = this.state.value;
|
|
return this.next(), r.operator = i, r.typeAnnotation = this.tsParseTypeOperatorOrHigher(), i === "readonly" && this.tsCheckTypeAnnotationForReadOnly(
|
|
r), this.finishNode(r, "TSTypeOperator");
|
|
}
|
|
tsCheckTypeAnnotationForReadOnly(r) {
|
|
switch (r.typeAnnotation.type) {
|
|
case "TSTupleType":
|
|
case "TSArrayType":
|
|
return;
|
|
default:
|
|
this.raise(Fe.UnexpectedReadonly, r);
|
|
}
|
|
}
|
|
tsParseInferType() {
|
|
let r = this.startNode();
|
|
this.expectContextual(115);
|
|
let i = this.startNode();
|
|
return i.name = this.tsParseTypeParameterName(), i.constraint = this.tsTryParse(() => this.tsParseConstraintForInferType()), r.typeParameter =
|
|
this.finishNode(i, "TSTypeParameter"), this.finishNode(r, "TSInferType");
|
|
}
|
|
tsParseConstraintForInferType() {
|
|
if (this.eat(81)) {
|
|
let r = this.tsInDisallowConditionalTypesContext(() => this.tsParseType());
|
|
if (this.state.inDisallowConditionalTypesContext || !this.match(17))
|
|
return r;
|
|
}
|
|
}
|
|
tsParseTypeOperatorOrHigher() {
|
|
return x2e(this.state.type) && !this.state.containsEsc ? this.tsParseTypeOperator() : this.isContextual(115) ? this.tsParseInferType() :
|
|
this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher());
|
|
}
|
|
tsParseUnionOrIntersectionType(r, i, n) {
|
|
let a = this.startNode(), o = this.eat(n), u = [];
|
|
do
|
|
u.push(i());
|
|
while (this.eat(n));
|
|
return u.length === 1 && !o ? u[0] : (a.types = u, this.finishNode(a, r));
|
|
}
|
|
tsParseIntersectionTypeOrHigher() {
|
|
return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 45);
|
|
}
|
|
tsParseUnionTypeOrHigher() {
|
|
return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 43);
|
|
}
|
|
tsIsStartOfFunctionType() {
|
|
return this.match(47) ? !0 : this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
|
|
}
|
|
tsSkipParameterStart() {
|
|
if (xt(this.state.type) || this.match(78))
|
|
return this.next(), !0;
|
|
if (this.match(5)) {
|
|
let {
|
|
errors: r
|
|
} = this.state, i = r.length;
|
|
try {
|
|
return this.parseObjectLike(8, !0), r.length === i;
|
|
} catch {
|
|
return !1;
|
|
}
|
|
}
|
|
if (this.match(0)) {
|
|
this.next();
|
|
let {
|
|
errors: r
|
|
} = this.state, i = r.length;
|
|
try {
|
|
return super.parseBindingList(3, 93, 1), r.length === i;
|
|
} catch {
|
|
return !1;
|
|
}
|
|
}
|
|
return !1;
|
|
}
|
|
tsIsUnambiguouslyStartOfFunctionType() {
|
|
return this.next(), !!(this.match(11) || this.match(21) || this.tsSkipParameterStart() && (this.match(14) || this.match(12) || this.match(
|
|
17) || this.match(29) || this.match(11) && (this.next(), this.match(19))));
|
|
}
|
|
tsParseTypeOrTypePredicateAnnotation(r) {
|
|
return this.tsInType(() => {
|
|
let i = this.startNode();
|
|
this.expect(r);
|
|
let n = this.startNode(), a = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));
|
|
if (a && this.match(78)) {
|
|
let l = this.tsParseThisTypeOrThisTypePredicate();
|
|
return l.type === "TSThisType" ? (n.parameterName = l, n.asserts = !0, n.typeAnnotation = null, l = this.finishNode(n, "TSTypePred\
|
|
icate")) : (this.resetStartLocationFromNode(l, n), l.asserts = !0), i.typeAnnotation = l, this.finishNode(i, "TSTypeAnnotation");
|
|
}
|
|
let o = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
|
|
if (!o)
|
|
return a ? (n.parameterName = this.parseIdentifier(), n.asserts = a, n.typeAnnotation = null, i.typeAnnotation = this.finishNode(n,
|
|
"TSTypePredicate"), this.finishNode(i, "TSTypeAnnotation")) : this.tsParseTypeAnnotation(!1, i);
|
|
let u = this.tsParseTypeAnnotation(!1);
|
|
return n.parameterName = o, n.typeAnnotation = u, n.asserts = a, i.typeAnnotation = this.finishNode(n, "TSTypePredicate"), this.finishNode(
|
|
i, "TSTypeAnnotation");
|
|
});
|
|
}
|
|
tsTryParseTypeOrTypePredicateAnnotation() {
|
|
if (this.match(14))
|
|
return this.tsParseTypeOrTypePredicateAnnotation(14);
|
|
}
|
|
tsTryParseTypeAnnotation() {
|
|
if (this.match(14))
|
|
return this.tsParseTypeAnnotation();
|
|
}
|
|
tsTryParseType() {
|
|
return this.tsEatThenParseType(14);
|
|
}
|
|
tsParseTypePredicatePrefix() {
|
|
let r = this.parseIdentifier();
|
|
if (this.isContextual(116) && !this.hasPrecedingLineBreak())
|
|
return this.next(), r;
|
|
}
|
|
tsParseTypePredicateAsserts() {
|
|
if (this.state.type !== 109)
|
|
return !1;
|
|
let r = this.state.containsEsc;
|
|
return this.next(), !xt(this.state.type) && !this.match(78) ? !1 : (r && this.raise(L.InvalidEscapedReservedWord, this.state.lastTokStartLoc,
|
|
{
|
|
reservedWord: "asserts"
|
|
}), !0);
|
|
}
|
|
tsParseTypeAnnotation(r = !0, i = this.startNode()) {
|
|
return this.tsInType(() => {
|
|
r && this.expect(14), i.typeAnnotation = this.tsParseType();
|
|
}), this.finishNode(i, "TSTypeAnnotation");
|
|
}
|
|
tsParseType() {
|
|
s9(this.state.inType);
|
|
let r = this.tsParseNonConditionalType();
|
|
if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81))
|
|
return r;
|
|
let i = this.startNodeAtNode(r);
|
|
return i.checkType = r, i.extendsType = this.tsInDisallowConditionalTypesContext(() => this.tsParseNonConditionalType()), this.expect(
|
|
17), i.trueType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()), this.expect(14), i.falseType = this.tsInAllowConditionalTypesContext(
|
|
() => this.tsParseType()), this.finishNode(i, "TSConditionalType");
|
|
}
|
|
isAbstractConstructorSignature() {
|
|
return this.isContextual(124) && this.lookahead().type === 77;
|
|
}
|
|
tsParseNonConditionalType() {
|
|
return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(77) ? this.tsParseFunctionOrConstructorType(
|
|
"TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher();
|
|
}
|
|
tsParseTypeAssertion() {
|
|
this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(Fe.ReservedTypeAssertion, this.state.startLoc);
|
|
let r = this.startNode();
|
|
return r.typeAnnotation = this.tsInType(() => (this.next(), this.match(75) ? this.tsParseTypeReference() : this.tsParseType())), this.
|
|
expect(48), r.expression = this.parseMaybeUnary(), this.finishNode(r, "TSTypeAssertion");
|
|
}
|
|
tsParseHeritageClause(r) {
|
|
let i = this.state.startLoc, n = this.tsParseDelimitedList("HeritageClauseElement", () => {
|
|
{
|
|
let a = this.startNode();
|
|
return a.expression = this.tsParseEntityName(3), this.match(47) && (a.typeParameters = this.tsParseTypeArguments()), this.finishNode(
|
|
a, "TSExpressionWithTypeArguments");
|
|
}
|
|
});
|
|
return n.length || this.raise(Fe.EmptyHeritageClauseType, i, {
|
|
token: r
|
|
}), n;
|
|
}
|
|
tsParseInterfaceDeclaration(r, i = {}) {
|
|
if (this.hasFollowingLineBreak()) return null;
|
|
this.expectContextual(129), i.declare && (r.declare = !0), xt(this.state.type) ? (r.id = this.parseIdentifier(), this.checkIdentifier(
|
|
r.id, 130)) : (r.id = null, this.raise(Fe.MissingInterfaceName, this.state.startLoc)), r.typeParameters = this.tsTryParseTypeParameters(
|
|
this.tsParseInOutConstModifiers), this.eat(81) && (r.extends = this.tsParseHeritageClause("extends"));
|
|
let n = this.startNode();
|
|
return n.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), r.body = this.finishNode(n, "TSInterfaceBody"), this.finishNode(
|
|
r, "TSInterfaceDeclaration");
|
|
}
|
|
tsParseTypeAliasDeclaration(r) {
|
|
return r.id = this.parseIdentifier(), this.checkIdentifier(r.id, 2), r.typeAnnotation = this.tsInType(() => {
|
|
if (r.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers), this.expect(29), this.isContextual(114) && this.lookahead().
|
|
type !== 16) {
|
|
let i = this.startNode();
|
|
return this.next(), this.finishNode(i, "TSIntrinsicKeyword");
|
|
}
|
|
return this.tsParseType();
|
|
}), this.semicolon(), this.finishNode(r, "TSTypeAliasDeclaration");
|
|
}
|
|
tsInTopLevelContext(r) {
|
|
if (this.curContext() !== Et.brace) {
|
|
let i = this.state.context;
|
|
this.state.context = [i[0]];
|
|
try {
|
|
return r();
|
|
} finally {
|
|
this.state.context = i;
|
|
}
|
|
} else
|
|
return r();
|
|
}
|
|
tsInType(r) {
|
|
let i = this.state.inType;
|
|
this.state.inType = !0;
|
|
try {
|
|
return r();
|
|
} finally {
|
|
this.state.inType = i;
|
|
}
|
|
}
|
|
tsInDisallowConditionalTypesContext(r) {
|
|
let i = this.state.inDisallowConditionalTypesContext;
|
|
this.state.inDisallowConditionalTypesContext = !0;
|
|
try {
|
|
return r();
|
|
} finally {
|
|
this.state.inDisallowConditionalTypesContext = i;
|
|
}
|
|
}
|
|
tsInAllowConditionalTypesContext(r) {
|
|
let i = this.state.inDisallowConditionalTypesContext;
|
|
this.state.inDisallowConditionalTypesContext = !1;
|
|
try {
|
|
return r();
|
|
} finally {
|
|
this.state.inDisallowConditionalTypesContext = i;
|
|
}
|
|
}
|
|
tsEatThenParseType(r) {
|
|
if (this.match(r))
|
|
return this.tsNextThenParseType();
|
|
}
|
|
tsExpectThenParseType(r) {
|
|
return this.tsInType(() => (this.expect(r), this.tsParseType()));
|
|
}
|
|
tsNextThenParseType() {
|
|
return this.tsInType(() => (this.next(), this.tsParseType()));
|
|
}
|
|
tsParseEnumMember() {
|
|
let r = this.startNode();
|
|
return r.id = this.match(134) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(!0), this.eat(29) && (r.initializer =
|
|
super.parseMaybeAssignAllowIn()), this.finishNode(r, "TSEnumMember");
|
|
}
|
|
tsParseEnumDeclaration(r, i = {}) {
|
|
return i.const && (r.const = !0), i.declare && (r.declare = !0), this.expectContextual(126), r.id = this.parseIdentifier(), this.checkIdentifier(
|
|
r.id, r.const ? 8971 : 8459), this.expect(5), r.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)),
|
|
this.expect(8), this.finishNode(r, "TSEnumDeclaration");
|
|
}
|
|
tsParseEnumBody() {
|
|
let r = this.startNode();
|
|
return this.expect(5), r.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)), this.expect(8), this.finishNode(
|
|
r, "TSEnumBody");
|
|
}
|
|
tsParseModuleBlock() {
|
|
let r = this.startNode();
|
|
return this.scope.enter(0), this.expect(5), super.parseBlockOrModuleBlockBody(r.body = [], void 0, !0, 8), this.scope.exit(), this.finishNode(
|
|
r, "TSModuleBlock");
|
|
}
|
|
tsParseModuleOrNamespaceDeclaration(r, i = !1) {
|
|
if (r.id = this.parseIdentifier(), i || this.checkIdentifier(r.id, 1024), this.eat(16)) {
|
|
let n = this.startNode();
|
|
this.tsParseModuleOrNamespaceDeclaration(n, !0), r.body = n;
|
|
} else
|
|
this.scope.enter(256), this.prodParam.enter(0), r.body = this.tsParseModuleBlock(), this.prodParam.exit(), this.scope.exit();
|
|
return this.finishNode(r, "TSModuleDeclaration");
|
|
}
|
|
tsParseAmbientExternalModuleDeclaration(r) {
|
|
return this.isContextual(112) ? (r.kind = "global", r.global = !0, r.id = this.parseIdentifier()) : this.match(134) ? (r.kind = "modul\
|
|
e", r.id = super.parseStringLiteral(this.state.value)) : this.unexpected(), this.match(5) ? (this.scope.enter(256), this.prodParam.enter(0),
|
|
r.body = this.tsParseModuleBlock(), this.prodParam.exit(), this.scope.exit()) : this.semicolon(), this.finishNode(r, "TSModuleDeclarat\
|
|
ion");
|
|
}
|
|
tsParseImportEqualsDeclaration(r, i, n) {
|
|
r.isExport = n || !1, r.id = i || this.parseIdentifier(), this.checkIdentifier(r.id, 4096), this.expect(29);
|
|
let a = this.tsParseModuleReference();
|
|
return r.importKind === "type" && a.type !== "TSExternalModuleReference" && this.raise(Fe.ImportAliasHasImportType, a), r.moduleReference =
|
|
a, this.semicolon(), this.finishNode(r, "TSImportEqualsDeclaration");
|
|
}
|
|
tsIsExternalModuleReference() {
|
|
return this.isContextual(119) && this.lookaheadCharCode() === 40;
|
|
}
|
|
tsParseModuleReference() {
|
|
return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(0);
|
|
}
|
|
tsParseExternalModuleReference() {
|
|
let r = this.startNode();
|
|
return this.expectContextual(119), this.expect(10), this.match(134) || this.unexpected(), r.expression = super.parseExprAtom(), this.expect(
|
|
11), this.sawUnambiguousESM = !0, this.finishNode(r, "TSExternalModuleReference");
|
|
}
|
|
tsLookAhead(r) {
|
|
let i = this.state.clone(), n = r();
|
|
return this.state = i, n;
|
|
}
|
|
tsTryParseAndCatch(r) {
|
|
let i = this.tryParse((n) => r() || n());
|
|
if (!(i.aborted || !i.node))
|
|
return i.error && (this.state = i.failState), i.node;
|
|
}
|
|
tsTryParse(r) {
|
|
let i = this.state.clone(), n = r();
|
|
if (n !== void 0 && n !== !1)
|
|
return n;
|
|
this.state = i;
|
|
}
|
|
tsTryParseDeclare(r) {
|
|
if (this.isLineTerminator())
|
|
return;
|
|
let i = this.state.type, n;
|
|
return this.isContextual(100) && (i = 74, n = "let"), this.tsInAmbientContext(() => {
|
|
switch (i) {
|
|
case 68:
|
|
return r.declare = !0, super.parseFunctionStatement(r, !1, !1);
|
|
case 80:
|
|
return r.declare = !0, this.parseClass(r, !0, !1);
|
|
case 126:
|
|
return this.tsParseEnumDeclaration(r, {
|
|
declare: !0
|
|
});
|
|
case 112:
|
|
return this.tsParseAmbientExternalModuleDeclaration(r);
|
|
case 75:
|
|
case 74:
|
|
return !this.match(75) || !this.isLookaheadContextual("enum") ? (r.declare = !0, this.parseVarStatement(r, n || this.state.value,
|
|
!0)) : (this.expect(75), this.tsParseEnumDeclaration(r, {
|
|
const: !0,
|
|
declare: !0
|
|
}));
|
|
case 129: {
|
|
let a = this.tsParseInterfaceDeclaration(r, {
|
|
declare: !0
|
|
});
|
|
if (a) return a;
|
|
}
|
|
default:
|
|
if (xt(i))
|
|
return this.tsParseDeclaration(r, this.state.value, !0, null);
|
|
}
|
|
});
|
|
}
|
|
tsTryParseExportDeclaration() {
|
|
return this.tsParseDeclaration(this.startNode(), this.state.value, !0, null);
|
|
}
|
|
tsParseExpressionStatement(r, i, n) {
|
|
switch (i.name) {
|
|
case "declare": {
|
|
let a = this.tsTryParseDeclare(r);
|
|
return a && (a.declare = !0), a;
|
|
}
|
|
case "global":
|
|
if (this.match(5)) {
|
|
this.scope.enter(256), this.prodParam.enter(0);
|
|
let a = r;
|
|
return a.kind = "global", r.global = !0, a.id = i, a.body = this.tsParseModuleBlock(), this.scope.exit(), this.prodParam.exit(),
|
|
this.finishNode(a, "TSModuleDeclaration");
|
|
}
|
|
break;
|
|
default:
|
|
return this.tsParseDeclaration(r, i.name, !1, n);
|
|
}
|
|
}
|
|
tsParseDeclaration(r, i, n, a) {
|
|
switch (i) {
|
|
case "abstract":
|
|
if (this.tsCheckLineTerminator(n) && (this.match(80) || xt(this.state.type)))
|
|
return this.tsParseAbstractDeclaration(r, a);
|
|
break;
|
|
case "module":
|
|
if (this.tsCheckLineTerminator(n)) {
|
|
if (this.match(134))
|
|
return this.tsParseAmbientExternalModuleDeclaration(r);
|
|
if (xt(this.state.type))
|
|
return r.kind = "module", this.tsParseModuleOrNamespaceDeclaration(r);
|
|
}
|
|
break;
|
|
case "namespace":
|
|
if (this.tsCheckLineTerminator(n) && xt(this.state.type))
|
|
return r.kind = "namespace", this.tsParseModuleOrNamespaceDeclaration(r);
|
|
break;
|
|
case "type":
|
|
if (this.tsCheckLineTerminator(n) && xt(this.state.type))
|
|
return this.tsParseTypeAliasDeclaration(r);
|
|
break;
|
|
}
|
|
}
|
|
tsCheckLineTerminator(r) {
|
|
return r ? this.hasFollowingLineBreak() ? !1 : (this.next(), !0) : !this.isLineTerminator();
|
|
}
|
|
tsTryParseGenericAsyncArrowFunction(r) {
|
|
if (!this.match(47)) return;
|
|
let i = this.state.maybeInArrowParameters;
|
|
this.state.maybeInArrowParameters = !0;
|
|
let n = this.tsTryParseAndCatch(() => {
|
|
let a = this.startNodeAt(r);
|
|
return a.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier), super.parseFunctionParams(a), a.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(),
|
|
this.expect(19), a;
|
|
});
|
|
if (this.state.maybeInArrowParameters = i, !!n)
|
|
return super.parseArrowExpression(n, null, !0);
|
|
}
|
|
tsParseTypeArgumentsInExpression() {
|
|
if (this.reScan_lt() === 47)
|
|
return this.tsParseTypeArguments();
|
|
}
|
|
tsParseTypeArguments() {
|
|
let r = this.startNode();
|
|
return r.params = this.tsInType(() => this.tsInTopLevelContext(() => (this.expect(47), this.tsParseDelimitedList("TypeParametersOrArgu\
|
|
ments", this.tsParseType.bind(this))))), r.params.length === 0 ? this.raise(Fe.EmptyTypeArguments, r) : !this.state.inType && this.curContext() ===
|
|
Et.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(r, "TSTypeParameterInstantiation");
|
|
}
|
|
tsIsDeclarationStart() {
|
|
return S2e(this.state.type);
|
|
}
|
|
isExportDefaultSpecifier() {
|
|
return this.tsIsDeclarationStart() ? !1 : super.isExportDefaultSpecifier();
|
|
}
|
|
parseBindingElement(r, i) {
|
|
let n = this.state.startLoc, a = {};
|
|
this.tsParseModifiers({
|
|
allowedModifiers: ["public", "private", "protected", "override", "readonly"]
|
|
}, a);
|
|
let o = a.accessibility, u = a.override, l = a.readonly;
|
|
!(r & 4) && (o || l || u) && this.raise(Fe.UnexpectedParameterModifier, n);
|
|
let c = this.parseMaybeDefault();
|
|
r & 2 && this.parseFunctionParamType(c);
|
|
let f = this.parseMaybeDefault(c.loc.start, c);
|
|
if (o || l || u) {
|
|
let m = this.startNodeAt(n);
|
|
return i.length && (m.decorators = i), o && (m.accessibility = o), l && (m.readonly = l), u && (m.override = u), f.type !== "Identif\
|
|
ier" && f.type !== "AssignmentPattern" && this.raise(Fe.UnsupportedParameterPropertyKind, m), m.parameter = f, this.finishNode(m, "TSParamet\
|
|
erProperty");
|
|
}
|
|
return i.length && (c.decorators = i), f;
|
|
}
|
|
isSimpleParameter(r) {
|
|
return r.type === "TSParameterProperty" && super.isSimpleParameter(r.parameter) || super.isSimpleParameter(r);
|
|
}
|
|
tsDisallowOptionalPattern(r) {
|
|
for (let i of r.params)
|
|
i.type !== "Identifier" && i.optional && !this.state.isAmbientContext && this.raise(Fe.PatternIsOptional, i);
|
|
}
|
|
setArrowFunctionParameters(r, i, n) {
|
|
super.setArrowFunctionParameters(r, i, n), this.tsDisallowOptionalPattern(r);
|
|
}
|
|
parseFunctionBodyAndFinish(r, i, n = !1) {
|
|
this.match(14) && (r.returnType = this.tsParseTypeOrTypePredicateAnnotation(14));
|
|
let a = i === "FunctionDeclaration" ? "TSDeclareFunction" : i === "ClassMethod" || i === "ClassPrivateMethod" ? "TSDeclareMethod" : void 0;
|
|
return a && !this.match(5) && this.isLineTerminator() ? this.finishNode(r, a) : a === "TSDeclareFunction" && this.state.isAmbientContext &&
|
|
(this.raise(Fe.DeclareFunctionHasImplementation, r), r.declare) ? super.parseFunctionBodyAndFinish(r, a, n) : (this.tsDisallowOptionalPattern(
|
|
r), super.parseFunctionBodyAndFinish(r, i, n));
|
|
}
|
|
registerFunctionStatementId(r) {
|
|
!r.body && r.id ? this.checkIdentifier(r.id, 1024) : super.registerFunctionStatementId(r);
|
|
}
|
|
tsCheckForInvalidTypeCasts(r) {
|
|
r.forEach((i) => {
|
|
i?.type === "TSTypeCastExpression" && this.raise(Fe.UnexpectedTypeAnnotation, i.typeAnnotation);
|
|
});
|
|
}
|
|
toReferencedList(r, i) {
|
|
return this.tsCheckForInvalidTypeCasts(r), r;
|
|
}
|
|
parseArrayLike(r, i, n, a) {
|
|
let o = super.parseArrayLike(r, i, n, a);
|
|
return o.type === "ArrayExpression" && this.tsCheckForInvalidTypeCasts(o.elements), o;
|
|
}
|
|
parseSubscript(r, i, n, a) {
|
|
if (!this.hasPrecedingLineBreak() && this.match(35)) {
|
|
this.state.canStartJSXElement = !1, this.next();
|
|
let u = this.startNodeAt(i);
|
|
return u.expression = r, this.finishNode(u, "TSNonNullExpression");
|
|
}
|
|
let o = !1;
|
|
if (this.match(18) && this.lookaheadCharCode() === 60) {
|
|
if (n)
|
|
return a.stop = !0, r;
|
|
a.optionalChainMember = o = !0, this.next();
|
|
}
|
|
if (this.match(47) || this.match(51)) {
|
|
let u, l = this.tsTryParseAndCatch(() => {
|
|
if (!n && this.atPossibleAsyncArrow(r)) {
|
|
let h = this.tsTryParseGenericAsyncArrowFunction(i);
|
|
if (h)
|
|
return h;
|
|
}
|
|
let c = this.tsParseTypeArgumentsInExpression();
|
|
if (!c) return;
|
|
if (o && !this.match(10)) {
|
|
u = this.state.curPosition();
|
|
return;
|
|
}
|
|
if (wy(this.state.type)) {
|
|
let h = super.parseTaggedTemplateExpression(r, i, a);
|
|
return h.typeParameters = c, h;
|
|
}
|
|
if (!n && this.eat(10)) {
|
|
let h = this.startNodeAt(i);
|
|
return h.callee = r, h.arguments = this.parseCallExpressionArguments(11), this.tsCheckForInvalidTypeCasts(h.arguments), h.typeParameters =
|
|
c, a.optionalChainMember && (h.optional = o), this.finishCallExpression(h, a.optionalChainMember);
|
|
}
|
|
let f = this.state.type;
|
|
if (f === 48 || f === 52 || f !== 10 && Ed(f) && !this.hasPrecedingLineBreak())
|
|
return;
|
|
let m = this.startNodeAt(i);
|
|
return m.expression = r, m.typeParameters = c, this.finishNode(m, "TSInstantiationExpression");
|
|
});
|
|
if (u && this.unexpected(u, 10), l)
|
|
return l.type === "TSInstantiationExpression" && (this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40) && this.raise(
|
|
Fe.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc), l;
|
|
}
|
|
return super.parseSubscript(r, i, n, a);
|
|
}
|
|
parseNewCallee(r) {
|
|
var i;
|
|
super.parseNewCallee(r);
|
|
let {
|
|
callee: n
|
|
} = r;
|
|
n.type === "TSInstantiationExpression" && !((i = n.extra) != null && i.parenthesized) && (r.typeParameters = n.typeParameters, r.callee =
|
|
n.expression);
|
|
}
|
|
parseExprOp(r, i, n) {
|
|
let a;
|
|
if (Sy(58) > n && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (a = this.isContextual(120)))) {
|
|
let o = this.startNodeAt(i);
|
|
return o.expression = r, o.typeAnnotation = this.tsInType(() => (this.next(), this.match(75) ? (a && this.raise(L.UnexpectedKeyword,
|
|
this.state.startLoc, {
|
|
keyword: "const"
|
|
}), this.tsParseTypeReference()) : this.tsParseType())), this.finishNode(o, a ? "TSSatisfiesExpression" : "TSAsExpression"), this.reScan_lt_gt(),
|
|
this.parseExprOp(o, i, n);
|
|
}
|
|
return super.parseExprOp(r, i, n);
|
|
}
|
|
checkReservedWord(r, i, n, a) {
|
|
this.state.isAmbientContext || super.checkReservedWord(r, i, n, a);
|
|
}
|
|
checkImportReflection(r) {
|
|
super.checkImportReflection(r), r.module && r.importKind !== "value" && this.raise(Fe.ImportReflectionHasImportType, r.specifiers[0].loc.
|
|
start);
|
|
}
|
|
checkDuplicateExports() {
|
|
}
|
|
isPotentialImportPhase(r) {
|
|
if (super.isPotentialImportPhase(r)) return !0;
|
|
if (this.isContextual(130)) {
|
|
let i = this.lookaheadCharCode();
|
|
return r ? i === 123 || i === 42 : i !== 61;
|
|
}
|
|
return !r && this.isContextual(87);
|
|
}
|
|
applyImportPhase(r, i, n, a) {
|
|
super.applyImportPhase(r, i, n, a), i ? r.exportKind = n === "type" ? "type" : "value" : r.importKind = n === "type" || n === "typeof" ?
|
|
n : "value";
|
|
}
|
|
parseImport(r) {
|
|
if (this.match(134))
|
|
return r.importKind = "value", super.parseImport(r);
|
|
let i;
|
|
if (xt(this.state.type) && this.lookaheadCharCode() === 61)
|
|
return r.importKind = "value", this.tsParseImportEqualsDeclaration(r);
|
|
if (this.isContextual(130)) {
|
|
let n = this.parseMaybeImportPhase(r, !1);
|
|
if (this.lookaheadCharCode() === 61)
|
|
return this.tsParseImportEqualsDeclaration(r, n);
|
|
i = super.parseImportSpecifiersAndAfter(r, n);
|
|
} else
|
|
i = super.parseImport(r);
|
|
return i.importKind === "type" && i.specifiers.length > 1 && i.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(Fe.TypeImportCannotSpecifyDefaultAndNamed,
|
|
i), i;
|
|
}
|
|
parseExport(r, i) {
|
|
if (this.match(83)) {
|
|
let n = r;
|
|
this.next();
|
|
let a = null;
|
|
return this.isContextual(130) && this.isPotentialImportPhase(!1) ? a = this.parseMaybeImportPhase(n, !1) : n.importKind = "value", this.
|
|
tsParseImportEqualsDeclaration(n, a, !0);
|
|
} else if (this.eat(29)) {
|
|
let n = r;
|
|
return n.expression = super.parseExpression(), this.semicolon(), this.sawUnambiguousESM = !0, this.finishNode(n, "TSExportAssignment");
|
|
} else if (this.eatContextual(93)) {
|
|
let n = r;
|
|
return this.expectContextual(128), n.id = this.parseIdentifier(), this.semicolon(), this.finishNode(n, "TSNamespaceExportDeclaration");
|
|
} else
|
|
return super.parseExport(r, i);
|
|
}
|
|
isAbstractClass() {
|
|
return this.isContextual(124) && this.lookahead().type === 80;
|
|
}
|
|
parseExportDefaultExpression() {
|
|
if (this.isAbstractClass()) {
|
|
let r = this.startNode();
|
|
return this.next(), r.abstract = !0, this.parseClass(r, !0, !0);
|
|
}
|
|
if (this.match(129)) {
|
|
let r = this.tsParseInterfaceDeclaration(this.startNode());
|
|
if (r) return r;
|
|
}
|
|
return super.parseExportDefaultExpression();
|
|
}
|
|
parseVarStatement(r, i, n = !1) {
|
|
let {
|
|
isAmbientContext: a
|
|
} = this.state, o = super.parseVarStatement(r, i, n || a);
|
|
if (!a) return o;
|
|
for (let {
|
|
id: u,
|
|
init: l
|
|
} of o.declarations)
|
|
l && (i !== "const" || u.typeAnnotation ? this.raise(Fe.InitializerNotAllowedInAmbientContext, l) : aPe(l, this.hasPlugin("estree")) ||
|
|
this.raise(Fe.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, l));
|
|
return o;
|
|
}
|
|
parseStatementContent(r, i) {
|
|
if (this.match(75) && this.isLookaheadContextual("enum")) {
|
|
let n = this.startNode();
|
|
return this.expect(75), this.tsParseEnumDeclaration(n, {
|
|
const: !0
|
|
});
|
|
}
|
|
if (this.isContextual(126))
|
|
return this.tsParseEnumDeclaration(this.startNode());
|
|
if (this.isContextual(129)) {
|
|
let n = this.tsParseInterfaceDeclaration(this.startNode());
|
|
if (n) return n;
|
|
}
|
|
return super.parseStatementContent(r, i);
|
|
}
|
|
parseAccessModifier() {
|
|
return this.tsParseModifier(["public", "protected", "private"]);
|
|
}
|
|
tsHasSomeModifiers(r, i) {
|
|
return i.some((n) => a9(n) ? r.accessibility === n : !!r[n]);
|
|
}
|
|
tsIsStartOfStaticBlocks() {
|
|
return this.isContextual(106) && this.lookaheadCharCode() === 123;
|
|
}
|
|
parseClassMember(r, i, n) {
|
|
let a = ["declare", "private", "public", "protected", "override", "abstract", "readonly", "static"];
|
|
this.tsParseModifiers({
|
|
allowedModifiers: a,
|
|
disallowedModifiers: ["in", "out"],
|
|
stopOnStartOfClassStaticBlock: !0,
|
|
errorTemplate: Fe.InvalidModifierOnTypeParameterPositions
|
|
}, i);
|
|
let o = /* @__PURE__ */ s(() => {
|
|
this.tsIsStartOfStaticBlocks() ? (this.next(), this.next(), this.tsHasSomeModifiers(i, a) && this.raise(Fe.StaticBlockCannotHaveModifier,
|
|
this.state.curPosition()), super.parseClassStaticBlock(r, i)) : this.parseClassMemberWithIsStatic(r, i, n, !!i.static);
|
|
}, "callParseClassMemberWithIsStatic");
|
|
i.declare ? this.tsInAmbientContext(o) : o();
|
|
}
|
|
parseClassMemberWithIsStatic(r, i, n, a) {
|
|
let o = this.tsTryParseIndexSignature(i);
|
|
if (o) {
|
|
r.body.push(o), i.abstract && this.raise(Fe.IndexSignatureHasAbstract, i), i.accessibility && this.raise(Fe.IndexSignatureHasAccessibility,
|
|
i, {
|
|
modifier: i.accessibility
|
|
}), i.declare && this.raise(Fe.IndexSignatureHasDeclare, i), i.override && this.raise(Fe.IndexSignatureHasOverride, i);
|
|
return;
|
|
}
|
|
!this.state.inAbstractClass && i.abstract && this.raise(Fe.NonAbstractClassHasAbstractMethod, i), i.override && (n.hadSuperClass || this.
|
|
raise(Fe.OverrideNotInSubClass, i)), super.parseClassMemberWithIsStatic(r, i, n, a);
|
|
}
|
|
parsePostMemberNameModifiers(r) {
|
|
this.eat(17) && (r.optional = !0), r.readonly && this.match(10) && this.raise(Fe.ClassMethodHasReadonly, r), r.declare && this.match(10) &&
|
|
this.raise(Fe.ClassMethodHasDeclare, r);
|
|
}
|
|
parseExpressionStatement(r, i, n) {
|
|
return (i.type === "Identifier" ? this.tsParseExpressionStatement(r, i, n) : void 0) || super.parseExpressionStatement(r, i, n);
|
|
}
|
|
shouldParseExportDeclaration() {
|
|
return this.tsIsDeclarationStart() ? !0 : super.shouldParseExportDeclaration();
|
|
}
|
|
parseConditional(r, i, n) {
|
|
if (!this.match(17)) return r;
|
|
if (this.state.maybeInArrowParameters) {
|
|
let a = this.lookaheadCharCode();
|
|
if (a === 44 || a === 61 || a === 58 || a === 41)
|
|
return this.setOptionalParametersError(n), r;
|
|
}
|
|
return super.parseConditional(r, i, n);
|
|
}
|
|
parseParenItem(r, i) {
|
|
let n = super.parseParenItem(r, i);
|
|
if (this.eat(17) && (n.optional = !0, this.resetEndLocation(r)), this.match(14)) {
|
|
let a = this.startNodeAt(i);
|
|
return a.expression = r, a.typeAnnotation = this.tsParseTypeAnnotation(), this.finishNode(a, "TSTypeCastExpression");
|
|
}
|
|
return r;
|
|
}
|
|
parseExportDeclaration(r) {
|
|
if (!this.state.isAmbientContext && this.isContextual(125))
|
|
return this.tsInAmbientContext(() => this.parseExportDeclaration(r));
|
|
let i = this.state.startLoc, n = this.eatContextual(125);
|
|
if (n && (this.isContextual(125) || !this.shouldParseExportDeclaration()))
|
|
throw this.raise(Fe.ExpectedAmbientAfterExportDeclare, this.state.startLoc);
|
|
let o = xt(this.state.type) && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(r);
|
|
return o ? ((o.type === "TSInterfaceDeclaration" || o.type === "TSTypeAliasDeclaration" || n) && (r.exportKind = "type"), n && o.type !==
|
|
"TSImportEqualsDeclaration" && (this.resetStartLocation(o, i), o.declare = !0), o) : null;
|
|
}
|
|
parseClassId(r, i, n, a) {
|
|
if ((!i || n) && this.isContextual(113))
|
|
return;
|
|
super.parseClassId(r, i, n, r.declare ? 1024 : 8331);
|
|
let o = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);
|
|
o && (r.typeParameters = o);
|
|
}
|
|
parseClassPropertyAnnotation(r) {
|
|
r.optional || (this.eat(35) ? r.definite = !0 : this.eat(17) && (r.optional = !0));
|
|
let i = this.tsTryParseTypeAnnotation();
|
|
i && (r.typeAnnotation = i);
|
|
}
|
|
parseClassProperty(r) {
|
|
if (this.parseClassPropertyAnnotation(r), this.state.isAmbientContext && !(r.readonly && !r.typeAnnotation) && this.match(29) && this.
|
|
raise(Fe.DeclareClassFieldHasInitializer, this.state.startLoc), r.abstract && this.match(29)) {
|
|
let {
|
|
key: i
|
|
} = r;
|
|
this.raise(Fe.AbstractPropertyHasInitializer, this.state.startLoc, {
|
|
propertyName: i.type === "Identifier" && !r.computed ? i.name : `[${this.input.slice(this.offsetToSourcePos(i.start), this.offsetToSourcePos(
|
|
i.end))}]`
|
|
});
|
|
}
|
|
return super.parseClassProperty(r);
|
|
}
|
|
parseClassPrivateProperty(r) {
|
|
return r.abstract && this.raise(Fe.PrivateElementHasAbstract, r), r.accessibility && this.raise(Fe.PrivateElementHasAccessibility, r, {
|
|
modifier: r.accessibility
|
|
}), this.parseClassPropertyAnnotation(r), super.parseClassPrivateProperty(r);
|
|
}
|
|
parseClassAccessorProperty(r) {
|
|
return this.parseClassPropertyAnnotation(r), r.optional && this.raise(Fe.AccessorCannotBeOptional, r), super.parseClassAccessorProperty(
|
|
r);
|
|
}
|
|
pushClassMethod(r, i, n, a, o, u) {
|
|
let l = this.tsTryParseTypeParameters(this.tsParseConstModifier);
|
|
l && o && this.raise(Fe.ConstructorHasTypeParameters, l);
|
|
let {
|
|
declare: c = !1,
|
|
kind: f
|
|
} = i;
|
|
c && (f === "get" || f === "set") && this.raise(Fe.DeclareAccessor, i, {
|
|
kind: f
|
|
}), l && (i.typeParameters = l), super.pushClassMethod(r, i, n, a, o, u);
|
|
}
|
|
pushClassPrivateMethod(r, i, n, a) {
|
|
let o = this.tsTryParseTypeParameters(this.tsParseConstModifier);
|
|
o && (i.typeParameters = o), super.pushClassPrivateMethod(r, i, n, a);
|
|
}
|
|
declareClassPrivateMethodInScope(r, i) {
|
|
r.type !== "TSDeclareMethod" && (r.type === "MethodDefinition" && !hasOwnProperty.call(r.value, "body") || super.declareClassPrivateMethodInScope(
|
|
r, i));
|
|
}
|
|
parseClassSuper(r) {
|
|
super.parseClassSuper(r), r.superClass && (this.match(47) || this.match(51)) && (r.superTypeParameters = this.tsParseTypeArgumentsInExpression()),
|
|
this.eatContextual(113) && (r.implements = this.tsParseHeritageClause("implements"));
|
|
}
|
|
parseObjPropValue(r, i, n, a, o, u, l) {
|
|
let c = this.tsTryParseTypeParameters(this.tsParseConstModifier);
|
|
return c && (r.typeParameters = c), super.parseObjPropValue(r, i, n, a, o, u, l);
|
|
}
|
|
parseFunctionParams(r, i) {
|
|
let n = this.tsTryParseTypeParameters(this.tsParseConstModifier);
|
|
n && (r.typeParameters = n), super.parseFunctionParams(r, i);
|
|
}
|
|
parseVarId(r, i) {
|
|
super.parseVarId(r, i), r.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35) && (r.definite = !0);
|
|
let n = this.tsTryParseTypeAnnotation();
|
|
n && (r.id.typeAnnotation = n, this.resetEndLocation(r.id));
|
|
}
|
|
parseAsyncArrowFromCallExpression(r, i) {
|
|
return this.match(14) && (r.returnType = this.tsParseTypeAnnotation()), super.parseAsyncArrowFromCallExpression(r, i);
|
|
}
|
|
parseMaybeAssign(r, i) {
|
|
var n, a, o, u, l;
|
|
let c, f, m;
|
|
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
if (c = this.state.clone(), f = this.tryParse(() => super.parseMaybeAssign(r, i), c), !f.error) return f.node;
|
|
let {
|
|
context: y
|
|
} = this.state, p = y[y.length - 1];
|
|
(p === Et.j_oTag || p === Et.j_expr) && y.pop();
|
|
}
|
|
if (!((n = f) != null && n.error) && !this.match(47))
|
|
return super.parseMaybeAssign(r, i);
|
|
(!c || c === this.state) && (c = this.state.clone());
|
|
let h, d = this.tryParse((y) => {
|
|
var p, g;
|
|
h = this.tsParseTypeParameters(this.tsParseConstModifier);
|
|
let b = super.parseMaybeAssign(r, i);
|
|
return (b.type !== "ArrowFunctionExpression" || (p = b.extra) != null && p.parenthesized) && y(), ((g = h) == null ? void 0 : g.params.
|
|
length) !== 0 && this.resetStartLocationFromNode(b, h), b.typeParameters = h, b;
|
|
}, c);
|
|
if (!d.error && !d.aborted)
|
|
return h && this.reportReservedArrowTypeParam(h), d.node;
|
|
if (!f && (s9(!this.hasPlugin("jsx")), m = this.tryParse(() => super.parseMaybeAssign(r, i), c), !m.error))
|
|
return m.node;
|
|
if ((a = f) != null && a.node)
|
|
return this.state = f.failState, f.node;
|
|
if (d.node)
|
|
return this.state = d.failState, h && this.reportReservedArrowTypeParam(h), d.node;
|
|
if ((o = m) != null && o.node)
|
|
return this.state = m.failState, m.node;
|
|
throw ((u = f) == null ? void 0 : u.error) || d.error || ((l = m) == null ? void 0 : l.error);
|
|
}
|
|
reportReservedArrowTypeParam(r) {
|
|
var i;
|
|
r.params.length === 1 && !r.params[0].constraint && !((i = r.extra) != null && i.trailingComma) && this.getPluginOption("typescript", "\
|
|
disallowAmbiguousJSXLike") && this.raise(Fe.ReservedArrowTypeParam, r);
|
|
}
|
|
parseMaybeUnary(r, i) {
|
|
return !this.hasPlugin("jsx") && this.match(47) ? this.tsParseTypeAssertion() : super.parseMaybeUnary(r, i);
|
|
}
|
|
parseArrow(r) {
|
|
if (this.match(14)) {
|
|
let i = this.tryParse((n) => {
|
|
let a = this.tsParseTypeOrTypePredicateAnnotation(14);
|
|
return (this.canInsertSemicolon() || !this.match(19)) && n(), a;
|
|
});
|
|
if (i.aborted) return;
|
|
i.thrown || (i.error && (this.state = i.failState), r.returnType = i.node);
|
|
}
|
|
return super.parseArrow(r);
|
|
}
|
|
parseFunctionParamType(r) {
|
|
this.eat(17) && (r.optional = !0);
|
|
let i = this.tsTryParseTypeAnnotation();
|
|
return i && (r.typeAnnotation = i), this.resetEndLocation(r), r;
|
|
}
|
|
isAssignable(r, i) {
|
|
switch (r.type) {
|
|
case "TSTypeCastExpression":
|
|
return this.isAssignable(r.expression, i);
|
|
case "TSParameterProperty":
|
|
return !0;
|
|
default:
|
|
return super.isAssignable(r, i);
|
|
}
|
|
}
|
|
toAssignable(r, i = !1) {
|
|
switch (r.type) {
|
|
case "ParenthesizedExpression":
|
|
this.toAssignableParenthesizedExpression(r, i);
|
|
break;
|
|
case "TSAsExpression":
|
|
case "TSSatisfiesExpression":
|
|
case "TSNonNullExpression":
|
|
case "TSTypeAssertion":
|
|
i ? this.expressionScope.recordArrowParameterBindingError(Fe.UnexpectedTypeCastInParameter, r) : this.raise(Fe.UnexpectedTypeCastInParameter,
|
|
r), this.toAssignable(r.expression, i);
|
|
break;
|
|
case "AssignmentExpression":
|
|
!i && r.left.type === "TSTypeCastExpression" && (r.left = this.typeCastToParameter(r.left));
|
|
default:
|
|
super.toAssignable(r, i);
|
|
}
|
|
}
|
|
toAssignableParenthesizedExpression(r, i) {
|
|
switch (r.expression.type) {
|
|
case "TSAsExpression":
|
|
case "TSSatisfiesExpression":
|
|
case "TSNonNullExpression":
|
|
case "TSTypeAssertion":
|
|
case "ParenthesizedExpression":
|
|
this.toAssignable(r.expression, i);
|
|
break;
|
|
default:
|
|
super.toAssignable(r, i);
|
|
}
|
|
}
|
|
checkToRestConversion(r, i) {
|
|
switch (r.type) {
|
|
case "TSAsExpression":
|
|
case "TSSatisfiesExpression":
|
|
case "TSTypeAssertion":
|
|
case "TSNonNullExpression":
|
|
this.checkToRestConversion(r.expression, !1);
|
|
break;
|
|
default:
|
|
super.checkToRestConversion(r, i);
|
|
}
|
|
}
|
|
isValidLVal(r, i, n) {
|
|
switch (r) {
|
|
case "TSTypeCastExpression":
|
|
return !0;
|
|
case "TSParameterProperty":
|
|
return "parameter";
|
|
case "TSNonNullExpression":
|
|
return "expression";
|
|
case "TSAsExpression":
|
|
case "TSSatisfiesExpression":
|
|
case "TSTypeAssertion":
|
|
return (n !== 64 || !i) && ["expression", !0];
|
|
default:
|
|
return super.isValidLVal(r, i, n);
|
|
}
|
|
}
|
|
parseBindingAtom() {
|
|
return this.state.type === 78 ? this.parseIdentifier(!0) : super.parseBindingAtom();
|
|
}
|
|
parseMaybeDecoratorArguments(r, i) {
|
|
if (this.match(47) || this.match(51)) {
|
|
let n = this.tsParseTypeArgumentsInExpression();
|
|
if (this.match(10)) {
|
|
let a = super.parseMaybeDecoratorArguments(r, i);
|
|
return a.typeParameters = n, a;
|
|
}
|
|
this.unexpected(null, 10);
|
|
}
|
|
return super.parseMaybeDecoratorArguments(r, i);
|
|
}
|
|
checkCommaAfterRest(r) {
|
|
return this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === r ? (this.next(), !1) : super.checkCommaAfterRest(
|
|
r);
|
|
}
|
|
isClassMethod() {
|
|
return this.match(47) || super.isClassMethod();
|
|
}
|
|
isClassProperty() {
|
|
return this.match(35) || this.match(14) || super.isClassProperty();
|
|
}
|
|
parseMaybeDefault(r, i) {
|
|
let n = super.parseMaybeDefault(r, i);
|
|
return n.type === "AssignmentPattern" && n.typeAnnotation && n.right.start < n.typeAnnotation.start && this.raise(Fe.TypeAnnotationAfterAssign,
|
|
n.typeAnnotation), n;
|
|
}
|
|
getTokenFromCode(r) {
|
|
if (this.state.inType) {
|
|
if (r === 62) {
|
|
this.finishOp(48, 1);
|
|
return;
|
|
}
|
|
if (r === 60) {
|
|
this.finishOp(47, 1);
|
|
return;
|
|
}
|
|
}
|
|
super.getTokenFromCode(r);
|
|
}
|
|
reScan_lt_gt() {
|
|
let {
|
|
type: r
|
|
} = this.state;
|
|
r === 47 ? (this.state.pos -= 1, this.readToken_lt()) : r === 48 && (this.state.pos -= 1, this.readToken_gt());
|
|
}
|
|
reScan_lt() {
|
|
let {
|
|
type: r
|
|
} = this.state;
|
|
return r === 51 ? (this.state.pos -= 2, this.finishOp(47, 1), 47) : r;
|
|
}
|
|
toAssignableListItem(r, i, n) {
|
|
let a = r[i];
|
|
a.type === "TSTypeCastExpression" && (r[i] = this.typeCastToParameter(a)), super.toAssignableListItem(r, i, n);
|
|
}
|
|
typeCastToParameter(r) {
|
|
return r.expression.typeAnnotation = r.typeAnnotation, this.resetEndLocation(r.expression, r.typeAnnotation.loc.end), r.expression;
|
|
}
|
|
shouldParseArrow(r) {
|
|
return this.match(14) ? r.every((i) => this.isAssignable(i, !0)) : super.shouldParseArrow(r);
|
|
}
|
|
shouldParseAsyncArrow() {
|
|
return this.match(14) || super.shouldParseAsyncArrow();
|
|
}
|
|
canHaveLeadingDecorator() {
|
|
return super.canHaveLeadingDecorator() || this.isAbstractClass();
|
|
}
|
|
jsxParseOpeningElementAfterName(r) {
|
|
if (this.match(47) || this.match(51)) {
|
|
let i = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression());
|
|
i && (r.typeParameters = i);
|
|
}
|
|
return super.jsxParseOpeningElementAfterName(r);
|
|
}
|
|
getGetterSetterExpectedParamCount(r) {
|
|
let i = super.getGetterSetterExpectedParamCount(r), a = this.getObjectOrClassMethodParams(r)[0];
|
|
return a && this.isThisParam(a) ? i + 1 : i;
|
|
}
|
|
parseCatchClauseParam() {
|
|
let r = super.parseCatchClauseParam(), i = this.tsTryParseTypeAnnotation();
|
|
return i && (r.typeAnnotation = i, this.resetEndLocation(r)), r;
|
|
}
|
|
tsInAmbientContext(r) {
|
|
let {
|
|
isAmbientContext: i,
|
|
strict: n
|
|
} = this.state;
|
|
this.state.isAmbientContext = !0, this.state.strict = !1;
|
|
try {
|
|
return r();
|
|
} finally {
|
|
this.state.isAmbientContext = i, this.state.strict = n;
|
|
}
|
|
}
|
|
parseClass(r, i, n) {
|
|
let a = this.state.inAbstractClass;
|
|
this.state.inAbstractClass = !!r.abstract;
|
|
try {
|
|
return super.parseClass(r, i, n);
|
|
} finally {
|
|
this.state.inAbstractClass = a;
|
|
}
|
|
}
|
|
tsParseAbstractDeclaration(r, i) {
|
|
if (this.match(80))
|
|
return r.abstract = !0, this.maybeTakeDecorators(i, this.parseClass(r, !0, !1));
|
|
if (this.isContextual(129)) {
|
|
if (!this.hasFollowingLineBreak())
|
|
return r.abstract = !0, this.raise(Fe.NonClassMethodPropertyHasAbstractModifer, r), this.tsParseInterfaceDeclaration(r);
|
|
} else
|
|
this.unexpected(null, 80);
|
|
}
|
|
parseMethod(r, i, n, a, o, u, l) {
|
|
let c = super.parseMethod(r, i, n, a, o, u, l);
|
|
if (c.abstract && (this.hasPlugin("estree") ? c.value : c).body) {
|
|
let {
|
|
key: h
|
|
} = c;
|
|
this.raise(Fe.AbstractMethodHasImplementation, c, {
|
|
methodName: h.type === "Identifier" && !c.computed ? h.name : `[${this.input.slice(this.offsetToSourcePos(h.start), this.offsetToSourcePos(
|
|
h.end))}]`
|
|
});
|
|
}
|
|
return c;
|
|
}
|
|
tsParseTypeParameterName() {
|
|
return this.parseIdentifier().name;
|
|
}
|
|
shouldParseAsAmbientContext() {
|
|
return !!this.getPluginOption("typescript", "dts");
|
|
}
|
|
parse() {
|
|
return this.shouldParseAsAmbientContext() && (this.state.isAmbientContext = !0), super.parse();
|
|
}
|
|
getExpression() {
|
|
return this.shouldParseAsAmbientContext() && (this.state.isAmbientContext = !0), super.getExpression();
|
|
}
|
|
parseExportSpecifier(r, i, n, a) {
|
|
return !i && a ? (this.parseTypeOnlyImportExportSpecifier(r, !1, n), this.finishNode(r, "ExportSpecifier")) : (r.exportKind = "value",
|
|
super.parseExportSpecifier(r, i, n, a));
|
|
}
|
|
parseImportSpecifier(r, i, n, a, o) {
|
|
return !i && a ? (this.parseTypeOnlyImportExportSpecifier(r, !0, n), this.finishNode(r, "ImportSpecifier")) : (r.importKind = "value",
|
|
super.parseImportSpecifier(r, i, n, a, n ? 4098 : 4096));
|
|
}
|
|
parseTypeOnlyImportExportSpecifier(r, i, n) {
|
|
let a = i ? "imported" : "local", o = i ? "local" : "exported", u = r[a], l, c = !1, f = !0, m = u.loc.start;
|
|
if (this.isContextual(93)) {
|
|
let d = this.parseIdentifier();
|
|
if (this.isContextual(93)) {
|
|
let y = this.parseIdentifier();
|
|
Sn(this.state.type) ? (c = !0, u = d, l = i ? this.parseIdentifier() : this.parseModuleExportName(), f = !1) : (l = y, f = !1);
|
|
} else Sn(this.state.type) ? (f = !1, l = i ? this.parseIdentifier() : this.parseModuleExportName()) : (c = !0, u = d);
|
|
} else Sn(this.state.type) && (c = !0, i ? (u = this.parseIdentifier(!0), this.isContextual(93) || this.checkReservedWord(u.name, u.loc.
|
|
start, !0, !0)) : u = this.parseModuleExportName());
|
|
c && n && this.raise(i ? Fe.TypeModifierIsUsedInTypeImports : Fe.TypeModifierIsUsedInTypeExports, m), r[a] = u, r[o] = l;
|
|
let h = i ? "importKind" : "exportKind";
|
|
r[h] = c ? "type" : "value", f && this.eatContextual(93) && (r[o] = i ? this.parseIdentifier() : this.parseModuleExportName()), r[o] ||
|
|
(r[o] = Ws(r[a])), i && this.checkIdentifier(r[o], c ? 4098 : 4096);
|
|
}
|
|
}, "typescript");
|
|
function sPe(e) {
|
|
if (e.type !== "MemberExpression") return !1;
|
|
let {
|
|
computed: t,
|
|
property: r
|
|
} = e;
|
|
return t && r.type !== "StringLiteral" && (r.type !== "TemplateLiteral" || r.expressions.length > 0) ? !1 : T9(e.object);
|
|
}
|
|
s(sPe, "isPossiblyLiteralEnum");
|
|
function aPe(e, t) {
|
|
var r;
|
|
let {
|
|
type: i
|
|
} = e;
|
|
if ((r = e.extra) != null && r.parenthesized)
|
|
return !1;
|
|
if (t) {
|
|
if (i === "Literal") {
|
|
let {
|
|
value: n
|
|
} = e;
|
|
if (typeof n == "string" || typeof n == "boolean")
|
|
return !0;
|
|
}
|
|
} else if (i === "StringLiteral" || i === "BooleanLiteral")
|
|
return !0;
|
|
return !!(S9(e, t) || oPe(e, t) || i === "TemplateLiteral" && e.expressions.length === 0 || sPe(e));
|
|
}
|
|
s(aPe, "isValidAmbientConstInitializer");
|
|
function S9(e, t) {
|
|
return t ? e.type === "Literal" && (typeof e.value == "number" || "bigint" in e) : e.type === "NumericLiteral" || e.type === "BigIntLite\
|
|
ral";
|
|
}
|
|
s(S9, "isNumber");
|
|
function oPe(e, t) {
|
|
if (e.type === "UnaryExpression") {
|
|
let {
|
|
operator: r,
|
|
argument: i
|
|
} = e;
|
|
if (r === "-" && S9(i, t))
|
|
return !0;
|
|
}
|
|
return !1;
|
|
}
|
|
s(oPe, "isNegativeNumber");
|
|
function T9(e) {
|
|
return e.type === "Identifier" ? !0 : e.type !== "MemberExpression" || e.computed ? !1 : T9(e.object);
|
|
}
|
|
s(T9, "isUncomputedMemberExpressionChain");
|
|
var o9 = Us`placeholders`({
|
|
ClassNameIsRequired: "A class name is required.",
|
|
UnexpectedSpace: "Unexpected space in placeholder."
|
|
}), uPe = /* @__PURE__ */ s((e) => class extends e {
|
|
static {
|
|
s(this, "PlaceholdersParserMixin");
|
|
}
|
|
parsePlaceholder(r) {
|
|
if (this.match(133)) {
|
|
let i = this.startNode();
|
|
return this.next(), this.assertNoSpace(), i.name = super.parseIdentifier(!0), this.assertNoSpace(), this.expect(133), this.finishPlaceholder(
|
|
i, r);
|
|
}
|
|
}
|
|
finishPlaceholder(r, i) {
|
|
let n = r;
|
|
return (!n.expectedNode || !n.type) && (n = this.finishNode(n, "Placeholder")), n.expectedNode = i, n;
|
|
}
|
|
getTokenFromCode(r) {
|
|
r === 37 && this.input.charCodeAt(this.state.pos + 1) === 37 ? this.finishOp(133, 2) : super.getTokenFromCode(r);
|
|
}
|
|
parseExprAtom(r) {
|
|
return this.parsePlaceholder("Expression") || super.parseExprAtom(r);
|
|
}
|
|
parseIdentifier(r) {
|
|
return this.parsePlaceholder("Identifier") || super.parseIdentifier(r);
|
|
}
|
|
checkReservedWord(r, i, n, a) {
|
|
r !== void 0 && super.checkReservedWord(r, i, n, a);
|
|
}
|
|
parseBindingAtom() {
|
|
return this.parsePlaceholder("Pattern") || super.parseBindingAtom();
|
|
}
|
|
isValidLVal(r, i, n) {
|
|
return r === "Placeholder" || super.isValidLVal(r, i, n);
|
|
}
|
|
toAssignable(r, i) {
|
|
r && r.type === "Placeholder" && r.expectedNode === "Expression" ? r.expectedNode = "Pattern" : super.toAssignable(r, i);
|
|
}
|
|
chStartsBindingIdentifier(r, i) {
|
|
return !!(super.chStartsBindingIdentifier(r, i) || this.lookahead().type === 133);
|
|
}
|
|
verifyBreakContinue(r, i) {
|
|
r.label && r.label.type === "Placeholder" || super.verifyBreakContinue(r, i);
|
|
}
|
|
parseExpressionStatement(r, i) {
|
|
var n;
|
|
if (i.type !== "Placeholder" || (n = i.extra) != null && n.parenthesized)
|
|
return super.parseExpressionStatement(r, i);
|
|
if (this.match(14)) {
|
|
let o = r;
|
|
return o.label = this.finishPlaceholder(i, "Identifier"), this.next(), o.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration(),
|
|
this.finishNode(o, "LabeledStatement");
|
|
}
|
|
this.semicolon();
|
|
let a = r;
|
|
return a.name = i.name, this.finishPlaceholder(a, "Statement");
|
|
}
|
|
parseBlock(r, i, n) {
|
|
return this.parsePlaceholder("BlockStatement") || super.parseBlock(r, i, n);
|
|
}
|
|
parseFunctionId(r) {
|
|
return this.parsePlaceholder("Identifier") || super.parseFunctionId(r);
|
|
}
|
|
parseClass(r, i, n) {
|
|
let a = i ? "ClassDeclaration" : "ClassExpression";
|
|
this.next();
|
|
let o = this.state.strict, u = this.parsePlaceholder("Identifier");
|
|
if (u)
|
|
if (this.match(81) || this.match(133) || this.match(5))
|
|
r.id = u;
|
|
else {
|
|
if (n || !i)
|
|
return r.id = null, r.body = this.finishPlaceholder(u, "ClassBody"), this.finishNode(r, a);
|
|
throw this.raise(o9.ClassNameIsRequired, this.state.startLoc);
|
|
}
|
|
else
|
|
this.parseClassId(r, i, n);
|
|
return super.parseClassSuper(r), r.body = this.parsePlaceholder("ClassBody") || super.parseClassBody(!!r.superClass, o), this.finishNode(
|
|
r, a);
|
|
}
|
|
parseExport(r, i) {
|
|
let n = this.parsePlaceholder("Identifier");
|
|
if (!n) return super.parseExport(r, i);
|
|
let a = r;
|
|
if (!this.isContextual(98) && !this.match(12))
|
|
return a.specifiers = [], a.source = null, a.declaration = this.finishPlaceholder(n, "Declaration"), this.finishNode(a, "ExportNamed\
|
|
Declaration");
|
|
this.expectPlugin("exportDefaultFrom");
|
|
let o = this.startNode();
|
|
return o.exported = n, a.specifiers = [this.finishNode(o, "ExportDefaultSpecifier")], super.parseExport(a, i);
|
|
}
|
|
isExportDefaultSpecifier() {
|
|
if (this.match(65)) {
|
|
let r = this.nextTokenStart();
|
|
if (this.isUnparsedContextual(r, "from") && this.input.startsWith(La(133), this.nextTokenStartSince(r + 4)))
|
|
return !0;
|
|
}
|
|
return super.isExportDefaultSpecifier();
|
|
}
|
|
maybeParseExportDefaultSpecifier(r, i) {
|
|
var n;
|
|
return (n = r.specifiers) != null && n.length ? !0 : super.maybeParseExportDefaultSpecifier(r, i);
|
|
}
|
|
checkExport(r) {
|
|
let {
|
|
specifiers: i
|
|
} = r;
|
|
i != null && i.length && (r.specifiers = i.filter((n) => n.exported.type === "Placeholder")), super.checkExport(r), r.specifiers = i;
|
|
}
|
|
parseImport(r) {
|
|
let i = this.parsePlaceholder("Identifier");
|
|
if (!i) return super.parseImport(r);
|
|
if (r.specifiers = [], !this.isContextual(98) && !this.match(12))
|
|
return r.source = this.finishPlaceholder(i, "StringLiteral"), this.semicolon(), this.finishNode(r, "ImportDeclaration");
|
|
let n = this.startNodeAtNode(i);
|
|
return n.local = i, r.specifiers.push(this.finishNode(n, "ImportDefaultSpecifier")), this.eat(12) && (this.maybeParseStarImportSpecifier(
|
|
r) || this.parseNamedImportSpecifiers(r)), this.expectContextual(98), r.source = this.parseImportSource(), this.semicolon(), this.finishNode(
|
|
r, "ImportDeclaration");
|
|
}
|
|
parseImportSource() {
|
|
return this.parsePlaceholder("StringLiteral") || super.parseImportSource();
|
|
}
|
|
assertNoSpace() {
|
|
this.state.start > this.offsetToSourcePos(this.state.lastTokEndLoc.index) && this.raise(o9.UnexpectedSpace, this.state.lastTokEndLoc);
|
|
}
|
|
}, "placeholders"), lPe = /* @__PURE__ */ s((e) => class extends e {
|
|
static {
|
|
s(this, "V8IntrinsicMixin");
|
|
}
|
|
parseV8Intrinsic() {
|
|
if (this.match(54)) {
|
|
let r = this.state.startLoc, i = this.startNode();
|
|
if (this.next(), xt(this.state.type)) {
|
|
let n = this.parseIdentifierName(), a = this.createIdentifier(i, n);
|
|
if (a.type = "V8IntrinsicIdentifier", this.match(10))
|
|
return a;
|
|
}
|
|
this.unexpected(r);
|
|
}
|
|
}
|
|
parseExprAtom(r) {
|
|
return this.parseV8Intrinsic() || super.parseExprAtom(r);
|
|
}
|
|
}, "v8intrinsic"), u9 = ["minimal", "fsharp", "hack", "smart"], l9 = ["^^", "@@", "^", "%", "#"];
|
|
function cPe(e) {
|
|
if (e.has("decorators")) {
|
|
if (e.has("decorators-legacy"))
|
|
throw new Error("Cannot use the decorators and decorators-legacy plugin together");
|
|
let r = e.get("decorators").decoratorsBeforeExport;
|
|
if (r != null && typeof r != "boolean")
|
|
throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");
|
|
let i = e.get("decorators").allowCallParenthesized;
|
|
if (i != null && typeof i != "boolean")
|
|
throw new Error("'allowCallParenthesized' must be a boolean.");
|
|
}
|
|
if (e.has("flow") && e.has("typescript"))
|
|
throw new Error("Cannot combine flow and typescript plugins.");
|
|
if (e.has("placeholders") && e.has("v8intrinsic"))
|
|
throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
|
|
if (e.has("pipelineOperator")) {
|
|
var t;
|
|
let r = e.get("pipelineOperator").proposal;
|
|
if (!u9.includes(r)) {
|
|
let n = u9.map((a) => `"${a}"`).join(", ");
|
|
throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${n}.`);
|
|
}
|
|
let i = ((t = e.get("recordAndTuple")) == null ? void 0 : t.syntaxType) === "hash";
|
|
if (r === "hack") {
|
|
if (e.has("placeholders"))
|
|
throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");
|
|
if (e.has("v8intrinsic"))
|
|
throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");
|
|
let n = e.get("pipelineOperator").topicToken;
|
|
if (!l9.includes(n)) {
|
|
let a = l9.map((o) => `"${o}"`).join(", ");
|
|
throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${a}\
|
|
.`);
|
|
}
|
|
if (n === "#" && i)
|
|
throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["\
|
|
recordAndTuple", e.get("recordAndTuple")])}\`.`);
|
|
} else if (r === "smart" && i)
|
|
throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple", e.
|
|
get("recordAndTuple")])}\`.`);
|
|
}
|
|
if (e.has("moduleAttributes")) {
|
|
if (e.has("deprecatedImportAssert") || e.has("importAssertions"))
|
|
throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");
|
|
if (e.get("moduleAttributes").version !== "may-2020")
|
|
throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the on\
|
|
ly supported value is 'may-2020'.");
|
|
}
|
|
if (e.has("importAssertions") && e.has("deprecatedImportAssert"))
|
|
throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");
|
|
if (!e.has("deprecatedImportAssert") && e.has("importAttributes") && e.get("importAttributes").deprecatedAssertSyntax && e.set("deprecat\
|
|
edImportAssert", {}), e.has("recordAndTuple")) {
|
|
let r = e.get("recordAndTuple").syntaxType;
|
|
if (r != null) {
|
|
let i = ["hash", "bar"];
|
|
if (!i.includes(r))
|
|
throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + i.map((n) => `'${n}'`).join(", "));
|
|
}
|
|
}
|
|
if (e.has("asyncDoExpressions") && !e.has("doExpressions")) {
|
|
let r = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
|
|
throw r.missingPlugins = "doExpressions", r;
|
|
}
|
|
if (e.has("optionalChainingAssign") && e.get("optionalChainingAssign").version !== "2023-07")
|
|
throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, th\
|
|
e only supported value is '2023-07'.");
|
|
}
|
|
s(cPe, "validatePlugins");
|
|
var C9 = {
|
|
estree: d2e,
|
|
jsx: ePe,
|
|
flow: Z2e,
|
|
typescript: nPe,
|
|
v8intrinsic: lPe,
|
|
placeholders: uPe
|
|
}, fPe = Object.keys(C9), $T = class extends WT {
|
|
static {
|
|
s(this, "ExpressionParser");
|
|
}
|
|
checkProto(t, r, i, n) {
|
|
if (t.type === "SpreadElement" || this.isObjectMethod(t) || t.computed || t.shorthand)
|
|
return i;
|
|
let a = t.key;
|
|
return (a.type === "Identifier" ? a.name : a.value) === "__proto__" ? r ? (this.raise(L.RecordNoProto, a), !0) : (i && (n ? n.doubleProtoLoc ===
|
|
null && (n.doubleProtoLoc = a.loc.start) : this.raise(L.DuplicateProto, a)), !0) : i;
|
|
}
|
|
shouldExitDescending(t, r) {
|
|
return t.type === "ArrowFunctionExpression" && this.offsetToSourcePos(t.start) === r;
|
|
}
|
|
getExpression() {
|
|
this.enterInitialScopes(), this.nextToken();
|
|
let t = this.parseExpression();
|
|
return this.match(140) || this.unexpected(), this.finalizeRemainingComments(), t.comments = this.comments, t.errors = this.state.errors,
|
|
this.optionFlags & 256 && (t.tokens = this.tokens), t;
|
|
}
|
|
parseExpression(t, r) {
|
|
return t ? this.disallowInAnd(() => this.parseExpressionBase(r)) : this.allowInAnd(() => this.parseExpressionBase(r));
|
|
}
|
|
parseExpressionBase(t) {
|
|
let r = this.state.startLoc, i = this.parseMaybeAssign(t);
|
|
if (this.match(12)) {
|
|
let n = this.startNodeAt(r);
|
|
for (n.expressions = [i]; this.eat(12); )
|
|
n.expressions.push(this.parseMaybeAssign(t));
|
|
return this.toReferencedList(n.expressions), this.finishNode(n, "SequenceExpression");
|
|
}
|
|
return i;
|
|
}
|
|
parseMaybeAssignDisallowIn(t, r) {
|
|
return this.disallowInAnd(() => this.parseMaybeAssign(t, r));
|
|
}
|
|
parseMaybeAssignAllowIn(t, r) {
|
|
return this.allowInAnd(() => this.parseMaybeAssign(t, r));
|
|
}
|
|
setOptionalParametersError(t) {
|
|
t.optionalParametersLoc = this.state.startLoc;
|
|
}
|
|
parseMaybeAssign(t, r) {
|
|
let i = this.state.startLoc, n = this.isContextual(108);
|
|
if (n && this.prodParam.hasYield) {
|
|
this.next();
|
|
let l = this.parseYield(i);
|
|
return r && (l = r.call(this, l, i)), l;
|
|
}
|
|
let a;
|
|
t ? a = !1 : (t = new Ml(), a = !0);
|
|
let {
|
|
type: o
|
|
} = this.state;
|
|
(o === 10 || xt(o)) && (this.state.potentialArrowAt = this.state.start);
|
|
let u = this.parseMaybeConditional(t);
|
|
if (r && (u = r.call(this, u, i)), g2e(this.state.type)) {
|
|
let l = this.startNodeAt(i), c = this.state.value;
|
|
if (l.operator = c, this.match(29)) {
|
|
this.toAssignable(u, !0), l.left = u;
|
|
let f = i.index;
|
|
t.doubleProtoLoc != null && t.doubleProtoLoc.index >= f && (t.doubleProtoLoc = null), t.shorthandAssignLoc != null && t.shorthandAssignLoc.
|
|
index >= f && (t.shorthandAssignLoc = null), t.privateKeyLoc != null && t.privateKeyLoc.index >= f && (this.checkDestructuringPrivate(
|
|
t), t.privateKeyLoc = null);
|
|
} else
|
|
l.left = u;
|
|
return this.next(), l.right = this.parseMaybeAssign(), this.checkLVal(u, this.finishNode(l, "AssignmentExpression")), l;
|
|
} else a && this.checkExpressionErrors(t, !0);
|
|
if (n) {
|
|
let {
|
|
type: l
|
|
} = this.state;
|
|
if ((this.hasPlugin("v8intrinsic") ? Ed(l) : Ed(l) && !this.match(54)) && !this.isAmbiguousPrefixOrIdentifier())
|
|
return this.raiseOverwrite(L.YieldNotInGeneratorFunction, i), this.parseYield(i);
|
|
}
|
|
return u;
|
|
}
|
|
parseMaybeConditional(t) {
|
|
let r = this.state.startLoc, i = this.state.potentialArrowAt, n = this.parseExprOps(t);
|
|
return this.shouldExitDescending(n, i) ? n : this.parseConditional(n, r, t);
|
|
}
|
|
parseConditional(t, r, i) {
|
|
if (this.eat(17)) {
|
|
let n = this.startNodeAt(r);
|
|
return n.test = t, n.consequent = this.parseMaybeAssignAllowIn(), this.expect(14), n.alternate = this.parseMaybeAssign(), this.finishNode(
|
|
n, "ConditionalExpression");
|
|
}
|
|
return t;
|
|
}
|
|
parseMaybeUnaryOrPrivate(t) {
|
|
return this.match(139) ? this.parsePrivateName() : this.parseMaybeUnary(t);
|
|
}
|
|
parseExprOps(t) {
|
|
let r = this.state.startLoc, i = this.state.potentialArrowAt, n = this.parseMaybeUnaryOrPrivate(t);
|
|
return this.shouldExitDescending(n, i) ? n : this.parseExprOp(n, r, -1);
|
|
}
|
|
parseExprOp(t, r, i) {
|
|
if (this.isPrivateName(t)) {
|
|
let a = this.getPrivateNameSV(t);
|
|
(i >= Sy(58) || !this.prodParam.hasIn || !this.match(58)) && this.raise(L.PrivateInExpectedIn, t, {
|
|
identifierName: a
|
|
}), this.classScope.usePrivateName(a, t.loc.start);
|
|
}
|
|
let n = this.state.type;
|
|
if (D2e(n) && (this.prodParam.hasIn || !this.match(58))) {
|
|
let a = Sy(n);
|
|
if (a > i) {
|
|
if (n === 39) {
|
|
if (this.expectPlugin("pipelineOperator"), this.state.inFSharpPipelineDirectBody)
|
|
return t;
|
|
this.checkPipelineAtInfixOperator(t, r);
|
|
}
|
|
let o = this.startNodeAt(r);
|
|
o.left = t, o.operator = this.state.value;
|
|
let u = n === 41 || n === 42, l = n === 40;
|
|
if (l && (a = Sy(42)), this.next(), n === 39 && this.hasPlugin(["pipelineOperator", {
|
|
proposal: "minimal"
|
|
}]) && this.state.type === 96 && this.prodParam.hasAwait)
|
|
throw this.raise(L.UnexpectedAwaitAfterPipelineBody, this.state.startLoc);
|
|
o.right = this.parseExprOpRightExpr(n, a);
|
|
let c = this.finishNode(o, u || l ? "LogicalExpression" : "BinaryExpression"), f = this.state.type;
|
|
if (l && (f === 41 || f === 42) || u && f === 40)
|
|
throw this.raise(L.MixingCoalesceWithLogical, this.state.startLoc);
|
|
return this.parseExprOp(c, r, i);
|
|
}
|
|
}
|
|
return t;
|
|
}
|
|
parseExprOpRightExpr(t, r) {
|
|
let i = this.state.startLoc;
|
|
switch (t) {
|
|
case 39:
|
|
switch (this.getPluginOption("pipelineOperator", "proposal")) {
|
|
case "hack":
|
|
return this.withTopicBindingContext(() => this.parseHackPipeBody());
|
|
case "fsharp":
|
|
return this.withSoloAwaitPermittingContext(() => this.parseFSharpPipelineBody(r));
|
|
}
|
|
if (this.getPluginOption("pipelineOperator", "proposal") === "smart")
|
|
return this.withTopicBindingContext(() => {
|
|
if (this.prodParam.hasYield && this.isContextual(108))
|
|
throw this.raise(L.PipeBodyIsTighter, this.state.startLoc);
|
|
return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t, r), i);
|
|
});
|
|
default:
|
|
return this.parseExprOpBaseRightExpr(t, r);
|
|
}
|
|
}
|
|
parseExprOpBaseRightExpr(t, r) {
|
|
let i = this.state.startLoc;
|
|
return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), i, T2e(t) ? r - 1 : r);
|
|
}
|
|
parseHackPipeBody() {
|
|
var t;
|
|
let {
|
|
startLoc: r
|
|
} = this.state, i = this.parseMaybeAssign();
|
|
return s2e.has(i.type) && !((t = i.extra) != null && t.parenthesized) && this.raise(L.PipeUnparenthesizedBody, r, {
|
|
type: i.type
|
|
}), this.topicReferenceWasUsedInCurrentContext() || this.raise(L.PipeTopicUnused, r), i;
|
|
}
|
|
checkExponentialAfterUnary(t) {
|
|
this.match(57) && this.raise(L.UnexpectedTokenUnaryExponentiation, t.argument);
|
|
}
|
|
parseMaybeUnary(t, r) {
|
|
let i = this.state.startLoc, n = this.isContextual(96);
|
|
if (n && this.recordAwaitIfAllowed()) {
|
|
this.next();
|
|
let l = this.parseAwait(i);
|
|
return r || this.checkExponentialAfterUnary(l), l;
|
|
}
|
|
let a = this.match(34), o = this.startNode();
|
|
if (E2e(this.state.type)) {
|
|
o.operator = this.state.value, o.prefix = !0, this.match(72) && this.expectPlugin("throwExpressions");
|
|
let l = this.match(89);
|
|
if (this.next(), o.argument = this.parseMaybeUnary(null, !0), this.checkExpressionErrors(t, !0), this.state.strict && l) {
|
|
let c = o.argument;
|
|
c.type === "Identifier" ? this.raise(L.StrictDelete, o) : this.hasPropertyAsPrivateName(c) && this.raise(L.DeletePrivateField, o);
|
|
}
|
|
if (!a)
|
|
return r || this.checkExponentialAfterUnary(o), this.finishNode(o, "UnaryExpression");
|
|
}
|
|
let u = this.parseUpdate(o, a, t);
|
|
if (n) {
|
|
let {
|
|
type: l
|
|
} = this.state;
|
|
if ((this.hasPlugin("v8intrinsic") ? Ed(l) : Ed(l) && !this.match(54)) && !this.isAmbiguousPrefixOrIdentifier())
|
|
return this.raiseOverwrite(L.AwaitNotInAsyncContext, i), this.parseAwait(i);
|
|
}
|
|
return u;
|
|
}
|
|
parseUpdate(t, r, i) {
|
|
if (r) {
|
|
let o = t;
|
|
return this.checkLVal(o.argument, this.finishNode(o, "UpdateExpression")), t;
|
|
}
|
|
let n = this.state.startLoc, a = this.parseExprSubscripts(i);
|
|
if (this.checkExpressionErrors(i, !1)) return a;
|
|
for (; v2e(this.state.type) && !this.canInsertSemicolon(); ) {
|
|
let o = this.startNodeAt(n);
|
|
o.operator = this.state.value, o.prefix = !1, o.argument = a, this.next(), this.checkLVal(a, a = this.finishNode(o, "UpdateExpressio\
|
|
n"));
|
|
}
|
|
return a;
|
|
}
|
|
parseExprSubscripts(t) {
|
|
let r = this.state.startLoc, i = this.state.potentialArrowAt, n = this.parseExprAtom(t);
|
|
return this.shouldExitDescending(n, i) ? n : this.parseSubscripts(n, r);
|
|
}
|
|
parseSubscripts(t, r, i) {
|
|
let n = {
|
|
optionalChainMember: !1,
|
|
maybeAsyncArrow: this.atPossibleAsyncArrow(t),
|
|
stop: !1
|
|
};
|
|
do
|
|
t = this.parseSubscript(t, r, i, n), n.maybeAsyncArrow = !1;
|
|
while (!n.stop);
|
|
return t;
|
|
}
|
|
parseSubscript(t, r, i, n) {
|
|
let {
|
|
type: a
|
|
} = this.state;
|
|
if (!i && a === 15)
|
|
return this.parseBind(t, r, i, n);
|
|
if (wy(a))
|
|
return this.parseTaggedTemplateExpression(t, r, n);
|
|
let o = !1;
|
|
if (a === 18) {
|
|
if (i && (this.raise(L.OptionalChainingNoNew, this.state.startLoc), this.lookaheadCharCode() === 40))
|
|
return n.stop = !0, t;
|
|
n.optionalChainMember = o = !0, this.next();
|
|
}
|
|
if (!i && this.match(10))
|
|
return this.parseCoverCallAndAsyncArrowHead(t, r, n, o);
|
|
{
|
|
let u = this.eat(0);
|
|
return u || o || this.eat(16) ? this.parseMember(t, r, n, u, o) : (n.stop = !0, t);
|
|
}
|
|
}
|
|
parseMember(t, r, i, n, a) {
|
|
let o = this.startNodeAt(r);
|
|
return o.object = t, o.computed = n, n ? (o.property = this.parseExpression(), this.expect(3)) : this.match(139) ? (t.type === "Super" &&
|
|
this.raise(L.SuperPrivateField, r), this.classScope.usePrivateName(this.state.value, this.state.startLoc), o.property = this.parsePrivateName()) :
|
|
o.property = this.parseIdentifier(!0), i.optionalChainMember ? (o.optional = a, this.finishNode(o, "OptionalMemberExpression")) : this.
|
|
finishNode(o, "MemberExpression");
|
|
}
|
|
parseBind(t, r, i, n) {
|
|
let a = this.startNodeAt(r);
|
|
return a.object = t, this.next(), a.callee = this.parseNoCallExpr(), n.stop = !0, this.parseSubscripts(this.finishNode(a, "BindExpress\
|
|
ion"), r, i);
|
|
}
|
|
parseCoverCallAndAsyncArrowHead(t, r, i, n) {
|
|
let a = this.state.maybeInArrowParameters, o = null;
|
|
this.state.maybeInArrowParameters = !0, this.next();
|
|
let u = this.startNodeAt(r);
|
|
u.callee = t;
|
|
let {
|
|
maybeAsyncArrow: l,
|
|
optionalChainMember: c
|
|
} = i;
|
|
l && (this.expressionScope.enter(V2e()), o = new Ml()), c && (u.optional = n), n ? u.arguments = this.parseCallExpressionArguments(11) :
|
|
u.arguments = this.parseCallExpressionArguments(11, t.type !== "Super", u, o);
|
|
let f = this.finishCallExpression(u, c);
|
|
return l && this.shouldParseAsyncArrow() && !n ? (i.stop = !0, this.checkDestructuringPrivate(o), this.expressionScope.validateAsPattern(),
|
|
this.expressionScope.exit(), f = this.parseAsyncArrowFromCallExpression(this.startNodeAt(r), f)) : (l && (this.checkExpressionErrors(o,
|
|
!0), this.expressionScope.exit()), this.toReferencedArguments(f)), this.state.maybeInArrowParameters = a, f;
|
|
}
|
|
toReferencedArguments(t, r) {
|
|
this.toReferencedListDeep(t.arguments, r);
|
|
}
|
|
parseTaggedTemplateExpression(t, r, i) {
|
|
let n = this.startNodeAt(r);
|
|
return n.tag = t, n.quasi = this.parseTemplate(!0), i.optionalChainMember && this.raise(L.OptionalChainingNoTemplate, r), this.finishNode(
|
|
n, "TaggedTemplateExpression");
|
|
}
|
|
atPossibleAsyncArrow(t) {
|
|
return t.type === "Identifier" && t.name === "async" && this.state.lastTokEndLoc.index === t.end && !this.canInsertSemicolon() && t.end -
|
|
t.start === 5 && this.offsetToSourcePos(t.start) === this.state.potentialArrowAt;
|
|
}
|
|
finishCallExpression(t, r) {
|
|
if (t.callee.type === "Import")
|
|
if (t.arguments.length === 0 || t.arguments.length > 2)
|
|
this.raise(L.ImportCallArity, t);
|
|
else
|
|
for (let i of t.arguments)
|
|
i.type === "SpreadElement" && this.raise(L.ImportCallSpreadArgument, i);
|
|
return this.finishNode(t, r ? "OptionalCallExpression" : "CallExpression");
|
|
}
|
|
parseCallExpressionArguments(t, r, i, n) {
|
|
let a = [], o = !0, u = this.state.inFSharpPipelineDirectBody;
|
|
for (this.state.inFSharpPipelineDirectBody = !1; !this.eat(t); ) {
|
|
if (o)
|
|
o = !1;
|
|
else if (this.expect(12), this.match(t)) {
|
|
i && this.addTrailingCommaExtraToNode(i), this.next();
|
|
break;
|
|
}
|
|
a.push(this.parseExprListItem(!1, n, r));
|
|
}
|
|
return this.state.inFSharpPipelineDirectBody = u, a;
|
|
}
|
|
shouldParseAsyncArrow() {
|
|
return this.match(19) && !this.canInsertSemicolon();
|
|
}
|
|
parseAsyncArrowFromCallExpression(t, r) {
|
|
var i;
|
|
return this.resetPreviousNodeTrailingComments(r), this.expect(19), this.parseArrowExpression(t, r.arguments, !0, (i = r.extra) == null ?
|
|
void 0 : i.trailingCommaLoc), r.innerComments && wd(t, r.innerComments), r.callee.trailingComments && wd(t, r.callee.trailingComments),
|
|
t;
|
|
}
|
|
parseNoCallExpr() {
|
|
let t = this.state.startLoc;
|
|
return this.parseSubscripts(this.parseExprAtom(), t, !0);
|
|
}
|
|
parseExprAtom(t) {
|
|
let r, i = null, {
|
|
type: n
|
|
} = this.state;
|
|
switch (n) {
|
|
case 79:
|
|
return this.parseSuper();
|
|
case 83:
|
|
return r = this.startNode(), this.next(), this.match(16) ? this.parseImportMetaProperty(r) : this.match(10) ? this.optionFlags & 512 ?
|
|
this.parseImportCall(r) : this.finishNode(r, "Import") : (this.raise(L.UnsupportedImport, this.state.lastTokStartLoc), this.finishNode(
|
|
r, "Import"));
|
|
case 78:
|
|
return r = this.startNode(), this.next(), this.finishNode(r, "ThisExpression");
|
|
case 90:
|
|
return this.parseDo(this.startNode(), !1);
|
|
case 56:
|
|
case 31:
|
|
return this.readRegexp(), this.parseRegExpLiteral(this.state.value);
|
|
case 135:
|
|
return this.parseNumericLiteral(this.state.value);
|
|
case 136:
|
|
return this.parseBigIntLiteral(this.state.value);
|
|
case 134:
|
|
return this.parseStringLiteral(this.state.value);
|
|
case 84:
|
|
return this.parseNullLiteral();
|
|
case 85:
|
|
return this.parseBooleanLiteral(!0);
|
|
case 86:
|
|
return this.parseBooleanLiteral(!1);
|
|
case 10: {
|
|
let a = this.state.potentialArrowAt === this.state.start;
|
|
return this.parseParenAndDistinguishExpression(a);
|
|
}
|
|
case 2:
|
|
case 1:
|
|
return this.parseArrayLike(this.state.type === 2 ? 4 : 3, !1, !0);
|
|
case 0:
|
|
return this.parseArrayLike(3, !0, !1, t);
|
|
case 6:
|
|
case 7:
|
|
return this.parseObjectLike(this.state.type === 6 ? 9 : 8, !1, !0);
|
|
case 5:
|
|
return this.parseObjectLike(8, !1, !1, t);
|
|
case 68:
|
|
return this.parseFunctionOrFunctionSent();
|
|
case 26:
|
|
i = this.parseDecorators();
|
|
case 80:
|
|
return this.parseClass(this.maybeTakeDecorators(i, this.startNode()), !1);
|
|
case 77:
|
|
return this.parseNewOrNewTarget();
|
|
case 25:
|
|
case 24:
|
|
return this.parseTemplate(!1);
|
|
case 15: {
|
|
r = this.startNode(), this.next(), r.object = null;
|
|
let a = r.callee = this.parseNoCallExpr();
|
|
if (a.type === "MemberExpression")
|
|
return this.finishNode(r, "BindExpression");
|
|
throw this.raise(L.UnsupportedBind, a);
|
|
}
|
|
case 139:
|
|
return this.raise(L.PrivateInExpectedIn, this.state.startLoc, {
|
|
identifierName: this.state.value
|
|
}), this.parsePrivateName();
|
|
case 33:
|
|
return this.parseTopicReferenceThenEqualsSign(54, "%");
|
|
case 32:
|
|
return this.parseTopicReferenceThenEqualsSign(44, "^");
|
|
case 37:
|
|
case 38:
|
|
return this.parseTopicReference("hack");
|
|
case 44:
|
|
case 54:
|
|
case 27: {
|
|
let a = this.getPluginOption("pipelineOperator", "proposal");
|
|
if (a)
|
|
return this.parseTopicReference(a);
|
|
this.unexpected();
|
|
break;
|
|
}
|
|
case 47: {
|
|
let a = this.input.codePointAt(this.nextTokenStart());
|
|
qs(a) || a === 62 ? this.expectOnePlugin(["jsx", "flow", "typescript"]) : this.unexpected();
|
|
break;
|
|
}
|
|
default:
|
|
if (n === 137)
|
|
return this.parseDecimalLiteral(this.state.value);
|
|
if (xt(n)) {
|
|
if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123)
|
|
return this.parseModuleExpression();
|
|
let a = this.state.potentialArrowAt === this.state.start, o = this.state.containsEsc, u = this.parseIdentifier();
|
|
if (!o && u.name === "async" && !this.canInsertSemicolon()) {
|
|
let {
|
|
type: l
|
|
} = this.state;
|
|
if (l === 68)
|
|
return this.resetPreviousNodeTrailingComments(u), this.next(), this.parseAsyncFunctionExpression(this.startNodeAtNode(u));
|
|
if (xt(l))
|
|
return this.lookaheadCharCode() === 61 ? this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(u)) : u;
|
|
if (l === 90)
|
|
return this.resetPreviousNodeTrailingComments(u), this.parseDo(this.startNodeAtNode(u), !0);
|
|
}
|
|
return a && this.match(19) && !this.canInsertSemicolon() ? (this.next(), this.parseArrowExpression(this.startNodeAtNode(u), [u],
|
|
!1)) : u;
|
|
} else
|
|
this.unexpected();
|
|
}
|
|
}
|
|
parseTopicReferenceThenEqualsSign(t, r) {
|
|
let i = this.getPluginOption("pipelineOperator", "proposal");
|
|
if (i)
|
|
return this.state.type = t, this.state.value = r, this.state.pos--, this.state.end--, this.state.endLoc = yi(this.state.endLoc, -1),
|
|
this.parseTopicReference(i);
|
|
this.unexpected();
|
|
}
|
|
parseTopicReference(t) {
|
|
let r = this.startNode(), i = this.state.startLoc, n = this.state.type;
|
|
return this.next(), this.finishTopicReference(r, i, t, n);
|
|
}
|
|
finishTopicReference(t, r, i, n) {
|
|
if (this.testTopicReferenceConfiguration(i, r, n))
|
|
return i === "hack" ? (this.topicReferenceIsAllowedInCurrentContext() || this.raise(L.PipeTopicUnbound, r), this.registerTopicReference(),
|
|
this.finishNode(t, "TopicReference")) : (this.topicReferenceIsAllowedInCurrentContext() || this.raise(L.PrimaryTopicNotAllowed, r), this.
|
|
registerTopicReference(), this.finishNode(t, "PipelinePrimaryTopicReference"));
|
|
throw this.raise(L.PipeTopicUnconfiguredToken, r, {
|
|
token: La(n)
|
|
});
|
|
}
|
|
testTopicReferenceConfiguration(t, r, i) {
|
|
switch (t) {
|
|
case "hack":
|
|
return this.hasPlugin(["pipelineOperator", {
|
|
topicToken: La(i)
|
|
}]);
|
|
case "smart":
|
|
return i === 27;
|
|
default:
|
|
throw this.raise(L.PipeTopicRequiresHackPipes, r);
|
|
}
|
|
}
|
|
parseAsyncArrowUnaryFunction(t) {
|
|
this.prodParam.enter(Ty(!0, this.prodParam.hasYield));
|
|
let r = [this.parseIdentifier()];
|
|
return this.prodParam.exit(), this.hasPrecedingLineBreak() && this.raise(L.LineTerminatorBeforeArrow, this.state.curPosition()), this.
|
|
expect(19), this.parseArrowExpression(t, r, !0);
|
|
}
|
|
parseDo(t, r) {
|
|
this.expectPlugin("doExpressions"), r && this.expectPlugin("asyncDoExpressions"), t.async = r, this.next();
|
|
let i = this.state.labels;
|
|
return this.state.labels = [], r ? (this.prodParam.enter(2), t.body = this.parseBlock(), this.prodParam.exit()) : t.body = this.parseBlock(),
|
|
this.state.labels = i, this.finishNode(t, "DoExpression");
|
|
}
|
|
parseSuper() {
|
|
let t = this.startNode();
|
|
return this.next(), this.match(10) && !this.scope.allowDirectSuper && !(this.optionFlags & 16) ? this.raise(L.SuperNotAllowed, t) : !this.
|
|
scope.allowSuper && !(this.optionFlags & 16) && this.raise(L.UnexpectedSuper, t), !this.match(10) && !this.match(0) && !this.match(16) &&
|
|
this.raise(L.UnsupportedSuper, t), this.finishNode(t, "Super");
|
|
}
|
|
parsePrivateName() {
|
|
let t = this.startNode(), r = this.startNodeAt(yi(this.state.startLoc, 1)), i = this.state.value;
|
|
return this.next(), t.id = this.createIdentifier(r, i), this.finishNode(t, "PrivateName");
|
|
}
|
|
parseFunctionOrFunctionSent() {
|
|
let t = this.startNode();
|
|
if (this.next(), this.prodParam.hasYield && this.match(16)) {
|
|
let r = this.createIdentifier(this.startNodeAtNode(t), "function");
|
|
return this.next(), this.match(103) ? this.expectPlugin("functionSent") : this.hasPlugin("functionSent") || this.unexpected(), this.
|
|
parseMetaProperty(t, r, "sent");
|
|
}
|
|
return this.parseFunction(t);
|
|
}
|
|
parseMetaProperty(t, r, i) {
|
|
t.meta = r;
|
|
let n = this.state.containsEsc;
|
|
return t.property = this.parseIdentifier(!0), (t.property.name !== i || n) && this.raise(L.UnsupportedMetaProperty, t.property, {
|
|
target: r.name,
|
|
onlyValidPropertyName: i
|
|
}), this.finishNode(t, "MetaProperty");
|
|
}
|
|
parseImportMetaProperty(t) {
|
|
let r = this.createIdentifier(this.startNodeAtNode(t), "import");
|
|
if (this.next(), this.isContextual(101))
|
|
this.inModule || this.raise(L.ImportMetaOutsideModule, r), this.sawUnambiguousESM = !0;
|
|
else if (this.isContextual(105) || this.isContextual(97)) {
|
|
let i = this.isContextual(105);
|
|
if (this.expectPlugin(i ? "sourcePhaseImports" : "deferredImportEvaluation"), !(this.optionFlags & 512))
|
|
throw this.raise(L.DynamicImportPhaseRequiresImportExpressions, this.state.startLoc, {
|
|
phase: this.state.value
|
|
});
|
|
return this.next(), t.phase = i ? "source" : "defer", this.parseImportCall(t);
|
|
}
|
|
return this.parseMetaProperty(t, r, "meta");
|
|
}
|
|
parseLiteralAtNode(t, r, i) {
|
|
return this.addExtra(i, "rawValue", t), this.addExtra(i, "raw", this.input.slice(this.offsetToSourcePos(i.start), this.state.end)), i.
|
|
value = t, this.next(), this.finishNode(i, r);
|
|
}
|
|
parseLiteral(t, r) {
|
|
let i = this.startNode();
|
|
return this.parseLiteralAtNode(t, r, i);
|
|
}
|
|
parseStringLiteral(t) {
|
|
return this.parseLiteral(t, "StringLiteral");
|
|
}
|
|
parseNumericLiteral(t) {
|
|
return this.parseLiteral(t, "NumericLiteral");
|
|
}
|
|
parseBigIntLiteral(t) {
|
|
return this.parseLiteral(t, "BigIntLiteral");
|
|
}
|
|
parseDecimalLiteral(t) {
|
|
return this.parseLiteral(t, "DecimalLiteral");
|
|
}
|
|
parseRegExpLiteral(t) {
|
|
let r = this.startNode();
|
|
return this.addExtra(r, "raw", this.input.slice(this.offsetToSourcePos(r.start), this.state.end)), r.pattern = t.pattern, r.flags = t.
|
|
flags, this.next(), this.finishNode(r, "RegExpLiteral");
|
|
}
|
|
parseBooleanLiteral(t) {
|
|
let r = this.startNode();
|
|
return r.value = t, this.next(), this.finishNode(r, "BooleanLiteral");
|
|
}
|
|
parseNullLiteral() {
|
|
let t = this.startNode();
|
|
return this.next(), this.finishNode(t, "NullLiteral");
|
|
}
|
|
parseParenAndDistinguishExpression(t) {
|
|
let r = this.state.startLoc, i;
|
|
this.next(), this.expressionScope.enter($2e());
|
|
let n = this.state.maybeInArrowParameters, a = this.state.inFSharpPipelineDirectBody;
|
|
this.state.maybeInArrowParameters = !0, this.state.inFSharpPipelineDirectBody = !1;
|
|
let o = this.state.startLoc, u = [], l = new Ml(), c = !0, f, m;
|
|
for (; !this.match(11); ) {
|
|
if (c)
|
|
c = !1;
|
|
else if (this.expect(12, l.optionalParametersLoc === null ? null : l.optionalParametersLoc), this.match(11)) {
|
|
m = this.state.startLoc;
|
|
break;
|
|
}
|
|
if (this.match(21)) {
|
|
let y = this.state.startLoc;
|
|
if (f = this.state.startLoc, u.push(this.parseParenItem(this.parseRestBinding(), y)), !this.checkCommaAfterRest(41))
|
|
break;
|
|
} else
|
|
u.push(this.parseMaybeAssignAllowIn(l, this.parseParenItem));
|
|
}
|
|
let h = this.state.lastTokEndLoc;
|
|
this.expect(11), this.state.maybeInArrowParameters = n, this.state.inFSharpPipelineDirectBody = a;
|
|
let d = this.startNodeAt(r);
|
|
return t && this.shouldParseArrow(u) && (d = this.parseArrow(d)) ? (this.checkDestructuringPrivate(l), this.expressionScope.validateAsPattern(),
|
|
this.expressionScope.exit(), this.parseArrowExpression(d, u, !1), d) : (this.expressionScope.exit(), u.length || this.unexpected(this.
|
|
state.lastTokStartLoc), m && this.unexpected(m), f && this.unexpected(f), this.checkExpressionErrors(l, !0), this.toReferencedListDeep(
|
|
u, !0), u.length > 1 ? (i = this.startNodeAt(o), i.expressions = u, this.finishNode(i, "SequenceExpression"), this.resetEndLocation(i,
|
|
h)) : i = u[0], this.wrapParenthesis(r, i));
|
|
}
|
|
wrapParenthesis(t, r) {
|
|
if (!(this.optionFlags & 1024))
|
|
return this.addExtra(r, "parenthesized", !0), this.addExtra(r, "parenStart", t.index), this.takeSurroundingComments(r, t.index, this.
|
|
state.lastTokEndLoc.index), r;
|
|
let i = this.startNodeAt(t);
|
|
return i.expression = r, this.finishNode(i, "ParenthesizedExpression");
|
|
}
|
|
shouldParseArrow(t) {
|
|
return !this.canInsertSemicolon();
|
|
}
|
|
parseArrow(t) {
|
|
if (this.eat(19))
|
|
return t;
|
|
}
|
|
parseParenItem(t, r) {
|
|
return t;
|
|
}
|
|
parseNewOrNewTarget() {
|
|
let t = this.startNode();
|
|
if (this.next(), this.match(16)) {
|
|
let r = this.createIdentifier(this.startNodeAtNode(t), "new");
|
|
this.next();
|
|
let i = this.parseMetaProperty(t, r, "target");
|
|
return !this.scope.inNonArrowFunction && !this.scope.inClass && !(this.optionFlags & 4) && this.raise(L.UnexpectedNewTarget, i), i;
|
|
}
|
|
return this.parseNew(t);
|
|
}
|
|
parseNew(t) {
|
|
if (this.parseNewCallee(t), this.eat(10)) {
|
|
let r = this.parseExprList(11);
|
|
this.toReferencedList(r), t.arguments = r;
|
|
} else
|
|
t.arguments = [];
|
|
return this.finishNode(t, "NewExpression");
|
|
}
|
|
parseNewCallee(t) {
|
|
let r = this.match(83), i = this.parseNoCallExpr();
|
|
t.callee = i, r && (i.type === "Import" || i.type === "ImportExpression") && this.raise(L.ImportCallNotNewExpression, i);
|
|
}
|
|
parseTemplateElement(t) {
|
|
let {
|
|
start: r,
|
|
startLoc: i,
|
|
end: n,
|
|
value: a
|
|
} = this.state, o = r + 1, u = this.startNodeAt(yi(i, 1));
|
|
a === null && (t || this.raise(L.InvalidEscapeSequenceTemplate, yi(this.state.firstInvalidTemplateEscapePos, 1)));
|
|
let l = this.match(24), c = l ? -1 : -2, f = n + c;
|
|
u.value = {
|
|
raw: this.input.slice(o, f).replace(/\r\n?/g, `
|
|
`),
|
|
cooked: a === null ? null : a.slice(1, c)
|
|
}, u.tail = l, this.next();
|
|
let m = this.finishNode(u, "TemplateElement");
|
|
return this.resetEndLocation(m, yi(this.state.lastTokEndLoc, c)), m;
|
|
}
|
|
parseTemplate(t) {
|
|
let r = this.startNode(), i = this.parseTemplateElement(t), n = [i], a = [];
|
|
for (; !i.tail; )
|
|
a.push(this.parseTemplateSubstitution()), this.readTemplateContinuation(), n.push(i = this.parseTemplateElement(t));
|
|
return r.expressions = a, r.quasis = n, this.finishNode(r, "TemplateLiteral");
|
|
}
|
|
parseTemplateSubstitution() {
|
|
return this.parseExpression();
|
|
}
|
|
parseObjectLike(t, r, i, n) {
|
|
i && this.expectPlugin("recordAndTuple");
|
|
let a = this.state.inFSharpPipelineDirectBody;
|
|
this.state.inFSharpPipelineDirectBody = !1;
|
|
let o = !1, u = !0, l = this.startNode();
|
|
for (l.properties = [], this.next(); !this.match(t); ) {
|
|
if (u)
|
|
u = !1;
|
|
else if (this.expect(12), this.match(t)) {
|
|
this.addTrailingCommaExtraToNode(l);
|
|
break;
|
|
}
|
|
let f;
|
|
r ? f = this.parseBindingProperty() : (f = this.parsePropertyDefinition(n), o = this.checkProto(f, i, o, n)), i && !this.isObjectProperty(
|
|
f) && f.type !== "SpreadElement" && this.raise(L.InvalidRecordProperty, f), f.shorthand && this.addExtra(f, "shorthand", !0), l.properties.
|
|
push(f);
|
|
}
|
|
this.next(), this.state.inFSharpPipelineDirectBody = a;
|
|
let c = "ObjectExpression";
|
|
return r ? c = "ObjectPattern" : i && (c = "RecordExpression"), this.finishNode(l, c);
|
|
}
|
|
addTrailingCommaExtraToNode(t) {
|
|
this.addExtra(t, "trailingComma", this.state.lastTokStartLoc.index), this.addExtra(t, "trailingCommaLoc", this.state.lastTokStartLoc, !1);
|
|
}
|
|
maybeAsyncOrAccessorProp(t) {
|
|
return !t.computed && t.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55));
|
|
}
|
|
parsePropertyDefinition(t) {
|
|
let r = [];
|
|
if (this.match(26))
|
|
for (this.hasPlugin("decorators") && this.raise(L.UnsupportedPropertyDecorator, this.state.startLoc); this.match(26); )
|
|
r.push(this.parseDecorator());
|
|
let i = this.startNode(), n = !1, a = !1, o;
|
|
if (this.match(21))
|
|
return r.length && this.unexpected(), this.parseSpread();
|
|
r.length && (i.decorators = r, r = []), i.method = !1, t && (o = this.state.startLoc);
|
|
let u = this.eat(55);
|
|
this.parsePropertyNamePrefixOperator(i);
|
|
let l = this.state.containsEsc;
|
|
if (this.parsePropertyName(i, t), !u && !l && this.maybeAsyncOrAccessorProp(i)) {
|
|
let {
|
|
key: c
|
|
} = i, f = c.name;
|
|
f === "async" && !this.hasPrecedingLineBreak() && (n = !0, this.resetPreviousNodeTrailingComments(c), u = this.eat(55), this.parsePropertyName(
|
|
i)), (f === "get" || f === "set") && (a = !0, this.resetPreviousNodeTrailingComments(c), i.kind = f, this.match(55) && (u = !0, this.
|
|
raise(L.AccessorIsGenerator, this.state.curPosition(), {
|
|
kind: f
|
|
}), this.next()), this.parsePropertyName(i));
|
|
}
|
|
return this.parseObjPropValue(i, o, u, n, !1, a, t);
|
|
}
|
|
getGetterSetterExpectedParamCount(t) {
|
|
return t.kind === "get" ? 0 : 1;
|
|
}
|
|
getObjectOrClassMethodParams(t) {
|
|
return t.params;
|
|
}
|
|
checkGetterSetterParams(t) {
|
|
var r;
|
|
let i = this.getGetterSetterExpectedParamCount(t), n = this.getObjectOrClassMethodParams(t);
|
|
n.length !== i && this.raise(t.kind === "get" ? L.BadGetterArity : L.BadSetterArity, t), t.kind === "set" && ((r = n[n.length - 1]) ==
|
|
null ? void 0 : r.type) === "RestElement" && this.raise(L.BadSetterRestParameter, t);
|
|
}
|
|
parseObjectMethod(t, r, i, n, a) {
|
|
if (a) {
|
|
let o = this.parseMethod(t, r, !1, !1, !1, "ObjectMethod");
|
|
return this.checkGetterSetterParams(o), o;
|
|
}
|
|
if (i || r || this.match(10))
|
|
return n && this.unexpected(), t.kind = "method", t.method = !0, this.parseMethod(t, r, i, !1, !1, "ObjectMethod");
|
|
}
|
|
parseObjectProperty(t, r, i, n) {
|
|
if (t.shorthand = !1, this.eat(14))
|
|
return t.value = i ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowIn(n), this.finishNode(t, "ObjectProper\
|
|
ty");
|
|
if (!t.computed && t.key.type === "Identifier") {
|
|
if (this.checkReservedWord(t.key.name, t.key.loc.start, !0, !1), i)
|
|
t.value = this.parseMaybeDefault(r, Ws(t.key));
|
|
else if (this.match(29)) {
|
|
let a = this.state.startLoc;
|
|
n != null ? n.shorthandAssignLoc === null && (n.shorthandAssignLoc = a) : this.raise(L.InvalidCoverInitializedName, a), t.value = this.
|
|
parseMaybeDefault(r, Ws(t.key));
|
|
} else
|
|
t.value = Ws(t.key);
|
|
return t.shorthand = !0, this.finishNode(t, "ObjectProperty");
|
|
}
|
|
}
|
|
parseObjPropValue(t, r, i, n, a, o, u) {
|
|
let l = this.parseObjectMethod(t, i, n, a, o) || this.parseObjectProperty(t, r, a, u);
|
|
return l || this.unexpected(), l;
|
|
}
|
|
parsePropertyName(t, r) {
|
|
if (this.eat(0))
|
|
t.computed = !0, t.key = this.parseMaybeAssignAllowIn(), this.expect(3);
|
|
else {
|
|
let {
|
|
type: i,
|
|
value: n
|
|
} = this.state, a;
|
|
if (Sn(i))
|
|
a = this.parseIdentifier(!0);
|
|
else
|
|
switch (i) {
|
|
case 135:
|
|
a = this.parseNumericLiteral(n);
|
|
break;
|
|
case 134:
|
|
a = this.parseStringLiteral(n);
|
|
break;
|
|
case 136:
|
|
a = this.parseBigIntLiteral(n);
|
|
break;
|
|
case 139: {
|
|
let o = this.state.startLoc;
|
|
r != null ? r.privateKeyLoc === null && (r.privateKeyLoc = o) : this.raise(L.UnexpectedPrivateField, o), a = this.parsePrivateName();
|
|
break;
|
|
}
|
|
default:
|
|
if (i === 137) {
|
|
a = this.parseDecimalLiteral(n);
|
|
break;
|
|
}
|
|
this.unexpected();
|
|
}
|
|
t.key = a, i !== 139 && (t.computed = !1);
|
|
}
|
|
}
|
|
initFunction(t, r) {
|
|
t.id = null, t.generator = !1, t.async = r;
|
|
}
|
|
parseMethod(t, r, i, n, a, o, u = !1) {
|
|
this.initFunction(t, i), t.generator = r, this.scope.enter(18 | (u ? 64 : 0) | (a ? 32 : 0)), this.prodParam.enter(Ty(i, t.generator)),
|
|
this.parseFunctionParams(t, n);
|
|
let l = this.parseFunctionBodyAndFinish(t, o, !0);
|
|
return this.prodParam.exit(), this.scope.exit(), l;
|
|
}
|
|
parseArrayLike(t, r, i, n) {
|
|
i && this.expectPlugin("recordAndTuple");
|
|
let a = this.state.inFSharpPipelineDirectBody;
|
|
this.state.inFSharpPipelineDirectBody = !1;
|
|
let o = this.startNode();
|
|
return this.next(), o.elements = this.parseExprList(t, !i, n, o), this.state.inFSharpPipelineDirectBody = a, this.finishNode(o, i ? "T\
|
|
upleExpression" : "ArrayExpression");
|
|
}
|
|
parseArrowExpression(t, r, i, n) {
|
|
this.scope.enter(6);
|
|
let a = Ty(i, !1);
|
|
!this.match(5) && this.prodParam.hasIn && (a |= 8), this.prodParam.enter(a), this.initFunction(t, i);
|
|
let o = this.state.maybeInArrowParameters;
|
|
return r && (this.state.maybeInArrowParameters = !0, this.setArrowFunctionParameters(t, r, n)), this.state.maybeInArrowParameters = !1,
|
|
this.parseFunctionBody(t, !0), this.prodParam.exit(), this.scope.exit(), this.state.maybeInArrowParameters = o, this.finishNode(t, "Ar\
|
|
rowFunctionExpression");
|
|
}
|
|
setArrowFunctionParameters(t, r, i) {
|
|
this.toAssignableList(r, i, !1), t.params = r;
|
|
}
|
|
parseFunctionBodyAndFinish(t, r, i = !1) {
|
|
return this.parseFunctionBody(t, !1, i), this.finishNode(t, r);
|
|
}
|
|
parseFunctionBody(t, r, i = !1) {
|
|
let n = r && !this.match(5);
|
|
if (this.expressionScope.enter(E9()), n)
|
|
t.body = this.parseMaybeAssign(), this.checkParams(t, !1, r, !1);
|
|
else {
|
|
let a = this.state.strict, o = this.state.labels;
|
|
this.state.labels = [], this.prodParam.enter(this.prodParam.currentFlags() | 4), t.body = this.parseBlock(!0, !1, (u) => {
|
|
let l = !this.isSimpleParamList(t.params);
|
|
u && l && this.raise(L.IllegalLanguageModeDirective, (t.kind === "method" || t.kind === "constructor") && t.key ? t.key.loc.end : t);
|
|
let c = !a && this.state.strict;
|
|
this.checkParams(t, !this.state.strict && !r && !i && !l, r, c), this.state.strict && t.id && this.checkIdentifier(t.id, 65, c);
|
|
}), this.prodParam.exit(), this.state.labels = o;
|
|
}
|
|
this.expressionScope.exit();
|
|
}
|
|
isSimpleParameter(t) {
|
|
return t.type === "Identifier";
|
|
}
|
|
isSimpleParamList(t) {
|
|
for (let r = 0, i = t.length; r < i; r++)
|
|
if (!this.isSimpleParameter(t[r])) return !1;
|
|
return !0;
|
|
}
|
|
checkParams(t, r, i, n = !0) {
|
|
let a = !r && /* @__PURE__ */ new Set(), o = {
|
|
type: "FormalParameters"
|
|
};
|
|
for (let u of t.params)
|
|
this.checkLVal(u, o, 5, a, n);
|
|
}
|
|
parseExprList(t, r, i, n) {
|
|
let a = [], o = !0;
|
|
for (; !this.eat(t); ) {
|
|
if (o)
|
|
o = !1;
|
|
else if (this.expect(12), this.match(t)) {
|
|
n && this.addTrailingCommaExtraToNode(n), this.next();
|
|
break;
|
|
}
|
|
a.push(this.parseExprListItem(r, i));
|
|
}
|
|
return a;
|
|
}
|
|
parseExprListItem(t, r, i) {
|
|
let n;
|
|
if (this.match(12))
|
|
t || this.raise(L.UnexpectedToken, this.state.curPosition(), {
|
|
unexpected: ","
|
|
}), n = null;
|
|
else if (this.match(21)) {
|
|
let a = this.state.startLoc;
|
|
n = this.parseParenItem(this.parseSpread(r), a);
|
|
} else if (this.match(17)) {
|
|
this.expectPlugin("partialApplication"), i || this.raise(L.UnexpectedArgumentPlaceholder, this.state.startLoc);
|
|
let a = this.startNode();
|
|
this.next(), n = this.finishNode(a, "ArgumentPlaceholder");
|
|
} else
|
|
n = this.parseMaybeAssignAllowIn(r, this.parseParenItem);
|
|
return n;
|
|
}
|
|
parseIdentifier(t) {
|
|
let r = this.startNode(), i = this.parseIdentifierName(t);
|
|
return this.createIdentifier(r, i);
|
|
}
|
|
createIdentifier(t, r) {
|
|
return t.name = r, t.loc.identifierName = r, this.finishNode(t, "Identifier");
|
|
}
|
|
parseIdentifierName(t) {
|
|
let r, {
|
|
startLoc: i,
|
|
type: n
|
|
} = this.state;
|
|
Sn(n) ? r = this.state.value : this.unexpected();
|
|
let a = m2e(n);
|
|
return t ? a && this.replaceToken(132) : this.checkReservedWord(r, i, a, !1), this.next(), r;
|
|
}
|
|
checkReservedWord(t, r, i, n) {
|
|
if (t.length > 10 || !B2e(t))
|
|
return;
|
|
if (i && I2e(t)) {
|
|
this.raise(L.UnexpectedKeyword, r, {
|
|
keyword: t
|
|
});
|
|
return;
|
|
}
|
|
if ((this.state.strict ? n ? g9 : m9 : h9)(t, this.inModule)) {
|
|
this.raise(L.UnexpectedReservedWord, r, {
|
|
reservedWord: t
|
|
});
|
|
return;
|
|
} else if (t === "yield") {
|
|
if (this.prodParam.hasYield) {
|
|
this.raise(L.YieldBindingIdentifier, r);
|
|
return;
|
|
}
|
|
} else if (t === "await") {
|
|
if (this.prodParam.hasAwait) {
|
|
this.raise(L.AwaitBindingIdentifier, r);
|
|
return;
|
|
}
|
|
if (this.scope.inStaticBlock) {
|
|
this.raise(L.AwaitBindingIdentifierInStaticBlock, r);
|
|
return;
|
|
}
|
|
this.expressionScope.recordAsyncArrowParametersError(r);
|
|
} else if (t === "arguments" && this.scope.inClassAndNotInNonArrowFunction) {
|
|
this.raise(L.ArgumentsInClass, r);
|
|
return;
|
|
}
|
|
}
|
|
recordAwaitIfAllowed() {
|
|
let t = this.prodParam.hasAwait || this.optionFlags & 1 && !this.scope.inFunction;
|
|
return t && !this.scope.inFunction && (this.state.hasTopLevelAwait = !0), t;
|
|
}
|
|
parseAwait(t) {
|
|
let r = this.startNodeAt(t);
|
|
return this.expressionScope.recordParameterInitializerError(L.AwaitExpressionFormalParameter, r), this.eat(55) && this.raise(L.ObsoleteAwaitStar,
|
|
r), !this.scope.inFunction && !(this.optionFlags & 1) && (this.isAmbiguousPrefixOrIdentifier() ? this.ambiguousScriptDifferentAst = !0 :
|
|
this.sawUnambiguousESM = !0), this.state.soloAwait || (r.argument = this.parseMaybeUnary(null, !0)), this.finishNode(r, "AwaitExpressi\
|
|
on");
|
|
}
|
|
isAmbiguousPrefixOrIdentifier() {
|
|
if (this.hasPrecedingLineBreak()) return !0;
|
|
let {
|
|
type: t
|
|
} = this.state;
|
|
return t === 53 || t === 10 || t === 0 || wy(t) || t === 102 && !this.state.containsEsc || t === 138 || t === 56 || this.hasPlugin("v8\
|
|
intrinsic") && t === 54;
|
|
}
|
|
parseYield(t) {
|
|
let r = this.startNodeAt(t);
|
|
this.expressionScope.recordParameterInitializerError(L.YieldInParameter, r);
|
|
let i = !1, n = null;
|
|
if (!this.hasPrecedingLineBreak())
|
|
switch (i = this.eat(55), this.state.type) {
|
|
case 13:
|
|
case 140:
|
|
case 8:
|
|
case 11:
|
|
case 3:
|
|
case 9:
|
|
case 14:
|
|
case 12:
|
|
if (!i) break;
|
|
default:
|
|
n = this.parseMaybeAssign();
|
|
}
|
|
return r.delegate = i, r.argument = n, this.finishNode(r, "YieldExpression");
|
|
}
|
|
parseImportCall(t) {
|
|
if (this.next(), t.source = this.parseMaybeAssignAllowIn(), t.options = null, this.eat(12) && !this.match(11) && (t.options = this.parseMaybeAssignAllowIn(),
|
|
this.eat(12) && !this.match(11))) {
|
|
do
|
|
this.parseMaybeAssignAllowIn();
|
|
while (this.eat(12) && !this.match(11));
|
|
this.raise(L.ImportCallArity, t);
|
|
}
|
|
return this.expect(11), this.finishNode(t, "ImportExpression");
|
|
}
|
|
checkPipelineAtInfixOperator(t, r) {
|
|
this.hasPlugin(["pipelineOperator", {
|
|
proposal: "smart"
|
|
}]) && t.type === "SequenceExpression" && this.raise(L.PipelineHeadSequenceExpression, r);
|
|
}
|
|
parseSmartPipelineBodyInStyle(t, r) {
|
|
if (this.isSimpleReference(t)) {
|
|
let i = this.startNodeAt(r);
|
|
return i.callee = t, this.finishNode(i, "PipelineBareFunction");
|
|
} else {
|
|
let i = this.startNodeAt(r);
|
|
return this.checkSmartPipeTopicBodyEarlyErrors(r), i.expression = t, this.finishNode(i, "PipelineTopicExpression");
|
|
}
|
|
}
|
|
isSimpleReference(t) {
|
|
switch (t.type) {
|
|
case "MemberExpression":
|
|
return !t.computed && this.isSimpleReference(t.object);
|
|
case "Identifier":
|
|
return !0;
|
|
default:
|
|
return !1;
|
|
}
|
|
}
|
|
checkSmartPipeTopicBodyEarlyErrors(t) {
|
|
if (this.match(19))
|
|
throw this.raise(L.PipelineBodyNoArrow, this.state.startLoc);
|
|
this.topicReferenceWasUsedInCurrentContext() || this.raise(L.PipelineTopicUnused, t);
|
|
}
|
|
withTopicBindingContext(t) {
|
|
let r = this.state.topicContext;
|
|
this.state.topicContext = {
|
|
maxNumOfResolvableTopics: 1,
|
|
maxTopicIndex: null
|
|
};
|
|
try {
|
|
return t();
|
|
} finally {
|
|
this.state.topicContext = r;
|
|
}
|
|
}
|
|
withSmartMixTopicForbiddingContext(t) {
|
|
if (this.hasPlugin(["pipelineOperator", {
|
|
proposal: "smart"
|
|
}])) {
|
|
let r = this.state.topicContext;
|
|
this.state.topicContext = {
|
|
maxNumOfResolvableTopics: 0,
|
|
maxTopicIndex: null
|
|
};
|
|
try {
|
|
return t();
|
|
} finally {
|
|
this.state.topicContext = r;
|
|
}
|
|
} else
|
|
return t();
|
|
}
|
|
withSoloAwaitPermittingContext(t) {
|
|
let r = this.state.soloAwait;
|
|
this.state.soloAwait = !0;
|
|
try {
|
|
return t();
|
|
} finally {
|
|
this.state.soloAwait = r;
|
|
}
|
|
}
|
|
allowInAnd(t) {
|
|
let r = this.prodParam.currentFlags();
|
|
if (8 & ~r) {
|
|
this.prodParam.enter(r | 8);
|
|
try {
|
|
return t();
|
|
} finally {
|
|
this.prodParam.exit();
|
|
}
|
|
}
|
|
return t();
|
|
}
|
|
disallowInAnd(t) {
|
|
let r = this.prodParam.currentFlags();
|
|
if (8 & r) {
|
|
this.prodParam.enter(r & -9);
|
|
try {
|
|
return t();
|
|
} finally {
|
|
this.prodParam.exit();
|
|
}
|
|
}
|
|
return t();
|
|
}
|
|
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(t) {
|
|
let r = this.state.startLoc;
|
|
this.state.potentialArrowAt = this.state.start;
|
|
let i = this.state.inFSharpPipelineDirectBody;
|
|
this.state.inFSharpPipelineDirectBody = !0;
|
|
let n = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), r, t);
|
|
return this.state.inFSharpPipelineDirectBody = i, n;
|
|
}
|
|
parseModuleExpression() {
|
|
this.expectPlugin("moduleBlocks");
|
|
let t = this.startNode();
|
|
this.next(), this.match(5) || this.unexpected(null, 5);
|
|
let r = this.startNodeAt(this.state.endLoc);
|
|
this.next();
|
|
let i = this.initializeScopes(!0);
|
|
this.enterInitialScopes();
|
|
try {
|
|
t.body = this.parseProgram(r, 8, "module");
|
|
} finally {
|
|
i();
|
|
}
|
|
return this.finishNode(t, "ModuleExpression");
|
|
}
|
|
parsePropertyNamePrefixOperator(t) {
|
|
}
|
|
}, TT = {
|
|
kind: 1
|
|
}, dPe = {
|
|
kind: 2
|
|
}, pPe = /[\uD800-\uDFFF]/u, CT = /in(?:stanceof)?/y;
|
|
function hPe(e, t, r) {
|
|
for (let i = 0; i < e.length; i++) {
|
|
let n = e[i], {
|
|
type: a
|
|
} = n;
|
|
if (typeof a == "number") {
|
|
{
|
|
if (a === 139) {
|
|
let {
|
|
loc: o,
|
|
start: u,
|
|
value: l,
|
|
end: c
|
|
} = n, f = u + 1, m = yi(o.start, 1);
|
|
e.splice(i, 1, new es({
|
|
type: js(27),
|
|
value: "#",
|
|
start: u,
|
|
end: f,
|
|
startLoc: o.start,
|
|
endLoc: m
|
|
}), new es({
|
|
type: js(132),
|
|
value: l,
|
|
start: f,
|
|
end: c,
|
|
startLoc: m,
|
|
endLoc: o.end
|
|
})), i++;
|
|
continue;
|
|
}
|
|
if (wy(a)) {
|
|
let {
|
|
loc: o,
|
|
start: u,
|
|
value: l,
|
|
end: c
|
|
} = n, f = u + 1, m = yi(o.start, 1), h;
|
|
t.charCodeAt(u - r) === 96 ? h = new es({
|
|
type: js(22),
|
|
value: "`",
|
|
start: u,
|
|
end: f,
|
|
startLoc: o.start,
|
|
endLoc: m
|
|
}) : h = new es({
|
|
type: js(8),
|
|
value: "}",
|
|
start: u,
|
|
end: f,
|
|
startLoc: o.start,
|
|
endLoc: m
|
|
});
|
|
let d, y, p, g;
|
|
a === 24 ? (y = c - 1, p = yi(o.end, -1), d = l === null ? null : l.slice(1, -1), g = new es({
|
|
type: js(22),
|
|
value: "`",
|
|
start: y,
|
|
end: c,
|
|
startLoc: p,
|
|
endLoc: o.end
|
|
})) : (y = c - 2, p = yi(o.end, -2), d = l === null ? null : l.slice(1, -2), g = new es({
|
|
type: js(23),
|
|
value: "${",
|
|
start: y,
|
|
end: c,
|
|
startLoc: p,
|
|
endLoc: o.end
|
|
})), e.splice(i, 1, h, new es({
|
|
type: js(20),
|
|
value: d,
|
|
start: f,
|
|
end: y,
|
|
startLoc: m,
|
|
endLoc: p
|
|
}), g), i += 2;
|
|
continue;
|
|
}
|
|
}
|
|
n.type = js(a);
|
|
}
|
|
}
|
|
return e;
|
|
}
|
|
s(hPe, "babel7CompatTokens");
|
|
var VT = class extends $T {
|
|
static {
|
|
s(this, "StatementParser");
|
|
}
|
|
parseTopLevel(t, r) {
|
|
return t.program = this.parseProgram(r), t.comments = this.comments, this.optionFlags & 256 && (t.tokens = hPe(this.tokens, this.input,
|
|
this.startIndex)), this.finishNode(t, "File");
|
|
}
|
|
parseProgram(t, r = 140, i = this.options.sourceType) {
|
|
if (t.sourceType = i, t.interpreter = this.parseInterpreterDirective(), this.parseBlockBody(t, !0, !0, r), this.inModule) {
|
|
if (!(this.optionFlags & 64) && this.scope.undefinedExports.size > 0)
|
|
for (let [a, o] of Array.from(this.scope.undefinedExports))
|
|
this.raise(L.ModuleExportUndefined, o, {
|
|
localName: a
|
|
});
|
|
this.addExtra(t, "topLevelAwait", this.state.hasTopLevelAwait);
|
|
}
|
|
let n;
|
|
return r === 140 ? n = this.finishNode(t, "Program") : n = this.finishNodeAt(t, "Program", yi(this.state.startLoc, -1)), n;
|
|
}
|
|
stmtToDirective(t) {
|
|
let r = t;
|
|
r.type = "Directive", r.value = r.expression, delete r.expression;
|
|
let i = r.value, n = i.value, a = this.input.slice(this.offsetToSourcePos(i.start), this.offsetToSourcePos(i.end)), o = i.value = a.slice(
|
|
1, -1);
|
|
return this.addExtra(i, "raw", a), this.addExtra(i, "rawValue", o), this.addExtra(i, "expressionValue", n), i.type = "DirectiveLiteral",
|
|
r;
|
|
}
|
|
parseInterpreterDirective() {
|
|
if (!this.match(28))
|
|
return null;
|
|
let t = this.startNode();
|
|
return t.value = this.state.value, this.next(), this.finishNode(t, "InterpreterDirective");
|
|
}
|
|
isLet() {
|
|
return this.isContextual(100) ? this.hasFollowingBindingAtom() : !1;
|
|
}
|
|
chStartsBindingIdentifier(t, r) {
|
|
if (qs(t)) {
|
|
if (CT.lastIndex = r, CT.test(this.input)) {
|
|
let i = this.codePointAtPos(CT.lastIndex);
|
|
if (!Bl(i) && i !== 92)
|
|
return !1;
|
|
}
|
|
return !0;
|
|
} else return t === 92;
|
|
}
|
|
chStartsBindingPattern(t) {
|
|
return t === 91 || t === 123;
|
|
}
|
|
hasFollowingBindingAtom() {
|
|
let t = this.nextTokenStart(), r = this.codePointAtPos(t);
|
|
return this.chStartsBindingPattern(r) || this.chStartsBindingIdentifier(r, t);
|
|
}
|
|
hasInLineFollowingBindingIdentifierOrBrace() {
|
|
let t = this.nextTokenInLineStart(), r = this.codePointAtPos(t);
|
|
return r === 123 || this.chStartsBindingIdentifier(r, t);
|
|
}
|
|
startsUsingForOf() {
|
|
let {
|
|
type: t,
|
|
containsEsc: r
|
|
} = this.lookahead();
|
|
if (t === 102 && !r)
|
|
return !1;
|
|
if (xt(t) && !this.hasFollowingLineBreak())
|
|
return this.expectPlugin("explicitResourceManagement"), !0;
|
|
}
|
|
startsAwaitUsing() {
|
|
let t = this.nextTokenInLineStart();
|
|
if (this.isUnparsedContextual(t, "using")) {
|
|
t = this.nextTokenInLineStartSince(t + 5);
|
|
let r = this.codePointAtPos(t);
|
|
if (this.chStartsBindingIdentifier(r, t))
|
|
return this.expectPlugin("explicitResourceManagement"), !0;
|
|
}
|
|
return !1;
|
|
}
|
|
parseModuleItem() {
|
|
return this.parseStatementLike(15);
|
|
}
|
|
parseStatementListItem() {
|
|
return this.parseStatementLike(6 | (!this.options.annexB || this.state.strict ? 0 : 8));
|
|
}
|
|
parseStatementOrSloppyAnnexBFunctionDeclaration(t = !1) {
|
|
let r = 0;
|
|
return this.options.annexB && !this.state.strict && (r |= 4, t && (r |= 8)), this.parseStatementLike(r);
|
|
}
|
|
parseStatement() {
|
|
return this.parseStatementLike(0);
|
|
}
|
|
parseStatementLike(t) {
|
|
let r = null;
|
|
return this.match(26) && (r = this.parseDecorators(!0)), this.parseStatementContent(t, r);
|
|
}
|
|
parseStatementContent(t, r) {
|
|
let i = this.state.type, n = this.startNode(), a = !!(t & 2), o = !!(t & 4), u = t & 1;
|
|
switch (i) {
|
|
case 60:
|
|
return this.parseBreakContinueStatement(n, !0);
|
|
case 63:
|
|
return this.parseBreakContinueStatement(n, !1);
|
|
case 64:
|
|
return this.parseDebuggerStatement(n);
|
|
case 90:
|
|
return this.parseDoWhileStatement(n);
|
|
case 91:
|
|
return this.parseForStatement(n);
|
|
case 68:
|
|
if (this.lookaheadCharCode() === 46) break;
|
|
return o || this.raise(this.state.strict ? L.StrictFunction : this.options.annexB ? L.SloppyFunctionAnnexB : L.SloppyFunction, this.
|
|
state.startLoc), this.parseFunctionStatement(n, !1, !a && o);
|
|
case 80:
|
|
return a || this.unexpected(), this.parseClass(this.maybeTakeDecorators(r, n), !0);
|
|
case 69:
|
|
return this.parseIfStatement(n);
|
|
case 70:
|
|
return this.parseReturnStatement(n);
|
|
case 71:
|
|
return this.parseSwitchStatement(n);
|
|
case 72:
|
|
return this.parseThrowStatement(n);
|
|
case 73:
|
|
return this.parseTryStatement(n);
|
|
case 96:
|
|
if (!this.state.containsEsc && this.startsAwaitUsing())
|
|
return this.recordAwaitIfAllowed() ? a || this.raise(L.UnexpectedLexicalDeclaration, n) : this.raise(L.AwaitUsingNotInAsyncContext,
|
|
n), this.next(), this.parseVarStatement(n, "await using");
|
|
break;
|
|
case 107:
|
|
if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifierOrBrace())
|
|
break;
|
|
return this.expectPlugin("explicitResourceManagement"), !this.scope.inModule && this.scope.inTopLevel ? this.raise(L.UnexpectedUsingDeclaration,
|
|
this.state.startLoc) : a || this.raise(L.UnexpectedLexicalDeclaration, this.state.startLoc), this.parseVarStatement(n, "using");
|
|
case 100: {
|
|
if (this.state.containsEsc)
|
|
break;
|
|
let f = this.nextTokenStart(), m = this.codePointAtPos(f);
|
|
if (m !== 91 && (!a && this.hasFollowingLineBreak() || !this.chStartsBindingIdentifier(m, f) && m !== 123))
|
|
break;
|
|
}
|
|
case 75:
|
|
a || this.raise(L.UnexpectedLexicalDeclaration, this.state.startLoc);
|
|
case 74: {
|
|
let f = this.state.value;
|
|
return this.parseVarStatement(n, f);
|
|
}
|
|
case 92:
|
|
return this.parseWhileStatement(n);
|
|
case 76:
|
|
return this.parseWithStatement(n);
|
|
case 5:
|
|
return this.parseBlock();
|
|
case 13:
|
|
return this.parseEmptyStatement(n);
|
|
case 83: {
|
|
let f = this.lookaheadCharCode();
|
|
if (f === 40 || f === 46)
|
|
break;
|
|
}
|
|
case 82: {
|
|
!(this.optionFlags & 8) && !u && this.raise(L.UnexpectedImportExport, this.state.startLoc), this.next();
|
|
let f;
|
|
return i === 83 ? f = this.parseImport(n) : f = this.parseExport(n, r), this.assertModuleNodeAllowed(f), f;
|
|
}
|
|
default:
|
|
if (this.isAsyncFunction())
|
|
return a || this.raise(L.AsyncFunctionInSingleStatementContext, this.state.startLoc), this.next(), this.parseFunctionStatement(n,
|
|
!0, !a && o);
|
|
}
|
|
let l = this.state.value, c = this.parseExpression();
|
|
return xt(i) && c.type === "Identifier" && this.eat(14) ? this.parseLabeledStatement(n, l, c, t) : this.parseExpressionStatement(n, c,
|
|
r);
|
|
}
|
|
assertModuleNodeAllowed(t) {
|
|
!(this.optionFlags & 8) && !this.inModule && this.raise(L.ImportOutsideModule, t);
|
|
}
|
|
decoratorsEnabledBeforeExport() {
|
|
return this.hasPlugin("decorators-legacy") ? !0 : this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBefore\
|
|
Export") !== !1;
|
|
}
|
|
maybeTakeDecorators(t, r, i) {
|
|
if (t) {
|
|
var n;
|
|
(n = r.decorators) != null && n.length ? (typeof this.getPluginOption("decorators", "decoratorsBeforeExport") != "boolean" && this.raise(
|
|
L.DecoratorsBeforeAfterExport, r.decorators[0]), r.decorators.unshift(...t)) : r.decorators = t, this.resetStartLocationFromNode(r, t[0]),
|
|
i && this.resetStartLocationFromNode(i, r);
|
|
}
|
|
return r;
|
|
}
|
|
canHaveLeadingDecorator() {
|
|
return this.match(80);
|
|
}
|
|
parseDecorators(t) {
|
|
let r = [];
|
|
do
|
|
r.push(this.parseDecorator());
|
|
while (this.match(26));
|
|
if (this.match(82))
|
|
t || this.unexpected(), this.decoratorsEnabledBeforeExport() || this.raise(L.DecoratorExportClass, this.state.startLoc);
|
|
else if (!this.canHaveLeadingDecorator())
|
|
throw this.raise(L.UnexpectedLeadingDecorator, this.state.startLoc);
|
|
return r;
|
|
}
|
|
parseDecorator() {
|
|
this.expectOnePlugin(["decorators", "decorators-legacy"]);
|
|
let t = this.startNode();
|
|
if (this.next(), this.hasPlugin("decorators")) {
|
|
let r = this.state.startLoc, i;
|
|
if (this.match(10)) {
|
|
let n = this.state.startLoc;
|
|
this.next(), i = this.parseExpression(), this.expect(11), i = this.wrapParenthesis(n, i);
|
|
let a = this.state.startLoc;
|
|
t.expression = this.parseMaybeDecoratorArguments(i, n), this.getPluginOption("decorators", "allowCallParenthesized") === !1 && t.expression !==
|
|
i && this.raise(L.DecoratorArgumentsOutsideParentheses, a);
|
|
} else {
|
|
for (i = this.parseIdentifier(!1); this.eat(16); ) {
|
|
let n = this.startNodeAt(r);
|
|
n.object = i, this.match(139) ? (this.classScope.usePrivateName(this.state.value, this.state.startLoc), n.property = this.parsePrivateName()) :
|
|
n.property = this.parseIdentifier(!0), n.computed = !1, i = this.finishNode(n, "MemberExpression");
|
|
}
|
|
t.expression = this.parseMaybeDecoratorArguments(i, r);
|
|
}
|
|
} else
|
|
t.expression = this.parseExprSubscripts();
|
|
return this.finishNode(t, "Decorator");
|
|
}
|
|
parseMaybeDecoratorArguments(t, r) {
|
|
if (this.eat(10)) {
|
|
let i = this.startNodeAt(r);
|
|
return i.callee = t, i.arguments = this.parseCallExpressionArguments(11), this.toReferencedList(i.arguments), this.finishNode(i, "Ca\
|
|
llExpression");
|
|
}
|
|
return t;
|
|
}
|
|
parseBreakContinueStatement(t, r) {
|
|
return this.next(), this.isLineTerminator() ? t.label = null : (t.label = this.parseIdentifier(), this.semicolon()), this.verifyBreakContinue(
|
|
t, r), this.finishNode(t, r ? "BreakStatement" : "ContinueStatement");
|
|
}
|
|
verifyBreakContinue(t, r) {
|
|
let i;
|
|
for (i = 0; i < this.state.labels.length; ++i) {
|
|
let n = this.state.labels[i];
|
|
if ((t.label == null || n.name === t.label.name) && (n.kind != null && (r || n.kind === 1) || t.label && r))
|
|
break;
|
|
}
|
|
if (i === this.state.labels.length) {
|
|
let n = r ? "BreakStatement" : "ContinueStatement";
|
|
this.raise(L.IllegalBreakContinue, t, {
|
|
type: n
|
|
});
|
|
}
|
|
}
|
|
parseDebuggerStatement(t) {
|
|
return this.next(), this.semicolon(), this.finishNode(t, "DebuggerStatement");
|
|
}
|
|
parseHeaderExpression() {
|
|
this.expect(10);
|
|
let t = this.parseExpression();
|
|
return this.expect(11), t;
|
|
}
|
|
parseDoWhileStatement(t) {
|
|
return this.next(), this.state.labels.push(TT), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.
|
|
labels.pop(), this.expect(92), t.test = this.parseHeaderExpression(), this.eat(13), this.finishNode(t, "DoWhileStatement");
|
|
}
|
|
parseForStatement(t) {
|
|
this.next(), this.state.labels.push(TT);
|
|
let r = null;
|
|
if (this.isContextual(96) && this.recordAwaitIfAllowed() && (r = this.state.startLoc, this.next()), this.scope.enter(0), this.expect(10),
|
|
this.match(13))
|
|
return r !== null && this.unexpected(r), this.parseFor(t, null);
|
|
let i = this.isContextual(100);
|
|
{
|
|
let l = this.isContextual(96) && this.startsAwaitUsing(), c = l || this.isContextual(107) && this.startsUsingForOf(), f = i && this.
|
|
hasFollowingBindingAtom() || c;
|
|
if (this.match(74) || this.match(75) || f) {
|
|
let m = this.startNode(), h;
|
|
l ? (h = "await using", this.recordAwaitIfAllowed() || this.raise(L.AwaitUsingNotInAsyncContext, this.state.startLoc), this.next()) :
|
|
h = this.state.value, this.next(), this.parseVar(m, !0, h);
|
|
let d = this.finishNode(m, "VariableDeclaration"), y = this.match(58);
|
|
return y && c && this.raise(L.ForInUsing, d), (y || this.isContextual(102)) && d.declarations.length === 1 ? this.parseForIn(t, d,
|
|
r) : (r !== null && this.unexpected(r), this.parseFor(t, d));
|
|
}
|
|
}
|
|
let n = this.isContextual(95), a = new Ml(), o = this.parseExpression(!0, a), u = this.isContextual(102);
|
|
if (u && (i && this.raise(L.ForOfLet, o), r === null && n && o.type === "Identifier" && this.raise(L.ForOfAsync, o)), u || this.match(
|
|
58)) {
|
|
this.checkDestructuringPrivate(a), this.toAssignable(o, !0);
|
|
let l = u ? "ForOfStatement" : "ForInStatement";
|
|
return this.checkLVal(o, {
|
|
type: l
|
|
}), this.parseForIn(t, o, r);
|
|
} else
|
|
this.checkExpressionErrors(a, !0);
|
|
return r !== null && this.unexpected(r), this.parseFor(t, o);
|
|
}
|
|
parseFunctionStatement(t, r, i) {
|
|
return this.next(), this.parseFunction(t, 1 | (i ? 2 : 0) | (r ? 8 : 0));
|
|
}
|
|
parseIfStatement(t) {
|
|
return this.next(), t.test = this.parseHeaderExpression(), t.consequent = this.parseStatementOrSloppyAnnexBFunctionDeclaration(), t.alternate =
|
|
this.eat(66) ? this.parseStatementOrSloppyAnnexBFunctionDeclaration() : null, this.finishNode(t, "IfStatement");
|
|
}
|
|
parseReturnStatement(t) {
|
|
return !this.prodParam.hasReturn && !(this.optionFlags & 2) && this.raise(L.IllegalReturn, this.state.startLoc), this.next(), this.isLineTerminator() ?
|
|
t.argument = null : (t.argument = this.parseExpression(), this.semicolon()), this.finishNode(t, "ReturnStatement");
|
|
}
|
|
parseSwitchStatement(t) {
|
|
this.next(), t.discriminant = this.parseHeaderExpression();
|
|
let r = t.cases = [];
|
|
this.expect(5), this.state.labels.push(dPe), this.scope.enter(0);
|
|
let i;
|
|
for (let n; !this.match(8); )
|
|
if (this.match(61) || this.match(65)) {
|
|
let a = this.match(61);
|
|
i && this.finishNode(i, "SwitchCase"), r.push(i = this.startNode()), i.consequent = [], this.next(), a ? i.test = this.parseExpression() :
|
|
(n && this.raise(L.MultipleDefaultsInSwitch, this.state.lastTokStartLoc), n = !0, i.test = null), this.expect(14);
|
|
} else
|
|
i ? i.consequent.push(this.parseStatementListItem()) : this.unexpected();
|
|
return this.scope.exit(), i && this.finishNode(i, "SwitchCase"), this.next(), this.state.labels.pop(), this.finishNode(t, "SwitchState\
|
|
ment");
|
|
}
|
|
parseThrowStatement(t) {
|
|
return this.next(), this.hasPrecedingLineBreak() && this.raise(L.NewlineAfterThrow, this.state.lastTokEndLoc), t.argument = this.parseExpression(),
|
|
this.semicolon(), this.finishNode(t, "ThrowStatement");
|
|
}
|
|
parseCatchClauseParam() {
|
|
let t = this.parseBindingAtom();
|
|
return this.scope.enter(this.options.annexB && t.type === "Identifier" ? 8 : 0), this.checkLVal(t, {
|
|
type: "CatchClause"
|
|
}, 9), t;
|
|
}
|
|
parseTryStatement(t) {
|
|
if (this.next(), t.block = this.parseBlock(), t.handler = null, this.match(62)) {
|
|
let r = this.startNode();
|
|
this.next(), this.match(10) ? (this.expect(10), r.param = this.parseCatchClauseParam(), this.expect(11)) : (r.param = null, this.scope.
|
|
enter(0)), r.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(!1, !1)), this.scope.exit(), t.handler = this.finishNode(
|
|
r, "CatchClause");
|
|
}
|
|
return t.finalizer = this.eat(67) ? this.parseBlock() : null, !t.handler && !t.finalizer && this.raise(L.NoCatchOrFinally, t), this.finishNode(
|
|
t, "TryStatement");
|
|
}
|
|
parseVarStatement(t, r, i = !1) {
|
|
return this.next(), this.parseVar(t, !1, r, i), this.semicolon(), this.finishNode(t, "VariableDeclaration");
|
|
}
|
|
parseWhileStatement(t) {
|
|
return this.next(), t.test = this.parseHeaderExpression(), this.state.labels.push(TT), t.body = this.withSmartMixTopicForbiddingContext(
|
|
() => this.parseStatement()), this.state.labels.pop(), this.finishNode(t, "WhileStatement");
|
|
}
|
|
parseWithStatement(t) {
|
|
return this.state.strict && this.raise(L.StrictWith, this.state.startLoc), this.next(), t.object = this.parseHeaderExpression(), t.body =
|
|
this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.finishNode(t, "WithStatement");
|
|
}
|
|
parseEmptyStatement(t) {
|
|
return this.next(), this.finishNode(t, "EmptyStatement");
|
|
}
|
|
parseLabeledStatement(t, r, i, n) {
|
|
for (let o of this.state.labels)
|
|
o.name === r && this.raise(L.LabelRedeclaration, i, {
|
|
labelName: r
|
|
});
|
|
let a = b2e(this.state.type) ? 1 : this.match(71) ? 2 : null;
|
|
for (let o = this.state.labels.length - 1; o >= 0; o--) {
|
|
let u = this.state.labels[o];
|
|
if (u.statementStart === t.start)
|
|
u.statementStart = this.sourceToOffsetPos(this.state.start), u.kind = a;
|
|
else
|
|
break;
|
|
}
|
|
return this.state.labels.push({
|
|
name: r,
|
|
kind: a,
|
|
statementStart: this.sourceToOffsetPos(this.state.start)
|
|
}), t.body = n & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0) : this.parseStatement(), this.state.labels.pop(), t.label =
|
|
i, this.finishNode(t, "LabeledStatement");
|
|
}
|
|
parseExpressionStatement(t, r, i) {
|
|
return t.expression = r, this.semicolon(), this.finishNode(t, "ExpressionStatement");
|
|
}
|
|
parseBlock(t = !1, r = !0, i) {
|
|
let n = this.startNode();
|
|
return t && this.state.strictErrors.clear(), this.expect(5), r && this.scope.enter(0), this.parseBlockBody(n, t, !1, 8, i), r && this.
|
|
scope.exit(), this.finishNode(n, "BlockStatement");
|
|
}
|
|
isValidDirective(t) {
|
|
return t.type === "ExpressionStatement" && t.expression.type === "StringLiteral" && !t.expression.extra.parenthesized;
|
|
}
|
|
parseBlockBody(t, r, i, n, a) {
|
|
let o = t.body = [], u = t.directives = [];
|
|
this.parseBlockOrModuleBlockBody(o, r ? u : void 0, i, n, a);
|
|
}
|
|
parseBlockOrModuleBlockBody(t, r, i, n, a) {
|
|
let o = this.state.strict, u = !1, l = !1;
|
|
for (; !this.match(n); ) {
|
|
let c = i ? this.parseModuleItem() : this.parseStatementListItem();
|
|
if (r && !l) {
|
|
if (this.isValidDirective(c)) {
|
|
let f = this.stmtToDirective(c);
|
|
r.push(f), !u && f.value.value === "use strict" && (u = !0, this.setStrict(!0));
|
|
continue;
|
|
}
|
|
l = !0, this.state.strictErrors.clear();
|
|
}
|
|
t.push(c);
|
|
}
|
|
a?.call(this, u), o || this.setStrict(!1), this.next();
|
|
}
|
|
parseFor(t, r) {
|
|
return t.init = r, this.semicolon(!1), t.test = this.match(13) ? null : this.parseExpression(), this.semicolon(!1), t.update = this.match(
|
|
11) ? null : this.parseExpression(), this.expect(11), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.
|
|
scope.exit(), this.state.labels.pop(), this.finishNode(t, "ForStatement");
|
|
}
|
|
parseForIn(t, r, i) {
|
|
let n = this.match(58);
|
|
return this.next(), n ? i !== null && this.unexpected(i) : t.await = i !== null, r.type === "VariableDeclaration" && r.declarations[0].
|
|
init != null && (!n || !this.options.annexB || this.state.strict || r.kind !== "var" || r.declarations[0].id.type !== "Identifier") &&
|
|
this.raise(L.ForInOfLoopInitializer, r, {
|
|
type: n ? "ForInStatement" : "ForOfStatement"
|
|
}), r.type === "AssignmentPattern" && this.raise(L.InvalidLhs, r, {
|
|
ancestor: {
|
|
type: "ForStatement"
|
|
}
|
|
}), t.left = r, t.right = n ? this.parseExpression() : this.parseMaybeAssignAllowIn(), this.expect(11), t.body = this.withSmartMixTopicForbiddingContext(
|
|
() => this.parseStatement()), this.scope.exit(), this.state.labels.pop(), this.finishNode(t, n ? "ForInStatement" : "ForOfStatement");
|
|
}
|
|
parseVar(t, r, i, n = !1) {
|
|
let a = t.declarations = [];
|
|
for (t.kind = i; ; ) {
|
|
let o = this.startNode();
|
|
if (this.parseVarId(o, i), o.init = this.eat(29) ? r ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn() : null, o.
|
|
init === null && !n && (o.id.type !== "Identifier" && !(r && (this.match(58) || this.isContextual(102))) ? this.raise(L.DeclarationMissingInitializer,
|
|
this.state.lastTokEndLoc, {
|
|
kind: "destructuring"
|
|
}) : (i === "const" || i === "using" || i === "await using") && !(this.match(58) || this.isContextual(102)) && this.raise(L.DeclarationMissingInitializer,
|
|
this.state.lastTokEndLoc, {
|
|
kind: i
|
|
})), a.push(this.finishNode(o, "VariableDeclarator")), !this.eat(12)) break;
|
|
}
|
|
return t;
|
|
}
|
|
parseVarId(t, r) {
|
|
let i = this.parseBindingAtom();
|
|
(r === "using" || r === "await using") && (i.type === "ArrayPattern" || i.type === "ObjectPattern") && this.raise(L.UsingDeclarationHasBindingPattern,
|
|
i.loc.start), this.checkLVal(i, {
|
|
type: "VariableDeclarator"
|
|
}, r === "var" ? 5 : 8201), t.id = i;
|
|
}
|
|
parseAsyncFunctionExpression(t) {
|
|
return this.parseFunction(t, 8);
|
|
}
|
|
parseFunction(t, r = 0) {
|
|
let i = r & 2, n = !!(r & 1), a = n && !(r & 4), o = !!(r & 8);
|
|
this.initFunction(t, o), this.match(55) && (i && this.raise(L.GeneratorInSingleStatementContext, this.state.startLoc), this.next(), t.
|
|
generator = !0), n && (t.id = this.parseFunctionId(a));
|
|
let u = this.state.maybeInArrowParameters;
|
|
return this.state.maybeInArrowParameters = !1, this.scope.enter(2), this.prodParam.enter(Ty(o, t.generator)), n || (t.id = this.parseFunctionId()),
|
|
this.parseFunctionParams(t, !1), this.withSmartMixTopicForbiddingContext(() => {
|
|
this.parseFunctionBodyAndFinish(t, n ? "FunctionDeclaration" : "FunctionExpression");
|
|
}), this.prodParam.exit(), this.scope.exit(), n && !i && this.registerFunctionStatementId(t), this.state.maybeInArrowParameters = u, t;
|
|
}
|
|
parseFunctionId(t) {
|
|
return t || xt(this.state.type) ? this.parseIdentifier() : null;
|
|
}
|
|
parseFunctionParams(t, r) {
|
|
this.expect(10), this.expressionScope.enter(W2e()), t.params = this.parseBindingList(11, 41, 2 | (r ? 4 : 0)), this.expressionScope.exit();
|
|
}
|
|
registerFunctionStatementId(t) {
|
|
t.id && this.scope.declareName(t.id.name, !this.options.annexB || this.state.strict || t.generator || t.async ? this.scope.treatFunctionsAsVar ?
|
|
5 : 8201 : 17, t.id.loc.start);
|
|
}
|
|
parseClass(t, r, i) {
|
|
this.next();
|
|
let n = this.state.strict;
|
|
return this.state.strict = !0, this.parseClassId(t, r, i), this.parseClassSuper(t), t.body = this.parseClassBody(!!t.superClass, n), this.
|
|
finishNode(t, r ? "ClassDeclaration" : "ClassExpression");
|
|
}
|
|
isClassProperty() {
|
|
return this.match(29) || this.match(13) || this.match(8);
|
|
}
|
|
isClassMethod() {
|
|
return this.match(10);
|
|
}
|
|
nameIsConstructor(t) {
|
|
return t.type === "Identifier" && t.name === "constructor" || t.type === "StringLiteral" && t.value === "constructor";
|
|
}
|
|
isNonstaticConstructor(t) {
|
|
return !t.computed && !t.static && this.nameIsConstructor(t.key);
|
|
}
|
|
parseClassBody(t, r) {
|
|
this.classScope.enter();
|
|
let i = {
|
|
hadConstructor: !1,
|
|
hadSuperClass: t
|
|
}, n = [], a = this.startNode();
|
|
if (a.body = [], this.expect(5), this.withSmartMixTopicForbiddingContext(() => {
|
|
for (; !this.match(8); ) {
|
|
if (this.eat(13)) {
|
|
if (n.length > 0)
|
|
throw this.raise(L.DecoratorSemicolon, this.state.lastTokEndLoc);
|
|
continue;
|
|
}
|
|
if (this.match(26)) {
|
|
n.push(this.parseDecorator());
|
|
continue;
|
|
}
|
|
let o = this.startNode();
|
|
n.length && (o.decorators = n, this.resetStartLocationFromNode(o, n[0]), n = []), this.parseClassMember(a, o, i), o.kind === "cons\
|
|
tructor" && o.decorators && o.decorators.length > 0 && this.raise(L.DecoratorConstructor, o);
|
|
}
|
|
}), this.state.strict = r, this.next(), n.length)
|
|
throw this.raise(L.TrailingDecorator, this.state.startLoc);
|
|
return this.classScope.exit(), this.finishNode(a, "ClassBody");
|
|
}
|
|
parseClassMemberFromModifier(t, r) {
|
|
let i = this.parseIdentifier(!0);
|
|
if (this.isClassMethod()) {
|
|
let n = r;
|
|
return n.kind = "method", n.computed = !1, n.key = i, n.static = !1, this.pushClassMethod(t, n, !1, !1, !1, !1), !0;
|
|
} else if (this.isClassProperty()) {
|
|
let n = r;
|
|
return n.computed = !1, n.key = i, n.static = !1, t.body.push(this.parseClassProperty(n)), !0;
|
|
}
|
|
return this.resetPreviousNodeTrailingComments(i), !1;
|
|
}
|
|
parseClassMember(t, r, i) {
|
|
let n = this.isContextual(106);
|
|
if (n) {
|
|
if (this.parseClassMemberFromModifier(t, r))
|
|
return;
|
|
if (this.eat(5)) {
|
|
this.parseClassStaticBlock(t, r);
|
|
return;
|
|
}
|
|
}
|
|
this.parseClassMemberWithIsStatic(t, r, i, n);
|
|
}
|
|
parseClassMemberWithIsStatic(t, r, i, n) {
|
|
let a = r, o = r, u = r, l = r, c = r, f = a, m = a;
|
|
if (r.static = n, this.parsePropertyNamePrefixOperator(r), this.eat(55)) {
|
|
f.kind = "method";
|
|
let b = this.match(139);
|
|
if (this.parseClassElementName(f), b) {
|
|
this.pushClassPrivateMethod(t, o, !0, !1);
|
|
return;
|
|
}
|
|
this.isNonstaticConstructor(a) && this.raise(L.ConstructorIsGenerator, a.key), this.pushClassMethod(t, a, !0, !1, !1, !1);
|
|
return;
|
|
}
|
|
let h = !this.state.containsEsc && xt(this.state.type), d = this.parseClassElementName(r), y = h ? d.name : null, p = this.isPrivateName(
|
|
d), g = this.state.startLoc;
|
|
if (this.parsePostMemberNameModifiers(m), this.isClassMethod()) {
|
|
if (f.kind = "method", p) {
|
|
this.pushClassPrivateMethod(t, o, !1, !1);
|
|
return;
|
|
}
|
|
let b = this.isNonstaticConstructor(a), D = !1;
|
|
b && (a.kind = "constructor", i.hadConstructor && !this.hasPlugin("typescript") && this.raise(L.DuplicateConstructor, d), b && this.
|
|
hasPlugin("typescript") && r.override && this.raise(L.OverrideOnConstructor, d), i.hadConstructor = !0, D = i.hadSuperClass), this.pushClassMethod(
|
|
t, a, !1, !1, b, D);
|
|
} else if (this.isClassProperty())
|
|
p ? this.pushClassPrivateProperty(t, l) : this.pushClassProperty(t, u);
|
|
else if (y === "async" && !this.isLineTerminator()) {
|
|
this.resetPreviousNodeTrailingComments(d);
|
|
let b = this.eat(55);
|
|
m.optional && this.unexpected(g), f.kind = "method";
|
|
let D = this.match(139);
|
|
this.parseClassElementName(f), this.parsePostMemberNameModifiers(m), D ? this.pushClassPrivateMethod(t, o, b, !0) : (this.isNonstaticConstructor(
|
|
a) && this.raise(L.ConstructorIsAsync, a.key), this.pushClassMethod(t, a, b, !0, !1, !1));
|
|
} else if ((y === "get" || y === "set") && !(this.match(55) && this.isLineTerminator())) {
|
|
this.resetPreviousNodeTrailingComments(d), f.kind = y;
|
|
let b = this.match(139);
|
|
this.parseClassElementName(a), b ? this.pushClassPrivateMethod(t, o, !1, !1) : (this.isNonstaticConstructor(a) && this.raise(L.ConstructorIsAccessor,
|
|
a.key), this.pushClassMethod(t, a, !1, !1, !1, !1)), this.checkGetterSetterParams(a);
|
|
} else if (y === "accessor" && !this.isLineTerminator()) {
|
|
this.expectPlugin("decoratorAutoAccessors"), this.resetPreviousNodeTrailingComments(d);
|
|
let b = this.match(139);
|
|
this.parseClassElementName(u), this.pushClassAccessorProperty(t, c, b);
|
|
} else this.isLineTerminator() ? p ? this.pushClassPrivateProperty(t, l) : this.pushClassProperty(t, u) : this.unexpected();
|
|
}
|
|
parseClassElementName(t) {
|
|
let {
|
|
type: r,
|
|
value: i
|
|
} = this.state;
|
|
if ((r === 132 || r === 134) && t.static && i === "prototype" && this.raise(L.StaticPrototype, this.state.startLoc), r === 139) {
|
|
i === "constructor" && this.raise(L.ConstructorClassPrivateField, this.state.startLoc);
|
|
let n = this.parsePrivateName();
|
|
return t.key = n, n;
|
|
}
|
|
return this.parsePropertyName(t), t.key;
|
|
}
|
|
parseClassStaticBlock(t, r) {
|
|
var i;
|
|
this.scope.enter(208);
|
|
let n = this.state.labels;
|
|
this.state.labels = [], this.prodParam.enter(0);
|
|
let a = r.body = [];
|
|
this.parseBlockOrModuleBlockBody(a, void 0, !1, 8), this.prodParam.exit(), this.scope.exit(), this.state.labels = n, t.body.push(this.
|
|
finishNode(r, "StaticBlock")), (i = r.decorators) != null && i.length && this.raise(L.DecoratorStaticBlock, r);
|
|
}
|
|
pushClassProperty(t, r) {
|
|
!r.computed && this.nameIsConstructor(r.key) && this.raise(L.ConstructorClassField, r.key), t.body.push(this.parseClassProperty(r));
|
|
}
|
|
pushClassPrivateProperty(t, r) {
|
|
let i = this.parseClassPrivateProperty(r);
|
|
t.body.push(i), this.classScope.declarePrivateName(this.getPrivateNameSV(i.key), 0, i.key.loc.start);
|
|
}
|
|
pushClassAccessorProperty(t, r, i) {
|
|
!i && !r.computed && this.nameIsConstructor(r.key) && this.raise(L.ConstructorClassField, r.key);
|
|
let n = this.parseClassAccessorProperty(r);
|
|
t.body.push(n), i && this.classScope.declarePrivateName(this.getPrivateNameSV(n.key), 0, n.key.loc.start);
|
|
}
|
|
pushClassMethod(t, r, i, n, a, o) {
|
|
t.body.push(this.parseMethod(r, i, n, a, o, "ClassMethod", !0));
|
|
}
|
|
pushClassPrivateMethod(t, r, i, n) {
|
|
let a = this.parseMethod(r, i, n, !1, !1, "ClassPrivateMethod", !0);
|
|
t.body.push(a);
|
|
let o = a.kind === "get" ? a.static ? 6 : 2 : a.kind === "set" ? a.static ? 5 : 1 : 0;
|
|
this.declareClassPrivateMethodInScope(a, o);
|
|
}
|
|
declareClassPrivateMethodInScope(t, r) {
|
|
this.classScope.declarePrivateName(this.getPrivateNameSV(t.key), r, t.key.loc.start);
|
|
}
|
|
parsePostMemberNameModifiers(t) {
|
|
}
|
|
parseClassPrivateProperty(t) {
|
|
return this.parseInitializer(t), this.semicolon(), this.finishNode(t, "ClassPrivateProperty");
|
|
}
|
|
parseClassProperty(t) {
|
|
return this.parseInitializer(t), this.semicolon(), this.finishNode(t, "ClassProperty");
|
|
}
|
|
parseClassAccessorProperty(t) {
|
|
return this.parseInitializer(t), this.semicolon(), this.finishNode(t, "ClassAccessorProperty");
|
|
}
|
|
parseInitializer(t) {
|
|
this.scope.enter(80), this.expressionScope.enter(E9()), this.prodParam.enter(0), t.value = this.eat(29) ? this.parseMaybeAssignAllowIn() :
|
|
null, this.expressionScope.exit(), this.prodParam.exit(), this.scope.exit();
|
|
}
|
|
parseClassId(t, r, i, n = 8331) {
|
|
if (xt(this.state.type))
|
|
t.id = this.parseIdentifier(), r && this.declareNameFromIdentifier(t.id, n);
|
|
else if (i || !r)
|
|
t.id = null;
|
|
else
|
|
throw this.raise(L.MissingClassName, this.state.startLoc);
|
|
}
|
|
parseClassSuper(t) {
|
|
t.superClass = this.eat(81) ? this.parseExprSubscripts() : null;
|
|
}
|
|
parseExport(t, r) {
|
|
let i = this.parseMaybeImportPhase(t, !0), n = this.maybeParseExportDefaultSpecifier(t, i), a = !n || this.eat(12), o = a && this.eatExportStar(
|
|
t), u = o && this.maybeParseExportNamespaceSpecifier(t), l = a && (!u || this.eat(12)), c = n || o;
|
|
if (o && !u) {
|
|
if (n && this.unexpected(), r)
|
|
throw this.raise(L.UnsupportedDecoratorExport, t);
|
|
return this.parseExportFrom(t, !0), this.sawUnambiguousESM = !0, this.finishNode(t, "ExportAllDeclaration");
|
|
}
|
|
let f = this.maybeParseExportNamedSpecifiers(t);
|
|
n && a && !o && !f && this.unexpected(null, 5), u && l && this.unexpected(null, 98);
|
|
let m;
|
|
if (c || f) {
|
|
if (m = !1, r)
|
|
throw this.raise(L.UnsupportedDecoratorExport, t);
|
|
this.parseExportFrom(t, c);
|
|
} else
|
|
m = this.maybeParseExportDeclaration(t);
|
|
if (c || f || m) {
|
|
var h;
|
|
let d = t;
|
|
if (this.checkExport(d, !0, !1, !!d.source), ((h = d.declaration) == null ? void 0 : h.type) === "ClassDeclaration")
|
|
this.maybeTakeDecorators(r, d.declaration, d);
|
|
else if (r)
|
|
throw this.raise(L.UnsupportedDecoratorExport, t);
|
|
return this.sawUnambiguousESM = !0, this.finishNode(d, "ExportNamedDeclaration");
|
|
}
|
|
if (this.eat(65)) {
|
|
let d = t, y = this.parseExportDefaultExpression();
|
|
if (d.declaration = y, y.type === "ClassDeclaration")
|
|
this.maybeTakeDecorators(r, y, d);
|
|
else if (r)
|
|
throw this.raise(L.UnsupportedDecoratorExport, t);
|
|
return this.checkExport(d, !0, !0), this.sawUnambiguousESM = !0, this.finishNode(d, "ExportDefaultDeclaration");
|
|
}
|
|
this.unexpected(null, 5);
|
|
}
|
|
eatExportStar(t) {
|
|
return this.eat(55);
|
|
}
|
|
maybeParseExportDefaultSpecifier(t, r) {
|
|
if (r || this.isExportDefaultSpecifier()) {
|
|
this.expectPlugin("exportDefaultFrom", r?.loc.start);
|
|
let i = r || this.parseIdentifier(!0), n = this.startNodeAtNode(i);
|
|
return n.exported = i, t.specifiers = [this.finishNode(n, "ExportDefaultSpecifier")], !0;
|
|
}
|
|
return !1;
|
|
}
|
|
maybeParseExportNamespaceSpecifier(t) {
|
|
if (this.isContextual(93)) {
|
|
var r, i;
|
|
(i = (r = t).specifiers) != null || (r.specifiers = []);
|
|
let n = this.startNodeAt(this.state.lastTokStartLoc);
|
|
return this.next(), n.exported = this.parseModuleExportName(), t.specifiers.push(this.finishNode(n, "ExportNamespaceSpecifier")), !0;
|
|
}
|
|
return !1;
|
|
}
|
|
maybeParseExportNamedSpecifiers(t) {
|
|
if (this.match(5)) {
|
|
let r = t;
|
|
r.specifiers || (r.specifiers = []);
|
|
let i = r.exportKind === "type";
|
|
return r.specifiers.push(...this.parseExportSpecifiers(i)), r.source = null, this.hasPlugin("importAssertions") ? r.assertions = [] :
|
|
r.attributes = [], r.declaration = null, !0;
|
|
}
|
|
return !1;
|
|
}
|
|
maybeParseExportDeclaration(t) {
|
|
return this.shouldParseExportDeclaration() ? (t.specifiers = [], t.source = null, this.hasPlugin("importAssertions") ? t.assertions = [] :
|
|
t.attributes = [], t.declaration = this.parseExportDeclaration(t), !0) : !1;
|
|
}
|
|
isAsyncFunction() {
|
|
if (!this.isContextual(95)) return !1;
|
|
let t = this.nextTokenInLineStart();
|
|
return this.isUnparsedContextual(t, "function");
|
|
}
|
|
parseExportDefaultExpression() {
|
|
let t = this.startNode();
|
|
if (this.match(68))
|
|
return this.next(), this.parseFunction(t, 5);
|
|
if (this.isAsyncFunction())
|
|
return this.next(), this.next(), this.parseFunction(t, 13);
|
|
if (this.match(80))
|
|
return this.parseClass(t, !0, !0);
|
|
if (this.match(26))
|
|
return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") === !0 && this.raise(L.DecoratorBeforeExport,
|
|
this.state.startLoc), this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1), this.startNode()), !0, !0);
|
|
if (this.match(75) || this.match(74) || this.isLet())
|
|
throw this.raise(L.UnsupportedDefaultExport, this.state.startLoc);
|
|
let r = this.parseMaybeAssignAllowIn();
|
|
return this.semicolon(), r;
|
|
}
|
|
parseExportDeclaration(t) {
|
|
return this.match(80) ? this.parseClass(this.startNode(), !0, !1) : this.parseStatementListItem();
|
|
}
|
|
isExportDefaultSpecifier() {
|
|
let {
|
|
type: t
|
|
} = this.state;
|
|
if (xt(t)) {
|
|
if (t === 95 && !this.state.containsEsc || t === 100)
|
|
return !1;
|
|
if ((t === 130 || t === 129) && !this.state.containsEsc) {
|
|
let {
|
|
type: n
|
|
} = this.lookahead();
|
|
if (xt(n) && n !== 98 || n === 5)
|
|
return this.expectOnePlugin(["flow", "typescript"]), !1;
|
|
}
|
|
} else if (!this.match(65))
|
|
return !1;
|
|
let r = this.nextTokenStart(), i = this.isUnparsedContextual(r, "from");
|
|
if (this.input.charCodeAt(r) === 44 || xt(this.state.type) && i)
|
|
return !0;
|
|
if (this.match(65) && i) {
|
|
let n = this.input.charCodeAt(this.nextTokenStartSince(r + 4));
|
|
return n === 34 || n === 39;
|
|
}
|
|
return !1;
|
|
}
|
|
parseExportFrom(t, r) {
|
|
this.eatContextual(98) ? (t.source = this.parseImportSource(), this.checkExport(t), this.maybeParseImportAttributes(t), this.checkJSONModuleImport(
|
|
t)) : r && this.unexpected(), this.semicolon();
|
|
}
|
|
shouldParseExportDeclaration() {
|
|
let {
|
|
type: t
|
|
} = this.state;
|
|
return t === 26 && (this.expectOnePlugin(["decorators", "decorators-legacy"]), this.hasPlugin("decorators")) ? (this.getPluginOption("\
|
|
decorators", "decoratorsBeforeExport") === !0 && this.raise(L.DecoratorBeforeExport, this.state.startLoc), !0) : this.isContextual(107) ? (this.
|
|
raise(L.UsingDeclarationExport, this.state.startLoc), !0) : this.isContextual(96) && this.startsAwaitUsing() ? (this.raise(L.UsingDeclarationExport,
|
|
this.state.startLoc), !0) : t === 74 || t === 75 || t === 68 || t === 80 || this.isLet() || this.isAsyncFunction();
|
|
}
|
|
checkExport(t, r, i, n) {
|
|
if (r) {
|
|
var a;
|
|
if (i) {
|
|
if (this.checkDuplicateExports(t, "default"), this.hasPlugin("exportDefaultFrom")) {
|
|
var o;
|
|
let u = t.declaration;
|
|
u.type === "Identifier" && u.name === "from" && u.end - u.start === 4 && !((o = u.extra) != null && o.parenthesized) && this.raise(
|
|
L.ExportDefaultFromAsIdentifier, u);
|
|
}
|
|
} else if ((a = t.specifiers) != null && a.length)
|
|
for (let u of t.specifiers) {
|
|
let {
|
|
exported: l
|
|
} = u, c = l.type === "Identifier" ? l.name : l.value;
|
|
if (this.checkDuplicateExports(u, c), !n && u.local) {
|
|
let {
|
|
local: f
|
|
} = u;
|
|
f.type !== "Identifier" ? this.raise(L.ExportBindingIsString, u, {
|
|
localName: f.value,
|
|
exportName: c
|
|
}) : (this.checkReservedWord(f.name, f.loc.start, !0, !1), this.scope.checkLocalExport(f));
|
|
}
|
|
}
|
|
else if (t.declaration) {
|
|
let u = t.declaration;
|
|
if (u.type === "FunctionDeclaration" || u.type === "ClassDeclaration") {
|
|
let {
|
|
id: l
|
|
} = u;
|
|
if (!l) throw new Error("Assertion failure");
|
|
this.checkDuplicateExports(t, l.name);
|
|
} else if (u.type === "VariableDeclaration")
|
|
for (let l of u.declarations)
|
|
this.checkDeclaration(l.id);
|
|
}
|
|
}
|
|
}
|
|
checkDeclaration(t) {
|
|
if (t.type === "Identifier")
|
|
this.checkDuplicateExports(t, t.name);
|
|
else if (t.type === "ObjectPattern")
|
|
for (let r of t.properties)
|
|
this.checkDeclaration(r);
|
|
else if (t.type === "ArrayPattern")
|
|
for (let r of t.elements)
|
|
r && this.checkDeclaration(r);
|
|
else t.type === "ObjectProperty" ? this.checkDeclaration(t.value) : t.type === "RestElement" ? this.checkDeclaration(t.argument) : t.type ===
|
|
"AssignmentPattern" && this.checkDeclaration(t.left);
|
|
}
|
|
checkDuplicateExports(t, r) {
|
|
this.exportedIdentifiers.has(r) && (r === "default" ? this.raise(L.DuplicateDefaultExport, t) : this.raise(L.DuplicateExport, t, {
|
|
exportName: r
|
|
})), this.exportedIdentifiers.add(r);
|
|
}
|
|
parseExportSpecifiers(t) {
|
|
let r = [], i = !0;
|
|
for (this.expect(5); !this.eat(8); ) {
|
|
if (i)
|
|
i = !1;
|
|
else if (this.expect(12), this.eat(8)) break;
|
|
let n = this.isContextual(130), a = this.match(134), o = this.startNode();
|
|
o.local = this.parseModuleExportName(), r.push(this.parseExportSpecifier(o, a, t, n));
|
|
}
|
|
return r;
|
|
}
|
|
parseExportSpecifier(t, r, i, n) {
|
|
return this.eatContextual(93) ? t.exported = this.parseModuleExportName() : r ? t.exported = K2e(t.local) : t.exported || (t.exported =
|
|
Ws(t.local)), this.finishNode(t, "ExportSpecifier");
|
|
}
|
|
parseModuleExportName() {
|
|
if (this.match(134)) {
|
|
let t = this.parseStringLiteral(this.state.value), r = pPe.exec(t.value);
|
|
return r && this.raise(L.ModuleExportNameHasLoneSurrogate, t, {
|
|
surrogateCharCode: r[0].charCodeAt(0)
|
|
}), t;
|
|
}
|
|
return this.parseIdentifier(!0);
|
|
}
|
|
isJSONModuleImport(t) {
|
|
return t.assertions != null ? t.assertions.some(({
|
|
key: r,
|
|
value: i
|
|
}) => i.value === "json" && (r.type === "Identifier" ? r.name === "type" : r.value === "type")) : !1;
|
|
}
|
|
checkImportReflection(t) {
|
|
let {
|
|
specifiers: r
|
|
} = t, i = r.length === 1 ? r[0].type : null;
|
|
if (t.phase === "source")
|
|
i !== "ImportDefaultSpecifier" && this.raise(L.SourcePhaseImportRequiresDefault, r[0].loc.start);
|
|
else if (t.phase === "defer")
|
|
i !== "ImportNamespaceSpecifier" && this.raise(L.DeferImportRequiresNamespace, r[0].loc.start);
|
|
else if (t.module) {
|
|
var n;
|
|
i !== "ImportDefaultSpecifier" && this.raise(L.ImportReflectionNotBinding, r[0].loc.start), ((n = t.assertions) == null ? void 0 : n.
|
|
length) > 0 && this.raise(L.ImportReflectionHasAssertion, r[0].loc.start);
|
|
}
|
|
}
|
|
checkJSONModuleImport(t) {
|
|
if (this.isJSONModuleImport(t) && t.type !== "ExportAllDeclaration") {
|
|
let {
|
|
specifiers: r
|
|
} = t;
|
|
if (r != null) {
|
|
let i = r.find((n) => {
|
|
let a;
|
|
if (n.type === "ExportSpecifier" ? a = n.local : n.type === "ImportSpecifier" && (a = n.imported), a !== void 0)
|
|
return a.type === "Identifier" ? a.name !== "default" : a.value !== "default";
|
|
});
|
|
i !== void 0 && this.raise(L.ImportJSONBindingNotDefault, i.loc.start);
|
|
}
|
|
}
|
|
}
|
|
isPotentialImportPhase(t) {
|
|
return t ? !1 : this.isContextual(105) || this.isContextual(97) || this.isContextual(127);
|
|
}
|
|
applyImportPhase(t, r, i, n) {
|
|
r || (i === "module" ? (this.expectPlugin("importReflection", n), t.module = !0) : this.hasPlugin("importReflection") && (t.module = !1),
|
|
i === "source" ? (this.expectPlugin("sourcePhaseImports", n), t.phase = "source") : i === "defer" ? (this.expectPlugin("deferredImport\
|
|
Evaluation", n), t.phase = "defer") : this.hasPlugin("sourcePhaseImports") && (t.phase = null));
|
|
}
|
|
parseMaybeImportPhase(t, r) {
|
|
if (!this.isPotentialImportPhase(r))
|
|
return this.applyImportPhase(t, r, null), null;
|
|
let i = this.parseIdentifier(!0), {
|
|
type: n
|
|
} = this.state;
|
|
return (Sn(n) ? n !== 98 || this.lookaheadCharCode() === 102 : n !== 12) ? (this.resetPreviousIdentifierLeadingComments(i), this.applyImportPhase(
|
|
t, r, i.name, i.loc.start), null) : (this.applyImportPhase(t, r, null), i);
|
|
}
|
|
isPrecedingIdImportPhase(t) {
|
|
let {
|
|
type: r
|
|
} = this.state;
|
|
return xt(r) ? r !== 98 || this.lookaheadCharCode() === 102 : r !== 12;
|
|
}
|
|
parseImport(t) {
|
|
return this.match(134) ? this.parseImportSourceAndAttributes(t) : this.parseImportSpecifiersAndAfter(t, this.parseMaybeImportPhase(t, !1));
|
|
}
|
|
parseImportSpecifiersAndAfter(t, r) {
|
|
t.specifiers = [];
|
|
let n = !this.maybeParseDefaultImportSpecifier(t, r) || this.eat(12), a = n && this.maybeParseStarImportSpecifier(t);
|
|
return n && !a && this.parseNamedImportSpecifiers(t), this.expectContextual(98), this.parseImportSourceAndAttributes(t);
|
|
}
|
|
parseImportSourceAndAttributes(t) {
|
|
var r;
|
|
return (r = t.specifiers) != null || (t.specifiers = []), t.source = this.parseImportSource(), this.maybeParseImportAttributes(t), this.
|
|
checkImportReflection(t), this.checkJSONModuleImport(t), this.semicolon(), this.sawUnambiguousESM = !0, this.finishNode(t, "ImportDecl\
|
|
aration");
|
|
}
|
|
parseImportSource() {
|
|
return this.match(134) || this.unexpected(), this.parseExprAtom();
|
|
}
|
|
parseImportSpecifierLocal(t, r, i) {
|
|
r.local = this.parseIdentifier(), t.specifiers.push(this.finishImportSpecifier(r, i));
|
|
}
|
|
finishImportSpecifier(t, r, i = 8201) {
|
|
return this.checkLVal(t.local, {
|
|
type: r
|
|
}, i), this.finishNode(t, r);
|
|
}
|
|
parseImportAttributes() {
|
|
this.expect(5);
|
|
let t = [], r = /* @__PURE__ */ new Set();
|
|
do {
|
|
if (this.match(8))
|
|
break;
|
|
let i = this.startNode(), n = this.state.value;
|
|
if (r.has(n) && this.raise(L.ModuleAttributesWithDuplicateKeys, this.state.startLoc, {
|
|
key: n
|
|
}), r.add(n), this.match(134) ? i.key = this.parseStringLiteral(n) : i.key = this.parseIdentifier(!0), this.expect(14), !this.match(
|
|
134))
|
|
throw this.raise(L.ModuleAttributeInvalidValue, this.state.startLoc);
|
|
i.value = this.parseStringLiteral(this.state.value), t.push(this.finishNode(i, "ImportAttribute"));
|
|
} while (this.eat(12));
|
|
return this.expect(8), t;
|
|
}
|
|
parseModuleAttributes() {
|
|
let t = [], r = /* @__PURE__ */ new Set();
|
|
do {
|
|
let i = this.startNode();
|
|
if (i.key = this.parseIdentifier(!0), i.key.name !== "type" && this.raise(L.ModuleAttributeDifferentFromType, i.key), r.has(i.key.name) &&
|
|
this.raise(L.ModuleAttributesWithDuplicateKeys, i.key, {
|
|
key: i.key.name
|
|
}), r.add(i.key.name), this.expect(14), !this.match(134))
|
|
throw this.raise(L.ModuleAttributeInvalidValue, this.state.startLoc);
|
|
i.value = this.parseStringLiteral(this.state.value), t.push(this.finishNode(i, "ImportAttribute"));
|
|
} while (this.eat(12));
|
|
return t;
|
|
}
|
|
maybeParseImportAttributes(t) {
|
|
let r;
|
|
var i = !1;
|
|
if (this.match(76)) {
|
|
if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40)
|
|
return;
|
|
this.next(), this.hasPlugin("moduleAttributes") ? (r = this.parseModuleAttributes(), this.addExtra(t, "deprecatedWithLegacySyntax", !0)) :
|
|
r = this.parseImportAttributes(), i = !0;
|
|
} else this.isContextual(94) && !this.hasPrecedingLineBreak() ? (!this.hasPlugin("deprecatedImportAssert") && !this.hasPlugin("importA\
|
|
ssertions") && this.raise(L.ImportAttributesUseAssert, this.state.startLoc), this.hasPlugin("importAssertions") || this.addExtra(t, "depreca\
|
|
tedAssertSyntax", !0), this.next(), r = this.parseImportAttributes()) : r = [];
|
|
!i && this.hasPlugin("importAssertions") ? t.assertions = r : t.attributes = r;
|
|
}
|
|
maybeParseDefaultImportSpecifier(t, r) {
|
|
if (r) {
|
|
let i = this.startNodeAtNode(r);
|
|
return i.local = r, t.specifiers.push(this.finishImportSpecifier(i, "ImportDefaultSpecifier")), !0;
|
|
} else if (Sn(this.state.type))
|
|
return this.parseImportSpecifierLocal(t, this.startNode(), "ImportDefaultSpecifier"), !0;
|
|
return !1;
|
|
}
|
|
maybeParseStarImportSpecifier(t) {
|
|
if (this.match(55)) {
|
|
let r = this.startNode();
|
|
return this.next(), this.expectContextual(93), this.parseImportSpecifierLocal(t, r, "ImportNamespaceSpecifier"), !0;
|
|
}
|
|
return !1;
|
|
}
|
|
parseNamedImportSpecifiers(t) {
|
|
let r = !0;
|
|
for (this.expect(5); !this.eat(8); ) {
|
|
if (r)
|
|
r = !1;
|
|
else {
|
|
if (this.eat(14))
|
|
throw this.raise(L.DestructureNamedImport, this.state.startLoc);
|
|
if (this.expect(12), this.eat(8)) break;
|
|
}
|
|
let i = this.startNode(), n = this.match(134), a = this.isContextual(130);
|
|
i.imported = this.parseModuleExportName();
|
|
let o = this.parseImportSpecifier(i, n, t.importKind === "type" || t.importKind === "typeof", a, void 0);
|
|
t.specifiers.push(o);
|
|
}
|
|
}
|
|
parseImportSpecifier(t, r, i, n, a) {
|
|
if (this.eatContextual(93))
|
|
t.local = this.parseIdentifier();
|
|
else {
|
|
let {
|
|
imported: o
|
|
} = t;
|
|
if (r)
|
|
throw this.raise(L.ImportBindingIsString, t, {
|
|
importName: o.value
|
|
});
|
|
this.checkReservedWord(o.name, t.loc.start, !0, !0), t.local || (t.local = Ws(o));
|
|
}
|
|
return this.finishImportSpecifier(t, "ImportSpecifier", a);
|
|
}
|
|
isThisParam(t) {
|
|
return t.type === "Identifier" && t.name === "this";
|
|
}
|
|
}, _y = class extends VT {
|
|
static {
|
|
s(this, "Parser");
|
|
}
|
|
constructor(t, r, i) {
|
|
t = c2e(t), super(t, r), this.options = t, this.initializeScopes(), this.plugins = i, this.filename = t.sourceFilename, this.startIndex =
|
|
t.startIndex;
|
|
let n = 0;
|
|
t.allowAwaitOutsideFunction && (n |= 1), t.allowReturnOutsideFunction && (n |= 2), t.allowImportExportEverywhere && (n |= 8), t.allowSuperOutsideMethod &&
|
|
(n |= 16), t.allowUndeclaredExports && (n |= 64), t.allowNewTargetOutsideFunction && (n |= 4), t.allowYieldOutsideFunction && (n |= 32),
|
|
t.ranges && (n |= 128), t.tokens && (n |= 256), t.createImportExpressions && (n |= 512), t.createParenthesizedExpressions && (n |= 1024),
|
|
t.errorRecovery && (n |= 2048), t.attachComment && (n |= 4096), t.annexB && (n |= 8192), this.optionFlags = n;
|
|
}
|
|
getScopeHandler() {
|
|
return Cd;
|
|
}
|
|
parse() {
|
|
this.enterInitialScopes();
|
|
let t = this.startNode(), r = this.startNode();
|
|
return this.nextToken(), t.errors = null, this.parseTopLevel(t, r), t.errors = this.state.errors, t.comments.length = this.state.commentsLen,
|
|
t;
|
|
}
|
|
};
|
|
function mPe(e, t) {
|
|
var r;
|
|
if (((r = t) == null ? void 0 : r.sourceType) === "unambiguous") {
|
|
t = Object.assign({}, t);
|
|
try {
|
|
t.sourceType = "module";
|
|
let i = xd(t, e), n = i.parse();
|
|
if (i.sawUnambiguousESM)
|
|
return n;
|
|
if (i.ambiguousScriptDifferentAst)
|
|
try {
|
|
return t.sourceType = "script", xd(t, e).parse();
|
|
} catch {
|
|
}
|
|
else
|
|
n.program.sourceType = "script";
|
|
return n;
|
|
} catch (i) {
|
|
try {
|
|
return t.sourceType = "script", xd(t, e).parse();
|
|
} catch {
|
|
}
|
|
throw i;
|
|
}
|
|
} else
|
|
return xd(t, e).parse();
|
|
}
|
|
s(mPe, "parse");
|
|
function yPe(e, t) {
|
|
let r = xd(t, e);
|
|
return r.options.strictMode && (r.state.strict = !0), r.getExpression();
|
|
}
|
|
s(yPe, "parseExpression");
|
|
function gPe(e) {
|
|
let t = {};
|
|
for (let r of Object.keys(e))
|
|
t[r] = js(e[r]);
|
|
return t;
|
|
}
|
|
s(gPe, "generateExportedTokenTypes");
|
|
var bPe = gPe(h2e);
|
|
function xd(e, t) {
|
|
let r = _y, i = /* @__PURE__ */ new Map();
|
|
if (e != null && e.plugins) {
|
|
for (let n of e.plugins) {
|
|
let a, o;
|
|
typeof n == "string" ? a = n : [a, o] = n, i.has(a) || i.set(a, o || {});
|
|
}
|
|
cPe(i), r = DPe(i);
|
|
}
|
|
return new r(e, t, i);
|
|
}
|
|
s(xd, "getParser");
|
|
var c9 = /* @__PURE__ */ new Map();
|
|
function DPe(e) {
|
|
let t = [];
|
|
for (let n of fPe)
|
|
e.has(n) && t.push(n);
|
|
let r = t.join("|"), i = c9.get(r);
|
|
if (!i) {
|
|
i = _y;
|
|
for (let n of t)
|
|
i = C9[n](i);
|
|
c9.set(r, i);
|
|
}
|
|
return i;
|
|
}
|
|
s(DPe, "getParserClass");
|
|
Ad.parse = mPe;
|
|
Ad.parseExpression = yPe;
|
|
Ad.tokTypes = bPe;
|
|
});
|
|
|
|
// ../node_modules/js-tokens/index.js
|
|
var w9 = E((Py) => {
|
|
Object.defineProperty(Py, "__esModule", {
|
|
value: !0
|
|
});
|
|
Py.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;
|
|
Py.matchToToken = function(e) {
|
|
var t = { type: "invalid", value: e[0], closed: void 0 };
|
|
return e[1] ? (t.type = "string", t.closed = !!(e[3] || e[4])) : e[5] ? t.type = "comment" : e[6] ? (t.type = "comment", t.closed = !!e[7]) :
|
|
e[8] ? t.type = "regex" : e[9] ? t.type = "number" : e[10] ? t.type = "name" : e[11] ? t.type = "punctuator" : e[12] && (t.type = "white\
|
|
space"), t;
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/code-frame/lib/index.js
|
|
var Pd = E((_d) => {
|
|
"use strict";
|
|
Object.defineProperty(_d, "__esModule", { value: !0 });
|
|
var tC = fh(), A9 = w9(), _9 = wl();
|
|
function vPe() {
|
|
return typeof process == "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? !1 : tC.isColorSupported;
|
|
}
|
|
s(vPe, "isColorSupported");
|
|
var Fy = /* @__PURE__ */ s((e, t) => (r) => e(t(r)), "compose");
|
|
function I9(e) {
|
|
return {
|
|
keyword: e.cyan,
|
|
capitalized: e.yellow,
|
|
jsxIdentifier: e.yellow,
|
|
punctuator: e.yellow,
|
|
number: e.magenta,
|
|
string: e.green,
|
|
regex: e.magenta,
|
|
comment: e.gray,
|
|
invalid: Fy(Fy(e.white, e.bgRed), e.bold),
|
|
gutter: e.gray,
|
|
marker: Fy(e.red, e.bold),
|
|
message: Fy(e.red, e.bold),
|
|
reset: e.reset
|
|
};
|
|
}
|
|
s(I9, "buildDefs");
|
|
var EPe = I9(tC.createColors(!0)), xPe = I9(tC.createColors(!1));
|
|
function O9(e) {
|
|
return e ? EPe : xPe;
|
|
}
|
|
s(O9, "getDefs");
|
|
var SPe = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]), TPe = /\r\n|[\n\r\u2028\u2029]/, CPe = /^[()[\]{}]$/, k9;
|
|
{
|
|
let e = /^[a-z][\w-]*$/i, t = /* @__PURE__ */ s(function(r, i, n) {
|
|
if (r.type === "name") {
|
|
if (_9.isKeyword(r.value) || _9.isStrictReservedWord(r.value, !0) || SPe.has(r.value))
|
|
return "keyword";
|
|
if (e.test(r.value) && (n[i - 1] === "<" || n.slice(i - 2, i) === "</"))
|
|
return "jsxIdentifier";
|
|
if (r.value[0] !== r.value[0].toLowerCase())
|
|
return "capitalized";
|
|
}
|
|
return r.type === "punctuator" && CPe.test(r.value) ? "bracket" : r.type === "invalid" && (r.value === "@" || r.value === "#") ? "punc\
|
|
tuator" : r.type;
|
|
}, "getTokenType");
|
|
k9 = /* @__PURE__ */ s(function* (r) {
|
|
let i;
|
|
for (; i = A9.default.exec(r); ) {
|
|
let n = A9.matchToToken(i);
|
|
yield {
|
|
type: t(n, i.index, r),
|
|
value: n.value
|
|
};
|
|
}
|
|
}, "tokenize");
|
|
}
|
|
function B9(e) {
|
|
if (e === "") return "";
|
|
let t = O9(!0), r = "";
|
|
for (let {
|
|
type: i,
|
|
value: n
|
|
} of k9(e))
|
|
i in t ? r += n.split(TPe).map((a) => t[i](a)).join(`
|
|
`) : r += n;
|
|
return r;
|
|
}
|
|
s(B9, "highlight");
|
|
var P9 = !1, F9 = /\r\n|[\n\r\u2028\u2029]/;
|
|
function wPe(e, t, r) {
|
|
let i = Object.assign({
|
|
column: 0,
|
|
line: -1
|
|
}, e.start), n = Object.assign({}, i, e.end), {
|
|
linesAbove: a = 2,
|
|
linesBelow: o = 3
|
|
} = r || {}, u = i.line, l = i.column, c = n.line, f = n.column, m = Math.max(u - (a + 1), 0), h = Math.min(t.length, c + o);
|
|
u === -1 && (m = 0), c === -1 && (h = t.length);
|
|
let d = c - u, y = {};
|
|
if (d)
|
|
for (let p = 0; p <= d; p++) {
|
|
let g = p + u;
|
|
if (!l)
|
|
y[g] = !0;
|
|
else if (p === 0) {
|
|
let b = t[g - 1].length;
|
|
y[g] = [l, b - l + 1];
|
|
} else if (p === d)
|
|
y[g] = [0, f];
|
|
else {
|
|
let b = t[g - p].length;
|
|
y[g] = [0, b];
|
|
}
|
|
}
|
|
else
|
|
l === f ? l ? y[u] = [l, 0] : y[u] = !0 : y[u] = [l, f - l];
|
|
return {
|
|
start: m,
|
|
end: h,
|
|
markerLines: y
|
|
};
|
|
}
|
|
s(wPe, "getMarkerLines");
|
|
function N9(e, t, r = {}) {
|
|
let i = r.forceColor || vPe() && r.highlightCode, n = O9(i), a = e.split(F9), {
|
|
start: o,
|
|
end: u,
|
|
markerLines: l
|
|
} = wPe(t, a, r), c = t.start && typeof t.start.column == "number", f = String(u).length, h = (i ? B9(e) : e).split(F9, u).slice(o, u).map(
|
|
(d, y) => {
|
|
let p = o + 1 + y, b = ` ${` ${p}`.slice(-f)} |`, D = l[p], v = !l[p + 1];
|
|
if (D) {
|
|
let S = "";
|
|
if (Array.isArray(D)) {
|
|
let C = d.slice(0, Math.max(D[0] - 1, 0)).replace(/[^\t]/g, " "), O = D[1] || 1;
|
|
S = [`
|
|
`, n.gutter(b.replace(/\d/g, " ")), " ", C, n.marker("^").repeat(O)].join(""), v && r.message && (S += " " + n.message(r.message));
|
|
}
|
|
return [n.marker(">"), n.gutter(b), d.length > 0 ? ` ${d}` : "", S].join("");
|
|
} else
|
|
return ` ${n.gutter(b)}${d.length > 0 ? ` ${d}` : ""}`;
|
|
}).join(`
|
|
`);
|
|
return r.message && !c && (h = `${" ".repeat(f + 1)}${r.message}
|
|
${h}`), i ? n.reset(h) : h;
|
|
}
|
|
s(N9, "codeFrameColumns");
|
|
function APe(e, t, r, i = {}) {
|
|
if (!P9) {
|
|
P9 = !0;
|
|
let a = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
|
|
if (process.emitWarning)
|
|
process.emitWarning(a, "DeprecationWarning");
|
|
else {
|
|
let o = new Error(a);
|
|
o.name = "DeprecationWarning", console.warn(new Error(a));
|
|
}
|
|
}
|
|
return r = Math.max(r, 0), N9(e, {
|
|
start: {
|
|
column: r,
|
|
line: t
|
|
}
|
|
}, i);
|
|
}
|
|
s(APe, "index");
|
|
_d.codeFrameColumns = N9;
|
|
_d.default = APe;
|
|
_d.highlight = B9;
|
|
});
|
|
|
|
// ../node_modules/@babel/template/lib/parse.js
|
|
var iC = E((rC) => {
|
|
"use strict";
|
|
Object.defineProperty(rC, "__esModule", {
|
|
value: !0
|
|
});
|
|
rC.default = UPe;
|
|
var _Pe = Ve(), PPe = zo(), FPe = Pd(), {
|
|
isCallExpression: IPe,
|
|
isExpressionStatement: OPe,
|
|
isFunction: kPe,
|
|
isIdentifier: BPe,
|
|
isJSXIdentifier: NPe,
|
|
isNewExpression: MPe,
|
|
isPlaceholder: Iy,
|
|
isStatement: RPe,
|
|
isStringLiteral: M9,
|
|
removePropertiesDeep: jPe,
|
|
traverse: LPe
|
|
} = _Pe, qPe = /^[_$A-Z0-9]+$/;
|
|
function UPe(e, t, r) {
|
|
let {
|
|
placeholderWhitelist: i,
|
|
placeholderPattern: n,
|
|
preserveComments: a,
|
|
syntacticPlaceholders: o
|
|
} = r, u = VPe(t, r.parser, o);
|
|
jPe(u, {
|
|
preserveComments: a
|
|
}), e.validate(u);
|
|
let l = {
|
|
syntactic: {
|
|
placeholders: [],
|
|
placeholderNames: /* @__PURE__ */ new Set()
|
|
},
|
|
legacy: {
|
|
placeholders: [],
|
|
placeholderNames: /* @__PURE__ */ new Set()
|
|
},
|
|
placeholderWhitelist: i,
|
|
placeholderPattern: n,
|
|
syntacticPlaceholders: o
|
|
};
|
|
return LPe(u, WPe, l), Object.assign({
|
|
ast: u
|
|
}, l.syntactic.placeholders.length ? l.syntactic : l.legacy);
|
|
}
|
|
s(UPe, "parseAndBuildMetadata");
|
|
function WPe(e, t, r) {
|
|
var i;
|
|
let n, a = r.syntactic.placeholders.length > 0;
|
|
if (Iy(e)) {
|
|
if (r.syntacticPlaceholders === !1)
|
|
throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.");
|
|
n = e.name.name, a = !0;
|
|
} else {
|
|
if (a || r.syntacticPlaceholders)
|
|
return;
|
|
if (BPe(e) || NPe(e))
|
|
n = e.name;
|
|
else if (M9(e))
|
|
n = e.value;
|
|
else
|
|
return;
|
|
}
|
|
if (a && (r.placeholderPattern != null || r.placeholderWhitelist != null))
|
|
throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");
|
|
if (!a && (r.placeholderPattern === !1 || !(r.placeholderPattern || qPe).test(n)) && !((i = r.placeholderWhitelist) != null && i.has(n)))
|
|
return;
|
|
t = t.slice();
|
|
let {
|
|
node: o,
|
|
key: u
|
|
} = t[t.length - 1], l;
|
|
M9(e) || Iy(e, {
|
|
expectedNode: "StringLiteral"
|
|
}) ? l = "string" : MPe(o) && u === "arguments" || IPe(o) && u === "arguments" || kPe(o) && u === "params" ? l = "param" : OPe(o) && !Iy(
|
|
e) ? (l = "statement", t = t.slice(0, -1)) : RPe(e) && Iy(e) ? l = "statement" : l = "other";
|
|
let {
|
|
placeholders: c,
|
|
placeholderNames: f
|
|
} = a ? r.syntactic : r.legacy;
|
|
c.push({
|
|
name: n,
|
|
type: l,
|
|
resolve: /* @__PURE__ */ s((m) => $Pe(m, t), "resolve"),
|
|
isDuplicate: f.has(n)
|
|
}), f.add(n);
|
|
}
|
|
s(WPe, "placeholderVisitorHandler");
|
|
function $Pe(e, t) {
|
|
let r = e;
|
|
for (let a = 0; a < t.length - 1; a++) {
|
|
let {
|
|
key: o,
|
|
index: u
|
|
} = t[a];
|
|
u === void 0 ? r = r[o] : r = r[o][u];
|
|
}
|
|
let {
|
|
key: i,
|
|
index: n
|
|
} = t[t.length - 1];
|
|
return {
|
|
parent: r,
|
|
key: i,
|
|
index: n
|
|
};
|
|
}
|
|
s($Pe, "resolveAncestors");
|
|
function VPe(e, t, r) {
|
|
let i = (t.plugins || []).slice();
|
|
r !== !1 && i.push("placeholders"), t = Object.assign({
|
|
allowAwaitOutsideFunction: !0,
|
|
allowReturnOutsideFunction: !0,
|
|
allowNewTargetOutsideFunction: !0,
|
|
allowSuperOutsideMethod: !0,
|
|
allowYieldOutsideFunction: !0,
|
|
sourceType: "module"
|
|
}, t, {
|
|
plugins: i
|
|
});
|
|
try {
|
|
return (0, PPe.parse)(e, t);
|
|
} catch (n) {
|
|
let a = n.loc;
|
|
throw a && (n.message += `
|
|
` + (0, FPe.codeFrameColumns)(e, {
|
|
start: a
|
|
}), n.code = "BABEL_TEMPLATE_PARSE_ERROR"), n;
|
|
}
|
|
}
|
|
s(VPe, "parseWithCodeFrame");
|
|
});
|
|
|
|
// ../node_modules/@babel/template/lib/populate.js
|
|
var oC = E((aC) => {
|
|
"use strict";
|
|
Object.defineProperty(aC, "__esModule", {
|
|
value: !0
|
|
});
|
|
aC.default = XPe;
|
|
var HPe = Ve(), {
|
|
blockStatement: KPe,
|
|
cloneNode: sC,
|
|
emptyStatement: zPe,
|
|
expressionStatement: nC,
|
|
identifier: Oy,
|
|
isStatement: R9,
|
|
isStringLiteral: GPe,
|
|
stringLiteral: JPe,
|
|
validate: j9
|
|
} = HPe;
|
|
function XPe(e, t) {
|
|
let r = sC(e.ast);
|
|
return t && (e.placeholders.forEach((i) => {
|
|
if (!hasOwnProperty.call(t, i.name)) {
|
|
let n = i.name;
|
|
throw new Error(`Error: No substitution given for "${n}". If this is not meant to be a
|
|
placeholder you may want to consider passing one of the following options to @babel/template:
|
|
- { placeholderPattern: false, placeholderWhitelist: new Set(['${n}'])}
|
|
- { placeholderPattern: /^${n}$/ }`);
|
|
}
|
|
}), Object.keys(t).forEach((i) => {
|
|
if (!e.placeholderNames.has(i))
|
|
throw new Error(`Unknown substitution "${i}" given`);
|
|
})), e.placeholders.slice().reverse().forEach((i) => {
|
|
try {
|
|
YPe(i, r, t && t[i.name] || null);
|
|
} catch (n) {
|
|
throw n.message = `@babel/template placeholder "${i.name}": ${n.message}`, n;
|
|
}
|
|
}), r;
|
|
}
|
|
s(XPe, "populatePlaceholders");
|
|
function YPe(e, t, r) {
|
|
e.isDuplicate && (Array.isArray(r) ? r = r.map((u) => sC(u)) : typeof r == "object" && (r = sC(r)));
|
|
let {
|
|
parent: i,
|
|
key: n,
|
|
index: a
|
|
} = e.resolve(t);
|
|
if (e.type === "string") {
|
|
if (typeof r == "string" && (r = JPe(r)), !r || !GPe(r))
|
|
throw new Error("Expected string substitution");
|
|
} else if (e.type === "statement")
|
|
a === void 0 ? r ? Array.isArray(r) ? r = KPe(r) : typeof r == "string" ? r = nC(Oy(r)) : R9(r) || (r = nC(r)) : r = zPe() : r && !Array.
|
|
isArray(r) && (typeof r == "string" && (r = Oy(r)), R9(r) || (r = nC(r)));
|
|
else if (e.type === "param") {
|
|
if (typeof r == "string" && (r = Oy(r)), a === void 0) throw new Error("Assertion failure.");
|
|
} else if (typeof r == "string" && (r = Oy(r)), Array.isArray(r))
|
|
throw new Error("Cannot replace single expression with an array.");
|
|
function o(u, l, c) {
|
|
let f = u[l];
|
|
u[l] = c, (f.type === "Identifier" || f.type === "Placeholder") && (f.typeAnnotation && (c.typeAnnotation = f.typeAnnotation), f.optional &&
|
|
(c.optional = f.optional), f.decorators && (c.decorators = f.decorators));
|
|
}
|
|
if (s(o, "set"), a === void 0)
|
|
j9(i, n, r), o(i, n, r);
|
|
else {
|
|
let u = i[n].slice();
|
|
e.type === "statement" || e.type === "param" ? r == null ? u.splice(a, 1) : Array.isArray(r) ? u.splice(a, 1, ...r) : o(u, a, r) : o(u,
|
|
a, r), j9(i, n, u), i[n] = u;
|
|
}
|
|
}
|
|
s(YPe, "applyReplacement");
|
|
});
|
|
|
|
// ../node_modules/@babel/template/lib/string.js
|
|
var L9 = E((uC) => {
|
|
"use strict";
|
|
Object.defineProperty(uC, "__esModule", {
|
|
value: !0
|
|
});
|
|
uC.default = tFe;
|
|
var ZPe = Dy(), QPe = iC(), eFe = oC();
|
|
function tFe(e, t, r) {
|
|
t = e.code(t);
|
|
let i;
|
|
return (n) => {
|
|
let a = (0, ZPe.normalizeReplacements)(n);
|
|
return i || (i = (0, QPe.default)(e, t, r)), e.unwrap((0, eFe.default)(i, a));
|
|
};
|
|
}
|
|
s(tFe, "stringTemplate");
|
|
});
|
|
|
|
// ../node_modules/@babel/template/lib/literal.js
|
|
var q9 = E((lC) => {
|
|
"use strict";
|
|
Object.defineProperty(lC, "__esModule", {
|
|
value: !0
|
|
});
|
|
lC.default = sFe;
|
|
var rFe = Dy(), iFe = iC(), nFe = oC();
|
|
function sFe(e, t, r) {
|
|
let {
|
|
metadata: i,
|
|
names: n
|
|
} = aFe(e, t, r);
|
|
return (a) => {
|
|
let o = {};
|
|
return a.forEach((u, l) => {
|
|
o[n[l]] = u;
|
|
}), (u) => {
|
|
let l = (0, rFe.normalizeReplacements)(u);
|
|
return l && Object.keys(l).forEach((c) => {
|
|
if (hasOwnProperty.call(o, c))
|
|
throw new Error("Unexpected replacement overlap.");
|
|
}), e.unwrap((0, nFe.default)(i, l ? Object.assign(l, o) : o));
|
|
};
|
|
};
|
|
}
|
|
s(sFe, "literalTemplate");
|
|
function aFe(e, t, r) {
|
|
let i = "BABEL_TPL$", n = t.join("");
|
|
do
|
|
i = "$$" + i;
|
|
while (n.includes(i));
|
|
let {
|
|
names: a,
|
|
code: o
|
|
} = oFe(t, i);
|
|
return {
|
|
metadata: (0, iFe.default)(e, e.code(o), {
|
|
parser: r.parser,
|
|
placeholderWhitelist: new Set(a.concat(r.placeholderWhitelist ? Array.from(r.placeholderWhitelist) : [])),
|
|
placeholderPattern: r.placeholderPattern,
|
|
preserveComments: r.preserveComments,
|
|
syntacticPlaceholders: r.syntacticPlaceholders
|
|
}),
|
|
names: a
|
|
};
|
|
}
|
|
s(aFe, "buildLiteralData");
|
|
function oFe(e, t) {
|
|
let r = [], i = e[0];
|
|
for (let n = 1; n < e.length; n++) {
|
|
let a = `${t}${n - 1}`;
|
|
r.push(a), i += a + e[n];
|
|
}
|
|
return {
|
|
names: r,
|
|
code: i
|
|
};
|
|
}
|
|
s(oFe, "buildTemplateCode");
|
|
});
|
|
|
|
// ../node_modules/@babel/template/lib/builder.js
|
|
var K9 = E((cC) => {
|
|
"use strict";
|
|
Object.defineProperty(cC, "__esModule", {
|
|
value: !0
|
|
});
|
|
cC.default = H9;
|
|
var rs = Dy(), U9 = L9(), W9 = q9(), $9 = (0, rs.validate)({
|
|
placeholderPattern: !1
|
|
});
|
|
function H9(e, t) {
|
|
let r = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), n = t || (0, rs.validate)(null);
|
|
return Object.assign((a, ...o) => {
|
|
if (typeof a == "string") {
|
|
if (o.length > 1) throw new Error("Unexpected extra params.");
|
|
return V9((0, U9.default)(e, a, (0, rs.merge)(n, (0, rs.validate)(o[0]))));
|
|
} else if (Array.isArray(a)) {
|
|
let u = r.get(a);
|
|
return u || (u = (0, W9.default)(e, a, n), r.set(a, u)), V9(u(o));
|
|
} else if (typeof a == "object" && a) {
|
|
if (o.length > 0) throw new Error("Unexpected extra params.");
|
|
return H9(e, (0, rs.merge)(n, (0, rs.validate)(a)));
|
|
}
|
|
throw new Error(`Unexpected template param ${typeof a}`);
|
|
}, {
|
|
ast: /* @__PURE__ */ s((a, ...o) => {
|
|
if (typeof a == "string") {
|
|
if (o.length > 1) throw new Error("Unexpected extra params.");
|
|
return (0, U9.default)(e, a, (0, rs.merge)((0, rs.merge)(n, (0, rs.validate)(o[0])), $9))();
|
|
} else if (Array.isArray(a)) {
|
|
let u = i.get(a);
|
|
return u || (u = (0, W9.default)(e, a, (0, rs.merge)(n, $9)), i.set(a, u)), u(o)();
|
|
}
|
|
throw new Error(`Unexpected template param ${typeof a}`);
|
|
}, "ast")
|
|
});
|
|
}
|
|
s(H9, "createTemplateBuilder");
|
|
function V9(e) {
|
|
let t = "";
|
|
try {
|
|
throw new Error();
|
|
} catch (r) {
|
|
r.stack && (t = r.stack.split(`
|
|
`).slice(3).join(`
|
|
`));
|
|
}
|
|
return (r) => {
|
|
try {
|
|
return e(r);
|
|
} catch (i) {
|
|
throw i.stack += `
|
|
=============
|
|
${t}`, i;
|
|
}
|
|
};
|
|
}
|
|
s(V9, "extendedTrace");
|
|
});
|
|
|
|
// ../node_modules/@babel/template/lib/index.js
|
|
var Od = E((Ai) => {
|
|
"use strict";
|
|
Object.defineProperty(Ai, "__esModule", {
|
|
value: !0
|
|
});
|
|
Ai.statements = Ai.statement = Ai.smart = Ai.program = Ai.expression = Ai.default = void 0;
|
|
var Fd = JL(), Id = K9(), fC = Ai.smart = (0, Id.default)(Fd.smart), uFe = Ai.statement = (0, Id.default)(Fd.statement), lFe = Ai.statements =
|
|
(0, Id.default)(Fd.statements), cFe = Ai.expression = (0, Id.default)(Fd.expression), fFe = Ai.program = (0, Id.default)(Fd.program), Lct = Ai.
|
|
default = Object.assign(fC.bind(void 0), {
|
|
smart: fC,
|
|
statement: uFe,
|
|
statements: lFe,
|
|
expression: cFe,
|
|
program: fFe,
|
|
ast: fC.ast
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/helpers/lib/helpers-generated.js
|
|
var z9 = E((ky) => {
|
|
"use strict";
|
|
Object.defineProperty(ky, "__esModule", {
|
|
value: !0
|
|
});
|
|
ky.default = void 0;
|
|
var dFe = Od();
|
|
function oe(e, t, r) {
|
|
return Object.freeze({
|
|
minVersion: e,
|
|
ast: /* @__PURE__ */ s(() => dFe.default.program.ast(t, {
|
|
preserveComments: !0
|
|
}), "ast"),
|
|
metadata: r
|
|
});
|
|
}
|
|
s(oe, "helper");
|
|
var pFe = ky.default = {
|
|
__proto__: null,
|
|
OverloadYield: oe("7.18.14", "function _OverloadYield(e,d){this.v=e,this.k=d}", {
|
|
globals: [],
|
|
locals: {
|
|
_OverloadYield: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_OverloadYield",
|
|
dependencies: {}
|
|
}),
|
|
applyDecoratedDescriptor: oe("7.0.0-beta.0", 'function _applyDecoratedDescriptor(i,e,r,n,l){var a={};return Object.keys(n).forEach((func\
|
|
tion(i){a[i]=n[i]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=r.slice().r\
|
|
everse().reduce((function(r,n){return n(i,e,r)||r}),a),l&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(l):void 0,a.init\
|
|
ializer=void 0),void 0===a.initializer?(Object.defineProperty(i,e,a),null):a}', {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_applyDecoratedDescriptor: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_applyDecoratedDescriptor",
|
|
dependencies: {}
|
|
}),
|
|
applyDecs2311: oe("7.24.0", 'function applyDecs2311(e,t,n,r,o,i){var a,c,u,s,f,l,p,d=Symbol.metadata||Symbol.for("Symbol.metadata"),m=Ob\
|
|
ject.defineProperty,h=Object.create,y=[h(null),h(null)],v=t.length;function g(t,n,r){return function(o,i){n&&(i=o,o=e);for(var a=0;a<t.lengt\
|
|
h;a++)i=t[a].apply(o,r?[i]:[]);return r?i:o}}function b(e,t,n,r){if("function"!=typeof e&&(r||void 0!==e))throw new TypeError(t+" must "+(n|\
|
|
|"be")+" a function"+(r?"":" or undefined"));return e}function applyDec(e,t,n,r,o,i,u,s,f,l,p){function d(e){if(!p(e))throw new TypeError("A\
|
|
ttempted to access private element on non-instance")}var h=[].concat(t[0]),v=t[3],w=!u,D=1===o,S=3===o,j=4===o,E=2===o;function I(t,n,r){ret\
|
|
urn function(o,i){return n&&(i=o,o=e),r&&r(o),P[t].call(o,i)}}if(!w){var P={},k=[],F=S?"get":j||D?"set":"value";if(f?(l||D?P={get:setFunctio\
|
|
nName((function(){return v(this)}),r,"get"),set:function(e){t[4](this,e)}}:P[F]=v,l||setFunctionName(P[F],r,E?"":F)):l||(P=Object.getOwnProp\
|
|
ertyDescriptor(e,r)),!l&&!f){if((c=y[+s][r])&&7!=(c^o))throw Error("Decorating two elements with the same name ("+P[F].name+") is not suppor\
|
|
ted yet");y[+s][r]=o<3?1:o}}for(var N=e,O=h.length-1;O>=0;O-=n?2:1){var T=b(h[O],"A decorator","be",!0),z=n?h[O-1]:void 0,A={},H={kind:["fie\
|
|
ld","accessor","method","getter","setter","class"][o],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw new TypeError("attempted t\
|
|
o call addInitializer after decoration was finished");b(t,"An initializer","be",!0),i.push(t)}.bind(null,A)};if(w)c=T.call(z,N,H),A.v=1,b(c,\
|
|
"class decorators","return")&&(N=c);else if(H.static=s,H.private=f,c=H.access={has:f?p.bind():function(e){return r in e}},j||(c.get=f?E?func\
|
|
tion(e){return d(e),P.value}:I("get",0,d):function(e){return e[r]}),E||S||(c.set=f?I("set",0,d):function(e,t){e[r]=t}),N=T.call(z,D?{get:P.g\
|
|
et,set:P.set}:P[F],H),A.v=1,D){if("object"==typeof N&&N)(c=b(N.get,"accessor.get"))&&(P.get=c),(c=b(N.set,"accessor.set"))&&(P.set=c),(c=b(N\
|
|
.init,"accessor.init"))&&k.unshift(c);else if(void 0!==N)throw new TypeError("accessor decorators must return an object with get, set, or in\
|
|
it properties or undefined")}else b(N,(l?"field":"method")+" decorators","return")&&(l?k.unshift(N):P[F]=N)}return o<2&&u.push(g(k,s,1),g(i,\
|
|
s,0)),l||w||(f?D?u.splice(-1,0,I("get",s),I("set",s)):u.push(E?P[F]:b.call.bind(P[F])):m(e,r,P)),N}function w(e){return m(e,d,{configurable:\
|
|
!0,enumerable:!0,value:a})}return void 0!==i&&(a=i[d]),a=h(null==a?null:a),f=[],l=function(e){e&&f.push(g(e))},p=function(t,r){for(var i=0;i\
|
|
<n.length;i++){var a=n[i],c=a[1],l=7&c;if((8&c)==t&&!l==r){var p=a[2],d=!!a[3],m=16&c;applyDec(t?e:e.prototype,a,m,d?"#"+p:toPropertyKey(p),\
|
|
l,l<2?[]:t?s=s||[]:u=u||[],f,!!t,d,r,t&&d?function(t){return checkInRHS(t)===e}:o)}}},p(8,0),p(0,0),p(8,1),p(0,1),l(u),l(s),c=f,v||w(e),{e:c\
|
|
,get c(){var n=[];return v&&[w(e=applyDec(e,[t],r,e.name,5,n)),g(n,1)]}}}', {
|
|
globals: ["Symbol", "Object", "TypeError", "Error"],
|
|
locals: {
|
|
applyDecs2311: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "applyDecs2311",
|
|
dependencies: {
|
|
checkInRHS: ["body.0.body.body.5.argument.expressions.4.right.body.body.0.body.body.1.consequent.body.1.expression.arguments.10.cons\
|
|
equent.body.body.0.argument.left.callee"],
|
|
setFunctionName: ["body.0.body.body.3.body.body.3.consequent.body.1.test.expressions.0.consequent.expressions.0.consequent.right.pro\
|
|
perties.0.value.callee", "body.0.body.body.3.body.body.3.consequent.body.1.test.expressions.0.consequent.expressions.1.right.callee"],
|
|
toPropertyKey: ["body.0.body.body.5.argument.expressions.4.right.body.body.0.body.body.1.consequent.body.1.expression.arguments.3.al\
|
|
ternate.callee"]
|
|
}
|
|
}),
|
|
arrayLikeToArray: oe("7.9.0", "function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r\
|
|
[e];return n}", {
|
|
globals: ["Array"],
|
|
locals: {
|
|
_arrayLikeToArray: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_arrayLikeToArray",
|
|
dependencies: {}
|
|
}),
|
|
arrayWithHoles: oe("7.0.0-beta.0", "function _arrayWithHoles(r){if(Array.isArray(r))return r}", {
|
|
globals: ["Array"],
|
|
locals: {
|
|
_arrayWithHoles: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_arrayWithHoles",
|
|
dependencies: {}
|
|
}),
|
|
arrayWithoutHoles: oe("7.0.0-beta.0", "function _arrayWithoutHoles(r){if(Array.isArray(r))return arrayLikeToArray(r)}", {
|
|
globals: ["Array"],
|
|
locals: {
|
|
_arrayWithoutHoles: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_arrayWithoutHoles",
|
|
dependencies: {
|
|
arrayLikeToArray: ["body.0.body.body.0.consequent.argument.callee"]
|
|
}
|
|
}),
|
|
assertClassBrand: oe("7.24.0", 'function _assertClassBrand(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;t\
|
|
hrow new TypeError("Private element is not present on this object")}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_assertClassBrand: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_assertClassBrand",
|
|
dependencies: {}
|
|
}),
|
|
assertThisInitialized: oe("7.0.0-beta.0", `function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been i\
|
|
nitialised - super() hasn't been called");return e}`, {
|
|
globals: ["ReferenceError"],
|
|
locals: {
|
|
_assertThisInitialized: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_assertThisInitialized",
|
|
dependencies: {}
|
|
}),
|
|
asyncGeneratorDelegate: oe("7.0.0-beta.0", 'function _asyncGeneratorDelegate(t){var e={},n=!1;function pump(e,r){return n=!0,r=new Promi\
|
|
se((function(n){n(t[e](r))})),{done:!1,value:new OverloadYield(r,1)}}return e["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=fun\
|
|
ction(){return this},e.next=function(t){return n?(n=!1,t):pump("next",t)},"function"==typeof t.throw&&(e.throw=function(t){if(n)throw n=!1,t\
|
|
;return pump("throw",t)}),"function"==typeof t.return&&(e.return=function(t){return n?(n=!1,t):pump("return",t)}),e}', {
|
|
globals: ["Promise", "Symbol"],
|
|
locals: {
|
|
_asyncGeneratorDelegate: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_asyncGeneratorDelegate",
|
|
dependencies: {
|
|
OverloadYield: ["body.0.body.body.1.body.body.0.argument.expressions.2.properties.1.value.callee"]
|
|
}
|
|
}),
|
|
asyncIterator: oe("7.15.9", 'function _asyncIterator(r){var n,t,o,e=2;for("undefined"!=typeof Symbol&&(t=Symbol.asyncIterator,o=Symbol.i\
|
|
terator);e--;){if(t&&null!=(n=r[t]))return n.call(r);if(o&&null!=(n=r[o]))return new AsyncFromSyncIterator(n.call(r));t="@@asyncIterator",o=\
|
|
"@@iterator"}throw new TypeError("Object is not async iterable")}function AsyncFromSyncIterator(r){function AsyncFromSyncIteratorContinuatio\
|
|
n(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var n=r.done;return Promise.resolve(r.value).then((functi\
|
|
on(r){return{value:r,done:n}}))}return AsyncFromSyncIterator=function(r){this.s=r,this.n=r.next},AsyncFromSyncIterator.prototype={s:null,n:n\
|
|
ull,next:function(){return AsyncFromSyncIteratorContinuation(this.n.apply(this.s,arguments))},return:function(r){var n=this.s.return;return \
|
|
void 0===n?Promise.resolve({value:r,done:!0}):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments))},throw:function(r){var n=this.s.r\
|
|
eturn;return void 0===n?Promise.reject(r):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments))}},new AsyncFromSyncIterator(r)}', {
|
|
globals: ["Symbol", "TypeError", "Object", "Promise"],
|
|
locals: {
|
|
_asyncIterator: ["body.0.id"],
|
|
AsyncFromSyncIterator: ["body.1.id", "body.0.body.body.1.body.body.1.consequent.argument.callee", "body.1.body.body.1.argument.expre\
|
|
ssions.1.left.object", "body.1.body.body.1.argument.expressions.2.callee", "body.1.body.body.1.argument.expressions.0.left"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_asyncIterator",
|
|
dependencies: {}
|
|
}),
|
|
asyncToGenerator: oe("7.0.0-beta.0", 'function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i\
|
|
.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise((function(\
|
|
r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,\
|
|
_throw,"throw",n)}_next(void 0)}))}}', {
|
|
globals: ["Promise"],
|
|
locals: {
|
|
asyncGeneratorStep: ["body.0.id", "body.1.body.body.0.argument.body.body.1.argument.arguments.0.body.body.1.body.body.0.expression.c\
|
|
allee", "body.1.body.body.0.argument.body.body.1.argument.arguments.0.body.body.2.body.body.0.expression.callee"],
|
|
_asyncToGenerator: ["body.1.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_asyncToGenerator",
|
|
dependencies: {}
|
|
}),
|
|
awaitAsyncGenerator: oe("7.0.0-beta.0", "function _awaitAsyncGenerator(e){return new OverloadYield(e,0)}", {
|
|
globals: [],
|
|
locals: {
|
|
_awaitAsyncGenerator: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_awaitAsyncGenerator",
|
|
dependencies: {
|
|
OverloadYield: ["body.0.body.body.0.argument.callee"]
|
|
}
|
|
}),
|
|
callSuper: oe("7.23.8", "function _callSuper(t,o,e){return o=getPrototypeOf(o),possibleConstructorReturn(t,isNativeReflectConstruct()?Re\
|
|
flect.construct(o,e||[],getPrototypeOf(t).constructor):o.apply(t,e))}", {
|
|
globals: ["Reflect"],
|
|
locals: {
|
|
_callSuper: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_callSuper",
|
|
dependencies: {
|
|
getPrototypeOf: ["body.0.body.body.0.argument.expressions.0.right.callee", "body.0.body.body.0.argument.expressions.1.arguments.1.co\
|
|
nsequent.arguments.2.object.callee"],
|
|
isNativeReflectConstruct: ["body.0.body.body.0.argument.expressions.1.arguments.1.test.callee"],
|
|
possibleConstructorReturn: ["body.0.body.body.0.argument.expressions.1.callee"]
|
|
}
|
|
}),
|
|
checkInRHS: oe("7.20.5", `function _checkInRHS(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(\
|
|
null!==e?typeof e:"null"));return e}`, {
|
|
globals: ["Object", "TypeError"],
|
|
locals: {
|
|
_checkInRHS: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_checkInRHS",
|
|
dependencies: {}
|
|
}),
|
|
checkPrivateRedeclaration: oe("7.14.1", 'function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the\
|
|
same private elements twice on an object")}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_checkPrivateRedeclaration: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_checkPrivateRedeclaration",
|
|
dependencies: {}
|
|
}),
|
|
classCallCheck: oe("7.0.0-beta.0", 'function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a fun\
|
|
ction")}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_classCallCheck: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classCallCheck",
|
|
dependencies: {}
|
|
}),
|
|
classNameTDZError: oe("7.0.0-beta.0", `function _classNameTDZError(e){throw new ReferenceError('Class "'+e+'" cannot be referenced in co\
|
|
mputed property keys.')}`, {
|
|
globals: ["ReferenceError"],
|
|
locals: {
|
|
_classNameTDZError: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classNameTDZError",
|
|
dependencies: {}
|
|
}),
|
|
classPrivateFieldGet2: oe("7.24.0", "function _classPrivateFieldGet2(s,a){return s.get(assertClassBrand(s,a))}", {
|
|
globals: [],
|
|
locals: {
|
|
_classPrivateFieldGet2: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateFieldGet2",
|
|
dependencies: {
|
|
assertClassBrand: ["body.0.body.body.0.argument.arguments.0.callee"]
|
|
}
|
|
}),
|
|
classPrivateFieldInitSpec: oe("7.14.1", "function _classPrivateFieldInitSpec(e,t,a){checkPrivateRedeclaration(e,t),t.set(e,a)}", {
|
|
globals: [],
|
|
locals: {
|
|
_classPrivateFieldInitSpec: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateFieldInitSpec",
|
|
dependencies: {
|
|
checkPrivateRedeclaration: ["body.0.body.body.0.expression.expressions.0.callee"]
|
|
}
|
|
}),
|
|
classPrivateFieldLooseBase: oe("7.0.0-beta.0", 'function _classPrivateFieldBase(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError\
|
|
("attempted to use private field on non-instance");return e}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_classPrivateFieldBase: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateFieldBase",
|
|
dependencies: {}
|
|
}),
|
|
classPrivateFieldLooseKey: oe("7.0.0-beta.0", 'var id=0;function _classPrivateFieldKey(e){return"__private_"+id+++"_"+e}', {
|
|
globals: [],
|
|
locals: {
|
|
id: ["body.0.declarations.0.id", "body.1.body.body.0.argument.left.left.right.argument", "body.1.body.body.0.argument.left.left.righ\
|
|
t.argument"],
|
|
_classPrivateFieldKey: ["body.1.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateFieldKey",
|
|
dependencies: {}
|
|
}),
|
|
classPrivateFieldSet2: oe("7.24.0", "function _classPrivateFieldSet2(s,a,r){return s.set(assertClassBrand(s,a),r),r}", {
|
|
globals: [],
|
|
locals: {
|
|
_classPrivateFieldSet2: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateFieldSet2",
|
|
dependencies: {
|
|
assertClassBrand: ["body.0.body.body.0.argument.expressions.0.arguments.0.callee"]
|
|
}
|
|
}),
|
|
classPrivateGetter: oe("7.24.0", "function _classPrivateGetter(s,r,a){return a(assertClassBrand(s,r))}", {
|
|
globals: [],
|
|
locals: {
|
|
_classPrivateGetter: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateGetter",
|
|
dependencies: {
|
|
assertClassBrand: ["body.0.body.body.0.argument.arguments.0.callee"]
|
|
}
|
|
}),
|
|
classPrivateMethodInitSpec: oe("7.14.1", "function _classPrivateMethodInitSpec(e,a){checkPrivateRedeclaration(e,a),a.add(e)}", {
|
|
globals: [],
|
|
locals: {
|
|
_classPrivateMethodInitSpec: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateMethodInitSpec",
|
|
dependencies: {
|
|
checkPrivateRedeclaration: ["body.0.body.body.0.expression.expressions.0.callee"]
|
|
}
|
|
}),
|
|
classPrivateSetter: oe("7.24.0", "function _classPrivateSetter(s,r,a,t){return r(assertClassBrand(s,a),t),t}", {
|
|
globals: [],
|
|
locals: {
|
|
_classPrivateSetter: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateSetter",
|
|
dependencies: {
|
|
assertClassBrand: ["body.0.body.body.0.argument.expressions.0.arguments.0.callee"]
|
|
}
|
|
}),
|
|
classStaticPrivateMethodGet: oe("7.3.2", "function _classStaticPrivateMethodGet(s,a,t){return assertClassBrand(a,s),t}", {
|
|
globals: [],
|
|
locals: {
|
|
_classStaticPrivateMethodGet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classStaticPrivateMethodGet",
|
|
dependencies: {
|
|
assertClassBrand: ["body.0.body.body.0.argument.expressions.0.callee"]
|
|
}
|
|
}),
|
|
construct: oe("7.0.0-beta.0", "function _construct(t,e,r){if(isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);v\
|
|
ar o=[null];o.push.apply(o,e);var p=new(t.bind.apply(t,o));return r&&setPrototypeOf(p,r.prototype),p}", {
|
|
globals: ["Reflect"],
|
|
locals: {
|
|
_construct: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_construct",
|
|
dependencies: {
|
|
isNativeReflectConstruct: ["body.0.body.body.0.test.callee"],
|
|
setPrototypeOf: ["body.0.body.body.4.argument.expressions.0.right.callee"]
|
|
}
|
|
}),
|
|
createClass: oe("7.0.0-beta.0", 'function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.\
|
|
configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_define\
|
|
Properties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}', {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_defineProperties: ["body.0.id", "body.1.body.body.0.argument.expressions.0.right.callee", "body.1.body.body.0.argument.expressions.\
|
|
1.right.callee"],
|
|
_createClass: ["body.1.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_createClass",
|
|
dependencies: {
|
|
toPropertyKey: ["body.0.body.body.0.body.body.1.expression.expressions.3.arguments.1.callee"]
|
|
}
|
|
}),
|
|
createForOfIteratorHelper: oe("7.9.0", 'function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r\
|
|
["@@iterator"];if(!t){if(Array.isArray(r)||(t=unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,F=function()\
|
|
{};return{s:F,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:F}}throw new TypeError("Invalid att\
|
|
empt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1\
|
|
;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return a=r.done,r},e:function(r){u=!0,o=r},f:function(){try{a||null==t.return|\
|
|
|t.return()}finally{if(u)throw o}}}}', {
|
|
globals: ["Symbol", "Array", "TypeError"],
|
|
locals: {
|
|
_createForOfIteratorHelper: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_createForOfIteratorHelper",
|
|
dependencies: {
|
|
unsupportedIterableToArray: ["body.0.body.body.1.consequent.body.0.test.left.right.right.callee"]
|
|
}
|
|
}),
|
|
createForOfIteratorHelperLoose: oe("7.9.0", 'function _createForOfIteratorHelperLoose(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.it\
|
|
erator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=unsupportedIterableToArray(r))||e&&r&&"number"==typeo\
|
|
f r.length){t&&(r=t);var o=0;return function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}}}throw new TypeError("Invalid attempt to \
|
|
iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}', {
|
|
globals: ["Symbol", "Array", "TypeError"],
|
|
locals: {
|
|
_createForOfIteratorHelperLoose: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_createForOfIteratorHelperLoose",
|
|
dependencies: {
|
|
unsupportedIterableToArray: ["body.0.body.body.2.test.left.right.right.callee"]
|
|
}
|
|
}),
|
|
createSuper: oe("7.9.0", "function _createSuper(t){var r=isNativeReflectConstruct();return function(){var e,o=getPrototypeOf(t);if(r){va\
|
|
r s=getPrototypeOf(this).constructor;e=Reflect.construct(o,arguments,s)}else e=o.apply(this,arguments);return possibleConstructorReturn(this\
|
|
,e)}}", {
|
|
globals: ["Reflect"],
|
|
locals: {
|
|
_createSuper: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_createSuper",
|
|
dependencies: {
|
|
getPrototypeOf: ["body.0.body.body.1.argument.body.body.0.declarations.1.init.callee", "body.0.body.body.1.argument.body.body.1.cons\
|
|
equent.body.0.declarations.0.init.object.callee"],
|
|
isNativeReflectConstruct: ["body.0.body.body.0.declarations.0.init.callee"],
|
|
possibleConstructorReturn: ["body.0.body.body.1.argument.body.body.2.argument.callee"]
|
|
}
|
|
}),
|
|
decorate: oe("7.1.5", `function _decorate(e,r,t,i){var o=_getDecoratorsApi();if(i)for(var n=0;n<i.length;n++)o=i[n](o);var s=r((function\
|
|
(e){o.initializeInstanceElements(e,a.elements)}),t),a=o.decorateClass(_coalesceClassElements(s.d.map(_createElementDescriptor)),e);return o.\
|
|
initializeClassElements(s.F,a.elements),o.runClassFinishers(s.F,a.finishers)}function _getDecoratorsApi(){_getDecoratorsApi=function(){retur\
|
|
n e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,r){["method","field"].forEach((function(t){\
|
|
r.forEach((function(r){r.kind===t&&"own"===r.placement&&this.defineClassElement(e,r)}),this)}),this)},initializeClassElements:function(e,r){\
|
|
var t=e.prototype;["method","field"].forEach((function(i){r.forEach((function(r){var o=r.placement;if(r.kind===i&&("static"===o||"prototype"\
|
|
===o)){var n="static"===o?e:t;this.defineClassElement(n,r)}}),this)}),this)},defineClassElement:function(e,r){var t=r.descriptor;if("field"=\
|
|
==r.kind){var i=r.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===i?void 0:i.call(e)}}\
|
|
Object.defineProperty(e,r.key,t)},decorateClass:function(e,r){var t=[],i=[],o={static:[],prototype:[],own:[]};if(e.forEach((function(e){this\
|
|
.addElementPlacement(e,o)}),this),e.forEach((function(e){if(!_hasDecorators(e))return t.push(e);var r=this.decorateElement(e,o);t.push(r.ele\
|
|
ment),t.push.apply(t,r.extras),i.push.apply(i,r.finishers)}),this),!r)return{elements:t,finishers:i};var n=this.decorateConstructor(t,r);ret\
|
|
urn i.push.apply(i,n.finishers),n.finishers=i,n},addElementPlacement:function(e,r,t){var i=r[e.placement];if(!t&&-1!==i.indexOf(e.key))throw\
|
|
new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,r){for(var t=[],i=[],o=e.decorators,n=o.length-1;\
|
|
n>=0;n--){var s=r[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,o[n])(a)||\
|
|
a);e=l.element,this.addElementPlacement(e,r),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var p=0;p<c.length;p++)this.addElementP\
|
|
lacement(c[p],r);t.push.apply(t,c)}}return{element:e,finishers:i,extras:t}},decorateConstructor:function(e,r){for(var t=[],i=r.length-1;i>=0\
|
|
;i--){var o=this.fromClassDescriptor(e),n=this.toClassDescriptor((0,r[i])(o)||o);if(void 0!==n.finisher&&t.push(n.finisher),void 0!==n.eleme\
|
|
nts){e=n.elements;for(var s=0;s<e.length-1;s++)for(var a=s+1;a<e.length;a++)if(e[s].key===e[a].key&&e[s].placement===e[a].placement)throw ne\
|
|
w TypeError("Duplicated element ("+e[s].key+")")}}return{elements:e,finishers:t}},fromElementDescriptor:function(e){var r={kind:e.kind,key:e\
|
|
.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),\
|
|
"field"===e.kind&&(r.initializer=e.initializer),r},toElementDescriptors:function(e){if(void 0!==e)return toArray(e).map((function(e){var r=t\
|
|
his.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element d\
|
|
escriptor"),r}),this)},toElementDescriptor:function(e){var r=e.kind+"";if("method"!==r&&"field"!==r)throw new TypeError('An element descript\
|
|
or\\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+r+'"');var t=toProperty\
|
|
Key(e.key),i=e.placement+"";if("static"!==i&&"prototype"!==i&&"own"!==i)throw new TypeError('An element descriptor\\'s .placement property mu\
|
|
st be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+i+'"');var o=e.descriptor;this\
|
|
.disallowProperty(e,"elements","An element descriptor");var n={kind:r,key:t,placement:i,descriptor:Object.assign({},o)};return"field"!==r?th\
|
|
is.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(o,"get","The property descriptor of a field descriptor"),t\
|
|
his.disallowProperty(o,"set","The property descriptor of a field descriptor"),this.disallowProperty(o,"value","The property descriptor of a \
|
|
field descriptor"),n.initializer=e.initializer),n},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:_\
|
|
optionalCallableProperty(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var r={kind:"class",elem\
|
|
ents:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),r},toCl\
|
|
assDescriptor:function(e){var r=e.kind+"";if("class"!==r)throw new TypeError('A class descriptor\\'s .kind property must be "class", but a de\
|
|
corator created a class descriptor with .kind "'+r+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placeme\
|
|
nt","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descript\
|
|
or"),this.disallowProperty(e,"extras","A class descriptor");var t=_optionalCallableProperty(e,"finisher");return{elements:this.toElementDesc\
|
|
riptors(e.elements),finisher:t}},runClassFinishers:function(e,r){for(var t=0;t<r.length;t++){var i=(0,r[t])(e);if(void 0!==i){if("function"!\
|
|
=typeof i)throw new TypeError("Finishers must return a constructor.");e=i}}return e},disallowProperty:function(e,r,t){if(void 0!==e[r])throw\
|
|
new TypeError(t+" can't have a ."+r+" property.")}};return e}function _createElementDescriptor(e){var r,t=toPropertyKey(e.key);"method"===e\
|
|
.kind?r={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?r={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kin\
|
|
d?r={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(r={configurable:!0,writable:!0,enumerable:!0});var i={kind:"field"===e.ki\
|
|
nd?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:r};return e.decorators&&(i.decorators=e.\
|
|
decorators),"field"===e.kind&&(i.initializer=e.value),i}function _coalesceGetterSetter(e,r){void 0!==e.descriptor.get?r.descriptor.get=e.des\
|
|
criptor.get:r.descriptor.set=e.descriptor.set}function _coalesceClassElements(e){for(var r=[],isSameElement=function(e){return"method"===e.k\
|
|
ind&&e.key===o.key&&e.placement===o.placement},t=0;t<e.length;t++){var i,o=e[t];if("method"===o.kind&&(i=r.find(isSameElement)))if(_isDataDe\
|
|
scriptor(o.descriptor)||_isDataDescriptor(i.descriptor)){if(_hasDecorators(o)||_hasDecorators(i))throw new ReferenceError("Duplicated method\
|
|
s ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(_hasDecorators(o)){if(_hasDecorators(i))throw new ReferenceError("Deco\
|
|
rators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}_coalesceGetterSetter(o,i)\
|
|
}else r.push(o)}return r}function _hasDecorators(e){return e.decorators&&e.decorators.length}function _isDataDescriptor(e){return void 0!==e\
|
|
&&!(void 0===e.value&&void 0===e.writable)}function _optionalCallableProperty(e,r){var t=e[r];if(void 0!==t&&"function"!=typeof t)throw new \
|
|
TypeError("Expected '"+r+"' to be a function");return t}`, {
|
|
globals: ["Object", "TypeError", "Symbol", "ReferenceError"],
|
|
locals: {
|
|
_decorate: ["body.0.id"],
|
|
_getDecoratorsApi: ["body.1.id", "body.0.body.body.0.declarations.0.init.callee", "body.1.body.body.0.expression.left"],
|
|
_createElementDescriptor: ["body.2.id", "body.0.body.body.2.declarations.1.init.arguments.0.arguments.0.arguments.0"],
|
|
_coalesceGetterSetter: ["body.3.id", "body.4.body.body.0.body.body.1.consequent.alternate.body.1.expression.callee"],
|
|
_coalesceClassElements: ["body.4.id", "body.0.body.body.2.declarations.1.init.arguments.0.callee"],
|
|
_hasDecorators: ["body.5.id", "body.1.body.body.1.declarations.0.init.properties.4.value.body.body.1.test.expressions.1.arguments.0.\
|
|
body.body.0.test.argument.callee", "body.4.body.body.0.body.body.1.consequent.consequent.body.0.test.left.callee", "body.4.body.body.0.body.\
|
|
body.1.consequent.consequent.body.0.test.right.callee", "body.4.body.body.0.body.body.1.consequent.alternate.body.0.test.callee", "body.4.bo\
|
|
dy.body.0.body.body.1.consequent.alternate.body.0.consequent.body.0.test.callee"],
|
|
_isDataDescriptor: ["body.6.id", "body.4.body.body.0.body.body.1.consequent.test.left.callee", "body.4.body.body.0.body.body.1.conse\
|
|
quent.test.right.callee"],
|
|
_optionalCallableProperty: ["body.7.id", "body.1.body.body.1.declarations.0.init.properties.11.value.body.body.0.argument.properties\
|
|
.1.value.callee", "body.1.body.body.1.declarations.0.init.properties.13.value.body.body.3.declarations.0.init.callee"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_decorate",
|
|
dependencies: {
|
|
toArray: ["body.1.body.body.1.declarations.0.init.properties.9.value.body.body.0.consequent.argument.callee.object.callee"],
|
|
toPropertyKey: ["body.1.body.body.1.declarations.0.init.properties.10.value.body.body.2.declarations.0.init.callee", "body.2.body.bo\
|
|
dy.0.declarations.1.init.callee"]
|
|
}
|
|
}),
|
|
defaults: oe("7.0.0-beta.0", "function _defaults(e,r){for(var t=Object.getOwnPropertyNames(r),o=0;o<t.length;o++){var n=t[o],a=Object.ge\
|
|
tOwnPropertyDescriptor(r,n);a&&a.configurable&&void 0===e[n]&&Object.defineProperty(e,n,a)}return e}", {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_defaults: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_defaults",
|
|
dependencies: {}
|
|
}),
|
|
defineAccessor: oe("7.20.7", "function _defineAccessor(e,r,n,t){var c={configurable:!0,enumerable:!0};return c[e]=t,Object.definePropert\
|
|
y(r,n,c)}", {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_defineAccessor: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_defineAccessor",
|
|
dependencies: {}
|
|
}),
|
|
defineProperty: oe("7.0.0-beta.0", "function _defineProperty(e,r,t){return(r=toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,en\
|
|
umerable:!0,configurable:!0,writable:!0}):e[r]=t,e}", {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_defineProperty: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_defineProperty",
|
|
dependencies: {
|
|
toPropertyKey: ["body.0.body.body.0.argument.expressions.0.test.left.right.callee"]
|
|
}
|
|
}),
|
|
extends: oe("7.0.0-beta.0", "function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.\
|
|
length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}", {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_extends: ["body.0.id", "body.0.body.body.0.argument.expressions.1.callee.object", "body.0.body.body.0.argument.expressions.0.left"]
|
|
},
|
|
exportBindingAssignments: ["body.0.body.body.0.argument.expressions.0"],
|
|
exportName: "_extends",
|
|
dependencies: {}
|
|
}),
|
|
get: oe("7.0.0-beta.0", 'function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=s\
|
|
uperPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},_get.apply(null\
|
|
,arguments)}', {
|
|
globals: ["Reflect", "Object"],
|
|
locals: {
|
|
_get: ["body.0.id", "body.0.body.body.0.argument.expressions.1.callee.object", "body.0.body.body.0.argument.expressions.0.left"]
|
|
},
|
|
exportBindingAssignments: ["body.0.body.body.0.argument.expressions.0"],
|
|
exportName: "_get",
|
|
dependencies: {
|
|
superPropBase: ["body.0.body.body.0.argument.expressions.0.right.alternate.body.body.0.declarations.0.init.callee"]
|
|
}
|
|
}),
|
|
getPrototypeOf: oe("7.0.0-beta.0", "function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind(\
|
|
):function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}", {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_getPrototypeOf: ["body.0.id", "body.0.body.body.0.argument.expressions.1.callee", "body.0.body.body.0.argument.expressions.0.left"]
|
|
},
|
|
exportBindingAssignments: ["body.0.body.body.0.argument.expressions.0"],
|
|
exportName: "_getPrototypeOf",
|
|
dependencies: {}
|
|
}),
|
|
identity: oe("7.17.0", "function _identity(t){return t}", {
|
|
globals: [],
|
|
locals: {
|
|
_identity: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_identity",
|
|
dependencies: {}
|
|
}),
|
|
importDeferProxy: oe("7.23.0", "function _importDeferProxy(e){var t=null,constValue=function(e){return function(){return e}},proxy=funct\
|
|
ion(r){return function(n,o,f){return null===t&&(t=e()),r(t,o,f)}};return new Proxy({},{defineProperty:constValue(!1),deleteProperty:constVal\
|
|
ue(!1),get:proxy(Reflect.get),getOwnPropertyDescriptor:proxy(Reflect.getOwnPropertyDescriptor),getPrototypeOf:constValue(null),isExtensible:\
|
|
constValue(!1),has:proxy(Reflect.has),ownKeys:proxy(Reflect.ownKeys),preventExtensions:constValue(!0),set:constValue(!1),setPrototypeOf:cons\
|
|
tValue(!1)})}", {
|
|
globals: ["Proxy", "Reflect"],
|
|
locals: {
|
|
_importDeferProxy: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_importDeferProxy",
|
|
dependencies: {}
|
|
}),
|
|
inherits: oe("7.0.0-beta.0", 'function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must eithe\
|
|
r be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.definePropert\
|
|
y(t,"prototype",{writable:!1}),e&&setPrototypeOf(t,e)}', {
|
|
globals: ["TypeError", "Object"],
|
|
locals: {
|
|
_inherits: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_inherits",
|
|
dependencies: {
|
|
setPrototypeOf: ["body.0.body.body.1.expression.expressions.2.right.callee"]
|
|
}
|
|
}),
|
|
inheritsLoose: oe("7.0.0-beta.0", "function _inheritsLoose(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,setProt\
|
|
otypeOf(t,o)}", {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_inheritsLoose: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_inheritsLoose",
|
|
dependencies: {
|
|
setPrototypeOf: ["body.0.body.body.0.expression.expressions.2.callee"]
|
|
}
|
|
}),
|
|
initializerDefineProperty: oe("7.0.0-beta.0", "function _initializerDefineProperty(e,i,r,l){r&&Object.defineProperty(e,i,{enumerable:r.e\
|
|
numerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(l):void 0})}", {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_initializerDefineProperty: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_initializerDefineProperty",
|
|
dependencies: {}
|
|
}),
|
|
initializerWarningHelper: oe("7.0.0-beta.0", 'function _initializerWarningHelper(r,e){throw Error("Decorating class property failed. Ple\
|
|
ase ensure that transform-class-properties is enabled and runs after the decorators transform.")}', {
|
|
globals: ["Error"],
|
|
locals: {
|
|
_initializerWarningHelper: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_initializerWarningHelper",
|
|
dependencies: {}
|
|
}),
|
|
instanceof: oe("7.0.0-beta.0", 'function _instanceof(n,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.h\
|
|
asInstance](n):n instanceof e}', {
|
|
globals: ["Symbol"],
|
|
locals: {
|
|
_instanceof: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_instanceof",
|
|
dependencies: {}
|
|
}),
|
|
interopRequireDefault: oe("7.0.0-beta.0", "function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}", {
|
|
globals: [],
|
|
locals: {
|
|
_interopRequireDefault: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_interopRequireDefault",
|
|
dependencies: {}
|
|
}),
|
|
interopRequireWildcard: oe("7.14.0", 'function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t\
|
|
=new WeakMap;return(_getRequireWildcardCache=function(e){return e?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)retu\
|
|
rn e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e\
|
|
);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,\
|
|
u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e\
|
|
,n),n}', {
|
|
globals: ["WeakMap", "Object"],
|
|
locals: {
|
|
_getRequireWildcardCache: ["body.0.id", "body.1.body.body.2.declarations.0.init.callee", "body.0.body.body.2.argument.callee.left"],
|
|
_interopRequireWildcard: ["body.1.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_interopRequireWildcard",
|
|
dependencies: {}
|
|
}),
|
|
isNativeFunction: oe("7.0.0-beta.0", 'function _isNativeFunction(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}ca\
|
|
tch(n){return"function"==typeof t}}', {
|
|
globals: ["Function"],
|
|
locals: {
|
|
_isNativeFunction: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_isNativeFunction",
|
|
dependencies: {}
|
|
}),
|
|
isNativeReflectConstruct: oe("7.9.0", "function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(\
|
|
Boolean,[],(function(){})))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}", {
|
|
globals: ["Boolean", "Reflect"],
|
|
locals: {
|
|
_isNativeReflectConstruct: ["body.0.id", "body.0.body.body.1.argument.callee.left"]
|
|
},
|
|
exportBindingAssignments: ["body.0.body.body.1.argument.callee"],
|
|
exportName: "_isNativeReflectConstruct",
|
|
dependencies: {}
|
|
}),
|
|
iterableToArray: oe("7.0.0-beta.0", 'function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@it\
|
|
erator"])return Array.from(r)}', {
|
|
globals: ["Symbol", "Array"],
|
|
locals: {
|
|
_iterableToArray: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_iterableToArray",
|
|
dependencies: {}
|
|
}),
|
|
iterableToArrayLimit: oe("7.0.0-beta.0", 'function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.it\
|
|
erator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(\
|
|
f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==\
|
|
u))return}finally{if(o)throw n}}return a}}', {
|
|
globals: ["Symbol", "Object"],
|
|
locals: {
|
|
_iterableToArrayLimit: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_iterableToArrayLimit",
|
|
dependencies: {}
|
|
}),
|
|
jsx: oe("7.0.0-beta.0", 'var REACT_ELEMENT_TYPE;function _createRawReactElement(e,r,E,l){REACT_ELEMENT_TYPE||(REACT_ELEMENT_TYPE="functi\
|
|
on"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,n=arguments.length-3;if(r||0===n||(r={children:v\
|
|
oid 0}),1===n)r.children=l;else if(n>1){for(var t=Array(n),f=0;f<n;f++)t[f]=arguments[f+3];r.children=t}if(r&&o)for(var i in o)void 0===r[i]\
|
|
&&(r[i]=o[i]);else r||(r=o||{});return{$$typeof:REACT_ELEMENT_TYPE,type:e,key:void 0===E?null:""+E,ref:null,props:r,_owner:null}}', {
|
|
globals: ["Symbol", "Array"],
|
|
locals: {
|
|
REACT_ELEMENT_TYPE: ["body.0.declarations.0.id", "body.1.body.body.0.expression.left", "body.1.body.body.4.argument.properties.0.val\
|
|
ue", "body.1.body.body.0.expression.right.left"],
|
|
_createRawReactElement: ["body.1.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_createRawReactElement",
|
|
dependencies: {}
|
|
}),
|
|
maybeArrayLike: oe("7.9.0", 'function _maybeArrayLike(r,a,e){if(a&&!Array.isArray(a)&&"number"==typeof a.length){var y=a.length;return a\
|
|
rrayLikeToArray(a,void 0!==e&&e<y?e:y)}return r(a,e)}', {
|
|
globals: ["Array"],
|
|
locals: {
|
|
_maybeArrayLike: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_maybeArrayLike",
|
|
dependencies: {
|
|
arrayLikeToArray: ["body.0.body.body.0.consequent.body.1.argument.callee"]
|
|
}
|
|
}),
|
|
newArrowCheck: oe("7.0.0-beta.0", 'function _newArrowCheck(n,r){if(n!==r)throw new TypeError("Cannot instantiate an arrow function")}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_newArrowCheck: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_newArrowCheck",
|
|
dependencies: {}
|
|
}),
|
|
nonIterableRest: oe("7.0.0-beta.0", 'function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instan\
|
|
ce.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_nonIterableRest: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_nonIterableRest",
|
|
dependencies: {}
|
|
}),
|
|
nonIterableSpread: oe("7.0.0-beta.0", 'function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instanc\
|
|
e.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_nonIterableSpread: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_nonIterableSpread",
|
|
dependencies: {}
|
|
}),
|
|
nullishReceiverError: oe("7.22.6", 'function _nullishReceiverError(r){throw new TypeError("Cannot set property of null or undefined.")}',
|
|
{
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_nullishReceiverError: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_nullishReceiverError",
|
|
dependencies: {}
|
|
}),
|
|
objectDestructuringEmpty: oe("7.0.0-beta.0", 'function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "\
|
|
+t)}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_objectDestructuringEmpty: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_objectDestructuringEmpty",
|
|
dependencies: {}
|
|
}),
|
|
objectSpread2: oe("7.5.0", "function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbo\
|
|
ls(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpre\
|
|
ad2(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){definePro\
|
|
perty(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac\
|
|
h((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}", {
|
|
globals: ["Object"],
|
|
locals: {
|
|
ownKeys: ["body.0.id", "body.1.body.body.0.body.body.1.expression.consequent.callee.object.callee", "body.1.body.body.0.body.body.1.\
|
|
expression.alternate.alternate.callee.object.callee"],
|
|
_objectSpread2: ["body.1.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_objectSpread2",
|
|
dependencies: {
|
|
defineProperty: ["body.1.body.body.0.body.body.1.expression.consequent.arguments.0.body.body.0.expression.callee"]
|
|
}
|
|
}),
|
|
objectWithoutProperties: oe("7.0.0-beta.0", "function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=objectWithoutPropertie\
|
|
sLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.prope\
|
|
rtyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}", {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_objectWithoutProperties: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_objectWithoutProperties",
|
|
dependencies: {
|
|
objectWithoutPropertiesLoose: ["body.0.body.body.1.declarations.2.init.callee"]
|
|
}
|
|
}),
|
|
objectWithoutPropertiesLoose: oe("7.0.0-beta.0", "function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in \
|
|
r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n]}return t}", {
|
|
globals: [],
|
|
locals: {
|
|
_objectWithoutPropertiesLoose: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_objectWithoutPropertiesLoose",
|
|
dependencies: {}
|
|
}),
|
|
possibleConstructorReturn: oe("7.0.0-beta.0", 'function _possibleConstructorReturn(t,e){if(e&&("object"==typeof e||"function"==typeof e)\
|
|
)return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return assertThisInitialized(t)}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_possibleConstructorReturn: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_possibleConstructorReturn",
|
|
dependencies: {
|
|
assertThisInitialized: ["body.0.body.body.2.argument.callee"]
|
|
}
|
|
}),
|
|
readOnlyError: oe("7.0.0-beta.0", `function _readOnlyError(r){throw new TypeError('"'+r+'" is read-only')}`, {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_readOnlyError: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_readOnlyError",
|
|
dependencies: {}
|
|
}),
|
|
regeneratorRuntime: oe("7.18.0", `function _regeneratorRuntime(){"use strict";
|
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LI\
|
|
CENSE */_regeneratorRuntime=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t\
|
|
[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStr\
|
|
ingTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}\
|
|
catch(t){define=function(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(\
|
|
i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",\
|
|
arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={}\
|
|
;function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));v\
|
|
ar d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype\
|
|
=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invo\
|
|
ke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;retur\
|
|
n h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a\
|
|
)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:fun\
|
|
ction(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg\
|
|
,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Er\
|
|
ror("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c\
|
|
){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(\
|
|
o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p\
|
|
.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function ma\
|
|
ybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.a\
|
|
rg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n\
|
|
+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;ret\
|
|
urn a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw"\
|
|
,r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc\
|
|
=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",\
|
|
delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function value\
|
|
s(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){fo\
|
|
r(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next};return i.next=i}}throw new T\
|
|
ypeError(typeof e+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFuncti\
|
|
onPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displa\
|
|
yName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;r\
|
|
eturn!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.set\
|
|
PrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create\
|
|
(g),t},e.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){re\
|
|
turn this})),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);retu\
|
|
rn e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},defineIteratorMethods(g),define(g,u,"Generator")\
|
|
,define(g,a,(function(){return this})),define(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[]\
|
|
;for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next}r\
|
|
eturn next.done=!0,next}},e.values=values,Context.prototype={constructor:Context,reset:function(e){if(this.prev=0,this.next=0,this.sent=this\
|
|
._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.c\
|
|
harAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.\
|
|
type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",\
|
|
a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("r\
|
|
oot"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.cat\
|
|
chLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return handle(i.\
|
|
catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}}}},abru\
|
|
pt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.\
|
|
prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.\
|
|
type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;retu\
|
|
rn"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"n\
|
|
ormal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLo\
|
|
c===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var \
|
|
r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw Error("illegal ca\
|
|
tch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.ar\
|
|
g=t),y}},e}`, {
|
|
globals: ["Object", "Symbol", "Error", "TypeError", "isNaN", "Promise"],
|
|
locals: {
|
|
_regeneratorRuntime: ["body.0.id", "body.0.body.body.0.expression.left"]
|
|
},
|
|
exportBindingAssignments: ["body.0.body.body.0.expression"],
|
|
exportName: "_regeneratorRuntime",
|
|
dependencies: {}
|
|
}),
|
|
set: oe("7.0.0-beta.0", 'function set(e,r,t,o){return set="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(e,r,t,o){var f,i\
|
|
=superPropBase(e,r);if(i){if((f=Object.getOwnPropertyDescriptor(i,r)).set)return f.set.call(o,t),!0;if(!f.writable)return!1}if(f=Object.getO\
|
|
wnPropertyDescriptor(o,r)){if(!f.writable)return!1;f.value=t,Object.defineProperty(o,r,f)}else defineProperty(o,r,t);return!0},set(e,r,t,o)}\
|
|
function _set(e,r,t,o,f){if(!set(e,r,t,o||e)&&f)throw new TypeError("failed to set property");return t}', {
|
|
globals: ["Reflect", "Object", "TypeError"],
|
|
locals: {
|
|
set: ["body.0.id", "body.0.body.body.0.argument.expressions.1.callee", "body.1.body.body.0.test.left.argument.callee", "body.0.body.\
|
|
body.0.argument.expressions.0.left"],
|
|
_set: ["body.1.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_set",
|
|
dependencies: {
|
|
superPropBase: ["body.0.body.body.0.argument.expressions.0.right.alternate.body.body.0.declarations.1.init.callee"],
|
|
defineProperty: ["body.0.body.body.0.argument.expressions.0.right.alternate.body.body.2.alternate.expression.callee"]
|
|
}
|
|
}),
|
|
setFunctionName: oe("7.23.6", 'function setFunctionName(e,t,n){"symbol"==typeof t&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineP\
|
|
roperty(e,"name",{configurable:!0,value:n?n+" "+t:t})}catch(e){}return e}', {
|
|
globals: ["Object"],
|
|
locals: {
|
|
setFunctionName: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "setFunctionName",
|
|
dependencies: {}
|
|
}),
|
|
setPrototypeOf: oe("7.0.0-beta.0", "function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bin\
|
|
d():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}", {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_setPrototypeOf: ["body.0.id", "body.0.body.body.0.argument.expressions.1.callee", "body.0.body.body.0.argument.expressions.0.left"]
|
|
},
|
|
exportBindingAssignments: ["body.0.body.body.0.argument.expressions.0"],
|
|
exportName: "_setPrototypeOf",
|
|
dependencies: {}
|
|
}),
|
|
skipFirstGeneratorNext: oe("7.0.0-beta.0", "function _skipFirstGeneratorNext(t){return function(){var r=t.apply(this,arguments);return r\
|
|
.next(),r}}", {
|
|
globals: [],
|
|
locals: {
|
|
_skipFirstGeneratorNext: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_skipFirstGeneratorNext",
|
|
dependencies: {}
|
|
}),
|
|
slicedToArray: oe("7.0.0-beta.0", "function _slicedToArray(r,e){return arrayWithHoles(r)||iterableToArrayLimit(r,e)||unsupportedIterable\
|
|
ToArray(r,e)||nonIterableRest()}", {
|
|
globals: [],
|
|
locals: {
|
|
_slicedToArray: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_slicedToArray",
|
|
dependencies: {
|
|
arrayWithHoles: ["body.0.body.body.0.argument.left.left.left.callee"],
|
|
iterableToArrayLimit: ["body.0.body.body.0.argument.left.left.right.callee"],
|
|
unsupportedIterableToArray: ["body.0.body.body.0.argument.left.right.callee"],
|
|
nonIterableRest: ["body.0.body.body.0.argument.right.callee"]
|
|
}
|
|
}),
|
|
superPropBase: oe("7.0.0-beta.0", "function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=getPrototypeOf(t)););return\
|
|
t}", {
|
|
globals: [],
|
|
locals: {
|
|
_superPropBase: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_superPropBase",
|
|
dependencies: {
|
|
getPrototypeOf: ["body.0.body.body.0.test.right.right.right.callee"]
|
|
}
|
|
}),
|
|
superPropGet: oe("7.25.0", 'function _superPropGet(t,o,e,r){var p=get(getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typ\
|
|
eof p?function(t){return p.apply(e,t)}:p}', {
|
|
globals: [],
|
|
locals: {
|
|
_superPropGet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_superPropGet",
|
|
dependencies: {
|
|
get: ["body.0.body.body.0.declarations.0.init.callee"],
|
|
getPrototypeOf: ["body.0.body.body.0.declarations.0.init.arguments.0.callee"]
|
|
}
|
|
}),
|
|
superPropSet: oe("7.25.0", "function _superPropSet(t,e,o,r,p,f){return set(getPrototypeOf(f?t.prototype:t),e,o,r,p)}", {
|
|
globals: [],
|
|
locals: {
|
|
_superPropSet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_superPropSet",
|
|
dependencies: {
|
|
set: ["body.0.body.body.0.argument.callee"],
|
|
getPrototypeOf: ["body.0.body.body.0.argument.arguments.0.callee"]
|
|
}
|
|
}),
|
|
taggedTemplateLiteral: oe("7.0.0-beta.0", "function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProp\
|
|
erties(e,{raw:{value:Object.freeze(t)}}))}", {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_taggedTemplateLiteral: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_taggedTemplateLiteral",
|
|
dependencies: {}
|
|
}),
|
|
taggedTemplateLiteralLoose: oe("7.0.0-beta.0", "function _taggedTemplateLiteralLoose(e,t){return t||(t=e.slice(0)),e.raw=t,e}", {
|
|
globals: [],
|
|
locals: {
|
|
_taggedTemplateLiteralLoose: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_taggedTemplateLiteralLoose",
|
|
dependencies: {}
|
|
}),
|
|
tdz: oe("7.5.5", 'function _tdzError(e){throw new ReferenceError(e+" is not defined - temporal dead zone")}', {
|
|
globals: ["ReferenceError"],
|
|
locals: {
|
|
_tdzError: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_tdzError",
|
|
dependencies: {}
|
|
}),
|
|
temporalRef: oe("7.0.0-beta.0", "function _temporalRef(r,e){return r===undef?err(e):r}", {
|
|
globals: [],
|
|
locals: {
|
|
_temporalRef: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_temporalRef",
|
|
dependencies: {
|
|
temporalUndefined: ["body.0.body.body.0.argument.test.right"],
|
|
tdz: ["body.0.body.body.0.argument.consequent.callee"]
|
|
}
|
|
}),
|
|
temporalUndefined: oe("7.0.0-beta.0", "function _temporalUndefined(){}", {
|
|
globals: [],
|
|
locals: {
|
|
_temporalUndefined: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_temporalUndefined",
|
|
dependencies: {}
|
|
}),
|
|
toArray: oe("7.0.0-beta.0", "function _toArray(r){return arrayWithHoles(r)||iterableToArray(r)||unsupportedIterableToArray(r)||nonIterab\
|
|
leRest()}", {
|
|
globals: [],
|
|
locals: {
|
|
_toArray: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_toArray",
|
|
dependencies: {
|
|
arrayWithHoles: ["body.0.body.body.0.argument.left.left.left.callee"],
|
|
iterableToArray: ["body.0.body.body.0.argument.left.left.right.callee"],
|
|
unsupportedIterableToArray: ["body.0.body.body.0.argument.left.right.callee"],
|
|
nonIterableRest: ["body.0.body.body.0.argument.right.callee"]
|
|
}
|
|
}),
|
|
toConsumableArray: oe("7.0.0-beta.0", "function _toConsumableArray(r){return arrayWithoutHoles(r)||iterableToArray(r)||unsupportedIterab\
|
|
leToArray(r)||nonIterableSpread()}", {
|
|
globals: [],
|
|
locals: {
|
|
_toConsumableArray: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_toConsumableArray",
|
|
dependencies: {
|
|
arrayWithoutHoles: ["body.0.body.body.0.argument.left.left.left.callee"],
|
|
iterableToArray: ["body.0.body.body.0.argument.left.left.right.callee"],
|
|
unsupportedIterableToArray: ["body.0.body.body.0.argument.left.right.callee"],
|
|
nonIterableSpread: ["body.0.body.body.0.argument.right.callee"]
|
|
}
|
|
}),
|
|
toPrimitive: oe("7.1.5", 'function toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=\
|
|
e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===\
|
|
r?String:Number)(t)}', {
|
|
globals: ["Symbol", "TypeError", "String", "Number"],
|
|
locals: {
|
|
toPrimitive: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "toPrimitive",
|
|
dependencies: {}
|
|
}),
|
|
toPropertyKey: oe("7.1.5", 'function toPropertyKey(t){var i=toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}', {
|
|
globals: [],
|
|
locals: {
|
|
toPropertyKey: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "toPropertyKey",
|
|
dependencies: {
|
|
toPrimitive: ["body.0.body.body.0.declarations.0.init.callee"]
|
|
}
|
|
}),
|
|
toSetter: oe("7.24.0", 'function _toSetter(t,e,n){e||(e=[]);var r=e.length++;return Object.defineProperty({},"_",{set:function(o){e[r]=o\
|
|
,t.apply(n,e)}})}', {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_toSetter: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_toSetter",
|
|
dependencies: {}
|
|
}),
|
|
tsRewriteRelativeImportExtensions: oe("7.27.0", 'function tsRewriteRelativeImportExtensions(t,e){return"string"==typeof t&&/^\\.\\.?\\//.te\
|
|
st(t)?t.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+)?)\\.([cm]?)ts$/i,(function(t,s,r,n,o){return s?e?".jsx":".js":!r||n&&o?r+n+"."+o.toLowerCas\
|
|
e()+"js":t})):t}', {
|
|
globals: [],
|
|
locals: {
|
|
tsRewriteRelativeImportExtensions: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "tsRewriteRelativeImportExtensions",
|
|
dependencies: {}
|
|
}),
|
|
typeof: oe("7.0.0-beta.0", 'function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Sym\
|
|
bol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"sym\
|
|
bol":typeof o},_typeof(o)}', {
|
|
globals: ["Symbol"],
|
|
locals: {
|
|
_typeof: ["body.0.id", "body.0.body.body.0.argument.expressions.1.callee", "body.0.body.body.0.argument.expressions.0.left"]
|
|
},
|
|
exportBindingAssignments: ["body.0.body.body.0.argument.expressions.0"],
|
|
exportName: "_typeof",
|
|
dependencies: {}
|
|
}),
|
|
unsupportedIterableToArray: oe("7.9.0", 'function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return arrayLikeToArray(r\
|
|
,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Argu\
|
|
ments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?arrayLikeToArray(r,a):void 0}}', {
|
|
globals: ["Array"],
|
|
locals: {
|
|
_unsupportedIterableToArray: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_unsupportedIterableToArray",
|
|
dependencies: {
|
|
arrayLikeToArray: ["body.0.body.body.0.consequent.body.0.consequent.argument.callee", "body.0.body.body.0.consequent.body.2.argument\
|
|
.expressions.1.alternate.consequent.callee"]
|
|
}
|
|
}),
|
|
usingCtx: oe("7.23.9", 'function _usingCtx(){var r="function"==typeof SuppressedError?SuppressedError:function(r,e){var n=Error();return\
|
|
n.name="SuppressedError",n.error=r,n.suppressed=e,n},e={},n=[];function using(r,e){if(null!=e){if(Object(e)!==e)throw new TypeError("using \
|
|
declarations can only be used with objects, functions, null, or undefined.");if(r)var o=e[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispo\
|
|
se")];if(void 0===o&&(o=e[Symbol.dispose||Symbol.for("Symbol.dispose")],r))var t=o;if("function"!=typeof o)throw new TypeError("Object is no\
|
|
t disposable.");t&&(o=function(){try{t.call(e)}catch(r){return Promise.reject(r)}}),n.push({v:e,d:o,a:r})}else r&&n.push({d:e,a:r});return e\
|
|
}return{e:e,u:using.bind(null,!1),a:using.bind(null,!0),d:function(){var o,t=this.e,s=0;function next(){for(;o=n.pop();)try{if(!o.a&&1===s)r\
|
|
eturn s=0,n.push(o),Promise.resolve().then(next);if(o.d){var r=o.d.call(o.v);if(o.a)return s|=2,Promise.resolve(r).then(next,err)}else s|=1}\
|
|
catch(r){return err(r)}if(1===s)return t!==e?Promise.reject(t):Promise.resolve();if(t!==e)throw t}function err(n){return t=t!==e?new r(n,t):\
|
|
n,next()}return next()}}}', {
|
|
globals: ["SuppressedError", "Error", "Object", "TypeError", "Symbol", "Promise"],
|
|
locals: {
|
|
_usingCtx: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_usingCtx",
|
|
dependencies: {}
|
|
}),
|
|
wrapAsyncGenerator: oe("7.0.0-beta.0", 'function _wrapAsyncGenerator(e){return function(){return new AsyncGenerator(e.apply(this,argumen\
|
|
ts))}}function AsyncGenerator(e){var r,t;function resume(r,t){try{var n=e[r](t),o=n.value,u=o instanceof OverloadYield;Promise.resolve(u?o.v\
|
|
:o).then((function(t){if(u){var i="return"===r?"return":"next";if(!o.k||t.done)return resume(i,t);t=e[i](t).value}settle(n.done?"return":"no\
|
|
rmal",t)}),(function(e){resume("throw",e)}))}catch(e){settle("throw",e)}}function settle(e,n){switch(e){case"return":r.resolve({value:n,done\
|
|
:!0});break;case"throw":r.reject(n);break;default:r.resolve({value:n,done:!1})}(r=r.next)?resume(r.key,r.arg):t=null}this._invoke=function(e\
|
|
,n){return new Promise((function(o,u){var i={key:e,arg:n,resolve:o,reject:u,next:null};t?t=t.next=i:(r=t=i,resume(e,n))}))},"function"!=type\
|
|
of e.return&&(this.return=void 0)}AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){re\
|
|
turn this},AsyncGenerator.prototype.next=function(e){return this._invoke("next",e)},AsyncGenerator.prototype.throw=function(e){return this._\
|
|
invoke("throw",e)},AsyncGenerator.prototype.return=function(e){return this._invoke("return",e)};', {
|
|
globals: ["Promise", "Symbol"],
|
|
locals: {
|
|
_wrapAsyncGenerator: ["body.0.id"],
|
|
AsyncGenerator: ["body.1.id", "body.0.body.body.0.argument.body.body.0.argument.callee", "body.2.expression.expressions.0.left.objec\
|
|
t.object", "body.2.expression.expressions.1.left.object.object", "body.2.expression.expressions.2.left.object.object", "body.2.expression.ex\
|
|
pressions.3.left.object.object"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_wrapAsyncGenerator",
|
|
dependencies: {
|
|
OverloadYield: ["body.1.body.body.1.body.body.0.block.body.0.declarations.2.init.right"]
|
|
}
|
|
}),
|
|
wrapNativeSuper: oe("7.0.0-beta.0", 'function _wrapNativeSuper(t){var r="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=fu\
|
|
nction(t){if(null===t||!isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a \
|
|
function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,Wrapper)}function Wrapper(){return construct(t,arguments,getPrototypeOf(this).\
|
|
constructor)}return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),set\
|
|
PrototypeOf(Wrapper,t)},_wrapNativeSuper(t)}', {
|
|
globals: ["Map", "TypeError", "Object"],
|
|
locals: {
|
|
_wrapNativeSuper: ["body.0.id", "body.0.body.body.1.argument.expressions.1.callee", "body.0.body.body.1.argument.expressions.0.left"]
|
|
},
|
|
exportBindingAssignments: ["body.0.body.body.1.argument.expressions.0"],
|
|
exportName: "_wrapNativeSuper",
|
|
dependencies: {
|
|
getPrototypeOf: ["body.0.body.body.1.argument.expressions.0.right.body.body.3.body.body.0.argument.arguments.2.object.callee"],
|
|
setPrototypeOf: ["body.0.body.body.1.argument.expressions.0.right.body.body.4.argument.expressions.1.callee"],
|
|
isNativeFunction: ["body.0.body.body.1.argument.expressions.0.right.body.body.0.test.right.argument.callee"],
|
|
construct: ["body.0.body.body.1.argument.expressions.0.right.body.body.3.body.body.0.argument.callee"]
|
|
}
|
|
}),
|
|
wrapRegExp: oe("7.19.0", 'function _wrapRegExp(){_wrapRegExp=function(e,r){return new BabelRegExp(e,void 0,r)};var e=RegExp.prototype,r=\
|
|
new WeakMap;function BabelRegExp(e,t,p){var o=RegExp(e,t);return r.set(o,p||r.get(e)),setPrototypeOf(o,BabelRegExp.prototype)}function build\
|
|
Groups(e,t){var p=r.get(t);return Object.keys(p).reduce((function(r,t){var o=p[t];if("number"==typeof o)r[t]=e[o];else{for(var i=0;void 0===\
|
|
e[o[i]]&&i+1<o.length;)i++;r[t]=e[o[i]]}return r}),Object.create(null))}return inherits(BabelRegExp,RegExp),BabelRegExp.prototype.exec=funct\
|
|
ion(r){var t=e.exec.call(this,r);if(t){t.groups=buildGroups(t,this);var p=t.indices;p&&(p.groups=buildGroups(p,this))}return t},BabelRegExp.\
|
|
prototype[Symbol.replace]=function(t,p){if("string"==typeof p){var o=r.get(this);return e[Symbol.replace].call(this,t,p.replace(/\\$<([^>]+)(\
|
|
>|$)/g,(function(e,r,t){if(""===t)return e;var p=o[r];return Array.isArray(p)?"$"+p.join("$"):"number"==typeof p?"$"+p:""})))}if("function"=\
|
|
=typeof p){var i=this;return e[Symbol.replace].call(this,t,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.cal\
|
|
l(e)).push(buildGroups(e,i)),p.apply(this,e)}))}return e[Symbol.replace].call(this,t,p)},_wrapRegExp.apply(this,arguments)}', {
|
|
globals: ["RegExp", "WeakMap", "Object", "Symbol", "Array"],
|
|
locals: {
|
|
_wrapRegExp: ["body.0.id", "body.0.body.body.4.argument.expressions.3.callee.object", "body.0.body.body.0.expression.left"]
|
|
},
|
|
exportBindingAssignments: ["body.0.body.body.0.expression"],
|
|
exportName: "_wrapRegExp",
|
|
dependencies: {
|
|
setPrototypeOf: ["body.0.body.body.2.body.body.1.argument.expressions.1.callee"],
|
|
inherits: ["body.0.body.body.4.argument.expressions.0.callee"]
|
|
}
|
|
}),
|
|
writeOnlyError: oe("7.12.13", `function _writeOnlyError(r){throw new TypeError('"'+r+'" is write-only')}`, {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_writeOnlyError: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_writeOnlyError",
|
|
dependencies: {}
|
|
})
|
|
};
|
|
Object.assign(pFe, {
|
|
AwaitValue: oe("7.0.0-beta.0", "function _AwaitValue(t){this.wrapped=t}", {
|
|
globals: [],
|
|
locals: {
|
|
_AwaitValue: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_AwaitValue",
|
|
dependencies: {}
|
|
}),
|
|
applyDecs: oe("7.17.8", 'function old_createMetadataMethodsForProperty(e,t,a,r){return{getMetadata:function(o){old_assertNotFinished(r,"\
|
|
getMetadata"),old_assertMetadataKey(o);var i=e[o];if(void 0!==i)if(1===t){var n=i.public;if(void 0!==n)return n[a]}else if(2===t){var l=i.pr\
|
|
ivate;if(void 0!==l)return l.get(a)}else if(Object.hasOwnProperty.call(i,"constructor"))return i.constructor},setMetadata:function(o,i){old_\
|
|
assertNotFinished(r,"setMetadata"),old_assertMetadataKey(o);var n=e[o];if(void 0===n&&(n=e[o]={}),1===t){var l=n.public;void 0===l&&(l=n.pub\
|
|
lic={}),l[a]=i}else if(2===t){var s=n.priv;void 0===s&&(s=n.private=new Map),s.set(a,i)}else n.constructor=i}}}function old_convertMetadataM\
|
|
apToFinal(e,t){var a=e[Symbol.metadata||Symbol.for("Symbol.metadata")],r=Object.getOwnPropertySymbols(t);if(0!==r.length){for(var o=0;o<r.le\
|
|
ngth;o++){var i=r[o],n=t[i],l=a?a[i]:null,s=n.public,c=l?l.public:null;s&&c&&Object.setPrototypeOf(s,c);var d=n.private;if(d){var u=Array.fr\
|
|
om(d.values()),f=l?l.private:null;f&&(u=u.concat(f)),n.private=u}l&&Object.setPrototypeOf(n,l)}a&&Object.setPrototypeOf(t,a),e[Symbol.metada\
|
|
ta||Symbol.for("Symbol.metadata")]=t}}function old_createAddInitializerMethod(e,t){return function(a){old_assertNotFinished(t,"addInitialize\
|
|
r"),old_assertCallable(a,"An initializer"),e.push(a)}}function old_memberDec(e,t,a,r,o,i,n,l,s){var c;switch(i){case 1:c="accessor";break;ca\
|
|
se 2:c="method";break;case 3:c="getter";break;case 4:c="setter";break;default:c="field"}var d,u,f={kind:c,name:l?"#"+t:toPropertyKey(t),isSt\
|
|
atic:n,isPrivate:l},p={v:!1};if(0!==i&&(f.addInitializer=old_createAddInitializerMethod(o,p)),l){d=2,u=Symbol(t);var v={};0===i?(v.get=a.get\
|
|
,v.set=a.set):2===i?v.get=function(){return a.value}:(1!==i&&3!==i||(v.get=function(){return a.get.call(this)}),1!==i&&4!==i||(v.set=functio\
|
|
n(e){a.set.call(this,e)})),f.access=v}else d=1,u=t;try{return e(s,Object.assign(f,old_createMetadataMethodsForProperty(r,d,u,p)))}finally{p.\
|
|
v=!0}}function old_assertNotFinished(e,t){if(e.v)throw Error("attempted to call "+t+" after decoration was finished")}function old_assertMet\
|
|
adataKey(e){if("symbol"!=typeof e)throw new TypeError("Metadata keys must be symbols, received: "+e)}function old_assertCallable(e,t){if("fu\
|
|
nction"!=typeof e)throw new TypeError(t+" must be a function")}function old_assertValidReturnValue(e,t){var a=typeof t;if(1===e){if("object"\
|
|
!==a||null===t)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==t.get&&\
|
|
old_assertCallable(t.get,"accessor.get"),void 0!==t.set&&old_assertCallable(t.set,"accessor.set"),void 0!==t.init&&old_assertCallable(t.init\
|
|
,"accessor.init"),void 0!==t.initializer&&old_assertCallable(t.initializer,"accessor.initializer")}else if("function"!==a)throw new TypeErro\
|
|
r((0===e?"field":10===e?"class":"method")+" decorators must return a function or void 0")}function old_getInit(e){var t;return null==(t=e.in\
|
|
it)&&(t=e.initializer)&&void 0!==console&&console.warn(".initializer has been renamed to .init as of March 2022"),t}function old_applyMember\
|
|
Dec(e,t,a,r,o,i,n,l,s){var c,d,u,f,p,v,y,h=a[0];if(n?(0===o||1===o?(c={get:a[3],set:a[4]},u="get"):3===o?(c={get:a[3]},u="get"):4===o?(c={se\
|
|
t:a[3]},u="set"):c={value:a[3]},0!==o&&(1===o&&setFunctionName(a[4],"#"+r,"set"),setFunctionName(a[3],"#"+r,u))):0!==o&&(c=Object.getOwnProp\
|
|
ertyDescriptor(t,r)),1===o?f={get:c.get,set:c.set}:2===o?f=c.value:3===o?f=c.get:4===o&&(f=c.set),"function"==typeof h)void 0!==(p=old_membe\
|
|
rDec(h,r,c,l,s,o,i,n,f))&&(old_assertValidReturnValue(o,p),0===o?d=p:1===o?(d=old_getInit(p),v=p.get||f.get,y=p.set||f.set,f={get:v,set:y}):\
|
|
f=p);else for(var m=h.length-1;m>=0;m--){var b;void 0!==(p=old_memberDec(h[m],r,c,l,s,o,i,n,f))&&(old_assertValidReturnValue(o,p),0===o?b=p:\
|
|
1===o?(b=old_getInit(p),v=p.get||f.get,y=p.set||f.set,f={get:v,set:y}):f=p,void 0!==b&&(void 0===d?d=b:"function"==typeof d?d=[d,b]:d.push(b\
|
|
)))}if(0===o||1===o){if(void 0===d)d=function(e,t){return t};else if("function"!=typeof d){var g=d;d=function(e,t){for(var a=t,r=0;r<g.lengt\
|
|
h;r++)a=g[r].call(e,a);return a}}else{var _=d;d=function(e,t){return _.call(e,t)}}e.push(d)}0!==o&&(1===o?(c.get=f.get,c.set=f.set):2===o?c.\
|
|
value=f:3===o?c.get=f:4===o&&(c.set=f),n?1===o?(e.push((function(e,t){return f.get.call(e,t)})),e.push((function(e,t){return f.set.call(e,t)\
|
|
}))):2===o?e.push(f):e.push((function(e,t){return f.call(e,t)})):Object.defineProperty(t,r,c))}function old_applyMemberDecs(e,t,a,r,o){for(v\
|
|
ar i,n,l=new Map,s=new Map,c=0;c<o.length;c++){var d=o[c];if(Array.isArray(d)){var u,f,p,v=d[1],y=d[2],h=d.length>3,m=v>=5;if(m?(u=t,f=r,0!=\
|
|
(v-=5)&&(p=n=n||[])):(u=t.prototype,f=a,0!==v&&(p=i=i||[])),0!==v&&!h){var b=m?s:l,g=b.get(y)||0;if(!0===g||3===g&&4!==v||4===g&&3!==v)throw\
|
|
Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not \
|
|
currently supported by the decorators plugin. Property name was: "+y);!g&&v>2?b.set(y,v):b.set(y,!0)}old_applyMemberDec(e,u,d,y,v,m,h,f,p)}}\
|
|
old_pushInitializers(e,i),old_pushInitializers(e,n)}function old_pushInitializers(e,t){t&&e.push((function(e){for(var a=0;a<t.length;a++)t[a\
|
|
].call(e);return e}))}function old_applyClassDecs(e,t,a,r){if(r.length>0){for(var o=[],i=t,n=t.name,l=r.length-1;l>=0;l--){var s={v:!1};try{\
|
|
var c=Object.assign({kind:"class",name:n,addInitializer:old_createAddInitializerMethod(o,s)},old_createMetadataMethodsForProperty(a,0,n,s)),\
|
|
d=r[l](i,c)}finally{s.v=!0}void 0!==d&&(old_assertValidReturnValue(10,d),i=d)}e.push(i,(function(){for(var e=0;e<o.length;e++)o[e].call(i)})\
|
|
)}}function applyDecs(e,t,a){var r=[],o={},i={};return old_applyMemberDecs(r,e,i,o,t),old_convertMetadataMapToFinal(e.prototype,i),old_apply\
|
|
ClassDecs(r,e,o,a),old_convertMetadataMapToFinal(e,o),r}', {
|
|
globals: ["Object", "Map", "Symbol", "Array", "Error", "TypeError", "console"],
|
|
locals: {
|
|
old_createMetadataMethodsForProperty: ["body.0.id", "body.3.body.body.4.block.body.0.argument.arguments.1.arguments.1.callee", "body\
|
|
.12.body.body.0.consequent.body.0.body.body.1.block.body.0.declarations.0.init.arguments.1.callee"],
|
|
old_convertMetadataMapToFinal: ["body.1.id", "body.13.body.body.1.argument.expressions.1.callee", "body.13.body.body.1.argument.expr\
|
|
essions.3.callee"],
|
|
old_createAddInitializerMethod: ["body.2.id", "body.3.body.body.3.test.expressions.0.right.right.callee", "body.12.body.body.0.conse\
|
|
quent.body.0.body.body.1.block.body.0.declarations.0.init.arguments.0.properties.2.value.callee"],
|
|
old_memberDec: ["body.3.id", "body.9.body.body.1.consequent.expression.left.right.right.callee", "body.9.body.body.1.alternate.body.\
|
|
body.1.expression.left.right.right.callee"],
|
|
old_assertNotFinished: ["body.4.id", "body.0.body.body.0.argument.properties.0.value.body.body.0.expression.expressions.0.callee", "\
|
|
body.0.body.body.0.argument.properties.1.value.body.body.0.expression.expressions.0.callee", "body.2.body.body.0.argument.body.body.0.expres\
|
|
sion.expressions.0.callee"],
|
|
old_assertMetadataKey: ["body.5.id", "body.0.body.body.0.argument.properties.0.value.body.body.0.expression.expressions.1.callee", "\
|
|
body.0.body.body.0.argument.properties.1.value.body.body.0.expression.expressions.1.callee"],
|
|
old_assertCallable: ["body.6.id", "body.2.body.body.0.argument.body.body.0.expression.expressions.1.callee", "body.7.body.body.1.con\
|
|
sequent.body.1.expression.expressions.0.right.callee", "body.7.body.body.1.consequent.body.1.expression.expressions.1.right.callee", "body.7\
|
|
.body.body.1.consequent.body.1.expression.expressions.2.right.callee", "body.7.body.body.1.consequent.body.1.expression.expressions.3.right.\
|
|
callee"],
|
|
old_assertValidReturnValue: ["body.7.id", "body.9.body.body.1.consequent.expression.right.expressions.0.callee", "body.9.body.body.1\
|
|
.alternate.body.body.1.expression.right.expressions.0.callee", "body.12.body.body.0.consequent.body.0.body.body.2.expression.right.expressio\
|
|
ns.0.callee"],
|
|
old_getInit: ["body.8.id", "body.9.body.body.1.consequent.expression.right.expressions.1.alternate.consequent.expressions.0.right.ca\
|
|
llee", "body.9.body.body.1.alternate.body.body.1.expression.right.expressions.1.alternate.consequent.expressions.0.right.callee"],
|
|
old_applyMemberDec: ["body.9.id", "body.10.body.body.0.body.body.1.consequent.body.2.expression.callee"],
|
|
old_applyMemberDecs: ["body.10.id", "body.13.body.body.1.argument.expressions.0.callee"],
|
|
old_pushInitializers: ["body.11.id", "body.10.body.body.1.expression.expressions.0.callee", "body.10.body.body.1.expression.expressi\
|
|
ons.1.callee"],
|
|
old_applyClassDecs: ["body.12.id", "body.13.body.body.1.argument.expressions.2.callee"],
|
|
applyDecs: ["body.13.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "applyDecs",
|
|
dependencies: {
|
|
setFunctionName: ["body.9.body.body.1.test.expressions.0.consequent.expressions.1.right.expressions.0.right.callee", "body.9.body.bo\
|
|
dy.1.test.expressions.0.consequent.expressions.1.right.expressions.1.callee"],
|
|
toPropertyKey: ["body.3.body.body.2.declarations.2.init.properties.1.value.alternate.callee"]
|
|
}
|
|
}),
|
|
applyDecs2203: oe("7.19.0", 'function applyDecs2203Factory(){function createAddInitializerMethod(e,t){return function(r){!function(e,t){\
|
|
if(e.v)throw Error("attempted to call addInitializer after decoration was finished")}(t),assertCallable(r,"An initializer"),e.push(r)}}funct\
|
|
ion memberDec(e,t,r,a,n,i,s,o){var c;switch(n){case 1:c="accessor";break;case 2:c="method";break;case 3:c="getter";break;case 4:c="setter";b\
|
|
reak;default:c="field"}var l,u,f={kind:c,name:s?"#"+t:t,static:i,private:s},p={v:!1};0!==n&&(f.addInitializer=createAddInitializerMethod(a,p\
|
|
)),0===n?s?(l=r.get,u=r.set):(l=function(){return this[t]},u=function(e){this[t]=e}):2===n?l=function(){return r.value}:(1!==n&&3!==n||(l=fu\
|
|
nction(){return r.get.call(this)}),1!==n&&4!==n||(u=function(e){r.set.call(this,e)})),f.access=l&&u?{get:l,set:u}:l?{get:l}:{set:u};try{retu\
|
|
rn e(o,f)}finally{p.v=!0}}function assertCallable(e,t){if("function"!=typeof e)throw new TypeError(t+" must be a function")}function assertV\
|
|
alidReturnValue(e,t){var r=typeof t;if(1===e){if("object"!==r||null===t)throw new TypeError("accessor decorators must return an object with \
|
|
get, set, or init properties or void 0");void 0!==t.get&&assertCallable(t.get,"accessor.get"),void 0!==t.set&&assertCallable(t.set,"accessor\
|
|
.set"),void 0!==t.init&&assertCallable(t.init,"accessor.init")}else if("function"!==r)throw new TypeError((0===e?"field":10===e?"class":"met\
|
|
hod")+" decorators must return a function or void 0")}function applyMemberDec(e,t,r,a,n,i,s,o){var c,l,u,f,p,d,h=r[0];if(s?c=0===n||1===n?{g\
|
|
et:r[3],set:r[4]}:3===n?{get:r[3]}:4===n?{set:r[3]}:{value:r[3]}:0!==n&&(c=Object.getOwnPropertyDescriptor(t,a)),1===n?u={get:c.get,set:c.se\
|
|
t}:2===n?u=c.value:3===n?u=c.get:4===n&&(u=c.set),"function"==typeof h)void 0!==(f=memberDec(h,a,c,o,n,i,s,u))&&(assertValidReturnValue(n,f)\
|
|
,0===n?l=f:1===n?(l=f.init,p=f.get||u.get,d=f.set||u.set,u={get:p,set:d}):u=f);else for(var v=h.length-1;v>=0;v--){var g;void 0!==(f=memberD\
|
|
ec(h[v],a,c,o,n,i,s,u))&&(assertValidReturnValue(n,f),0===n?g=f:1===n?(g=f.init,p=f.get||u.get,d=f.set||u.set,u={get:p,set:d}):u=f,void 0!==\
|
|
g&&(void 0===l?l=g:"function"==typeof l?l=[l,g]:l.push(g)))}if(0===n||1===n){if(void 0===l)l=function(e,t){return t};else if("function"!=typ\
|
|
eof l){var y=l;l=function(e,t){for(var r=t,a=0;a<y.length;a++)r=y[a].call(e,r);return r}}else{var m=l;l=function(e,t){return m.call(e,t)}}e.\
|
|
push(l)}0!==n&&(1===n?(c.get=u.get,c.set=u.set):2===n?c.value=u:3===n?c.get=u:4===n&&(c.set=u),s?1===n?(e.push((function(e,t){return u.get.c\
|
|
all(e,t)})),e.push((function(e,t){return u.set.call(e,t)}))):2===n?e.push(u):e.push((function(e,t){return u.call(e,t)})):Object.defineProper\
|
|
ty(t,a,c))}function pushInitializers(e,t){t&&e.push((function(e){for(var r=0;r<t.length;r++)t[r].call(e);return e}))}return function(e,t,r){\
|
|
var a=[];return function(e,t,r){for(var a,n,i=new Map,s=new Map,o=0;o<r.length;o++){var c=r[o];if(Array.isArray(c)){var l,u,f=c[1],p=c[2],d=\
|
|
c.length>3,h=f>=5;if(h?(l=t,0!=(f-=5)&&(u=n=n||[])):(l=t.prototype,0!==f&&(u=a=a||[])),0!==f&&!d){var v=h?s:i,g=v.get(p)||0;if(!0===g||3===g\
|
|
&&4!==f||4===g&&3!==f)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public me\
|
|
thod/accessor. This is not currently supported by the decorators plugin. Property name was: "+p);!g&&f>2?v.set(p,f):v.set(p,!0)}applyMemberD\
|
|
ec(e,l,c,p,f,h,d,u)}}pushInitializers(e,a),pushInitializers(e,n)}(a,e,t),function(e,t,r){if(r.length>0){for(var a=[],n=t,i=t.name,s=r.length\
|
|
-1;s>=0;s--){var o={v:!1};try{var c=r[s](n,{kind:"class",name:i,addInitializer:createAddInitializerMethod(a,o)})}finally{o.v=!0}void 0!==c&&\
|
|
(assertValidReturnValue(10,c),n=c)}e.push(n,(function(){for(var e=0;e<a.length;e++)a[e].call(n)}))}}(a,e,r),a}}var applyDecs2203Impl;functio\
|
|
n applyDecs2203(e,t,r){return(applyDecs2203Impl=applyDecs2203Impl||applyDecs2203Factory())(e,t,r)}', {
|
|
globals: ["Error", "TypeError", "Object", "Map", "Array"],
|
|
locals: {
|
|
applyDecs2203Factory: ["body.0.id", "body.2.body.body.0.argument.callee.right.right.callee"],
|
|
applyDecs2203Impl: ["body.1.declarations.0.id", "body.2.body.body.0.argument.callee.right.left", "body.2.body.body.0.argument.callee\
|
|
.left"],
|
|
applyDecs2203: ["body.2.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "applyDecs2203",
|
|
dependencies: {}
|
|
}),
|
|
applyDecs2203R: oe("7.20.0", 'function applyDecs2203RFactory(){function createAddInitializerMethod(e,t){return function(r){!function(e,t\
|
|
){if(e.v)throw Error("attempted to call addInitializer after decoration was finished")}(t),assertCallable(r,"An initializer"),e.push(r)}}fun\
|
|
ction memberDec(e,t,r,n,a,i,o,s){var c;switch(a){case 1:c="accessor";break;case 2:c="method";break;case 3:c="getter";break;case 4:c="setter"\
|
|
;break;default:c="field"}var l,u,f={kind:c,name:o?"#"+t:toPropertyKey(t),static:i,private:o},p={v:!1};0!==a&&(f.addInitializer=createAddInit\
|
|
ializerMethod(n,p)),0===a?o?(l=r.get,u=r.set):(l=function(){return this[t]},u=function(e){this[t]=e}):2===a?l=function(){return r.value}:(1!\
|
|
==a&&3!==a||(l=function(){return r.get.call(this)}),1!==a&&4!==a||(u=function(e){r.set.call(this,e)})),f.access=l&&u?{get:l,set:u}:l?{get:l}\
|
|
:{set:u};try{return e(s,f)}finally{p.v=!0}}function assertCallable(e,t){if("function"!=typeof e)throw new TypeError(t+" must be a function")\
|
|
}function assertValidReturnValue(e,t){var r=typeof t;if(1===e){if("object"!==r||null===t)throw new TypeError("accessor decorators must retur\
|
|
n an object with get, set, or init properties or void 0");void 0!==t.get&&assertCallable(t.get,"accessor.get"),void 0!==t.set&&assertCallabl\
|
|
e(t.set,"accessor.set"),void 0!==t.init&&assertCallable(t.init,"accessor.init")}else if("function"!==r)throw new TypeError((0===e?"field":10\
|
|
===e?"class":"method")+" decorators must return a function or void 0")}function applyMemberDec(e,t,r,n,a,i,o,s){var c,l,u,f,p,d,h,v=r[0];if(\
|
|
o?(0===a||1===a?(c={get:r[3],set:r[4]},u="get"):3===a?(c={get:r[3]},u="get"):4===a?(c={set:r[3]},u="set"):c={value:r[3]},0!==a&&(1===a&&setF\
|
|
unctionName(r[4],"#"+n,"set"),setFunctionName(r[3],"#"+n,u))):0!==a&&(c=Object.getOwnPropertyDescriptor(t,n)),1===a?f={get:c.get,set:c.set}:\
|
|
2===a?f=c.value:3===a?f=c.get:4===a&&(f=c.set),"function"==typeof v)void 0!==(p=memberDec(v,n,c,s,a,i,o,f))&&(assertValidReturnValue(a,p),0=\
|
|
==a?l=p:1===a?(l=p.init,d=p.get||f.get,h=p.set||f.set,f={get:d,set:h}):f=p);else for(var g=v.length-1;g>=0;g--){var y;void 0!==(p=memberDec(\
|
|
v[g],n,c,s,a,i,o,f))&&(assertValidReturnValue(a,p),0===a?y=p:1===a?(y=p.init,d=p.get||f.get,h=p.set||f.set,f={get:d,set:h}):f=p,void 0!==y&&\
|
|
(void 0===l?l=y:"function"==typeof l?l=[l,y]:l.push(y)))}if(0===a||1===a){if(void 0===l)l=function(e,t){return t};else if("function"!=typeof\
|
|
l){var m=l;l=function(e,t){for(var r=t,n=0;n<m.length;n++)r=m[n].call(e,r);return r}}else{var b=l;l=function(e,t){return b.call(e,t)}}e.pus\
|
|
h(l)}0!==a&&(1===a?(c.get=f.get,c.set=f.set):2===a?c.value=f:3===a?c.get=f:4===a&&(c.set=f),o?1===a?(e.push((function(e,t){return f.get.call\
|
|
(e,t)})),e.push((function(e,t){return f.set.call(e,t)}))):2===a?e.push(f):e.push((function(e,t){return f.call(e,t)})):Object.defineProperty(\
|
|
t,n,c))}function applyMemberDecs(e,t){for(var r,n,a=[],i=new Map,o=new Map,s=0;s<t.length;s++){var c=t[s];if(Array.isArray(c)){var l,u,f=c[1\
|
|
],p=c[2],d=c.length>3,h=f>=5;if(h?(l=e,0!=(f-=5)&&(u=n=n||[])):(l=e.prototype,0!==f&&(u=r=r||[])),0!==f&&!d){var v=h?o:i,g=v.get(p)||0;if(!0\
|
|
===g||3===g&&4!==f||4===g&&3!==f)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorate\
|
|
d public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+p);!g&&f>2?v.set(p,f):v.set(p,!0)}a\
|
|
pplyMemberDec(a,l,c,p,f,h,d,u)}}return pushInitializers(a,r),pushInitializers(a,n),a}function pushInitializers(e,t){t&&e.push((function(e){f\
|
|
or(var r=0;r<t.length;r++)t[r].call(e);return e}))}return function(e,t,r){return{e:applyMemberDecs(e,t),get c(){return function(e,t){if(t.le\
|
|
ngth>0){for(var r=[],n=e,a=e.name,i=t.length-1;i>=0;i--){var o={v:!1};try{var s=t[i](n,{kind:"class",name:a,addInitializer:createAddInitiali\
|
|
zerMethod(r,o)})}finally{o.v=!0}void 0!==s&&(assertValidReturnValue(10,s),n=s)}return[n,function(){for(var e=0;e<r.length;e++)r[e].call(n)}]\
|
|
}}(e,r)}}}}function applyDecs2203R(e,t,r){return(applyDecs2203R=applyDecs2203RFactory())(e,t,r)}', {
|
|
globals: ["Error", "TypeError", "Object", "Map", "Array"],
|
|
locals: {
|
|
applyDecs2203RFactory: ["body.0.id", "body.1.body.body.0.argument.callee.right.callee"],
|
|
applyDecs2203R: ["body.1.id", "body.1.body.body.0.argument.callee.left"]
|
|
},
|
|
exportBindingAssignments: ["body.1.body.body.0.argument.callee"],
|
|
exportName: "applyDecs2203R",
|
|
dependencies: {
|
|
setFunctionName: ["body.0.body.body.4.body.body.1.test.expressions.0.consequent.expressions.1.right.expressions.0.right.callee", "bo\
|
|
dy.0.body.body.4.body.body.1.test.expressions.0.consequent.expressions.1.right.expressions.1.callee"],
|
|
toPropertyKey: ["body.0.body.body.1.body.body.2.declarations.2.init.properties.1.value.alternate.callee"]
|
|
}
|
|
}),
|
|
applyDecs2301: oe("7.21.0", 'function applyDecs2301Factory(){function createAddInitializerMethod(e,t){return function(r){!function(e,t){\
|
|
if(e.v)throw Error("attempted to call addInitializer after decoration was finished")}(t),assertCallable(r,"An initializer"),e.push(r)}}funct\
|
|
ion assertInstanceIfPrivate(e,t){if(!e(t))throw new TypeError("Attempted to access private element on non-instance")}function memberDec(e,t,\
|
|
r,n,a,i,s,o,c){var u;switch(a){case 1:u="accessor";break;case 2:u="method";break;case 3:u="getter";break;case 4:u="setter";break;default:u="\
|
|
field"}var l,f,p={kind:u,name:s?"#"+t:toPropertyKey(t),static:i,private:s},d={v:!1};if(0!==a&&(p.addInitializer=createAddInitializerMethod(n\
|
|
,d)),s||0!==a&&2!==a)if(2===a)l=function(e){return assertInstanceIfPrivate(c,e),r.value};else{var h=0===a||1===a;(h||3===a)&&(l=s?function(e\
|
|
){return assertInstanceIfPrivate(c,e),r.get.call(e)}:function(e){return r.get.call(e)}),(h||4===a)&&(f=s?function(e,t){assertInstanceIfPriva\
|
|
te(c,e),r.set.call(e,t)}:function(e,t){r.set.call(e,t)})}else l=function(e){return e[t]},0===a&&(f=function(e,r){e[t]=r});var v=s?c.bind():f\
|
|
unction(e){return t in e};p.access=l&&f?{get:l,set:f,has:v}:l?{get:l,has:v}:{set:f,has:v};try{return e(o,p)}finally{d.v=!0}}function assertC\
|
|
allable(e,t){if("function"!=typeof e)throw new TypeError(t+" must be a function")}function assertValidReturnValue(e,t){var r=typeof t;if(1==\
|
|
=e){if("object"!==r||null===t)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");v\
|
|
oid 0!==t.get&&assertCallable(t.get,"accessor.get"),void 0!==t.set&&assertCallable(t.set,"accessor.set"),void 0!==t.init&&assertCallable(t.i\
|
|
nit,"accessor.init")}else if("function"!==r)throw new TypeError((0===e?"field":10===e?"class":"method")+" decorators must return a function \
|
|
or void 0")}function curryThis2(e){return function(t){e(this,t)}}function applyMemberDec(e,t,r,n,a,i,s,o,c){var u,l,f,p,d,h,v,y,g=r[0];if(s?\
|
|
(0===a||1===a?(u={get:(d=r[3],function(){return d(this)}),set:curryThis2(r[4])},f="get"):3===a?(u={get:r[3]},f="get"):4===a?(u={set:r[3]},f=\
|
|
"set"):u={value:r[3]},0!==a&&(1===a&&setFunctionName(u.set,"#"+n,"set"),setFunctionName(u[f||"value"],"#"+n,f))):0!==a&&(u=Object.getOwnProp\
|
|
ertyDescriptor(t,n)),1===a?p={get:u.get,set:u.set}:2===a?p=u.value:3===a?p=u.get:4===a&&(p=u.set),"function"==typeof g)void 0!==(h=memberDec\
|
|
(g,n,u,o,a,i,s,p,c))&&(assertValidReturnValue(a,h),0===a?l=h:1===a?(l=h.init,v=h.get||p.get,y=h.set||p.set,p={get:v,set:y}):p=h);else for(va\
|
|
r m=g.length-1;m>=0;m--){var b;void 0!==(h=memberDec(g[m],n,u,o,a,i,s,p,c))&&(assertValidReturnValue(a,h),0===a?b=h:1===a?(b=h.init,v=h.get|\
|
|
|p.get,y=h.set||p.set,p={get:v,set:y}):p=h,void 0!==b&&(void 0===l?l=b:"function"==typeof l?l=[l,b]:l.push(b)))}if(0===a||1===a){if(void 0==\
|
|
=l)l=function(e,t){return t};else if("function"!=typeof l){var I=l;l=function(e,t){for(var r=t,n=0;n<I.length;n++)r=I[n].call(e,r);return r}\
|
|
}else{var w=l;l=function(e,t){return w.call(e,t)}}e.push(l)}0!==a&&(1===a?(u.get=p.get,u.set=p.set):2===a?u.value=p:3===a?u.get=p:4===a&&(u.\
|
|
set=p),s?1===a?(e.push((function(e,t){return p.get.call(e,t)})),e.push((function(e,t){return p.set.call(e,t)}))):2===a?e.push(p):e.push((fun\
|
|
ction(e,t){return p.call(e,t)})):Object.defineProperty(t,n,u))}function applyMemberDecs(e,t,r){for(var n,a,i,s=[],o=new Map,c=new Map,u=0;u<\
|
|
t.length;u++){var l=t[u];if(Array.isArray(l)){var f,p,d=l[1],h=l[2],v=l.length>3,y=d>=5,g=r;if(y?(f=e,0!=(d-=5)&&(p=a=a||[]),v&&!i&&(i=funct\
|
|
ion(t){return checkInRHS(t)===e}),g=i):(f=e.prototype,0!==d&&(p=n=n||[])),0!==d&&!v){var m=y?c:o,b=m.get(h)||0;if(!0===b||3===b&&4!==d||4===\
|
|
b&&3!==d)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor\
|
|
. This is not currently supported by the decorators plugin. Property name was: "+h);!b&&d>2?m.set(h,d):m.set(h,!0)}applyMemberDec(s,f,l,h,d,\
|
|
y,v,p,g)}}return pushInitializers(s,n),pushInitializers(s,a),s}function pushInitializers(e,t){t&&e.push((function(e){for(var r=0;r<t.length;\
|
|
r++)t[r].call(e);return e}))}return function(e,t,r,n){return{e:applyMemberDecs(e,t,n),get c(){return function(e,t){if(t.length>0){for(var r=\
|
|
[],n=e,a=e.name,i=t.length-1;i>=0;i--){var s={v:!1};try{var o=t[i](n,{kind:"class",name:a,addInitializer:createAddInitializerMethod(r,s)})}f\
|
|
inally{s.v=!0}void 0!==o&&(assertValidReturnValue(10,o),n=o)}return[n,function(){for(var e=0;e<r.length;e++)r[e].call(n)}]}}(e,r)}}}}functio\
|
|
n applyDecs2301(e,t,r,n){return(applyDecs2301=applyDecs2301Factory())(e,t,r,n)}', {
|
|
globals: ["Error", "TypeError", "Object", "Map", "Array"],
|
|
locals: {
|
|
applyDecs2301Factory: ["body.0.id", "body.1.body.body.0.argument.callee.right.callee"],
|
|
applyDecs2301: ["body.1.id", "body.1.body.body.0.argument.callee.left"]
|
|
},
|
|
exportBindingAssignments: ["body.1.body.body.0.argument.callee"],
|
|
exportName: "applyDecs2301",
|
|
dependencies: {
|
|
checkInRHS: ["body.0.body.body.7.body.body.0.body.body.1.consequent.body.1.test.expressions.0.consequent.expressions.2.right.right.b\
|
|
ody.body.0.argument.left.callee"],
|
|
setFunctionName: ["body.0.body.body.6.body.body.1.test.expressions.0.consequent.expressions.1.right.expressions.0.right.callee", "bo\
|
|
dy.0.body.body.6.body.body.1.test.expressions.0.consequent.expressions.1.right.expressions.1.callee"],
|
|
toPropertyKey: ["body.0.body.body.2.body.body.2.declarations.2.init.properties.1.value.alternate.callee"]
|
|
}
|
|
}),
|
|
applyDecs2305: oe("7.21.0", 'function applyDecs2305(e,t,r,n,o,a){function i(e,t,r){return function(n,o){return r&&r(n),e[t].call(n,o)}}f\
|
|
unction c(e,t){for(var r=0;r<e.length;r++)e[r].call(t);return t}function s(e,t,r,n){if("function"!=typeof e&&(n||void 0!==e))throw new TypeE\
|
|
rror(t+" must "+(r||"be")+" a function"+(n?"":" or undefined"));return e}function applyDec(e,t,r,n,o,a,c,u,l,f,p,d,h){function m(e){if(!h(e)\
|
|
)throw new TypeError("Attempted to access private element on non-instance")}var y,v=t[0],g=t[3],b=!u;if(!b){r||Array.isArray(v)||(v=[v]);var\
|
|
w={},S=[],A=3===o?"get":4===o||d?"set":"value";f?(p||d?w={get:setFunctionName((function(){return g(this)}),n,"get"),set:function(e){t[4](th\
|
|
is,e)}}:w[A]=g,p||setFunctionName(w[A],n,2===o?"":A)):p||(w=Object.getOwnPropertyDescriptor(e,n))}for(var P=e,j=v.length-1;j>=0;j-=r?2:1){va\
|
|
r D=v[j],E=r?v[j-1]:void 0,I={},O={kind:["field","accessor","method","getter","setter","class"][o],name:n,metadata:a,addInitializer:function\
|
|
(e,t){if(e.v)throw Error("attempted to call addInitializer after decoration was finished");s(t,"An initializer","be",!0),c.push(t)}.bind(nul\
|
|
l,I)};try{if(b)(y=s(D.call(E,P,O),"class decorators","return"))&&(P=y);else{var k,F;O.static=l,O.private=f,f?2===o?k=function(e){return m(e)\
|
|
,w.value}:(o<4&&(k=i(w,"get",m)),3!==o&&(F=i(w,"set",m))):(k=function(e){return e[n]},(o<2||4===o)&&(F=function(e,t){e[n]=t}));var N=O.acces\
|
|
s={has:f?h.bind():function(e){return n in e}};if(k&&(N.get=k),F&&(N.set=F),P=D.call(E,d?{get:w.get,set:w.set}:w[A],O),d){if("object"==typeof\
|
|
P&&P)(y=s(P.get,"accessor.get"))&&(w.get=y),(y=s(P.set,"accessor.set"))&&(w.set=y),(y=s(P.init,"accessor.init"))&&S.push(y);else if(void 0!\
|
|
==P)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else s(P,(p?"field":"method\
|
|
")+" decorators","return")&&(p?S.push(P):w[A]=P)}}finally{I.v=!0}}return(p||d)&&u.push((function(e,t){for(var r=S.length-1;r>=0;r--)t=S[r].c\
|
|
all(e,t);return t})),p||b||(f?d?u.push(i(w,"get"),i(w,"set")):u.push(2===o?w[A]:i.call.bind(w[A])):Object.defineProperty(e,n,w)),P}function \
|
|
u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:t})}if(arguments.l\
|
|
ength>=6)var l=a[Symbol.metadata||Symbol.for("Symbol.metadata")];var f=Object.create(null==l?null:l),p=function(e,t,r,n){var o,a,i=[],s=func\
|
|
tion(t){return checkInRHS(t)===e},u=new Map;function l(e){e&&i.push(c.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(\
|
|
p)){var d=p[1],h=p[2],m=p.length>3,y=16&d,v=!!(8&d),g=0==(d&=7),b=h+"/"+v;if(!g&&!m){var w=u.get(b);if(!0===w||3===w&&4!==d||4===w&&3!==d)th\
|
|
row Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is n\
|
|
ot currently supported by the decorators plugin. Property name was: "+h);u.set(b,!(d>2)||d)}applyDec(v?e:e.prototype,p,y,m?"#"+h:toPropertyK\
|
|
ey(h),d,n,v?a=a||[]:o=o||[],i,v,m,g,1===d,v&&m?s:r)}}return l(o),l(a),i}(e,t,o,f);return r.length||u(e,f),{e:p,get c(){var t=[];return r.len\
|
|
gth&&[u(applyDec(e,[r],n,e.name,5,f,t),f),c.bind(null,t,e)]}}}', {
|
|
globals: ["TypeError", "Array", "Object", "Error", "Symbol", "Map"],
|
|
locals: {
|
|
applyDecs2305: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "applyDecs2305",
|
|
dependencies: {
|
|
checkInRHS: ["body.0.body.body.6.declarations.1.init.callee.body.body.0.declarations.3.init.body.body.0.argument.left.callee"],
|
|
setFunctionName: ["body.0.body.body.3.body.body.2.consequent.body.2.expression.consequent.expressions.0.consequent.right.properties.\
|
|
0.value.callee", "body.0.body.body.3.body.body.2.consequent.body.2.expression.consequent.expressions.1.right.callee"],
|
|
toPropertyKey: ["body.0.body.body.6.declarations.1.init.callee.body.body.2.body.body.1.consequent.body.2.expression.arguments.3.alte\
|
|
rnate.callee"]
|
|
}
|
|
}),
|
|
classApplyDescriptorDestructureSet: oe("7.13.10", 'function _classApplyDescriptorDestructureSet(e,t){if(t.set)return"__destrObj"in t||(t\
|
|
.__destrObj={set value(r){t.set.call(e,r)}}),t.__destrObj;if(!t.writable)throw new TypeError("attempted to set read only private field");ret\
|
|
urn t}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_classApplyDescriptorDestructureSet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classApplyDescriptorDestructureSet",
|
|
dependencies: {}
|
|
}),
|
|
classApplyDescriptorGet: oe("7.13.10", "function _classApplyDescriptorGet(e,t){return t.get?t.get.call(e):t.value}", {
|
|
globals: [],
|
|
locals: {
|
|
_classApplyDescriptorGet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classApplyDescriptorGet",
|
|
dependencies: {}
|
|
}),
|
|
classApplyDescriptorSet: oe("7.13.10", 'function _classApplyDescriptorSet(e,t,l){if(t.set)t.set.call(e,l);else{if(!t.writable)throw new \
|
|
TypeError("attempted to set read only private field");t.value=l}}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_classApplyDescriptorSet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classApplyDescriptorSet",
|
|
dependencies: {}
|
|
}),
|
|
classCheckPrivateStaticAccess: oe("7.13.10", "function _classCheckPrivateStaticAccess(s,a,r){return assertClassBrand(a,s,r)}", {
|
|
globals: [],
|
|
locals: {
|
|
_classCheckPrivateStaticAccess: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classCheckPrivateStaticAccess",
|
|
dependencies: {
|
|
assertClassBrand: ["body.0.body.body.0.argument.callee"]
|
|
}
|
|
}),
|
|
classCheckPrivateStaticFieldDescriptor: oe("7.13.10", 'function _classCheckPrivateStaticFieldDescriptor(t,e){if(void 0===t)throw new Typ\
|
|
eError("attempted to "+e+" private static field before its declaration")}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_classCheckPrivateStaticFieldDescriptor: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classCheckPrivateStaticFieldDescriptor",
|
|
dependencies: {}
|
|
}),
|
|
classExtractFieldDescriptor: oe("7.13.10", "function _classExtractFieldDescriptor(e,t){return classPrivateFieldGet2(t,e)}", {
|
|
globals: [],
|
|
locals: {
|
|
_classExtractFieldDescriptor: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classExtractFieldDescriptor",
|
|
dependencies: {
|
|
classPrivateFieldGet2: ["body.0.body.body.0.argument.callee"]
|
|
}
|
|
}),
|
|
classPrivateFieldDestructureSet: oe("7.4.4", "function _classPrivateFieldDestructureSet(e,t){var r=classPrivateFieldGet2(t,e);return cla\
|
|
ssApplyDescriptorDestructureSet(e,r)}", {
|
|
globals: [],
|
|
locals: {
|
|
_classPrivateFieldDestructureSet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateFieldDestructureSet",
|
|
dependencies: {
|
|
classApplyDescriptorDestructureSet: ["body.0.body.body.1.argument.callee"],
|
|
classPrivateFieldGet2: ["body.0.body.body.0.declarations.0.init.callee"]
|
|
}
|
|
}),
|
|
classPrivateFieldGet: oe("7.0.0-beta.0", "function _classPrivateFieldGet(e,t){var r=classPrivateFieldGet2(t,e);return classApplyDescript\
|
|
orGet(e,r)}", {
|
|
globals: [],
|
|
locals: {
|
|
_classPrivateFieldGet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateFieldGet",
|
|
dependencies: {
|
|
classApplyDescriptorGet: ["body.0.body.body.1.argument.callee"],
|
|
classPrivateFieldGet2: ["body.0.body.body.0.declarations.0.init.callee"]
|
|
}
|
|
}),
|
|
classPrivateFieldSet: oe("7.0.0-beta.0", "function _classPrivateFieldSet(e,t,r){var s=classPrivateFieldGet2(t,e);return classApplyDescri\
|
|
ptorSet(e,s,r),r}", {
|
|
globals: [],
|
|
locals: {
|
|
_classPrivateFieldSet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateFieldSet",
|
|
dependencies: {
|
|
classApplyDescriptorSet: ["body.0.body.body.1.argument.expressions.0.callee"],
|
|
classPrivateFieldGet2: ["body.0.body.body.0.declarations.0.init.callee"]
|
|
}
|
|
}),
|
|
classPrivateMethodGet: oe("7.1.6", "function _classPrivateMethodGet(s,a,r){return assertClassBrand(a,s),r}", {
|
|
globals: [],
|
|
locals: {
|
|
_classPrivateMethodGet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateMethodGet",
|
|
dependencies: {
|
|
assertClassBrand: ["body.0.body.body.0.argument.expressions.0.callee"]
|
|
}
|
|
}),
|
|
classPrivateMethodSet: oe("7.1.6", 'function _classPrivateMethodSet(){throw new TypeError("attempted to reassign private method")}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_classPrivateMethodSet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classPrivateMethodSet",
|
|
dependencies: {}
|
|
}),
|
|
classStaticPrivateFieldDestructureSet: oe("7.13.10", 'function _classStaticPrivateFieldDestructureSet(t,r,s){return assertClassBrand(r,t\
|
|
),classCheckPrivateStaticFieldDescriptor(s,"set"),classApplyDescriptorDestructureSet(t,s)}', {
|
|
globals: [],
|
|
locals: {
|
|
_classStaticPrivateFieldDestructureSet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classStaticPrivateFieldDestructureSet",
|
|
dependencies: {
|
|
classApplyDescriptorDestructureSet: ["body.0.body.body.0.argument.expressions.2.callee"],
|
|
assertClassBrand: ["body.0.body.body.0.argument.expressions.0.callee"],
|
|
classCheckPrivateStaticFieldDescriptor: ["body.0.body.body.0.argument.expressions.1.callee"]
|
|
}
|
|
}),
|
|
classStaticPrivateFieldSpecGet: oe("7.0.2", 'function _classStaticPrivateFieldSpecGet(t,s,r){return assertClassBrand(s,t),classCheckPriv\
|
|
ateStaticFieldDescriptor(r,"get"),classApplyDescriptorGet(t,r)}', {
|
|
globals: [],
|
|
locals: {
|
|
_classStaticPrivateFieldSpecGet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classStaticPrivateFieldSpecGet",
|
|
dependencies: {
|
|
classApplyDescriptorGet: ["body.0.body.body.0.argument.expressions.2.callee"],
|
|
assertClassBrand: ["body.0.body.body.0.argument.expressions.0.callee"],
|
|
classCheckPrivateStaticFieldDescriptor: ["body.0.body.body.0.argument.expressions.1.callee"]
|
|
}
|
|
}),
|
|
classStaticPrivateFieldSpecSet: oe("7.0.2", 'function _classStaticPrivateFieldSpecSet(s,t,r,e){return assertClassBrand(t,s),classCheckPr\
|
|
ivateStaticFieldDescriptor(r,"set"),classApplyDescriptorSet(s,r,e),e}', {
|
|
globals: [],
|
|
locals: {
|
|
_classStaticPrivateFieldSpecSet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classStaticPrivateFieldSpecSet",
|
|
dependencies: {
|
|
classApplyDescriptorSet: ["body.0.body.body.0.argument.expressions.2.callee"],
|
|
assertClassBrand: ["body.0.body.body.0.argument.expressions.0.callee"],
|
|
classCheckPrivateStaticFieldDescriptor: ["body.0.body.body.0.argument.expressions.1.callee"]
|
|
}
|
|
}),
|
|
classStaticPrivateMethodSet: oe("7.3.2", 'function _classStaticPrivateMethodSet(){throw new TypeError("attempted to set read only static\
|
|
private field")}', {
|
|
globals: ["TypeError"],
|
|
locals: {
|
|
_classStaticPrivateMethodSet: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_classStaticPrivateMethodSet",
|
|
dependencies: {}
|
|
}),
|
|
defineEnumerableProperties: oe("7.0.0-beta.0", 'function _defineEnumerableProperties(e,r){for(var t in r){var n=r[t];n.configurable=n.en\
|
|
umerable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,t,n)}if(Object.getOwnPropertySymbols)for(var a=Object.getOwnPropertySymbols\
|
|
(r),b=0;b<a.length;b++){var i=a[b];(n=r[i]).configurable=n.enumerable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i,n)}return e}',
|
|
{
|
|
globals: ["Object"],
|
|
locals: {
|
|
_defineEnumerableProperties: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_defineEnumerableProperties",
|
|
dependencies: {}
|
|
}),
|
|
dispose: oe("7.22.0", 'function dispose_SuppressedError(r,e){return"undefined"!=typeof SuppressedError?dispose_SuppressedError=Suppresse\
|
|
dError:(dispose_SuppressedError=function(r,e){this.suppressed=e,this.error=r,this.stack=Error().stack},dispose_SuppressedError.prototype=Obj\
|
|
ect.create(Error.prototype,{constructor:{value:dispose_SuppressedError,writable:!0,configurable:!0}})),new dispose_SuppressedError(r,e)}func\
|
|
tion _dispose(r,e,s){function next(){for(;r.length>0;)try{var o=r.pop(),p=o.d.call(o.v);if(o.a)return Promise.resolve(p).then(next,err)}catc\
|
|
h(r){return err(r)}if(s)throw e}function err(r){return e=s?new dispose_SuppressedError(e,r):r,s=!0,next()}return next()}', {
|
|
globals: ["SuppressedError", "Error", "Object", "Promise"],
|
|
locals: {
|
|
dispose_SuppressedError: ["body.0.id", "body.0.body.body.0.argument.expressions.0.alternate.expressions.1.left.object", "body.0.body\
|
|
.body.0.argument.expressions.0.alternate.expressions.1.right.arguments.1.properties.0.value.properties.0.value", "body.0.body.body.0.argumen\
|
|
t.expressions.1.callee", "body.1.body.body.1.body.body.0.argument.expressions.0.right.consequent.callee", "body.0.body.body.0.argument.expre\
|
|
ssions.0.consequent.left", "body.0.body.body.0.argument.expressions.0.alternate.expressions.0.left"],
|
|
_dispose: ["body.1.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_dispose",
|
|
dependencies: {}
|
|
}),
|
|
objectSpread: oe("7.0.0-beta.0", 'function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?Object(argument\
|
|
s[r]):{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(t).filter((function(e\
|
|
){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.forEach((function(r){defineProperty(e,r,t[r])}))}return e}', {
|
|
globals: ["Object"],
|
|
locals: {
|
|
_objectSpread: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_objectSpread",
|
|
dependencies: {
|
|
defineProperty: ["body.0.body.body.0.body.body.1.expression.expressions.1.arguments.0.body.body.0.expression.callee"]
|
|
}
|
|
}),
|
|
using: oe("7.22.0", 'function _using(o,n,e){if(null==n)return n;if(Object(n)!==n)throw new TypeError("using declarations can only be use\
|
|
d with objects, functions, null, or undefined.");if(e)var r=n[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(null==r&&(r=n[Symbo\
|
|
l.dispose||Symbol.for("Symbol.dispose")]),"function"!=typeof r)throw new TypeError("Property [Symbol.dispose] is not a function.");return o.\
|
|
push({v:n,d:r,a:e}),n}', {
|
|
globals: ["Object", "TypeError", "Symbol"],
|
|
locals: {
|
|
_using: ["body.0.id"]
|
|
},
|
|
exportBindingAssignments: [],
|
|
exportName: "_using",
|
|
dependencies: {}
|
|
})
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/helpers/lib/index.js
|
|
var pC = E((is) => {
|
|
"use strict";
|
|
Object.defineProperty(is, "__esModule", {
|
|
value: !0
|
|
});
|
|
is.default = void 0;
|
|
is.get = X9;
|
|
is.getDependencies = bFe;
|
|
is.list = void 0;
|
|
is.minVersion = gFe;
|
|
var hFe = Ve(), J9 = z9(), {
|
|
cloneNode: mFe,
|
|
identifier: G9
|
|
} = hFe;
|
|
function By(e, t, r) {
|
|
try {
|
|
let i = t.split("."), n = i.shift();
|
|
for (; i.length > 0; )
|
|
e = e[n], n = i.shift();
|
|
if (arguments.length > 2)
|
|
e[n] = r;
|
|
else
|
|
return e[n];
|
|
} catch (i) {
|
|
throw i.message += ` (when accessing ${t})`, i;
|
|
}
|
|
}
|
|
s(By, "deep");
|
|
function yFe(e, t, r, i, n, a) {
|
|
let {
|
|
locals: o,
|
|
dependencies: u,
|
|
exportBindingAssignments: l,
|
|
exportName: c
|
|
} = t, f = new Set(i || []);
|
|
r && f.add(r);
|
|
for (let [m, h] of (Object.entries || ((d) => Object.keys(d).map((y) => [y, d[y]])))(o)) {
|
|
let d = m;
|
|
if (r && m === c)
|
|
d = r;
|
|
else
|
|
for (; f.has(d); ) d = "_" + d;
|
|
if (d !== m)
|
|
for (let y of h)
|
|
By(e, y, G9(d));
|
|
}
|
|
for (let [m, h] of (Object.entries || ((d) => Object.keys(d).map((y) => [y, d[y]])))(u)) {
|
|
let d = typeof n == "function" && n(m) || G9(m);
|
|
for (let y of h)
|
|
By(e, y, mFe(d));
|
|
}
|
|
a?.(e, c, (m) => {
|
|
l.forEach((h) => By(e, h, m(By(e, h))));
|
|
});
|
|
}
|
|
s(yFe, "permuteHelperAST");
|
|
var dC = /* @__PURE__ */ Object.create(null);
|
|
function Ny(e) {
|
|
if (!dC[e]) {
|
|
let t = J9.default[e];
|
|
if (!t)
|
|
throw Object.assign(new ReferenceError(`Unknown helper ${e}`), {
|
|
code: "BABEL_HELPER_UNKNOWN",
|
|
helper: e
|
|
});
|
|
dC[e] = {
|
|
minVersion: t.minVersion,
|
|
build(r, i, n, a) {
|
|
let o = t.ast();
|
|
return yFe(o, t.metadata, i, n, r, a), {
|
|
nodes: o.body,
|
|
globals: t.metadata.globals
|
|
};
|
|
},
|
|
getDependencies() {
|
|
return Object.keys(t.metadata.dependencies);
|
|
}
|
|
};
|
|
}
|
|
return dC[e];
|
|
}
|
|
s(Ny, "loadHelper");
|
|
function X9(e, t, r, i, n) {
|
|
if (typeof r == "object") {
|
|
let a = r;
|
|
a?.type === "Identifier" ? r = a.name : r = void 0;
|
|
}
|
|
return Ny(e).build(t, r, i, n);
|
|
}
|
|
s(X9, "get");
|
|
function gFe(e) {
|
|
return Ny(e).minVersion;
|
|
}
|
|
s(gFe, "minVersion");
|
|
function bFe(e) {
|
|
return Ny(e).getDependencies();
|
|
}
|
|
s(bFe, "getDependencies");
|
|
is.ensure = (e) => {
|
|
Ny(e);
|
|
};
|
|
var $ct = is.list = Object.keys(J9.default).map((e) => e.replace(/^_/, "")), Vct = is.default = X9;
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/lib/virtual-types.js
|
|
var hC = E((at) => {
|
|
"use strict";
|
|
Object.defineProperty(at, "__esModule", {
|
|
value: !0
|
|
});
|
|
at.Var = at.User = at.Statement = at.SpreadProperty = at.Scope = at.RestProperty = at.ReferencedMemberExpression = at.ReferencedIdentifier =
|
|
at.Referenced = at.Pure = at.NumericLiteralTypeAnnotation = at.Generated = at.ForAwaitStatement = at.Flow = at.Expression = at.ExistentialTypeParam =
|
|
at.BlockScoped = at.BindingIdentifier = void 0;
|
|
var zct = at.ReferencedIdentifier = ["Identifier", "JSXIdentifier"], Gct = at.ReferencedMemberExpression = ["MemberExpression"], Jct = at.
|
|
BindingIdentifier = ["Identifier"], Xct = at.Statement = ["Statement"], Yct = at.Expression = ["Expression"], Zct = at.Scope = ["Scopable",
|
|
"Pattern"], Qct = at.Referenced = null, eft = at.BlockScoped = null, tft = at.Var = ["VariableDeclaration"], rft = at.User = null, ift = at.
|
|
Generated = null, nft = at.Pure = null, sft = at.Flow = ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"], aft = at.RestProperty =
|
|
["RestElement"], oft = at.SpreadProperty = ["RestElement"], uft = at.ExistentialTypeParam = ["ExistsTypeAnnotation"], lft = at.NumericLiteralTypeAnnotation =
|
|
["NumberLiteralTypeAnnotation"], cft = at.ForAwaitStatement = ["ForOfStatement"];
|
|
});
|
|
|
|
// ../node_modules/ms/index.js
|
|
var Z9 = E((dft, Y9) => {
|
|
var ql = 1e3, Ul = ql * 60, Wl = Ul * 60, Go = Wl * 24, DFe = Go * 7, vFe = Go * 365.25;
|
|
Y9.exports = function(e, t) {
|
|
t = t || {};
|
|
var r = typeof e;
|
|
if (r === "string" && e.length > 0)
|
|
return EFe(e);
|
|
if (r === "number" && isFinite(e))
|
|
return t.long ? SFe(e) : xFe(e);
|
|
throw new Error(
|
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(e)
|
|
);
|
|
};
|
|
function EFe(e) {
|
|
if (e = String(e), !(e.length > 100)) {
|
|
var t = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.
|
|
exec(
|
|
e
|
|
);
|
|
if (t) {
|
|
var r = parseFloat(t[1]), i = (t[2] || "ms").toLowerCase();
|
|
switch (i) {
|
|
case "years":
|
|
case "year":
|
|
case "yrs":
|
|
case "yr":
|
|
case "y":
|
|
return r * vFe;
|
|
case "weeks":
|
|
case "week":
|
|
case "w":
|
|
return r * DFe;
|
|
case "days":
|
|
case "day":
|
|
case "d":
|
|
return r * Go;
|
|
case "hours":
|
|
case "hour":
|
|
case "hrs":
|
|
case "hr":
|
|
case "h":
|
|
return r * Wl;
|
|
case "minutes":
|
|
case "minute":
|
|
case "mins":
|
|
case "min":
|
|
case "m":
|
|
return r * Ul;
|
|
case "seconds":
|
|
case "second":
|
|
case "secs":
|
|
case "sec":
|
|
case "s":
|
|
return r * ql;
|
|
case "milliseconds":
|
|
case "millisecond":
|
|
case "msecs":
|
|
case "msec":
|
|
case "ms":
|
|
return r;
|
|
default:
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
s(EFe, "parse");
|
|
function xFe(e) {
|
|
var t = Math.abs(e);
|
|
return t >= Go ? Math.round(e / Go) + "d" : t >= Wl ? Math.round(e / Wl) + "h" : t >= Ul ? Math.round(e / Ul) + "m" : t >= ql ? Math.round(
|
|
e / ql) + "s" : e + "ms";
|
|
}
|
|
s(xFe, "fmtShort");
|
|
function SFe(e) {
|
|
var t = Math.abs(e);
|
|
return t >= Go ? My(e, t, Go, "day") : t >= Wl ? My(e, t, Wl, "hour") : t >= Ul ? My(e, t, Ul, "minute") : t >= ql ? My(e, t, ql, "secon\
|
|
d") : e + " ms";
|
|
}
|
|
s(SFe, "fmtLong");
|
|
function My(e, t, r, i) {
|
|
var n = t >= r * 1.5;
|
|
return Math.round(e / r) + " " + i + (n ? "s" : "");
|
|
}
|
|
s(My, "plural");
|
|
});
|
|
|
|
// ../node_modules/debug/src/common.js
|
|
var mC = E((hft, Q9) => {
|
|
function TFe(e) {
|
|
r.debug = r, r.default = r, r.coerce = l, r.disable = o, r.enable = n, r.enabled = u, r.humanize = Z9(), r.destroy = c, Object.keys(e).forEach(
|
|
(f) => {
|
|
r[f] = e[f];
|
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
function t(f) {
|
|
let m = 0;
|
|
for (let h = 0; h < f.length; h++)
|
|
m = (m << 5) - m + f.charCodeAt(h), m |= 0;
|
|
return r.colors[Math.abs(m) % r.colors.length];
|
|
}
|
|
s(t, "selectColor"), r.selectColor = t;
|
|
function r(f) {
|
|
let m, h = null, d, y;
|
|
function p(...g) {
|
|
if (!p.enabled)
|
|
return;
|
|
let b = p, D = Number(/* @__PURE__ */ new Date()), v = D - (m || D);
|
|
b.diff = v, b.prev = m, b.curr = D, m = D, g[0] = r.coerce(g[0]), typeof g[0] != "string" && g.unshift("%O");
|
|
let S = 0;
|
|
g[0] = g[0].replace(/%([a-zA-Z%])/g, (O, k) => {
|
|
if (O === "%%")
|
|
return "%";
|
|
S++;
|
|
let U = r.formatters[k];
|
|
if (typeof U == "function") {
|
|
let j = g[S];
|
|
O = U.call(b, j), g.splice(S, 1), S--;
|
|
}
|
|
return O;
|
|
}), r.formatArgs.call(b, g), (b.log || r.log).apply(b, g);
|
|
}
|
|
return s(p, "debug"), p.namespace = f, p.useColors = r.useColors(), p.color = r.selectColor(f), p.extend = i, p.destroy = r.destroy, Object.
|
|
defineProperty(p, "enabled", {
|
|
enumerable: !0,
|
|
configurable: !1,
|
|
get: /* @__PURE__ */ s(() => h !== null ? h : (d !== r.namespaces && (d = r.namespaces, y = r.enabled(f)), y), "get"),
|
|
set: /* @__PURE__ */ s((g) => {
|
|
h = g;
|
|
}, "set")
|
|
}), typeof r.init == "function" && r.init(p), p;
|
|
}
|
|
s(r, "createDebug");
|
|
function i(f, m) {
|
|
let h = r(this.namespace + (typeof m > "u" ? ":" : m) + f);
|
|
return h.log = this.log, h;
|
|
}
|
|
s(i, "extend");
|
|
function n(f) {
|
|
r.save(f), r.namespaces = f, r.names = [], r.skips = [];
|
|
let m = (typeof f == "string" ? f : "").trim().replace(" ", ",").split(",").filter(Boolean);
|
|
for (let h of m)
|
|
h[0] === "-" ? r.skips.push(h.slice(1)) : r.names.push(h);
|
|
}
|
|
s(n, "enable");
|
|
function a(f, m) {
|
|
let h = 0, d = 0, y = -1, p = 0;
|
|
for (; h < f.length; )
|
|
if (d < m.length && (m[d] === f[h] || m[d] === "*"))
|
|
m[d] === "*" ? (y = d, p = h, d++) : (h++, d++);
|
|
else if (y !== -1)
|
|
d = y + 1, p++, h = p;
|
|
else
|
|
return !1;
|
|
for (; d < m.length && m[d] === "*"; )
|
|
d++;
|
|
return d === m.length;
|
|
}
|
|
s(a, "matchesTemplate");
|
|
function o() {
|
|
let f = [
|
|
...r.names,
|
|
...r.skips.map((m) => "-" + m)
|
|
].join(",");
|
|
return r.enable(""), f;
|
|
}
|
|
s(o, "disable");
|
|
function u(f) {
|
|
for (let m of r.skips)
|
|
if (a(f, m))
|
|
return !1;
|
|
for (let m of r.names)
|
|
if (a(f, m))
|
|
return !0;
|
|
return !1;
|
|
}
|
|
s(u, "enabled");
|
|
function l(f) {
|
|
return f instanceof Error ? f.stack || f.message : f;
|
|
}
|
|
s(l, "coerce");
|
|
function c() {
|
|
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major versio\
|
|
n of `debug`.");
|
|
}
|
|
return s(c, "destroy"), r.enable(r.load()), r;
|
|
}
|
|
s(TFe, "setup");
|
|
Q9.exports = TFe;
|
|
});
|
|
|
|
// ../node_modules/debug/src/browser.js
|
|
var e7 = E((Bi, Ry) => {
|
|
Bi.formatArgs = wFe;
|
|
Bi.save = AFe;
|
|
Bi.load = _Fe;
|
|
Bi.useColors = CFe;
|
|
Bi.storage = PFe();
|
|
Bi.destroy = /* @__PURE__ */ (() => {
|
|
let e = !1;
|
|
return () => {
|
|
e || (e = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the nex\
|
|
t major version of `debug`."));
|
|
};
|
|
})();
|
|
Bi.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 CFe() {
|
|
if (typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs))
|
|
return !0;
|
|
if (typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))
|
|
return !1;
|
|
let e;
|
|
return typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||
|
|
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
typeof navigator < "u" && navigator.userAgent && (e = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(e[1], 10) >=
|
|
31 || // Double check webkit in userAgent just in case we are in a worker
|
|
typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
}
|
|
s(CFe, "useColors");
|
|
function wFe(e) {
|
|
if (e[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + e[0] + (this.useColors ? "%c " : " ") + "+" +
|
|
Ry.exports.humanize(this.diff), !this.useColors)
|
|
return;
|
|
let t = "color: " + this.color;
|
|
e.splice(1, 0, t, "color: inherit");
|
|
let r = 0, i = 0;
|
|
e[0].replace(/%[a-zA-Z%]/g, (n) => {
|
|
n !== "%%" && (r++, n === "%c" && (i = r));
|
|
}), e.splice(i, 0, t);
|
|
}
|
|
s(wFe, "formatArgs");
|
|
Bi.log = console.debug || console.log || (() => {
|
|
});
|
|
function AFe(e) {
|
|
try {
|
|
e ? Bi.storage.setItem("debug", e) : Bi.storage.removeItem("debug");
|
|
} catch {
|
|
}
|
|
}
|
|
s(AFe, "save");
|
|
function _Fe() {
|
|
let e;
|
|
try {
|
|
e = Bi.storage.getItem("debug");
|
|
} catch {
|
|
}
|
|
return !e && typeof process < "u" && "env" in process && (e = process.env.DEBUG), e;
|
|
}
|
|
s(_Fe, "load");
|
|
function PFe() {
|
|
try {
|
|
return localStorage;
|
|
} catch {
|
|
}
|
|
}
|
|
s(PFe, "localstorage");
|
|
Ry.exports = mC()(Bi);
|
|
var { formatters: FFe } = Ry.exports;
|
|
FFe.j = function(e) {
|
|
try {
|
|
return JSON.stringify(e);
|
|
} catch (t) {
|
|
return "[UnexpectedJSONParseError]: " + t.message;
|
|
}
|
|
};
|
|
});
|
|
|
|
// ../node_modules/has-flag/index.js
|
|
var r7 = E((gft, t7) => {
|
|
"use strict";
|
|
t7.exports = (e, t = process.argv) => {
|
|
let r = e.startsWith("-") ? "" : e.length === 1 ? "-" : "--", i = t.indexOf(r + e), n = t.indexOf("--");
|
|
return i !== -1 && (n === -1 || i < n);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/supports-color/index.js
|
|
var s7 = E((bft, n7) => {
|
|
"use strict";
|
|
var IFe = V("os"), i7 = V("tty"), Qi = r7(), { env: kr } = process, qa;
|
|
Qi("no-color") || Qi("no-colors") || Qi("color=false") || Qi("color=never") ? qa = 0 : (Qi("color") || Qi("colors") || Qi("color=true") ||
|
|
Qi("color=always")) && (qa = 1);
|
|
"FORCE_COLOR" in kr && (kr.FORCE_COLOR === "true" ? qa = 1 : kr.FORCE_COLOR === "false" ? qa = 0 : qa = kr.FORCE_COLOR.length === 0 ? 1 : Math.
|
|
min(parseInt(kr.FORCE_COLOR, 10), 3));
|
|
function yC(e) {
|
|
return e === 0 ? !1 : {
|
|
level: e,
|
|
hasBasic: !0,
|
|
has256: e >= 2,
|
|
has16m: e >= 3
|
|
};
|
|
}
|
|
s(yC, "translateLevel");
|
|
function gC(e, t) {
|
|
if (qa === 0)
|
|
return 0;
|
|
if (Qi("color=16m") || Qi("color=full") || Qi("color=truecolor"))
|
|
return 3;
|
|
if (Qi("color=256"))
|
|
return 2;
|
|
if (e && !t && qa === void 0)
|
|
return 0;
|
|
let r = qa || 0;
|
|
if (kr.TERM === "dumb")
|
|
return r;
|
|
if (process.platform === "win32") {
|
|
let i = IFe.release().split(".");
|
|
return Number(i[0]) >= 10 && Number(i[2]) >= 10586 ? Number(i[2]) >= 14931 ? 3 : 2 : 1;
|
|
}
|
|
if ("CI" in kr)
|
|
return ["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((i) => i in kr) || kr.CI_NAME === "codeship" ?
|
|
1 : r;
|
|
if ("TEAMCITY_VERSION" in kr)
|
|
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(kr.TEAMCITY_VERSION) ? 1 : 0;
|
|
if (kr.COLORTERM === "truecolor")
|
|
return 3;
|
|
if ("TERM_PROGRAM" in kr) {
|
|
let i = parseInt((kr.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
switch (kr.TERM_PROGRAM) {
|
|
case "iTerm.app":
|
|
return i >= 3 ? 3 : 2;
|
|
case "Apple_Terminal":
|
|
return 2;
|
|
}
|
|
}
|
|
return /-256(color)?$/i.test(kr.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(kr.TERM) || "COLORTERM" in
|
|
kr ? 1 : r;
|
|
}
|
|
s(gC, "supportsColor");
|
|
function OFe(e) {
|
|
let t = gC(e, e && e.isTTY);
|
|
return yC(t);
|
|
}
|
|
s(OFe, "getSupportLevel");
|
|
n7.exports = {
|
|
supportsColor: OFe,
|
|
stdout: yC(gC(!0, i7.isatty(1))),
|
|
stderr: yC(gC(!0, i7.isatty(2)))
|
|
};
|
|
});
|
|
|
|
// ../node_modules/debug/src/node.js
|
|
var o7 = E((Br, Ly) => {
|
|
var kFe = V("tty"), jy = V("util");
|
|
Br.init = qFe;
|
|
Br.log = RFe;
|
|
Br.formatArgs = NFe;
|
|
Br.save = jFe;
|
|
Br.load = LFe;
|
|
Br.useColors = BFe;
|
|
Br.destroy = jy.deprecate(
|
|
() => {
|
|
},
|
|
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
|
);
|
|
Br.colors = [6, 2, 3, 4, 5, 1];
|
|
try {
|
|
let e = s7();
|
|
e && (e.stderr || e).level >= 2 && (Br.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 {
|
|
}
|
|
Br.inspectOpts = Object.keys(process.env).filter((e) => /^debug_/i.test(e)).reduce((e, t) => {
|
|
let r = t.substring(6).toLowerCase().replace(/_([a-z])/g, (n, a) => a.toUpperCase()), i = process.env[t];
|
|
return /^(yes|on|true|enabled)$/i.test(i) ? i = !0 : /^(no|off|false|disabled)$/i.test(i) ? i = !1 : i === "null" ? i = null : i = Number(
|
|
i), e[r] = i, e;
|
|
}, {});
|
|
function BFe() {
|
|
return "colors" in Br.inspectOpts ? !!Br.inspectOpts.colors : kFe.isatty(process.stderr.fd);
|
|
}
|
|
s(BFe, "useColors");
|
|
function NFe(e) {
|
|
let { namespace: t, useColors: r } = this;
|
|
if (r) {
|
|
let i = this.color, n = "\x1B[3" + (i < 8 ? i : "8;5;" + i), a = ` ${n};1m${t} \x1B[0m`;
|
|
e[0] = a + e[0].split(`
|
|
`).join(`
|
|
` + a), e.push(n + "m+" + Ly.exports.humanize(this.diff) + "\x1B[0m");
|
|
} else
|
|
e[0] = MFe() + t + " " + e[0];
|
|
}
|
|
s(NFe, "formatArgs");
|
|
function MFe() {
|
|
return Br.inspectOpts.hideDate ? "" : (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
}
|
|
s(MFe, "getDate");
|
|
function RFe(...e) {
|
|
return process.stderr.write(jy.formatWithOptions(Br.inspectOpts, ...e) + `
|
|
`);
|
|
}
|
|
s(RFe, "log");
|
|
function jFe(e) {
|
|
e ? process.env.DEBUG = e : delete process.env.DEBUG;
|
|
}
|
|
s(jFe, "save");
|
|
function LFe() {
|
|
return process.env.DEBUG;
|
|
}
|
|
s(LFe, "load");
|
|
function qFe(e) {
|
|
e.inspectOpts = {};
|
|
let t = Object.keys(Br.inspectOpts);
|
|
for (let r = 0; r < t.length; r++)
|
|
e.inspectOpts[t[r]] = Br.inspectOpts[t[r]];
|
|
}
|
|
s(qFe, "init");
|
|
Ly.exports = mC()(Br);
|
|
var { formatters: a7 } = Ly.exports;
|
|
a7.o = function(e) {
|
|
return this.inspectOpts.colors = this.useColors, jy.inspect(e, this.inspectOpts).split(`
|
|
`).map((t) => t.trim()).join(" ");
|
|
};
|
|
a7.O = function(e) {
|
|
return this.inspectOpts.colors = this.useColors, jy.inspect(e, this.inspectOpts);
|
|
};
|
|
});
|
|
|
|
// ../node_modules/debug/src/index.js
|
|
var Jo = E((Eft, bC) => {
|
|
typeof process > "u" || process.type === "renderer" || process.browser === !0 || process.__nwjs ? bC.exports = e7() : bC.exports = o7();
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js
|
|
var vC = E((wr) => {
|
|
"use strict";
|
|
Object.defineProperty(wr, "__esModule", {
|
|
value: !0
|
|
});
|
|
wr.isBindingIdentifier = lIe;
|
|
wr.isBlockScoped = hIe;
|
|
wr.isExpression = fIe;
|
|
wr.isFlow = DIe;
|
|
wr.isForAwaitStatement = xIe;
|
|
wr.isGenerated = gIe;
|
|
wr.isPure = bIe;
|
|
wr.isReferenced = pIe;
|
|
wr.isReferencedIdentifier = oIe;
|
|
wr.isReferencedMemberExpression = uIe;
|
|
wr.isRestProperty = vIe;
|
|
wr.isScope = dIe;
|
|
wr.isSpreadProperty = EIe;
|
|
wr.isStatement = cIe;
|
|
wr.isUser = yIe;
|
|
wr.isVar = mIe;
|
|
var UFe = Ve(), {
|
|
isBinding: WFe,
|
|
isBlockScoped: $Fe,
|
|
isExportDeclaration: VFe,
|
|
isExpression: HFe,
|
|
isFlow: KFe,
|
|
isForStatement: zFe,
|
|
isForXStatement: GFe,
|
|
isIdentifier: u7,
|
|
isImportDeclaration: JFe,
|
|
isImportSpecifier: XFe,
|
|
isJSXIdentifier: YFe,
|
|
isJSXMemberExpression: ZFe,
|
|
isMemberExpression: QFe,
|
|
isRestElement: l7,
|
|
isReferenced: DC,
|
|
isScope: eIe,
|
|
isStatement: tIe,
|
|
isVar: rIe,
|
|
isVariableDeclaration: iIe,
|
|
react: nIe,
|
|
isForOfStatement: sIe
|
|
} = UFe, {
|
|
isCompatTag: aIe
|
|
} = nIe;
|
|
function oIe(e) {
|
|
let {
|
|
node: t,
|
|
parent: r
|
|
} = this;
|
|
if (!u7(t, e) && !ZFe(r, e))
|
|
if (YFe(t, e)) {
|
|
if (aIe(t.name)) return !1;
|
|
} else
|
|
return !1;
|
|
return DC(t, r, this.parentPath.parent);
|
|
}
|
|
s(oIe, "isReferencedIdentifier");
|
|
function uIe() {
|
|
let {
|
|
node: e,
|
|
parent: t
|
|
} = this;
|
|
return QFe(e) && DC(e, t);
|
|
}
|
|
s(uIe, "isReferencedMemberExpression");
|
|
function lIe() {
|
|
let {
|
|
node: e,
|
|
parent: t
|
|
} = this, r = this.parentPath.parent;
|
|
return u7(e) && WFe(e, t, r);
|
|
}
|
|
s(lIe, "isBindingIdentifier");
|
|
function cIe() {
|
|
let {
|
|
node: e,
|
|
parent: t
|
|
} = this;
|
|
return tIe(e) ? !(iIe(e) && (GFe(t, {
|
|
left: e
|
|
}) || zFe(t, {
|
|
init: e
|
|
}))) : !1;
|
|
}
|
|
s(cIe, "isStatement");
|
|
function fIe() {
|
|
return this.isIdentifier() ? this.isReferencedIdentifier() : HFe(this.node);
|
|
}
|
|
s(fIe, "isExpression");
|
|
function dIe() {
|
|
return eIe(this.node, this.parent);
|
|
}
|
|
s(dIe, "isScope");
|
|
function pIe() {
|
|
return DC(this.node, this.parent);
|
|
}
|
|
s(pIe, "isReferenced");
|
|
function hIe() {
|
|
return $Fe(this.node);
|
|
}
|
|
s(hIe, "isBlockScoped");
|
|
function mIe() {
|
|
return rIe(this.node);
|
|
}
|
|
s(mIe, "isVar");
|
|
function yIe() {
|
|
return this.node && !!this.node.loc;
|
|
}
|
|
s(yIe, "isUser");
|
|
function gIe() {
|
|
return !this.isUser();
|
|
}
|
|
s(gIe, "isGenerated");
|
|
function bIe(e) {
|
|
return this.scope.isPure(this.node, e);
|
|
}
|
|
s(bIe, "isPure");
|
|
function DIe() {
|
|
let {
|
|
node: e
|
|
} = this;
|
|
return KFe(e) ? !0 : JFe(e) ? e.importKind === "type" || e.importKind === "typeof" : VFe(e) ? e.exportKind === "type" : XFe(e) ? e.importKind ===
|
|
"type" || e.importKind === "typeof" : !1;
|
|
}
|
|
s(DIe, "isFlow");
|
|
function vIe() {
|
|
var e;
|
|
return l7(this.node) && ((e = this.parentPath) == null ? void 0 : e.isObjectPattern());
|
|
}
|
|
s(vIe, "isRestProperty");
|
|
function EIe() {
|
|
var e;
|
|
return l7(this.node) && ((e = this.parentPath) == null ? void 0 : e.isObjectExpression());
|
|
}
|
|
s(EIe, "isSpreadProperty");
|
|
function xIe() {
|
|
return sIe(this.node, {
|
|
await: !0
|
|
});
|
|
}
|
|
s(xIe, "isForAwaitStatement");
|
|
wr.isExistentialTypeParam = /* @__PURE__ */ s(function() {
|
|
throw new Error("`path.isExistentialTypeParam` has been renamed to `path.isExistsTypeAnnotation()` in Babel 7.");
|
|
}, "isExistentialTypeParam"), wr.isNumericLiteralTypeAnnotation = /* @__PURE__ */ s(function() {
|
|
throw new Error("`path.isNumericLiteralTypeAnnotation()` has been renamed to `path.isNumberLiteralTypeAnnotation()` in Babel 7.");
|
|
}, "isNumericLiteralTypeAnnotation");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/visitors.js
|
|
var qy = E((Yo) => {
|
|
"use strict";
|
|
Object.defineProperty(Yo, "__esModule", {
|
|
value: !0
|
|
});
|
|
Yo.environmentVisitor = FIe;
|
|
Yo.explode = v7;
|
|
Yo.isExplodedVisitor = D7;
|
|
Yo.merge = x7;
|
|
Yo.verify = E7;
|
|
var b7 = hC(), SIe = vC(), TIe = Ve(), c7 = ns(), {
|
|
DEPRECATED_KEYS: f7,
|
|
DEPRECATED_ALIASES: d7,
|
|
FLIPPED_ALIAS_KEYS: p7,
|
|
TYPES: CIe,
|
|
__internal__deprecationWarning: h7
|
|
} = TIe;
|
|
function wIe(e) {
|
|
return e in b7;
|
|
}
|
|
s(wIe, "isVirtualType");
|
|
function D7(e) {
|
|
return e?._exploded;
|
|
}
|
|
s(D7, "isExplodedVisitor");
|
|
function v7(e) {
|
|
if (D7(e)) return e;
|
|
e._exploded = !0;
|
|
for (let t of Object.keys(e)) {
|
|
if (Xo(t)) continue;
|
|
let r = t.split("|");
|
|
if (r.length === 1) continue;
|
|
let i = e[t];
|
|
delete e[t];
|
|
for (let n of r)
|
|
e[n] = i;
|
|
}
|
|
E7(e), delete e.__esModule, AIe(e), g7(e);
|
|
for (let t of Object.keys(e)) {
|
|
if (Xo(t) || !wIe(t)) continue;
|
|
let r = e[t];
|
|
for (let n of Object.keys(r))
|
|
r[n] = _Ie(t, r[n]);
|
|
delete e[t];
|
|
let i = b7[t];
|
|
if (i !== null)
|
|
for (let n of i)
|
|
e[n] ? kd(e[n], r) : e[n] = r;
|
|
else
|
|
kd(e, r);
|
|
}
|
|
for (let t of Object.keys(e)) {
|
|
if (Xo(t)) continue;
|
|
let r = p7[t];
|
|
if (t in f7) {
|
|
let n = f7[t];
|
|
h7(t, n, "Visitor "), r = [n];
|
|
} else if (t in d7) {
|
|
let n = d7[t];
|
|
h7(t, n, "Visitor "), r = p7[n];
|
|
}
|
|
if (!r) continue;
|
|
let i = e[t];
|
|
delete e[t];
|
|
for (let n of r) {
|
|
let a = e[n];
|
|
a ? kd(a, i) : e[n] = Object.assign({}, i);
|
|
}
|
|
}
|
|
for (let t of Object.keys(e))
|
|
Xo(t) || g7(e[t]);
|
|
return e;
|
|
}
|
|
s(v7, "explode$1");
|
|
function E7(e) {
|
|
if (!e._verified) {
|
|
if (typeof e == "function")
|
|
throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Functi\
|
|
on }`?");
|
|
for (let t of Object.keys(e)) {
|
|
if ((t === "enter" || t === "exit") && m7(t, e[t]), Xo(t)) continue;
|
|
if (!CIe.includes(t))
|
|
throw new Error(`You gave us a visitor for the node type ${t} but it's not a valid type in @babel/traverse 7.27.0`);
|
|
let r = e[t];
|
|
if (typeof r == "object")
|
|
for (let i of Object.keys(r))
|
|
if (i === "enter" || i === "exit")
|
|
m7(`${t}.${i}`, r[i]);
|
|
else
|
|
throw new Error(`You passed \`traverse()\` a visitor object with the property ${t} that has the invalid property ${i}`);
|
|
}
|
|
e._verified = !0;
|
|
}
|
|
}
|
|
s(E7, "verify$1");
|
|
function m7(e, t) {
|
|
let r = [].concat(t);
|
|
for (let i of r)
|
|
if (typeof i != "function")
|
|
throw new TypeError(`Non-function found defined in ${e} with type ${typeof i}`);
|
|
}
|
|
s(m7, "validateVisitorMethods");
|
|
function x7(e, t = [], r) {
|
|
let i = {
|
|
_verified: !0,
|
|
_exploded: !0
|
|
};
|
|
Object.defineProperty(i, "_exploded", {
|
|
enumerable: !1
|
|
}), Object.defineProperty(i, "_verified", {
|
|
enumerable: !1
|
|
});
|
|
for (let n = 0; n < e.length; n++) {
|
|
let a = v7(e[n]), o = t[n], u = a;
|
|
(o || r) && (u = y7(u, o, r)), kd(i, u);
|
|
for (let l of Object.keys(a)) {
|
|
if (Xo(l)) continue;
|
|
let c = a[l];
|
|
(o || r) && (c = y7(c, o, r));
|
|
let f = i[l] || (i[l] = {});
|
|
kd(f, c);
|
|
}
|
|
}
|
|
return i;
|
|
}
|
|
s(x7, "merge");
|
|
function y7(e, t, r) {
|
|
let i = {};
|
|
for (let n of ["enter", "exit"]) {
|
|
let a = e[n];
|
|
Array.isArray(a) && (a = a.map(function(o) {
|
|
let u = o;
|
|
return t && (u = /* @__PURE__ */ s(function(l) {
|
|
o.call(t, l, t);
|
|
}, "newFn")), r && (u = r(t?.key, n, u)), u !== o && (u.toString = () => o.toString()), u;
|
|
}), i[n] = a);
|
|
}
|
|
return i;
|
|
}
|
|
s(y7, "wrapWithStateOrWrapper");
|
|
function AIe(e) {
|
|
for (let t of Object.keys(e)) {
|
|
if (Xo(t)) continue;
|
|
let r = e[t];
|
|
typeof r == "function" && (e[t] = {
|
|
enter: r
|
|
});
|
|
}
|
|
}
|
|
s(AIe, "ensureEntranceObjects");
|
|
function g7(e) {
|
|
e.enter && !Array.isArray(e.enter) && (e.enter = [e.enter]), e.exit && !Array.isArray(e.exit) && (e.exit = [e.exit]);
|
|
}
|
|
s(g7, "ensureCallbackArrays");
|
|
function _Ie(e, t) {
|
|
let r = `is${e}`, i = SIe[r], n = /* @__PURE__ */ s(function(a) {
|
|
if (i.call(a))
|
|
return t.apply(this, arguments);
|
|
}, "newFn");
|
|
return n.toString = () => t.toString(), n;
|
|
}
|
|
s(_Ie, "wrapCheck");
|
|
function Xo(e) {
|
|
return e[0] === "_" || e === "enter" || e === "exit" || e === "shouldSkip" || e === "denylist" || e === "noScope" || e === "skipKeys" ||
|
|
e === "blacklist";
|
|
}
|
|
s(Xo, "shouldIgnoreKey");
|
|
function kd(e, t) {
|
|
for (let r of ["enter", "exit"])
|
|
t[r] && (e[r] = [].concat(e[r] || [], t[r]));
|
|
}
|
|
s(kd, "mergePair");
|
|
var PIe = {
|
|
FunctionParent(e) {
|
|
e.isArrowFunctionExpression() || (e.skip(), e.isMethod() && (e.requeueComputedKeyAndDecorators ? e.requeueComputedKeyAndDecorators() :
|
|
c7.requeueComputedKeyAndDecorators.call(e)));
|
|
},
|
|
Property(e) {
|
|
e.isObjectProperty() || (e.skip(), e.requeueComputedKeyAndDecorators ? e.requeueComputedKeyAndDecorators() : c7.requeueComputedKeyAndDecorators.
|
|
call(e));
|
|
}
|
|
};
|
|
function FIe(e) {
|
|
return x7([PIe, e]);
|
|
}
|
|
s(FIe, "environmentVisitor");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/scope/lib/renamer.js
|
|
var S7 = E((Wy) => {
|
|
"use strict";
|
|
Object.defineProperty(Wy, "__esModule", {
|
|
value: !0
|
|
});
|
|
Wy.default = void 0;
|
|
var Uy = Ve(), IIe = Uy, OIe = $y(), kIe = qy(), BIe = ns(), {
|
|
getAssignmentIdentifiers: NIe
|
|
} = IIe, MIe = {
|
|
ReferencedIdentifier({
|
|
node: e
|
|
}, t) {
|
|
e.name === t.oldName && (e.name = t.newName);
|
|
},
|
|
Scope(e, t) {
|
|
e.scope.bindingIdentifierEquals(t.oldName, t.binding.identifier) || (e.skip(), e.isMethod() && (e.requeueComputedKeyAndDecorators ? e.
|
|
requeueComputedKeyAndDecorators() : BIe.requeueComputedKeyAndDecorators.call(e)));
|
|
},
|
|
ObjectProperty({
|
|
node: e,
|
|
scope: t
|
|
}, r) {
|
|
let {
|
|
name: i
|
|
} = e.key;
|
|
if (e.shorthand && (i === r.oldName || i === r.newName) && t.getBindingIdentifier(i) === r.binding.identifier) {
|
|
e.shorthand = !1;
|
|
{
|
|
var n;
|
|
(n = e.extra) != null && n.shorthand && (e.extra.shorthand = !1);
|
|
}
|
|
}
|
|
},
|
|
"AssignmentExpression|Declaration|VariableDeclarator"(e, t) {
|
|
if (e.isVariableDeclaration()) return;
|
|
let r = e.isAssignmentExpression() ? NIe(e.node) : e.getOuterBindingIdentifiers();
|
|
for (let i in r)
|
|
i === t.oldName && (r[i].name = t.newName);
|
|
}
|
|
}, EC = class {
|
|
static {
|
|
s(this, "Renamer");
|
|
}
|
|
constructor(t, r, i) {
|
|
this.newName = i, this.oldName = r, this.binding = t;
|
|
}
|
|
maybeConvertFromExportDeclaration(t) {
|
|
let r = t.parentPath;
|
|
if (r.isExportDeclaration()) {
|
|
if (r.isExportDefaultDeclaration()) {
|
|
let {
|
|
declaration: i
|
|
} = r.node;
|
|
if (Uy.isDeclaration(i) && !i.id)
|
|
return;
|
|
}
|
|
r.isExportAllDeclaration() || r.splitExportDeclaration();
|
|
}
|
|
}
|
|
maybeConvertFromClassFunctionDeclaration(t) {
|
|
return t;
|
|
}
|
|
maybeConvertFromClassFunctionExpression(t) {
|
|
return t;
|
|
}
|
|
rename() {
|
|
let {
|
|
binding: t,
|
|
oldName: r,
|
|
newName: i
|
|
} = this, {
|
|
scope: n,
|
|
path: a
|
|
} = t, o = a.find((c) => c.isDeclaration() || c.isFunctionExpression() || c.isClassExpression());
|
|
o && o.getOuterBindingIdentifiers()[r] === t.identifier && this.maybeConvertFromExportDeclaration(o);
|
|
let u = arguments[0] || n.block, l = {
|
|
discriminant: !0
|
|
};
|
|
Uy.isMethod(u) && (u.computed && (l.key = !0), Uy.isObjectMethod(u) || (l.decorators = !0)), (0, OIe.traverseNode)(u, (0, kIe.explode)(
|
|
MIe), n, this, n.path, l), arguments[0] || (n.removeOwnBinding(r), n.bindings[i] = t, this.binding.identifier.name = i), o && (this.maybeConvertFromClassFunctionDeclaration(
|
|
a), this.maybeConvertFromClassFunctionExpression(a));
|
|
}
|
|
};
|
|
Wy.default = EC;
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/scope/binding.js
|
|
var T7 = E((Vy) => {
|
|
"use strict";
|
|
Object.defineProperty(Vy, "__esModule", {
|
|
value: !0
|
|
});
|
|
Vy.default = void 0;
|
|
var xC = class {
|
|
static {
|
|
s(this, "Binding");
|
|
}
|
|
constructor({
|
|
identifier: t,
|
|
scope: r,
|
|
path: i,
|
|
kind: n
|
|
}) {
|
|
this.identifier = void 0, this.scope = void 0, this.path = void 0, this.kind = void 0, this.constantViolations = [], this.constant = !0,
|
|
this.referencePaths = [], this.referenced = !1, this.references = 0, this.identifier = t, this.scope = r, this.path = i, this.kind = n,
|
|
(n === "var" || n === "hoisted") && RIe(i) && this.reassign(i), this.clearValue();
|
|
}
|
|
deoptValue() {
|
|
this.clearValue(), this.hasDeoptedValue = !0;
|
|
}
|
|
setValue(t) {
|
|
this.hasDeoptedValue || (this.hasValue = !0, this.value = t);
|
|
}
|
|
clearValue() {
|
|
this.hasDeoptedValue = !1, this.hasValue = !1, this.value = null;
|
|
}
|
|
reassign(t) {
|
|
this.constant = !1, !this.constantViolations.includes(t) && this.constantViolations.push(t);
|
|
}
|
|
reference(t) {
|
|
this.referencePaths.includes(t) || (this.referenced = !0, this.references++, this.referencePaths.push(t));
|
|
}
|
|
dereference() {
|
|
this.references--, this.referenced = !!this.references;
|
|
}
|
|
};
|
|
Vy.default = xC;
|
|
function RIe(e) {
|
|
let t = !e.isVariableDeclarator() || e.node.init;
|
|
for (let {
|
|
parentPath: r,
|
|
key: i
|
|
} = e; r; {
|
|
parentPath: r,
|
|
key: i
|
|
} = r) {
|
|
if (r.isFunctionParent()) return !1;
|
|
if (i === "left" && r.isForXStatement() || t && i === "body" && r.isLoop())
|
|
return !0;
|
|
}
|
|
return !1;
|
|
}
|
|
s(RIe, "isInitInLoop");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/node_modules/globals/globals.json
|
|
var C7 = E((Fft, jIe) => {
|
|
jIe.exports = {
|
|
builtin: {
|
|
Array: !1,
|
|
ArrayBuffer: !1,
|
|
Atomics: !1,
|
|
BigInt: !1,
|
|
BigInt64Array: !1,
|
|
BigUint64Array: !1,
|
|
Boolean: !1,
|
|
constructor: !1,
|
|
DataView: !1,
|
|
Date: !1,
|
|
decodeURI: !1,
|
|
decodeURIComponent: !1,
|
|
encodeURI: !1,
|
|
encodeURIComponent: !1,
|
|
Error: !1,
|
|
escape: !1,
|
|
eval: !1,
|
|
EvalError: !1,
|
|
Float32Array: !1,
|
|
Float64Array: !1,
|
|
Function: !1,
|
|
globalThis: !1,
|
|
hasOwnProperty: !1,
|
|
Infinity: !1,
|
|
Int16Array: !1,
|
|
Int32Array: !1,
|
|
Int8Array: !1,
|
|
isFinite: !1,
|
|
isNaN: !1,
|
|
isPrototypeOf: !1,
|
|
JSON: !1,
|
|
Map: !1,
|
|
Math: !1,
|
|
NaN: !1,
|
|
Number: !1,
|
|
Object: !1,
|
|
parseFloat: !1,
|
|
parseInt: !1,
|
|
Promise: !1,
|
|
propertyIsEnumerable: !1,
|
|
Proxy: !1,
|
|
RangeError: !1,
|
|
ReferenceError: !1,
|
|
Reflect: !1,
|
|
RegExp: !1,
|
|
Set: !1,
|
|
SharedArrayBuffer: !1,
|
|
String: !1,
|
|
Symbol: !1,
|
|
SyntaxError: !1,
|
|
toLocaleString: !1,
|
|
toString: !1,
|
|
TypeError: !1,
|
|
Uint16Array: !1,
|
|
Uint32Array: !1,
|
|
Uint8Array: !1,
|
|
Uint8ClampedArray: !1,
|
|
undefined: !1,
|
|
unescape: !1,
|
|
URIError: !1,
|
|
valueOf: !1,
|
|
WeakMap: !1,
|
|
WeakSet: !1
|
|
},
|
|
es5: {
|
|
Array: !1,
|
|
Boolean: !1,
|
|
constructor: !1,
|
|
Date: !1,
|
|
decodeURI: !1,
|
|
decodeURIComponent: !1,
|
|
encodeURI: !1,
|
|
encodeURIComponent: !1,
|
|
Error: !1,
|
|
escape: !1,
|
|
eval: !1,
|
|
EvalError: !1,
|
|
Function: !1,
|
|
hasOwnProperty: !1,
|
|
Infinity: !1,
|
|
isFinite: !1,
|
|
isNaN: !1,
|
|
isPrototypeOf: !1,
|
|
JSON: !1,
|
|
Math: !1,
|
|
NaN: !1,
|
|
Number: !1,
|
|
Object: !1,
|
|
parseFloat: !1,
|
|
parseInt: !1,
|
|
propertyIsEnumerable: !1,
|
|
RangeError: !1,
|
|
ReferenceError: !1,
|
|
RegExp: !1,
|
|
String: !1,
|
|
SyntaxError: !1,
|
|
toLocaleString: !1,
|
|
toString: !1,
|
|
TypeError: !1,
|
|
undefined: !1,
|
|
unescape: !1,
|
|
URIError: !1,
|
|
valueOf: !1
|
|
},
|
|
es2015: {
|
|
Array: !1,
|
|
ArrayBuffer: !1,
|
|
Boolean: !1,
|
|
constructor: !1,
|
|
DataView: !1,
|
|
Date: !1,
|
|
decodeURI: !1,
|
|
decodeURIComponent: !1,
|
|
encodeURI: !1,
|
|
encodeURIComponent: !1,
|
|
Error: !1,
|
|
escape: !1,
|
|
eval: !1,
|
|
EvalError: !1,
|
|
Float32Array: !1,
|
|
Float64Array: !1,
|
|
Function: !1,
|
|
hasOwnProperty: !1,
|
|
Infinity: !1,
|
|
Int16Array: !1,
|
|
Int32Array: !1,
|
|
Int8Array: !1,
|
|
isFinite: !1,
|
|
isNaN: !1,
|
|
isPrototypeOf: !1,
|
|
JSON: !1,
|
|
Map: !1,
|
|
Math: !1,
|
|
NaN: !1,
|
|
Number: !1,
|
|
Object: !1,
|
|
parseFloat: !1,
|
|
parseInt: !1,
|
|
Promise: !1,
|
|
propertyIsEnumerable: !1,
|
|
Proxy: !1,
|
|
RangeError: !1,
|
|
ReferenceError: !1,
|
|
Reflect: !1,
|
|
RegExp: !1,
|
|
Set: !1,
|
|
String: !1,
|
|
Symbol: !1,
|
|
SyntaxError: !1,
|
|
toLocaleString: !1,
|
|
toString: !1,
|
|
TypeError: !1,
|
|
Uint16Array: !1,
|
|
Uint32Array: !1,
|
|
Uint8Array: !1,
|
|
Uint8ClampedArray: !1,
|
|
undefined: !1,
|
|
unescape: !1,
|
|
URIError: !1,
|
|
valueOf: !1,
|
|
WeakMap: !1,
|
|
WeakSet: !1
|
|
},
|
|
es2017: {
|
|
Array: !1,
|
|
ArrayBuffer: !1,
|
|
Atomics: !1,
|
|
Boolean: !1,
|
|
constructor: !1,
|
|
DataView: !1,
|
|
Date: !1,
|
|
decodeURI: !1,
|
|
decodeURIComponent: !1,
|
|
encodeURI: !1,
|
|
encodeURIComponent: !1,
|
|
Error: !1,
|
|
escape: !1,
|
|
eval: !1,
|
|
EvalError: !1,
|
|
Float32Array: !1,
|
|
Float64Array: !1,
|
|
Function: !1,
|
|
hasOwnProperty: !1,
|
|
Infinity: !1,
|
|
Int16Array: !1,
|
|
Int32Array: !1,
|
|
Int8Array: !1,
|
|
isFinite: !1,
|
|
isNaN: !1,
|
|
isPrototypeOf: !1,
|
|
JSON: !1,
|
|
Map: !1,
|
|
Math: !1,
|
|
NaN: !1,
|
|
Number: !1,
|
|
Object: !1,
|
|
parseFloat: !1,
|
|
parseInt: !1,
|
|
Promise: !1,
|
|
propertyIsEnumerable: !1,
|
|
Proxy: !1,
|
|
RangeError: !1,
|
|
ReferenceError: !1,
|
|
Reflect: !1,
|
|
RegExp: !1,
|
|
Set: !1,
|
|
SharedArrayBuffer: !1,
|
|
String: !1,
|
|
Symbol: !1,
|
|
SyntaxError: !1,
|
|
toLocaleString: !1,
|
|
toString: !1,
|
|
TypeError: !1,
|
|
Uint16Array: !1,
|
|
Uint32Array: !1,
|
|
Uint8Array: !1,
|
|
Uint8ClampedArray: !1,
|
|
undefined: !1,
|
|
unescape: !1,
|
|
URIError: !1,
|
|
valueOf: !1,
|
|
WeakMap: !1,
|
|
WeakSet: !1
|
|
},
|
|
browser: {
|
|
AbortController: !1,
|
|
AbortSignal: !1,
|
|
addEventListener: !1,
|
|
alert: !1,
|
|
AnalyserNode: !1,
|
|
Animation: !1,
|
|
AnimationEffectReadOnly: !1,
|
|
AnimationEffectTiming: !1,
|
|
AnimationEffectTimingReadOnly: !1,
|
|
AnimationEvent: !1,
|
|
AnimationPlaybackEvent: !1,
|
|
AnimationTimeline: !1,
|
|
applicationCache: !1,
|
|
ApplicationCache: !1,
|
|
ApplicationCacheErrorEvent: !1,
|
|
atob: !1,
|
|
Attr: !1,
|
|
Audio: !1,
|
|
AudioBuffer: !1,
|
|
AudioBufferSourceNode: !1,
|
|
AudioContext: !1,
|
|
AudioDestinationNode: !1,
|
|
AudioListener: !1,
|
|
AudioNode: !1,
|
|
AudioParam: !1,
|
|
AudioProcessingEvent: !1,
|
|
AudioScheduledSourceNode: !1,
|
|
"AudioWorkletGlobalScope ": !1,
|
|
AudioWorkletNode: !1,
|
|
AudioWorkletProcessor: !1,
|
|
BarProp: !1,
|
|
BaseAudioContext: !1,
|
|
BatteryManager: !1,
|
|
BeforeUnloadEvent: !1,
|
|
BiquadFilterNode: !1,
|
|
Blob: !1,
|
|
BlobEvent: !1,
|
|
blur: !1,
|
|
BroadcastChannel: !1,
|
|
btoa: !1,
|
|
BudgetService: !1,
|
|
ByteLengthQueuingStrategy: !1,
|
|
Cache: !1,
|
|
caches: !1,
|
|
CacheStorage: !1,
|
|
cancelAnimationFrame: !1,
|
|
cancelIdleCallback: !1,
|
|
CanvasCaptureMediaStreamTrack: !1,
|
|
CanvasGradient: !1,
|
|
CanvasPattern: !1,
|
|
CanvasRenderingContext2D: !1,
|
|
ChannelMergerNode: !1,
|
|
ChannelSplitterNode: !1,
|
|
CharacterData: !1,
|
|
clearInterval: !1,
|
|
clearTimeout: !1,
|
|
clientInformation: !1,
|
|
ClipboardEvent: !1,
|
|
close: !1,
|
|
closed: !1,
|
|
CloseEvent: !1,
|
|
Comment: !1,
|
|
CompositionEvent: !1,
|
|
confirm: !1,
|
|
console: !1,
|
|
ConstantSourceNode: !1,
|
|
ConvolverNode: !1,
|
|
CountQueuingStrategy: !1,
|
|
createImageBitmap: !1,
|
|
Credential: !1,
|
|
CredentialsContainer: !1,
|
|
crypto: !1,
|
|
Crypto: !1,
|
|
CryptoKey: !1,
|
|
CSS: !1,
|
|
CSSConditionRule: !1,
|
|
CSSFontFaceRule: !1,
|
|
CSSGroupingRule: !1,
|
|
CSSImportRule: !1,
|
|
CSSKeyframeRule: !1,
|
|
CSSKeyframesRule: !1,
|
|
CSSMediaRule: !1,
|
|
CSSNamespaceRule: !1,
|
|
CSSPageRule: !1,
|
|
CSSRule: !1,
|
|
CSSRuleList: !1,
|
|
CSSStyleDeclaration: !1,
|
|
CSSStyleRule: !1,
|
|
CSSStyleSheet: !1,
|
|
CSSSupportsRule: !1,
|
|
CustomElementRegistry: !1,
|
|
customElements: !1,
|
|
CustomEvent: !1,
|
|
DataTransfer: !1,
|
|
DataTransferItem: !1,
|
|
DataTransferItemList: !1,
|
|
defaultstatus: !1,
|
|
defaultStatus: !1,
|
|
DelayNode: !1,
|
|
DeviceMotionEvent: !1,
|
|
DeviceOrientationEvent: !1,
|
|
devicePixelRatio: !1,
|
|
dispatchEvent: !1,
|
|
document: !1,
|
|
Document: !1,
|
|
DocumentFragment: !1,
|
|
DocumentType: !1,
|
|
DOMError: !1,
|
|
DOMException: !1,
|
|
DOMImplementation: !1,
|
|
DOMMatrix: !1,
|
|
DOMMatrixReadOnly: !1,
|
|
DOMParser: !1,
|
|
DOMPoint: !1,
|
|
DOMPointReadOnly: !1,
|
|
DOMQuad: !1,
|
|
DOMRect: !1,
|
|
DOMRectReadOnly: !1,
|
|
DOMStringList: !1,
|
|
DOMStringMap: !1,
|
|
DOMTokenList: !1,
|
|
DragEvent: !1,
|
|
DynamicsCompressorNode: !1,
|
|
Element: !1,
|
|
ErrorEvent: !1,
|
|
event: !1,
|
|
Event: !1,
|
|
EventSource: !1,
|
|
EventTarget: !1,
|
|
external: !1,
|
|
fetch: !1,
|
|
File: !1,
|
|
FileList: !1,
|
|
FileReader: !1,
|
|
find: !1,
|
|
focus: !1,
|
|
FocusEvent: !1,
|
|
FontFace: !1,
|
|
FontFaceSetLoadEvent: !1,
|
|
FormData: !1,
|
|
frameElement: !1,
|
|
frames: !1,
|
|
GainNode: !1,
|
|
Gamepad: !1,
|
|
GamepadButton: !1,
|
|
GamepadEvent: !1,
|
|
getComputedStyle: !1,
|
|
getSelection: !1,
|
|
HashChangeEvent: !1,
|
|
Headers: !1,
|
|
history: !1,
|
|
History: !1,
|
|
HTMLAllCollection: !1,
|
|
HTMLAnchorElement: !1,
|
|
HTMLAreaElement: !1,
|
|
HTMLAudioElement: !1,
|
|
HTMLBaseElement: !1,
|
|
HTMLBodyElement: !1,
|
|
HTMLBRElement: !1,
|
|
HTMLButtonElement: !1,
|
|
HTMLCanvasElement: !1,
|
|
HTMLCollection: !1,
|
|
HTMLContentElement: !1,
|
|
HTMLDataElement: !1,
|
|
HTMLDataListElement: !1,
|
|
HTMLDetailsElement: !1,
|
|
HTMLDialogElement: !1,
|
|
HTMLDirectoryElement: !1,
|
|
HTMLDivElement: !1,
|
|
HTMLDListElement: !1,
|
|
HTMLDocument: !1,
|
|
HTMLElement: !1,
|
|
HTMLEmbedElement: !1,
|
|
HTMLFieldSetElement: !1,
|
|
HTMLFontElement: !1,
|
|
HTMLFormControlsCollection: !1,
|
|
HTMLFormElement: !1,
|
|
HTMLFrameElement: !1,
|
|
HTMLFrameSetElement: !1,
|
|
HTMLHeadElement: !1,
|
|
HTMLHeadingElement: !1,
|
|
HTMLHRElement: !1,
|
|
HTMLHtmlElement: !1,
|
|
HTMLIFrameElement: !1,
|
|
HTMLImageElement: !1,
|
|
HTMLInputElement: !1,
|
|
HTMLLabelElement: !1,
|
|
HTMLLegendElement: !1,
|
|
HTMLLIElement: !1,
|
|
HTMLLinkElement: !1,
|
|
HTMLMapElement: !1,
|
|
HTMLMarqueeElement: !1,
|
|
HTMLMediaElement: !1,
|
|
HTMLMenuElement: !1,
|
|
HTMLMetaElement: !1,
|
|
HTMLMeterElement: !1,
|
|
HTMLModElement: !1,
|
|
HTMLObjectElement: !1,
|
|
HTMLOListElement: !1,
|
|
HTMLOptGroupElement: !1,
|
|
HTMLOptionElement: !1,
|
|
HTMLOptionsCollection: !1,
|
|
HTMLOutputElement: !1,
|
|
HTMLParagraphElement: !1,
|
|
HTMLParamElement: !1,
|
|
HTMLPictureElement: !1,
|
|
HTMLPreElement: !1,
|
|
HTMLProgressElement: !1,
|
|
HTMLQuoteElement: !1,
|
|
HTMLScriptElement: !1,
|
|
HTMLSelectElement: !1,
|
|
HTMLShadowElement: !1,
|
|
HTMLSlotElement: !1,
|
|
HTMLSourceElement: !1,
|
|
HTMLSpanElement: !1,
|
|
HTMLStyleElement: !1,
|
|
HTMLTableCaptionElement: !1,
|
|
HTMLTableCellElement: !1,
|
|
HTMLTableColElement: !1,
|
|
HTMLTableElement: !1,
|
|
HTMLTableRowElement: !1,
|
|
HTMLTableSectionElement: !1,
|
|
HTMLTemplateElement: !1,
|
|
HTMLTextAreaElement: !1,
|
|
HTMLTimeElement: !1,
|
|
HTMLTitleElement: !1,
|
|
HTMLTrackElement: !1,
|
|
HTMLUListElement: !1,
|
|
HTMLUnknownElement: !1,
|
|
HTMLVideoElement: !1,
|
|
IDBCursor: !1,
|
|
IDBCursorWithValue: !1,
|
|
IDBDatabase: !1,
|
|
IDBFactory: !1,
|
|
IDBIndex: !1,
|
|
IDBKeyRange: !1,
|
|
IDBObjectStore: !1,
|
|
IDBOpenDBRequest: !1,
|
|
IDBRequest: !1,
|
|
IDBTransaction: !1,
|
|
IDBVersionChangeEvent: !1,
|
|
IdleDeadline: !1,
|
|
IIRFilterNode: !1,
|
|
Image: !1,
|
|
ImageBitmap: !1,
|
|
ImageBitmapRenderingContext: !1,
|
|
ImageCapture: !1,
|
|
ImageData: !1,
|
|
indexedDB: !1,
|
|
innerHeight: !1,
|
|
innerWidth: !1,
|
|
InputEvent: !1,
|
|
IntersectionObserver: !1,
|
|
IntersectionObserverEntry: !1,
|
|
Intl: !1,
|
|
isSecureContext: !1,
|
|
KeyboardEvent: !1,
|
|
KeyframeEffect: !1,
|
|
KeyframeEffectReadOnly: !1,
|
|
length: !1,
|
|
localStorage: !1,
|
|
location: !0,
|
|
Location: !1,
|
|
locationbar: !1,
|
|
matchMedia: !1,
|
|
MediaDeviceInfo: !1,
|
|
MediaDevices: !1,
|
|
MediaElementAudioSourceNode: !1,
|
|
MediaEncryptedEvent: !1,
|
|
MediaError: !1,
|
|
MediaKeyMessageEvent: !1,
|
|
MediaKeySession: !1,
|
|
MediaKeyStatusMap: !1,
|
|
MediaKeySystemAccess: !1,
|
|
MediaList: !1,
|
|
MediaQueryList: !1,
|
|
MediaQueryListEvent: !1,
|
|
MediaRecorder: !1,
|
|
MediaSettingsRange: !1,
|
|
MediaSource: !1,
|
|
MediaStream: !1,
|
|
MediaStreamAudioDestinationNode: !1,
|
|
MediaStreamAudioSourceNode: !1,
|
|
MediaStreamEvent: !1,
|
|
MediaStreamTrack: !1,
|
|
MediaStreamTrackEvent: !1,
|
|
menubar: !1,
|
|
MessageChannel: !1,
|
|
MessageEvent: !1,
|
|
MessagePort: !1,
|
|
MIDIAccess: !1,
|
|
MIDIConnectionEvent: !1,
|
|
MIDIInput: !1,
|
|
MIDIInputMap: !1,
|
|
MIDIMessageEvent: !1,
|
|
MIDIOutput: !1,
|
|
MIDIOutputMap: !1,
|
|
MIDIPort: !1,
|
|
MimeType: !1,
|
|
MimeTypeArray: !1,
|
|
MouseEvent: !1,
|
|
moveBy: !1,
|
|
moveTo: !1,
|
|
MutationEvent: !1,
|
|
MutationObserver: !1,
|
|
MutationRecord: !1,
|
|
name: !1,
|
|
NamedNodeMap: !1,
|
|
NavigationPreloadManager: !1,
|
|
navigator: !1,
|
|
Navigator: !1,
|
|
NetworkInformation: !1,
|
|
Node: !1,
|
|
NodeFilter: !1,
|
|
NodeIterator: !1,
|
|
NodeList: !1,
|
|
Notification: !1,
|
|
OfflineAudioCompletionEvent: !1,
|
|
OfflineAudioContext: !1,
|
|
offscreenBuffering: !1,
|
|
OffscreenCanvas: !0,
|
|
onabort: !0,
|
|
onafterprint: !0,
|
|
onanimationend: !0,
|
|
onanimationiteration: !0,
|
|
onanimationstart: !0,
|
|
onappinstalled: !0,
|
|
onauxclick: !0,
|
|
onbeforeinstallprompt: !0,
|
|
onbeforeprint: !0,
|
|
onbeforeunload: !0,
|
|
onblur: !0,
|
|
oncancel: !0,
|
|
oncanplay: !0,
|
|
oncanplaythrough: !0,
|
|
onchange: !0,
|
|
onclick: !0,
|
|
onclose: !0,
|
|
oncontextmenu: !0,
|
|
oncuechange: !0,
|
|
ondblclick: !0,
|
|
ondevicemotion: !0,
|
|
ondeviceorientation: !0,
|
|
ondeviceorientationabsolute: !0,
|
|
ondrag: !0,
|
|
ondragend: !0,
|
|
ondragenter: !0,
|
|
ondragleave: !0,
|
|
ondragover: !0,
|
|
ondragstart: !0,
|
|
ondrop: !0,
|
|
ondurationchange: !0,
|
|
onemptied: !0,
|
|
onended: !0,
|
|
onerror: !0,
|
|
onfocus: !0,
|
|
ongotpointercapture: !0,
|
|
onhashchange: !0,
|
|
oninput: !0,
|
|
oninvalid: !0,
|
|
onkeydown: !0,
|
|
onkeypress: !0,
|
|
onkeyup: !0,
|
|
onlanguagechange: !0,
|
|
onload: !0,
|
|
onloadeddata: !0,
|
|
onloadedmetadata: !0,
|
|
onloadstart: !0,
|
|
onlostpointercapture: !0,
|
|
onmessage: !0,
|
|
onmessageerror: !0,
|
|
onmousedown: !0,
|
|
onmouseenter: !0,
|
|
onmouseleave: !0,
|
|
onmousemove: !0,
|
|
onmouseout: !0,
|
|
onmouseover: !0,
|
|
onmouseup: !0,
|
|
onmousewheel: !0,
|
|
onoffline: !0,
|
|
ononline: !0,
|
|
onpagehide: !0,
|
|
onpageshow: !0,
|
|
onpause: !0,
|
|
onplay: !0,
|
|
onplaying: !0,
|
|
onpointercancel: !0,
|
|
onpointerdown: !0,
|
|
onpointerenter: !0,
|
|
onpointerleave: !0,
|
|
onpointermove: !0,
|
|
onpointerout: !0,
|
|
onpointerover: !0,
|
|
onpointerup: !0,
|
|
onpopstate: !0,
|
|
onprogress: !0,
|
|
onratechange: !0,
|
|
onrejectionhandled: !0,
|
|
onreset: !0,
|
|
onresize: !0,
|
|
onscroll: !0,
|
|
onsearch: !0,
|
|
onseeked: !0,
|
|
onseeking: !0,
|
|
onselect: !0,
|
|
onstalled: !0,
|
|
onstorage: !0,
|
|
onsubmit: !0,
|
|
onsuspend: !0,
|
|
ontimeupdate: !0,
|
|
ontoggle: !0,
|
|
ontransitionend: !0,
|
|
onunhandledrejection: !0,
|
|
onunload: !0,
|
|
onvolumechange: !0,
|
|
onwaiting: !0,
|
|
onwheel: !0,
|
|
open: !1,
|
|
openDatabase: !1,
|
|
opener: !1,
|
|
Option: !1,
|
|
origin: !1,
|
|
OscillatorNode: !1,
|
|
outerHeight: !1,
|
|
outerWidth: !1,
|
|
PageTransitionEvent: !1,
|
|
pageXOffset: !1,
|
|
pageYOffset: !1,
|
|
PannerNode: !1,
|
|
parent: !1,
|
|
Path2D: !1,
|
|
PaymentAddress: !1,
|
|
PaymentRequest: !1,
|
|
PaymentRequestUpdateEvent: !1,
|
|
PaymentResponse: !1,
|
|
performance: !1,
|
|
Performance: !1,
|
|
PerformanceEntry: !1,
|
|
PerformanceLongTaskTiming: !1,
|
|
PerformanceMark: !1,
|
|
PerformanceMeasure: !1,
|
|
PerformanceNavigation: !1,
|
|
PerformanceNavigationTiming: !1,
|
|
PerformanceObserver: !1,
|
|
PerformanceObserverEntryList: !1,
|
|
PerformancePaintTiming: !1,
|
|
PerformanceResourceTiming: !1,
|
|
PerformanceTiming: !1,
|
|
PeriodicWave: !1,
|
|
Permissions: !1,
|
|
PermissionStatus: !1,
|
|
personalbar: !1,
|
|
PhotoCapabilities: !1,
|
|
Plugin: !1,
|
|
PluginArray: !1,
|
|
PointerEvent: !1,
|
|
PopStateEvent: !1,
|
|
postMessage: !1,
|
|
Presentation: !1,
|
|
PresentationAvailability: !1,
|
|
PresentationConnection: !1,
|
|
PresentationConnectionAvailableEvent: !1,
|
|
PresentationConnectionCloseEvent: !1,
|
|
PresentationConnectionList: !1,
|
|
PresentationReceiver: !1,
|
|
PresentationRequest: !1,
|
|
print: !1,
|
|
ProcessingInstruction: !1,
|
|
ProgressEvent: !1,
|
|
PromiseRejectionEvent: !1,
|
|
prompt: !1,
|
|
PushManager: !1,
|
|
PushSubscription: !1,
|
|
PushSubscriptionOptions: !1,
|
|
queueMicrotask: !1,
|
|
RadioNodeList: !1,
|
|
Range: !1,
|
|
ReadableStream: !1,
|
|
registerProcessor: !1,
|
|
RemotePlayback: !1,
|
|
removeEventListener: !1,
|
|
Request: !1,
|
|
requestAnimationFrame: !1,
|
|
requestIdleCallback: !1,
|
|
resizeBy: !1,
|
|
ResizeObserver: !1,
|
|
ResizeObserverEntry: !1,
|
|
resizeTo: !1,
|
|
Response: !1,
|
|
RTCCertificate: !1,
|
|
RTCDataChannel: !1,
|
|
RTCDataChannelEvent: !1,
|
|
RTCDtlsTransport: !1,
|
|
RTCIceCandidate: !1,
|
|
RTCIceGatherer: !1,
|
|
RTCIceTransport: !1,
|
|
RTCPeerConnection: !1,
|
|
RTCPeerConnectionIceEvent: !1,
|
|
RTCRtpContributingSource: !1,
|
|
RTCRtpReceiver: !1,
|
|
RTCRtpSender: !1,
|
|
RTCSctpTransport: !1,
|
|
RTCSessionDescription: !1,
|
|
RTCStatsReport: !1,
|
|
RTCTrackEvent: !1,
|
|
screen: !1,
|
|
Screen: !1,
|
|
screenLeft: !1,
|
|
ScreenOrientation: !1,
|
|
screenTop: !1,
|
|
screenX: !1,
|
|
screenY: !1,
|
|
ScriptProcessorNode: !1,
|
|
scroll: !1,
|
|
scrollbars: !1,
|
|
scrollBy: !1,
|
|
scrollTo: !1,
|
|
scrollX: !1,
|
|
scrollY: !1,
|
|
SecurityPolicyViolationEvent: !1,
|
|
Selection: !1,
|
|
self: !1,
|
|
ServiceWorker: !1,
|
|
ServiceWorkerContainer: !1,
|
|
ServiceWorkerRegistration: !1,
|
|
sessionStorage: !1,
|
|
setInterval: !1,
|
|
setTimeout: !1,
|
|
ShadowRoot: !1,
|
|
SharedWorker: !1,
|
|
SourceBuffer: !1,
|
|
SourceBufferList: !1,
|
|
speechSynthesis: !1,
|
|
SpeechSynthesisEvent: !1,
|
|
SpeechSynthesisUtterance: !1,
|
|
StaticRange: !1,
|
|
status: !1,
|
|
statusbar: !1,
|
|
StereoPannerNode: !1,
|
|
stop: !1,
|
|
Storage: !1,
|
|
StorageEvent: !1,
|
|
StorageManager: !1,
|
|
styleMedia: !1,
|
|
StyleSheet: !1,
|
|
StyleSheetList: !1,
|
|
SubtleCrypto: !1,
|
|
SVGAElement: !1,
|
|
SVGAngle: !1,
|
|
SVGAnimatedAngle: !1,
|
|
SVGAnimatedBoolean: !1,
|
|
SVGAnimatedEnumeration: !1,
|
|
SVGAnimatedInteger: !1,
|
|
SVGAnimatedLength: !1,
|
|
SVGAnimatedLengthList: !1,
|
|
SVGAnimatedNumber: !1,
|
|
SVGAnimatedNumberList: !1,
|
|
SVGAnimatedPreserveAspectRatio: !1,
|
|
SVGAnimatedRect: !1,
|
|
SVGAnimatedString: !1,
|
|
SVGAnimatedTransformList: !1,
|
|
SVGAnimateElement: !1,
|
|
SVGAnimateMotionElement: !1,
|
|
SVGAnimateTransformElement: !1,
|
|
SVGAnimationElement: !1,
|
|
SVGCircleElement: !1,
|
|
SVGClipPathElement: !1,
|
|
SVGComponentTransferFunctionElement: !1,
|
|
SVGDefsElement: !1,
|
|
SVGDescElement: !1,
|
|
SVGDiscardElement: !1,
|
|
SVGElement: !1,
|
|
SVGEllipseElement: !1,
|
|
SVGFEBlendElement: !1,
|
|
SVGFEColorMatrixElement: !1,
|
|
SVGFEComponentTransferElement: !1,
|
|
SVGFECompositeElement: !1,
|
|
SVGFEConvolveMatrixElement: !1,
|
|
SVGFEDiffuseLightingElement: !1,
|
|
SVGFEDisplacementMapElement: !1,
|
|
SVGFEDistantLightElement: !1,
|
|
SVGFEDropShadowElement: !1,
|
|
SVGFEFloodElement: !1,
|
|
SVGFEFuncAElement: !1,
|
|
SVGFEFuncBElement: !1,
|
|
SVGFEFuncGElement: !1,
|
|
SVGFEFuncRElement: !1,
|
|
SVGFEGaussianBlurElement: !1,
|
|
SVGFEImageElement: !1,
|
|
SVGFEMergeElement: !1,
|
|
SVGFEMergeNodeElement: !1,
|
|
SVGFEMorphologyElement: !1,
|
|
SVGFEOffsetElement: !1,
|
|
SVGFEPointLightElement: !1,
|
|
SVGFESpecularLightingElement: !1,
|
|
SVGFESpotLightElement: !1,
|
|
SVGFETileElement: !1,
|
|
SVGFETurbulenceElement: !1,
|
|
SVGFilterElement: !1,
|
|
SVGForeignObjectElement: !1,
|
|
SVGGElement: !1,
|
|
SVGGeometryElement: !1,
|
|
SVGGradientElement: !1,
|
|
SVGGraphicsElement: !1,
|
|
SVGImageElement: !1,
|
|
SVGLength: !1,
|
|
SVGLengthList: !1,
|
|
SVGLinearGradientElement: !1,
|
|
SVGLineElement: !1,
|
|
SVGMarkerElement: !1,
|
|
SVGMaskElement: !1,
|
|
SVGMatrix: !1,
|
|
SVGMetadataElement: !1,
|
|
SVGMPathElement: !1,
|
|
SVGNumber: !1,
|
|
SVGNumberList: !1,
|
|
SVGPathElement: !1,
|
|
SVGPatternElement: !1,
|
|
SVGPoint: !1,
|
|
SVGPointList: !1,
|
|
SVGPolygonElement: !1,
|
|
SVGPolylineElement: !1,
|
|
SVGPreserveAspectRatio: !1,
|
|
SVGRadialGradientElement: !1,
|
|
SVGRect: !1,
|
|
SVGRectElement: !1,
|
|
SVGScriptElement: !1,
|
|
SVGSetElement: !1,
|
|
SVGStopElement: !1,
|
|
SVGStringList: !1,
|
|
SVGStyleElement: !1,
|
|
SVGSVGElement: !1,
|
|
SVGSwitchElement: !1,
|
|
SVGSymbolElement: !1,
|
|
SVGTextContentElement: !1,
|
|
SVGTextElement: !1,
|
|
SVGTextPathElement: !1,
|
|
SVGTextPositioningElement: !1,
|
|
SVGTitleElement: !1,
|
|
SVGTransform: !1,
|
|
SVGTransformList: !1,
|
|
SVGTSpanElement: !1,
|
|
SVGUnitTypes: !1,
|
|
SVGUseElement: !1,
|
|
SVGViewElement: !1,
|
|
TaskAttributionTiming: !1,
|
|
Text: !1,
|
|
TextDecoder: !1,
|
|
TextEncoder: !1,
|
|
TextEvent: !1,
|
|
TextMetrics: !1,
|
|
TextTrack: !1,
|
|
TextTrackCue: !1,
|
|
TextTrackCueList: !1,
|
|
TextTrackList: !1,
|
|
TimeRanges: !1,
|
|
toolbar: !1,
|
|
top: !1,
|
|
Touch: !1,
|
|
TouchEvent: !1,
|
|
TouchList: !1,
|
|
TrackEvent: !1,
|
|
TransitionEvent: !1,
|
|
TreeWalker: !1,
|
|
UIEvent: !1,
|
|
URL: !1,
|
|
URLSearchParams: !1,
|
|
ValidityState: !1,
|
|
visualViewport: !1,
|
|
VisualViewport: !1,
|
|
VTTCue: !1,
|
|
WaveShaperNode: !1,
|
|
WebAssembly: !1,
|
|
WebGL2RenderingContext: !1,
|
|
WebGLActiveInfo: !1,
|
|
WebGLBuffer: !1,
|
|
WebGLContextEvent: !1,
|
|
WebGLFramebuffer: !1,
|
|
WebGLProgram: !1,
|
|
WebGLQuery: !1,
|
|
WebGLRenderbuffer: !1,
|
|
WebGLRenderingContext: !1,
|
|
WebGLSampler: !1,
|
|
WebGLShader: !1,
|
|
WebGLShaderPrecisionFormat: !1,
|
|
WebGLSync: !1,
|
|
WebGLTexture: !1,
|
|
WebGLTransformFeedback: !1,
|
|
WebGLUniformLocation: !1,
|
|
WebGLVertexArrayObject: !1,
|
|
WebSocket: !1,
|
|
WheelEvent: !1,
|
|
window: !1,
|
|
Window: !1,
|
|
Worker: !1,
|
|
WritableStream: !1,
|
|
XMLDocument: !1,
|
|
XMLHttpRequest: !1,
|
|
XMLHttpRequestEventTarget: !1,
|
|
XMLHttpRequestUpload: !1,
|
|
XMLSerializer: !1,
|
|
XPathEvaluator: !1,
|
|
XPathExpression: !1,
|
|
XPathResult: !1,
|
|
XSLTProcessor: !1
|
|
},
|
|
worker: {
|
|
addEventListener: !1,
|
|
applicationCache: !1,
|
|
atob: !1,
|
|
Blob: !1,
|
|
BroadcastChannel: !1,
|
|
btoa: !1,
|
|
Cache: !1,
|
|
caches: !1,
|
|
clearInterval: !1,
|
|
clearTimeout: !1,
|
|
close: !0,
|
|
console: !1,
|
|
fetch: !1,
|
|
FileReaderSync: !1,
|
|
FormData: !1,
|
|
Headers: !1,
|
|
IDBCursor: !1,
|
|
IDBCursorWithValue: !1,
|
|
IDBDatabase: !1,
|
|
IDBFactory: !1,
|
|
IDBIndex: !1,
|
|
IDBKeyRange: !1,
|
|
IDBObjectStore: !1,
|
|
IDBOpenDBRequest: !1,
|
|
IDBRequest: !1,
|
|
IDBTransaction: !1,
|
|
IDBVersionChangeEvent: !1,
|
|
ImageData: !1,
|
|
importScripts: !0,
|
|
indexedDB: !1,
|
|
location: !1,
|
|
MessageChannel: !1,
|
|
MessagePort: !1,
|
|
name: !1,
|
|
navigator: !1,
|
|
Notification: !1,
|
|
onclose: !0,
|
|
onconnect: !0,
|
|
onerror: !0,
|
|
onlanguagechange: !0,
|
|
onmessage: !0,
|
|
onoffline: !0,
|
|
ononline: !0,
|
|
onrejectionhandled: !0,
|
|
onunhandledrejection: !0,
|
|
performance: !1,
|
|
Performance: !1,
|
|
PerformanceEntry: !1,
|
|
PerformanceMark: !1,
|
|
PerformanceMeasure: !1,
|
|
PerformanceNavigation: !1,
|
|
PerformanceResourceTiming: !1,
|
|
PerformanceTiming: !1,
|
|
postMessage: !0,
|
|
Promise: !1,
|
|
queueMicrotask: !1,
|
|
removeEventListener: !1,
|
|
Request: !1,
|
|
Response: !1,
|
|
self: !0,
|
|
ServiceWorkerRegistration: !1,
|
|
setInterval: !1,
|
|
setTimeout: !1,
|
|
TextDecoder: !1,
|
|
TextEncoder: !1,
|
|
URL: !1,
|
|
URLSearchParams: !1,
|
|
WebSocket: !1,
|
|
Worker: !1,
|
|
WorkerGlobalScope: !1,
|
|
XMLHttpRequest: !1
|
|
},
|
|
node: {
|
|
__dirname: !1,
|
|
__filename: !1,
|
|
Buffer: !1,
|
|
clearImmediate: !1,
|
|
clearInterval: !1,
|
|
clearTimeout: !1,
|
|
console: !1,
|
|
exports: !0,
|
|
global: !1,
|
|
Intl: !1,
|
|
module: !1,
|
|
process: !1,
|
|
queueMicrotask: !1,
|
|
require: !1,
|
|
setImmediate: !1,
|
|
setInterval: !1,
|
|
setTimeout: !1,
|
|
TextDecoder: !1,
|
|
TextEncoder: !1,
|
|
URL: !1,
|
|
URLSearchParams: !1
|
|
},
|
|
commonjs: {
|
|
exports: !0,
|
|
global: !1,
|
|
module: !1,
|
|
require: !1
|
|
},
|
|
amd: {
|
|
define: !1,
|
|
require: !1
|
|
},
|
|
mocha: {
|
|
after: !1,
|
|
afterEach: !1,
|
|
before: !1,
|
|
beforeEach: !1,
|
|
context: !1,
|
|
describe: !1,
|
|
it: !1,
|
|
mocha: !1,
|
|
run: !1,
|
|
setup: !1,
|
|
specify: !1,
|
|
suite: !1,
|
|
suiteSetup: !1,
|
|
suiteTeardown: !1,
|
|
teardown: !1,
|
|
test: !1,
|
|
xcontext: !1,
|
|
xdescribe: !1,
|
|
xit: !1,
|
|
xspecify: !1
|
|
},
|
|
jasmine: {
|
|
afterAll: !1,
|
|
afterEach: !1,
|
|
beforeAll: !1,
|
|
beforeEach: !1,
|
|
describe: !1,
|
|
expect: !1,
|
|
fail: !1,
|
|
fdescribe: !1,
|
|
fit: !1,
|
|
it: !1,
|
|
jasmine: !1,
|
|
pending: !1,
|
|
runs: !1,
|
|
spyOn: !1,
|
|
spyOnProperty: !1,
|
|
waits: !1,
|
|
waitsFor: !1,
|
|
xdescribe: !1,
|
|
xit: !1
|
|
},
|
|
jest: {
|
|
afterAll: !1,
|
|
afterEach: !1,
|
|
beforeAll: !1,
|
|
beforeEach: !1,
|
|
describe: !1,
|
|
expect: !1,
|
|
fdescribe: !1,
|
|
fit: !1,
|
|
it: !1,
|
|
jest: !1,
|
|
pit: !1,
|
|
require: !1,
|
|
test: !1,
|
|
xdescribe: !1,
|
|
xit: !1,
|
|
xtest: !1
|
|
},
|
|
qunit: {
|
|
asyncTest: !1,
|
|
deepEqual: !1,
|
|
equal: !1,
|
|
expect: !1,
|
|
module: !1,
|
|
notDeepEqual: !1,
|
|
notEqual: !1,
|
|
notOk: !1,
|
|
notPropEqual: !1,
|
|
notStrictEqual: !1,
|
|
ok: !1,
|
|
propEqual: !1,
|
|
QUnit: !1,
|
|
raises: !1,
|
|
start: !1,
|
|
stop: !1,
|
|
strictEqual: !1,
|
|
test: !1,
|
|
throws: !1
|
|
},
|
|
phantomjs: {
|
|
console: !0,
|
|
exports: !0,
|
|
phantom: !0,
|
|
require: !0,
|
|
WebPage: !0
|
|
},
|
|
couch: {
|
|
emit: !1,
|
|
exports: !1,
|
|
getRow: !1,
|
|
log: !1,
|
|
module: !1,
|
|
provides: !1,
|
|
require: !1,
|
|
respond: !1,
|
|
send: !1,
|
|
start: !1,
|
|
sum: !1
|
|
},
|
|
rhino: {
|
|
defineClass: !1,
|
|
deserialize: !1,
|
|
gc: !1,
|
|
help: !1,
|
|
importClass: !1,
|
|
importPackage: !1,
|
|
java: !1,
|
|
load: !1,
|
|
loadClass: !1,
|
|
Packages: !1,
|
|
print: !1,
|
|
quit: !1,
|
|
readFile: !1,
|
|
readUrl: !1,
|
|
runCommand: !1,
|
|
seal: !1,
|
|
serialize: !1,
|
|
spawn: !1,
|
|
sync: !1,
|
|
toint32: !1,
|
|
version: !1
|
|
},
|
|
nashorn: {
|
|
__DIR__: !1,
|
|
__FILE__: !1,
|
|
__LINE__: !1,
|
|
com: !1,
|
|
edu: !1,
|
|
exit: !1,
|
|
java: !1,
|
|
Java: !1,
|
|
javafx: !1,
|
|
JavaImporter: !1,
|
|
javax: !1,
|
|
JSAdapter: !1,
|
|
load: !1,
|
|
loadWithNewGlobal: !1,
|
|
org: !1,
|
|
Packages: !1,
|
|
print: !1,
|
|
quit: !1
|
|
},
|
|
wsh: {
|
|
ActiveXObject: !0,
|
|
Enumerator: !0,
|
|
GetObject: !0,
|
|
ScriptEngine: !0,
|
|
ScriptEngineBuildVersion: !0,
|
|
ScriptEngineMajorVersion: !0,
|
|
ScriptEngineMinorVersion: !0,
|
|
VBArray: !0,
|
|
WScript: !0,
|
|
WSH: !0,
|
|
XDomainRequest: !0
|
|
},
|
|
jquery: {
|
|
$: !1,
|
|
jQuery: !1
|
|
},
|
|
yui: {
|
|
YAHOO: !1,
|
|
YAHOO_config: !1,
|
|
YUI: !1,
|
|
YUI_config: !1
|
|
},
|
|
shelljs: {
|
|
cat: !1,
|
|
cd: !1,
|
|
chmod: !1,
|
|
config: !1,
|
|
cp: !1,
|
|
dirs: !1,
|
|
echo: !1,
|
|
env: !1,
|
|
error: !1,
|
|
exec: !1,
|
|
exit: !1,
|
|
find: !1,
|
|
grep: !1,
|
|
ln: !1,
|
|
ls: !1,
|
|
mkdir: !1,
|
|
mv: !1,
|
|
popd: !1,
|
|
pushd: !1,
|
|
pwd: !1,
|
|
rm: !1,
|
|
sed: !1,
|
|
set: !1,
|
|
target: !1,
|
|
tempdir: !1,
|
|
test: !1,
|
|
touch: !1,
|
|
which: !1
|
|
},
|
|
prototypejs: {
|
|
$: !1,
|
|
$$: !1,
|
|
$A: !1,
|
|
$break: !1,
|
|
$continue: !1,
|
|
$F: !1,
|
|
$H: !1,
|
|
$R: !1,
|
|
$w: !1,
|
|
Abstract: !1,
|
|
Ajax: !1,
|
|
Autocompleter: !1,
|
|
Builder: !1,
|
|
Class: !1,
|
|
Control: !1,
|
|
Draggable: !1,
|
|
Draggables: !1,
|
|
Droppables: !1,
|
|
Effect: !1,
|
|
Element: !1,
|
|
Enumerable: !1,
|
|
Event: !1,
|
|
Field: !1,
|
|
Form: !1,
|
|
Hash: !1,
|
|
Insertion: !1,
|
|
ObjectRange: !1,
|
|
PeriodicalExecuter: !1,
|
|
Position: !1,
|
|
Prototype: !1,
|
|
Scriptaculous: !1,
|
|
Selector: !1,
|
|
Sortable: !1,
|
|
SortableObserver: !1,
|
|
Sound: !1,
|
|
Template: !1,
|
|
Toggle: !1,
|
|
Try: !1
|
|
},
|
|
meteor: {
|
|
_: !1,
|
|
$: !1,
|
|
Accounts: !1,
|
|
AccountsClient: !1,
|
|
AccountsCommon: !1,
|
|
AccountsServer: !1,
|
|
App: !1,
|
|
Assets: !1,
|
|
Blaze: !1,
|
|
check: !1,
|
|
Cordova: !1,
|
|
DDP: !1,
|
|
DDPRateLimiter: !1,
|
|
DDPServer: !1,
|
|
Deps: !1,
|
|
EJSON: !1,
|
|
Email: !1,
|
|
HTTP: !1,
|
|
Log: !1,
|
|
Match: !1,
|
|
Meteor: !1,
|
|
Mongo: !1,
|
|
MongoInternals: !1,
|
|
Npm: !1,
|
|
Package: !1,
|
|
Plugin: !1,
|
|
process: !1,
|
|
Random: !1,
|
|
ReactiveDict: !1,
|
|
ReactiveVar: !1,
|
|
Router: !1,
|
|
ServiceConfiguration: !1,
|
|
Session: !1,
|
|
share: !1,
|
|
Spacebars: !1,
|
|
Template: !1,
|
|
Tinytest: !1,
|
|
Tracker: !1,
|
|
UI: !1,
|
|
Utils: !1,
|
|
WebApp: !1,
|
|
WebAppInternals: !1
|
|
},
|
|
mongo: {
|
|
_isWindows: !1,
|
|
_rand: !1,
|
|
BulkWriteResult: !1,
|
|
cat: !1,
|
|
cd: !1,
|
|
connect: !1,
|
|
db: !1,
|
|
getHostName: !1,
|
|
getMemInfo: !1,
|
|
hostname: !1,
|
|
ISODate: !1,
|
|
listFiles: !1,
|
|
load: !1,
|
|
ls: !1,
|
|
md5sumFile: !1,
|
|
mkdir: !1,
|
|
Mongo: !1,
|
|
NumberInt: !1,
|
|
NumberLong: !1,
|
|
ObjectId: !1,
|
|
PlanCache: !1,
|
|
print: !1,
|
|
printjson: !1,
|
|
pwd: !1,
|
|
quit: !1,
|
|
removeFile: !1,
|
|
rs: !1,
|
|
sh: !1,
|
|
UUID: !1,
|
|
version: !1,
|
|
WriteResult: !1
|
|
},
|
|
applescript: {
|
|
$: !1,
|
|
Application: !1,
|
|
Automation: !1,
|
|
console: !1,
|
|
delay: !1,
|
|
Library: !1,
|
|
ObjC: !1,
|
|
ObjectSpecifier: !1,
|
|
Path: !1,
|
|
Progress: !1,
|
|
Ref: !1
|
|
},
|
|
serviceworker: {
|
|
addEventListener: !1,
|
|
applicationCache: !1,
|
|
atob: !1,
|
|
Blob: !1,
|
|
BroadcastChannel: !1,
|
|
btoa: !1,
|
|
Cache: !1,
|
|
caches: !1,
|
|
CacheStorage: !1,
|
|
clearInterval: !1,
|
|
clearTimeout: !1,
|
|
Client: !1,
|
|
clients: !1,
|
|
Clients: !1,
|
|
close: !0,
|
|
console: !1,
|
|
ExtendableEvent: !1,
|
|
ExtendableMessageEvent: !1,
|
|
fetch: !1,
|
|
FetchEvent: !1,
|
|
FileReaderSync: !1,
|
|
FormData: !1,
|
|
Headers: !1,
|
|
IDBCursor: !1,
|
|
IDBCursorWithValue: !1,
|
|
IDBDatabase: !1,
|
|
IDBFactory: !1,
|
|
IDBIndex: !1,
|
|
IDBKeyRange: !1,
|
|
IDBObjectStore: !1,
|
|
IDBOpenDBRequest: !1,
|
|
IDBRequest: !1,
|
|
IDBTransaction: !1,
|
|
IDBVersionChangeEvent: !1,
|
|
ImageData: !1,
|
|
importScripts: !1,
|
|
indexedDB: !1,
|
|
location: !1,
|
|
MessageChannel: !1,
|
|
MessagePort: !1,
|
|
name: !1,
|
|
navigator: !1,
|
|
Notification: !1,
|
|
onclose: !0,
|
|
onconnect: !0,
|
|
onerror: !0,
|
|
onfetch: !0,
|
|
oninstall: !0,
|
|
onlanguagechange: !0,
|
|
onmessage: !0,
|
|
onmessageerror: !0,
|
|
onnotificationclick: !0,
|
|
onnotificationclose: !0,
|
|
onoffline: !0,
|
|
ononline: !0,
|
|
onpush: !0,
|
|
onpushsubscriptionchange: !0,
|
|
onrejectionhandled: !0,
|
|
onsync: !0,
|
|
onunhandledrejection: !0,
|
|
performance: !1,
|
|
Performance: !1,
|
|
PerformanceEntry: !1,
|
|
PerformanceMark: !1,
|
|
PerformanceMeasure: !1,
|
|
PerformanceNavigation: !1,
|
|
PerformanceResourceTiming: !1,
|
|
PerformanceTiming: !1,
|
|
postMessage: !0,
|
|
Promise: !1,
|
|
queueMicrotask: !1,
|
|
registration: !1,
|
|
removeEventListener: !1,
|
|
Request: !1,
|
|
Response: !1,
|
|
self: !1,
|
|
ServiceWorker: !1,
|
|
ServiceWorkerContainer: !1,
|
|
ServiceWorkerGlobalScope: !1,
|
|
ServiceWorkerMessageEvent: !1,
|
|
ServiceWorkerRegistration: !1,
|
|
setInterval: !1,
|
|
setTimeout: !1,
|
|
skipWaiting: !1,
|
|
TextDecoder: !1,
|
|
TextEncoder: !1,
|
|
URL: !1,
|
|
URLSearchParams: !1,
|
|
WebSocket: !1,
|
|
WindowClient: !1,
|
|
Worker: !1,
|
|
WorkerGlobalScope: !1,
|
|
XMLHttpRequest: !1
|
|
},
|
|
atomtest: {
|
|
advanceClock: !1,
|
|
fakeClearInterval: !1,
|
|
fakeClearTimeout: !1,
|
|
fakeSetInterval: !1,
|
|
fakeSetTimeout: !1,
|
|
resetTimeouts: !1,
|
|
waitsForPromise: !1
|
|
},
|
|
embertest: {
|
|
andThen: !1,
|
|
click: !1,
|
|
currentPath: !1,
|
|
currentRouteName: !1,
|
|
currentURL: !1,
|
|
fillIn: !1,
|
|
find: !1,
|
|
findAll: !1,
|
|
findWithAssert: !1,
|
|
keyEvent: !1,
|
|
pauseTest: !1,
|
|
resumeTest: !1,
|
|
triggerEvent: !1,
|
|
visit: !1,
|
|
wait: !1
|
|
},
|
|
protractor: {
|
|
$: !1,
|
|
$$: !1,
|
|
browser: !1,
|
|
by: !1,
|
|
By: !1,
|
|
DartObject: !1,
|
|
element: !1,
|
|
protractor: !1
|
|
},
|
|
"shared-node-browser": {
|
|
clearInterval: !1,
|
|
clearTimeout: !1,
|
|
console: !1,
|
|
setInterval: !1,
|
|
setTimeout: !1,
|
|
URL: !1,
|
|
URLSearchParams: !1
|
|
},
|
|
webextensions: {
|
|
browser: !1,
|
|
chrome: !1,
|
|
opr: !1
|
|
},
|
|
greasemonkey: {
|
|
cloneInto: !1,
|
|
createObjectIn: !1,
|
|
exportFunction: !1,
|
|
GM: !1,
|
|
GM_addStyle: !1,
|
|
GM_deleteValue: !1,
|
|
GM_getResourceText: !1,
|
|
GM_getResourceURL: !1,
|
|
GM_getValue: !1,
|
|
GM_info: !1,
|
|
GM_listValues: !1,
|
|
GM_log: !1,
|
|
GM_openInTab: !1,
|
|
GM_registerMenuCommand: !1,
|
|
GM_setClipboard: !1,
|
|
GM_setValue: !1,
|
|
GM_xmlhttpRequest: !1,
|
|
unsafeWindow: !1
|
|
},
|
|
devtools: {
|
|
$: !1,
|
|
$_: !1,
|
|
$$: !1,
|
|
$0: !1,
|
|
$1: !1,
|
|
$2: !1,
|
|
$3: !1,
|
|
$4: !1,
|
|
$x: !1,
|
|
chrome: !1,
|
|
clear: !1,
|
|
copy: !1,
|
|
debug: !1,
|
|
dir: !1,
|
|
dirxml: !1,
|
|
getEventListeners: !1,
|
|
inspect: !1,
|
|
keys: !1,
|
|
monitor: !1,
|
|
monitorEvents: !1,
|
|
profile: !1,
|
|
profileEnd: !1,
|
|
queryObjects: !1,
|
|
table: !1,
|
|
undebug: !1,
|
|
unmonitor: !1,
|
|
unmonitorEvents: !1,
|
|
values: !1
|
|
}
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/node_modules/globals/index.js
|
|
var A7 = E((Ift, w7) => {
|
|
"use strict";
|
|
w7.exports = C7();
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/cache.js
|
|
var Zo = E((Ni) => {
|
|
"use strict";
|
|
Object.defineProperty(Ni, "__esModule", {
|
|
value: !0
|
|
});
|
|
Ni.clear = qIe;
|
|
Ni.clearPath = _7;
|
|
Ni.clearScope = P7;
|
|
Ni.getCachedPaths = UIe;
|
|
Ni.getOrCreateCachedPaths = WIe;
|
|
Ni.scope = Ni.path = void 0;
|
|
var Hy = Ni.path = /* @__PURE__ */ new WeakMap(), LIe = Ni.scope = /* @__PURE__ */ new WeakMap();
|
|
function qIe() {
|
|
_7(), P7();
|
|
}
|
|
s(qIe, "clear");
|
|
function _7() {
|
|
Ni.path = Hy = /* @__PURE__ */ new WeakMap();
|
|
}
|
|
s(_7, "clearPath");
|
|
function P7() {
|
|
Ni.scope = LIe = /* @__PURE__ */ new WeakMap();
|
|
}
|
|
s(P7, "clearScope");
|
|
var SC = Object.freeze({});
|
|
function UIe(e, t) {
|
|
var r;
|
|
return e = null, (r = Hy.get(e ?? SC)) == null ? void 0 : r.get(t);
|
|
}
|
|
s(UIe, "getCachedPaths");
|
|
function WIe(e, t) {
|
|
e = null;
|
|
let r = Hy.get(e ?? SC);
|
|
r || Hy.set(e ?? SC, r = /* @__PURE__ */ new WeakMap());
|
|
let i = r.get(t);
|
|
return i || r.set(t, i = /* @__PURE__ */ new Map()), i;
|
|
}
|
|
s(WIe, "getOrCreateCachedPaths");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/scope/index.js
|
|
var _C = E((Ky) => {
|
|
"use strict";
|
|
Object.defineProperty(Ky, "__esModule", {
|
|
value: !0
|
|
});
|
|
Ky.default = void 0;
|
|
var $Ie = S7(), j7 = Ar(), VIe = T7(), HIe = A7(), L7 = Ve(), q7 = L7, F7 = Zo(), {
|
|
assignmentExpression: KIe,
|
|
callExpression: I7,
|
|
cloneNode: O7,
|
|
getBindingIdentifiers: U7,
|
|
identifier: eu,
|
|
isArrayExpression: W7,
|
|
isBinary: zIe,
|
|
isCallExpression: k7,
|
|
isClass: GIe,
|
|
isClassBody: JIe,
|
|
isClassDeclaration: XIe,
|
|
isExportAllDeclaration: $7,
|
|
isExportDefaultDeclaration: YIe,
|
|
isExportNamedDeclaration: TC,
|
|
isFunctionDeclaration: ZIe,
|
|
isIdentifier: Qo,
|
|
isImportDeclaration: CC,
|
|
isLiteral: QIe,
|
|
isMemberExpression: eOe,
|
|
isMethod: tOe,
|
|
isModuleSpecifier: rOe,
|
|
isNullLiteral: iOe,
|
|
isObjectExpression: nOe,
|
|
isProperty: sOe,
|
|
isPureish: aOe,
|
|
isRegExpLiteral: oOe,
|
|
isSuper: uOe,
|
|
isTaggedTemplateExpression: lOe,
|
|
isTemplateLiteral: V7,
|
|
isThisExpression: B7,
|
|
isUnaryExpression: cOe,
|
|
isVariableDeclaration: fOe,
|
|
expressionStatement: dOe,
|
|
matchesPattern: N7,
|
|
memberExpression: wC,
|
|
numericLiteral: pOe,
|
|
toIdentifier: hOe,
|
|
variableDeclaration: mOe,
|
|
variableDeclarator: yOe,
|
|
isRecordExpression: gOe,
|
|
isTupleExpression: bOe,
|
|
isObjectProperty: DOe,
|
|
isTopicReference: M7,
|
|
isMetaProperty: vOe,
|
|
isPrivateName: EOe,
|
|
isExportDeclaration: xOe,
|
|
buildUndefinedNode: SOe,
|
|
sequenceExpression: TOe
|
|
} = L7;
|
|
function Ut(e, t) {
|
|
switch (e?.type) {
|
|
default:
|
|
if (CC(e) || xOe(e)) {
|
|
var r;
|
|
if (($7(e) || TC(e) || CC(e)) && e.source)
|
|
Ut(e.source, t);
|
|
else if ((TC(e) || CC(e)) && (r = e.specifiers) != null && r.length)
|
|
for (let i of e.specifiers) Ut(i, t);
|
|
else (YIe(e) || TC(e)) && e.declaration && Ut(e.declaration, t);
|
|
} else rOe(e) ? Ut(e.local, t) : QIe(e) && !iOe(e) && !oOe(e) && !V7(e) && t.push(e.value);
|
|
break;
|
|
case "MemberExpression":
|
|
case "OptionalMemberExpression":
|
|
case "JSXMemberExpression":
|
|
Ut(e.object, t), Ut(e.property, t);
|
|
break;
|
|
case "Identifier":
|
|
case "JSXIdentifier":
|
|
t.push(e.name);
|
|
break;
|
|
case "CallExpression":
|
|
case "OptionalCallExpression":
|
|
case "NewExpression":
|
|
Ut(e.callee, t);
|
|
break;
|
|
case "ObjectExpression":
|
|
case "ObjectPattern":
|
|
for (let i of e.properties)
|
|
Ut(i, t);
|
|
break;
|
|
case "SpreadElement":
|
|
case "RestElement":
|
|
Ut(e.argument, t);
|
|
break;
|
|
case "ObjectProperty":
|
|
case "ObjectMethod":
|
|
case "ClassProperty":
|
|
case "ClassMethod":
|
|
case "ClassPrivateProperty":
|
|
case "ClassPrivateMethod":
|
|
Ut(e.key, t);
|
|
break;
|
|
case "ThisExpression":
|
|
t.push("this");
|
|
break;
|
|
case "Super":
|
|
t.push("super");
|
|
break;
|
|
case "Import":
|
|
t.push("import");
|
|
break;
|
|
case "DoExpression":
|
|
t.push("do");
|
|
break;
|
|
case "YieldExpression":
|
|
t.push("yield"), Ut(e.argument, t);
|
|
break;
|
|
case "AwaitExpression":
|
|
t.push("await"), Ut(e.argument, t);
|
|
break;
|
|
case "AssignmentExpression":
|
|
Ut(e.left, t);
|
|
break;
|
|
case "VariableDeclarator":
|
|
Ut(e.id, t);
|
|
break;
|
|
case "FunctionExpression":
|
|
case "FunctionDeclaration":
|
|
case "ClassExpression":
|
|
case "ClassDeclaration":
|
|
Ut(e.id, t);
|
|
break;
|
|
case "PrivateName":
|
|
Ut(e.id, t);
|
|
break;
|
|
case "ParenthesizedExpression":
|
|
Ut(e.expression, t);
|
|
break;
|
|
case "UnaryExpression":
|
|
case "UpdateExpression":
|
|
Ut(e.argument, t);
|
|
break;
|
|
case "MetaProperty":
|
|
Ut(e.meta, t), Ut(e.property, t);
|
|
break;
|
|
case "JSXElement":
|
|
Ut(e.openingElement, t);
|
|
break;
|
|
case "JSXOpeningElement":
|
|
Ut(e.name, t);
|
|
break;
|
|
case "JSXFragment":
|
|
Ut(e.openingFragment, t);
|
|
break;
|
|
case "JSXOpeningFragment":
|
|
t.push("Fragment");
|
|
break;
|
|
case "JSXNamespacedName":
|
|
Ut(e.namespace, t), Ut(e.name, t);
|
|
break;
|
|
}
|
|
}
|
|
s(Ut, "gatherNodeParts");
|
|
function R7(e) {
|
|
e.references = /* @__PURE__ */ Object.create(null), e.bindings = /* @__PURE__ */ Object.create(null), e.globals = /* @__PURE__ */ Object.
|
|
create(null), e.uids = /* @__PURE__ */ Object.create(null);
|
|
}
|
|
s(R7, "resetScope");
|
|
AC = Symbol.for("should not be considered a local binding");
|
|
var AC, COe = {
|
|
ForStatement(e) {
|
|
let t = e.get("init");
|
|
if (t.isVar()) {
|
|
let {
|
|
scope: r
|
|
} = e;
|
|
(r.getFunctionParent() || r.getProgramParent()).registerBinding("var", t);
|
|
}
|
|
},
|
|
Declaration(e) {
|
|
if (e.isBlockScoped() || e.isImportDeclaration() || e.isExportDeclaration()) return;
|
|
(e.scope.getFunctionParent() || e.scope.getProgramParent()).registerDeclaration(e);
|
|
},
|
|
ImportDeclaration(e) {
|
|
e.scope.getBlockParent().registerDeclaration(e);
|
|
},
|
|
TSImportEqualsDeclaration(e) {
|
|
e.scope.getBlockParent().registerDeclaration(e);
|
|
},
|
|
ReferencedIdentifier(e, t) {
|
|
q7.isTSQualifiedName(e.parent) && e.parent.right === e.node || e.parentPath.isTSImportEqualsDeclaration() || t.references.push(e);
|
|
},
|
|
ForXStatement(e, t) {
|
|
let r = e.get("left");
|
|
if (r.isPattern() || r.isIdentifier())
|
|
t.constantViolations.push(e);
|
|
else if (r.isVar()) {
|
|
let {
|
|
scope: i
|
|
} = e;
|
|
(i.getFunctionParent() || i.getProgramParent()).registerBinding("var", r);
|
|
}
|
|
},
|
|
ExportDeclaration: {
|
|
exit(e) {
|
|
let {
|
|
node: t,
|
|
scope: r
|
|
} = e;
|
|
if ($7(t)) return;
|
|
let i = t.declaration;
|
|
if (XIe(i) || ZIe(i)) {
|
|
let n = i.id;
|
|
if (!n) return;
|
|
let a = r.getBinding(n.name);
|
|
a?.reference(e);
|
|
} else if (fOe(i))
|
|
for (let n of i.declarations)
|
|
for (let a of Object.keys(U7(n))) {
|
|
let o = r.getBinding(a);
|
|
o?.reference(e);
|
|
}
|
|
}
|
|
},
|
|
LabeledStatement(e) {
|
|
e.scope.getBlockParent().registerDeclaration(e);
|
|
},
|
|
AssignmentExpression(e, t) {
|
|
t.assignments.push(e);
|
|
},
|
|
UpdateExpression(e, t) {
|
|
t.constantViolations.push(e);
|
|
},
|
|
UnaryExpression(e, t) {
|
|
e.node.operator === "delete" && t.constantViolations.push(e);
|
|
},
|
|
BlockScoped(e) {
|
|
let t = e.scope;
|
|
if (t.path === e && (t = t.parent), t.getBlockParent().registerDeclaration(e), e.isClassDeclaration() && e.node.id) {
|
|
let n = e.node.id.name;
|
|
e.scope.bindings[n] = e.scope.parent.getBinding(n);
|
|
}
|
|
},
|
|
CatchClause(e) {
|
|
e.scope.registerBinding("let", e);
|
|
},
|
|
Function(e) {
|
|
let t = e.get("params");
|
|
for (let r of t)
|
|
e.scope.registerBinding("param", r);
|
|
e.isFunctionExpression() && e.node.id && !e.node.id[AC] && e.scope.registerBinding("local", e.get("id"), e);
|
|
},
|
|
ClassExpression(e) {
|
|
e.node.id && !e.node.id[AC] && e.scope.registerBinding("local", e.get("id"), e);
|
|
},
|
|
TSTypeAnnotation(e) {
|
|
e.skip();
|
|
}
|
|
}, Bd, wOe = 0, Tn = class e {
|
|
static {
|
|
s(this, "Scope");
|
|
}
|
|
constructor(t) {
|
|
this.uid = void 0, this.path = void 0, this.block = void 0, this.inited = void 0, this.labels = 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;
|
|
let {
|
|
node: r
|
|
} = t, i = F7.scope.get(r);
|
|
if (i?.path === t)
|
|
return i;
|
|
F7.scope.set(r, this), this.uid = wOe++, this.block = r, this.path = t, this.labels = /* @__PURE__ */ new Map(), this.inited = !1;
|
|
}
|
|
get parent() {
|
|
var t;
|
|
let r, i = this.path;
|
|
do {
|
|
var n;
|
|
let a = i.key === "key" || i.listKey === "decorators";
|
|
i = i.parentPath, a && i.isMethod() && (i = i.parentPath), (n = i) != null && n.isScope() && (r = i);
|
|
} while (i && !r);
|
|
return (t = r) == null ? void 0 : t.scope;
|
|
}
|
|
generateDeclaredUidIdentifier(t) {
|
|
let r = this.generateUidIdentifier(t);
|
|
return this.push({
|
|
id: r
|
|
}), O7(r);
|
|
}
|
|
generateUidIdentifier(t) {
|
|
return eu(this.generateUid(t));
|
|
}
|
|
generateUid(t = "temp") {
|
|
t = hOe(t).replace(/^_+/, "").replace(/\d+$/g, "");
|
|
let r, i = 1;
|
|
do
|
|
r = `_${t}`, i > 1 && (r += i), i++;
|
|
while (this.hasLabel(r) || this.hasBinding(r) || this.hasGlobal(r) || this.hasReference(r));
|
|
let n = this.getProgramParent();
|
|
return n.references[r] = !0, n.uids[r] = !0, r;
|
|
}
|
|
generateUidBasedOnNode(t, r) {
|
|
let i = [];
|
|
Ut(t, i);
|
|
let n = i.join("$");
|
|
return n = n.replace(/^_/, "") || r || "ref", this.generateUid(n.slice(0, 20));
|
|
}
|
|
generateUidIdentifierBasedOnNode(t, r) {
|
|
return eu(this.generateUidBasedOnNode(t, r));
|
|
}
|
|
isStatic(t) {
|
|
if (B7(t) || uOe(t) || M7(t))
|
|
return !0;
|
|
if (Qo(t)) {
|
|
let r = this.getBinding(t.name);
|
|
return r ? r.constant : this.hasBinding(t.name);
|
|
}
|
|
return !1;
|
|
}
|
|
maybeGenerateMemoised(t, r) {
|
|
if (this.isStatic(t))
|
|
return null;
|
|
{
|
|
let i = this.generateUidIdentifierBasedOnNode(t);
|
|
return r ? i : (this.push({
|
|
id: i
|
|
}), O7(i));
|
|
}
|
|
}
|
|
checkBlockScopedCollisions(t, r, i, n) {
|
|
if (r === "param" || t.kind === "local") return;
|
|
if (r === "let" || t.kind === "let" || t.kind === "const" || t.kind === "module" || t.kind === "param" && r === "const")
|
|
throw this.path.hub.buildError(n, `Duplicate declaration "${i}"`, TypeError);
|
|
}
|
|
rename(t, r) {
|
|
let i = this.getBinding(t);
|
|
i && (r || (r = this.generateUidIdentifier(t).name), new $Ie.default(i, t, r).rename(arguments[2]));
|
|
}
|
|
dump() {
|
|
let t = "-".repeat(60);
|
|
console.log(t);
|
|
let r = this;
|
|
do {
|
|
console.log("#", r.block.type);
|
|
for (let i of Object.keys(r.bindings)) {
|
|
let n = r.bindings[i];
|
|
console.log(" -", i, {
|
|
constant: n.constant,
|
|
references: n.references,
|
|
violations: n.constantViolations.length,
|
|
kind: n.kind
|
|
});
|
|
}
|
|
} while (r = r.parent);
|
|
console.log(t);
|
|
}
|
|
hasLabel(t) {
|
|
return !!this.getLabel(t);
|
|
}
|
|
getLabel(t) {
|
|
return this.labels.get(t);
|
|
}
|
|
registerLabel(t) {
|
|
this.labels.set(t.node.label.name, t);
|
|
}
|
|
registerDeclaration(t) {
|
|
if (t.isLabeledStatement())
|
|
this.registerLabel(t);
|
|
else if (t.isFunctionDeclaration())
|
|
this.registerBinding("hoisted", t.get("id"), t);
|
|
else if (t.isVariableDeclaration()) {
|
|
let r = t.get("declarations"), {
|
|
kind: i
|
|
} = t.node;
|
|
for (let n of r)
|
|
this.registerBinding(i === "using" || i === "await using" ? "const" : i, n);
|
|
} else if (t.isClassDeclaration()) {
|
|
if (t.node.declare) return;
|
|
this.registerBinding("let", t);
|
|
} else if (t.isImportDeclaration()) {
|
|
let r = t.node.importKind === "type" || t.node.importKind === "typeof", i = t.get("specifiers");
|
|
for (let n of i) {
|
|
let a = r || n.isImportSpecifier() && (n.node.importKind === "type" || n.node.importKind === "typeof");
|
|
this.registerBinding(a ? "unknown" : "module", n);
|
|
}
|
|
} else if (t.isExportDeclaration()) {
|
|
let r = t.get("declaration");
|
|
(r.isClassDeclaration() || r.isFunctionDeclaration() || r.isVariableDeclaration()) && this.registerDeclaration(r);
|
|
} else
|
|
this.registerBinding("unknown", t);
|
|
}
|
|
buildUndefinedNode() {
|
|
return SOe();
|
|
}
|
|
registerConstantViolation(t) {
|
|
let r = t.getAssignmentIdentifiers();
|
|
for (let n of Object.keys(r)) {
|
|
var i;
|
|
(i = this.getBinding(n)) == null || i.reassign(t);
|
|
}
|
|
}
|
|
registerBinding(t, r, i = r) {
|
|
if (!t) throw new ReferenceError("no `kind`");
|
|
if (r.isVariableDeclaration()) {
|
|
let o = r.get("declarations");
|
|
for (let u of o)
|
|
this.registerBinding(t, u);
|
|
return;
|
|
}
|
|
let n = this.getProgramParent(), a = r.getOuterBindingIdentifiers(!0);
|
|
for (let o of Object.keys(a)) {
|
|
n.references[o] = !0;
|
|
for (let u of a[o]) {
|
|
let l = this.getOwnBinding(o);
|
|
if (l) {
|
|
if (l.identifier === u) continue;
|
|
this.checkBlockScopedCollisions(l, t, o, u);
|
|
}
|
|
l ? l.reassign(i) : this.bindings[o] = new VIe.default({
|
|
identifier: u,
|
|
scope: this,
|
|
path: i,
|
|
kind: t
|
|
});
|
|
}
|
|
}
|
|
}
|
|
addGlobal(t) {
|
|
this.globals[t.name] = t;
|
|
}
|
|
hasUid(t) {
|
|
let r = this;
|
|
do
|
|
if (r.uids[t]) return !0;
|
|
while (r = r.parent);
|
|
return !1;
|
|
}
|
|
hasGlobal(t) {
|
|
let r = this;
|
|
do
|
|
if (r.globals[t]) return !0;
|
|
while (r = r.parent);
|
|
return !1;
|
|
}
|
|
hasReference(t) {
|
|
return !!this.getProgramParent().references[t];
|
|
}
|
|
isPure(t, r) {
|
|
if (Qo(t)) {
|
|
let o = this.getBinding(t.name);
|
|
return o ? r ? o.constant : !0 : !1;
|
|
} else {
|
|
if (B7(t) || vOe(t) || M7(t) || EOe(t))
|
|
return !0;
|
|
if (GIe(t)) {
|
|
var i;
|
|
return t.superClass && !this.isPure(t.superClass, r) || ((i = t.decorators) == null ? void 0 : i.length) > 0 ? !1 : this.isPure(t.
|
|
body, r);
|
|
} else if (JIe(t)) {
|
|
for (let o of t.body)
|
|
if (!this.isPure(o, r)) return !1;
|
|
return !0;
|
|
} else {
|
|
if (zIe(t))
|
|
return this.isPure(t.left, r) && this.isPure(t.right, r);
|
|
if (W7(t) || bOe(t)) {
|
|
for (let o of t.elements)
|
|
if (o !== null && !this.isPure(o, r)) return !1;
|
|
return !0;
|
|
} else if (nOe(t) || gOe(t)) {
|
|
for (let o of t.properties)
|
|
if (!this.isPure(o, r)) return !1;
|
|
return !0;
|
|
} else if (tOe(t)) {
|
|
var n;
|
|
return !(t.computed && !this.isPure(t.key, r) || ((n = t.decorators) == null ? void 0 : n.length) > 0);
|
|
} else if (sOe(t)) {
|
|
var a;
|
|
return !(t.computed && !this.isPure(t.key, r) || ((a = t.decorators) == null ? void 0 : a.length) > 0 || (DOe(t) || t.static) &&
|
|
t.value !== null && !this.isPure(t.value, r));
|
|
} else {
|
|
if (cOe(t))
|
|
return this.isPure(t.argument, r);
|
|
if (V7(t)) {
|
|
for (let o of t.expressions)
|
|
if (!this.isPure(o, r)) return !1;
|
|
return !0;
|
|
} else return lOe(t) ? N7(t.tag, "String.raw") && !this.hasBinding("String", {
|
|
noGlobals: !0
|
|
}) && this.isPure(t.quasi, r) : eOe(t) ? !t.computed && Qo(t.object) && t.object.name === "Symbol" && Qo(t.property) && t.property.
|
|
name !== "for" && !this.hasBinding("Symbol", {
|
|
noGlobals: !0
|
|
}) : k7(t) ? N7(t.callee, "Symbol.for") && !this.hasBinding("Symbol", {
|
|
noGlobals: !0
|
|
}) && t.arguments.length === 1 && q7.isStringLiteral(t.arguments[0]) : aOe(t);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
setData(t, r) {
|
|
return this.data[t] = r;
|
|
}
|
|
getData(t) {
|
|
let r = this;
|
|
do {
|
|
let i = r.data[t];
|
|
if (i != null) return i;
|
|
} while (r = r.parent);
|
|
}
|
|
removeData(t) {
|
|
let r = this;
|
|
do
|
|
r.data[t] != null && (r.data[t] = null);
|
|
while (r = r.parent);
|
|
}
|
|
init() {
|
|
this.inited || (this.inited = !0, this.crawl());
|
|
}
|
|
crawl() {
|
|
let t = this.path;
|
|
R7(this), this.data = /* @__PURE__ */ Object.create(null);
|
|
let r = this;
|
|
do {
|
|
if (r.crawling) return;
|
|
if (r.path.isProgram())
|
|
break;
|
|
} while (r = r.parent);
|
|
let i = r, n = {
|
|
references: [],
|
|
constantViolations: [],
|
|
assignments: []
|
|
};
|
|
if (this.crawling = !0, Bd || (Bd = j7.default.visitors.merge([{
|
|
Scope(a) {
|
|
R7(a.scope);
|
|
}
|
|
}, COe])), t.type !== "Program") {
|
|
for (let o of Bd.enter)
|
|
o.call(n, t, n);
|
|
let a = Bd[t.type];
|
|
if (a)
|
|
for (let o of a.enter)
|
|
o.call(n, t, n);
|
|
}
|
|
t.traverse(Bd, n), this.crawling = !1;
|
|
for (let a of n.assignments) {
|
|
let o = a.getAssignmentIdentifiers();
|
|
for (let u of Object.keys(o))
|
|
a.scope.getBinding(u) || i.addGlobal(o[u]);
|
|
a.scope.registerConstantViolation(a);
|
|
}
|
|
for (let a of n.references) {
|
|
let o = a.scope.getBinding(a.node.name);
|
|
o ? o.reference(a) : i.addGlobal(a.node);
|
|
}
|
|
for (let a of n.constantViolations)
|
|
a.scope.registerConstantViolation(a);
|
|
}
|
|
push(t) {
|
|
let r = this.path;
|
|
r.isPattern() ? r = this.getPatternParent().path : !r.isBlockStatement() && !r.isProgram() && (r = this.getBlockParent().path), r.isSwitchStatement() &&
|
|
(r = (this.getFunctionParent() || this.getProgramParent()).path);
|
|
let {
|
|
init: i,
|
|
unique: n,
|
|
kind: a = "var",
|
|
id: o
|
|
} = t;
|
|
if (!i && !n && (a === "var" || a === "let") && r.isFunction() && !r.node.name && k7(r.parent, {
|
|
callee: r.node
|
|
}) && r.parent.arguments.length <= r.node.params.length && Qo(o)) {
|
|
r.pushContainer("params", o), r.scope.registerBinding("param", r.get("params")[r.node.params.length - 1]);
|
|
return;
|
|
}
|
|
(r.isLoop() || r.isCatchClause() || r.isFunction()) && (r.ensureBlock(), r = r.get("body"));
|
|
let u = t._blockHoist == null ? 2 : t._blockHoist, l = `declaration:${a}:${u}`, c = !n && r.getData(l);
|
|
if (!c) {
|
|
let h = mOe(a, []);
|
|
h._blockHoist = u, [c] = r.unshiftContainer("body", [h]), n || r.setData(l, c);
|
|
}
|
|
let f = yOe(o, i), m = c.node.declarations.push(f);
|
|
r.scope.registerBinding(a, c.get("declarations")[m - 1]);
|
|
}
|
|
getProgramParent() {
|
|
let t = this;
|
|
do
|
|
if (t.path.isProgram())
|
|
return t;
|
|
while (t = t.parent);
|
|
throw new Error("Couldn't find a Program");
|
|
}
|
|
getFunctionParent() {
|
|
let t = this;
|
|
do
|
|
if (t.path.isFunctionParent())
|
|
return t;
|
|
while (t = t.parent);
|
|
return null;
|
|
}
|
|
getBlockParent() {
|
|
let t = this;
|
|
do
|
|
if (t.path.isBlockParent())
|
|
return t;
|
|
while (t = t.parent);
|
|
throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
|
|
}
|
|
getPatternParent() {
|
|
let t = this;
|
|
do
|
|
if (!t.path.isPattern())
|
|
return t.getBlockParent();
|
|
while (t = t.parent.parent);
|
|
throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
|
|
}
|
|
getAllBindings() {
|
|
let t = /* @__PURE__ */ Object.create(null), r = this;
|
|
do {
|
|
for (let i of Object.keys(r.bindings))
|
|
i in t || (t[i] = r.bindings[i]);
|
|
r = r.parent;
|
|
} while (r);
|
|
return t;
|
|
}
|
|
bindingIdentifierEquals(t, r) {
|
|
return this.getBindingIdentifier(t) === r;
|
|
}
|
|
getBinding(t) {
|
|
let r = this, i;
|
|
do {
|
|
let a = r.getOwnBinding(t);
|
|
if (a) {
|
|
var n;
|
|
if (!((n = i) != null && n.isPattern() && a.kind !== "param" && a.kind !== "local"))
|
|
return a;
|
|
} else if (!a && t === "arguments" && r.path.isFunction() && !r.path.isArrowFunctionExpression())
|
|
break;
|
|
i = r.path;
|
|
} while (r = r.parent);
|
|
}
|
|
getOwnBinding(t) {
|
|
return this.bindings[t];
|
|
}
|
|
getBindingIdentifier(t) {
|
|
var r;
|
|
return (r = this.getBinding(t)) == null ? void 0 : r.identifier;
|
|
}
|
|
getOwnBindingIdentifier(t) {
|
|
let r = this.bindings[t];
|
|
return r?.identifier;
|
|
}
|
|
hasOwnBinding(t) {
|
|
return !!this.getOwnBinding(t);
|
|
}
|
|
hasBinding(t, r) {
|
|
if (!t) return !1;
|
|
let i, n, a;
|
|
typeof r == "object" ? (i = r.noGlobals, n = r.noUids, a = r.upToScope) : typeof r == "boolean" && (i = r);
|
|
let o = this;
|
|
do {
|
|
if (a === o)
|
|
break;
|
|
if (o.hasOwnBinding(t))
|
|
return !0;
|
|
} while (o = o.parent);
|
|
return !!(!n && this.hasUid(t) || !i && e.globals.includes(t) || !i && e.contextVariables.includes(t));
|
|
}
|
|
parentHasBinding(t, r) {
|
|
var i;
|
|
return (i = this.parent) == null ? void 0 : i.hasBinding(t, r);
|
|
}
|
|
moveBindingTo(t, r) {
|
|
let i = this.getBinding(t);
|
|
i && (i.scope.removeOwnBinding(t), i.scope = r, r.bindings[t] = i);
|
|
}
|
|
removeOwnBinding(t) {
|
|
delete this.bindings[t];
|
|
}
|
|
removeBinding(t) {
|
|
var r;
|
|
(r = this.getBinding(t)) == null || r.scope.removeOwnBinding(t);
|
|
let i = this;
|
|
do
|
|
i.uids[t] && (i.uids[t] = !1);
|
|
while (i = i.parent);
|
|
}
|
|
hoistVariables(t = (r) => this.push({
|
|
id: r
|
|
})) {
|
|
this.crawl();
|
|
let r = /* @__PURE__ */ new Set();
|
|
for (let i of Object.keys(this.bindings)) {
|
|
let n = this.bindings[i];
|
|
if (!n) continue;
|
|
let {
|
|
path: a
|
|
} = n;
|
|
if (!a.isVariableDeclarator()) continue;
|
|
let {
|
|
parent: o,
|
|
parentPath: u
|
|
} = a;
|
|
if (o.kind !== "var" || r.has(o)) continue;
|
|
r.add(a.parent);
|
|
let l, c = [];
|
|
for (let f of o.declarations) {
|
|
l ?? (l = f.id), f.init && c.push(KIe("=", f.id, f.init));
|
|
let m = Object.keys(U7(f, !1, !0, !0));
|
|
for (let h of m)
|
|
t(eu(h), f.init != null);
|
|
}
|
|
if (u.parentPath.isFor({
|
|
left: o
|
|
}))
|
|
u.replaceWith(l);
|
|
else if (c.length === 0)
|
|
u.remove();
|
|
else {
|
|
let f = c.length === 1 ? c[0] : TOe(c);
|
|
u.parentPath.isForStatement({
|
|
init: o
|
|
}) ? u.replaceWith(f) : u.replaceWith(dOe(f));
|
|
}
|
|
}
|
|
}
|
|
};
|
|
Ky.default = Tn;
|
|
Tn.globals = Object.keys(HIe.builtin);
|
|
Tn.contextVariables = ["arguments", "undefined", "Infinity", "NaN"];
|
|
Tn.prototype._renameFromMap = /* @__PURE__ */ s(function(t, r, i, n) {
|
|
t[r] && (t[i] = n, t[r] = null);
|
|
}, "_renameFromMap"), Tn.prototype.traverse = function(e, t, r) {
|
|
(0, j7.default)(e, t, this, r, this.path);
|
|
}, Tn.prototype._generateUid = /* @__PURE__ */ s(function(t, r) {
|
|
let i = t;
|
|
return r > 1 && (i += r), `_${i}`;
|
|
}, "_generateUid"), Tn.prototype.toArray = /* @__PURE__ */ s(function(t, r, i) {
|
|
if (Qo(t)) {
|
|
let o = this.getBinding(t.name);
|
|
if (o != null && o.constant && o.path.isGenericType("Array"))
|
|
return t;
|
|
}
|
|
if (W7(t))
|
|
return t;
|
|
if (Qo(t, {
|
|
name: "arguments"
|
|
}))
|
|
return I7(wC(wC(wC(eu("Array"), eu("prototype")), eu("slice")), eu("call")), [t]);
|
|
let n, a = [t];
|
|
return r === !0 ? n = "toConsumableArray" : typeof r == "number" ? (a.push(pOe(r)), n = "slicedToArray") : n = "toArray", i && (a.unshift(
|
|
this.path.hub.addHelper(n)), n = "maybeArrayLike"), I7(this.path.hub.addHelper(n), a);
|
|
}, "toArray"), Tn.prototype.getAllBindingsOfKind = /* @__PURE__ */ s(function(...t) {
|
|
let r = /* @__PURE__ */ Object.create(null);
|
|
for (let i of t) {
|
|
let n = this;
|
|
do {
|
|
for (let a of Object.keys(n.bindings)) {
|
|
let o = n.bindings[a];
|
|
o.kind === i && (r[a] = o);
|
|
}
|
|
n = n.parent;
|
|
} while (n);
|
|
}
|
|
return r;
|
|
}, "getAllBindingsOfKind"), Object.defineProperties(Tn.prototype, {
|
|
parentBlock: {
|
|
configurable: !0,
|
|
enumerable: !0,
|
|
get() {
|
|
return this.path.parent;
|
|
}
|
|
},
|
|
hub: {
|
|
configurable: !0,
|
|
enumerable: !0,
|
|
get() {
|
|
return this.path.hub;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@jridgewell/set-array/dist/set-array.umd.js
|
|
var K7 = E((zy, H7) => {
|
|
(function(e, t) {
|
|
typeof zy == "object" && typeof H7 < "u" ? t(zy) : typeof define == "function" && define.amd ? define(["exports"], t) : (e = typeof globalThis <
|
|
"u" ? globalThis : e || self, t(e.setArray = {}));
|
|
})(zy, function(e) {
|
|
"use strict";
|
|
class t {
|
|
static {
|
|
s(this, "SetArray");
|
|
}
|
|
constructor() {
|
|
this._indexes = { __proto__: null }, this.array = [];
|
|
}
|
|
}
|
|
function r(u) {
|
|
return u;
|
|
}
|
|
s(r, "cast");
|
|
function i(u, l) {
|
|
return u._indexes[l];
|
|
}
|
|
s(i, "get");
|
|
function n(u, l) {
|
|
let c = i(u, l);
|
|
if (c !== void 0)
|
|
return c;
|
|
let { array: f, _indexes: m } = u, h = f.push(l);
|
|
return m[l] = h - 1;
|
|
}
|
|
s(n, "put");
|
|
function a(u) {
|
|
let { array: l, _indexes: c } = u;
|
|
if (l.length === 0)
|
|
return;
|
|
let f = l.pop();
|
|
c[f] = void 0;
|
|
}
|
|
s(a, "pop");
|
|
function o(u, l) {
|
|
let c = i(u, l);
|
|
if (c === void 0)
|
|
return;
|
|
let { array: f, _indexes: m } = u;
|
|
for (let h = c + 1; h < f.length; h++) {
|
|
let d = f[h];
|
|
f[h - 1] = d, m[d]--;
|
|
}
|
|
m[l] = void 0, f.pop();
|
|
}
|
|
s(o, "remove"), e.SetArray = t, e.get = i, e.pop = a, e.put = n, e.remove = o, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js
|
|
var PC = E((Gy, z7) => {
|
|
(function(e, t) {
|
|
typeof Gy == "object" && typeof z7 < "u" ? t(Gy) : typeof define == "function" && define.amd ? define(["exports"], t) : (e = typeof globalThis <
|
|
"u" ? globalThis : e || self, t(e.sourcemapCodec = {}));
|
|
})(Gy, function(e) {
|
|
"use strict";
|
|
let i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = new Uint8Array(64), a = new Uint8Array(128);
|
|
for (let j = 0; j < i.length; j++) {
|
|
let K = i.charCodeAt(j);
|
|
n[j] = K, a[K] = j;
|
|
}
|
|
function o(j, K) {
|
|
let R = 0, ee = 0, re = 0;
|
|
do {
|
|
let Z = j.next();
|
|
re = a[Z], R |= (re & 31) << ee, ee += 5;
|
|
} while (re & 32);
|
|
let te = R & 1;
|
|
return R >>>= 1, te && (R = -2147483648 | -R), K + R;
|
|
}
|
|
s(o, "decodeInteger");
|
|
function u(j, K, R) {
|
|
let ee = K - R;
|
|
ee = ee < 0 ? -ee << 1 | 1 : ee << 1;
|
|
do {
|
|
let re = ee & 31;
|
|
ee >>>= 5, ee > 0 && (re |= 32), j.write(n[re]);
|
|
} while (ee > 0);
|
|
return K;
|
|
}
|
|
s(u, "encodeInteger");
|
|
function l(j, K) {
|
|
return j.pos >= K ? !1 : j.peek() !== 44;
|
|
}
|
|
s(l, "hasMoreVlq");
|
|
let c = 1024 * 16, f = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
|
|
decode(j) {
|
|
return Buffer.from(j.buffer, j.byteOffset, j.byteLength).toString();
|
|
}
|
|
} : {
|
|
decode(j) {
|
|
let K = "";
|
|
for (let R = 0; R < j.length; R++)
|
|
K += String.fromCharCode(j[R]);
|
|
return K;
|
|
}
|
|
};
|
|
class m {
|
|
static {
|
|
s(this, "StringWriter");
|
|
}
|
|
constructor() {
|
|
this.pos = 0, this.out = "", this.buffer = new Uint8Array(c);
|
|
}
|
|
write(K) {
|
|
let { buffer: R } = this;
|
|
R[this.pos++] = K, this.pos === c && (this.out += f.decode(R), this.pos = 0);
|
|
}
|
|
flush() {
|
|
let { buffer: K, out: R, pos: ee } = this;
|
|
return ee > 0 ? R + f.decode(K.subarray(0, ee)) : R;
|
|
}
|
|
}
|
|
class h {
|
|
static {
|
|
s(this, "StringReader");
|
|
}
|
|
constructor(K) {
|
|
this.pos = 0, this.buffer = K;
|
|
}
|
|
next() {
|
|
return this.buffer.charCodeAt(this.pos++);
|
|
}
|
|
peek() {
|
|
return this.buffer.charCodeAt(this.pos);
|
|
}
|
|
indexOf(K) {
|
|
let { buffer: R, pos: ee } = this, re = R.indexOf(K, ee);
|
|
return re === -1 ? R.length : re;
|
|
}
|
|
}
|
|
let d = [];
|
|
function y(j) {
|
|
let { length: K } = j, R = new h(j), ee = [], re = [], te = 0;
|
|
for (; R.pos < K; R.pos++) {
|
|
te = o(R, te);
|
|
let Z = o(R, 0);
|
|
if (!l(R, K)) {
|
|
let Be = re.pop();
|
|
Be[2] = te, Be[3] = Z;
|
|
continue;
|
|
}
|
|
let ie = o(R, 0), he = o(R, 0) & 1 ? [te, Z, 0, 0, ie, o(R, 0)] : [te, Z, 0, 0, ie], ye = d;
|
|
if (l(R, K)) {
|
|
ye = [];
|
|
do {
|
|
let Be = o(R, 0);
|
|
ye.push(Be);
|
|
} while (l(R, K));
|
|
}
|
|
he.vars = ye, ee.push(he), re.push(he);
|
|
}
|
|
return ee;
|
|
}
|
|
s(y, "decodeOriginalScopes");
|
|
function p(j) {
|
|
let K = new m();
|
|
for (let R = 0; R < j.length; )
|
|
R = g(j, R, K, [0]);
|
|
return K.flush();
|
|
}
|
|
s(p, "encodeOriginalScopes");
|
|
function g(j, K, R, ee) {
|
|
let re = j[K], { 0: te, 1: Z, 2: ie, 3: ae, 4: Y, vars: he } = re;
|
|
K > 0 && R.write(44), ee[0] = u(R, te, ee[0]), u(R, Z, 0), u(R, Y, 0);
|
|
let ye = re.length === 6 ? 1 : 0;
|
|
u(R, ye, 0), re.length === 6 && u(R, re[5], 0);
|
|
for (let Be of he)
|
|
u(R, Be, 0);
|
|
for (K++; K < j.length; ) {
|
|
let Be = j[K], { 0: de, 1: be } = Be;
|
|
if (de > ie || de === ie && be >= ae)
|
|
break;
|
|
K = g(j, K, R, ee);
|
|
}
|
|
return R.write(44), ee[0] = u(R, ie, ee[0]), u(R, ae, 0), K;
|
|
}
|
|
s(g, "_encodeOriginalScopes");
|
|
function b(j) {
|
|
let { length: K } = j, R = new h(j), ee = [], re = [], te = 0, Z = 0, ie = 0, ae = 0, Y = 0, he = 0, ye = 0, Be = 0;
|
|
do {
|
|
let de = R.indexOf(";"), be = 0;
|
|
for (; R.pos < de; R.pos++) {
|
|
if (be = o(R, be), !l(R, de)) {
|
|
let Vt = re.pop();
|
|
Vt[2] = te, Vt[3] = be;
|
|
continue;
|
|
}
|
|
let Me = o(R, 0), gt = Me & 1, Dt = Me & 2, $t = Me & 4, vr = null, Ir = d, Er;
|
|
if (gt) {
|
|
let Vt = o(R, Z);
|
|
ie = o(R, Z === Vt ? ie : 0), Z = Vt, Er = [te, be, 0, 0, Vt, ie];
|
|
} else
|
|
Er = [te, be, 0, 0];
|
|
if (Er.isScope = !!$t, Dt) {
|
|
let Vt = ae, qr = Y;
|
|
ae = o(R, ae);
|
|
let ci = Vt === ae;
|
|
Y = o(R, ci ? Y : 0), he = o(R, ci && qr === Y ? he : 0), vr = [ae, Y, he];
|
|
}
|
|
if (Er.callsite = vr, l(R, de)) {
|
|
Ir = [];
|
|
do {
|
|
ye = te, Be = be;
|
|
let Vt = o(R, 0), qr;
|
|
if (Vt < -1) {
|
|
qr = [[o(R, 0)]];
|
|
for (let ci = -1; ci > Vt; ci--) {
|
|
let pa = ye;
|
|
ye = o(R, ye), Be = o(R, ye === pa ? Be : 0);
|
|
let $i = o(R, 0);
|
|
qr.push([$i, ye, Be]);
|
|
}
|
|
} else
|
|
qr = [[Vt]];
|
|
Ir.push(qr);
|
|
} while (l(R, de));
|
|
}
|
|
Er.bindings = Ir, ee.push(Er), re.push(Er);
|
|
}
|
|
te++, R.pos = de + 1;
|
|
} while (R.pos < K);
|
|
return ee;
|
|
}
|
|
s(b, "decodeGeneratedRanges");
|
|
function D(j) {
|
|
if (j.length === 0)
|
|
return "";
|
|
let K = new m();
|
|
for (let R = 0; R < j.length; )
|
|
R = v(j, R, K, [0, 0, 0, 0, 0, 0, 0]);
|
|
return K.flush();
|
|
}
|
|
s(D, "encodeGeneratedRanges");
|
|
function v(j, K, R, ee) {
|
|
let re = j[K], { 0: te, 1: Z, 2: ie, 3: ae, isScope: Y, callsite: he, bindings: ye } = re;
|
|
ee[0] < te ? (S(R, ee[0], te), ee[0] = te, ee[1] = 0) : K > 0 && R.write(44), ee[1] = u(R, re[1], ee[1]);
|
|
let Be = (re.length === 6 ? 1 : 0) | (he ? 2 : 0) | (Y ? 4 : 0);
|
|
if (u(R, Be, 0), re.length === 6) {
|
|
let { 4: de, 5: be } = re;
|
|
de !== ee[2] && (ee[3] = 0), ee[2] = u(R, de, ee[2]), ee[3] = u(R, be, ee[3]);
|
|
}
|
|
if (he) {
|
|
let { 0: de, 1: be, 2: Me } = re.callsite;
|
|
de !== ee[4] ? (ee[5] = 0, ee[6] = 0) : be !== ee[5] && (ee[6] = 0), ee[4] = u(R, de, ee[4]), ee[5] = u(R, be, ee[5]), ee[6] = u(R, Me,
|
|
ee[6]);
|
|
}
|
|
if (ye)
|
|
for (let de of ye) {
|
|
de.length > 1 && u(R, -de.length, 0);
|
|
let be = de[0][0];
|
|
u(R, be, 0);
|
|
let Me = te, gt = Z;
|
|
for (let Dt = 1; Dt < de.length; Dt++) {
|
|
let $t = de[Dt];
|
|
Me = u(R, $t[1], Me), gt = u(R, $t[2], gt), u(R, $t[0], 0);
|
|
}
|
|
}
|
|
for (K++; K < j.length; ) {
|
|
let de = j[K], { 0: be, 1: Me } = de;
|
|
if (be > ie || be === ie && Me >= ae)
|
|
break;
|
|
K = v(j, K, R, ee);
|
|
}
|
|
return ee[0] < ie ? (S(R, ee[0], ie), ee[0] = ie, ee[1] = 0) : R.write(44), ee[1] = u(R, ae, ee[1]), K;
|
|
}
|
|
s(v, "_encodeGeneratedRanges");
|
|
function S(j, K, R) {
|
|
do
|
|
j.write(59);
|
|
while (++K < R);
|
|
}
|
|
s(S, "catchupLine");
|
|
function C(j) {
|
|
let { length: K } = j, R = new h(j), ee = [], re = 0, te = 0, Z = 0, ie = 0, ae = 0;
|
|
do {
|
|
let Y = R.indexOf(";"), he = [], ye = !0, Be = 0;
|
|
for (re = 0; R.pos < Y; ) {
|
|
let de;
|
|
re = o(R, re), re < Be && (ye = !1), Be = re, l(R, Y) ? (te = o(R, te), Z = o(R, Z), ie = o(R, ie), l(R, Y) ? (ae = o(R, ae), de =
|
|
[re, te, Z, ie, ae]) : de = [re, te, Z, ie]) : de = [re], he.push(de), R.pos++;
|
|
}
|
|
ye || O(he), ee.push(he), R.pos = Y + 1;
|
|
} while (R.pos <= K);
|
|
return ee;
|
|
}
|
|
s(C, "decode");
|
|
function O(j) {
|
|
j.sort(k);
|
|
}
|
|
s(O, "sort");
|
|
function k(j, K) {
|
|
return j[0] - K[0];
|
|
}
|
|
s(k, "sortComparator");
|
|
function U(j) {
|
|
let K = new m(), R = 0, ee = 0, re = 0, te = 0;
|
|
for (let Z = 0; Z < j.length; Z++) {
|
|
let ie = j[Z];
|
|
if (Z > 0 && K.write(59), ie.length === 0)
|
|
continue;
|
|
let ae = 0;
|
|
for (let Y = 0; Y < ie.length; Y++) {
|
|
let he = ie[Y];
|
|
Y > 0 && K.write(44), ae = u(K, he[0], ae), he.length !== 1 && (R = u(K, he[1], R), ee = u(K, he[2], ee), re = u(K, he[3], re), he.
|
|
length !== 4 && (te = u(K, he[4], te)));
|
|
}
|
|
}
|
|
return K.flush();
|
|
}
|
|
s(U, "encode"), e.decode = C, e.decodeGeneratedRanges = b, e.decodeOriginalScopes = y, e.encode = U, e.encodeGeneratedRanges = D, e.encodeOriginalScopes =
|
|
p, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js
|
|
var G7 = E((FC, IC) => {
|
|
(function(e, t) {
|
|
typeof FC == "object" && typeof IC < "u" ? IC.exports = t() : typeof define == "function" && define.amd ? define(t) : (e = typeof globalThis <
|
|
"u" ? globalThis : e || self, e.resolveURI = t());
|
|
})(FC, function() {
|
|
"use strict";
|
|
let e = /^[\w+.-]+:\/\//, t = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/, r = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
|
|
function i(g) {
|
|
return e.test(g);
|
|
}
|
|
s(i, "isAbsoluteUrl");
|
|
function n(g) {
|
|
return g.startsWith("//");
|
|
}
|
|
s(n, "isSchemeRelativeUrl");
|
|
function a(g) {
|
|
return g.startsWith("/");
|
|
}
|
|
s(a, "isAbsolutePath");
|
|
function o(g) {
|
|
return g.startsWith("file:");
|
|
}
|
|
s(o, "isFileUrl");
|
|
function u(g) {
|
|
return /^[.?#]/.test(g);
|
|
}
|
|
s(u, "isRelative");
|
|
function l(g) {
|
|
let b = t.exec(g);
|
|
return f(b[1], b[2] || "", b[3], b[4] || "", b[5] || "/", b[6] || "", b[7] || "");
|
|
}
|
|
s(l, "parseAbsoluteUrl");
|
|
function c(g) {
|
|
let b = r.exec(g), D = b[2];
|
|
return f("file:", "", b[1] || "", "", a(D) ? D : "/" + D, b[3] || "", b[4] || "");
|
|
}
|
|
s(c, "parseFileUrl");
|
|
function f(g, b, D, v, S, C, O) {
|
|
return {
|
|
scheme: g,
|
|
user: b,
|
|
host: D,
|
|
port: v,
|
|
path: S,
|
|
query: C,
|
|
hash: O,
|
|
type: 7
|
|
};
|
|
}
|
|
s(f, "makeUrl");
|
|
function m(g) {
|
|
if (n(g)) {
|
|
let D = l("http:" + g);
|
|
return D.scheme = "", D.type = 6, D;
|
|
}
|
|
if (a(g)) {
|
|
let D = l("http://foo.com" + g);
|
|
return D.scheme = "", D.host = "", D.type = 5, D;
|
|
}
|
|
if (o(g))
|
|
return c(g);
|
|
if (i(g))
|
|
return l(g);
|
|
let b = l("http://foo.com/" + g);
|
|
return b.scheme = "", b.host = "", b.type = g ? g.startsWith("?") ? 3 : g.startsWith("#") ? 2 : 4 : 1, b;
|
|
}
|
|
s(m, "parseUrl");
|
|
function h(g) {
|
|
if (g.endsWith("/.."))
|
|
return g;
|
|
let b = g.lastIndexOf("/");
|
|
return g.slice(0, b + 1);
|
|
}
|
|
s(h, "stripPathFilename");
|
|
function d(g, b) {
|
|
y(b, b.type), g.path === "/" ? g.path = b.path : g.path = h(b.path) + g.path;
|
|
}
|
|
s(d, "mergePaths");
|
|
function y(g, b) {
|
|
let D = b <= 4, v = g.path.split("/"), S = 1, C = 0, O = !1;
|
|
for (let U = 1; U < v.length; U++) {
|
|
let j = v[U];
|
|
if (!j) {
|
|
O = !0;
|
|
continue;
|
|
}
|
|
if (O = !1, j !== ".") {
|
|
if (j === "..") {
|
|
C ? (O = !0, C--, S--) : D && (v[S++] = j);
|
|
continue;
|
|
}
|
|
v[S++] = j, C++;
|
|
}
|
|
}
|
|
let k = "";
|
|
for (let U = 1; U < S; U++)
|
|
k += "/" + v[U];
|
|
(!k || O && !k.endsWith("/..")) && (k += "/"), g.path = k;
|
|
}
|
|
s(y, "normalizePath");
|
|
function p(g, b) {
|
|
if (!g && !b)
|
|
return "";
|
|
let D = m(g), v = D.type;
|
|
if (b && v !== 7) {
|
|
let C = m(b), O = C.type;
|
|
switch (v) {
|
|
case 1:
|
|
D.hash = C.hash;
|
|
// fall through
|
|
case 2:
|
|
D.query = C.query;
|
|
// fall through
|
|
case 3:
|
|
case 4:
|
|
d(D, C);
|
|
// fall through
|
|
case 5:
|
|
D.user = C.user, D.host = C.host, D.port = C.port;
|
|
// fall through
|
|
case 6:
|
|
D.scheme = C.scheme;
|
|
}
|
|
O > v && (v = O);
|
|
}
|
|
y(D, v);
|
|
let S = D.query + D.hash;
|
|
switch (v) {
|
|
// This is impossible, because of the empty checks at the start of the function.
|
|
// case UrlType.Empty:
|
|
case 2:
|
|
case 3:
|
|
return S;
|
|
case 4: {
|
|
let C = D.path.slice(1);
|
|
return C ? u(b || g) && !u(C) ? "./" + C + S : C + S : S || ".";
|
|
}
|
|
case 5:
|
|
return D.path + S;
|
|
default:
|
|
return D.scheme + "//" + D.user + D.host + D.port + D.path + S;
|
|
}
|
|
}
|
|
return s(p, "resolve"), p;
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js
|
|
var Xy = E((Jy, J7) => {
|
|
(function(e, t) {
|
|
typeof Jy == "object" && typeof J7 < "u" ? t(Jy, PC(), G7()) : typeof define == "function" && define.amd ? define(["exports", "@jridgewe\
|
|
ll/sourcemap-codec", "@jridgewell/resolve-uri"], t) : (e = typeof globalThis < "u" ? globalThis : e || self, t(e.traceMapping = {}, e.sourcemapCodec,
|
|
e.resolveURI));
|
|
})(Jy, function(e, t, r) {
|
|
"use strict";
|
|
function i(J, se) {
|
|
return se && !se.endsWith("/") && (se += "/"), r(J, se);
|
|
}
|
|
s(i, "resolve");
|
|
function n(J) {
|
|
if (!J)
|
|
return "";
|
|
let se = J.lastIndexOf("/");
|
|
return J.slice(0, se + 1);
|
|
}
|
|
s(n, "stripFilename");
|
|
let a = 0, o = 1, u = 2, l = 3, c = 4, f = 1, m = 2;
|
|
function h(J, se) {
|
|
let le = d(J, 0);
|
|
if (le === J.length)
|
|
return J;
|
|
se || (J = J.slice());
|
|
for (let pe = le; pe < J.length; pe = d(J, pe + 1))
|
|
J[pe] = p(J[pe], se);
|
|
return J;
|
|
}
|
|
s(h, "maybeSort");
|
|
function d(J, se) {
|
|
for (let le = se; le < J.length; le++)
|
|
if (!y(J[le]))
|
|
return le;
|
|
return J.length;
|
|
}
|
|
s(d, "nextUnsortedSegmentLine");
|
|
function y(J) {
|
|
for (let se = 1; se < J.length; se++)
|
|
if (J[se][a] < J[se - 1][a])
|
|
return !1;
|
|
return !0;
|
|
}
|
|
s(y, "isSorted");
|
|
function p(J, se) {
|
|
return se || (J = J.slice()), J.sort(g);
|
|
}
|
|
s(p, "sortSegments");
|
|
function g(J, se) {
|
|
return J[a] - se[a];
|
|
}
|
|
s(g, "sortComparator");
|
|
let b = !1;
|
|
function D(J, se, le, pe) {
|
|
for (; le <= pe; ) {
|
|
let Pe = le + (pe - le >> 1), Ae = J[Pe][a] - se;
|
|
if (Ae === 0)
|
|
return b = !0, Pe;
|
|
Ae < 0 ? le = Pe + 1 : pe = Pe - 1;
|
|
}
|
|
return b = !1, le - 1;
|
|
}
|
|
s(D, "binarySearch");
|
|
function v(J, se, le) {
|
|
for (let pe = le + 1; pe < J.length && J[pe][a] === se; le = pe++)
|
|
;
|
|
return le;
|
|
}
|
|
s(v, "upperBound");
|
|
function S(J, se, le) {
|
|
for (let pe = le - 1; pe >= 0 && J[pe][a] === se; le = pe--)
|
|
;
|
|
return le;
|
|
}
|
|
s(S, "lowerBound");
|
|
function C() {
|
|
return {
|
|
lastKey: -1,
|
|
lastNeedle: -1,
|
|
lastIndex: -1
|
|
};
|
|
}
|
|
s(C, "memoizedState");
|
|
function O(J, se, le, pe) {
|
|
let { lastKey: Pe, lastNeedle: Ae, lastIndex: We } = le, ot = 0, $e = J.length - 1;
|
|
if (pe === Pe) {
|
|
if (se === Ae)
|
|
return b = We !== -1 && J[We][a] === se, We;
|
|
se >= Ae ? ot = We === -1 ? 0 : We : $e = We;
|
|
}
|
|
return le.lastKey = pe, le.lastNeedle = se, le.lastIndex = D(J, se, ot, $e);
|
|
}
|
|
s(O, "memoizedBinarySearch");
|
|
function k(J, se) {
|
|
let le = se.map(j);
|
|
for (let pe = 0; pe < J.length; pe++) {
|
|
let Pe = J[pe];
|
|
for (let Ae = 0; Ae < Pe.length; Ae++) {
|
|
let We = Pe[Ae];
|
|
if (We.length === 1)
|
|
continue;
|
|
let ot = We[o], $e = We[u], Je = We[l], Bt = le[ot], dt = Bt[$e] || (Bt[$e] = []), pt = se[ot], br = v(dt, Je, O(dt, Je, pt, $e));
|
|
pt.lastIndex = ++br, U(dt, br, [Je, pe, We[a]]);
|
|
}
|
|
}
|
|
return le;
|
|
}
|
|
s(k, "buildBySources");
|
|
function U(J, se, le) {
|
|
for (let pe = J.length; pe > se; pe--)
|
|
J[pe] = J[pe - 1];
|
|
J[se] = le;
|
|
}
|
|
s(U, "insert");
|
|
function j() {
|
|
return { __proto__: null };
|
|
}
|
|
s(j, "buildNullArray");
|
|
let K = /* @__PURE__ */ s(function(J, se) {
|
|
let le = R(J);
|
|
if (!("sections" in le))
|
|
return new ye(le, se);
|
|
let pe = [], Pe = [], Ae = [], We = [], ot = [];
|
|
ee(le, se, pe, Pe, Ae, We, ot, 0, 0, 1 / 0, 1 / 0);
|
|
let $e = {
|
|
version: 3,
|
|
file: le.file,
|
|
names: We,
|
|
sources: Pe,
|
|
sourcesContent: Ae,
|
|
mappings: pe,
|
|
ignoreList: ot
|
|
};
|
|
return qr($e);
|
|
}, "AnyMap");
|
|
function R(J) {
|
|
return typeof J == "string" ? JSON.parse(J) : J;
|
|
}
|
|
s(R, "parse");
|
|
function ee(J, se, le, pe, Pe, Ae, We, ot, $e, Je, Bt) {
|
|
let { sections: dt } = J;
|
|
for (let pt = 0; pt < dt.length; pt++) {
|
|
let { map: br, offset: Ei } = dt[pt], mn = Je, yn = Bt;
|
|
if (pt + 1 < dt.length) {
|
|
let gn = dt[pt + 1].offset;
|
|
mn = Math.min(Je, ot + gn.line), mn === Je ? yn = Math.min(Bt, $e + gn.column) : mn < Je && (yn = $e + gn.column);
|
|
}
|
|
re(br, se, le, pe, Pe, Ae, We, ot + Ei.line, $e + Ei.column, mn, yn);
|
|
}
|
|
}
|
|
s(ee, "recurse");
|
|
function re(J, se, le, pe, Pe, Ae, We, ot, $e, Je, Bt) {
|
|
let dt = R(J);
|
|
if ("sections" in dt)
|
|
return ee(...arguments);
|
|
let pt = new ye(dt, se), br = pe.length, Ei = Ae.length, mn = be(pt), { resolvedSources: yn, sourcesContent: gn, ignoreList: ha } = pt;
|
|
if (te(pe, yn), te(Ae, pt.names), gn)
|
|
te(Pe, gn);
|
|
else
|
|
for (let X = 0; X < yn.length; X++)
|
|
Pe.push(null);
|
|
if (ha)
|
|
for (let X = 0; X < ha.length; X++)
|
|
We.push(ha[X] + br);
|
|
for (let X = 0; X < mn.length; X++) {
|
|
let Q = ot + X;
|
|
if (Q > Je)
|
|
return;
|
|
let me = Z(le, Q), Xe = X === 0 ? $e : 0, Zr = mn[X];
|
|
for (let yo = 0; yo < Zr.length; yo++) {
|
|
let ms = Zr[yo], Vp = Xe + ms[a];
|
|
if (Q === Je && Vp >= Bt)
|
|
return;
|
|
if (ms.length === 1) {
|
|
me.push([Vp]);
|
|
continue;
|
|
}
|
|
let tF = br + ms[o], rF = ms[u], iF = ms[l];
|
|
me.push(ms.length === 4 ? [Vp, tF, rF, iF] : [Vp, tF, rF, iF, Ei + ms[c]]);
|
|
}
|
|
}
|
|
}
|
|
s(re, "addSection");
|
|
function te(J, se) {
|
|
for (let le = 0; le < se.length; le++)
|
|
J.push(se[le]);
|
|
}
|
|
s(te, "append");
|
|
function Z(J, se) {
|
|
for (let le = J.length; le <= se; le++)
|
|
J[le] = [];
|
|
return J[se];
|
|
}
|
|
s(Z, "getLine");
|
|
let ie = "`line` must be greater than 0 (lines start at line 1)", ae = "`column` must be greater than or equal to 0 (columns start at co\
|
|
lumn 0)", Y = -1, he = 1;
|
|
class ye {
|
|
static {
|
|
s(this, "TraceMap");
|
|
}
|
|
constructor(se, le) {
|
|
let pe = typeof se == "string";
|
|
if (!pe && se._decodedMemo)
|
|
return se;
|
|
let Pe = pe ? JSON.parse(se) : se, { version: Ae, file: We, names: ot, sourceRoot: $e, sources: Je, sourcesContent: Bt } = Pe;
|
|
this.version = Ae, this.file = We, this.names = ot || [], this.sourceRoot = $e, this.sources = Je, this.sourcesContent = Bt, this.ignoreList =
|
|
Pe.ignoreList || Pe.x_google_ignoreList || void 0;
|
|
let dt = i($e || "", n(le));
|
|
this.resolvedSources = Je.map((br) => i(br || "", dt));
|
|
let { mappings: pt } = Pe;
|
|
typeof pt == "string" ? (this._encoded = pt, this._decoded = void 0) : (this._encoded = void 0, this._decoded = h(pt, pe)), this._decodedMemo =
|
|
C(), this._bySources = void 0, this._bySourceMemos = void 0;
|
|
}
|
|
}
|
|
function Be(J) {
|
|
return J;
|
|
}
|
|
s(Be, "cast");
|
|
function de(J) {
|
|
var se, le;
|
|
return (se = (le = J)._encoded) !== null && se !== void 0 ? se : le._encoded = t.encode(J._decoded);
|
|
}
|
|
s(de, "encodedMappings");
|
|
function be(J) {
|
|
var se;
|
|
return (se = J)._decoded || (se._decoded = t.decode(J._encoded));
|
|
}
|
|
s(be, "decodedMappings");
|
|
function Me(J, se, le) {
|
|
let pe = be(J);
|
|
if (se >= pe.length)
|
|
return null;
|
|
let Pe = pe[se], Ae = ze(Pe, J._decodedMemo, se, le, he);
|
|
return Ae === -1 ? null : Pe[Ae];
|
|
}
|
|
s(Me, "traceSegment");
|
|
function gt(J, se) {
|
|
let { line: le, column: pe, bias: Pe } = se;
|
|
if (le--, le < 0)
|
|
throw new Error(ie);
|
|
if (pe < 0)
|
|
throw new Error(ae);
|
|
let Ae = be(J);
|
|
if (le >= Ae.length)
|
|
return Ce(null, null, null, null);
|
|
let We = Ae[le], ot = ze(We, J._decodedMemo, le, pe, Pe || he);
|
|
if (ot === -1)
|
|
return Ce(null, null, null, null);
|
|
let $e = We[ot];
|
|
if ($e.length === 1)
|
|
return Ce(null, null, null, null);
|
|
let { names: Je, resolvedSources: Bt } = J;
|
|
return Ce(Bt[$e[o]], $e[u] + 1, $e[l], $e.length === 5 ? Je[$e[c]] : null);
|
|
}
|
|
s(gt, "originalPositionFor");
|
|
function Dt(J, se) {
|
|
let { source: le, line: pe, column: Pe, bias: Ae } = se;
|
|
return Ht(J, le, pe, Pe, Ae || he, !1);
|
|
}
|
|
s(Dt, "generatedPositionFor");
|
|
function $t(J, se) {
|
|
let { source: le, line: pe, column: Pe, bias: Ae } = se;
|
|
return Ht(J, le, pe, Pe, Ae || Y, !0);
|
|
}
|
|
s($t, "allGeneratedPositionsFor");
|
|
function vr(J, se) {
|
|
let le = be(J), { names: pe, resolvedSources: Pe } = J;
|
|
for (let Ae = 0; Ae < le.length; Ae++) {
|
|
let We = le[Ae];
|
|
for (let ot = 0; ot < We.length; ot++) {
|
|
let $e = We[ot], Je = Ae + 1, Bt = $e[0], dt = null, pt = null, br = null, Ei = null;
|
|
$e.length !== 1 && (dt = Pe[$e[1]], pt = $e[2] + 1, br = $e[3]), $e.length === 5 && (Ei = pe[$e[4]]), se({
|
|
generatedLine: Je,
|
|
generatedColumn: Bt,
|
|
source: dt,
|
|
originalLine: pt,
|
|
originalColumn: br,
|
|
name: Ei
|
|
});
|
|
}
|
|
}
|
|
}
|
|
s(vr, "eachMapping");
|
|
function Ir(J, se) {
|
|
let { sources: le, resolvedSources: pe } = J, Pe = le.indexOf(se);
|
|
return Pe === -1 && (Pe = pe.indexOf(se)), Pe;
|
|
}
|
|
s(Ir, "sourceIndex");
|
|
function Er(J, se) {
|
|
let { sourcesContent: le } = J;
|
|
if (le == null)
|
|
return null;
|
|
let pe = Ir(J, se);
|
|
return pe === -1 ? null : le[pe];
|
|
}
|
|
s(Er, "sourceContentFor");
|
|
function Vt(J, se) {
|
|
let { ignoreList: le } = J;
|
|
if (le == null)
|
|
return !1;
|
|
let pe = Ir(J, se);
|
|
return pe === -1 ? !1 : le.includes(pe);
|
|
}
|
|
s(Vt, "isIgnored");
|
|
function qr(J, se) {
|
|
let le = new ye($i(J, []), se);
|
|
return le._decoded = J.mappings, le;
|
|
}
|
|
s(qr, "presortedDecodedMap");
|
|
function ci(J) {
|
|
return $i(J, be(J));
|
|
}
|
|
s(ci, "decodedMap");
|
|
function pa(J) {
|
|
return $i(J, de(J));
|
|
}
|
|
s(pa, "encodedMap");
|
|
function $i(J, se) {
|
|
return {
|
|
version: J.version,
|
|
file: J.file,
|
|
names: J.names,
|
|
sourceRoot: J.sourceRoot,
|
|
sources: J.sources,
|
|
sourcesContent: J.sourcesContent,
|
|
mappings: se,
|
|
ignoreList: J.ignoreList || J.x_google_ignoreList
|
|
};
|
|
}
|
|
s($i, "clone");
|
|
function Ce(J, se, le, pe) {
|
|
return { source: J, line: se, column: le, name: pe };
|
|
}
|
|
s(Ce, "OMapping");
|
|
function ge(J, se) {
|
|
return { line: J, column: se };
|
|
}
|
|
s(ge, "GMapping");
|
|
function ze(J, se, le, pe, Pe) {
|
|
let Ae = O(J, pe, se, le);
|
|
return b ? Ae = (Pe === Y ? v : S)(J, pe, Ae) : Pe === Y && Ae++, Ae === -1 || Ae === J.length ? -1 : Ae;
|
|
}
|
|
s(ze, "traceSegmentInternal");
|
|
function Ft(J, se, le, pe, Pe) {
|
|
let Ae = ze(J, se, le, pe, he);
|
|
if (!b && Pe === Y && Ae++, Ae === -1 || Ae === J.length)
|
|
return [];
|
|
let We = b ? pe : J[Ae][a];
|
|
b || (Ae = S(J, We, Ae));
|
|
let ot = v(J, We, Ae), $e = [];
|
|
for (; Ae <= ot; Ae++) {
|
|
let Je = J[Ae];
|
|
$e.push(ge(Je[f] + 1, Je[m]));
|
|
}
|
|
return $e;
|
|
}
|
|
s(Ft, "sliceGeneratedPositions");
|
|
function Ht(J, se, le, pe, Pe, Ae) {
|
|
var We;
|
|
if (le--, le < 0)
|
|
throw new Error(ie);
|
|
if (pe < 0)
|
|
throw new Error(ae);
|
|
let { sources: ot, resolvedSources: $e } = J, Je = ot.indexOf(se);
|
|
if (Je === -1 && (Je = $e.indexOf(se)), Je === -1)
|
|
return Ae ? [] : ge(null, null);
|
|
let dt = ((We = J)._bySources || (We._bySources = k(be(J), J._bySourceMemos = ot.map(C))))[Je][le];
|
|
if (dt == null)
|
|
return Ae ? [] : ge(null, null);
|
|
let pt = J._bySourceMemos[Je];
|
|
if (Ae)
|
|
return Ft(dt, pt, le, pe, Pe);
|
|
let br = ze(dt, pt, le, pe, Pe);
|
|
if (br === -1)
|
|
return ge(null, null);
|
|
let Ei = dt[br];
|
|
return ge(Ei[f] + 1, Ei[m]);
|
|
}
|
|
s(Ht, "generatedPosition"), e.AnyMap = K, e.GREATEST_LOWER_BOUND = he, e.LEAST_UPPER_BOUND = Y, e.TraceMap = ye, e.allGeneratedPositionsFor =
|
|
$t, e.decodedMap = ci, e.decodedMappings = be, e.eachMapping = vr, e.encodedMap = pa, e.encodedMappings = de, e.generatedPositionFor = Dt,
|
|
e.isIgnored = Vt, e.originalPositionFor = gt, e.presortedDecodedMap = qr, e.sourceContentFor = Er, e.traceSegment = Me;
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js
|
|
var OC = E((Yy, X7) => {
|
|
(function(e, t) {
|
|
typeof Yy == "object" && typeof X7 < "u" ? t(Yy, K7(), PC(), Xy()) : typeof define == "function" && define.amd ? define(["exports", "@jr\
|
|
idgewell/set-array", "@jridgewell/sourcemap-codec", "@jridgewell/trace-mapping"], t) : (e = typeof globalThis < "u" ? globalThis : e || self,
|
|
t(e.genMapping = {}, e.setArray, e.sourcemapCodec, e.traceMapping));
|
|
})(Yy, function(e, t, r, i) {
|
|
"use strict";
|
|
class f {
|
|
static {
|
|
s(this, "GenMapping");
|
|
}
|
|
constructor({ file: ie, sourceRoot: ae } = {}) {
|
|
this._names = new t.SetArray(), this._sources = new t.SetArray(), this._sourcesContent = [], this._mappings = [], this.file = ie, this.
|
|
sourceRoot = ae, this._ignoreList = new t.SetArray();
|
|
}
|
|
}
|
|
function m(Z) {
|
|
return Z;
|
|
}
|
|
s(m, "cast");
|
|
function h(Z, ie, ae, Y, he, ye, Be, de) {
|
|
return O(!1, Z, ie, ae, Y, he, ye, Be, de);
|
|
}
|
|
s(h, "addSegment");
|
|
function d(Z, ie) {
|
|
return te(!1, Z, ie);
|
|
}
|
|
s(d, "addMapping");
|
|
let y = /* @__PURE__ */ s((Z, ie, ae, Y, he, ye, Be, de) => O(!0, Z, ie, ae, Y, he, ye, Be, de), "maybeAddSegment"), p = /* @__PURE__ */ s(
|
|
(Z, ie) => te(!0, Z, ie), "maybeAddMapping");
|
|
function g(Z, ie, ae) {
|
|
let { _sources: Y, _sourcesContent: he } = Z, ye = t.put(Y, ie);
|
|
he[ye] = ae;
|
|
}
|
|
s(g, "setSourceContent");
|
|
function b(Z, ie, ae = !0) {
|
|
let { _sources: Y, _sourcesContent: he, _ignoreList: ye } = Z, Be = t.put(Y, ie);
|
|
Be === he.length && (he[Be] = null), ae ? t.put(ye, Be) : t.remove(ye, Be);
|
|
}
|
|
s(b, "setIgnore");
|
|
function D(Z) {
|
|
let { _mappings: ie, _sources: ae, _sourcesContent: Y, _names: he, _ignoreList: ye } = Z;
|
|
return K(ie), {
|
|
version: 3,
|
|
file: Z.file || void 0,
|
|
names: he.array,
|
|
sourceRoot: Z.sourceRoot || void 0,
|
|
sources: ae.array,
|
|
sourcesContent: Y,
|
|
mappings: ie,
|
|
ignoreList: ye.array
|
|
};
|
|
}
|
|
s(D, "toDecodedMap");
|
|
function v(Z) {
|
|
let ie = D(Z);
|
|
return Object.assign(Object.assign({}, ie), { mappings: r.encode(ie.mappings) });
|
|
}
|
|
s(v, "toEncodedMap");
|
|
function S(Z) {
|
|
let ie = new i.TraceMap(Z), ae = new f({ file: ie.file, sourceRoot: ie.sourceRoot });
|
|
return R(ae._names, ie.names), R(ae._sources, ie.sources), ae._sourcesContent = ie.sourcesContent || ie.sources.map(() => null), ae._mappings =
|
|
i.decodedMappings(ie), ie.ignoreList && R(ae._ignoreList, ie.ignoreList), ae;
|
|
}
|
|
s(S, "fromMap");
|
|
function C(Z) {
|
|
let ie = [], { _mappings: ae, _sources: Y, _names: he } = Z;
|
|
for (let ye = 0; ye < ae.length; ye++) {
|
|
let Be = ae[ye];
|
|
for (let de = 0; de < Be.length; de++) {
|
|
let be = Be[de], Me = { line: ye + 1, column: be[0] }, gt, Dt, $t;
|
|
be.length !== 1 && (gt = Y.array[be[1]], Dt = { line: be[2] + 1, column: be[3] }, be.length === 5 && ($t = he.array[be[4]])), ie.push(
|
|
{ generated: Me, source: gt, original: Dt, name: $t });
|
|
}
|
|
}
|
|
return ie;
|
|
}
|
|
s(C, "allMappings");
|
|
function O(Z, ie, ae, Y, he, ye, Be, de, be) {
|
|
let { _mappings: Me, _sources: gt, _sourcesContent: Dt, _names: $t } = ie, vr = k(Me, ae), Ir = U(vr, Y);
|
|
if (!he)
|
|
return Z && ee(vr, Ir) ? void 0 : j(vr, Ir, [Y]);
|
|
let Er = t.put(gt, he), Vt = de ? t.put($t, de) : -1;
|
|
if (Er === Dt.length && (Dt[Er] = be ?? null), !(Z && re(vr, Ir, Er, ye, Be, Vt)))
|
|
return j(vr, Ir, de ? [Y, Er, ye, Be, Vt] : [Y, Er, ye, Be]);
|
|
}
|
|
s(O, "addSegmentInternal");
|
|
function k(Z, ie) {
|
|
for (let ae = Z.length; ae <= ie; ae++)
|
|
Z[ae] = [];
|
|
return Z[ie];
|
|
}
|
|
s(k, "getLine");
|
|
function U(Z, ie) {
|
|
let ae = Z.length;
|
|
for (let Y = ae - 1; Y >= 0; ae = Y--) {
|
|
let he = Z[Y];
|
|
if (ie >= he[0])
|
|
break;
|
|
}
|
|
return ae;
|
|
}
|
|
s(U, "getColumnIndex");
|
|
function j(Z, ie, ae) {
|
|
for (let Y = Z.length; Y > ie; Y--)
|
|
Z[Y] = Z[Y - 1];
|
|
Z[ie] = ae;
|
|
}
|
|
s(j, "insert");
|
|
function K(Z) {
|
|
let { length: ie } = Z, ae = ie;
|
|
for (let Y = ae - 1; Y >= 0 && !(Z[Y].length > 0); ae = Y, Y--)
|
|
;
|
|
ae < ie && (Z.length = ae);
|
|
}
|
|
s(K, "removeEmptyFinalLines");
|
|
function R(Z, ie) {
|
|
for (let ae = 0; ae < ie.length; ae++)
|
|
t.put(Z, ie[ae]);
|
|
}
|
|
s(R, "putAll");
|
|
function ee(Z, ie) {
|
|
return ie === 0 ? !0 : Z[ie - 1].length === 1;
|
|
}
|
|
s(ee, "skipSourceless");
|
|
function re(Z, ie, ae, Y, he, ye) {
|
|
if (ie === 0)
|
|
return !1;
|
|
let Be = Z[ie - 1];
|
|
return Be.length === 1 ? !1 : ae === Be[1] && Y === Be[2] && he === Be[3] && ye === (Be.length === 5 ? Be[4] : -1);
|
|
}
|
|
s(re, "skipSource");
|
|
function te(Z, ie, ae) {
|
|
let { generated: Y, source: he, original: ye, name: Be, content: de } = ae;
|
|
return he ? O(Z, ie, Y.line - 1, Y.column, he, ye.line - 1, ye.column, Be, de) : O(Z, ie, Y.line - 1, Y.column, null, null, null, null,
|
|
null);
|
|
}
|
|
s(te, "addMappingInternal"), e.GenMapping = f, e.addMapping = d, e.addSegment = h, e.allMappings = C, e.fromMap = S, e.maybeAddMapping =
|
|
p, e.maybeAddSegment = y, e.setIgnore = b, e.setSourceContent = g, e.toDecodedMap = D, e.toEncodedMap = v, Object.defineProperty(e, "__e\
|
|
sModule", { value: !0 });
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/source-map.js
|
|
var Y7 = E((Zy) => {
|
|
"use strict";
|
|
Object.defineProperty(Zy, "__esModule", {
|
|
value: !0
|
|
});
|
|
Zy.default = void 0;
|
|
var Ua = OC(), kC = Xy(), BC = class {
|
|
static {
|
|
s(this, "SourceMap");
|
|
}
|
|
constructor(t, r) {
|
|
var i;
|
|
this._map = void 0, this._rawMappings = void 0, this._sourceFileName = void 0, this._lastGenLine = 0, this._lastSourceLine = 0, this._lastSourceColumn =
|
|
0, this._inputMap = void 0;
|
|
let n = this._map = new Ua.GenMapping({
|
|
sourceRoot: t.sourceRoot
|
|
});
|
|
if (this._sourceFileName = (i = t.sourceFileName) == null ? void 0 : i.replace(/\\/g, "/"), this._rawMappings = void 0, t.inputSourceMap) {
|
|
this._inputMap = new kC.TraceMap(t.inputSourceMap);
|
|
let o = this._inputMap.resolvedSources;
|
|
if (o.length)
|
|
for (let u = 0; u < o.length; u++) {
|
|
var a;
|
|
(0, Ua.setSourceContent)(n, o[u], (a = this._inputMap.sourcesContent) == null ? void 0 : a[u]);
|
|
}
|
|
}
|
|
if (typeof r == "string" && !t.inputSourceMap)
|
|
(0, Ua.setSourceContent)(n, this._sourceFileName, r);
|
|
else if (typeof r == "object")
|
|
for (let o of Object.keys(r))
|
|
(0, Ua.setSourceContent)(n, o.replace(/\\/g, "/"), r[o]);
|
|
}
|
|
get() {
|
|
return (0, Ua.toEncodedMap)(this._map);
|
|
}
|
|
getDecoded() {
|
|
return (0, Ua.toDecodedMap)(this._map);
|
|
}
|
|
getRawMappings() {
|
|
return this._rawMappings || (this._rawMappings = (0, Ua.allMappings)(this._map));
|
|
}
|
|
mark(t, r, i, n, a, o) {
|
|
var u;
|
|
this._rawMappings = void 0;
|
|
let l;
|
|
if (r != null)
|
|
if (this._inputMap) {
|
|
if (l = (0, kC.originalPositionFor)(this._inputMap, {
|
|
line: r,
|
|
column: i
|
|
}), !l.name && a) {
|
|
let c = (0, kC.originalPositionFor)(this._inputMap, a);
|
|
c.name && (n = c.name);
|
|
}
|
|
} else
|
|
l = {
|
|
source: o?.replace(/\\/g, "/") || this._sourceFileName,
|
|
line: r,
|
|
column: i
|
|
};
|
|
(0, Ua.maybeAddMapping)(this._map, {
|
|
name: n,
|
|
generated: t,
|
|
source: (u = l) == null ? void 0 : u.source,
|
|
original: l
|
|
});
|
|
}
|
|
};
|
|
Zy.default = BC;
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/buffer.js
|
|
var Z7 = E((Qy) => {
|
|
"use strict";
|
|
Object.defineProperty(Qy, "__esModule", {
|
|
value: !0
|
|
});
|
|
Qy.default = void 0;
|
|
var NC = class {
|
|
static {
|
|
s(this, "Buffer");
|
|
}
|
|
constructor(t, r) {
|
|
this._map = null, this._buf = "", this._str = "", this._appendCount = 0, this._last = 0, this._queue = [], this._queueCursor = 0, this.
|
|
_canMarkIdName = !0, this._indentChar = "", this._fastIndentations = [], this._position = {
|
|
line: 1,
|
|
column: 0
|
|
}, this._sourcePosition = {
|
|
identifierName: void 0,
|
|
identifierNamePos: void 0,
|
|
line: void 0,
|
|
column: void 0,
|
|
filename: void 0
|
|
}, this._map = t, this._indentChar = r;
|
|
for (let i = 0; i < 64; i++)
|
|
this._fastIndentations.push(r.repeat(i));
|
|
this._allocQueue();
|
|
}
|
|
_allocQueue() {
|
|
let t = this._queue;
|
|
for (let r = 0; r < 16; r++)
|
|
t.push({
|
|
char: 0,
|
|
repeat: 1,
|
|
line: void 0,
|
|
column: void 0,
|
|
identifierName: void 0,
|
|
identifierNamePos: void 0,
|
|
filename: ""
|
|
});
|
|
}
|
|
_pushQueue(t, r, i, n, a) {
|
|
let o = this._queueCursor;
|
|
o === this._queue.length && this._allocQueue();
|
|
let u = this._queue[o];
|
|
u.char = t, u.repeat = r, u.line = i, u.column = n, u.filename = a, this._queueCursor++;
|
|
}
|
|
_popQueue() {
|
|
if (this._queueCursor === 0)
|
|
throw new Error("Cannot pop from empty queue");
|
|
return this._queue[--this._queueCursor];
|
|
}
|
|
get() {
|
|
this._flush();
|
|
let t = this._map, r = {
|
|
code: (this._buf + this._str).trimRight(),
|
|
decodedMap: t?.getDecoded(),
|
|
get __mergedMap() {
|
|
return this.map;
|
|
},
|
|
get map() {
|
|
let i = t ? t.get() : null;
|
|
return r.map = i, i;
|
|
},
|
|
set map(i) {
|
|
Object.defineProperty(r, "map", {
|
|
value: i,
|
|
writable: !0
|
|
});
|
|
},
|
|
get rawMappings() {
|
|
let i = t?.getRawMappings();
|
|
return r.rawMappings = i, i;
|
|
},
|
|
set rawMappings(i) {
|
|
Object.defineProperty(r, "rawMappings", {
|
|
value: i,
|
|
writable: !0
|
|
});
|
|
}
|
|
};
|
|
return r;
|
|
}
|
|
append(t, r) {
|
|
this._flush(), this._append(t, this._sourcePosition, r);
|
|
}
|
|
appendChar(t) {
|
|
this._flush(), this._appendChar(t, 1, this._sourcePosition);
|
|
}
|
|
queue(t) {
|
|
if (t === 10)
|
|
for (; this._queueCursor !== 0; ) {
|
|
let i = this._queue[this._queueCursor - 1].char;
|
|
if (i !== 32 && i !== 9)
|
|
break;
|
|
this._queueCursor--;
|
|
}
|
|
let r = this._sourcePosition;
|
|
this._pushQueue(t, 1, r.line, r.column, r.filename);
|
|
}
|
|
queueIndentation(t) {
|
|
t !== 0 && this._pushQueue(-1, t, void 0, void 0, void 0);
|
|
}
|
|
_flush() {
|
|
let t = this._queueCursor, r = this._queue;
|
|
for (let i = 0; i < t; i++) {
|
|
let n = r[i];
|
|
this._appendChar(n.char, n.repeat, n);
|
|
}
|
|
this._queueCursor = 0;
|
|
}
|
|
_appendChar(t, r, i) {
|
|
if (this._last = t, t === -1) {
|
|
let n = this._fastIndentations[r];
|
|
n !== void 0 ? this._str += n : this._str += r > 1 ? this._indentChar.repeat(r) : this._indentChar;
|
|
} else
|
|
this._str += r > 1 ? String.fromCharCode(t).repeat(r) : String.fromCharCode(t);
|
|
t !== 10 ? (this._mark(i.line, i.column, i.identifierName, i.identifierNamePos, i.filename), this._position.column += r) : (this._position.
|
|
line++, this._position.column = 0), this._canMarkIdName && (i.identifierName = void 0, i.identifierNamePos = void 0);
|
|
}
|
|
_append(t, r, i) {
|
|
let n = t.length, a = this._position;
|
|
if (this._last = t.charCodeAt(n - 1), ++this._appendCount > 4096 ? (+this._str, this._buf += this._str, this._str = t, this._appendCount =
|
|
0) : this._str += t, !i && !this._map) {
|
|
a.column += n;
|
|
return;
|
|
}
|
|
let {
|
|
column: o,
|
|
identifierName: u,
|
|
identifierNamePos: l,
|
|
filename: c
|
|
} = r, f = r.line;
|
|
(u != null || l != null) && this._canMarkIdName && (r.identifierName = void 0, r.identifierNamePos = void 0);
|
|
let m = t.indexOf(`
|
|
`), h = 0;
|
|
for (m !== 0 && this._mark(f, o, u, l, c); m !== -1; )
|
|
a.line++, a.column = 0, h = m + 1, h < n && f !== void 0 && this._mark(++f, 0, null, null, c), m = t.indexOf(`
|
|
`, h);
|
|
a.column += n - h;
|
|
}
|
|
_mark(t, r, i, n, a) {
|
|
var o;
|
|
(o = this._map) == null || o.mark(this._position, t, r, i, n, a);
|
|
}
|
|
removeTrailingNewline() {
|
|
let t = this._queueCursor;
|
|
t !== 0 && this._queue[t - 1].char === 10 && this._queueCursor--;
|
|
}
|
|
removeLastSemicolon() {
|
|
let t = this._queueCursor;
|
|
t !== 0 && this._queue[t - 1].char === 59 && this._queueCursor--;
|
|
}
|
|
getLastChar() {
|
|
let t = this._queueCursor;
|
|
return t !== 0 ? this._queue[t - 1].char : this._last;
|
|
}
|
|
getNewlineCount() {
|
|
let t = this._queueCursor, r = 0;
|
|
if (t === 0) return this._last === 10 ? 1 : 0;
|
|
for (let i = t - 1; i >= 0 && this._queue[i].char === 10; i--)
|
|
r++;
|
|
return r === t && this._last === 10 ? r + 1 : r;
|
|
}
|
|
endsWithCharAndNewline() {
|
|
let t = this._queue, r = this._queueCursor;
|
|
if (r !== 0)
|
|
return t[r - 1].char !== 10 ? void 0 : r > 1 ? t[r - 2].char : this._last;
|
|
}
|
|
hasContent() {
|
|
return this._queueCursor !== 0 || !!this._last;
|
|
}
|
|
exactSource(t, r) {
|
|
if (!this._map) {
|
|
r();
|
|
return;
|
|
}
|
|
this.source("start", t);
|
|
let i = t.identifierName, n = this._sourcePosition;
|
|
i && (this._canMarkIdName = !1, n.identifierName = i), r(), i && (this._canMarkIdName = !0, n.identifierName = void 0, n.identifierNamePos =
|
|
void 0), this.source("end", t);
|
|
}
|
|
source(t, r) {
|
|
this._map && this._normalizePosition(t, r, 0);
|
|
}
|
|
sourceWithOffset(t, r, i) {
|
|
this._map && this._normalizePosition(t, r, i);
|
|
}
|
|
_normalizePosition(t, r, i) {
|
|
let n = r[t], a = this._sourcePosition;
|
|
n && (a.line = n.line, a.column = Math.max(n.column + i, 0), a.filename = r.filename);
|
|
}
|
|
getCurrentColumn() {
|
|
let t = this._queue, r = this._queueCursor, i = -1, n = 0;
|
|
for (let a = 0; a < r; a++) {
|
|
let o = t[a];
|
|
o.char === 10 && (i = n), n += o.repeat;
|
|
}
|
|
return i === -1 ? this._position.column + n : n - 1 - i;
|
|
}
|
|
getCurrentLine() {
|
|
let t = 0, r = this._queue;
|
|
for (let i = 0; i < this._queueCursor; i++)
|
|
r[i].char === 10 && t++;
|
|
return this._position.line + t;
|
|
}
|
|
};
|
|
Qy.default = NC;
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/node/whitespace.js
|
|
var i5 = E((t0) => {
|
|
"use strict";
|
|
Object.defineProperty(t0, "__esModule", {
|
|
value: !0
|
|
});
|
|
t0.nodes = void 0;
|
|
var AOe = Ve(), {
|
|
FLIPPED_ALIAS_KEYS: _Oe,
|
|
isArrayExpression: POe,
|
|
isAssignmentExpression: e5,
|
|
isBinary: t5,
|
|
isBlockStatement: FOe,
|
|
isCallExpression: r5,
|
|
isFunction: Nd,
|
|
isIdentifier: e0,
|
|
isLiteral: IOe,
|
|
isMemberExpression: MC,
|
|
isObjectExpression: OOe,
|
|
isOptionalCallExpression: kOe,
|
|
isOptionalMemberExpression: BOe,
|
|
isStringLiteral: NOe
|
|
} = AOe;
|
|
function $l(e, t) {
|
|
return e && (MC(e) || BOe(e) ? ($l(e.object, t), e.computed && $l(e.property, t)) : t5(e) || e5(e) ? ($l(e.left, t), $l(e.right, t)) : r5(
|
|
e) || kOe(e) ? (t.hasCall = !0, $l(e.callee, t)) : Nd(e) ? t.hasFunction = !0 : e0(e) && (t.hasHelper = t.hasHelper || e.callee && $s(e.
|
|
callee))), t;
|
|
}
|
|
s($l, "crawlInternal");
|
|
function Q7(e) {
|
|
return $l(e, {
|
|
hasCall: !1,
|
|
hasFunction: !1,
|
|
hasHelper: !1
|
|
});
|
|
}
|
|
s(Q7, "crawl");
|
|
function $s(e) {
|
|
return e ? MC(e) ? $s(e.object) || $s(e.property) : e0(e) ? e.name === "require" || e.name.charCodeAt(0) === 95 : r5(e) ? $s(e.callee) :
|
|
t5(e) || e5(e) ? e0(e.left) && $s(e.left) || $s(e.right) : !1 : !1;
|
|
}
|
|
s($s, "isHelper");
|
|
function MOe(e) {
|
|
return IOe(e) || OOe(e) || POe(e) || e0(e) || MC(e);
|
|
}
|
|
s(MOe, "isType");
|
|
var tu = t0.nodes = {
|
|
AssignmentExpression(e) {
|
|
let t = Q7(e.right);
|
|
if (t.hasCall && t.hasHelper || t.hasFunction)
|
|
return t.hasFunction ? 3 : 2;
|
|
},
|
|
SwitchCase(e, t) {
|
|
return (e.consequent.length || t.cases[0] === e ? 1 : 0) | (!e.consequent.length && t.cases[t.cases.length - 1] === e ? 2 : 0);
|
|
},
|
|
LogicalExpression(e) {
|
|
if (Nd(e.left) || Nd(e.right))
|
|
return 2;
|
|
},
|
|
Literal(e) {
|
|
if (NOe(e) && e.value === "use strict")
|
|
return 2;
|
|
},
|
|
CallExpression(e) {
|
|
if (Nd(e.callee) || $s(e))
|
|
return 3;
|
|
},
|
|
OptionalCallExpression(e) {
|
|
if (Nd(e.callee))
|
|
return 3;
|
|
},
|
|
VariableDeclaration(e) {
|
|
for (let t = 0; t < e.declarations.length; t++) {
|
|
let r = e.declarations[t], i = $s(r.id) && !MOe(r.init);
|
|
if (!i && r.init) {
|
|
let n = Q7(r.init);
|
|
i = $s(r.init) && n.hasCall || n.hasFunction;
|
|
}
|
|
if (i)
|
|
return 3;
|
|
}
|
|
},
|
|
IfStatement(e) {
|
|
if (FOe(e.consequent))
|
|
return 3;
|
|
}
|
|
};
|
|
tu.ObjectProperty = tu.ObjectTypeProperty = tu.ObjectMethod = function(e, t) {
|
|
if (t.properties[0] === e)
|
|
return 1;
|
|
};
|
|
tu.ObjectTypeCallProperty = function(e, t) {
|
|
var r;
|
|
if (t.callProperties[0] === e && !((r = t.properties) != null && r.length))
|
|
return 1;
|
|
};
|
|
tu.ObjectTypeIndexer = function(e, t) {
|
|
var r, i;
|
|
if (t.indexers[0] === e && !((r = t.properties) != null && r.length) && !((i = t.callProperties) != null && i.length))
|
|
return 1;
|
|
};
|
|
tu.ObjectTypeInternalSlot = function(e, t) {
|
|
var r, i, n;
|
|
if (t.internalSlots[0] === e && !((r = t.properties) != null && r.length) && !((i = t.callProperties) != null && i.length) && !((n = t.indexers) !=
|
|
null && n.length))
|
|
return 1;
|
|
};
|
|
[["Function", !0], ["Class", !0], ["Loop", !0], ["LabeledStatement", !0], ["SwitchStatement", !0], ["TryStatement", !0]].forEach(function([
|
|
e, t]) {
|
|
[e].concat(_Oe[e] || []).forEach(function(r) {
|
|
let i = t ? 3 : 0;
|
|
tu[r] = () => i;
|
|
});
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/node/parentheses.js
|
|
var f5 = E((ut) => {
|
|
"use strict";
|
|
Object.defineProperty(ut, "__esModule", {
|
|
value: !0
|
|
});
|
|
ut.AssignmentExpression = h3e;
|
|
ut.Binary = u5;
|
|
ut.BinaryExpression = u3e;
|
|
ut.ClassExpression = f3e;
|
|
ut.ArrowFunctionExpression = ut.ConditionalExpression = c5;
|
|
ut.DoExpression = YOe;
|
|
ut.FunctionExpression = d3e;
|
|
ut.FunctionTypeAnnotation = GOe;
|
|
ut.Identifier = y3e;
|
|
ut.LogicalExpression = m3e;
|
|
ut.NullableTypeAnnotation = zOe;
|
|
ut.ObjectExpression = XOe;
|
|
ut.OptionalIndexedAccessType = QOe;
|
|
ut.OptionalCallExpression = ut.OptionalMemberExpression = p3e;
|
|
ut.SequenceExpression = l3e;
|
|
ut.TSSatisfiesExpression = ut.TSAsExpression = e3e;
|
|
ut.TSConditionalType = t3e;
|
|
ut.TSConstructorType = ut.TSFunctionType = o3e;
|
|
ut.TSInferType = n3e;
|
|
ut.TSInstantiationExpression = a3e;
|
|
ut.TSIntersectionType = i3e;
|
|
ut.UnaryLike = ut.TSTypeAssertion = l5;
|
|
ut.TSTypeOperator = s3e;
|
|
ut.TSUnionType = r3e;
|
|
ut.IntersectionTypeAnnotation = ut.UnionTypeAnnotation = ZOe;
|
|
ut.UpdateExpression = JOe;
|
|
ut.AwaitExpression = ut.YieldExpression = c3e;
|
|
var ROe = Ve(), en = Wa(), {
|
|
isArrayTypeAnnotation: jOe,
|
|
isBinaryExpression: LOe,
|
|
isCallExpression: qOe,
|
|
isForOfStatement: UOe,
|
|
isIndexedAccessType: WOe,
|
|
isMemberExpression: a5,
|
|
isObjectPattern: $Oe,
|
|
isOptionalMemberExpression: VOe,
|
|
isYieldExpression: HOe,
|
|
isStatement: KOe
|
|
} = ROe, n5 = /* @__PURE__ */ new Map([["||", 0], ["??", 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]]);
|
|
function s5(e, t) {
|
|
if (t === "BinaryExpression" || t === "LogicalExpression")
|
|
return n5.get(e.operator);
|
|
if (t === "TSAsExpression" || t === "TSSatisfiesExpression")
|
|
return n5.get("in");
|
|
}
|
|
s(s5, "getBinaryPrecedence");
|
|
function RC(e) {
|
|
return e === "TSAsExpression" || e === "TSSatisfiesExpression" || e === "TSTypeAssertion";
|
|
}
|
|
s(RC, "isTSTypeExpression");
|
|
var r0 = /* @__PURE__ */ s((e, t) => {
|
|
let r = t.type;
|
|
return (r === "ClassDeclaration" || r === "ClassExpression") && t.superClass === e;
|
|
}, "isClassExtendsClause"), i0 = /* @__PURE__ */ s((e, t) => {
|
|
let r = t.type;
|
|
return (r === "MemberExpression" || r === "OptionalMemberExpression") && t.object === e || (r === "CallExpression" || r === "OptionalCal\
|
|
lExpression" || r === "NewExpression") && t.callee === e || r === "TaggedTemplateExpression" && t.tag === e || r === "TSNonNullExpression";
|
|
}, "hasPostfixPart");
|
|
function zOe(e, t) {
|
|
return jOe(t);
|
|
}
|
|
s(zOe, "NullableTypeAnnotation");
|
|
function GOe(e, t, r) {
|
|
let i = t.type;
|
|
return i === "UnionTypeAnnotation" || i === "IntersectionTypeAnnotation" || i === "ArrayTypeAnnotation" || !!(r & en.TokenContext.arrowFlowReturnType);
|
|
}
|
|
s(GOe, "FunctionTypeAnnotation");
|
|
function JOe(e, t) {
|
|
return i0(e, t) || r0(e, t);
|
|
}
|
|
s(JOe, "UpdateExpression");
|
|
function o5(e) {
|
|
return !!(e & (en.TokenContext.expressionStatement | en.TokenContext.arrowBody));
|
|
}
|
|
s(o5, "needsParenBeforeExpressionBrace");
|
|
function XOe(e, t, r) {
|
|
return o5(r);
|
|
}
|
|
s(XOe, "ObjectExpression");
|
|
function YOe(e, t, r) {
|
|
return !e.async && !!(r & en.TokenContext.expressionStatement);
|
|
}
|
|
s(YOe, "DoExpression");
|
|
function u5(e, t) {
|
|
let r = t.type;
|
|
if (e.type === "BinaryExpression" && e.operator === "**" && r === "BinaryExpression" && t.operator === "**")
|
|
return t.left === e;
|
|
if (r0(e, t) || i0(e, t) || r === "UnaryExpression" || r === "SpreadElement" || r === "AwaitExpression")
|
|
return !0;
|
|
let i = s5(t, r);
|
|
if (i != null) {
|
|
let n = s5(e, e.type);
|
|
if (i === n && r === "BinaryExpression" && t.right === e || i > n)
|
|
return !0;
|
|
}
|
|
}
|
|
s(u5, "Binary");
|
|
function ZOe(e, t) {
|
|
let r = t.type;
|
|
return r === "ArrayTypeAnnotation" || r === "NullableTypeAnnotation" || r === "IntersectionTypeAnnotation" || r === "UnionTypeAnnotation";
|
|
}
|
|
s(ZOe, "UnionTypeAnnotation");
|
|
function QOe(e, t) {
|
|
return WOe(t) && t.objectType === e;
|
|
}
|
|
s(QOe, "OptionalIndexedAccessType");
|
|
function e3e(e, t) {
|
|
return (t.type === "AssignmentExpression" || t.type === "AssignmentPattern") && t.left === e || t.type === "BinaryExpression" && (t.operator ===
|
|
"|" || t.operator === "&") && e === t.left ? !0 : u5(e, t);
|
|
}
|
|
s(e3e, "TSAsExpression");
|
|
function t3e(e, t) {
|
|
let r = t.type;
|
|
return r === "TSArrayType" || r === "TSIndexedAccessType" && t.objectType === e || r === "TSOptionalType" || r === "TSTypeOperator" || r ===
|
|
"TSTypeParameter" || (r === "TSIntersectionType" || r === "TSUnionType") && t.types[0] === e || r === "TSConditionalType" && (t.checkType ===
|
|
e || t.extendsType === e);
|
|
}
|
|
s(t3e, "TSConditionalType");
|
|
function r3e(e, t) {
|
|
let r = t.type;
|
|
return r === "TSIntersectionType" || r === "TSTypeOperator" || r === "TSArrayType" || r === "TSIndexedAccessType" && t.objectType === e ||
|
|
r === "TSOptionalType";
|
|
}
|
|
s(r3e, "TSUnionType");
|
|
function i3e(e, t) {
|
|
let r = t.type;
|
|
return r === "TSTypeOperator" || r === "TSArrayType" || r === "TSIndexedAccessType" && t.objectType === e || r === "TSOptionalType";
|
|
}
|
|
s(i3e, "TSIntersectionType");
|
|
function n3e(e, t) {
|
|
let r = t.type;
|
|
return !!(r === "TSArrayType" || r === "TSIndexedAccessType" && t.objectType === e || r === "TSOptionalType" || e.typeParameter.constraint &&
|
|
(r === "TSIntersectionType" || r === "TSUnionType") && t.types[0] === e);
|
|
}
|
|
s(n3e, "TSInferType");
|
|
function s3e(e, t) {
|
|
let r = t.type;
|
|
return r === "TSArrayType" || r === "TSIndexedAccessType" && t.objectType === e || r === "TSOptionalType";
|
|
}
|
|
s(s3e, "TSTypeOperator");
|
|
function a3e(e, t) {
|
|
let r = t.type;
|
|
return (r === "CallExpression" || r === "OptionalCallExpression" || r === "NewExpression" || r === "TSInstantiationExpression") && !!t.typeParameters;
|
|
}
|
|
s(a3e, "TSInstantiationExpression");
|
|
function o3e(e, t) {
|
|
let r = t.type;
|
|
return r === "TSIntersectionType" || r === "TSUnionType" || r === "TSTypeOperator" || r === "TSOptionalType" || r === "TSArrayType" || r ===
|
|
"TSIndexedAccessType" && t.objectType === e || r === "TSConditionalType" && (t.checkType === e || t.extendsType === e);
|
|
}
|
|
s(o3e, "TSFunctionType");
|
|
function u3e(e, t, r, i) {
|
|
return e.operator === "in" && i;
|
|
}
|
|
s(u3e, "BinaryExpression");
|
|
function l3e(e, t) {
|
|
let r = t.type;
|
|
return r === "SequenceExpression" || r === "ParenthesizedExpression" || r === "MemberExpression" && t.property === e || r === "OptionalM\
|
|
emberExpression" && t.property === e || r === "TemplateLiteral" ? !1 : r === "ClassDeclaration" ? !0 : r === "ForOfStatement" ? t.right === e :
|
|
r === "ExportDefaultDeclaration" ? !0 : !KOe(t);
|
|
}
|
|
s(l3e, "SequenceExpression");
|
|
function c3e(e, t) {
|
|
let r = t.type;
|
|
return r === "BinaryExpression" || r === "LogicalExpression" || r === "UnaryExpression" || r === "SpreadElement" || i0(e, t) || r === "A\
|
|
waitExpression" && HOe(e) || r === "ConditionalExpression" && e === t.test || r0(e, t) || RC(r);
|
|
}
|
|
s(c3e, "YieldExpression");
|
|
function f3e(e, t, r) {
|
|
return !!(r & (en.TokenContext.expressionStatement | en.TokenContext.exportDefault));
|
|
}
|
|
s(f3e, "ClassExpression");
|
|
function l5(e, t) {
|
|
return i0(e, t) || LOe(t) && t.operator === "**" && t.left === e || r0(e, t);
|
|
}
|
|
s(l5, "UnaryLike");
|
|
function d3e(e, t, r) {
|
|
return !!(r & (en.TokenContext.expressionStatement | en.TokenContext.exportDefault));
|
|
}
|
|
s(d3e, "FunctionExpression");
|
|
function c5(e, t) {
|
|
let r = t.type;
|
|
return r === "UnaryExpression" || r === "SpreadElement" || r === "BinaryExpression" || r === "LogicalExpression" || r === "ConditionalEx\
|
|
pression" && t.test === e || r === "AwaitExpression" || RC(r) ? !0 : l5(e, t);
|
|
}
|
|
s(c5, "ConditionalExpression");
|
|
function p3e(e, t) {
|
|
return qOe(t) && t.callee === e || a5(t) && t.object === e;
|
|
}
|
|
s(p3e, "OptionalMemberExpression");
|
|
function h3e(e, t, r) {
|
|
return o5(r) && $Oe(e.left) ? !0 : c5(e, t);
|
|
}
|
|
s(h3e, "AssignmentExpression");
|
|
function m3e(e, t) {
|
|
let r = t.type;
|
|
if (RC(r)) return !0;
|
|
if (r !== "LogicalExpression") return !1;
|
|
switch (e.operator) {
|
|
case "||":
|
|
return t.operator === "??" || t.operator === "&&";
|
|
case "&&":
|
|
return t.operator === "??";
|
|
case "??":
|
|
return t.operator !== "??";
|
|
}
|
|
}
|
|
s(m3e, "LogicalExpression");
|
|
function y3e(e, t, r, i, n) {
|
|
var a;
|
|
let o = t.type;
|
|
if ((a = e.extra) != null && a.parenthesized && o === "AssignmentExpression" && t.left === e) {
|
|
let u = t.right.type;
|
|
if ((u === "FunctionExpression" || u === "ClassExpression") && t.right.id == null)
|
|
return !0;
|
|
}
|
|
return n && n(e) !== e.name ? !1 : e.name === "let" ? (a5(t, {
|
|
object: e,
|
|
computed: !0
|
|
}) || VOe(t, {
|
|
object: e,
|
|
computed: !0,
|
|
optional: !1
|
|
})) && r & (en.TokenContext.expressionStatement | en.TokenContext.forHead | en.TokenContext.forInHead) ? !0 : !!(r & en.TokenContext.forOfHead) :
|
|
e.name === "async" && UOe(t, {
|
|
left: e,
|
|
await: !1
|
|
});
|
|
}
|
|
s(y3e, "Identifier");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/node/index.js
|
|
var Wa = E((Vs) => {
|
|
"use strict";
|
|
Object.defineProperty(Vs, "__esModule", {
|
|
value: !0
|
|
});
|
|
Vs.TokenContext = void 0;
|
|
Vs.isLastChild = O3e;
|
|
Vs.needsParens = I3e;
|
|
Vs.needsWhitespace = LC;
|
|
Vs.needsWhitespaceAfter = F3e;
|
|
Vs.needsWhitespaceBefore = P3e;
|
|
var g3e = i5(), b3e = f5(), D3e = Ve(), {
|
|
FLIPPED_ALIAS_KEYS: v3e,
|
|
VISITOR_KEYS: E3e,
|
|
isCallExpression: d5,
|
|
isDecorator: x3e,
|
|
isExpressionStatement: S3e,
|
|
isMemberExpression: T3e,
|
|
isNewExpression: C3e,
|
|
isParenthesizedExpression: w3e
|
|
} = D3e, Jft = Vs.TokenContext = {
|
|
expressionStatement: 1,
|
|
arrowBody: 2,
|
|
exportDefault: 4,
|
|
forHead: 8,
|
|
forInHead: 16,
|
|
forOfHead: 32,
|
|
arrowFlowReturnType: 64
|
|
};
|
|
function p5(e) {
|
|
let t = /* @__PURE__ */ new Map();
|
|
function r(i, n) {
|
|
let a = t.get(i);
|
|
t.set(i, a ? function(o, u, l, c, f) {
|
|
var m;
|
|
return (m = a(o, u, l, c, f)) != null ? m : n(o, u, l, c, f);
|
|
} : n);
|
|
}
|
|
s(r, "add");
|
|
for (let i of Object.keys(e)) {
|
|
let n = v3e[i];
|
|
if (n)
|
|
for (let a of n)
|
|
r(a, e[i]);
|
|
else
|
|
r(i, e[i]);
|
|
}
|
|
return t;
|
|
}
|
|
s(p5, "expandAliases");
|
|
var A3e = p5(b3e), _3e = p5(g3e.nodes);
|
|
function h5(e) {
|
|
return d5(e) ? !0 : T3e(e) && h5(e.object);
|
|
}
|
|
s(h5, "isOrHasCallExpression");
|
|
function LC(e, t, r) {
|
|
var i;
|
|
if (!e) return !1;
|
|
S3e(e) && (e = e.expression);
|
|
let n = (i = _3e.get(e.type)) == null ? void 0 : i(e, t);
|
|
return typeof n == "number" ? (n & r) !== 0 : !1;
|
|
}
|
|
s(LC, "needsWhitespace");
|
|
function P3e(e, t) {
|
|
return LC(e, t, 1);
|
|
}
|
|
s(P3e, "needsWhitespaceBefore");
|
|
function F3e(e, t) {
|
|
return LC(e, t, 2);
|
|
}
|
|
s(F3e, "needsWhitespaceAfter");
|
|
function I3e(e, t, r, i, n) {
|
|
var a;
|
|
return t ? C3e(t) && t.callee === e && h5(e) ? !0 : x3e(t) ? !jC(e) && !(d5(e) && jC(e.callee)) && !w3e(e) : (a = A3e.get(e.type)) == null ?
|
|
void 0 : a(e, t, r, i, n) : !1;
|
|
}
|
|
s(I3e, "needsParens");
|
|
function jC(e) {
|
|
switch (e.type) {
|
|
case "Identifier":
|
|
return !0;
|
|
case "MemberExpression":
|
|
return !e.computed && e.property.type === "Identifier" && jC(e.object);
|
|
default:
|
|
return !1;
|
|
}
|
|
}
|
|
s(jC, "isDecoratorMemberExpression");
|
|
function O3e(e, t) {
|
|
let r = E3e[e.type];
|
|
for (let i = r.length - 1; i >= 0; i--) {
|
|
let n = e[r[i]];
|
|
if (n === t)
|
|
return !0;
|
|
if (Array.isArray(n)) {
|
|
let a = n.length - 1;
|
|
for (; a >= 0 && n[a] === null; ) a--;
|
|
return a >= 0 && n[a] === t;
|
|
} else if (n)
|
|
return !1;
|
|
}
|
|
return !1;
|
|
}
|
|
s(O3e, "isLastChild");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/token-map.js
|
|
var m5 = E((n0) => {
|
|
"use strict";
|
|
Object.defineProperty(n0, "__esModule", {
|
|
value: !0
|
|
});
|
|
n0.TokenMap = void 0;
|
|
var k3e = Ve(), {
|
|
traverseFast: B3e,
|
|
VISITOR_KEYS: N3e
|
|
} = k3e, qC = class {
|
|
static {
|
|
s(this, "TokenMap");
|
|
}
|
|
constructor(t, r, i) {
|
|
this._tokens = void 0, this._source = void 0, this._nodesToTokenIndexes = /* @__PURE__ */ new Map(), this._nodesOccurrencesCountCache =
|
|
/* @__PURE__ */ new Map(), this._tokensCache = /* @__PURE__ */ new Map(), this._tokens = r, this._source = i, B3e(t, (n) => {
|
|
let a = this._getTokensIndexesOfNode(n);
|
|
a.length > 0 && this._nodesToTokenIndexes.set(n, a);
|
|
}), this._tokensCache = null;
|
|
}
|
|
has(t) {
|
|
return this._nodesToTokenIndexes.has(t);
|
|
}
|
|
getIndexes(t) {
|
|
return this._nodesToTokenIndexes.get(t);
|
|
}
|
|
find(t, r) {
|
|
let i = this._nodesToTokenIndexes.get(t);
|
|
if (i)
|
|
for (let n = 0; n < i.length; n++) {
|
|
let a = i[n], o = this._tokens[a];
|
|
if (r(o, a)) return o;
|
|
}
|
|
return null;
|
|
}
|
|
findLastIndex(t, r) {
|
|
let i = this._nodesToTokenIndexes.get(t);
|
|
if (i)
|
|
for (let n = i.length - 1; n >= 0; n--) {
|
|
let a = i[n], o = this._tokens[a];
|
|
if (r(o, a)) return a;
|
|
}
|
|
return -1;
|
|
}
|
|
findMatching(t, r, i = 0) {
|
|
let n = this._nodesToTokenIndexes.get(t);
|
|
if (n) {
|
|
let a = 0, o = i;
|
|
if (o > 1) {
|
|
let u = this._nodesOccurrencesCountCache.get(t);
|
|
u && u.test === r && u.count < o && (a = u.i + 1, i -= u.count + 1);
|
|
}
|
|
for (; a < n.length; a++) {
|
|
let u = this._tokens[n[a]];
|
|
if (this.matchesOriginal(u, r)) {
|
|
if (i === 0)
|
|
return o > 0 && this._nodesOccurrencesCountCache.set(t, {
|
|
test: r,
|
|
count: o,
|
|
i: a
|
|
}), u;
|
|
i--;
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
matchesOriginal(t, r) {
|
|
return t.end - t.start !== r.length ? !1 : t.value != null ? t.value === r : this._source.startsWith(r, t.start);
|
|
}
|
|
startMatches(t, r) {
|
|
let i = this._nodesToTokenIndexes.get(t);
|
|
if (!i) return !1;
|
|
let n = this._tokens[i[0]];
|
|
return n.start !== t.start ? !1 : this.matchesOriginal(n, r);
|
|
}
|
|
endMatches(t, r) {
|
|
let i = this._nodesToTokenIndexes.get(t);
|
|
if (!i) return !1;
|
|
let n = this._tokens[i[i.length - 1]];
|
|
return n.end !== t.end ? !1 : this.matchesOriginal(n, r);
|
|
}
|
|
_getTokensIndexesOfNode(t) {
|
|
if (t.start == null || t.end == null) return [];
|
|
let {
|
|
first: r,
|
|
last: i
|
|
} = this._findTokensOfNode(t, 0, this._tokens.length - 1), n = r, a = M3e(t);
|
|
(t.type === "ExportNamedDeclaration" || t.type === "ExportDefaultDeclaration") && t.declaration && t.declaration.type === "ClassDeclar\
|
|
ation" && a.next();
|
|
let o = [];
|
|
for (let u of a) {
|
|
if (u == null || u.start == null || u.end == null) continue;
|
|
let l = this._findTokensOfNode(u, n, i), c = l.first;
|
|
for (let f = n; f < c; f++) o.push(f);
|
|
n = l.last + 1;
|
|
}
|
|
for (let u = n; u <= i; u++) o.push(u);
|
|
return o;
|
|
}
|
|
_findTokensOfNode(t, r, i) {
|
|
let n = this._tokensCache.get(t);
|
|
if (n) return n;
|
|
let a = this._findFirstTokenOfNode(t.start, r, i), o = this._findLastTokenOfNode(t.end, a, i);
|
|
return this._tokensCache.set(t, {
|
|
first: a,
|
|
last: o
|
|
}), {
|
|
first: a,
|
|
last: o
|
|
};
|
|
}
|
|
_findFirstTokenOfNode(t, r, i) {
|
|
for (; r <= i; ) {
|
|
let n = i + r >> 1;
|
|
if (t < this._tokens[n].start)
|
|
i = n - 1;
|
|
else if (t > this._tokens[n].start)
|
|
r = n + 1;
|
|
else
|
|
return n;
|
|
}
|
|
return r;
|
|
}
|
|
_findLastTokenOfNode(t, r, i) {
|
|
for (; r <= i; ) {
|
|
let n = i + r >> 1;
|
|
if (t < this._tokens[n].end)
|
|
i = n - 1;
|
|
else if (t > this._tokens[n].end)
|
|
r = n + 1;
|
|
else
|
|
return n;
|
|
}
|
|
return i;
|
|
}
|
|
};
|
|
n0.TokenMap = qC;
|
|
function* M3e(e) {
|
|
if (e.type === "TemplateLiteral") {
|
|
yield e.quasis[0];
|
|
for (let r = 1; r < e.quasis.length; r++)
|
|
yield e.expressions[r - 1], yield e.quasis[r];
|
|
return;
|
|
}
|
|
let t = N3e[e.type];
|
|
for (let r of t) {
|
|
let i = e[r];
|
|
i && (Array.isArray(i) ? yield* i : yield i);
|
|
}
|
|
}
|
|
s(M3e, "childrenIterator");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/template-literals.js
|
|
var y5 = E((Vl) => {
|
|
"use strict";
|
|
Object.defineProperty(Vl, "__esModule", {
|
|
value: !0
|
|
});
|
|
Vl.TaggedTemplateExpression = R3e;
|
|
Vl.TemplateElement = j3e;
|
|
Vl.TemplateLiteral = q3e;
|
|
Vl._printTemplate = L3e;
|
|
function R3e(e) {
|
|
this.print(e.tag), this.print(e.typeParameters), this.print(e.quasi);
|
|
}
|
|
s(R3e, "TaggedTemplateExpression");
|
|
function j3e() {
|
|
throw new Error("TemplateElement printing is handled in TemplateLiteral");
|
|
}
|
|
s(j3e, "TemplateElement");
|
|
function L3e(e, t) {
|
|
let r = e.quasis, i = "`";
|
|
for (let n = 0; n < r.length - 1; n++)
|
|
if (i += r[n].value.raw, this.token(i + "${", !0), this.print(t[n]), i = "}", this.tokenMap) {
|
|
let a = this.tokenMap.findMatching(e, "}", n);
|
|
a && this._catchUpTo(a.loc.start);
|
|
}
|
|
i += r[r.length - 1].value.raw, this.token(i + "`", !0);
|
|
}
|
|
s(L3e, "_printTemplate");
|
|
function q3e(e) {
|
|
this._printTemplate(e, e.expressions);
|
|
}
|
|
s(q3e, "TemplateLiteral");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/expressions.js
|
|
var b5 = E((Pt) => {
|
|
"use strict";
|
|
Object.defineProperty(Pt, "__esModule", {
|
|
value: !0
|
|
});
|
|
Pt.LogicalExpression = Pt.BinaryExpression = Pt.AssignmentExpression = dke;
|
|
Pt.AssignmentPattern = fke;
|
|
Pt.AwaitExpression = oke;
|
|
Pt.BindExpression = pke;
|
|
Pt.CallExpression = ske;
|
|
Pt.ConditionalExpression = X3e;
|
|
Pt.Decorator = rke;
|
|
Pt.DoExpression = z3e;
|
|
Pt.EmptyStatement = lke;
|
|
Pt.ExpressionStatement = cke;
|
|
Pt.Import = ake;
|
|
Pt.MemberExpression = hke;
|
|
Pt.MetaProperty = mke;
|
|
Pt.ModuleExpression = bke;
|
|
Pt.NewExpression = Y3e;
|
|
Pt.OptionalCallExpression = nke;
|
|
Pt.OptionalMemberExpression = ike;
|
|
Pt.ParenthesizedExpression = G3e;
|
|
Pt.PrivateName = yke;
|
|
Pt.SequenceExpression = Z3e;
|
|
Pt.Super = eke;
|
|
Pt.ThisExpression = Q3e;
|
|
Pt.UnaryExpression = K3e;
|
|
Pt.UpdateExpression = J3e;
|
|
Pt.V8IntrinsicIdentifier = gke;
|
|
Pt.YieldExpression = uke;
|
|
Pt._shouldPrintDecoratorsBeforeExport = tke;
|
|
var U3e = Ve(), W3e = Wa(), {
|
|
isCallExpression: $3e,
|
|
isLiteral: g5,
|
|
isMemberExpression: UC,
|
|
isNewExpression: V3e,
|
|
isPattern: H3e
|
|
} = U3e;
|
|
function K3e(e) {
|
|
let {
|
|
operator: t
|
|
} = e;
|
|
t === "void" || t === "delete" || t === "typeof" || t === "throw" ? (this.word(t), this.space()) : this.token(t), this.print(e.argument);
|
|
}
|
|
s(K3e, "UnaryExpression");
|
|
function z3e(e) {
|
|
e.async && (this.word("async", !0), this.space()), this.word("do"), this.space(), this.print(e.body);
|
|
}
|
|
s(z3e, "DoExpression");
|
|
function G3e(e) {
|
|
this.tokenChar(40);
|
|
let t = this.enterDelimited();
|
|
this.print(e.expression), t(), this.rightParens(e);
|
|
}
|
|
s(G3e, "ParenthesizedExpression");
|
|
function J3e(e) {
|
|
e.prefix ? (this.token(e.operator), this.print(e.argument)) : (this.print(e.argument, !0), this.token(e.operator));
|
|
}
|
|
s(J3e, "UpdateExpression");
|
|
function X3e(e) {
|
|
this.print(e.test), this.space(), this.tokenChar(63), this.space(), this.print(e.consequent), this.space(), this.tokenChar(58), this.space(),
|
|
this.print(e.alternate);
|
|
}
|
|
s(X3e, "ConditionalExpression");
|
|
function Y3e(e, t) {
|
|
if (this.word("new"), this.space(), this.print(e.callee), this.format.minified && e.arguments.length === 0 && !e.optional && !$3e(t, {
|
|
callee: e
|
|
}) && !UC(t) && !V3e(t) || (this.print(e.typeArguments), this.print(e.typeParameters), e.optional && this.token("?."), e.arguments.length ===
|
|
0 && this.tokenMap && !this.tokenMap.endMatches(e, ")")))
|
|
return;
|
|
this.tokenChar(40);
|
|
let r = this.enterDelimited();
|
|
this.printList(e.arguments, this.shouldPrintTrailingComma(")")), r(), this.rightParens(e);
|
|
}
|
|
s(Y3e, "NewExpression");
|
|
function Z3e(e) {
|
|
this.printList(e.expressions);
|
|
}
|
|
s(Z3e, "SequenceExpression");
|
|
function Q3e() {
|
|
this.word("this");
|
|
}
|
|
s(Q3e, "ThisExpression");
|
|
function eke() {
|
|
this.word("super");
|
|
}
|
|
s(eke, "Super");
|
|
function tke(e) {
|
|
return typeof this.format.decoratorsBeforeExport == "boolean" ? this.format.decoratorsBeforeExport : typeof e.start == "number" && e.start ===
|
|
e.declaration.start;
|
|
}
|
|
s(tke, "_shouldPrintDecoratorsBeforeExport");
|
|
function rke(e) {
|
|
this.tokenChar(64), this.print(e.expression), this.newline();
|
|
}
|
|
s(rke, "Decorator");
|
|
function ike(e) {
|
|
let {
|
|
computed: t
|
|
} = e, {
|
|
optional: r,
|
|
property: i
|
|
} = e;
|
|
if (this.print(e.object), !t && UC(i))
|
|
throw new TypeError("Got a MemberExpression for MemberExpression property");
|
|
g5(i) && typeof i.value == "number" && (t = !0), r && this.token("?."), t ? (this.tokenChar(91), this.print(i), this.tokenChar(93)) : (r ||
|
|
this.tokenChar(46), this.print(i));
|
|
}
|
|
s(ike, "OptionalMemberExpression");
|
|
function nke(e) {
|
|
this.print(e.callee), this.print(e.typeParameters), e.optional && this.token("?."), this.print(e.typeArguments), this.tokenChar(40);
|
|
let t = this.enterDelimited();
|
|
this.printList(e.arguments), t(), this.rightParens(e);
|
|
}
|
|
s(nke, "OptionalCallExpression");
|
|
function ske(e) {
|
|
this.print(e.callee), this.print(e.typeArguments), this.print(e.typeParameters), this.tokenChar(40);
|
|
let t = this.enterDelimited();
|
|
this.printList(e.arguments, this.shouldPrintTrailingComma(")")), t(), this.rightParens(e);
|
|
}
|
|
s(ske, "CallExpression");
|
|
function ake() {
|
|
this.word("import");
|
|
}
|
|
s(ake, "Import");
|
|
function oke(e) {
|
|
this.word("await"), e.argument && (this.space(), this.printTerminatorless(e.argument));
|
|
}
|
|
s(oke, "AwaitExpression");
|
|
function uke(e) {
|
|
this.word("yield", !0), e.delegate ? (this.tokenChar(42), e.argument && (this.space(), this.print(e.argument))) : e.argument && (this.space(),
|
|
this.printTerminatorless(e.argument));
|
|
}
|
|
s(uke, "YieldExpression");
|
|
function lke() {
|
|
this.semicolon(!0);
|
|
}
|
|
s(lke, "EmptyStatement");
|
|
function cke(e) {
|
|
this.tokenContext |= W3e.TokenContext.expressionStatement, this.print(e.expression), this.semicolon();
|
|
}
|
|
s(cke, "ExpressionStatement");
|
|
function fke(e) {
|
|
this.print(e.left), (e.left.type === "Identifier" || H3e(e.left)) && (e.left.optional && this.tokenChar(63), this.print(e.left.typeAnnotation)),
|
|
this.space(), this.tokenChar(61), this.space(), this.print(e.right);
|
|
}
|
|
s(fke, "AssignmentPattern");
|
|
function dke(e) {
|
|
this.print(e.left), this.space(), e.operator === "in" || e.operator === "instanceof" ? this.word(e.operator) : (this.token(e.operator), this.
|
|
_endsWithDiv = e.operator === "/"), this.space(), this.print(e.right);
|
|
}
|
|
s(dke, "AssignmentExpression");
|
|
function pke(e) {
|
|
this.print(e.object), this.token("::"), this.print(e.callee);
|
|
}
|
|
s(pke, "BindExpression");
|
|
function hke(e) {
|
|
if (this.print(e.object), !e.computed && UC(e.property))
|
|
throw new TypeError("Got a MemberExpression for MemberExpression property");
|
|
let t = e.computed;
|
|
if (g5(e.property) && typeof e.property.value == "number" && (t = !0), t) {
|
|
let r = this.enterDelimited();
|
|
this.tokenChar(91), this.print(e.property), this.tokenChar(93), r();
|
|
} else
|
|
this.tokenChar(46), this.print(e.property);
|
|
}
|
|
s(hke, "MemberExpression");
|
|
function mke(e) {
|
|
this.print(e.meta), this.tokenChar(46), this.print(e.property);
|
|
}
|
|
s(mke, "MetaProperty");
|
|
function yke(e) {
|
|
this.tokenChar(35), this.print(e.id);
|
|
}
|
|
s(yke, "PrivateName");
|
|
function gke(e) {
|
|
this.tokenChar(37), this.word(e.name);
|
|
}
|
|
s(gke, "V8IntrinsicIdentifier");
|
|
function bke(e) {
|
|
this.word("module", !0), this.space(), this.tokenChar(123), this.indent();
|
|
let {
|
|
body: t
|
|
} = e;
|
|
(t.body.length || t.directives.length) && this.newline(), this.print(t), this.dedent(), this.rightBrace(e);
|
|
}
|
|
s(bke, "ModuleExpression");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/statements.js
|
|
var x5 = E((ur) => {
|
|
"use strict";
|
|
Object.defineProperty(ur, "__esModule", {
|
|
value: !0
|
|
});
|
|
ur.BreakStatement = _ke;
|
|
ur.CatchClause = Bke;
|
|
ur.ContinueStatement = Pke;
|
|
ur.DebuggerStatement = Rke;
|
|
ur.DoWhileStatement = Ake;
|
|
ur.ForOfStatement = ur.ForInStatement = void 0;
|
|
ur.ForStatement = Cke;
|
|
ur.IfStatement = Tke;
|
|
ur.LabeledStatement = Oke;
|
|
ur.ReturnStatement = Fke;
|
|
ur.SwitchCase = Mke;
|
|
ur.SwitchStatement = Nke;
|
|
ur.ThrowStatement = Ike;
|
|
ur.TryStatement = kke;
|
|
ur.VariableDeclaration = jke;
|
|
ur.VariableDeclarator = Lke;
|
|
ur.WhileStatement = wke;
|
|
ur.WithStatement = Ske;
|
|
var Dke = Ve(), WC = Wa(), {
|
|
isFor: D5,
|
|
isForStatement: vke,
|
|
isIfStatement: Eke,
|
|
isStatement: xke
|
|
} = Dke;
|
|
function Ske(e) {
|
|
this.word("with"), this.space(), this.tokenChar(40), this.print(e.object), this.tokenChar(41), this.printBlock(e);
|
|
}
|
|
s(Ske, "WithStatement");
|
|
function Tke(e) {
|
|
this.word("if"), this.space(), this.tokenChar(40), this.print(e.test), this.tokenChar(41), this.space();
|
|
let t = e.alternate && Eke(v5(e.consequent));
|
|
t && (this.tokenChar(123), this.newline(), this.indent()), this.printAndIndentOnComments(e.consequent), t && (this.dedent(), this.newline(),
|
|
this.tokenChar(125)), e.alternate && (this.endsWith(125) && this.space(), this.word("else"), this.space(), this.printAndIndentOnComments(
|
|
e.alternate));
|
|
}
|
|
s(Tke, "IfStatement");
|
|
function v5(e) {
|
|
let {
|
|
body: t
|
|
} = e;
|
|
return xke(t) === !1 ? e : v5(t);
|
|
}
|
|
s(v5, "getLastStatement");
|
|
function Cke(e) {
|
|
this.word("for"), this.space(), this.tokenChar(40);
|
|
{
|
|
let t = this.enterForStatementInit();
|
|
this.tokenContext |= WC.TokenContext.forHead, this.print(e.init), t();
|
|
}
|
|
this.tokenChar(59), e.test && (this.space(), this.print(e.test)), this.token(";", !1, 1), e.update && (this.space(), this.print(e.update)),
|
|
this.tokenChar(41), this.printBlock(e);
|
|
}
|
|
s(Cke, "ForStatement");
|
|
function wke(e) {
|
|
this.word("while"), this.space(), this.tokenChar(40), this.print(e.test), this.tokenChar(41), this.printBlock(e);
|
|
}
|
|
s(wke, "WhileStatement");
|
|
function E5(e) {
|
|
this.word("for"), this.space();
|
|
let t = e.type === "ForOfStatement";
|
|
t && e.await && (this.word("await"), this.space()), this.noIndentInnerCommentsHere(), this.tokenChar(40);
|
|
{
|
|
let r = t ? null : this.enterForStatementInit();
|
|
this.tokenContext |= t ? WC.TokenContext.forOfHead : WC.TokenContext.forInHead, this.print(e.left), r?.();
|
|
}
|
|
this.space(), this.word(t ? "of" : "in"), this.space(), this.print(e.right), this.tokenChar(41), this.printBlock(e);
|
|
}
|
|
s(E5, "ForXStatement");
|
|
var ndt = ur.ForInStatement = E5, sdt = ur.ForOfStatement = E5;
|
|
function Ake(e) {
|
|
this.word("do"), this.space(), this.print(e.body), this.space(), this.word("while"), this.space(), this.tokenChar(40), this.print(e.test),
|
|
this.tokenChar(41), this.semicolon();
|
|
}
|
|
s(Ake, "DoWhileStatement");
|
|
function s0(e, t) {
|
|
t && (e.space(), e.printTerminatorless(t)), e.semicolon();
|
|
}
|
|
s(s0, "printStatementAfterKeyword");
|
|
function _ke(e) {
|
|
this.word("break"), s0(this, e.label);
|
|
}
|
|
s(_ke, "BreakStatement");
|
|
function Pke(e) {
|
|
this.word("continue"), s0(this, e.label);
|
|
}
|
|
s(Pke, "ContinueStatement");
|
|
function Fke(e) {
|
|
this.word("return"), s0(this, e.argument);
|
|
}
|
|
s(Fke, "ReturnStatement");
|
|
function Ike(e) {
|
|
this.word("throw"), s0(this, e.argument);
|
|
}
|
|
s(Ike, "ThrowStatement");
|
|
function Oke(e) {
|
|
this.print(e.label), this.tokenChar(58), this.space(), this.print(e.body);
|
|
}
|
|
s(Oke, "LabeledStatement");
|
|
function kke(e) {
|
|
this.word("try"), this.space(), this.print(e.block), this.space(), e.handlers ? this.print(e.handlers[0]) : this.print(e.handler), e.finalizer &&
|
|
(this.space(), this.word("finally"), this.space(), this.print(e.finalizer));
|
|
}
|
|
s(kke, "TryStatement");
|
|
function Bke(e) {
|
|
this.word("catch"), this.space(), e.param && (this.tokenChar(40), this.print(e.param), this.print(e.param.typeAnnotation), this.tokenChar(
|
|
41), this.space()), this.print(e.body);
|
|
}
|
|
s(Bke, "CatchClause");
|
|
function Nke(e) {
|
|
this.word("switch"), this.space(), this.tokenChar(40), this.print(e.discriminant), this.tokenChar(41), this.space(), this.tokenChar(123),
|
|
this.printSequence(e.cases, !0, void 0, /* @__PURE__ */ s(function(r, i) {
|
|
if (!r && e.cases[e.cases.length - 1] === i) return -1;
|
|
}, "addNewlines")), this.rightBrace(e);
|
|
}
|
|
s(Nke, "SwitchStatement");
|
|
function Mke(e) {
|
|
e.test ? (this.word("case"), this.space(), this.print(e.test), this.tokenChar(58)) : (this.word("default"), this.tokenChar(58)), e.consequent.
|
|
length && (this.newline(), this.printSequence(e.consequent, !0));
|
|
}
|
|
s(Mke, "SwitchCase");
|
|
function Rke() {
|
|
this.word("debugger"), this.semicolon();
|
|
}
|
|
s(Rke, "DebuggerStatement");
|
|
function jke(e, t) {
|
|
e.declare && (this.word("declare"), this.space());
|
|
let {
|
|
kind: r
|
|
} = e;
|
|
r === "await using" ? (this.word("await"), this.space(), this.word("using", !0)) : this.word(r, r === "using"), this.space();
|
|
let i = !1;
|
|
if (!D5(t))
|
|
for (let n of e.declarations)
|
|
n.init && (i = !0);
|
|
if (this.printList(e.declarations, void 0, void 0, e.declarations.length > 1, i ? function(n) {
|
|
this.token(",", !1, n), this.newline();
|
|
} : void 0), D5(t)) {
|
|
if (vke(t)) {
|
|
if (t.init === e) return;
|
|
} else if (t.left === e) return;
|
|
}
|
|
this.semicolon();
|
|
}
|
|
s(jke, "VariableDeclaration");
|
|
function Lke(e) {
|
|
this.print(e.id), e.definite && this.tokenChar(33), this.print(e.id.typeAnnotation), e.init && (this.space(), this.tokenChar(61), this.space(),
|
|
this.print(e.init));
|
|
}
|
|
s(Lke, "VariableDeclarator");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/classes.js
|
|
var S5 = E((tn) => {
|
|
"use strict";
|
|
Object.defineProperty(tn, "__esModule", {
|
|
value: !0
|
|
});
|
|
tn.ClassAccessorProperty = zke;
|
|
tn.ClassBody = Vke;
|
|
tn.ClassExpression = tn.ClassDeclaration = $ke;
|
|
tn.ClassMethod = Jke;
|
|
tn.ClassPrivateMethod = Xke;
|
|
tn.ClassPrivateProperty = Gke;
|
|
tn.ClassProperty = Kke;
|
|
tn.StaticBlock = Zke;
|
|
tn._classMethodHead = Yke;
|
|
var qke = Ve(), {
|
|
isExportDefaultDeclaration: Uke,
|
|
isExportNamedDeclaration: Wke
|
|
} = qke;
|
|
function $ke(e, t) {
|
|
(!(Uke(t) || Wke(t)) || !this._shouldPrintDecoratorsBeforeExport(t)) && this.printJoin(e.decorators), e.declare && (this.word("declare"),
|
|
this.space()), e.abstract && (this.word("abstract"), this.space()), this.word("class"), e.id && (this.space(), this.print(e.id)), this.print(
|
|
e.typeParameters), e.superClass && (this.space(), this.word("extends"), this.space(), this.print(e.superClass), this.print(e.superTypeParameters)),
|
|
e.implements && (this.space(), this.word("implements"), this.space(), this.printList(e.implements)), this.space(), this.print(e.body);
|
|
}
|
|
s($ke, "ClassDeclaration");
|
|
function Vke(e) {
|
|
if (this.tokenChar(123), e.body.length === 0)
|
|
this.tokenChar(125);
|
|
else {
|
|
this.newline();
|
|
let t = Hke(this, e);
|
|
t?.(-1);
|
|
let r = this.enterDelimited();
|
|
this.printJoin(e.body, !0, !0, t, !0), r(), this.endsWith(10) || this.newline(), this.rightBrace(e);
|
|
}
|
|
}
|
|
s(Vke, "ClassBody");
|
|
function Hke(e, t) {
|
|
if (!e.tokenMap || t.start == null || t.end == null)
|
|
return null;
|
|
let r = e.tokenMap.getIndexes(t);
|
|
if (!r) return null;
|
|
let i = 1, n = 0, a = 0, o = /* @__PURE__ */ s(() => {
|
|
for (; a < t.body.length && t.body[a].start == null; )
|
|
a++;
|
|
}, "advanceNextLocIndex");
|
|
return o(), (u) => {
|
|
a <= u && (a = u + 1, o());
|
|
let l = a === t.body.length ? t.end : t.body[a].start, c;
|
|
for (; i < r.length && e.tokenMap.matchesOriginal(c = e._tokens[r[i]], ";") && c.start < l; )
|
|
e.token(";", void 0, n++), i++;
|
|
};
|
|
}
|
|
s(Hke, "classBodyEmptySemicolonsPrinter");
|
|
function Kke(e) {
|
|
if (this.printJoin(e.decorators), !e.static && !this.format.preserveFormat) {
|
|
var t;
|
|
let r = (t = e.key.loc) == null || (t = t.end) == null ? void 0 : t.line;
|
|
r && this.catchUp(r);
|
|
}
|
|
this.tsPrintClassMemberModifiers(e), e.computed ? (this.tokenChar(91), this.print(e.key), this.tokenChar(93)) : (this._variance(e), this.
|
|
print(e.key)), e.optional && this.tokenChar(63), e.definite && this.tokenChar(33), this.print(e.typeAnnotation), e.value && (this.space(),
|
|
this.tokenChar(61), this.space(), this.print(e.value)), this.semicolon();
|
|
}
|
|
s(Kke, "ClassProperty");
|
|
function zke(e) {
|
|
var t;
|
|
this.printJoin(e.decorators);
|
|
let r = (t = e.key.loc) == null || (t = t.end) == null ? void 0 : t.line;
|
|
r && this.catchUp(r), this.tsPrintClassMemberModifiers(e), this.word("accessor", !0), this.space(), e.computed ? (this.tokenChar(91), this.
|
|
print(e.key), this.tokenChar(93)) : (this._variance(e), this.print(e.key)), e.optional && this.tokenChar(63), e.definite && this.tokenChar(
|
|
33), this.print(e.typeAnnotation), e.value && (this.space(), this.tokenChar(61), this.space(), this.print(e.value)), this.semicolon();
|
|
}
|
|
s(zke, "ClassAccessorProperty");
|
|
function Gke(e) {
|
|
this.printJoin(e.decorators), this.tsPrintClassMemberModifiers(e), this.print(e.key), e.optional && this.tokenChar(63), e.definite && this.
|
|
tokenChar(33), this.print(e.typeAnnotation), e.value && (this.space(), this.tokenChar(61), this.space(), this.print(e.value)), this.semicolon();
|
|
}
|
|
s(Gke, "ClassPrivateProperty");
|
|
function Jke(e) {
|
|
this._classMethodHead(e), this.space(), this.print(e.body);
|
|
}
|
|
s(Jke, "ClassMethod");
|
|
function Xke(e) {
|
|
this._classMethodHead(e), this.space(), this.print(e.body);
|
|
}
|
|
s(Xke, "ClassPrivateMethod");
|
|
function Yke(e) {
|
|
if (this.printJoin(e.decorators), !this.format.preserveFormat) {
|
|
var t;
|
|
let r = (t = e.key.loc) == null || (t = t.end) == null ? void 0 : t.line;
|
|
r && this.catchUp(r);
|
|
}
|
|
this.tsPrintClassMemberModifiers(e), this._methodHead(e);
|
|
}
|
|
s(Yke, "_classMethodHead");
|
|
function Zke(e) {
|
|
this.word("static"), this.space(), this.tokenChar(123), e.body.length === 0 ? this.tokenChar(125) : (this.newline(), this.printSequence(
|
|
e.body, !0), this.rightBrace(e));
|
|
}
|
|
s(Zke, "StaticBlock");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/methods.js
|
|
var T5 = E((rn) => {
|
|
"use strict";
|
|
Object.defineProperty(rn, "__esModule", {
|
|
value: !0
|
|
});
|
|
rn.ArrowFunctionExpression = lBe;
|
|
rn.FunctionDeclaration = rn.FunctionExpression = uBe;
|
|
rn._functionHead = oBe;
|
|
rn._methodHead = sBe;
|
|
rn._param = nBe;
|
|
rn._parameters = iBe;
|
|
rn._params = rBe;
|
|
rn._predicate = aBe;
|
|
rn._shouldPrintArrowParamsParens = cBe;
|
|
var Qke = Ve(), eBe = Wa(), {
|
|
isIdentifier: tBe
|
|
} = Qke;
|
|
function rBe(e, t, r) {
|
|
this.print(e.typeParameters);
|
|
let i = fBe.call(this, t, r);
|
|
i && this.sourceIdentifierName(i.name, i.pos), this.tokenChar(40), this._parameters(e.params, ")");
|
|
let n = e.type === "ArrowFunctionExpression";
|
|
this.print(e.returnType, n), this._noLineTerminator = n;
|
|
}
|
|
s(rBe, "_params");
|
|
function iBe(e, t) {
|
|
let r = this.enterDelimited(), i = this.shouldPrintTrailingComma(t), n = e.length;
|
|
for (let a = 0; a < n; a++)
|
|
this._param(e[a]), (i || a < n - 1) && (this.token(",", null, a), this.space());
|
|
this.token(t), r();
|
|
}
|
|
s(iBe, "_parameters");
|
|
function nBe(e) {
|
|
this.printJoin(e.decorators), this.print(e), e.optional && this.tokenChar(63), this.print(e.typeAnnotation);
|
|
}
|
|
s(nBe, "_param");
|
|
function sBe(e) {
|
|
let t = e.kind, r = e.key;
|
|
(t === "get" || t === "set") && (this.word(t), this.space()), e.async && (this.word("async", !0), this.space()), (t === "method" || t ===
|
|
"init") && e.generator && this.tokenChar(42), e.computed ? (this.tokenChar(91), this.print(r), this.tokenChar(93)) : this.print(r), e.optional &&
|
|
this.tokenChar(63), this._params(e, e.computed && e.key.type !== "StringLiteral" ? void 0 : e.key, void 0);
|
|
}
|
|
s(sBe, "_methodHead");
|
|
function aBe(e, t) {
|
|
e.predicate && (e.returnType || this.tokenChar(58), this.space(), this.print(e.predicate, t));
|
|
}
|
|
s(aBe, "_predicate");
|
|
function oBe(e, t) {
|
|
e.async && (this.word("async"), this.format.preserveFormat || (this._endsWithInnerRaw = !1), this.space()), this.word("function"), e.generator &&
|
|
(this.format.preserveFormat || (this._endsWithInnerRaw = !1), this.tokenChar(42)), this.space(), e.id && this.print(e.id), this._params(
|
|
e, e.id, t), e.type !== "TSDeclareFunction" && this._predicate(e);
|
|
}
|
|
s(oBe, "_functionHead");
|
|
function uBe(e, t) {
|
|
this._functionHead(e, t), this.space(), this.print(e.body);
|
|
}
|
|
s(uBe, "FunctionExpression");
|
|
function lBe(e, t) {
|
|
e.async && (this.word("async", !0), this.space()), this._shouldPrintArrowParamsParens(e) ? this._params(e, void 0, t) : this.print(e.params[0],
|
|
!0), this._predicate(e, !0), this.space(), this.printInnerComments(), this.token("=>"), this.space(), this.tokenContext |= eBe.TokenContext.
|
|
arrowBody, this.print(e.body);
|
|
}
|
|
s(lBe, "ArrowFunctionExpression");
|
|
function cBe(e) {
|
|
var t, r;
|
|
if (e.params.length !== 1 || e.typeParameters || e.returnType || e.predicate)
|
|
return !0;
|
|
let i = e.params[0];
|
|
if (!tBe(i) || i.typeAnnotation || i.optional || (t = i.leadingComments) != null && t.length || (r = i.trailingComments) != null && r.length)
|
|
return !0;
|
|
if (this.tokenMap) {
|
|
if (e.loc == null || this.tokenMap.findMatching(e, "(") !== null) return !0;
|
|
let n = this.tokenMap.findMatching(e, "=>");
|
|
return n?.loc == null ? !0 : n.loc.start.line !== e.loc.start.line;
|
|
}
|
|
return !!this.format.retainLines;
|
|
}
|
|
s(cBe, "_shouldPrintArrowParamsParens");
|
|
function fBe(e, t) {
|
|
let r = e;
|
|
if (!r && t) {
|
|
let l = t.type;
|
|
l === "VariableDeclarator" ? r = t.id : l === "AssignmentExpression" || l === "AssignmentPattern" ? r = t.left : l === "ObjectProperty" ||
|
|
l === "ClassProperty" ? (!t.computed || t.key.type === "StringLiteral") && (r = t.key) : (l === "ClassPrivateProperty" || l === "Class\
|
|
AccessorProperty") && (r = t.key);
|
|
}
|
|
if (!r) return;
|
|
let i;
|
|
if (r.type === "Identifier") {
|
|
var n, a;
|
|
i = {
|
|
pos: (n = r.loc) == null ? void 0 : n.start,
|
|
name: ((a = r.loc) == null ? void 0 : a.identifierName) || r.name
|
|
};
|
|
} else if (r.type === "PrivateName") {
|
|
var o;
|
|
i = {
|
|
pos: (o = r.loc) == null ? void 0 : o.start,
|
|
name: "#" + r.id.name
|
|
};
|
|
} else if (r.type === "StringLiteral") {
|
|
var u;
|
|
i = {
|
|
pos: (u = r.loc) == null ? void 0 : u.start,
|
|
name: r.value
|
|
};
|
|
}
|
|
return i;
|
|
}
|
|
s(fBe, "_getFuncIdName");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/modules.js
|
|
var $C = E((gi) => {
|
|
"use strict";
|
|
Object.defineProperty(gi, "__esModule", {
|
|
value: !0
|
|
});
|
|
gi.ExportAllDeclaration = CBe;
|
|
gi.ExportDefaultDeclaration = ABe;
|
|
gi.ExportDefaultSpecifier = EBe;
|
|
gi.ExportNamedDeclaration = wBe;
|
|
gi.ExportNamespaceSpecifier = SBe;
|
|
gi.ExportSpecifier = xBe;
|
|
gi.ImportAttribute = PBe;
|
|
gi.ImportDeclaration = _Be;
|
|
gi.ImportDefaultSpecifier = vBe;
|
|
gi.ImportExpression = IBe;
|
|
gi.ImportNamespaceSpecifier = FBe;
|
|
gi.ImportSpecifier = DBe;
|
|
gi._printAttributes = TBe;
|
|
var dBe = Ve(), pBe = Wa(), {
|
|
isClassDeclaration: hBe,
|
|
isExportDefaultSpecifier: mBe,
|
|
isExportNamespaceSpecifier: yBe,
|
|
isImportDefaultSpecifier: gBe,
|
|
isImportNamespaceSpecifier: bBe,
|
|
isStatement: w5
|
|
} = dBe;
|
|
function DBe(e) {
|
|
(e.importKind === "type" || e.importKind === "typeof") && (this.word(e.importKind), this.space()), this.print(e.imported), e.local && e.
|
|
local.name !== e.imported.name && (this.space(), this.word("as"), this.space(), this.print(e.local));
|
|
}
|
|
s(DBe, "ImportSpecifier");
|
|
function vBe(e) {
|
|
this.print(e.local);
|
|
}
|
|
s(vBe, "ImportDefaultSpecifier");
|
|
function EBe(e) {
|
|
this.print(e.exported);
|
|
}
|
|
s(EBe, "ExportDefaultSpecifier");
|
|
function xBe(e) {
|
|
e.exportKind === "type" && (this.word("type"), this.space()), this.print(e.local), e.exported && e.local.name !== e.exported.name && (this.
|
|
space(), this.word("as"), this.space(), this.print(e.exported));
|
|
}
|
|
s(xBe, "ExportSpecifier");
|
|
function SBe(e) {
|
|
this.tokenChar(42), this.space(), this.word("as"), this.space(), this.print(e.exported);
|
|
}
|
|
s(SBe, "ExportNamespaceSpecifier");
|
|
var C5 = !1;
|
|
function TBe(e, t) {
|
|
var r;
|
|
let {
|
|
importAttributesKeyword: i
|
|
} = this.format, {
|
|
attributes: n,
|
|
assertions: a
|
|
} = e;
|
|
n && !i && e.extra && (e.extra.deprecatedAssertSyntax || e.extra.deprecatedWithLegacySyntax) && !C5 && (C5 = !0, console.warn('You are u\
|
|
sing import attributes, without specifying the desired output syntax.\nPlease specify the "importAttributesKeyword" generator option, whose v\
|
|
alue can be one of:\n - "with" : `import { a } from "b" with { type: "json" };`\n - "assert" : `import { a } from "b" assert { typ\
|
|
e: "json" };`\n - "with-legacy" : `import { a } from "b" with type: "json";`\n'));
|
|
let o = i === "assert" || !i && a;
|
|
if (this.word(o ? "assert" : "with"), this.space(), !o && (i === "with-legacy" || !i && (r = e.extra) != null && r.deprecatedWithLegacySyntax)) {
|
|
this.printList(n || a);
|
|
return;
|
|
}
|
|
let u = t ? 1 : 0;
|
|
this.token("{", null, u), this.space(), this.printList(n || a, this.shouldPrintTrailingComma("}")), this.space(), this.token("}", null, u);
|
|
}
|
|
s(TBe, "_printAttributes");
|
|
function CBe(e) {
|
|
var t, r;
|
|
this.word("export"), this.space(), e.exportKind === "type" && (this.word("type"), this.space()), this.tokenChar(42), this.space(), this.
|
|
word("from"), this.space(), (t = e.attributes) != null && t.length || (r = e.assertions) != null && r.length ? (this.print(e.source, !0),
|
|
this.space(), this._printAttributes(e, !1)) : this.print(e.source), this.semicolon();
|
|
}
|
|
s(CBe, "ExportAllDeclaration");
|
|
function A5(e, t) {
|
|
hBe(t.declaration) && e._shouldPrintDecoratorsBeforeExport(t) && e.printJoin(t.declaration.decorators);
|
|
}
|
|
s(A5, "maybePrintDecoratorsBeforeExport");
|
|
function wBe(e) {
|
|
if (A5(this, e), this.word("export"), this.space(), e.declaration) {
|
|
let i = e.declaration;
|
|
this.print(i), w5(i) || this.semicolon();
|
|
} else {
|
|
e.exportKind === "type" && (this.word("type"), this.space());
|
|
let i = e.specifiers.slice(0), n = !1;
|
|
for (; ; ) {
|
|
let o = i[0];
|
|
if (mBe(o) || yBe(o))
|
|
n = !0, this.print(i.shift()), i.length && (this.tokenChar(44), this.space());
|
|
else
|
|
break;
|
|
}
|
|
let a = !1;
|
|
if ((i.length || !i.length && !n) && (a = !0, this.tokenChar(123), i.length && (this.space(), this.printList(i, this.shouldPrintTrailingComma(
|
|
"}")), this.space()), this.tokenChar(125)), e.source) {
|
|
var t, r;
|
|
this.space(), this.word("from"), this.space(), (t = e.attributes) != null && t.length || (r = e.assertions) != null && r.length ? (this.
|
|
print(e.source, !0), this.space(), this._printAttributes(e, a)) : this.print(e.source);
|
|
}
|
|
this.semicolon();
|
|
}
|
|
}
|
|
s(wBe, "ExportNamedDeclaration");
|
|
function ABe(e) {
|
|
A5(this, e), this.word("export"), this.noIndentInnerCommentsHere(), this.space(), this.word("default"), this.space(), this.tokenContext |=
|
|
pBe.TokenContext.exportDefault;
|
|
let t = e.declaration;
|
|
this.print(t), w5(t) || this.semicolon();
|
|
}
|
|
s(ABe, "ExportDefaultDeclaration");
|
|
function _Be(e) {
|
|
var t, r;
|
|
this.word("import"), this.space();
|
|
let i = e.importKind === "type" || e.importKind === "typeof";
|
|
i ? (this.noIndentInnerCommentsHere(), this.word(e.importKind), this.space()) : e.module ? (this.noIndentInnerCommentsHere(), this.word(
|
|
"module"), this.space()) : e.phase && (this.noIndentInnerCommentsHere(), this.word(e.phase), this.space());
|
|
let n = e.specifiers.slice(0), a = !!n.length;
|
|
for (; a; ) {
|
|
let u = n[0];
|
|
if (gBe(u) || bBe(u))
|
|
this.print(n.shift()), n.length && (this.tokenChar(44), this.space());
|
|
else
|
|
break;
|
|
}
|
|
let o = !1;
|
|
n.length ? (o = !0, this.tokenChar(123), this.space(), this.printList(n, this.shouldPrintTrailingComma("}")), this.space(), this.tokenChar(
|
|
125)) : i && !a && (o = !0, this.tokenChar(123), this.tokenChar(125)), (a || i) && (this.space(), this.word("from"), this.space()), (t =
|
|
e.attributes) != null && t.length || (r = e.assertions) != null && r.length ? (this.print(e.source, !0), this.space(), this._printAttributes(
|
|
e, o)) : this.print(e.source), this.semicolon();
|
|
}
|
|
s(_Be, "ImportDeclaration");
|
|
function PBe(e) {
|
|
this.print(e.key), this.tokenChar(58), this.space(), this.print(e.value);
|
|
}
|
|
s(PBe, "ImportAttribute");
|
|
function FBe(e) {
|
|
this.tokenChar(42), this.space(), this.word("as"), this.space(), this.print(e.local);
|
|
}
|
|
s(FBe, "ImportNamespaceSpecifier");
|
|
function IBe(e) {
|
|
this.word("import"), e.phase && (this.tokenChar(46), this.word(e.phase)), this.tokenChar(40), this.print(e.source), e.options != null &&
|
|
(this.tokenChar(44), this.space(), this.print(e.options)), this.tokenChar(41);
|
|
}
|
|
s(IBe, "ImportExpression");
|
|
});
|
|
|
|
// ../node_modules/jsesc/jsesc.js
|
|
var I5 = E((hdt, F5) => {
|
|
"use strict";
|
|
var _5 = {}, OBe = _5.hasOwnProperty, P5 = /* @__PURE__ */ s((e, t) => {
|
|
for (let r in e)
|
|
OBe.call(e, r) && t(r, e[r]);
|
|
}, "forOwn"), kBe = /* @__PURE__ */ s((e, t) => (t && P5(t, (r, i) => {
|
|
e[r] = i;
|
|
}), e), "extend"), BBe = /* @__PURE__ */ s((e, t) => {
|
|
let r = e.length, i = -1;
|
|
for (; ++i < r; )
|
|
t(e[i]);
|
|
}, "forEach"), a0 = /* @__PURE__ */ s((e) => "\\u" + ("0000" + e).slice(-4), "fourHexEscape"), Md = /* @__PURE__ */ s((e, t) => {
|
|
let r = e.toString(16);
|
|
return t ? r : r.toUpperCase();
|
|
}, "hexadecimal"), Rd = _5.toString, NBe = Array.isArray, MBe = /* @__PURE__ */ s((e) => typeof Buffer == "function" && Buffer.isBuffer(e),
|
|
"isBuffer"), RBe = /* @__PURE__ */ s((e) => Rd.call(e) == "[object Object]", "isObject"), jBe = /* @__PURE__ */ s((e) => typeof e == "stri\
|
|
ng" || Rd.call(e) == "[object String]", "isString"), LBe = /* @__PURE__ */ s((e) => typeof e == "number" || Rd.call(e) == "[object Number]",
|
|
"isNumber"), VC = /* @__PURE__ */ s((e) => typeof e == "bigint", "isBigInt"), qBe = /* @__PURE__ */ s((e) => typeof e == "function", "isFu\
|
|
nction"), UBe = /* @__PURE__ */ s((e) => Rd.call(e) == "[object Map]", "isMap"), WBe = /* @__PURE__ */ s((e) => Rd.call(e) == "[object Set]",
|
|
"isSet"), $Be = {
|
|
"\\": "\\\\",
|
|
"\b": "\\b",
|
|
"\f": "\\f",
|
|
"\n": "\\n",
|
|
"\r": "\\r",
|
|
" ": "\\t"
|
|
// `\v` is omitted intentionally, because in IE < 9, '\v' == 'v'.
|
|
// '\v': '\\x0B'
|
|
}, VBe = /[\\\b\f\n\r\t]/, HBe = /[0-9]/, KBe = /[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, zBe = /([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,
|
|
GBe = /([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g, $a = /* @__PURE__ */ s((e, t) => {
|
|
let r = /* @__PURE__ */ s(() => {
|
|
c = l, ++t.indentLevel, l = t.indent.repeat(t.indentLevel);
|
|
}, "increaseIndentation"), i = {
|
|
escapeEverything: !1,
|
|
minimal: !1,
|
|
isScriptContext: !1,
|
|
quotes: "single",
|
|
wrap: !1,
|
|
es6: !1,
|
|
json: !1,
|
|
compact: !0,
|
|
lowercaseHex: !1,
|
|
numbers: "decimal",
|
|
indent: " ",
|
|
indentLevel: 0,
|
|
__inline1__: !1,
|
|
__inline2__: !1
|
|
}, n = t && t.json;
|
|
n && (i.quotes = "double", i.wrap = !0), t = kBe(i, t), t.quotes != "single" && t.quotes != "double" && t.quotes != "backtick" && (t.quotes =
|
|
"single");
|
|
let a = t.quotes == "double" ? '"' : t.quotes == "backtick" ? "`" : "'", o = t.compact, u = t.lowercaseHex, l = t.indent.repeat(t.indentLevel),
|
|
c = "", f = t.__inline1__, m = t.__inline2__, h = o ? "" : `
|
|
`, d, y = !0, p = t.numbers == "binary", g = t.numbers == "octal", b = t.numbers == "decimal", D = t.numbers == "hexadecimal";
|
|
if (n && e && qBe(e.toJSON) && (e = e.toJSON()), !jBe(e)) {
|
|
if (UBe(e))
|
|
return e.size == 0 ? "new Map()" : (o || (t.__inline1__ = !0, t.__inline2__ = !1), "new Map(" + $a(Array.from(e), t) + ")");
|
|
if (WBe(e))
|
|
return e.size == 0 ? "new Set()" : "new Set(" + $a(Array.from(e), t) + ")";
|
|
if (MBe(e))
|
|
return e.length == 0 ? "Buffer.from([])" : "Buffer.from(" + $a(Array.from(e), t) + ")";
|
|
if (NBe(e))
|
|
return d = [], t.wrap = !0, f && (t.__inline1__ = !1, t.__inline2__ = !0), m || r(), BBe(e, (S) => {
|
|
y = !1, m && (t.__inline2__ = !1), d.push(
|
|
(o || m ? "" : l) + $a(S, t)
|
|
);
|
|
}), y ? "[]" : m ? "[" + d.join(", ") + "]" : "[" + h + d.join("," + h) + h + (o ? "" : c) + "]";
|
|
if (LBe(e) || VC(e)) {
|
|
if (n)
|
|
return JSON.stringify(Number(e));
|
|
let S;
|
|
if (b)
|
|
S = String(e);
|
|
else if (D) {
|
|
let C = e.toString(16);
|
|
u || (C = C.toUpperCase()), S = "0x" + C;
|
|
} else p ? S = "0b" + e.toString(2) : g && (S = "0o" + e.toString(8));
|
|
return VC(e) ? S + "n" : S;
|
|
} else return VC(e) ? n ? JSON.stringify(Number(e)) : e + "n" : RBe(e) ? (d = [], t.wrap = !0, r(), P5(e, (S, C) => {
|
|
y = !1, d.push(
|
|
(o ? "" : l) + $a(S, t) + ":" + (o ? "" : " ") + $a(C, t)
|
|
);
|
|
}), y ? "{}" : "{" + h + d.join("," + h) + h + (o ? "" : c) + "}") : n ? JSON.stringify(e) || "null" : String(e);
|
|
}
|
|
let v = t.escapeEverything ? zBe : GBe;
|
|
return d = e.replace(v, (S, C, O, k, U, j) => {
|
|
if (C) {
|
|
if (t.minimal) return C;
|
|
let R = C.charCodeAt(0), ee = C.charCodeAt(1);
|
|
if (t.es6) {
|
|
let re = (R - 55296) * 1024 + ee - 56320 + 65536;
|
|
return "\\u{" + Md(re, u) + "}";
|
|
}
|
|
return a0(Md(R, u)) + a0(Md(ee, u));
|
|
}
|
|
if (O)
|
|
return a0(Md(O.charCodeAt(0), u));
|
|
if (S == "\0" && !n && !HBe.test(j.charAt(U + 1)))
|
|
return "\\0";
|
|
if (k)
|
|
return k == a || t.escapeEverything ? "\\" + k : k;
|
|
if (VBe.test(S))
|
|
return $Be[S];
|
|
if (t.minimal && !KBe.test(S))
|
|
return S;
|
|
let K = Md(S.charCodeAt(0), u);
|
|
return n || K.length > 2 ? a0(K) : "\\x" + ("00" + K).slice(-2);
|
|
}), a == "`" && (d = d.replace(/\$\{/g, "\\${")), t.isScriptContext && (d = d.replace(/<\/(script|style)/gi, "<\\/$1").replace(/<!--/g, n ?
|
|
"\\u003C!--" : "\\x3C!--")), t.wrap && (d = a + d + a), d;
|
|
}, "jsesc");
|
|
$a.version = "3.0.2";
|
|
F5.exports = $a;
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/types.js
|
|
var KC = E((Yt) => {
|
|
"use strict";
|
|
Object.defineProperty(Yt, "__esModule", {
|
|
value: !0
|
|
});
|
|
Yt.ArgumentPlaceholder = QBe;
|
|
Yt.ArrayPattern = Yt.ArrayExpression = nNe;
|
|
Yt.BigIntLiteral = dNe;
|
|
Yt.BooleanLiteral = uNe;
|
|
Yt.Identifier = ZBe;
|
|
Yt.NullLiteral = lNe;
|
|
Yt.NumericLiteral = cNe;
|
|
Yt.ObjectPattern = Yt.ObjectExpression = tNe;
|
|
Yt.ObjectMethod = rNe;
|
|
Yt.ObjectProperty = iNe;
|
|
Yt.PipelineBareFunction = mNe;
|
|
Yt.PipelinePrimaryTopicReference = yNe;
|
|
Yt.PipelineTopicExpression = hNe;
|
|
Yt.RecordExpression = sNe;
|
|
Yt.RegExpLiteral = oNe;
|
|
Yt.SpreadElement = Yt.RestElement = eNe;
|
|
Yt.StringLiteral = fNe;
|
|
Yt.TopicReference = pNe;
|
|
Yt.TupleExpression = aNe;
|
|
Yt._getRawIdentifier = YBe;
|
|
var JBe = Ve(), B5 = I5(), {
|
|
isAssignmentPattern: XBe,
|
|
isIdentifier: HC
|
|
} = JBe, O5 = null, o0 = "";
|
|
function YBe(e) {
|
|
if (e === O5) return o0;
|
|
O5 = e;
|
|
let {
|
|
name: t
|
|
} = e, r = this.tokenMap.find(e, (i) => i.value === t);
|
|
return r ? (o0 = this._originalCode.slice(r.start, r.end), o0) : o0 = e.name;
|
|
}
|
|
s(YBe, "_getRawIdentifier");
|
|
function ZBe(e) {
|
|
var t;
|
|
this.sourceIdentifierName(((t = e.loc) == null ? void 0 : t.identifierName) || e.name), this.word(this.tokenMap ? this._getRawIdentifier(
|
|
e) : e.name);
|
|
}
|
|
s(ZBe, "Identifier");
|
|
function QBe() {
|
|
this.tokenChar(63);
|
|
}
|
|
s(QBe, "ArgumentPlaceholder");
|
|
function eNe(e) {
|
|
this.token("..."), this.print(e.argument);
|
|
}
|
|
s(eNe, "RestElement");
|
|
function tNe(e) {
|
|
let t = e.properties;
|
|
if (this.tokenChar(123), t.length) {
|
|
let r = this.enterDelimited();
|
|
this.space(), this.printList(t, this.shouldPrintTrailingComma("}"), !0, !0), this.space(), r();
|
|
}
|
|
this.sourceWithOffset("end", e.loc, -1), this.tokenChar(125);
|
|
}
|
|
s(tNe, "ObjectExpression");
|
|
function rNe(e) {
|
|
this.printJoin(e.decorators), this._methodHead(e), this.space(), this.print(e.body);
|
|
}
|
|
s(rNe, "ObjectMethod");
|
|
function iNe(e) {
|
|
if (this.printJoin(e.decorators), e.computed)
|
|
this.tokenChar(91), this.print(e.key), this.tokenChar(93);
|
|
else {
|
|
if (XBe(e.value) && HC(e.key) && e.key.name === e.value.left.name) {
|
|
this.print(e.value);
|
|
return;
|
|
}
|
|
if (this.print(e.key), e.shorthand && HC(e.key) && HC(e.value) && e.key.name === e.value.name)
|
|
return;
|
|
}
|
|
this.tokenChar(58), this.space(), this.print(e.value);
|
|
}
|
|
s(iNe, "ObjectProperty");
|
|
function nNe(e) {
|
|
let t = e.elements, r = t.length;
|
|
this.tokenChar(91);
|
|
let i = this.enterDelimited();
|
|
for (let n = 0; n < t.length; n++) {
|
|
let a = t[n];
|
|
a ? (n > 0 && this.space(), this.print(a), (n < r - 1 || this.shouldPrintTrailingComma("]")) && this.token(",", !1, n)) : this.token("\
|
|
,", !1, n);
|
|
}
|
|
i(), this.tokenChar(93);
|
|
}
|
|
s(nNe, "ArrayExpression");
|
|
function sNe(e) {
|
|
let t = e.properties, r, i;
|
|
if (this.format.recordAndTupleSyntaxType === "bar")
|
|
r = "{|", i = "|}";
|
|
else {
|
|
if (this.format.recordAndTupleSyntaxType !== "hash" && this.format.recordAndTupleSyntaxType != null)
|
|
throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)}\
|
|
received).`);
|
|
r = "#{", i = "}";
|
|
}
|
|
this.token(r), t.length && (this.space(), this.printList(t, this.shouldPrintTrailingComma(i), !0, !0), this.space()), this.token(i);
|
|
}
|
|
s(sNe, "RecordExpression");
|
|
function aNe(e) {
|
|
let t = e.elements, r = t.length, i, n;
|
|
if (this.format.recordAndTupleSyntaxType === "bar")
|
|
i = "[|", n = "|]";
|
|
else if (this.format.recordAndTupleSyntaxType === "hash")
|
|
i = "#[", n = "]";
|
|
else
|
|
throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);
|
|
this.token(i);
|
|
for (let a = 0; a < t.length; a++) {
|
|
let o = t[a];
|
|
o && (a > 0 && this.space(), this.print(o), (a < r - 1 || this.shouldPrintTrailingComma(n)) && this.token(",", !1, a));
|
|
}
|
|
this.token(n);
|
|
}
|
|
s(aNe, "TupleExpression");
|
|
function oNe(e) {
|
|
this.word(`/${e.pattern}/${e.flags}`);
|
|
}
|
|
s(oNe, "RegExpLiteral");
|
|
function uNe(e) {
|
|
this.word(e.value ? "true" : "false");
|
|
}
|
|
s(uNe, "BooleanLiteral");
|
|
function lNe() {
|
|
this.word("null");
|
|
}
|
|
s(lNe, "NullLiteral");
|
|
function cNe(e) {
|
|
let t = this.getPossibleRaw(e), r = this.format.jsescOption, i = e.value, n = i + "";
|
|
r.numbers ? this.number(B5(i, r), i) : t == null ? this.number(n, i) : this.format.minified ? this.number(t.length < n.length ? t : n, i) :
|
|
this.number(t, i);
|
|
}
|
|
s(cNe, "NumericLiteral");
|
|
function fNe(e) {
|
|
let t = this.getPossibleRaw(e);
|
|
if (!this.format.minified && t !== void 0) {
|
|
this.token(t);
|
|
return;
|
|
}
|
|
let r = B5(e.value, this.format.jsescOption);
|
|
this.token(r);
|
|
}
|
|
s(fNe, "StringLiteral");
|
|
function dNe(e) {
|
|
let t = this.getPossibleRaw(e);
|
|
if (!this.format.minified && t !== void 0) {
|
|
this.word(t);
|
|
return;
|
|
}
|
|
this.word(e.value + "n");
|
|
}
|
|
s(dNe, "BigIntLiteral");
|
|
var k5 = /* @__PURE__ */ new Set(["^^", "@@", "^", "%", "#"]);
|
|
function pNe() {
|
|
let {
|
|
topicToken: e
|
|
} = this.format;
|
|
if (k5.has(e))
|
|
this.token(e);
|
|
else {
|
|
let t = JSON.stringify(e), r = Array.from(k5, (i) => JSON.stringify(i));
|
|
throw new Error(`The "topicToken" generator option must be one of ${r.join(", ")} (${t} received instead).`);
|
|
}
|
|
}
|
|
s(pNe, "TopicReference");
|
|
function hNe(e) {
|
|
this.print(e.expression);
|
|
}
|
|
s(hNe, "PipelineTopicExpression");
|
|
function mNe(e) {
|
|
this.print(e.callee);
|
|
}
|
|
s(mNe, "PipelineBareFunction");
|
|
function yNe() {
|
|
this.tokenChar(35);
|
|
}
|
|
s(yNe, "PipelinePrimaryTopicReference");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/flow.js
|
|
var M5 = E((_e) => {
|
|
"use strict";
|
|
Object.defineProperty(_e, "__esModule", {
|
|
value: !0
|
|
});
|
|
_e.AnyTypeAnnotation = ENe;
|
|
_e.ArrayTypeAnnotation = xNe;
|
|
_e.BooleanLiteralTypeAnnotation = TNe;
|
|
_e.BooleanTypeAnnotation = SNe;
|
|
_e.DeclareClass = wNe;
|
|
_e.DeclareExportAllDeclaration = RNe;
|
|
_e.DeclareExportDeclaration = MNe;
|
|
_e.DeclareFunction = ANe;
|
|
_e.DeclareInterface = FNe;
|
|
_e.DeclareModule = INe;
|
|
_e.DeclareModuleExports = ONe;
|
|
_e.DeclareOpaqueType = BNe;
|
|
_e.DeclareTypeAlias = kNe;
|
|
_e.DeclareVariable = NNe;
|
|
_e.DeclaredPredicate = PNe;
|
|
_e.EmptyTypeAnnotation = s8e;
|
|
_e.EnumBooleanBody = LNe;
|
|
_e.EnumBooleanMember = VNe;
|
|
_e.EnumDeclaration = jNe;
|
|
_e.EnumDefaultedMember = $Ne;
|
|
_e.EnumNumberBody = qNe;
|
|
_e.EnumNumberMember = HNe;
|
|
_e.EnumStringBody = UNe;
|
|
_e.EnumStringMember = KNe;
|
|
_e.EnumSymbolBody = WNe;
|
|
_e.ExistsTypeAnnotation = GNe;
|
|
_e.FunctionTypeAnnotation = JNe;
|
|
_e.FunctionTypeParam = XNe;
|
|
_e.IndexedAccessType = F8e;
|
|
_e.InferredPredicate = _Ne;
|
|
_e.InterfaceDeclaration = e8e;
|
|
_e.GenericTypeAnnotation = _e.ClassImplements = _e.InterfaceExtends = YNe;
|
|
_e.InterfaceTypeAnnotation = r8e;
|
|
_e.IntersectionTypeAnnotation = i8e;
|
|
_e.MixedTypeAnnotation = n8e;
|
|
_e.NullLiteralTypeAnnotation = CNe;
|
|
_e.NullableTypeAnnotation = a8e;
|
|
Object.defineProperty(_e, "NumberLiteralTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N5.NumericLiteral;
|
|
}, "get")
|
|
});
|
|
_e.NumberTypeAnnotation = o8e;
|
|
_e.ObjectTypeAnnotation = g8e;
|
|
_e.ObjectTypeCallProperty = D8e;
|
|
_e.ObjectTypeIndexer = v8e;
|
|
_e.ObjectTypeInternalSlot = b8e;
|
|
_e.ObjectTypeProperty = E8e;
|
|
_e.ObjectTypeSpreadProperty = x8e;
|
|
_e.OpaqueType = y8e;
|
|
_e.OptionalIndexedAccessType = I8e;
|
|
_e.QualifiedTypeIdentifier = S8e;
|
|
Object.defineProperty(_e, "StringLiteralTypeAnnotation", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return N5.StringLiteral;
|
|
}, "get")
|
|
});
|
|
_e.StringTypeAnnotation = u8e;
|
|
_e.SymbolTypeAnnotation = T8e;
|
|
_e.ThisTypeAnnotation = l8e;
|
|
_e.TupleTypeAnnotation = c8e;
|
|
_e.TypeAlias = d8e;
|
|
_e.TypeAnnotation = p8e;
|
|
_e.TypeCastExpression = A8e;
|
|
_e.TypeParameter = m8e;
|
|
_e.TypeParameterDeclaration = _e.TypeParameterInstantiation = h8e;
|
|
_e.TypeofTypeAnnotation = f8e;
|
|
_e.UnionTypeAnnotation = w8e;
|
|
_e.Variance = _8e;
|
|
_e.VoidTypeAnnotation = P8e;
|
|
_e._interfaceish = ZNe;
|
|
_e._variance = QNe;
|
|
var gNe = Ve(), bNe = $C(), DNe = Wa(), N5 = KC(), {
|
|
isDeclareExportDeclaration: u0,
|
|
isStatement: vNe
|
|
} = gNe;
|
|
function ENe() {
|
|
this.word("any");
|
|
}
|
|
s(ENe, "AnyTypeAnnotation");
|
|
function xNe(e) {
|
|
this.print(e.elementType, !0), this.tokenChar(91), this.tokenChar(93);
|
|
}
|
|
s(xNe, "ArrayTypeAnnotation");
|
|
function SNe() {
|
|
this.word("boolean");
|
|
}
|
|
s(SNe, "BooleanTypeAnnotation");
|
|
function TNe(e) {
|
|
this.word(e.value ? "true" : "false");
|
|
}
|
|
s(TNe, "BooleanLiteralTypeAnnotation");
|
|
function CNe() {
|
|
this.word("null");
|
|
}
|
|
s(CNe, "NullLiteralTypeAnnotation");
|
|
function wNe(e, t) {
|
|
u0(t) || (this.word("declare"), this.space()), this.word("class"), this.space(), this._interfaceish(e);
|
|
}
|
|
s(wNe, "DeclareClass");
|
|
function ANe(e, t) {
|
|
u0(t) || (this.word("declare"), this.space()), this.word("function"), this.space(), this.print(e.id), this.print(e.id.typeAnnotation.typeAnnotation),
|
|
e.predicate && (this.space(), this.print(e.predicate)), this.semicolon();
|
|
}
|
|
s(ANe, "DeclareFunction");
|
|
function _Ne() {
|
|
this.tokenChar(37), this.word("checks");
|
|
}
|
|
s(_Ne, "InferredPredicate");
|
|
function PNe(e) {
|
|
this.tokenChar(37), this.word("checks"), this.tokenChar(40), this.print(e.value), this.tokenChar(41);
|
|
}
|
|
s(PNe, "DeclaredPredicate");
|
|
function FNe(e) {
|
|
this.word("declare"), this.space(), this.InterfaceDeclaration(e);
|
|
}
|
|
s(FNe, "DeclareInterface");
|
|
function INe(e) {
|
|
this.word("declare"), this.space(), this.word("module"), this.space(), this.print(e.id), this.space(), this.print(e.body);
|
|
}
|
|
s(INe, "DeclareModule");
|
|
function ONe(e) {
|
|
this.word("declare"), this.space(), this.word("module"), this.tokenChar(46), this.word("exports"), this.print(e.typeAnnotation);
|
|
}
|
|
s(ONe, "DeclareModuleExports");
|
|
function kNe(e) {
|
|
this.word("declare"), this.space(), this.TypeAlias(e);
|
|
}
|
|
s(kNe, "DeclareTypeAlias");
|
|
function BNe(e, t) {
|
|
u0(t) || (this.word("declare"), this.space()), this.OpaqueType(e);
|
|
}
|
|
s(BNe, "DeclareOpaqueType");
|
|
function NNe(e, t) {
|
|
u0(t) || (this.word("declare"), this.space()), this.word("var"), this.space(), this.print(e.id), this.print(e.id.typeAnnotation), this.semicolon();
|
|
}
|
|
s(NNe, "DeclareVariable");
|
|
function MNe(e) {
|
|
this.word("declare"), this.space(), this.word("export"), this.space(), e.default && (this.word("default"), this.space()), zNe.call(this,
|
|
e);
|
|
}
|
|
s(MNe, "DeclareExportDeclaration");
|
|
function RNe(e) {
|
|
this.word("declare"), this.space(), bNe.ExportAllDeclaration.call(this, e);
|
|
}
|
|
s(RNe, "DeclareExportAllDeclaration");
|
|
function jNe(e) {
|
|
let {
|
|
id: t,
|
|
body: r
|
|
} = e;
|
|
this.word("enum"), this.space(), this.print(t), this.print(r);
|
|
}
|
|
s(jNe, "EnumDeclaration");
|
|
function l0(e, t, r) {
|
|
r && (e.space(), e.word("of"), e.space(), e.word(t)), e.space();
|
|
}
|
|
s(l0, "enumExplicitType");
|
|
function c0(e, t) {
|
|
let {
|
|
members: r
|
|
} = t;
|
|
e.token("{"), e.indent(), e.newline();
|
|
for (let i of r)
|
|
e.print(i), e.newline();
|
|
t.hasUnknownMembers && (e.token("..."), e.newline()), e.dedent(), e.token("}");
|
|
}
|
|
s(c0, "enumBody");
|
|
function LNe(e) {
|
|
let {
|
|
explicitType: t
|
|
} = e;
|
|
l0(this, "boolean", t), c0(this, e);
|
|
}
|
|
s(LNe, "EnumBooleanBody");
|
|
function qNe(e) {
|
|
let {
|
|
explicitType: t
|
|
} = e;
|
|
l0(this, "number", t), c0(this, e);
|
|
}
|
|
s(qNe, "EnumNumberBody");
|
|
function UNe(e) {
|
|
let {
|
|
explicitType: t
|
|
} = e;
|
|
l0(this, "string", t), c0(this, e);
|
|
}
|
|
s(UNe, "EnumStringBody");
|
|
function WNe(e) {
|
|
l0(this, "symbol", !0), c0(this, e);
|
|
}
|
|
s(WNe, "EnumSymbolBody");
|
|
function $Ne(e) {
|
|
let {
|
|
id: t
|
|
} = e;
|
|
this.print(t), this.tokenChar(44);
|
|
}
|
|
s($Ne, "EnumDefaultedMember");
|
|
function zC(e, t) {
|
|
e.print(t.id), e.space(), e.token("="), e.space(), e.print(t.init), e.token(",");
|
|
}
|
|
s(zC, "enumInitializedMember");
|
|
function VNe(e) {
|
|
zC(this, e);
|
|
}
|
|
s(VNe, "EnumBooleanMember");
|
|
function HNe(e) {
|
|
zC(this, e);
|
|
}
|
|
s(HNe, "EnumNumberMember");
|
|
function KNe(e) {
|
|
zC(this, e);
|
|
}
|
|
s(KNe, "EnumStringMember");
|
|
function zNe(e) {
|
|
if (e.declaration) {
|
|
let t = e.declaration;
|
|
this.print(t), vNe(t) || this.semicolon();
|
|
} else
|
|
this.tokenChar(123), e.specifiers.length && (this.space(), this.printList(e.specifiers), this.space()), this.tokenChar(125), e.source &&
|
|
(this.space(), this.word("from"), this.space(), this.print(e.source)), this.semicolon();
|
|
}
|
|
s(zNe, "FlowExportDeclaration");
|
|
function GNe() {
|
|
this.tokenChar(42);
|
|
}
|
|
s(GNe, "ExistsTypeAnnotation");
|
|
function JNe(e, t) {
|
|
this.print(e.typeParameters), this.tokenChar(40), e.this && (this.word("this"), this.tokenChar(58), this.space(), this.print(e.this.typeAnnotation),
|
|
(e.params.length || e.rest) && (this.tokenChar(44), this.space())), this.printList(e.params), e.rest && (e.params.length && (this.tokenChar(
|
|
44), this.space()), this.token("..."), this.print(e.rest)), this.tokenChar(41);
|
|
let r = t?.type;
|
|
r != null && (r === "ObjectTypeCallProperty" || r === "ObjectTypeInternalSlot" || r === "DeclareFunction" || r === "ObjectTypeProperty" &&
|
|
t.method) ? this.tokenChar(58) : (this.space(), this.token("=>")), this.space(), this.print(e.returnType);
|
|
}
|
|
s(JNe, "FunctionTypeAnnotation");
|
|
function XNe(e) {
|
|
this.print(e.name), e.optional && this.tokenChar(63), e.name && (this.tokenChar(58), this.space()), this.print(e.typeAnnotation);
|
|
}
|
|
s(XNe, "FunctionTypeParam");
|
|
function YNe(e) {
|
|
this.print(e.id), this.print(e.typeParameters, !0);
|
|
}
|
|
s(YNe, "InterfaceExtends");
|
|
function ZNe(e) {
|
|
var t;
|
|
if (this.print(e.id), this.print(e.typeParameters), (t = e.extends) != null && t.length && (this.space(), this.word("extends"), this.space(),
|
|
this.printList(e.extends)), e.type === "DeclareClass") {
|
|
var r, i;
|
|
(r = e.mixins) != null && r.length && (this.space(), this.word("mixins"), this.space(), this.printList(e.mixins)), (i = e.implements) !=
|
|
null && i.length && (this.space(), this.word("implements"), this.space(), this.printList(e.implements));
|
|
}
|
|
this.space(), this.print(e.body);
|
|
}
|
|
s(ZNe, "_interfaceish");
|
|
function QNe(e) {
|
|
var t;
|
|
let r = (t = e.variance) == null ? void 0 : t.kind;
|
|
r != null && (r === "plus" ? this.tokenChar(43) : r === "minus" && this.tokenChar(45));
|
|
}
|
|
s(QNe, "_variance");
|
|
function e8e(e) {
|
|
this.word("interface"), this.space(), this._interfaceish(e);
|
|
}
|
|
s(e8e, "InterfaceDeclaration");
|
|
function t8e(e) {
|
|
this.space(), this.token("&", !1, e), this.space();
|
|
}
|
|
s(t8e, "andSeparator");
|
|
function r8e(e) {
|
|
var t;
|
|
this.word("interface"), (t = e.extends) != null && t.length && (this.space(), this.word("extends"), this.space(), this.printList(e.extends)),
|
|
this.space(), this.print(e.body);
|
|
}
|
|
s(r8e, "InterfaceTypeAnnotation");
|
|
function i8e(e) {
|
|
this.printJoin(e.types, void 0, void 0, t8e);
|
|
}
|
|
s(i8e, "IntersectionTypeAnnotation");
|
|
function n8e() {
|
|
this.word("mixed");
|
|
}
|
|
s(n8e, "MixedTypeAnnotation");
|
|
function s8e() {
|
|
this.word("empty");
|
|
}
|
|
s(s8e, "EmptyTypeAnnotation");
|
|
function a8e(e) {
|
|
this.tokenChar(63), this.print(e.typeAnnotation);
|
|
}
|
|
s(a8e, "NullableTypeAnnotation");
|
|
function o8e() {
|
|
this.word("number");
|
|
}
|
|
s(o8e, "NumberTypeAnnotation");
|
|
function u8e() {
|
|
this.word("string");
|
|
}
|
|
s(u8e, "StringTypeAnnotation");
|
|
function l8e() {
|
|
this.word("this");
|
|
}
|
|
s(l8e, "ThisTypeAnnotation");
|
|
function c8e(e) {
|
|
this.tokenChar(91), this.printList(e.types), this.tokenChar(93);
|
|
}
|
|
s(c8e, "TupleTypeAnnotation");
|
|
function f8e(e) {
|
|
this.word("typeof"), this.space(), this.print(e.argument);
|
|
}
|
|
s(f8e, "TypeofTypeAnnotation");
|
|
function d8e(e) {
|
|
this.word("type"), this.space(), this.print(e.id), this.print(e.typeParameters), this.space(), this.tokenChar(61), this.space(), this.print(
|
|
e.right), this.semicolon();
|
|
}
|
|
s(d8e, "TypeAlias");
|
|
function p8e(e, t) {
|
|
this.tokenChar(58), this.space(), t.type === "ArrowFunctionExpression" ? this.tokenContext |= DNe.TokenContext.arrowFlowReturnType : e.optional &&
|
|
this.tokenChar(63), this.print(e.typeAnnotation);
|
|
}
|
|
s(p8e, "TypeAnnotation");
|
|
function h8e(e) {
|
|
this.tokenChar(60), this.printList(e.params), this.tokenChar(62);
|
|
}
|
|
s(h8e, "TypeParameterInstantiation");
|
|
function m8e(e) {
|
|
this._variance(e), this.word(e.name), e.bound && this.print(e.bound), e.default && (this.space(), this.tokenChar(61), this.space(), this.
|
|
print(e.default));
|
|
}
|
|
s(m8e, "TypeParameter");
|
|
function y8e(e) {
|
|
this.word("opaque"), this.space(), this.word("type"), this.space(), this.print(e.id), this.print(e.typeParameters), e.supertype && (this.
|
|
tokenChar(58), this.space(), this.print(e.supertype)), e.impltype && (this.space(), this.tokenChar(61), this.space(), this.print(e.impltype)),
|
|
this.semicolon();
|
|
}
|
|
s(y8e, "OpaqueType");
|
|
function g8e(e) {
|
|
e.exact ? this.token("{|") : this.tokenChar(123);
|
|
let t = [...e.properties, ...e.callProperties || [], ...e.indexers || [], ...e.internalSlots || []];
|
|
t.length && (this.newline(), this.space(), this.printJoin(t, !0, !0, void 0, void 0, /* @__PURE__ */ s(function(i) {
|
|
if (i && !t[0]) return 1;
|
|
}, "addNewlines"), () => {
|
|
(t.length !== 1 || e.inexact) && (this.tokenChar(44), this.space());
|
|
}), this.space()), e.inexact && (this.indent(), this.token("..."), t.length && this.newline(), this.dedent()), e.exact ? this.token("|}") :
|
|
this.tokenChar(125);
|
|
}
|
|
s(g8e, "ObjectTypeAnnotation");
|
|
function b8e(e) {
|
|
e.static && (this.word("static"), this.space()), this.tokenChar(91), this.tokenChar(91), this.print(e.id), this.tokenChar(93), this.tokenChar(
|
|
93), e.optional && this.tokenChar(63), e.method || (this.tokenChar(58), this.space()), this.print(e.value);
|
|
}
|
|
s(b8e, "ObjectTypeInternalSlot");
|
|
function D8e(e) {
|
|
e.static && (this.word("static"), this.space()), this.print(e.value);
|
|
}
|
|
s(D8e, "ObjectTypeCallProperty");
|
|
function v8e(e) {
|
|
e.static && (this.word("static"), this.space()), this._variance(e), this.tokenChar(91), e.id && (this.print(e.id), this.tokenChar(58), this.
|
|
space()), this.print(e.key), this.tokenChar(93), this.tokenChar(58), this.space(), this.print(e.value);
|
|
}
|
|
s(v8e, "ObjectTypeIndexer");
|
|
function E8e(e) {
|
|
e.proto && (this.word("proto"), this.space()), e.static && (this.word("static"), this.space()), (e.kind === "get" || e.kind === "set") &&
|
|
(this.word(e.kind), this.space()), this._variance(e), this.print(e.key), e.optional && this.tokenChar(63), e.method || (this.tokenChar(58),
|
|
this.space()), this.print(e.value);
|
|
}
|
|
s(E8e, "ObjectTypeProperty");
|
|
function x8e(e) {
|
|
this.token("..."), this.print(e.argument);
|
|
}
|
|
s(x8e, "ObjectTypeSpreadProperty");
|
|
function S8e(e) {
|
|
this.print(e.qualification), this.tokenChar(46), this.print(e.id);
|
|
}
|
|
s(S8e, "QualifiedTypeIdentifier");
|
|
function T8e() {
|
|
this.word("symbol");
|
|
}
|
|
s(T8e, "SymbolTypeAnnotation");
|
|
function C8e(e) {
|
|
this.space(), this.token("|", !1, e), this.space();
|
|
}
|
|
s(C8e, "orSeparator");
|
|
function w8e(e) {
|
|
this.printJoin(e.types, void 0, void 0, C8e);
|
|
}
|
|
s(w8e, "UnionTypeAnnotation");
|
|
function A8e(e) {
|
|
this.tokenChar(40), this.print(e.expression), this.print(e.typeAnnotation), this.tokenChar(41);
|
|
}
|
|
s(A8e, "TypeCastExpression");
|
|
function _8e(e) {
|
|
e.kind === "plus" ? this.tokenChar(43) : this.tokenChar(45);
|
|
}
|
|
s(_8e, "Variance");
|
|
function P8e() {
|
|
this.word("void");
|
|
}
|
|
s(P8e, "VoidTypeAnnotation");
|
|
function F8e(e) {
|
|
this.print(e.objectType, !0), this.tokenChar(91), this.print(e.indexType), this.tokenChar(93);
|
|
}
|
|
s(F8e, "IndexedAccessType");
|
|
function I8e(e) {
|
|
this.print(e.objectType), e.optional && this.token("?."), this.tokenChar(91), this.print(e.indexType), this.tokenChar(93);
|
|
}
|
|
s(I8e, "OptionalIndexedAccessType");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/base.js
|
|
var R5 = E((Hs) => {
|
|
"use strict";
|
|
Object.defineProperty(Hs, "__esModule", {
|
|
value: !0
|
|
});
|
|
Hs.BlockStatement = B8e;
|
|
Hs.Directive = N8e;
|
|
Hs.DirectiveLiteral = j8e;
|
|
Hs.File = O8e;
|
|
Hs.InterpreterDirective = L8e;
|
|
Hs.Placeholder = q8e;
|
|
Hs.Program = k8e;
|
|
function O8e(e) {
|
|
e.program && this.print(e.program.interpreter), this.print(e.program);
|
|
}
|
|
s(O8e, "File");
|
|
function k8e(e) {
|
|
var t;
|
|
this.noIndentInnerCommentsHere(), this.printInnerComments();
|
|
let r = (t = e.directives) == null ? void 0 : t.length;
|
|
if (r) {
|
|
var i;
|
|
let n = e.body.length ? 2 : 1;
|
|
this.printSequence(e.directives, void 0, n), (i = e.directives[r - 1].trailingComments) != null && i.length || this.newline(n);
|
|
}
|
|
this.printSequence(e.body);
|
|
}
|
|
s(k8e, "Program");
|
|
function B8e(e) {
|
|
var t;
|
|
this.tokenChar(123);
|
|
let r = this.enterDelimited(), i = (t = e.directives) == null ? void 0 : t.length;
|
|
if (i) {
|
|
var n;
|
|
let a = e.body.length ? 2 : 1;
|
|
this.printSequence(e.directives, !0, a), (n = e.directives[i - 1].trailingComments) != null && n.length || this.newline(a);
|
|
}
|
|
this.printSequence(e.body, !0), r(), this.rightBrace(e);
|
|
}
|
|
s(B8e, "BlockStatement");
|
|
function N8e(e) {
|
|
this.print(e.value), this.semicolon();
|
|
}
|
|
s(N8e, "Directive");
|
|
var M8e = /(?:^|[^\\])(?:\\\\)*'/, R8e = /(?:^|[^\\])(?:\\\\)*"/;
|
|
function j8e(e) {
|
|
let t = this.getPossibleRaw(e);
|
|
if (!this.format.minified && t !== void 0) {
|
|
this.token(t);
|
|
return;
|
|
}
|
|
let {
|
|
value: r
|
|
} = e;
|
|
if (!R8e.test(r))
|
|
this.token(`"${r}"`);
|
|
else if (!M8e.test(r))
|
|
this.token(`'${r}'`);
|
|
else
|
|
throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");
|
|
}
|
|
s(j8e, "DirectiveLiteral");
|
|
function L8e(e) {
|
|
this.token(`#!${e.value}`), this.newline(1, !0);
|
|
}
|
|
s(L8e, "InterpreterDirective");
|
|
function q8e(e) {
|
|
this.token("%%"), this.print(e.name), this.token("%%"), e.expectedNode === "Statement" && this.semicolon();
|
|
}
|
|
s(q8e, "Placeholder");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/jsx.js
|
|
var j5 = E((Kr) => {
|
|
"use strict";
|
|
Object.defineProperty(Kr, "__esModule", {
|
|
value: !0
|
|
});
|
|
Kr.JSXAttribute = U8e;
|
|
Kr.JSXClosingElement = Z8e;
|
|
Kr.JSXClosingFragment = r6e;
|
|
Kr.JSXElement = J8e;
|
|
Kr.JSXEmptyExpression = Q8e;
|
|
Kr.JSXExpressionContainer = K8e;
|
|
Kr.JSXFragment = e6e;
|
|
Kr.JSXIdentifier = W8e;
|
|
Kr.JSXMemberExpression = V8e;
|
|
Kr.JSXNamespacedName = $8e;
|
|
Kr.JSXOpeningElement = Y8e;
|
|
Kr.JSXOpeningFragment = t6e;
|
|
Kr.JSXSpreadAttribute = H8e;
|
|
Kr.JSXSpreadChild = z8e;
|
|
Kr.JSXText = G8e;
|
|
function U8e(e) {
|
|
this.print(e.name), e.value && (this.tokenChar(61), this.print(e.value));
|
|
}
|
|
s(U8e, "JSXAttribute");
|
|
function W8e(e) {
|
|
this.word(e.name);
|
|
}
|
|
s(W8e, "JSXIdentifier");
|
|
function $8e(e) {
|
|
this.print(e.namespace), this.tokenChar(58), this.print(e.name);
|
|
}
|
|
s($8e, "JSXNamespacedName");
|
|
function V8e(e) {
|
|
this.print(e.object), this.tokenChar(46), this.print(e.property);
|
|
}
|
|
s(V8e, "JSXMemberExpression");
|
|
function H8e(e) {
|
|
this.tokenChar(123), this.token("..."), this.print(e.argument), this.rightBrace(e);
|
|
}
|
|
s(H8e, "JSXSpreadAttribute");
|
|
function K8e(e) {
|
|
this.tokenChar(123), this.print(e.expression), this.rightBrace(e);
|
|
}
|
|
s(K8e, "JSXExpressionContainer");
|
|
function z8e(e) {
|
|
this.tokenChar(123), this.token("..."), this.print(e.expression), this.rightBrace(e);
|
|
}
|
|
s(z8e, "JSXSpreadChild");
|
|
function G8e(e) {
|
|
let t = this.getPossibleRaw(e);
|
|
t !== void 0 ? this.token(t, !0) : this.token(e.value, !0);
|
|
}
|
|
s(G8e, "JSXText");
|
|
function J8e(e) {
|
|
let t = e.openingElement;
|
|
if (this.print(t), !t.selfClosing) {
|
|
this.indent();
|
|
for (let r of e.children)
|
|
this.print(r);
|
|
this.dedent(), this.print(e.closingElement);
|
|
}
|
|
}
|
|
s(J8e, "JSXElement");
|
|
function X8e() {
|
|
this.space();
|
|
}
|
|
s(X8e, "spaceSeparator");
|
|
function Y8e(e) {
|
|
this.tokenChar(60), this.print(e.name), e.typeArguments && this.print(e.typeArguments), this.print(e.typeParameters), e.attributes.length >
|
|
0 && (this.space(), this.printJoin(e.attributes, void 0, void 0, X8e)), e.selfClosing && (this.space(), this.tokenChar(47)), this.tokenChar(
|
|
62);
|
|
}
|
|
s(Y8e, "JSXOpeningElement");
|
|
function Z8e(e) {
|
|
this.tokenChar(60), this.tokenChar(47), this.print(e.name), this.tokenChar(62);
|
|
}
|
|
s(Z8e, "JSXClosingElement");
|
|
function Q8e() {
|
|
this.printInnerComments();
|
|
}
|
|
s(Q8e, "JSXEmptyExpression");
|
|
function e6e(e) {
|
|
this.print(e.openingFragment), this.indent();
|
|
for (let t of e.children)
|
|
this.print(t);
|
|
this.dedent(), this.print(e.closingFragment);
|
|
}
|
|
s(e6e, "JSXFragment");
|
|
function t6e() {
|
|
this.tokenChar(60), this.tokenChar(62);
|
|
}
|
|
s(t6e, "JSXOpeningFragment");
|
|
function r6e() {
|
|
this.token("</"), this.tokenChar(62);
|
|
}
|
|
s(r6e, "JSXClosingFragment");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/typescript.js
|
|
var $5 = E((we) => {
|
|
"use strict";
|
|
Object.defineProperty(we, "__esModule", {
|
|
value: !0
|
|
});
|
|
we.TSAnyKeyword = y6e;
|
|
we.TSArrayType = R6e;
|
|
we.TSSatisfiesExpression = we.TSAsExpression = r4e;
|
|
we.TSBigIntKeyword = g6e;
|
|
we.TSBooleanKeyword = E6e;
|
|
we.TSCallSignatureDeclaration = c6e;
|
|
we.TSInterfaceHeritage = we.TSClassImplements = Z6e;
|
|
we.TSConditionalType = V6e;
|
|
we.TSConstructSignatureDeclaration = f6e;
|
|
we.TSConstructorType = I6e;
|
|
we.TSDeclareFunction = o6e;
|
|
we.TSDeclareMethod = u6e;
|
|
we.TSEnumBody = W5;
|
|
we.TSEnumDeclaration = s4e;
|
|
we.TSEnumMember = a4e;
|
|
we.TSExportAssignment = p4e;
|
|
we.TSExternalModuleReference = f4e;
|
|
we.TSFunctionType = F6e;
|
|
we.TSImportEqualsDeclaration = c4e;
|
|
we.TSImportType = l4e;
|
|
we.TSIndexSignature = m6e;
|
|
we.TSIndexedAccessType = G6e;
|
|
we.TSInferType = H6e;
|
|
we.TSInstantiationExpression = n4e;
|
|
we.TSInterfaceBody = e4e;
|
|
we.TSInterfaceDeclaration = Q6e;
|
|
we.TSIntersectionType = $6e;
|
|
we.TSIntrinsicKeyword = _6e;
|
|
we.TSLiteralType = Y6e;
|
|
we.TSMappedType = J6e;
|
|
we.TSMethodSignature = h6e;
|
|
we.TSModuleBlock = u4e;
|
|
we.TSModuleDeclaration = o4e;
|
|
we.TSNamedTupleMember = U6e;
|
|
we.TSNamespaceExportDeclaration = h4e;
|
|
we.TSNeverKeyword = A6e;
|
|
we.TSNonNullExpression = d4e;
|
|
we.TSNullKeyword = w6e;
|
|
we.TSNumberKeyword = D6e;
|
|
we.TSObjectKeyword = v6e;
|
|
we.TSOptionalType = L6e;
|
|
we.TSParameterProperty = a6e;
|
|
we.TSParenthesizedType = K6e;
|
|
we.TSPropertySignature = d6e;
|
|
we.TSQualifiedName = l6e;
|
|
we.TSRestType = q6e;
|
|
we.TSStringKeyword = x6e;
|
|
we.TSSymbolKeyword = S6e;
|
|
we.TSTemplateLiteralType = X6e;
|
|
we.TSThisType = P6e;
|
|
we.TSTupleType = j6e;
|
|
we.TSTypeAliasDeclaration = t4e;
|
|
we.TSTypeAnnotation = i6e;
|
|
we.TSTypeAssertion = i4e;
|
|
we.TSTypeLiteral = M6e;
|
|
we.TSTypeOperator = z6e;
|
|
we.TSTypeParameter = s6e;
|
|
we.TSTypeParameterDeclaration = we.TSTypeParameterInstantiation = n6e;
|
|
we.TSTypePredicate = B6e;
|
|
we.TSTypeQuery = N6e;
|
|
we.TSTypeReference = k6e;
|
|
we.TSUndefinedKeyword = C6e;
|
|
we.TSUnionType = W6e;
|
|
we.TSUnknownKeyword = b6e;
|
|
we.TSVoidKeyword = T6e;
|
|
we.tsPrintClassMemberModifiers = y4e;
|
|
we.tsPrintFunctionOrConstructorType = O6e;
|
|
we.tsPrintPropertyOrMethodName = p6e;
|
|
we.tsPrintSignatureDeclarationBase = m4e;
|
|
function i6e(e, t) {
|
|
this.token((t.type === "TSFunctionType" || t.type === "TSConstructorType") && t.typeAnnotation === e ? "=>" : ":"), this.space(), e.optional &&
|
|
this.tokenChar(63), this.print(e.typeAnnotation);
|
|
}
|
|
s(i6e, "TSTypeAnnotation");
|
|
function n6e(e, t) {
|
|
this.tokenChar(60);
|
|
let r = t.type === "ArrowFunctionExpression" && e.params.length === 1;
|
|
this.tokenMap && e.start != null && e.end != null && (r && (r = !!this.tokenMap.find(e, (i) => this.tokenMap.matchesOriginal(i, ","))), r ||
|
|
(r = this.shouldPrintTrailingComma(">"))), this.printList(e.params, r), this.tokenChar(62);
|
|
}
|
|
s(n6e, "TSTypeParameterInstantiation");
|
|
function s6e(e) {
|
|
e.in && (this.word("in"), this.space()), e.out && (this.word("out"), this.space()), this.word(e.name), e.constraint && (this.space(), this.
|
|
word("extends"), this.space(), this.print(e.constraint)), e.default && (this.space(), this.tokenChar(61), this.space(), this.print(e.default));
|
|
}
|
|
s(s6e, "TSTypeParameter");
|
|
function a6e(e) {
|
|
e.accessibility && (this.word(e.accessibility), this.space()), e.readonly && (this.word("readonly"), this.space()), this._param(e.parameter);
|
|
}
|
|
s(a6e, "TSParameterProperty");
|
|
function o6e(e, t) {
|
|
e.declare && (this.word("declare"), this.space()), this._functionHead(e, t), this.semicolon();
|
|
}
|
|
s(o6e, "TSDeclareFunction");
|
|
function u6e(e) {
|
|
this._classMethodHead(e), this.semicolon();
|
|
}
|
|
s(u6e, "TSDeclareMethod");
|
|
function l6e(e) {
|
|
this.print(e.left), this.tokenChar(46), this.print(e.right);
|
|
}
|
|
s(l6e, "TSQualifiedName");
|
|
function c6e(e) {
|
|
this.tsPrintSignatureDeclarationBase(e), jd(this, e);
|
|
}
|
|
s(c6e, "TSCallSignatureDeclaration");
|
|
function jd(e, t) {
|
|
if (!e.tokenMap || !t.start || !t.end) {
|
|
e.semicolon();
|
|
return;
|
|
}
|
|
e.tokenMap.endMatches(t, ",") ? e.token(",") : e.tokenMap.endMatches(t, ";") && e.semicolon();
|
|
}
|
|
s(jd, "maybePrintTrailingCommaOrSemicolon");
|
|
function f6e(e) {
|
|
this.word("new"), this.space(), this.tsPrintSignatureDeclarationBase(e), jd(this, e);
|
|
}
|
|
s(f6e, "TSConstructSignatureDeclaration");
|
|
function d6e(e) {
|
|
let {
|
|
readonly: t
|
|
} = e;
|
|
t && (this.word("readonly"), this.space()), this.tsPrintPropertyOrMethodName(e), this.print(e.typeAnnotation), jd(this, e);
|
|
}
|
|
s(d6e, "TSPropertySignature");
|
|
function p6e(e) {
|
|
e.computed && this.tokenChar(91), this.print(e.key), e.computed && this.tokenChar(93), e.optional && this.tokenChar(63);
|
|
}
|
|
s(p6e, "tsPrintPropertyOrMethodName");
|
|
function h6e(e) {
|
|
let {
|
|
kind: t
|
|
} = e;
|
|
(t === "set" || t === "get") && (this.word(t), this.space()), this.tsPrintPropertyOrMethodName(e), this.tsPrintSignatureDeclarationBase(
|
|
e), jd(this, e);
|
|
}
|
|
s(h6e, "TSMethodSignature");
|
|
function m6e(e) {
|
|
let {
|
|
readonly: t,
|
|
static: r
|
|
} = e;
|
|
r && (this.word("static"), this.space()), t && (this.word("readonly"), this.space()), this.tokenChar(91), this._parameters(e.parameters,
|
|
"]"), this.print(e.typeAnnotation), jd(this, e);
|
|
}
|
|
s(m6e, "TSIndexSignature");
|
|
function y6e() {
|
|
this.word("any");
|
|
}
|
|
s(y6e, "TSAnyKeyword");
|
|
function g6e() {
|
|
this.word("bigint");
|
|
}
|
|
s(g6e, "TSBigIntKeyword");
|
|
function b6e() {
|
|
this.word("unknown");
|
|
}
|
|
s(b6e, "TSUnknownKeyword");
|
|
function D6e() {
|
|
this.word("number");
|
|
}
|
|
s(D6e, "TSNumberKeyword");
|
|
function v6e() {
|
|
this.word("object");
|
|
}
|
|
s(v6e, "TSObjectKeyword");
|
|
function E6e() {
|
|
this.word("boolean");
|
|
}
|
|
s(E6e, "TSBooleanKeyword");
|
|
function x6e() {
|
|
this.word("string");
|
|
}
|
|
s(x6e, "TSStringKeyword");
|
|
function S6e() {
|
|
this.word("symbol");
|
|
}
|
|
s(S6e, "TSSymbolKeyword");
|
|
function T6e() {
|
|
this.word("void");
|
|
}
|
|
s(T6e, "TSVoidKeyword");
|
|
function C6e() {
|
|
this.word("undefined");
|
|
}
|
|
s(C6e, "TSUndefinedKeyword");
|
|
function w6e() {
|
|
this.word("null");
|
|
}
|
|
s(w6e, "TSNullKeyword");
|
|
function A6e() {
|
|
this.word("never");
|
|
}
|
|
s(A6e, "TSNeverKeyword");
|
|
function _6e() {
|
|
this.word("intrinsic");
|
|
}
|
|
s(_6e, "TSIntrinsicKeyword");
|
|
function P6e() {
|
|
this.word("this");
|
|
}
|
|
s(P6e, "TSThisType");
|
|
function F6e(e) {
|
|
this.tsPrintFunctionOrConstructorType(e);
|
|
}
|
|
s(F6e, "TSFunctionType");
|
|
function I6e(e) {
|
|
e.abstract && (this.word("abstract"), this.space()), this.word("new"), this.space(), this.tsPrintFunctionOrConstructorType(e);
|
|
}
|
|
s(I6e, "TSConstructorType");
|
|
function O6e(e) {
|
|
let {
|
|
typeParameters: t
|
|
} = e, r = e.parameters;
|
|
this.print(t), this.tokenChar(40), this._parameters(r, ")"), this.space();
|
|
let i = e.typeAnnotation;
|
|
this.print(i);
|
|
}
|
|
s(O6e, "tsPrintFunctionOrConstructorType");
|
|
function k6e(e) {
|
|
let t = e.typeParameters;
|
|
this.print(e.typeName, !!t), this.print(t);
|
|
}
|
|
s(k6e, "TSTypeReference");
|
|
function B6e(e) {
|
|
e.asserts && (this.word("asserts"), this.space()), this.print(e.parameterName), e.typeAnnotation && (this.space(), this.word("is"), this.
|
|
space(), this.print(e.typeAnnotation.typeAnnotation));
|
|
}
|
|
s(B6e, "TSTypePredicate");
|
|
function N6e(e) {
|
|
this.word("typeof"), this.space(), this.print(e.exprName);
|
|
let t = e.typeParameters;
|
|
t && this.print(t);
|
|
}
|
|
s(N6e, "TSTypeQuery");
|
|
function M6e(e) {
|
|
f0(this, e, () => this.printJoin(e.members, !0, !0));
|
|
}
|
|
s(M6e, "TSTypeLiteral");
|
|
function R6e(e) {
|
|
this.print(e.elementType, !0), this.tokenChar(91), this.tokenChar(93);
|
|
}
|
|
s(R6e, "TSArrayType");
|
|
function j6e(e) {
|
|
this.tokenChar(91), this.printList(e.elementTypes, this.shouldPrintTrailingComma("]")), this.tokenChar(93);
|
|
}
|
|
s(j6e, "TSTupleType");
|
|
function L6e(e) {
|
|
this.print(e.typeAnnotation), this.tokenChar(63);
|
|
}
|
|
s(L6e, "TSOptionalType");
|
|
function q6e(e) {
|
|
this.token("..."), this.print(e.typeAnnotation);
|
|
}
|
|
s(q6e, "TSRestType");
|
|
function U6e(e) {
|
|
this.print(e.label), e.optional && this.tokenChar(63), this.tokenChar(58), this.space(), this.print(e.elementType);
|
|
}
|
|
s(U6e, "TSNamedTupleMember");
|
|
function W6e(e) {
|
|
U5(this, e, "|");
|
|
}
|
|
s(W6e, "TSUnionType");
|
|
function $6e(e) {
|
|
U5(this, e, "&");
|
|
}
|
|
s($6e, "TSIntersectionType");
|
|
function U5(e, t, r) {
|
|
var i;
|
|
let n = 0;
|
|
(i = e.tokenMap) != null && i.startMatches(t, r) && (n = 1, e.token(r)), e.printJoin(t.types, void 0, void 0, function(a) {
|
|
this.space(), this.token(r, null, a + n), this.space();
|
|
});
|
|
}
|
|
s(U5, "tsPrintUnionOrIntersectionType");
|
|
function V6e(e) {
|
|
this.print(e.checkType), this.space(), this.word("extends"), this.space(), this.print(e.extendsType), this.space(), this.tokenChar(63), this.
|
|
space(), this.print(e.trueType), this.space(), this.tokenChar(58), this.space(), this.print(e.falseType);
|
|
}
|
|
s(V6e, "TSConditionalType");
|
|
function H6e(e) {
|
|
this.word("infer"), this.print(e.typeParameter);
|
|
}
|
|
s(H6e, "TSInferType");
|
|
function K6e(e) {
|
|
this.tokenChar(40), this.print(e.typeAnnotation), this.tokenChar(41);
|
|
}
|
|
s(K6e, "TSParenthesizedType");
|
|
function z6e(e) {
|
|
this.word(e.operator), this.space(), this.print(e.typeAnnotation);
|
|
}
|
|
s(z6e, "TSTypeOperator");
|
|
function G6e(e) {
|
|
this.print(e.objectType, !0), this.tokenChar(91), this.print(e.indexType), this.tokenChar(93);
|
|
}
|
|
s(G6e, "TSIndexedAccessType");
|
|
function J6e(e) {
|
|
let {
|
|
nameType: t,
|
|
optional: r,
|
|
readonly: i,
|
|
typeAnnotation: n
|
|
} = e;
|
|
this.tokenChar(123);
|
|
let a = this.enterDelimited();
|
|
this.space(), i && (L5(this, i), this.word("readonly"), this.space()), this.tokenChar(91), this.word(e.typeParameter.name), this.space(),
|
|
this.word("in"), this.space(), this.print(e.typeParameter.constraint), t && (this.space(), this.word("as"), this.space(), this.print(t)),
|
|
this.tokenChar(93), r && (L5(this, r), this.tokenChar(63)), n && (this.tokenChar(58), this.space(), this.print(n)), this.space(), a(), this.
|
|
tokenChar(125);
|
|
}
|
|
s(J6e, "TSMappedType");
|
|
function L5(e, t) {
|
|
t !== !0 && e.token(t);
|
|
}
|
|
s(L5, "tokenIfPlusMinus");
|
|
function X6e(e) {
|
|
this._printTemplate(e, e.types);
|
|
}
|
|
s(X6e, "TSTemplateLiteralType");
|
|
function Y6e(e) {
|
|
this.print(e.literal);
|
|
}
|
|
s(Y6e, "TSLiteralType");
|
|
function Z6e(e) {
|
|
this.print(e.expression), this.print(e.typeArguments);
|
|
}
|
|
s(Z6e, "TSClassImplements");
|
|
function Q6e(e) {
|
|
let {
|
|
declare: t,
|
|
id: r,
|
|
typeParameters: i,
|
|
extends: n,
|
|
body: a
|
|
} = e;
|
|
t && (this.word("declare"), this.space()), this.word("interface"), this.space(), this.print(r), this.print(i), n != null && n.length && (this.
|
|
space(), this.word("extends"), this.space(), this.printList(n)), this.space(), this.print(a);
|
|
}
|
|
s(Q6e, "TSInterfaceDeclaration");
|
|
function e4e(e) {
|
|
f0(this, e, () => this.printJoin(e.body, !0, !0));
|
|
}
|
|
s(e4e, "TSInterfaceBody");
|
|
function t4e(e) {
|
|
let {
|
|
declare: t,
|
|
id: r,
|
|
typeParameters: i,
|
|
typeAnnotation: n
|
|
} = e;
|
|
t && (this.word("declare"), this.space()), this.word("type"), this.space(), this.print(r), this.print(i), this.space(), this.tokenChar(61),
|
|
this.space(), this.print(n), this.semicolon();
|
|
}
|
|
s(t4e, "TSTypeAliasDeclaration");
|
|
function r4e(e) {
|
|
let {
|
|
type: t,
|
|
expression: r,
|
|
typeAnnotation: i
|
|
} = e;
|
|
this.print(r, !0), this.space(), this.word(t === "TSAsExpression" ? "as" : "satisfies"), this.space(), this.print(i);
|
|
}
|
|
s(r4e, "TSTypeExpression");
|
|
function i4e(e) {
|
|
let {
|
|
typeAnnotation: t,
|
|
expression: r
|
|
} = e;
|
|
this.tokenChar(60), this.print(t), this.tokenChar(62), this.space(), this.print(r);
|
|
}
|
|
s(i4e, "TSTypeAssertion");
|
|
function n4e(e) {
|
|
this.print(e.expression), this.print(e.typeParameters);
|
|
}
|
|
s(n4e, "TSInstantiationExpression");
|
|
function s4e(e) {
|
|
let {
|
|
declare: t,
|
|
const: r,
|
|
id: i
|
|
} = e;
|
|
t && (this.word("declare"), this.space()), r && (this.word("const"), this.space()), this.word("enum"), this.space(), this.print(i), this.
|
|
space(), W5.call(this, e);
|
|
}
|
|
s(s4e, "TSEnumDeclaration");
|
|
function W5(e) {
|
|
f0(this, e, () => {
|
|
var t;
|
|
return this.printList(e.members, (t = this.shouldPrintTrailingComma("}")) != null ? t : !0, !0, !0);
|
|
});
|
|
}
|
|
s(W5, "TSEnumBody");
|
|
function a4e(e) {
|
|
let {
|
|
id: t,
|
|
initializer: r
|
|
} = e;
|
|
this.print(t), r && (this.space(), this.tokenChar(61), this.space(), this.print(r));
|
|
}
|
|
s(a4e, "TSEnumMember");
|
|
function o4e(e) {
|
|
let {
|
|
declare: t,
|
|
id: r,
|
|
kind: i
|
|
} = e;
|
|
t && (this.word("declare"), this.space());
|
|
{
|
|
if (e.global || (this.word(i ?? (r.type === "Identifier" ? "namespace" : "module")), this.space()), this.print(r), !e.body) {
|
|
this.semicolon();
|
|
return;
|
|
}
|
|
let n = e.body;
|
|
for (; n.type === "TSModuleDeclaration"; )
|
|
this.tokenChar(46), this.print(n.id), n = n.body;
|
|
this.space(), this.print(n);
|
|
}
|
|
}
|
|
s(o4e, "TSModuleDeclaration");
|
|
function u4e(e) {
|
|
f0(this, e, () => this.printSequence(e.body, !0));
|
|
}
|
|
s(u4e, "TSModuleBlock");
|
|
function l4e(e) {
|
|
let {
|
|
argument: t,
|
|
qualifier: r,
|
|
options: i
|
|
} = e;
|
|
this.word("import"), this.tokenChar(40), this.print(t), i && (this.tokenChar(44), this.print(i)), this.tokenChar(41), r && (this.tokenChar(
|
|
46), this.print(r));
|
|
let n = e.typeParameters;
|
|
n && this.print(n);
|
|
}
|
|
s(l4e, "TSImportType");
|
|
function c4e(e) {
|
|
let {
|
|
id: t,
|
|
moduleReference: r
|
|
} = e;
|
|
e.isExport && (this.word("export"), this.space()), this.word("import"), this.space(), this.print(t), this.space(), this.tokenChar(61), this.
|
|
space(), this.print(r), this.semicolon();
|
|
}
|
|
s(c4e, "TSImportEqualsDeclaration");
|
|
function f4e(e) {
|
|
this.token("require("), this.print(e.expression), this.tokenChar(41);
|
|
}
|
|
s(f4e, "TSExternalModuleReference");
|
|
function d4e(e) {
|
|
this.print(e.expression), this.tokenChar(33);
|
|
}
|
|
s(d4e, "TSNonNullExpression");
|
|
function p4e(e) {
|
|
this.word("export"), this.space(), this.tokenChar(61), this.space(), this.print(e.expression), this.semicolon();
|
|
}
|
|
s(p4e, "TSExportAssignment");
|
|
function h4e(e) {
|
|
this.word("export"), this.space(), this.word("as"), this.space(), this.word("namespace"), this.space(), this.print(e.id), this.semicolon();
|
|
}
|
|
s(h4e, "TSNamespaceExportDeclaration");
|
|
function m4e(e) {
|
|
let {
|
|
typeParameters: t
|
|
} = e, r = e.parameters;
|
|
this.print(t), this.tokenChar(40), this._parameters(r, ")");
|
|
let i = e.typeAnnotation;
|
|
this.print(i);
|
|
}
|
|
s(m4e, "tsPrintSignatureDeclarationBase");
|
|
function y4e(e) {
|
|
let t = e.type === "ClassPrivateProperty", r = e.type === "ClassAccessorProperty" || e.type === "ClassProperty";
|
|
q5(this, e, [r && e.declare && "declare", !t && e.accessibility]), e.static && (this.word("static"), this.space()), q5(this, e, [!t && e.
|
|
abstract && "abstract", !t && e.override && "override", (r || t) && e.readonly && "readonly"]);
|
|
}
|
|
s(y4e, "tsPrintClassMemberModifiers");
|
|
function f0(e, t, r) {
|
|
e.token("{");
|
|
let i = e.enterDelimited();
|
|
r(), i(), e.rightBrace(t);
|
|
}
|
|
s(f0, "printBraced");
|
|
function q5(e, t, r) {
|
|
var i;
|
|
let n = /* @__PURE__ */ new Set();
|
|
for (let a of r)
|
|
a && n.add(a);
|
|
(i = e.tokenMap) == null || i.find(t, (a) => {
|
|
if (n.has(a.value))
|
|
return e.token(a.value), e.space(), n.delete(a.value), n.size === 0;
|
|
});
|
|
for (let a of n)
|
|
e.word(a), e.space();
|
|
}
|
|
s(q5, "printModifiersList");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/index.js
|
|
var V5 = E((yt) => {
|
|
"use strict";
|
|
Object.defineProperty(yt, "__esModule", {
|
|
value: !0
|
|
});
|
|
var GC = y5();
|
|
Object.keys(GC).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in yt && yt[e] === GC[e] || Object.defineProperty(yt, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return GC[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var JC = b5();
|
|
Object.keys(JC).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in yt && yt[e] === JC[e] || Object.defineProperty(yt, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return JC[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var XC = x5();
|
|
Object.keys(XC).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in yt && yt[e] === XC[e] || Object.defineProperty(yt, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return XC[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var YC = S5();
|
|
Object.keys(YC).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in yt && yt[e] === YC[e] || Object.defineProperty(yt, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return YC[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var ZC = T5();
|
|
Object.keys(ZC).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in yt && yt[e] === ZC[e] || Object.defineProperty(yt, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return ZC[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var QC = $C();
|
|
Object.keys(QC).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in yt && yt[e] === QC[e] || Object.defineProperty(yt, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return QC[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var ew = KC();
|
|
Object.keys(ew).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in yt && yt[e] === ew[e] || Object.defineProperty(yt, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return ew[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var tw = M5();
|
|
Object.keys(tw).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in yt && yt[e] === tw[e] || Object.defineProperty(yt, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return tw[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var rw = R5();
|
|
Object.keys(rw).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in yt && yt[e] === rw[e] || Object.defineProperty(yt, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return rw[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var iw = j5();
|
|
Object.keys(iw).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in yt && yt[e] === iw[e] || Object.defineProperty(yt, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return iw[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
var nw = $5();
|
|
Object.keys(nw).forEach(function(e) {
|
|
e === "default" || e === "__esModule" || e in yt && yt[e] === nw[e] || Object.defineProperty(yt, e, {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return nw[e];
|
|
}, "get")
|
|
});
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/generators/deprecated.js
|
|
var H5 = E((sw) => {
|
|
"use strict";
|
|
Object.defineProperty(sw, "__esModule", {
|
|
value: !0
|
|
});
|
|
sw.addDeprecatedGenerators = g4e;
|
|
function g4e(e) {
|
|
{
|
|
let t = {
|
|
Noop() {
|
|
},
|
|
TSExpressionWithTypeArguments(r) {
|
|
this.print(r.expression), this.print(r.typeParameters);
|
|
},
|
|
DecimalLiteral(r) {
|
|
let i = this.getPossibleRaw(r);
|
|
if (!this.format.minified && i !== void 0) {
|
|
this.word(i);
|
|
return;
|
|
}
|
|
this.word(r.value + "m");
|
|
}
|
|
};
|
|
Object.assign(e.prototype, t);
|
|
}
|
|
}
|
|
s(g4e, "addDeprecatedGenerators");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/printer.js
|
|
var J5 = E((d0) => {
|
|
"use strict";
|
|
Object.defineProperty(d0, "__esModule", {
|
|
value: !0
|
|
});
|
|
d0.default = void 0;
|
|
var b4e = Z7(), z5 = Wa(), D4e = Ve(), v4e = m5(), E4e = V5(), x4e = H5(), {
|
|
isExpression: S4e,
|
|
isFunction: T4e,
|
|
isStatement: C4e,
|
|
isClassBody: w4e,
|
|
isTSInterfaceBody: A4e,
|
|
isTSEnumMember: _4e
|
|
} = D4e, P4e = /e/i, F4e = /\.0+$/, G5 = /[\n\r\u2028\u2029]/, I4e = /[\n\r\u2028\u2029]|\*\//;
|
|
function K5(e) {
|
|
return e.type === "CommentLine" || G5.test(e.value);
|
|
}
|
|
s(K5, "commentIsNewline");
|
|
var {
|
|
needsParens: O4e
|
|
} = z5, Ld = class {
|
|
static {
|
|
s(this, "Printer");
|
|
}
|
|
constructor(t, r, i, n) {
|
|
this.inForStatementInit = !1, this.tokenContext = 0, this._tokens = null, this._originalCode = null, this._currentNode = null, this._indent =
|
|
0, this._indentRepeat = 0, this._insideAux = !1, this._noLineTerminator = !1, this._noLineTerminatorAfterNode = null, this._printAuxAfterOnNextUserNode =
|
|
!1, this._printedComments = /* @__PURE__ */ new Set(), this._endsWithInteger = !1, this._endsWithWord = !1, this._endsWithDiv = !1, this.
|
|
_lastCommentLine = 0, this._endsWithInnerRaw = !1, this._indentInnerComments = !0, this.tokenMap = null, this._boundGetRawIdentifier =
|
|
this._getRawIdentifier.bind(this), this._printSemicolonBeforeNextNode = -1, this._printSemicolonBeforeNextToken = -1, this.format = t,
|
|
this._tokens = i, this._originalCode = n, this._indentRepeat = t.indent.style.length, this._inputMap = r?._inputMap, this._buf = new b4e.
|
|
default(r, t.indent.style[0]);
|
|
}
|
|
enterForStatementInit() {
|
|
return this.inForStatementInit ? () => {
|
|
} : (this.inForStatementInit = !0, () => {
|
|
this.inForStatementInit = !1;
|
|
});
|
|
}
|
|
enterDelimited() {
|
|
let t = this.inForStatementInit, r = this._noLineTerminatorAfterNode;
|
|
return t === !1 && r === null ? () => {
|
|
} : (this.inForStatementInit = !1, this._noLineTerminatorAfterNode = null, () => {
|
|
this.inForStatementInit = t, this._noLineTerminatorAfterNode = r;
|
|
});
|
|
}
|
|
generate(t) {
|
|
return this.format.preserveFormat && (this.tokenMap = new v4e.TokenMap(t, this._tokens, this._originalCode)), this.print(t), this._maybeAddAuxComment(),
|
|
this._buf.get();
|
|
}
|
|
indent() {
|
|
let {
|
|
format: t
|
|
} = this;
|
|
t.preserveFormat || t.compact || t.concise || this._indent++;
|
|
}
|
|
dedent() {
|
|
let {
|
|
format: t
|
|
} = this;
|
|
t.preserveFormat || t.compact || t.concise || this._indent--;
|
|
}
|
|
semicolon(t = !1) {
|
|
if (this._maybeAddAuxComment(), t) {
|
|
this._appendChar(59), this._noLineTerminator = !1;
|
|
return;
|
|
}
|
|
if (this.tokenMap) {
|
|
let r = this._currentNode;
|
|
if (r.start != null && r.end != null) {
|
|
if (!this.tokenMap.endMatches(r, ";")) {
|
|
this._printSemicolonBeforeNextNode = this._buf.getCurrentLine();
|
|
return;
|
|
}
|
|
let i = this.tokenMap.getIndexes(this._currentNode);
|
|
this._catchUpTo(this._tokens[i[i.length - 1]].loc.start);
|
|
}
|
|
}
|
|
this._queue(59), this._noLineTerminator = !1;
|
|
}
|
|
rightBrace(t) {
|
|
this.format.minified && this._buf.removeLastSemicolon(), this.sourceWithOffset("end", t.loc, -1), this.tokenChar(125);
|
|
}
|
|
rightParens(t) {
|
|
this.sourceWithOffset("end", t.loc, -1), this.tokenChar(41);
|
|
}
|
|
space(t = !1) {
|
|
let {
|
|
format: r
|
|
} = this;
|
|
if (!(r.compact || r.preserveFormat)) {
|
|
if (t)
|
|
this._space();
|
|
else if (this._buf.hasContent()) {
|
|
let i = this.getLastChar();
|
|
i !== 32 && i !== 10 && this._space();
|
|
}
|
|
}
|
|
}
|
|
word(t, r = !1) {
|
|
this.tokenContext = 0, this._maybePrintInnerComments(t), this._maybeAddAuxComment(), this.tokenMap && this._catchUpToCurrentToken(t), (this.
|
|
_endsWithWord || this._endsWithDiv && t.charCodeAt(0) === 47) && this._space(), this._append(t, !1), this._endsWithWord = !0, this._noLineTerminator =
|
|
r;
|
|
}
|
|
number(t, r) {
|
|
function i(n) {
|
|
if (n.length > 2 && n.charCodeAt(0) === 48) {
|
|
let a = n.charCodeAt(1);
|
|
return a === 98 || a === 111 || a === 120;
|
|
}
|
|
return !1;
|
|
}
|
|
s(i, "isNonDecimalLiteral"), this.word(t), this._endsWithInteger = Number.isInteger(r) && !i(t) && !P4e.test(t) && !F4e.test(t) && t.charCodeAt(
|
|
t.length - 1) !== 46;
|
|
}
|
|
token(t, r = !1, i = 0) {
|
|
this.tokenContext = 0, this._maybePrintInnerComments(t, i), this._maybeAddAuxComment(), this.tokenMap && this._catchUpToCurrentToken(t,
|
|
i);
|
|
let n = this.getLastChar(), a = t.charCodeAt(0);
|
|
(n === 33 && (t === "--" || a === 61) || a === 43 && n === 43 || a === 45 && n === 45 || a === 46 && this._endsWithInteger) && this._space(),
|
|
this._append(t, r), this._noLineTerminator = !1;
|
|
}
|
|
tokenChar(t) {
|
|
this.tokenContext = 0;
|
|
let r = String.fromCharCode(t);
|
|
this._maybePrintInnerComments(r), this._maybeAddAuxComment(), this.tokenMap && this._catchUpToCurrentToken(r);
|
|
let i = this.getLastChar();
|
|
(t === 43 && i === 43 || t === 45 && i === 45 || t === 46 && this._endsWithInteger) && this._space(), this._appendChar(t), this._noLineTerminator =
|
|
!1;
|
|
}
|
|
newline(t = 1, r) {
|
|
if (!(t <= 0)) {
|
|
if (!r) {
|
|
if (this.format.retainLines || this.format.compact) return;
|
|
if (this.format.concise) {
|
|
this.space();
|
|
return;
|
|
}
|
|
}
|
|
t > 2 && (t = 2), t -= this._buf.getNewlineCount();
|
|
for (let i = 0; i < t; i++)
|
|
this._newline();
|
|
}
|
|
}
|
|
endsWith(t) {
|
|
return this.getLastChar() === t;
|
|
}
|
|
getLastChar() {
|
|
return this._buf.getLastChar();
|
|
}
|
|
endsWithCharAndNewline() {
|
|
return this._buf.endsWithCharAndNewline();
|
|
}
|
|
removeTrailingNewline() {
|
|
this._buf.removeTrailingNewline();
|
|
}
|
|
exactSource(t, r) {
|
|
if (!t) {
|
|
r();
|
|
return;
|
|
}
|
|
this._catchUp("start", t), this._buf.exactSource(t, r);
|
|
}
|
|
source(t, r) {
|
|
r && (this._catchUp(t, r), this._buf.source(t, r));
|
|
}
|
|
sourceWithOffset(t, r, i) {
|
|
!r || this.format.preserveFormat || (this._catchUp(t, r), this._buf.sourceWithOffset(t, r, i));
|
|
}
|
|
sourceIdentifierName(t, r) {
|
|
if (!this._buf._canMarkIdName) return;
|
|
let i = this._buf._sourcePosition;
|
|
i.identifierNamePos = r, i.identifierName = t;
|
|
}
|
|
_space() {
|
|
this._queue(32);
|
|
}
|
|
_newline() {
|
|
this._queue(10);
|
|
}
|
|
_catchUpToCurrentToken(t, r = 0) {
|
|
let i = this.tokenMap.findMatching(this._currentNode, t, r);
|
|
i && this._catchUpTo(i.loc.start), this._printSemicolonBeforeNextToken !== -1 && this._printSemicolonBeforeNextToken === this._buf.getCurrentLine() &&
|
|
(this._buf.appendChar(59), this._endsWithWord = !1, this._endsWithInteger = !1, this._endsWithDiv = !1), this._printSemicolonBeforeNextToken =
|
|
-1, this._printSemicolonBeforeNextNode = -1;
|
|
}
|
|
_append(t, r) {
|
|
this._maybeIndent(t.charCodeAt(0)), this._buf.append(t, r), this._endsWithWord = !1, this._endsWithInteger = !1, this._endsWithDiv = !1;
|
|
}
|
|
_appendChar(t) {
|
|
this._maybeIndent(t), this._buf.appendChar(t), this._endsWithWord = !1, this._endsWithInteger = !1, this._endsWithDiv = !1;
|
|
}
|
|
_queue(t) {
|
|
this._maybeIndent(t), this._buf.queue(t), this._endsWithWord = !1, this._endsWithInteger = !1;
|
|
}
|
|
_maybeIndent(t) {
|
|
this._indent && t !== 10 && this.endsWith(10) && this._buf.queueIndentation(this._getIndent());
|
|
}
|
|
_shouldIndent(t) {
|
|
if (this._indent && t !== 10 && this.endsWith(10))
|
|
return !0;
|
|
}
|
|
catchUp(t) {
|
|
if (!this.format.retainLines) return;
|
|
let r = t - this._buf.getCurrentLine();
|
|
for (let i = 0; i < r; i++)
|
|
this._newline();
|
|
}
|
|
_catchUp(t, r) {
|
|
let {
|
|
format: i
|
|
} = this;
|
|
if (!i.preserveFormat) {
|
|
i.retainLines && r != null && r[t] && this.catchUp(r[t].line);
|
|
return;
|
|
}
|
|
let n = r?.[t];
|
|
n != null && this._catchUpTo(n);
|
|
}
|
|
_catchUpTo({
|
|
line: t,
|
|
column: r,
|
|
index: i
|
|
}) {
|
|
let n = t - this._buf.getCurrentLine();
|
|
if (n > 0 && this._noLineTerminator)
|
|
return;
|
|
for (let o = 0; o < n; o++)
|
|
this._newline();
|
|
let a = n > 0 ? r : r - this._buf.getCurrentColumn();
|
|
if (a > 0) {
|
|
let o = this._originalCode ? this._originalCode.slice(i - a, i).replace(/[^\t\x0B\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/gu,
|
|
" ") : " ".repeat(a);
|
|
this._append(o, !1);
|
|
}
|
|
}
|
|
_getIndent() {
|
|
return this._indentRepeat * this._indent;
|
|
}
|
|
printTerminatorless(t) {
|
|
this._noLineTerminator = !0, this.print(t);
|
|
}
|
|
print(t, r, i) {
|
|
var n, a, o;
|
|
if (!t) return;
|
|
this._endsWithInnerRaw = !1;
|
|
let u = t.type, l = this.format, c = l.concise;
|
|
t._compact && (l.concise = !0);
|
|
let f = this[u];
|
|
if (f === void 0)
|
|
throw new ReferenceError(`unknown node of type ${JSON.stringify(u)} with constructor ${JSON.stringify(t.constructor.name)}`);
|
|
let m = this._currentNode;
|
|
this._currentNode = t, this.tokenMap && (this._printSemicolonBeforeNextToken = this._printSemicolonBeforeNextNode);
|
|
let h = this._insideAux;
|
|
this._insideAux = t.loc == null, this._maybeAddAuxComment(this._insideAux && !h);
|
|
let d = (n = t.extra) == null ? void 0 : n.parenthesized, y = d && l.preserveFormat || d && l.retainFunctionParens && u === "FunctionE\
|
|
xpression" || O4e(t, m, this.tokenContext, this.inForStatementInit, l.preserveFormat ? this._boundGetRawIdentifier : void 0);
|
|
if (!y && d && (a = t.leadingComments) != null && a.length && t.leadingComments[0].type === "CommentBlock")
|
|
switch (m?.type) {
|
|
case "ExpressionStatement":
|
|
case "VariableDeclarator":
|
|
case "AssignmentExpression":
|
|
case "ReturnStatement":
|
|
break;
|
|
case "CallExpression":
|
|
case "OptionalCallExpression":
|
|
case "NewExpression":
|
|
if (m.callee !== t) break;
|
|
default:
|
|
y = !0;
|
|
}
|
|
let p = !1;
|
|
!y && this._noLineTerminator && ((o = t.leadingComments) != null && o.some(K5) || this.format.retainLines && t.loc && t.loc.start.line >
|
|
this._buf.getCurrentLine()) && (y = !0, p = !0);
|
|
let g, b;
|
|
if (!y && (r || (r = m && this._noLineTerminatorAfterNode === m && z5.isLastChild(m, t)), r)) {
|
|
var D;
|
|
(D = t.trailingComments) != null && D.some(K5) ? S4e(t) && (y = !0) : (g = this._noLineTerminatorAfterNode, this._noLineTerminatorAfterNode =
|
|
t);
|
|
}
|
|
y && (this.tokenChar(40), p && this.indent(), this._endsWithInnerRaw = !1, this.inForStatementInit && (b = !0, this.inForStatementInit =
|
|
!1), g = this._noLineTerminatorAfterNode, this._noLineTerminatorAfterNode = null), this._lastCommentLine = 0, this._printLeadingComments(
|
|
t, m);
|
|
let v = u === "Program" || u === "File" ? null : t.loc;
|
|
this.exactSource(v, f.bind(this, t, m)), y ? (this._printTrailingComments(t, m), p && (this.dedent(), this.newline()), this.tokenChar(
|
|
41), this._noLineTerminator = r, b && (this.inForStatementInit = !0)) : r && !this._noLineTerminator ? (this._noLineTerminator = !0, this.
|
|
_printTrailingComments(t, m)) : this._printTrailingComments(t, m, i), this._currentNode = m, l.concise = c, this._insideAux = h, g !==
|
|
void 0 && (this._noLineTerminatorAfterNode = g), this._endsWithInnerRaw = !1;
|
|
}
|
|
_maybeAddAuxComment(t) {
|
|
t && this._printAuxBeforeComment(), this._insideAux || this._printAuxAfterComment();
|
|
}
|
|
_printAuxBeforeComment() {
|
|
if (this._printAuxAfterOnNextUserNode) return;
|
|
this._printAuxAfterOnNextUserNode = !0;
|
|
let t = this.format.auxiliaryCommentBefore;
|
|
t && this._printComment({
|
|
type: "CommentBlock",
|
|
value: t
|
|
}, 0);
|
|
}
|
|
_printAuxAfterComment() {
|
|
if (!this._printAuxAfterOnNextUserNode) return;
|
|
this._printAuxAfterOnNextUserNode = !1;
|
|
let t = this.format.auxiliaryCommentAfter;
|
|
t && this._printComment({
|
|
type: "CommentBlock",
|
|
value: t
|
|
}, 0);
|
|
}
|
|
getPossibleRaw(t) {
|
|
let r = t.extra;
|
|
if (r?.raw != null && r.rawValue != null && t.value === r.rawValue)
|
|
return r.raw;
|
|
}
|
|
printJoin(t, r, i, n, a, o, u, l) {
|
|
if (!(t != null && t.length)) return;
|
|
if (i == null && this.format.retainLines) {
|
|
var c;
|
|
let p = (c = t[0].loc) == null ? void 0 : c.start.line;
|
|
p != null && p !== this._buf.getCurrentLine() && (i = !0);
|
|
}
|
|
i && this.indent();
|
|
let f = {
|
|
addNewlines: o,
|
|
nextNodeStartLine: 0
|
|
}, m = n?.bind(this), h = t.length;
|
|
for (let p = 0; p < h; p++) {
|
|
let g = t[p];
|
|
if (g && (r && this._printNewline(p === 0, f), this.print(g, void 0, l || 0), u?.(g, p), m != null && (p < h - 1 ? m(p, !1) : a && m(
|
|
p, !0)), r)) {
|
|
var d;
|
|
if ((d = g.trailingComments) != null && d.length || (this._lastCommentLine = 0), p + 1 === h)
|
|
this.newline(1);
|
|
else {
|
|
var y;
|
|
let b = t[p + 1];
|
|
f.nextNodeStartLine = ((y = b.loc) == null ? void 0 : y.start.line) || 0, this._printNewline(!0, f);
|
|
}
|
|
}
|
|
}
|
|
i && this.dedent();
|
|
}
|
|
printAndIndentOnComments(t) {
|
|
let r = t.leadingComments && t.leadingComments.length > 0;
|
|
r && this.indent(), this.print(t), r && this.dedent();
|
|
}
|
|
printBlock(t) {
|
|
let r = t.body;
|
|
r.type !== "EmptyStatement" && this.space(), this.print(r);
|
|
}
|
|
_printTrailingComments(t, r, i) {
|
|
let {
|
|
innerComments: n,
|
|
trailingComments: a
|
|
} = t;
|
|
n != null && n.length && this._printComments(2, n, t, r, i), a != null && a.length && this._printComments(2, a, t, r, i);
|
|
}
|
|
_printLeadingComments(t, r) {
|
|
let i = t.leadingComments;
|
|
i != null && i.length && this._printComments(0, i, t, r);
|
|
}
|
|
_maybePrintInnerComments(t, r) {
|
|
if (this._endsWithInnerRaw) {
|
|
var i;
|
|
this.printInnerComments((i = this.tokenMap) == null ? void 0 : i.findMatching(this._currentNode, t, r));
|
|
}
|
|
this._endsWithInnerRaw = !0, this._indentInnerComments = !0;
|
|
}
|
|
printInnerComments(t) {
|
|
let r = this._currentNode, i = r.innerComments;
|
|
if (!(i != null && i.length)) return;
|
|
let n = this.endsWith(32), a = this._indentInnerComments, o = this._printedComments.size;
|
|
a && this.indent(), this._printComments(1, i, r, void 0, void 0, t), n && o !== this._printedComments.size && this.space(), a && this.
|
|
dedent();
|
|
}
|
|
noIndentInnerCommentsHere() {
|
|
this._indentInnerComments = !1;
|
|
}
|
|
printSequence(t, r, i, n) {
|
|
this.printJoin(t, !0, r ?? !1, void 0, void 0, n, void 0, i);
|
|
}
|
|
printList(t, r, i, n, a, o) {
|
|
this.printJoin(t, i, n, a ?? k4e, r, void 0, o);
|
|
}
|
|
shouldPrintTrailingComma(t) {
|
|
if (!this.tokenMap) return null;
|
|
let r = this.tokenMap.findLastIndex(this._currentNode, (i) => this.tokenMap.matchesOriginal(i, t));
|
|
return r <= 0 ? null : this.tokenMap.matchesOriginal(this._tokens[r - 1], ",");
|
|
}
|
|
_printNewline(t, r) {
|
|
let i = this.format;
|
|
if (i.retainLines || i.compact) return;
|
|
if (i.concise) {
|
|
this.space();
|
|
return;
|
|
}
|
|
if (!t)
|
|
return;
|
|
let n = r.nextNodeStartLine, a = this._lastCommentLine;
|
|
if (n > 0 && a > 0) {
|
|
let o = n - a;
|
|
if (o >= 0) {
|
|
this.newline(o || 1);
|
|
return;
|
|
}
|
|
}
|
|
this._buf.hasContent() && this.newline(1);
|
|
}
|
|
_shouldPrintComment(t, r) {
|
|
if (t.ignore || this._printedComments.has(t)) return 0;
|
|
if (this._noLineTerminator && I4e.test(t.value))
|
|
return 2;
|
|
if (r && this.tokenMap) {
|
|
let i = this.tokenMap.find(this._currentNode, (n) => n.value === t.value);
|
|
if (i && i.start > r.start)
|
|
return 2;
|
|
}
|
|
return this._printedComments.add(t), this.format.shouldPrintComment(t.value) ? 1 : 0;
|
|
}
|
|
_printComment(t, r) {
|
|
let i = this._noLineTerminator, n = t.type === "CommentBlock", a = n && r !== 1 && !this._noLineTerminator;
|
|
a && this._buf.hasContent() && r !== 2 && this.newline(1);
|
|
let o = this.getLastChar();
|
|
o !== 91 && o !== 123 && o !== 40 && this.space();
|
|
let u;
|
|
if (n) {
|
|
if (u = `/*${t.value}*/`, this.format.indent.adjustMultilineComment) {
|
|
var l;
|
|
let c = (l = t.loc) == null ? void 0 : l.start.column;
|
|
if (c) {
|
|
let f = new RegExp("\\n\\s{1," + c + "}", "g");
|
|
u = u.replace(f, `
|
|
`);
|
|
}
|
|
if (this.format.concise)
|
|
u = u.replace(/\n(?!$)/g, `
|
|
`);
|
|
else {
|
|
let f = this.format.retainLines ? 0 : this._buf.getCurrentColumn();
|
|
(this._shouldIndent(47) || this.format.retainLines) && (f += this._getIndent()), u = u.replace(/\n(?!$)/g, `
|
|
${" ".repeat(f)}`);
|
|
}
|
|
}
|
|
} else i ? u = `/*${t.value}*/` : u = `//${t.value}`;
|
|
if (this._endsWithDiv && this._space(), this.tokenMap) {
|
|
let {
|
|
_printSemicolonBeforeNextToken: c,
|
|
_printSemicolonBeforeNextNode: f
|
|
} = this;
|
|
this._printSemicolonBeforeNextToken = -1, this._printSemicolonBeforeNextNode = -1, this.source("start", t.loc), this._append(u, n), this.
|
|
_printSemicolonBeforeNextNode = f, this._printSemicolonBeforeNextToken = c;
|
|
} else
|
|
this.source("start", t.loc), this._append(u, n);
|
|
!n && !i && this.newline(1, !0), a && r !== 3 && this.newline(1);
|
|
}
|
|
_printComments(t, r, i, n, a = 0, o) {
|
|
let u = i.loc, l = r.length, c = !!u, f = c ? u.start.line : 0, m = c ? u.end.line : 0, h = 0, d = 0, y = this._noLineTerminator ? function() {
|
|
} : this.newline.bind(this);
|
|
for (let p = 0; p < l; p++) {
|
|
let g = r[p], b = this._shouldPrintComment(g, o);
|
|
if (b === 2) {
|
|
c = !1;
|
|
break;
|
|
}
|
|
if (c && g.loc && b === 1) {
|
|
let D = g.loc.start.line, v = g.loc.end.line;
|
|
if (t === 0) {
|
|
let S = 0;
|
|
p === 0 ? this._buf.hasContent() && (g.type === "CommentLine" || D !== v) && (S = d = 1) : S = D - h, h = v, y(S), this._printComment(
|
|
g, 1), p + 1 === l && (y(Math.max(f - h, d)), h = f);
|
|
} else if (t === 1) {
|
|
let S = D - (p === 0 ? f : h);
|
|
h = v, y(S), this._printComment(g, 1), p + 1 === l && (y(Math.min(1, m - h)), h = m);
|
|
} else {
|
|
let S = D - (p === 0 ? m - a : h);
|
|
h = v, y(S), this._printComment(g, 1);
|
|
}
|
|
} else {
|
|
if (c = !1, b !== 1)
|
|
continue;
|
|
if (l === 1) {
|
|
let D = g.loc ? g.loc.start.line === g.loc.end.line : !G5.test(g.value), v = D && !C4e(i) && !w4e(n) && !A4e(n) && !_4e(i);
|
|
t === 0 ? this._printComment(g, v && i.type !== "ObjectExpression" || D && T4e(n, {
|
|
body: i
|
|
}) ? 1 : 0) : v && t === 2 ? this._printComment(g, 1) : this._printComment(g, 0);
|
|
} else t === 1 && !(i.type === "ObjectExpression" && i.properties.length > 1) && i.type !== "ClassBody" && i.type !== "TSInterface\
|
|
Body" ? this._printComment(g, p === 0 ? 2 : p === l - 1 ? 3 : 0) : this._printComment(g, 0);
|
|
}
|
|
}
|
|
t === 2 && c && h && (this._lastCommentLine = h);
|
|
}
|
|
};
|
|
Object.assign(Ld.prototype, E4e);
|
|
(0, x4e.addDeprecatedGenerators)(Ld);
|
|
var Fdt = d0.default = Ld;
|
|
function k4e(e, t) {
|
|
this.token(",", !1, e), t || this.space();
|
|
}
|
|
s(k4e, "commaSeparator");
|
|
});
|
|
|
|
// ../node_modules/@babel/generator/lib/index.js
|
|
var qd = E((Hl) => {
|
|
"use strict";
|
|
Object.defineProperty(Hl, "__esModule", {
|
|
value: !0
|
|
});
|
|
Hl.default = void 0;
|
|
Hl.generate = Q5;
|
|
var X5 = Y7(), Y5 = J5();
|
|
function Z5(e, t, r) {
|
|
if (t.experimental_preserveFormat) {
|
|
if (typeof e != "string")
|
|
throw new Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string");
|
|
if (!t.retainLines)
|
|
throw new Error("`experimental_preserveFormat` requires `retainLines` to be set to `true`");
|
|
if (t.compact && t.compact !== "auto")
|
|
throw new Error("`experimental_preserveFormat` is not compatible with the `compact` option");
|
|
if (t.minified)
|
|
throw new Error("`experimental_preserveFormat` is not compatible with the `minified` option");
|
|
if (t.jsescOption)
|
|
throw new Error("`experimental_preserveFormat` is not compatible with the `jsescOption` option");
|
|
if (!Array.isArray(r.tokens))
|
|
throw new Error("`experimental_preserveFormat` requires the AST to have attatched the token of the input code. Make sure to enable t\
|
|
he `tokens: true` parser option.");
|
|
}
|
|
let i = {
|
|
auxiliaryCommentBefore: t.auxiliaryCommentBefore,
|
|
auxiliaryCommentAfter: t.auxiliaryCommentAfter,
|
|
shouldPrintComment: t.shouldPrintComment,
|
|
preserveFormat: t.experimental_preserveFormat,
|
|
retainLines: t.retainLines,
|
|
retainFunctionParens: t.retainFunctionParens,
|
|
comments: t.comments == null || t.comments,
|
|
compact: t.compact,
|
|
minified: t.minified,
|
|
concise: t.concise,
|
|
indent: {
|
|
adjustMultilineComment: !0,
|
|
style: " "
|
|
},
|
|
jsescOption: Object.assign({
|
|
quotes: "double",
|
|
wrap: !0,
|
|
minimal: !1
|
|
}, t.jsescOption),
|
|
topicToken: t.topicToken,
|
|
importAttributesKeyword: t.importAttributesKeyword
|
|
};
|
|
{
|
|
var n;
|
|
i.decoratorsBeforeExport = t.decoratorsBeforeExport, i.jsescOption.json = t.jsonCompatibleStrings, i.recordAndTupleSyntaxType = (n = t.
|
|
recordAndTupleSyntaxType) != null ? n : "hash";
|
|
}
|
|
i.minified ? (i.compact = !0, i.shouldPrintComment = i.shouldPrintComment || (() => i.comments)) : i.shouldPrintComment = i.shouldPrintComment ||
|
|
((l) => i.comments || l.includes("@license") || l.includes("@preserve")), i.compact === "auto" && (i.compact = typeof e == "string" && e.
|
|
length > 5e5, i.compact && console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${t.filename} as it exceeds th\
|
|
e max of 500KB.`)), (i.compact || i.preserveFormat) && (i.indent.adjustMultilineComment = !1);
|
|
let {
|
|
auxiliaryCommentBefore: a,
|
|
auxiliaryCommentAfter: o,
|
|
shouldPrintComment: u
|
|
} = i;
|
|
return a && !u(a) && (i.auxiliaryCommentBefore = void 0), o && !u(o) && (i.auxiliaryCommentAfter = void 0), i;
|
|
}
|
|
s(Z5, "normalizeOptions");
|
|
Hl.CodeGenerator = class {
|
|
static {
|
|
s(this, "CodeGenerator");
|
|
}
|
|
constructor(t, r = {}, i) {
|
|
this._ast = void 0, this._format = void 0, this._map = void 0, this._ast = t, this._format = Z5(i, r, t), this._map = r.sourceMaps ? new X5.
|
|
default(r, i) : null;
|
|
}
|
|
generate() {
|
|
return new Y5.default(this._format, this._map).generate(this._ast);
|
|
}
|
|
};
|
|
function Q5(e, t = {}, r) {
|
|
let i = Z5(r, t, e), n = t.sourceMaps ? new X5.default(t, r) : null;
|
|
return new Y5.default(i, n, e.tokens, typeof r == "string" ? r : null).generate(e);
|
|
}
|
|
s(Q5, "generate");
|
|
var Bdt = Hl.default = Q5;
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/ancestry.js
|
|
var eq = E((nn) => {
|
|
"use strict";
|
|
Object.defineProperty(nn, "__esModule", {
|
|
value: !0
|
|
});
|
|
nn.find = R4e;
|
|
nn.findParent = M4e;
|
|
nn.getAncestry = W4e;
|
|
nn.getDeepestCommonAncestorFrom = U4e;
|
|
nn.getEarliestCommonAncestorFrom = q4e;
|
|
nn.getFunctionParent = j4e;
|
|
nn.getStatementParent = L4e;
|
|
nn.inType = H4e;
|
|
nn.isAncestor = $4e;
|
|
nn.isDescendant = V4e;
|
|
var B4e = Ve(), {
|
|
VISITOR_KEYS: N4e
|
|
} = B4e;
|
|
function M4e(e) {
|
|
let t = this;
|
|
for (; t = t.parentPath; )
|
|
if (e(t)) return t;
|
|
return null;
|
|
}
|
|
s(M4e, "findParent");
|
|
function R4e(e) {
|
|
let t = this;
|
|
do
|
|
if (e(t)) return t;
|
|
while (t = t.parentPath);
|
|
return null;
|
|
}
|
|
s(R4e, "find");
|
|
function j4e() {
|
|
return this.findParent((e) => e.isFunction());
|
|
}
|
|
s(j4e, "getFunctionParent");
|
|
function L4e() {
|
|
let e = this;
|
|
do {
|
|
if (!e.parentPath || Array.isArray(e.container) && e.isStatement())
|
|
break;
|
|
e = e.parentPath;
|
|
} while (e);
|
|
if (e && (e.isProgram() || e.isFile()))
|
|
throw new Error("File/Program node, we can't possibly find a statement parent to this");
|
|
return e;
|
|
}
|
|
s(L4e, "getStatementParent");
|
|
function q4e(e) {
|
|
return this.getDeepestCommonAncestorFrom(e, function(t, r, i) {
|
|
let n, a = N4e[t.type];
|
|
for (let o of i) {
|
|
let u = o[r + 1];
|
|
if (!n) {
|
|
n = u;
|
|
continue;
|
|
}
|
|
if (u.listKey && n.listKey === u.listKey && u.key < n.key) {
|
|
n = u;
|
|
continue;
|
|
}
|
|
let l = a.indexOf(n.parentKey), c = a.indexOf(u.parentKey);
|
|
l > c && (n = u);
|
|
}
|
|
return n;
|
|
});
|
|
}
|
|
s(q4e, "getEarliestCommonAncestorFrom");
|
|
function U4e(e, t) {
|
|
if (!e.length)
|
|
return this;
|
|
if (e.length === 1)
|
|
return e[0];
|
|
let r = 1 / 0, i, n, a = e.map((u) => {
|
|
let l = [];
|
|
do
|
|
l.unshift(u);
|
|
while ((u = u.parentPath) && u !== this);
|
|
return l.length < r && (r = l.length), l;
|
|
}), o = a[0];
|
|
e: for (let u = 0; u < r; u++) {
|
|
let l = o[u];
|
|
for (let c of a)
|
|
if (c[u] !== l)
|
|
break e;
|
|
i = u, n = l;
|
|
}
|
|
if (n)
|
|
return t ? t(n, i, a) : n;
|
|
throw new Error("Couldn't find intersection");
|
|
}
|
|
s(U4e, "getDeepestCommonAncestorFrom");
|
|
function W4e() {
|
|
let e = this, t = [];
|
|
do
|
|
t.push(e);
|
|
while (e = e.parentPath);
|
|
return t;
|
|
}
|
|
s(W4e, "getAncestry");
|
|
function $4e(e) {
|
|
return e.isDescendant(this);
|
|
}
|
|
s($4e, "isAncestor");
|
|
function V4e(e) {
|
|
return !!this.findParent((t) => t === e);
|
|
}
|
|
s(V4e, "isDescendant");
|
|
function H4e(...e) {
|
|
let t = this;
|
|
for (; t; ) {
|
|
if (e.includes(t.node.type)) return !0;
|
|
t = t.parentPath;
|
|
}
|
|
return !1;
|
|
}
|
|
s(H4e, "inType");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/inference/util.js
|
|
var ow = E((aw) => {
|
|
"use strict";
|
|
Object.defineProperty(aw, "__esModule", {
|
|
value: !0
|
|
});
|
|
aw.createUnionType = X4e;
|
|
var K4e = Ve(), {
|
|
createFlowUnionType: tq,
|
|
createTSUnionType: rq,
|
|
createUnionTypeAnnotation: z4e,
|
|
isFlowType: G4e,
|
|
isTSType: J4e
|
|
} = K4e;
|
|
function X4e(e) {
|
|
{
|
|
if (e.every((t) => G4e(t)))
|
|
return tq ? tq(e) : z4e(e);
|
|
if (e.every((t) => J4e(t)) && rq)
|
|
return rq(e);
|
|
}
|
|
}
|
|
s(X4e, "createUnionType");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/inference/inferer-reference.js
|
|
var oq = E((uw) => {
|
|
"use strict";
|
|
Object.defineProperty(uw, "__esModule", {
|
|
value: !0
|
|
});
|
|
uw.default = tMe;
|
|
var Y4e = Ve(), nq = ow(), {
|
|
BOOLEAN_NUMBER_BINARY_OPERATORS: Z4e,
|
|
createTypeAnnotationBasedOnTypeof: Q4e,
|
|
numberTypeAnnotation: sq,
|
|
voidTypeAnnotation: eMe
|
|
} = Y4e;
|
|
function tMe(e) {
|
|
if (!this.isReferenced()) return;
|
|
let t = this.scope.getBinding(e.name);
|
|
if (t)
|
|
return t.identifier.typeAnnotation ? t.identifier.typeAnnotation : rMe(t, this, e.name);
|
|
if (e.name === "undefined")
|
|
return eMe();
|
|
if (e.name === "NaN" || e.name === "Infinity")
|
|
return sq();
|
|
e.name;
|
|
}
|
|
s(tMe, "_default");
|
|
function rMe(e, t, r) {
|
|
let i = [], n = [], a = iq(e, t, n), o = aq(e, t, r);
|
|
if (o) {
|
|
let u = iq(e, o.ifStatement);
|
|
a = a.filter((l) => !u.includes(l)), i.push(o.typeAnnotation);
|
|
}
|
|
if (a.length) {
|
|
a.push(...n);
|
|
for (let u of a)
|
|
i.push(u.getTypeAnnotation());
|
|
}
|
|
if (i.length)
|
|
return (0, nq.createUnionType)(i);
|
|
}
|
|
s(rMe, "getTypeAnnotationBindingConstantViolations");
|
|
function iq(e, t, r) {
|
|
let i = e.constantViolations.slice();
|
|
return i.unshift(e.path), i.filter((n) => {
|
|
n = n.resolve();
|
|
let a = n._guessExecutionStatusRelativeTo(t);
|
|
return r && a === "unknown" && r.push(n), a === "before";
|
|
});
|
|
}
|
|
s(iq, "getConstantViolationsBefore");
|
|
function iMe(e, t) {
|
|
let r = t.node.operator, i = t.get("right").resolve(), n = t.get("left").resolve(), a;
|
|
if (n.isIdentifier({
|
|
name: e
|
|
}) ? a = i : i.isIdentifier({
|
|
name: e
|
|
}) && (a = n), a)
|
|
return r === "===" ? a.getTypeAnnotation() : Z4e.includes(r) ? sq() : void 0;
|
|
if (r !== "===" && r !== "==") return;
|
|
let o, u;
|
|
if (n.isUnaryExpression({
|
|
operator: "typeof"
|
|
}) ? (o = n, u = i) : i.isUnaryExpression({
|
|
operator: "typeof"
|
|
}) && (o = i, u = n), !o || !o.get("argument").isIdentifier({
|
|
name: e
|
|
}) || (u = u.resolve(), !u.isLiteral())) return;
|
|
let l = u.node.value;
|
|
if (typeof l == "string")
|
|
return Q4e(l);
|
|
}
|
|
s(iMe, "inferAnnotationFromBinaryExpression");
|
|
function nMe(e, t, r) {
|
|
let i;
|
|
for (; i = t.parentPath; ) {
|
|
if (i.isIfStatement() || i.isConditionalExpression())
|
|
return t.key === "test" ? void 0 : i;
|
|
if (i.isFunction() && i.parentPath.scope.getBinding(r) !== e)
|
|
return;
|
|
t = i;
|
|
}
|
|
}
|
|
s(nMe, "getParentConditionalPath");
|
|
function aq(e, t, r) {
|
|
let i = nMe(e, t, r);
|
|
if (!i) return;
|
|
let a = [i.get("test")], o = [];
|
|
for (let u = 0; u < a.length; u++) {
|
|
let l = a[u];
|
|
if (l.isLogicalExpression())
|
|
l.node.operator === "&&" && (a.push(l.get("left")), a.push(l.get("right")));
|
|
else if (l.isBinaryExpression()) {
|
|
let c = iMe(r, l);
|
|
c && o.push(c);
|
|
}
|
|
}
|
|
return o.length ? {
|
|
typeAnnotation: (0, nq.createUnionType)(o),
|
|
ifStatement: i
|
|
} : aq(e, i, r);
|
|
}
|
|
s(aq, "getConditionalAnnotation");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/inference/inferers.js
|
|
var mq = E((St) => {
|
|
"use strict";
|
|
Object.defineProperty(St, "__esModule", {
|
|
value: !0
|
|
});
|
|
St.ArrayExpression = dq;
|
|
St.AssignmentExpression = AMe;
|
|
St.BinaryExpression = xMe;
|
|
St.BooleanLiteral = IMe;
|
|
St.CallExpression = qMe;
|
|
St.ConditionalExpression = TMe;
|
|
St.ClassDeclaration = St.ClassExpression = St.FunctionDeclaration = St.ArrowFunctionExpression = St.FunctionExpression = NMe;
|
|
Object.defineProperty(St, "Identifier", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return aMe.default;
|
|
}, "get")
|
|
});
|
|
St.LogicalExpression = SMe;
|
|
St.NewExpression = DMe;
|
|
St.NullLiteral = OMe;
|
|
St.NumericLiteral = FMe;
|
|
St.ObjectExpression = BMe;
|
|
St.ParenthesizedExpression = wMe;
|
|
St.RegExpLiteral = kMe;
|
|
St.RestElement = pq;
|
|
St.SequenceExpression = CMe;
|
|
St.StringLiteral = PMe;
|
|
St.TSAsExpression = fq;
|
|
St.TSNonNullExpression = bMe;
|
|
St.TaggedTemplateExpression = UMe;
|
|
St.TemplateLiteral = vMe;
|
|
St.TypeCastExpression = cq;
|
|
St.UnaryExpression = EMe;
|
|
St.UpdateExpression = _Me;
|
|
St.VariableDeclarator = gMe;
|
|
var sMe = Ve(), aMe = oq(), lq = ow(), {
|
|
BOOLEAN_BINARY_OPERATORS: oMe,
|
|
BOOLEAN_UNARY_OPERATORS: uMe,
|
|
NUMBER_BINARY_OPERATORS: lMe,
|
|
NUMBER_UNARY_OPERATORS: cMe,
|
|
STRING_UNARY_OPERATORS: fMe,
|
|
anyTypeAnnotation: uq,
|
|
arrayTypeAnnotation: lw,
|
|
booleanTypeAnnotation: cw,
|
|
buildMatchMemberExpression: p0,
|
|
genericTypeAnnotation: Va,
|
|
identifier: ru,
|
|
nullLiteralTypeAnnotation: dMe,
|
|
numberTypeAnnotation: Kl,
|
|
stringTypeAnnotation: iu,
|
|
tupleTypeAnnotation: pMe,
|
|
unionTypeAnnotation: hMe,
|
|
voidTypeAnnotation: mMe,
|
|
isIdentifier: yMe
|
|
} = sMe;
|
|
function gMe() {
|
|
if (this.get("id").isIdentifier())
|
|
return this.get("init").getTypeAnnotation();
|
|
}
|
|
s(gMe, "VariableDeclarator");
|
|
function cq(e) {
|
|
return e.typeAnnotation;
|
|
}
|
|
s(cq, "TypeCastExpression");
|
|
cq.validParent = !0;
|
|
function fq(e) {
|
|
return e.typeAnnotation;
|
|
}
|
|
s(fq, "TSAsExpression");
|
|
fq.validParent = !0;
|
|
function bMe() {
|
|
return this.get("expression").getTypeAnnotation();
|
|
}
|
|
s(bMe, "TSNonNullExpression");
|
|
function DMe(e) {
|
|
if (e.callee.type === "Identifier")
|
|
return Va(e.callee);
|
|
}
|
|
s(DMe, "NewExpression");
|
|
function vMe() {
|
|
return iu();
|
|
}
|
|
s(vMe, "TemplateLiteral");
|
|
function EMe(e) {
|
|
let t = e.operator;
|
|
if (t === "void")
|
|
return mMe();
|
|
if (cMe.includes(t))
|
|
return Kl();
|
|
if (fMe.includes(t))
|
|
return iu();
|
|
if (uMe.includes(t))
|
|
return cw();
|
|
}
|
|
s(EMe, "UnaryExpression");
|
|
function xMe(e) {
|
|
let t = e.operator;
|
|
if (lMe.includes(t))
|
|
return Kl();
|
|
if (oMe.includes(t))
|
|
return cw();
|
|
if (t === "+") {
|
|
let r = this.get("right"), i = this.get("left");
|
|
return i.isBaseType("number") && r.isBaseType("number") ? Kl() : i.isBaseType("string") || r.isBaseType("string") ? iu() : hMe([iu(), Kl()]);
|
|
}
|
|
}
|
|
s(xMe, "BinaryExpression");
|
|
function SMe() {
|
|
let e = [this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()];
|
|
return (0, lq.createUnionType)(e);
|
|
}
|
|
s(SMe, "LogicalExpression");
|
|
function TMe() {
|
|
let e = [this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()];
|
|
return (0, lq.createUnionType)(e);
|
|
}
|
|
s(TMe, "ConditionalExpression");
|
|
function CMe() {
|
|
return this.get("expressions").pop().getTypeAnnotation();
|
|
}
|
|
s(CMe, "SequenceExpression");
|
|
function wMe() {
|
|
return this.get("expression").getTypeAnnotation();
|
|
}
|
|
s(wMe, "ParenthesizedExpression");
|
|
function AMe() {
|
|
return this.get("right").getTypeAnnotation();
|
|
}
|
|
s(AMe, "AssignmentExpression");
|
|
function _Me(e) {
|
|
let t = e.operator;
|
|
if (t === "++" || t === "--")
|
|
return Kl();
|
|
}
|
|
s(_Me, "UpdateExpression");
|
|
function PMe() {
|
|
return iu();
|
|
}
|
|
s(PMe, "StringLiteral");
|
|
function FMe() {
|
|
return Kl();
|
|
}
|
|
s(FMe, "NumericLiteral");
|
|
function IMe() {
|
|
return cw();
|
|
}
|
|
s(IMe, "BooleanLiteral");
|
|
function OMe() {
|
|
return dMe();
|
|
}
|
|
s(OMe, "NullLiteral");
|
|
function kMe() {
|
|
return Va(ru("RegExp"));
|
|
}
|
|
s(kMe, "RegExpLiteral");
|
|
function BMe() {
|
|
return Va(ru("Object"));
|
|
}
|
|
s(BMe, "ObjectExpression");
|
|
function dq() {
|
|
return Va(ru("Array"));
|
|
}
|
|
s(dq, "ArrayExpression");
|
|
function pq() {
|
|
return dq();
|
|
}
|
|
s(pq, "RestElement");
|
|
pq.validParent = !0;
|
|
function NMe() {
|
|
return Va(ru("Function"));
|
|
}
|
|
s(NMe, "Func");
|
|
var MMe = p0("Array.from"), RMe = p0("Object.keys"), jMe = p0("Object.values"), LMe = p0("Object.entries");
|
|
function qMe() {
|
|
let {
|
|
callee: e
|
|
} = this.node;
|
|
return RMe(e) ? lw(iu()) : MMe(e) || jMe(e) || yMe(e, {
|
|
name: "Array"
|
|
}) ? lw(uq()) : LMe(e) ? lw(pMe([iu(), uq()])) : hq(this.get("callee"));
|
|
}
|
|
s(qMe, "CallExpression");
|
|
function UMe() {
|
|
return hq(this.get("tag"));
|
|
}
|
|
s(UMe, "TaggedTemplateExpression");
|
|
function hq(e) {
|
|
if (e = e.resolve(), e.isFunction()) {
|
|
let {
|
|
node: t
|
|
} = e;
|
|
if (t.async)
|
|
return t.generator ? Va(ru("AsyncIterator")) : Va(ru("Promise"));
|
|
if (t.generator)
|
|
return Va(ru("Iterator"));
|
|
if (e.node.returnType)
|
|
return e.node.returnType;
|
|
}
|
|
}
|
|
s(hq, "resolveCall");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/inference/index.js
|
|
var vq = E((Ha) => {
|
|
"use strict";
|
|
Object.defineProperty(Ha, "__esModule", {
|
|
value: !0
|
|
});
|
|
Ha._getTypeAnnotation = Dq;
|
|
Ha.baseTypeStrictlyMatches = lRe;
|
|
Ha.couldBeBaseType = uRe;
|
|
Ha.getTypeAnnotation = aRe;
|
|
Ha.isBaseType = oRe;
|
|
Ha.isGenericType = cRe;
|
|
var yq = mq(), WMe = Ve(), {
|
|
anyTypeAnnotation: bq,
|
|
isAnyTypeAnnotation: h0,
|
|
isArrayTypeAnnotation: $Me,
|
|
isBooleanTypeAnnotation: VMe,
|
|
isEmptyTypeAnnotation: HMe,
|
|
isFlowBaseAnnotation: KMe,
|
|
isGenericTypeAnnotation: zMe,
|
|
isIdentifier: gq,
|
|
isMixedTypeAnnotation: GMe,
|
|
isNumberTypeAnnotation: JMe,
|
|
isStringTypeAnnotation: XMe,
|
|
isTSArrayType: YMe,
|
|
isTSTypeAnnotation: ZMe,
|
|
isTSTypeReference: QMe,
|
|
isTupleTypeAnnotation: eRe,
|
|
isTypeAnnotation: tRe,
|
|
isUnionTypeAnnotation: rRe,
|
|
isVoidTypeAnnotation: iRe,
|
|
stringTypeAnnotation: nRe,
|
|
voidTypeAnnotation: sRe
|
|
} = WMe;
|
|
function aRe() {
|
|
let e = this.getData("typeAnnotation");
|
|
return e != null || (e = Dq.call(this) || bq(), (tRe(e) || ZMe(e)) && (e = e.typeAnnotation), this.setData("typeAnnotation", e)), e;
|
|
}
|
|
s(aRe, "getTypeAnnotation");
|
|
var fw = /* @__PURE__ */ new WeakSet();
|
|
function Dq() {
|
|
let e = this.node;
|
|
if (!e)
|
|
if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
|
|
let r = this.parentPath.parentPath, i = r.parentPath;
|
|
return r.key === "left" && i.isForInStatement() ? nRe() : r.key === "left" && i.isForOfStatement() ? bq() : sRe();
|
|
} else
|
|
return;
|
|
if (e.typeAnnotation)
|
|
return e.typeAnnotation;
|
|
if (!fw.has(e)) {
|
|
fw.add(e);
|
|
try {
|
|
var t;
|
|
let r = yq[e.type];
|
|
if (r)
|
|
return r.call(this, e);
|
|
if (r = yq[this.parentPath.type], (t = r) != null && t.validParent)
|
|
return this.parentPath.getTypeAnnotation();
|
|
} finally {
|
|
fw.delete(e);
|
|
}
|
|
}
|
|
}
|
|
s(Dq, "_getTypeAnnotation");
|
|
function oRe(e, t) {
|
|
return dw(e, this.getTypeAnnotation(), t);
|
|
}
|
|
s(oRe, "isBaseType");
|
|
function dw(e, t, r) {
|
|
if (e === "string")
|
|
return XMe(t);
|
|
if (e === "number")
|
|
return JMe(t);
|
|
if (e === "boolean")
|
|
return VMe(t);
|
|
if (e === "any")
|
|
return h0(t);
|
|
if (e === "mixed")
|
|
return GMe(t);
|
|
if (e === "empty")
|
|
return HMe(t);
|
|
if (e === "void")
|
|
return iRe(t);
|
|
if (r)
|
|
return !1;
|
|
throw new Error(`Unknown base type ${e}`);
|
|
}
|
|
s(dw, "_isBaseType");
|
|
function uRe(e) {
|
|
let t = this.getTypeAnnotation();
|
|
if (h0(t)) return !0;
|
|
if (rRe(t)) {
|
|
for (let r of t.types)
|
|
if (h0(r) || dw(e, r, !0))
|
|
return !0;
|
|
return !1;
|
|
} else
|
|
return dw(e, t, !0);
|
|
}
|
|
s(uRe, "couldBeBaseType");
|
|
function lRe(e) {
|
|
let t = this.getTypeAnnotation(), r = e.getTypeAnnotation();
|
|
return !h0(t) && KMe(t) ? r.type === t.type : !1;
|
|
}
|
|
s(lRe, "baseTypeStrictlyMatches");
|
|
function cRe(e) {
|
|
let t = this.getTypeAnnotation();
|
|
return e === "Array" && (YMe(t) || $Me(t) || eRe(t)) ? !0 : zMe(t) && gq(t.id, {
|
|
name: e
|
|
}) || QMe(t) && gq(t.typeName, {
|
|
name: e
|
|
});
|
|
}
|
|
s(cRe, "isGenericType");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
|
|
var Eq = E((m0) => {
|
|
"use strict";
|
|
Object.defineProperty(m0, "__esModule", {
|
|
value: !0
|
|
});
|
|
m0.hooks = void 0;
|
|
var zdt = m0.hooks = [function(e, t) {
|
|
if (e.key === "test" && (t.isWhile() || t.isSwitchCase()) || e.key === "declaration" && t.isExportDeclaration() || e.key === "body" && t.
|
|
isLabeledStatement() || e.listKey === "declarations" && t.isVariableDeclaration() && t.node.declarations.length === 1 || e.key === "expr\
|
|
ession" && t.isExpressionStatement())
|
|
return t.remove(), !0;
|
|
}, function(e, t) {
|
|
if (t.isSequenceExpression() && t.node.expressions.length === 1)
|
|
return t.replaceWith(t.node.expressions[0]), !0;
|
|
}, function(e, t) {
|
|
if (t.isBinary())
|
|
return e.key === "left" ? t.replaceWith(t.node.right) : t.replaceWith(t.node.left), !0;
|
|
}, function(e, t) {
|
|
if (t.isIfStatement() && e.key === "consequent" || e.key === "body" && (t.isLoop() || t.isArrowFunctionExpression()))
|
|
return e.replaceWith({
|
|
type: "BlockStatement",
|
|
body: []
|
|
}), !0;
|
|
}];
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/removal.js
|
|
var y0 = E((Ka) => {
|
|
"use strict";
|
|
Object.defineProperty(Ka, "__esModule", {
|
|
value: !0
|
|
});
|
|
Ka._assertUnremoved = wq;
|
|
Ka._callRemovalHooks = Tq;
|
|
Ka._markRemoved = pw;
|
|
Ka._remove = Cq;
|
|
Ka._removeFromScope = Sq;
|
|
Ka.remove = bRe;
|
|
var fRe = Eq(), dRe = Zo(), pRe = hw(), xq = za(), hRe = Ve(), mRe = g0(), yRe = ns(), {
|
|
getBindingIdentifiers: gRe
|
|
} = hRe;
|
|
function bRe() {
|
|
var e;
|
|
if (wq.call(this), yRe.resync.call(this), Tq.call(this)) {
|
|
pw.call(this);
|
|
return;
|
|
}
|
|
(e = this.opts) != null && e.noScope || Sq.call(this), this.shareCommentsWithSiblings(), Cq.call(this), pw.call(this);
|
|
}
|
|
s(bRe, "remove");
|
|
function Sq() {
|
|
let e = gRe(this.node, !1, !1, !0);
|
|
Object.keys(e).forEach((t) => this.scope.removeBinding(t));
|
|
}
|
|
s(Sq, "_removeFromScope");
|
|
function Tq() {
|
|
if (this.parentPath) {
|
|
for (let e of fRe.hooks)
|
|
if (e(this, this.parentPath)) return !0;
|
|
}
|
|
}
|
|
s(Tq, "_callRemovalHooks");
|
|
function Cq() {
|
|
Array.isArray(this.container) ? (this.container.splice(this.key, 1), mRe.updateSiblingKeys.call(this, this.key, -1)) : pRe._replaceWith.
|
|
call(this, null);
|
|
}
|
|
s(Cq, "_remove");
|
|
function pw() {
|
|
this._traverseFlags |= xq.SHOULD_SKIP | xq.REMOVED, this.parent && (0, dRe.getCachedPaths)(this.hub, this.parent).delete(this.node), this.
|
|
node = null;
|
|
}
|
|
s(pw, "_markRemoved");
|
|
function wq() {
|
|
if (this.removed)
|
|
throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
|
|
}
|
|
s(wq, "_assertUnremoved");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/lib/hoister.js
|
|
var _q = E((b0) => {
|
|
"use strict";
|
|
Object.defineProperty(b0, "__esModule", {
|
|
value: !0
|
|
});
|
|
b0.default = void 0;
|
|
var Aq = Ve(), DRe = Aq, {
|
|
react: vRe
|
|
} = Aq, {
|
|
cloneNode: ERe,
|
|
jsxExpressionContainer: xRe,
|
|
variableDeclaration: SRe,
|
|
variableDeclarator: TRe
|
|
} = DRe, CRe = {
|
|
ReferencedIdentifier(e, t) {
|
|
if (e.isJSXIdentifier() && vRe.isCompatTag(e.node.name) && !e.parentPath.isJSXMemberExpression())
|
|
return;
|
|
if (e.node.name === "this") {
|
|
let i = e.scope;
|
|
do
|
|
if (i.path.isFunction() && !i.path.isArrowFunctionExpression())
|
|
break;
|
|
while (i = i.parent);
|
|
i && t.breakOnScopePaths.push(i.path);
|
|
}
|
|
let r = e.scope.getBinding(e.node.name);
|
|
if (r) {
|
|
for (let i of r.constantViolations)
|
|
if (i.scope !== r.path.scope) {
|
|
t.mutableBinding = !0, e.stop();
|
|
return;
|
|
}
|
|
r === t.scope.getBinding(e.node.name) && (t.bindings[e.node.name] = r);
|
|
}
|
|
}
|
|
}, mw = class {
|
|
static {
|
|
s(this, "PathHoister");
|
|
}
|
|
constructor(t, r) {
|
|
this.breakOnScopePaths = void 0, this.bindings = void 0, this.mutableBinding = void 0, this.scopes = void 0, this.scope = void 0, this.
|
|
path = void 0, this.attachAfter = void 0, this.breakOnScopePaths = [], this.bindings = {}, this.mutableBinding = !1, this.scopes = [],
|
|
this.scope = r, this.path = t, this.attachAfter = !1;
|
|
}
|
|
isCompatibleScope(t) {
|
|
for (let r of Object.keys(this.bindings)) {
|
|
let i = this.bindings[r];
|
|
if (!t.bindingIdentifierEquals(r, i.identifier))
|
|
return !1;
|
|
}
|
|
return !0;
|
|
}
|
|
getCompatibleScopes() {
|
|
let t = this.path.scope;
|
|
do {
|
|
if (this.isCompatibleScope(t))
|
|
this.scopes.push(t);
|
|
else
|
|
break;
|
|
if (this.breakOnScopePaths.includes(t.path))
|
|
break;
|
|
} while (t = t.parent);
|
|
}
|
|
getAttachmentPath() {
|
|
let t = this._getAttachmentPath();
|
|
if (!t) return;
|
|
let r = t.scope;
|
|
if (r.path === t && (r = t.scope.parent), r.path.isProgram() || r.path.isFunction())
|
|
for (let i of Object.keys(this.bindings)) {
|
|
if (!r.hasOwnBinding(i)) continue;
|
|
let n = this.bindings[i];
|
|
if (n.kind === "param" || n.path.parentKey === "params")
|
|
continue;
|
|
if (this.getAttachmentParentForPath(n.path).key >= t.key) {
|
|
this.attachAfter = !0, t = n.path;
|
|
for (let o of n.constantViolations)
|
|
this.getAttachmentParentForPath(o).key > t.key && (t = o);
|
|
}
|
|
}
|
|
return t;
|
|
}
|
|
_getAttachmentPath() {
|
|
let r = this.scopes.pop();
|
|
if (r) {
|
|
if (r.path.isFunction())
|
|
if (this.hasOwnParamBindings(r)) {
|
|
if (this.scope === r) return;
|
|
let i = r.path.get("body").get("body");
|
|
for (let n = 0; n < i.length; n++)
|
|
if (!i[n].node._blockHoist)
|
|
return i[n];
|
|
} else
|
|
return this.getNextScopeAttachmentParent();
|
|
else if (r.path.isProgram())
|
|
return this.getNextScopeAttachmentParent();
|
|
}
|
|
}
|
|
getNextScopeAttachmentParent() {
|
|
let t = this.scopes.pop();
|
|
if (t) return this.getAttachmentParentForPath(t.path);
|
|
}
|
|
getAttachmentParentForPath(t) {
|
|
do
|
|
if (!t.parentPath || Array.isArray(t.container) && t.isStatement())
|
|
return t;
|
|
while (t = t.parentPath);
|
|
}
|
|
hasOwnParamBindings(t) {
|
|
for (let r of Object.keys(this.bindings)) {
|
|
if (!t.hasOwnBinding(r)) continue;
|
|
let i = this.bindings[r];
|
|
if (i.kind === "param" && i.constant) return !0;
|
|
}
|
|
return !1;
|
|
}
|
|
run() {
|
|
if (this.path.traverse(CRe, this), this.mutableBinding) return;
|
|
this.getCompatibleScopes();
|
|
let t = this.getAttachmentPath();
|
|
if (!t || t.getFunctionParent() === this.path.getFunctionParent()) return;
|
|
let r = t.scope.generateUidIdentifier("ref"), i = TRe(r, this.path.node), n = this.attachAfter ? "insertAfter" : "insertBefore", [a] = t[n](
|
|
[t.isVariableDeclarator() ? i : SRe("var", [i])]), o = this.path.parentPath;
|
|
return o.isJSXElement() && this.path.container === o.node.children && (r = xRe(r)), this.path.replaceWith(ERe(r)), t.isVariableDeclarator() ?
|
|
a.get("init") : a.get("declarations.0.init");
|
|
}
|
|
};
|
|
b0.default = mw;
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/modification.js
|
|
var g0 = E((sn) => {
|
|
"use strict";
|
|
Object.defineProperty(sn, "__esModule", {
|
|
value: !0
|
|
});
|
|
sn._containerInsert = vw;
|
|
sn._containerInsertAfter = Iq;
|
|
sn._containerInsertBefore = Ew;
|
|
sn._verifyNodeList = Ud;
|
|
sn.insertAfter = WRe;
|
|
sn.insertBefore = qRe;
|
|
sn.pushContainer = VRe;
|
|
sn.unshiftContainer = $Re;
|
|
sn.updateSiblingKeys = Bq;
|
|
var wRe = Zo(), Dw = za(), yw = ns(), D0 = y0(), ARe = Ve(), _Re = _q(), {
|
|
arrowFunctionExpression: PRe,
|
|
assertExpression: FRe,
|
|
assignmentExpression: IRe,
|
|
blockStatement: Pq,
|
|
callExpression: ORe,
|
|
cloneNode: gw,
|
|
expressionStatement: bw,
|
|
isAssignmentExpression: kRe,
|
|
isCallExpression: BRe,
|
|
isExportNamedDeclaration: Fq,
|
|
isExpression: NRe,
|
|
isIdentifier: MRe,
|
|
isSequenceExpression: RRe,
|
|
isSuper: jRe,
|
|
thisExpression: LRe
|
|
} = ARe;
|
|
function qRe(e) {
|
|
D0._assertUnremoved.call(this);
|
|
let t = Ud.call(this, e), {
|
|
parentPath: r,
|
|
parent: i
|
|
} = this;
|
|
if (r.isExpressionStatement() || r.isLabeledStatement() || Fq(i) || r.isExportDefaultDeclaration() && this.isDeclaration())
|
|
return r.insertBefore(t);
|
|
if (this.isNodeType("Expression") && !this.isJSXElement() || r.isForStatement() && this.key === "init")
|
|
return this.node && t.push(this.node), this.replaceExpressionWithStatements(t);
|
|
if (Array.isArray(this.container))
|
|
return Ew.call(this, t);
|
|
if (this.isStatementOrBlock()) {
|
|
let n = this.node, a = n && (!this.isExpressionStatement() || n.expression != null);
|
|
return this.replaceWith(Pq(a ? [n] : [])), this.unshiftContainer("body", t);
|
|
} else
|
|
throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");
|
|
}
|
|
s(qRe, "insertBefore");
|
|
function vw(e, t) {
|
|
Bq.call(this, e, t.length);
|
|
let r = [];
|
|
this.container.splice(e, 0, ...t);
|
|
for (let a = 0; a < t.length; a++) {
|
|
var i;
|
|
let o = e + a, u = this.getSibling(o);
|
|
r.push(u), (i = this.context) != null && i.queue && yw.pushContext.call(u, this.context);
|
|
}
|
|
let n = yw._getQueueContexts.call(this);
|
|
for (let a of r) {
|
|
yw.setScope.call(a), a.debug("Inserted.");
|
|
for (let o of n)
|
|
o.maybeQueue(a, !0);
|
|
}
|
|
return r;
|
|
}
|
|
s(vw, "_containerInsert");
|
|
function Ew(e) {
|
|
return vw.call(this, this.key, e);
|
|
}
|
|
s(Ew, "_containerInsertBefore");
|
|
function Iq(e) {
|
|
return vw.call(this, this.key + 1, e);
|
|
}
|
|
s(Iq, "_containerInsertAfter");
|
|
var Oq = /* @__PURE__ */ s((e) => e[e.length - 1], "last");
|
|
function kq(e) {
|
|
return RRe(e.parent) && (Oq(e.parent.expressions) !== e.node || kq(e.parentPath));
|
|
}
|
|
s(kq, "isHiddenInSequenceExpression");
|
|
function URe(e, t) {
|
|
if (!kRe(e) || !MRe(e.left))
|
|
return !1;
|
|
let r = t.getBlockParent();
|
|
return r.hasOwnBinding(e.left.name) && r.getOwnBinding(e.left.name).constantViolations.length <= 1;
|
|
}
|
|
s(URe, "isAlmostConstantAssignment");
|
|
function WRe(e) {
|
|
if (D0._assertUnremoved.call(this), this.isSequenceExpression())
|
|
return Oq(this.get("expressions")).insertAfter(e);
|
|
let t = Ud.call(this, e), {
|
|
parentPath: r,
|
|
parent: i
|
|
} = this;
|
|
if (r.isExpressionStatement() || r.isLabeledStatement() || Fq(i) || r.isExportDefaultDeclaration() && this.isDeclaration())
|
|
return r.insertAfter(t.map((n) => NRe(n) ? bw(n) : n));
|
|
if (this.isNodeType("Expression") && !this.isJSXElement() && !r.isJSXElement() || r.isForStatement() && this.key === "init") {
|
|
let n = this;
|
|
if (n.node) {
|
|
let a = n.node, {
|
|
scope: o
|
|
} = this;
|
|
if (o.path.isPattern())
|
|
return FRe(a), n.replaceWith(ORe(PRe([], a), [])), n.get("callee.body").insertAfter(t), [n];
|
|
if (kq(n))
|
|
t.unshift(a);
|
|
else if (BRe(a) && jRe(a.callee))
|
|
t.unshift(a), t.push(LRe());
|
|
else if (URe(a, o))
|
|
t.unshift(a), t.push(gw(a.left));
|
|
else if (o.isPure(a, !0))
|
|
t.push(a);
|
|
else {
|
|
r.isMethod({
|
|
computed: !0,
|
|
key: a
|
|
}) && (o = o.parent);
|
|
let u = o.generateDeclaredUidIdentifier();
|
|
t.unshift(bw(IRe("=", gw(u), a))), t.push(bw(gw(u)));
|
|
}
|
|
}
|
|
return this.replaceExpressionWithStatements(t);
|
|
} else {
|
|
if (Array.isArray(this.container))
|
|
return Iq.call(this, t);
|
|
if (this.isStatementOrBlock()) {
|
|
let n = this.node, a = n && (!this.isExpressionStatement() || n.expression != null);
|
|
return this.replaceWith(Pq(a ? [n] : [])), this.pushContainer("body", t);
|
|
} else
|
|
throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");
|
|
}
|
|
}
|
|
s(WRe, "insertAfter");
|
|
function Bq(e, t) {
|
|
if (!this.parent) return;
|
|
let r = (0, wRe.getCachedPaths)(this.hub, this.parent) || [];
|
|
for (let [, i] of r)
|
|
typeof i.key == "number" && i.container === this.container && i.key >= e && (i.key += t);
|
|
}
|
|
s(Bq, "updateSiblingKeys");
|
|
function Ud(e) {
|
|
if (!e)
|
|
return [];
|
|
Array.isArray(e) || (e = [e]);
|
|
for (let t = 0; t < e.length; t++) {
|
|
let r = e[t], i;
|
|
if (r ? typeof r != "object" ? i = "contains a non-object node" : r.type ? r instanceof Dw.default && (i = "has a NodePath when it exp\
|
|
ected a raw object") : i = "without a type" : i = "has falsy node", i) {
|
|
let n = Array.isArray(r) ? "array" : typeof r;
|
|
throw new Error(`Node list ${i} with the index of ${t} and type of ${n}`);
|
|
}
|
|
}
|
|
return e;
|
|
}
|
|
s(Ud, "_verifyNodeList");
|
|
function $Re(e, t) {
|
|
D0._assertUnremoved.call(this), t = Ud.call(this, t);
|
|
let r = Dw.default.get({
|
|
parentPath: this,
|
|
parent: this.node,
|
|
container: this.node[e],
|
|
listKey: e,
|
|
key: 0
|
|
}).setContext(this.context);
|
|
return Ew.call(r, t);
|
|
}
|
|
s($Re, "unshiftContainer");
|
|
function VRe(e, t) {
|
|
D0._assertUnremoved.call(this);
|
|
let r = Ud.call(this, t), i = this.node[e];
|
|
return Dw.default.get({
|
|
parentPath: this,
|
|
parent: this.node,
|
|
container: i,
|
|
listKey: e,
|
|
key: i.length
|
|
}).setContext(this.context).replaceWithMultiple(r);
|
|
}
|
|
s(VRe, "pushContainer");
|
|
sn.hoist = /* @__PURE__ */ s(function(t = this.scope) {
|
|
return new _Re.default(this, t).run();
|
|
}, "hoist");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/replacement.js
|
|
var hw = E((Ga) => {
|
|
"use strict";
|
|
Object.defineProperty(Ga, "__esModule", {
|
|
value: !0
|
|
});
|
|
Ga._replaceWith = Wq;
|
|
Ga.replaceExpressionWithStatements = bje;
|
|
Ga.replaceInline = Dje;
|
|
Ga.replaceWith = gje;
|
|
Ga.replaceWithMultiple = mje;
|
|
Ga.replaceWithSourceString = yje;
|
|
var HRe = Pd(), Sw = Ar(), KRe = za(), Lq = Zo(), Tw = g0(), zRe = zo(), GRe = Ve(), zl = ns(), {
|
|
FUNCTION_TYPES: Nq,
|
|
arrowFunctionExpression: JRe,
|
|
assignmentExpression: qq,
|
|
awaitExpression: XRe,
|
|
blockStatement: YRe,
|
|
buildUndefinedNode: xw,
|
|
callExpression: ZRe,
|
|
cloneNode: Cw,
|
|
conditionalExpression: QRe,
|
|
expressionStatement: eje,
|
|
getBindingIdentifiers: tje,
|
|
identifier: rje,
|
|
inheritLeadingComments: ije,
|
|
inheritTrailingComments: nje,
|
|
inheritsComments: sje,
|
|
isBlockStatement: aje,
|
|
isEmptyStatement: Mq,
|
|
isExpression: Uq,
|
|
isExpressionStatement: oje,
|
|
isIfStatement: uje,
|
|
isProgram: lje,
|
|
isStatement: cje,
|
|
isVariableDeclaration: fje,
|
|
removeComments: dje,
|
|
returnStatement: Rq,
|
|
sequenceExpression: pje,
|
|
validate: jq,
|
|
yieldExpression: hje
|
|
} = GRe;
|
|
function mje(e) {
|
|
var t;
|
|
zl.resync.call(this), e = Tw._verifyNodeList.call(this, e), ije(e[0], this.node), nje(e[e.length - 1], this.node), (t = (0, Lq.getCachedPaths)(
|
|
this.hub, this.parent)) == null || t.delete(this.node), this.node = this.container[this.key] = null;
|
|
let r = this.insertAfter(e);
|
|
return this.node ? this.requeue() : this.remove(), r;
|
|
}
|
|
s(mje, "replaceWithMultiple");
|
|
function yje(e) {
|
|
zl.resync.call(this);
|
|
let t;
|
|
try {
|
|
e = `(${e})`, t = (0, zRe.parse)(e);
|
|
} catch (i) {
|
|
let n = i.loc;
|
|
throw n && (i.message += ` - make sure this is an expression.
|
|
` + (0, HRe.codeFrameColumns)(e, {
|
|
start: {
|
|
line: n.line,
|
|
column: n.column + 1
|
|
}
|
|
}), i.code = "BABEL_REPLACE_SOURCE_ERROR"), i;
|
|
}
|
|
let r = t.program.body[0].expression;
|
|
return Sw.default.removeProperties(r), this.replaceWith(r);
|
|
}
|
|
s(yje, "replaceWithSourceString");
|
|
function gje(e) {
|
|
if (zl.resync.call(this), this.removed)
|
|
throw new Error("You can't replace this node, we've already removed it");
|
|
let t = e instanceof KRe.default ? e.node : e;
|
|
if (!t)
|
|
throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
|
|
if (this.node === t)
|
|
return [this];
|
|
if (this.isProgram() && !lje(t))
|
|
throw new Error("You can only replace a Program root node with another Program node");
|
|
if (Array.isArray(t))
|
|
throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
|
|
if (typeof t == "string")
|
|
throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
|
|
let r = "";
|
|
if (this.isNodeType("Statement") && Uq(t) && !this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(
|
|
t) && !this.parentPath.isExportDefaultDeclaration() && (t = eje(t), r = "expression"), this.isNodeType("Expression") && cje(t) && !this.
|
|
canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(t))
|
|
return this.replaceExpressionWithStatements([t]);
|
|
let i = this.node;
|
|
return i && (sje(t, i), dje(i)), Wq.call(this, t), this.type = t.type, zl.setScope.call(this), this.requeue(), [r ? this.get(r) : this];
|
|
}
|
|
s(gje, "replaceWith");
|
|
function Wq(e) {
|
|
var t;
|
|
if (!this.container)
|
|
throw new ReferenceError("Container is falsy");
|
|
this.inList ? jq(this.parent, this.key, [e]) : jq(this.parent, this.key, e), this.debug(`Replace with ${e?.type}`), (t = (0, Lq.getCachedPaths)(
|
|
this.hub, this.parent)) == null || t.set(e, this).delete(this.node), this.node = this.container[this.key] = e;
|
|
}
|
|
s(Wq, "_replaceWith");
|
|
function bje(e) {
|
|
zl.resync.call(this);
|
|
let t = [], r = v0(e, t);
|
|
if (r) {
|
|
for (let h of t) this.scope.push({
|
|
id: h
|
|
});
|
|
return this.replaceWith(r)[0].get("expressions");
|
|
}
|
|
let i = this.getFunctionParent(), n = i?.node.async, a = i?.node.generator, o = JRe([], YRe(e));
|
|
this.replaceWith(ZRe(o, []));
|
|
let u = this.get("callee");
|
|
u.get("body").scope.hoistVariables((h) => this.scope.push({
|
|
id: h
|
|
}));
|
|
let l = u.getCompletionRecords();
|
|
for (let h of l) {
|
|
if (!h.isExpressionStatement()) continue;
|
|
let d = h.findParent((y) => y.isLoop());
|
|
if (d) {
|
|
let y = d.getData("expressionReplacementReturnUid");
|
|
y ? y = rje(y.name) : (y = u.scope.generateDeclaredUidIdentifier("ret"), u.get("body").pushContainer("body", Rq(Cw(y))), d.setData("\
|
|
expressionReplacementReturnUid", y)), h.get("expression").replaceWith(qq("=", Cw(y), h.node.expression));
|
|
} else
|
|
h.replaceWith(Rq(h.node.expression));
|
|
}
|
|
u.arrowFunctionToExpression();
|
|
let c = u, f = n && Sw.default.hasType(this.get("callee.body").node, "AwaitExpression", Nq), m = a && Sw.default.hasType(this.get("calle\
|
|
e.body").node, "YieldExpression", Nq);
|
|
return f && (c.set("async", !0), m || this.replaceWith(XRe(this.node))), m && (c.set("generator", !0), this.replaceWith(hje(this.node, !0))),
|
|
c.get("body.body");
|
|
}
|
|
s(bje, "replaceExpressionWithStatements");
|
|
function v0(e, t) {
|
|
let r = [], i = !0;
|
|
for (let n of e)
|
|
if (Mq(n) || (i = !1), Uq(n))
|
|
r.push(n);
|
|
else if (oje(n))
|
|
r.push(n.expression);
|
|
else if (fje(n)) {
|
|
if (n.kind !== "var") return;
|
|
for (let a of n.declarations) {
|
|
let o = tje(a);
|
|
for (let u of Object.keys(o))
|
|
t.push(Cw(o[u]));
|
|
a.init && r.push(qq("=", a.id, a.init));
|
|
}
|
|
i = !0;
|
|
} else if (uje(n)) {
|
|
let a = n.consequent ? v0([n.consequent], t) : xw(), o = n.alternate ? v0([n.alternate], t) : xw();
|
|
if (!a || !o) return;
|
|
r.push(QRe(n.test, a, o));
|
|
} else if (aje(n)) {
|
|
let a = v0(n.body, t);
|
|
if (!a) return;
|
|
r.push(a);
|
|
} else if (Mq(n))
|
|
e.indexOf(n) === 0 && (i = !0);
|
|
else
|
|
return;
|
|
return i && r.push(xw()), r.length === 1 ? r[0] : pje(r);
|
|
}
|
|
s(v0, "gatherSequenceExpressions");
|
|
function Dje(e) {
|
|
if (zl.resync.call(this), Array.isArray(e))
|
|
if (Array.isArray(this.container)) {
|
|
e = Tw._verifyNodeList.call(this, e);
|
|
let t = Tw._containerInsertAfter.call(this, e);
|
|
return this.remove(), t;
|
|
} else
|
|
return this.replaceWithMultiple(e);
|
|
else
|
|
return this.replaceWith(e);
|
|
}
|
|
s(Dje, "replaceInline");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/evaluation.js
|
|
var Kq = E((E0) => {
|
|
"use strict";
|
|
Object.defineProperty(E0, "__esModule", {
|
|
value: !0
|
|
});
|
|
E0.evaluate = Aje;
|
|
E0.evaluateTruthy = Cje;
|
|
var vje = ["Number", "String", "Math"], Eje = ["isFinite", "isNaN", "parseFloat", "parseInt", "decodeURI", "decodeURIComponent", "encodeUR\
|
|
I", "encodeURIComponent", null, null], xje = ["random"];
|
|
function $q(e) {
|
|
return vje.includes(e);
|
|
}
|
|
s($q, "isValidObjectCallee");
|
|
function Sje(e) {
|
|
return Eje.includes(e);
|
|
}
|
|
s(Sje, "isValidIdentifierCallee");
|
|
function Tje(e) {
|
|
return xje.includes(e);
|
|
}
|
|
s(Tje, "isInvalidMethod");
|
|
function Cje() {
|
|
let e = this.evaluate();
|
|
if (e.confident) return !!e.value;
|
|
}
|
|
s(Cje, "evaluateTruthy");
|
|
function ss(e, t) {
|
|
t.confident && (t.deoptPath = e, t.confident = !1);
|
|
}
|
|
s(ss, "deopt");
|
|
var Vq = /* @__PURE__ */ new Map([["undefined", void 0], ["Infinity", 1 / 0], ["NaN", NaN]]);
|
|
function bi(e, t) {
|
|
let {
|
|
node: r
|
|
} = e, {
|
|
seen: i
|
|
} = t;
|
|
if (i.has(r)) {
|
|
let n = i.get(r);
|
|
if (n.resolved)
|
|
return n.value;
|
|
ss(e, t);
|
|
return;
|
|
} else {
|
|
let n = {
|
|
resolved: !1
|
|
};
|
|
i.set(r, n);
|
|
let a = wje(e, t);
|
|
return t.confident && (n.resolved = !0, n.value = a), a;
|
|
}
|
|
}
|
|
s(bi, "evaluateCached");
|
|
function wje(e, t) {
|
|
if (t.confident) {
|
|
if (e.isSequenceExpression()) {
|
|
let i = e.get("expressions");
|
|
return bi(i[i.length - 1], t);
|
|
}
|
|
if (e.isStringLiteral() || e.isNumericLiteral() || e.isBooleanLiteral())
|
|
return e.node.value;
|
|
if (e.isNullLiteral())
|
|
return null;
|
|
if (e.isTemplateLiteral())
|
|
return Hq(e, e.node.quasis, t);
|
|
if (e.isTaggedTemplateExpression() && e.get("tag").isMemberExpression()) {
|
|
let i = e.get("tag.object"), {
|
|
node: {
|
|
name: n
|
|
}
|
|
} = i, a = e.get("tag.property");
|
|
if (i.isIdentifier() && n === "String" && !e.scope.getBinding(n) && a.isIdentifier() && a.node.name === "raw")
|
|
return Hq(e, e.node.quasi.quasis, t, !0);
|
|
}
|
|
if (e.isConditionalExpression()) {
|
|
let i = bi(e.get("test"), t);
|
|
return t.confident ? bi(i ? e.get("consequent") : e.get("alternate"), t) : void 0;
|
|
}
|
|
if (e.isExpressionWrapper())
|
|
return bi(e.get("expression"), t);
|
|
if (e.isMemberExpression() && !e.parentPath.isCallExpression({
|
|
callee: e.node
|
|
})) {
|
|
let i = e.get("property"), n = e.get("object");
|
|
if (n.isLiteral()) {
|
|
let a = n.node.value, o = typeof a, u = null;
|
|
if (e.node.computed) {
|
|
if (u = bi(i, t), !t.confident) return;
|
|
} else i.isIdentifier() && (u = i.node.name);
|
|
if ((o === "number" || o === "string") && u != null && (typeof u == "number" || typeof u == "string"))
|
|
return a[u];
|
|
}
|
|
}
|
|
if (e.isReferencedIdentifier()) {
|
|
let i = e.scope.getBinding(e.node.name);
|
|
if (i) {
|
|
if (i.constantViolations.length > 0 || e.node.start < i.path.node.end) {
|
|
ss(i.path, t);
|
|
return;
|
|
}
|
|
let o = i.path.scope;
|
|
if (i.kind === "var" && o !== i.scope) {
|
|
let u = !o.path.parentPath.isBlockStatement();
|
|
for (let l = o.parent; l; l = l.parent) {
|
|
var r;
|
|
if (l === e.scope) {
|
|
if (u) {
|
|
ss(i.path, t);
|
|
return;
|
|
}
|
|
break;
|
|
}
|
|
(r = l.path.parentPath) != null && r.isBlockStatement() && (u = !0);
|
|
}
|
|
}
|
|
if (i.hasValue)
|
|
return i.value;
|
|
}
|
|
let n = e.node.name;
|
|
if (Vq.has(n)) {
|
|
if (!i)
|
|
return Vq.get(n);
|
|
ss(i.path, t);
|
|
return;
|
|
}
|
|
let a = e.resolve();
|
|
if (a === e) {
|
|
ss(e, t);
|
|
return;
|
|
} else
|
|
return bi(a, t);
|
|
}
|
|
if (e.isUnaryExpression({
|
|
prefix: !0
|
|
})) {
|
|
if (e.node.operator === "void")
|
|
return;
|
|
let i = e.get("argument");
|
|
if (e.node.operator === "typeof" && (i.isFunction() || i.isClass()))
|
|
return "function";
|
|
let n = bi(i, t);
|
|
if (!t.confident) return;
|
|
switch (e.node.operator) {
|
|
case "!":
|
|
return !n;
|
|
case "+":
|
|
return +n;
|
|
case "-":
|
|
return -n;
|
|
case "~":
|
|
return ~n;
|
|
case "typeof":
|
|
return typeof n;
|
|
}
|
|
}
|
|
if (e.isArrayExpression()) {
|
|
let i = [], n = e.get("elements");
|
|
for (let a of n) {
|
|
let o = a.evaluate();
|
|
if (o.confident)
|
|
i.push(o.value);
|
|
else {
|
|
ss(o.deopt, t);
|
|
return;
|
|
}
|
|
}
|
|
return i;
|
|
}
|
|
if (e.isObjectExpression()) {
|
|
let i = {}, n = e.get("properties");
|
|
for (let a of n) {
|
|
if (a.isObjectMethod() || a.isSpreadElement()) {
|
|
ss(a, t);
|
|
return;
|
|
}
|
|
let o = a.get("key"), u;
|
|
if (a.node.computed) {
|
|
if (u = o.evaluate(), !u.confident) {
|
|
ss(u.deopt, t);
|
|
return;
|
|
}
|
|
u = u.value;
|
|
} else o.isIdentifier() ? u = o.node.name : u = o.node.value;
|
|
let c = a.get("value").evaluate();
|
|
if (!c.confident) {
|
|
ss(c.deopt, t);
|
|
return;
|
|
}
|
|
c = c.value, i[u] = c;
|
|
}
|
|
return i;
|
|
}
|
|
if (e.isLogicalExpression()) {
|
|
let i = t.confident, n = bi(e.get("left"), t), a = t.confident;
|
|
t.confident = i;
|
|
let o = bi(e.get("right"), t), u = t.confident;
|
|
switch (e.node.operator) {
|
|
case "||":
|
|
return t.confident = a && (!!n || u), t.confident ? n || o : void 0;
|
|
case "&&":
|
|
return t.confident = a && (!n || u), t.confident ? n && o : void 0;
|
|
case "??":
|
|
return t.confident = a && (n != null || u), t.confident ? n ?? o : void 0;
|
|
}
|
|
}
|
|
if (e.isBinaryExpression()) {
|
|
let i = bi(e.get("left"), t);
|
|
if (!t.confident) return;
|
|
let n = bi(e.get("right"), t);
|
|
if (!t.confident) return;
|
|
switch (e.node.operator) {
|
|
case "-":
|
|
return i - n;
|
|
case "+":
|
|
return i + n;
|
|
case "/":
|
|
return i / n;
|
|
case "*":
|
|
return i * n;
|
|
case "%":
|
|
return i % n;
|
|
case "**":
|
|
return Math.pow(i, n);
|
|
case "<":
|
|
return i < n;
|
|
case ">":
|
|
return i > n;
|
|
case "<=":
|
|
return i <= n;
|
|
case ">=":
|
|
return i >= n;
|
|
case "==":
|
|
return i == n;
|
|
case "!=":
|
|
return i != n;
|
|
case "===":
|
|
return i === n;
|
|
case "!==":
|
|
return i !== n;
|
|
case "|":
|
|
return i | n;
|
|
case "&":
|
|
return i & n;
|
|
case "^":
|
|
return i ^ n;
|
|
case "<<":
|
|
return i << n;
|
|
case ">>":
|
|
return i >> n;
|
|
case ">>>":
|
|
return i >>> n;
|
|
}
|
|
}
|
|
if (e.isCallExpression()) {
|
|
let i = e.get("callee"), n, a;
|
|
if (i.isIdentifier() && !e.scope.getBinding(i.node.name) && ($q(i.node.name) || Sje(i.node.name)) && (a = global[i.node.name]), i.isMemberExpression()) {
|
|
let o = i.get("object"), u = i.get("property");
|
|
if (o.isIdentifier() && u.isIdentifier() && $q(o.node.name) && !Tje(u.node.name)) {
|
|
n = global[o.node.name];
|
|
let l = u.node.name;
|
|
hasOwnProperty.call(n, l) && (a = n[l]);
|
|
}
|
|
if (o.isLiteral() && u.isIdentifier()) {
|
|
let l = typeof o.node.value;
|
|
(l === "string" || l === "number") && (n = o.node.value, a = n[u.node.name]);
|
|
}
|
|
}
|
|
if (a) {
|
|
let o = e.get("arguments").map((u) => bi(u, t));
|
|
return t.confident ? a.apply(n, o) : void 0;
|
|
}
|
|
}
|
|
ss(e, t);
|
|
}
|
|
}
|
|
s(wje, "_evaluate");
|
|
function Hq(e, t, r, i = !1) {
|
|
let n = "", a = 0, o = e.isTemplateLiteral() ? e.get("expressions") : e.get("quasi.expressions");
|
|
for (let u of t) {
|
|
if (!r.confident) break;
|
|
n += i ? u.value.raw : u.value.cooked;
|
|
let l = o[a++];
|
|
l && (n += String(bi(l, r)));
|
|
}
|
|
if (r.confident)
|
|
return n;
|
|
}
|
|
s(Hq, "evaluateQuasis");
|
|
function Aje() {
|
|
let e = {
|
|
confident: !0,
|
|
deoptPath: null,
|
|
seen: /* @__PURE__ */ new Map()
|
|
}, t = bi(this, e);
|
|
return e.confident || (t = void 0), {
|
|
confident: e.confident,
|
|
deopt: e.deoptPath,
|
|
value: t
|
|
};
|
|
}
|
|
s(Aje, "evaluate");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/conversion.js
|
|
var eU = E((Ks) => {
|
|
"use strict";
|
|
Object.defineProperty(Ks, "__esModule", {
|
|
value: !0
|
|
});
|
|
Ks.arrowFunctionToExpression = iLe;
|
|
Ks.ensureBlock = eLe;
|
|
Ks.ensureFunctionName = mLe;
|
|
Ks.splitExportDeclaration = pLe;
|
|
Ks.toComputedKey = Qje;
|
|
Ks.unwrapFunctionEnvironment = tLe;
|
|
var _je = Ve(), Pje = Od(), _w = qy(), Fje = ns(), {
|
|
arrowFunctionExpression: Pw,
|
|
assignmentExpression: nu,
|
|
binaryExpression: ww,
|
|
blockStatement: Ije,
|
|
callExpression: Gl,
|
|
conditionalExpression: Oje,
|
|
expressionStatement: Jq,
|
|
identifier: kt,
|
|
isIdentifier: kje,
|
|
jsxIdentifier: Bje,
|
|
logicalExpression: Nje,
|
|
LOGICAL_OPERATORS: Mje,
|
|
memberExpression: Cn,
|
|
metaProperty: Rje,
|
|
numericLiteral: jje,
|
|
objectExpression: Lje,
|
|
restElement: qje,
|
|
returnStatement: Uje,
|
|
sequenceExpression: Wje,
|
|
spreadElement: $je,
|
|
stringLiteral: Xq,
|
|
super: Aw,
|
|
thisExpression: Wd,
|
|
toExpression: Yq,
|
|
unaryExpression: Vje,
|
|
toBindingIdentifierName: Hje,
|
|
isFunction: Kje,
|
|
isAssignmentPattern: zje,
|
|
isRestElement: Gje,
|
|
getFunctionName: Jje,
|
|
cloneNode: su,
|
|
variableDeclaration: Xje,
|
|
variableDeclarator: Yje,
|
|
exportNamedDeclaration: zq,
|
|
exportSpecifier: Gq,
|
|
inherits: Zje
|
|
} = _je;
|
|
function Qje() {
|
|
let e;
|
|
if (this.isMemberExpression())
|
|
e = this.node.property;
|
|
else if (this.isProperty() || this.isMethod())
|
|
e = this.node.key;
|
|
else
|
|
throw new ReferenceError("todo");
|
|
return this.node.computed || kje(e) && (e = Xq(e.name)), e;
|
|
}
|
|
s(Qje, "toComputedKey");
|
|
function eLe() {
|
|
let e = this.get("body"), t = e.node;
|
|
if (Array.isArray(e))
|
|
throw new Error("Can't convert array path to a block statement");
|
|
if (!t)
|
|
throw new Error("Can't convert node without a body");
|
|
if (e.isBlockStatement())
|
|
return t;
|
|
let r = [], i = "body", n, a;
|
|
e.isStatement() ? (a = "body", n = 0, r.push(e.node)) : (i += ".body.0", this.isFunction() ? (n = "argument", r.push(Uje(e.node))) : (n =
|
|
"expression", r.push(Jq(e.node)))), this.node.body = Ije(r);
|
|
let o = this.get(i);
|
|
return Fje.setup.call(e, o, a ? o.node[a] : o.node, a, n), this.node;
|
|
}
|
|
s(eLe, "ensureBlock");
|
|
Ks.arrowFunctionToShadowed = function() {
|
|
this.isArrowFunctionExpression() && this.arrowFunctionToExpression();
|
|
};
|
|
function tLe() {
|
|
if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration())
|
|
throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
|
|
Zq(this);
|
|
}
|
|
s(tLe, "unwrapFunctionEnvironment");
|
|
function rLe(e, t) {
|
|
e.node.type = t;
|
|
}
|
|
s(rLe, "setType");
|
|
function iLe({
|
|
allowInsertArrow: e = !0,
|
|
allowInsertArrowWithRest: t = e,
|
|
noNewArrows: r = !((i) => (i = arguments[0]) == null ? void 0 : i.specCompliant)()
|
|
} = {}) {
|
|
if (!this.isArrowFunctionExpression())
|
|
throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
|
|
let i = this;
|
|
if (!r) {
|
|
var n;
|
|
i = (n = i.ensureFunctionName(!1)) != null ? n : i;
|
|
}
|
|
let {
|
|
thisBinding: a,
|
|
fnPath: o
|
|
} = Zq(i, r, e, t);
|
|
if (o.ensureBlock(), rLe(o, "FunctionExpression"), !r) {
|
|
let u = a ? null : o.scope.generateUidIdentifier("arrowCheckId");
|
|
return u && o.parentPath.scope.push({
|
|
id: u,
|
|
init: Lje([])
|
|
}), o.get("body").unshiftContainer("body", Jq(Gl(this.hub.addHelper("newArrowCheck"), [Wd(), kt(u ? u.name : a)]))), o.replaceWith(Gl(
|
|
Cn(o.node, kt("bind")), [u ? kt(u.name) : Wd()])), o.get("callee.object");
|
|
}
|
|
return o;
|
|
}
|
|
s(iLe, "arrowFunctionToExpression");
|
|
var nLe = (0, _w.environmentVisitor)({
|
|
CallExpression(e, {
|
|
allSuperCalls: t
|
|
}) {
|
|
e.get("callee").isSuper() && t.push(e);
|
|
}
|
|
});
|
|
function Zq(e, t = !0, r = !0, i = !0) {
|
|
let n, a = e.findParent((d) => d.isArrowFunctionExpression() ? (n ?? (n = d), !1) : d.isFunction() || d.isProgram() || d.isClassProperty(
|
|
{
|
|
static: !1
|
|
}) || d.isClassPrivateProperty({
|
|
static: !1
|
|
})), o = a.isClassMethod({
|
|
kind: "constructor"
|
|
});
|
|
if (a.isClassProperty() || a.isClassPrivateProperty())
|
|
if (n)
|
|
a = n;
|
|
else if (r)
|
|
e.replaceWith(Gl(Pw([], Yq(e.node)), [])), a = e.get("callee"), e = a.get("body");
|
|
else
|
|
throw e.buildCodeFrameError("Unable to transform arrow inside class property");
|
|
let {
|
|
thisPaths: u,
|
|
argumentsPaths: l,
|
|
newTargetPaths: c,
|
|
superProps: f,
|
|
superCalls: m
|
|
} = dLe(e);
|
|
if (o && m.length > 0) {
|
|
if (!r)
|
|
throw m[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an a\
|
|
rrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");
|
|
if (!i)
|
|
throw m[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow \
|
|
function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration\
|
|
.");
|
|
let d = [];
|
|
a.traverse(nLe, {
|
|
allSuperCalls: d
|
|
});
|
|
let y = lLe(a);
|
|
d.forEach((p) => {
|
|
let g = kt(y);
|
|
g.loc = p.node.callee.loc, p.get("callee").replaceWith(g);
|
|
});
|
|
}
|
|
if (l.length > 0) {
|
|
let d = $d(a, "arguments", () => {
|
|
let y = /* @__PURE__ */ s(() => kt("arguments"), "args");
|
|
return a.scope.path.isProgram() ? Oje(ww("===", Vje("typeof", y()), Xq("undefined")), a.scope.buildUndefinedNode(), y()) : y();
|
|
});
|
|
l.forEach((y) => {
|
|
let p = kt(d);
|
|
p.loc = y.node.loc, y.replaceWith(p);
|
|
});
|
|
}
|
|
if (c.length > 0) {
|
|
let d = $d(a, "newtarget", () => Rje(kt("new"), kt("target")));
|
|
c.forEach((y) => {
|
|
let p = kt(d);
|
|
p.loc = y.node.loc, y.replaceWith(p);
|
|
});
|
|
}
|
|
if (f.length > 0) {
|
|
if (!r)
|
|
throw f[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in a\
|
|
n arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");
|
|
f.reduce((y, p) => y.concat(aLe(p)), []).forEach((y) => {
|
|
let p = y.node.computed ? "" : y.get("property").node.name, g = y.parentPath, b = g.isAssignmentExpression({
|
|
left: y.node
|
|
}), D = g.isCallExpression({
|
|
callee: y.node
|
|
}), v = g.isTaggedTemplateExpression({
|
|
tag: y.node
|
|
}), S = cLe(a, b, p), C = [];
|
|
if (y.node.computed && C.push(y.get("property").node), b) {
|
|
let k = g.node.right;
|
|
C.push(k);
|
|
}
|
|
let O = Gl(kt(S), C);
|
|
D ? (g.unshiftContainer("arguments", Wd()), y.replaceWith(Cn(O, kt("call"))), u.push(g.get("arguments.0"))) : b ? g.replaceWith(O) :
|
|
v ? (y.replaceWith(Gl(Cn(O, kt("bind"), !1), [Wd()])), u.push(y.get("arguments.0"))) : y.replaceWith(O);
|
|
});
|
|
}
|
|
let h;
|
|
return (u.length > 0 || !t) && (h = uLe(a, o), (t || o && Qq(a)) && (u.forEach((d) => {
|
|
let y = d.isJSX() ? Bje(h) : kt(h);
|
|
y.loc = d.node.loc, d.replaceWith(y);
|
|
}), t || (h = null))), {
|
|
thisBinding: h,
|
|
fnPath: e
|
|
};
|
|
}
|
|
s(Zq, "hoistFunctionEnvironment");
|
|
function sLe(e) {
|
|
return Mje.includes(e);
|
|
}
|
|
s(sLe, "isLogicalOp");
|
|
function aLe(e) {
|
|
if (e.parentPath.isAssignmentExpression() && e.parentPath.node.operator !== "=") {
|
|
let r = e.parentPath, i = r.node.operator.slice(0, -1), n = r.node.right, a = sLe(i);
|
|
if (e.node.computed) {
|
|
let o = e.scope.generateDeclaredUidIdentifier("tmp"), u = e.node.object, l = e.node.property;
|
|
r.get("left").replaceWith(Cn(u, nu("=", o, l), !0)), r.get("right").replaceWith(t(a ? "=" : i, Cn(u, kt(o.name), !0), n));
|
|
} else {
|
|
let o = e.node.object, u = e.node.property;
|
|
r.get("left").replaceWith(Cn(o, u)), r.get("right").replaceWith(t(a ? "=" : i, Cn(o, kt(u.name)), n));
|
|
}
|
|
return a ? r.replaceWith(Nje(i, r.node.left, r.node.right)) : r.node.operator = "=", [r.get("left"), r.get("right").get("left")];
|
|
} else if (e.parentPath.isUpdateExpression()) {
|
|
let r = e.parentPath, i = e.scope.generateDeclaredUidIdentifier("tmp"), n = e.node.computed ? e.scope.generateDeclaredUidIdentifier("p\
|
|
rop") : null, a = [nu("=", i, Cn(e.node.object, n ? nu("=", n, e.node.property) : e.node.property, e.node.computed)), nu("=", Cn(e.node.object,
|
|
n ? kt(n.name) : e.node.property, e.node.computed), ww(e.parentPath.node.operator[0], kt(i.name), jje(1)))];
|
|
e.parentPath.node.prefix || a.push(kt(i.name)), r.replaceWith(Wje(a));
|
|
let o = r.get("expressions.0.right"), u = r.get("expressions.1.left");
|
|
return [o, u];
|
|
}
|
|
return [e];
|
|
function t(r, i, n) {
|
|
return r === "=" ? nu("=", i, n) : ww(r, i, n);
|
|
}
|
|
}
|
|
s(aLe, "standardizeSuperProperty");
|
|
function Qq(e) {
|
|
return e.isClassMethod() && !!e.parentPath.parentPath.node.superClass;
|
|
}
|
|
s(Qq, "hasSuperClass");
|
|
var oLe = (0, _w.environmentVisitor)({
|
|
CallExpression(e, {
|
|
supers: t,
|
|
thisBinding: r
|
|
}) {
|
|
e.get("callee").isSuper() && (t.has(e.node) || (t.add(e.node), e.replaceWithMultiple([e.node, nu("=", kt(r), kt("this"))])));
|
|
}
|
|
});
|
|
function uLe(e, t) {
|
|
return $d(e, "this", (r) => {
|
|
if (!t || !Qq(e)) return Wd();
|
|
e.traverse(oLe, {
|
|
supers: /* @__PURE__ */ new WeakSet(),
|
|
thisBinding: r
|
|
});
|
|
});
|
|
}
|
|
s(uLe, "getThisBinding");
|
|
function lLe(e) {
|
|
return $d(e, "supercall", () => {
|
|
let t = e.scope.generateUidIdentifier("args");
|
|
return Pw([qje(t)], Gl(Aw(), [$je(kt(t.name))]));
|
|
});
|
|
}
|
|
s(lLe, "getSuperBinding");
|
|
function cLe(e, t, r) {
|
|
return $d(e, `superprop_${t ? "set" : "get"}:${r || ""}`, () => {
|
|
let n = [], a;
|
|
if (r)
|
|
a = Cn(Aw(), kt(r));
|
|
else {
|
|
let o = e.scope.generateUidIdentifier("prop");
|
|
n.unshift(o), a = Cn(Aw(), kt(o.name), !0);
|
|
}
|
|
if (t) {
|
|
let o = e.scope.generateUidIdentifier("value");
|
|
n.push(o), a = nu("=", a, kt(o.name));
|
|
}
|
|
return Pw(n, a);
|
|
});
|
|
}
|
|
s(cLe, "getSuperPropBinding");
|
|
function $d(e, t, r) {
|
|
let i = "binding:" + t, n = e.getData(i);
|
|
if (!n) {
|
|
let a = e.scope.generateUidIdentifier(t);
|
|
n = a.name, e.setData(i, n), e.scope.push({
|
|
id: a,
|
|
init: r(n)
|
|
});
|
|
}
|
|
return n;
|
|
}
|
|
s($d, "getBinding");
|
|
var fLe = (0, _w.environmentVisitor)({
|
|
ThisExpression(e, {
|
|
thisPaths: t
|
|
}) {
|
|
t.push(e);
|
|
},
|
|
JSXIdentifier(e, {
|
|
thisPaths: t
|
|
}) {
|
|
e.node.name === "this" && (!e.parentPath.isJSXMemberExpression({
|
|
object: e.node
|
|
}) && !e.parentPath.isJSXOpeningElement({
|
|
name: e.node
|
|
}) || t.push(e));
|
|
},
|
|
CallExpression(e, {
|
|
superCalls: t
|
|
}) {
|
|
e.get("callee").isSuper() && t.push(e);
|
|
},
|
|
MemberExpression(e, {
|
|
superProps: t
|
|
}) {
|
|
e.get("object").isSuper() && t.push(e);
|
|
},
|
|
Identifier(e, {
|
|
argumentsPaths: t
|
|
}) {
|
|
if (!e.isReferencedIdentifier({
|
|
name: "arguments"
|
|
})) return;
|
|
let r = e.scope;
|
|
do {
|
|
if (r.hasOwnBinding("arguments")) {
|
|
r.rename("arguments");
|
|
return;
|
|
}
|
|
if (r.path.isFunction() && !r.path.isArrowFunctionExpression())
|
|
break;
|
|
} while (r = r.parent);
|
|
t.push(e);
|
|
},
|
|
MetaProperty(e, {
|
|
newTargetPaths: t
|
|
}) {
|
|
e.get("meta").isIdentifier({
|
|
name: "new"
|
|
}) && e.get("property").isIdentifier({
|
|
name: "target"
|
|
}) && t.push(e);
|
|
}
|
|
});
|
|
function dLe(e) {
|
|
let t = [], r = [], i = [], n = [], a = [];
|
|
return e.traverse(fLe, {
|
|
thisPaths: t,
|
|
argumentsPaths: r,
|
|
newTargetPaths: i,
|
|
superProps: n,
|
|
superCalls: a
|
|
}), {
|
|
thisPaths: t,
|
|
argumentsPaths: r,
|
|
newTargetPaths: i,
|
|
superProps: n,
|
|
superCalls: a
|
|
};
|
|
}
|
|
s(dLe, "getScopeInformation");
|
|
function pLe() {
|
|
if (!this.isExportDeclaration() || this.isExportAllDeclaration())
|
|
throw new Error("Only default and named export declarations can be split.");
|
|
if (this.isExportNamedDeclaration() && this.get("specifiers").length > 0)
|
|
throw new Error("It doesn't make sense to split exported specifiers.");
|
|
let e = this.get("declaration");
|
|
if (this.isExportDefaultDeclaration()) {
|
|
let n = e.isFunctionDeclaration() || e.isClassDeclaration(), a = e.isFunctionExpression() || e.isClassExpression(), o = e.isScope() ? e.
|
|
scope.parent : e.scope, u = e.node.id, l = !1;
|
|
u ? a && o.hasBinding(u.name) && (l = !0, u = o.generateUidIdentifier(u.name)) : (l = !0, u = o.generateUidIdentifier("default"), (n ||
|
|
a) && (e.node.id = su(u)));
|
|
let c = n ? e.node : Xje("var", [Yje(su(u), e.node)]), f = zq(null, [Gq(su(u), kt("default"))]);
|
|
return this.insertAfter(f), this.replaceWith(c), l && o.registerDeclaration(this), this;
|
|
} else if (this.get("specifiers").length > 0)
|
|
throw new Error("It doesn't make sense to split exported specifiers.");
|
|
let t = e.getOuterBindingIdentifiers(), r = Object.keys(t).map((n) => Gq(kt(n), kt(n))), i = zq(null, r);
|
|
return this.insertAfter(i), this.replaceWith(e.node), this;
|
|
}
|
|
s(pLe, "splitExportDeclaration");
|
|
var hLe = {
|
|
"ReferencedIdentifier|BindingIdentifier"(e, t) {
|
|
e.node.name === t.name && (t.needsRename = !0, e.stop());
|
|
},
|
|
Scope(e, t) {
|
|
e.scope.hasOwnBinding(t.name) && e.skip();
|
|
}
|
|
};
|
|
function mLe(e) {
|
|
if (this.node.id) return this;
|
|
let t = Jje(this.node, this.parent);
|
|
if (t == null) return this;
|
|
let {
|
|
name: r
|
|
} = t;
|
|
if (!e && /[\uD800-\uDFFF]/.test(r) || r.startsWith("get ") || r.startsWith("set "))
|
|
return null;
|
|
r = Hje(r.replace(/[/ ]/g, "_"));
|
|
let i = kt(r);
|
|
Zje(i, t.originalNode);
|
|
let n = {
|
|
needsRename: !1,
|
|
name: r
|
|
}, {
|
|
scope: a
|
|
} = this, o = a.getOwnBinding(r);
|
|
if (o ? o.kind === "param" && (n.needsRename = !0) : (a.parent.hasBinding(r) || a.hasGlobal(r)) && this.traverse(hLe, n), !n.needsRename)
|
|
return this.node.id = i, a.getProgramParent().references[i.name] = !0, this;
|
|
if (a.hasBinding(i.name) && !a.hasGlobal(i.name))
|
|
return a.rename(i.name), this.node.id = i, a.getProgramParent().references[i.name] = !0, this;
|
|
if (!Kje(this.node)) return null;
|
|
let u = a.generateUidIdentifier(i.name), l = [];
|
|
for (let f = 0, m = yLe(this.node); f < m; f++)
|
|
l.push(a.generateUidIdentifier("x"));
|
|
let c = Pje.default.expression.ast`
|
|
(function (${u}) {
|
|
function ${i}(${l}) {
|
|
return ${su(u)}.apply(this, arguments);
|
|
}
|
|
|
|
${su(i)}.toString = function () {
|
|
return ${su(u)}.toString();
|
|
}
|
|
|
|
return ${su(i)};
|
|
})(${Yq(this.node)})
|
|
`;
|
|
return this.replaceWith(c)[0].get("arguments.0");
|
|
}
|
|
s(mLe, "ensureFunctionName");
|
|
function yLe(e) {
|
|
let t = e.params.findIndex((r) => zje(r) || Gje(r));
|
|
return t === -1 ? e.params.length : t;
|
|
}
|
|
s(yLe, "getFunctionArity");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/introspection.js
|
|
var aU = E((dr) => {
|
|
"use strict";
|
|
Object.defineProperty(dr, "__esModule", {
|
|
value: !0
|
|
});
|
|
dr._guessExecutionStatusRelativeTo = RLe;
|
|
dr._resolve = sU;
|
|
dr.canHaveVariableDeclarationOrExpression = PLe;
|
|
dr.canSwapBetweenExpressionAndStatement = FLe;
|
|
dr.getSource = BLe;
|
|
dr.isCompletionRecord = ILe;
|
|
dr.isConstantExpression = ULe;
|
|
dr.isInStrictMode = WLe;
|
|
dr.isNodeType = _Le;
|
|
dr.isStatementOrBlock = OLe;
|
|
dr.isStatic = ALe;
|
|
dr.matchesPattern = wLe;
|
|
dr.referencesImport = kLe;
|
|
dr.resolve = qLe;
|
|
dr.willIMaybeExecuteBefore = NLe;
|
|
var gLe = Ve(), {
|
|
STATEMENT_OR_BLOCK_KEYS: bLe,
|
|
VISITOR_KEYS: DLe,
|
|
isBlockStatement: nU,
|
|
isExpression: vLe,
|
|
isIdentifier: ELe,
|
|
isLiteral: xLe,
|
|
isStringLiteral: SLe,
|
|
isType: TLe,
|
|
matchesPattern: CLe
|
|
} = gLe;
|
|
function wLe(e, t) {
|
|
return CLe(this.node, e, t);
|
|
}
|
|
s(wLe, "matchesPattern");
|
|
dr.has = /* @__PURE__ */ s(function(t) {
|
|
var r;
|
|
let i = (r = this.node) == null ? void 0 : r[t];
|
|
return i && Array.isArray(i) ? !!i.length : !!i;
|
|
}, "has");
|
|
function ALe() {
|
|
return this.scope.isStatic(this.node);
|
|
}
|
|
s(ALe, "isStatic");
|
|
dr.is = dr.has, dr.isnt = /* @__PURE__ */ s(function(t) {
|
|
return !this.has(t);
|
|
}, "isnt"), dr.equals = /* @__PURE__ */ s(function(t, r) {
|
|
return this.node[t] === r;
|
|
}, "equals");
|
|
function _Le(e) {
|
|
return TLe(this.type, e);
|
|
}
|
|
s(_Le, "isNodeType");
|
|
function PLe() {
|
|
return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
|
|
}
|
|
s(PLe, "canHaveVariableDeclarationOrExpression");
|
|
function FLe(e) {
|
|
return this.key !== "body" || !this.parentPath.isArrowFunctionExpression() ? !1 : this.isExpression() ? nU(e) : this.isBlockStatement() ?
|
|
vLe(e) : !1;
|
|
}
|
|
s(FLe, "canSwapBetweenExpressionAndStatement");
|
|
function ILe(e) {
|
|
let t = this, r = !0;
|
|
do {
|
|
let {
|
|
type: i,
|
|
container: n
|
|
} = t;
|
|
if (!r && (t.isFunction() || i === "StaticBlock"))
|
|
return !!e;
|
|
if (r = !1, Array.isArray(n) && t.key !== n.length - 1)
|
|
return !1;
|
|
} while ((t = t.parentPath) && !t.isProgram() && !t.isDoExpression());
|
|
return !0;
|
|
}
|
|
s(ILe, "isCompletionRecord");
|
|
function OLe() {
|
|
return this.parentPath.isLabeledStatement() || nU(this.container) ? !1 : bLe.includes(this.key);
|
|
}
|
|
s(OLe, "isStatementOrBlock");
|
|
function kLe(e, t) {
|
|
if (!this.isReferencedIdentifier()) {
|
|
if (this.isJSXMemberExpression() && this.node.property.name === t || (this.isMemberExpression() || this.isOptionalMemberExpression()) &&
|
|
(this.node.computed ? SLe(this.node.property, {
|
|
value: t
|
|
}) : this.node.property.name === t)) {
|
|
let a = this.get("object");
|
|
return a.isReferencedIdentifier() && a.referencesImport(e, "*");
|
|
}
|
|
return !1;
|
|
}
|
|
let r = this.scope.getBinding(this.node.name);
|
|
if (!r || r.kind !== "module") return !1;
|
|
let i = r.path, n = i.parentPath;
|
|
if (!n.isImportDeclaration()) return !1;
|
|
if (n.node.source.value === e) {
|
|
if (!t) return !0;
|
|
} else
|
|
return !1;
|
|
return !!(i.isImportDefaultSpecifier() && t === "default" || i.isImportNamespaceSpecifier() && t === "*" || i.isImportSpecifier() && ELe(
|
|
i.node.imported, {
|
|
name: t
|
|
}));
|
|
}
|
|
s(kLe, "referencesImport");
|
|
function BLe() {
|
|
let e = this.node;
|
|
if (e.end) {
|
|
let t = this.hub.getCode();
|
|
if (t) return t.slice(e.start, e.end);
|
|
}
|
|
return "";
|
|
}
|
|
s(BLe, "getSource");
|
|
function NLe(e) {
|
|
return this._guessExecutionStatusRelativeTo(e) !== "after";
|
|
}
|
|
s(NLe, "willIMaybeExecuteBefore");
|
|
function tU(e) {
|
|
return e.isProgram() ? e : (e.parentPath.scope.getFunctionParent() || e.parentPath.scope.getProgramParent()).path;
|
|
}
|
|
s(tU, "getOuterFunction");
|
|
function MLe(e, t) {
|
|
switch (e) {
|
|
case "LogicalExpression":
|
|
return t === "right";
|
|
case "ConditionalExpression":
|
|
case "IfStatement":
|
|
return t === "consequent" || t === "alternate";
|
|
case "WhileStatement":
|
|
case "DoWhileStatement":
|
|
case "ForInStatement":
|
|
case "ForOfStatement":
|
|
return t === "body";
|
|
case "ForStatement":
|
|
return t === "body" || t === "update";
|
|
case "SwitchStatement":
|
|
return t === "cases";
|
|
case "TryStatement":
|
|
return t === "handler";
|
|
case "AssignmentPattern":
|
|
return t === "right";
|
|
case "OptionalMemberExpression":
|
|
return t === "property";
|
|
case "OptionalCallExpression":
|
|
return t === "arguments";
|
|
default:
|
|
return !1;
|
|
}
|
|
}
|
|
s(MLe, "isExecutionUncertain");
|
|
function rU(e, t) {
|
|
for (let r = 0; r < t; r++) {
|
|
let i = e[r];
|
|
if (MLe(i.parent.type, i.parentKey))
|
|
return !0;
|
|
}
|
|
return !1;
|
|
}
|
|
s(rU, "isExecutionUncertainInList");
|
|
var iU = Symbol();
|
|
function RLe(e) {
|
|
return Fw(this, e, /* @__PURE__ */ new Map());
|
|
}
|
|
s(RLe, "_guessExecutionStatusRelativeTo");
|
|
function Fw(e, t, r) {
|
|
let i = {
|
|
this: tU(e),
|
|
target: tU(t)
|
|
};
|
|
if (i.target.node !== i.this.node)
|
|
return LLe(e, i.target, r);
|
|
let n = {
|
|
target: t.getAncestry(),
|
|
this: e.getAncestry()
|
|
};
|
|
if (n.target.includes(e)) return "after";
|
|
if (n.this.includes(t)) return "before";
|
|
let a, o = {
|
|
target: 0,
|
|
this: 0
|
|
};
|
|
for (; !a && o.this < n.this.length; ) {
|
|
let f = n.this[o.this];
|
|
o.target = n.target.indexOf(f), o.target >= 0 ? a = f : o.this++;
|
|
}
|
|
if (!a)
|
|
throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");
|
|
if (rU(n.this, o.this - 1) || rU(n.target, o.target - 1))
|
|
return "unknown";
|
|
let u = {
|
|
this: n.this[o.this - 1],
|
|
target: n.target[o.target - 1]
|
|
};
|
|
if (u.target.listKey && u.this.listKey && u.target.container === u.this.container)
|
|
return u.target.key > u.this.key ? "before" : "after";
|
|
let l = DLe[a.type], c = {
|
|
this: l.indexOf(u.this.parentKey),
|
|
target: l.indexOf(u.target.parentKey)
|
|
};
|
|
return c.target > c.this ? "before" : "after";
|
|
}
|
|
s(Fw, "_guessExecutionStatusRelativeToCached");
|
|
function jLe(e, t, r) {
|
|
if (t.isFunctionDeclaration()) {
|
|
if (t.parentPath.isExportDeclaration())
|
|
return "unknown";
|
|
} else return Fw(e, t, r) === "before" ? "before" : "unknown";
|
|
let i = t.scope.getBinding(t.node.id.name);
|
|
if (!i.references) return "before";
|
|
let n = i.referencePaths, a;
|
|
for (let o of n) {
|
|
if (!!o.find((c) => c.node === t.node)) continue;
|
|
if (o.key !== "callee" || !o.parentPath.isCallExpression())
|
|
return "unknown";
|
|
let l = Fw(e, o, r);
|
|
if (a && a !== l)
|
|
return "unknown";
|
|
a = l;
|
|
}
|
|
return a;
|
|
}
|
|
s(jLe, "_guessExecutionStatusRelativeToDifferentFunctionsInternal");
|
|
function LLe(e, t, r) {
|
|
let i = r.get(e.node), n;
|
|
if (!i)
|
|
r.set(e.node, i = /* @__PURE__ */ new Map());
|
|
else if (n = i.get(t.node))
|
|
return n === iU ? "unknown" : n;
|
|
i.set(t.node, iU);
|
|
let a = jLe(e, t, r);
|
|
return i.set(t.node, a), a;
|
|
}
|
|
s(LLe, "_guessExecutionStatusRelativeToDifferentFunctionsCached");
|
|
function qLe(e, t) {
|
|
return sU.call(this, e, t) || this;
|
|
}
|
|
s(qLe, "resolve");
|
|
function sU(e, t) {
|
|
var r;
|
|
if (!((r = t) != null && r.includes(this)))
|
|
if (t = t || [], t.push(this), this.isVariableDeclarator()) {
|
|
if (this.get("id").isIdentifier())
|
|
return this.get("init").resolve(e, t);
|
|
} else if (this.isReferencedIdentifier()) {
|
|
let i = this.scope.getBinding(this.node.name);
|
|
if (!i || !i.constant || i.kind === "module") return;
|
|
if (i.path !== this) {
|
|
let n = i.path.resolve(e, t);
|
|
return this.find((a) => a.node === n.node) ? void 0 : n;
|
|
}
|
|
} else {
|
|
if (this.isTypeCastExpression())
|
|
return this.get("expression").resolve(e, t);
|
|
if (e && this.isMemberExpression()) {
|
|
let i = this.toComputedKey();
|
|
if (!xLe(i)) return;
|
|
let n = i.value, a = this.get("object").resolve(e, t);
|
|
if (a.isObjectExpression()) {
|
|
let o = a.get("properties");
|
|
for (let u of o) {
|
|
if (!u.isProperty()) continue;
|
|
let l = u.get("key"), c = u.isnt("computed") && l.isIdentifier({
|
|
name: n
|
|
});
|
|
if (c = c || l.isLiteral({
|
|
value: n
|
|
}), c) return u.get("value").resolve(e, t);
|
|
}
|
|
} else if (a.isArrayExpression() && !isNaN(+n)) {
|
|
let u = a.get("elements")[n];
|
|
if (u) return u.resolve(e, t);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
s(sU, "_resolve");
|
|
function ULe() {
|
|
if (this.isIdentifier()) {
|
|
let e = this.scope.getBinding(this.node.name);
|
|
return e ? e.constant : !1;
|
|
}
|
|
if (this.isLiteral())
|
|
return this.isRegExpLiteral() ? !1 : this.isTemplateLiteral() ? this.get("expressions").every((e) => e.isConstantExpression()) : !0;
|
|
if (this.isUnaryExpression())
|
|
return this.node.operator !== "void" ? !1 : this.get("argument").isConstantExpression();
|
|
if (this.isBinaryExpression()) {
|
|
let {
|
|
operator: e
|
|
} = this.node;
|
|
return e !== "in" && e !== "instanceof" && this.get("left").isConstantExpression() && this.get("right").isConstantExpression();
|
|
}
|
|
return this.isMemberExpression() ? !this.node.computed && this.get("object").isIdentifier({
|
|
name: "Symbol"
|
|
}) && !this.scope.hasBinding("Symbol", {
|
|
noGlobals: !0
|
|
}) : this.isCallExpression() ? this.node.arguments.length === 1 && this.get("callee").matchesPattern("Symbol.for") && !this.scope.hasBinding(
|
|
"Symbol", {
|
|
noGlobals: !0
|
|
}) && this.get("arguments")[0].isStringLiteral() : !1;
|
|
}
|
|
s(ULe, "isConstantExpression");
|
|
function WLe() {
|
|
return !!(this.isProgram() ? this : this.parentPath).find((r) => {
|
|
if (r.isProgram({
|
|
sourceType: "module"
|
|
}) || r.isClass()) return !0;
|
|
if (r.isArrowFunctionExpression() && !r.get("body").isBlockStatement())
|
|
return !1;
|
|
let i;
|
|
if (r.isFunction())
|
|
i = r.node.body;
|
|
else if (r.isProgram())
|
|
i = r.node;
|
|
else
|
|
return !1;
|
|
for (let n of i.directives)
|
|
if (n.value.value === "use strict")
|
|
return !0;
|
|
});
|
|
}
|
|
s(WLe, "isInStrictMode");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/family.js
|
|
var fU = E((zr) => {
|
|
"use strict";
|
|
Object.defineProperty(zr, "__esModule", {
|
|
value: !0
|
|
});
|
|
zr._getKey = lU;
|
|
zr._getPattern = cU;
|
|
zr.get = s9e;
|
|
zr.getAllNextSiblings = i9e;
|
|
zr.getAllPrevSiblings = n9e;
|
|
zr.getAssignmentIdentifiers = a9e;
|
|
zr.getBindingIdentifierPaths = l9e;
|
|
zr.getBindingIdentifiers = o9e;
|
|
zr.getCompletionRecords = QLe;
|
|
zr.getNextSibling = r9e;
|
|
zr.getOpposite = XLe;
|
|
zr.getOuterBindingIdentifierPaths = c9e;
|
|
zr.getOuterBindingIdentifiers = u9e;
|
|
zr.getPrevSibling = t9e;
|
|
zr.getSibling = e9e;
|
|
var Ow = za(), $Le = Ve(), {
|
|
getAssignmentIdentifiers: VLe,
|
|
getBindingIdentifiers: uU,
|
|
getOuterBindingIdentifiers: HLe,
|
|
numericLiteral: KLe,
|
|
unaryExpression: zLe
|
|
} = $Le, kw = 0, Vd = 1;
|
|
function GLe(e) {
|
|
return {
|
|
type: kw,
|
|
path: e
|
|
};
|
|
}
|
|
s(GLe, "NormalCompletion");
|
|
function JLe(e) {
|
|
return {
|
|
type: Vd,
|
|
path: e
|
|
};
|
|
}
|
|
s(JLe, "BreakCompletion");
|
|
function XLe() {
|
|
return this.key === "left" ? this.getSibling("right") : this.key === "right" ? this.getSibling("left") : null;
|
|
}
|
|
s(XLe, "getOpposite");
|
|
function Jl(e, t, r) {
|
|
return e && t.push(...Xl(e, r)), t;
|
|
}
|
|
s(Jl, "addCompletionRecords");
|
|
function YLe(e, t, r) {
|
|
let i = [];
|
|
for (let n = 0; n < e.length; n++) {
|
|
let a = e[n], o = Xl(a, r), u = [], l = [];
|
|
for (let c of o)
|
|
c.type === kw && u.push(c), c.type === Vd && l.push(c);
|
|
u.length && (i = u), t.push(...l);
|
|
}
|
|
return t.push(...i), t;
|
|
}
|
|
s(YLe, "completionRecordForSwitch");
|
|
function ZLe(e) {
|
|
e.forEach((t) => {
|
|
t.type = Vd;
|
|
});
|
|
}
|
|
s(ZLe, "normalCompletionToBreak");
|
|
function Iw(e, t) {
|
|
e.forEach((r) => {
|
|
r.path.isBreakStatement({
|
|
label: null
|
|
}) && (t ? r.path.replaceWith(zLe("void", KLe(0))) : r.path.remove());
|
|
});
|
|
}
|
|
s(Iw, "replaceBreakStatementInBreakCompletion");
|
|
function oU(e, t) {
|
|
let r = [];
|
|
if (t.canHaveBreak) {
|
|
let i = [];
|
|
for (let n = 0; n < e.length; n++) {
|
|
let a = e[n], o = Object.assign({}, t, {
|
|
inCaseClause: !1
|
|
});
|
|
a.isBlockStatement() && (t.inCaseClause || t.shouldPopulateBreak) ? o.shouldPopulateBreak = !0 : o.shouldPopulateBreak = !1;
|
|
let u = Xl(a, o);
|
|
if (u.length > 0 && u.every((l) => l.type === Vd)) {
|
|
i.length > 0 && u.every((l) => l.path.isBreakStatement({
|
|
label: null
|
|
})) ? (ZLe(i), r.push(...i), i.some((l) => l.path.isDeclaration()) && (r.push(...u), Iw(u, !0)), Iw(u, !1)) : (r.push(...u), t.shouldPopulateBreak ||
|
|
Iw(u, !0));
|
|
break;
|
|
}
|
|
if (n === e.length - 1)
|
|
r.push(...u);
|
|
else {
|
|
i = [];
|
|
for (let l = 0; l < u.length; l++) {
|
|
let c = u[l];
|
|
c.type === Vd && r.push(c), c.type === kw && i.push(c);
|
|
}
|
|
}
|
|
}
|
|
} else if (e.length)
|
|
for (let i = e.length - 1; i >= 0; i--) {
|
|
let n = Xl(e[i], t);
|
|
if (n.length > 1 || n.length === 1 && !n[0].path.isVariableDeclaration()) {
|
|
r.push(...n);
|
|
break;
|
|
}
|
|
}
|
|
return r;
|
|
}
|
|
s(oU, "getStatementListCompletion");
|
|
function Xl(e, t) {
|
|
let r = [];
|
|
if (e.isIfStatement())
|
|
r = Jl(e.get("consequent"), r, t), r = Jl(e.get("alternate"), r, t);
|
|
else {
|
|
if (e.isDoExpression() || e.isFor() || e.isWhile() || e.isLabeledStatement())
|
|
return Jl(e.get("body"), r, t);
|
|
if (e.isProgram() || e.isBlockStatement())
|
|
return oU(e.get("body"), t);
|
|
if (e.isFunction())
|
|
return Xl(e.get("body"), t);
|
|
if (e.isTryStatement())
|
|
r = Jl(e.get("block"), r, t), r = Jl(e.get("handler"), r, t);
|
|
else {
|
|
if (e.isCatchClause())
|
|
return Jl(e.get("body"), r, t);
|
|
if (e.isSwitchStatement())
|
|
return YLe(e.get("cases"), r, t);
|
|
if (e.isSwitchCase())
|
|
return oU(e.get("consequent"), {
|
|
canHaveBreak: !0,
|
|
shouldPopulateBreak: !1,
|
|
inCaseClause: !0
|
|
});
|
|
e.isBreakStatement() ? r.push(JLe(e)) : r.push(GLe(e));
|
|
}
|
|
}
|
|
return r;
|
|
}
|
|
s(Xl, "_getCompletionRecords");
|
|
function QLe() {
|
|
return Xl(this, {
|
|
canHaveBreak: !1,
|
|
shouldPopulateBreak: !1,
|
|
inCaseClause: !1
|
|
}).map((t) => t.path);
|
|
}
|
|
s(QLe, "getCompletionRecords");
|
|
function e9e(e) {
|
|
return Ow.default.get({
|
|
parentPath: this.parentPath,
|
|
parent: this.parent,
|
|
container: this.container,
|
|
listKey: this.listKey,
|
|
key: e
|
|
}).setContext(this.context);
|
|
}
|
|
s(e9e, "getSibling");
|
|
function t9e() {
|
|
return this.getSibling(this.key - 1);
|
|
}
|
|
s(t9e, "getPrevSibling");
|
|
function r9e() {
|
|
return this.getSibling(this.key + 1);
|
|
}
|
|
s(r9e, "getNextSibling");
|
|
function i9e() {
|
|
let e = this.key, t = this.getSibling(++e), r = [];
|
|
for (; t.node; )
|
|
r.push(t), t = this.getSibling(++e);
|
|
return r;
|
|
}
|
|
s(i9e, "getAllNextSiblings");
|
|
function n9e() {
|
|
let e = this.key, t = this.getSibling(--e), r = [];
|
|
for (; t.node; )
|
|
r.push(t), t = this.getSibling(--e);
|
|
return r;
|
|
}
|
|
s(n9e, "getAllPrevSiblings");
|
|
function s9e(e, t = !0) {
|
|
t === !0 && (t = this.context);
|
|
let r = e.split(".");
|
|
return r.length === 1 ? lU.call(this, e, t) : cU.call(this, r, t);
|
|
}
|
|
s(s9e, "get");
|
|
function lU(e, t) {
|
|
let r = this.node, i = r[e];
|
|
return Array.isArray(i) ? i.map((n, a) => Ow.default.get({
|
|
listKey: e,
|
|
parentPath: this,
|
|
parent: r,
|
|
container: i,
|
|
key: a
|
|
}).setContext(t)) : Ow.default.get({
|
|
parentPath: this,
|
|
parent: r,
|
|
container: r,
|
|
key: e
|
|
}).setContext(t);
|
|
}
|
|
s(lU, "_getKey");
|
|
function cU(e, t) {
|
|
let r = this;
|
|
for (let i of e)
|
|
i === "." ? r = r.parentPath : Array.isArray(r) ? r = r[i] : r = r.get(i, t);
|
|
return r;
|
|
}
|
|
s(cU, "_getPattern");
|
|
function a9e() {
|
|
return VLe(this.node);
|
|
}
|
|
s(a9e, "getAssignmentIdentifiers");
|
|
function o9e(e) {
|
|
return uU(this.node, e);
|
|
}
|
|
s(o9e, "getBindingIdentifiers");
|
|
function u9e(e) {
|
|
return HLe(this.node, e);
|
|
}
|
|
s(u9e, "getOuterBindingIdentifiers");
|
|
function l9e(e = !1, t = !1) {
|
|
let i = [this], n = /* @__PURE__ */ Object.create(null);
|
|
for (; i.length; ) {
|
|
let a = i.shift();
|
|
if (!a || !a.node) continue;
|
|
let o = uU.keys[a.node.type];
|
|
if (a.isIdentifier()) {
|
|
e ? (n[a.node.name] = n[a.node.name] || []).push(a) : n[a.node.name] = a;
|
|
continue;
|
|
}
|
|
if (a.isExportDeclaration()) {
|
|
let u = a.get("declaration");
|
|
u.isDeclaration() && i.push(u);
|
|
continue;
|
|
}
|
|
if (t) {
|
|
if (a.isFunctionDeclaration()) {
|
|
i.push(a.get("id"));
|
|
continue;
|
|
}
|
|
if (a.isFunctionExpression())
|
|
continue;
|
|
}
|
|
if (o)
|
|
for (let u = 0; u < o.length; u++) {
|
|
let l = o[u], c = a.get(l);
|
|
Array.isArray(c) ? i.push(...c) : c.node && i.push(c);
|
|
}
|
|
}
|
|
return n;
|
|
}
|
|
s(l9e, "getBindingIdentifierPaths");
|
|
function c9e(e = !1) {
|
|
return this.getBindingIdentifierPaths(e, !0);
|
|
}
|
|
s(c9e, "getOuterBindingIdentifierPaths");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/comments.js
|
|
var pU = E((Hd) => {
|
|
"use strict";
|
|
Object.defineProperty(Hd, "__esModule", {
|
|
value: !0
|
|
});
|
|
Hd.addComment = m9e;
|
|
Hd.addComments = y9e;
|
|
Hd.shareCommentsWithSiblings = h9e;
|
|
var f9e = Ve(), {
|
|
addComment: d9e,
|
|
addComments: p9e
|
|
} = f9e;
|
|
function h9e() {
|
|
if (typeof this.key == "string") return;
|
|
let e = this.node;
|
|
if (!e) return;
|
|
let t = e.trailingComments, r = e.leadingComments;
|
|
if (!t && !r) return;
|
|
let i = this.getSibling(this.key - 1), n = this.getSibling(this.key + 1), a = !!i.node, o = !!n.node;
|
|
a && (r && i.addComments("trailing", dU(r, i.node.trailingComments)), t && !o && i.addComments("trailing", t)), o && (t && n.addComments(
|
|
"leading", dU(t, n.node.leadingComments)), r && !a && n.addComments("leading", r));
|
|
}
|
|
s(h9e, "shareCommentsWithSiblings");
|
|
function dU(e, t) {
|
|
if (!(t != null && t.length)) return e;
|
|
let r = new Set(t);
|
|
return e.filter((i) => !r.has(i));
|
|
}
|
|
s(dU, "removeIfExisting");
|
|
function m9e(e, t, r) {
|
|
d9e(this.node, e, t, r);
|
|
}
|
|
s(m9e, "addComment");
|
|
function y9e(e, t) {
|
|
p9e(this.node, e, t);
|
|
}
|
|
s(y9e, "addComments");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/index.js
|
|
var za = E((us) => {
|
|
"use strict";
|
|
Object.defineProperty(us, "__esModule", {
|
|
value: !0
|
|
});
|
|
us.default = us.SHOULD_STOP = us.SHOULD_SKIP = us.REMOVED = void 0;
|
|
var g9e = hC(), b9e = Jo(), D9e = Ar(), v9e = _C(), yU = Ve(), x0 = yU, E9e = Zo(), x9e = qd(), as = eq(), Yl = vq(), Zl = hw(), hU = Kq(),
|
|
au = eU(), Dr = aU(), gU = ns(), pr = gU, Ql = y0(), os = g0(), Di = fU(), Bw = pU(), S9e = vC(), {
|
|
validate: T9e
|
|
} = yU, mU = b9e("babel"), ppt = us.REMOVED = 1, hpt = us.SHOULD_STOP = 2, mpt = us.SHOULD_SKIP = 4, zs = us.default = class bU {
|
|
static {
|
|
s(this, "NodePath");
|
|
}
|
|
constructor(t, r) {
|
|
this.contexts = [], this.state = null, this.opts = null, this._traverseFlags = 0, this.skipKeys = null, this.parentPath = null, this.container =
|
|
null, this.listKey = null, this.key = null, this.node = null, this.type = null, this.parent = r, this.hub = t, this.data = null, this.
|
|
context = null, this.scope = null;
|
|
}
|
|
get removed() {
|
|
return (this._traverseFlags & 1) > 0;
|
|
}
|
|
set removed(t) {
|
|
t ? this._traverseFlags |= 1 : this._traverseFlags &= -2;
|
|
}
|
|
get shouldStop() {
|
|
return (this._traverseFlags & 2) > 0;
|
|
}
|
|
set shouldStop(t) {
|
|
t ? this._traverseFlags |= 2 : this._traverseFlags &= -3;
|
|
}
|
|
get shouldSkip() {
|
|
return (this._traverseFlags & 4) > 0;
|
|
}
|
|
set shouldSkip(t) {
|
|
t ? this._traverseFlags |= 4 : this._traverseFlags &= -5;
|
|
}
|
|
static get({
|
|
hub: t,
|
|
parentPath: r,
|
|
parent: i,
|
|
container: n,
|
|
listKey: a,
|
|
key: o
|
|
}) {
|
|
if (!t && r && (t = r.hub), !i)
|
|
throw new Error("To get a node path the parent needs to exist");
|
|
let u = n[o], l = E9e.getOrCreateCachedPaths(t, i), c = l.get(u);
|
|
return c || (c = new bU(t, i), u && l.set(u, c)), gU.setup.call(c, r, n, a, o), c;
|
|
}
|
|
getScope(t) {
|
|
return this.isScope() ? new v9e.default(this) : t;
|
|
}
|
|
setData(t, r) {
|
|
return this.data == null && (this.data = /* @__PURE__ */ Object.create(null)), this.data[t] = r;
|
|
}
|
|
getData(t, r) {
|
|
this.data == null && (this.data = /* @__PURE__ */ Object.create(null));
|
|
let i = this.data[t];
|
|
return i === void 0 && r !== void 0 && (i = this.data[t] = r), i;
|
|
}
|
|
hasNode() {
|
|
return this.node != null;
|
|
}
|
|
buildCodeFrameError(t, r = SyntaxError) {
|
|
return this.hub.buildError(this.node, t, r);
|
|
}
|
|
traverse(t, r) {
|
|
(0, D9e.default)(this.node, t, this.scope, r, this);
|
|
}
|
|
set(t, r) {
|
|
T9e(this.node, t, r), this.node[t] = r;
|
|
}
|
|
getPathLocation() {
|
|
let t = [], r = this;
|
|
do {
|
|
let i = r.key;
|
|
r.inList && (i = `${r.listKey}[${i}]`), t.unshift(i);
|
|
} while (r = r.parentPath);
|
|
return t.join(".");
|
|
}
|
|
debug(t) {
|
|
mU.enabled && mU(`${this.getPathLocation()} ${this.type}: ${t}`);
|
|
}
|
|
toString() {
|
|
return (0, x9e.default)(this.node).code;
|
|
}
|
|
get inList() {
|
|
return !!this.listKey;
|
|
}
|
|
set inList(t) {
|
|
t || (this.listKey = null);
|
|
}
|
|
get parentKey() {
|
|
return this.listKey || this.key;
|
|
}
|
|
}, C9e = {
|
|
findParent: as.findParent,
|
|
find: as.find,
|
|
getFunctionParent: as.getFunctionParent,
|
|
getStatementParent: as.getStatementParent,
|
|
getEarliestCommonAncestorFrom: as.getEarliestCommonAncestorFrom,
|
|
getDeepestCommonAncestorFrom: as.getDeepestCommonAncestorFrom,
|
|
getAncestry: as.getAncestry,
|
|
isAncestor: as.isAncestor,
|
|
isDescendant: as.isDescendant,
|
|
inType: as.inType,
|
|
getTypeAnnotation: Yl.getTypeAnnotation,
|
|
isBaseType: Yl.isBaseType,
|
|
couldBeBaseType: Yl.couldBeBaseType,
|
|
baseTypeStrictlyMatches: Yl.baseTypeStrictlyMatches,
|
|
isGenericType: Yl.isGenericType,
|
|
replaceWithMultiple: Zl.replaceWithMultiple,
|
|
replaceWithSourceString: Zl.replaceWithSourceString,
|
|
replaceWith: Zl.replaceWith,
|
|
replaceExpressionWithStatements: Zl.replaceExpressionWithStatements,
|
|
replaceInline: Zl.replaceInline,
|
|
evaluateTruthy: hU.evaluateTruthy,
|
|
evaluate: hU.evaluate,
|
|
toComputedKey: au.toComputedKey,
|
|
ensureBlock: au.ensureBlock,
|
|
unwrapFunctionEnvironment: au.unwrapFunctionEnvironment,
|
|
arrowFunctionToExpression: au.arrowFunctionToExpression,
|
|
splitExportDeclaration: au.splitExportDeclaration,
|
|
ensureFunctionName: au.ensureFunctionName,
|
|
matchesPattern: Dr.matchesPattern,
|
|
isStatic: Dr.isStatic,
|
|
isNodeType: Dr.isNodeType,
|
|
canHaveVariableDeclarationOrExpression: Dr.canHaveVariableDeclarationOrExpression,
|
|
canSwapBetweenExpressionAndStatement: Dr.canSwapBetweenExpressionAndStatement,
|
|
isCompletionRecord: Dr.isCompletionRecord,
|
|
isStatementOrBlock: Dr.isStatementOrBlock,
|
|
referencesImport: Dr.referencesImport,
|
|
getSource: Dr.getSource,
|
|
willIMaybeExecuteBefore: Dr.willIMaybeExecuteBefore,
|
|
_guessExecutionStatusRelativeTo: Dr._guessExecutionStatusRelativeTo,
|
|
resolve: Dr.resolve,
|
|
isConstantExpression: Dr.isConstantExpression,
|
|
isInStrictMode: Dr.isInStrictMode,
|
|
isDenylisted: pr.isDenylisted,
|
|
visit: pr.visit,
|
|
skip: pr.skip,
|
|
skipKey: pr.skipKey,
|
|
stop: pr.stop,
|
|
setContext: pr.setContext,
|
|
requeue: pr.requeue,
|
|
requeueComputedKeyAndDecorators: pr.requeueComputedKeyAndDecorators,
|
|
remove: Ql.remove,
|
|
insertBefore: os.insertBefore,
|
|
insertAfter: os.insertAfter,
|
|
unshiftContainer: os.unshiftContainer,
|
|
pushContainer: os.pushContainer,
|
|
getOpposite: Di.getOpposite,
|
|
getCompletionRecords: Di.getCompletionRecords,
|
|
getSibling: Di.getSibling,
|
|
getPrevSibling: Di.getPrevSibling,
|
|
getNextSibling: Di.getNextSibling,
|
|
getAllNextSiblings: Di.getAllNextSiblings,
|
|
getAllPrevSiblings: Di.getAllPrevSiblings,
|
|
get: Di.get,
|
|
getAssignmentIdentifiers: Di.getAssignmentIdentifiers,
|
|
getBindingIdentifiers: Di.getBindingIdentifiers,
|
|
getOuterBindingIdentifiers: Di.getOuterBindingIdentifiers,
|
|
getBindingIdentifierPaths: Di.getBindingIdentifierPaths,
|
|
getOuterBindingIdentifierPaths: Di.getOuterBindingIdentifierPaths,
|
|
shareCommentsWithSiblings: Bw.shareCommentsWithSiblings,
|
|
addComment: Bw.addComment,
|
|
addComments: Bw.addComments
|
|
};
|
|
Object.assign(zs.prototype, C9e);
|
|
zs.prototype.arrowFunctionToShadowed = au.arrowFunctionToShadowed, Object.assign(zs.prototype, {
|
|
has: Dr.has,
|
|
is: Dr.is,
|
|
isnt: Dr.isnt,
|
|
equals: Dr.equals,
|
|
hoist: os.hoist,
|
|
updateSiblingKeys: os.updateSiblingKeys,
|
|
call: pr.call,
|
|
isBlacklisted: pr.isBlacklisted,
|
|
setScope: pr.setScope,
|
|
resync: pr.resync,
|
|
popContext: pr.popContext,
|
|
pushContext: pr.pushContext,
|
|
setup: pr.setup,
|
|
setKey: pr.setKey
|
|
});
|
|
zs.prototype._guessExecutionStatusRelativeToDifferentFunctions = Dr._guessExecutionStatusRelativeTo, zs.prototype._guessExecutionStatusRelativeToDifferentFunctions =
|
|
Dr._guessExecutionStatusRelativeTo, Object.assign(zs.prototype, {
|
|
_getTypeAnnotation: Yl._getTypeAnnotation,
|
|
_replaceWith: Zl._replaceWith,
|
|
_resolve: Dr._resolve,
|
|
_call: pr._call,
|
|
_resyncParent: pr._resyncParent,
|
|
_resyncKey: pr._resyncKey,
|
|
_resyncList: pr._resyncList,
|
|
_resyncRemoved: pr._resyncRemoved,
|
|
_getQueueContexts: pr._getQueueContexts,
|
|
_removeFromScope: Ql._removeFromScope,
|
|
_callRemovalHooks: Ql._callRemovalHooks,
|
|
_remove: Ql._remove,
|
|
_markRemoved: Ql._markRemoved,
|
|
_assertUnremoved: Ql._assertUnremoved,
|
|
_containerInsert: os._containerInsert,
|
|
_containerInsertBefore: os._containerInsertBefore,
|
|
_containerInsertAfter: os._containerInsertAfter,
|
|
_verifyNodeList: os._verifyNodeList,
|
|
_getKey: Di._getKey,
|
|
_getPattern: Di._getPattern
|
|
});
|
|
for (let e of x0.TYPES) {
|
|
let t = `is${e}`, r = x0[t];
|
|
zs.prototype[t] = function(i) {
|
|
return r(this.node, i);
|
|
}, zs.prototype[`assert${e}`] = function(i) {
|
|
if (!r(this.node, i))
|
|
throw new TypeError(`Expected node path of type ${e}`);
|
|
};
|
|
}
|
|
Object.assign(zs.prototype, S9e);
|
|
for (let e of Object.keys(g9e))
|
|
e[0] !== "_" && (x0.TYPES.includes(e) || x0.TYPES.push(e));
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/context.js
|
|
var DU = E((S0) => {
|
|
"use strict";
|
|
Object.defineProperty(S0, "__esModule", {
|
|
value: !0
|
|
});
|
|
S0.default = void 0;
|
|
var w9e = za(), A9e = Ve(), Nw = ns(), {
|
|
VISITOR_KEYS: _9e
|
|
} = A9e, Mw = class {
|
|
static {
|
|
s(this, "TraversalContext");
|
|
}
|
|
constructor(t, r, i, n) {
|
|
this.queue = null, this.priorityQueue = null, this.parentPath = n, this.scope = t, this.state = i, this.opts = r;
|
|
}
|
|
shouldVisit(t) {
|
|
let r = this.opts;
|
|
if (r.enter || r.exit || r[t.type]) return !0;
|
|
let i = _9e[t.type];
|
|
if (!(i != null && i.length)) return !1;
|
|
for (let n of i)
|
|
if (t[n])
|
|
return !0;
|
|
return !1;
|
|
}
|
|
create(t, r, i, n) {
|
|
return w9e.default.get({
|
|
parentPath: this.parentPath,
|
|
parent: t,
|
|
container: r,
|
|
key: i,
|
|
listKey: n
|
|
});
|
|
}
|
|
maybeQueue(t, r) {
|
|
this.queue && (r ? this.queue.push(t) : this.priorityQueue.push(t));
|
|
}
|
|
visitMultiple(t, r, i) {
|
|
if (t.length === 0) return !1;
|
|
let n = [];
|
|
for (let a = 0; a < t.length; a++) {
|
|
let o = t[a];
|
|
o && this.shouldVisit(o) && n.push(this.create(r, t, a, i));
|
|
}
|
|
return this.visitQueue(n);
|
|
}
|
|
visitSingle(t, r) {
|
|
return this.shouldVisit(t[r]) ? this.visitQueue([this.create(t, t, r)]) : !1;
|
|
}
|
|
visitQueue(t) {
|
|
this.queue = t, this.priorityQueue = [];
|
|
let r = /* @__PURE__ */ new WeakSet(), i = !1, n = 0;
|
|
for (; n < t.length; ) {
|
|
let a = t[n];
|
|
if (n++, Nw.resync.call(a), (a.contexts.length === 0 || a.contexts[a.contexts.length - 1] !== this) && Nw.pushContext.call(a, this),
|
|
a.key === null) continue;
|
|
let {
|
|
node: o
|
|
} = a;
|
|
if (!r.has(o)) {
|
|
if (o && r.add(o), a.visit()) {
|
|
i = !0;
|
|
break;
|
|
}
|
|
if (this.priorityQueue.length && (i = this.visitQueue(this.priorityQueue), this.priorityQueue = [], this.queue = t, i))
|
|
break;
|
|
}
|
|
}
|
|
for (let a = 0; a < n; a++)
|
|
Nw.popContext.call(t[a]);
|
|
return this.queue = null, i;
|
|
}
|
|
visit(t, r) {
|
|
let i = t[r];
|
|
return i ? Array.isArray(i) ? this.visitMultiple(i, t, r) : this.visitSingle(t, r) : !1;
|
|
}
|
|
};
|
|
S0.default = Mw;
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/traverse-node.js
|
|
var $y = E((Rw) => {
|
|
"use strict";
|
|
Object.defineProperty(Rw, "__esModule", {
|
|
value: !0
|
|
});
|
|
Rw.traverseNode = O9e;
|
|
var P9e = DU(), F9e = Ve(), {
|
|
VISITOR_KEYS: I9e
|
|
} = F9e;
|
|
function O9e(e, t, r, i, n, a, o) {
|
|
let u = I9e[e.type];
|
|
if (!u) return !1;
|
|
let l = new P9e.default(r, t, i, n);
|
|
if (o)
|
|
return a != null && a[n.parentKey] ? !1 : l.visitQueue([n]);
|
|
for (let c of u)
|
|
if (!(a != null && a[c]) && l.visit(e, c))
|
|
return !0;
|
|
return !1;
|
|
}
|
|
s(O9e, "traverseNode");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/path/context.js
|
|
var ns = E((ir) => {
|
|
"use strict";
|
|
Object.defineProperty(ir, "__esModule", {
|
|
value: !0
|
|
});
|
|
ir._call = Lw;
|
|
ir._getQueueContexts = G9e;
|
|
ir._resyncKey = CU;
|
|
ir._resyncList = wU;
|
|
ir._resyncParent = TU;
|
|
ir._resyncRemoved = W9e;
|
|
ir.call = jw;
|
|
ir.isDenylisted = xU;
|
|
ir.popContext = $9e;
|
|
ir.pushContext = V9e;
|
|
ir.requeue = K9e;
|
|
ir.requeueComputedKeyAndDecorators = z9e;
|
|
ir.resync = U9e;
|
|
ir.setContext = q9e;
|
|
ir.setKey = T0;
|
|
ir.setScope = SU;
|
|
ir.setup = H9e;
|
|
ir.skip = R9e;
|
|
ir.skipKey = j9e;
|
|
ir.stop = L9e;
|
|
ir.visit = M9e;
|
|
var k9e = $y(), vU = za(), B9e = y0(), N9e = Ve();
|
|
function jw(e) {
|
|
let t = this.opts;
|
|
if (this.debug(e), this.node && Lw.call(this, t[e]))
|
|
return !0;
|
|
if (this.node) {
|
|
var r;
|
|
return Lw.call(this, (r = t[this.node.type]) == null ? void 0 : r[e]);
|
|
}
|
|
return !1;
|
|
}
|
|
s(jw, "call");
|
|
function Lw(e) {
|
|
if (!e) return !1;
|
|
for (let t of e) {
|
|
if (!t) continue;
|
|
let r = this.node;
|
|
if (!r) return !0;
|
|
let i = t.call(this.state, this, this.state);
|
|
if (i && typeof i == "object" && typeof i.then == "function")
|
|
throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not suppo\
|
|
rt. If you're using a published plugin, you may need to upgrade your @babel/core version.");
|
|
if (i)
|
|
throw new Error(`Unexpected return value from visitor method ${t}`);
|
|
if (this.node !== r || this._traverseFlags > 0) return !0;
|
|
}
|
|
return !1;
|
|
}
|
|
s(Lw, "_call");
|
|
function xU() {
|
|
var e;
|
|
let t = (e = this.opts.denylist) != null ? e : this.opts.blacklist;
|
|
return t?.includes(this.node.type);
|
|
}
|
|
s(xU, "isDenylisted");
|
|
ir.isBlacklisted = xU;
|
|
function EU(e, t) {
|
|
e.context !== t && (e.context = t, e.state = t.state, e.opts = t.opts);
|
|
}
|
|
s(EU, "restoreContext");
|
|
function M9e() {
|
|
var e, t;
|
|
if (!this.node || this.isDenylisted() || (e = (t = this.opts).shouldSkip) != null && e.call(t, this))
|
|
return !1;
|
|
let r = this.context;
|
|
return this.shouldSkip || jw.call(this, "enter") ? (this.debug("Skip..."), this.shouldStop) : (EU(this, r), this.debug("Recursing into..\
|
|
."), this.shouldStop = (0, k9e.traverseNode)(this.node, this.opts, this.scope, this.state, this, this.skipKeys), EU(this, r), jw.call(this, "\
|
|
exit"), this.shouldStop);
|
|
}
|
|
s(M9e, "visit");
|
|
function R9e() {
|
|
this.shouldSkip = !0;
|
|
}
|
|
s(R9e, "skip");
|
|
function j9e(e) {
|
|
this.skipKeys == null && (this.skipKeys = {}), this.skipKeys[e] = !0;
|
|
}
|
|
s(j9e, "skipKey");
|
|
function L9e() {
|
|
this._traverseFlags |= vU.SHOULD_SKIP | vU.SHOULD_STOP;
|
|
}
|
|
s(L9e, "stop");
|
|
function SU() {
|
|
var e, t;
|
|
if ((e = this.opts) != null && e.noScope) return;
|
|
let r = this.parentPath;
|
|
((this.key === "key" || this.listKey === "decorators") && r.isMethod() || this.key === "discriminant" && r.isSwitchStatement()) && (r = r.
|
|
parentPath);
|
|
let i;
|
|
for (; r && !i; ) {
|
|
var n;
|
|
if ((n = r.opts) != null && n.noScope) return;
|
|
i = r.scope, r = r.parentPath;
|
|
}
|
|
this.scope = this.getScope(i), (t = this.scope) == null || t.init();
|
|
}
|
|
s(SU, "setScope");
|
|
function q9e(e) {
|
|
return this.skipKeys != null && (this.skipKeys = {}), this._traverseFlags = 0, e && (this.context = e, this.state = e.state, this.opts =
|
|
e.opts), SU.call(this), this;
|
|
}
|
|
s(q9e, "setContext");
|
|
function U9e() {
|
|
this.removed || (TU.call(this), wU.call(this), CU.call(this));
|
|
}
|
|
s(U9e, "resync");
|
|
function TU() {
|
|
this.parentPath && (this.parent = this.parentPath.node);
|
|
}
|
|
s(TU, "_resyncParent");
|
|
function CU() {
|
|
if (this.container && this.node !== this.container[this.key]) {
|
|
if (Array.isArray(this.container)) {
|
|
for (let e = 0; e < this.container.length; e++)
|
|
if (this.container[e] === this.node) {
|
|
T0.call(this, e);
|
|
return;
|
|
}
|
|
} else
|
|
for (let e of Object.keys(this.container))
|
|
if (this.container[e] === this.node) {
|
|
T0.call(this, e);
|
|
return;
|
|
}
|
|
this.key = null;
|
|
}
|
|
}
|
|
s(CU, "_resyncKey");
|
|
function wU() {
|
|
if (!this.parent || !this.inList) return;
|
|
let e = this.parent[this.listKey];
|
|
this.container !== e && (this.container = e || null);
|
|
}
|
|
s(wU, "_resyncList");
|
|
function W9e() {
|
|
(this.key == null || !this.container || this.container[this.key] !== this.node) && B9e._markRemoved.call(this);
|
|
}
|
|
s(W9e, "_resyncRemoved");
|
|
function $9e() {
|
|
this.contexts.pop(), this.contexts.length > 0 ? this.setContext(this.contexts[this.contexts.length - 1]) : this.setContext(void 0);
|
|
}
|
|
s($9e, "popContext");
|
|
function V9e(e) {
|
|
this.contexts.push(e), this.setContext(e);
|
|
}
|
|
s(V9e, "pushContext");
|
|
function H9e(e, t, r, i) {
|
|
this.listKey = r, this.container = t, this.parentPath = e || this.parentPath, T0.call(this, i);
|
|
}
|
|
s(H9e, "setup");
|
|
function T0(e) {
|
|
var t;
|
|
this.key = e, this.node = this.container[this.key], this.type = (t = this.node) == null ? void 0 : t.type;
|
|
}
|
|
s(T0, "setKey");
|
|
function K9e(e = this) {
|
|
if (e.removed) return;
|
|
let t = this.contexts;
|
|
for (let r of t)
|
|
r.maybeQueue(e);
|
|
}
|
|
s(K9e, "requeue");
|
|
function z9e() {
|
|
let {
|
|
context: e,
|
|
node: t
|
|
} = this;
|
|
if (!N9e.isPrivate(t) && t.computed && e.maybeQueue(this.get("key")), t.decorators)
|
|
for (let r of this.get("decorators"))
|
|
e.maybeQueue(r);
|
|
}
|
|
s(z9e, "requeueComputedKeyAndDecorators");
|
|
function G9e() {
|
|
let e = this, t = this.contexts;
|
|
for (; !t.length && (e = e.parentPath, !!e); )
|
|
t = e.contexts;
|
|
return t;
|
|
}
|
|
s(G9e, "_getQueueContexts");
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/hub.js
|
|
var AU = E((C0) => {
|
|
"use strict";
|
|
Object.defineProperty(C0, "__esModule", {
|
|
value: !0
|
|
});
|
|
C0.default = void 0;
|
|
var qw = class {
|
|
static {
|
|
s(this, "Hub");
|
|
}
|
|
getCode() {
|
|
}
|
|
getScope() {
|
|
}
|
|
addHelper() {
|
|
throw new Error("Helpers are not supported by the default hub.");
|
|
}
|
|
buildError(t, r, i = TypeError) {
|
|
return new i(r);
|
|
}
|
|
};
|
|
C0.default = qw;
|
|
});
|
|
|
|
// ../node_modules/@babel/traverse/lib/index.js
|
|
var Ar = E((Gs) => {
|
|
"use strict";
|
|
Object.defineProperty(Gs, "__esModule", {
|
|
value: !0
|
|
});
|
|
Object.defineProperty(Gs, "Hub", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Q9e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Gs, "NodePath", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Y9e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Gs, "Scope", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Z9e.default;
|
|
}, "get")
|
|
});
|
|
Gs.visitors = Gs.default = void 0;
|
|
ns();
|
|
var zd = qy();
|
|
Gs.visitors = zd;
|
|
var J9e = Ve(), X9e = Zo(), _U = $y(), Y9e = za(), Z9e = _C(), Q9e = AU(), {
|
|
VISITOR_KEYS: e7e,
|
|
removeProperties: t7e,
|
|
traverseFast: Kd
|
|
} = J9e;
|
|
function wn(e, t = {}, r, i, n, a) {
|
|
if (e) {
|
|
if (!t.noScope && !r && e.type !== "Program" && e.type !== "File")
|
|
throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${e.
|
|
type} node without passing scope and parentPath.`);
|
|
if (!n && a)
|
|
throw new Error("visitSelf can only be used when providing a NodePath.");
|
|
e7e[e.type] && (zd.explode(t), (0, _U.traverseNode)(e, t, r, i, n, null, a));
|
|
}
|
|
}
|
|
s(wn, "traverse");
|
|
var wpt = Gs.default = wn;
|
|
wn.visitors = zd;
|
|
wn.verify = zd.verify;
|
|
wn.explode = zd.explode;
|
|
wn.cheap = function(e, t) {
|
|
Kd(e, t);
|
|
};
|
|
wn.node = function(e, t, r, i, n, a) {
|
|
(0, _U.traverseNode)(e, t, r, i, n, a);
|
|
};
|
|
wn.clearNode = function(e, t) {
|
|
t7e(e, t);
|
|
};
|
|
wn.removeProperties = function(e, t) {
|
|
return Kd(e, wn.clearNode, t), e;
|
|
};
|
|
wn.hasType = function(e, t, r) {
|
|
return r != null && r.includes(e.type) ? !1 : e.type === t ? !0 : Kd(e, function(i) {
|
|
if (r != null && r.includes(i.type))
|
|
return Kd.skip;
|
|
if (i.type === t)
|
|
return Kd.stop;
|
|
});
|
|
};
|
|
wn.cache = X9e;
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-module-imports/lib/import-builder.js
|
|
var IU = E((A0) => {
|
|
"use strict";
|
|
Object.defineProperty(A0, "__esModule", {
|
|
value: !0
|
|
});
|
|
A0.default = void 0;
|
|
var An = V("assert"), r7e = Ve(), {
|
|
callExpression: Uw,
|
|
cloneNode: w0,
|
|
expressionStatement: PU,
|
|
identifier: Gd,
|
|
importDeclaration: i7e,
|
|
importDefaultSpecifier: n7e,
|
|
importNamespaceSpecifier: s7e,
|
|
importSpecifier: a7e,
|
|
memberExpression: Ww,
|
|
stringLiteral: FU,
|
|
variableDeclaration: o7e,
|
|
variableDeclarator: u7e
|
|
} = r7e, $w = class {
|
|
static {
|
|
s(this, "ImportBuilder");
|
|
}
|
|
constructor(t, r, i) {
|
|
this._statements = [], this._resultName = null, this._importedSource = void 0, this._scope = r, this._hub = i, this._importedSource = t;
|
|
}
|
|
done() {
|
|
return {
|
|
statements: this._statements,
|
|
resultName: this._resultName
|
|
};
|
|
}
|
|
import() {
|
|
return this._statements.push(i7e([], FU(this._importedSource))), this;
|
|
}
|
|
require() {
|
|
return this._statements.push(PU(Uw(Gd("require"), [FU(this._importedSource)]))), this;
|
|
}
|
|
namespace(t = "namespace") {
|
|
let r = this._scope.generateUidIdentifier(t), i = this._statements[this._statements.length - 1];
|
|
return An(i.type === "ImportDeclaration"), An(i.specifiers.length === 0), i.specifiers = [s7e(r)], this._resultName = w0(r), this;
|
|
}
|
|
default(t) {
|
|
let r = this._scope.generateUidIdentifier(t), i = this._statements[this._statements.length - 1];
|
|
return An(i.type === "ImportDeclaration"), An(i.specifiers.length === 0), i.specifiers = [n7e(r)], this._resultName = w0(r), this;
|
|
}
|
|
named(t, r) {
|
|
if (r === "default") return this.default(t);
|
|
let i = this._scope.generateUidIdentifier(t), n = this._statements[this._statements.length - 1];
|
|
return An(n.type === "ImportDeclaration"), An(n.specifiers.length === 0), n.specifiers = [a7e(i, Gd(r))], this._resultName = w0(i), this;
|
|
}
|
|
var(t) {
|
|
let r = this._scope.generateUidIdentifier(t), i = this._statements[this._statements.length - 1];
|
|
return i.type !== "ExpressionStatement" && (An(this._resultName), i = PU(this._resultName), this._statements.push(i)), this._statements[this.
|
|
_statements.length - 1] = o7e("var", [u7e(r, i.expression)]), this._resultName = w0(r), this;
|
|
}
|
|
defaultInterop() {
|
|
return this._interop(this._hub.addHelper("interopRequireDefault"));
|
|
}
|
|
wildcardInterop() {
|
|
return this._interop(this._hub.addHelper("interopRequireWildcard"));
|
|
}
|
|
_interop(t) {
|
|
let r = this._statements[this._statements.length - 1];
|
|
return r.type === "ExpressionStatement" ? r.expression = Uw(t, [r.expression]) : r.type === "VariableDeclaration" ? (An(r.declarations.
|
|
length === 1), r.declarations[0].init = Uw(t, [r.declarations[0].init])) : An.fail("Unexpected type."), this;
|
|
}
|
|
prop(t) {
|
|
let r = this._statements[this._statements.length - 1];
|
|
return r.type === "ExpressionStatement" ? r.expression = Ww(r.expression, Gd(t)) : r.type === "VariableDeclaration" ? (An(r.declarations.
|
|
length === 1), r.declarations[0].init = Ww(r.declarations[0].init, Gd(t))) : An.fail("Unexpected type:" + r.type), this;
|
|
}
|
|
read(t) {
|
|
this._resultName = Ww(this._resultName, Gd(t));
|
|
}
|
|
};
|
|
A0.default = $w;
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-module-imports/lib/is-module.js
|
|
var Hw = E((Vw) => {
|
|
"use strict";
|
|
Object.defineProperty(Vw, "__esModule", {
|
|
value: !0
|
|
});
|
|
Vw.default = l7e;
|
|
function l7e(e) {
|
|
return e.node.sourceType === "module";
|
|
}
|
|
s(l7e, "isModule");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-module-imports/lib/import-injector.js
|
|
var RU = E((P0) => {
|
|
"use strict";
|
|
Object.defineProperty(P0, "__esModule", {
|
|
value: !0
|
|
});
|
|
P0.default = void 0;
|
|
var OU = V("assert"), c7e = Ve(), f7e = IU(), d7e = Hw(), {
|
|
identifier: p7e,
|
|
importSpecifier: h7e,
|
|
numericLiteral: m7e,
|
|
sequenceExpression: y7e,
|
|
isImportDeclaration: kU
|
|
} = c7e, Kw = class {
|
|
static {
|
|
s(this, "ImportInjector");
|
|
}
|
|
constructor(t, r, i) {
|
|
this._defaultOpts = {
|
|
importedSource: null,
|
|
importedType: "commonjs",
|
|
importedInterop: "babel",
|
|
importingInterop: "babel",
|
|
ensureLiveReference: !1,
|
|
ensureNoContext: !1,
|
|
importPosition: "before"
|
|
};
|
|
let n = t.find((a) => a.isProgram());
|
|
this._programPath = n, this._programScope = n.scope, this._hub = n.hub, this._defaultOpts = this._applyDefaults(r, i, !0);
|
|
}
|
|
addDefault(t, r) {
|
|
return this.addNamed("default", t, r);
|
|
}
|
|
addNamed(t, r, i) {
|
|
return OU(typeof t == "string"), this._generateImport(this._applyDefaults(r, i), t);
|
|
}
|
|
addNamespace(t, r) {
|
|
return this._generateImport(this._applyDefaults(t, r), null);
|
|
}
|
|
addSideEffect(t, r) {
|
|
return this._generateImport(this._applyDefaults(t, r), void 0);
|
|
}
|
|
_applyDefaults(t, r, i = !1) {
|
|
let n;
|
|
return typeof t == "string" ? n = Object.assign({}, this._defaultOpts, {
|
|
importedSource: t
|
|
}, r) : (OU(!r, "Unexpected secondary arguments."), n = Object.assign({}, this._defaultOpts, t)), !i && r && (r.nameHint !== void 0 &&
|
|
(n.nameHint = r.nameHint), r.blockHoist !== void 0 && (n.blockHoist = r.blockHoist)), n;
|
|
}
|
|
_generateImport(t, r) {
|
|
let i = r === "default", n = !!r && !i, a = r === null, {
|
|
importedSource: o,
|
|
importedType: u,
|
|
importedInterop: l,
|
|
importingInterop: c,
|
|
ensureLiveReference: f,
|
|
ensureNoContext: m,
|
|
nameHint: h,
|
|
importPosition: d,
|
|
blockHoist: y
|
|
} = t, p = h || r, g = (0, d7e.default)(this._programPath), b = g && c === "node", D = g && c === "babel";
|
|
if (d === "after" && !g)
|
|
throw new Error('"importPosition": "after" is only supported in modules');
|
|
let v = new f7e.default(o, this._programScope, this._hub);
|
|
if (u === "es6") {
|
|
if (!b && !D)
|
|
throw new Error("Cannot import an ES6 module from CommonJS");
|
|
v.import(), a ? v.namespace(h || o) : (i || n) && v.named(p, r);
|
|
} else {
|
|
if (u !== "commonjs")
|
|
throw new Error(`Unexpected interopType "${u}"`);
|
|
if (l === "babel")
|
|
if (b) {
|
|
p = p !== "default" ? p : o;
|
|
let O = `${o}$es6Default`;
|
|
v.import(), a ? v.default(O).var(p || o).wildcardInterop() : i ? f ? v.default(O).var(p || o).defaultInterop().read("default") :
|
|
v.default(O).var(p).defaultInterop().prop(r) : n && v.default(O).read(r);
|
|
} else D ? (v.import(), a ? v.namespace(p || o) : (i || n) && v.named(p, r)) : (v.require(), a ? v.var(p || o).wildcardInterop() :
|
|
(i || n) && f ? i ? (p = p !== "default" ? p : o, v.var(p).read(r), v.defaultInterop()) : v.var(o).read(r) : i ? v.var(p).defaultInterop().
|
|
prop(r) : n && v.var(p).prop(r));
|
|
else if (l === "compiled")
|
|
b ? (v.import(), a ? v.default(p || o) : (i || n) && v.default(o).read(p)) : D ? (v.import(), a ? v.namespace(p || o) : (i || n) &&
|
|
v.named(p, r)) : (v.require(), a ? v.var(p || o) : (i || n) && (f ? v.var(o).read(p) : v.prop(r).var(p)));
|
|
else if (l === "uncompiled") {
|
|
if (i && f)
|
|
throw new Error("No live reference for commonjs default");
|
|
b ? (v.import(), a ? v.default(p || o) : i ? v.default(p) : n && v.default(o).read(p)) : D ? (v.import(), a ? v.default(p || o) : i ?
|
|
v.default(p) : n && v.named(p, r)) : (v.require(), a ? v.var(p || o) : i ? v.var(p) : n && (f ? v.var(o).read(p) : v.var(p).prop(r)));
|
|
} else
|
|
throw new Error(`Unknown importedInterop "${l}".`);
|
|
}
|
|
let {
|
|
statements: S,
|
|
resultName: C
|
|
} = v.done();
|
|
return this._insertStatements(S, d, y), (i || n) && m && C.type !== "Identifier" ? y7e([m7e(0), C]) : C;
|
|
}
|
|
_insertStatements(t, r = "before", i = 3) {
|
|
if (r === "after") {
|
|
if (this._insertStatementsAfter(t)) return;
|
|
} else if (this._insertStatementsBefore(t, i)) return;
|
|
this._programPath.unshiftContainer("body", t);
|
|
}
|
|
_insertStatementsBefore(t, r) {
|
|
if (t.length === 1 && kU(t[0]) && _0(t[0])) {
|
|
let n = this._programPath.get("body").find((a) => a.isImportDeclaration() && _0(a.node));
|
|
if (n?.node.source.value === t[0].source.value && MU(n.node, t[0]))
|
|
return !0;
|
|
}
|
|
t.forEach((n) => {
|
|
n._blockHoist = r;
|
|
});
|
|
let i = this._programPath.get("body").find((n) => {
|
|
let a = n.node._blockHoist;
|
|
return Number.isFinite(a) && a < 4;
|
|
});
|
|
return i ? (i.insertBefore(t), !0) : !1;
|
|
}
|
|
_insertStatementsAfter(t) {
|
|
let r = new Set(t), i = /* @__PURE__ */ new Map();
|
|
for (let a of t)
|
|
if (kU(a) && _0(a)) {
|
|
let o = a.source.value;
|
|
i.has(o) || i.set(o, []), i.get(o).push(a);
|
|
}
|
|
let n = null;
|
|
for (let a of this._programPath.get("body"))
|
|
if (a.isImportDeclaration() && _0(a.node)) {
|
|
n = a;
|
|
let o = a.node.source.value, u = i.get(o);
|
|
if (!u) continue;
|
|
for (let l of u)
|
|
r.has(l) && MU(a.node, l) && r.delete(l);
|
|
}
|
|
return r.size === 0 ? !0 : (n && n.insertAfter(Array.from(r)), !!n);
|
|
}
|
|
};
|
|
P0.default = Kw;
|
|
function _0(e) {
|
|
return e.importKind !== "type" && e.importKind !== "typeof";
|
|
}
|
|
s(_0, "isValueImport");
|
|
function BU(e) {
|
|
return e.specifiers.length === 1 && e.specifiers[0].type === "ImportNamespaceSpecifier" || e.specifiers.length === 2 && e.specifiers[1].
|
|
type === "ImportNamespaceSpecifier";
|
|
}
|
|
s(BU, "hasNamespaceImport");
|
|
function NU(e) {
|
|
return e.specifiers.length > 0 && e.specifiers[0].type === "ImportDefaultSpecifier";
|
|
}
|
|
s(NU, "hasDefaultImport");
|
|
function MU(e, t) {
|
|
return e.specifiers.length ? t.specifiers.length ? BU(e) || BU(t) ? !1 : (NU(t) && (NU(e) ? t.specifiers[0] = h7e(t.specifiers[0].local,
|
|
p7e("default")) : e.specifiers.unshift(t.specifiers.shift())), e.specifiers.push(...t.specifiers), !0) : !0 : (e.specifiers = t.specifiers,
|
|
!0);
|
|
}
|
|
s(MU, "maybeAppendImportSpecifiers");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-module-imports/lib/index.js
|
|
var jU = E((Ja) => {
|
|
"use strict";
|
|
Object.defineProperty(Ja, "__esModule", {
|
|
value: !0
|
|
});
|
|
Object.defineProperty(Ja, "ImportInjector", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Jd.default;
|
|
}, "get")
|
|
});
|
|
Ja.addDefault = b7e;
|
|
Ja.addNamed = D7e;
|
|
Ja.addNamespace = v7e;
|
|
Ja.addSideEffect = E7e;
|
|
Object.defineProperty(Ja, "isModule", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return g7e.default;
|
|
}, "get")
|
|
});
|
|
var Jd = RU(), g7e = Hw();
|
|
function b7e(e, t, r) {
|
|
return new Jd.default(e).addDefault(t, r);
|
|
}
|
|
s(b7e, "addDefault");
|
|
function D7e(e, t, r, i) {
|
|
return new Jd.default(e).addNamed(t, r, i);
|
|
}
|
|
s(D7e, "addNamed");
|
|
function v7e(e, t, r) {
|
|
return new Jd.default(e).addNamespace(t, r);
|
|
}
|
|
s(v7e, "addNamespace");
|
|
function E7e(e, t, r) {
|
|
return new Jd.default(e).addSideEffect(t, r);
|
|
}
|
|
s(E7e, "addSideEffect");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-module-transforms/lib/rewrite-this.js
|
|
var UU = E((zw) => {
|
|
"use strict";
|
|
Object.defineProperty(zw, "__esModule", {
|
|
value: !0
|
|
});
|
|
zw.default = x7e;
|
|
var LU = hr(), qU = Ar(), F0;
|
|
function x7e(e) {
|
|
F0 || (F0 = qU.visitors.environmentVisitor({
|
|
ThisExpression(t) {
|
|
t.replaceWith(LU.types.unaryExpression("void", LU.types.numericLiteral(0), !0));
|
|
}
|
|
}), F0.noScope = !0), (0, qU.default)(e.node, F0);
|
|
}
|
|
s(x7e, "rewriteThis");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js
|
|
var WU = E((Gw) => {
|
|
"use strict";
|
|
Object.defineProperty(Gw, "__esModule", {
|
|
value: !0
|
|
});
|
|
Gw.default = T7e;
|
|
var He = hr();
|
|
function S7e(e) {
|
|
do
|
|
switch (e.parent.type) {
|
|
case "TSTypeAnnotation":
|
|
case "TSTypeAliasDeclaration":
|
|
case "TSTypeReference":
|
|
case "TypeAnnotation":
|
|
case "TypeAlias":
|
|
return !0;
|
|
case "ExportSpecifier":
|
|
return e.parentPath.parent.exportKind === "type";
|
|
default:
|
|
if (e.parentPath.isStatement() || e.parentPath.isExpression())
|
|
return !1;
|
|
}
|
|
while (e = e.parentPath);
|
|
}
|
|
s(S7e, "isInType");
|
|
function T7e(e, t, r) {
|
|
let i = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ s((l) => {
|
|
e.requeue(l);
|
|
}, "requeueInParent");
|
|
for (let [l, c] of t.source) {
|
|
for (let [f, m] of c.imports)
|
|
i.set(f, [l, m, null]);
|
|
for (let f of c.importsNamespace)
|
|
i.set(f, [l, null, f]);
|
|
}
|
|
for (let [l, c] of t.local) {
|
|
let f = n.get(l);
|
|
f || (f = [], n.set(l, f)), f.push(...c.names);
|
|
}
|
|
let o = {
|
|
metadata: t,
|
|
requeueInParent: a,
|
|
scope: e.scope,
|
|
exported: n
|
|
};
|
|
e.traverse(C7e, o);
|
|
let u = {
|
|
seen: /* @__PURE__ */ new WeakSet(),
|
|
metadata: t,
|
|
requeueInParent: a,
|
|
scope: e.scope,
|
|
imported: i,
|
|
exported: n,
|
|
buildImportReference([l, c, f], m) {
|
|
let h = t.source.get(l);
|
|
if (h.referenced = !0, f) {
|
|
if (h.wrap) {
|
|
var d;
|
|
m = (d = r(m, h.wrap)) != null ? d : m;
|
|
}
|
|
return m;
|
|
}
|
|
let y = He.types.identifier(h.name);
|
|
if (h.wrap) {
|
|
var p;
|
|
y = (p = r(y, h.wrap)) != null ? p : y;
|
|
}
|
|
if (c === "default" && h.interop === "node-default")
|
|
return y;
|
|
let g = t.stringSpecifiers.has(c);
|
|
return He.types.memberExpression(y, g ? He.types.stringLiteral(c) : He.types.identifier(c), g);
|
|
}
|
|
};
|
|
e.traverse(w7e, u);
|
|
}
|
|
s(T7e, "rewriteLiveReferences");
|
|
var C7e = {
|
|
Scope(e) {
|
|
e.skip();
|
|
},
|
|
ClassDeclaration(e) {
|
|
let {
|
|
requeueInParent: t,
|
|
exported: r,
|
|
metadata: i
|
|
} = this, {
|
|
id: n
|
|
} = e.node;
|
|
if (!n) throw new Error("Expected class to have a name");
|
|
let a = n.name, o = r.get(a) || [];
|
|
if (o.length > 0) {
|
|
let u = He.types.expressionStatement(ou(i, o, He.types.identifier(a), e.scope));
|
|
u._blockHoist = e.node._blockHoist, t(e.insertAfter(u)[0]);
|
|
}
|
|
},
|
|
VariableDeclaration(e) {
|
|
let {
|
|
requeueInParent: t,
|
|
exported: r,
|
|
metadata: i
|
|
} = this, n = e.node.kind === "var";
|
|
for (let a of e.get("declarations")) {
|
|
let {
|
|
id: o
|
|
} = a.node, {
|
|
init: u
|
|
} = a.node;
|
|
if (He.types.isIdentifier(o) && r.has(o.name) && !He.types.isArrowFunctionExpression(u) && (!He.types.isFunctionExpression(u) || u.id) &&
|
|
(!He.types.isClassExpression(u) || u.id)) {
|
|
if (!u) {
|
|
if (n)
|
|
continue;
|
|
u = e.scope.buildUndefinedNode();
|
|
}
|
|
a.node.init = ou(i, r.get(o.name), u, e.scope), t(a.get("init"));
|
|
} else
|
|
for (let l of Object.keys(a.getOuterBindingIdentifiers()))
|
|
if (r.has(l)) {
|
|
let c = He.types.expressionStatement(ou(i, r.get(l), He.types.identifier(l), e.scope));
|
|
c._blockHoist = e.node._blockHoist, t(e.insertAfter(c)[0]);
|
|
}
|
|
}
|
|
}
|
|
}, ou = /* @__PURE__ */ s((e, t, r, i) => {
|
|
let n = e.exportName;
|
|
for (let a = i; a != null; a = a.parent)
|
|
a.hasOwnBinding(n) && a.rename(n);
|
|
return (t || []).reduce((a, o) => {
|
|
let {
|
|
stringSpecifiers: u
|
|
} = e, l = u.has(o);
|
|
return He.types.assignmentExpression("=", He.types.memberExpression(He.types.identifier(n), l ? He.types.stringLiteral(o) : He.types.identifier(
|
|
o), l), a);
|
|
}, r);
|
|
}, "buildBindingExportAssignmentExpression"), I0 = /* @__PURE__ */ s((e) => He.template.expression.ast`
|
|
(function() {
|
|
throw new Error('"' + '${e}' + '" is read-only.');
|
|
})()
|
|
`, "buildImportThrow"), w7e = {
|
|
ReferencedIdentifier(e) {
|
|
let {
|
|
seen: t,
|
|
buildImportReference: r,
|
|
scope: i,
|
|
imported: n,
|
|
requeueInParent: a
|
|
} = this;
|
|
if (t.has(e.node)) return;
|
|
t.add(e.node);
|
|
let o = e.node.name, u = n.get(o);
|
|
if (u) {
|
|
if (S7e(e))
|
|
throw e.buildCodeFrameError(`Cannot transform the imported binding "${o}" since it's also used in a type annotation. Please strip \
|
|
type annotations using @babel/preset-typescript or @babel/preset-flow.`);
|
|
let l = e.scope.getBinding(o);
|
|
if (i.getBinding(o) !== l) return;
|
|
let f = r(u, e.node);
|
|
if (f.loc = e.node.loc, (e.parentPath.isCallExpression({
|
|
callee: e.node
|
|
}) || e.parentPath.isOptionalCallExpression({
|
|
callee: e.node
|
|
}) || e.parentPath.isTaggedTemplateExpression({
|
|
tag: e.node
|
|
})) && He.types.isMemberExpression(f))
|
|
e.replaceWith(He.types.sequenceExpression([He.types.numericLiteral(0), f]));
|
|
else if (e.isJSXIdentifier() && He.types.isMemberExpression(f)) {
|
|
let {
|
|
object: m,
|
|
property: h
|
|
} = f;
|
|
e.replaceWith(He.types.jsxMemberExpression(He.types.jsxIdentifier(m.name), He.types.jsxIdentifier(h.name)));
|
|
} else
|
|
e.replaceWith(f);
|
|
a(e), e.skip();
|
|
}
|
|
},
|
|
UpdateExpression(e) {
|
|
let {
|
|
scope: t,
|
|
seen: r,
|
|
imported: i,
|
|
exported: n,
|
|
requeueInParent: a,
|
|
buildImportReference: o
|
|
} = this;
|
|
if (r.has(e.node)) return;
|
|
r.add(e.node);
|
|
let u = e.get("argument");
|
|
if (u.isMemberExpression()) return;
|
|
let l = e.node;
|
|
if (u.isIdentifier()) {
|
|
let c = u.node.name;
|
|
if (t.getBinding(c) !== e.scope.getBinding(c))
|
|
return;
|
|
let f = n.get(c), m = i.get(c);
|
|
if (f?.length > 0 || m)
|
|
if (m)
|
|
e.replaceWith(He.types.assignmentExpression(l.operator[0] + "=", o(m, u.node), I0(c)));
|
|
else if (l.prefix)
|
|
e.replaceWith(ou(this.metadata, f, He.types.cloneNode(l), e.scope));
|
|
else {
|
|
let h = t.generateDeclaredUidIdentifier(c);
|
|
e.replaceWith(He.types.sequenceExpression([He.types.assignmentExpression("=", He.types.cloneNode(h), He.types.cloneNode(l)), ou(
|
|
this.metadata, f, He.types.identifier(c), e.scope), He.types.cloneNode(h)]));
|
|
}
|
|
}
|
|
a(e), e.skip();
|
|
},
|
|
AssignmentExpression: {
|
|
exit(e) {
|
|
let {
|
|
scope: t,
|
|
seen: r,
|
|
imported: i,
|
|
exported: n,
|
|
requeueInParent: a,
|
|
buildImportReference: o
|
|
} = this;
|
|
if (r.has(e.node)) return;
|
|
r.add(e.node);
|
|
let u = e.get("left");
|
|
if (!u.isMemberExpression())
|
|
if (u.isIdentifier()) {
|
|
let l = u.node.name;
|
|
if (t.getBinding(l) !== e.scope.getBinding(l))
|
|
return;
|
|
let c = n.get(l), f = i.get(l);
|
|
if (c?.length > 0 || f) {
|
|
let m = e.node;
|
|
f && (m.left = o(f, u.node), m.right = He.types.sequenceExpression([m.right, I0(l)]));
|
|
let {
|
|
operator: h
|
|
} = m, d;
|
|
h === "=" ? d = m : h === "&&=" || h === "||=" || h === "??=" ? d = He.types.assignmentExpression("=", m.left, He.types.logicalExpression(
|
|
h.slice(0, -1), He.types.cloneNode(m.left), m.right)) : d = He.types.assignmentExpression("=", m.left, He.types.binaryExpression(
|
|
h.slice(0, -1), He.types.cloneNode(m.left), m.right)), e.replaceWith(ou(this.metadata, c, d, e.scope)), a(e), e.skip();
|
|
}
|
|
} else {
|
|
let l = u.getOuterBindingIdentifiers(), c = Object.keys(l).filter((h) => t.getBinding(h) === e.scope.getBinding(h)), f = c.find(
|
|
(h) => i.has(h));
|
|
f && (e.node.right = He.types.sequenceExpression([e.node.right, I0(f)]));
|
|
let m = [];
|
|
if (c.forEach((h) => {
|
|
let d = n.get(h) || [];
|
|
d.length > 0 && m.push(ou(this.metadata, d, He.types.identifier(h), e.scope));
|
|
}), m.length > 0) {
|
|
let h = He.types.sequenceExpression(m);
|
|
e.parentPath.isExpressionStatement() && (h = He.types.expressionStatement(h), h._blockHoist = e.parentPath.node._blockHoist);
|
|
let d = e.insertAfter(h)[0];
|
|
a(d);
|
|
}
|
|
}
|
|
}
|
|
},
|
|
ForXStatement(e) {
|
|
let {
|
|
scope: t,
|
|
node: r
|
|
} = e, {
|
|
left: i
|
|
} = r, {
|
|
exported: n,
|
|
imported: a,
|
|
scope: o
|
|
} = this;
|
|
if (!He.types.isVariableDeclaration(i)) {
|
|
let u = !1, l, c = e.get("body").scope;
|
|
for (let h of Object.keys(He.types.getOuterBindingIdentifiers(i)))
|
|
o.getBinding(h) === t.getBinding(h) && (n.has(h) && (u = !0, c.hasOwnBinding(h) && c.rename(h)), a.has(h) && !l && (l = h));
|
|
if (!u && !l)
|
|
return;
|
|
e.ensureBlock();
|
|
let f = e.get("body"), m = t.generateUidIdentifierBasedOnNode(i);
|
|
e.get("left").replaceWith(He.types.variableDeclaration("let", [He.types.variableDeclarator(He.types.cloneNode(m))])), t.registerDeclaration(
|
|
e.get("left")), u && f.unshiftContainer("body", He.types.expressionStatement(He.types.assignmentExpression("=", i, m))), l && f.unshiftContainer(
|
|
"body", He.types.expressionStatement(I0(l)));
|
|
}
|
|
}
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js
|
|
var Jw = E((ec) => {
|
|
"use strict";
|
|
Object.defineProperty(ec, "__esModule", {
|
|
value: !0
|
|
});
|
|
ec.default = I7e;
|
|
ec.hasExports = _7e;
|
|
ec.isSideEffectImport = P7e;
|
|
ec.validateImportInteropOption = VU;
|
|
var $U = V("path"), A7e = wl();
|
|
function _7e(e) {
|
|
return e.hasExports;
|
|
}
|
|
s(_7e, "hasExports");
|
|
function P7e(e) {
|
|
return e.imports.size === 0 && e.importsNamespace.size === 0 && e.reexports.size === 0 && e.reexportNamespace.size === 0 && !e.reexportAll;
|
|
}
|
|
s(P7e, "isSideEffectImport");
|
|
function VU(e) {
|
|
if (typeof e != "function" && e !== "none" && e !== "babel" && e !== "node")
|
|
throw new Error(`.importInterop must be one of "none", "babel", "node", or a function returning one of those values (received ${e}).`);
|
|
return e;
|
|
}
|
|
s(VU, "validateImportInteropOption");
|
|
function F7e(e, t, r) {
|
|
return typeof e == "function" ? VU(e(t, r)) : e;
|
|
}
|
|
s(F7e, "resolveImportInterop");
|
|
function I7e(e, t, {
|
|
importInterop: r,
|
|
initializeReexports: i = !1,
|
|
getWrapperPayload: n,
|
|
esNamespaceOnly: a = !1,
|
|
filename: o
|
|
}) {
|
|
t || (t = e.scope.generateUidIdentifier("exports").name);
|
|
let u = /* @__PURE__ */ new Set();
|
|
B7e(e);
|
|
let {
|
|
local: l,
|
|
sources: c,
|
|
hasExports: f
|
|
} = O7e(e, {
|
|
initializeReexports: i,
|
|
getWrapperPayload: n
|
|
}, u);
|
|
N7e(e);
|
|
for (let [m, h] of c) {
|
|
let {
|
|
importsNamespace: d,
|
|
imports: y
|
|
} = h;
|
|
if (d.size > 0 && y.size === 0) {
|
|
let [g] = d;
|
|
h.name = g;
|
|
}
|
|
let p = F7e(r, m, o);
|
|
p === "none" ? h.interop = "none" : p === "node" && h.interop === "namespace" ? h.interop = "node-namespace" : p === "node" && h.interop ===
|
|
"default" ? h.interop = "node-default" : a && h.interop === "namespace" && (h.interop = "default");
|
|
}
|
|
return {
|
|
exportName: t,
|
|
exportNameListName: null,
|
|
hasExports: f,
|
|
local: l,
|
|
source: c,
|
|
stringSpecifiers: u
|
|
};
|
|
}
|
|
s(I7e, "normalizeModuleAndLoadMetadata");
|
|
function O0(e, t) {
|
|
if (e.isIdentifier())
|
|
return e.node.name;
|
|
if (e.isStringLiteral()) {
|
|
let r = e.node.value;
|
|
return (0, A7e.isIdentifierName)(r) || t.add(r), r;
|
|
} else
|
|
throw new Error(`Expected export specifier to be either Identifier or StringLiteral, got ${e.node.type}`);
|
|
}
|
|
s(O0, "getExportSpecifierName");
|
|
function HU(e) {
|
|
if (!e.isExportSpecifier())
|
|
throw e.isExportNamespaceSpecifier() ? e.buildCodeFrameError("Export namespace should be first transformed by `@babel/plugin-transform\
|
|
-export-namespace-from`.") : e.buildCodeFrameError("Unexpected export specifier type");
|
|
}
|
|
s(HU, "assertExportSpecifier");
|
|
function O7e(e, {
|
|
getWrapperPayload: t,
|
|
initializeReexports: r
|
|
}, i) {
|
|
let n = k7e(e, r, i), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ s((c, f) => {
|
|
let m = c.value, h = o.get(m);
|
|
return h ? a.get(m).push(f) : (h = {
|
|
name: e.scope.generateUidIdentifier((0, $U.basename)(m, (0, $U.extname)(m))).name,
|
|
interop: "none",
|
|
loc: null,
|
|
imports: /* @__PURE__ */ new Map(),
|
|
importsNamespace: /* @__PURE__ */ new Set(),
|
|
reexports: /* @__PURE__ */ new Map(),
|
|
reexportNamespace: /* @__PURE__ */ new Set(),
|
|
reexportAll: null,
|
|
wrap: null,
|
|
get lazy() {
|
|
return this.wrap === "lazy";
|
|
},
|
|
referenced: !1
|
|
}, o.set(m, h), a.set(m, [f])), h;
|
|
}, "getData"), l = !1;
|
|
e.get("body").forEach((c) => {
|
|
if (c.isImportDeclaration()) {
|
|
let f = u(c.node.source, c.node);
|
|
f.loc || (f.loc = c.node.loc), c.get("specifiers").forEach((m) => {
|
|
if (m.isImportDefaultSpecifier()) {
|
|
let h = m.get("local").node.name;
|
|
f.imports.set(h, "default");
|
|
let d = n.get(h);
|
|
d && (n.delete(h), d.names.forEach((y) => {
|
|
f.reexports.set(y, "default");
|
|
}), f.referenced = !0);
|
|
} else if (m.isImportNamespaceSpecifier()) {
|
|
let h = m.get("local").node.name;
|
|
f.importsNamespace.add(h);
|
|
let d = n.get(h);
|
|
d && (n.delete(h), d.names.forEach((y) => {
|
|
f.reexportNamespace.add(y);
|
|
}), f.referenced = !0);
|
|
} else if (m.isImportSpecifier()) {
|
|
let h = O0(m.get("imported"), i), d = m.get("local").node.name;
|
|
f.imports.set(d, h);
|
|
let y = n.get(d);
|
|
y && (n.delete(d), y.names.forEach((p) => {
|
|
f.reexports.set(p, h);
|
|
}), f.referenced = !0);
|
|
}
|
|
});
|
|
} else if (c.isExportAllDeclaration()) {
|
|
l = !0;
|
|
let f = u(c.node.source, c.node);
|
|
f.loc || (f.loc = c.node.loc), f.reexportAll = {
|
|
loc: c.node.loc
|
|
}, f.referenced = !0;
|
|
} else if (c.isExportNamedDeclaration() && c.node.source) {
|
|
l = !0;
|
|
let f = u(c.node.source, c.node);
|
|
f.loc || (f.loc = c.node.loc), c.get("specifiers").forEach((m) => {
|
|
HU(m);
|
|
let h = O0(m.get("local"), i), d = O0(m.get("exported"), i);
|
|
if (f.reexports.set(d, h), f.referenced = !0, d === "__esModule")
|
|
throw m.get("exported").buildCodeFrameError('Illegal export "__esModule".');
|
|
});
|
|
} else (c.isExportNamedDeclaration() || c.isExportDefaultDeclaration()) && (l = !0);
|
|
});
|
|
for (let c of o.values()) {
|
|
let f = !1, m = !1;
|
|
c.importsNamespace.size > 0 && (f = !0, m = !0), c.reexportAll && (m = !0);
|
|
for (let h of c.imports.values())
|
|
h === "default" ? f = !0 : m = !0;
|
|
for (let h of c.reexports.values())
|
|
h === "default" ? f = !0 : m = !0;
|
|
f && m ? c.interop = "namespace" : f && (c.interop = "default");
|
|
}
|
|
if (t)
|
|
for (let [c, f] of o)
|
|
f.wrap = t(c, f, a.get(c));
|
|
return {
|
|
hasExports: l,
|
|
local: n,
|
|
sources: o
|
|
};
|
|
}
|
|
s(O7e, "getModuleMetadata");
|
|
function k7e(e, t, r) {
|
|
let i = /* @__PURE__ */ new Map();
|
|
e.get("body").forEach((o) => {
|
|
let u;
|
|
if (o.isImportDeclaration())
|
|
u = "import";
|
|
else {
|
|
if (o.isExportDefaultDeclaration() && (o = o.get("declaration")), o.isExportNamedDeclaration()) {
|
|
if (o.node.declaration)
|
|
o = o.get("declaration");
|
|
else if (t && o.node.source && o.get("source").isStringLiteral()) {
|
|
o.get("specifiers").forEach((l) => {
|
|
HU(l), i.set(l.get("local").node.name, "block");
|
|
});
|
|
return;
|
|
}
|
|
}
|
|
if (o.isFunctionDeclaration())
|
|
u = "hoisted";
|
|
else if (o.isClassDeclaration())
|
|
u = "block";
|
|
else if (o.isVariableDeclaration({
|
|
kind: "var"
|
|
}))
|
|
u = "var";
|
|
else if (o.isVariableDeclaration())
|
|
u = "block";
|
|
else
|
|
return;
|
|
}
|
|
Object.keys(o.getOuterBindingIdentifiers()).forEach((l) => {
|
|
i.set(l, u);
|
|
});
|
|
});
|
|
let n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ s((o) => {
|
|
let u = o.node.name, l = n.get(u);
|
|
if (!l) {
|
|
let c = i.get(u);
|
|
if (c === void 0)
|
|
throw o.buildCodeFrameError(`Exporting local "${u}", which is not declared.`);
|
|
l = {
|
|
names: [],
|
|
kind: c
|
|
}, n.set(u, l);
|
|
}
|
|
return l;
|
|
}, "getLocalMetadata");
|
|
return e.get("body").forEach((o) => {
|
|
if (o.isExportNamedDeclaration() && (t || !o.node.source))
|
|
if (o.node.declaration) {
|
|
let u = o.get("declaration"), l = u.getOuterBindingIdentifierPaths();
|
|
Object.keys(l).forEach((c) => {
|
|
if (c === "__esModule")
|
|
throw u.buildCodeFrameError('Illegal export "__esModule".');
|
|
a(l[c]).names.push(c);
|
|
});
|
|
} else
|
|
o.get("specifiers").forEach((u) => {
|
|
let l = u.get("local"), c = u.get("exported"), f = a(l), m = O0(c, r);
|
|
if (m === "__esModule")
|
|
throw c.buildCodeFrameError('Illegal export "__esModule".');
|
|
f.names.push(m);
|
|
});
|
|
else if (o.isExportDefaultDeclaration()) {
|
|
let u = o.get("declaration");
|
|
if (u.isFunctionDeclaration() || u.isClassDeclaration())
|
|
a(u.get("id")).names.push("default");
|
|
else
|
|
throw u.buildCodeFrameError("Unexpected default expression export.");
|
|
}
|
|
}), n;
|
|
}
|
|
s(k7e, "getLocalExportMetadata");
|
|
function B7e(e) {
|
|
e.get("body").forEach((t) => {
|
|
if (t.isExportDefaultDeclaration()) {
|
|
{
|
|
var r;
|
|
(r = t.splitExportDeclaration) != null || (t.splitExportDeclaration = Ar().NodePath.prototype.splitExportDeclaration);
|
|
}
|
|
t.splitExportDeclaration();
|
|
}
|
|
});
|
|
}
|
|
s(B7e, "nameAnonymousExports");
|
|
function N7e(e) {
|
|
e.get("body").forEach((t) => {
|
|
if (t.isImportDeclaration())
|
|
t.remove();
|
|
else if (t.isExportNamedDeclaration())
|
|
t.node.declaration ? (t.node.declaration._blockHoist = t.node._blockHoist, t.replaceWith(t.node.declaration)) : t.remove();
|
|
else if (t.isExportDefaultDeclaration()) {
|
|
let r = t.get("declaration");
|
|
if (r.isFunctionDeclaration() || r.isClassDeclaration())
|
|
r._blockHoist = t.node._blockHoist, t.replaceWith(r);
|
|
else
|
|
throw r.buildCodeFrameError("Unexpected default expression export.");
|
|
} else t.isExportAllDeclaration() && t.remove();
|
|
});
|
|
}
|
|
s(N7e, "removeImportExportDeclarations");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-module-transforms/lib/lazy-modules.js
|
|
var KU = E((k0) => {
|
|
"use strict";
|
|
Object.defineProperty(k0, "__esModule", {
|
|
value: !0
|
|
});
|
|
k0.toGetWrapperPayload = j7e;
|
|
k0.wrapReference = L7e;
|
|
var M7e = hr(), R7e = Jw();
|
|
function j7e(e) {
|
|
return (t, r) => {
|
|
if (e === !1 || (0, R7e.isSideEffectImport)(r) || r.reexportAll) return null;
|
|
if (e === !0)
|
|
return t.includes(".") ? null : "lazy";
|
|
if (Array.isArray(e))
|
|
return e.includes(t) ? "lazy" : null;
|
|
if (typeof e == "function")
|
|
return e(t) ? "lazy" : null;
|
|
throw new Error(".lazy must be a boolean, string array, or function");
|
|
};
|
|
}
|
|
s(j7e, "toGetWrapperPayload");
|
|
function L7e(e, t) {
|
|
return t === "lazy" ? M7e.types.callExpression(e, []) : null;
|
|
}
|
|
s(L7e, "wrapReference");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-module-transforms/lib/dynamic-import.js
|
|
var Xw = E((B0) => {
|
|
"use strict";
|
|
Object.defineProperty(B0, "__esModule", {
|
|
value: !0
|
|
});
|
|
B0.buildDynamicImport = q7e;
|
|
var Gr = hr();
|
|
B0.getDynamicImportSource = /* @__PURE__ */ s(function(t) {
|
|
let [r] = t.arguments;
|
|
return Gr.types.isStringLiteral(r) || Gr.types.isTemplateLiteral(r) ? r : Gr.template.expression.ast`\`\${${r}}\``;
|
|
}, "getDynamicImportSource");
|
|
function q7e(e, t, r, i) {
|
|
let n = Gr.types.isCallExpression(e) ? e.arguments[0] : e.source;
|
|
if (Gr.types.isStringLiteral(n) || Gr.types.isTemplateLiteral(n) && n.quasis.length === 0)
|
|
return t ? Gr.template.expression.ast`
|
|
Promise.resolve().then(() => ${i(n)})
|
|
` : i(n);
|
|
let a = Gr.types.isTemplateLiteral(n) ? Gr.types.identifier("specifier") : Gr.types.templateLiteral([Gr.types.templateElement({
|
|
raw: ""
|
|
}), Gr.types.templateElement({
|
|
raw: ""
|
|
})], [Gr.types.identifier("specifier")]);
|
|
return t ? Gr.template.expression.ast`
|
|
(specifier =>
|
|
new Promise(r => r(${a}))
|
|
.then(s => ${i(Gr.types.identifier("s"))})
|
|
)(${n})
|
|
` : r ? Gr.template.expression.ast`
|
|
(specifier =>
|
|
new Promise(r => r(${i(a)}))
|
|
)(${n})
|
|
` : Gr.template.expression.ast`
|
|
(specifier => ${i(a)})(${n})
|
|
`;
|
|
}
|
|
s(q7e, "buildDynamicImport");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-module-transforms/lib/get-module-name.js
|
|
var zU = E((N0) => {
|
|
"use strict";
|
|
Object.defineProperty(N0, "__esModule", {
|
|
value: !0
|
|
});
|
|
N0.default = Yw;
|
|
{
|
|
let e = Yw;
|
|
N0.default = Yw = /* @__PURE__ */ s(function(r, i) {
|
|
var n, a, o, u;
|
|
return e(r, {
|
|
moduleId: (n = i.moduleId) != null ? n : r.moduleId,
|
|
moduleIds: (a = i.moduleIds) != null ? a : r.moduleIds,
|
|
getModuleId: (o = i.getModuleId) != null ? o : r.getModuleId,
|
|
moduleRoot: (u = i.moduleRoot) != null ? u : r.moduleRoot
|
|
});
|
|
}, "getModuleName");
|
|
}
|
|
function Yw(e, t) {
|
|
let {
|
|
filename: r,
|
|
filenameRelative: i = r,
|
|
sourceRoot: n = t.moduleRoot
|
|
} = e, {
|
|
moduleId: a,
|
|
moduleIds: o = !!a,
|
|
getModuleId: u,
|
|
moduleRoot: l = n
|
|
} = t;
|
|
if (!o) return null;
|
|
if (a != null && !u)
|
|
return a;
|
|
let c = l != null ? l + "/" : "";
|
|
if (i) {
|
|
let f = n != null ? new RegExp("^" + n + "/?") : "";
|
|
c += i.replace(f, "").replace(/\.\w*$/, "");
|
|
}
|
|
return c = c.replace(/\\/g, "/"), u && u(c) || c;
|
|
}
|
|
s(Yw, "getModuleName");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-module-transforms/lib/index.js
|
|
var Yd = E((Mi) => {
|
|
"use strict";
|
|
Object.defineProperty(Mi, "__esModule", {
|
|
value: !0
|
|
});
|
|
Object.defineProperty(Mi, "buildDynamicImport", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return $7e.buildDynamicImport;
|
|
}, "get")
|
|
});
|
|
Mi.buildNamespaceInitStatements = G7e;
|
|
Mi.ensureStatementsHoisted = K7e;
|
|
Object.defineProperty(Mi, "getModuleName", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return V7e.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Mi, "hasExports", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Xd.hasExports;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Mi, "isModule", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return GU.isModule;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Mi, "isSideEffectImport", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Xd.isSideEffectImport;
|
|
}, "get")
|
|
});
|
|
Mi.rewriteModuleStatementsAndPrepareHeader = H7e;
|
|
Object.defineProperty(Mi, "rewriteThis", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return JU.default;
|
|
}, "get")
|
|
});
|
|
Mi.wrapInterop = z7e;
|
|
var U7e = V("assert"), lt = hr(), GU = jU(), JU = UU(), W7e = WU(), Xd = Jw(), tA = KU(), $7e = Xw(), V7e = zU();
|
|
Mi.getDynamicImportSource = Xw().getDynamicImportSource;
|
|
function H7e(e, {
|
|
exportName: t,
|
|
strict: r,
|
|
allowTopLevelThis: i,
|
|
strictMode: n,
|
|
noInterop: a,
|
|
importInterop: o = a ? "none" : "babel",
|
|
lazy: u,
|
|
getWrapperPayload: l = tA.toGetWrapperPayload(u ?? !1),
|
|
wrapReference: c = tA.wrapReference,
|
|
esNamespaceOnly: f,
|
|
filename: m,
|
|
constantReexports: h = arguments[1].loose,
|
|
enumerableModuleMeta: d = arguments[1].loose,
|
|
noIncompleteNsImportDetection: y
|
|
}) {
|
|
(0, Xd.validateImportInteropOption)(o), U7e((0, GU.isModule)(e), "Cannot process module statements in a script"), e.node.sourceType = "s\
|
|
cript";
|
|
let p = (0, Xd.default)(e, t, {
|
|
importInterop: o,
|
|
initializeReexports: h,
|
|
getWrapperPayload: l,
|
|
esNamespaceOnly: f,
|
|
filename: m
|
|
});
|
|
i || (0, JU.default)(e), (0, W7e.default)(e, p, c), n !== !1 && (e.node.directives.some((v) => v.value.value === "use strict") || e.unshiftContainer(
|
|
"directives", lt.types.directive(lt.types.directiveLiteral("use strict"))));
|
|
let g = [];
|
|
(0, Xd.hasExports)(p) && !r && g.push(J7e(p, d));
|
|
let b = Y7e(e, p);
|
|
return b && (p.exportNameListName = b.name, g.push(b.statement)), g.push(...Z7e(e, p, c, h, y)), {
|
|
meta: p,
|
|
headers: g
|
|
};
|
|
}
|
|
s(H7e, "rewriteModuleStatementsAndPrepareHeader");
|
|
function K7e(e) {
|
|
e.forEach((t) => {
|
|
t._blockHoist = 3;
|
|
});
|
|
}
|
|
s(K7e, "ensureStatementsHoisted");
|
|
function z7e(e, t, r) {
|
|
if (r === "none")
|
|
return null;
|
|
if (r === "node-namespace")
|
|
return lt.types.callExpression(e.hub.addHelper("interopRequireWildcard"), [t, lt.types.booleanLiteral(!0)]);
|
|
if (r === "node-default")
|
|
return null;
|
|
let i;
|
|
if (r === "default")
|
|
i = "interopRequireDefault";
|
|
else if (r === "namespace")
|
|
i = "interopRequireWildcard";
|
|
else
|
|
throw new Error(`Unknown interop: ${r}`);
|
|
return lt.types.callExpression(e.hub.addHelper(i), [t]);
|
|
}
|
|
s(z7e, "wrapInterop");
|
|
function G7e(e, t, r = !1, i = tA.wrapReference) {
|
|
var n;
|
|
let a = [], o = lt.types.identifier(t.name);
|
|
for (let l of t.importsNamespace)
|
|
l !== t.name && a.push(lt.template.statement`var NAME = SOURCE;`({
|
|
NAME: l,
|
|
SOURCE: lt.types.cloneNode(o)
|
|
}));
|
|
let u = (n = i(o, t.wrap)) != null ? n : o;
|
|
r && a.push(...XU(e, t, !0, i));
|
|
for (let l of t.reexportNamespace)
|
|
a.push((lt.types.isIdentifier(u) ? lt.template.statement`EXPORTS.NAME = NAMESPACE;` : lt.template.statement`
|
|
Object.defineProperty(EXPORTS, "NAME", {
|
|
enumerable: true,
|
|
get: function() {
|
|
return NAMESPACE;
|
|
}
|
|
});
|
|
`)({
|
|
EXPORTS: e.exportName,
|
|
NAME: l,
|
|
NAMESPACE: lt.types.cloneNode(u)
|
|
}));
|
|
if (t.reexportAll) {
|
|
let l = X7e(e, lt.types.cloneNode(u), r);
|
|
l.loc = t.reexportAll.loc, a.push(l);
|
|
}
|
|
return a;
|
|
}
|
|
s(G7e, "buildNamespaceInitStatements");
|
|
var Zw = {
|
|
constant: /* @__PURE__ */ s(({
|
|
exports: e,
|
|
exportName: t,
|
|
namespaceImport: r
|
|
}) => lt.template.statement.ast`
|
|
${e}.${t} = ${r};
|
|
`, "constant"),
|
|
constantComputed: /* @__PURE__ */ s(({
|
|
exports: e,
|
|
exportName: t,
|
|
namespaceImport: r
|
|
}) => lt.template.statement.ast`
|
|
${e}["${t}"] = ${r};
|
|
`, "constantComputed"),
|
|
spec: /* @__PURE__ */ s(({
|
|
exports: e,
|
|
exportName: t,
|
|
namespaceImport: r
|
|
}) => lt.template.statement.ast`
|
|
Object.defineProperty(${e}, "${t}", {
|
|
enumerable: true,
|
|
get: function() {
|
|
return ${r};
|
|
},
|
|
});
|
|
`, "spec")
|
|
};
|
|
function XU(e, t, r, i) {
|
|
var n;
|
|
let a = lt.types.identifier(t.name);
|
|
a = (n = i(a, t.wrap)) != null ? n : a;
|
|
let {
|
|
stringSpecifiers: o
|
|
} = e;
|
|
return Array.from(t.reexports, ([u, l]) => {
|
|
let c = lt.types.cloneNode(a);
|
|
l === "default" && t.interop === "node-default" || (o.has(l) ? c = lt.types.memberExpression(c, lt.types.stringLiteral(l), !0) : c = lt.
|
|
types.memberExpression(c, lt.types.identifier(l)));
|
|
let f = {
|
|
exports: e.exportName,
|
|
exportName: u,
|
|
namespaceImport: c
|
|
};
|
|
return r || lt.types.isIdentifier(c) ? o.has(u) ? Zw.constantComputed(f) : Zw.constant(f) : Zw.spec(f);
|
|
});
|
|
}
|
|
s(XU, "buildReexportsFromMeta");
|
|
function J7e(e, t = !1) {
|
|
return (t ? lt.template.statement`
|
|
EXPORTS.__esModule = true;
|
|
` : lt.template.statement`
|
|
Object.defineProperty(EXPORTS, "__esModule", {
|
|
value: true,
|
|
});
|
|
`)({
|
|
EXPORTS: e.exportName
|
|
});
|
|
}
|
|
s(J7e, "buildESModuleHeader");
|
|
function X7e(e, t, r) {
|
|
return (r ? lt.template.statement`
|
|
Object.keys(NAMESPACE).forEach(function(key) {
|
|
if (key === "default" || key === "__esModule") return;
|
|
VERIFY_NAME_LIST;
|
|
if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
|
|
|
|
EXPORTS[key] = NAMESPACE[key];
|
|
});
|
|
` : lt.template.statement`
|
|
Object.keys(NAMESPACE).forEach(function(key) {
|
|
if (key === "default" || key === "__esModule") return;
|
|
VERIFY_NAME_LIST;
|
|
if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
|
|
|
|
Object.defineProperty(EXPORTS, key, {
|
|
enumerable: true,
|
|
get: function() {
|
|
return NAMESPACE[key];
|
|
},
|
|
});
|
|
});
|
|
`)({
|
|
NAMESPACE: t,
|
|
EXPORTS: e.exportName,
|
|
VERIFY_NAME_LIST: e.exportNameListName ? (0, lt.template)`
|
|
if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;
|
|
`({
|
|
EXPORTS_LIST: e.exportNameListName
|
|
}) : null
|
|
});
|
|
}
|
|
s(X7e, "buildNamespaceReexport");
|
|
function Y7e(e, t) {
|
|
let r = /* @__PURE__ */ Object.create(null);
|
|
for (let a of t.local.values())
|
|
for (let o of a.names)
|
|
r[o] = !0;
|
|
let i = !1;
|
|
for (let a of t.source.values()) {
|
|
for (let o of a.reexports.keys())
|
|
r[o] = !0;
|
|
for (let o of a.reexportNamespace)
|
|
r[o] = !0;
|
|
i = i || !!a.reexportAll;
|
|
}
|
|
if (!i || Object.keys(r).length === 0) return null;
|
|
let n = e.scope.generateUidIdentifier("exportNames");
|
|
return delete r.default, {
|
|
name: n.name,
|
|
statement: lt.types.variableDeclaration("var", [lt.types.variableDeclarator(n, lt.types.valueToNode(r))])
|
|
};
|
|
}
|
|
s(Y7e, "buildExportNameListDeclaration");
|
|
function Z7e(e, t, r, i = !1, n = !1) {
|
|
let a = [];
|
|
for (let [u, l] of t.local)
|
|
if (l.kind !== "import") {
|
|
if (l.kind === "hoisted")
|
|
a.push([l.names[0], eA(t, l.names, lt.types.identifier(u))]);
|
|
else if (!n)
|
|
for (let c of l.names)
|
|
a.push([c, null]);
|
|
}
|
|
for (let u of t.source.values()) {
|
|
if (!i) {
|
|
let l = XU(t, u, !1, r), c = [...u.reexports.keys()];
|
|
for (let f = 0; f < l.length; f++)
|
|
a.push([c[f], l[f]]);
|
|
}
|
|
if (!n)
|
|
for (let l of u.reexportNamespace)
|
|
a.push([l, null]);
|
|
}
|
|
a.sort(([u], [l]) => u < l ? -1 : l < u ? 1 : 0);
|
|
let o = [];
|
|
if (n)
|
|
for (let [, u] of a)
|
|
o.push(u);
|
|
else
|
|
for (let l = 0; l < a.length; l += 100) {
|
|
let c = [];
|
|
for (let f = 0; f < 100 && l + f < a.length; f++) {
|
|
let [m, h] = a[l + f];
|
|
h !== null ? (c.length > 0 && (o.push(eA(t, c, e.scope.buildUndefinedNode())), c = []), o.push(h)) : c.push(m);
|
|
}
|
|
c.length > 0 && o.push(eA(t, c, e.scope.buildUndefinedNode()));
|
|
}
|
|
return o;
|
|
}
|
|
s(Z7e, "buildExportInitializationStatements");
|
|
var Qw = {
|
|
computed: /* @__PURE__ */ s(({
|
|
exports: e,
|
|
name: t,
|
|
value: r
|
|
}) => lt.template.expression.ast`${e}["${t}"] = ${r}`, "computed"),
|
|
default: /* @__PURE__ */ s(({
|
|
exports: e,
|
|
name: t,
|
|
value: r
|
|
}) => lt.template.expression.ast`${e}.${t} = ${r}`, "default"),
|
|
define: /* @__PURE__ */ s(({
|
|
exports: e,
|
|
name: t,
|
|
value: r
|
|
}) => lt.template.expression.ast`
|
|
Object.defineProperty(${e}, "${t}", {
|
|
enumerable: true,
|
|
value: void 0,
|
|
writable: true
|
|
})["${t}"] = ${r}`, "define")
|
|
};
|
|
function eA(e, t, r) {
|
|
let {
|
|
stringSpecifiers: i,
|
|
exportName: n
|
|
} = e;
|
|
return lt.types.expressionStatement(t.reduce((a, o) => {
|
|
let u = {
|
|
exports: n,
|
|
name: o,
|
|
value: a
|
|
};
|
|
return o === "__proto__" ? Qw.define(u) : i.has(o) ? Qw.computed(u) : Qw.default(u);
|
|
}, r));
|
|
}
|
|
s(eA, "buildInitStatement");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs
|
|
var ZU = E((YU) => {
|
|
YU.getModuleName = () => Yd().getModuleName;
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transformation/file/file.js
|
|
var iA = E((R0) => {
|
|
"use strict";
|
|
Object.defineProperty(R0, "__esModule", {
|
|
value: !0
|
|
});
|
|
R0.default = void 0;
|
|
function Zd() {
|
|
let e = pC();
|
|
return Zd = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "helpers"), e;
|
|
}
|
|
s(Zd, "helpers");
|
|
function rA() {
|
|
let e = Ar();
|
|
return rA = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_traverse"), e;
|
|
}
|
|
s(rA, "_traverse");
|
|
function QU() {
|
|
let e = Pd();
|
|
return QU = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_codeFrame"), e;
|
|
}
|
|
s(QU, "_codeFrame");
|
|
function eW() {
|
|
let e = Ve();
|
|
return eW = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_t"), e;
|
|
}
|
|
s(eW, "_t");
|
|
function M0() {
|
|
let e = V("semver");
|
|
return M0 = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_semver"), e;
|
|
}
|
|
s(M0, "_semver");
|
|
var Q7e = ZU(), {
|
|
cloneNode: e5e,
|
|
interpreterDirective: t5e
|
|
} = eW(), r5e = {
|
|
enter(e, t) {
|
|
let r = e.node.loc;
|
|
r && (t.loc = r, e.stop());
|
|
}
|
|
}, tc = class {
|
|
static {
|
|
s(this, "File");
|
|
}
|
|
constructor(t, {
|
|
code: r,
|
|
ast: i,
|
|
inputMap: n
|
|
}) {
|
|
this._map = /* @__PURE__ */ new Map(), this.opts = void 0, this.declarations = {}, this.path = void 0, this.ast = void 0, this.scope =
|
|
void 0, this.metadata = {}, this.code = "", this.inputMap = void 0, this.hub = {
|
|
file: this,
|
|
getCode: /* @__PURE__ */ s(() => this.code, "getCode"),
|
|
getScope: /* @__PURE__ */ s(() => this.scope, "getScope"),
|
|
addHelper: this.addHelper.bind(this),
|
|
buildError: this.buildCodeFrameError.bind(this)
|
|
}, this.opts = t, this.code = r, this.ast = i, this.inputMap = n, this.path = rA().NodePath.get({
|
|
hub: this.hub,
|
|
parentPath: null,
|
|
parent: this.ast,
|
|
container: this.ast,
|
|
key: "program"
|
|
}).setContext(), this.scope = this.path.scope;
|
|
}
|
|
get shebang() {
|
|
let {
|
|
interpreter: t
|
|
} = this.path.node;
|
|
return t ? t.value : "";
|
|
}
|
|
set shebang(t) {
|
|
t ? this.path.get("interpreter").replaceWith(t5e(t)) : this.path.get("interpreter").remove();
|
|
}
|
|
set(t, r) {
|
|
if (t === "helpersNamespace")
|
|
throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.If you are using @babel/plugin-external-\
|
|
helpers you will need to use a newer version than the one you currently have installed. If you have your own implementation, you'll want to \
|
|
explore using 'helperGenerator' alongside 'file.availableHelper()'.");
|
|
this._map.set(t, r);
|
|
}
|
|
get(t) {
|
|
return this._map.get(t);
|
|
}
|
|
has(t) {
|
|
return this._map.has(t);
|
|
}
|
|
availableHelper(t, r) {
|
|
let i;
|
|
try {
|
|
i = Zd().minVersion(t);
|
|
} catch (n) {
|
|
if (n.code !== "BABEL_HELPER_UNKNOWN") throw n;
|
|
return !1;
|
|
}
|
|
return typeof r != "string" ? !0 : (M0().valid(r) && (r = `^${r}`), !M0().intersects(`<${i}`, r) && !M0().intersects(">=8.0.0", r));
|
|
}
|
|
addHelper(t) {
|
|
let r = this.declarations[t];
|
|
if (r) return e5e(r);
|
|
let i = this.get("helperGenerator");
|
|
if (i) {
|
|
let c = i(t);
|
|
if (c) return c;
|
|
}
|
|
Zd().minVersion(t);
|
|
let n = this.declarations[t] = this.scope.generateUidIdentifier(t), a = {};
|
|
for (let c of Zd().getDependencies(t))
|
|
a[c] = this.addHelper(c);
|
|
let {
|
|
nodes: o,
|
|
globals: u
|
|
} = Zd().get(t, (c) => a[c], n.name, Object.keys(this.scope.getAllBindings()));
|
|
u.forEach((c) => {
|
|
this.path.scope.hasBinding(c, !0) && this.path.scope.rename(c);
|
|
}), o.forEach((c) => {
|
|
c._compact = !0;
|
|
});
|
|
let l = this.path.unshiftContainer("body", o);
|
|
for (let c of l)
|
|
c.isVariableDeclaration() && this.scope.registerDeclaration(c);
|
|
return n;
|
|
}
|
|
buildCodeFrameError(t, r, i = SyntaxError) {
|
|
let n = t?.loc;
|
|
if (!n && t) {
|
|
let a = {
|
|
loc: null
|
|
};
|
|
(0, rA().default)(t, r5e, this.scope, a), n = a.loc;
|
|
let o = "This is an error on an internal node. Probably an internal error.";
|
|
n && (o += " Location has been estimated."), r += ` (${o})`;
|
|
}
|
|
if (n) {
|
|
let {
|
|
highlightCode: a = !0
|
|
} = this.opts;
|
|
r += `
|
|
` + (0, QU().codeFrameColumns)(this.code, {
|
|
start: {
|
|
line: n.start.line,
|
|
column: n.start.column + 1
|
|
},
|
|
end: n.end && n.start.line === n.end.line ? {
|
|
line: n.end.line,
|
|
column: n.end.column + 1
|
|
} : void 0
|
|
}, {
|
|
highlightCode: a
|
|
});
|
|
}
|
|
return new i(r);
|
|
}
|
|
};
|
|
R0.default = tc;
|
|
tc.prototype.addImport = /* @__PURE__ */ s(function() {
|
|
throw new Error("This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-mo\
|
|
dule-imports' module and use the functions exposed from that module, such as 'addNamed' or 'addDefault'.");
|
|
}, "addImport"), tc.prototype.addTemplateObject = /* @__PURE__ */ s(function() {
|
|
throw new Error("This function has been moved into the template literal transform itself.");
|
|
}, "addTemplateObject"), tc.prototype.getModuleName = /* @__PURE__ */ s(function() {
|
|
return Q7e.getModuleName()(this.opts, this.opts);
|
|
}, "getModuleName");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/tools/build-external-helpers.js
|
|
var sW = E((cA) => {
|
|
"use strict";
|
|
Object.defineProperty(cA, "__esModule", {
|
|
value: !0
|
|
});
|
|
cA.default = b5e;
|
|
function nA() {
|
|
let e = pC();
|
|
return nA = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "helpers"), e;
|
|
}
|
|
s(nA, "helpers");
|
|
function tW() {
|
|
let e = qd();
|
|
return tW = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_generator"), e;
|
|
}
|
|
s(tW, "_generator");
|
|
function rW() {
|
|
let e = Od();
|
|
return rW = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_template"), e;
|
|
}
|
|
s(rW, "_template");
|
|
function iW() {
|
|
let e = Ve();
|
|
return iW = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_t"), e;
|
|
}
|
|
s(iW, "_t");
|
|
var {
|
|
arrayExpression: i5e,
|
|
assignmentExpression: j0,
|
|
binaryExpression: n5e,
|
|
blockStatement: s5e,
|
|
callExpression: a5e,
|
|
cloneNode: o5e,
|
|
conditionalExpression: u5e,
|
|
exportNamedDeclaration: l5e,
|
|
exportSpecifier: c5e,
|
|
expressionStatement: sA,
|
|
functionExpression: f5e,
|
|
identifier: Jr,
|
|
memberExpression: aA,
|
|
objectExpression: oA,
|
|
program: L0,
|
|
stringLiteral: nW,
|
|
unaryExpression: d5e,
|
|
variableDeclaration: uA,
|
|
variableDeclarator: lA
|
|
} = iW(), p5e = /* @__PURE__ */ s((e) => rW().default.statement`
|
|
(function (root, factory) {
|
|
if (typeof define === "function" && define.amd) {
|
|
define(AMD_ARGUMENTS, factory);
|
|
} else if (typeof exports === "object") {
|
|
factory(COMMON_ARGUMENTS);
|
|
} else {
|
|
factory(BROWSER_ARGUMENTS);
|
|
}
|
|
})(UMD_ROOT, function (FACTORY_PARAMETERS) {
|
|
FACTORY_BODY
|
|
});
|
|
`(e), "buildUmdWrapper");
|
|
function h5e(e) {
|
|
let t = Jr("babelHelpers"), r = [], i = f5e(null, [Jr("global")], s5e(r)), n = L0([sA(a5e(i, [u5e(n5e("===", d5e("typeof", Jr("global")),
|
|
nW("undefined")), Jr("self"), Jr("global"))]))]);
|
|
return r.push(uA("var", [lA(t, j0("=", aA(Jr("global"), t), oA([])))])), q0(r, t, e), n;
|
|
}
|
|
s(h5e, "buildGlobal");
|
|
function m5e(e) {
|
|
let t = [], r = q0(t, null, e);
|
|
return t.unshift(l5e(null, Object.keys(r).map((i) => c5e(o5e(r[i]), Jr(i))))), L0(t, [], "module");
|
|
}
|
|
s(m5e, "buildModule");
|
|
function y5e(e) {
|
|
let t = Jr("babelHelpers"), r = [];
|
|
return r.push(uA("var", [lA(t, Jr("global"))])), q0(r, t, e), L0([p5e({
|
|
FACTORY_PARAMETERS: Jr("global"),
|
|
BROWSER_ARGUMENTS: j0("=", aA(Jr("root"), t), oA([])),
|
|
COMMON_ARGUMENTS: Jr("exports"),
|
|
AMD_ARGUMENTS: i5e([nW("exports")]),
|
|
FACTORY_BODY: r,
|
|
UMD_ROOT: Jr("this")
|
|
})]);
|
|
}
|
|
s(y5e, "buildUmd");
|
|
function g5e(e) {
|
|
let t = Jr("babelHelpers"), r = [];
|
|
r.push(uA("var", [lA(t, oA([]))]));
|
|
let i = L0(r);
|
|
return q0(r, t, e), r.push(sA(t)), i;
|
|
}
|
|
s(g5e, "buildVar");
|
|
function q0(e, t, r) {
|
|
let i = /* @__PURE__ */ s((a) => t ? aA(t, Jr(a)) : Jr(`_${a}`), "getHelperReference"), n = {};
|
|
return nA().list.forEach(function(a) {
|
|
if (r && !r.includes(a)) return;
|
|
let o = n[a] = i(a), {
|
|
nodes: u
|
|
} = nA().get(a, i, t ? null : `_${a}`, [], t ? (l, c, f) => {
|
|
f((m) => j0("=", o, m)), l.body.push(sA(j0("=", o, Jr(c))));
|
|
} : null);
|
|
e.push(...u);
|
|
}), n;
|
|
}
|
|
s(q0, "buildHelpers");
|
|
function b5e(e, t = "global") {
|
|
let r, i = {
|
|
global: h5e,
|
|
module: m5e,
|
|
umd: y5e,
|
|
var: g5e
|
|
}[t];
|
|
if (i)
|
|
r = i(e);
|
|
else
|
|
throw new Error(`Unsupported output type ${t}`);
|
|
return (0, tW().default)(r).code;
|
|
}
|
|
s(b5e, "_default");
|
|
});
|
|
|
|
// ../node_modules/gensync/index.js
|
|
var Ri = E((rht, pW) => {
|
|
"use strict";
|
|
var oW = Symbol.for("gensync:v1:start"), uW = Symbol.for("gensync:v1:suspend"), D5e = "GENSYNC_EXPECTED_START", v5e = "GENSYNC_EXPECTED_SU\
|
|
SPEND", lW = "GENSYNC_OPTIONS_ERROR", aW = "GENSYNC_RACE_NONEMPTY", E5e = "GENSYNC_ERRBACK_NO_CALLBACK";
|
|
pW.exports = Object.assign(
|
|
/* @__PURE__ */ s(function(t) {
|
|
let r = t;
|
|
return typeof t != "function" ? r = S5e(t) : r = T5e(t), Object.assign(r, x5e(r));
|
|
}, "gensync"),
|
|
{
|
|
all: fA({
|
|
name: "all",
|
|
arity: 1,
|
|
sync: /* @__PURE__ */ s(function(e) {
|
|
return Array.from(e[0]).map((r) => dA(r));
|
|
}, "sync"),
|
|
async: /* @__PURE__ */ s(function(e, t, r) {
|
|
let i = Array.from(e[0]);
|
|
if (i.length === 0) {
|
|
Promise.resolve().then(() => t([]));
|
|
return;
|
|
}
|
|
let n = 0, a = i.map(() => {
|
|
});
|
|
i.forEach((o, u) => {
|
|
U0(
|
|
o,
|
|
(l) => {
|
|
a[u] = l, n += 1, n === a.length && t(a);
|
|
},
|
|
r
|
|
);
|
|
});
|
|
}, "async")
|
|
}),
|
|
race: fA({
|
|
name: "race",
|
|
arity: 1,
|
|
sync: /* @__PURE__ */ s(function(e) {
|
|
let t = Array.from(e[0]);
|
|
if (t.length === 0)
|
|
throw uu("Must race at least 1 item", aW);
|
|
return dA(t[0]);
|
|
}, "sync"),
|
|
async: /* @__PURE__ */ s(function(e, t, r) {
|
|
let i = Array.from(e[0]);
|
|
if (i.length === 0)
|
|
throw uu("Must race at least 1 item", aW);
|
|
for (let n of i)
|
|
U0(n, t, r);
|
|
}, "async")
|
|
})
|
|
}
|
|
);
|
|
function x5e(e) {
|
|
return {
|
|
sync: /* @__PURE__ */ s(function(...r) {
|
|
return dA(e.apply(this, r));
|
|
}, "sync"),
|
|
async: /* @__PURE__ */ s(function(...r) {
|
|
return new Promise((i, n) => {
|
|
U0(e.apply(this, r), i, n);
|
|
});
|
|
}, "async"),
|
|
errback: /* @__PURE__ */ s(function(...r) {
|
|
let i = r.pop();
|
|
if (typeof i != "function")
|
|
throw uu(
|
|
"Asynchronous function called without callback",
|
|
E5e
|
|
);
|
|
let n;
|
|
try {
|
|
n = e.apply(this, r);
|
|
} catch (a) {
|
|
i(a);
|
|
return;
|
|
}
|
|
U0(n, (a) => i(void 0, a), (a) => i(a));
|
|
}, "errback")
|
|
};
|
|
}
|
|
s(x5e, "makeFunctionAPI");
|
|
function Qd(e, t, r, i) {
|
|
if (typeof r === e || i && typeof r > "u")
|
|
return;
|
|
let n;
|
|
throw i ? n = `Expected opts.${t} to be either a ${e}, or undefined.` : n = `Expected opts.${t} to be a ${e}.`, uu(n, lW);
|
|
}
|
|
s(Qd, "assertTypeof");
|
|
function uu(e, t) {
|
|
return Object.assign(new Error(e), { code: t });
|
|
}
|
|
s(uu, "makeError");
|
|
function S5e({ name: e, arity: t, sync: r, async: i, errback: n }) {
|
|
if (Qd(
|
|
"string",
|
|
"name",
|
|
e,
|
|
!0
|
|
/* allowUndefined */
|
|
), Qd(
|
|
"number",
|
|
"arity",
|
|
t,
|
|
!0
|
|
/* allowUndefined */
|
|
), Qd("function", "sync", r), Qd(
|
|
"function",
|
|
"async",
|
|
i,
|
|
!0
|
|
/* allowUndefined */
|
|
), Qd(
|
|
"function",
|
|
"errback",
|
|
n,
|
|
!0
|
|
/* allowUndefined */
|
|
), i && n)
|
|
throw uu(
|
|
"Expected one of either opts.async or opts.errback, but got _both_.",
|
|
lW
|
|
);
|
|
if (typeof e != "string") {
|
|
let a;
|
|
n && n.name && n.name !== "errback" && (a = n.name), i && i.name && i.name !== "async" && (a = i.name.replace(/Async$/, "")), r && r.name &&
|
|
r.name !== "sync" && (a = r.name.replace(/Sync$/, "")), typeof a == "string" && (e = a);
|
|
}
|
|
return typeof t != "number" && (t = r.length), fA({
|
|
name: e,
|
|
arity: t,
|
|
sync: /* @__PURE__ */ s(function(a) {
|
|
return r.apply(this, a);
|
|
}, "sync"),
|
|
async: /* @__PURE__ */ s(function(a, o, u) {
|
|
i ? i.apply(this, a).then(o, u) : n ? n.call(this, ...a, (l, c) => {
|
|
l == null ? o(c) : u(l);
|
|
}) : o(r.apply(this, a));
|
|
}, "async")
|
|
});
|
|
}
|
|
s(S5e, "newGenerator");
|
|
function T5e(e) {
|
|
return dW(e.name, e.length, function(...t) {
|
|
return e.apply(this, t);
|
|
});
|
|
}
|
|
s(T5e, "wrapGenerator");
|
|
function fA({ name: e, arity: t, sync: r, async: i }) {
|
|
return dW(e, t, function* (...n) {
|
|
let a = yield oW;
|
|
if (!a)
|
|
return r.call(this, n);
|
|
let o;
|
|
try {
|
|
i.call(
|
|
this,
|
|
n,
|
|
(u) => {
|
|
o || (o = { value: u }, a());
|
|
},
|
|
(u) => {
|
|
o || (o = { err: u }, a());
|
|
}
|
|
);
|
|
} catch (u) {
|
|
o = { err: u }, a();
|
|
}
|
|
if (yield uW, o.hasOwnProperty("err"))
|
|
throw o.err;
|
|
return o.value;
|
|
});
|
|
}
|
|
s(fA, "buildOperation");
|
|
function dA(e) {
|
|
let t;
|
|
for (; !({ value: t } = e.next()).done; )
|
|
cW(t, e);
|
|
return t;
|
|
}
|
|
s(dA, "evaluateSync");
|
|
function U0(e, t, r) {
|
|
(/* @__PURE__ */ s(function i() {
|
|
try {
|
|
let n;
|
|
for (; !({ value: n } = e.next()).done; ) {
|
|
cW(n, e);
|
|
let a = !0, o = !1, u = e.next(() => {
|
|
a ? o = !0 : i();
|
|
});
|
|
if (a = !1, C5e(u, e), !o)
|
|
return;
|
|
}
|
|
return t(n);
|
|
} catch (n) {
|
|
return r(n);
|
|
}
|
|
}, "step"))();
|
|
}
|
|
s(U0, "evaluateAsync");
|
|
function cW(e, t) {
|
|
e !== oW && fW(
|
|
t,
|
|
uu(
|
|
`Got unexpected yielded value in gensync generator: ${JSON.stringify(
|
|
e
|
|
)}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,
|
|
D5e
|
|
)
|
|
);
|
|
}
|
|
s(cW, "assertStart");
|
|
function C5e({ value: e, done: t }, r) {
|
|
!t && e === uW || fW(
|
|
r,
|
|
uu(
|
|
t ? "Unexpected generator completion. If you get this, it is probably a gensync bug." : `Expected GENSYNC_SUSPEND, got ${JSON.stringify(
|
|
e
|
|
)}. If you get this, it is probably a gensync bug.`,
|
|
v5e
|
|
)
|
|
);
|
|
}
|
|
s(C5e, "assertSuspend");
|
|
function fW(e, t) {
|
|
throw e.throw && e.throw(t), t;
|
|
}
|
|
s(fW, "throwError");
|
|
function dW(e, t, r) {
|
|
if (typeof e == "string") {
|
|
let i = Object.getOwnPropertyDescriptor(r, "name");
|
|
(!i || i.configurable) && Object.defineProperty(
|
|
r,
|
|
"name",
|
|
Object.assign(i || {}, {
|
|
configurable: !0,
|
|
value: e
|
|
})
|
|
);
|
|
}
|
|
if (typeof t == "number") {
|
|
let i = Object.getOwnPropertyDescriptor(r, "length");
|
|
(!i || i.configurable) && Object.defineProperty(
|
|
r,
|
|
"length",
|
|
Object.assign(i || {}, {
|
|
configurable: !0,
|
|
value: t
|
|
})
|
|
);
|
|
}
|
|
return r;
|
|
}
|
|
s(dW, "setFunctionMetadata");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/gensync-utils/async.js
|
|
var Ya = E((_n) => {
|
|
"use strict";
|
|
Object.defineProperty(_n, "__esModule", {
|
|
value: !0
|
|
});
|
|
_n.forwardAsync = _5e;
|
|
_n.isAsync = void 0;
|
|
_n.isThenable = gW;
|
|
_n.maybeAsync = w5e;
|
|
_n.waitFor = _n.onFirstPause = void 0;
|
|
function Xa() {
|
|
let e = Ri();
|
|
return Xa = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_gensync"), e;
|
|
}
|
|
s(Xa, "_gensync");
|
|
function hW(e, t, r, i, n, a, o) {
|
|
try {
|
|
var u = e[a](o), l = u.value;
|
|
} catch (c) {
|
|
return void r(c);
|
|
}
|
|
u.done ? t(l) : Promise.resolve(l).then(i, n);
|
|
}
|
|
s(hW, "asyncGeneratorStep");
|
|
function yW(e) {
|
|
return function() {
|
|
var t = this, r = arguments;
|
|
return new Promise(function(i, n) {
|
|
var a = e.apply(t, r);
|
|
function o(l) {
|
|
hW(a, i, n, o, u, "next", l);
|
|
}
|
|
s(o, "_next");
|
|
function u(l) {
|
|
hW(a, i, n, o, u, "throw", l);
|
|
}
|
|
s(u, "_throw"), o(void 0);
|
|
});
|
|
};
|
|
}
|
|
s(yW, "_asyncToGenerator");
|
|
var mW = Xa()(function* (e) {
|
|
return yield* e;
|
|
}), nht = _n.isAsync = Xa()({
|
|
sync: /* @__PURE__ */ s(() => !1, "sync"),
|
|
errback: /* @__PURE__ */ s((e) => e(null, !0), "errback")
|
|
});
|
|
function w5e(e, t) {
|
|
return Xa()({
|
|
sync(...r) {
|
|
let i = e.apply(this, r);
|
|
if (gW(i)) throw new Error(t);
|
|
return i;
|
|
},
|
|
async(...r) {
|
|
return Promise.resolve(e.apply(this, r));
|
|
}
|
|
});
|
|
}
|
|
s(w5e, "maybeAsync");
|
|
var A5e = Xa()({
|
|
sync: /* @__PURE__ */ s((e) => e("sync"), "sync"),
|
|
async: function() {
|
|
var e = yW(function* (t) {
|
|
return t("async");
|
|
});
|
|
return /* @__PURE__ */ s(function(r) {
|
|
return e.apply(this, arguments);
|
|
}, "async");
|
|
}()
|
|
});
|
|
function _5e(e, t) {
|
|
let r = Xa()(e);
|
|
return A5e((i) => {
|
|
let n = r[i];
|
|
return t(n);
|
|
});
|
|
}
|
|
s(_5e, "forwardAsync");
|
|
var sht = _n.onFirstPause = Xa()({
|
|
name: "onFirstPause",
|
|
arity: 2,
|
|
sync: /* @__PURE__ */ s(function(e) {
|
|
return mW.sync(e);
|
|
}, "sync"),
|
|
errback: /* @__PURE__ */ s(function(e, t, r) {
|
|
let i = !1;
|
|
mW.errback(e, (n, a) => {
|
|
i = !0, r(n, a);
|
|
}), i || t();
|
|
}, "errback")
|
|
}), aht = _n.waitFor = Xa()({
|
|
sync: /* @__PURE__ */ s((e) => e, "sync"),
|
|
async: function() {
|
|
var e = yW(function* (t) {
|
|
return t;
|
|
});
|
|
return /* @__PURE__ */ s(function(r) {
|
|
return e.apply(this, arguments);
|
|
}, "async");
|
|
}()
|
|
});
|
|
function gW(e) {
|
|
return !!e && (typeof e == "object" || typeof e == "function") && !!e.then && typeof e.then == "function";
|
|
}
|
|
s(gW, "isThenable");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/util.js
|
|
var $0 = E((W0) => {
|
|
"use strict";
|
|
Object.defineProperty(W0, "__esModule", {
|
|
value: !0
|
|
});
|
|
W0.isIterableIterator = I5e;
|
|
W0.mergeOptions = P5e;
|
|
function P5e(e, t) {
|
|
for (let r of Object.keys(t))
|
|
if ((r === "parserOpts" || r === "generatorOpts" || r === "assumptions") && t[r]) {
|
|
let i = t[r], n = e[r] || (e[r] = {});
|
|
F5e(n, i);
|
|
} else {
|
|
let i = t[r];
|
|
i !== void 0 && (e[r] = i);
|
|
}
|
|
}
|
|
s(P5e, "mergeOptions");
|
|
function F5e(e, t) {
|
|
for (let r of Object.keys(t)) {
|
|
let i = t[r];
|
|
i !== void 0 && (e[r] = i);
|
|
}
|
|
}
|
|
s(F5e, "mergeDefaultFields");
|
|
function I5e(e) {
|
|
return !!e && typeof e.next == "function" && typeof e[Symbol.iterator] == "function";
|
|
}
|
|
s(I5e, "isIterableIterator");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/caching.js
|
|
var cu = E((lu) => {
|
|
"use strict";
|
|
Object.defineProperty(lu, "__esModule", {
|
|
value: !0
|
|
});
|
|
lu.assertSimpleType = V0;
|
|
lu.makeStrongCache = xW;
|
|
lu.makeStrongCacheSync = N5e;
|
|
lu.makeWeakCache = EW;
|
|
lu.makeWeakCacheSync = B5e;
|
|
function DW() {
|
|
let e = Ri();
|
|
return DW = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_gensync"), e;
|
|
}
|
|
s(DW, "_gensync");
|
|
var rc = Ya(), O5e = $0(), vW = /* @__PURE__ */ s((e) => DW()(e).sync, "synchronize");
|
|
function* k5e() {
|
|
return !0;
|
|
}
|
|
s(k5e, "genTrue");
|
|
function EW(e) {
|
|
return SW(WeakMap, e);
|
|
}
|
|
s(EW, "makeWeakCache");
|
|
function B5e(e) {
|
|
return vW(EW(e));
|
|
}
|
|
s(B5e, "makeWeakCacheSync");
|
|
function xW(e) {
|
|
return SW(Map, e);
|
|
}
|
|
s(xW, "makeStrongCache");
|
|
function N5e(e) {
|
|
return vW(xW(e));
|
|
}
|
|
s(N5e, "makeStrongCacheSync");
|
|
function SW(e, t) {
|
|
let r = new e(), i = new e(), n = new e();
|
|
return /* @__PURE__ */ s(function* (o, u) {
|
|
let l = yield* (0, rc.isAsync)(), c = l ? i : r, f = yield* M5e(l, c, n, o, u);
|
|
if (f.valid) return f.value;
|
|
let m = new pA(u), h = t(o, m), d, y;
|
|
return (0, O5e.isIterableIterator)(h) ? y = yield* (0, rc.onFirstPause)(h, () => {
|
|
d = R5e(m, n, o);
|
|
}) : y = h, TW(c, m, o, y), d && (n.delete(o), d.release(y)), y;
|
|
}, "cachedFunction");
|
|
}
|
|
s(SW, "makeCachedFunction");
|
|
function* bW(e, t, r) {
|
|
let i = e.get(t);
|
|
if (i) {
|
|
for (let {
|
|
value: n,
|
|
valid: a
|
|
} of i)
|
|
if (yield* a(r)) return {
|
|
valid: !0,
|
|
value: n
|
|
};
|
|
}
|
|
return {
|
|
valid: !1,
|
|
value: null
|
|
};
|
|
}
|
|
s(bW, "getCachedValue");
|
|
function* M5e(e, t, r, i, n) {
|
|
let a = yield* bW(t, i, n);
|
|
if (a.valid)
|
|
return a;
|
|
if (e) {
|
|
let o = yield* bW(r, i, n);
|
|
if (o.valid)
|
|
return {
|
|
valid: !0,
|
|
value: yield* (0, rc.waitFor)(o.value.promise)
|
|
};
|
|
}
|
|
return {
|
|
valid: !1,
|
|
value: null
|
|
};
|
|
}
|
|
s(M5e, "getCachedValueOrWait");
|
|
function R5e(e, t, r) {
|
|
let i = new hA();
|
|
return TW(t, e, r, i), i;
|
|
}
|
|
s(R5e, "setupAsyncLocks");
|
|
function TW(e, t, r, i) {
|
|
t.configured() || t.forever();
|
|
let n = e.get(r);
|
|
switch (t.deactivate(), t.mode()) {
|
|
case "forever":
|
|
n = [{
|
|
value: i,
|
|
valid: k5e
|
|
}], e.set(r, n);
|
|
break;
|
|
case "invalidate":
|
|
n = [{
|
|
value: i,
|
|
valid: t.validator()
|
|
}], e.set(r, n);
|
|
break;
|
|
case "valid":
|
|
n ? n.push({
|
|
value: i,
|
|
valid: t.validator()
|
|
}) : (n = [{
|
|
value: i,
|
|
valid: t.validator()
|
|
}], e.set(r, n));
|
|
}
|
|
}
|
|
s(TW, "updateFunctionCache");
|
|
var pA = class {
|
|
static {
|
|
s(this, "CacheConfigurator");
|
|
}
|
|
constructor(t) {
|
|
this._active = !0, this._never = !1, this._forever = !1, this._invalidate = !1, this._configured = !1, this._pairs = [], this._data = void 0,
|
|
this._data = t;
|
|
}
|
|
simple() {
|
|
return j5e(this);
|
|
}
|
|
mode() {
|
|
return this._never ? "never" : this._forever ? "forever" : this._invalidate ? "invalidate" : "valid";
|
|
}
|
|
forever() {
|
|
if (!this._active)
|
|
throw new Error("Cannot change caching after evaluation has completed.");
|
|
if (this._never)
|
|
throw new Error("Caching has already been configured with .never()");
|
|
this._forever = !0, this._configured = !0;
|
|
}
|
|
never() {
|
|
if (!this._active)
|
|
throw new Error("Cannot change caching after evaluation has completed.");
|
|
if (this._forever)
|
|
throw new Error("Caching has already been configured with .forever()");
|
|
this._never = !0, this._configured = !0;
|
|
}
|
|
using(t) {
|
|
if (!this._active)
|
|
throw new Error("Cannot change caching after evaluation has completed.");
|
|
if (this._never || this._forever)
|
|
throw new Error("Caching has already been configured with .never or .forever()");
|
|
this._configured = !0;
|
|
let r = t(this._data), i = (0, rc.maybeAsync)(t, "You appear to be using an async cache handler, but Babel has been called synchronous\
|
|
ly");
|
|
return (0, rc.isThenable)(r) ? r.then((n) => (this._pairs.push([n, i]), n)) : (this._pairs.push([r, i]), r);
|
|
}
|
|
invalidate(t) {
|
|
return this._invalidate = !0, this.using(t);
|
|
}
|
|
validator() {
|
|
let t = this._pairs;
|
|
return function* (r) {
|
|
for (let [i, n] of t)
|
|
if (i !== (yield* n(r))) return !1;
|
|
return !0;
|
|
};
|
|
}
|
|
deactivate() {
|
|
this._active = !1;
|
|
}
|
|
configured() {
|
|
return this._configured;
|
|
}
|
|
};
|
|
function j5e(e) {
|
|
function t(r) {
|
|
if (typeof r == "boolean") {
|
|
r ? e.forever() : e.never();
|
|
return;
|
|
}
|
|
return e.using(() => V0(r()));
|
|
}
|
|
return s(t, "cacheFn"), t.forever = () => e.forever(), t.never = () => e.never(), t.using = (r) => e.using(() => V0(r())), t.invalidate =
|
|
(r) => e.invalidate(() => V0(r())), t;
|
|
}
|
|
s(j5e, "makeSimpleConfigurator");
|
|
function V0(e) {
|
|
if ((0, rc.isThenable)(e))
|
|
throw new Error("You appear to be using an async cache handler, which your current version of Babel does not support. We may add suppo\
|
|
rt for this in the future, but if you're on the most recent version of @babel/core and still seeing this error, then you'll need to synchron\
|
|
ously handle your caching logic.");
|
|
if (e != null && typeof e != "string" && typeof e != "boolean" && typeof e != "number")
|
|
throw new Error("Cache keys must be either string, boolean, number, null, or undefined.");
|
|
return e;
|
|
}
|
|
s(V0, "assertSimpleType");
|
|
var hA = class {
|
|
static {
|
|
s(this, "Lock");
|
|
}
|
|
constructor() {
|
|
this.released = !1, this.promise = void 0, this._resolve = void 0, this.promise = new Promise((t) => {
|
|
this._resolve = t;
|
|
});
|
|
}
|
|
release(t) {
|
|
this.released = !0, this._resolve(t);
|
|
}
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/gensync-utils/fs.js
|
|
var H0 = E((ic) => {
|
|
"use strict";
|
|
Object.defineProperty(ic, "__esModule", {
|
|
value: !0
|
|
});
|
|
ic.stat = ic.readFile = void 0;
|
|
function ep() {
|
|
let e = V("fs");
|
|
return ep = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_fs"), e;
|
|
}
|
|
s(ep, "_fs");
|
|
function mA() {
|
|
let e = Ri();
|
|
return mA = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_gensync"), e;
|
|
}
|
|
s(mA, "_gensync");
|
|
var pht = ic.readFile = mA()({
|
|
sync: ep().readFileSync,
|
|
errback: ep().readFile
|
|
}), hht = ic.stat = mA()({
|
|
sync: ep().statSync,
|
|
errback: ep().stat
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/files/utils.js
|
|
var bA = E((gA) => {
|
|
"use strict";
|
|
Object.defineProperty(gA, "__esModule", {
|
|
value: !0
|
|
});
|
|
gA.makeStaticFileCache = U5e;
|
|
var L5e = cu(), q5e = H0();
|
|
function yA() {
|
|
let e = V("fs");
|
|
return yA = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_fs2"), e;
|
|
}
|
|
s(yA, "_fs2");
|
|
function U5e(e) {
|
|
return (0, L5e.makeStrongCache)(function* (t, r) {
|
|
return r.invalidate(() => W5e(t)) === null ? null : e(t, yield* q5e.readFile(t, "utf8"));
|
|
});
|
|
}
|
|
s(U5e, "makeStaticFileCache");
|
|
function W5e(e) {
|
|
if (!yA().existsSync(e)) return null;
|
|
try {
|
|
return +yA().statSync(e).mtime;
|
|
} catch (t) {
|
|
if (t.code !== "ENOENT" && t.code !== "ENOTDIR") throw t;
|
|
}
|
|
return null;
|
|
}
|
|
s(W5e, "fileMtime");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/errors/rewrite-stack-trace.js
|
|
var Js = E((nc) => {
|
|
"use strict";
|
|
Object.defineProperty(nc, "__esModule", {
|
|
value: !0
|
|
});
|
|
nc.beginHiddenCallStack = K5e;
|
|
nc.endHiddenCallStack = z5e;
|
|
nc.expectedError = H5e;
|
|
nc.injectVirtualStackFrame = V5e;
|
|
var CW, wW = Function.call.bind(Error.prototype.toString), z0 = !!Error.captureStackTrace && ((CW = Object.getOwnPropertyDescriptor(Error,
|
|
"stackTraceLimit")) == null ? void 0 : CW.writable) === !0, AW = "startHiding - secret - don't use this - v1", _W = "stopHiding - secret -\
|
|
don't use this - v1", PW = /* @__PURE__ */ new WeakSet(), K0 = /* @__PURE__ */ new WeakMap();
|
|
function $5e(e) {
|
|
return /* @__PURE__ */ Object.create({
|
|
isNative: /* @__PURE__ */ s(() => !1, "isNative"),
|
|
isConstructor: /* @__PURE__ */ s(() => !1, "isConstructor"),
|
|
isToplevel: /* @__PURE__ */ s(() => !0, "isToplevel"),
|
|
getFileName: /* @__PURE__ */ s(() => e, "getFileName"),
|
|
getLineNumber: /* @__PURE__ */ s(() => {
|
|
}, "getLineNumber"),
|
|
getColumnNumber: /* @__PURE__ */ s(() => {
|
|
}, "getColumnNumber"),
|
|
getFunctionName: /* @__PURE__ */ s(() => {
|
|
}, "getFunctionName"),
|
|
getMethodName: /* @__PURE__ */ s(() => {
|
|
}, "getMethodName"),
|
|
getTypeName: /* @__PURE__ */ s(() => {
|
|
}, "getTypeName"),
|
|
toString: /* @__PURE__ */ s(() => e, "toString")
|
|
});
|
|
}
|
|
s($5e, "CallSite");
|
|
function V5e(e, t) {
|
|
if (!z0) return;
|
|
let r = K0.get(e);
|
|
return r || K0.set(e, r = []), r.push($5e(t)), e;
|
|
}
|
|
s(V5e, "injectVirtualStackFrame");
|
|
function H5e(e) {
|
|
if (z0)
|
|
return PW.add(e), e;
|
|
}
|
|
s(H5e, "expectedError");
|
|
function K5e(e) {
|
|
return z0 ? Object.defineProperty(function(...t) {
|
|
return FW(), e(...t);
|
|
}, "name", {
|
|
value: _W
|
|
}) : e;
|
|
}
|
|
s(K5e, "beginHiddenCallStack");
|
|
function z5e(e) {
|
|
return z0 ? Object.defineProperty(function(...t) {
|
|
return e(...t);
|
|
}, "name", {
|
|
value: AW
|
|
}) : e;
|
|
}
|
|
s(z5e, "endHiddenCallStack");
|
|
function FW() {
|
|
FW = /* @__PURE__ */ s(() => {
|
|
}, "setupPrepareStackTrace");
|
|
let {
|
|
prepareStackTrace: e = G5e
|
|
} = Error, t = 50;
|
|
Error.stackTraceLimit && (Error.stackTraceLimit = Math.max(Error.stackTraceLimit, t)), Error.prepareStackTrace = /* @__PURE__ */ s(function(i, n) {
|
|
let a = [], u = PW.has(i) ? "hiding" : "unknown";
|
|
for (let l = 0; l < n.length; l++) {
|
|
let c = n[l].getFunctionName();
|
|
if (c === AW)
|
|
u = "hiding";
|
|
else if (c === _W) {
|
|
if (u === "hiding")
|
|
u = "showing", K0.has(i) && a.unshift(...K0.get(i));
|
|
else if (u === "unknown") {
|
|
a = n;
|
|
break;
|
|
}
|
|
} else u !== "hiding" && a.push(n[l]);
|
|
}
|
|
return e(i, a);
|
|
}, "stackTraceRewriter");
|
|
}
|
|
s(FW, "setupPrepareStackTrace");
|
|
function G5e(e, t) {
|
|
return t.length === 0 ? wW(e) : `${wW(e)}
|
|
at ${t.join(`
|
|
at `)}`;
|
|
}
|
|
s(G5e, "defaultPrepareStackTrace");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/errors/config-error.js
|
|
var fu = E((G0) => {
|
|
"use strict";
|
|
Object.defineProperty(G0, "__esModule", {
|
|
value: !0
|
|
});
|
|
G0.default = void 0;
|
|
var IW = Js(), DA = class extends Error {
|
|
static {
|
|
s(this, "ConfigError");
|
|
}
|
|
constructor(t, r) {
|
|
super(t), (0, IW.expectedError)(this), r && (0, IW.injectVirtualStackFrame)(this, r);
|
|
}
|
|
};
|
|
G0.default = DA;
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/files/package.js
|
|
var OW = E((EA) => {
|
|
"use strict";
|
|
Object.defineProperty(EA, "__esModule", {
|
|
value: !0
|
|
});
|
|
EA.findPackageData = Z5e;
|
|
function sc() {
|
|
let e = V("path");
|
|
return sc = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_path"), e;
|
|
}
|
|
s(sc, "_path");
|
|
var J5e = bA(), vA = fu(), X5e = "package.json", Y5e = (0, J5e.makeStaticFileCache)((e, t) => {
|
|
let r;
|
|
try {
|
|
r = JSON.parse(t);
|
|
} catch (i) {
|
|
throw new vA.default(`Error while parsing JSON - ${i.message}`, e);
|
|
}
|
|
if (!r) throw new Error(`${e}: No config detected`);
|
|
if (typeof r != "object")
|
|
throw new vA.default(`Config returned typeof ${typeof r}`, e);
|
|
if (Array.isArray(r))
|
|
throw new vA.default("Expected config object but found array", e);
|
|
return {
|
|
filepath: e,
|
|
dirname: sc().dirname(e),
|
|
options: r
|
|
};
|
|
});
|
|
function* Z5e(e) {
|
|
let t = null, r = [], i = !0, n = sc().dirname(e);
|
|
for (; !t && sc().basename(n) !== "node_modules"; ) {
|
|
r.push(n), t = yield* Y5e(sc().join(n, X5e));
|
|
let a = sc().dirname(n);
|
|
if (n === a) {
|
|
i = !1;
|
|
break;
|
|
}
|
|
n = a;
|
|
}
|
|
return {
|
|
filepath: e,
|
|
directories: r,
|
|
pkg: t,
|
|
isPackage: i
|
|
};
|
|
}
|
|
s(Z5e, "findPackageData");
|
|
});
|
|
|
|
// ../node_modules/json5/lib/unicode.js
|
|
var kW = E((Cht, J0) => {
|
|
J0.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
J0.exports.ID_Start = /[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\u08B6-\u08BD\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\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-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
|
|
J0.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\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\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
|
|
});
|
|
|
|
// ../node_modules/json5/lib/util.js
|
|
var SA = E((wht, BW) => {
|
|
var xA = kW();
|
|
BW.exports = {
|
|
isSpaceSeparator(e) {
|
|
return typeof e == "string" && xA.Space_Separator.test(e);
|
|
},
|
|
isIdStartChar(e) {
|
|
return typeof e == "string" && (e >= "a" && e <= "z" || e >= "A" && e <= "Z" || e === "$" || e === "_" || xA.ID_Start.test(e));
|
|
},
|
|
isIdContinueChar(e) {
|
|
return typeof e == "string" && (e >= "a" && e <= "z" || e >= "A" && e <= "Z" || e >= "0" && e <= "9" || e === "$" || e === "_" || e ===
|
|
"\u200C" || e === "\u200D" || xA.ID_Continue.test(e));
|
|
},
|
|
isDigit(e) {
|
|
return typeof e == "string" && /[0-9]/.test(e);
|
|
},
|
|
isHexDigit(e) {
|
|
return typeof e == "string" && /[0-9A-Fa-f]/.test(e);
|
|
}
|
|
};
|
|
});
|
|
|
|
// ../node_modules/json5/lib/parse.js
|
|
var LW = E((Aht, jW) => {
|
|
var Nr = SA(), CA, vi, Ys, Y0, Za, Pn, Mr, _A, rp;
|
|
jW.exports = /* @__PURE__ */ s(function(t, r) {
|
|
CA = String(t), vi = "start", Ys = [], Y0 = 0, Za = 1, Pn = 0, Mr = void 0, _A = void 0, rp = void 0;
|
|
do
|
|
Mr = Q5e(), rqe[vi]();
|
|
while (Mr.type !== "eof");
|
|
return typeof r == "function" ? wA({ "": rp }, "", r) : rp;
|
|
}, "parse");
|
|
function wA(e, t, r) {
|
|
let i = e[t];
|
|
if (i != null && typeof i == "object")
|
|
if (Array.isArray(i))
|
|
for (let n = 0; n < i.length; n++) {
|
|
let a = String(n), o = wA(i, a, r);
|
|
o === void 0 ? delete i[a] : Object.defineProperty(i, a, {
|
|
value: o,
|
|
writable: !0,
|
|
enumerable: !0,
|
|
configurable: !0
|
|
});
|
|
}
|
|
else
|
|
for (let n in i) {
|
|
let a = wA(i, n, r);
|
|
a === void 0 ? delete i[n] : Object.defineProperty(i, n, {
|
|
value: a,
|
|
writable: !0,
|
|
enumerable: !0,
|
|
configurable: !0
|
|
});
|
|
}
|
|
return r.call(e, t, i);
|
|
}
|
|
s(wA, "internalize");
|
|
var rt, Ye, tp, Xs, ct;
|
|
function Q5e() {
|
|
for (rt = "default", Ye = "", tp = !1, Xs = 1; ; ) {
|
|
ct = Zs();
|
|
let e = MW[rt]();
|
|
if (e)
|
|
return e;
|
|
}
|
|
}
|
|
s(Q5e, "lex");
|
|
function Zs() {
|
|
if (CA[Y0])
|
|
return String.fromCodePoint(CA.codePointAt(Y0));
|
|
}
|
|
s(Zs, "peek");
|
|
function ue() {
|
|
let e = Zs();
|
|
return e === `
|
|
` ? (Za++, Pn = 0) : e ? Pn += e.length : Pn++, e && (Y0 += e.length), e;
|
|
}
|
|
s(ue, "read");
|
|
var MW = {
|
|
default() {
|
|
switch (ct) {
|
|
case " ":
|
|
case "\v":
|
|
case "\f":
|
|
case " ":
|
|
case "\xA0":
|
|
case "\uFEFF":
|
|
case `
|
|
`:
|
|
case "\r":
|
|
case "\u2028":
|
|
case "\u2029":
|
|
ue();
|
|
return;
|
|
case "/":
|
|
ue(), rt = "comment";
|
|
return;
|
|
case void 0:
|
|
return ue(), Zt("eof");
|
|
}
|
|
if (Nr.isSpaceSeparator(ct)) {
|
|
ue();
|
|
return;
|
|
}
|
|
return MW[vi]();
|
|
},
|
|
comment() {
|
|
switch (ct) {
|
|
case "*":
|
|
ue(), rt = "multiLineComment";
|
|
return;
|
|
case "/":
|
|
ue(), rt = "singleLineComment";
|
|
return;
|
|
}
|
|
throw Qt(ue());
|
|
},
|
|
multiLineComment() {
|
|
switch (ct) {
|
|
case "*":
|
|
ue(), rt = "multiLineCommentAsterisk";
|
|
return;
|
|
case void 0:
|
|
throw Qt(ue());
|
|
}
|
|
ue();
|
|
},
|
|
multiLineCommentAsterisk() {
|
|
switch (ct) {
|
|
case "*":
|
|
ue();
|
|
return;
|
|
case "/":
|
|
ue(), rt = "default";
|
|
return;
|
|
case void 0:
|
|
throw Qt(ue());
|
|
}
|
|
ue(), rt = "multiLineComment";
|
|
},
|
|
singleLineComment() {
|
|
switch (ct) {
|
|
case `
|
|
`:
|
|
case "\r":
|
|
case "\u2028":
|
|
case "\u2029":
|
|
ue(), rt = "default";
|
|
return;
|
|
case void 0:
|
|
return ue(), Zt("eof");
|
|
}
|
|
ue();
|
|
},
|
|
value() {
|
|
switch (ct) {
|
|
case "{":
|
|
case "[":
|
|
return Zt("punctuator", ue());
|
|
case "n":
|
|
return ue(), du("ull"), Zt("null", null);
|
|
case "t":
|
|
return ue(), du("rue"), Zt("boolean", !0);
|
|
case "f":
|
|
return ue(), du("alse"), Zt("boolean", !1);
|
|
case "-":
|
|
case "+":
|
|
ue() === "-" && (Xs = -1), rt = "sign";
|
|
return;
|
|
case ".":
|
|
Ye = ue(), rt = "decimalPointLeading";
|
|
return;
|
|
case "0":
|
|
Ye = ue(), rt = "zero";
|
|
return;
|
|
case "1":
|
|
case "2":
|
|
case "3":
|
|
case "4":
|
|
case "5":
|
|
case "6":
|
|
case "7":
|
|
case "8":
|
|
case "9":
|
|
Ye = ue(), rt = "decimalInteger";
|
|
return;
|
|
case "I":
|
|
return ue(), du("nfinity"), Zt("numeric", 1 / 0);
|
|
case "N":
|
|
return ue(), du("aN"), Zt("numeric", NaN);
|
|
case '"':
|
|
case "'":
|
|
tp = ue() === '"', Ye = "", rt = "string";
|
|
return;
|
|
}
|
|
throw Qt(ue());
|
|
},
|
|
identifierNameStartEscape() {
|
|
if (ct !== "u")
|
|
throw Qt(ue());
|
|
ue();
|
|
let e = AA();
|
|
switch (e) {
|
|
case "$":
|
|
case "_":
|
|
break;
|
|
default:
|
|
if (!Nr.isIdStartChar(e))
|
|
throw NW();
|
|
break;
|
|
}
|
|
Ye += e, rt = "identifierName";
|
|
},
|
|
identifierName() {
|
|
switch (ct) {
|
|
case "$":
|
|
case "_":
|
|
case "\u200C":
|
|
case "\u200D":
|
|
Ye += ue();
|
|
return;
|
|
case "\\":
|
|
ue(), rt = "identifierNameEscape";
|
|
return;
|
|
}
|
|
if (Nr.isIdContinueChar(ct)) {
|
|
Ye += ue();
|
|
return;
|
|
}
|
|
return Zt("identifier", Ye);
|
|
},
|
|
identifierNameEscape() {
|
|
if (ct !== "u")
|
|
throw Qt(ue());
|
|
ue();
|
|
let e = AA();
|
|
switch (e) {
|
|
case "$":
|
|
case "_":
|
|
case "\u200C":
|
|
case "\u200D":
|
|
break;
|
|
default:
|
|
if (!Nr.isIdContinueChar(e))
|
|
throw NW();
|
|
break;
|
|
}
|
|
Ye += e, rt = "identifierName";
|
|
},
|
|
sign() {
|
|
switch (ct) {
|
|
case ".":
|
|
Ye = ue(), rt = "decimalPointLeading";
|
|
return;
|
|
case "0":
|
|
Ye = ue(), rt = "zero";
|
|
return;
|
|
case "1":
|
|
case "2":
|
|
case "3":
|
|
case "4":
|
|
case "5":
|
|
case "6":
|
|
case "7":
|
|
case "8":
|
|
case "9":
|
|
Ye = ue(), rt = "decimalInteger";
|
|
return;
|
|
case "I":
|
|
return ue(), du("nfinity"), Zt("numeric", Xs * (1 / 0));
|
|
case "N":
|
|
return ue(), du("aN"), Zt("numeric", NaN);
|
|
}
|
|
throw Qt(ue());
|
|
},
|
|
zero() {
|
|
switch (ct) {
|
|
case ".":
|
|
Ye += ue(), rt = "decimalPoint";
|
|
return;
|
|
case "e":
|
|
case "E":
|
|
Ye += ue(), rt = "decimalExponent";
|
|
return;
|
|
case "x":
|
|
case "X":
|
|
Ye += ue(), rt = "hexadecimal";
|
|
return;
|
|
}
|
|
return Zt("numeric", Xs * 0);
|
|
},
|
|
decimalInteger() {
|
|
switch (ct) {
|
|
case ".":
|
|
Ye += ue(), rt = "decimalPoint";
|
|
return;
|
|
case "e":
|
|
case "E":
|
|
Ye += ue(), rt = "decimalExponent";
|
|
return;
|
|
}
|
|
if (Nr.isDigit(ct)) {
|
|
Ye += ue();
|
|
return;
|
|
}
|
|
return Zt("numeric", Xs * Number(Ye));
|
|
},
|
|
decimalPointLeading() {
|
|
if (Nr.isDigit(ct)) {
|
|
Ye += ue(), rt = "decimalFraction";
|
|
return;
|
|
}
|
|
throw Qt(ue());
|
|
},
|
|
decimalPoint() {
|
|
switch (ct) {
|
|
case "e":
|
|
case "E":
|
|
Ye += ue(), rt = "decimalExponent";
|
|
return;
|
|
}
|
|
if (Nr.isDigit(ct)) {
|
|
Ye += ue(), rt = "decimalFraction";
|
|
return;
|
|
}
|
|
return Zt("numeric", Xs * Number(Ye));
|
|
},
|
|
decimalFraction() {
|
|
switch (ct) {
|
|
case "e":
|
|
case "E":
|
|
Ye += ue(), rt = "decimalExponent";
|
|
return;
|
|
}
|
|
if (Nr.isDigit(ct)) {
|
|
Ye += ue();
|
|
return;
|
|
}
|
|
return Zt("numeric", Xs * Number(Ye));
|
|
},
|
|
decimalExponent() {
|
|
switch (ct) {
|
|
case "+":
|
|
case "-":
|
|
Ye += ue(), rt = "decimalExponentSign";
|
|
return;
|
|
}
|
|
if (Nr.isDigit(ct)) {
|
|
Ye += ue(), rt = "decimalExponentInteger";
|
|
return;
|
|
}
|
|
throw Qt(ue());
|
|
},
|
|
decimalExponentSign() {
|
|
if (Nr.isDigit(ct)) {
|
|
Ye += ue(), rt = "decimalExponentInteger";
|
|
return;
|
|
}
|
|
throw Qt(ue());
|
|
},
|
|
decimalExponentInteger() {
|
|
if (Nr.isDigit(ct)) {
|
|
Ye += ue();
|
|
return;
|
|
}
|
|
return Zt("numeric", Xs * Number(Ye));
|
|
},
|
|
hexadecimal() {
|
|
if (Nr.isHexDigit(ct)) {
|
|
Ye += ue(), rt = "hexadecimalInteger";
|
|
return;
|
|
}
|
|
throw Qt(ue());
|
|
},
|
|
hexadecimalInteger() {
|
|
if (Nr.isHexDigit(ct)) {
|
|
Ye += ue();
|
|
return;
|
|
}
|
|
return Zt("numeric", Xs * Number(Ye));
|
|
},
|
|
string() {
|
|
switch (ct) {
|
|
case "\\":
|
|
ue(), Ye += eqe();
|
|
return;
|
|
case '"':
|
|
if (tp)
|
|
return ue(), Zt("string", Ye);
|
|
Ye += ue();
|
|
return;
|
|
case "'":
|
|
if (!tp)
|
|
return ue(), Zt("string", Ye);
|
|
Ye += ue();
|
|
return;
|
|
case `
|
|
`:
|
|
case "\r":
|
|
throw Qt(ue());
|
|
case "\u2028":
|
|
case "\u2029":
|
|
iqe(ct);
|
|
break;
|
|
case void 0:
|
|
throw Qt(ue());
|
|
}
|
|
Ye += ue();
|
|
},
|
|
start() {
|
|
switch (ct) {
|
|
case "{":
|
|
case "[":
|
|
return Zt("punctuator", ue());
|
|
}
|
|
rt = "value";
|
|
},
|
|
beforePropertyName() {
|
|
switch (ct) {
|
|
case "$":
|
|
case "_":
|
|
Ye = ue(), rt = "identifierName";
|
|
return;
|
|
case "\\":
|
|
ue(), rt = "identifierNameStartEscape";
|
|
return;
|
|
case "}":
|
|
return Zt("punctuator", ue());
|
|
case '"':
|
|
case "'":
|
|
tp = ue() === '"', rt = "string";
|
|
return;
|
|
}
|
|
if (Nr.isIdStartChar(ct)) {
|
|
Ye += ue(), rt = "identifierName";
|
|
return;
|
|
}
|
|
throw Qt(ue());
|
|
},
|
|
afterPropertyName() {
|
|
if (ct === ":")
|
|
return Zt("punctuator", ue());
|
|
throw Qt(ue());
|
|
},
|
|
beforePropertyValue() {
|
|
rt = "value";
|
|
},
|
|
afterPropertyValue() {
|
|
switch (ct) {
|
|
case ",":
|
|
case "}":
|
|
return Zt("punctuator", ue());
|
|
}
|
|
throw Qt(ue());
|
|
},
|
|
beforeArrayValue() {
|
|
if (ct === "]")
|
|
return Zt("punctuator", ue());
|
|
rt = "value";
|
|
},
|
|
afterArrayValue() {
|
|
switch (ct) {
|
|
case ",":
|
|
case "]":
|
|
return Zt("punctuator", ue());
|
|
}
|
|
throw Qt(ue());
|
|
},
|
|
end() {
|
|
throw Qt(ue());
|
|
}
|
|
};
|
|
function Zt(e, t) {
|
|
return {
|
|
type: e,
|
|
value: t,
|
|
line: Za,
|
|
column: Pn
|
|
};
|
|
}
|
|
s(Zt, "newToken");
|
|
function du(e) {
|
|
for (let t of e) {
|
|
if (Zs() !== t)
|
|
throw Qt(ue());
|
|
ue();
|
|
}
|
|
}
|
|
s(du, "literal");
|
|
function eqe() {
|
|
switch (Zs()) {
|
|
case "b":
|
|
return ue(), "\b";
|
|
case "f":
|
|
return ue(), "\f";
|
|
case "n":
|
|
return ue(), `
|
|
`;
|
|
case "r":
|
|
return ue(), "\r";
|
|
case "t":
|
|
return ue(), " ";
|
|
case "v":
|
|
return ue(), "\v";
|
|
case "0":
|
|
if (ue(), Nr.isDigit(Zs()))
|
|
throw Qt(ue());
|
|
return "\0";
|
|
case "x":
|
|
return ue(), tqe();
|
|
case "u":
|
|
return ue(), AA();
|
|
case `
|
|
`:
|
|
case "\u2028":
|
|
case "\u2029":
|
|
return ue(), "";
|
|
case "\r":
|
|
return ue(), Zs() === `
|
|
` && ue(), "";
|
|
case "1":
|
|
case "2":
|
|
case "3":
|
|
case "4":
|
|
case "5":
|
|
case "6":
|
|
case "7":
|
|
case "8":
|
|
case "9":
|
|
throw Qt(ue());
|
|
case void 0:
|
|
throw Qt(ue());
|
|
}
|
|
return ue();
|
|
}
|
|
s(eqe, "escape");
|
|
function tqe() {
|
|
let e = "", t = Zs();
|
|
if (!Nr.isHexDigit(t) || (e += ue(), t = Zs(), !Nr.isHexDigit(t)))
|
|
throw Qt(ue());
|
|
return e += ue(), String.fromCodePoint(parseInt(e, 16));
|
|
}
|
|
s(tqe, "hexEscape");
|
|
function AA() {
|
|
let e = "", t = 4;
|
|
for (; t-- > 0; ) {
|
|
let r = Zs();
|
|
if (!Nr.isHexDigit(r))
|
|
throw Qt(ue());
|
|
e += ue();
|
|
}
|
|
return String.fromCodePoint(parseInt(e, 16));
|
|
}
|
|
s(AA, "unicodeEscape");
|
|
var rqe = {
|
|
start() {
|
|
if (Mr.type === "eof")
|
|
throw pu();
|
|
TA();
|
|
},
|
|
beforePropertyName() {
|
|
switch (Mr.type) {
|
|
case "identifier":
|
|
case "string":
|
|
_A = Mr.value, vi = "afterPropertyName";
|
|
return;
|
|
case "punctuator":
|
|
X0();
|
|
return;
|
|
case "eof":
|
|
throw pu();
|
|
}
|
|
},
|
|
afterPropertyName() {
|
|
if (Mr.type === "eof")
|
|
throw pu();
|
|
vi = "beforePropertyValue";
|
|
},
|
|
beforePropertyValue() {
|
|
if (Mr.type === "eof")
|
|
throw pu();
|
|
TA();
|
|
},
|
|
beforeArrayValue() {
|
|
if (Mr.type === "eof")
|
|
throw pu();
|
|
if (Mr.type === "punctuator" && Mr.value === "]") {
|
|
X0();
|
|
return;
|
|
}
|
|
TA();
|
|
},
|
|
afterPropertyValue() {
|
|
if (Mr.type === "eof")
|
|
throw pu();
|
|
switch (Mr.value) {
|
|
case ",":
|
|
vi = "beforePropertyName";
|
|
return;
|
|
case "}":
|
|
X0();
|
|
}
|
|
},
|
|
afterArrayValue() {
|
|
if (Mr.type === "eof")
|
|
throw pu();
|
|
switch (Mr.value) {
|
|
case ",":
|
|
vi = "beforeArrayValue";
|
|
return;
|
|
case "]":
|
|
X0();
|
|
}
|
|
},
|
|
end() {
|
|
}
|
|
};
|
|
function TA() {
|
|
let e;
|
|
switch (Mr.type) {
|
|
case "punctuator":
|
|
switch (Mr.value) {
|
|
case "{":
|
|
e = {};
|
|
break;
|
|
case "[":
|
|
e = [];
|
|
break;
|
|
}
|
|
break;
|
|
case "null":
|
|
case "boolean":
|
|
case "numeric":
|
|
case "string":
|
|
e = Mr.value;
|
|
break;
|
|
}
|
|
if (rp === void 0)
|
|
rp = e;
|
|
else {
|
|
let t = Ys[Ys.length - 1];
|
|
Array.isArray(t) ? t.push(e) : Object.defineProperty(t, _A, {
|
|
value: e,
|
|
writable: !0,
|
|
enumerable: !0,
|
|
configurable: !0
|
|
});
|
|
}
|
|
if (e !== null && typeof e == "object")
|
|
Ys.push(e), Array.isArray(e) ? vi = "beforeArrayValue" : vi = "beforePropertyName";
|
|
else {
|
|
let t = Ys[Ys.length - 1];
|
|
t == null ? vi = "end" : Array.isArray(t) ? vi = "afterArrayValue" : vi = "afterPropertyValue";
|
|
}
|
|
}
|
|
s(TA, "push");
|
|
function X0() {
|
|
Ys.pop();
|
|
let e = Ys[Ys.length - 1];
|
|
e == null ? vi = "end" : Array.isArray(e) ? vi = "afterArrayValue" : vi = "afterPropertyValue";
|
|
}
|
|
s(X0, "pop");
|
|
function Qt(e) {
|
|
return Z0(e === void 0 ? `JSON5: invalid end of input at ${Za}:${Pn}` : `JSON5: invalid character '${RW(e)}' at ${Za}:${Pn}`);
|
|
}
|
|
s(Qt, "invalidChar");
|
|
function pu() {
|
|
return Z0(`JSON5: invalid end of input at ${Za}:${Pn}`);
|
|
}
|
|
s(pu, "invalidEOF");
|
|
function NW() {
|
|
return Pn -= 5, Z0(`JSON5: invalid identifier character at ${Za}:${Pn}`);
|
|
}
|
|
s(NW, "invalidIdentifier");
|
|
function iqe(e) {
|
|
console.warn(`JSON5: '${RW(e)}' in strings is not valid ECMAScript; consider escaping`);
|
|
}
|
|
s(iqe, "separatorChar");
|
|
function RW(e) {
|
|
let t = {
|
|
"'": "\\'",
|
|
'"': '\\"',
|
|
"\\": "\\\\",
|
|
"\b": "\\b",
|
|
"\f": "\\f",
|
|
"\n": "\\n",
|
|
"\r": "\\r",
|
|
" ": "\\t",
|
|
"\v": "\\v",
|
|
"\0": "\\0",
|
|
"\u2028": "\\u2028",
|
|
"\u2029": "\\u2029"
|
|
};
|
|
if (t[e])
|
|
return t[e];
|
|
if (e < " ") {
|
|
let r = e.charCodeAt(0).toString(16);
|
|
return "\\x" + ("00" + r).substring(r.length);
|
|
}
|
|
return e;
|
|
}
|
|
s(RW, "formatChar");
|
|
function Z0(e) {
|
|
let t = new SyntaxError(e);
|
|
return t.lineNumber = Za, t.columnNumber = Pn, t;
|
|
}
|
|
s(Z0, "syntaxError");
|
|
});
|
|
|
|
// ../node_modules/json5/lib/stringify.js
|
|
var UW = E((Pht, qW) => {
|
|
var PA = SA();
|
|
qW.exports = /* @__PURE__ */ s(function(t, r, i) {
|
|
let n = [], a = "", o, u, l = "", c;
|
|
if (r != null && typeof r == "object" && !Array.isArray(r) && (i = r.space, c = r.quote, r = r.replacer), typeof r == "function")
|
|
u = r;
|
|
else if (Array.isArray(r)) {
|
|
o = [];
|
|
for (let p of r) {
|
|
let g;
|
|
typeof p == "string" ? g = p : (typeof p == "number" || p instanceof String || p instanceof Number) && (g = String(p)), g !== void 0 &&
|
|
o.indexOf(g) < 0 && o.push(g);
|
|
}
|
|
}
|
|
return i instanceof Number ? i = Number(i) : i instanceof String && (i = String(i)), typeof i == "number" ? i > 0 && (i = Math.min(10, Math.
|
|
floor(i)), l = " ".substr(0, i)) : typeof i == "string" && (l = i.substr(0, 10)), f("", { "": t });
|
|
function f(p, g) {
|
|
let b = g[p];
|
|
switch (b != null && (typeof b.toJSON5 == "function" ? b = b.toJSON5(p) : typeof b.toJSON == "function" && (b = b.toJSON(p))), u && (b =
|
|
u.call(g, p, b)), b instanceof Number ? b = Number(b) : b instanceof String ? b = String(b) : b instanceof Boolean && (b = b.valueOf()),
|
|
b) {
|
|
case null:
|
|
return "null";
|
|
case !0:
|
|
return "true";
|
|
case !1:
|
|
return "false";
|
|
}
|
|
if (typeof b == "string")
|
|
return m(b, !1);
|
|
if (typeof b == "number")
|
|
return String(b);
|
|
if (typeof b == "object")
|
|
return Array.isArray(b) ? y(b) : h(b);
|
|
}
|
|
s(f, "serializeProperty");
|
|
function m(p) {
|
|
let g = {
|
|
"'": 0.1,
|
|
'"': 0.2
|
|
}, b = {
|
|
"'": "\\'",
|
|
'"': '\\"',
|
|
"\\": "\\\\",
|
|
"\b": "\\b",
|
|
"\f": "\\f",
|
|
"\n": "\\n",
|
|
"\r": "\\r",
|
|
" ": "\\t",
|
|
"\v": "\\v",
|
|
"\0": "\\0",
|
|
"\u2028": "\\u2028",
|
|
"\u2029": "\\u2029"
|
|
}, D = "";
|
|
for (let S = 0; S < p.length; S++) {
|
|
let C = p[S];
|
|
switch (C) {
|
|
case "'":
|
|
case '"':
|
|
g[C]++, D += C;
|
|
continue;
|
|
case "\0":
|
|
if (PA.isDigit(p[S + 1])) {
|
|
D += "\\x00";
|
|
continue;
|
|
}
|
|
}
|
|
if (b[C]) {
|
|
D += b[C];
|
|
continue;
|
|
}
|
|
if (C < " ") {
|
|
let O = C.charCodeAt(0).toString(16);
|
|
D += "\\x" + ("00" + O).substring(O.length);
|
|
continue;
|
|
}
|
|
D += C;
|
|
}
|
|
let v = c || Object.keys(g).reduce((S, C) => g[S] < g[C] ? S : C);
|
|
return D = D.replace(new RegExp(v, "g"), b[v]), v + D + v;
|
|
}
|
|
s(m, "quoteString");
|
|
function h(p) {
|
|
if (n.indexOf(p) >= 0)
|
|
throw TypeError("Converting circular structure to JSON5");
|
|
n.push(p);
|
|
let g = a;
|
|
a = a + l;
|
|
let b = o || Object.keys(p), D = [];
|
|
for (let S of b) {
|
|
let C = f(S, p);
|
|
if (C !== void 0) {
|
|
let O = d(S) + ":";
|
|
l !== "" && (O += " "), O += C, D.push(O);
|
|
}
|
|
}
|
|
let v;
|
|
if (D.length === 0)
|
|
v = "{}";
|
|
else {
|
|
let S;
|
|
if (l === "")
|
|
S = D.join(","), v = "{" + S + "}";
|
|
else {
|
|
let C = `,
|
|
` + a;
|
|
S = D.join(C), v = `{
|
|
` + a + S + `,
|
|
` + g + "}";
|
|
}
|
|
}
|
|
return n.pop(), a = g, v;
|
|
}
|
|
s(h, "serializeObject");
|
|
function d(p) {
|
|
if (p.length === 0)
|
|
return m(p, !0);
|
|
let g = String.fromCodePoint(p.codePointAt(0));
|
|
if (!PA.isIdStartChar(g))
|
|
return m(p, !0);
|
|
for (let b = g.length; b < p.length; b++)
|
|
if (!PA.isIdContinueChar(String.fromCodePoint(p.codePointAt(b))))
|
|
return m(p, !0);
|
|
return p;
|
|
}
|
|
s(d, "serializeKey");
|
|
function y(p) {
|
|
if (n.indexOf(p) >= 0)
|
|
throw TypeError("Converting circular structure to JSON5");
|
|
n.push(p);
|
|
let g = a;
|
|
a = a + l;
|
|
let b = [];
|
|
for (let v = 0; v < p.length; v++) {
|
|
let S = f(String(v), p);
|
|
b.push(S !== void 0 ? S : "null");
|
|
}
|
|
let D;
|
|
if (b.length === 0)
|
|
D = "[]";
|
|
else if (l === "")
|
|
D = "[" + b.join(",") + "]";
|
|
else {
|
|
let v = `,
|
|
` + a, S = b.join(v);
|
|
D = `[
|
|
` + a + S + `,
|
|
` + g + "]";
|
|
}
|
|
return n.pop(), a = g, D;
|
|
}
|
|
s(y, "serializeArray");
|
|
}, "stringify");
|
|
});
|
|
|
|
// ../node_modules/json5/lib/index.js
|
|
var $W = E((Iht, WW) => {
|
|
var nqe = LW(), sqe = UW(), aqe = {
|
|
parse: nqe,
|
|
stringify: sqe
|
|
};
|
|
WW.exports = aqe;
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/helpers/config-api.js
|
|
var FA = E((ip) => {
|
|
"use strict";
|
|
Object.defineProperty(ip, "__esModule", {
|
|
value: !0
|
|
});
|
|
ip.makeConfigAPI = KW;
|
|
ip.makePluginAPI = oqe;
|
|
ip.makePresetAPI = zW;
|
|
function HW() {
|
|
let e = V("semver");
|
|
return HW = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_semver"), e;
|
|
}
|
|
s(HW, "_semver");
|
|
var Q0 = hr(), VW = cu();
|
|
function KW(e) {
|
|
let t = /* @__PURE__ */ s((i) => e.using((n) => i === void 0 ? n.envName : typeof i == "function" ? (0, VW.assertSimpleType)(i(n.envName)) :
|
|
(Array.isArray(i) ? i : [i]).some((a) => {
|
|
if (typeof a != "string")
|
|
throw new Error("Unexpected non-string value");
|
|
return a === n.envName;
|
|
})), "env"), r = /* @__PURE__ */ s((i) => e.using((n) => (0, VW.assertSimpleType)(i(n.caller))), "caller");
|
|
return {
|
|
version: Q0.version,
|
|
cache: e.simple(),
|
|
env: t,
|
|
async: /* @__PURE__ */ s(() => !1, "async"),
|
|
caller: r,
|
|
assertVersion: uqe
|
|
};
|
|
}
|
|
s(KW, "makeConfigAPI");
|
|
function zW(e, t) {
|
|
let r = /* @__PURE__ */ s(() => JSON.parse(e.using((n) => JSON.stringify(n.targets))), "targets"), i = /* @__PURE__ */ s((n) => {
|
|
t.push(n);
|
|
}, "addExternalDependency");
|
|
return Object.assign({}, KW(e), {
|
|
targets: r,
|
|
addExternalDependency: i
|
|
});
|
|
}
|
|
s(zW, "makePresetAPI");
|
|
function oqe(e, t) {
|
|
let r = /* @__PURE__ */ s((i) => e.using((n) => n.assumptions[i]), "assumption");
|
|
return Object.assign({}, zW(e, t), {
|
|
assumption: r
|
|
});
|
|
}
|
|
s(oqe, "makePluginAPI");
|
|
function uqe(e) {
|
|
if (typeof e == "number") {
|
|
if (!Number.isInteger(e))
|
|
throw new Error("Expected string or integer value.");
|
|
e = `^${e}.0.0-0`;
|
|
}
|
|
if (typeof e != "string")
|
|
throw new Error("Expected string or integer value.");
|
|
if (e === "*" || HW().satisfies(Q0.version, e)) return;
|
|
let t = Error.stackTraceLimit;
|
|
typeof t == "number" && t < 25 && (Error.stackTraceLimit = 25);
|
|
let r = new Error(`Requires Babel "${e}", but was loaded with "${Q0.version}". If you are sure you have a compatible version of @babel/c\
|
|
ore, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the f\
|
|
irst entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.`);
|
|
throw typeof t == "number" && (Error.stackTraceLimit = t), Object.assign(r, {
|
|
code: "BABEL_VERSION_UNSUPPORTED",
|
|
version: Q0.version,
|
|
range: e
|
|
});
|
|
}
|
|
s(uqe, "assertVersion");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/helpers/deep-array.js
|
|
var tg = E((eg) => {
|
|
"use strict";
|
|
Object.defineProperty(eg, "__esModule", {
|
|
value: !0
|
|
});
|
|
eg.finalize = lqe;
|
|
eg.flattenToSet = cqe;
|
|
function lqe(e) {
|
|
return Object.freeze(e);
|
|
}
|
|
s(lqe, "finalize");
|
|
function cqe(e) {
|
|
let t = /* @__PURE__ */ new Set(), r = [e];
|
|
for (; r.length > 0; )
|
|
for (let i of r.pop())
|
|
Array.isArray(i) ? r.push(i) : t.add(i);
|
|
return t;
|
|
}
|
|
s(cqe, "flattenToSet");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/plugin.js
|
|
var ig = E((rg) => {
|
|
"use strict";
|
|
Object.defineProperty(rg, "__esModule", {
|
|
value: !0
|
|
});
|
|
rg.default = void 0;
|
|
var fqe = tg(), IA = class {
|
|
static {
|
|
s(this, "Plugin");
|
|
}
|
|
constructor(t, r, i, n = (0, fqe.finalize)([])) {
|
|
this.key = void 0, this.manipulateOptions = void 0, this.post = void 0, this.pre = void 0, this.visitor = void 0, this.parserOverride =
|
|
void 0, this.generatorOverride = void 0, this.options = void 0, this.externalDependencies = void 0, this.key = t.name || i, this.manipulateOptions =
|
|
t.manipulateOptions, this.post = t.post, this.pre = t.pre, this.visitor = t.visitor || {}, this.parserOverride = t.parserOverride, this.
|
|
generatorOverride = t.generatorOverride, this.options = r, this.externalDependencies = n;
|
|
}
|
|
};
|
|
rg.default = IA;
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/gensync-utils/functional.js
|
|
var JW = E((OA) => {
|
|
"use strict";
|
|
Object.defineProperty(OA, "__esModule", {
|
|
value: !0
|
|
});
|
|
OA.once = dqe;
|
|
var GW = Ya();
|
|
function dqe(e) {
|
|
let t, r, i = !1;
|
|
return function* () {
|
|
if (!t) {
|
|
if (r)
|
|
return i = !0, yield* (0, GW.waitFor)(r);
|
|
if (yield* (0, GW.isAsync)()) {
|
|
let n, a;
|
|
r = new Promise((o, u) => {
|
|
n = o, a = u;
|
|
});
|
|
try {
|
|
t = {
|
|
ok: !0,
|
|
value: yield* e()
|
|
}, r = null, i && n(t.value);
|
|
} catch (o) {
|
|
t = {
|
|
ok: !1,
|
|
value: o
|
|
}, r = null, i && a(o);
|
|
}
|
|
} else
|
|
try {
|
|
t = {
|
|
ok: !0,
|
|
value: yield* e()
|
|
};
|
|
} catch (n) {
|
|
t = {
|
|
ok: !1,
|
|
value: n
|
|
};
|
|
}
|
|
}
|
|
if (t.ok) return t.value;
|
|
throw t.value;
|
|
};
|
|
}
|
|
s(dqe, "once");
|
|
});
|
|
|
|
// ../node_modules/node-releases/data/processed/envs.json
|
|
var XW = E((qht, pqe) => {
|
|
pqe.exports = [{ name: "nodejs", version: "0.2.0", date: "2011-08-26", lts: !1, security: !1, v8: "2.3.8.0" }, { name: "nodejs", version: "\
|
|
0.3.0", date: "2011-08-26", lts: !1, security: !1, v8: "2.5.1.0" }, { name: "nodejs", version: "0.4.0", date: "2011-08-26", lts: !1, security: !1,
|
|
v8: "3.1.2.0" }, { name: "nodejs", version: "0.5.0", date: "2011-08-26", lts: !1, security: !1, v8: "3.1.8.25" }, { name: "nodejs", version: "\
|
|
0.6.0", date: "2011-11-04", lts: !1, security: !1, v8: "3.6.6.6" }, { name: "nodejs", version: "0.7.0", date: "2012-01-17", lts: !1, security: !1,
|
|
v8: "3.8.6.0" }, { name: "nodejs", version: "0.8.0", date: "2012-06-22", lts: !1, security: !1, v8: "3.11.10.10" }, { name: "nodejs", version: "\
|
|
0.9.0", date: "2012-07-20", lts: !1, security: !1, v8: "3.11.10.15" }, { name: "nodejs", version: "0.10.0", date: "2013-03-11", lts: !1, security: !1,
|
|
v8: "3.14.5.8" }, { name: "nodejs", version: "0.11.0", date: "2013-03-28", lts: !1, security: !1, v8: "3.17.13.0" }, { name: "nodejs", version: "\
|
|
0.12.0", date: "2015-02-06", lts: !1, security: !1, v8: "3.28.73.0" }, { name: "nodejs", version: "4.0.0", date: "2015-09-08", lts: !1, security: !1,
|
|
v8: "4.5.103.30" }, { name: "nodejs", version: "4.1.0", date: "2015-09-17", lts: !1, security: !1, v8: "4.5.103.33" }, { name: "nodejs", version: "\
|
|
4.2.0", date: "2015-10-12", lts: "Argon", security: !1, v8: "4.5.103.35" }, { name: "nodejs", version: "4.3.0", date: "2016-02-09", lts: "Ar\
|
|
gon", security: !1, v8: "4.5.103.35" }, { name: "nodejs", version: "4.4.0", date: "2016-03-08", lts: "Argon", security: !1, v8: "4.5.103.35" },
|
|
{ name: "nodejs", version: "4.5.0", date: "2016-08-16", lts: "Argon", security: !1, v8: "4.5.103.37" }, { name: "nodejs", version: "4.6.0",
|
|
date: "2016-09-27", lts: "Argon", security: !0, v8: "4.5.103.37" }, { name: "nodejs", version: "4.7.0", date: "2016-12-06", lts: "Argon", security: !1,
|
|
v8: "4.5.103.43" }, { name: "nodejs", version: "4.8.0", date: "2017-02-21", lts: "Argon", security: !1, v8: "4.5.103.45" }, { name: "nodej\
|
|
s", version: "4.9.0", date: "2018-03-28", lts: "Argon", security: !0, v8: "4.5.103.53" }, { name: "nodejs", version: "5.0.0", date: "2015-10\
|
|
-29", lts: !1, security: !1, v8: "4.6.85.28" }, { name: "nodejs", version: "5.1.0", date: "2015-11-17", lts: !1, security: !1, v8: "4.6.85.3\
|
|
1" }, { name: "nodejs", version: "5.2.0", date: "2015-12-09", lts: !1, security: !1, v8: "4.6.85.31" }, { name: "nodejs", version: "5.3.0", date: "\
|
|
2015-12-15", lts: !1, security: !1, v8: "4.6.85.31" }, { name: "nodejs", version: "5.4.0", date: "2016-01-06", lts: !1, security: !1, v8: "4\
|
|
.6.85.31" }, { name: "nodejs", version: "5.5.0", date: "2016-01-21", lts: !1, security: !1, v8: "4.6.85.31" }, { name: "nodejs", version: "5\
|
|
.6.0", date: "2016-02-09", lts: !1, security: !1, v8: "4.6.85.31" }, { name: "nodejs", version: "5.7.0", date: "2016-02-23", lts: !1, security: !1,
|
|
v8: "4.6.85.31" }, { name: "nodejs", version: "5.8.0", date: "2016-03-09", lts: !1, security: !1, v8: "4.6.85.31" }, { name: "nodejs", version: "\
|
|
5.9.0", date: "2016-03-16", lts: !1, security: !1, v8: "4.6.85.31" }, { name: "nodejs", version: "5.10.0", date: "2016-04-01", lts: !1, security: !1,
|
|
v8: "4.6.85.31" }, { name: "nodejs", version: "5.11.0", date: "2016-04-21", lts: !1, security: !1, v8: "4.6.85.31" }, { name: "nodejs", version: "\
|
|
5.12.0", date: "2016-06-23", lts: !1, security: !1, v8: "4.6.85.32" }, { name: "nodejs", version: "6.0.0", date: "2016-04-26", lts: !1, security: !1,
|
|
v8: "5.0.71.35" }, { name: "nodejs", version: "6.1.0", date: "2016-05-05", lts: !1, security: !1, v8: "5.0.71.35" }, { name: "nodejs", version: "\
|
|
6.2.0", date: "2016-05-17", lts: !1, security: !1, v8: "5.0.71.47" }, { name: "nodejs", version: "6.3.0", date: "2016-07-06", lts: !1, security: !1,
|
|
v8: "5.0.71.52" }, { name: "nodejs", version: "6.4.0", date: "2016-08-12", lts: !1, security: !1, v8: "5.0.71.60" }, { name: "nodejs", version: "\
|
|
6.5.0", date: "2016-08-26", lts: !1, security: !1, v8: "5.1.281.81" }, { name: "nodejs", version: "6.6.0", date: "2016-09-14", lts: !1, security: !1,
|
|
v8: "5.1.281.83" }, { name: "nodejs", version: "6.7.0", date: "2016-09-27", lts: !1, security: !0, v8: "5.1.281.83" }, { name: "nodejs", version: "\
|
|
6.8.0", date: "2016-10-12", lts: !1, security: !1, v8: "5.1.281.84" }, { name: "nodejs", version: "6.9.0", date: "2016-10-18", lts: "Boron",
|
|
security: !1, v8: "5.1.281.84" }, { name: "nodejs", version: "6.10.0", date: "2017-02-21", lts: "Boron", security: !1, v8: "5.1.281.93" },
|
|
{ name: "nodejs", version: "6.11.0", date: "2017-06-06", lts: "Boron", security: !1, v8: "5.1.281.102" }, { name: "nodejs", version: "6.12\
|
|
.0", date: "2017-11-06", lts: "Boron", security: !1, v8: "5.1.281.108" }, { name: "nodejs", version: "6.13.0", date: "2018-02-10", lts: "Bor\
|
|
on", security: !1, v8: "5.1.281.111" }, { name: "nodejs", version: "6.14.0", date: "2018-03-28", lts: "Boron", security: !0, v8: "5.1.281.11\
|
|
1" }, { name: "nodejs", version: "6.15.0", date: "2018-11-27", lts: "Boron", security: !0, v8: "5.1.281.111" }, { name: "nodejs", version: "\
|
|
6.16.0", date: "2018-12-26", lts: "Boron", security: !1, v8: "5.1.281.111" }, { name: "nodejs", version: "6.17.0", date: "2019-02-28", lts: "\
|
|
Boron", security: !0, v8: "5.1.281.111" }, { name: "nodejs", version: "7.0.0", date: "2016-10-25", lts: !1, security: !1, v8: "5.4.500.36" },
|
|
{ name: "nodejs", version: "7.1.0", date: "2016-11-08", lts: !1, security: !1, v8: "5.4.500.36" }, { name: "nodejs", version: "7.2.0", date: "\
|
|
2016-11-22", lts: !1, security: !1, v8: "5.4.500.43" }, { name: "nodejs", version: "7.3.0", date: "2016-12-20", lts: !1, security: !1, v8: "\
|
|
5.4.500.45" }, { name: "nodejs", version: "7.4.0", date: "2017-01-04", lts: !1, security: !1, v8: "5.4.500.45" }, { name: "nodejs", version: "\
|
|
7.5.0", date: "2017-01-31", lts: !1, security: !1, v8: "5.4.500.48" }, { name: "nodejs", version: "7.6.0", date: "2017-02-21", lts: !1, security: !1,
|
|
v8: "5.5.372.40" }, { name: "nodejs", version: "7.7.0", date: "2017-02-28", lts: !1, security: !1, v8: "5.5.372.41" }, { name: "nodejs", version: "\
|
|
7.8.0", date: "2017-03-29", lts: !1, security: !1, v8: "5.5.372.43" }, { name: "nodejs", version: "7.9.0", date: "2017-04-11", lts: !1, security: !1,
|
|
v8: "5.5.372.43" }, { name: "nodejs", version: "7.10.0", date: "2017-05-02", lts: !1, security: !1, v8: "5.5.372.43" }, { name: "nodejs", version: "\
|
|
8.0.0", date: "2017-05-30", lts: !1, security: !1, v8: "5.8.283.41" }, { name: "nodejs", version: "8.1.0", date: "2017-06-08", lts: !1, security: !1,
|
|
v8: "5.8.283.41" }, { name: "nodejs", version: "8.2.0", date: "2017-07-19", lts: !1, security: !1, v8: "5.8.283.41" }, { name: "nodejs", version: "\
|
|
8.3.0", date: "2017-08-08", lts: !1, security: !1, v8: "6.0.286.52" }, { name: "nodejs", version: "8.4.0", date: "2017-08-15", lts: !1, security: !1,
|
|
v8: "6.0.286.52" }, { name: "nodejs", version: "8.5.0", date: "2017-09-12", lts: !1, security: !1, v8: "6.0.287.53" }, { name: "nodejs", version: "\
|
|
8.6.0", date: "2017-09-26", lts: !1, security: !1, v8: "6.0.287.53" }, { name: "nodejs", version: "8.7.0", date: "2017-10-11", lts: !1, security: !1,
|
|
v8: "6.1.534.42" }, { name: "nodejs", version: "8.8.0", date: "2017-10-24", lts: !1, security: !1, v8: "6.1.534.42" }, { name: "nodejs", version: "\
|
|
8.9.0", date: "2017-10-31", lts: "Carbon", security: !1, v8: "6.1.534.46" }, { name: "nodejs", version: "8.10.0", date: "2018-03-06", lts: "\
|
|
Carbon", security: !1, v8: "6.2.414.50" }, { name: "nodejs", version: "8.11.0", date: "2018-03-28", lts: "Carbon", security: !0, v8: "6.2.41\
|
|
4.50" }, { name: "nodejs", version: "8.12.0", date: "2018-09-10", lts: "Carbon", security: !1, v8: "6.2.414.66" }, { name: "nodejs", version: "\
|
|
8.13.0", date: "2018-11-20", lts: "Carbon", security: !1, v8: "6.2.414.72" }, { name: "nodejs", version: "8.14.0", date: "2018-11-27", lts: "\
|
|
Carbon", security: !0, v8: "6.2.414.72" }, { name: "nodejs", version: "8.15.0", date: "2018-12-26", lts: "Carbon", security: !1, v8: "6.2.41\
|
|
4.75" }, { name: "nodejs", version: "8.16.0", date: "2019-04-16", lts: "Carbon", security: !1, v8: "6.2.414.77" }, { name: "nodejs", version: "\
|
|
8.17.0", date: "2019-12-17", lts: "Carbon", security: !0, v8: "6.2.414.78" }, { name: "nodejs", version: "9.0.0", date: "2017-10-31", lts: !1,
|
|
security: !1, v8: "6.2.414.32" }, { name: "nodejs", version: "9.1.0", date: "2017-11-07", lts: !1, security: !1, v8: "6.2.414.32" }, { name: "\
|
|
nodejs", version: "9.2.0", date: "2017-11-14", lts: !1, security: !1, v8: "6.2.414.44" }, { name: "nodejs", version: "9.3.0", date: "2017-12\
|
|
-12", lts: !1, security: !1, v8: "6.2.414.46" }, { name: "nodejs", version: "9.4.0", date: "2018-01-10", lts: !1, security: !1, v8: "6.2.414\
|
|
.46" }, { name: "nodejs", version: "9.5.0", date: "2018-01-31", lts: !1, security: !1, v8: "6.2.414.46" }, { name: "nodejs", version: "9.6.0",
|
|
date: "2018-02-21", lts: !1, security: !1, v8: "6.2.414.46" }, { name: "nodejs", version: "9.7.0", date: "2018-03-01", lts: !1, security: !1,
|
|
v8: "6.2.414.46" }, { name: "nodejs", version: "9.8.0", date: "2018-03-07", lts: !1, security: !1, v8: "6.2.414.46" }, { name: "nodejs", version: "\
|
|
9.9.0", date: "2018-03-21", lts: !1, security: !1, v8: "6.2.414.46" }, { name: "nodejs", version: "9.10.0", date: "2018-03-28", lts: !1, security: !0,
|
|
v8: "6.2.414.46" }, { name: "nodejs", version: "9.11.0", date: "2018-04-04", lts: !1, security: !1, v8: "6.2.414.46" }, { name: "nodejs", version: "\
|
|
10.0.0", date: "2018-04-24", lts: !1, security: !1, v8: "6.6.346.24" }, { name: "nodejs", version: "10.1.0", date: "2018-05-08", lts: !1, security: !1,
|
|
v8: "6.6.346.27" }, { name: "nodejs", version: "10.2.0", date: "2018-05-23", lts: !1, security: !1, v8: "6.6.346.32" }, { name: "nodejs", version: "\
|
|
10.3.0", date: "2018-05-29", lts: !1, security: !1, v8: "6.6.346.32" }, { name: "nodejs", version: "10.4.0", date: "2018-06-06", lts: !1, security: !1,
|
|
v8: "6.7.288.43" }, { name: "nodejs", version: "10.5.0", date: "2018-06-20", lts: !1, security: !1, v8: "6.7.288.46" }, { name: "nodejs", version: "\
|
|
10.6.0", date: "2018-07-04", lts: !1, security: !1, v8: "6.7.288.46" }, { name: "nodejs", version: "10.7.0", date: "2018-07-18", lts: !1, security: !1,
|
|
v8: "6.7.288.49" }, { name: "nodejs", version: "10.8.0", date: "2018-08-01", lts: !1, security: !1, v8: "6.7.288.49" }, { name: "nodejs", version: "\
|
|
10.9.0", date: "2018-08-15", lts: !1, security: !1, v8: "6.8.275.24" }, { name: "nodejs", version: "10.10.0", date: "2018-09-06", lts: !1, security: !1,
|
|
v8: "6.8.275.30" }, { name: "nodejs", version: "10.11.0", date: "2018-09-19", lts: !1, security: !1, v8: "6.8.275.32" }, { name: "nodejs",
|
|
version: "10.12.0", date: "2018-10-10", lts: !1, security: !1, v8: "6.8.275.32" }, { name: "nodejs", version: "10.13.0", date: "2018-10-30",
|
|
lts: "Dubnium", security: !1, v8: "6.8.275.32" }, { name: "nodejs", version: "10.14.0", date: "2018-11-27", lts: "Dubnium", security: !0, v8: "\
|
|
6.8.275.32" }, { name: "nodejs", version: "10.15.0", date: "2018-12-26", lts: "Dubnium", security: !1, v8: "6.8.275.32" }, { name: "nodejs",
|
|
version: "10.16.0", date: "2019-05-28", lts: "Dubnium", security: !1, v8: "6.8.275.32" }, { name: "nodejs", version: "10.17.0", date: "201\
|
|
9-10-22", lts: "Dubnium", security: !1, v8: "6.8.275.32" }, { name: "nodejs", version: "10.18.0", date: "2019-12-17", lts: "Dubnium", security: !0,
|
|
v8: "6.8.275.32" }, { name: "nodejs", version: "10.19.0", date: "2020-02-05", lts: "Dubnium", security: !0, v8: "6.8.275.32" }, { name: "n\
|
|
odejs", version: "10.20.0", date: "2020-03-26", lts: "Dubnium", security: !1, v8: "6.8.275.32" }, { name: "nodejs", version: "10.21.0", date: "\
|
|
2020-06-02", lts: "Dubnium", security: !0, v8: "6.8.275.32" }, { name: "nodejs", version: "10.22.0", date: "2020-07-21", lts: "Dubnium", security: !1,
|
|
v8: "6.8.275.32" }, { name: "nodejs", version: "10.23.0", date: "2020-10-27", lts: "Dubnium", security: !1, v8: "6.8.275.32" }, { name: "n\
|
|
odejs", version: "10.24.0", date: "2021-02-23", lts: "Dubnium", security: !0, v8: "6.8.275.32" }, { name: "nodejs", version: "11.0.0", date: "\
|
|
2018-10-23", lts: !1, security: !1, v8: "7.0.276.28" }, { name: "nodejs", version: "11.1.0", date: "2018-10-30", lts: !1, security: !1, v8: "\
|
|
7.0.276.32" }, { name: "nodejs", version: "11.2.0", date: "2018-11-15", lts: !1, security: !1, v8: "7.0.276.38" }, { name: "nodejs", version: "\
|
|
11.3.0", date: "2018-11-27", lts: !1, security: !0, v8: "7.0.276.38" }, { name: "nodejs", version: "11.4.0", date: "2018-12-07", lts: !1, security: !1,
|
|
v8: "7.0.276.38" }, { name: "nodejs", version: "11.5.0", date: "2018-12-18", lts: !1, security: !1, v8: "7.0.276.38" }, { name: "nodejs", version: "\
|
|
11.6.0", date: "2018-12-26", lts: !1, security: !1, v8: "7.0.276.38" }, { name: "nodejs", version: "11.7.0", date: "2019-01-17", lts: !1, security: !1,
|
|
v8: "7.0.276.38" }, { name: "nodejs", version: "11.8.0", date: "2019-01-24", lts: !1, security: !1, v8: "7.0.276.38" }, { name: "nodejs", version: "\
|
|
11.9.0", date: "2019-01-30", lts: !1, security: !1, v8: "7.0.276.38" }, { name: "nodejs", version: "11.10.0", date: "2019-02-14", lts: !1, security: !1,
|
|
v8: "7.0.276.38" }, { name: "nodejs", version: "11.11.0", date: "2019-03-05", lts: !1, security: !1, v8: "7.0.276.38" }, { name: "nodejs",
|
|
version: "11.12.0", date: "2019-03-14", lts: !1, security: !1, v8: "7.0.276.38" }, { name: "nodejs", version: "11.13.0", date: "2019-03-28",
|
|
lts: !1, security: !1, v8: "7.0.276.38" }, { name: "nodejs", version: "11.14.0", date: "2019-04-10", lts: !1, security: !1, v8: "7.0.276.3\
|
|
8" }, { name: "nodejs", version: "11.15.0", date: "2019-04-30", lts: !1, security: !1, v8: "7.0.276.38" }, { name: "nodejs", version: "12.0.\
|
|
0", date: "2019-04-23", lts: !1, security: !1, v8: "7.4.288.21" }, { name: "nodejs", version: "12.1.0", date: "2019-04-29", lts: !1, security: !1,
|
|
v8: "7.4.288.21" }, { name: "nodejs", version: "12.2.0", date: "2019-05-07", lts: !1, security: !1, v8: "7.4.288.21" }, { name: "nodejs", version: "\
|
|
12.3.0", date: "2019-05-21", lts: !1, security: !1, v8: "7.4.288.27" }, { name: "nodejs", version: "12.4.0", date: "2019-06-04", lts: !1, security: !1,
|
|
v8: "7.4.288.27" }, { name: "nodejs", version: "12.5.0", date: "2019-06-26", lts: !1, security: !1, v8: "7.5.288.22" }, { name: "nodejs", version: "\
|
|
12.6.0", date: "2019-07-03", lts: !1, security: !1, v8: "7.5.288.22" }, { name: "nodejs", version: "12.7.0", date: "2019-07-23", lts: !1, security: !1,
|
|
v8: "7.5.288.22" }, { name: "nodejs", version: "12.8.0", date: "2019-08-06", lts: !1, security: !1, v8: "7.5.288.22" }, { name: "nodejs", version: "\
|
|
12.9.0", date: "2019-08-20", lts: !1, security: !1, v8: "7.6.303.29" }, { name: "nodejs", version: "12.10.0", date: "2019-09-04", lts: !1, security: !1,
|
|
v8: "7.6.303.29" }, { name: "nodejs", version: "12.11.0", date: "2019-09-25", lts: !1, security: !1, v8: "7.7.299.11" }, { name: "nodejs",
|
|
version: "12.12.0", date: "2019-10-11", lts: !1, security: !1, v8: "7.7.299.13" }, { name: "nodejs", version: "12.13.0", date: "2019-10-21",
|
|
lts: "Erbium", security: !1, v8: "7.7.299.13" }, { name: "nodejs", version: "12.14.0", date: "2019-12-17", lts: "Erbium", security: !0, v8: "\
|
|
7.7.299.13" }, { name: "nodejs", version: "12.15.0", date: "2020-02-05", lts: "Erbium", security: !0, v8: "7.7.299.13" }, { name: "nodejs", version: "\
|
|
12.16.0", date: "2020-02-11", lts: "Erbium", security: !1, v8: "7.8.279.23" }, { name: "nodejs", version: "12.17.0", date: "2020-05-26", lts: "\
|
|
Erbium", security: !1, v8: "7.8.279.23" }, { name: "nodejs", version: "12.18.0", date: "2020-06-02", lts: "Erbium", security: !0, v8: "7.8.2\
|
|
79.23" }, { name: "nodejs", version: "12.19.0", date: "2020-10-06", lts: "Erbium", security: !1, v8: "7.8.279.23" }, { name: "nodejs", version: "\
|
|
12.20.0", date: "2020-11-24", lts: "Erbium", security: !1, v8: "7.8.279.23" }, { name: "nodejs", version: "12.21.0", date: "2021-02-23", lts: "\
|
|
Erbium", security: !0, v8: "7.8.279.23" }, { name: "nodejs", version: "12.22.0", date: "2021-03-30", lts: "Erbium", security: !1, v8: "7.8.2\
|
|
79.23" }, { name: "nodejs", version: "13.0.0", date: "2019-10-22", lts: !1, security: !1, v8: "7.8.279.17" }, { name: "nodejs", version: "13\
|
|
.1.0", date: "2019-11-05", lts: !1, security: !1, v8: "7.8.279.17" }, { name: "nodejs", version: "13.2.0", date: "2019-11-21", lts: !1, security: !1,
|
|
v8: "7.9.317.23" }, { name: "nodejs", version: "13.3.0", date: "2019-12-03", lts: !1, security: !1, v8: "7.9.317.25" }, { name: "nodejs", version: "\
|
|
13.4.0", date: "2019-12-17", lts: !1, security: !0, v8: "7.9.317.25" }, { name: "nodejs", version: "13.5.0", date: "2019-12-18", lts: !1, security: !1,
|
|
v8: "7.9.317.25" }, { name: "nodejs", version: "13.6.0", date: "2020-01-07", lts: !1, security: !1, v8: "7.9.317.25" }, { name: "nodejs", version: "\
|
|
13.7.0", date: "2020-01-21", lts: !1, security: !1, v8: "7.9.317.25" }, { name: "nodejs", version: "13.8.0", date: "2020-02-05", lts: !1, security: !0,
|
|
v8: "7.9.317.25" }, { name: "nodejs", version: "13.9.0", date: "2020-02-18", lts: !1, security: !1, v8: "7.9.317.25" }, { name: "nodejs", version: "\
|
|
13.10.0", date: "2020-03-04", lts: !1, security: !1, v8: "7.9.317.25" }, { name: "nodejs", version: "13.11.0", date: "2020-03-12", lts: !1, security: !1,
|
|
v8: "7.9.317.25" }, { name: "nodejs", version: "13.12.0", date: "2020-03-26", lts: !1, security: !1, v8: "7.9.317.25" }, { name: "nodejs",
|
|
version: "13.13.0", date: "2020-04-14", lts: !1, security: !1, v8: "7.9.317.25" }, { name: "nodejs", version: "13.14.0", date: "2020-04-29",
|
|
lts: !1, security: !1, v8: "7.9.317.25" }, { name: "nodejs", version: "14.0.0", date: "2020-04-21", lts: !1, security: !1, v8: "8.1.307.30" },
|
|
{ name: "nodejs", version: "14.1.0", date: "2020-04-29", lts: !1, security: !1, v8: "8.1.307.31" }, { name: "nodejs", version: "14.2.0", date: "\
|
|
2020-05-05", lts: !1, security: !1, v8: "8.1.307.31" }, { name: "nodejs", version: "14.3.0", date: "2020-05-19", lts: !1, security: !1, v8: "\
|
|
8.1.307.31" }, { name: "nodejs", version: "14.4.0", date: "2020-06-02", lts: !1, security: !0, v8: "8.1.307.31" }, { name: "nodejs", version: "\
|
|
14.5.0", date: "2020-06-30", lts: !1, security: !1, v8: "8.3.110.9" }, { name: "nodejs", version: "14.6.0", date: "2020-07-20", lts: !1, security: !1,
|
|
v8: "8.4.371.19" }, { name: "nodejs", version: "14.7.0", date: "2020-07-29", lts: !1, security: !1, v8: "8.4.371.19" }, { name: "nodejs", version: "\
|
|
14.8.0", date: "2020-08-11", lts: !1, security: !1, v8: "8.4.371.19" }, { name: "nodejs", version: "14.9.0", date: "2020-08-27", lts: !1, security: !1,
|
|
v8: "8.4.371.19" }, { name: "nodejs", version: "14.10.0", date: "2020-09-08", lts: !1, security: !1, v8: "8.4.371.19" }, { name: "nodejs",
|
|
version: "14.11.0", date: "2020-09-15", lts: !1, security: !0, v8: "8.4.371.19" }, { name: "nodejs", version: "14.12.0", date: "2020-09-22",
|
|
lts: !1, security: !1, v8: "8.4.371.19" }, { name: "nodejs", version: "14.13.0", date: "2020-09-29", lts: !1, security: !1, v8: "8.4.371.1\
|
|
9" }, { name: "nodejs", version: "14.14.0", date: "2020-10-15", lts: !1, security: !1, v8: "8.4.371.19" }, { name: "nodejs", version: "14.15\
|
|
.0", date: "2020-10-27", lts: "Fermium", security: !1, v8: "8.4.371.19" }, { name: "nodejs", version: "14.16.0", date: "2021-02-23", lts: "F\
|
|
ermium", security: !0, v8: "8.4.371.19" }, { name: "nodejs", version: "14.17.0", date: "2021-05-11", lts: "Fermium", security: !1, v8: "8.4.\
|
|
371.23" }, { name: "nodejs", version: "14.18.0", date: "2021-09-28", lts: "Fermium", security: !1, v8: "8.4.371.23" }, { name: "nodejs", version: "\
|
|
14.19.0", date: "2022-02-01", lts: "Fermium", security: !1, v8: "8.4.371.23" }, { name: "nodejs", version: "14.20.0", date: "2022-07-07", lts: "\
|
|
Fermium", security: !0, v8: "8.4.371.23" }, { name: "nodejs", version: "14.21.0", date: "2022-11-01", lts: "Fermium", security: !1, v8: "8.4\
|
|
.371.23" }, { name: "nodejs", version: "15.0.0", date: "2020-10-20", lts: !1, security: !1, v8: "8.6.395.16" }, { name: "nodejs", version: "\
|
|
15.1.0", date: "2020-11-04", lts: !1, security: !1, v8: "8.6.395.17" }, { name: "nodejs", version: "15.2.0", date: "2020-11-10", lts: !1, security: !1,
|
|
v8: "8.6.395.17" }, { name: "nodejs", version: "15.3.0", date: "2020-11-24", lts: !1, security: !1, v8: "8.6.395.17" }, { name: "nodejs", version: "\
|
|
15.4.0", date: "2020-12-09", lts: !1, security: !1, v8: "8.6.395.17" }, { name: "nodejs", version: "15.5.0", date: "2020-12-22", lts: !1, security: !1,
|
|
v8: "8.6.395.17" }, { name: "nodejs", version: "15.6.0", date: "2021-01-14", lts: !1, security: !1, v8: "8.6.395.17" }, { name: "nodejs", version: "\
|
|
15.7.0", date: "2021-01-25", lts: !1, security: !1, v8: "8.6.395.17" }, { name: "nodejs", version: "15.8.0", date: "2021-02-02", lts: !1, security: !1,
|
|
v8: "8.6.395.17" }, { name: "nodejs", version: "15.9.0", date: "2021-02-18", lts: !1, security: !1, v8: "8.6.395.17" }, { name: "nodejs", version: "\
|
|
15.10.0", date: "2021-02-23", lts: !1, security: !0, v8: "8.6.395.17" }, { name: "nodejs", version: "15.11.0", date: "2021-03-03", lts: !1, security: !1,
|
|
v8: "8.6.395.17" }, { name: "nodejs", version: "15.12.0", date: "2021-03-17", lts: !1, security: !1, v8: "8.6.395.17" }, { name: "nodejs",
|
|
version: "15.13.0", date: "2021-03-31", lts: !1, security: !1, v8: "8.6.395.17" }, { name: "nodejs", version: "15.14.0", date: "2021-04-06",
|
|
lts: !1, security: !1, v8: "8.6.395.17" }, { name: "nodejs", version: "16.0.0", date: "2021-04-20", lts: !1, security: !1, v8: "9.0.257.17" },
|
|
{ name: "nodejs", version: "16.1.0", date: "2021-05-04", lts: !1, security: !1, v8: "9.0.257.24" }, { name: "nodejs", version: "16.2.0", date: "\
|
|
2021-05-19", lts: !1, security: !1, v8: "9.0.257.25" }, { name: "nodejs", version: "16.3.0", date: "2021-06-03", lts: !1, security: !1, v8: "\
|
|
9.0.257.25" }, { name: "nodejs", version: "16.4.0", date: "2021-06-23", lts: !1, security: !1, v8: "9.1.269.36" }, { name: "nodejs", version: "\
|
|
16.5.0", date: "2021-07-14", lts: !1, security: !1, v8: "9.1.269.38" }, { name: "nodejs", version: "16.6.0", date: "2021-07-29", lts: !1, security: !0,
|
|
v8: "9.2.230.21" }, { name: "nodejs", version: "16.7.0", date: "2021-08-18", lts: !1, security: !1, v8: "9.2.230.21" }, { name: "nodejs", version: "\
|
|
16.8.0", date: "2021-08-25", lts: !1, security: !1, v8: "9.2.230.21" }, { name: "nodejs", version: "16.9.0", date: "2021-09-07", lts: !1, security: !1,
|
|
v8: "9.3.345.16" }, { name: "nodejs", version: "16.10.0", date: "2021-09-22", lts: !1, security: !1, v8: "9.3.345.19" }, { name: "nodejs",
|
|
version: "16.11.0", date: "2021-10-08", lts: !1, security: !1, v8: "9.4.146.19" }, { name: "nodejs", version: "16.12.0", date: "2021-10-20",
|
|
lts: !1, security: !1, v8: "9.4.146.19" }, { name: "nodejs", version: "16.13.0", date: "2021-10-26", lts: "Gallium", security: !1, v8: "9.\
|
|
4.146.19" }, { name: "nodejs", version: "16.14.0", date: "2022-02-08", lts: "Gallium", security: !1, v8: "9.4.146.24" }, { name: "nodejs", version: "\
|
|
16.15.0", date: "2022-04-26", lts: "Gallium", security: !1, v8: "9.4.146.24" }, { name: "nodejs", version: "16.16.0", date: "2022-07-07", lts: "\
|
|
Gallium", security: !0, v8: "9.4.146.24" }, { name: "nodejs", version: "16.17.0", date: "2022-08-16", lts: "Gallium", security: !1, v8: "9.4\
|
|
.146.26" }, { name: "nodejs", version: "16.18.0", date: "2022-10-12", lts: "Gallium", security: !1, v8: "9.4.146.26" }, { name: "nodejs", version: "\
|
|
16.19.0", date: "2022-12-13", lts: "Gallium", security: !1, v8: "9.4.146.26" }, { name: "nodejs", version: "16.20.0", date: "2023-03-28", lts: "\
|
|
Gallium", security: !1, v8: "9.4.146.26" }, { name: "nodejs", version: "17.0.0", date: "2021-10-19", lts: !1, security: !1, v8: "9.5.172.21" },
|
|
{ name: "nodejs", version: "17.1.0", date: "2021-11-09", lts: !1, security: !1, v8: "9.5.172.25" }, { name: "nodejs", version: "17.2.0", date: "\
|
|
2021-11-30", lts: !1, security: !1, v8: "9.6.180.14" }, { name: "nodejs", version: "17.3.0", date: "2021-12-17", lts: !1, security: !1, v8: "\
|
|
9.6.180.15" }, { name: "nodejs", version: "17.4.0", date: "2022-01-18", lts: !1, security: !1, v8: "9.6.180.15" }, { name: "nodejs", version: "\
|
|
17.5.0", date: "2022-02-10", lts: !1, security: !1, v8: "9.6.180.15" }, { name: "nodejs", version: "17.6.0", date: "2022-02-22", lts: !1, security: !1,
|
|
v8: "9.6.180.15" }, { name: "nodejs", version: "17.7.0", date: "2022-03-09", lts: !1, security: !1, v8: "9.6.180.15" }, { name: "nodejs", version: "\
|
|
17.8.0", date: "2022-03-22", lts: !1, security: !1, v8: "9.6.180.15" }, { name: "nodejs", version: "17.9.0", date: "2022-04-07", lts: !1, security: !1,
|
|
v8: "9.6.180.15" }, { name: "nodejs", version: "18.0.0", date: "2022-04-18", lts: !1, security: !1, v8: "10.1.124.8" }, { name: "nodejs", version: "\
|
|
18.1.0", date: "2022-05-03", lts: !1, security: !1, v8: "10.1.124.8" }, { name: "nodejs", version: "18.2.0", date: "2022-05-17", lts: !1, security: !1,
|
|
v8: "10.1.124.8" }, { name: "nodejs", version: "18.3.0", date: "2022-06-02", lts: !1, security: !1, v8: "10.2.154.4" }, { name: "nodejs", version: "\
|
|
18.4.0", date: "2022-06-16", lts: !1, security: !1, v8: "10.2.154.4" }, { name: "nodejs", version: "18.5.0", date: "2022-07-06", lts: !1, security: !0,
|
|
v8: "10.2.154.4" }, { name: "nodejs", version: "18.6.0", date: "2022-07-13", lts: !1, security: !1, v8: "10.2.154.13" }, { name: "nodejs",
|
|
version: "18.7.0", date: "2022-07-26", lts: !1, security: !1, v8: "10.2.154.13" }, { name: "nodejs", version: "18.8.0", date: "2022-08-24",
|
|
lts: !1, security: !1, v8: "10.2.154.13" }, { name: "nodejs", version: "18.9.0", date: "2022-09-07", lts: !1, security: !1, v8: "10.2.154.\
|
|
15" }, { name: "nodejs", version: "18.10.0", date: "2022-09-28", lts: !1, security: !1, v8: "10.2.154.15" }, { name: "nodejs", version: "18.\
|
|
11.0", date: "2022-10-13", lts: !1, security: !1, v8: "10.2.154.15" }, { name: "nodejs", version: "18.12.0", date: "2022-10-25", lts: "Hydro\
|
|
gen", security: !1, v8: "10.2.154.15" }, { name: "nodejs", version: "18.13.0", date: "2023-01-05", lts: "Hydrogen", security: !1, v8: "10.2.\
|
|
154.23" }, { name: "nodejs", version: "18.14.0", date: "2023-02-01", lts: "Hydrogen", security: !1, v8: "10.2.154.23" }, { name: "nodejs", version: "\
|
|
18.15.0", date: "2023-03-05", lts: "Hydrogen", security: !1, v8: "10.2.154.26" }, { name: "nodejs", version: "18.16.0", date: "2023-04-12", lts: "\
|
|
Hydrogen", security: !1, v8: "10.2.154.26" }, { name: "nodejs", version: "18.17.0", date: "2023-07-18", lts: "Hydrogen", security: !1, v8: "\
|
|
10.2.154.26" }, { name: "nodejs", version: "18.18.0", date: "2023-09-18", lts: "Hydrogen", security: !1, v8: "10.2.154.26" }, { name: "nodej\
|
|
s", version: "18.19.0", date: "2023-11-29", lts: "Hydrogen", security: !1, v8: "10.2.154.26" }, { name: "nodejs", version: "18.20.0", date: "\
|
|
2024-03-26", lts: "Hydrogen", security: !1, v8: "10.2.154.26" }, { name: "nodejs", version: "19.0.0", date: "2022-10-17", lts: !1, security: !1,
|
|
v8: "10.7.193.13" }, { name: "nodejs", version: "19.1.0", date: "2022-11-14", lts: !1, security: !1, v8: "10.7.193.20" }, { name: "nodejs",
|
|
version: "19.2.0", date: "2022-11-29", lts: !1, security: !1, v8: "10.8.168.20" }, { name: "nodejs", version: "19.3.0", date: "2022-12-14",
|
|
lts: !1, security: !1, v8: "10.8.168.21" }, { name: "nodejs", version: "19.4.0", date: "2023-01-05", lts: !1, security: !1, v8: "10.8.168.\
|
|
25" }, { name: "nodejs", version: "19.5.0", date: "2023-01-24", lts: !1, security: !1, v8: "10.8.168.25" }, { name: "nodejs", version: "19.6\
|
|
.0", date: "2023-02-01", lts: !1, security: !1, v8: "10.8.168.25" }, { name: "nodejs", version: "19.7.0", date: "2023-02-21", lts: !1, security: !1,
|
|
v8: "10.8.168.25" }, { name: "nodejs", version: "19.8.0", date: "2023-03-14", lts: !1, security: !1, v8: "10.8.168.25" }, { name: "nodejs",
|
|
version: "19.9.0", date: "2023-04-10", lts: !1, security: !1, v8: "10.8.168.25" }, { name: "nodejs", version: "20.0.0", date: "2023-04-17",
|
|
lts: !1, security: !1, v8: "11.3.244.4" }, { name: "nodejs", version: "20.1.0", date: "2023-05-03", lts: !1, security: !1, v8: "11.3.244.8" },
|
|
{ name: "nodejs", version: "20.2.0", date: "2023-05-16", lts: !1, security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "20.3.0", date: "\
|
|
2023-06-08", lts: !1, security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "20.4.0", date: "2023-07-04", lts: !1, security: !1, v8: "\
|
|
11.3.244.8" }, { name: "nodejs", version: "20.5.0", date: "2023-07-19", lts: !1, security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "\
|
|
20.6.0", date: "2023-08-23", lts: !1, security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "20.7.0", date: "2023-09-18", lts: !1, security: !1,
|
|
v8: "11.3.244.8" }, { name: "nodejs", version: "20.8.0", date: "2023-09-28", lts: !1, security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "\
|
|
20.9.0", date: "2023-10-24", lts: "Iron", security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "20.10.0", date: "2023-11-22", lts: "\
|
|
Iron", security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "20.11.0", date: "2024-01-09", lts: "Iron", security: !1, v8: "11.3.244.\
|
|
8" }, { name: "nodejs", version: "20.12.0", date: "2024-03-26", lts: "Iron", security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "2\
|
|
0.13.0", date: "2024-05-07", lts: "Iron", security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "20.14.0", date: "2024-05-28", lts: "\
|
|
Iron", security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "20.15.0", date: "2024-06-20", lts: "Iron", security: !1, v8: "11.3.244.\
|
|
8" }, { name: "nodejs", version: "20.16.0", date: "2024-07-24", lts: "Iron", security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "2\
|
|
0.17.0", date: "2024-08-21", lts: "Iron", security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "20.18.0", date: "2024-10-03", lts: "\
|
|
Iron", security: !1, v8: "11.3.244.8" }, { name: "nodejs", version: "21.0.0", date: "2023-10-17", lts: !1, security: !1, v8: "11.8.172.13" },
|
|
{ name: "nodejs", version: "21.1.0", date: "2023-10-24", lts: !1, security: !1, v8: "11.8.172.15" }, { name: "nodejs", version: "21.2.0", date: "\
|
|
2023-11-14", lts: !1, security: !1, v8: "11.8.172.17" }, { name: "nodejs", version: "21.3.0", date: "2023-11-30", lts: !1, security: !1, v8: "\
|
|
11.8.172.17" }, { name: "nodejs", version: "21.4.0", date: "2023-12-05", lts: !1, security: !1, v8: "11.8.172.17" }, { name: "nodejs", version: "\
|
|
21.5.0", date: "2023-12-19", lts: !1, security: !1, v8: "11.8.172.17" }, { name: "nodejs", version: "21.6.0", date: "2024-01-14", lts: !1, security: !1,
|
|
v8: "11.8.172.17" }, { name: "nodejs", version: "21.7.0", date: "2024-03-06", lts: !1, security: !1, v8: "11.8.172.17" }, { name: "nodejs",
|
|
version: "22.0.0", date: "2024-04-24", lts: !1, security: !1, v8: "12.4.254.14" }, { name: "nodejs", version: "22.1.0", date: "2024-05-02",
|
|
lts: !1, security: !1, v8: "12.4.254.14" }, { name: "nodejs", version: "22.2.0", date: "2024-05-15", lts: !1, security: !1, v8: "12.4.254.\
|
|
14" }, { name: "nodejs", version: "22.3.0", date: "2024-06-11", lts: !1, security: !1, v8: "12.4.254.20" }, { name: "nodejs", version: "22.4\
|
|
.0", date: "2024-07-02", lts: !1, security: !1, v8: "12.4.254.21" }, { name: "nodejs", version: "22.5.0", date: "2024-07-17", lts: !1, security: !1,
|
|
v8: "12.4.254.21" }, { name: "nodejs", version: "22.6.0", date: "2024-08-06", lts: !1, security: !1, v8: "12.4.254.21" }, { name: "nodejs",
|
|
version: "22.7.0", date: "2024-08-21", lts: !1, security: !1, v8: "12.4.254.21" }, { name: "nodejs", version: "22.8.0", date: "2024-09-03",
|
|
lts: !1, security: !1, v8: "12.4.254.21" }, { name: "nodejs", version: "22.9.0", date: "2024-09-17", lts: !1, security: !1, v8: "12.4.254.\
|
|
21" }, { name: "nodejs", version: "22.10.0", date: "2024-10-16", lts: !1, security: !1, v8: "12.4.254.21" }, { name: "nodejs", version: "22.\
|
|
11.0", date: "2024-10-29", lts: "Jod", security: !1, v8: "12.4.254.21" }, { name: "nodejs", version: "22.12.0", date: "2024-12-02", lts: "Jo\
|
|
d", security: !1, v8: "12.4.254.21" }, { name: "nodejs", version: "23.0.0", date: "2024-10-16", lts: !1, security: !1, v8: "12.9.202.26" }, {
|
|
name: "nodejs", version: "23.1.0", date: "2024-10-24", lts: !1, security: !1, v8: "12.9.202.28" }, { name: "nodejs", version: "23.2.0", date: "\
|
|
2024-11-11", lts: !1, security: !1, v8: "12.9.202.28" }, { name: "nodejs", version: "23.3.0", date: "2024-11-20", lts: !1, security: !1, v8: "\
|
|
12.9.202.28" }];
|
|
});
|
|
|
|
// ../node_modules/caniuse-lite/data/browsers.js
|
|
var ZW = E((Uht, YW) => {
|
|
YW.exports = { A: "ie", B: "edge", C: "firefox", D: "chrome", E: "safari", F: "opera", G: "ios_saf", H: "op_mini", I: "android", J: "bb", K: "\
|
|
op_mob", L: "and_chr", M: "and_ff", N: "ie_mob", O: "and_uc", P: "samsung", Q: "and_qq", R: "baidu", S: "kaios" };
|
|
});
|
|
|
|
// ../node_modules/caniuse-lite/dist/unpacker/browsers.js
|
|
var ng = E((Wht, QW) => {
|
|
QW.exports.browsers = ZW();
|
|
});
|
|
|
|
// ../node_modules/caniuse-lite/data/browserVersions.js
|
|
var t$ = E(($ht, e$) => {
|
|
e$.exports = { 0: "117", 1: "20", 2: "21", 3: "22", 4: "23", 5: "24", 6: "25", 7: "26", 8: "27", 9: "118", A: "10", B: "11", C: "12", D: "\
|
|
7", E: "8", F: "9", G: "15", H: "80", I: "135", J: "4", K: "6", L: "13", M: "14", N: "16", O: "17", P: "18", Q: "79", R: "81", S: "83", T: "\
|
|
84", U: "85", V: "86", W: "87", X: "88", Y: "89", Z: "90", a: "91", b: "92", c: "93", d: "94", e: "95", f: "96", g: "97", h: "98", i: "99", j: "\
|
|
100", k: "101", l: "102", m: "103", n: "104", o: "105", p: "106", q: "107", r: "108", s: "109", t: "110", u: "111", v: "112", w: "113", x: "\
|
|
114", y: "115", z: "116", AB: "119", BB: "120", CB: "121", DB: "122", EB: "123", FB: "124", GB: "125", HB: "126", IB: "127", JB: "128", KB: "\
|
|
129", LB: "130", MB: "131", NB: "132", OB: "133", PB: "134", QB: "5", RB: "19", SB: "28", TB: "29", UB: "30", VB: "31", WB: "32", XB: "33", YB: "\
|
|
34", ZB: "35", aB: "36", bB: "37", cB: "38", dB: "39", eB: "40", fB: "41", gB: "42", hB: "43", iB: "44", jB: "45", kB: "46", lB: "47", mB: "\
|
|
48", nB: "49", oB: "50", pB: "51", qB: "52", rB: "53", sB: "54", tB: "55", uB: "56", vB: "57", wB: "58", xB: "60", yB: "62", zB: "63", "0B": "\
|
|
64", "1B": "65", "2B": "66", "3B": "67", "4B": "68", "5B": "69", "6B": "70", "7B": "71", "8B": "72", "9B": "73", AC: "74", BC: "75", CC: "76",
|
|
DC: "77", EC: "78", FC: "137", GC: "11.1", HC: "12.1", IC: "15.5", JC: "16.0", KC: "17.0", LC: "18.0", MC: "3", NC: "59", OC: "61", PC: "8\
|
|
2", QC: "136", RC: "138", SC: "3.2", TC: "10.1", UC: "15.2-15.3", VC: "15.4", WC: "16.1", XC: "16.2", YC: "16.3", ZC: "16.4", aC: "16.5", bC: "\
|
|
17.1", cC: "17.2", dC: "17.3", eC: "17.4", fC: "17.5", gC: "18.1", hC: "18.2", iC: "18.3", jC: "18.4", kC: "18.5", lC: "11.5", mC: "4.2-4.3",
|
|
nC: "5.5", oC: "2", pC: "139", qC: "140", rC: "3.5", sC: "3.6", tC: "3.1", uC: "5.1", vC: "6.1", wC: "7.1", xC: "9.1", yC: "13.1", zC: "14\
|
|
.1", "0C": "15.1", "1C": "15.6", "2C": "16.6", "3C": "17.6", "4C": "TP", "5C": "9.5-9.6", "6C": "10.0-10.1", "7C": "10.5", "8C": "10.6", "9C": "\
|
|
11.6", AD: "4.0-4.1", BD: "5.0-5.1", CD: "6.0-6.1", DD: "7.0-7.1", ED: "8.1-8.4", FD: "9.0-9.2", GD: "9.3", HD: "10.0-10.2", ID: "10.3", JD: "\
|
|
11.0-11.2", KD: "11.3-11.4", LD: "12.0-12.1", MD: "12.2-12.5", ND: "13.0-13.1", OD: "13.2", PD: "13.3", QD: "13.4-13.7", RD: "14.0-14.4", SD: "\
|
|
14.5-14.8", TD: "15.0-15.1", UD: "15.6-15.8", VD: "16.6-16.7", WD: "17.6-17.7", XD: "all", YD: "2.1", ZD: "2.2", aD: "2.3", bD: "4.1", cD: "\
|
|
4.4", dD: "4.4.3-4.4.4", eD: "5.0-5.4", fD: "6.2-6.4", gD: "7.2-7.4", hD: "8.2", iD: "9.2", jD: "11.1-11.2", kD: "12.0", lD: "13.0", mD: "14\
|
|
.0", nD: "15.0", oD: "19.0", pD: "14.9", qD: "13.52", rD: "2.5", sD: "3.0-3.1" };
|
|
});
|
|
|
|
// ../node_modules/caniuse-lite/dist/unpacker/browserVersions.js
|
|
var kA = E((Vht, r$) => {
|
|
r$.exports.browserVersions = t$();
|
|
});
|
|
|
|
// ../node_modules/caniuse-lite/data/agents.js
|
|
var n$ = E((Hht, i$) => {
|
|
i$.exports = { A: { A: { K: 0, D: 0, E: 0, F: 0.0324821, A: 0, B: 0.438508, nC: 0 }, B: "ms", C: ["", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "nC", "K", "D", "E", "F", "A", "B", "", "", ""], E: "IE", F: { nC: 962323200, K: 998870400,
|
|
D: 1161129600, E: 1237420800, F: 1300060800, A: 1346716800, B: 1381968e3 } }, B: { A: { 0: 3623e-6, 9: 3623e-6, C: 0, L: 0, M: 0, G: 0, N: 0,
|
|
O: 0, P: 0.097821, Q: 0, H: 0, R: 0, S: 0, T: 0, U: 0, V: 0, W: 0, X: 0, Y: 0, Z: 0, a: 0, b: 0.010869, c: 0, d: 0, e: 0, f: 0, g: 0, h: 0,
|
|
i: 0, j: 0, k: 0, l: 0, m: 0, n: 0, o: 0, p: 0, q: 0, r: 3623e-6, s: 0.047099, t: 0, u: 0, v: 0, w: 7246e-6, x: 0.014492, y: 7246e-6, z: 0,
|
|
AB: 3623e-6, BB: 0.03623, CB: 7246e-6, DB: 0.014492, EB: 7246e-6, FB: 7246e-6, GB: 7246e-6, HB: 0.021738, IB: 0.014492, JB: 0.014492, KB: 0.014492,
|
|
LB: 0.025361, MB: 0.065214, NB: 0.079706, OB: 1.34051, PB: 3.0252, I: 0 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "C", "L", "M", "G", "N", "\
|
|
O", "P", "Q", "H", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "\
|
|
p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "9", "AB", "BB", "CB", "DB", "EB", "FB", "GB", "HB", "IB", "JB", "KB", "LB", "MB",
|
|
"NB", "OB", "PB", "I", "", "", ""], E: "Edge", F: { 0: 1694649600, 9: 1697155200, C: 1438128e3, L: 1447286400, M: 1470096e3, G: 1491868800,
|
|
N: 1508198400, O: 1525046400, P: 1542067200, Q: 1579046400, H: 1581033600, R: 1586736e3, S: 1590019200, T: 1594857600, U: 1598486400, V: 1602201600,
|
|
W: 1605830400, X: 161136e4, Y: 1614816e3, Z: 1618358400, a: 1622073600, b: 1626912e3, c: 1630627200, d: 1632441600, e: 1634774400, f: 1637539200,
|
|
g: 1641427200, h: 1643932800, i: 1646265600, j: 1649635200, k: 1651190400, l: 1653955200, m: 1655942400, n: 1659657600, o: 1661990400, p: 1664755200,
|
|
q: 1666915200, r: 1670198400, s: 1673481600, t: 1675900800, u: 1678665600, v: 1680825600, w: 1683158400, x: 1685664e3, y: 1689897600, z: 1692576e3,
|
|
AB: 1698969600, BB: 1701993600, CB: 1706227200, DB: 1708732800, EB: 1711152e3, FB: 1713398400, GB: 1715990400, HB: 1718841600, IB: 1721865600,
|
|
JB: 1724371200, KB: 1726704e3, LB: 1729123200, MB: 1731542400, NB: 1737417600, OB: 1740614400, PB: 1741219200, I: 1743984e3 }, D: { C: "ms",
|
|
L: "ms", M: "ms", G: "ms", N: "ms", O: "ms", P: "ms" } }, C: { A: { 0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0.094198, oC: 7246e-6,
|
|
MC: 0, J: 0, QB: 0, K: 0, D: 0, E: 0, F: 0, A: 0, B: 0.025361, C: 0, L: 0, M: 0, G: 0, N: 0, O: 0, P: 0, RB: 0, SB: 0, TB: 0, UB: 0, VB: 0,
|
|
WB: 0, XB: 0, YB: 0, ZB: 0, aB: 0, bB: 0, cB: 0, dB: 0, eB: 0, fB: 0, gB: 0, hB: 0, iB: 3623e-6, jB: 0, kB: 0, lB: 0, mB: 0, nB: 0, oB: 0,
|
|
pB: 0, qB: 0.028984, rB: 0.014492, sB: 0, tB: 7246e-6, uB: 7246e-6, vB: 0, wB: 0, NC: 7246e-6, xB: 0, OC: 0, yB: 0, zB: 0, "0B": 0, "1B": 0,
|
|
"2B": 0, "3B": 0, "4B": 0, "5B": 0, "6B": 0, "7B": 0, "8B": 3623e-6, "9B": 0, AC: 0, BC: 0, CC: 0, DC: 0, EC: 0.010869, Q: 0, H: 0, R: 0, PC: 0,
|
|
S: 0, T: 0, U: 0, V: 0, W: 0, X: 7246e-6, Y: 0, Z: 0, a: 0, b: 0, c: 0, d: 3623e-6, e: 0, f: 0, g: 0, h: 0, i: 0, j: 0, k: 0, l: 0, m: 0, n: 0,
|
|
o: 0, p: 0, q: 0, r: 0, s: 3623e-6, t: 0, u: 0, v: 0, w: 3623e-6, x: 0, y: 0.213757, z: 0, AB: 0, BB: 3623e-6, CB: 0, DB: 0, EB: 0, FB: 0,
|
|
GB: 0.014492, HB: 0, IB: 7246e-6, JB: 0.083329, KB: 0, LB: 0, MB: 3623e-6, NB: 7246e-6, OB: 0.018115, PB: 0.025361, I: 0.347808, QC: 1.11951,
|
|
FC: 7246e-6, RC: 0, pC: 0, qC: 0, rC: 0, sC: 0 }, B: "moz", C: ["oC", "MC", "rC", "sC", "J", "QB", "K", "D", "E", "F", "A", "B", "C", "L",
|
|
"M", "G", "N", "O", "P", "RB", "1", "2", "3", "4", "5", "6", "7", "8", "SB", "TB", "UB", "VB", "WB", "XB", "YB", "ZB", "aB", "bB", "cB", "\
|
|
dB", "eB", "fB", "gB", "hB", "iB", "jB", "kB", "lB", "mB", "nB", "oB", "pB", "qB", "rB", "sB", "tB", "uB", "vB", "wB", "NC", "xB", "OC", "yB",
|
|
"zB", "0B", "1B", "2B", "3B", "4B", "5B", "6B", "7B", "8B", "9B", "AC", "BC", "CC", "DC", "EC", "Q", "H", "R", "PC", "S", "T", "U", "V", "\
|
|
W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "\
|
|
y", "z", "0", "9", "AB", "BB", "CB", "DB", "EB", "FB", "GB", "HB", "IB", "JB", "KB", "LB", "MB", "NB", "OB", "PB", "I", "QC", "FC", "RC", "p\
|
|
C", "qC"], E: "Firefox", F: { 0: 1693267200, 1: 1361232e3, 2: 1364860800, 3: 1368489600, 4: 1372118400, 5: 1375747200, 6: 1379376e3, 7: 1386633600,
|
|
8: 1391472e3, 9: 1695686400, oC: 1161648e3, MC: 1213660800, rC: 124632e4, sC: 1264032e3, J: 1300752e3, QB: 1308614400, K: 1313452800, D: 1317081600,
|
|
E: 1317081600, F: 1320710400, A: 1324339200, B: 1327968e3, C: 1331596800, L: 1335225600, M: 1338854400, G: 1342483200, N: 1346112e3, O: 1349740800,
|
|
P: 1353628800, RB: 1357603200, SB: 1395100800, TB: 1398729600, UB: 1402358400, VB: 1405987200, WB: 1409616e3, XB: 1413244800, YB: 1417392e3,
|
|
ZB: 1421107200, aB: 1424736e3, bB: 1428278400, cB: 1431475200, dB: 1435881600, eB: 1439251200, fB: 144288e4, gB: 1446508800, hB: 1450137600,
|
|
iB: 1453852800, jB: 1457395200, kB: 1461628800, lB: 1465257600, mB: 1470096e3, nB: 1474329600, oB: 1479168e3, pB: 1485216e3, qB: 1488844800,
|
|
rB: 149256e4, sB: 1497312e3, tB: 1502150400, uB: 1506556800, vB: 1510617600, wB: 1516665600, NC: 1520985600, xB: 1525824e3, OC: 1529971200,
|
|
yB: 1536105600, zB: 1540252800, "0B": 1544486400, "1B": 154872e4, "2B": 1552953600, "3B": 1558396800, "4B": 1562630400, "5B": 1567468800, "\
|
|
6B": 1571788800, "7B": 1575331200, "8B": 1578355200, "9B": 1581379200, AC: 1583798400, BC: 1586304e3, CC: 1588636800, DC: 1591056e3, EC: 1593475200,
|
|
Q: 1595894400, H: 1598313600, R: 1600732800, PC: 1603152e3, S: 1605571200, T: 1607990400, U: 1611619200, V: 1614038400, W: 1616457600, X: 1618790400,
|
|
Y: 1622505600, Z: 1626134400, a: 1628553600, b: 1630972800, c: 1633392e3, d: 1635811200, e: 1638835200, f: 1641859200, g: 1644364800, h: 1646697600,
|
|
i: 1649116800, j: 1651536e3, k: 1653955200, l: 1656374400, m: 1658793600, n: 1661212800, o: 1663632e3, p: 1666051200, q: 1668470400, r: 1670889600,
|
|
s: 1673913600, t: 1676332800, u: 1678752e3, v: 1681171200, w: 1683590400, x: 1686009600, y: 1688428800, z: 1690848e3, AB: 1698105600, BB: 1700524800,
|
|
CB: 1702944e3, DB: 1705968e3, EB: 1708387200, FB: 1710806400, GB: 1713225600, HB: 1715644800, IB: 1718064e3, JB: 1720483200, KB: 1722902400,
|
|
LB: 1725321600, MB: 1727740800, NB: 173016e4, OB: 1732579200, PB: 1736208e3, I: 1738627200, QC: 1741046400, FC: 1743465600, RC: null, pC: null,
|
|
qC: null } }, D: { A: { 0: 0.094198, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0.057968, J: 0, QB: 0, K: 0, D: 0, E: 0, F: 0, A: 0,
|
|
B: 0, C: 0, L: 0, M: 0, G: 0, N: 0, O: 0, P: 0, RB: 0, SB: 0, TB: 0, UB: 0, VB: 0, WB: 0, XB: 0, YB: 0, ZB: 0, aB: 0, bB: 0, cB: 3623e-6, dB: 7246e-6,
|
|
eB: 3623e-6, fB: 7246e-6, gB: 7246e-6, hB: 7246e-6, iB: 7246e-6, jB: 7246e-6, kB: 3623e-6, lB: 7246e-6, mB: 0.018115, nB: 0.018115, oB: 7246e-6,
|
|
pB: 7246e-6, qB: 0.010869, rB: 7246e-6, sB: 7246e-6, tB: 7246e-6, uB: 0.014492, vB: 7246e-6, wB: 0.010869, NC: 7246e-6, xB: 7246e-6, OC: 0,
|
|
yB: 0, zB: 0, "0B": 0, "1B": 0, "2B": 0.021738, "3B": 0, "4B": 0, "5B": 0.010869, "6B": 0.010869, "7B": 0, "8B": 0, "9B": 7246e-6, AC: 3623e-6,
|
|
BC: 7246e-6, CC: 3623e-6, DC: 0.014492, EC: 0.010869, Q: 0.068837, H: 0.010869, R: 0.014492, S: 0.028984, T: 3623e-6, U: 0.010869, V: 0.014492,
|
|
W: 0.057968, X: 0.014492, Y: 3623e-6, Z: 7246e-6, a: 0.03623, b: 0.010869, c: 0.014492, d: 0.028984, e: 7246e-6, f: 7246e-6, g: 0.018115, h: 0.03623,
|
|
i: 0.010869, j: 0.028984, k: 0.014492, l: 0.014492, m: 0.076083, n: 0.050722, o: 0.010869, p: 0.021738, q: 0.025361, r: 0.039853, s: 0.912996,
|
|
t: 0.018115, u: 0.03623, v: 0.03623, w: 0.10869, x: 0.054345, y: 0.032607, z: 0.101444, AB: 0.03623, BB: 0.086952, CB: 0.094198, DB: 0.076083,
|
|
EB: 0.086952, FB: 0.123182, GB: 0.344185, HB: 0.152166, IB: 0.101444, JB: 0.130428, KB: 0.101444, LB: 0.152166, MB: 1.17747, NB: 0.815175,
|
|
OB: 5.89462, PB: 9.91615, I: 0.021738, QC: 0.014492, FC: 0, RC: 0 }, B: "webkit", C: ["", "", "", "", "", "", "", "J", "QB", "K", "D", "E",
|
|
"F", "A", "B", "C", "L", "M", "G", "N", "O", "P", "RB", "1", "2", "3", "4", "5", "6", "7", "8", "SB", "TB", "UB", "VB", "WB", "XB", "YB", "\
|
|
ZB", "aB", "bB", "cB", "dB", "eB", "fB", "gB", "hB", "iB", "jB", "kB", "lB", "mB", "nB", "oB", "pB", "qB", "rB", "sB", "tB", "uB", "vB", "wB",
|
|
"NC", "xB", "OC", "yB", "zB", "0B", "1B", "2B", "3B", "4B", "5B", "6B", "7B", "8B", "9B", "AC", "BC", "CC", "DC", "EC", "Q", "H", "R", "S",
|
|
"T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u",
|
|
"v", "w", "x", "y", "z", "0", "9", "AB", "BB", "CB", "DB", "EB", "FB", "GB", "HB", "IB", "JB", "KB", "LB", "MB", "NB", "OB", "PB", "I", "Q\
|
|
C", "FC", "RC"], E: "Chrome", F: { 0: 1694476800, 1: 133704e4, 2: 1340668800, 3: 1343692800, 4: 1348531200, 5: 1352246400, 6: 1357862400, 7: 1361404800,
|
|
8: 1364428800, 9: 1696896e3, J: 1264377600, QB: 1274745600, K: 1283385600, D: 1287619200, E: 1291248e3, F: 1296777600, A: 1299542400, B: 1303862400,
|
|
C: 1307404800, L: 1312243200, M: 1316131200, G: 1316131200, N: 1319500800, O: 1323734400, P: 1328659200, RB: 1332892800, SB: 1369094400, TB: 1374105600,
|
|
UB: 1376956800, VB: 1384214400, WB: 1389657600, XB: 1392940800, YB: 1397001600, ZB: 1400544e3, aB: 1405468800, bB: 1409011200, cB: 141264e4,
|
|
dB: 1416268800, eB: 1421798400, fB: 1425513600, gB: 1429401600, hB: 143208e4, iB: 1437523200, jB: 1441152e3, kB: 1444780800, lB: 1449014400,
|
|
mB: 1453248e3, nB: 1456963200, oB: 1460592e3, pB: 1464134400, qB: 1469059200, rB: 1472601600, sB: 1476230400, tB: 1480550400, uB: 1485302400,
|
|
vB: 1489017600, wB: 149256e4, NC: 1496707200, xB: 1500940800, OC: 1504569600, yB: 1508198400, zB: 1512518400, "0B": 1516752e3, "1B": 1520294400,
|
|
"2B": 1523923200, "3B": 1527552e3, "4B": 1532390400, "5B": 1536019200, "6B": 1539648e3, "7B": 1543968e3, "8B": 154872e4, "9B": 1552348800,
|
|
AC: 1555977600, BC: 1559606400, CC: 1564444800, DC: 1568073600, EC: 1571702400, Q: 1575936e3, H: 1580860800, R: 1586304e3, S: 1589846400, T: 1594684800,
|
|
U: 1598313600, V: 1601942400, W: 1605571200, X: 1611014400, Y: 1614556800, Z: 1618272e3, a: 1621987200, b: 1626739200, c: 1630368e3, d: 1632268800,
|
|
e: 1634601600, f: 1637020800, g: 1641340800, h: 1643673600, i: 1646092800, j: 1648512e3, k: 1650931200, l: 1653350400, m: 1655769600, n: 1659398400,
|
|
o: 1661817600, p: 1664236800, q: 1666656e3, r: 166968e4, s: 1673308800, t: 1675728e3, u: 1678147200, v: 1680566400, w: 1682985600, x: 1685404800,
|
|
y: 1689724800, z: 1692057600, AB: 1698710400, BB: 1701993600, CB: 1705968e3, DB: 1708387200, EB: 1710806400, FB: 1713225600, GB: 1715644800,
|
|
HB: 1718064e3, IB: 1721174400, JB: 1724112e3, KB: 1726531200, LB: 1728950400, MB: 1731369600, NB: 1736812800, OB: 1738627200, PB: 1741046400,
|
|
I: 1743465600, QC: null, FC: null, RC: null } }, E: { A: { J: 0, QB: 0, K: 0, D: 0, E: 0, F: 0, A: 0, B: 0, C: 0, L: 0, M: 0.014492, G: 3623e-6,
|
|
tC: 0, SC: 0, uC: 0, vC: 0, wC: 0, xC: 0, TC: 0, GC: 7246e-6, HC: 7246e-6, yC: 0.032607, zC: 0.043476, "0C": 0.014492, UC: 3623e-6, VC: 0.010869,
|
|
IC: 0.014492, "1C": 0.148543, JC: 0.032607, WC: 0.021738, XC: 0.018115, YC: 0.039853, ZC: 0.014492, aC: 0.025361, "2C": 0.199265, KC: 0.010869,
|
|
bC: 0.123182, cC: 0.018115, dC: 0.021738, eC: 0.050722, fC: 0.086952, "3C": 0.264479, LC: 0.03623, gC: 0.115936, hC: 0.057968, iC: 1.4021,
|
|
jC: 0.018115, kC: 0, "4C": 0 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "tC", "\
|
|
SC", "J", "QB", "uC", "K", "vC", "D", "wC", "E", "F", "xC", "A", "TC", "B", "GC", "C", "HC", "L", "yC", "M", "zC", "G", "0C", "UC", "VC", "I\
|
|
C", "1C", "JC", "WC", "XC", "YC", "ZC", "aC", "2C", "KC", "bC", "cC", "dC", "eC", "fC", "3C", "LC", "gC", "hC", "iC", "jC", "kC", "4C", ""],
|
|
E: "Safari", F: { tC: 1205798400, SC: 1226534400, J: 1244419200, QB: 1275868800, uC: 131112e4, K: 1343174400, vC: 13824e5, D: 13824e5, wC: 1410998400,
|
|
E: 1413417600, F: 1443657600, xC: 1458518400, A: 1474329600, TC: 1490572800, B: 1505779200, GC: 1522281600, C: 1537142400, HC: 1553472e3, L: 1568851200,
|
|
yC: 1585008e3, M: 1600214400, zC: 1619395200, G: 1632096e3, "0C": 1635292800, UC: 1639353600, VC: 1647216e3, IC: 1652745600, "1C": 1658275200,
|
|
JC: 1662940800, WC: 1666569600, XC: 1670889600, YC: 1674432e3, ZC: 1679875200, aC: 1684368e3, "2C": 1690156800, KC: 1695686400, bC: 1698192e3,
|
|
cC: 1702252800, dC: 1705881600, eC: 1709596800, fC: 1715558400, "3C": 1722211200, LC: 1726444800, gC: 1730073600, hC: 1733875200, iC: 1737936e3,
|
|
jC: 1743379200, kC: null, "4C": null } }, F: { A: { 0: 0.684747, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, F: 0, B: 0, C: 0, G: 0, N: 0,
|
|
O: 0, P: 0, RB: 0, SB: 0, TB: 0, UB: 0, VB: 0, WB: 0, XB: 0, YB: 0, ZB: 0, aB: 0, bB: 0, cB: 0, dB: 0, eB: 3623e-6, fB: 0, gB: 0, hB: 0, iB: 0,
|
|
jB: 0, kB: 0.010869, lB: 0, mB: 0, nB: 0, oB: 0, pB: 0, qB: 0, rB: 0, sB: 0, tB: 0, uB: 0, vB: 0, wB: 0, xB: 0, yB: 0, zB: 0, "0B": 0, "1B": 0,
|
|
"2B": 0, "3B": 0, "4B": 0, "5B": 0, "6B": 0, "7B": 0, "8B": 0, "9B": 0, AC: 0, BC: 0, CC: 0, DC: 0, EC: 0, Q: 0, H: 0, R: 0, PC: 0, S: 0, T: 0,
|
|
U: 0, V: 0, W: 0.025361, X: 7246e-6, Y: 0, Z: 0, a: 0, b: 0, c: 0, d: 0, e: 0.032607, f: 0, g: 0, h: 0, i: 0, j: 0, k: 0, l: 0.018115, m: 0,
|
|
n: 0, o: 0, p: 0, q: 0, r: 0, s: 0, t: 0, u: 0, v: 0, w: 0, x: 3623e-6, y: 0, z: 0.202888, "5C": 0, "6C": 0, "7C": 0, "8C": 0, GC: 0, lC: 0,
|
|
"9C": 0, HC: 0 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"F", "5C", "6C", "7C", "8C", "B", "GC", "lC", "9C", "C", "HC", "G", "N", "O", "P", "RB", "1", "2", "3", "4", "5", "6", "7", "8", "SB", "TB",
|
|
"UB", "VB", "WB", "XB", "YB", "ZB", "aB", "bB", "cB", "dB", "eB", "fB", "gB", "hB", "iB", "jB", "kB", "lB", "mB", "nB", "oB", "pB", "qB", "\
|
|
rB", "sB", "tB", "uB", "vB", "wB", "xB", "yB", "zB", "0B", "1B", "2B", "3B", "4B", "5B", "6B", "7B", "8B", "9B", "AC", "BC", "CC", "DC", "EC",
|
|
"Q", "H", "R", "PC", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p",
|
|
"q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "", "", ""], E: "Opera", F: { 0: 1739404800, 1: 1393891200, 2: 1399334400, 3: 1401753600,
|
|
4: 1405987200, 5: 1409616e3, 6: 1413331200, 7: 1417132800, 8: 1422316800, F: 1150761600, "5C": 1223424e3, "6C": 1251763200, "7C": 1267488e3,
|
|
"8C": 1277942400, B: 1292457600, GC: 1302566400, lC: 1309219200, "9C": 1323129600, C: 1323129600, HC: 1352073600, G: 1372723200, N: 1377561600,
|
|
O: 1381104e3, P: 1386288e3, RB: 1390867200, SB: 1425945600, TB: 1430179200, UB: 1433808e3, VB: 1438646400, WB: 1442448e3, XB: 1445904e3, YB: 1449100800,
|
|
ZB: 1454371200, aB: 1457308800, bB: 146232e4, cB: 1465344e3, dB: 1470096e3, eB: 1474329600, fB: 1477267200, gB: 1481587200, hB: 1486425600,
|
|
iB: 1490054400, jB: 1494374400, kB: 1498003200, lB: 1502236800, mB: 1506470400, nB: 1510099200, oB: 1515024e3, pB: 1517961600, qB: 1521676800,
|
|
rB: 1525910400, sB: 1530144e3, tB: 1534982400, uB: 1537833600, vB: 1543363200, wB: 1548201600, xB: 1554768e3, yB: 1561593600, zB: 1566259200,
|
|
"0B": 1570406400, "1B": 1573689600, "2B": 1578441600, "3B": 1583971200, "4B": 1587513600, "5B": 1592956800, "6B": 1595894400, "7B": 1600128e3,
|
|
"8B": 1603238400, "9B": 161352e4, AC: 1612224e3, BC: 1616544e3, CC: 1619568e3, DC: 1623715200, EC: 1627948800, Q: 1631577600, H: 1633392e3,
|
|
R: 1635984e3, PC: 1638403200, S: 1642550400, T: 1644969600, U: 1647993600, V: 1650412800, W: 1652745600, X: 1654646400, Y: 1657152e3, Z: 1660780800,
|
|
a: 1663113600, b: 1668816e3, c: 1668643200, d: 1671062400, e: 1675209600, f: 1677024e3, g: 1679529600, h: 1681948800, i: 1684195200, j: 1687219200,
|
|
k: 1690329600, l: 1692748800, m: 1696204800, n: 169992e4, o: 169992e4, p: 1702944e3, q: 1707264e3, r: 1710115200, s: 1711497600, t: 1716336e3,
|
|
u: 1719273600, v: 1721088e3, w: 1724284800, x: 1727222400, y: 1732665600, z: 1736294400 }, D: { F: "o", B: "o", C: "o", "5C": "o", "6C": "\
|
|
o", "7C": "o", "8C": "o", GC: "o", lC: "o", "9C": "o", HC: "o" } }, G: { A: { E: 0, SC: 0, AD: 0, mC: 289898e-8, BD: 0, CD: 869695e-8, DD: 724746e-8,
|
|
ED: 0, FD: 434848e-8, GD: 0.0202929, HD: 144949e-8, ID: 0.0333383, JD: 0.153646, KD: 0.0101464, LD: 579797e-8, MD: 0.14205, ND: 289898e-8,
|
|
OD: 579797e-8, PD: 579797e-8, QD: 0.0202929, RD: 0.124656, SD: 0.0608787, TD: 0.0333383, UC: 0.0333383, VC: 0.0405858, IC: 0.0463837, UD: 0.568201,
|
|
JC: 0.0797221, WC: 0.165242, XC: 0.08552, YC: 0.150747, ZC: 0.0333383, aC: 0.0623282, VD: 0.672564, KC: 0.0405858, bC: 0.0724746, cC: 0.0550807,
|
|
dC: 0.0768231, eC: 0.153646, fC: 0.340631, WD: 0.988554, LC: 0.276853, gC: 0.905933, hC: 0.405858, iC: 8.46503, jC: 0.126106, kC: 0 }, B: "\
|
|
webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "SC", "AD", "mC", "BD", "CD", "DD", "E",
|
|
"ED", "FD", "GD", "HD", "ID", "JD", "KD", "LD", "MD", "ND", "OD", "PD", "QD", "RD", "SD", "TD", "UC", "VC", "IC", "UD", "JC", "WC", "XC", "\
|
|
YC", "ZC", "aC", "VD", "KC", "bC", "cC", "dC", "eC", "fC", "WD", "LC", "gC", "hC", "iC", "jC", "kC", "", ""], E: "Safari on iOS", F: { SC: 1270252800,
|
|
AD: 1283904e3, mC: 1299628800, BD: 1331078400, CD: 1359331200, DD: 1394409600, E: 1410912e3, ED: 1413763200, FD: 1442361600, GD: 1458518400,
|
|
HD: 1473724800, ID: 1490572800, JD: 1505779200, KD: 1522281600, LD: 1537142400, MD: 1553472e3, ND: 1568851200, OD: 1572220800, PD: 1580169600,
|
|
QD: 1585008e3, RD: 1600214400, SD: 1619395200, TD: 1632096e3, UC: 1639353600, VC: 1647216e3, IC: 1652659200, UD: 1658275200, JC: 1662940800,
|
|
WC: 1666569600, XC: 1670889600, YC: 1674432e3, ZC: 1679875200, aC: 1684368e3, VD: 1690156800, KC: 1694995200, bC: 1698192e3, cC: 1702252800,
|
|
dC: 1705881600, eC: 1709596800, fC: 1715558400, WD: 1722211200, LC: 1726444800, gC: 1730073600, hC: 1733875200, iC: 1737936e3, jC: 1743379200,
|
|
kC: null } }, H: { A: { XD: 0.05 }, B: "o", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "XD", "", "", ""], E: "Opera Mini", F: { XD: 1426464e3 } }, I: { A: { MC: 0, J: 0, I: 0.871727, YD: 0,
|
|
ZD: 0, aD: 0, bD: 0, mC: 262095e-9, cD: 0, dD: 961014e-9 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "YD", "ZD", "aD", "MC", "J", "bD", "mC", "cD", "dD", "I", "", "", ""], E: "Android Browser", F: { YD: 1256515200,
|
|
ZD: 1274313600, aD: 1291593600, MC: 1298332800, J: 1318896e3, bD: 1341792e3, mC: 1374624e3, cD: 1386547200, dD: 1401667200, I: 1743379200 } },
|
|
J: { A: { D: 0, A: 0 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "D", "A", "", "", ""], E: "Blackberry Browser", F: { D: 1325376e3, A: 1359504e3 } }, K: { A: { A: 0, B: 0, C: 0, H: 1.04047,
|
|
GC: 0, lC: 0, HC: 0 }, B: "o", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"A", "B", "GC", "lC", "C", "HC", "H", "", "", ""], E: "Opera Mobile", F: { A: 1287100800, B: 1300752e3, GC: 1314835200, lC: 1318291200, C: 1330300800,
|
|
HC: 1349740800, H: 1709769600 }, D: { H: "webkit" } }, L: { A: { I: 44.6783 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "I", "", "", ""], E: "Chrome for Android", F: { I: 1743379200 } },
|
|
M: { A: { FC: 0.350735 }, B: "moz", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "FC", "", "", ""], E: "Firefox for Android", F: { FC: 1743465600 } }, N: { A: { A: 0, B: 0 }, B: "ms", C: ["",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "A", "B", "", "", ""],
|
|
E: "IE Mobile", F: { A: 1340150400, B: 1353456e3 } }, O: { A: { IC: 0.848141 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "IC", "", "", ""], E: "UC Browser for Android", F: { IC: 1710115200 },
|
|
D: { IC: "webkit" } }, P: { A: { 1: 0, 2: 0.0219344, 3: 0.0219344, 4: 0.0329016, 5: 0.0438688, 6: 0.0438688, 7: 0.0877377, 8: 1.96313, J: 0.0329016,
|
|
eD: 0, fD: 0, gD: 0.0109672, hD: 0, iD: 0, TC: 0, jD: 0, kD: 0, lD: 0, mD: 0, nD: 0, JC: 0, KC: 0.0109672, LC: 0, oD: 0 }, B: "webkit", C: [
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "J", "eD", "fD", "gD", "hD", "iD", "TC", "jD", "kD", "lD", "mD", "nD", "JC", "KC", "LC", "oD", "1", "2",
|
|
"3", "4", "5", "6", "7", "8", "", "", ""], E: "Samsung Internet", F: { 1: 1677369600, 2: 1684454400, 3: 1689292800, 4: 1697587200, 5: 1711497600,
|
|
6: 1715126400, 7: 1717718400, 8: 1725667200, J: 1461024e3, eD: 1481846400, fD: 1509408e3, gD: 1528329600, hD: 1546128e3, iD: 1554163200, TC: 1567900800,
|
|
jD: 1582588800, kD: 1593475200, lD: 1605657600, mD: 1618531200, nD: 1629072e3, JC: 1640736e3, KC: 1651708800, LC: 1659657600, oD: 1667260800 } },
|
|
Q: { A: { pD: 0.229572 }, B: "webkit", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "pD", "", "", ""], E: "QQ Browser", F: { pD: 1710288e3 } }, R: { A: { qD: 0 }, B: "webkit", C: ["", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "qD", "", "", ""], E: "\
|
|
Baidu Browser", F: { qD: 1710201600 } }, S: { A: { rD: 0.012754, sD: 0 }, B: "moz", C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "rD", "sD", "", "", ""], E: "KaiOS Browser", F: { rD: 1527811200, sD: 1631664e3 } } };
|
|
});
|
|
|
|
// ../node_modules/caniuse-lite/dist/unpacker/agents.js
|
|
var u$ = E((Kht, o$) => {
|
|
"use strict";
|
|
var hqe = ng().browsers, BA = kA().browserVersions, s$ = n$();
|
|
function a$(e) {
|
|
return Object.keys(e).reduce((t, r) => (t[BA[r]] = e[r], t), {});
|
|
}
|
|
s(a$, "unpackBrowserVersions");
|
|
o$.exports.agents = Object.keys(s$).reduce((e, t) => {
|
|
let r = s$[t];
|
|
return e[hqe[t]] = Object.keys(r).reduce((i, n) => (n === "A" ? i.usage_global = a$(r[n]) : n === "C" ? i.versions = r[n].reduce((a, o) => (o ===
|
|
"" ? a.push(null) : a.push(BA[o]), a), []) : n === "D" ? i.prefix_exceptions = a$(r[n]) : n === "E" ? i.browser = r[n] : n === "F" ? i.release_date =
|
|
Object.keys(r[n]).reduce(
|
|
(a, o) => (a[BA[o]] = r[n][o], a),
|
|
{}
|
|
) : i.prefix = r[n], i), {}), e;
|
|
}, {});
|
|
});
|
|
|
|
// ../node_modules/electron-to-chromium/versions.js
|
|
var c$ = E((Ght, l$) => {
|
|
l$.exports = {
|
|
"0.20": "39",
|
|
"0.21": "41",
|
|
"0.22": "41",
|
|
"0.23": "41",
|
|
"0.24": "41",
|
|
"0.25": "42",
|
|
"0.26": "42",
|
|
"0.27": "43",
|
|
"0.28": "43",
|
|
"0.29": "43",
|
|
"0.30": "44",
|
|
"0.31": "45",
|
|
"0.32": "45",
|
|
"0.33": "45",
|
|
"0.34": "45",
|
|
"0.35": "45",
|
|
"0.36": "47",
|
|
"0.37": "49",
|
|
"1.0": "49",
|
|
"1.1": "50",
|
|
"1.2": "51",
|
|
"1.3": "52",
|
|
"1.4": "53",
|
|
"1.5": "54",
|
|
"1.6": "56",
|
|
"1.7": "58",
|
|
"1.8": "59",
|
|
"2.0": "61",
|
|
"2.1": "61",
|
|
"3.0": "66",
|
|
"3.1": "66",
|
|
"4.0": "69",
|
|
"4.1": "69",
|
|
"4.2": "69",
|
|
"5.0": "73",
|
|
"6.0": "76",
|
|
"6.1": "76",
|
|
"7.0": "78",
|
|
"7.1": "78",
|
|
"7.2": "78",
|
|
"7.3": "78",
|
|
"8.0": "80",
|
|
"8.1": "80",
|
|
"8.2": "80",
|
|
"8.3": "80",
|
|
"8.4": "80",
|
|
"8.5": "80",
|
|
"9.0": "83",
|
|
"9.1": "83",
|
|
"9.2": "83",
|
|
"9.3": "83",
|
|
"9.4": "83",
|
|
"10.0": "85",
|
|
"10.1": "85",
|
|
"10.2": "85",
|
|
"10.3": "85",
|
|
"10.4": "85",
|
|
"11.0": "87",
|
|
"11.1": "87",
|
|
"11.2": "87",
|
|
"11.3": "87",
|
|
"11.4": "87",
|
|
"11.5": "87",
|
|
"12.0": "89",
|
|
"12.1": "89",
|
|
"12.2": "89",
|
|
"13.0": "91",
|
|
"13.1": "91",
|
|
"13.2": "91",
|
|
"13.3": "91",
|
|
"13.4": "91",
|
|
"13.5": "91",
|
|
"13.6": "91",
|
|
"14.0": "93",
|
|
"14.1": "93",
|
|
"14.2": "93",
|
|
"15.0": "94",
|
|
"15.1": "94",
|
|
"15.2": "94",
|
|
"15.3": "94",
|
|
"15.4": "94",
|
|
"15.5": "94",
|
|
"16.0": "96",
|
|
"16.1": "96",
|
|
"16.2": "96",
|
|
"17.0": "98",
|
|
"17.1": "98",
|
|
"17.2": "98",
|
|
"17.3": "98",
|
|
"17.4": "98",
|
|
"18.0": "100",
|
|
"18.1": "100",
|
|
"18.2": "100",
|
|
"18.3": "100",
|
|
"19.0": "102",
|
|
"19.1": "102",
|
|
"20.0": "104",
|
|
"20.1": "104",
|
|
"20.2": "104",
|
|
"20.3": "104",
|
|
"21.0": "106",
|
|
"21.1": "106",
|
|
"21.2": "106",
|
|
"21.3": "106",
|
|
"21.4": "106",
|
|
"22.0": "108",
|
|
"22.1": "108",
|
|
"22.2": "108",
|
|
"22.3": "108",
|
|
"23.0": "110",
|
|
"23.1": "110",
|
|
"23.2": "110",
|
|
"23.3": "110",
|
|
"24.0": "112",
|
|
"24.1": "112",
|
|
"24.2": "112",
|
|
"24.3": "112",
|
|
"24.4": "112",
|
|
"24.5": "112",
|
|
"24.6": "112",
|
|
"24.7": "112",
|
|
"24.8": "112",
|
|
"25.0": "114",
|
|
"25.1": "114",
|
|
"25.2": "114",
|
|
"25.3": "114",
|
|
"25.4": "114",
|
|
"25.5": "114",
|
|
"25.6": "114",
|
|
"25.7": "114",
|
|
"25.8": "114",
|
|
"25.9": "114",
|
|
"26.0": "116",
|
|
"26.1": "116",
|
|
"26.2": "116",
|
|
"26.3": "116",
|
|
"26.4": "116",
|
|
"26.5": "116",
|
|
"26.6": "116",
|
|
"27.0": "118",
|
|
"27.1": "118",
|
|
"27.2": "118",
|
|
"27.3": "118",
|
|
"28.0": "120",
|
|
"28.1": "120",
|
|
"28.2": "120",
|
|
"28.3": "120",
|
|
"29.0": "122",
|
|
"29.1": "122",
|
|
"29.2": "122",
|
|
"29.3": "122",
|
|
"29.4": "122",
|
|
"30.0": "124",
|
|
"30.1": "124",
|
|
"30.2": "124",
|
|
"30.3": "124",
|
|
"30.4": "124",
|
|
"30.5": "124",
|
|
"31.0": "126",
|
|
"31.1": "126",
|
|
"31.2": "126",
|
|
"31.3": "126",
|
|
"31.4": "126",
|
|
"31.5": "126",
|
|
"31.6": "126",
|
|
"31.7": "126",
|
|
"32.0": "128",
|
|
"32.1": "128",
|
|
"32.2": "128",
|
|
"32.3": "128",
|
|
"33.0": "130",
|
|
"33.1": "130",
|
|
"33.2": "130",
|
|
"33.3": "130",
|
|
"33.4": "130",
|
|
"34.0": "132",
|
|
"34.1": "132",
|
|
"34.2": "132",
|
|
"34.3": "132",
|
|
"34.4": "132",
|
|
"34.5": "132",
|
|
"35.0": "134",
|
|
"35.1": "134",
|
|
"35.2": "134",
|
|
"36.0": "136"
|
|
};
|
|
});
|
|
|
|
// ../node_modules/node-releases/data/release-schedule/release-schedule.json
|
|
var f$ = E((Jht, mqe) => {
|
|
mqe.exports = { "v0.8": { start: "2012-06-25", end: "2014-07-31" }, "v0.10": { start: "2013-03-11", end: "2016-10-31" }, "v0.12": { start: "\
|
|
2015-02-06", end: "2016-12-31" }, v4: { start: "2015-09-08", lts: "2015-10-12", maintenance: "2017-04-01", end: "2018-04-30", codename: "Arg\
|
|
on" }, v5: { start: "2015-10-29", maintenance: "2016-04-30", end: "2016-06-30" }, v6: { start: "2016-04-26", lts: "2016-10-18", maintenance: "\
|
|
2018-04-30", end: "2019-04-30", codename: "Boron" }, v7: { start: "2016-10-25", maintenance: "2017-04-30", end: "2017-06-30" }, v8: { start: "\
|
|
2017-05-30", lts: "2017-10-31", maintenance: "2019-01-01", end: "2019-12-31", codename: "Carbon" }, v9: { start: "2017-10-01", maintenance: "\
|
|
2018-04-01", end: "2018-06-30" }, v10: { start: "2018-04-24", lts: "2018-10-30", maintenance: "2020-05-19", end: "2021-04-30", codename: "Du\
|
|
bnium" }, v11: { start: "2018-10-23", maintenance: "2019-04-22", end: "2019-06-01" }, v12: { start: "2019-04-23", lts: "2019-10-21", maintenance: "\
|
|
2020-11-30", end: "2022-04-30", codename: "Erbium" }, v13: { start: "2019-10-22", maintenance: "2020-04-01", end: "2020-06-01" }, v14: { start: "\
|
|
2020-04-21", lts: "2020-10-27", maintenance: "2021-10-19", end: "2023-04-30", codename: "Fermium" }, v15: { start: "2020-10-20", maintenance: "\
|
|
2021-04-01", end: "2021-06-01" }, v16: { start: "2021-04-20", lts: "2021-10-26", maintenance: "2022-10-18", end: "2023-09-11", codename: "Ga\
|
|
llium" }, v17: { start: "2021-10-19", maintenance: "2022-04-01", end: "2022-06-01" }, v18: { start: "2022-04-19", lts: "2022-10-25", maintenance: "\
|
|
2023-10-18", end: "2025-04-30", codename: "Hydrogen" }, v19: { start: "2022-10-18", maintenance: "2023-04-01", end: "2023-06-01" }, v20: { start: "\
|
|
2023-04-18", lts: "2023-10-24", maintenance: "2024-10-22", end: "2026-04-30", codename: "Iron" }, v21: { start: "2023-10-17", maintenance: "\
|
|
2024-04-01", end: "2024-06-01" }, v22: { start: "2024-04-24", lts: "2024-10-29", maintenance: "2025-10-21", end: "2027-04-30", codename: "Jo\
|
|
d" }, v23: { start: "2024-10-16", maintenance: "2025-04-01", end: "2025-06-01" }, v24: { start: "2025-04-22", lts: "2025-10-28", maintenance: "\
|
|
2026-10-20", end: "2028-04-30", codename: "" } };
|
|
});
|
|
|
|
// ../node_modules/browserslist/error.js
|
|
var MA = E((Xht, d$) => {
|
|
function NA(e) {
|
|
this.name = "BrowserslistError", this.message = e, this.browserslist = !0, Error.captureStackTrace && Error.captureStackTrace(this, NA);
|
|
}
|
|
s(NA, "BrowserslistError");
|
|
NA.prototype = Error.prototype;
|
|
d$.exports = NA;
|
|
});
|
|
|
|
// ../node_modules/caniuse-lite/dist/lib/statuses.js
|
|
var h$ = E((Zht, p$) => {
|
|
p$.exports = {
|
|
1: "ls",
|
|
// WHATWG Living Standard
|
|
2: "rec",
|
|
// W3C Recommendation
|
|
3: "pr",
|
|
// W3C Proposed Recommendation
|
|
4: "cr",
|
|
// W3C Candidate Recommendation
|
|
5: "wd",
|
|
// W3C Working Draft
|
|
6: "other",
|
|
// Non-W3C, but reputable
|
|
7: "unoff"
|
|
// Unofficial, Editor's Draft or W3C "Note"
|
|
};
|
|
});
|
|
|
|
// ../node_modules/caniuse-lite/dist/lib/supported.js
|
|
var y$ = E((Qht, m$) => {
|
|
m$.exports = {
|
|
y: 1,
|
|
n: 2,
|
|
a: 4,
|
|
p: 8,
|
|
u: 16,
|
|
x: 32,
|
|
d: 64
|
|
};
|
|
});
|
|
|
|
// ../node_modules/caniuse-lite/dist/unpacker/feature.js
|
|
var D$ = E((emt, RA) => {
|
|
"use strict";
|
|
var yqe = h$(), g$ = y$(), gqe = ng().browsers, bqe = kA().browserVersions, Dqe = Math.log(2);
|
|
function vqe(e) {
|
|
let t = Object.keys(g$).reduce((n, a) => (e & g$[a] && n.push(a), n), []), r = e >> 7, i = [];
|
|
for (; r; ) {
|
|
let n = Math.floor(Math.log(r) / Dqe) + 1;
|
|
i.unshift(`#${n}`), r -= Math.pow(2, n - 1);
|
|
}
|
|
return t.concat(i).join(" ");
|
|
}
|
|
s(vqe, "unpackSupport");
|
|
function b$(e) {
|
|
let t = {
|
|
status: yqe[e.B],
|
|
title: e.C,
|
|
shown: e.D
|
|
};
|
|
return t.stats = Object.keys(e.A).reduce((r, i) => {
|
|
let n = e.A[i];
|
|
return r[gqe[i]] = Object.keys(n).reduce(
|
|
(a, o) => {
|
|
let u = n[o].split(" "), l = vqe(o);
|
|
return u.forEach((c) => a[bqe[c]] = l), a;
|
|
},
|
|
{}
|
|
), r;
|
|
}, {}), t;
|
|
}
|
|
s(b$, "unpackFeature");
|
|
RA.exports = b$;
|
|
RA.exports.default = b$;
|
|
});
|
|
|
|
// ../node_modules/caniuse-lite/dist/unpacker/region.js
|
|
var E$ = E((rmt, jA) => {
|
|
"use strict";
|
|
var Eqe = ng().browsers;
|
|
function v$(e) {
|
|
return Object.keys(e).reduce((t, r) => {
|
|
let i = e[r];
|
|
return t[Eqe[r]] = Object.keys(i).reduce((n, a) => {
|
|
let o = i[a];
|
|
return a === "_" ? o.split(" ").forEach((u) => n[u] = null) : n[a] = o, n;
|
|
}, {}), t;
|
|
}, {});
|
|
}
|
|
s(v$, "unpackRegion");
|
|
jA.exports = v$;
|
|
jA.exports.default = v$;
|
|
});
|
|
|
|
// ../node_modules/browserslist/node.js
|
|
var I$ = E((nmt, np) => {
|
|
var xqe = D$().default, Sqe = E$().default, Qa = V("fs"), Fn = V("path"), ni = MA(), x$ = /^\s*\[(.+)]\s*$/, Tqe = /^browserslist-config-/,
|
|
Cqe = /@[^/]+(?:\/[^/]+)?\/browserslist-config(?:-|$|\/)/, S$ = "Browserslist config should be a string or an array of strings with browse\
|
|
r queries", LA = !1, T$ = {}, C$ = {}, sg = {};
|
|
function w$(e) {
|
|
var t = " Use `dangerousExtend` option to disable.";
|
|
if (!Tqe.test(e) && !Cqe.test(e))
|
|
throw new ni(
|
|
"Browserslist config needs `browserslist-config-` prefix. " + t
|
|
);
|
|
if (e.replace(/^@[^/]+\//, "").indexOf(".") !== -1)
|
|
throw new ni(
|
|
"`.` not allowed in Browserslist config name. " + t
|
|
);
|
|
if (e.indexOf("node_modules") !== -1)
|
|
throw new ni(
|
|
"`node_modules` not allowed in Browserslist config." + t
|
|
);
|
|
}
|
|
s(w$, "checkExtend");
|
|
function Qs(e) {
|
|
return Qa.existsSync(e) && Qa.statSync(e).isFile();
|
|
}
|
|
s(Qs, "isFile");
|
|
function wqe(e) {
|
|
return Qa.existsSync(e) && Qa.statSync(e).isDirectory();
|
|
}
|
|
s(wqe, "isDirectory");
|
|
function A$(e, t, r) {
|
|
var i = Fn.resolve(e), n = [], a;
|
|
do {
|
|
if (!Aqe(i))
|
|
break;
|
|
if (r && i in r) {
|
|
a = r[i];
|
|
break;
|
|
}
|
|
if (n.push(i), !!wqe(i)) {
|
|
var o = t(i);
|
|
if (typeof o < "u") {
|
|
a = o;
|
|
break;
|
|
}
|
|
}
|
|
} while (i !== (i = Fn.dirname(i)));
|
|
return r && !process.env.BROWSERSLIST_DISABLE_CACHE && n.forEach(function(u) {
|
|
r[u] = a;
|
|
}), a;
|
|
}
|
|
s(A$, "eachParent");
|
|
function Aqe(e) {
|
|
if (!process.env.BROWSERSLIST_ROOT_PATH) return !0;
|
|
var t = Fn.resolve(process.env.BROWSERSLIST_ROOT_PATH);
|
|
return Fn.relative(t, e).substring(0, 2) !== "..";
|
|
}
|
|
s(Aqe, "pathInRoot");
|
|
function _qe(e) {
|
|
if (Array.isArray(e)) {
|
|
for (var t = 0; t < e.length; t++)
|
|
if (typeof e[t] != "string")
|
|
throw new ni(S$);
|
|
} else if (typeof e != "string")
|
|
throw new ni(S$);
|
|
}
|
|
s(_qe, "check");
|
|
function qA(e, t) {
|
|
if (typeof e != "object") return e;
|
|
var r;
|
|
if (typeof t.env == "string" ? r = t.env : process.env.BROWSERSLIST_ENV ? r = process.env.BROWSERSLIST_ENV : process.env.NODE_ENV ? r = process.
|
|
env.NODE_ENV : r = "production", t.throwOnMissing && r && r !== "defaults" && !e[r])
|
|
throw new ni(
|
|
"Missing config for Browserslist environment `" + r + "`"
|
|
);
|
|
return e[r] || e.defaults;
|
|
}
|
|
s(qA, "pickEnv");
|
|
function F$(e) {
|
|
var t = Qa.readFileSync(e).toString().replace(/^\uFEFF/m, ""), r;
|
|
if (t.indexOf('"browserslist"') >= 0)
|
|
r = JSON.parse(t).browserslist;
|
|
else if (t.indexOf('"browserlist"') >= 0) {
|
|
var i = JSON.parse(t);
|
|
if (i.browserlist && !i.browserslist)
|
|
throw new ni(
|
|
"`browserlist` key instead of `browserslist` in " + e
|
|
);
|
|
}
|
|
(Array.isArray(r) || typeof r == "string") && (r = { defaults: r });
|
|
for (var n in r)
|
|
_qe(r[n]);
|
|
return r;
|
|
}
|
|
s(F$, "parsePackage");
|
|
function _$(e) {
|
|
if (e in sg)
|
|
return sg[e];
|
|
var t = Fn.basename(e) === "package.json", r = t ? F$(e) : np.exports.readConfig(e);
|
|
return process.env.BROWSERSLIST_DISABLE_CACHE || (sg[e] = r), r;
|
|
}
|
|
s(_$, "parsePackageOrReadConfig");
|
|
function Pqe(e) {
|
|
var t = 0;
|
|
for (var r in e) {
|
|
var i = e[r].releaseDate || {};
|
|
for (var n in i)
|
|
t < i[n] && (t = i[n]);
|
|
}
|
|
return t * 1e3;
|
|
}
|
|
s(Pqe, "latestReleaseTime");
|
|
function Fqe(e) {
|
|
var t = /* @__PURE__ */ new Date(), r = new Date(e), i = t.getFullYear() - r.getFullYear(), n = t.getMonth() - r.getMonth();
|
|
return i * 12 + n;
|
|
}
|
|
s(Fqe, "getMonthsPassed");
|
|
function P$(e, t) {
|
|
if (e || (e = {}), t && "dataByBrowser" in t && (t = t.dataByBrowser), typeof t == "object") {
|
|
var r = {};
|
|
for (var i in t) {
|
|
var n = Object.keys(t[i]);
|
|
if (n.length === 1 && e[i] && e[i].versions.length === 1) {
|
|
var a = e[i].versions[0];
|
|
r[i] = {}, r[i][a] = t[i][n[0]];
|
|
} else
|
|
r[i] = t[i];
|
|
}
|
|
return r;
|
|
}
|
|
}
|
|
s(P$, "normalizeStats");
|
|
function Iqe(e, t) {
|
|
for (var r in e) {
|
|
var i = e[r];
|
|
if ("0" in i) {
|
|
var n = t[r].versions;
|
|
i[n[n.length - 1]] = i[0], delete i[0];
|
|
}
|
|
}
|
|
}
|
|
s(Iqe, "normalizeUsageData");
|
|
np.exports = {
|
|
loadQueries: /* @__PURE__ */ s(function(t, r) {
|
|
!t.dangerousExtend && !process.env.BROWSERSLIST_DANGEROUS_EXTEND && w$(r);
|
|
var i = V(V.resolve(r, { paths: [".", t.path] }));
|
|
if (i) {
|
|
if (Array.isArray(i))
|
|
return i;
|
|
if (typeof i == "object")
|
|
return i.defaults || (i.defaults = []), qA(i, t, r);
|
|
}
|
|
throw new ni(
|
|
"`" + r + "` config exports not an array of queries or an object of envs"
|
|
);
|
|
}, "loadQueries"),
|
|
loadStat: /* @__PURE__ */ s(function(t, r, i) {
|
|
!t.dangerousExtend && !process.env.BROWSERSLIST_DANGEROUS_EXTEND && w$(r);
|
|
var n = V(V.resolve(
|
|
Fn.join(r, "browserslist-stats.json"),
|
|
{ paths: ["."] }
|
|
));
|
|
return P$(i, n);
|
|
}, "loadStat"),
|
|
getStat: /* @__PURE__ */ s(function(t, r) {
|
|
var i;
|
|
if (t.stats ? i = t.stats : process.env.BROWSERSLIST_STATS ? i = process.env.BROWSERSLIST_STATS : t.path && Fn.resolve && Qa.existsSync &&
|
|
(i = A$(t.path, function(n) {
|
|
var a = Fn.join(n, "browserslist-stats.json");
|
|
return Qs(a) ? a : void 0;
|
|
}, T$)), typeof i == "string")
|
|
try {
|
|
i = JSON.parse(Qa.readFileSync(i));
|
|
} catch {
|
|
throw new ni("Can't read " + i);
|
|
}
|
|
return P$(r, i);
|
|
}, "getStat"),
|
|
loadConfig: /* @__PURE__ */ s(function(t) {
|
|
if (process.env.BROWSERSLIST)
|
|
return process.env.BROWSERSLIST;
|
|
if (t.config || process.env.BROWSERSLIST_CONFIG) {
|
|
var r = t.config || process.env.BROWSERSLIST_CONFIG;
|
|
return qA(_$(r), t);
|
|
} else return t.path ? qA(np.exports.findConfig(t.path), t) : void 0;
|
|
}, "loadConfig"),
|
|
loadCountry: /* @__PURE__ */ s(function(t, r, i) {
|
|
var n = r.replace(/[^\w-]/g, "");
|
|
if (!t[n]) {
|
|
var a;
|
|
try {
|
|
a = V("caniuse-lite/data/regions/" + n + ".js");
|
|
} catch {
|
|
throw new ni("Unknown region name `" + n + "`.");
|
|
}
|
|
var o = Sqe(a);
|
|
Iqe(o, i), t[r] = {};
|
|
for (var u in o)
|
|
for (var l in o[u])
|
|
t[r][u + " " + l] = o[u][l];
|
|
}
|
|
}, "loadCountry"),
|
|
loadFeature: /* @__PURE__ */ s(function(t, r) {
|
|
if (r = r.replace(/[^\w-]/g, ""), !t[r]) {
|
|
var i;
|
|
try {
|
|
i = V("caniuse-lite/data/features/" + r + ".js");
|
|
} catch {
|
|
throw new ni("Unknown feature name `" + r + "`.");
|
|
}
|
|
var n = xqe(i).stats;
|
|
t[r] = {};
|
|
for (var a in n) {
|
|
t[r][a] = {};
|
|
for (var o in n[a])
|
|
t[r][a][o] = n[a][o];
|
|
}
|
|
}
|
|
}, "loadFeature"),
|
|
parseConfig: /* @__PURE__ */ s(function(t) {
|
|
var r = { defaults: [] }, i = ["defaults"];
|
|
return t.toString().replace(/#[^\n]*/g, "").split(/\n|,/).map(function(n) {
|
|
return n.trim();
|
|
}).filter(function(n) {
|
|
return n !== "";
|
|
}).forEach(function(n) {
|
|
x$.test(n) ? (i = n.match(x$)[1].trim().split(" "), i.forEach(function(a) {
|
|
if (r[a])
|
|
throw new ni(
|
|
"Duplicate section " + a + " in Browserslist config"
|
|
);
|
|
r[a] = [];
|
|
})) : i.forEach(function(a) {
|
|
r[a].push(n);
|
|
});
|
|
}), r;
|
|
}, "parseConfig"),
|
|
readConfig: /* @__PURE__ */ s(function(t) {
|
|
if (!Qs(t))
|
|
throw new ni("Can't read " + t + " config");
|
|
return np.exports.parseConfig(Qa.readFileSync(t));
|
|
}, "readConfig"),
|
|
findConfigFile: /* @__PURE__ */ s(function(t) {
|
|
return A$(t, function(r) {
|
|
var i = Fn.join(r, "browserslist"), n = Fn.join(r, "package.json"), a = Fn.join(r, ".browserslistrc"), o;
|
|
if (Qs(n))
|
|
try {
|
|
o = F$(n);
|
|
} catch (u) {
|
|
if (u.name === "BrowserslistError") throw u;
|
|
console.warn(
|
|
"[Browserslist] Could not parse " + n + ". Ignoring it."
|
|
);
|
|
}
|
|
if (Qs(i) && o)
|
|
throw new ni(
|
|
r + " contains both browserslist and package.json with browsers"
|
|
);
|
|
if (Qs(a) && o)
|
|
throw new ni(
|
|
r + " contains both .browserslistrc and package.json with browsers"
|
|
);
|
|
if (Qs(i) && Qs(a))
|
|
throw new ni(
|
|
r + " contains both .browserslistrc and browserslist"
|
|
);
|
|
if (Qs(i))
|
|
return i;
|
|
if (Qs(a))
|
|
return a;
|
|
if (o)
|
|
return n;
|
|
}, C$);
|
|
}, "findConfigFile"),
|
|
findConfig: /* @__PURE__ */ s(function(t) {
|
|
var r = this.findConfigFile(t);
|
|
return r ? _$(r) : void 0;
|
|
}, "findConfig"),
|
|
clearCaches: /* @__PURE__ */ s(function() {
|
|
LA = !1, T$ = {}, C$ = {}, sg = {}, this.cache = {};
|
|
}, "clearCaches"),
|
|
oldDataWarning: /* @__PURE__ */ s(function(t) {
|
|
if (!LA && (LA = !0, !process.env.BROWSERSLIST_IGNORE_OLD_DATA)) {
|
|
var r = Pqe(t), i = Fqe(r);
|
|
if (r !== 0 && i >= 6) {
|
|
var n = i + " " + (i > 1 ? "months" : "month");
|
|
console.warn(
|
|
"Browserslist: browsers data (caniuse-lite) is " + n + ` old. Please run:
|
|
npx update-browserslist-db@latest
|
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme`
|
|
);
|
|
}
|
|
}
|
|
}, "oldDataWarning"),
|
|
currentNode: /* @__PURE__ */ s(function() {
|
|
return "node " + process.versions.node;
|
|
}, "currentNode"),
|
|
env: process.env
|
|
};
|
|
});
|
|
|
|
// ../node_modules/browserslist/parse.js
|
|
var M$ = E((amt, N$) => {
|
|
var O$ = /^\s+and\s+(.*)/i, k$ = /^(?:,\s*|\s+or\s+)(.*)/i;
|
|
function B$(e) {
|
|
return Array.isArray(e) ? e.reduce(function(t, r) {
|
|
return t.concat(B$(r));
|
|
}, []) : [e];
|
|
}
|
|
s(B$, "flatten");
|
|
function Oqe(e, t) {
|
|
for (var r = e.length, i = 1; i <= r; i++) {
|
|
var n = e.substr(-i, i);
|
|
if (t(n, i, r))
|
|
return e.slice(0, -i);
|
|
}
|
|
return "";
|
|
}
|
|
s(Oqe, "find");
|
|
function UA(e, t) {
|
|
var r = { query: t };
|
|
t.indexOf("not ") === 0 && (r.not = !0, t = t.slice(4));
|
|
for (var i in e) {
|
|
var n = e[i], a = t.match(n.regexp);
|
|
if (a) {
|
|
r.type = i;
|
|
for (var o = 0; o < n.matches.length; o++)
|
|
r[n.matches[o]] = a[o + 1];
|
|
return r;
|
|
}
|
|
}
|
|
return r.type = "unknown", r;
|
|
}
|
|
s(UA, "matchQuery");
|
|
function kqe(e, t, r) {
|
|
var i;
|
|
return Oqe(t, function(n, a, o) {
|
|
return O$.test(n) ? (i = UA(e, n.match(O$)[1]), i.compose = "and", r.unshift(i), !0) : k$.test(n) ? (i = UA(e, n.match(k$)[1]), i.compose =
|
|
"or", r.unshift(i), !0) : a === o ? (i = UA(e, n.trim()), i.compose = "or", r.unshift(i), !0) : !1;
|
|
});
|
|
}
|
|
s(kqe, "matchBlock");
|
|
N$.exports = /* @__PURE__ */ s(function(t, r) {
|
|
return Array.isArray(r) || (r = [r]), B$(
|
|
r.map(function(i) {
|
|
var n = [];
|
|
do
|
|
i = kqe(t, i, n);
|
|
while (i);
|
|
return n;
|
|
})
|
|
);
|
|
}, "parse");
|
|
});
|
|
|
|
// ../node_modules/browserslist/index.js
|
|
var Q$ = E((umt, Z$) => {
|
|
var Bqe = XW(), ea = u$().agents, In = c$(), WA = f$(), fg = V("path"), _i = MA(), Rr = I$(), Nqe = M$(), Mqe = 365.259641 * 24 * 60 * 60 *
|
|
1e3, H$ = "37", Rqe = 14;
|
|
function K$(e, t) {
|
|
return (e + ".").indexOf(t + ".") === 0;
|
|
}
|
|
s(K$, "isVersionsMatch");
|
|
function jqe(e) {
|
|
var t = e.slice(1);
|
|
return ke.nodeVersions.some(function(r) {
|
|
return K$(r, t);
|
|
});
|
|
}
|
|
s(jqe, "isEolReleased");
|
|
function R$(e) {
|
|
return e.filter(function(t) {
|
|
return typeof t == "string";
|
|
});
|
|
}
|
|
s(R$, "normalize");
|
|
function ag(e) {
|
|
var t = e;
|
|
return e.split(".").length === 3 && (t = e.split(".").slice(0, -1).join(".")), t;
|
|
}
|
|
s(ag, "normalizeElectron");
|
|
function eo(e) {
|
|
return /* @__PURE__ */ s(function(r) {
|
|
return e + " " + r;
|
|
}, "mapName");
|
|
}
|
|
s(eo, "nameMapper");
|
|
function zA(e) {
|
|
return parseInt(e.split(".")[0]);
|
|
}
|
|
s(zA, "getMajor");
|
|
function og(e, t) {
|
|
if (e.length === 0) return [];
|
|
var r = z$(e.map(zA)), i = r[r.length - t];
|
|
if (!i)
|
|
return e;
|
|
for (var n = [], a = e.length - 1; a >= 0 && !(i > zA(e[a])); a--)
|
|
n.unshift(e[a]);
|
|
return n;
|
|
}
|
|
s(og, "getMajorVersions");
|
|
function z$(e) {
|
|
for (var t = [], r = 0; r < e.length; r++)
|
|
t.indexOf(e[r]) === -1 && t.push(e[r]);
|
|
return t;
|
|
}
|
|
s(z$, "uniq");
|
|
function dg(e, t, r) {
|
|
for (var i in r)
|
|
e[t + " " + i] = r[i];
|
|
}
|
|
s(dg, "fillUsage");
|
|
function j$(e, t) {
|
|
if (t = parseFloat(t), e === ">")
|
|
return function(i) {
|
|
return r(i) > t;
|
|
};
|
|
return e === ">=" ? function(i) {
|
|
return r(i) >= t;
|
|
} : e === "<" ? function(i) {
|
|
return parseFloat(i) < t;
|
|
} : function(i) {
|
|
return parseFloat(i) <= t;
|
|
};
|
|
function r(i) {
|
|
return parseFloat(i.split("-")[1] || i);
|
|
}
|
|
}
|
|
s(j$, "generateFilter");
|
|
function Lqe(e, t) {
|
|
return t = t.split(".").map(to), t[1] = t[1] || 0, t[2] = t[2] || 0, e === ">" ? function(r) {
|
|
return r = r.split(".").map(to), sp(r, t) > 0;
|
|
} : e === ">=" ? function(r) {
|
|
return r = r.split(".").map(to), sp(r, t) >= 0;
|
|
} : e === "<" ? function(r) {
|
|
return r = r.split(".").map(to), sp(t, r) > 0;
|
|
} : function(r) {
|
|
return r = r.split(".").map(to), sp(t, r) >= 0;
|
|
};
|
|
}
|
|
s(Lqe, "generateSemverFilter");
|
|
function to(e) {
|
|
return parseInt(e);
|
|
}
|
|
s(to, "parseSimpleInt");
|
|
function cg(e, t) {
|
|
return e < t ? -1 : e > t ? 1 : 0;
|
|
}
|
|
s(cg, "compare");
|
|
function sp(e, t) {
|
|
return cg(parseInt(e[0]), parseInt(t[0])) || cg(parseInt(e[1] || "0"), parseInt(t[1] || "0")) || cg(parseInt(e[2] || "0"), parseInt(t[2] ||
|
|
"0"));
|
|
}
|
|
s(sp, "compareSemver");
|
|
function L$(e, t) {
|
|
switch (t = t.split(".").map(to), typeof t[1] > "u" && (t[1] = "x"), e) {
|
|
case "<=":
|
|
return function(r) {
|
|
return r = r.split(".").map(to), q$(r, t) <= 0;
|
|
};
|
|
case ">=":
|
|
default:
|
|
return function(r) {
|
|
return r = r.split(".").map(to), q$(r, t) >= 0;
|
|
};
|
|
}
|
|
}
|
|
s(L$, "semverFilterLoose");
|
|
function q$(e, t) {
|
|
return e[0] !== t[0] ? e[0] < t[0] ? -1 : 1 : t[1] === "x" ? 0 : e[1] !== t[1] ? e[1] < t[1] ? -1 : 1 : 0;
|
|
}
|
|
s(q$, "compareSemverLoose");
|
|
function qqe(e, t) {
|
|
return e.versions.indexOf(t) !== -1 ? t : ke.versionAliases[e.name][t] ? ke.versionAliases[e.name][t] : !1;
|
|
}
|
|
s(qqe, "resolveVersion");
|
|
function ug(e, t) {
|
|
var r = qqe(e, t);
|
|
return r || (e.versions.length === 1 ? e.versions[0] : !1);
|
|
}
|
|
s(ug, "normalizeVersion");
|
|
function G$(e, t) {
|
|
return e = e / 1e3, Object.keys(ea).reduce(function(r, i) {
|
|
var n = ro(i, t);
|
|
if (!n) return r;
|
|
var a = Object.keys(n.releaseDate).filter(function(o) {
|
|
var u = n.releaseDate[o];
|
|
return u !== null && u >= e;
|
|
});
|
|
return r.concat(a.map(eo(n.name)));
|
|
}, []);
|
|
}
|
|
s(G$, "filterByYear");
|
|
function U$(e) {
|
|
return {
|
|
name: e.name,
|
|
versions: e.versions,
|
|
released: e.released,
|
|
releaseDate: e.releaseDate
|
|
};
|
|
}
|
|
s(U$, "cloneData");
|
|
function ro(e, t) {
|
|
if (e = e.toLowerCase(), e = ke.aliases[e] || e, t.mobileToDesktop && ke.desktopNames[e]) {
|
|
var r = ke.data[ke.desktopNames[e]];
|
|
if (e === "android")
|
|
return Wqe(U$(ke.data[e]), r);
|
|
var i = U$(r);
|
|
return i.name = e, i;
|
|
}
|
|
return ke.data[e];
|
|
}
|
|
s(ro, "byName");
|
|
function W$(e, t) {
|
|
var r = t.indexOf(H$);
|
|
return e.filter(function(i) {
|
|
return /^(?:[2-4]\.|[34]$)/.test(i);
|
|
}).concat(t.slice(r));
|
|
}
|
|
s(W$, "normalizeAndroidVersions");
|
|
function Uqe(e) {
|
|
var t = {};
|
|
for (var r in e)
|
|
t[r] = e[r];
|
|
return t;
|
|
}
|
|
s(Uqe, "copyObject");
|
|
function Wqe(e, t) {
|
|
return e.released = W$(e.released, t.released), e.versions = W$(e.versions, t.versions), e.releaseDate = Uqe(e.releaseDate), e.released.
|
|
forEach(function(r) {
|
|
e.releaseDate[r] === void 0 && (e.releaseDate[r] = t.releaseDate[r]);
|
|
}), e;
|
|
}
|
|
s(Wqe, "normalizeAndroidData");
|
|
function ac(e, t) {
|
|
var r = ro(e, t);
|
|
if (!r) throw new _i("Unknown browser " + e);
|
|
return r;
|
|
}
|
|
s(ac, "checkName");
|
|
function $qe(e) {
|
|
return new _i(
|
|
"Unknown browser query `" + e + "`. Maybe you are using old Browserslist or made typo in query."
|
|
);
|
|
}
|
|
s($qe, "unknownQuery");
|
|
function lg(e, t, r, i) {
|
|
var n = 1;
|
|
switch (t) {
|
|
case "android":
|
|
if (i.mobileToDesktop) return e;
|
|
var a = ke.data.chrome.released;
|
|
n = a.length - a.indexOf(H$);
|
|
break;
|
|
case "op_mob":
|
|
var o = ke.data.op_mob.released.slice(-1)[0];
|
|
n = zA(o) - Rqe + 1;
|
|
break;
|
|
default:
|
|
return e;
|
|
}
|
|
return r <= n ? e.slice(-1) : e.slice(n - 1 - r);
|
|
}
|
|
s(lg, "filterJumps");
|
|
function $$(e, t) {
|
|
return typeof e == "string" && (e.indexOf("y") >= 0 || t && e.indexOf("a") >= 0);
|
|
}
|
|
s($$, "isSupported");
|
|
function oc(e, t) {
|
|
return GA(e).reduce(function(r, i, n) {
|
|
if (i.not && n === 0)
|
|
throw new _i(
|
|
"Write any browsers query (for instance, `defaults`) before `" + i.query + "`"
|
|
);
|
|
var a = JA[i.type], o = a.select.call(ke, t, i).map(function(l) {
|
|
var c = l.split(" ");
|
|
return c[1] === "0" ? c[0] + " " + ro(c[0], t).versions[0] : l;
|
|
});
|
|
if (i.compose === "and")
|
|
return i.not ? r.filter(function(l) {
|
|
return o.indexOf(l) === -1;
|
|
}) : r.filter(function(l) {
|
|
return o.indexOf(l) !== -1;
|
|
});
|
|
if (i.not) {
|
|
var u = {};
|
|
return o.forEach(function(l) {
|
|
u[l] = !0;
|
|
}), r.filter(function(l) {
|
|
return !u[l];
|
|
});
|
|
}
|
|
return r.concat(o);
|
|
}, []);
|
|
}
|
|
s(oc, "resolve");
|
|
function J$(e) {
|
|
return typeof e > "u" && (e = {}), typeof e.path > "u" && (e.path = fg.resolve ? fg.resolve(".") : "."), e;
|
|
}
|
|
s(J$, "prepareOpts");
|
|
function X$(e, t) {
|
|
if (typeof e > "u" || e === null) {
|
|
var r = ke.loadConfig(t);
|
|
r ? e = r : e = ke.defaults;
|
|
}
|
|
return e;
|
|
}
|
|
s(X$, "prepareQueries");
|
|
function Y$(e) {
|
|
if (!(typeof e == "string" || Array.isArray(e)))
|
|
throw new _i(
|
|
"Browser queries must be an array or string. Got " + typeof e + "."
|
|
);
|
|
}
|
|
s(Y$, "checkQueries");
|
|
var $A = {}, VA = {};
|
|
function ke(e, t) {
|
|
t = J$(t), e = X$(e, t), Y$(e);
|
|
var r = GA(e).some(function(l) {
|
|
return JA[l.type].needsPath;
|
|
}), i = {
|
|
ignoreUnknownVersions: t.ignoreUnknownVersions,
|
|
dangerousExtend: t.dangerousExtend,
|
|
mobileToDesktop: t.mobileToDesktop,
|
|
env: t.env
|
|
};
|
|
r && (i.path = t.path), Rr.oldDataWarning(ke.data);
|
|
var n = Rr.getStat(t, ke.data);
|
|
if (n) {
|
|
i.customUsage = {};
|
|
for (var a in n)
|
|
dg(i.customUsage, a, n[a]);
|
|
}
|
|
var o = JSON.stringify([e, i]);
|
|
if ($A[o]) return $A[o];
|
|
var u = z$(oc(e, i)).sort(function(l, c) {
|
|
if (l = l.split(" "), c = c.split(" "), l[0] === c[0]) {
|
|
var f = l[1].split("-")[0], m = c[1].split("-")[0];
|
|
return sp(m.split("."), f.split("."));
|
|
} else
|
|
return cg(l[0], c[0]);
|
|
});
|
|
return Rr.env.BROWSERSLIST_DISABLE_CACHE || ($A[o] = u), u;
|
|
}
|
|
s(ke, "browserslist");
|
|
function GA(e) {
|
|
var t = JSON.stringify(e);
|
|
if (t in VA) return VA[t];
|
|
var r = Nqe(JA, e);
|
|
return Rr.env.BROWSERSLIST_DISABLE_CACHE || (VA[t] = r), r;
|
|
}
|
|
s(GA, "parseQueries");
|
|
ke.parse = function(e, t) {
|
|
return t = J$(t), e = X$(e, t), Y$(e), GA(e);
|
|
};
|
|
ke.cache = {};
|
|
ke.data = {};
|
|
ke.usage = {
|
|
global: {},
|
|
custom: null
|
|
};
|
|
ke.defaults = ["> 0.5%", "last 2 versions", "Firefox ESR", "not dead"];
|
|
ke.aliases = {
|
|
fx: "firefox",
|
|
ff: "firefox",
|
|
ios: "ios_saf",
|
|
explorer: "ie",
|
|
blackberry: "bb",
|
|
explorermobile: "ie_mob",
|
|
operamini: "op_mini",
|
|
operamobile: "op_mob",
|
|
chromeandroid: "and_chr",
|
|
firefoxandroid: "and_ff",
|
|
ucandroid: "and_uc",
|
|
qqandroid: "and_qq"
|
|
};
|
|
ke.desktopNames = {
|
|
and_chr: "chrome",
|
|
and_ff: "firefox",
|
|
ie_mob: "ie",
|
|
android: "chrome"
|
|
// has extra processing logic
|
|
};
|
|
ke.versionAliases = {};
|
|
ke.clearCaches = Rr.clearCaches;
|
|
ke.parseConfig = Rr.parseConfig;
|
|
ke.readConfig = Rr.readConfig;
|
|
ke.findConfigFile = Rr.findConfigFile;
|
|
ke.findConfig = Rr.findConfig;
|
|
ke.loadConfig = Rr.loadConfig;
|
|
ke.coverage = function(e, t) {
|
|
var r;
|
|
if (typeof t > "u")
|
|
r = ke.usage.global;
|
|
else if (t === "my stats") {
|
|
var i = {};
|
|
i.path = fg.resolve ? fg.resolve(".") : ".";
|
|
var n = Rr.getStat(i);
|
|
if (!n)
|
|
throw new _i("Custom usage statistics was not provided");
|
|
r = {};
|
|
for (var a in n)
|
|
dg(r, a, n[a]);
|
|
} else if (typeof t == "string")
|
|
t.length > 2 ? t = t.toLowerCase() : t = t.toUpperCase(), Rr.loadCountry(ke.usage, t, ke.data), r = ke.usage[t];
|
|
else {
|
|
"dataByBrowser" in t && (t = t.dataByBrowser), r = {};
|
|
for (var o in t)
|
|
for (var u in t[o])
|
|
r[o + " " + u] = t[o][u];
|
|
}
|
|
return e.reduce(function(l, c) {
|
|
var f = r[c];
|
|
return f === void 0 && (f = r[c.replace(/ \S+$/, " 0")]), l + (f || 0);
|
|
}, 0);
|
|
};
|
|
function HA(e, t) {
|
|
var r = ke.nodeVersions.filter(function(i) {
|
|
return K$(i, t.version);
|
|
});
|
|
if (r.length === 0) {
|
|
if (e.ignoreUnknownVersions)
|
|
return [];
|
|
throw new _i(
|
|
"Unknown version " + t.version + " of Node.js"
|
|
);
|
|
}
|
|
return ["node " + r[r.length - 1]];
|
|
}
|
|
s(HA, "nodeQuery");
|
|
function KA(e, t) {
|
|
var r = parseInt(t.year), i = parseInt(t.month || "01") - 1, n = parseInt(t.day || "01");
|
|
return G$(Date.UTC(r, i, n, 0, 0, 0), e);
|
|
}
|
|
s(KA, "sinceQuery");
|
|
function V$(e, t) {
|
|
var r = parseFloat(t.coverage), i = ke.usage.global;
|
|
if (t.place)
|
|
if (t.place.match(/^my\s+stats$/i)) {
|
|
if (!e.customUsage)
|
|
throw new _i("Custom usage statistics was not provided");
|
|
i = e.customUsage;
|
|
} else {
|
|
var n;
|
|
t.place.length === 2 ? n = t.place.toUpperCase() : n = t.place.toLowerCase(), Rr.loadCountry(ke.usage, n, ke.data), i = ke.usage[n];
|
|
}
|
|
for (var a = Object.keys(i).sort(function(f, m) {
|
|
return i[m] - i[f];
|
|
}), o = 0, u = [], l, c = 0; c < a.length && (l = a[c], !(i[l] === 0 || (o += i[l], u.push(l), o >= r))); c++)
|
|
;
|
|
return u;
|
|
}
|
|
s(V$, "coverQuery");
|
|
var JA = {
|
|
last_major_versions: {
|
|
matches: ["versions"],
|
|
regexp: /^last\s+(\d+)\s+major\s+versions?$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
return Object.keys(ea).reduce(function(r, i) {
|
|
var n = ro(i, e);
|
|
if (!n) return r;
|
|
var a = og(n.released, t.versions);
|
|
return a = a.map(eo(n.name)), a = lg(a, n.name, t.versions, e), r.concat(a);
|
|
}, []);
|
|
}, "select")
|
|
},
|
|
last_versions: {
|
|
matches: ["versions"],
|
|
regexp: /^last\s+(\d+)\s+versions?$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
return Object.keys(ea).reduce(function(r, i) {
|
|
var n = ro(i, e);
|
|
if (!n) return r;
|
|
var a = n.released.slice(-t.versions);
|
|
return a = a.map(eo(n.name)), a = lg(a, n.name, t.versions, e), r.concat(a);
|
|
}, []);
|
|
}, "select")
|
|
},
|
|
last_electron_major_versions: {
|
|
matches: ["versions"],
|
|
regexp: /^last\s+(\d+)\s+electron\s+major\s+versions?$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = og(Object.keys(In), t.versions);
|
|
return r.map(function(i) {
|
|
return "chrome " + In[i];
|
|
});
|
|
}, "select")
|
|
},
|
|
last_node_major_versions: {
|
|
matches: ["versions"],
|
|
regexp: /^last\s+(\d+)\s+node\s+major\s+versions?$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
return og(ke.nodeVersions, t.versions).map(
|
|
function(r) {
|
|
return "node " + r;
|
|
}
|
|
);
|
|
}, "select")
|
|
},
|
|
last_browser_major_versions: {
|
|
matches: ["versions", "browser"],
|
|
regexp: /^last\s+(\d+)\s+(\w+)\s+major\s+versions?$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = ac(t.browser, e), i = og(r.released, t.versions), n = i.map(eo(r.name));
|
|
return n = lg(n, r.name, t.versions, e), n;
|
|
}, "select")
|
|
},
|
|
last_electron_versions: {
|
|
matches: ["versions"],
|
|
regexp: /^last\s+(\d+)\s+electron\s+versions?$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
return Object.keys(In).slice(-t.versions).map(function(r) {
|
|
return "chrome " + In[r];
|
|
});
|
|
}, "select")
|
|
},
|
|
last_node_versions: {
|
|
matches: ["versions"],
|
|
regexp: /^last\s+(\d+)\s+node\s+versions?$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
return ke.nodeVersions.slice(-t.versions).map(function(r) {
|
|
return "node " + r;
|
|
});
|
|
}, "select")
|
|
},
|
|
last_browser_versions: {
|
|
matches: ["versions", "browser"],
|
|
regexp: /^last\s+(\d+)\s+(\w+)\s+versions?$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = ac(t.browser, e), i = r.released.slice(-t.versions).map(eo(r.name));
|
|
return i = lg(i, r.name, t.versions, e), i;
|
|
}, "select")
|
|
},
|
|
unreleased_versions: {
|
|
matches: [],
|
|
regexp: /^unreleased\s+versions$/i,
|
|
select: /* @__PURE__ */ s(function(e) {
|
|
return Object.keys(ea).reduce(function(t, r) {
|
|
var i = ro(r, e);
|
|
if (!i) return t;
|
|
var n = i.versions.filter(function(a) {
|
|
return i.released.indexOf(a) === -1;
|
|
});
|
|
return n = n.map(eo(i.name)), t.concat(n);
|
|
}, []);
|
|
}, "select")
|
|
},
|
|
unreleased_electron_versions: {
|
|
matches: [],
|
|
regexp: /^unreleased\s+electron\s+versions?$/i,
|
|
select: /* @__PURE__ */ s(function() {
|
|
return [];
|
|
}, "select")
|
|
},
|
|
unreleased_browser_versions: {
|
|
matches: ["browser"],
|
|
regexp: /^unreleased\s+(\w+)\s+versions?$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = ac(t.browser, e);
|
|
return r.versions.filter(function(i) {
|
|
return r.released.indexOf(i) === -1;
|
|
}).map(eo(r.name));
|
|
}, "select")
|
|
},
|
|
last_years: {
|
|
matches: ["years"],
|
|
regexp: /^last\s+(\d*.?\d+)\s+years?$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
return G$(Date.now() - Mqe * t.years, e);
|
|
}, "select")
|
|
},
|
|
since_y: {
|
|
matches: ["year"],
|
|
regexp: /^since (\d+)$/i,
|
|
select: KA
|
|
},
|
|
since_y_m: {
|
|
matches: ["year", "month"],
|
|
regexp: /^since (\d+)-(\d+)$/i,
|
|
select: KA
|
|
},
|
|
since_y_m_d: {
|
|
matches: ["year", "month", "day"],
|
|
regexp: /^since (\d+)-(\d+)-(\d+)$/i,
|
|
select: KA
|
|
},
|
|
popularity: {
|
|
matches: ["sign", "popularity"],
|
|
regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%$/,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = parseFloat(t.popularity), i = ke.usage.global;
|
|
return Object.keys(i).reduce(function(n, a) {
|
|
return t.sign === ">" ? i[a] > r && n.push(a) : t.sign === "<" ? i[a] < r && n.push(a) : t.sign === "<=" ? i[a] <= r && n.push(a) :
|
|
i[a] >= r && n.push(a), n;
|
|
}, []);
|
|
}, "select")
|
|
},
|
|
popularity_in_my_stats: {
|
|
matches: ["sign", "popularity"],
|
|
regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+my\s+stats$/,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = parseFloat(t.popularity);
|
|
if (!e.customUsage)
|
|
throw new _i("Custom usage statistics was not provided");
|
|
var i = e.customUsage;
|
|
return Object.keys(i).reduce(function(n, a) {
|
|
var o = i[a];
|
|
return o == null || (t.sign === ">" ? o > r && n.push(a) : t.sign === "<" ? o < r && n.push(a) : t.sign === "<=" ? o <= r && n.push(
|
|
a) : o >= r && n.push(a)), n;
|
|
}, []);
|
|
}, "select")
|
|
},
|
|
popularity_in_config_stats: {
|
|
matches: ["sign", "popularity", "config"],
|
|
regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+(\S+)\s+stats$/,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = parseFloat(t.popularity), i = Rr.loadStat(e, t.config, ke.data);
|
|
if (i) {
|
|
e.customUsage = {};
|
|
for (var n in i)
|
|
dg(e.customUsage, n, i[n]);
|
|
}
|
|
if (!e.customUsage)
|
|
throw new _i("Custom usage statistics was not provided");
|
|
var a = e.customUsage;
|
|
return Object.keys(a).reduce(function(o, u) {
|
|
var l = a[u];
|
|
return l == null || (t.sign === ">" ? l > r && o.push(u) : t.sign === "<" ? l < r && o.push(u) : t.sign === "<=" ? l <= r && o.push(
|
|
u) : l >= r && o.push(u)), o;
|
|
}, []);
|
|
}, "select")
|
|
},
|
|
popularity_in_place: {
|
|
matches: ["sign", "popularity", "place"],
|
|
regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+((alt-)?\w\w)$/,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = parseFloat(t.popularity), i = t.place;
|
|
i.length === 2 ? i = i.toUpperCase() : i = i.toLowerCase(), Rr.loadCountry(ke.usage, i, ke.data);
|
|
var n = ke.usage[i];
|
|
return Object.keys(n).reduce(function(a, o) {
|
|
var u = n[o];
|
|
return u == null || (t.sign === ">" ? u > r && a.push(o) : t.sign === "<" ? u < r && a.push(o) : t.sign === "<=" ? u <= r && a.push(
|
|
o) : u >= r && a.push(o)), a;
|
|
}, []);
|
|
}, "select")
|
|
},
|
|
cover: {
|
|
matches: ["coverage"],
|
|
regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%$/i,
|
|
select: V$
|
|
},
|
|
cover_in: {
|
|
matches: ["coverage", "place"],
|
|
regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%\s+in\s+(my\s+stats|(alt-)?\w\w)$/i,
|
|
select: V$
|
|
},
|
|
supports: {
|
|
matches: ["supportType", "feature"],
|
|
regexp: /^(?:(fully|partially)\s+)?supports\s+([\w-]+)$/,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
Rr.loadFeature(ke.cache, t.feature);
|
|
var r = t.supportType !== "fully", i = ke.cache[t.feature], n = [];
|
|
for (var a in i) {
|
|
for (var o = ro(a, e), u = o.released.length - 1; u >= 0 && !(o.released[u] in i[a]); )
|
|
u--;
|
|
var l = e.mobileToDesktop && a in ke.desktopNames && $$(i[a][o.released[u]], r);
|
|
o.versions.forEach(function(c) {
|
|
var f = i[a][c];
|
|
f === void 0 && l && (f = i[ke.desktopNames[a]][c]), $$(f, r) && n.push(a + " " + c);
|
|
});
|
|
}
|
|
return n;
|
|
}, "select")
|
|
},
|
|
electron_range: {
|
|
matches: ["from", "to"],
|
|
regexp: /^electron\s+([\d.]+)\s*-\s*([\d.]+)$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = ag(t.from), i = ag(t.to), n = parseFloat(t.from), a = parseFloat(t.to);
|
|
if (!In[r])
|
|
throw new _i("Unknown version " + n + " of electron");
|
|
if (!In[i])
|
|
throw new _i("Unknown version " + a + " of electron");
|
|
return Object.keys(In).filter(function(o) {
|
|
var u = parseFloat(o);
|
|
return u >= n && u <= a;
|
|
}).map(function(o) {
|
|
return "chrome " + In[o];
|
|
});
|
|
}, "select")
|
|
},
|
|
node_range: {
|
|
matches: ["from", "to"],
|
|
regexp: /^node\s+([\d.]+)\s*-\s*([\d.]+)$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
return ke.nodeVersions.filter(L$(">=", t.from)).filter(L$("<=", t.to)).map(function(r) {
|
|
return "node " + r;
|
|
});
|
|
}, "select")
|
|
},
|
|
browser_range: {
|
|
matches: ["browser", "from", "to"],
|
|
regexp: /^(\w+)\s+([\d.]+)\s*-\s*([\d.]+)$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = ac(t.browser, e), i = parseFloat(ug(r, t.from) || t.from), n = parseFloat(ug(r, t.to) || t.to);
|
|
function a(o) {
|
|
var u = parseFloat(o);
|
|
return u >= i && u <= n;
|
|
}
|
|
return s(a, "filter"), r.released.filter(a).map(eo(r.name));
|
|
}, "select")
|
|
},
|
|
electron_ray: {
|
|
matches: ["sign", "version"],
|
|
regexp: /^electron\s*(>=?|<=?)\s*([\d.]+)$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = ag(t.version);
|
|
return Object.keys(In).filter(j$(t.sign, r)).map(function(i) {
|
|
return "chrome " + In[i];
|
|
});
|
|
}, "select")
|
|
},
|
|
node_ray: {
|
|
matches: ["sign", "version"],
|
|
regexp: /^node\s*(>=?|<=?)\s*([\d.]+)$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
return ke.nodeVersions.filter(Lqe(t.sign, t.version)).map(function(r) {
|
|
return "node " + r;
|
|
});
|
|
}, "select")
|
|
},
|
|
browser_ray: {
|
|
matches: ["browser", "sign", "version"],
|
|
regexp: /^(\w+)\s*(>=?|<=?)\s*([\d.]+)$/,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = t.version, i = ac(t.browser, e), n = ke.versionAliases[i.name][r];
|
|
return n && (r = n), i.released.filter(j$(t.sign, r)).map(function(a) {
|
|
return i.name + " " + a;
|
|
});
|
|
}, "select")
|
|
},
|
|
firefox_esr: {
|
|
matches: [],
|
|
regexp: /^(firefox|ff|fx)\s+esr$/i,
|
|
select: /* @__PURE__ */ s(function() {
|
|
return ["firefox 128"];
|
|
}, "select")
|
|
},
|
|
opera_mini_all: {
|
|
matches: [],
|
|
regexp: /(operamini|op_mini)\s+all/i,
|
|
select: /* @__PURE__ */ s(function() {
|
|
return ["op_mini all"];
|
|
}, "select")
|
|
},
|
|
electron_version: {
|
|
matches: ["version"],
|
|
regexp: /^electron\s+([\d.]+)$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = ag(t.version), i = In[r];
|
|
if (!i)
|
|
throw new _i(
|
|
"Unknown version " + t.version + " of electron"
|
|
);
|
|
return ["chrome " + i];
|
|
}, "select")
|
|
},
|
|
node_major_version: {
|
|
matches: ["version"],
|
|
regexp: /^node\s+(\d+)$/i,
|
|
select: HA
|
|
},
|
|
node_minor_version: {
|
|
matches: ["version"],
|
|
regexp: /^node\s+(\d+\.\d+)$/i,
|
|
select: HA
|
|
},
|
|
node_patch_version: {
|
|
matches: ["version"],
|
|
regexp: /^node\s+(\d+\.\d+\.\d+)$/i,
|
|
select: HA
|
|
},
|
|
current_node: {
|
|
matches: [],
|
|
regexp: /^current\s+node$/i,
|
|
select: /* @__PURE__ */ s(function(e) {
|
|
return [Rr.currentNode(oc, e)];
|
|
}, "select")
|
|
},
|
|
maintained_node: {
|
|
matches: [],
|
|
regexp: /^maintained\s+node\s+versions$/i,
|
|
select: /* @__PURE__ */ s(function(e) {
|
|
var t = Date.now(), r = Object.keys(WA).filter(function(i) {
|
|
return t < Date.parse(WA[i].end) && t > Date.parse(WA[i].start) && jqe(i);
|
|
}).map(function(i) {
|
|
return "node " + i.slice(1);
|
|
});
|
|
return oc(r, e);
|
|
}, "select")
|
|
},
|
|
phantomjs_1_9: {
|
|
matches: [],
|
|
regexp: /^phantomjs\s+1.9$/i,
|
|
select: /* @__PURE__ */ s(function() {
|
|
return ["safari 5"];
|
|
}, "select")
|
|
},
|
|
phantomjs_2_1: {
|
|
matches: [],
|
|
regexp: /^phantomjs\s+2.1$/i,
|
|
select: /* @__PURE__ */ s(function() {
|
|
return ["safari 6"];
|
|
}, "select")
|
|
},
|
|
browser_version: {
|
|
matches: ["browser", "version"],
|
|
regexp: /^(\w+)\s+(tp|[\d.]+)$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
var r = t.version;
|
|
/^tp$/i.test(r) && (r = "TP");
|
|
var i = ac(t.browser, e), n = ug(i, r);
|
|
if (n)
|
|
r = n;
|
|
else if (r.indexOf(".") === -1 ? n = r + ".0" : n = r.replace(/\.0$/, ""), n = ug(i, n), n)
|
|
r = n;
|
|
else {
|
|
if (e.ignoreUnknownVersions)
|
|
return [];
|
|
throw new _i(
|
|
"Unknown version " + r + " of " + t.browser
|
|
);
|
|
}
|
|
return [i.name + " " + r];
|
|
}, "select")
|
|
},
|
|
browserslist_config: {
|
|
matches: [],
|
|
regexp: /^browserslist config$/i,
|
|
needsPath: !0,
|
|
select: /* @__PURE__ */ s(function(e) {
|
|
return ke(void 0, e);
|
|
}, "select")
|
|
},
|
|
extends: {
|
|
matches: ["config"],
|
|
regexp: /^extends (.+)$/i,
|
|
needsPath: !0,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
return oc(Rr.loadQueries(e, t.config), e);
|
|
}, "select")
|
|
},
|
|
defaults: {
|
|
matches: [],
|
|
regexp: /^defaults$/i,
|
|
select: /* @__PURE__ */ s(function(e) {
|
|
return oc(ke.defaults, e);
|
|
}, "select")
|
|
},
|
|
dead: {
|
|
matches: [],
|
|
regexp: /^dead$/i,
|
|
select: /* @__PURE__ */ s(function(e) {
|
|
var t = [
|
|
"Baidu >= 0",
|
|
"ie <= 11",
|
|
"ie_mob <= 11",
|
|
"bb <= 10",
|
|
"op_mob <= 12.1",
|
|
"samsung 4"
|
|
];
|
|
return oc(t, e);
|
|
}, "select")
|
|
},
|
|
unknown: {
|
|
matches: [],
|
|
regexp: /^(\w+)$/i,
|
|
select: /* @__PURE__ */ s(function(e, t) {
|
|
throw ro(t.query, e) ? new _i(
|
|
"Specify versions in Browserslist query for browser " + t.query
|
|
) : $qe(t.query);
|
|
}, "select")
|
|
}
|
|
};
|
|
(function() {
|
|
for (var e in ea) {
|
|
var t = ea[e];
|
|
ke.data[e] = {
|
|
name: e,
|
|
versions: R$(ea[e].versions),
|
|
released: R$(ea[e].versions.slice(0, -3)),
|
|
releaseDate: ea[e].release_date
|
|
}, dg(ke.usage.global, e, t.usage_global), ke.versionAliases[e] = {};
|
|
for (var r = 0; r < t.versions.length; r++) {
|
|
var i = t.versions[r];
|
|
if (i && i.indexOf("-") !== -1)
|
|
for (var n = i.split("-"), a = 0; a < n.length; a++)
|
|
ke.versionAliases[e][n[a]] = i;
|
|
}
|
|
}
|
|
ke.nodeVersions = Bqe.map(function(o) {
|
|
return o.version;
|
|
});
|
|
})();
|
|
Z$.exports = ke;
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-validator-option/lib/find-suggestion.js
|
|
var YA = E((XA) => {
|
|
"use strict";
|
|
Object.defineProperty(XA, "__esModule", {
|
|
value: !0
|
|
});
|
|
XA.findSuggestion = Hqe;
|
|
var {
|
|
min: eV
|
|
} = Math;
|
|
function Vqe(e, t) {
|
|
let r = [], i = [], n, a, o = e.length, u = t.length;
|
|
if (!o)
|
|
return u;
|
|
if (!u)
|
|
return o;
|
|
for (a = 0; a <= u; a++)
|
|
r[a] = a;
|
|
for (n = 1; n <= o; n++) {
|
|
for (i = [n], a = 1; a <= u; a++)
|
|
i[a] = e[n - 1] === t[a - 1] ? r[a - 1] : eV(r[a - 1], r[a], i[a - 1]) + 1;
|
|
r = i;
|
|
}
|
|
return i[u];
|
|
}
|
|
s(Vqe, "levenshtein");
|
|
function Hqe(e, t) {
|
|
let r = t.map((i) => Vqe(i, e));
|
|
return t[r.indexOf(eV(...r))];
|
|
}
|
|
s(Hqe, "findSuggestion");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-validator-option/lib/validator.js
|
|
var tV = E((pg) => {
|
|
"use strict";
|
|
Object.defineProperty(pg, "__esModule", {
|
|
value: !0
|
|
});
|
|
pg.OptionValidator = void 0;
|
|
var Kqe = YA(), ZA = class {
|
|
static {
|
|
s(this, "OptionValidator");
|
|
}
|
|
constructor(t) {
|
|
this.descriptor = t;
|
|
}
|
|
validateTopLevelOptions(t, r) {
|
|
let i = Object.keys(r);
|
|
for (let n of Object.keys(t))
|
|
if (!i.includes(n))
|
|
throw new Error(this.formatMessage(`'${n}' is not a valid top-level option.
|
|
- Did you mean '${(0, Kqe.findSuggestion)(n, i)}'?`));
|
|
}
|
|
validateBooleanOption(t, r, i) {
|
|
return r === void 0 ? i : (this.invariant(typeof r == "boolean", `'${t}' option must be a boolean.`), r);
|
|
}
|
|
validateStringOption(t, r, i) {
|
|
return r === void 0 ? i : (this.invariant(typeof r == "string", `'${t}' option must be a string.`), r);
|
|
}
|
|
invariant(t, r) {
|
|
if (!t)
|
|
throw new Error(this.formatMessage(r));
|
|
}
|
|
formatMessage(t) {
|
|
return `${this.descriptor}: ${t}`;
|
|
}
|
|
};
|
|
pg.OptionValidator = ZA;
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-validator-option/lib/index.js
|
|
var mg = E((hg) => {
|
|
"use strict";
|
|
Object.defineProperty(hg, "__esModule", {
|
|
value: !0
|
|
});
|
|
Object.defineProperty(hg, "OptionValidator", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return zqe.OptionValidator;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(hg, "findSuggestion", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Gqe.findSuggestion;
|
|
}, "get")
|
|
});
|
|
var zqe = tV(), Gqe = YA();
|
|
});
|
|
|
|
// ../node_modules/@babel/compat-data/data/native-modules.json
|
|
var rV = E((ymt, Jqe) => {
|
|
Jqe.exports = {
|
|
"es6.module": {
|
|
chrome: "61",
|
|
and_chr: "61",
|
|
edge: "16",
|
|
firefox: "60",
|
|
and_ff: "60",
|
|
node: "13.2.0",
|
|
opera: "48",
|
|
op_mob: "45",
|
|
safari: "10.1",
|
|
ios: "10.3",
|
|
samsung: "8.2",
|
|
android: "61",
|
|
electron: "2.0",
|
|
ios_saf: "10.3"
|
|
}
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/compat-data/native-modules.js
|
|
var nV = E((gmt, iV) => {
|
|
iV.exports = rV();
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-compilation-targets/node_modules/yallist/iterator.js
|
|
var aV = E((bmt, sV) => {
|
|
"use strict";
|
|
sV.exports = function(e) {
|
|
e.prototype[Symbol.iterator] = function* () {
|
|
for (let t = this.head; t; t = t.next)
|
|
yield t.value;
|
|
};
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-compilation-targets/node_modules/yallist/yallist.js
|
|
var uV = E((Dmt, oV) => {
|
|
"use strict";
|
|
oV.exports = Tt;
|
|
Tt.Node = hu;
|
|
Tt.create = Tt;
|
|
function Tt(e) {
|
|
var t = this;
|
|
if (t instanceof Tt || (t = new Tt()), t.tail = null, t.head = null, t.length = 0, e && typeof e.forEach == "function")
|
|
e.forEach(function(n) {
|
|
t.push(n);
|
|
});
|
|
else if (arguments.length > 0)
|
|
for (var r = 0, i = arguments.length; r < i; r++)
|
|
t.push(arguments[r]);
|
|
return t;
|
|
}
|
|
s(Tt, "Yallist");
|
|
Tt.prototype.removeNode = function(e) {
|
|
if (e.list !== this)
|
|
throw new Error("removing node which does not belong to this list");
|
|
var t = e.next, r = e.prev;
|
|
return t && (t.prev = r), r && (r.next = t), e === this.head && (this.head = t), e === this.tail && (this.tail = r), e.list.length--, e.
|
|
next = null, e.prev = null, e.list = null, t;
|
|
};
|
|
Tt.prototype.unshiftNode = function(e) {
|
|
if (e !== this.head) {
|
|
e.list && e.list.removeNode(e);
|
|
var t = this.head;
|
|
e.list = this, e.next = t, t && (t.prev = e), this.head = e, this.tail || (this.tail = e), this.length++;
|
|
}
|
|
};
|
|
Tt.prototype.pushNode = function(e) {
|
|
if (e !== this.tail) {
|
|
e.list && e.list.removeNode(e);
|
|
var t = this.tail;
|
|
e.list = this, e.prev = t, t && (t.next = e), this.tail = e, this.head || (this.head = e), this.length++;
|
|
}
|
|
};
|
|
Tt.prototype.push = function() {
|
|
for (var e = 0, t = arguments.length; e < t; e++)
|
|
Yqe(this, arguments[e]);
|
|
return this.length;
|
|
};
|
|
Tt.prototype.unshift = function() {
|
|
for (var e = 0, t = arguments.length; e < t; e++)
|
|
Zqe(this, arguments[e]);
|
|
return this.length;
|
|
};
|
|
Tt.prototype.pop = function() {
|
|
if (this.tail) {
|
|
var e = this.tail.value;
|
|
return this.tail = this.tail.prev, this.tail ? this.tail.next = null : this.head = null, this.length--, e;
|
|
}
|
|
};
|
|
Tt.prototype.shift = function() {
|
|
if (this.head) {
|
|
var e = this.head.value;
|
|
return this.head = this.head.next, this.head ? this.head.prev = null : this.tail = null, this.length--, e;
|
|
}
|
|
};
|
|
Tt.prototype.forEach = function(e, t) {
|
|
t = t || this;
|
|
for (var r = this.head, i = 0; r !== null; i++)
|
|
e.call(t, r.value, i, this), r = r.next;
|
|
};
|
|
Tt.prototype.forEachReverse = function(e, t) {
|
|
t = t || this;
|
|
for (var r = this.tail, i = this.length - 1; r !== null; i--)
|
|
e.call(t, r.value, i, this), r = r.prev;
|
|
};
|
|
Tt.prototype.get = function(e) {
|
|
for (var t = 0, r = this.head; r !== null && t < e; t++)
|
|
r = r.next;
|
|
if (t === e && r !== null)
|
|
return r.value;
|
|
};
|
|
Tt.prototype.getReverse = function(e) {
|
|
for (var t = 0, r = this.tail; r !== null && t < e; t++)
|
|
r = r.prev;
|
|
if (t === e && r !== null)
|
|
return r.value;
|
|
};
|
|
Tt.prototype.map = function(e, t) {
|
|
t = t || this;
|
|
for (var r = new Tt(), i = this.head; i !== null; )
|
|
r.push(e.call(t, i.value, this)), i = i.next;
|
|
return r;
|
|
};
|
|
Tt.prototype.mapReverse = function(e, t) {
|
|
t = t || this;
|
|
for (var r = new Tt(), i = this.tail; i !== null; )
|
|
r.push(e.call(t, i.value, this)), i = i.prev;
|
|
return r;
|
|
};
|
|
Tt.prototype.reduce = function(e, t) {
|
|
var r, i = this.head;
|
|
if (arguments.length > 1)
|
|
r = t;
|
|
else if (this.head)
|
|
i = this.head.next, r = this.head.value;
|
|
else
|
|
throw new TypeError("Reduce of empty list with no initial value");
|
|
for (var n = 0; i !== null; n++)
|
|
r = e(r, i.value, n), i = i.next;
|
|
return r;
|
|
};
|
|
Tt.prototype.reduceReverse = function(e, t) {
|
|
var r, i = this.tail;
|
|
if (arguments.length > 1)
|
|
r = t;
|
|
else if (this.tail)
|
|
i = this.tail.prev, r = this.tail.value;
|
|
else
|
|
throw new TypeError("Reduce of empty list with no initial value");
|
|
for (var n = this.length - 1; i !== null; n--)
|
|
r = e(r, i.value, n), i = i.prev;
|
|
return r;
|
|
};
|
|
Tt.prototype.toArray = function() {
|
|
for (var e = new Array(this.length), t = 0, r = this.head; r !== null; t++)
|
|
e[t] = r.value, r = r.next;
|
|
return e;
|
|
};
|
|
Tt.prototype.toArrayReverse = function() {
|
|
for (var e = new Array(this.length), t = 0, r = this.tail; r !== null; t++)
|
|
e[t] = r.value, r = r.prev;
|
|
return e;
|
|
};
|
|
Tt.prototype.slice = function(e, t) {
|
|
t = t || this.length, t < 0 && (t += this.length), e = e || 0, e < 0 && (e += this.length);
|
|
var r = new Tt();
|
|
if (t < e || t < 0)
|
|
return r;
|
|
e < 0 && (e = 0), t > this.length && (t = this.length);
|
|
for (var i = 0, n = this.head; n !== null && i < e; i++)
|
|
n = n.next;
|
|
for (; n !== null && i < t; i++, n = n.next)
|
|
r.push(n.value);
|
|
return r;
|
|
};
|
|
Tt.prototype.sliceReverse = function(e, t) {
|
|
t = t || this.length, t < 0 && (t += this.length), e = e || 0, e < 0 && (e += this.length);
|
|
var r = new Tt();
|
|
if (t < e || t < 0)
|
|
return r;
|
|
e < 0 && (e = 0), t > this.length && (t = this.length);
|
|
for (var i = this.length, n = this.tail; n !== null && i > t; i--)
|
|
n = n.prev;
|
|
for (; n !== null && i > e; i--, n = n.prev)
|
|
r.push(n.value);
|
|
return r;
|
|
};
|
|
Tt.prototype.splice = function(e, t) {
|
|
e > this.length && (e = this.length - 1), e < 0 && (e = this.length + e);
|
|
for (var r = 0, i = this.head; i !== null && r < e; r++)
|
|
i = i.next;
|
|
for (var n = [], r = 0; i && r < t; r++)
|
|
n.push(i.value), i = this.removeNode(i);
|
|
i === null && (i = this.tail), i !== this.head && i !== this.tail && (i = i.prev);
|
|
for (var r = 2; r < arguments.length; r++)
|
|
i = Xqe(this, i, arguments[r]);
|
|
return n;
|
|
};
|
|
Tt.prototype.reverse = function() {
|
|
for (var e = this.head, t = this.tail, r = e; r !== null; r = r.prev) {
|
|
var i = r.prev;
|
|
r.prev = r.next, r.next = i;
|
|
}
|
|
return this.head = t, this.tail = e, this;
|
|
};
|
|
function Xqe(e, t, r) {
|
|
var i = t === e.head ? new hu(r, null, t, e) : new hu(r, t, t.next, e);
|
|
return i.next === null && (e.tail = i), i.prev === null && (e.head = i), e.length++, i;
|
|
}
|
|
s(Xqe, "insert");
|
|
function Yqe(e, t) {
|
|
e.tail = new hu(t, e.tail, null, e), e.head || (e.head = e.tail), e.length++;
|
|
}
|
|
s(Yqe, "push");
|
|
function Zqe(e, t) {
|
|
e.head = new hu(t, null, e.head, e), e.tail || (e.tail = e.head), e.length++;
|
|
}
|
|
s(Zqe, "unshift");
|
|
function hu(e, t, r, i) {
|
|
if (!(this instanceof hu))
|
|
return new hu(e, t, r, i);
|
|
this.list = i, this.value = e, t ? (t.next = this, this.prev = t) : this.prev = null, r ? (r.prev = this, this.next = r) : this.next = null;
|
|
}
|
|
s(hu, "Node");
|
|
try {
|
|
aV()(Tt);
|
|
} catch {
|
|
}
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/index.js
|
|
var pV = E((Emt, dV) => {
|
|
"use strict";
|
|
var Qqe = uV(), mu = Symbol("max"), ra = Symbol("length"), uc = Symbol("lengthCalculator"), op = Symbol("allowStale"), yu = Symbol("maxAge"),
|
|
ta = Symbol("dispose"), lV = Symbol("noDisposeOnSet"), jr = Symbol("lruList"), On = Symbol("cache"), fV = Symbol("updateAgeOnGet"), QA = /* @__PURE__ */ s(
|
|
() => 1, "naiveLength"), t_ = class {
|
|
static {
|
|
s(this, "LRUCache");
|
|
}
|
|
constructor(t) {
|
|
if (typeof t == "number" && (t = { max: t }), t || (t = {}), t.max && (typeof t.max != "number" || t.max < 0))
|
|
throw new TypeError("max must be a non-negative number");
|
|
let r = this[mu] = t.max || 1 / 0, i = t.length || QA;
|
|
if (this[uc] = typeof i != "function" ? QA : i, this[op] = t.stale || !1, t.maxAge && typeof t.maxAge != "number")
|
|
throw new TypeError("maxAge must be a number");
|
|
this[yu] = t.maxAge || 0, this[ta] = t.dispose, this[lV] = t.noDisposeOnSet || !1, this[fV] = t.updateAgeOnGet || !1, this.reset();
|
|
}
|
|
// resize the cache when the max changes.
|
|
set max(t) {
|
|
if (typeof t != "number" || t < 0)
|
|
throw new TypeError("max must be a non-negative number");
|
|
this[mu] = t || 1 / 0, ap(this);
|
|
}
|
|
get max() {
|
|
return this[mu];
|
|
}
|
|
set allowStale(t) {
|
|
this[op] = !!t;
|
|
}
|
|
get allowStale() {
|
|
return this[op];
|
|
}
|
|
set maxAge(t) {
|
|
if (typeof t != "number")
|
|
throw new TypeError("maxAge must be a non-negative number");
|
|
this[yu] = t, ap(this);
|
|
}
|
|
get maxAge() {
|
|
return this[yu];
|
|
}
|
|
// resize the cache when the lengthCalculator changes.
|
|
set lengthCalculator(t) {
|
|
typeof t != "function" && (t = QA), t !== this[uc] && (this[uc] = t, this[ra] = 0, this[jr].forEach((r) => {
|
|
r.length = this[uc](r.value, r.key), this[ra] += r.length;
|
|
})), ap(this);
|
|
}
|
|
get lengthCalculator() {
|
|
return this[uc];
|
|
}
|
|
get length() {
|
|
return this[ra];
|
|
}
|
|
get itemCount() {
|
|
return this[jr].length;
|
|
}
|
|
rforEach(t, r) {
|
|
r = r || this;
|
|
for (let i = this[jr].tail; i !== null; ) {
|
|
let n = i.prev;
|
|
cV(this, t, i, r), i = n;
|
|
}
|
|
}
|
|
forEach(t, r) {
|
|
r = r || this;
|
|
for (let i = this[jr].head; i !== null; ) {
|
|
let n = i.next;
|
|
cV(this, t, i, r), i = n;
|
|
}
|
|
}
|
|
keys() {
|
|
return this[jr].toArray().map((t) => t.key);
|
|
}
|
|
values() {
|
|
return this[jr].toArray().map((t) => t.value);
|
|
}
|
|
reset() {
|
|
this[ta] && this[jr] && this[jr].length && this[jr].forEach((t) => this[ta](t.key, t.value)), this[On] = /* @__PURE__ */ new Map(), this[jr] =
|
|
new Qqe(), this[ra] = 0;
|
|
}
|
|
dump() {
|
|
return this[jr].map((t) => yg(this, t) ? !1 : {
|
|
k: t.key,
|
|
v: t.value,
|
|
e: t.now + (t.maxAge || 0)
|
|
}).toArray().filter((t) => t);
|
|
}
|
|
dumpLru() {
|
|
return this[jr];
|
|
}
|
|
set(t, r, i) {
|
|
if (i = i || this[yu], i && typeof i != "number")
|
|
throw new TypeError("maxAge must be a number");
|
|
let n = i ? Date.now() : 0, a = this[uc](r, t);
|
|
if (this[On].has(t)) {
|
|
if (a > this[mu])
|
|
return lc(this, this[On].get(t)), !1;
|
|
let l = this[On].get(t).value;
|
|
return this[ta] && (this[lV] || this[ta](t, l.value)), l.now = n, l.maxAge = i, l.value = r, this[ra] += a - l.length, l.length = a,
|
|
this.get(t), ap(this), !0;
|
|
}
|
|
let o = new r_(t, r, a, n, i);
|
|
return o.length > this[mu] ? (this[ta] && this[ta](t, r), !1) : (this[ra] += o.length, this[jr].unshift(o), this[On].set(t, this[jr].head),
|
|
ap(this), !0);
|
|
}
|
|
has(t) {
|
|
if (!this[On].has(t)) return !1;
|
|
let r = this[On].get(t).value;
|
|
return !yg(this, r);
|
|
}
|
|
get(t) {
|
|
return e_(this, t, !0);
|
|
}
|
|
peek(t) {
|
|
return e_(this, t, !1);
|
|
}
|
|
pop() {
|
|
let t = this[jr].tail;
|
|
return t ? (lc(this, t), t.value) : null;
|
|
}
|
|
del(t) {
|
|
lc(this, this[On].get(t));
|
|
}
|
|
load(t) {
|
|
this.reset();
|
|
let r = Date.now();
|
|
for (let i = t.length - 1; i >= 0; i--) {
|
|
let n = t[i], a = n.e || 0;
|
|
if (a === 0)
|
|
this.set(n.k, n.v);
|
|
else {
|
|
let o = a - r;
|
|
o > 0 && this.set(n.k, n.v, o);
|
|
}
|
|
}
|
|
}
|
|
prune() {
|
|
this[On].forEach((t, r) => e_(this, r, !1));
|
|
}
|
|
}, e_ = /* @__PURE__ */ s((e, t, r) => {
|
|
let i = e[On].get(t);
|
|
if (i) {
|
|
let n = i.value;
|
|
if (yg(e, n)) {
|
|
if (lc(e, i), !e[op])
|
|
return;
|
|
} else
|
|
r && (e[fV] && (i.value.now = Date.now()), e[jr].unshiftNode(i));
|
|
return n.value;
|
|
}
|
|
}, "get"), yg = /* @__PURE__ */ s((e, t) => {
|
|
if (!t || !t.maxAge && !e[yu])
|
|
return !1;
|
|
let r = Date.now() - t.now;
|
|
return t.maxAge ? r > t.maxAge : e[yu] && r > e[yu];
|
|
}, "isStale"), ap = /* @__PURE__ */ s((e) => {
|
|
if (e[ra] > e[mu])
|
|
for (let t = e[jr].tail; e[ra] > e[mu] && t !== null; ) {
|
|
let r = t.prev;
|
|
lc(e, t), t = r;
|
|
}
|
|
}, "trim"), lc = /* @__PURE__ */ s((e, t) => {
|
|
if (t) {
|
|
let r = t.value;
|
|
e[ta] && e[ta](r.key, r.value), e[ra] -= r.length, e[On].delete(r.key), e[jr].removeNode(t);
|
|
}
|
|
}, "del"), r_ = class {
|
|
static {
|
|
s(this, "Entry");
|
|
}
|
|
constructor(t, r, i, n, a) {
|
|
this.key = t, this.value = r, this.length = i, this.now = n, this.maxAge = a || 0;
|
|
}
|
|
}, cV = /* @__PURE__ */ s((e, t, r, i) => {
|
|
let n = r.value;
|
|
yg(e, n) && (lc(e, r), e[op] || (n = void 0)), n && t.call(i, n.value, n.key, e);
|
|
}, "forEachStep");
|
|
dV.exports = t_;
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-compilation-targets/lib/targets.js
|
|
var gg = E((cc) => {
|
|
"use strict";
|
|
Object.defineProperty(cc, "__esModule", {
|
|
value: !0
|
|
});
|
|
cc.unreleasedLabels = cc.browserNameMap = void 0;
|
|
var Smt = cc.unreleasedLabels = {
|
|
safari: "tp"
|
|
}, Tmt = cc.browserNameMap = {
|
|
and_chr: "chrome",
|
|
and_ff: "firefox",
|
|
android: "android",
|
|
chrome: "chrome",
|
|
edge: "edge",
|
|
firefox: "firefox",
|
|
ie: "ie",
|
|
ie_mob: "ie",
|
|
ios_saf: "ios",
|
|
node: "node",
|
|
deno: "deno",
|
|
op_mob: "opera_mobile",
|
|
opera: "opera",
|
|
safari: "safari",
|
|
samsung: "samsung"
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-compilation-targets/lib/utils.js
|
|
var bg = E((io) => {
|
|
"use strict";
|
|
Object.defineProperty(io, "__esModule", {
|
|
value: !0
|
|
});
|
|
io.getHighestUnreleased = sUe;
|
|
io.getLowestImplementedVersion = aUe;
|
|
io.getLowestUnreleased = gV;
|
|
io.isUnreleasedVersion = nUe;
|
|
io.semverMin = yV;
|
|
io.semverify = iUe;
|
|
var hV = V("semver"), eUe = mg(), mV = gg(), tUe = /^(?:\d+|\d(?:\d?[^\d\n\r\u2028\u2029]\d+|\d{2,}(?:[^\d\n\r\u2028\u2029]\d+)?))$/, rUe = new eUe.
|
|
OptionValidator("@babel/helper-compilation-targets");
|
|
function yV(e, t) {
|
|
return e && hV.lt(e, t) ? e : t;
|
|
}
|
|
s(yV, "semverMin");
|
|
function iUe(e) {
|
|
if (typeof e == "string" && hV.valid(e))
|
|
return e;
|
|
rUe.invariant(typeof e == "number" || typeof e == "string" && tUe.test(e), `'${e}' is not a valid version`), e = e.toString();
|
|
let t = 0, r = 0;
|
|
for (; (t = e.indexOf(".", t + 1)) > 0; )
|
|
r++;
|
|
return e + ".0".repeat(2 - r);
|
|
}
|
|
s(iUe, "semverify");
|
|
function nUe(e, t) {
|
|
let r = mV.unreleasedLabels[t];
|
|
return !!r && r === e.toString().toLowerCase();
|
|
}
|
|
s(nUe, "isUnreleasedVersion");
|
|
function gV(e, t, r) {
|
|
let i = mV.unreleasedLabels[r];
|
|
return e === i ? t : t === i ? e : yV(e, t);
|
|
}
|
|
s(gV, "getLowestUnreleased");
|
|
function sUe(e, t, r) {
|
|
return gV(e, t, r) === e ? t : e;
|
|
}
|
|
s(sUe, "getHighestUnreleased");
|
|
function aUe(e, t) {
|
|
let r = e[t];
|
|
return !r && t === "android" ? e.chrome : r;
|
|
}
|
|
s(aUe, "getLowestImplementedVersion");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-compilation-targets/lib/options.js
|
|
var bV = E((Dg) => {
|
|
"use strict";
|
|
Object.defineProperty(Dg, "__esModule", {
|
|
value: !0
|
|
});
|
|
Dg.TargetNames = void 0;
|
|
var _mt = Dg.TargetNames = {
|
|
node: "node",
|
|
deno: "deno",
|
|
chrome: "chrome",
|
|
opera: "opera",
|
|
edge: "edge",
|
|
firefox: "firefox",
|
|
safari: "safari",
|
|
ie: "ie",
|
|
ios: "ios",
|
|
android: "android",
|
|
electron: "electron",
|
|
samsung: "samsung",
|
|
rhino: "rhino",
|
|
opera_mobile: "opera_mobile"
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-compilation-targets/lib/pretty.js
|
|
var i_ = E((vg) => {
|
|
"use strict";
|
|
Object.defineProperty(vg, "__esModule", {
|
|
value: !0
|
|
});
|
|
vg.prettifyTargets = lUe;
|
|
vg.prettifyVersion = DV;
|
|
var oUe = V("semver"), uUe = gg();
|
|
function DV(e) {
|
|
if (typeof e != "string")
|
|
return e;
|
|
let {
|
|
major: t,
|
|
minor: r,
|
|
patch: i
|
|
} = oUe.parse(e), n = [t];
|
|
return (r || i) && n.push(r), i && n.push(i), n.join(".");
|
|
}
|
|
s(DV, "prettifyVersion");
|
|
function lUe(e) {
|
|
return Object.keys(e).reduce((t, r) => {
|
|
let i = e[r], n = uUe.unreleasedLabels[r];
|
|
return typeof i == "string" && n !== i && (i = DV(i)), t[r] = i, t;
|
|
}, {});
|
|
}
|
|
s(lUe, "prettifyTargets");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-compilation-targets/lib/debug.js
|
|
var EV = E((n_) => {
|
|
"use strict";
|
|
Object.defineProperty(n_, "__esModule", {
|
|
value: !0
|
|
});
|
|
n_.getInclusionReasons = fUe;
|
|
var cUe = V("semver"), vV = i_(), Eg = bg();
|
|
function fUe(e, t, r) {
|
|
let i = r[e] || {};
|
|
return Object.keys(t).reduce((n, a) => {
|
|
let o = (0, Eg.getLowestImplementedVersion)(i, a), u = t[a];
|
|
if (!o)
|
|
n[a] = (0, vV.prettifyVersion)(u);
|
|
else {
|
|
let l = (0, Eg.isUnreleasedVersion)(o, a);
|
|
!(0, Eg.isUnreleasedVersion)(u, a) && (l || cUe.lt(u.toString(), (0, Eg.semverify)(o))) && (n[a] = (0, vV.prettifyVersion)(u));
|
|
}
|
|
return n;
|
|
}, {});
|
|
}
|
|
s(fUe, "getInclusionReasons");
|
|
});
|
|
|
|
// ../node_modules/@babel/compat-data/data/plugins.json
|
|
var xV = E((Bmt, dUe) => {
|
|
dUe.exports = {
|
|
"transform-duplicate-named-capturing-groups-regex": {
|
|
chrome: "126",
|
|
opera: "112",
|
|
edge: "126",
|
|
firefox: "129",
|
|
safari: "17.4",
|
|
node: "23",
|
|
ios: "17.4",
|
|
electron: "31.0"
|
|
},
|
|
"transform-regexp-modifiers": {
|
|
chrome: "125",
|
|
opera: "111",
|
|
edge: "125",
|
|
firefox: "132",
|
|
node: "23",
|
|
electron: "31.0"
|
|
},
|
|
"transform-unicode-sets-regex": {
|
|
chrome: "112",
|
|
opera: "98",
|
|
edge: "112",
|
|
firefox: "116",
|
|
safari: "17",
|
|
node: "20",
|
|
deno: "1.32",
|
|
ios: "17",
|
|
opera_mobile: "75",
|
|
electron: "24.0"
|
|
},
|
|
"bugfix/transform-v8-static-class-fields-redefine-readonly": {
|
|
chrome: "98",
|
|
opera: "84",
|
|
edge: "98",
|
|
firefox: "75",
|
|
safari: "15",
|
|
node: "12",
|
|
deno: "1.18",
|
|
ios: "15",
|
|
samsung: "11",
|
|
opera_mobile: "52",
|
|
electron: "17.0"
|
|
},
|
|
"bugfix/transform-firefox-class-in-computed-class-key": {
|
|
chrome: "74",
|
|
opera: "62",
|
|
edge: "79",
|
|
safari: "16",
|
|
node: "12",
|
|
deno: "1",
|
|
ios: "16",
|
|
samsung: "11",
|
|
opera_mobile: "53",
|
|
electron: "6.0"
|
|
},
|
|
"bugfix/transform-safari-class-field-initializer-scope": {
|
|
chrome: "74",
|
|
opera: "62",
|
|
edge: "79",
|
|
firefox: "69",
|
|
safari: "16",
|
|
node: "12",
|
|
deno: "1",
|
|
ios: "16",
|
|
samsung: "11",
|
|
opera_mobile: "53",
|
|
electron: "6.0"
|
|
},
|
|
"transform-class-static-block": {
|
|
chrome: "94",
|
|
opera: "80",
|
|
edge: "94",
|
|
firefox: "93",
|
|
safari: "16.4",
|
|
node: "16.11",
|
|
deno: "1.14",
|
|
ios: "16.4",
|
|
samsung: "17",
|
|
opera_mobile: "66",
|
|
electron: "15.0"
|
|
},
|
|
"proposal-class-static-block": {
|
|
chrome: "94",
|
|
opera: "80",
|
|
edge: "94",
|
|
firefox: "93",
|
|
safari: "16.4",
|
|
node: "16.11",
|
|
deno: "1.14",
|
|
ios: "16.4",
|
|
samsung: "17",
|
|
opera_mobile: "66",
|
|
electron: "15.0"
|
|
},
|
|
"transform-private-property-in-object": {
|
|
chrome: "91",
|
|
opera: "77",
|
|
edge: "91",
|
|
firefox: "90",
|
|
safari: "15",
|
|
node: "16.9",
|
|
deno: "1.9",
|
|
ios: "15",
|
|
samsung: "16",
|
|
opera_mobile: "64",
|
|
electron: "13.0"
|
|
},
|
|
"proposal-private-property-in-object": {
|
|
chrome: "91",
|
|
opera: "77",
|
|
edge: "91",
|
|
firefox: "90",
|
|
safari: "15",
|
|
node: "16.9",
|
|
deno: "1.9",
|
|
ios: "15",
|
|
samsung: "16",
|
|
opera_mobile: "64",
|
|
electron: "13.0"
|
|
},
|
|
"transform-class-properties": {
|
|
chrome: "74",
|
|
opera: "62",
|
|
edge: "79",
|
|
firefox: "90",
|
|
safari: "14.1",
|
|
node: "12",
|
|
deno: "1",
|
|
ios: "14.5",
|
|
samsung: "11",
|
|
opera_mobile: "53",
|
|
electron: "6.0"
|
|
},
|
|
"proposal-class-properties": {
|
|
chrome: "74",
|
|
opera: "62",
|
|
edge: "79",
|
|
firefox: "90",
|
|
safari: "14.1",
|
|
node: "12",
|
|
deno: "1",
|
|
ios: "14.5",
|
|
samsung: "11",
|
|
opera_mobile: "53",
|
|
electron: "6.0"
|
|
},
|
|
"transform-private-methods": {
|
|
chrome: "84",
|
|
opera: "70",
|
|
edge: "84",
|
|
firefox: "90",
|
|
safari: "15",
|
|
node: "14.6",
|
|
deno: "1",
|
|
ios: "15",
|
|
samsung: "14",
|
|
opera_mobile: "60",
|
|
electron: "10.0"
|
|
},
|
|
"proposal-private-methods": {
|
|
chrome: "84",
|
|
opera: "70",
|
|
edge: "84",
|
|
firefox: "90",
|
|
safari: "15",
|
|
node: "14.6",
|
|
deno: "1",
|
|
ios: "15",
|
|
samsung: "14",
|
|
opera_mobile: "60",
|
|
electron: "10.0"
|
|
},
|
|
"transform-numeric-separator": {
|
|
chrome: "75",
|
|
opera: "62",
|
|
edge: "79",
|
|
firefox: "70",
|
|
safari: "13",
|
|
node: "12.5",
|
|
deno: "1",
|
|
ios: "13",
|
|
samsung: "11",
|
|
rhino: "1.7.14",
|
|
opera_mobile: "54",
|
|
electron: "6.0"
|
|
},
|
|
"proposal-numeric-separator": {
|
|
chrome: "75",
|
|
opera: "62",
|
|
edge: "79",
|
|
firefox: "70",
|
|
safari: "13",
|
|
node: "12.5",
|
|
deno: "1",
|
|
ios: "13",
|
|
samsung: "11",
|
|
rhino: "1.7.14",
|
|
opera_mobile: "54",
|
|
electron: "6.0"
|
|
},
|
|
"transform-logical-assignment-operators": {
|
|
chrome: "85",
|
|
opera: "71",
|
|
edge: "85",
|
|
firefox: "79",
|
|
safari: "14",
|
|
node: "15",
|
|
deno: "1.2",
|
|
ios: "14",
|
|
samsung: "14",
|
|
opera_mobile: "60",
|
|
electron: "10.0"
|
|
},
|
|
"proposal-logical-assignment-operators": {
|
|
chrome: "85",
|
|
opera: "71",
|
|
edge: "85",
|
|
firefox: "79",
|
|
safari: "14",
|
|
node: "15",
|
|
deno: "1.2",
|
|
ios: "14",
|
|
samsung: "14",
|
|
opera_mobile: "60",
|
|
electron: "10.0"
|
|
},
|
|
"transform-nullish-coalescing-operator": {
|
|
chrome: "80",
|
|
opera: "67",
|
|
edge: "80",
|
|
firefox: "72",
|
|
safari: "13.1",
|
|
node: "14",
|
|
deno: "1",
|
|
ios: "13.4",
|
|
samsung: "13",
|
|
opera_mobile: "57",
|
|
electron: "8.0"
|
|
},
|
|
"proposal-nullish-coalescing-operator": {
|
|
chrome: "80",
|
|
opera: "67",
|
|
edge: "80",
|
|
firefox: "72",
|
|
safari: "13.1",
|
|
node: "14",
|
|
deno: "1",
|
|
ios: "13.4",
|
|
samsung: "13",
|
|
opera_mobile: "57",
|
|
electron: "8.0"
|
|
},
|
|
"transform-optional-chaining": {
|
|
chrome: "91",
|
|
opera: "77",
|
|
edge: "91",
|
|
firefox: "74",
|
|
safari: "13.1",
|
|
node: "16.9",
|
|
deno: "1.9",
|
|
ios: "13.4",
|
|
samsung: "16",
|
|
opera_mobile: "64",
|
|
electron: "13.0"
|
|
},
|
|
"proposal-optional-chaining": {
|
|
chrome: "91",
|
|
opera: "77",
|
|
edge: "91",
|
|
firefox: "74",
|
|
safari: "13.1",
|
|
node: "16.9",
|
|
deno: "1.9",
|
|
ios: "13.4",
|
|
samsung: "16",
|
|
opera_mobile: "64",
|
|
electron: "13.0"
|
|
},
|
|
"transform-json-strings": {
|
|
chrome: "66",
|
|
opera: "53",
|
|
edge: "79",
|
|
firefox: "62",
|
|
safari: "12",
|
|
node: "10",
|
|
deno: "1",
|
|
ios: "12",
|
|
samsung: "9",
|
|
rhino: "1.7.14",
|
|
opera_mobile: "47",
|
|
electron: "3.0"
|
|
},
|
|
"proposal-json-strings": {
|
|
chrome: "66",
|
|
opera: "53",
|
|
edge: "79",
|
|
firefox: "62",
|
|
safari: "12",
|
|
node: "10",
|
|
deno: "1",
|
|
ios: "12",
|
|
samsung: "9",
|
|
rhino: "1.7.14",
|
|
opera_mobile: "47",
|
|
electron: "3.0"
|
|
},
|
|
"transform-optional-catch-binding": {
|
|
chrome: "66",
|
|
opera: "53",
|
|
edge: "79",
|
|
firefox: "58",
|
|
safari: "11.1",
|
|
node: "10",
|
|
deno: "1",
|
|
ios: "11.3",
|
|
samsung: "9",
|
|
opera_mobile: "47",
|
|
electron: "3.0"
|
|
},
|
|
"proposal-optional-catch-binding": {
|
|
chrome: "66",
|
|
opera: "53",
|
|
edge: "79",
|
|
firefox: "58",
|
|
safari: "11.1",
|
|
node: "10",
|
|
deno: "1",
|
|
ios: "11.3",
|
|
samsung: "9",
|
|
opera_mobile: "47",
|
|
electron: "3.0"
|
|
},
|
|
"transform-parameters": {
|
|
chrome: "49",
|
|
opera: "36",
|
|
edge: "18",
|
|
firefox: "53",
|
|
safari: "16.3",
|
|
node: "6",
|
|
deno: "1",
|
|
ios: "16.3",
|
|
samsung: "5",
|
|
opera_mobile: "36",
|
|
electron: "0.37"
|
|
},
|
|
"transform-async-generator-functions": {
|
|
chrome: "63",
|
|
opera: "50",
|
|
edge: "79",
|
|
firefox: "57",
|
|
safari: "12",
|
|
node: "10",
|
|
deno: "1",
|
|
ios: "12",
|
|
samsung: "8",
|
|
opera_mobile: "46",
|
|
electron: "3.0"
|
|
},
|
|
"proposal-async-generator-functions": {
|
|
chrome: "63",
|
|
opera: "50",
|
|
edge: "79",
|
|
firefox: "57",
|
|
safari: "12",
|
|
node: "10",
|
|
deno: "1",
|
|
ios: "12",
|
|
samsung: "8",
|
|
opera_mobile: "46",
|
|
electron: "3.0"
|
|
},
|
|
"transform-object-rest-spread": {
|
|
chrome: "60",
|
|
opera: "47",
|
|
edge: "79",
|
|
firefox: "55",
|
|
safari: "11.1",
|
|
node: "8.3",
|
|
deno: "1",
|
|
ios: "11.3",
|
|
samsung: "8",
|
|
opera_mobile: "44",
|
|
electron: "2.0"
|
|
},
|
|
"proposal-object-rest-spread": {
|
|
chrome: "60",
|
|
opera: "47",
|
|
edge: "79",
|
|
firefox: "55",
|
|
safari: "11.1",
|
|
node: "8.3",
|
|
deno: "1",
|
|
ios: "11.3",
|
|
samsung: "8",
|
|
opera_mobile: "44",
|
|
electron: "2.0"
|
|
},
|
|
"transform-dotall-regex": {
|
|
chrome: "62",
|
|
opera: "49",
|
|
edge: "79",
|
|
firefox: "78",
|
|
safari: "11.1",
|
|
node: "8.10",
|
|
deno: "1",
|
|
ios: "11.3",
|
|
samsung: "8",
|
|
rhino: "1.7.15",
|
|
opera_mobile: "46",
|
|
electron: "3.0"
|
|
},
|
|
"transform-unicode-property-regex": {
|
|
chrome: "64",
|
|
opera: "51",
|
|
edge: "79",
|
|
firefox: "78",
|
|
safari: "11.1",
|
|
node: "10",
|
|
deno: "1",
|
|
ios: "11.3",
|
|
samsung: "9",
|
|
opera_mobile: "47",
|
|
electron: "3.0"
|
|
},
|
|
"proposal-unicode-property-regex": {
|
|
chrome: "64",
|
|
opera: "51",
|
|
edge: "79",
|
|
firefox: "78",
|
|
safari: "11.1",
|
|
node: "10",
|
|
deno: "1",
|
|
ios: "11.3",
|
|
samsung: "9",
|
|
opera_mobile: "47",
|
|
electron: "3.0"
|
|
},
|
|
"transform-named-capturing-groups-regex": {
|
|
chrome: "64",
|
|
opera: "51",
|
|
edge: "79",
|
|
firefox: "78",
|
|
safari: "11.1",
|
|
node: "10",
|
|
deno: "1",
|
|
ios: "11.3",
|
|
samsung: "9",
|
|
opera_mobile: "47",
|
|
electron: "3.0"
|
|
},
|
|
"transform-async-to-generator": {
|
|
chrome: "55",
|
|
opera: "42",
|
|
edge: "15",
|
|
firefox: "52",
|
|
safari: "11",
|
|
node: "7.6",
|
|
deno: "1",
|
|
ios: "11",
|
|
samsung: "6",
|
|
opera_mobile: "42",
|
|
electron: "1.6"
|
|
},
|
|
"transform-exponentiation-operator": {
|
|
chrome: "52",
|
|
opera: "39",
|
|
edge: "14",
|
|
firefox: "52",
|
|
safari: "10.1",
|
|
node: "7",
|
|
deno: "1",
|
|
ios: "10.3",
|
|
samsung: "6",
|
|
rhino: "1.7.14",
|
|
opera_mobile: "41",
|
|
electron: "1.3"
|
|
},
|
|
"transform-template-literals": {
|
|
chrome: "41",
|
|
opera: "28",
|
|
edge: "13",
|
|
firefox: "34",
|
|
safari: "13",
|
|
node: "4",
|
|
deno: "1",
|
|
ios: "13",
|
|
samsung: "3.4",
|
|
opera_mobile: "28",
|
|
electron: "0.21"
|
|
},
|
|
"transform-literals": {
|
|
chrome: "44",
|
|
opera: "31",
|
|
edge: "12",
|
|
firefox: "53",
|
|
safari: "9",
|
|
node: "4",
|
|
deno: "1",
|
|
ios: "9",
|
|
samsung: "4",
|
|
rhino: "1.7.15",
|
|
opera_mobile: "32",
|
|
electron: "0.30"
|
|
},
|
|
"transform-function-name": {
|
|
chrome: "51",
|
|
opera: "38",
|
|
edge: "79",
|
|
firefox: "53",
|
|
safari: "10",
|
|
node: "6.5",
|
|
deno: "1",
|
|
ios: "10",
|
|
samsung: "5",
|
|
opera_mobile: "41",
|
|
electron: "1.2"
|
|
},
|
|
"transform-arrow-functions": {
|
|
chrome: "47",
|
|
opera: "34",
|
|
edge: "13",
|
|
firefox: "43",
|
|
safari: "10",
|
|
node: "6",
|
|
deno: "1",
|
|
ios: "10",
|
|
samsung: "5",
|
|
rhino: "1.7.13",
|
|
opera_mobile: "34",
|
|
electron: "0.36"
|
|
},
|
|
"transform-block-scoped-functions": {
|
|
chrome: "41",
|
|
opera: "28",
|
|
edge: "12",
|
|
firefox: "46",
|
|
safari: "10",
|
|
node: "4",
|
|
deno: "1",
|
|
ie: "11",
|
|
ios: "10",
|
|
samsung: "3.4",
|
|
opera_mobile: "28",
|
|
electron: "0.21"
|
|
},
|
|
"transform-classes": {
|
|
chrome: "46",
|
|
opera: "33",
|
|
edge: "13",
|
|
firefox: "45",
|
|
safari: "10",
|
|
node: "5",
|
|
deno: "1",
|
|
ios: "10",
|
|
samsung: "5",
|
|
opera_mobile: "33",
|
|
electron: "0.36"
|
|
},
|
|
"transform-object-super": {
|
|
chrome: "46",
|
|
opera: "33",
|
|
edge: "13",
|
|
firefox: "45",
|
|
safari: "10",
|
|
node: "5",
|
|
deno: "1",
|
|
ios: "10",
|
|
samsung: "5",
|
|
opera_mobile: "33",
|
|
electron: "0.36"
|
|
},
|
|
"transform-shorthand-properties": {
|
|
chrome: "43",
|
|
opera: "30",
|
|
edge: "12",
|
|
firefox: "33",
|
|
safari: "9",
|
|
node: "4",
|
|
deno: "1",
|
|
ios: "9",
|
|
samsung: "4",
|
|
rhino: "1.7.14",
|
|
opera_mobile: "30",
|
|
electron: "0.27"
|
|
},
|
|
"transform-duplicate-keys": {
|
|
chrome: "42",
|
|
opera: "29",
|
|
edge: "12",
|
|
firefox: "34",
|
|
safari: "9",
|
|
node: "4",
|
|
deno: "1",
|
|
ios: "9",
|
|
samsung: "3.4",
|
|
opera_mobile: "29",
|
|
electron: "0.25"
|
|
},
|
|
"transform-computed-properties": {
|
|
chrome: "44",
|
|
opera: "31",
|
|
edge: "12",
|
|
firefox: "34",
|
|
safari: "7.1",
|
|
node: "4",
|
|
deno: "1",
|
|
ios: "8",
|
|
samsung: "4",
|
|
opera_mobile: "32",
|
|
electron: "0.30"
|
|
},
|
|
"transform-for-of": {
|
|
chrome: "51",
|
|
opera: "38",
|
|
edge: "15",
|
|
firefox: "53",
|
|
safari: "10",
|
|
node: "6.5",
|
|
deno: "1",
|
|
ios: "10",
|
|
samsung: "5",
|
|
opera_mobile: "41",
|
|
electron: "1.2"
|
|
},
|
|
"transform-sticky-regex": {
|
|
chrome: "49",
|
|
opera: "36",
|
|
edge: "13",
|
|
firefox: "3",
|
|
safari: "10",
|
|
node: "6",
|
|
deno: "1",
|
|
ios: "10",
|
|
samsung: "5",
|
|
rhino: "1.7.15",
|
|
opera_mobile: "36",
|
|
electron: "0.37"
|
|
},
|
|
"transform-unicode-escapes": {
|
|
chrome: "44",
|
|
opera: "31",
|
|
edge: "12",
|
|
firefox: "53",
|
|
safari: "9",
|
|
node: "4",
|
|
deno: "1",
|
|
ios: "9",
|
|
samsung: "4",
|
|
rhino: "1.7.15",
|
|
opera_mobile: "32",
|
|
electron: "0.30"
|
|
},
|
|
"transform-unicode-regex": {
|
|
chrome: "50",
|
|
opera: "37",
|
|
edge: "13",
|
|
firefox: "46",
|
|
safari: "12",
|
|
node: "6",
|
|
deno: "1",
|
|
ios: "12",
|
|
samsung: "5",
|
|
opera_mobile: "37",
|
|
electron: "1.1"
|
|
},
|
|
"transform-spread": {
|
|
chrome: "46",
|
|
opera: "33",
|
|
edge: "13",
|
|
firefox: "45",
|
|
safari: "10",
|
|
node: "5",
|
|
deno: "1",
|
|
ios: "10",
|
|
samsung: "5",
|
|
opera_mobile: "33",
|
|
electron: "0.36"
|
|
},
|
|
"transform-destructuring": {
|
|
chrome: "51",
|
|
opera: "38",
|
|
edge: "15",
|
|
firefox: "53",
|
|
safari: "10",
|
|
node: "6.5",
|
|
deno: "1",
|
|
ios: "10",
|
|
samsung: "5",
|
|
opera_mobile: "41",
|
|
electron: "1.2"
|
|
},
|
|
"transform-block-scoping": {
|
|
chrome: "50",
|
|
opera: "37",
|
|
edge: "14",
|
|
firefox: "53",
|
|
safari: "11",
|
|
node: "6",
|
|
deno: "1",
|
|
ios: "11",
|
|
samsung: "5",
|
|
opera_mobile: "37",
|
|
electron: "1.1"
|
|
},
|
|
"transform-typeof-symbol": {
|
|
chrome: "48",
|
|
opera: "35",
|
|
edge: "12",
|
|
firefox: "36",
|
|
safari: "9",
|
|
node: "6",
|
|
deno: "1",
|
|
ios: "9",
|
|
samsung: "5",
|
|
opera_mobile: "35",
|
|
electron: "0.37"
|
|
},
|
|
"transform-new-target": {
|
|
chrome: "46",
|
|
opera: "33",
|
|
edge: "14",
|
|
firefox: "41",
|
|
safari: "10",
|
|
node: "5",
|
|
deno: "1",
|
|
ios: "10",
|
|
samsung: "5",
|
|
opera_mobile: "33",
|
|
electron: "0.36"
|
|
},
|
|
"transform-regenerator": {
|
|
chrome: "50",
|
|
opera: "37",
|
|
edge: "13",
|
|
firefox: "53",
|
|
safari: "10",
|
|
node: "6",
|
|
deno: "1",
|
|
ios: "10",
|
|
samsung: "5",
|
|
opera_mobile: "37",
|
|
electron: "1.1"
|
|
},
|
|
"transform-member-expression-literals": {
|
|
chrome: "7",
|
|
opera: "12",
|
|
edge: "12",
|
|
firefox: "2",
|
|
safari: "5.1",
|
|
node: "0.4",
|
|
deno: "1",
|
|
ie: "9",
|
|
android: "4",
|
|
ios: "6",
|
|
phantom: "1.9",
|
|
samsung: "1",
|
|
rhino: "1.7.13",
|
|
opera_mobile: "12",
|
|
electron: "0.20"
|
|
},
|
|
"transform-property-literals": {
|
|
chrome: "7",
|
|
opera: "12",
|
|
edge: "12",
|
|
firefox: "2",
|
|
safari: "5.1",
|
|
node: "0.4",
|
|
deno: "1",
|
|
ie: "9",
|
|
android: "4",
|
|
ios: "6",
|
|
phantom: "1.9",
|
|
samsung: "1",
|
|
rhino: "1.7.13",
|
|
opera_mobile: "12",
|
|
electron: "0.20"
|
|
},
|
|
"transform-reserved-words": {
|
|
chrome: "13",
|
|
opera: "10.50",
|
|
edge: "12",
|
|
firefox: "2",
|
|
safari: "3.1",
|
|
node: "0.6",
|
|
deno: "1",
|
|
ie: "9",
|
|
android: "4.4",
|
|
ios: "6",
|
|
phantom: "1.9",
|
|
samsung: "1",
|
|
rhino: "1.7.13",
|
|
opera_mobile: "10.1",
|
|
electron: "0.20"
|
|
},
|
|
"transform-export-namespace-from": {
|
|
chrome: "72",
|
|
deno: "1.0",
|
|
edge: "79",
|
|
firefox: "80",
|
|
node: "13.2",
|
|
opera: "60",
|
|
opera_mobile: "51",
|
|
safari: "14.1",
|
|
ios: "14.5",
|
|
samsung: "11.0",
|
|
android: "72",
|
|
electron: "5.0"
|
|
},
|
|
"proposal-export-namespace-from": {
|
|
chrome: "72",
|
|
deno: "1.0",
|
|
edge: "79",
|
|
firefox: "80",
|
|
node: "13.2",
|
|
opera: "60",
|
|
opera_mobile: "51",
|
|
safari: "14.1",
|
|
ios: "14.5",
|
|
samsung: "11.0",
|
|
android: "72",
|
|
electron: "5.0"
|
|
}
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/compat-data/plugins.js
|
|
var TV = E((Nmt, SV) => {
|
|
SV.exports = xV();
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-compilation-targets/lib/filter-items.js
|
|
var _V = E((up) => {
|
|
"use strict";
|
|
Object.defineProperty(up, "__esModule", {
|
|
value: !0
|
|
});
|
|
up.default = hUe;
|
|
up.isRequired = AV;
|
|
up.targetsSupported = wV;
|
|
var CV = V("semver"), pUe = TV(), xg = bg();
|
|
function wV(e, t) {
|
|
let r = Object.keys(e);
|
|
return r.length === 0 ? !1 : r.filter((n) => {
|
|
let a = (0, xg.getLowestImplementedVersion)(t, n);
|
|
if (!a)
|
|
return !0;
|
|
let o = e[n];
|
|
if ((0, xg.isUnreleasedVersion)(o, n))
|
|
return !1;
|
|
if ((0, xg.isUnreleasedVersion)(a, n))
|
|
return !0;
|
|
if (!CV.valid(o.toString()))
|
|
throw new Error(`Invalid version passed for target "${n}": "${o}". Versions must be in semver format (major.minor.patch)`);
|
|
return CV.gt((0, xg.semverify)(a), o.toString());
|
|
}).length === 0;
|
|
}
|
|
s(wV, "targetsSupported");
|
|
function AV(e, t, {
|
|
compatData: r = pUe,
|
|
includes: i,
|
|
excludes: n
|
|
} = {}) {
|
|
return n != null && n.has(e) ? !1 : i != null && i.has(e) ? !0 : !wV(t, r[e]);
|
|
}
|
|
s(AV, "isRequired");
|
|
function hUe(e, t, r, i, n, a, o) {
|
|
let u = /* @__PURE__ */ new Set(), l = {
|
|
compatData: e,
|
|
includes: t,
|
|
excludes: r
|
|
};
|
|
for (let c in e)
|
|
if (AV(c, i, l))
|
|
u.add(c);
|
|
else if (o) {
|
|
let f = o.get(c);
|
|
f && u.add(f);
|
|
}
|
|
return n?.forEach((c) => !r.has(c) && u.add(c)), a?.forEach((c) => !t.has(c) && u.delete(c)), u;
|
|
}
|
|
s(hUe, "filterItems");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-compilation-targets/lib/index.js
|
|
var l_ = E((ls) => {
|
|
"use strict";
|
|
Object.defineProperty(ls, "__esModule", {
|
|
value: !0
|
|
});
|
|
Object.defineProperty(ls, "TargetNames", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return o_.TargetNames;
|
|
}, "get")
|
|
});
|
|
ls.default = _Ue;
|
|
Object.defineProperty(ls, "filterItems", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return OV.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ls, "getInclusionReasons", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return bUe.getInclusionReasons;
|
|
}, "get")
|
|
});
|
|
ls.isBrowsersQueryValid = kV;
|
|
Object.defineProperty(ls, "isRequired", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return OV.isRequired;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ls, "prettifyTargets", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return gUe.prettifyTargets;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(ls, "unreleasedLabels", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return IV.unreleasedLabels;
|
|
}, "get")
|
|
});
|
|
var a_ = Q$(), FV = mg(), mUe = nV(), yUe = pV(), kn = bg(), IV = gg(), o_ = bV(), gUe = i_(), bUe = EV(), OV = _V(), s_ = mUe["es6.module"],
|
|
u_ = new FV.OptionValidator("@babel/helper-compilation-targets");
|
|
function DUe(e) {
|
|
let t = Object.keys(o_.TargetNames);
|
|
for (let r of Object.keys(e))
|
|
if (!(r in o_.TargetNames))
|
|
throw new Error(u_.formatMessage(`'${r}' is not a valid target
|
|
- Did you mean '${(0, FV.findSuggestion)(r, t)}'?`));
|
|
return e;
|
|
}
|
|
s(DUe, "validateTargetNames");
|
|
function kV(e) {
|
|
return typeof e == "string" || Array.isArray(e) && e.every((t) => typeof t == "string");
|
|
}
|
|
s(kV, "isBrowsersQueryValid");
|
|
function vUe(e) {
|
|
return u_.invariant(e === void 0 || kV(e), `'${String(e)}' is not a valid browserslist query`), e;
|
|
}
|
|
s(vUe, "validateBrowsers");
|
|
function EUe(e) {
|
|
return e.reduce((t, r) => {
|
|
let [i, n] = r.split(" "), a = IV.browserNameMap[i];
|
|
if (!a)
|
|
return t;
|
|
try {
|
|
let o = n.split("-")[0].toLowerCase(), u = (0, kn.isUnreleasedVersion)(o, a);
|
|
if (!t[a])
|
|
return t[a] = u ? o : (0, kn.semverify)(o), t;
|
|
let l = t[a], c = (0, kn.isUnreleasedVersion)(l, a);
|
|
if (c && u)
|
|
t[a] = (0, kn.getLowestUnreleased)(l, o, a);
|
|
else if (c)
|
|
t[a] = (0, kn.semverify)(o);
|
|
else if (!c && !u) {
|
|
let f = (0, kn.semverify)(o);
|
|
t[a] = (0, kn.semverMin)(l, f);
|
|
}
|
|
} catch {
|
|
}
|
|
return t;
|
|
}, {});
|
|
}
|
|
s(EUe, "getLowestVersions");
|
|
function xUe(e) {
|
|
e.length && (console.warn(`Warning, the following targets are using a decimal version:
|
|
`), e.forEach(({
|
|
target: t,
|
|
value: r
|
|
}) => console.warn(` ${t}: ${r}`)), console.warn(`
|
|
We recommend using a string for minor/patch versions to avoid numbers like 6.10
|
|
getting parsed as 6.1, which can lead to unexpected behavior.
|
|
`));
|
|
}
|
|
s(xUe, "outputDecimalWarning");
|
|
function BV(e, t) {
|
|
try {
|
|
return (0, kn.semverify)(t);
|
|
} catch {
|
|
throw new Error(u_.formatMessage(`'${t}' is not a valid value for 'targets.${e}'.`));
|
|
}
|
|
}
|
|
s(BV, "semverifyTarget");
|
|
function SUe(e) {
|
|
return ["node", e === !0 || e === "current" ? process.versions.node.split("-")[0] : BV("node", e)];
|
|
}
|
|
s(SUe, "nodeTargetParser");
|
|
function TUe(e, t) {
|
|
let r = (0, kn.isUnreleasedVersion)(t, e) ? t.toLowerCase() : BV(e, t);
|
|
return [e, r];
|
|
}
|
|
s(TUe, "defaultTargetParser");
|
|
function CUe(e) {
|
|
let t = Object.assign({}, e);
|
|
return delete t.esmodules, delete t.browsers, t;
|
|
}
|
|
s(CUe, "generateTargets");
|
|
function wUe(e, t) {
|
|
let r = a_(e, {
|
|
mobileToDesktop: !0,
|
|
env: t
|
|
});
|
|
return EUe(r);
|
|
}
|
|
s(wUe, "resolveTargets");
|
|
var PV = new yUe({
|
|
max: 64
|
|
});
|
|
function AUe(e, t) {
|
|
let r = typeof e == "string" ? e : e.join() + t, i = PV.get(r);
|
|
return i || (i = wUe(e, t), PV.set(r, i)), Object.assign({}, i);
|
|
}
|
|
s(AUe, "resolveTargetsCached");
|
|
function _Ue(e = {}, t = {}) {
|
|
var r, i;
|
|
let {
|
|
browsers: n,
|
|
esmodules: a
|
|
} = e, {
|
|
configPath: o = ".",
|
|
onBrowserslistConfigFound: u
|
|
} = t;
|
|
vUe(n);
|
|
let l = CUe(e), c = DUe(l), m = !!n || Object.keys(c).length > 0, h = !t.ignoreBrowserslistConfig && !m;
|
|
if (!n && h) {
|
|
if (n = process.env.BROWSERSLIST, !n) {
|
|
let p = t.configFile || process.env.BROWSERSLIST_CONFIG || a_.findConfigFile(o);
|
|
p != null && (u?.(p), n = a_.loadConfig({
|
|
config: p,
|
|
env: t.browserslistEnv
|
|
}));
|
|
}
|
|
n == null && (n = []);
|
|
}
|
|
if (a && (a !== "intersect" || !((r = n) != null && r.length)) && (n = Object.keys(s_).map((p) => `${p} >= ${s_[p]}`).join(", "), a = !1),
|
|
(i = n) != null && i.length) {
|
|
let p = AUe(n, t.browserslistEnv);
|
|
if (a === "intersect")
|
|
for (let g of Object.keys(p))
|
|
if (g !== "deno" && g !== "ie") {
|
|
let b = s_[g === "opera_mobile" ? "op_mob" : g];
|
|
if (b) {
|
|
let D = p[g];
|
|
p[g] = (0, kn.getHighestUnreleased)(D, (0, kn.semverify)(b), g);
|
|
} else
|
|
delete p[g];
|
|
} else
|
|
delete p[g];
|
|
c = Object.assign(p, c);
|
|
}
|
|
let d = {}, y = [];
|
|
for (let p of Object.keys(c).sort()) {
|
|
let g = c[p];
|
|
typeof g == "number" && g % 1 !== 0 && y.push({
|
|
target: p,
|
|
value: g
|
|
});
|
|
let [b, D] = p === "node" ? SUe(g) : TUe(p, g);
|
|
D && (d[b] = D);
|
|
}
|
|
return xUe(y), d;
|
|
}
|
|
s(_Ue, "getTargets");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/resolve-targets.js
|
|
var c_ = E((Sg) => {
|
|
"use strict";
|
|
Object.defineProperty(Sg, "__esModule", {
|
|
value: !0
|
|
});
|
|
Sg.resolveBrowserslistConfigFile = PUe;
|
|
Sg.resolveTargets = FUe;
|
|
function NV() {
|
|
let e = V("path");
|
|
return NV = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_path"), e;
|
|
}
|
|
s(NV, "_path");
|
|
function MV() {
|
|
let e = l_();
|
|
return MV = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_helperCompilationTargets"), e;
|
|
}
|
|
s(MV, "_helperCompilationTargets");
|
|
function PUe(e, t) {
|
|
return NV().resolve(t, e);
|
|
}
|
|
s(PUe, "resolveBrowserslistConfigFile");
|
|
function FUe(e, t) {
|
|
let r = e.targets, i;
|
|
typeof r == "string" || Array.isArray(r) ? i = {
|
|
browsers: r
|
|
} : r && ("esmodules" in r ? i = Object.assign({}, r, {
|
|
esmodules: "intersect"
|
|
}) : i = r);
|
|
let {
|
|
browserslistConfigFile: n
|
|
} = e, a, o = !1;
|
|
return typeof n == "string" ? a = n : o = n === !1, (0, MV().default)(i, {
|
|
ignoreBrowserslistConfig: o,
|
|
configFile: a,
|
|
configPath: t,
|
|
browserslistEnv: e.browserslistEnv
|
|
});
|
|
}
|
|
s(FUe, "resolveTargets");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/config-descriptors.js
|
|
var f_ = E((cp) => {
|
|
"use strict";
|
|
Object.defineProperty(cp, "__esModule", {
|
|
value: !0
|
|
});
|
|
cp.createCachedDescriptors = BUe;
|
|
cp.createDescriptor = KV;
|
|
cp.createUncachedDescriptors = NUe;
|
|
function qV() {
|
|
let e = Ri();
|
|
return qV = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_gensync"), e;
|
|
}
|
|
s(qV, "_gensync");
|
|
var RV = JW(), jV = dp(), IUe = fp(), lp = cu(), OUe = c_();
|
|
function kUe(e, t) {
|
|
var r, i, n, a;
|
|
return e.name === t.name && e.value === t.value && e.options === t.options && e.dirname === t.dirname && e.alias === t.alias && e.ownPass ===
|
|
t.ownPass && ((r = e.file) == null ? void 0 : r.request) === ((i = t.file) == null ? void 0 : i.request) && ((n = e.file) == null ? void 0 :
|
|
n.resolved) === ((a = t.file) == null ? void 0 : a.resolved);
|
|
}
|
|
s(kUe, "isEqualDescriptor");
|
|
function* LV(e) {
|
|
return e;
|
|
}
|
|
s(LV, "handlerOf");
|
|
function UV(e, t) {
|
|
return typeof e.browserslistConfigFile == "string" && (e.browserslistConfigFile = (0, OUe.resolveBrowserslistConfigFile)(e.browserslistConfigFile,
|
|
t)), e;
|
|
}
|
|
s(UV, "optionsWithResolvedBrowserslistConfigFile");
|
|
function BUe(e, t, r) {
|
|
let {
|
|
plugins: i,
|
|
presets: n,
|
|
passPerPreset: a
|
|
} = t;
|
|
return {
|
|
options: UV(t, e),
|
|
plugins: i ? () => LUe(i, e)(r) : () => LV([]),
|
|
presets: n ? () => RUe(n, e)(r)(!!a) : () => LV([])
|
|
};
|
|
}
|
|
s(BUe, "createCachedDescriptors");
|
|
function NUe(e, t, r) {
|
|
return {
|
|
options: UV(t, e),
|
|
plugins: (0, RV.once)(() => VV(t.plugins || [], e, r)),
|
|
presets: (0, RV.once)(() => $V(t.presets || [], e, r, !!t.passPerPreset))
|
|
};
|
|
}
|
|
s(NUe, "createUncachedDescriptors");
|
|
var MUe = /* @__PURE__ */ new WeakMap(), RUe = (0, lp.makeWeakCacheSync)((e, t) => {
|
|
let r = t.using((i) => i);
|
|
return (0, lp.makeStrongCacheSync)((i) => (0, lp.makeStrongCache)(function* (n) {
|
|
return (yield* $V(e, r, i, n)).map((o) => WV(MUe, o));
|
|
}));
|
|
}), jUe = /* @__PURE__ */ new WeakMap(), LUe = (0, lp.makeWeakCacheSync)((e, t) => {
|
|
let r = t.using((i) => i);
|
|
return (0, lp.makeStrongCache)(function* (i) {
|
|
return (yield* VV(e, r, i)).map((a) => WV(jUe, a));
|
|
});
|
|
}), qUe = {};
|
|
function WV(e, t) {
|
|
let {
|
|
value: r,
|
|
options: i = qUe
|
|
} = t;
|
|
if (i === !1) return t;
|
|
let n = e.get(r);
|
|
n || (n = /* @__PURE__ */ new WeakMap(), e.set(r, n));
|
|
let a = n.get(i);
|
|
if (a || (a = [], n.set(i, a)), !a.includes(t)) {
|
|
let o = a.filter((u) => kUe(u, t));
|
|
if (o.length > 0)
|
|
return o[0];
|
|
a.push(t);
|
|
}
|
|
return t;
|
|
}
|
|
s(WV, "loadCachedDescriptor");
|
|
function* $V(e, t, r, i) {
|
|
return yield* HV("preset", e, t, r, i);
|
|
}
|
|
s($V, "createPresetDescriptors");
|
|
function* VV(e, t, r) {
|
|
return yield* HV("plugin", e, t, r);
|
|
}
|
|
s(VV, "createPluginDescriptors");
|
|
function* HV(e, t, r, i, n) {
|
|
let a = yield* qV().all(t.map((o, u) => KV(o, r, {
|
|
type: e,
|
|
alias: `${i}$${u}`,
|
|
ownPass: !!n
|
|
})));
|
|
return UUe(a), a;
|
|
}
|
|
s(HV, "createDescriptors");
|
|
function* KV(e, t, {
|
|
type: r,
|
|
alias: i,
|
|
ownPass: n
|
|
}) {
|
|
let a = (0, IUe.getItemDescriptor)(e);
|
|
if (a)
|
|
return a;
|
|
let o, u, l = e;
|
|
Array.isArray(l) && (l.length === 3 ? [l, u, o] = l : [l, u] = l);
|
|
let c, f = null;
|
|
if (typeof l == "string") {
|
|
if (typeof r != "string")
|
|
throw new Error("To resolve a string-based item, the type of item must be given");
|
|
let m = r === "plugin" ? jV.loadPlugin : jV.loadPreset, h = l;
|
|
({
|
|
filepath: f,
|
|
value: l
|
|
} = yield* m(l, t)), c = {
|
|
request: h,
|
|
resolved: f
|
|
};
|
|
}
|
|
if (!l)
|
|
throw new Error(`Unexpected falsy value: ${String(l)}`);
|
|
if (typeof l == "object" && l.__esModule)
|
|
if (l.default)
|
|
l = l.default;
|
|
else
|
|
throw new Error("Must export a default export when using ES6 modules.");
|
|
if (typeof l != "object" && typeof l != "function")
|
|
throw new Error(`Unsupported format: ${typeof l}. Expected an object or a function.`);
|
|
if (f !== null && typeof l == "object" && l)
|
|
throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${f}`);
|
|
return {
|
|
name: o,
|
|
alias: f || i,
|
|
value: l,
|
|
options: u,
|
|
dirname: t,
|
|
ownPass: n,
|
|
file: c
|
|
};
|
|
}
|
|
s(KV, "createDescriptor");
|
|
function UUe(e) {
|
|
let t = /* @__PURE__ */ new Map();
|
|
for (let r of e) {
|
|
if (typeof r.value != "function") continue;
|
|
let i = t.get(r.value);
|
|
if (i || (i = /* @__PURE__ */ new Set(), t.set(r.value, i)), i.has(r.name)) {
|
|
let n = e.filter((a) => a.value === r.value);
|
|
throw new Error(["Duplicate plugin/preset detected.", "If you'd like to use two separate instances of a plugin,", "they need separat\
|
|
e names, e.g.", "", " plugins: [", " ['some-plugin', {}],", " ['some-plugin', {}, 'some unique name'],", " ]", "", "Duplicates detec\
|
|
ted are:", `${JSON.stringify(n, null, 2)}`].join(`
|
|
`));
|
|
}
|
|
i.add(r.name);
|
|
}
|
|
}
|
|
s(UUe, "assertNoDuplicates");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/item.js
|
|
var fp = E((pp) => {
|
|
"use strict";
|
|
Object.defineProperty(pp, "__esModule", {
|
|
value: !0
|
|
});
|
|
pp.createConfigItem = $Ue;
|
|
pp.createItemFromDescriptor = GV;
|
|
pp.getItemDescriptor = VUe;
|
|
function zV() {
|
|
let e = V("path");
|
|
return zV = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_path"), e;
|
|
}
|
|
s(zV, "_path");
|
|
var WUe = f_();
|
|
function GV(e) {
|
|
return new Tg(e);
|
|
}
|
|
s(GV, "createItemFromDescriptor");
|
|
function* $Ue(e, {
|
|
dirname: t = ".",
|
|
type: r
|
|
} = {}) {
|
|
let i = yield* (0, WUe.createDescriptor)(e, zV().resolve(t), {
|
|
type: r,
|
|
alias: "programmatic item"
|
|
});
|
|
return GV(i);
|
|
}
|
|
s($Ue, "createConfigItem");
|
|
var d_ = Symbol.for("@babel/core@7 - ConfigItem");
|
|
function VUe(e) {
|
|
if (e != null && e[d_])
|
|
return e._descriptor;
|
|
}
|
|
s(VUe, "getItemDescriptor");
|
|
var Tg = class {
|
|
static {
|
|
s(this, "ConfigItem");
|
|
}
|
|
constructor(t) {
|
|
this._descriptor = void 0, this[d_] = !0, this.value = void 0, this.options = void 0, this.dirname = void 0, this.name = void 0, this.
|
|
file = void 0, this._descriptor = t, Object.defineProperty(this, "_descriptor", {
|
|
enumerable: !1
|
|
}), Object.defineProperty(this, d_, {
|
|
enumerable: !1
|
|
}), this.value = this._descriptor.value, this.options = this._descriptor.options, this.dirname = this._descriptor.dirname, this.name =
|
|
this._descriptor.name, this.file = this._descriptor.file ? {
|
|
request: this._descriptor.file.request,
|
|
resolved: this._descriptor.file.resolved
|
|
} : void 0, Object.freeze(this);
|
|
}
|
|
};
|
|
Object.freeze(Tg.prototype);
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/validation/removed.js
|
|
var JV = E((Cg) => {
|
|
"use strict";
|
|
Object.defineProperty(Cg, "__esModule", {
|
|
value: !0
|
|
});
|
|
Cg.default = void 0;
|
|
var Kmt = Cg.default = {
|
|
auxiliaryComment: {
|
|
message: "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"
|
|
},
|
|
blacklist: {
|
|
message: "Put the specific transforms you want in the `plugins` option"
|
|
},
|
|
breakConfig: {
|
|
message: "This is not a necessary option in Babel 6"
|
|
},
|
|
experimental: {
|
|
message: "Put the specific transforms you want in the `plugins` option"
|
|
},
|
|
externalHelpers: {
|
|
message: "Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"
|
|
},
|
|
extra: {
|
|
message: ""
|
|
},
|
|
jsxPragma: {
|
|
message: "use the `pragma` option in the `react-jsx` plugin. Check out http://babeljs.io/docs/plugins/transform-react-jsx/"
|
|
},
|
|
loose: {
|
|
message: "Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."
|
|
},
|
|
metadataUsedHelpers: {
|
|
message: "Not required anymore as this is enabled by default"
|
|
},
|
|
modules: {
|
|
message: "Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"
|
|
},
|
|
nonStandard: {
|
|
message: "Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.i\
|
|
o/docs/plugins/preset-react/"
|
|
},
|
|
optional: {
|
|
message: "Put the specific transforms you want in the `plugins` option"
|
|
},
|
|
sourceMapName: {
|
|
message: "The `sourceMapName` option has been removed because it makes more sense for the tooling that calls Babel to assign `map.file\
|
|
` themselves."
|
|
},
|
|
stage: {
|
|
message: "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"
|
|
},
|
|
whitelist: {
|
|
message: "Put the specific transforms you want in the `plugins` option"
|
|
},
|
|
resolveModuleSource: {
|
|
version: 6,
|
|
message: "Use `babel-plugin-module-resolver@3`'s 'resolvePath' options"
|
|
},
|
|
metadata: {
|
|
version: 6,
|
|
message: "Generated plugin metadata is always included in the output result"
|
|
},
|
|
sourceMapTarget: {
|
|
version: 6,
|
|
message: "The `sourceMapTarget` option has been removed because it makes more sense for the tooling that calls Babel to assign `map.fi\
|
|
le` themselves."
|
|
}
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/validation/option-assertions.js
|
|
var m_ = E((mr) => {
|
|
"use strict";
|
|
Object.defineProperty(mr, "__esModule", {
|
|
value: !0
|
|
});
|
|
mr.access = ji;
|
|
mr.assertArray = h_;
|
|
mr.assertAssumptions = lWe;
|
|
mr.assertBabelrcSearch = nWe;
|
|
mr.assertBoolean = p_;
|
|
mr.assertCallerMetadata = XUe;
|
|
mr.assertCompact = GUe;
|
|
mr.assertConfigApplicableTest = rWe;
|
|
mr.assertConfigFileSearch = iWe;
|
|
mr.assertFunction = QUe;
|
|
mr.assertIgnoreList = eWe;
|
|
mr.assertInputSourceMap = YUe;
|
|
mr.assertObject = ZV;
|
|
mr.assertPluginList = sWe;
|
|
mr.assertRootMode = KUe;
|
|
mr.assertSourceMaps = zUe;
|
|
mr.assertSourceType = JUe;
|
|
mr.assertString = ZUe;
|
|
mr.assertTargets = oWe;
|
|
mr.msg = ft;
|
|
function hp() {
|
|
let e = l_();
|
|
return hp = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_helperCompilationTargets"), e;
|
|
}
|
|
s(hp, "_helperCompilationTargets");
|
|
var HUe = mp();
|
|
function ft(e) {
|
|
switch (e.type) {
|
|
case "root":
|
|
return "";
|
|
case "env":
|
|
return `${ft(e.parent)}.env["${e.name}"]`;
|
|
case "overrides":
|
|
return `${ft(e.parent)}.overrides[${e.index}]`;
|
|
case "option":
|
|
return `${ft(e.parent)}.${e.name}`;
|
|
case "access":
|
|
return `${ft(e.parent)}[${JSON.stringify(e.name)}]`;
|
|
default:
|
|
throw new Error(`Assertion failure: Unknown type ${e.type}`);
|
|
}
|
|
}
|
|
s(ft, "msg");
|
|
function ji(e, t) {
|
|
return {
|
|
type: "access",
|
|
name: t,
|
|
parent: e
|
|
};
|
|
}
|
|
s(ji, "access");
|
|
function KUe(e, t) {
|
|
if (t !== void 0 && t !== "root" && t !== "upward" && t !== "upward-optional")
|
|
throw new Error(`${ft(e)} must be a "root", "upward", "upward-optional" or undefined`);
|
|
return t;
|
|
}
|
|
s(KUe, "assertRootMode");
|
|
function zUe(e, t) {
|
|
if (t !== void 0 && typeof t != "boolean" && t !== "inline" && t !== "both")
|
|
throw new Error(`${ft(e)} must be a boolean, "inline", "both", or undefined`);
|
|
return t;
|
|
}
|
|
s(zUe, "assertSourceMaps");
|
|
function GUe(e, t) {
|
|
if (t !== void 0 && typeof t != "boolean" && t !== "auto")
|
|
throw new Error(`${ft(e)} must be a boolean, "auto", or undefined`);
|
|
return t;
|
|
}
|
|
s(GUe, "assertCompact");
|
|
function JUe(e, t) {
|
|
if (t !== void 0 && t !== "module" && t !== "script" && t !== "unambiguous")
|
|
throw new Error(`${ft(e)} must be "module", "script", "unambiguous", or undefined`);
|
|
return t;
|
|
}
|
|
s(JUe, "assertSourceType");
|
|
function XUe(e, t) {
|
|
let r = ZV(e, t);
|
|
if (r) {
|
|
if (typeof r.name != "string")
|
|
throw new Error(`${ft(e)} set but does not contain "name" property string`);
|
|
for (let i of Object.keys(r)) {
|
|
let n = ji(e, i), a = r[i];
|
|
if (a != null && typeof a != "boolean" && typeof a != "string" && typeof a != "number")
|
|
throw new Error(`${ft(n)} must be null, undefined, a boolean, a string, or a number.`);
|
|
}
|
|
}
|
|
return t;
|
|
}
|
|
s(XUe, "assertCallerMetadata");
|
|
function YUe(e, t) {
|
|
if (t !== void 0 && typeof t != "boolean" && (typeof t != "object" || !t))
|
|
throw new Error(`${ft(e)} must be a boolean, object, or undefined`);
|
|
return t;
|
|
}
|
|
s(YUe, "assertInputSourceMap");
|
|
function ZUe(e, t) {
|
|
if (t !== void 0 && typeof t != "string")
|
|
throw new Error(`${ft(e)} must be a string, or undefined`);
|
|
return t;
|
|
}
|
|
s(ZUe, "assertString");
|
|
function QUe(e, t) {
|
|
if (t !== void 0 && typeof t != "function")
|
|
throw new Error(`${ft(e)} must be a function, or undefined`);
|
|
return t;
|
|
}
|
|
s(QUe, "assertFunction");
|
|
function p_(e, t) {
|
|
if (t !== void 0 && typeof t != "boolean")
|
|
throw new Error(`${ft(e)} must be a boolean, or undefined`);
|
|
return t;
|
|
}
|
|
s(p_, "assertBoolean");
|
|
function ZV(e, t) {
|
|
if (t !== void 0 && (typeof t != "object" || Array.isArray(t) || !t))
|
|
throw new Error(`${ft(e)} must be an object, or undefined`);
|
|
return t;
|
|
}
|
|
s(ZV, "assertObject");
|
|
function h_(e, t) {
|
|
if (t != null && !Array.isArray(t))
|
|
throw new Error(`${ft(e)} must be an array, or undefined`);
|
|
return t;
|
|
}
|
|
s(h_, "assertArray");
|
|
function eWe(e, t) {
|
|
let r = h_(e, t);
|
|
return r?.forEach((i, n) => tWe(ji(e, n), i)), r;
|
|
}
|
|
s(eWe, "assertIgnoreList");
|
|
function tWe(e, t) {
|
|
if (typeof t != "string" && typeof t != "function" && !(t instanceof RegExp))
|
|
throw new Error(`${ft(e)} must be an array of string/Function/RegExp values, or undefined`);
|
|
return t;
|
|
}
|
|
s(tWe, "assertIgnoreItem");
|
|
function rWe(e, t) {
|
|
if (t === void 0)
|
|
return t;
|
|
if (Array.isArray(t))
|
|
t.forEach((r, i) => {
|
|
if (!wg(r))
|
|
throw new Error(`${ft(ji(e, i))} must be a string/Function/RegExp.`);
|
|
});
|
|
else if (!wg(t))
|
|
throw new Error(`${ft(e)} must be a string/Function/RegExp, or an array of those`);
|
|
return t;
|
|
}
|
|
s(rWe, "assertConfigApplicableTest");
|
|
function wg(e) {
|
|
return typeof e == "string" || typeof e == "function" || e instanceof RegExp;
|
|
}
|
|
s(wg, "checkValidTest");
|
|
function iWe(e, t) {
|
|
if (t !== void 0 && typeof t != "boolean" && typeof t != "string")
|
|
throw new Error(`${ft(e)} must be a undefined, a boolean, a string, got ${JSON.stringify(t)}`);
|
|
return t;
|
|
}
|
|
s(iWe, "assertConfigFileSearch");
|
|
function nWe(e, t) {
|
|
if (t === void 0 || typeof t == "boolean")
|
|
return t;
|
|
if (Array.isArray(t))
|
|
t.forEach((r, i) => {
|
|
if (!wg(r))
|
|
throw new Error(`${ft(ji(e, i))} must be a string/Function/RegExp.`);
|
|
});
|
|
else if (!wg(t))
|
|
throw new Error(`${ft(e)} must be a undefined, a boolean, a string/Function/RegExp or an array of those, got ${JSON.stringify(t)}`);
|
|
return t;
|
|
}
|
|
s(nWe, "assertBabelrcSearch");
|
|
function sWe(e, t) {
|
|
let r = h_(e, t);
|
|
return r && r.forEach((i, n) => aWe(ji(e, n), i)), r;
|
|
}
|
|
s(sWe, "assertPluginList");
|
|
function aWe(e, t) {
|
|
if (Array.isArray(t)) {
|
|
if (t.length === 0)
|
|
throw new Error(`${ft(e)} must include an object`);
|
|
if (t.length > 3)
|
|
throw new Error(`${ft(e)} may only be a two-tuple or three-tuple`);
|
|
if (XV(ji(e, 0), t[0]), t.length > 1) {
|
|
let r = t[1];
|
|
if (r !== void 0 && r !== !1 && (typeof r != "object" || Array.isArray(r) || r === null))
|
|
throw new Error(`${ft(ji(e, 1))} must be an object, false, or undefined`);
|
|
}
|
|
if (t.length === 3) {
|
|
let r = t[2];
|
|
if (r !== void 0 && typeof r != "string")
|
|
throw new Error(`${ft(ji(e, 2))} must be a string, or undefined`);
|
|
}
|
|
} else
|
|
XV(e, t);
|
|
return t;
|
|
}
|
|
s(aWe, "assertPluginItem");
|
|
function XV(e, t) {
|
|
if ((typeof t != "object" || !t) && typeof t != "string" && typeof t != "function")
|
|
throw new Error(`${ft(e)} must be a string, object, function`);
|
|
return t;
|
|
}
|
|
s(XV, "assertPluginTarget");
|
|
function oWe(e, t) {
|
|
if ((0, hp().isBrowsersQueryValid)(t)) return t;
|
|
if (typeof t != "object" || !t || Array.isArray(t))
|
|
throw new Error(`${ft(e)} must be a string, an array of strings or an object`);
|
|
let r = ji(e, "browsers"), i = ji(e, "esmodules");
|
|
YV(r, t.browsers), p_(i, t.esmodules);
|
|
for (let n of Object.keys(t)) {
|
|
let a = t[n], o = ji(e, n);
|
|
if (n === "esmodules") p_(o, a);
|
|
else if (n === "browsers") YV(o, a);
|
|
else if (hasOwnProperty.call(hp().TargetNames, n))
|
|
uWe(o, a);
|
|
else {
|
|
let u = Object.keys(hp().TargetNames).join(", ");
|
|
throw new Error(`${ft(o)} is not a valid target. Supported targets are ${u}`);
|
|
}
|
|
}
|
|
return t;
|
|
}
|
|
s(oWe, "assertTargets");
|
|
function YV(e, t) {
|
|
if (t !== void 0 && !(0, hp().isBrowsersQueryValid)(t))
|
|
throw new Error(`${ft(e)} must be undefined, a string or an array of strings`);
|
|
}
|
|
s(YV, "assertBrowsersList");
|
|
function uWe(e, t) {
|
|
if (!(typeof t == "number" && Math.round(t) === t) && typeof t != "string")
|
|
throw new Error(`${ft(e)} must be a string or an integer number`);
|
|
}
|
|
s(uWe, "assertBrowserVersion");
|
|
function lWe(e, t) {
|
|
if (t === void 0) return;
|
|
if (typeof t != "object" || t === null)
|
|
throw new Error(`${ft(e)} must be an object or undefined.`);
|
|
let r = e;
|
|
do
|
|
r = r.parent;
|
|
while (r.type !== "root");
|
|
let i = r.source === "preset";
|
|
for (let n of Object.keys(t)) {
|
|
let a = ji(e, n);
|
|
if (!HUe.assumptionsNames.has(n))
|
|
throw new Error(`${ft(a)} is not a supported assumption.`);
|
|
if (typeof t[n] != "boolean")
|
|
throw new Error(`${ft(a)} must be a boolean.`);
|
|
if (i && t[n] === !1)
|
|
throw new Error(`${ft(a)} cannot be set to 'false' inside presets.`);
|
|
}
|
|
return t;
|
|
}
|
|
s(lWe, "assertAssumptions");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/validation/options.js
|
|
var mp = E((fc) => {
|
|
"use strict";
|
|
Object.defineProperty(fc, "__esModule", {
|
|
value: !0
|
|
});
|
|
fc.assumptionsNames = void 0;
|
|
fc.checkNoUnwrappedItemOptionPairs = gWe;
|
|
fc.validate = dWe;
|
|
var QV = JV(), Oe = m_(), cWe = fu(), eH = {
|
|
cwd: Oe.assertString,
|
|
root: Oe.assertString,
|
|
rootMode: Oe.assertRootMode,
|
|
configFile: Oe.assertConfigFileSearch,
|
|
caller: Oe.assertCallerMetadata,
|
|
filename: Oe.assertString,
|
|
filenameRelative: Oe.assertString,
|
|
code: Oe.assertBoolean,
|
|
ast: Oe.assertBoolean,
|
|
cloneInputAst: Oe.assertBoolean,
|
|
envName: Oe.assertString
|
|
}, tH = {
|
|
babelrc: Oe.assertBoolean,
|
|
babelrcRoots: Oe.assertBabelrcSearch
|
|
}, rH = {
|
|
extends: Oe.assertString,
|
|
ignore: Oe.assertIgnoreList,
|
|
only: Oe.assertIgnoreList,
|
|
targets: Oe.assertTargets,
|
|
browserslistConfigFile: Oe.assertConfigFileSearch,
|
|
browserslistEnv: Oe.assertString
|
|
}, iH = {
|
|
inputSourceMap: Oe.assertInputSourceMap,
|
|
presets: Oe.assertPluginList,
|
|
plugins: Oe.assertPluginList,
|
|
passPerPreset: Oe.assertBoolean,
|
|
assumptions: Oe.assertAssumptions,
|
|
env: mWe,
|
|
overrides: yWe,
|
|
test: Oe.assertConfigApplicableTest,
|
|
include: Oe.assertConfigApplicableTest,
|
|
exclude: Oe.assertConfigApplicableTest,
|
|
retainLines: Oe.assertBoolean,
|
|
comments: Oe.assertBoolean,
|
|
shouldPrintComment: Oe.assertFunction,
|
|
compact: Oe.assertCompact,
|
|
minified: Oe.assertBoolean,
|
|
auxiliaryCommentBefore: Oe.assertString,
|
|
auxiliaryCommentAfter: Oe.assertString,
|
|
sourceType: Oe.assertSourceType,
|
|
wrapPluginVisitorMethod: Oe.assertFunction,
|
|
highlightCode: Oe.assertBoolean,
|
|
sourceMaps: Oe.assertSourceMaps,
|
|
sourceMap: Oe.assertSourceMaps,
|
|
sourceFileName: Oe.assertString,
|
|
sourceRoot: Oe.assertString,
|
|
parserOpts: Oe.assertObject,
|
|
generatorOpts: Oe.assertObject
|
|
};
|
|
Object.assign(iH, {
|
|
getModuleId: Oe.assertFunction,
|
|
moduleRoot: Oe.assertString,
|
|
moduleIds: Oe.assertBoolean,
|
|
moduleId: Oe.assertString
|
|
});
|
|
var fWe = ["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitive\
|
|
Hint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noIncompleteNsImportDetection", "noNewArrows", "noUnini\
|
|
tializedPrivateFieldAccess", "objectRestNoSymbols", "privateFieldsAsSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods",
|
|
"setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"], Xmt = fc.
|
|
assumptionsNames = new Set(fWe);
|
|
function nH(e) {
|
|
return e.type === "root" ? e.source : nH(e.parent);
|
|
}
|
|
s(nH, "getSource");
|
|
function dWe(e, t, r) {
|
|
try {
|
|
return y_({
|
|
type: "root",
|
|
source: e
|
|
}, t);
|
|
} catch (i) {
|
|
let n = new cWe.default(i.message, r);
|
|
throw i.code && (n.code = i.code), n;
|
|
}
|
|
}
|
|
s(dWe, "validate");
|
|
function y_(e, t) {
|
|
let r = nH(e);
|
|
return hWe(t), Object.keys(t).forEach((i) => {
|
|
let n = {
|
|
type: "option",
|
|
name: i,
|
|
parent: e
|
|
};
|
|
if (r === "preset" && rH[i])
|
|
throw new Error(`${(0, Oe.msg)(n)} is not allowed in preset options`);
|
|
if (r !== "arguments" && eH[i])
|
|
throw new Error(`${(0, Oe.msg)(n)} is only allowed in root programmatic options`);
|
|
if (r !== "arguments" && r !== "configfile" && tH[i])
|
|
throw r === "babelrcfile" || r === "extendsfile" ? new Error(`${(0, Oe.msg)(n)} is not allowed in .babelrc or "extends"ed files, onl\
|
|
y in root programmatic options, or babel.config.js/config file options`) : new Error(`${(0, Oe.msg)(n)} is only allowed in root programmatic\
|
|
options, or babel.config.js/config file options`);
|
|
(iH[i] || rH[i] || tH[i] || eH[i] || pWe)(n, t[i]);
|
|
}), t;
|
|
}
|
|
s(y_, "validateNested");
|
|
function pWe(e) {
|
|
let t = e.name;
|
|
if (QV.default[t]) {
|
|
let {
|
|
message: r,
|
|
version: i = 5
|
|
} = QV.default[t];
|
|
throw new Error(`Using removed Babel ${i} option: ${(0, Oe.msg)(e)} - ${r}`);
|
|
} else {
|
|
let r = new Error(`Unknown option: ${(0, Oe.msg)(e)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information ab\
|
|
out options.`);
|
|
throw r.code = "BABEL_UNKNOWN_OPTION", r;
|
|
}
|
|
}
|
|
s(pWe, "throwUnknownError");
|
|
function hWe(e) {
|
|
if (hasOwnProperty.call(e, "sourceMap") && hasOwnProperty.call(e, "sourceMaps"))
|
|
throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both");
|
|
}
|
|
s(hWe, "assertNoDuplicateSourcemap");
|
|
function mWe(e, t) {
|
|
if (e.parent.type === "env")
|
|
throw new Error(`${(0, Oe.msg)(e)} is not allowed inside of another .env block`);
|
|
let r = e.parent, i = (0, Oe.assertObject)(e, t);
|
|
if (i)
|
|
for (let n of Object.keys(i)) {
|
|
let a = (0, Oe.assertObject)((0, Oe.access)(e, n), i[n]);
|
|
if (!a) continue;
|
|
y_({
|
|
type: "env",
|
|
name: n,
|
|
parent: r
|
|
}, a);
|
|
}
|
|
return i;
|
|
}
|
|
s(mWe, "assertEnvSet");
|
|
function yWe(e, t) {
|
|
if (e.parent.type === "env")
|
|
throw new Error(`${(0, Oe.msg)(e)} is not allowed inside an .env block`);
|
|
if (e.parent.type === "overrides")
|
|
throw new Error(`${(0, Oe.msg)(e)} is not allowed inside an .overrides block`);
|
|
let r = e.parent, i = (0, Oe.assertArray)(e, t);
|
|
if (i)
|
|
for (let [n, a] of i.entries()) {
|
|
let o = (0, Oe.access)(e, n), u = (0, Oe.assertObject)(o, a);
|
|
if (!u) throw new Error(`${(0, Oe.msg)(o)} must be an object`);
|
|
y_({
|
|
type: "overrides",
|
|
index: n,
|
|
parent: r
|
|
}, u);
|
|
}
|
|
return i;
|
|
}
|
|
s(yWe, "assertOverridesList");
|
|
function gWe(e, t, r, i) {
|
|
if (t === 0) return;
|
|
let n = e[t - 1], a = e[t];
|
|
n.file && n.options === void 0 && typeof a.value == "object" && (i.message += `
|
|
- Maybe you meant to use
|
|
"${r}s": [
|
|
["${n.file.request}", ${JSON.stringify(a.value, void 0, 2)}]
|
|
]
|
|
To be a valid ${r}, its name and options should be wrapped in a pair of brackets`);
|
|
}
|
|
s(gWe, "checkNoUnwrappedItemOptionPairs");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/pattern-to-regex.js
|
|
var E_ = E((v_) => {
|
|
"use strict";
|
|
Object.defineProperty(v_, "__esModule", {
|
|
value: !0
|
|
});
|
|
v_.default = vWe;
|
|
function Ag() {
|
|
let e = V("path");
|
|
return Ag = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_path"), e;
|
|
}
|
|
s(Ag, "_path");
|
|
var yp = `\\${Ag().sep}`, g_ = `(?:${yp}|$)`, b_ = `[^${yp}]+`, D_ = `(?:${b_}${yp})`, aH = `(?:${b_}${g_})`, bWe = `${D_}*?`, DWe = `${D_}\
|
|
*?${aH}?`;
|
|
function sH(e) {
|
|
return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
|
|
}
|
|
s(sH, "escapeRegExp");
|
|
function vWe(e, t) {
|
|
let r = Ag().resolve(t, e).split(Ag().sep);
|
|
return new RegExp(["^", ...r.map((i, n) => {
|
|
let a = n === r.length - 1;
|
|
return i === "**" ? a ? DWe : bWe : i === "*" ? a ? aH : D_ : i.indexOf("*.") === 0 ? b_ + sH(i.slice(1)) + (a ? g_ : yp) : sH(i) + (a ?
|
|
g_ : yp);
|
|
})].join(""));
|
|
}
|
|
s(vWe, "pathToPattern");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/printer.js
|
|
var lH = E((dc) => {
|
|
"use strict";
|
|
Object.defineProperty(dc, "__esModule", {
|
|
value: !0
|
|
});
|
|
dc.ConfigPrinter = dc.ChainFormatter = void 0;
|
|
function uH() {
|
|
let e = Ri();
|
|
return uH = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_gensync"), e;
|
|
}
|
|
s(uH, "_gensync");
|
|
var EWe = dc.ChainFormatter = {
|
|
Programmatic: 0,
|
|
Config: 1
|
|
}, x_ = {
|
|
title(e, t, r) {
|
|
let i = "";
|
|
return e === EWe.Programmatic ? (i = "programmatic options", t && (i += " from " + t)) : i = "config " + r, i;
|
|
},
|
|
loc(e, t) {
|
|
let r = "";
|
|
return e != null && (r += `.overrides[${e}]`), t != null && (r += `.env["${t}"]`), r;
|
|
},
|
|
*optionsAndDescriptors(e) {
|
|
let t = Object.assign({}, e.options);
|
|
delete t.overrides, delete t.env;
|
|
let r = [...yield* e.plugins()];
|
|
r.length && (t.plugins = r.map((n) => oH(n)));
|
|
let i = [...yield* e.presets()];
|
|
return i.length && (t.presets = [...i].map((n) => oH(n))), JSON.stringify(t, void 0, 2);
|
|
}
|
|
};
|
|
function oH(e) {
|
|
var t;
|
|
let r = (t = e.file) == null ? void 0 : t.request;
|
|
return r == null && (typeof e.value == "object" ? r = e.value : typeof e.value == "function" && (r = `[Function: ${e.value.toString().slice(
|
|
0, 50)} ... ]`)), r == null && (r = "[Unknown]"), e.options === void 0 ? r : e.name == null ? [r, e.options] : [r, e.options, e.name];
|
|
}
|
|
s(oH, "descriptorToConfig");
|
|
var S_ = class e {
|
|
static {
|
|
s(this, "ConfigPrinter");
|
|
}
|
|
constructor() {
|
|
this._stack = [];
|
|
}
|
|
configure(t, r, {
|
|
callerName: i,
|
|
filepath: n
|
|
}) {
|
|
return t ? (a, o, u) => {
|
|
this._stack.push({
|
|
type: r,
|
|
callerName: i,
|
|
filepath: n,
|
|
content: a,
|
|
index: o,
|
|
envName: u
|
|
});
|
|
} : () => {
|
|
};
|
|
}
|
|
static *format(t) {
|
|
let r = x_.title(t.type, t.callerName, t.filepath), i = x_.loc(t.index, t.envName);
|
|
i && (r += ` ${i}`);
|
|
let n = yield* x_.optionsAndDescriptors(t.content);
|
|
return `${r}
|
|
${n}`;
|
|
}
|
|
*output() {
|
|
return this._stack.length === 0 ? "" : (yield* uH().all(this._stack.map((r) => e.format(r)))).join(`
|
|
|
|
`);
|
|
}
|
|
};
|
|
dc.ConfigPrinter = S_;
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/config-chain.js
|
|
var k_ = E((hc) => {
|
|
"use strict";
|
|
Object.defineProperty(hc, "__esModule", {
|
|
value: !0
|
|
});
|
|
hc.buildPresetChain = TWe;
|
|
hc.buildPresetChainWalker = void 0;
|
|
hc.buildRootChain = FWe;
|
|
function dH() {
|
|
let e = V("path");
|
|
return dH = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_path"), e;
|
|
}
|
|
s(dH, "_path");
|
|
function pH() {
|
|
let e = Jo();
|
|
return pH = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_debug"), e;
|
|
}
|
|
s(pH, "_debug");
|
|
var A_ = mp(), hH = E_(), bp = lH(), xWe = Js(), SWe = fu(), gp = dp(), Fr = cu(), an = f_(), cH = pH()("babel:config:config-chain");
|
|
function* TWe(e, t) {
|
|
let r = yield* CWe(e, t);
|
|
return r ? {
|
|
plugins: Fg(r.plugins),
|
|
presets: Fg(r.presets),
|
|
options: r.options.map((i) => mH(i)),
|
|
files: /* @__PURE__ */ new Set()
|
|
} : null;
|
|
}
|
|
s(TWe, "buildPresetChain");
|
|
var CWe = hc.buildPresetChainWalker = O_({
|
|
root: /* @__PURE__ */ s((e) => wWe(e), "root"),
|
|
env: /* @__PURE__ */ s((e, t) => AWe(e)(t), "env"),
|
|
overrides: /* @__PURE__ */ s((e, t) => _We(e)(t), "overrides"),
|
|
overridesEnv: /* @__PURE__ */ s((e, t, r) => PWe(e)(t)(r), "overridesEnv"),
|
|
createLogger: /* @__PURE__ */ s(() => () => {
|
|
}, "createLogger")
|
|
}), wWe = (0, Fr.makeWeakCacheSync)((e) => __(e, e.alias, an.createUncachedDescriptors)), AWe = (0, Fr.makeWeakCacheSync)((e) => (0, Fr.makeStrongCacheSync)(
|
|
(t) => P_(e, e.alias, an.createUncachedDescriptors, t))), _We = (0, Fr.makeWeakCacheSync)((e) => (0, Fr.makeStrongCacheSync)((t) => F_(e, e.
|
|
alias, an.createUncachedDescriptors, t))), PWe = (0, Fr.makeWeakCacheSync)((e) => (0, Fr.makeStrongCacheSync)((t) => (0, Fr.makeStrongCacheSync)(
|
|
(r) => I_(e, e.alias, an.createUncachedDescriptors, t, r))));
|
|
function* FWe(e, t) {
|
|
let r, i, n = new bp.ConfigPrinter(), a = yield* NWe({
|
|
options: e,
|
|
dirname: t.cwd
|
|
}, t, void 0, n);
|
|
if (!a) return null;
|
|
let o = yield* n.output(), u;
|
|
typeof e.configFile == "string" ? u = yield* (0, gp.loadConfig)(e.configFile, t.cwd, t.envName, t.caller) : e.configFile !== !1 && (u = yield* (0, gp.
|
|
findRootConfig)(t.root, t.envName, t.caller));
|
|
let {
|
|
babelrc: l,
|
|
babelrcRoots: c
|
|
} = e, f = t.cwd, m = Pg(), h = new bp.ConfigPrinter();
|
|
if (u) {
|
|
let D = OWe(u), v = yield* C_(D, t, void 0, h);
|
|
if (!v) return null;
|
|
r = yield* h.output(), l === void 0 && (l = D.options.babelrc), c === void 0 && (f = D.dirname, c = D.options.babelrcRoots), pc(m, v);
|
|
}
|
|
let d, y, p = !1, g = Pg();
|
|
if ((l === !0 || l === void 0) && typeof t.filename == "string") {
|
|
let D = yield* (0, gp.findPackageData)(t.filename);
|
|
if (D && IWe(t, D, c, f)) {
|
|
if ({
|
|
ignore: d,
|
|
config: y
|
|
} = yield* (0, gp.findRelativeConfig)(D, t.envName, t.caller), d && g.files.add(d.filepath), d && yH(t, d.ignore, null, d.dirname) &&
|
|
(p = !0), y && !p) {
|
|
let v = kWe(y), S = new bp.ConfigPrinter(), C = yield* C_(v, t, void 0, S);
|
|
C ? (i = yield* S.output(), pc(g, C)) : p = !0;
|
|
}
|
|
y && p && g.files.add(y.filepath);
|
|
}
|
|
}
|
|
t.showConfig && console.log(`Babel configs on "${t.filename}" (ascending priority):
|
|
` + [r, i, o].filter((D) => !!D).join(`
|
|
|
|
`) + `
|
|
-----End Babel configs-----`);
|
|
let b = pc(pc(pc(Pg(), m), g), a);
|
|
return {
|
|
plugins: p ? [] : Fg(b.plugins),
|
|
presets: p ? [] : Fg(b.presets),
|
|
options: p ? [] : b.options.map((D) => mH(D)),
|
|
fileHandling: p ? "ignored" : "transpile",
|
|
ignore: d || void 0,
|
|
babelrc: y || void 0,
|
|
config: u || void 0,
|
|
files: b.files
|
|
};
|
|
}
|
|
s(FWe, "buildRootChain");
|
|
function IWe(e, t, r, i) {
|
|
if (typeof r == "boolean") return r;
|
|
let n = e.root;
|
|
if (r === void 0)
|
|
return t.directories.includes(n);
|
|
let a = r;
|
|
return Array.isArray(a) || (a = [a]), a = a.map((o) => typeof o == "string" ? dH().resolve(i, o) : o), a.length === 1 && a[0] === n ? t.
|
|
directories.includes(n) : a.some((o) => (typeof o == "string" && (o = (0, hH.default)(o, i)), t.directories.some((u) => gH(o, i, u, e))));
|
|
}
|
|
s(IWe, "babelrcLoadEnabled");
|
|
var OWe = (0, Fr.makeWeakCacheSync)((e) => ({
|
|
filepath: e.filepath,
|
|
dirname: e.dirname,
|
|
options: (0, A_.validate)("configfile", e.options, e.filepath)
|
|
})), kWe = (0, Fr.makeWeakCacheSync)((e) => ({
|
|
filepath: e.filepath,
|
|
dirname: e.dirname,
|
|
options: (0, A_.validate)("babelrcfile", e.options, e.filepath)
|
|
})), BWe = (0, Fr.makeWeakCacheSync)((e) => ({
|
|
filepath: e.filepath,
|
|
dirname: e.dirname,
|
|
options: (0, A_.validate)("extendsfile", e.options, e.filepath)
|
|
})), NWe = O_({
|
|
root: /* @__PURE__ */ s((e) => __(e, "base", an.createCachedDescriptors), "root"),
|
|
env: /* @__PURE__ */ s((e, t) => P_(e, "base", an.createCachedDescriptors, t), "env"),
|
|
overrides: /* @__PURE__ */ s((e, t) => F_(e, "base", an.createCachedDescriptors, t), "overrides"),
|
|
overridesEnv: /* @__PURE__ */ s((e, t, r) => I_(e, "base", an.createCachedDescriptors, t, r), "overridesEnv"),
|
|
createLogger: /* @__PURE__ */ s((e, t, r) => WWe(e, t, r), "createLogger")
|
|
}), MWe = O_({
|
|
root: /* @__PURE__ */ s((e) => RWe(e), "root"),
|
|
env: /* @__PURE__ */ s((e, t) => jWe(e)(t), "env"),
|
|
overrides: /* @__PURE__ */ s((e, t) => LWe(e)(t), "overrides"),
|
|
overridesEnv: /* @__PURE__ */ s((e, t, r) => qWe(e)(t)(r), "overridesEnv"),
|
|
createLogger: /* @__PURE__ */ s((e, t, r) => UWe(e.filepath, t, r), "createLogger")
|
|
});
|
|
function* C_(e, t, r, i) {
|
|
let n = yield* MWe(e, t, r, i);
|
|
return n?.files.add(e.filepath), n;
|
|
}
|
|
s(C_, "loadFileChain");
|
|
var RWe = (0, Fr.makeWeakCacheSync)((e) => __(e, e.filepath, an.createUncachedDescriptors)), jWe = (0, Fr.makeWeakCacheSync)((e) => (0, Fr.
|
|
makeStrongCacheSync)((t) => P_(e, e.filepath, an.createUncachedDescriptors, t))), LWe = (0, Fr.makeWeakCacheSync)((e) => (0, Fr.makeStrongCacheSync)(
|
|
(t) => F_(e, e.filepath, an.createUncachedDescriptors, t))), qWe = (0, Fr.makeWeakCacheSync)((e) => (0, Fr.makeStrongCacheSync)((t) => (0, Fr.
|
|
makeStrongCacheSync)((r) => I_(e, e.filepath, an.createUncachedDescriptors, t, r))));
|
|
function UWe(e, t, r) {
|
|
return r ? r.configure(t.showConfig, bp.ChainFormatter.Config, {
|
|
filepath: e
|
|
}) : () => {
|
|
};
|
|
}
|
|
s(UWe, "buildFileLogger");
|
|
function __({
|
|
dirname: e,
|
|
options: t
|
|
}, r, i) {
|
|
return i(e, t, r);
|
|
}
|
|
s(__, "buildRootDescriptors");
|
|
function WWe(e, t, r) {
|
|
var i;
|
|
return r ? r.configure(t.showConfig, bp.ChainFormatter.Programmatic, {
|
|
callerName: (i = t.caller) == null ? void 0 : i.name
|
|
}) : () => {
|
|
};
|
|
}
|
|
s(WWe, "buildProgrammaticLogger");
|
|
function P_({
|
|
dirname: e,
|
|
options: t
|
|
}, r, i, n) {
|
|
var a;
|
|
let o = (a = t.env) == null ? void 0 : a[n];
|
|
return o ? i(e, o, `${r}.env["${n}"]`) : null;
|
|
}
|
|
s(P_, "buildEnvDescriptors");
|
|
function F_({
|
|
dirname: e,
|
|
options: t
|
|
}, r, i, n) {
|
|
var a;
|
|
let o = (a = t.overrides) == null ? void 0 : a[n];
|
|
if (!o) throw new Error("Assertion failure - missing override");
|
|
return i(e, o, `${r}.overrides[${n}]`);
|
|
}
|
|
s(F_, "buildOverrideDescriptors");
|
|
function I_({
|
|
dirname: e,
|
|
options: t
|
|
}, r, i, n, a) {
|
|
var o, u;
|
|
let l = (o = t.overrides) == null ? void 0 : o[n];
|
|
if (!l) throw new Error("Assertion failure - missing override");
|
|
let c = (u = l.env) == null ? void 0 : u[a];
|
|
return c ? i(e, c, `${r}.overrides[${n}].env["${a}"]`) : null;
|
|
}
|
|
s(I_, "buildOverrideEnvDescriptors");
|
|
function O_({
|
|
root: e,
|
|
env: t,
|
|
overrides: r,
|
|
overridesEnv: i,
|
|
createLogger: n
|
|
}) {
|
|
return /* @__PURE__ */ s(function* (o, u, l = /* @__PURE__ */ new Set(), c) {
|
|
let {
|
|
dirname: f
|
|
} = o, m = [], h = e(o);
|
|
if (_g(h, f, u, o.filepath)) {
|
|
m.push({
|
|
config: h,
|
|
envName: void 0,
|
|
index: void 0
|
|
});
|
|
let p = t(o, u.envName);
|
|
p && _g(p, f, u, o.filepath) && m.push({
|
|
config: p,
|
|
envName: u.envName,
|
|
index: void 0
|
|
}), (h.options.overrides || []).forEach((g, b) => {
|
|
let D = r(o, b);
|
|
if (_g(D, f, u, o.filepath)) {
|
|
m.push({
|
|
config: D,
|
|
index: b,
|
|
envName: void 0
|
|
});
|
|
let v = i(o, b, u.envName);
|
|
v && _g(v, f, u, o.filepath) && m.push({
|
|
config: v,
|
|
index: b,
|
|
envName: u.envName
|
|
});
|
|
}
|
|
});
|
|
}
|
|
if (m.some(({
|
|
config: {
|
|
options: {
|
|
ignore: p,
|
|
only: g
|
|
}
|
|
}
|
|
}) => yH(u, p, g, f)))
|
|
return null;
|
|
let d = Pg(), y = n(o, u, c);
|
|
for (let {
|
|
config: p,
|
|
index: g,
|
|
envName: b
|
|
} of m) {
|
|
if (!(yield* $We(d, p.options, f, u, l, c)))
|
|
return null;
|
|
y(p, g, b), yield* VWe(d, p);
|
|
}
|
|
return d;
|
|
}, "chainWalker");
|
|
}
|
|
s(O_, "makeChainWalker");
|
|
function* $We(e, t, r, i, n, a) {
|
|
if (t.extends === void 0) return !0;
|
|
let o = yield* (0, gp.loadConfig)(t.extends, r, i.envName, i.caller);
|
|
if (n.has(o))
|
|
throw new Error(`Configuration cycle detected loading ${o.filepath}.
|
|
File already loaded following the config chain:
|
|
` + Array.from(n, (l) => ` - ${l.filepath}`).join(`
|
|
`));
|
|
n.add(o);
|
|
let u = yield* C_(BWe(o), i, n, a);
|
|
return n.delete(o), u ? (pc(e, u), !0) : !1;
|
|
}
|
|
s($We, "mergeExtendsChain");
|
|
function pc(e, t) {
|
|
e.options.push(...t.options), e.plugins.push(...t.plugins), e.presets.push(...t.presets);
|
|
for (let r of t.files)
|
|
e.files.add(r);
|
|
return e;
|
|
}
|
|
s(pc, "mergeChain");
|
|
function* VWe(e, {
|
|
options: t,
|
|
plugins: r,
|
|
presets: i
|
|
}) {
|
|
return e.options.push(t), e.plugins.push(...yield* r()), e.presets.push(...yield* i()), e;
|
|
}
|
|
s(VWe, "mergeChainOpts");
|
|
function Pg() {
|
|
return {
|
|
options: [],
|
|
presets: [],
|
|
plugins: [],
|
|
files: /* @__PURE__ */ new Set()
|
|
};
|
|
}
|
|
s(Pg, "emptyChain");
|
|
function mH(e) {
|
|
let t = Object.assign({}, e);
|
|
return delete t.extends, delete t.env, delete t.overrides, delete t.plugins, delete t.presets, delete t.passPerPreset, delete t.ignore, delete t.
|
|
only, delete t.test, delete t.include, delete t.exclude, hasOwnProperty.call(t, "sourceMap") && (t.sourceMaps = t.sourceMap, delete t.sourceMap),
|
|
t;
|
|
}
|
|
s(mH, "normalizeOptions");
|
|
function Fg(e) {
|
|
let t = /* @__PURE__ */ new Map(), r = [];
|
|
for (let i of e)
|
|
if (typeof i.value == "function") {
|
|
let n = i.value, a = t.get(n);
|
|
a || (a = /* @__PURE__ */ new Map(), t.set(n, a));
|
|
let o = a.get(i.name);
|
|
o ? o.value = i : (o = {
|
|
value: i
|
|
}, r.push(o), i.ownPass || a.set(i.name, o));
|
|
} else
|
|
r.push({
|
|
value: i
|
|
});
|
|
return r.reduce((i, n) => (i.push(n.value), i), []);
|
|
}
|
|
s(Fg, "dedupDescriptors");
|
|
function _g({
|
|
options: e
|
|
}, t, r, i) {
|
|
return (e.test === void 0 || T_(r, e.test, t, i)) && (e.include === void 0 || T_(r, e.include, t, i)) && (e.exclude === void 0 || !T_(r,
|
|
e.exclude, t, i));
|
|
}
|
|
s(_g, "configIsApplicable");
|
|
function T_(e, t, r, i) {
|
|
let n = Array.isArray(t) ? t : [t];
|
|
return w_(e, n, r, i);
|
|
}
|
|
s(T_, "configFieldIsApplicable");
|
|
function fH(e, t) {
|
|
return t instanceof RegExp ? String(t) : t;
|
|
}
|
|
s(fH, "ignoreListReplacer");
|
|
function yH(e, t, r, i) {
|
|
if (t && w_(e, t, i)) {
|
|
var n;
|
|
let o = `No config is applied to "${(n = e.filename) != null ? n : "(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(
|
|
t, fH)}\` from "${i}"`;
|
|
return cH(o), e.showConfig && console.log(o), !0;
|
|
}
|
|
if (r && !w_(e, r, i)) {
|
|
var a;
|
|
let o = `No config is applied to "${(a = e.filename) != null ? a : "(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(
|
|
r, fH)}\` from "${i}"`;
|
|
return cH(o), e.showConfig && console.log(o), !0;
|
|
}
|
|
return !1;
|
|
}
|
|
s(yH, "shouldIgnore");
|
|
function w_(e, t, r, i) {
|
|
return t.some((n) => gH(n, r, e.filename, e, i));
|
|
}
|
|
s(w_, "matchesPatterns");
|
|
function gH(e, t, r, i, n) {
|
|
if (typeof e == "function")
|
|
return !!(0, xWe.endHiddenCallStack)(e)(r, {
|
|
dirname: t,
|
|
envName: i.envName,
|
|
caller: i.caller
|
|
});
|
|
if (typeof r != "string")
|
|
throw new SWe.default("Configuration contains string/RegExp pattern, but no filename was passed to Babel", n);
|
|
return typeof e == "string" && (e = (0, hH.default)(e, t)), e.test(r);
|
|
}
|
|
s(gH, "matchPattern");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/validation/plugins.js
|
|
var bH = E((B_) => {
|
|
"use strict";
|
|
Object.defineProperty(B_, "__esModule", {
|
|
value: !0
|
|
});
|
|
B_.validatePluginObject = GWe;
|
|
var ia = m_(), HWe = {
|
|
name: ia.assertString,
|
|
manipulateOptions: ia.assertFunction,
|
|
pre: ia.assertFunction,
|
|
post: ia.assertFunction,
|
|
inherits: ia.assertFunction,
|
|
visitor: KWe,
|
|
parserOverride: ia.assertFunction,
|
|
generatorOverride: ia.assertFunction
|
|
};
|
|
function KWe(e, t) {
|
|
let r = (0, ia.assertObject)(e, t);
|
|
if (r && (Object.keys(r).forEach((i) => {
|
|
i !== "_exploded" && i !== "_verified" && zWe(i, r[i]);
|
|
}), r.enter || r.exit))
|
|
throw new Error(`${(0, ia.msg)(e)} cannot contain catch-all "enter" or "exit" handlers. Please target individual nodes.`);
|
|
return r;
|
|
}
|
|
s(KWe, "assertVisitorMap");
|
|
function zWe(e, t) {
|
|
if (t && typeof t == "object")
|
|
Object.keys(t).forEach((r) => {
|
|
if (r !== "enter" && r !== "exit")
|
|
throw new Error(`.visitor["${e}"] may only have .enter and/or .exit handlers.`);
|
|
});
|
|
else if (typeof t != "function")
|
|
throw new Error(`.visitor["${e}"] must be a function`);
|
|
}
|
|
s(zWe, "assertVisitorHandler");
|
|
function GWe(e) {
|
|
let t = {
|
|
type: "root",
|
|
source: "plugin"
|
|
};
|
|
return Object.keys(e).forEach((r) => {
|
|
let i = HWe[r];
|
|
if (i)
|
|
i({
|
|
type: "option",
|
|
name: r,
|
|
parent: t
|
|
}, e[r]);
|
|
else {
|
|
let n = new Error(`.${r} is not a valid Plugin property`);
|
|
throw n.code = "BABEL_UNKNOWN_PLUGIN_PROPERTY", n;
|
|
}
|
|
}), e;
|
|
}
|
|
s(GWe, "validatePluginObject");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/helpers/environment.js
|
|
var M_ = E((N_) => {
|
|
"use strict";
|
|
Object.defineProperty(N_, "__esModule", {
|
|
value: !0
|
|
});
|
|
N_.getEnv = JWe;
|
|
function JWe(e = "development") {
|
|
return process.env.BABEL_ENV || process.env.NODE_ENV || e;
|
|
}
|
|
s(JWe, "getEnv");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/partial.js
|
|
var R_ = E((Bg) => {
|
|
"use strict";
|
|
Object.defineProperty(Bg, "__esModule", {
|
|
value: !0
|
|
});
|
|
Bg.default = vH;
|
|
Bg.loadPartialConfig = s$e;
|
|
function Ig() {
|
|
let e = V("path");
|
|
return Ig = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_path"), e;
|
|
}
|
|
s(Ig, "_path");
|
|
var XWe = ig(), YWe = $0(), DH = fp(), ZWe = k_(), QWe = M_(), e$e = mp(), Og = dp(), t$e = c_(), r$e = ["showIgnoredFiles"];
|
|
function i$e(e, t) {
|
|
if (e == null) return {};
|
|
var r = {};
|
|
for (var i in e) if ({}.hasOwnProperty.call(e, i)) {
|
|
if (t.indexOf(i) !== -1) continue;
|
|
r[i] = e[i];
|
|
}
|
|
return r;
|
|
}
|
|
s(i$e, "_objectWithoutPropertiesLoose");
|
|
function n$e(e, t) {
|
|
switch (t) {
|
|
case "root":
|
|
return e;
|
|
case "upward-optional": {
|
|
let r = (0, Og.findConfigUpwards)(e);
|
|
return r === null ? e : r;
|
|
}
|
|
case "upward": {
|
|
let r = (0, Og.findConfigUpwards)(e);
|
|
if (r !== null) return r;
|
|
throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not be found when searching upward from "${e}".\
|
|
|
|
One of the following config files must be in the directory tree: "${Og.ROOT_CONFIG_FILENAMES.join(", ")}".`), {
|
|
code: "BABEL_ROOT_NOT_FOUND",
|
|
dirname: e
|
|
});
|
|
}
|
|
default:
|
|
throw new Error("Assertion failure - unknown rootMode value.");
|
|
}
|
|
}
|
|
s(n$e, "resolveRootMode");
|
|
function* vH(e) {
|
|
if (e != null && (typeof e != "object" || Array.isArray(e)))
|
|
throw new Error("Babel options must be an object, null, or undefined");
|
|
let t = e ? (0, e$e.validate)("arguments", e) : {}, {
|
|
envName: r = (0, QWe.getEnv)(),
|
|
cwd: i = ".",
|
|
root: n = ".",
|
|
rootMode: a = "root",
|
|
caller: o,
|
|
cloneInputAst: u = !0
|
|
} = t, l = Ig().resolve(i), c = n$e(Ig().resolve(l, n), a), f = typeof t.filename == "string" ? Ig().resolve(i, t.filename) : void 0, m = yield* (0, Og.
|
|
resolveShowConfigPath)(l), h = {
|
|
filename: f,
|
|
cwd: l,
|
|
root: c,
|
|
envName: r,
|
|
caller: o,
|
|
showConfig: m === f
|
|
}, d = yield* (0, ZWe.buildRootChain)(t, h);
|
|
if (!d) return null;
|
|
let y = {
|
|
assumptions: {}
|
|
};
|
|
return d.options.forEach((g) => {
|
|
(0, YWe.mergeOptions)(y, g);
|
|
}), {
|
|
options: Object.assign({}, y, {
|
|
targets: (0, t$e.resolveTargets)(y, c),
|
|
cloneInputAst: u,
|
|
babelrc: !1,
|
|
configFile: !1,
|
|
browserslistConfigFile: !1,
|
|
passPerPreset: !1,
|
|
envName: h.envName,
|
|
cwd: h.cwd,
|
|
root: h.root,
|
|
rootMode: "root",
|
|
filename: typeof h.filename == "string" ? h.filename : void 0,
|
|
plugins: d.plugins.map((g) => (0, DH.createItemFromDescriptor)(g)),
|
|
presets: d.presets.map((g) => (0, DH.createItemFromDescriptor)(g))
|
|
}),
|
|
context: h,
|
|
fileHandling: d.fileHandling,
|
|
ignore: d.ignore,
|
|
babelrc: d.babelrc,
|
|
config: d.config,
|
|
files: d.files
|
|
};
|
|
}
|
|
s(vH, "loadPrivatePartialConfig");
|
|
function* s$e(e) {
|
|
let t = !1;
|
|
if (typeof e == "object" && e !== null && !Array.isArray(e)) {
|
|
var r = e;
|
|
({
|
|
showIgnoredFiles: t
|
|
} = r), e = i$e(r, r$e);
|
|
}
|
|
let i = yield* vH(e);
|
|
if (!i) return null;
|
|
let {
|
|
options: n,
|
|
babelrc: a,
|
|
ignore: o,
|
|
config: u,
|
|
fileHandling: l,
|
|
files: c
|
|
} = i;
|
|
return l === "ignored" && !t ? null : ((n.plugins || []).forEach((f) => {
|
|
if (f.value instanceof XWe.default)
|
|
throw new Error("Passing cached plugin instances is not supported in babel.loadPartialConfig()");
|
|
}), new kg(n, a ? a.filepath : void 0, o ? o.filepath : void 0, u ? u.filepath : void 0, l, c));
|
|
}
|
|
s(s$e, "loadPartialConfig");
|
|
var kg = class {
|
|
static {
|
|
s(this, "PartialConfig");
|
|
}
|
|
constructor(t, r, i, n, a, o) {
|
|
this.options = void 0, this.babelrc = void 0, this.babelignore = void 0, this.config = void 0, this.fileHandling = void 0, this.files =
|
|
void 0, this.options = t, this.babelignore = i, this.babelrc = r, this.config = n, this.fileHandling = a, this.files = o, Object.freeze(
|
|
this);
|
|
}
|
|
hasFilesystemConfig() {
|
|
return this.babelrc !== void 0 || this.config !== void 0;
|
|
}
|
|
};
|
|
Object.freeze(kg.prototype);
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/full.js
|
|
var PH = E((Ng) => {
|
|
"use strict";
|
|
Object.defineProperty(Ng, "__esModule", {
|
|
value: !0
|
|
});
|
|
Ng.default = void 0;
|
|
function TH() {
|
|
let e = Ri();
|
|
return TH = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_gensync"), e;
|
|
}
|
|
s(TH, "_gensync");
|
|
var q_ = Ya(), EH = $0(), a$e = hr(), CH = ig(), o$e = fp(), u$e = k_(), $_ = tg();
|
|
function U_() {
|
|
let e = Ar();
|
|
return U_ = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_traverse"), e;
|
|
}
|
|
s(U_, "_traverse");
|
|
var V_ = cu(), W_ = mp(), l$e = bH(), wH = FA(), c$e = R_(), f$e = fu(), fyt = Ng.default = TH()(/* @__PURE__ */ s(function* (t) {
|
|
var r;
|
|
let i = yield* (0, c$e.default)(t);
|
|
if (!i)
|
|
return null;
|
|
let {
|
|
options: n,
|
|
context: a,
|
|
fileHandling: o
|
|
} = i;
|
|
if (o === "ignored")
|
|
return null;
|
|
let u = {}, {
|
|
plugins: l,
|
|
presets: c
|
|
} = n;
|
|
if (!l || !c)
|
|
throw new Error("Assertion failure - plugins and presets exist");
|
|
let f = Object.assign({}, a, {
|
|
targets: n.targets
|
|
}), m = /* @__PURE__ */ s((S) => {
|
|
let C = (0, o$e.getItemDescriptor)(S);
|
|
if (!C)
|
|
throw new Error("Assertion failure - must be config item");
|
|
return C;
|
|
}, "toDescriptor"), h = c.map(m), d = l.map(m), y = [[]], p = [], g = [];
|
|
if (yield* xH(a, /* @__PURE__ */ s(function* S(C, O) {
|
|
let k = [];
|
|
for (let j = 0; j < C.length; j++) {
|
|
let K = C[j];
|
|
if (K.options !== !1) {
|
|
try {
|
|
var U = yield* g$e(K, f);
|
|
} catch (R) {
|
|
throw R.code === "BABEL_UNKNOWN_OPTION" && (0, W_.checkNoUnwrappedItemOptionPairs)(C, j, "preset", R), R;
|
|
}
|
|
g.push(U.externalDependencies), K.ownPass ? k.push({
|
|
preset: U.chain,
|
|
pass: []
|
|
}) : k.unshift({
|
|
preset: U.chain,
|
|
pass: O
|
|
});
|
|
}
|
|
}
|
|
if (k.length > 0) {
|
|
y.splice(1, 0, ...k.map((j) => j.pass).filter((j) => j !== O));
|
|
for (let {
|
|
preset: j,
|
|
pass: K
|
|
} of k) {
|
|
if (!j || (K.push(...j.plugins), yield* S(j.presets, K))) return !0;
|
|
j.options.forEach((ee) => {
|
|
(0, EH.mergeOptions)(u, ee);
|
|
});
|
|
}
|
|
}
|
|
}, "recursePresetDescriptors"))(h, y[0])) return null;
|
|
let D = u;
|
|
(0, EH.mergeOptions)(D, n);
|
|
let v = Object.assign({}, f, {
|
|
assumptions: (r = D.assumptions) != null ? r : {}
|
|
});
|
|
return yield* xH(a, /* @__PURE__ */ s(function* () {
|
|
y[0].unshift(...d);
|
|
for (let O of y) {
|
|
let k = [];
|
|
p.push(k);
|
|
for (let U = 0; U < O.length; U++) {
|
|
let j = O[U];
|
|
if (j.options !== !1) {
|
|
try {
|
|
var C = yield* _H(j, v);
|
|
} catch (K) {
|
|
throw K.code === "BABEL_UNKNOWN_PLUGIN_PROPERTY" && (0, W_.checkNoUnwrappedItemOptionPairs)(O, U, "plugin", K), K;
|
|
}
|
|
k.push(C), g.push(C.externalDependencies);
|
|
}
|
|
}
|
|
}
|
|
}, "loadPluginDescriptors"))(), D.plugins = p[0], D.presets = p.slice(1).filter((S) => S.length > 0).map((S) => ({
|
|
plugins: S
|
|
})), D.passPerPreset = D.presets.length > 0, {
|
|
options: D,
|
|
passes: p,
|
|
externalDependencies: (0, $_.finalize)(g)
|
|
};
|
|
}, "loadFullConfig"));
|
|
function xH(e, t) {
|
|
return function* (r, i) {
|
|
try {
|
|
return yield* t(r, i);
|
|
} catch (a) {
|
|
if (!/^\[BABEL\]/.test(a.message)) {
|
|
var n;
|
|
a.message = `[BABEL] ${(n = e.filename) != null ? n : "unknown file"}: ${a.message}`;
|
|
}
|
|
throw a;
|
|
}
|
|
};
|
|
}
|
|
s(xH, "enhanceError");
|
|
var AH = /* @__PURE__ */ s((e) => (0, V_.makeWeakCache)(function* ({
|
|
value: t,
|
|
options: r,
|
|
dirname: i,
|
|
alias: n
|
|
}, a) {
|
|
if (r === !1) throw new Error("Assertion failure");
|
|
r = r || {};
|
|
let o = [], u = t;
|
|
if (typeof t == "function") {
|
|
let l = (0, q_.maybeAsync)(t, "You appear to be using an async plugin/preset, but Babel has been called synchronously"), c = Object.assign(
|
|
{}, a$e, e(a, o));
|
|
try {
|
|
u = yield* l(c, r, i);
|
|
} catch (f) {
|
|
throw n && (f.message += ` (While processing: ${JSON.stringify(n)})`), f;
|
|
}
|
|
}
|
|
if (!u || typeof u != "object")
|
|
throw new Error("Plugin/Preset did not return an object.");
|
|
if ((0, q_.isThenable)(u))
|
|
throw yield* [], new Error(`You appear to be using a promise as a plugin, which your current version of Babel does not support. If you\
|
|
're using a published plugin, you may need to upgrade your @babel/core version. As an alternative, you can prefix the promise with "await". \
|
|
(While processing: ${JSON.stringify(n)})`);
|
|
if (o.length > 0 && (!a.configured() || a.mode() === "forever")) {
|
|
let l = `A plugin/preset has external untracked dependencies (${o[0]}), but the cache `;
|
|
throw a.configured() ? l += " has been configured to never be invalidated. " : l += "has not been configured to be invalidated when th\
|
|
e external dependencies change. ", l += `Plugins/presets should configure their cache to be invalidated when the external dependencies chang\
|
|
e, for example using \`api.cache.invalidate(() => statSync(filepath).mtimeMs)\` or \`api.cache.never()\`
|
|
(While processing: ${JSON.stringify(n)})`, new Error(l);
|
|
}
|
|
return {
|
|
value: u,
|
|
options: r,
|
|
dirname: i,
|
|
alias: n,
|
|
externalDependencies: (0, $_.finalize)(o)
|
|
};
|
|
}), "makeDescriptorLoader"), d$e = AH(wH.makePluginAPI), p$e = AH(wH.makePresetAPI), h$e = (0, V_.makeWeakCache)(function* ({
|
|
value: e,
|
|
options: t,
|
|
dirname: r,
|
|
alias: i,
|
|
externalDependencies: n
|
|
}, a) {
|
|
let o = (0, l$e.validatePluginObject)(e), u = Object.assign({}, o);
|
|
if (u.visitor && (u.visitor = U_().default.explode(Object.assign({}, u.visitor))), u.inherits) {
|
|
let l = {
|
|
name: void 0,
|
|
alias: `${i}$inherits`,
|
|
value: u.inherits,
|
|
options: t,
|
|
dirname: r
|
|
}, c = yield* (0, q_.forwardAsync)(_H, (f) => a.invalidate((m) => f(l, m)));
|
|
u.pre = L_(c.pre, u.pre), u.post = L_(c.post, u.post), u.manipulateOptions = L_(c.manipulateOptions, u.manipulateOptions), u.visitor =
|
|
U_().default.visitors.merge([c.visitor || {}, u.visitor || {}]), c.externalDependencies.length > 0 && (n.length === 0 ? n = c.externalDependencies :
|
|
n = (0, $_.finalize)([n, c.externalDependencies]));
|
|
}
|
|
return new CH.default(u, t, i, n);
|
|
});
|
|
function* _H(e, t) {
|
|
if (e.value instanceof CH.default) {
|
|
if (e.options)
|
|
throw new Error("Passed options to an existing Plugin instance will not work.");
|
|
return e.value;
|
|
}
|
|
return yield* h$e(yield* d$e(e, t), t);
|
|
}
|
|
s(_H, "loadPluginDescriptor");
|
|
var j_ = /* @__PURE__ */ s((e) => e && typeof e != "function", "needsFilename"), SH = /* @__PURE__ */ s((e, t) => {
|
|
if (j_(e.test) || j_(e.include) || j_(e.exclude)) {
|
|
let r = t.name ? `"${t.name}"` : "/* your preset */";
|
|
throw new f$e.default([`Preset ${r} requires a filename to be set when babel is called directly,`, "```", `babel.transformSync(code, {\
|
|
filename: 'file.ts', presets: [${r}] });`, "```", "See https://babeljs.io/docs/en/options#filename for more information."].join(`
|
|
`));
|
|
}
|
|
}, "validateIfOptionNeedsFilename"), m$e = /* @__PURE__ */ s((e, t, r) => {
|
|
if (!t.filename) {
|
|
var i;
|
|
let {
|
|
options: n
|
|
} = e;
|
|
SH(n, r), (i = n.overrides) == null || i.forEach((a) => SH(a, r));
|
|
}
|
|
}, "validatePreset"), y$e = (0, V_.makeWeakCacheSync)(({
|
|
value: e,
|
|
dirname: t,
|
|
alias: r,
|
|
externalDependencies: i
|
|
}) => ({
|
|
options: (0, W_.validate)("preset", e),
|
|
alias: r,
|
|
dirname: t,
|
|
externalDependencies: i
|
|
}));
|
|
function* g$e(e, t) {
|
|
let r = y$e(yield* p$e(e, t));
|
|
return m$e(r, t, e), {
|
|
chain: yield* (0, u$e.buildPresetChain)(r, t),
|
|
externalDependencies: r.externalDependencies
|
|
};
|
|
}
|
|
s(g$e, "loadPresetDescriptor");
|
|
function L_(e, t) {
|
|
return e ? t ? function(...r) {
|
|
let i = e.apply(this, r);
|
|
return i && typeof i.then == "function" ? i.then(() => t.apply(this, r)) : t.apply(this, r);
|
|
} : e : t;
|
|
}
|
|
s(L_, "chainMaybeAsync");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/index.js
|
|
var mc = E((un) => {
|
|
"use strict";
|
|
Object.defineProperty(un, "__esModule", {
|
|
value: !0
|
|
});
|
|
un.createConfigItem = w$e;
|
|
un.createConfigItemAsync = C$e;
|
|
un.createConfigItemSync = kH;
|
|
Object.defineProperty(un, "default", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return FH.default;
|
|
}, "get")
|
|
});
|
|
un.loadOptions = T$e;
|
|
un.loadOptionsAsync = S$e;
|
|
un.loadOptionsSync = OH;
|
|
un.loadPartialConfig = E$e;
|
|
un.loadPartialConfigAsync = v$e;
|
|
un.loadPartialConfigSync = IH;
|
|
function Lg() {
|
|
let e = Ri();
|
|
return Lg = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_gensync"), e;
|
|
}
|
|
s(Lg, "_gensync");
|
|
var FH = PH(), b$e = R_(), D$e = fp(), on = Js(), Mg = Lg()(b$e.loadPartialConfig);
|
|
function v$e(...e) {
|
|
return (0, on.beginHiddenCallStack)(Mg.async)(...e);
|
|
}
|
|
s(v$e, "loadPartialConfigAsync");
|
|
function IH(...e) {
|
|
return (0, on.beginHiddenCallStack)(Mg.sync)(...e);
|
|
}
|
|
s(IH, "loadPartialConfigSync");
|
|
function E$e(e, t) {
|
|
if (t !== void 0)
|
|
(0, on.beginHiddenCallStack)(Mg.errback)(e, t);
|
|
else if (typeof e == "function")
|
|
(0, on.beginHiddenCallStack)(Mg.errback)(void 0, e);
|
|
else
|
|
return IH(e);
|
|
}
|
|
s(E$e, "loadPartialConfig");
|
|
function* x$e(e) {
|
|
var t;
|
|
let r = yield* (0, FH.default)(e);
|
|
return (t = r?.options) != null ? t : null;
|
|
}
|
|
s(x$e, "loadOptionsImpl");
|
|
var Rg = Lg()(x$e);
|
|
function S$e(...e) {
|
|
return (0, on.beginHiddenCallStack)(Rg.async)(...e);
|
|
}
|
|
s(S$e, "loadOptionsAsync");
|
|
function OH(...e) {
|
|
return (0, on.beginHiddenCallStack)(Rg.sync)(...e);
|
|
}
|
|
s(OH, "loadOptionsSync");
|
|
function T$e(e, t) {
|
|
if (t !== void 0)
|
|
(0, on.beginHiddenCallStack)(Rg.errback)(e, t);
|
|
else if (typeof e == "function")
|
|
(0, on.beginHiddenCallStack)(Rg.errback)(void 0, e);
|
|
else
|
|
return OH(e);
|
|
}
|
|
s(T$e, "loadOptions");
|
|
var jg = Lg()(D$e.createConfigItem);
|
|
function C$e(...e) {
|
|
return (0, on.beginHiddenCallStack)(jg.async)(...e);
|
|
}
|
|
s(C$e, "createConfigItemAsync");
|
|
function kH(...e) {
|
|
return (0, on.beginHiddenCallStack)(jg.sync)(...e);
|
|
}
|
|
s(kH, "createConfigItemSync");
|
|
function w$e(e, t, r) {
|
|
if (r !== void 0)
|
|
(0, on.beginHiddenCallStack)(jg.errback)(e, t, r);
|
|
else if (typeof t == "function")
|
|
(0, on.beginHiddenCallStack)(jg.errback)(e, void 0, r);
|
|
else
|
|
return kH(e, t);
|
|
}
|
|
s(w$e, "createConfigItem");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transformation/plugin-pass.js
|
|
var BH = E((qg) => {
|
|
"use strict";
|
|
Object.defineProperty(qg, "__esModule", {
|
|
value: !0
|
|
});
|
|
qg.default = void 0;
|
|
var Dp = class {
|
|
static {
|
|
s(this, "PluginPass");
|
|
}
|
|
constructor(t, r, i, n) {
|
|
this._map = /* @__PURE__ */ new Map(), this.key = void 0, this.file = void 0, this.opts = void 0, this.cwd = void 0, this.filename = void 0,
|
|
this.isAsync = void 0, this.key = r, this.file = t, this.opts = i || {}, this.cwd = t.opts.cwd, this.filename = t.opts.filename, this.
|
|
isAsync = n;
|
|
}
|
|
set(t, r) {
|
|
this._map.set(t, r);
|
|
}
|
|
get(t) {
|
|
return this._map.get(t);
|
|
}
|
|
availableHelper(t, r) {
|
|
return this.file.availableHelper(t, r);
|
|
}
|
|
addHelper(t) {
|
|
return this.file.addHelper(t);
|
|
}
|
|
buildCodeFrameError(t, r, i) {
|
|
return this.file.buildCodeFrameError(t, r, i);
|
|
}
|
|
};
|
|
qg.default = Dp;
|
|
Dp.prototype.getModuleName = /* @__PURE__ */ s(function() {
|
|
return this.file.getModuleName();
|
|
}, "getModuleName"), Dp.prototype.addImport = /* @__PURE__ */ s(function() {
|
|
this.file.addImport();
|
|
}, "addImport");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transformation/block-hoist-plugin.js
|
|
var LH = E((K_) => {
|
|
"use strict";
|
|
Object.defineProperty(K_, "__esModule", {
|
|
value: !0
|
|
});
|
|
K_.default = _$e;
|
|
function RH() {
|
|
let e = Ar();
|
|
return RH = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_traverse"), e;
|
|
}
|
|
s(RH, "_traverse");
|
|
var A$e = ig(), H_, NH = {
|
|
name: "internal.blockHoist",
|
|
visitor: {
|
|
Block: {
|
|
exit({
|
|
node: e
|
|
}) {
|
|
e.body = MH(e.body);
|
|
}
|
|
},
|
|
SwitchCase: {
|
|
exit({
|
|
node: e
|
|
}) {
|
|
e.consequent = MH(e.consequent);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
function MH(e) {
|
|
let t = Math.pow(2, 30) - 1, r = !1;
|
|
for (let i = 0; i < e.length; i++) {
|
|
let n = e[i], a = jH(n);
|
|
if (a > t) {
|
|
r = !0;
|
|
break;
|
|
}
|
|
t = a;
|
|
}
|
|
return r ? P$e(e.slice()) : e;
|
|
}
|
|
s(MH, "performHoisting");
|
|
function _$e() {
|
|
return H_ || (H_ = new A$e.default(Object.assign({}, NH, {
|
|
visitor: RH().default.explode(NH.visitor)
|
|
}), {})), H_;
|
|
}
|
|
s(_$e, "loadBlockHoistPlugin");
|
|
function jH(e) {
|
|
let t = e?._blockHoist;
|
|
return t == null ? 1 : t === !0 ? 2 : t;
|
|
}
|
|
s(jH, "priority");
|
|
function P$e(e) {
|
|
let t = /* @__PURE__ */ Object.create(null);
|
|
for (let n = 0; n < e.length; n++) {
|
|
let a = e[n], o = jH(a);
|
|
(t[o] || (t[o] = [])).push(a);
|
|
}
|
|
let r = Object.keys(t).map((n) => +n).sort((n, a) => a - n), i = 0;
|
|
for (let n of r) {
|
|
let a = t[n];
|
|
for (let o of a)
|
|
e[i++] = o;
|
|
}
|
|
return e;
|
|
}
|
|
s(P$e, "stableSort");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transformation/normalize-opts.js
|
|
var G_ = E((z_) => {
|
|
"use strict";
|
|
Object.defineProperty(z_, "__esModule", {
|
|
value: !0
|
|
});
|
|
z_.default = F$e;
|
|
function Ug() {
|
|
let e = V("path");
|
|
return Ug = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_path"), e;
|
|
}
|
|
s(Ug, "_path");
|
|
function F$e(e) {
|
|
let {
|
|
filename: t,
|
|
cwd: r,
|
|
filenameRelative: i = typeof t == "string" ? Ug().relative(r, t) : "unknown",
|
|
sourceType: n = "module",
|
|
inputSourceMap: a,
|
|
sourceMaps: o = !!a,
|
|
sourceRoot: u = e.options.moduleRoot,
|
|
sourceFileName: l = Ug().basename(i),
|
|
comments: c = !0,
|
|
compact: f = "auto"
|
|
} = e.options, m = e.options, h = Object.assign({}, m, {
|
|
parserOpts: Object.assign({
|
|
sourceType: Ug().extname(i) === ".mjs" ? "module" : n,
|
|
sourceFileName: t,
|
|
plugins: []
|
|
}, m.parserOpts),
|
|
generatorOpts: Object.assign({
|
|
filename: t,
|
|
auxiliaryCommentBefore: m.auxiliaryCommentBefore,
|
|
auxiliaryCommentAfter: m.auxiliaryCommentAfter,
|
|
retainLines: m.retainLines,
|
|
comments: c,
|
|
shouldPrintComment: m.shouldPrintComment,
|
|
compact: f,
|
|
minified: m.minified,
|
|
sourceMaps: o,
|
|
sourceRoot: u,
|
|
sourceFileName: l
|
|
}, m.generatorOpts)
|
|
});
|
|
for (let d of e.passes)
|
|
for (let y of d)
|
|
y.manipulateOptions && y.manipulateOptions(h, h.parserOpts);
|
|
return h;
|
|
}
|
|
s(F$e, "normalizeOptions");
|
|
});
|
|
|
|
// ../node_modules/convert-source-map/index.js
|
|
var J_ = E((yr) => {
|
|
"use strict";
|
|
Object.defineProperty(yr, "commentRegex", {
|
|
get: /* @__PURE__ */ s(function() {
|
|
return /^\s*?\/[\/\*][@#]\s+?sourceMappingURL=data:(((?:application|text)\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/mg;
|
|
}, "getCommentRegex")
|
|
});
|
|
Object.defineProperty(yr, "mapFileCommentRegex", {
|
|
get: /* @__PURE__ */ s(function() {
|
|
return /(?:\/\/[@#][ \t]+?sourceMappingURL=([^\s'"`]+?)[ \t]*?$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*?(?:\*\/){1}[ \t]*?$)/mg;
|
|
}, "getMapFileCommentRegex")
|
|
});
|
|
var Wg;
|
|
typeof Buffer < "u" ? typeof Buffer.from == "function" ? Wg = I$e : Wg = O$e : Wg = k$e;
|
|
function I$e(e) {
|
|
return Buffer.from(e, "base64").toString();
|
|
}
|
|
s(I$e, "decodeBase64WithBufferFrom");
|
|
function O$e(e) {
|
|
if (typeof value == "number")
|
|
throw new TypeError("The value to decode must not be of type number.");
|
|
return new Buffer(e, "base64").toString();
|
|
}
|
|
s(O$e, "decodeBase64WithNewBuffer");
|
|
function k$e(e) {
|
|
return decodeURIComponent(escape(atob(e)));
|
|
}
|
|
s(k$e, "decodeBase64WithAtob");
|
|
function B$e(e) {
|
|
return e.split(",").pop();
|
|
}
|
|
s(B$e, "stripComment");
|
|
function N$e(e, t) {
|
|
var r = yr.mapFileCommentRegex.exec(e), i = r[1] || r[2];
|
|
try {
|
|
var e = t(i);
|
|
return e != null && typeof e.catch == "function" ? e.catch(n) : e;
|
|
} catch (a) {
|
|
n(a);
|
|
}
|
|
function n(a) {
|
|
throw new Error("An error occurred while trying to read the map file at " + i + `
|
|
` + a.stack);
|
|
}
|
|
s(n, "throwError");
|
|
}
|
|
s(N$e, "readFromFileMap");
|
|
function si(e, t) {
|
|
t = t || {}, t.hasComment && (e = B$e(e)), t.encoding === "base64" ? e = Wg(e) : t.encoding === "uri" && (e = decodeURIComponent(e)), (t.
|
|
isJSON || t.encoding) && (e = JSON.parse(e)), this.sourcemap = e;
|
|
}
|
|
s(si, "Converter");
|
|
si.prototype.toJSON = function(e) {
|
|
return JSON.stringify(this.sourcemap, null, e);
|
|
};
|
|
typeof Buffer < "u" ? typeof Buffer.from == "function" ? si.prototype.toBase64 = M$e : si.prototype.toBase64 = R$e : si.prototype.toBase64 =
|
|
j$e;
|
|
function M$e() {
|
|
var e = this.toJSON();
|
|
return Buffer.from(e, "utf8").toString("base64");
|
|
}
|
|
s(M$e, "encodeBase64WithBufferFrom");
|
|
function R$e() {
|
|
var e = this.toJSON();
|
|
if (typeof e == "number")
|
|
throw new TypeError("The json to encode must not be of type number.");
|
|
return new Buffer(e, "utf8").toString("base64");
|
|
}
|
|
s(R$e, "encodeBase64WithNewBuffer");
|
|
function j$e() {
|
|
var e = this.toJSON();
|
|
return btoa(unescape(encodeURIComponent(e)));
|
|
}
|
|
s(j$e, "encodeBase64WithBtoa");
|
|
si.prototype.toURI = function() {
|
|
var e = this.toJSON();
|
|
return encodeURIComponent(e);
|
|
};
|
|
si.prototype.toComment = function(e) {
|
|
var t, r, i;
|
|
return e != null && e.encoding === "uri" ? (t = "", r = this.toURI()) : (t = ";base64", r = this.toBase64()), i = "sourceMappingURL=data\
|
|
:application/json;charset=utf-8" + t + "," + r, e != null && e.multiline ? "/*# " + i + " */" : "//# " + i;
|
|
};
|
|
si.prototype.toObject = function() {
|
|
return JSON.parse(this.toJSON());
|
|
};
|
|
si.prototype.addProperty = function(e, t) {
|
|
if (this.sourcemap.hasOwnProperty(e)) throw new Error('property "' + e + '" already exists on the sourcemap, use set property instead');
|
|
return this.setProperty(e, t);
|
|
};
|
|
si.prototype.setProperty = function(e, t) {
|
|
return this.sourcemap[e] = t, this;
|
|
};
|
|
si.prototype.getProperty = function(e) {
|
|
return this.sourcemap[e];
|
|
};
|
|
yr.fromObject = function(e) {
|
|
return new si(e);
|
|
};
|
|
yr.fromJSON = function(e) {
|
|
return new si(e, { isJSON: !0 });
|
|
};
|
|
yr.fromURI = function(e) {
|
|
return new si(e, { encoding: "uri" });
|
|
};
|
|
yr.fromBase64 = function(e) {
|
|
return new si(e, { encoding: "base64" });
|
|
};
|
|
yr.fromComment = function(e) {
|
|
var t, r;
|
|
return e = e.replace(/^\/\*/g, "//").replace(/\*\/$/g, ""), t = yr.commentRegex.exec(e), r = t && t[4] || "uri", new si(e, { encoding: r,
|
|
hasComment: !0 });
|
|
};
|
|
function qH(e) {
|
|
return new si(e, { isJSON: !0 });
|
|
}
|
|
s(qH, "makeConverter");
|
|
yr.fromMapFileComment = function(e, t) {
|
|
if (typeof t == "string")
|
|
throw new Error(
|
|
"String directory paths are no longer supported with `fromMapFileComment`\nPlease review the Upgrading documentation at https://githu\
|
|
b.com/thlorenz/convert-source-map#upgrading"
|
|
);
|
|
var r = N$e(e, t);
|
|
return r != null && typeof r.then == "function" ? r.then(qH) : qH(r);
|
|
};
|
|
yr.fromSource = function(e) {
|
|
var t = e.match(yr.commentRegex);
|
|
return t ? yr.fromComment(t.pop()) : null;
|
|
};
|
|
yr.fromMapFileSource = function(e, t) {
|
|
if (typeof t == "string")
|
|
throw new Error(
|
|
"String directory paths are no longer supported with `fromMapFileSource`\nPlease review the Upgrading documentation at https://github\
|
|
.com/thlorenz/convert-source-map#upgrading"
|
|
);
|
|
var r = e.match(yr.mapFileCommentRegex);
|
|
return r ? yr.fromMapFileComment(r.pop(), t) : null;
|
|
};
|
|
yr.removeComments = function(e) {
|
|
return e.replace(yr.commentRegex, "");
|
|
};
|
|
yr.removeMapFileComments = function(e) {
|
|
return e.replace(yr.mapFileCommentRegex, "");
|
|
};
|
|
yr.generateMapFileComment = function(e, t) {
|
|
var r = "sourceMappingURL=" + e;
|
|
return t && t.multiline ? "/*# " + r + " */" : "//# " + r;
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js
|
|
var $H = E((X_) => {
|
|
"use strict";
|
|
Object.defineProperty(X_, "__esModule", {
|
|
value: !0
|
|
});
|
|
X_.default = L$e;
|
|
var WH = {
|
|
asyncDoExpressions: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-async-do-expressions",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions"
|
|
}
|
|
},
|
|
decimal: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-decimal",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal"
|
|
}
|
|
},
|
|
decorators: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-decorators",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-proposal-decorators",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators"
|
|
}
|
|
},
|
|
doExpressions: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-do-expressions",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-proposal-do-expressions",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions"
|
|
}
|
|
},
|
|
exportDefaultFrom: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-export-default-from",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-proposal-export-default-from",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from"
|
|
}
|
|
},
|
|
flow: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-flow",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow"
|
|
},
|
|
transform: {
|
|
name: "@babel/preset-flow",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-preset-flow"
|
|
}
|
|
},
|
|
functionBind: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-function-bind",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-proposal-function-bind",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind"
|
|
}
|
|
},
|
|
functionSent: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-function-sent",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-proposal-function-sent",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent"
|
|
}
|
|
},
|
|
jsx: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-jsx",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx"
|
|
},
|
|
transform: {
|
|
name: "@babel/preset-react",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-preset-react"
|
|
}
|
|
},
|
|
pipelineOperator: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-pipeline-operator",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-proposal-pipeline-operator",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator"
|
|
}
|
|
},
|
|
recordAndTuple: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-record-and-tuple",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple"
|
|
}
|
|
},
|
|
throwExpressions: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-throw-expressions",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-proposal-throw-expressions",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions"
|
|
}
|
|
},
|
|
typescript: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-typescript",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript"
|
|
},
|
|
transform: {
|
|
name: "@babel/preset-typescript",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-preset-typescript"
|
|
}
|
|
}
|
|
};
|
|
Object.assign(WH, {
|
|
asyncGenerators: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-async-generators",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-async-generator-functions",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-async-generator-functions"
|
|
}
|
|
},
|
|
classProperties: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-class-properties",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-class-properties",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties"
|
|
}
|
|
},
|
|
classPrivateProperties: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-class-properties",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-class-properties",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties"
|
|
}
|
|
},
|
|
classPrivateMethods: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-class-properties",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-private-methods",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-methods"
|
|
}
|
|
},
|
|
classStaticBlock: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-class-static-block",
|
|
url: "https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-class-static-block",
|
|
url: "https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block"
|
|
}
|
|
},
|
|
dynamicImport: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-dynamic-import",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import"
|
|
}
|
|
},
|
|
exportNamespaceFrom: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-export-namespace-from",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-export-namespace-from",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-export-namespace-from"
|
|
}
|
|
},
|
|
importAssertions: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-import-assertions",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions"
|
|
}
|
|
},
|
|
importAttributes: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-import-attributes",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes"
|
|
}
|
|
},
|
|
importMeta: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-import-meta",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta"
|
|
}
|
|
},
|
|
logicalAssignment: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-logical-assignment-operators",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-logical-assignment-operators",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-logical-assignment-operators"
|
|
}
|
|
},
|
|
moduleStringNames: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-module-string-names",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names"
|
|
}
|
|
},
|
|
numericSeparator: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-numeric-separator",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-numeric-separator",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-numeric-separator"
|
|
}
|
|
},
|
|
nullishCoalescingOperator: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-nullish-coalescing-operator",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-nullish-coalescing-operator",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator"
|
|
}
|
|
},
|
|
objectRestSpread: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-object-rest-spread",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-object-rest-spread",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-object-rest-spread"
|
|
}
|
|
},
|
|
optionalCatchBinding: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-optional-catch-binding",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-optional-catch-binding",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-catch-binding"
|
|
}
|
|
},
|
|
optionalChaining: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-optional-chaining",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-optional-chaining",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-chaining"
|
|
}
|
|
},
|
|
privateIn: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-private-property-in-object",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-private-property-in-object",
|
|
url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-property-in-object"
|
|
}
|
|
},
|
|
regexpUnicodeSets: {
|
|
syntax: {
|
|
name: "@babel/plugin-syntax-unicode-sets-regex",
|
|
url: "https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md"
|
|
},
|
|
transform: {
|
|
name: "@babel/plugin-transform-unicode-sets-regex",
|
|
url: "https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md"
|
|
}
|
|
}
|
|
});
|
|
var UH = /* @__PURE__ */ s(({
|
|
name: e,
|
|
url: t
|
|
}) => `${e} (${t})`, "getNameURLCombination");
|
|
function L$e(e, t, r, i) {
|
|
let n = `Support for the experimental syntax '${e}' isn't currently enabled (${t.line}:${t.column + 1}):
|
|
|
|
` + r, a = WH[e];
|
|
if (a) {
|
|
let {
|
|
syntax: u,
|
|
transform: l
|
|
} = a;
|
|
if (u) {
|
|
let c = UH(u);
|
|
if (l) {
|
|
let f = UH(l), m = l.name.startsWith("@babel/plugin") ? "plugins" : "presets";
|
|
n += `
|
|
|
|
Add ${f} to the '${m}' section of your Babel config to enable transformation.
|
|
If you want to leave it as-is, add ${c} to the 'plugins' section to enable parsing.`;
|
|
} else
|
|
n += `
|
|
|
|
Add ${c} to the 'plugins' section of your Babel config to enable parsing.`;
|
|
}
|
|
}
|
|
return n += `
|
|
|
|
If you already added the plugin for this syntax to your config, it's possible that your config isn't being loaded.
|
|
You can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded configuration:
|
|
npx cross-env BABEL_SHOW_CONFIG_FOR=${i === "unknown" ? "<name of the input file>" : i} <your build command>
|
|
See https://babeljs.io/docs/configuration#print-effective-configs for more info.
|
|
`, n;
|
|
}
|
|
s(L$e, "generateMissingPluginMessage");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/parser/index.js
|
|
var Q_ = E((Z_) => {
|
|
"use strict";
|
|
Object.defineProperty(Z_, "__esModule", {
|
|
value: !0
|
|
});
|
|
Z_.default = U$e;
|
|
function Y_() {
|
|
let e = zo();
|
|
return Y_ = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_parser"), e;
|
|
}
|
|
s(Y_, "_parser");
|
|
function VH() {
|
|
let e = Pd();
|
|
return VH = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_codeFrame"), e;
|
|
}
|
|
s(VH, "_codeFrame");
|
|
var q$e = $H();
|
|
function* U$e(e, {
|
|
parserOpts: t,
|
|
highlightCode: r = !0,
|
|
filename: i = "unknown"
|
|
}, n) {
|
|
try {
|
|
let a = [];
|
|
for (let o of e)
|
|
for (let u of o) {
|
|
let {
|
|
parserOverride: l
|
|
} = u;
|
|
if (l) {
|
|
let c = l(n, t, Y_().parse);
|
|
c !== void 0 && a.push(c);
|
|
}
|
|
}
|
|
if (a.length === 0)
|
|
return (0, Y_().parse)(n, t);
|
|
if (a.length === 1) {
|
|
if (yield* [], typeof a[0].then == "function")
|
|
throw new Error("You appear to be using an async parser plugin, which your current version of Babel does not support. If you're us\
|
|
ing a published plugin, you may need to upgrade your @babel/core version.");
|
|
return a[0];
|
|
}
|
|
throw new Error("More than one plugin attempted to override parsing.");
|
|
} catch (a) {
|
|
a.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" && (a.message += `
|
|
Consider renaming the file to '.mjs', or setting sourceType:module or sourceType:unambiguous in your Babel config for this file.`);
|
|
let {
|
|
loc: o,
|
|
missingPlugin: u
|
|
} = a;
|
|
if (o) {
|
|
let l = (0, VH().codeFrameColumns)(n, {
|
|
start: {
|
|
line: o.line,
|
|
column: o.column + 1
|
|
}
|
|
}, {
|
|
highlightCode: r
|
|
});
|
|
u ? a.message = `${i}: ` + (0, q$e.default)(u[0], o, l, i) : a.message = `${i}: ${a.message}
|
|
|
|
` + l, a.code = "BABEL_PARSE_ERROR";
|
|
}
|
|
throw a;
|
|
}
|
|
}
|
|
s(U$e, "parser");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transformation/util/clone-deep.js
|
|
var HH = E((r2) => {
|
|
"use strict";
|
|
Object.defineProperty(r2, "__esModule", {
|
|
value: !0
|
|
});
|
|
r2.default = W$e;
|
|
var $g = /* @__PURE__ */ new Set(), e2 = 0;
|
|
function t2(e, t, r) {
|
|
if (e !== null) {
|
|
if (r) {
|
|
if (t.has(e)) return t.get(e);
|
|
} else if (++e2 > 250) {
|
|
if ($g.has(e))
|
|
throw e2 = 0, $g.clear(), new Error("Babel-deepClone: Cycles are not allowed in AST");
|
|
$g.add(e);
|
|
}
|
|
let i;
|
|
if (Array.isArray(e)) {
|
|
i = new Array(e.length), r && t.set(e, i);
|
|
for (let n = 0; n < e.length; n++)
|
|
i[n] = typeof e[n] != "object" ? e[n] : t2(e[n], t, r);
|
|
} else {
|
|
i = {}, r && t.set(e, i);
|
|
let n = Object.keys(e);
|
|
for (let a = 0; a < n.length; a++) {
|
|
let o = n[a];
|
|
i[o] = typeof e[o] != "object" ? e[o] : t2(e[o], t, r || o === "leadingComments" || o === "innerComments" || o === "trailingCommen\
|
|
ts" || o === "extra");
|
|
}
|
|
}
|
|
return r || e2-- > 250 && $g.delete(e), i;
|
|
}
|
|
return e;
|
|
}
|
|
s(t2, "deepClone");
|
|
function W$e(e) {
|
|
if (typeof e != "object") return e;
|
|
try {
|
|
return t2(e, /* @__PURE__ */ new Map(), !0);
|
|
} catch {
|
|
return structuredClone(e);
|
|
}
|
|
}
|
|
s(W$e, "_default");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transformation/normalize-file.js
|
|
var YH = E((a2) => {
|
|
"use strict";
|
|
Object.defineProperty(a2, "__esModule", {
|
|
value: !0
|
|
});
|
|
a2.default = J$e;
|
|
function GH() {
|
|
let e = V("fs");
|
|
return GH = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_fs"), e;
|
|
}
|
|
s(GH, "_fs");
|
|
function s2() {
|
|
let e = V("path");
|
|
return s2 = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_path"), e;
|
|
}
|
|
s(s2, "_path");
|
|
function JH() {
|
|
let e = Jo();
|
|
return JH = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_debug"), e;
|
|
}
|
|
s(JH, "_debug");
|
|
function XH() {
|
|
let e = Ve();
|
|
return XH = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_t"), e;
|
|
}
|
|
s(XH, "_t");
|
|
function Vg() {
|
|
let e = J_();
|
|
return Vg = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_convertSourceMap"), e;
|
|
}
|
|
s(Vg, "_convertSourceMap");
|
|
var $$e = iA(), V$e = Q_(), H$e = HH(), {
|
|
file: K$e,
|
|
traverseFast: z$e
|
|
} = XH(), i2 = JH()("babel:transform:file"), G$e = /^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,.*$/,
|
|
KH = /^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/;
|
|
function* J$e(e, t, r, i) {
|
|
if (r = `${r || ""}`, i) {
|
|
if (i.type === "Program")
|
|
i = K$e(i, [], []);
|
|
else if (i.type !== "File")
|
|
throw new Error("AST root must be a Program or File node");
|
|
t.cloneInputAst && (i = (0, H$e.default)(i));
|
|
} else
|
|
i = yield* (0, V$e.default)(e, t, r);
|
|
let n = null;
|
|
if (t.inputSourceMap !== !1) {
|
|
if (typeof t.inputSourceMap == "object" && (n = Vg().fromObject(t.inputSourceMap)), !n) {
|
|
let a = zH(G$e, i);
|
|
if (a)
|
|
try {
|
|
n = Vg().fromComment("//" + a);
|
|
} catch {
|
|
i2("discarding unknown inline input sourcemap");
|
|
}
|
|
}
|
|
if (!n) {
|
|
let a = zH(KH, i);
|
|
if (typeof t.filename == "string" && a)
|
|
try {
|
|
let o = KH.exec(a), u = GH().readFileSync(s2().resolve(s2().dirname(t.filename), o[1]), "utf8");
|
|
n = Vg().fromJSON(u);
|
|
} catch (o) {
|
|
i2("discarding unknown file input sourcemap", o);
|
|
}
|
|
else a && i2("discarding un-loadable file input sourcemap");
|
|
}
|
|
}
|
|
return new $$e.default(t, {
|
|
code: r,
|
|
ast: i,
|
|
inputMap: n
|
|
});
|
|
}
|
|
s(J$e, "normalizeFile");
|
|
function n2(e, t, r) {
|
|
return t && (t = t.filter(({
|
|
value: i
|
|
}) => e.test(i) ? (r = i, !1) : !0)), [t, r];
|
|
}
|
|
s(n2, "extractCommentsFromList");
|
|
function zH(e, t) {
|
|
let r = null;
|
|
return z$e(t, (i) => {
|
|
[i.leadingComments, r] = n2(e, i.leadingComments, r), [i.innerComments, r] = n2(e, i.innerComments, r), [i.trailingComments, r] = n2(e,
|
|
i.trailingComments, r);
|
|
}), r;
|
|
}
|
|
s(zH, "extractComments");
|
|
});
|
|
|
|
// ../node_modules/@ampproject/remapping/dist/remapping.umd.js
|
|
var ZH = E((o2, u2) => {
|
|
(function(e, t) {
|
|
typeof o2 == "object" && typeof u2 < "u" ? u2.exports = t(Xy(), OC()) : typeof define == "function" && define.amd ? define(["@jridgewell\
|
|
/trace-mapping", "@jridgewell/gen-mapping"], t) : (e = typeof globalThis < "u" ? globalThis : e || self, e.remapping = t(e.traceMapping, e.genMapping));
|
|
})(o2, function(e, t) {
|
|
"use strict";
|
|
let r = /* @__PURE__ */ n("", -1, -1, "", null, !1), i = [];
|
|
function n(p, g, b, D, v, S) {
|
|
return { source: p, line: g, column: b, name: D, content: v, ignore: S };
|
|
}
|
|
s(n, "SegmentObject");
|
|
function a(p, g, b, D, v) {
|
|
return {
|
|
map: p,
|
|
sources: g,
|
|
source: b,
|
|
content: D,
|
|
ignore: v
|
|
};
|
|
}
|
|
s(a, "Source");
|
|
function o(p, g) {
|
|
return a(p, g, "", null, !1);
|
|
}
|
|
s(o, "MapSource");
|
|
function u(p, g, b) {
|
|
return a(null, i, p, g, b);
|
|
}
|
|
s(u, "OriginalSource");
|
|
function l(p) {
|
|
let g = new t.GenMapping({ file: p.map.file }), { sources: b, map: D } = p, v = D.names, S = e.decodedMappings(D);
|
|
for (let C = 0; C < S.length; C++) {
|
|
let O = S[C];
|
|
for (let k = 0; k < O.length; k++) {
|
|
let U = O[k], j = U[0], K = r;
|
|
if (U.length !== 1) {
|
|
let ae = b[U[1]];
|
|
if (K = c(ae, U[2], U[3], U.length === 5 ? v[U[4]] : ""), K == null)
|
|
continue;
|
|
}
|
|
let { column: R, line: ee, name: re, content: te, source: Z, ignore: ie } = K;
|
|
t.maybeAddSegment(g, C, j, Z, ee, R, re), Z && te != null && t.setSourceContent(g, Z, te), ie && t.setIgnore(g, Z, !0);
|
|
}
|
|
}
|
|
return g;
|
|
}
|
|
s(l, "traceMappings");
|
|
function c(p, g, b, D) {
|
|
if (!p.map)
|
|
return n(p.source, g, b, D, p.content, p.ignore);
|
|
let v = e.traceSegment(p.map, g, b);
|
|
return v == null ? null : v.length === 1 ? r : c(p.sources[v[1]], v[2], v[3], v.length === 5 ? p.map.names[v[4]] : D);
|
|
}
|
|
s(c, "originalPositionFor");
|
|
function f(p) {
|
|
return Array.isArray(p) ? p : [p];
|
|
}
|
|
s(f, "asArray");
|
|
function m(p, g) {
|
|
let b = f(p).map((S) => new e.TraceMap(S, "")), D = b.pop();
|
|
for (let S = 0; S < b.length; S++)
|
|
if (b[S].sources.length > 1)
|
|
throw new Error(`Transformation map ${S} must have exactly one source file.
|
|
Did you specify these with the most recent transformation maps first?`);
|
|
let v = h(D, g, "", 0);
|
|
for (let S = b.length - 1; S >= 0; S--)
|
|
v = o(b[S], [v]);
|
|
return v;
|
|
}
|
|
s(m, "buildSourceMapTree");
|
|
function h(p, g, b, D) {
|
|
let { resolvedSources: v, sourcesContent: S, ignoreList: C } = p, O = D + 1, k = v.map((U, j) => {
|
|
let K = {
|
|
importer: b,
|
|
depth: O,
|
|
source: U || "",
|
|
content: void 0,
|
|
ignore: void 0
|
|
}, R = g(K.source, K), { source: ee, content: re, ignore: te } = K;
|
|
if (R)
|
|
return h(new e.TraceMap(R, ee), g, ee, O);
|
|
let Z = re !== void 0 ? re : S ? S[j] : null, ie = te !== void 0 ? te : C ? C.includes(j) : !1;
|
|
return u(ee, Z, ie);
|
|
});
|
|
return o(p, k);
|
|
}
|
|
s(h, "build");
|
|
class d {
|
|
static {
|
|
s(this, "SourceMap");
|
|
}
|
|
constructor(g, b) {
|
|
let D = b.decodedMappings ? t.toDecodedMap(g) : t.toEncodedMap(g);
|
|
this.version = D.version, this.file = D.file, this.mappings = D.mappings, this.names = D.names, this.ignoreList = D.ignoreList, this.
|
|
sourceRoot = D.sourceRoot, this.sources = D.sources, b.excludeContent || (this.sourcesContent = D.sourcesContent);
|
|
}
|
|
toString() {
|
|
return JSON.stringify(this);
|
|
}
|
|
}
|
|
function y(p, g, b) {
|
|
let D = typeof b == "object" ? b : { excludeContent: !!b, decodedMappings: !1 }, v = m(p, g);
|
|
return new d(l(v), D);
|
|
}
|
|
return s(y, "remapping"), y;
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transformation/file/merge-map.js
|
|
var tK = E((l2) => {
|
|
"use strict";
|
|
Object.defineProperty(l2, "__esModule", {
|
|
value: !0
|
|
});
|
|
l2.default = X$e;
|
|
function eK() {
|
|
let e = ZH();
|
|
return eK = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_remapping"), e;
|
|
}
|
|
s(eK, "_remapping");
|
|
function X$e(e, t, r) {
|
|
let i = r.replace(/\\/g, "/"), n = !1, a = eK()(QH(t), (o, u) => o === i && !n ? (n = !0, u.source = "", QH(e)) : null);
|
|
return typeof e.sourceRoot == "string" && (a.sourceRoot = e.sourceRoot), Object.assign({}, a);
|
|
}
|
|
s(X$e, "mergeSourceMap");
|
|
function QH(e) {
|
|
return Object.assign({}, e, {
|
|
sourceRoot: null
|
|
});
|
|
}
|
|
s(QH, "rootless");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transformation/file/generate.js
|
|
var iK = E((f2) => {
|
|
"use strict";
|
|
Object.defineProperty(f2, "__esModule", {
|
|
value: !0
|
|
});
|
|
f2.default = Z$e;
|
|
function rK() {
|
|
let e = J_();
|
|
return rK = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_convertSourceMap"), e;
|
|
}
|
|
s(rK, "_convertSourceMap");
|
|
function c2() {
|
|
let e = qd();
|
|
return c2 = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_generator"), e;
|
|
}
|
|
s(c2, "_generator");
|
|
var Y$e = tK();
|
|
function Z$e(e, t) {
|
|
let {
|
|
opts: r,
|
|
ast: i,
|
|
code: n,
|
|
inputMap: a
|
|
} = t, {
|
|
generatorOpts: o
|
|
} = r;
|
|
o.inputSourceMap = a?.toObject();
|
|
let u = [];
|
|
for (let m of e)
|
|
for (let h of m) {
|
|
let {
|
|
generatorOverride: d
|
|
} = h;
|
|
if (d) {
|
|
let y = d(i, o, n, c2().default);
|
|
y !== void 0 && u.push(y);
|
|
}
|
|
}
|
|
let l;
|
|
if (u.length === 0)
|
|
l = (0, c2().default)(i, o, n);
|
|
else if (u.length === 1) {
|
|
if (l = u[0], typeof l.then == "function")
|
|
throw new Error("You appear to be using an async codegen plugin, which your current version of Babel does not support. If you're usi\
|
|
ng a published plugin, you may need to upgrade your @babel/core version.");
|
|
} else
|
|
throw new Error("More than one plugin attempted to override codegen.");
|
|
let {
|
|
code: c,
|
|
decodedMap: f = l.map
|
|
} = l;
|
|
return l.__mergedMap ? f = Object.assign({}, l.map) : f && (a ? f = (0, Y$e.default)(a.toObject(), f, o.sourceFileName) : f = l.map), (r.
|
|
sourceMaps === "inline" || r.sourceMaps === "both") && (c += `
|
|
` + rK().fromObject(f).toComment()), r.sourceMaps === "inline" && (f = null), {
|
|
outputCode: c,
|
|
outputMap: f
|
|
};
|
|
}
|
|
s(Z$e, "generateCode");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transformation/index.js
|
|
var Hg = E((h2) => {
|
|
"use strict";
|
|
Object.defineProperty(h2, "__esModule", {
|
|
value: !0
|
|
});
|
|
h2.run = sVe;
|
|
function p2() {
|
|
let e = Ar();
|
|
return p2 = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_traverse"), e;
|
|
}
|
|
s(p2, "_traverse");
|
|
var Q$e = BH(), eVe = LH(), tVe = G_(), rVe = YH(), iVe = iK(), nVe = tg(), d2 = Ya();
|
|
function* sVe(e, t, r) {
|
|
let i = yield* (0, rVe.default)(e.passes, (0, tVe.default)(e), t, r), n = i.opts;
|
|
try {
|
|
yield* aVe(i, e.passes);
|
|
} catch (c) {
|
|
var a;
|
|
throw c.message = `${(a = n.filename) != null ? a : "unknown file"}: ${c.message}`, c.code || (c.code = "BABEL_TRANSFORM_ERROR"), c;
|
|
}
|
|
let o, u;
|
|
try {
|
|
n.code !== !1 && ({
|
|
outputCode: o,
|
|
outputMap: u
|
|
} = (0, iVe.default)(e.passes, i));
|
|
} catch (c) {
|
|
var l;
|
|
throw c.message = `${(l = n.filename) != null ? l : "unknown file"}: ${c.message}`, c.code || (c.code = "BABEL_GENERATE_ERROR"), c;
|
|
}
|
|
return {
|
|
metadata: i.metadata,
|
|
options: n,
|
|
ast: n.ast === !0 ? i.ast : null,
|
|
code: o === void 0 ? null : o,
|
|
map: u === void 0 ? null : u,
|
|
sourceType: i.ast.program.sourceType,
|
|
externalDependencies: (0, nVe.flattenToSet)(e.externalDependencies)
|
|
};
|
|
}
|
|
s(sVe, "run");
|
|
function* aVe(e, t) {
|
|
let r = yield* (0, d2.isAsync)();
|
|
for (let i of t) {
|
|
let n = [], a = [], o = [];
|
|
for (let l of i.concat([(0, eVe.default)()])) {
|
|
let c = new Q$e.default(e, l.key, l.options, r);
|
|
n.push([l, c]), a.push(c), o.push(l.visitor);
|
|
}
|
|
for (let [l, c] of n)
|
|
l.pre && (yield* (0, d2.maybeAsync)(l.pre, "You appear to be using an async plugin/preset, but Babel has been called synchronously").
|
|
call(c, e));
|
|
let u = p2().default.visitors.merge(o, a, e.opts.wrapPluginVisitorMethod);
|
|
(0, p2().default)(e.ast, u, e.scope);
|
|
for (let [l, c] of n)
|
|
l.post && (yield* (0, d2.maybeAsync)(l.post, "You appear to be using an async plugin/preset, but Babel has been called synchronously").
|
|
call(c, e));
|
|
}
|
|
}
|
|
s(aVe, "transformFile");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transform-file.js
|
|
var y2 = E((vp) => {
|
|
"use strict";
|
|
Object.defineProperty(vp, "__esModule", {
|
|
value: !0
|
|
});
|
|
vp.transformFile = cVe;
|
|
vp.transformFileAsync = dVe;
|
|
vp.transformFileSync = fVe;
|
|
function nK() {
|
|
let e = Ri();
|
|
return nK = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_gensync"), e;
|
|
}
|
|
s(nK, "_gensync");
|
|
var oVe = mc(), uVe = Hg(), lVe = H0(), m2 = nK()(function* (e, t) {
|
|
let r = Object.assign({}, t, {
|
|
filename: e
|
|
}), i = yield* (0, oVe.default)(r);
|
|
if (i === null) return null;
|
|
let n = yield* lVe.readFile(e, "utf8");
|
|
return yield* (0, uVe.run)(i, n);
|
|
});
|
|
function cVe(...e) {
|
|
m2.errback(...e);
|
|
}
|
|
s(cVe, "transformFile");
|
|
function fVe(...e) {
|
|
return m2.sync(...e);
|
|
}
|
|
s(fVe, "transformFileSync");
|
|
function dVe(...e) {
|
|
return m2.async(...e);
|
|
}
|
|
s(dVe, "transformFileAsync");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/files/import.cjs
|
|
var aK = E((Uyt, sK) => {
|
|
sK.exports = /* @__PURE__ */ s(function(t) {
|
|
return import(t);
|
|
}, "import_");
|
|
});
|
|
|
|
// ../node_modules/@babel/preset-typescript/package.json
|
|
var oK = E(($yt, pVe) => {
|
|
pVe.exports = {
|
|
name: "@babel/preset-typescript",
|
|
version: "7.27.0",
|
|
description: "Babel preset for TypeScript.",
|
|
repository: {
|
|
type: "git",
|
|
url: "https://github.com/babel/babel.git",
|
|
directory: "packages/babel-preset-typescript"
|
|
},
|
|
license: "MIT",
|
|
publishConfig: {
|
|
access: "public"
|
|
},
|
|
main: "./lib/index.js",
|
|
keywords: [
|
|
"babel-preset",
|
|
"typescript"
|
|
],
|
|
dependencies: {
|
|
"@babel/helper-plugin-utils": "^7.26.5",
|
|
"@babel/helper-validator-option": "^7.25.9",
|
|
"@babel/plugin-syntax-jsx": "^7.25.9",
|
|
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
|
|
"@babel/plugin-transform-typescript": "^7.27.0"
|
|
},
|
|
peerDependencies: {
|
|
"@babel/core": "^7.0.0-0"
|
|
},
|
|
devDependencies: {
|
|
"@babel/core": "^7.26.10",
|
|
"@babel/helper-plugin-test-runner": "^7.25.9"
|
|
},
|
|
homepage: "https://babel.dev/docs/en/next/babel-preset-typescript",
|
|
bugs: "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22area%3A%20typescript%22+is%3Aopen",
|
|
engines: {
|
|
node: ">=6.9.0"
|
|
},
|
|
author: "The Babel Team (https://babel.dev/team)",
|
|
type: "commonjs"
|
|
};
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-plugin-utils/lib/index.js
|
|
var yc = E((Ep) => {
|
|
"use strict";
|
|
Object.defineProperty(Ep, "__esModule", {
|
|
value: !0
|
|
});
|
|
Ep.declare = uK;
|
|
Ep.declarePreset = void 0;
|
|
var g2 = {
|
|
assertVersion: /* @__PURE__ */ s((e) => (t) => {
|
|
mVe(t, e.version);
|
|
}, "assertVersion")
|
|
};
|
|
Object.assign(g2, {
|
|
targets: /* @__PURE__ */ s(() => () => ({}), "targets"),
|
|
assumption: /* @__PURE__ */ s(() => () => {
|
|
}, "assumption"),
|
|
addExternalDependency: /* @__PURE__ */ s(() => () => {
|
|
}, "addExternalDependency")
|
|
});
|
|
function uK(e) {
|
|
return (t, r, i) => {
|
|
var n;
|
|
let a;
|
|
for (let u of Object.keys(g2)) {
|
|
var o;
|
|
t[u] || ((o = a) != null || (a = hVe(t)), a[u] = g2[u](a));
|
|
}
|
|
return e((n = a) != null ? n : t, r || {}, i);
|
|
};
|
|
}
|
|
s(uK, "declare");
|
|
var Vyt = Ep.declarePreset = uK;
|
|
function hVe(e) {
|
|
let t = null;
|
|
return typeof e.version == "string" && /^7\./.test(e.version) && (t = Object.getPrototypeOf(e), t && (!hasOwnProperty.call(t, "version") ||
|
|
!hasOwnProperty.call(t, "transform") || !hasOwnProperty.call(t, "template") || !hasOwnProperty.call(t, "types")) && (t = null)), Object.
|
|
assign({}, t, e);
|
|
}
|
|
s(hVe, "copyApiObject");
|
|
function mVe(e, t) {
|
|
if (typeof e == "number") {
|
|
if (!Number.isInteger(e))
|
|
throw new Error("Expected string or integer value.");
|
|
e = `^${e}.0.0-0`;
|
|
}
|
|
if (typeof e != "string")
|
|
throw new Error("Expected string or integer value.");
|
|
let r = Error.stackTraceLimit;
|
|
typeof r == "number" && r < 25 && (Error.stackTraceLimit = 25);
|
|
let i;
|
|
throw t.slice(0, 2) === "7." ? i = new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". You'll need to update your @b\
|
|
abel/core version.`) : i = new Error(`Requires Babel "${e}", but was loaded with "${t}". If you are sure you have a compatible version of @b\
|
|
abel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for\
|
|
the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.`), typeof r == "number" && (Error.stackTraceLimit =
|
|
r), Object.assign(i, {
|
|
code: "BABEL_VERSION_UNSUPPORTED",
|
|
version: t,
|
|
range: e
|
|
});
|
|
}
|
|
s(mVe, "throwVersionError");
|
|
});
|
|
|
|
// ../node_modules/@babel/plugin-syntax-typescript/lib/index.js
|
|
var lK = E((Kg) => {
|
|
"use strict";
|
|
Object.defineProperty(Kg, "__esModule", {
|
|
value: !0
|
|
});
|
|
Kg.default = void 0;
|
|
var yVe = yc();
|
|
b2 = /* @__PURE__ */ s(function(e, t) {
|
|
let r = [];
|
|
e.forEach((i, n) => {
|
|
(Array.isArray(i) ? i[0] : i) === t && r.unshift(n);
|
|
});
|
|
for (let i of r)
|
|
e.splice(i, 1);
|
|
}, "removePlugin");
|
|
var b2, zyt = Kg.default = (0, yVe.declare)((e, t) => {
|
|
e.assertVersion(7);
|
|
let {
|
|
disallowAmbiguousJSXLike: r,
|
|
dts: i
|
|
} = t;
|
|
var {
|
|
isTSX: n
|
|
} = t;
|
|
return {
|
|
name: "syntax-typescript",
|
|
manipulateOptions(a, o) {
|
|
{
|
|
let {
|
|
plugins: u
|
|
} = o;
|
|
b2(u, "flow"), b2(u, "jsx"), u.push("objectRestSpread", "classProperties"), n && u.push("jsx");
|
|
}
|
|
o.plugins.push(["typescript", {
|
|
disallowAmbiguousJSXLike: r,
|
|
dts: i
|
|
}]);
|
|
}
|
|
};
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-member-expression-to-functions/lib/index.js
|
|
var S2 = E((x2) => {
|
|
"use strict";
|
|
Object.defineProperty(x2, "__esModule", { value: !0 });
|
|
var gVe = Ve();
|
|
function bVe(e) {
|
|
if (e && e.__esModule) return e;
|
|
var t = /* @__PURE__ */ Object.create(null);
|
|
return e && Object.keys(e).forEach(function(r) {
|
|
if (r !== "default") {
|
|
var i = Object.getOwnPropertyDescriptor(e, r);
|
|
Object.defineProperty(t, r, i.get ? i : {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return e[r];
|
|
}, "get")
|
|
});
|
|
}
|
|
}), t.default = e, Object.freeze(t);
|
|
}
|
|
s(bVe, "_interopNamespace");
|
|
var DVe = /* @__PURE__ */ bVe(gVe);
|
|
function v2(e) {
|
|
let t = e, {
|
|
node: r,
|
|
parentPath: i
|
|
} = t;
|
|
if (i.isLogicalExpression()) {
|
|
let {
|
|
operator: n,
|
|
right: a
|
|
} = i.node;
|
|
if (n === "&&" || n === "||" || n === "??" && r === a)
|
|
return v2(i);
|
|
}
|
|
if (i.isSequenceExpression()) {
|
|
let {
|
|
expressions: n
|
|
} = i.node;
|
|
return n[n.length - 1] === r ? v2(i) : !0;
|
|
}
|
|
return i.isConditional({
|
|
test: r
|
|
}) || i.isUnaryExpression({
|
|
operator: "!"
|
|
}) || i.isLoop({
|
|
test: r
|
|
});
|
|
}
|
|
s(v2, "willPathCastToBoolean");
|
|
var {
|
|
LOGICAL_OPERATORS: vVe,
|
|
arrowFunctionExpression: cK,
|
|
assignmentExpression: gc,
|
|
binaryExpression: gu,
|
|
booleanLiteral: EVe,
|
|
callExpression: Jg,
|
|
cloneNode: ln,
|
|
conditionalExpression: xVe,
|
|
identifier: mK,
|
|
isMemberExpression: SVe,
|
|
isOptionalCallExpression: TVe,
|
|
isOptionalMemberExpression: yK,
|
|
isUpdateExpression: CVe,
|
|
logicalExpression: Gg,
|
|
memberExpression: fK,
|
|
nullLiteral: zg,
|
|
optionalCallExpression: wVe,
|
|
optionalMemberExpression: AVe,
|
|
sequenceExpression: D2,
|
|
updateExpression: dK
|
|
} = DVe, E2 = class {
|
|
static {
|
|
s(this, "AssignmentMemoiser");
|
|
}
|
|
constructor() {
|
|
this._map = void 0, this._map = /* @__PURE__ */ new WeakMap();
|
|
}
|
|
has(t) {
|
|
return this._map.has(t);
|
|
}
|
|
get(t) {
|
|
if (!this.has(t)) return;
|
|
let r = this._map.get(t), {
|
|
value: i
|
|
} = r;
|
|
return r.count--, r.count === 0 ? gc("=", i, t) : i;
|
|
}
|
|
set(t, r, i) {
|
|
return this._map.set(t, {
|
|
count: i,
|
|
value: r
|
|
});
|
|
}
|
|
};
|
|
function pK(e, t) {
|
|
let {
|
|
node: r
|
|
} = e;
|
|
if (yK(r))
|
|
return fK(t, r.property, r.computed);
|
|
if (e.isOptionalCallExpression()) {
|
|
let i = e.get("callee");
|
|
if (e.node.optional && i.isOptionalMemberExpression()) {
|
|
let n = i.node.object, a = e.scope.maybeGenerateMemoised(n);
|
|
return i.get("object").replaceWith(gc("=", a, n)), Jg(fK(t, mK("call")), [a, ...e.node.arguments]);
|
|
}
|
|
return Jg(t, e.node.arguments);
|
|
}
|
|
return e.node;
|
|
}
|
|
s(pK, "toNonOptional");
|
|
function _Ve(e) {
|
|
for (; e && !e.isProgram(); ) {
|
|
let {
|
|
parentPath: t,
|
|
container: r,
|
|
listKey: i
|
|
} = e, n = t.node;
|
|
if (i) {
|
|
if (r !== n[i])
|
|
return !0;
|
|
} else if (r !== n) return !0;
|
|
e = t;
|
|
}
|
|
return !1;
|
|
}
|
|
s(_Ve, "isInDetachedTree");
|
|
var PVe = {
|
|
memoise() {
|
|
},
|
|
handle(e, t) {
|
|
let {
|
|
node: r,
|
|
parent: i,
|
|
parentPath: n,
|
|
scope: a
|
|
} = e;
|
|
if (e.isOptionalMemberExpression()) {
|
|
if (_Ve(e)) return;
|
|
let o = e.find(({
|
|
node: k,
|
|
parent: U
|
|
}) => yK(U) ? U.optional || U.object !== k : TVe(U) ? k !== e.node && U.optional || U.callee !== k : !0);
|
|
if (a.path.isPattern()) {
|
|
o.replaceWith(Jg(cK([], o.node), []));
|
|
return;
|
|
}
|
|
let u = v2(o), l = o.parentPath;
|
|
if (l.isUpdateExpression({
|
|
argument: r
|
|
}))
|
|
throw e.buildCodeFrameError("can't handle update expression");
|
|
let c = l.isAssignmentExpression({
|
|
left: o.node
|
|
}), f = l.isUnaryExpression({
|
|
operator: "delete"
|
|
});
|
|
if (f && o.isOptionalMemberExpression() && o.get("property").isPrivateName())
|
|
throw e.buildCodeFrameError("can't delete a private class element");
|
|
let m = e;
|
|
for (; ; ) {
|
|
if (m.isOptionalMemberExpression()) {
|
|
if (m.node.optional) break;
|
|
m = m.get("object");
|
|
continue;
|
|
} else if (m.isOptionalCallExpression()) {
|
|
if (m.node.optional) break;
|
|
m = m.get("callee");
|
|
continue;
|
|
}
|
|
throw new Error(`Internal error: unexpected ${m.node.type}`);
|
|
}
|
|
let h = m.isOptionalMemberExpression() ? m.node.object : m.node.callee, d = a.maybeGenerateMemoised(h), y = d ?? h, p = n.isOptionalCallExpression(
|
|
{
|
|
callee: r
|
|
}), g = /* @__PURE__ */ s((k) => p, "isOptionalCall"), b = n.isCallExpression({
|
|
callee: r
|
|
});
|
|
m.replaceWith(pK(m, y)), g() ? i.optional ? n.replaceWith(this.optionalCall(e, i.arguments)) : n.replaceWith(this.call(e, i.arguments)) :
|
|
b ? e.replaceWith(this.boundGet(e)) : this.delete && n.isUnaryExpression({
|
|
operator: "delete"
|
|
}) ? n.replaceWith(this.delete(e)) : n.isAssignmentExpression() ? hK(this, e, n) : e.replaceWith(this.get(e));
|
|
let D = e.node;
|
|
for (let k = e; k !== o; ) {
|
|
let U = k.parentPath;
|
|
if (U === o && g() && i.optional) {
|
|
D = U.node;
|
|
break;
|
|
}
|
|
D = pK(U, D), k = U;
|
|
}
|
|
let v, S = o.parentPath;
|
|
if (SVe(D) && S.isOptionalCallExpression({
|
|
callee: o.node,
|
|
optional: !0
|
|
})) {
|
|
let {
|
|
object: k
|
|
} = D;
|
|
v = e.scope.maybeGenerateMemoised(k), v && (D.object = gc("=", v, k));
|
|
}
|
|
let C = o;
|
|
(f || c) && (C = S, D = S.node);
|
|
let O = d ? gc("=", ln(y), ln(h)) : ln(y);
|
|
if (u) {
|
|
let k;
|
|
t ? k = gu("!=", O, zg()) : k = Gg("&&", gu("!==", O, zg()), gu("!==", ln(y), a.buildUndefinedNode())), C.replaceWith(Gg("&&", k, D));
|
|
} else {
|
|
let k;
|
|
t ? k = gu("==", O, zg()) : k = Gg("||", gu("===", O, zg()), gu("===", ln(y), a.buildUndefinedNode())), C.replaceWith(xVe(k, f ? EVe(
|
|
!0) : a.buildUndefinedNode(), D));
|
|
}
|
|
if (v) {
|
|
let k = S.node;
|
|
S.replaceWith(wVe(AVe(k.callee, mK("call"), !1, !0), [ln(v), ...k.arguments], !1));
|
|
}
|
|
return;
|
|
}
|
|
if (CVe(i, {
|
|
argument: r
|
|
})) {
|
|
if (this.simpleSet) {
|
|
e.replaceWith(this.simpleSet(e));
|
|
return;
|
|
}
|
|
let {
|
|
operator: o,
|
|
prefix: u
|
|
} = i;
|
|
this.memoise(e, 2);
|
|
let l = a.generateUidIdentifierBasedOnNode(r);
|
|
a.push({
|
|
id: l
|
|
});
|
|
let c = [gc("=", ln(l), this.get(e))];
|
|
if (u) {
|
|
c.push(dK(o, ln(l), u));
|
|
let f = D2(c);
|
|
n.replaceWith(this.set(e, f));
|
|
return;
|
|
} else {
|
|
let f = a.generateUidIdentifierBasedOnNode(r);
|
|
a.push({
|
|
id: f
|
|
}), c.push(gc("=", ln(f), dK(o, ln(l), u)), ln(l));
|
|
let m = D2(c);
|
|
n.replaceWith(D2([this.set(e, m), ln(f)]));
|
|
return;
|
|
}
|
|
}
|
|
if (n.isAssignmentExpression({
|
|
left: r
|
|
})) {
|
|
hK(this, e, n);
|
|
return;
|
|
}
|
|
if (n.isCallExpression({
|
|
callee: r
|
|
})) {
|
|
n.replaceWith(this.call(e, n.node.arguments));
|
|
return;
|
|
}
|
|
if (n.isOptionalCallExpression({
|
|
callee: r
|
|
})) {
|
|
if (a.path.isPattern()) {
|
|
n.replaceWith(Jg(cK([], n.node), []));
|
|
return;
|
|
}
|
|
n.replaceWith(this.optionalCall(e, n.node.arguments));
|
|
return;
|
|
}
|
|
if (this.delete && n.isUnaryExpression({
|
|
operator: "delete"
|
|
})) {
|
|
n.replaceWith(this.delete(e));
|
|
return;
|
|
}
|
|
if (n.isForXStatement({
|
|
left: r
|
|
}) || n.isObjectProperty({
|
|
value: r
|
|
}) && n.parentPath.isObjectPattern() || n.isAssignmentPattern({
|
|
left: r
|
|
}) && n.parentPath.isObjectProperty({
|
|
value: i
|
|
}) && n.parentPath.parentPath.isObjectPattern() || n.isArrayPattern() || n.isAssignmentPattern({
|
|
left: r
|
|
}) && n.parentPath.isArrayPattern() || n.isRestElement()) {
|
|
e.replaceWith(this.destructureSet(e));
|
|
return;
|
|
}
|
|
n.isTaggedTemplateExpression() ? e.replaceWith(this.boundGet(e)) : e.replaceWith(this.get(e));
|
|
}
|
|
};
|
|
function hK(e, t, r) {
|
|
if (e.simpleSet) {
|
|
t.replaceWith(e.simpleSet(t));
|
|
return;
|
|
}
|
|
let {
|
|
operator: i,
|
|
right: n
|
|
} = r.node;
|
|
if (i === "=")
|
|
r.replaceWith(e.set(t, n));
|
|
else {
|
|
let a = i.slice(0, -1);
|
|
vVe.includes(a) ? (e.memoise(t, 1), r.replaceWith(Gg(a, e.get(t), e.set(t, n)))) : (e.memoise(t, 2), r.replaceWith(e.set(t, gu(a, e.get(
|
|
t), n))));
|
|
}
|
|
}
|
|
s(hK, "handleAssignment");
|
|
function FVe(e, t, r) {
|
|
e.traverse(t, Object.assign({}, PVe, r, {
|
|
memoiser: new E2()
|
|
}));
|
|
}
|
|
s(FVe, "memberExpressionToFunctions");
|
|
x2.default = FVe;
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-optimise-call-expression/lib/index.js
|
|
var C2 = E((T2) => {
|
|
"use strict";
|
|
Object.defineProperty(T2, "__esModule", {
|
|
value: !0
|
|
});
|
|
T2.default = BVe;
|
|
var IVe = Ve(), {
|
|
callExpression: gK,
|
|
identifier: Xg,
|
|
isIdentifier: OVe,
|
|
isSpreadElement: kVe,
|
|
memberExpression: bK,
|
|
optionalCallExpression: DK,
|
|
optionalMemberExpression: vK
|
|
} = IVe;
|
|
function BVe(e, t, r, i) {
|
|
return r.length === 1 && kVe(r[0]) && OVe(r[0].argument, {
|
|
name: "arguments"
|
|
}) ? i ? DK(vK(e, Xg("apply"), !1, !0), [t, r[0].argument], !1) : gK(bK(e, Xg("apply")), [t, r[0].argument]) : i ? DK(vK(e, Xg("call"), !1,
|
|
!0), [t, ...r], !1) : gK(bK(e, Xg("call")), [t, ...r]);
|
|
}
|
|
s(BVe, "optimiseCallExpression");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-replace-supers/lib/index.js
|
|
var Zg = E((Dc) => {
|
|
"use strict";
|
|
Object.defineProperty(Dc, "__esModule", {
|
|
value: !0
|
|
});
|
|
Dc.default = void 0;
|
|
var NVe = S2(), Yg = C2(), ai = hr(), A2 = Ar(), {
|
|
assignmentExpression: MVe,
|
|
callExpression: na,
|
|
cloneNode: Xr,
|
|
identifier: bc,
|
|
memberExpression: bu,
|
|
sequenceExpression: Du,
|
|
stringLiteral: xK,
|
|
thisExpression: oi
|
|
} = ai.types;
|
|
Dc.environmentVisitor = A2.visitors.environmentVisitor({}), Dc.skipAllButComputedKey = /* @__PURE__ */ s(function(t) {
|
|
t.skip(), t.node.computed && t.context.maybeQueue(t.get("key"));
|
|
}, "skipAllButComputedKey");
|
|
var EK = A2.visitors.environmentVisitor({
|
|
Super(e, t) {
|
|
let {
|
|
node: r,
|
|
parentPath: i
|
|
} = e;
|
|
i.isMemberExpression({
|
|
object: r
|
|
}) && t.handle(i);
|
|
}
|
|
}), RVe = A2.visitors.environmentVisitor({
|
|
Scopable(e, {
|
|
refName: t
|
|
}) {
|
|
let r = e.scope.getOwnBinding(t);
|
|
r && r.identifier.name === t && e.scope.rename(t);
|
|
}
|
|
}), SK = {
|
|
memoise(e, t) {
|
|
let {
|
|
scope: r,
|
|
node: i
|
|
} = e, {
|
|
computed: n,
|
|
property: a
|
|
} = i;
|
|
if (!n)
|
|
return;
|
|
let o = r.maybeGenerateMemoised(a);
|
|
o && this.memoiser.set(a, o, t);
|
|
},
|
|
prop(e) {
|
|
let {
|
|
computed: t,
|
|
property: r
|
|
} = e.node;
|
|
return this.memoiser.has(r) ? Xr(this.memoiser.get(r)) : t ? Xr(r) : xK(r.name);
|
|
},
|
|
_getPrototypeOfExpression() {
|
|
let e = Xr(this.getObjectRef()), t = this.isStatic || this.isPrivateMethod ? e : bu(e, bc("prototype"));
|
|
return na(this.file.addHelper("getPrototypeOf"), [t]);
|
|
},
|
|
get(e) {
|
|
let t = Xr(this.getObjectRef());
|
|
return na(this.file.addHelper("superPropGet"), [this.isDerivedConstructor ? Du([oi(), t]) : t, this.prop(e), oi(), ...this.isStatic ||
|
|
this.isPrivateMethod ? [] : [ai.types.numericLiteral(1)]]);
|
|
},
|
|
_call(e, t, r) {
|
|
let i = Xr(this.getObjectRef()), n;
|
|
t.length === 1 && ai.types.isSpreadElement(t[0]) && (ai.types.isIdentifier(t[0].argument) || ai.types.isArrayExpression(t[0].argument)) ?
|
|
n = t[0].argument : n = ai.types.arrayExpression(t);
|
|
let a = ai.types.callExpression(this.file.addHelper("superPropGet"), [this.isDerivedConstructor ? Du([oi(), i]) : i, this.prop(e), oi(),
|
|
ai.types.numericLiteral(2 | (this.isStatic || this.isPrivateMethod ? 0 : 1))]);
|
|
return r ? ai.types.optionalCallExpression(a, [n], !0) : na(a, [n]);
|
|
},
|
|
set(e, t) {
|
|
let r = Xr(this.getObjectRef());
|
|
return na(this.file.addHelper("superPropSet"), [this.isDerivedConstructor ? Du([oi(), r]) : r, this.prop(e), t, oi(), ai.types.numericLiteral(
|
|
e.isInStrictMode() ? 1 : 0), ...this.isStatic || this.isPrivateMethod ? [] : [ai.types.numericLiteral(1)]]);
|
|
},
|
|
destructureSet(e) {
|
|
throw e.buildCodeFrameError("Destructuring to a super field is not supported yet.");
|
|
},
|
|
call(e, t) {
|
|
return this._call(e, t, !1);
|
|
},
|
|
optionalCall(e, t) {
|
|
return this._call(e, t, !0);
|
|
},
|
|
delete(e) {
|
|
return e.node.computed ? Du([na(this.file.addHelper("toPropertyKey"), [Xr(e.node.property)]), ai.template.expression.ast`
|
|
function () { throw new ReferenceError("'delete super[expr]' is invalid"); }()
|
|
`]) : ai.template.expression.ast`
|
|
function () { throw new ReferenceError("'delete super.prop' is invalid"); }()
|
|
`;
|
|
}
|
|
}, jVe = {
|
|
memoise(e, t) {
|
|
let {
|
|
scope: r,
|
|
node: i
|
|
} = e, {
|
|
computed: n,
|
|
property: a
|
|
} = i;
|
|
if (!n)
|
|
return;
|
|
let o = r.maybeGenerateMemoised(a);
|
|
o && this.memoiser.set(a, o, t);
|
|
},
|
|
prop(e) {
|
|
let {
|
|
computed: t,
|
|
property: r
|
|
} = e.node;
|
|
return this.memoiser.has(r) ? Xr(this.memoiser.get(r)) : t ? Xr(r) : xK(r.name);
|
|
},
|
|
_getPrototypeOfExpression() {
|
|
let e = Xr(this.getObjectRef()), t = this.isStatic || this.isPrivateMethod ? e : bu(e, bc("prototype"));
|
|
return na(this.file.addHelper("getPrototypeOf"), [t]);
|
|
},
|
|
get(e) {
|
|
return this._get(e);
|
|
},
|
|
_get(e) {
|
|
let t = this._getPrototypeOfExpression();
|
|
return na(this.file.addHelper("get"), [this.isDerivedConstructor ? Du([oi(), t]) : t, this.prop(e), oi()]);
|
|
},
|
|
set(e, t) {
|
|
let r = this._getPrototypeOfExpression();
|
|
return na(this.file.addHelper("set"), [this.isDerivedConstructor ? Du([oi(), r]) : r, this.prop(e), t, oi(), ai.types.booleanLiteral(e.
|
|
isInStrictMode())]);
|
|
},
|
|
destructureSet(e) {
|
|
throw e.buildCodeFrameError("Destructuring to a super field is not supported yet.");
|
|
},
|
|
call(e, t) {
|
|
return (0, Yg.default)(this._get(e), oi(), t, !1);
|
|
},
|
|
optionalCall(e, t) {
|
|
return (0, Yg.default)(this._get(e), Xr(oi()), t, !0);
|
|
},
|
|
delete(e) {
|
|
return e.node.computed ? Du([na(this.file.addHelper("toPropertyKey"), [Xr(e.node.property)]), ai.template.expression.ast`
|
|
function () { throw new ReferenceError("'delete super[expr]' is invalid"); }()
|
|
`]) : ai.template.expression.ast`
|
|
function () { throw new ReferenceError("'delete super.prop' is invalid"); }()
|
|
`;
|
|
}
|
|
}, LVe = Object.assign({}, SK, {
|
|
prop(e) {
|
|
let {
|
|
property: t
|
|
} = e.node;
|
|
return this.memoiser.has(t) ? Xr(this.memoiser.get(t)) : Xr(t);
|
|
},
|
|
get(e) {
|
|
let {
|
|
isStatic: t,
|
|
getSuperRef: r
|
|
} = this, {
|
|
computed: i
|
|
} = e.node, n = this.prop(e), a;
|
|
if (t) {
|
|
var o;
|
|
a = (o = r()) != null ? o : bu(bc("Function"), bc("prototype"));
|
|
} else {
|
|
var u;
|
|
a = bu((u = r()) != null ? u : bc("Object"), bc("prototype"));
|
|
}
|
|
return bu(a, n, i);
|
|
},
|
|
set(e, t) {
|
|
let {
|
|
computed: r
|
|
} = e.node, i = this.prop(e);
|
|
return MVe("=", bu(oi(), i, r), t);
|
|
},
|
|
destructureSet(e) {
|
|
let {
|
|
computed: t
|
|
} = e.node, r = this.prop(e);
|
|
return bu(oi(), r, t);
|
|
},
|
|
call(e, t) {
|
|
return (0, Yg.default)(this.get(e), oi(), t, !1);
|
|
},
|
|
optionalCall(e, t) {
|
|
return (0, Yg.default)(this.get(e), oi(), t, !0);
|
|
}
|
|
}), w2 = class {
|
|
static {
|
|
s(this, "ReplaceSupers");
|
|
}
|
|
constructor(t) {
|
|
var r;
|
|
let i = t.methodPath;
|
|
this.methodPath = i, this.isDerivedConstructor = i.isClassMethod({
|
|
kind: "constructor"
|
|
}) && !!t.superRef, this.isStatic = i.isObjectMethod() || i.node.static || (i.isStaticBlock == null ? void 0 : i.isStaticBlock()), this.
|
|
isPrivateMethod = i.isPrivate() && i.isMethod(), this.file = t.file, this.constantSuper = (r = t.constantSuper) != null ? r : t.isLoose,
|
|
this.opts = t;
|
|
}
|
|
getObjectRef() {
|
|
return Xr(this.opts.objectRef || this.opts.getObjectRef());
|
|
}
|
|
getSuperRef() {
|
|
if (this.opts.superRef) return Xr(this.opts.superRef);
|
|
if (this.opts.getSuperRef)
|
|
return Xr(this.opts.getSuperRef());
|
|
}
|
|
replace() {
|
|
let {
|
|
methodPath: t
|
|
} = this;
|
|
this.opts.refToPreserve && t.traverse(RVe, {
|
|
refName: this.opts.refToPreserve.name
|
|
});
|
|
let r = this.constantSuper ? LVe : this.file.availableHelper("superPropSet") ? SK : jVe;
|
|
EK.shouldSkip = (i) => {
|
|
if (i.parentPath === t && (i.parentKey === "decorators" || i.parentKey === "key"))
|
|
return !0;
|
|
}, (0, NVe.default)(t, EK, Object.assign({
|
|
file: this.file,
|
|
scope: this.methodPath.scope,
|
|
isDerivedConstructor: this.isDerivedConstructor,
|
|
isStatic: this.isStatic,
|
|
isPrivateMethod: this.isPrivateMethod,
|
|
getObjectRef: this.getObjectRef.bind(this),
|
|
getSuperRef: this.getSuperRef.bind(this),
|
|
boundGet: r.get
|
|
}, r));
|
|
}
|
|
};
|
|
Dc.default = w2;
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-annotate-as-pure/lib/index.js
|
|
var P2 = E((_2) => {
|
|
"use strict";
|
|
Object.defineProperty(_2, "__esModule", {
|
|
value: !0
|
|
});
|
|
_2.default = VVe;
|
|
var qVe = Ve(), {
|
|
addComment: UVe
|
|
} = qVe, WVe = "#__PURE__", $Ve = /* @__PURE__ */ s(({
|
|
leadingComments: e
|
|
}) => !!e && e.some((t) => /[@#]__PURE__/.test(t.value)), "isPureAnnotated");
|
|
function VVe(e) {
|
|
let t = e.node || e;
|
|
$Ve(t) || UVe(t, "leading", WVe);
|
|
}
|
|
s(VVe, "annotateAsPure");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
|
|
var Qg = E((xp) => {
|
|
"use strict";
|
|
Object.defineProperty(xp, "__esModule", {
|
|
value: !0
|
|
});
|
|
xp.isTransparentExprWrapper = F2;
|
|
xp.skipTransparentExprWrapperNodes = QVe;
|
|
xp.skipTransparentExprWrappers = ZVe;
|
|
var HVe = Ve(), {
|
|
isParenthesizedExpression: KVe,
|
|
isTSAsExpression: zVe,
|
|
isTSNonNullExpression: GVe,
|
|
isTSSatisfiesExpression: JVe,
|
|
isTSTypeAssertion: XVe,
|
|
isTypeCastExpression: YVe
|
|
} = HVe;
|
|
function F2(e) {
|
|
return zVe(e) || JVe(e) || XVe(e) || GVe(e) || YVe(e) || KVe(e);
|
|
}
|
|
s(F2, "isTransparentExprWrapper");
|
|
function ZVe(e) {
|
|
for (; F2(e.node); )
|
|
e = e.get("expression");
|
|
return e;
|
|
}
|
|
s(ZVe, "skipTransparentExprWrappers");
|
|
function QVe(e) {
|
|
for (; F2(e); )
|
|
e = e.expression;
|
|
return e;
|
|
}
|
|
s(QVe, "skipTransparentExprWrapperNodes");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-create-class-features-plugin/lib/typescript.js
|
|
var O2 = E((I2) => {
|
|
"use strict";
|
|
Object.defineProperty(I2, "__esModule", {
|
|
value: !0
|
|
});
|
|
I2.assertFieldTransformed = eHe;
|
|
function eHe(e) {
|
|
if (e.node.declare)
|
|
throw e.buildCodeFrameError(`TypeScript 'declare' fields must first be transformed by @babel/plugin-transform-typescript.
|
|
If you have already enabled that plugin (or '@babel/preset-typescript'), make sure that it runs before any plugin related to additional clas\
|
|
s features:
|
|
- @babel/plugin-transform-class-properties
|
|
- @babel/plugin-transform-private-methods
|
|
- @babel/plugin-proposal-decorators`);
|
|
}
|
|
s(eHe, "assertFieldTransformed");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-create-class-features-plugin/lib/fields.js
|
|
var R2 = E((no) => {
|
|
"use strict";
|
|
Object.defineProperty(no, "__esModule", {
|
|
value: !0
|
|
});
|
|
no.buildCheckInRHS = rb;
|
|
no.buildFieldsInitNodes = THe;
|
|
no.buildPrivateNamesMap = aHe;
|
|
no.buildPrivateNamesNodes = oHe;
|
|
no.privateNameVisitorFactory = M2;
|
|
no.transformPrivateNamesUsage = pHe;
|
|
var W = hr(), PK = Ar(), tHe = Zg(), rHe = S2(), TK = C2(), iHe = P2(), nHe = Qg(), sHe = O2();
|
|
ui = /* @__PURE__ */ s((e) => e.availableHelper("classPrivateFieldGet2"), "newHelpers");
|
|
var ui;
|
|
function aHe(e, t, r, i) {
|
|
let n = /* @__PURE__ */ new Map(), a;
|
|
for (let o of r)
|
|
if (o.isPrivate()) {
|
|
let {
|
|
name: u
|
|
} = o.node.key.id, l = n.get(u);
|
|
if (!l) {
|
|
let c = !o.isProperty(), f = o.node.static, m = !1, h;
|
|
!t && ui(i) && c && !f ? (m = !!a, a ?? (a = o.scope.generateUidIdentifier(`${e}_brand`)), h = a) : h = o.scope.generateUidIdentifier(
|
|
u), l = {
|
|
id: h,
|
|
static: f,
|
|
method: c,
|
|
initAdded: m
|
|
}, n.set(u, l);
|
|
}
|
|
if (o.isClassPrivateMethod())
|
|
if (o.node.kind === "get") {
|
|
let {
|
|
body: c
|
|
} = o.node.body, f;
|
|
c.length === 1 && W.types.isReturnStatement(f = c[0]) && W.types.isCallExpression(f = f.argument) && f.arguments.length === 1 &&
|
|
W.types.isThisExpression(f.arguments[0]) && W.types.isIdentifier(f = f.callee) ? (l.getId = W.types.cloneNode(f), l.getterDeclared =
|
|
!0) : l.getId = o.scope.generateUidIdentifier(`get_${u}`);
|
|
} else if (o.node.kind === "set") {
|
|
let {
|
|
params: c
|
|
} = o.node, {
|
|
body: f
|
|
} = o.node.body, m;
|
|
f.length === 1 && W.types.isExpressionStatement(m = f[0]) && W.types.isCallExpression(m = m.expression) && m.arguments.length ===
|
|
2 && W.types.isThisExpression(m.arguments[0]) && W.types.isIdentifier(m.arguments[1], {
|
|
name: c[0].name
|
|
}) && W.types.isIdentifier(m = m.callee) ? (l.setId = W.types.cloneNode(m), l.setterDeclared = !0) : l.setId = o.scope.generateUidIdentifier(
|
|
`set_${u}`);
|
|
} else o.node.kind === "method" && (l.methodId = o.scope.generateUidIdentifier(u));
|
|
n.set(u, l);
|
|
}
|
|
return n;
|
|
}
|
|
s(aHe, "buildPrivateNamesMap");
|
|
function oHe(e, t, r, i) {
|
|
let n = [], a = /* @__PURE__ */ new Set();
|
|
for (let [o, u] of e) {
|
|
let {
|
|
static: l,
|
|
method: c,
|
|
getId: f,
|
|
setId: m
|
|
} = u, h = f || m, d = W.types.cloneNode(u.id), y;
|
|
if (t)
|
|
y = W.types.callExpression(i.addHelper("classPrivateFieldLooseKey"), [W.types.stringLiteral(o)]);
|
|
else if (r)
|
|
y = W.types.callExpression(W.types.identifier("Symbol"), [W.types.stringLiteral(o)]);
|
|
else if (!l) {
|
|
if (a.has(d.name)) continue;
|
|
a.add(d.name), y = W.types.newExpression(W.types.identifier(c && (!h || ui(i)) ? "WeakSet" : "WeakMap"), []);
|
|
}
|
|
y && (r || (0, iHe.default)(y), n.push(W.template.statement.ast`var ${d} = ${y}`));
|
|
}
|
|
return n;
|
|
}
|
|
s(oHe, "buildPrivateNamesNodes");
|
|
function M2(e) {
|
|
let t = PK.visitors.environmentVisitor(Object.assign({}, e)), r = Object.assign({}, e, {
|
|
Class(i) {
|
|
let {
|
|
privateNamesMap: n
|
|
} = this, a = i.get("body.body"), o = new Map(n), u = [];
|
|
for (let l of a) {
|
|
if (!l.isPrivate()) continue;
|
|
let {
|
|
name: c
|
|
} = l.node.key.id;
|
|
o.delete(c), u.push(c);
|
|
}
|
|
u.length && (i.get("body").traverse(t, Object.assign({}, this, {
|
|
redeclared: u
|
|
})), i.traverse(r, Object.assign({}, this, {
|
|
privateNamesMap: o
|
|
})), i.skipKey("body"));
|
|
}
|
|
});
|
|
return r;
|
|
}
|
|
s(M2, "privateNameVisitorFactory");
|
|
var uHe = M2({
|
|
PrivateName(e, {
|
|
noDocumentAll: t
|
|
}) {
|
|
let {
|
|
privateNamesMap: r,
|
|
redeclared: i
|
|
} = this, {
|
|
node: n,
|
|
parentPath: a
|
|
} = e;
|
|
if (!a.isMemberExpression({
|
|
property: n
|
|
}) && !a.isOptionalMemberExpression({
|
|
property: n
|
|
}))
|
|
return;
|
|
let {
|
|
name: o
|
|
} = n.id;
|
|
r.has(o) && (i != null && i.includes(o) || this.handle(a, t));
|
|
}
|
|
});
|
|
function FK(e, t, r) {
|
|
for (; (i = t) != null && i.hasBinding(e) && !t.bindingIdentifierEquals(e, r); ) {
|
|
var i;
|
|
t.rename(e), t = t.parent;
|
|
}
|
|
}
|
|
s(FK, "unshadow");
|
|
function rb(e, t, r) {
|
|
return r || !(t.availableHelper != null && t.availableHelper("checkInRHS")) ? e : W.types.callExpression(t.addHelper("checkInRHS"), [e]);
|
|
}
|
|
s(rb, "buildCheckInRHS");
|
|
var lHe = M2({
|
|
BinaryExpression(e, {
|
|
file: t
|
|
}) {
|
|
let {
|
|
operator: r,
|
|
left: i,
|
|
right: n
|
|
} = e.node;
|
|
if (r !== "in" || !W.types.isPrivateName(i)) return;
|
|
let {
|
|
privateFieldsAsProperties: a,
|
|
privateNamesMap: o,
|
|
redeclared: u
|
|
} = this, {
|
|
name: l
|
|
} = i.id;
|
|
if (!o.has(l) || u != null && u.includes(l)) return;
|
|
if (FK(this.classRef.name, e.scope, this.innerBinding), a) {
|
|
let {
|
|
id: m
|
|
} = o.get(l);
|
|
e.replaceWith(W.template.expression.ast`
|
|
Object.prototype.hasOwnProperty.call(${rb(n, t)}, ${W.types.cloneNode(m)})
|
|
`);
|
|
return;
|
|
}
|
|
let {
|
|
id: c,
|
|
static: f
|
|
} = o.get(l);
|
|
if (f) {
|
|
e.replaceWith(W.template.expression.ast`${rb(n, t)} === ${W.types.cloneNode(this.classRef)}`);
|
|
return;
|
|
}
|
|
e.replaceWith(W.template.expression.ast`${W.types.cloneNode(c)}.has(${rb(n, t)})`);
|
|
}
|
|
});
|
|
function eb(e, t) {
|
|
return W.types.callExpression(e.addHelper("readOnlyError"), [W.types.stringLiteral(`#${t}`)]);
|
|
}
|
|
s(eb, "readOnlyError");
|
|
function cHe(e, t) {
|
|
return e.availableHelper("writeOnlyError") ? W.types.callExpression(e.addHelper("writeOnlyError"), [W.types.stringLiteral(`#${t}`)]) : (console.
|
|
warn("@babel/helpers is outdated, update it to silence this warning."), W.types.buildUndefinedNode());
|
|
}
|
|
s(cHe, "writeOnlyError");
|
|
function k2(e, t) {
|
|
return t ? e : W.types.memberExpression(e, W.types.identifier("_"));
|
|
}
|
|
s(k2, "buildStaticPrivateFieldAccess");
|
|
function CK(e) {
|
|
return function(t) {
|
|
return W.types.inherits(e.apply(this, arguments), t.node);
|
|
};
|
|
}
|
|
s(CK, "autoInherits");
|
|
var fHe = {
|
|
memoise(e, t) {
|
|
let {
|
|
scope: r
|
|
} = e, {
|
|
object: i
|
|
} = e.node, n = r.maybeGenerateMemoised(i);
|
|
n && this.memoiser.set(i, n, t);
|
|
},
|
|
receiver(e) {
|
|
let {
|
|
object: t
|
|
} = e.node;
|
|
return this.memoiser.has(t) ? W.types.cloneNode(this.memoiser.get(t)) : W.types.cloneNode(t);
|
|
},
|
|
get: CK(function(e) {
|
|
let {
|
|
classRef: t,
|
|
privateNamesMap: r,
|
|
file: i,
|
|
innerBinding: n,
|
|
noUninitializedPrivateFieldAccess: a
|
|
} = this, o = e.node.property, {
|
|
name: u
|
|
} = o.id, {
|
|
id: l,
|
|
static: c,
|
|
method: f,
|
|
methodId: m,
|
|
getId: h,
|
|
setId: d
|
|
} = r.get(u), y = h || d, p = /* @__PURE__ */ s((g) => W.types.inherits(W.types.cloneNode(g), o), "cloneId");
|
|
if (c) {
|
|
if (FK(t.name, e.scope, n), !ui(i)) {
|
|
let D = f && !y ? "classStaticPrivateMethodGet" : "classStaticPrivateFieldSpecGet";
|
|
return W.types.callExpression(i.addHelper(D), [this.receiver(e), W.types.cloneNode(t), p(l)]);
|
|
}
|
|
let g = this.receiver(e), b = W.types.isIdentifier(g) && g.name === t.name;
|
|
if (!f)
|
|
return k2(b ? p(l) : W.types.callExpression(i.addHelper("assertClassBrand"), [W.types.cloneNode(t), g, p(l)]), a);
|
|
if (h)
|
|
return b ? W.types.callExpression(p(h), [g]) : W.types.callExpression(i.addHelper("classPrivateGetter"), [W.types.cloneNode(t), g,
|
|
p(h)]);
|
|
if (d) {
|
|
let D = W.types.buildUndefinedNode();
|
|
return b ? D : W.types.sequenceExpression([W.types.callExpression(i.addHelper("assertClassBrand"), [W.types.cloneNode(t), g]), D]);
|
|
}
|
|
return b ? p(l) : W.types.callExpression(i.addHelper("assertClassBrand"), [W.types.cloneNode(t), g, p(l)]);
|
|
}
|
|
return f ? y ? h ? ui(i) ? W.types.callExpression(i.addHelper("classPrivateGetter"), [W.types.cloneNode(l), this.receiver(e), p(h)]) :
|
|
W.types.callExpression(i.addHelper("classPrivateFieldGet"), [this.receiver(e), p(l)]) : W.types.sequenceExpression([this.receiver(e), cHe(
|
|
i, u)]) : ui(i) ? W.types.callExpression(i.addHelper("assertClassBrand"), [W.types.cloneNode(l), this.receiver(e), p(m)]) : W.types.callExpression(
|
|
i.addHelper("classPrivateMethodGet"), [this.receiver(e), W.types.cloneNode(l), p(m)]) : ui(i) ? W.types.callExpression(i.addHelper("cl\
|
|
assPrivateFieldGet2"), [p(l), this.receiver(e)]) : W.types.callExpression(i.addHelper("classPrivateFieldGet"), [this.receiver(e), p(l)]);
|
|
}),
|
|
boundGet(e) {
|
|
return this.memoise(e, 1), W.types.callExpression(W.types.memberExpression(this.get(e), W.types.identifier("bind")), [this.receiver(e)]);
|
|
},
|
|
set: CK(function(e, t) {
|
|
let {
|
|
classRef: r,
|
|
privateNamesMap: i,
|
|
file: n,
|
|
noUninitializedPrivateFieldAccess: a
|
|
} = this, o = e.node.property, {
|
|
name: u
|
|
} = o.id, {
|
|
id: l,
|
|
static: c,
|
|
method: f,
|
|
setId: m,
|
|
getId: h
|
|
} = i.get(u), d = h || m, y = /* @__PURE__ */ s((p) => W.types.inherits(W.types.cloneNode(p), o), "cloneId");
|
|
if (c) {
|
|
if (!ui(n)) {
|
|
let b = f && !d ? "classStaticPrivateMethodSet" : "classStaticPrivateFieldSpecSet";
|
|
return W.types.callExpression(n.addHelper(b), [this.receiver(e), W.types.cloneNode(r), y(l), t]);
|
|
}
|
|
let p = this.receiver(e), g = W.types.isIdentifier(p) && p.name === r.name;
|
|
if (f && !m) {
|
|
let b = eb(n, u);
|
|
return g ? W.types.sequenceExpression([t, b]) : W.types.sequenceExpression([t, W.types.callExpression(n.addHelper("assertClassBran\
|
|
d"), [W.types.cloneNode(r), p]), eb(n, u)]);
|
|
}
|
|
return m ? g ? W.types.callExpression(W.types.cloneNode(m), [p, t]) : W.types.callExpression(n.addHelper("classPrivateSetter"), [W.types.
|
|
cloneNode(r), y(m), p, t]) : W.types.assignmentExpression("=", k2(y(l), a), g ? t : W.types.callExpression(n.addHelper("assertClassB\
|
|
rand"), [W.types.cloneNode(r), p, t]));
|
|
}
|
|
return f ? m ? ui(n) ? W.types.callExpression(n.addHelper("classPrivateSetter"), [W.types.cloneNode(l), y(m), this.receiver(e), t]) : W.
|
|
types.callExpression(n.addHelper("classPrivateFieldSet"), [this.receiver(e), y(l), t]) : W.types.sequenceExpression([this.receiver(e),
|
|
t, eb(n, u)]) : ui(n) ? W.types.callExpression(n.addHelper("classPrivateFieldSet2"), [y(l), this.receiver(e), t]) : W.types.callExpression(
|
|
n.addHelper("classPrivateFieldSet"), [this.receiver(e), y(l), t]);
|
|
}),
|
|
destructureSet(e) {
|
|
let {
|
|
classRef: t,
|
|
privateNamesMap: r,
|
|
file: i,
|
|
noUninitializedPrivateFieldAccess: n
|
|
} = this, a = e.node.property, {
|
|
name: o
|
|
} = a.id, {
|
|
id: u,
|
|
static: l,
|
|
method: c,
|
|
setId: f
|
|
} = r.get(o), m = /* @__PURE__ */ s((p) => W.types.inherits(W.types.cloneNode(p), a), "cloneId");
|
|
if (!ui(i)) {
|
|
if (l) {
|
|
try {
|
|
var h = i.addHelper("classStaticPrivateFieldDestructureSet");
|
|
} catch {
|
|
throw new Error("Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \nplease update @babel/helpers to the late\
|
|
st version.");
|
|
}
|
|
return W.types.memberExpression(W.types.callExpression(h, [this.receiver(e), W.types.cloneNode(t), m(u)]), W.types.identifier("val\
|
|
ue"));
|
|
}
|
|
return W.types.memberExpression(W.types.callExpression(i.addHelper("classPrivateFieldDestructureSet"), [this.receiver(e), m(u)]), W.
|
|
types.identifier("value"));
|
|
}
|
|
if (c && !f)
|
|
return W.types.memberExpression(W.types.sequenceExpression([e.node.object, eb(i, o)]), W.types.identifier("_"));
|
|
if (l && !c) {
|
|
let p = this.get(e);
|
|
if (!n || !W.types.isCallExpression(p))
|
|
return p;
|
|
let g = p.arguments.pop();
|
|
return p.arguments.push(W.template.expression.ast`(_) => ${g} = _`), W.types.memberExpression(W.types.callExpression(i.addHelper("to\
|
|
Setter"), [p]), W.types.identifier("_"));
|
|
}
|
|
let d = this.set(e, W.types.identifier("_"));
|
|
if (!W.types.isCallExpression(d) || !W.types.isIdentifier(d.arguments[d.arguments.length - 1], {
|
|
name: "_"
|
|
}))
|
|
throw e.buildCodeFrameError("Internal Babel error while compiling this code. This is a Babel bug. Please report it at https://github\
|
|
.com/babel/babel/issues.");
|
|
let y;
|
|
return W.types.isMemberExpression(d.callee, {
|
|
computed: !1
|
|
}) && W.types.isIdentifier(d.callee.property) && d.callee.property.name === "call" ? y = [d.callee.object, W.types.arrayExpression(d.arguments.
|
|
slice(1, -1)), d.arguments[0]] : y = [d.callee, W.types.arrayExpression(d.arguments.slice(0, -1))], W.types.memberExpression(W.types.callExpression(
|
|
i.addHelper("toSetter"), y), W.types.identifier("_"));
|
|
},
|
|
call(e, t) {
|
|
return this.memoise(e, 1), (0, TK.default)(this.get(e), this.receiver(e), t, !1);
|
|
},
|
|
optionalCall(e, t) {
|
|
return this.memoise(e, 1), (0, TK.default)(this.get(e), this.receiver(e), t, !0);
|
|
},
|
|
delete() {
|
|
throw new Error("Internal Babel error: deleting private elements is a parsing error.");
|
|
}
|
|
}, dHe = {
|
|
get(e) {
|
|
let {
|
|
privateNamesMap: t,
|
|
file: r
|
|
} = this, {
|
|
object: i
|
|
} = e.node, {
|
|
name: n
|
|
} = e.node.property.id;
|
|
return W.template.expression`BASE(REF, PROP)[PROP]`({
|
|
BASE: r.addHelper("classPrivateFieldLooseBase"),
|
|
REF: W.types.cloneNode(i),
|
|
PROP: W.types.cloneNode(t.get(n).id)
|
|
});
|
|
},
|
|
set() {
|
|
throw new Error("private name handler with loose = true don't need set()");
|
|
},
|
|
boundGet(e) {
|
|
return W.types.callExpression(W.types.memberExpression(this.get(e), W.types.identifier("bind")), [W.types.cloneNode(e.node.object)]);
|
|
},
|
|
simpleSet(e) {
|
|
return this.get(e);
|
|
},
|
|
destructureSet(e) {
|
|
return this.get(e);
|
|
},
|
|
call(e, t) {
|
|
return W.types.callExpression(this.get(e), t);
|
|
},
|
|
optionalCall(e, t) {
|
|
return W.types.optionalCallExpression(this.get(e), t, !0);
|
|
},
|
|
delete() {
|
|
throw new Error("Internal Babel error: deleting private elements is a parsing error.");
|
|
}
|
|
};
|
|
function pHe(e, t, r, {
|
|
privateFieldsAsProperties: i,
|
|
noUninitializedPrivateFieldAccess: n,
|
|
noDocumentAll: a,
|
|
innerBinding: o
|
|
}, u) {
|
|
if (!r.size) return;
|
|
let l = t.get("body"), c = i ? dHe : fHe;
|
|
(0, rHe.default)(l, uHe, Object.assign({
|
|
privateNamesMap: r,
|
|
classRef: e,
|
|
file: u
|
|
}, c, {
|
|
noDocumentAll: a,
|
|
noUninitializedPrivateFieldAccess: n,
|
|
innerBinding: o
|
|
})), l.traverse(lHe, {
|
|
privateNamesMap: r,
|
|
classRef: e,
|
|
file: u,
|
|
privateFieldsAsProperties: i,
|
|
innerBinding: o
|
|
});
|
|
}
|
|
s(pHe, "transformPrivateNamesUsage");
|
|
function wK(e, t, r) {
|
|
let {
|
|
id: i
|
|
} = r.get(t.node.key.id.name), n = t.node.value || t.scope.buildUndefinedNode();
|
|
return Lr(W.template.statement.ast`
|
|
Object.defineProperty(${e}, ${W.types.cloneNode(i)}, {
|
|
// configurable is false by default
|
|
// enumerable is false by default
|
|
writable: true,
|
|
value: ${n}
|
|
});
|
|
`, t);
|
|
}
|
|
s(wK, "buildPrivateFieldInitLoose");
|
|
function hHe(e, t, r, i) {
|
|
let {
|
|
id: n
|
|
} = r.get(t.node.key.id.name), a = t.node.value || t.scope.buildUndefinedNode();
|
|
if (!i.availableHelper("classPrivateFieldInitSpec"))
|
|
return Lr(W.template.statement.ast`${W.types.cloneNode(n)}.set(${e}, {
|
|
// configurable is always false for private elements
|
|
// enumerable is always false for private elements
|
|
writable: true,
|
|
value: ${a},
|
|
})`, t);
|
|
let o = i.addHelper("classPrivateFieldInitSpec");
|
|
return N2(Lr(W.types.expressionStatement(W.types.callExpression(o, [W.types.thisExpression(), N2(W.types.cloneNode(n), t.node.key), ui(i) ?
|
|
a : W.template.expression.ast`{ writable: true, value: ${a} }`])), t), t.node);
|
|
}
|
|
s(hHe, "buildPrivateInstanceFieldInitSpec");
|
|
function mHe(e, t, r) {
|
|
let i = t.get(e.node.key.id.name), n = r ? e.node.value : W.template.expression.ast`{
|
|
_: ${e.node.value || W.types.buildUndefinedNode()}
|
|
}`;
|
|
return Lr(W.types.variableDeclaration("var", [W.types.variableDeclarator(W.types.cloneNode(i.id), n)]), e);
|
|
}
|
|
s(mHe, "buildPrivateStaticFieldInitSpec");
|
|
B2 = /* @__PURE__ */ s(function(e, t) {
|
|
let r = t.get(e.node.key.id.name), {
|
|
id: i,
|
|
getId: n,
|
|
setId: a,
|
|
initAdded: o
|
|
} = r, u = n || a;
|
|
if (!e.isProperty() && (o || !u)) return;
|
|
if (u)
|
|
return t.set(e.node.key.id.name, Object.assign({}, r, {
|
|
initAdded: !0
|
|
})), Lr(W.template.statement.ast`
|
|
var ${W.types.cloneNode(i)} = {
|
|
// configurable is false by default
|
|
// enumerable is false by default
|
|
// writable is false by default
|
|
get: ${n ? n.name : e.scope.buildUndefinedNode()},
|
|
set: ${a ? a.name : e.scope.buildUndefinedNode()}
|
|
}
|
|
`, e);
|
|
let l = e.node.value || e.scope.buildUndefinedNode();
|
|
return Lr(W.template.statement.ast`
|
|
var ${W.types.cloneNode(i)} = {
|
|
// configurable is false by default
|
|
// enumerable is false by default
|
|
writable: true,
|
|
value: ${l}
|
|
};
|
|
`, e);
|
|
}, "buildPrivateStaticFieldInitSpecOld");
|
|
var B2;
|
|
function yHe(e, t, r) {
|
|
let i = r.get(t.node.key.id.name), {
|
|
methodId: n,
|
|
id: a,
|
|
getId: o,
|
|
setId: u,
|
|
initAdded: l
|
|
} = i;
|
|
if (l) return;
|
|
if (n)
|
|
return Lr(W.template.statement.ast`
|
|
Object.defineProperty(${e}, ${a}, {
|
|
// configurable is false by default
|
|
// enumerable is false by default
|
|
// writable is false by default
|
|
value: ${n.name}
|
|
});
|
|
`, t);
|
|
if (o || u)
|
|
return r.set(t.node.key.id.name, Object.assign({}, i, {
|
|
initAdded: !0
|
|
})), Lr(W.template.statement.ast`
|
|
Object.defineProperty(${e}, ${a}, {
|
|
// configurable is false by default
|
|
// enumerable is false by default
|
|
// writable is false by default
|
|
get: ${o ? o.name : t.scope.buildUndefinedNode()},
|
|
set: ${u ? u.name : t.scope.buildUndefinedNode()}
|
|
});
|
|
`, t);
|
|
}
|
|
s(yHe, "buildPrivateMethodInitLoose");
|
|
function gHe(e, t, r, i) {
|
|
let n = r.get(t.node.key.id.name);
|
|
if (!n.initAdded)
|
|
return !ui(i) && (n.getId || n.setId) ? bHe(e, t, r, i) : DHe(e, t, r, i);
|
|
}
|
|
s(gHe, "buildPrivateInstanceMethodInitSpec");
|
|
function bHe(e, t, r, i) {
|
|
let n = r.get(t.node.key.id.name), {
|
|
id: a,
|
|
getId: o,
|
|
setId: u
|
|
} = n;
|
|
if (r.set(t.node.key.id.name, Object.assign({}, n, {
|
|
initAdded: !0
|
|
})), !i.availableHelper("classPrivateFieldInitSpec"))
|
|
return Lr(W.template.statement.ast`
|
|
${a}.set(${e}, {
|
|
get: ${o ? o.name : t.scope.buildUndefinedNode()},
|
|
set: ${u ? u.name : t.scope.buildUndefinedNode()}
|
|
});
|
|
`, t);
|
|
let l = i.addHelper("classPrivateFieldInitSpec");
|
|
return N2(Lr(W.template.statement.ast`${l}(
|
|
${W.types.thisExpression()},
|
|
${W.types.cloneNode(a)},
|
|
{
|
|
get: ${o ? o.name : t.scope.buildUndefinedNode()},
|
|
set: ${u ? u.name : t.scope.buildUndefinedNode()}
|
|
},
|
|
)`, t), t.node);
|
|
}
|
|
s(bHe, "buildPrivateAccessorInitialization");
|
|
function DHe(e, t, r, i) {
|
|
let n = r.get(t.node.key.id.name), {
|
|
id: a
|
|
} = n;
|
|
if (!i.availableHelper("classPrivateMethodInitSpec"))
|
|
return Lr(W.template.statement.ast`${a}.add(${e})`, t);
|
|
let o = i.addHelper("classPrivateMethodInitSpec");
|
|
return Lr(W.template.statement.ast`${o}(
|
|
${W.types.thisExpression()},
|
|
${W.types.cloneNode(a)}
|
|
)`, t);
|
|
}
|
|
s(DHe, "buildPrivateInstanceMethodInitialization");
|
|
function AK(e, t) {
|
|
let {
|
|
key: r,
|
|
computed: i
|
|
} = t.node, n = t.node.value || t.scope.buildUndefinedNode();
|
|
return Lr(W.types.expressionStatement(W.types.assignmentExpression("=", W.types.memberExpression(e, r, i || W.types.isLiteral(r)), n)), t);
|
|
}
|
|
s(AK, "buildPublicFieldInitLoose");
|
|
function _K(e, t, r) {
|
|
let {
|
|
key: i,
|
|
computed: n
|
|
} = t.node, a = t.node.value || t.scope.buildUndefinedNode();
|
|
return Lr(W.types.expressionStatement(W.types.callExpression(r.addHelper("defineProperty"), [e, n || W.types.isLiteral(i) ? i : W.types.
|
|
stringLiteral(i.name), a])), t);
|
|
}
|
|
s(_K, "buildPublicFieldInitSpec");
|
|
function vHe(e, t, r, i) {
|
|
let n = i.get(t.node.key.id.name), {
|
|
id: a,
|
|
methodId: o,
|
|
getId: u,
|
|
setId: l,
|
|
initAdded: c
|
|
} = n;
|
|
return c ? void 0 : u || l ? (i.set(t.node.key.id.name, Object.assign({}, n, {
|
|
initAdded: !0
|
|
})), Lr(W.template.statement.ast`
|
|
Object.defineProperty(${e}, ${a}, {
|
|
// configurable is false by default
|
|
// enumerable is false by default
|
|
// writable is false by default
|
|
get: ${u ? u.name : t.scope.buildUndefinedNode()},
|
|
set: ${l ? l.name : t.scope.buildUndefinedNode()}
|
|
})
|
|
`, t)) : Lr(W.template.statement.ast`
|
|
Object.defineProperty(${e}, ${a}, {
|
|
// configurable is false by default
|
|
// enumerable is false by default
|
|
// writable is false by default
|
|
value: ${o.name}
|
|
});
|
|
`, t);
|
|
}
|
|
s(vHe, "buildPrivateStaticMethodInitLoose");
|
|
function tb(e, t, r, i = !1) {
|
|
let n = r.get(t.node.key.id.name), {
|
|
id: a,
|
|
methodId: o,
|
|
getId: u,
|
|
setId: l,
|
|
getterDeclared: c,
|
|
setterDeclared: f,
|
|
static: m
|
|
} = n, {
|
|
params: h,
|
|
body: d,
|
|
generator: y,
|
|
async: p
|
|
} = t.node, g = u && h.length === 0, b = l && h.length > 0;
|
|
if (g && c || b && f)
|
|
return r.set(t.node.key.id.name, Object.assign({}, n, {
|
|
initAdded: !0
|
|
})), null;
|
|
if (ui(e) && (g || b) && !i) {
|
|
let v = t.get("body").scope, S = v.generateUidIdentifier("this"), C = {
|
|
thisRef: S,
|
|
argumentsPath: []
|
|
};
|
|
if (t.traverse(IK, C), C.argumentsPath.length) {
|
|
let O = v.generateUidIdentifier("arguments");
|
|
v.push({
|
|
id: O,
|
|
init: W.template.expression.ast`[].slice.call(arguments, 1)`
|
|
});
|
|
for (let k of C.argumentsPath)
|
|
k.replaceWith(W.types.cloneNode(O));
|
|
}
|
|
h.unshift(W.types.cloneNode(S));
|
|
}
|
|
let D = o;
|
|
return g ? (r.set(t.node.key.id.name, Object.assign({}, n, {
|
|
getterDeclared: !0,
|
|
initAdded: !0
|
|
})), D = u) : b ? (r.set(t.node.key.id.name, Object.assign({}, n, {
|
|
setterDeclared: !0,
|
|
initAdded: !0
|
|
})), D = l) : m && !i && (D = a), Lr(W.types.functionDeclaration(W.types.cloneNode(D), h, d, y, p), t);
|
|
}
|
|
s(tb, "buildPrivateMethodDeclaration");
|
|
var IK = PK.visitors.environmentVisitor({
|
|
Identifier(e, t) {
|
|
t.argumentsPath && e.node.name === "arguments" && t.argumentsPath.push(e);
|
|
},
|
|
UnaryExpression(e) {
|
|
let {
|
|
node: t
|
|
} = e;
|
|
if (t.operator === "delete") {
|
|
let r = (0, nHe.skipTransparentExprWrapperNodes)(t.argument);
|
|
W.types.isThisExpression(r) && e.replaceWith(W.types.booleanLiteral(!0));
|
|
}
|
|
},
|
|
ThisExpression(e, t) {
|
|
t.needsClassRef = !0, e.replaceWith(W.types.cloneNode(t.thisRef));
|
|
},
|
|
MetaProperty(e) {
|
|
let {
|
|
node: t,
|
|
scope: r
|
|
} = e;
|
|
t.meta.name === "new" && t.property.name === "target" && e.replaceWith(r.buildUndefinedNode());
|
|
}
|
|
}), EHe = {
|
|
ReferencedIdentifier(e, t) {
|
|
e.scope.bindingIdentifierEquals(e.node.name, t.innerBinding) && (t.needsClassRef = !0, e.node.name = t.thisRef.name);
|
|
}
|
|
};
|
|
function xHe(e, t, r) {
|
|
var i;
|
|
let n = {
|
|
thisRef: t,
|
|
needsClassRef: !1,
|
|
innerBinding: r
|
|
};
|
|
return e.isMethod() || e.traverse(IK, n), r != null && (i = n.thisRef) != null && i.name && n.thisRef.name !== r.name && e.traverse(EHe,
|
|
n), n.needsClassRef;
|
|
}
|
|
s(xHe, "replaceThisContext");
|
|
function SHe({
|
|
key: e,
|
|
computed: t
|
|
}) {
|
|
return e.type === "Identifier" ? !t && (e.name === "name" || e.name === "length") : e.type === "StringLiteral" ? e.value === "name" || e.
|
|
value === "length" : !1;
|
|
}
|
|
s(SHe, "isNameOrLength");
|
|
function Lr(e, t) {
|
|
return W.types.inheritLeadingComments(e, t.node), W.types.inheritInnerComments(e, t.node), e;
|
|
}
|
|
s(Lr, "inheritPropComments");
|
|
function N2(e, t) {
|
|
return e.start = t.start, e.end = t.end, e.loc = t.loc, e;
|
|
}
|
|
s(N2, "inheritLoc");
|
|
function THe(e, t, r, i, n, a, o, u, l, c) {
|
|
let f = 0, m, h = [], d = [], y = !1, p = [], g = null, b = W.types.isIdentifier(t) ? () => t : () => (m ?? (m = r[0].scope.generateUidIdentifierBasedOnNode(
|
|
t)), m), D = e ?? r[0].scope.generateUidIdentifier(c?.name || "Class");
|
|
e ?? (e = W.types.cloneNode(c));
|
|
for (let v of r) {
|
|
v.isClassProperty() && sHe.assertFieldTransformed(v);
|
|
let S = !(W.types.isStaticBlock != null && W.types.isStaticBlock(v.node)) && v.node.static, C = !S, O = v.isPrivate(), k = !O, U = v.isProperty(),
|
|
j = !U, K = v.isStaticBlock == null ? void 0 : v.isStaticBlock();
|
|
switch (S && (f |= 1), (S || j && O || K) && (new tHe.default({
|
|
methodPath: v,
|
|
constantSuper: l,
|
|
file: n,
|
|
refToPreserve: c,
|
|
getSuperRef: b,
|
|
getObjectRef() {
|
|
return f |= 2, S || K ? D : W.types.memberExpression(D, W.types.identifier("prototype"));
|
|
}
|
|
}).replace(), xHe(v, D, c) && (f |= 2)), y = !1, !0) {
|
|
case K: {
|
|
let R = v.node.body;
|
|
R.length === 1 && W.types.isExpressionStatement(R[0]) ? h.push(Lr(R[0], v)) : h.push(W.types.inheritsComments(W.template.statement.
|
|
ast`(() => { ${R} })()`, v.node));
|
|
break;
|
|
}
|
|
case (S && O && U && o):
|
|
h.push(wK(W.types.cloneNode(e), v, i));
|
|
break;
|
|
case (S && O && U && !o):
|
|
ui(n) ? h.push(mHe(v, i, u)) : h.push(B2(v, i));
|
|
break;
|
|
case (S && k && U && a):
|
|
if (!SHe(v.node)) {
|
|
h.push(AK(W.types.cloneNode(e), v));
|
|
break;
|
|
}
|
|
case (S && k && U && !a):
|
|
h.push(_K(W.types.cloneNode(e), v, n));
|
|
break;
|
|
case (C && O && U && o):
|
|
d.push(wK(W.types.thisExpression(), v, i));
|
|
break;
|
|
case (C && O && U && !o):
|
|
d.push(hHe(W.types.thisExpression(), v, i, n));
|
|
break;
|
|
case (C && O && j && o):
|
|
d.unshift(yHe(W.types.thisExpression(), v, i)), p.push(tb(n, v, i, o));
|
|
break;
|
|
case (C && O && j && !o):
|
|
d.unshift(gHe(W.types.thisExpression(), v, i, n)), p.push(tb(n, v, i, o));
|
|
break;
|
|
case (S && O && j && !o):
|
|
ui(n) || h.unshift(B2(v, i)), p.push(tb(n, v, i, o));
|
|
break;
|
|
case (S && O && j && o):
|
|
h.unshift(vHe(W.types.cloneNode(e), v, n, i)), p.push(tb(n, v, i, o));
|
|
break;
|
|
case (C && k && U && a):
|
|
d.push(AK(W.types.thisExpression(), v));
|
|
break;
|
|
case (C && k && U && !a):
|
|
y = !0, d.push(_K(W.types.thisExpression(), v, n));
|
|
break;
|
|
default:
|
|
throw new Error("Unreachable.");
|
|
}
|
|
}
|
|
return f & 2 && c != null && (g = W.types.expressionStatement(W.types.assignmentExpression("=", W.types.cloneNode(D), W.types.cloneNode(
|
|
c)))), {
|
|
staticNodes: h.filter(Boolean),
|
|
instanceNodes: d.filter(Boolean),
|
|
lastInstanceNodeReturnsThis: y,
|
|
pureStaticNodes: p.filter(Boolean),
|
|
classBindingNode: g,
|
|
wrapClass(v) {
|
|
for (let S of r)
|
|
S.node.leadingComments = null, S.remove();
|
|
return m && (v.scope.push({
|
|
id: W.types.cloneNode(m)
|
|
}), v.set("superClass", W.types.assignmentExpression("=", m, v.node.superClass))), f !== 0 && (v.isClassExpression() ? (v.scope.push(
|
|
{
|
|
id: e
|
|
}), v.replaceWith(W.types.assignmentExpression("=", W.types.cloneNode(e), v.node))) : (c == null && (v.node.id = e), g != null && v.
|
|
scope.push({
|
|
id: D
|
|
}))), v;
|
|
}
|
|
};
|
|
}
|
|
s(THe, "buildFieldsInitNodes");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-create-class-features-plugin/lib/misc.js
|
|
var j2 = E((Sp) => {
|
|
"use strict";
|
|
Object.defineProperty(Sp, "__esModule", {
|
|
value: !0
|
|
});
|
|
Sp.extractComputedKeys = FHe;
|
|
Sp.injectInitialization = PHe;
|
|
Sp.memoiseComputedKey = kK;
|
|
var gr = hr(), CHe = Ar(), wHe = CHe.visitors.environmentVisitor({
|
|
Super(e) {
|
|
let {
|
|
node: t,
|
|
parentPath: r
|
|
} = e;
|
|
r.isCallExpression({
|
|
callee: t
|
|
}) && this.push(r);
|
|
}
|
|
}), AHe = {
|
|
"TSTypeAnnotation|TypeAnnotation"(e) {
|
|
e.skip();
|
|
},
|
|
ReferencedIdentifier(e, {
|
|
scope: t
|
|
}) {
|
|
t.hasOwnBinding(e.node.name) && (t.rename(e.node.name), e.skip());
|
|
}
|
|
};
|
|
function OK(e, t) {
|
|
if (t.classBinding && t.classBinding === e.scope.getBinding(e.node.name)) {
|
|
let r = t.file.addHelper("classNameTDZError"), i = gr.types.callExpression(r, [gr.types.stringLiteral(e.node.name)]);
|
|
e.replaceWith(gr.types.sequenceExpression([i, e.node])), e.skip();
|
|
}
|
|
}
|
|
s(OK, "handleClassTDZ");
|
|
var _He = {
|
|
ReferencedIdentifier: OK,
|
|
"TSTypeAnnotation|TypeAnnotation"(e) {
|
|
e.skip();
|
|
}
|
|
};
|
|
function PHe(e, t, r, i, n) {
|
|
if (!r.length) return;
|
|
let a = !!e.node.superClass;
|
|
if (!t) {
|
|
let o = gr.types.classMethod("constructor", gr.types.identifier("constructor"), [], gr.types.blockStatement([]));
|
|
a && (o.params = [gr.types.restElement(gr.types.identifier("args"))], o.body.body.push(gr.template.statement.ast`super(...args)`)), [t] =
|
|
e.get("body").unshiftContainer("body", o);
|
|
}
|
|
if (i && i(AHe, {
|
|
scope: t.scope
|
|
}), a) {
|
|
let o = [];
|
|
t.traverse(wHe, o);
|
|
let u = !0;
|
|
for (let l of o)
|
|
if (u ? u = !1 : r = r.map((c) => gr.types.cloneNode(c)), l.parentPath.isExpressionStatement())
|
|
l.insertAfter(r);
|
|
else {
|
|
let c = [l.node, ...r.map((f) => gr.types.toExpression(f))];
|
|
n || c.push(gr.types.thisExpression()), l.replaceWith(gr.types.sequenceExpression(c));
|
|
}
|
|
} else
|
|
t.get("body").unshiftContainer("body", r);
|
|
}
|
|
s(PHe, "injectInitialization");
|
|
function kK(e, t, r) {
|
|
if (gr.types.isIdentifier(e) && t.hasUid(e.name))
|
|
return;
|
|
if (gr.types.isAssignmentExpression(e, {
|
|
operator: "="
|
|
}) && gr.types.isIdentifier(e.left) && t.hasUid(e.left.name))
|
|
return gr.types.cloneNode(e);
|
|
{
|
|
let a = gr.types.identifier(r);
|
|
return t.push({
|
|
id: a,
|
|
kind: "let"
|
|
}), gr.types.assignmentExpression("=", gr.types.cloneNode(a), e);
|
|
}
|
|
}
|
|
s(kK, "memoiseComputedKey");
|
|
function FHe(e, t, r) {
|
|
let {
|
|
scope: i
|
|
} = e, n = [], a = {
|
|
classBinding: e.node.id && i.getBinding(e.node.id.name),
|
|
file: r
|
|
};
|
|
for (let o of t) {
|
|
let u = o.get("key");
|
|
u.isReferencedIdentifier() ? OK(u, a) : u.traverse(_He, a);
|
|
let l = o.node;
|
|
if (!u.isConstantExpression()) {
|
|
let c = kK(u.node, i, i.generateUidBasedOnNode(u.node));
|
|
c && (n.push(gr.types.expressionStatement(c)), l.key = gr.types.cloneNode(c.left));
|
|
}
|
|
}
|
|
return n;
|
|
}
|
|
s(FHe, "extractComputedKeys");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-create-class-features-plugin/lib/decorators.js
|
|
var K2 = E((wp) => {
|
|
"use strict";
|
|
Object.defineProperty(wp, "__esModule", {
|
|
value: !0
|
|
});
|
|
wp.default = cKe;
|
|
wp.hasDecorators = IHe;
|
|
wp.hasOwnDecorators = $2;
|
|
var F = hr(), BK = Zg(), so = Qg(), VK = R2(), ib = j2();
|
|
function $2(e) {
|
|
var t;
|
|
return !!((t = e.decorators) != null && t.length);
|
|
}
|
|
s($2, "hasOwnDecorators");
|
|
function IHe(e) {
|
|
return $2(e) || e.body.body.some($2);
|
|
}
|
|
s(IHe, "hasDecorators");
|
|
function HK(e, t = e.length - 1) {
|
|
if (t === -1) {
|
|
e.unshift(65);
|
|
return;
|
|
}
|
|
let r = e[t];
|
|
r === 90 ? e[t] = 97 : r === 122 ? (e[t] = 65, HK(e, t - 1)) : e[t] = r + 1;
|
|
}
|
|
s(HK, "incrementId");
|
|
function OHe(e) {
|
|
let t = [], r = /* @__PURE__ */ new Set();
|
|
return e.traverse({
|
|
PrivateName(i) {
|
|
r.add(i.node.id.name);
|
|
}
|
|
}), () => {
|
|
let i;
|
|
do
|
|
HK(t), i = String.fromCharCode(...t);
|
|
while (r.has(i));
|
|
return F.types.privateName(F.types.identifier(i));
|
|
};
|
|
}
|
|
s(OHe, "createPrivateUidGeneratorForClass");
|
|
function kHe(e) {
|
|
let t;
|
|
return () => (t || (t = OHe(e)), t());
|
|
}
|
|
s(kHe, "createLazyPrivateUidGeneratorForClass");
|
|
function BHe(e, t) {
|
|
let r = e.node.id, i = e.scope;
|
|
if (e.type === "ClassDeclaration") {
|
|
let n = r.name, a = i.generateUidIdentifierBasedOnNode(r), o = F.types.identifier(n);
|
|
return i.rename(n, a.name), e.get("id").replaceWith(o), {
|
|
id: F.types.cloneNode(a),
|
|
path: e
|
|
};
|
|
} else {
|
|
let n;
|
|
r ? (t = r.name, n = Li(i.parent, t), i.rename(t, n.name)) : n = Li(i.parent, typeof t == "string" ? t : "decorated_class");
|
|
let a = F.types.classExpression(typeof t == "string" ? F.types.identifier(t) : null, e.node.superClass, e.node.body), [o] = e.replaceWith(
|
|
F.types.sequenceExpression([a, n]));
|
|
return {
|
|
id: F.types.cloneNode(n),
|
|
path: o.get("expressions.0")
|
|
};
|
|
}
|
|
}
|
|
s(BHe, "replaceClassWithVar");
|
|
function NK(e, t, r) {
|
|
return e.type === "PrivateName" ? F.types.classPrivateProperty(e, t, void 0, r) : F.types.classProperty(e, t, void 0, void 0, r);
|
|
}
|
|
s(NK, "generateClassProperty");
|
|
function L2(e, t) {
|
|
e.node.id || (e.node.id = typeof t == "string" ? F.types.identifier(t) : e.scope.generateUidIdentifier("Class"));
|
|
}
|
|
s(L2, "assignIdForAnonymousClass");
|
|
function MK(e, t, r, i, n, a, o, u) {
|
|
let l = (u === "2023-11" || u === "2023-05") && o ? e : F.types.thisExpression(), c = F.types.blockStatement([F.types.returnStatement(F.
|
|
types.memberExpression(F.types.cloneNode(l), F.types.cloneNode(n)))]), f = F.types.blockStatement([F.types.expressionStatement(F.types.assignmentExpression(
|
|
"=", F.types.memberExpression(F.types.cloneNode(l), F.types.cloneNode(n)), F.types.identifier("v")))]), m, h;
|
|
r.type === "PrivateName" ? (m = F.types.classPrivateMethod("get", r, [], c, o), h = F.types.classPrivateMethod("set", i, [F.types.identifier(
|
|
"v")], f, o)) : (m = F.types.classMethod("get", r, [], c, a, o), h = F.types.classMethod("set", i, [F.types.identifier("v")], f, a, o)),
|
|
t.insertAfter(h), t.insertAfter(m);
|
|
}
|
|
s(MK, "addProxyAccessorsFor");
|
|
function RK(e, t) {
|
|
return t !== "2023-11" && t !== "2023-05" && t !== "2023-01" ? [F.template.expression.ast`
|
|
function () {
|
|
return this.${F.types.cloneNode(e)};
|
|
}
|
|
`, F.template.expression.ast`
|
|
function (value) {
|
|
this.${F.types.cloneNode(e)} = value;
|
|
}
|
|
`] : [F.template.expression.ast`
|
|
o => o.${F.types.cloneNode(e)}
|
|
`, F.template.expression.ast`
|
|
(o, v) => o.${F.types.cloneNode(e)} = v
|
|
`];
|
|
}
|
|
s(RK, "extractProxyAccessorsFor");
|
|
function H2(e) {
|
|
if (e = (0, so.skipTransparentExprWrappers)(e), e.isSequenceExpression()) {
|
|
let t = e.get("expressions");
|
|
return H2(t[t.length - 1]);
|
|
}
|
|
return e;
|
|
}
|
|
s(H2, "getComputedKeyLastElement");
|
|
function NHe(e) {
|
|
let t = H2(e);
|
|
if (t.isConstantExpression())
|
|
return F.types.cloneNode(e.node);
|
|
if (t.isIdentifier() && e.scope.hasUid(t.node.name))
|
|
return F.types.cloneNode(e.node);
|
|
if (t.isAssignmentExpression() && t.get("left").isIdentifier())
|
|
return F.types.cloneNode(t.node.left);
|
|
throw new Error(`Internal Error: the computed key ${e.toString()} has not yet been memoised.`);
|
|
}
|
|
s(NHe, "getComputedKeyMemoiser");
|
|
function Tp(e, t) {
|
|
let r = t.get("key");
|
|
r.isSequenceExpression() ? e.push(...r.node.expressions) : e.push(r.node), r.replaceWith(oo(e));
|
|
}
|
|
s(Tp, "prependExpressionsToComputedKey");
|
|
function MHe(e, t) {
|
|
let r = t.get("key"), i = H2(r);
|
|
if (i.isConstantExpression())
|
|
Tp(e, t);
|
|
else {
|
|
let n = r.scope.parent, a = (0, ib.memoiseComputedKey)(i.node, n, n.generateUid("computedKey"));
|
|
if (!a)
|
|
Tp(e, t);
|
|
else {
|
|
let o = [...e, F.types.cloneNode(a.left)], u = i.parentPath;
|
|
u.isSequenceExpression() ? u.pushContainer("expressions", o) : i.replaceWith(oo([F.types.cloneNode(a), ...o]));
|
|
}
|
|
}
|
|
}
|
|
s(MHe, "appendExpressionsToComputedKey");
|
|
function q2(e, t) {
|
|
let r = t.get("value");
|
|
r.node ? e.push(r.node) : e.length > 0 && (e[e.length - 1] = F.types.unaryExpression("void", e[e.length - 1])), r.replaceWith(oo(e));
|
|
}
|
|
s(q2, "prependExpressionsToFieldInitializer");
|
|
function RHe(e, t) {
|
|
t.unshiftContainer("body", F.types.expressionStatement(oo(e)));
|
|
}
|
|
s(RHe, "prependExpressionsToStaticBlock");
|
|
function jHe(e, t) {
|
|
t.node.body.body.unshift(F.types.expressionStatement(oo(e)));
|
|
}
|
|
s(jHe, "prependExpressionsToConstructor");
|
|
function jK(e, t) {
|
|
return F.types.isCallExpression(e) && F.types.isIdentifier(e.callee, {
|
|
name: t.name
|
|
});
|
|
}
|
|
s(jK, "isProtoInitCallExpression");
|
|
function LHe(e, t) {
|
|
if (t) {
|
|
if (e.length >= 2 && jK(e[1], t)) {
|
|
let r = F.types.callExpression(F.types.cloneNode(t), [e[0]]);
|
|
e.splice(0, 2, r);
|
|
}
|
|
e.length >= 2 && F.types.isThisExpression(e[e.length - 1]) && jK(e[e.length - 2], t) && e.splice(e.length - 1, 1);
|
|
}
|
|
return oo(e);
|
|
}
|
|
s(LHe, "optimizeSuperCallAndExpressions");
|
|
function qHe(e, t, r) {
|
|
t.traverse({
|
|
CallExpression: {
|
|
exit(i) {
|
|
if (!i.get("callee").isSuper()) return;
|
|
let n = [i.node, ...e.map((a) => F.types.cloneNode(a))];
|
|
i.isCompletionRecord() && n.push(F.types.thisExpression()), i.replaceWith(LHe(n, r)), i.skip();
|
|
}
|
|
},
|
|
ClassMethod(i) {
|
|
i.node.kind === "constructor" && i.skip();
|
|
}
|
|
});
|
|
}
|
|
s(qHe, "insertExpressionsAfterSuperCallAndOptimize");
|
|
function LK(e, t) {
|
|
let r = [F.types.expressionStatement(oo(e))];
|
|
return t && r.unshift(F.types.expressionStatement(F.types.callExpression(F.types.super(), [F.types.spreadElement(F.types.identifier("arg\
|
|
s"))]))), F.types.classMethod("constructor", F.types.identifier("constructor"), t ? [F.types.restElement(F.types.identifier("args"))] : [], F.
|
|
types.blockStatement(r));
|
|
}
|
|
s(LK, "createConstructorFromExpressions");
|
|
function qK(e) {
|
|
return F.types.staticBlock([F.types.expressionStatement(oo(e))]);
|
|
}
|
|
s(qK, "createStaticBlockFromExpressions");
|
|
var vu = 0, ao = 1, UHe = 2, KK = 3, nb = 4, WHe = 5, $He = 8, VHe = 16;
|
|
function HHe(e) {
|
|
switch (e.node.type) {
|
|
case "ClassProperty":
|
|
case "ClassPrivateProperty":
|
|
return vu;
|
|
case "ClassAccessorProperty":
|
|
return ao;
|
|
case "ClassMethod":
|
|
case "ClassPrivateMethod":
|
|
return e.node.kind === "get" ? KK : e.node.kind === "set" ? nb : UHe;
|
|
}
|
|
}
|
|
s(HHe, "getElementKind");
|
|
function KHe(e) {
|
|
return [...e.filter((t) => t.isStatic && t.kind >= ao && t.kind <= nb), ...e.filter((t) => !t.isStatic && t.kind >= ao && t.kind <= nb),
|
|
...e.filter((t) => t.isStatic && t.kind === vu), ...e.filter((t) => !t.isStatic && t.kind === vu)];
|
|
}
|
|
s(KHe, "toSortedDecoratorInfo");
|
|
function UK(e, t, r) {
|
|
let i = e.length, n = t.some(Boolean), a = [];
|
|
for (let o = 0; o < i; o++)
|
|
(r === "2023-11" || r === "2023-05") && n && a.push(t[o] || F.types.unaryExpression("void", F.types.numericLiteral(0))), a.push(e[o].expression);
|
|
return {
|
|
haveThis: n,
|
|
decs: a
|
|
};
|
|
}
|
|
s(UK, "generateDecorationList");
|
|
function zHe(e, t) {
|
|
return F.types.arrayExpression(e.map((r) => {
|
|
let i = r.kind;
|
|
return r.isStatic && (i += t === "2023-11" || t === "2023-05" ? $He : WHe), r.decoratorsHaveThis && (i += VHe), F.types.arrayExpression(
|
|
[r.decoratorsArray, F.types.numericLiteral(i), r.name, ...r.privateMethods || []]);
|
|
}));
|
|
}
|
|
s(zHe, "generateDecorationExprs");
|
|
function GHe(e) {
|
|
let t = [];
|
|
for (let r of e) {
|
|
let {
|
|
locals: i
|
|
} = r;
|
|
Array.isArray(i) ? t.push(...i) : i !== void 0 && t.push(i);
|
|
}
|
|
return t;
|
|
}
|
|
s(GHe, "extractElementLocalAssignments");
|
|
function JHe(e, t, r, i, n, a) {
|
|
t.insertAfter(F.types.classPrivateMethod("get", F.types.cloneNode(r), [], F.types.blockStatement([F.types.returnStatement(F.types.callExpression(
|
|
F.types.cloneNode(i), e === "2023-11" && a ? [] : [F.types.thisExpression()]))]), a)), t.insertAfter(F.types.classPrivateMethod("set", F.
|
|
types.cloneNode(r), [F.types.identifier("v")], F.types.blockStatement([F.types.expressionStatement(F.types.callExpression(F.types.cloneNode(
|
|
n), e === "2023-11" && a ? [F.types.identifier("v")] : [F.types.thisExpression(), F.types.identifier("v")]))]), a));
|
|
}
|
|
s(JHe, "addCallAccessorsFor");
|
|
function XHe(e, t, r, i) {
|
|
let n, a;
|
|
e.node.kind === "set" ? (n = [F.types.identifier("v")], a = [F.types.expressionStatement(F.types.callExpression(r, [F.types.thisExpression(),
|
|
F.types.identifier("v")]))]) : (n = [], a = [F.types.returnStatement(F.types.callExpression(r, [F.types.thisExpression()]))]), e.replaceWith(
|
|
F.types.classPrivateMethod(e.node.kind, F.types.cloneNode(t), n, F.types.blockStatement(a), i));
|
|
}
|
|
s(XHe, "movePrivateAccessor");
|
|
function WK(e) {
|
|
let {
|
|
type: t
|
|
} = e;
|
|
return t !== "TSDeclareMethod" && t !== "TSIndexSignature" && t !== "StaticBlock";
|
|
}
|
|
s(WK, "isClassDecoratableElementPath");
|
|
function YHe(e) {
|
|
return F.types.callExpression(F.types.arrowFunctionExpression([], F.types.blockStatement(e.body)), []);
|
|
}
|
|
s(YHe, "staticBlockToIIFE");
|
|
function ZHe(e) {
|
|
return F.types.functionExpression(null, [], F.types.blockStatement(e.body));
|
|
}
|
|
s(ZHe, "staticBlockToFunctionClosure");
|
|
function QHe(e) {
|
|
return F.types.functionExpression(null, [], F.types.blockStatement([F.types.returnStatement(e)]));
|
|
}
|
|
s(QHe, "fieldInitializerToClosure");
|
|
function oo(e) {
|
|
return e.length === 0 ? F.types.unaryExpression("void", F.types.numericLiteral(0)) : e.length === 1 ? e[0] : F.types.sequenceExpression(
|
|
e);
|
|
}
|
|
s(oo, "maybeSequenceExpression");
|
|
function $K(e) {
|
|
let {
|
|
params: t,
|
|
body: r,
|
|
generator: i,
|
|
async: n
|
|
} = e;
|
|
return F.types.functionExpression(void 0, t, r, i, n);
|
|
}
|
|
s($K, "createFunctionExpressionFromPrivateMethod");
|
|
function zK(e, t) {
|
|
return F.types.callExpression(e.addHelper("setFunctionName"), [F.types.thisExpression(), t]);
|
|
}
|
|
s(zK, "createSetFunctionNameCall");
|
|
function V2(e, t) {
|
|
return F.types.callExpression(e.addHelper("toPropertyKey"), [t]);
|
|
}
|
|
s(V2, "createToPropertyKeyCall");
|
|
function U2(e) {
|
|
return F.types.arrowFunctionExpression([F.types.identifier("_")], F.types.binaryExpression("in", F.types.cloneNode(e), F.types.identifier(
|
|
"_")));
|
|
}
|
|
s(U2, "createPrivateBrandCheckClosure");
|
|
function eKe(e) {
|
|
try {
|
|
return F.types.traverseFast(e, (t) => {
|
|
if (F.types.isPrivateName(t))
|
|
throw null;
|
|
}), !1;
|
|
} catch {
|
|
return !0;
|
|
}
|
|
}
|
|
s(eKe, "usesPrivateField");
|
|
function tKe(e) {
|
|
let {
|
|
node: t
|
|
} = e;
|
|
t.computed = !0, F.types.isIdentifier(t.key) && (t.key = F.types.stringLiteral(t.key.name));
|
|
}
|
|
s(tKe, "convertToComputedKey");
|
|
function W2(e, t) {
|
|
let r = !1;
|
|
if (t.length > 0) {
|
|
let i = (0, VK.privateNameVisitorFactory)({
|
|
PrivateName(a, o) {
|
|
o.privateNamesMap.has(a.node.id.name) && (r = !0, a.stop());
|
|
}
|
|
}), n = /* @__PURE__ */ new Map();
|
|
for (let a of t)
|
|
n.set(a, null);
|
|
e.traverse(i, {
|
|
privateNamesMap: n
|
|
});
|
|
}
|
|
return r;
|
|
}
|
|
s(W2, "hasInstancePrivateAccess");
|
|
function rKe(e, t) {
|
|
let r = (0, VK.privateNameVisitorFactory)({
|
|
PrivateName(n, a) {
|
|
if (!a.privateNamesMap.has(n.node.id.name)) return;
|
|
let o = n.parentPath, u = o.parentPath;
|
|
if (u.node.type === "AssignmentExpression" && u.node.left === o.node || u.node.type === "UpdateExpression" || u.node.type === "RestE\
|
|
lement" || u.node.type === "ArrayPattern" || u.node.type === "ObjectProperty" && u.node.value === o.node && u.parentPath.type === "ObjectPat\
|
|
tern" || u.node.type === "ForOfStatement" && u.node.left === o.node)
|
|
throw n.buildCodeFrameError(`Decorated private methods are read-only, but "#${n.node.id.name}" is updated via this expression.`);
|
|
}
|
|
}), i = /* @__PURE__ */ new Map();
|
|
for (let n of t)
|
|
i.set(n, null);
|
|
e.traverse(r, {
|
|
privateNamesMap: i
|
|
});
|
|
}
|
|
s(rKe, "checkPrivateMethodUpdateError");
|
|
function iKe(e, t, r, i, n, a, o) {
|
|
var u;
|
|
let l = e.get("body.body"), c = e.node.decorators, f = !1, m = !1, h = !1, d = kHe(e), y = [], p = e.scope.parent, g = /* @__PURE__ */ s(
|
|
(Ce, ge, ze) => {
|
|
let Ft = Li(p, ge);
|
|
return ze.push(F.types.assignmentExpression("=", Ft, Ce)), F.types.cloneNode(Ft);
|
|
}, "memoiseExpression"), b, D, v = (u = e.node.id) == null ? void 0 : u.name, S = typeof n == "object" ? n : void 0, C = /* @__PURE__ */ s(
|
|
(Ce) => {
|
|
try {
|
|
return F.types.traverseFast(Ce, (ge) => {
|
|
if (F.types.isThisExpression(ge) || F.types.isSuper(ge) || F.types.isYieldExpression(ge) || F.types.isAwaitExpression(ge) || F.types.
|
|
isIdentifier(ge, {
|
|
name: "arguments"
|
|
}) || v && F.types.isIdentifier(ge, {
|
|
name: v
|
|
}) || F.types.isMetaProperty(ge) && ge.meta.name !== "import")
|
|
throw null;
|
|
}), !1;
|
|
} catch {
|
|
return !0;
|
|
}
|
|
}, "usesFunctionContextOrYieldAwait"), O = [];
|
|
for (let Ce of l) {
|
|
if (!WK(Ce))
|
|
continue;
|
|
let ge = Ce.node;
|
|
if (!ge.static && F.types.isPrivateName(ge.key) && O.push(ge.key.id.name), Cp(ge)) {
|
|
switch (ge.type) {
|
|
case "ClassProperty":
|
|
a.ClassProperty(Ce, t);
|
|
break;
|
|
case "ClassPrivateProperty":
|
|
a.ClassPrivateProperty(Ce, t);
|
|
break;
|
|
case "ClassAccessorProperty":
|
|
if (a.ClassAccessorProperty(Ce, t), o === "2023-11")
|
|
break;
|
|
default:
|
|
ge.static ? D ?? (D = Li(p, "initStatic")) : b ?? (b = Li(p, "initProto"));
|
|
break;
|
|
}
|
|
f = !0, h || (h = ge.decorators.some(C));
|
|
} else if (ge.type === "ClassAccessorProperty") {
|
|
a.ClassAccessorProperty(Ce, t);
|
|
let {
|
|
key: ze,
|
|
value: Ft,
|
|
static: Ht,
|
|
computed: J
|
|
} = ge, se = d(), le = NK(se, Ft, Ht), pe = Ce.get("key"), [Pe] = Ce.replaceWith(le), Ae, We;
|
|
J && !pe.isConstantExpression() ? (Ae = (0, ib.memoiseComputedKey)(V2(t, ze), p, p.generateUid("computedKey")), We = F.types.cloneNode(
|
|
Ae.left)) : (Ae = F.types.cloneNode(ze), We = F.types.cloneNode(ze)), L2(e, n), MK(e.node.id, Pe, Ae, We, se, J, Ht, o);
|
|
}
|
|
"computed" in Ce.node && Ce.node.computed && (m || (m = !p.isStatic(Ce.node.key)));
|
|
}
|
|
if (!c && !f) {
|
|
!e.node.id && typeof n == "string" && (e.node.id = F.types.identifier(n)), S && e.node.body.body.unshift(qK([zK(t, S)]));
|
|
return;
|
|
}
|
|
let k = [], U, j = /* @__PURE__ */ new Set(), K, R, ee = null;
|
|
function re(Ce) {
|
|
let ge = !1, ze = !1, Ft = [];
|
|
for (let Ht of Ce) {
|
|
let {
|
|
expression: J
|
|
} = Ht, se;
|
|
(o === "2023-11" || o === "2023-05") && F.types.isMemberExpression(J) && (F.types.isSuper(J.object) ? se = F.types.thisExpression() :
|
|
p.isStatic(J.object) ? se = F.types.cloneNode(J.object) : (ee ?? (ee = Li(p, "obj")), se = F.types.assignmentExpression("=", F.types.
|
|
cloneNode(ee), J.object), J.object = F.types.cloneNode(ee))), Ft.push(se), ge || (ge = !p.isStatic(J)), ze || (ze = C(Ht));
|
|
}
|
|
return {
|
|
hasSideEffects: ge,
|
|
usesFnContext: ze,
|
|
decoratorsThis: Ft
|
|
};
|
|
}
|
|
s(re, "handleDecorators");
|
|
let te = m || h || o !== "2023-11", Z = !1, ie = 0, ae = [], Y, he = [];
|
|
if (c) {
|
|
K = Li(p, "initClass"), Z = e.isClassDeclaration(), {
|
|
id: R,
|
|
path: e
|
|
} = BHe(e, n), e.node.decorators = null;
|
|
let Ce = c.some(eKe), {
|
|
hasSideEffects: ge,
|
|
usesFnContext: ze,
|
|
decoratorsThis: Ft
|
|
} = re(c), {
|
|
haveThis: Ht,
|
|
decs: J
|
|
} = UK(c, Ft, o);
|
|
if (ie = Ht ? 1 : 0, ae = J, (ze || ge && te || Ce) && (Y = g(F.types.arrayExpression(ae), "classDecs", y)), !f)
|
|
for (let se of e.get("body.body")) {
|
|
let {
|
|
node: le
|
|
} = se;
|
|
if ("computed" in le && le.computed)
|
|
if (se.isClassProperty({
|
|
static: !0
|
|
})) {
|
|
if (!se.get("key").isConstantExpression()) {
|
|
let Pe = le.key, Ae = (0, ib.memoiseComputedKey)(Pe, p, p.generateUid("computedKey"));
|
|
Ae != null && (le.key = F.types.cloneNode(Ae.left), he.push(Ae));
|
|
}
|
|
} else he.length > 0 && (Tp(he, se), he = []);
|
|
}
|
|
} else
|
|
L2(e, n), R = F.types.cloneNode(e.node.id);
|
|
let ye, Be = !1, de = [], be = [];
|
|
if (f) {
|
|
if (b) {
|
|
let Ce = F.types.callExpression(F.types.cloneNode(b), [F.types.thisExpression()]);
|
|
de.push(Ce);
|
|
}
|
|
for (let Ce of l) {
|
|
if (!WK(Ce)) {
|
|
be.length > 0 && Ce.isStaticBlock() && (RHe(be, Ce), be = []);
|
|
continue;
|
|
}
|
|
let {
|
|
node: ge
|
|
} = Ce, ze = ge.decorators, Ft = !!(ze != null && ze.length), Ht = "computed" in ge && ge.computed, J = "computedKey";
|
|
ge.key.type === "PrivateName" ? J = ge.key.id.name : !Ht && ge.key.type === "Identifier" && (J = ge.key.name);
|
|
let se, le;
|
|
if (Ft) {
|
|
let {
|
|
hasSideEffects: $e,
|
|
usesFnContext: Je,
|
|
decoratorsThis: Bt
|
|
} = re(ze), {
|
|
decs: dt,
|
|
haveThis: pt
|
|
} = UK(ze, Bt, o);
|
|
le = pt, se = dt.length === 1 ? dt[0] : F.types.arrayExpression(dt), (Je || $e && te) && (se = g(se, J + "Decs", he));
|
|
}
|
|
if (Ht && !Ce.get("key").isConstantExpression()) {
|
|
let $e = ge.key, Je = (0, ib.memoiseComputedKey)(Ft ? V2(t, $e) : $e, p, p.generateUid("computedKey"));
|
|
Je != null && (c && Ce.isClassProperty({
|
|
static: !0
|
|
}) ? (ge.key = F.types.cloneNode(Je.left), he.push(Je)) : ge.key = Je);
|
|
}
|
|
let {
|
|
key: pe,
|
|
static: Pe
|
|
} = ge, Ae = pe.type === "PrivateName", We = HHe(Ce);
|
|
Ae && !Pe && (Ft && (Be = !0), (F.types.isClassPrivateProperty(ge) || !ye) && (ye = pe)), Ce.isClassMethod({
|
|
kind: "constructor"
|
|
}) && (U = Ce);
|
|
let ot;
|
|
if (Ft) {
|
|
let $e, Je;
|
|
if (Ht ? Je = NHe(Ce.get("key")) : pe.type === "PrivateName" ? Je = F.types.stringLiteral(pe.id.name) : pe.type === "Identifier" ?
|
|
Je = F.types.stringLiteral(pe.name) : Je = F.types.cloneNode(pe), We === ao) {
|
|
let {
|
|
value: Bt
|
|
} = Ce.node, dt = o === "2023-11" && Pe ? [] : [F.types.thisExpression()];
|
|
Bt && dt.push(F.types.cloneNode(Bt));
|
|
let pt = d(), br = Li(p, `init_${J}`), Ei = F.types.callExpression(F.types.cloneNode(br), dt), mn = NK(pt, Ei, Pe), [yn] = Ce.replaceWith(
|
|
mn);
|
|
if (Ae) {
|
|
$e = RK(pt, o);
|
|
let gn = Li(p, `get_${J}`), ha = Li(p, `set_${J}`);
|
|
JHe(o, yn, pe, gn, ha, Pe), ot = [br, gn, ha];
|
|
} else
|
|
L2(e, n), MK(e.node.id, yn, F.types.cloneNode(pe), F.types.isAssignmentExpression(pe) ? F.types.cloneNode(pe.left) : F.types.cloneNode(
|
|
pe), pt, Ht, Pe, o), ot = [br];
|
|
} else if (We === vu) {
|
|
let Bt = Li(p, `init_${J}`), dt = Ce.get("value"), pt = o === "2023-11" && Pe ? [] : [F.types.thisExpression()];
|
|
dt.node && pt.push(dt.node), dt.replaceWith(F.types.callExpression(F.types.cloneNode(Bt), pt)), ot = [Bt], Ae && ($e = RK(pe, o));
|
|
} else if (Ae) {
|
|
let Bt = Li(p, `call_${J}`);
|
|
if (ot = [Bt], new BK.default({
|
|
constantSuper: r,
|
|
methodPath: Ce,
|
|
objectRef: R,
|
|
superRef: e.node.superClass,
|
|
file: t.file,
|
|
refToPreserve: R
|
|
}).replace(), $e = [$K(Ce.node)], We === KK || We === nb)
|
|
XHe(Ce, F.types.cloneNode(pe), F.types.cloneNode(Bt), Pe);
|
|
else {
|
|
let pt = Ce.node;
|
|
e.node.body.body.unshift(F.types.classPrivateProperty(pe, F.types.cloneNode(Bt), [], pt.static)), j.add(pe.id.name), Ce.remove();
|
|
}
|
|
}
|
|
k.push({
|
|
kind: We,
|
|
decoratorsArray: se,
|
|
decoratorsHaveThis: le,
|
|
name: Je,
|
|
isStatic: Pe,
|
|
privateMethods: $e,
|
|
locals: ot
|
|
}), Ce.node && (Ce.node.decorators = null);
|
|
}
|
|
if (Ht && he.length > 0 && (c && Ce.isClassProperty({
|
|
static: !0
|
|
}) || (Tp(he, We === ao ? Ce.getNextSibling() : Ce), he = [])), de.length > 0 && !Pe && (We === vu || We === ao) && (q2(de, Ce), de =
|
|
[]), be.length > 0 && Pe && (We === vu || We === ao) && (q2(be, Ce), be = []), Ft && o === "2023-11" && (We === vu || We === ao)) {
|
|
let $e = Li(p, `init_extra_${J}`);
|
|
ot.push($e);
|
|
let Je = F.types.callExpression(F.types.cloneNode($e), Pe ? [] : [F.types.thisExpression()]);
|
|
Pe ? be.push(Je) : de.push(Je);
|
|
}
|
|
}
|
|
}
|
|
if (he.length > 0) {
|
|
let Ce = e.get("body.body"), ge;
|
|
for (let ze = Ce.length - 1; ze >= 0; ze--) {
|
|
let Ft = Ce[ze], Ht = Ft.node;
|
|
if (Ht.computed) {
|
|
if (c && F.types.isClassProperty(Ht, {
|
|
static: !0
|
|
}))
|
|
continue;
|
|
ge = Ft;
|
|
break;
|
|
}
|
|
}
|
|
ge != null && (MHe(he, ge), he = []);
|
|
}
|
|
if (de.length > 0) {
|
|
let Ce = !!e.node.superClass;
|
|
U ? Ce ? qHe(de, U, b) : jHe(de, U) : e.node.body.body.unshift(LK(de, Ce)), de = [];
|
|
}
|
|
be.length > 0 && (e.node.body.body.push(qK(be)), be = []);
|
|
let Me = KHe(k), gt = zHe(o === "2023-11" ? k : Me, o), Dt = GHe(Me);
|
|
b && Dt.push(b), D && Dt.push(D);
|
|
let $t = [], vr = !1, Ir = K && F.types.callExpression(F.types.cloneNode(K), []), Er = e, Vt = e.node, qr = [];
|
|
if (c) {
|
|
$t.push(R, K);
|
|
let Ce = [];
|
|
if (e.get("body.body").forEach((ge) => {
|
|
if (ge.isStaticBlock()) {
|
|
if (W2(ge, O)) {
|
|
let ze = g(ZHe(ge.node), "staticBlock", qr);
|
|
be.push(F.types.callExpression(F.types.memberExpression(ze, F.types.identifier("call")), [F.types.thisExpression()]));
|
|
} else
|
|
be.push(YHe(ge.node));
|
|
ge.remove();
|
|
return;
|
|
}
|
|
if ((ge.isClassProperty() || ge.isClassPrivateProperty()) && ge.node.static) {
|
|
let ze = ge.get("value");
|
|
if (W2(ze, O)) {
|
|
let Ft = g(QHe(ze.node), "fieldValue", qr);
|
|
ze.replaceWith(F.types.callExpression(F.types.memberExpression(Ft, F.types.identifier("call")), [F.types.thisExpression()]));
|
|
}
|
|
be.length > 0 && (q2(be, ge), be = []), ge.node.static = !1, Ce.push(ge.node), ge.remove();
|
|
} else if (ge.isClassPrivateMethod({
|
|
static: !0
|
|
})) {
|
|
if (W2(ge, O)) {
|
|
new BK.default({
|
|
constantSuper: r,
|
|
methodPath: ge,
|
|
objectRef: R,
|
|
superRef: e.node.superClass,
|
|
file: t.file,
|
|
refToPreserve: R
|
|
}).replace();
|
|
let Ft = g($K(ge.node), ge.get("key.id").node.name, qr);
|
|
i ? (ge.node.params = [F.types.restElement(F.types.identifier("arg"))], ge.node.body = F.types.blockStatement([F.types.returnStatement(
|
|
F.types.callExpression(F.types.memberExpression(Ft, F.types.identifier("apply")), [F.types.thisExpression(), F.types.identifier(
|
|
"arg")]))])) : (ge.node.params = ge.node.params.map((Ht, J) => F.types.isRestElement(Ht) ? F.types.restElement(F.types.identifier(
|
|
"arg")) : F.types.identifier("_" + J)), ge.node.body = F.types.blockStatement([F.types.returnStatement(F.types.callExpression(F.
|
|
types.memberExpression(Ft, F.types.identifier("apply")), [F.types.thisExpression(), F.types.identifier("arguments")]))]));
|
|
}
|
|
ge.node.static = !1, Ce.push(ge.node), ge.remove();
|
|
}
|
|
}), Ce.length > 0 || be.length > 0) {
|
|
let ge = F.template.expression.ast`
|
|
class extends ${t.addHelper("identity")} {}
|
|
`;
|
|
ge.body.body = [F.types.classProperty(F.types.toExpression(Vt), void 0, void 0, void 0, !0, !0), ...Ce];
|
|
let ze = [], Ft = F.types.newExpression(ge, []);
|
|
be.length > 0 && ze.push(...be), Ir && (vr = !0, ze.push(Ir)), ze.length > 0 ? (ze.unshift(F.types.callExpression(F.types.super(), [
|
|
F.types.cloneNode(R)])), ge.body.body.push(LK(ze, !1))) : Ft.arguments.push(F.types.cloneNode(R));
|
|
let [Ht] = e.replaceWith(Ft);
|
|
Er = Ht.get("callee").get("body").get("body.0.key");
|
|
}
|
|
}
|
|
!vr && Ir && e.node.body.body.push(F.types.staticBlock([F.types.expressionStatement(Ir)]));
|
|
let {
|
|
superClass: ci
|
|
} = Vt;
|
|
if (ci && (o === "2023-11" || o === "2023-05")) {
|
|
let Ce = e.scope.maybeGenerateMemoised(ci);
|
|
Ce && (Vt.superClass = F.types.assignmentExpression("=", Ce, ci), ci = Ce);
|
|
}
|
|
let pa = F.types.staticBlock([]);
|
|
Vt.body.body.unshift(pa);
|
|
let $i = pa.body;
|
|
if (he.length > 0) {
|
|
let Ce = Er.get("body.body"), ge;
|
|
for (let ze of Ce)
|
|
if ((ze.isClassProperty() || ze.isClassMethod()) && ze.node.kind !== "constructor") {
|
|
ge = ze;
|
|
break;
|
|
}
|
|
ge != null ? (tKe(ge), Tp(he, ge)) : (Vt.body.body.unshift(F.types.classProperty(F.types.sequenceExpression([...he, F.types.stringLiteral(
|
|
"_")]), void 0, void 0, void 0, !0, !0)), $i.push(F.types.expressionStatement(F.types.unaryExpression("delete", F.types.memberExpression(
|
|
F.types.thisExpression(), F.types.identifier("_")))))), he = [];
|
|
}
|
|
if ($i.push(F.types.expressionStatement(nKe(Dt, $t, gt, Y ?? F.types.arrayExpression(ae), F.types.numericLiteral(ie), Be ? ye : null, S,
|
|
F.types.cloneNode(ci), t, o))), D && $i.push(F.types.expressionStatement(F.types.callExpression(F.types.cloneNode(D), [F.types.thisExpression()]))),
|
|
qr.length > 0 && $i.push(...qr.map((Ce) => F.types.expressionStatement(Ce))), e.insertBefore(y.map((Ce) => F.types.expressionStatement(Ce))),
|
|
Z)
|
|
if (!p.getBinding(R.name).constantViolations.length)
|
|
e.insertBefore(F.types.variableDeclaration("let", [F.types.variableDeclarator(F.types.cloneNode(R))]));
|
|
else {
|
|
let ge = p.generateUidIdentifier("t" + R.name), ze = R;
|
|
e.replaceWithMultiple([F.types.variableDeclaration("let", [F.types.variableDeclarator(F.types.cloneNode(ze)), F.types.variableDeclarator(
|
|
ge)]), F.types.blockStatement([F.types.variableDeclaration("let", [F.types.variableDeclarator(F.types.cloneNode(R))]), e.node, F.types.
|
|
expressionStatement(F.types.assignmentExpression("=", F.types.cloneNode(ge), F.types.cloneNode(R)))]), F.types.expressionStatement(F.
|
|
types.assignmentExpression("=", F.types.cloneNode(ze), F.types.cloneNode(ge)))]);
|
|
}
|
|
return j.size > 0 && rKe(e, j), e.scope.crawl(), e;
|
|
}
|
|
s(iKe, "transformClass");
|
|
function nKe(e, t, r, i, n, a, o, u, l, c) {
|
|
let f, m, h = [o ? zK(l, o) : F.types.thisExpression(), i, r];
|
|
{
|
|
if (c !== "2023-11" && h.splice(1, 2, r, i), c === "2021-12" || c === "2022-03" && !l.availableHelper("applyDecs2203R"))
|
|
return f = F.types.arrayPattern([...e, ...t]), m = F.types.callExpression(l.addHelper(c === "2021-12" ? "applyDecs" : "applyDecs2203"),
|
|
h), F.types.assignmentExpression("=", f, m);
|
|
c === "2022-03" ? m = F.types.callExpression(l.addHelper("applyDecs2203R"), h) : c === "2023-01" ? (a && h.push(U2(a)), m = F.types.callExpression(
|
|
l.addHelper("applyDecs2301"), h)) : c === "2023-05" && ((a || u || n.value !== 0) && h.push(n), a ? h.push(U2(a)) : u && h.push(F.types.
|
|
unaryExpression("void", F.types.numericLiteral(0))), u && h.push(u), m = F.types.callExpression(l.addHelper("applyDecs2305"), h));
|
|
}
|
|
return c === "2023-11" && ((a || u || n.value !== 0) && h.push(n), a ? h.push(U2(a)) : u && h.push(F.types.unaryExpression("void", F.types.
|
|
numericLiteral(0))), u && h.push(u), m = F.types.callExpression(l.addHelper("applyDecs2311"), h)), e.length > 0 ? t.length > 0 ? f = F.types.
|
|
objectPattern([F.types.objectProperty(F.types.identifier("e"), F.types.arrayPattern(e)), F.types.objectProperty(F.types.identifier("c"),
|
|
F.types.arrayPattern(t))]) : (f = F.types.arrayPattern(e), m = F.types.memberExpression(m, F.types.identifier("e"), !1, !1)) : (f = F.types.
|
|
arrayPattern(t), m = F.types.memberExpression(m, F.types.identifier("c"), !1, !1)), F.types.assignmentExpression("=", f, m);
|
|
}
|
|
s(nKe, "createLocalsAssignment");
|
|
function sKe(e) {
|
|
return e.type === "Identifier" ? e.name === "__proto__" : e.value === "__proto__";
|
|
}
|
|
s(sKe, "isProtoKey");
|
|
function Cp(e) {
|
|
return e.decorators && e.decorators.length > 0;
|
|
}
|
|
s(Cp, "isDecorated");
|
|
function aKe(e) {
|
|
switch (e.type) {
|
|
case "ClassAccessorProperty":
|
|
return !0;
|
|
case "ClassMethod":
|
|
case "ClassProperty":
|
|
case "ClassPrivateMethod":
|
|
case "ClassPrivateProperty":
|
|
return Cp(e);
|
|
default:
|
|
return !1;
|
|
}
|
|
}
|
|
s(aKe, "shouldTransformElement");
|
|
function oKe(e) {
|
|
return Cp(e) || e.body.body.some(aKe);
|
|
}
|
|
s(oKe, "shouldTransformClass");
|
|
function uKe(e, t) {
|
|
function r(i, n, a) {
|
|
switch (n.type) {
|
|
case "StringLiteral":
|
|
return F.types.stringLiteral(n.value);
|
|
case "NumericLiteral":
|
|
case "BigIntLiteral": {
|
|
let o = n.value + "";
|
|
return i.get("key").replaceWith(F.types.stringLiteral(o)), F.types.stringLiteral(o);
|
|
}
|
|
default: {
|
|
let o = i.scope.maybeGenerateMemoised(n);
|
|
return i.get("key").replaceWith(F.types.assignmentExpression("=", o, V2(a, n))), F.types.cloneNode(o);
|
|
}
|
|
}
|
|
}
|
|
return s(r, "handleComputedProperty"), {
|
|
VariableDeclarator(i, n) {
|
|
let a = i.node.id;
|
|
if (a.type === "Identifier") {
|
|
let o = (0, so.skipTransparentExprWrappers)(i.get("init"));
|
|
if (e(o)) {
|
|
let u = a.name;
|
|
t(o, n, u);
|
|
}
|
|
}
|
|
},
|
|
AssignmentExpression(i, n) {
|
|
let a = i.node.left;
|
|
if (a.type === "Identifier") {
|
|
let o = (0, so.skipTransparentExprWrappers)(i.get("right"));
|
|
if (e(o))
|
|
switch (i.node.operator) {
|
|
case "=":
|
|
case "&&=":
|
|
case "||=":
|
|
case "??=":
|
|
t(o, n, a.name);
|
|
}
|
|
}
|
|
},
|
|
AssignmentPattern(i, n) {
|
|
let a = i.node.left;
|
|
if (a.type === "Identifier") {
|
|
let o = (0, so.skipTransparentExprWrappers)(i.get("right"));
|
|
if (e(o)) {
|
|
let u = a.name;
|
|
t(o, n, u);
|
|
}
|
|
}
|
|
},
|
|
ObjectExpression(i, n) {
|
|
for (let a of i.get("properties")) {
|
|
if (!a.isObjectProperty()) continue;
|
|
let {
|
|
node: o
|
|
} = a, u = o.key, l = (0, so.skipTransparentExprWrappers)(a.get("value"));
|
|
if (e(l)) {
|
|
if (o.computed) {
|
|
let c = r(a, u, n);
|
|
t(l, n, c);
|
|
} else if (!sKe(u))
|
|
if (u.type === "Identifier")
|
|
t(l, n, u.name);
|
|
else {
|
|
let c = F.types.stringLiteral(u.value + "");
|
|
t(l, n, c);
|
|
}
|
|
}
|
|
}
|
|
},
|
|
ClassPrivateProperty(i, n) {
|
|
let {
|
|
node: a
|
|
} = i, o = (0, so.skipTransparentExprWrappers)(i.get("value"));
|
|
if (e(o)) {
|
|
let u = F.types.stringLiteral("#" + a.key.id.name);
|
|
t(o, n, u);
|
|
}
|
|
},
|
|
ClassAccessorProperty(i, n) {
|
|
let {
|
|
node: a
|
|
} = i, o = a.key, u = (0, so.skipTransparentExprWrappers)(i.get("value"));
|
|
if (e(u))
|
|
if (a.computed) {
|
|
let l = r(i, o, n);
|
|
t(u, n, l);
|
|
} else if (o.type === "Identifier")
|
|
t(u, n, o.name);
|
|
else if (o.type === "PrivateName") {
|
|
let l = F.types.stringLiteral("#" + o.id.name);
|
|
t(u, n, l);
|
|
} else {
|
|
let l = F.types.stringLiteral(o.value + "");
|
|
t(u, n, l);
|
|
}
|
|
},
|
|
ClassProperty(i, n) {
|
|
let {
|
|
node: a
|
|
} = i, o = a.key, u = (0, so.skipTransparentExprWrappers)(i.get("value"));
|
|
if (e(u))
|
|
if (a.computed) {
|
|
let l = r(i, o, n);
|
|
t(u, n, l);
|
|
} else if (o.type === "Identifier")
|
|
t(u, n, o.name);
|
|
else {
|
|
let l = F.types.stringLiteral(o.value + "");
|
|
t(u, n, l);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
s(uKe, "NamedEvaluationVisitoryFactory");
|
|
function lKe(e) {
|
|
return e.isClassExpression({
|
|
id: null
|
|
}) && oKe(e.node);
|
|
}
|
|
s(lKe, "isDecoratedAnonymousClassExpression");
|
|
function Li(e, t) {
|
|
let r = e.generateUidIdentifier(t);
|
|
return e.push({
|
|
id: r,
|
|
kind: "let"
|
|
}), F.types.cloneNode(r);
|
|
}
|
|
s(Li, "generateLetUidIdentifier");
|
|
function cKe({
|
|
assertVersion: e,
|
|
assumption: t
|
|
}, {
|
|
loose: r
|
|
}, i, n) {
|
|
var a, o;
|
|
e(i === "2023-11" || i === "2023-05" || i === "2023-01" ? "^7.21.0" : i === "2021-12" ? "^7.16.0" : "^7.19.0");
|
|
let u = /* @__PURE__ */ new WeakSet(), l = (a = t("constantSuper")) != null ? a : r, c = (o = t("ignoreFunctionLength")) != null ? o : r,
|
|
f = uKe(lKe, m);
|
|
function m(h, d, y) {
|
|
var p;
|
|
if (u.has(h)) return;
|
|
let {
|
|
node: g
|
|
} = h;
|
|
y ?? (y = (p = g.id) == null ? void 0 : p.name);
|
|
let b = iKe(h, d, l, c, y, f, i);
|
|
if (b) {
|
|
u.add(b);
|
|
return;
|
|
}
|
|
u.add(h);
|
|
}
|
|
return s(m, "visitClass"), {
|
|
name: "proposal-decorators",
|
|
inherits: n,
|
|
visitor: Object.assign({
|
|
ExportDefaultDeclaration(h, d) {
|
|
let {
|
|
declaration: y
|
|
} = h.node;
|
|
if (y?.type === "ClassDeclaration" && Cp(y)) {
|
|
let g = !y.id;
|
|
{
|
|
var p;
|
|
(p = h.splitExportDeclaration) != null || (h.splitExportDeclaration = Ar().NodePath.prototype.splitExportDeclaration);
|
|
}
|
|
let b = h.splitExportDeclaration();
|
|
g && m(b, d, F.types.stringLiteral("default"));
|
|
}
|
|
},
|
|
ExportNamedDeclaration(h) {
|
|
let {
|
|
declaration: d
|
|
} = h.node;
|
|
if (d?.type === "ClassDeclaration" && Cp(d)) {
|
|
{
|
|
var y;
|
|
(y = h.splitExportDeclaration) != null || (h.splitExportDeclaration = Ar().NodePath.prototype.splitExportDeclaration);
|
|
}
|
|
h.splitExportDeclaration();
|
|
}
|
|
},
|
|
Class(h, d) {
|
|
m(h, d, void 0);
|
|
}
|
|
}, f)
|
|
};
|
|
}
|
|
s(cKe, "_default");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-create-class-features-plugin/lib/decorators-2018-09.js
|
|
var JK = E((z2) => {
|
|
"use strict";
|
|
Object.defineProperty(z2, "__esModule", {
|
|
value: !0
|
|
});
|
|
z2.buildDecoratedClass = yKe;
|
|
var Mt = hr(), fKe = Zg();
|
|
function vc(e, t) {
|
|
return t ? Mt.types.objectProperty(Mt.types.identifier(e), t) : null;
|
|
}
|
|
s(vc, "prop");
|
|
function dKe(e, t) {
|
|
return Mt.types.objectMethod("method", Mt.types.identifier(e), [], Mt.types.blockStatement(t));
|
|
}
|
|
s(dKe, "method");
|
|
function GK(e) {
|
|
let t;
|
|
return e.decorators && e.decorators.length > 0 && (t = Mt.types.arrayExpression(e.decorators.map((r) => r.expression))), e.decorators = void 0,
|
|
t;
|
|
}
|
|
s(GK, "takeDecorators");
|
|
function pKe(e) {
|
|
return e.computed ? e.key : Mt.types.isIdentifier(e.key) ? Mt.types.stringLiteral(e.key.name) : Mt.types.stringLiteral(String(e.key.value));
|
|
}
|
|
s(pKe, "getKey");
|
|
function hKe(e, t, r, i) {
|
|
let n = i.isClassMethod();
|
|
if (i.isPrivate())
|
|
throw i.buildCodeFrameError(`Private ${n ? "methods" : "fields"} in decorated classes are not supported yet.`);
|
|
if (i.node.type === "ClassAccessorProperty")
|
|
throw i.buildCodeFrameError('Accessor properties are not supported in 2018-09 decorator transform, please specify { "version": "2021-1\
|
|
2" } instead.');
|
|
if (i.node.type === "StaticBlock")
|
|
throw i.buildCodeFrameError('Static blocks are not supported in 2018-09 decorator transform, please specify { "version": "2021-12" } i\
|
|
nstead.');
|
|
let {
|
|
node: a,
|
|
scope: o
|
|
} = i;
|
|
i.isTSDeclareMethod() || new fKe.default({
|
|
methodPath: i,
|
|
objectRef: t,
|
|
superRef: r,
|
|
file: e,
|
|
refToPreserve: t
|
|
}).replace();
|
|
let u = [vc("kind", Mt.types.stringLiteral(Mt.types.isClassMethod(a) ? a.kind : "field")), vc("decorators", GK(a)), vc("static", a.static &&
|
|
Mt.types.booleanLiteral(!0)), vc("key", pKe(a))].filter(Boolean);
|
|
if (n) {
|
|
{
|
|
var l;
|
|
(l = i.ensureFunctionName) != null || (i.ensureFunctionName = Ar().NodePath.prototype.ensureFunctionName);
|
|
}
|
|
i.ensureFunctionName(!1), u.push(vc("value", Mt.types.toExpression(i.node)));
|
|
} else Mt.types.isClassProperty(a) && a.value ? u.push(dKe("value", Mt.template.statements.ast`return ${a.value}`)) : u.push(vc("value",
|
|
o.buildUndefinedNode()));
|
|
return i.remove(), Mt.types.objectExpression(u);
|
|
}
|
|
s(hKe, "extractElementDescriptor");
|
|
function mKe(e) {
|
|
return e.addHelper("decorate");
|
|
}
|
|
s(mKe, "addDecorateHelper");
|
|
function yKe(e, t, r, i) {
|
|
let {
|
|
node: n,
|
|
scope: a
|
|
} = t, o = a.generateUidIdentifier("initialize"), u = n.id && t.isDeclaration(), l = t.isInStrictMode(), {
|
|
superClass: c
|
|
} = n;
|
|
n.type = "ClassDeclaration", n.id || (n.id = Mt.types.cloneNode(e));
|
|
let f;
|
|
c && (f = a.generateUidIdentifierBasedOnNode(n.superClass, "super"), n.superClass = f);
|
|
let m = GK(n), h = Mt.types.arrayExpression(r.filter((g) => !g.node.abstract && g.node.type !== "TSIndexSignature").map((g) => hKe(i, n.
|
|
id, f, g))), d = Mt.template.expression.ast`
|
|
${mKe(i)}(
|
|
${m || Mt.types.nullLiteral()},
|
|
function (${o}, ${c ? Mt.types.cloneNode(f) : null}) {
|
|
${n}
|
|
return { F: ${Mt.types.cloneNode(n.id)}, d: ${h} };
|
|
},
|
|
${c}
|
|
)
|
|
`;
|
|
l || d.arguments[1].body.directives.push(Mt.types.directive(Mt.types.directiveLiteral("use strict")));
|
|
let y = d, p = "arguments.1.body.body.0";
|
|
return u && (y = Mt.template.statement.ast`let ${e} = ${d}`, p = "declarations.0.init." + p), {
|
|
instanceNodes: [Mt.template.statement.ast`
|
|
${Mt.types.cloneNode(o)}(this)
|
|
`],
|
|
wrapClass(g) {
|
|
return g.replaceWith(y), g.get(p);
|
|
}
|
|
};
|
|
}
|
|
s(yKe, "buildDecoratedClass");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-create-class-features-plugin/lib/features.js
|
|
var QK = E((Eu) => {
|
|
"use strict";
|
|
Object.defineProperty(Eu, "__esModule", {
|
|
value: !0
|
|
});
|
|
Eu.FEATURES = void 0;
|
|
Eu.enableFeature = gKe;
|
|
Eu.isLoose = X2;
|
|
Eu.shouldTransform = bKe;
|
|
var XK = K2(), sa = Eu.FEATURES = Object.freeze({
|
|
fields: 2,
|
|
privateMethods: 4,
|
|
decorators: 8,
|
|
privateIn: 16,
|
|
staticBlocks: 32
|
|
}), YK = /* @__PURE__ */ new Map([[sa.fields, "@babel/plugin-transform-class-properties"], [sa.privateMethods, "@babel/plugin-transform-pr\
|
|
ivate-methods"], [sa.privateIn, "@babel/plugin-transform-private-property-in-object"]]), G2 = "@babel/plugin-class-features/featuresKey", Ap = "\
|
|
@babel/plugin-class-features/looseKey";
|
|
uo = "@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing";
|
|
var uo;
|
|
J2 = /* @__PURE__ */ s(function(e, t) {
|
|
return !!(e.get(uo) & t);
|
|
}, "canIgnoreLoose");
|
|
var J2;
|
|
function gKe(e, t, r) {
|
|
(!aa(e, t) || J2(e, t)) && (e.set(G2, e.get(G2) | t), r === "#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-\
|
|
an-error" ? (sb(e, t, !0), e.set(uo, e.get(uo) | t)) : r === "#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-\
|
|
error" ? (sb(e, t, !1), e.set(uo, e.get(uo) | t)) : sb(e, t, r));
|
|
let i;
|
|
for (let [a, o] of YK) {
|
|
if (!aa(e, a) || J2(e, a)) continue;
|
|
let u = X2(e, a);
|
|
if (i === !u)
|
|
throw new Error(`'loose' mode configuration must be the same for @babel/plugin-transform-class-properties, @babel/plugin-transform-p\
|
|
rivate-methods and @babel/plugin-transform-private-property-in-object (when they are enabled).
|
|
|
|
` + ZK(e));
|
|
i = u;
|
|
var n = o;
|
|
}
|
|
if (i !== void 0)
|
|
for (let [a, o] of YK)
|
|
aa(e, a) && X2(e, a) !== i && (sb(e, a, i), console.warn(`Though the "loose" option was set to "${!i}" in your @babel/preset-env con\
|
|
fig, it will not be used for ${o} since the "loose" mode option was set to "${i}" for ${n}.
|
|
The "loose" option must be the same for @babel/plugin-transform-class-properties, @babel/plugin-transform-private-methods and @babel/plugin-\
|
|
transform-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
|
|
["${o}", { "loose": ${i} }]
|
|
to the "plugins" section of your Babel config.
|
|
|
|
` + ZK(e)));
|
|
}
|
|
s(gKe, "enableFeature");
|
|
function ZK(e) {
|
|
let {
|
|
filename: t
|
|
} = e.opts;
|
|
return (!t || t === "unknown") && (t = "[name of the input file]"), `If you already set the same 'loose' mode for these plugins in your \
|
|
config, it's possible that they are enabled multiple times with different options.
|
|
You can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded configuration:
|
|
npx cross-env BABEL_SHOW_CONFIG_FOR=${t} <your build command>
|
|
See https://babeljs.io/docs/configuration#print-effective-configs for more info.`;
|
|
}
|
|
s(ZK, "getBabelShowConfigForHint");
|
|
function aa(e, t) {
|
|
return !!(e.get(G2) & t);
|
|
}
|
|
s(aa, "hasFeature");
|
|
function X2(e, t) {
|
|
return !!(e.get(Ap) & t);
|
|
}
|
|
s(X2, "isLoose");
|
|
function sb(e, t, r) {
|
|
r ? e.set(Ap, e.get(Ap) | t) : e.set(Ap, e.get(Ap) & ~t), e.set(uo, e.get(uo) & ~t);
|
|
}
|
|
s(sb, "setLoose");
|
|
function bKe(e, t) {
|
|
let r = null, i = null, n = null, a = null, o = null;
|
|
(0, XK.hasOwnDecorators)(e.node) && (r = e.get("decorators.0"));
|
|
for (let u of e.get("body.body"))
|
|
!r && (0, XK.hasOwnDecorators)(u.node) && (r = u.get("decorators.0")), !i && u.isClassProperty() && (i = u), !n && u.isClassPrivateProperty() &&
|
|
(n = u), !a && u.isClassPrivateMethod != null && u.isClassPrivateMethod() && (a = u), !o && u.isStaticBlock != null && u.isStaticBlock() &&
|
|
(o = u);
|
|
if (r && n)
|
|
throw n.buildCodeFrameError("Private fields in decorated classes are not supported yet.");
|
|
if (r && a)
|
|
throw a.buildCodeFrameError("Private methods in decorated classes are not supported yet.");
|
|
if (r && !aa(t, sa.decorators))
|
|
throw e.buildCodeFrameError(`Decorators are not enabled.
|
|
If you are using ["@babel/plugin-proposal-decorators", { "version": "legacy" }], make sure it comes *before* "@babel/plugin-transform-class-\
|
|
properties" and enable loose mode, like so:
|
|
["@babel/plugin-proposal-decorators", { "version": "legacy" }]
|
|
["@babel/plugin-transform-class-properties", { "loose": true }]`);
|
|
if (a && !aa(t, sa.privateMethods))
|
|
throw a.buildCodeFrameError("Class private methods are not enabled. Please add `@babel/plugin-transform-private-methods` to your confi\
|
|
guration.");
|
|
if ((i || n) && !aa(t, sa.fields) && !aa(t, sa.privateMethods))
|
|
throw e.buildCodeFrameError("Class fields are not enabled. Please add `@babel/plugin-transform-class-properties` to your configuration\
|
|
.");
|
|
if (o && !aa(t, sa.staticBlocks))
|
|
throw e.buildCodeFrameError("Static class blocks are not enabled. Please add `@babel/plugin-transform-class-static-block` to your conf\
|
|
iguration.");
|
|
return !!(r || a || o || (i || n) && aa(t, sa.fields));
|
|
}
|
|
s(bKe, "shouldTransform");
|
|
});
|
|
|
|
// ../node_modules/@babel/helper-create-class-features-plugin/lib/index.js
|
|
var ez = E((Su) => {
|
|
"use strict";
|
|
Object.defineProperty(Su, "__esModule", {
|
|
value: !0
|
|
});
|
|
Object.defineProperty(Su, "FEATURES", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Ec.FEATURES;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Su, "buildCheckInRHS", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return _p.buildCheckInRHS;
|
|
}, "get")
|
|
});
|
|
Su.createClassFeaturePlugin = xKe;
|
|
Object.defineProperty(Su, "enableFeature", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Ec.enableFeature;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Su, "injectInitialization", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Q2.injectInitialization;
|
|
}, "get")
|
|
});
|
|
var Y2 = hr(), DKe = V("semver"), _p = R2(), Z2 = K2(), vKe = JK(), Q2 = j2(), Ec = QK(), EKe = O2(), xu = "@babel/plugin-class-features/v\
|
|
ersion";
|
|
function xKe({
|
|
name: e,
|
|
feature: t,
|
|
loose: r,
|
|
manipulateOptions: i,
|
|
api: n,
|
|
inherits: a,
|
|
decoratorVersion: o
|
|
}) {
|
|
var u;
|
|
if (t & Ec.FEATURES.decorators && (o === "2023-11" || o === "2023-05" || o === "2023-01" || o === "2022-03" || o === "2021-12"))
|
|
return (0, Z2.default)(n, {
|
|
loose: r
|
|
}, o, a);
|
|
n ?? (n = {
|
|
assumption: /* @__PURE__ */ s(() => {
|
|
}, "assumption")
|
|
});
|
|
let l = n.assumption("setPublicClassFields"), c = n.assumption("privateFieldsAsSymbols"), f = n.assumption("privateFieldsAsProperties"),
|
|
m = (u = n.assumption("noUninitializedPrivateFieldAccess")) != null ? u : !1, h = n.assumption("constantSuper"), d = n.assumption("noDoc\
|
|
umentAll");
|
|
if (f && c)
|
|
throw new Error('Cannot enable both the "privateFieldsAsProperties" and "privateFieldsAsSymbols" assumptions as the same time.');
|
|
let y = f || c;
|
|
if (r === !0) {
|
|
let p = [];
|
|
l !== void 0 && p.push('"setPublicClassFields"'), f !== void 0 && p.push('"privateFieldsAsProperties"'), c !== void 0 && p.push('"priv\
|
|
ateFieldsAsSymbols"'), p.length !== 0 && console.warn(`[${e}]: You are using the "loose: true" option and you are explicitly setting a value\
|
|
for the ${p.join(" and ")} assumption${p.length > 1 ? "s" : ""}. The "loose" option can cause incompatibilities with the other class featur\
|
|
es plugins, so it's recommended that you replace it with the following top-level option:
|
|
"assumptions": {
|
|
"setPublicClassFields": true,
|
|
"privateFieldsAsSymbols": true
|
|
}`);
|
|
}
|
|
return {
|
|
name: e,
|
|
manipulateOptions: i,
|
|
inherits: a,
|
|
pre(p) {
|
|
if ((0, Ec.enableFeature)(p, t, r), typeof p.get(xu) == "number") {
|
|
p.set(xu, "7.27.0");
|
|
return;
|
|
}
|
|
(!p.get(xu) || DKe.lt(p.get(xu), "7.27.0")) && p.set(xu, "7.27.0");
|
|
},
|
|
visitor: {
|
|
Class(p, {
|
|
file: g
|
|
}) {
|
|
if (g.get(xu) !== "7.27.0" || !(0, Ec.shouldTransform)(p, g)) return;
|
|
let b = p.isClassDeclaration();
|
|
b && (0, EKe.assertFieldTransformed)(p);
|
|
let D = (0, Ec.isLoose)(g, t), v, S = (0, Z2.hasDecorators)(p.node), C = [], O = [], k = [], U = /* @__PURE__ */ new Set(), j = p.
|
|
get("body");
|
|
for (let Me of j.get("body")) {
|
|
if ((Me.isClassProperty() || Me.isClassMethod()) && Me.node.computed && k.push(Me), Me.isPrivate()) {
|
|
let {
|
|
name: gt
|
|
} = Me.node.key.id, Dt = `get ${gt}`, $t = `set ${gt}`;
|
|
if (Me.isClassPrivateMethod()) {
|
|
if (Me.node.kind === "get") {
|
|
if (U.has(Dt) || U.has(gt) && !U.has($t))
|
|
throw Me.buildCodeFrameError("Duplicate private field");
|
|
U.add(Dt).add(gt);
|
|
} else if (Me.node.kind === "set") {
|
|
if (U.has($t) || U.has(gt) && !U.has(Dt))
|
|
throw Me.buildCodeFrameError("Duplicate private field");
|
|
U.add($t).add(gt);
|
|
}
|
|
} else {
|
|
if (U.has(gt) && !U.has(Dt) && !U.has($t) || U.has(gt) && (U.has(Dt) || U.has($t)))
|
|
throw Me.buildCodeFrameError("Duplicate private field");
|
|
U.add(gt);
|
|
}
|
|
}
|
|
Me.isClassMethod({
|
|
kind: "constructor"
|
|
}) ? v = Me : (O.push(Me), (Me.isProperty() || Me.isPrivate() || Me.isStaticBlock != null && Me.isStaticBlock()) && C.push(Me));
|
|
}
|
|
if (!C.length && !S) return;
|
|
let K = p.node.id, R;
|
|
if (!K || !b) {
|
|
{
|
|
var ee;
|
|
(ee = p.ensureFunctionName) != null || (p.ensureFunctionName = Ar().NodePath.prototype.ensureFunctionName);
|
|
}
|
|
p.ensureFunctionName(!1), R = p.scope.generateUidIdentifier(K?.name || "Class");
|
|
}
|
|
let re = R ?? Y2.types.cloneNode(K), te = (0, _p.buildPrivateNamesMap)(re.name, y ?? D, C, g), Z = (0, _p.buildPrivateNamesNodes)(
|
|
te, f ?? D, c ?? !1, g);
|
|
(0, _p.transformPrivateNamesUsage)(re, p, te, {
|
|
privateFieldsAsProperties: y ?? D,
|
|
noUninitializedPrivateFieldAccess: m,
|
|
noDocumentAll: d,
|
|
innerBinding: K
|
|
}, g);
|
|
let ie, ae, Y, he, ye, Be, de;
|
|
S ? (ae = ye = ie = [], {
|
|
instanceNodes: Y,
|
|
wrapClass: de
|
|
} = (0, vKe.buildDecoratedClass)(re, p, O, g)) : (ie = (0, Q2.extractComputedKeys)(p, k, g), {
|
|
staticNodes: ae,
|
|
pureStaticNodes: ye,
|
|
instanceNodes: Y,
|
|
lastInstanceNodeReturnsThis: he,
|
|
classBindingNode: Be,
|
|
wrapClass: de
|
|
} = (0, _p.buildFieldsInitNodes)(R, p.node.superClass, C, te, g, l ?? D, y ?? D, m, h ?? D, K)), Y.length > 0 && (0, Q2.injectInitialization)(
|
|
p, v, Y, (Me, gt) => {
|
|
if (!S)
|
|
for (let Dt of C)
|
|
Y2.types.isStaticBlock != null && Y2.types.isStaticBlock(Dt.node) || Dt.node.static || Dt.traverse(Me, gt);
|
|
}, he);
|
|
let be = de(p);
|
|
be.insertBefore([...Z, ...ie]), ae.length > 0 && be.insertAfter(ae), ye.length > 0 && be.find((Me) => Me.isStatement() || Me.isDeclaration()).
|
|
insertAfter(ye), Be != null && b && be.insertAfter(Be);
|
|
},
|
|
ExportDefaultDeclaration(p, {
|
|
file: g
|
|
}) {
|
|
{
|
|
if (g.get(xu) !== "7.27.0") return;
|
|
let D = p.get("declaration");
|
|
if (D.isClassDeclaration() && (0, Z2.hasDecorators)(D.node))
|
|
if (D.node.id) {
|
|
{
|
|
var b;
|
|
(b = p.splitExportDeclaration) != null || (p.splitExportDeclaration = Ar().NodePath.prototype.splitExportDeclaration);
|
|
}
|
|
p.splitExportDeclaration();
|
|
} else
|
|
D.node.type = "ClassExpression";
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|
|
s(xKe, "createClassFeaturePlugin");
|
|
});
|
|
|
|
// ../node_modules/@babel/plugin-transform-typescript/lib/enum.js
|
|
var tP = E((Pp) => {
|
|
"use strict";
|
|
Object.defineProperty(Pp, "__esModule", {
|
|
value: !0
|
|
});
|
|
Pp.default = AKe;
|
|
Pp.isSyntacticallyString = ab;
|
|
Pp.translateEnumValues = rz;
|
|
var xc = hr(), SKe = V("assert"), TKe = P2(), CKe = Qg(), eP = /* @__PURE__ */ new WeakMap(), wKe = xc.template.expression(`
|
|
(function (ID) {
|
|
ASSIGNMENTS;
|
|
return ID;
|
|
})(INIT)
|
|
`);
|
|
function AKe(e, t) {
|
|
let {
|
|
node: r,
|
|
parentPath: i
|
|
} = e;
|
|
if (r.declare) {
|
|
e.remove();
|
|
return;
|
|
}
|
|
let n = r.id.name, {
|
|
fill: a,
|
|
data: o,
|
|
isPure: u
|
|
} = IKe(e, t, r.id);
|
|
switch (i.type) {
|
|
case "BlockStatement":
|
|
case "ExportNamedDeclaration":
|
|
case "Program": {
|
|
let c = t.isProgram(e.parent), f = l(i), m = t.objectExpression([]);
|
|
(f || c) && (m = t.logicalExpression("||", t.cloneNode(a.ID), m));
|
|
let h = wKe(Object.assign({}, a, {
|
|
INIT: m
|
|
}));
|
|
u && (0, TKe.default)(h), f ? (i.isExportDeclaration() ? i : e).replaceWith(t.expressionStatement(t.assignmentExpression("=", t.cloneNode(
|
|
r.id), h))) : e.scope.registerDeclaration(e.replaceWith(t.variableDeclaration(c ? "var" : "let", [t.variableDeclarator(r.id, h)]))[0]),
|
|
eP.set(e.scope.getBindingIdentifier(n), o);
|
|
break;
|
|
}
|
|
default:
|
|
throw new Error(`Unexpected enum parent '${e.parent.type}`);
|
|
}
|
|
function l(c) {
|
|
return c.isExportDeclaration() ? l(c.parentPath) : c.getData(n) ? !0 : (c.setData(n, !0), !1);
|
|
}
|
|
s(l, "seen");
|
|
}
|
|
s(AKe, "transpileEnum");
|
|
var _Ke = xc.template.statement(`
|
|
ENUM["NAME"] = VALUE;
|
|
`), PKe = xc.template.statement(`
|
|
ENUM[ENUM["NAME"] = VALUE] = "NAME";
|
|
`), FKe = /* @__PURE__ */ s((e, t) => (e ? _Ke : PKe)(t), "buildEnumMember");
|
|
function IKe(e, t, r) {
|
|
let {
|
|
enumValues: i,
|
|
data: n,
|
|
isPure: a
|
|
} = rz(e, t), o = e.get("members"), u = [];
|
|
for (let l = 0; l < o.length; l++) {
|
|
let [c, f] = i[l];
|
|
u.push(t.inheritsComments(FKe(ab(f), {
|
|
ENUM: t.cloneNode(r),
|
|
NAME: c,
|
|
VALUE: f
|
|
}), o[l].node));
|
|
}
|
|
return {
|
|
fill: {
|
|
ID: t.cloneNode(r),
|
|
ASSIGNMENTS: u
|
|
},
|
|
data: n,
|
|
isPure: a
|
|
};
|
|
}
|
|
s(IKe, "enumFill");
|
|
function ab(e) {
|
|
switch (e = (0, CKe.skipTransparentExprWrapperNodes)(e), e.type) {
|
|
case "BinaryExpression": {
|
|
let t = e.left, r = e.right;
|
|
return e.operator === "+" && (ab(t) || ab(r));
|
|
}
|
|
case "TemplateLiteral":
|
|
case "StringLiteral":
|
|
return !0;
|
|
}
|
|
return !1;
|
|
}
|
|
s(ab, "isSyntacticallyString");
|
|
function tz(e, t) {
|
|
let {
|
|
seen: r,
|
|
path: i,
|
|
t: n
|
|
} = t, a = e.node.name;
|
|
if (r.has(a)) {
|
|
for (let o = e.scope; o !== i.scope; o = o.parent)
|
|
if (o.hasOwnBinding(a))
|
|
return;
|
|
e.replaceWith(n.memberExpression(n.cloneNode(i.node.id), n.cloneNode(e.node))), e.skip();
|
|
}
|
|
}
|
|
s(tz, "ReferencedIdentifier");
|
|
var OKe = {
|
|
ReferencedIdentifier: tz
|
|
};
|
|
function rz(e, t) {
|
|
var r;
|
|
let i = e.scope.getBindingIdentifier(e.node.id.name), n = (r = eP.get(i)) != null ? r : /* @__PURE__ */ new Map(), a = -1, o, u = !0, c = e.
|
|
get("members").map((f) => {
|
|
let m = f.node, h = t.isIdentifier(m.id) ? m.id.name : m.id.value, d = f.get("initializer"), y = m.initializer, p;
|
|
if (y)
|
|
a = iz(d, n), a !== void 0 ? (n.set(h, a), SKe(typeof a == "number" || typeof a == "string"), a === 1 / 0 || Number.isNaN(a) ? p = t.
|
|
identifier(String(a)) : a === -1 / 0 ? p = t.unaryExpression("-", t.identifier("Infinity")) : p = t.valueToNode(a)) : (u && (u = d.isPure()),
|
|
d.isReferencedIdentifier() ? tz(d, {
|
|
t,
|
|
seen: n,
|
|
path: e
|
|
}) : d.traverse(OKe, {
|
|
t,
|
|
seen: n,
|
|
path: e
|
|
}), p = d.node, n.set(h, void 0));
|
|
else if (typeof a == "number")
|
|
a += 1, p = t.numericLiteral(a), n.set(h, a);
|
|
else {
|
|
if (typeof a == "string")
|
|
throw e.buildCodeFrameError("Enum member must have initializer.");
|
|
{
|
|
let g = t.memberExpression(t.cloneNode(e.node.id), t.stringLiteral(o), !0);
|
|
p = t.binaryExpression("+", t.numericLiteral(1), g), n.set(h, void 0);
|
|
}
|
|
}
|
|
return o = h, [h, p];
|
|
});
|
|
return {
|
|
isPure: u,
|
|
data: n,
|
|
enumValues: c
|
|
};
|
|
}
|
|
s(rz, "translateEnumValues");
|
|
function iz(e, t, r = /* @__PURE__ */ new Set()) {
|
|
return i(e);
|
|
function i(u) {
|
|
let l = u.node;
|
|
switch (l.type) {
|
|
case "MemberExpression":
|
|
return n(u, t, r);
|
|
case "StringLiteral":
|
|
return l.value;
|
|
case "UnaryExpression":
|
|
return a(u);
|
|
case "BinaryExpression":
|
|
return o(u);
|
|
case "NumericLiteral":
|
|
return l.value;
|
|
case "ParenthesizedExpression":
|
|
return i(u.get("expression"));
|
|
case "Identifier":
|
|
return n(u, t, r);
|
|
case "TemplateLiteral": {
|
|
if (l.quasis.length === 1)
|
|
return l.quasis[0].value.cooked;
|
|
let c = u.get("expressions"), f = l.quasis, m = "";
|
|
for (let h = 0; h < f.length; h++)
|
|
if (m += f[h].value.cooked, h + 1 < f.length) {
|
|
let d = n(c[h], t, r);
|
|
if (d === void 0) return;
|
|
m += d;
|
|
}
|
|
return m;
|
|
}
|
|
default:
|
|
return;
|
|
}
|
|
}
|
|
function n(u, l, c) {
|
|
if (u.isMemberExpression()) {
|
|
let f = u.node, m = f.object, h = f.property;
|
|
if (!xc.types.isIdentifier(m) || (f.computed ? !xc.types.isStringLiteral(h) : !xc.types.isIdentifier(h)))
|
|
return;
|
|
let d = u.scope.getBindingIdentifier(m.name), y = eP.get(d);
|
|
return y ? y.get(h.computed ? h.value : h.name) : void 0;
|
|
} else if (u.isIdentifier()) {
|
|
let f = u.node.name;
|
|
if (["Infinity", "NaN"].includes(f))
|
|
return Number(f);
|
|
let m = l?.get(f);
|
|
return m !== void 0 ? m : l != null && l.has(f) || c.has(u.node) ? void 0 : (c.add(u.node), m = iz(u.resolve(), l, c), m);
|
|
}
|
|
}
|
|
function a(u) {
|
|
let l = i(u.get("argument"));
|
|
if (l !== void 0)
|
|
switch (u.node.operator) {
|
|
case "+":
|
|
return l;
|
|
case "-":
|
|
return -l;
|
|
case "~":
|
|
return ~l;
|
|
default:
|
|
return;
|
|
}
|
|
}
|
|
function o(u) {
|
|
let l = i(u.get("left"));
|
|
if (l === void 0)
|
|
return;
|
|
let c = i(u.get("right"));
|
|
if (c !== void 0)
|
|
switch (u.node.operator) {
|
|
case "|":
|
|
return l | c;
|
|
case "&":
|
|
return l & c;
|
|
case ">>":
|
|
return l >> c;
|
|
case ">>>":
|
|
return l >>> c;
|
|
case "<<":
|
|
return l << c;
|
|
case "^":
|
|
return l ^ c;
|
|
case "*":
|
|
return l * c;
|
|
case "/":
|
|
return l / c;
|
|
case "+":
|
|
return l + c;
|
|
case "-":
|
|
return l - c;
|
|
case "%":
|
|
return l % c;
|
|
case "**":
|
|
return Math.pow(l, c);
|
|
default:
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
s(iz, "computeConstantValue");
|
|
});
|
|
|
|
// ../node_modules/@babel/plugin-transform-typescript/lib/const-enum.js
|
|
var rP = E((Fp) => {
|
|
"use strict";
|
|
Object.defineProperty(Fp, "__esModule", {
|
|
value: !0
|
|
});
|
|
Fp.EXPORTED_CONST_ENUMS_IN_NAMESPACE = void 0;
|
|
Fp.default = NKe;
|
|
var kKe = tP(), BKe = Fp.EXPORTED_CONST_ENUMS_IN_NAMESPACE = /* @__PURE__ */ new WeakSet();
|
|
function NKe(e, t) {
|
|
let {
|
|
name: r
|
|
} = e.node.id, i = e.parentPath.isExportNamedDeclaration(), n = i;
|
|
!n && t.isProgram(e.parent) && (n = e.parent.body.some((u) => t.isExportNamedDeclaration(u) && u.exportKind !== "type" && !u.source && u.
|
|
specifiers.some((l) => t.isExportSpecifier(l) && l.exportKind !== "type" && l.local.name === r)));
|
|
let {
|
|
enumValues: a
|
|
} = (0, kKe.translateEnumValues)(e, t);
|
|
if (n || BKe.has(e.node)) {
|
|
let u = t.objectExpression(a.map(([l, c]) => t.objectProperty(t.isValidIdentifier(l) ? t.identifier(l) : t.stringLiteral(l), c)));
|
|
e.scope.hasOwnBinding(r) ? (i ? e.parentPath : e).replaceWith(t.expressionStatement(t.callExpression(t.memberExpression(t.identifier("\
|
|
Object"), t.identifier("assign")), [e.node.id, u]))) : (e.replaceWith(t.variableDeclaration("var", [t.variableDeclarator(e.node.id, u)])), e.
|
|
scope.registerDeclaration(e));
|
|
return;
|
|
}
|
|
let o = new Map(a);
|
|
e.scope.path.traverse({
|
|
Scope(u) {
|
|
u.scope.hasOwnBinding(r) && u.skip();
|
|
},
|
|
MemberExpression(u) {
|
|
if (!t.isIdentifier(u.node.object, {
|
|
name: r
|
|
})) return;
|
|
let l;
|
|
if (u.node.computed)
|
|
if (t.isStringLiteral(u.node.property))
|
|
l = u.node.property.value;
|
|
else
|
|
return;
|
|
else if (t.isIdentifier(u.node.property))
|
|
l = u.node.property.name;
|
|
else
|
|
return;
|
|
o.has(l) && u.replaceWith(t.cloneNode(o.get(l)));
|
|
}
|
|
}), e.remove();
|
|
}
|
|
s(NKe, "transpileConstEnum");
|
|
});
|
|
|
|
// ../node_modules/@babel/plugin-transform-typescript/lib/global-types.js
|
|
var iP = E((Sc) => {
|
|
"use strict";
|
|
Object.defineProperty(Sc, "__esModule", {
|
|
value: !0
|
|
});
|
|
Sc.GLOBAL_TYPES = void 0;
|
|
Sc.isGlobalType = MKe;
|
|
Sc.registerGlobalType = RKe;
|
|
var nz = Sc.GLOBAL_TYPES = /* @__PURE__ */ new WeakMap();
|
|
function MKe({
|
|
scope: e
|
|
}, t) {
|
|
return e.hasBinding(t) ? !1 : nz.get(e).has(t) ? !0 : (console.warn(`The exported identifier "${t}" is not declared in Babel's scope tra\
|
|
cker
|
|
as a JavaScript value binding, and "@babel/plugin-transform-typescript"
|
|
never encountered it as a TypeScript type declaration.
|
|
It will be treated as a JavaScript value.
|
|
|
|
This problem is likely caused by another plugin injecting
|
|
"${t}" without registering it in the scope tracker. If you are the author
|
|
of that plugin, please use "scope.registerDeclaration(declarationPath)".`), !1);
|
|
}
|
|
s(MKe, "isGlobalType");
|
|
function RKe(e, t) {
|
|
nz.get(e).add(t);
|
|
}
|
|
s(RKe, "registerGlobalType");
|
|
});
|
|
|
|
// ../node_modules/@babel/plugin-transform-typescript/lib/namespace.js
|
|
var az = E((ob) => {
|
|
"use strict";
|
|
Object.defineProperty(ob, "__esModule", {
|
|
value: !0
|
|
});
|
|
ob.default = qKe;
|
|
ob.getFirstIdentifier = oP;
|
|
var Ct = hr(), jKe = iP(), LKe = rP();
|
|
function oP(e) {
|
|
return Ct.types.isIdentifier(e) ? e : oP(e.left);
|
|
}
|
|
s(oP, "getFirstIdentifier");
|
|
function qKe(e, t) {
|
|
if (e.node.declare || e.node.id.type === "StringLiteral") {
|
|
e.remove();
|
|
return;
|
|
}
|
|
if (!t)
|
|
throw e.get("id").buildCodeFrameError("Namespace not marked type-only declare. Non-declarative namespaces are only supported experimen\
|
|
tally in Babel. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript");
|
|
let r = oP(e.node.id).name, i = aP(e, e.node);
|
|
if (i === null) {
|
|
let n = e.findParent((a) => a.isProgram());
|
|
(0, jKe.registerGlobalType)(n.scope, r), e.remove();
|
|
} else e.scope.hasOwnBinding(r) ? e.replaceWith(i) : e.scope.registerDeclaration(e.replaceWithMultiple([nP(r), i])[0]);
|
|
}
|
|
s(qKe, "transpileNamespace");
|
|
function nP(e) {
|
|
return Ct.types.variableDeclaration("let", [Ct.types.variableDeclarator(Ct.types.identifier(e))]);
|
|
}
|
|
s(nP, "getDeclaration");
|
|
function sP(e, t) {
|
|
return Ct.types.memberExpression(Ct.types.identifier(e), Ct.types.identifier(t));
|
|
}
|
|
s(sP, "getMemberExpression");
|
|
function UKe(e, t, r) {
|
|
if (e.kind !== "const")
|
|
throw r.file.buildCodeFrameError(e, "Namespaces exporting non-const are not supported by Babel. Change to const or see: https://babelj\
|
|
s.io/docs/en/babel-plugin-transform-typescript");
|
|
let {
|
|
declarations: i
|
|
} = e;
|
|
if (i.every((o) => Ct.types.isIdentifier(o.id))) {
|
|
for (let o of i)
|
|
o.init = Ct.types.assignmentExpression("=", sP(t, o.id.name), o.init);
|
|
return [e];
|
|
}
|
|
let n = Ct.types.getBindingIdentifiers(e), a = [];
|
|
for (let o in n)
|
|
a.push(Ct.types.assignmentExpression("=", sP(t, o), Ct.types.cloneNode(n[o])));
|
|
return [e, Ct.types.expressionStatement(Ct.types.sequenceExpression(a))];
|
|
}
|
|
s(UKe, "handleVariableDeclaration");
|
|
function sz(e, t) {
|
|
return e.hub.buildError(t, "Ambient modules cannot be nested in other modules or namespaces.", Error);
|
|
}
|
|
s(sz, "buildNestedAmbientModuleError");
|
|
function aP(e, t, r) {
|
|
let i = /* @__PURE__ */ new Set(), n = t.id, a = e.scope.generateUid(n.name), o = t.body, u = t.id, l;
|
|
l = Ct.types.isTSModuleBlock(o) ? o.body : [Ct.types.exportNamedDeclaration(o)];
|
|
let c = !0;
|
|
for (let m = 0; m < l.length; m++) {
|
|
let h = l[m];
|
|
switch (h.type) {
|
|
case "TSModuleDeclaration": {
|
|
if (!Ct.types.isIdentifier(h.id))
|
|
throw sz(e, h);
|
|
let d = aP(e, h);
|
|
if (d !== null) {
|
|
c = !1;
|
|
let y = h.id.name;
|
|
i.has(y) ? l[m] = d : (i.add(y), l.splice(m++, 1, nP(y), d));
|
|
}
|
|
continue;
|
|
}
|
|
case "TSEnumDeclaration":
|
|
case "FunctionDeclaration":
|
|
case "ClassDeclaration":
|
|
c = !1, i.add(h.id.name);
|
|
continue;
|
|
case "VariableDeclaration": {
|
|
c = !1;
|
|
for (let d in Ct.types.getBindingIdentifiers(h))
|
|
i.add(d);
|
|
continue;
|
|
}
|
|
default:
|
|
c && (c = Ct.types.isTypeScript(h));
|
|
continue;
|
|
case "ExportNamedDeclaration":
|
|
}
|
|
if (!("declare" in h.declaration && h.declaration.declare))
|
|
switch (h.declaration.type) {
|
|
case "TSEnumDeclaration":
|
|
LKe.EXPORTED_CONST_ENUMS_IN_NAMESPACE.add(h.declaration);
|
|
case "FunctionDeclaration":
|
|
case "ClassDeclaration": {
|
|
c = !1;
|
|
let d = h.declaration.id.name;
|
|
i.add(d), l.splice(m++, 1, h.declaration, Ct.types.expressionStatement(Ct.types.assignmentExpression("=", sP(a, d), Ct.types.identifier(
|
|
d))));
|
|
break;
|
|
}
|
|
case "VariableDeclaration": {
|
|
c = !1;
|
|
let d = UKe(h.declaration, a, e.hub);
|
|
l.splice(m, d.length, ...d), m += d.length - 1;
|
|
break;
|
|
}
|
|
case "TSModuleDeclaration": {
|
|
if (!Ct.types.isIdentifier(h.declaration.id))
|
|
throw sz(e, h.declaration);
|
|
let d = aP(e, h.declaration, Ct.types.identifier(a));
|
|
if (d !== null) {
|
|
c = !1;
|
|
let y = h.declaration.id.name;
|
|
i.has(y) ? l[m] = d : (i.add(y), l.splice(m++, 1, nP(y), d));
|
|
} else
|
|
l.splice(m, 1), m--;
|
|
}
|
|
}
|
|
}
|
|
if (c) return null;
|
|
let f = Ct.types.objectExpression([]);
|
|
if (r) {
|
|
let m = Ct.types.memberExpression(r, n);
|
|
f = Ct.template.expression.ast`
|
|
${Ct.types.cloneNode(m)} ||
|
|
(${Ct.types.cloneNode(m)} = ${f})
|
|
`;
|
|
}
|
|
return Ct.template.statement.ast`
|
|
(function (${Ct.types.identifier(a)}) {
|
|
${l}
|
|
})(${n} || (${Ct.types.cloneNode(n)} = ${f}));
|
|
`;
|
|
}
|
|
s(aP, "handleNested");
|
|
});
|
|
|
|
// ../node_modules/@babel/plugin-transform-typescript/lib/index.js
|
|
var cz = E((lb) => {
|
|
"use strict";
|
|
Object.defineProperty(lb, "__esModule", {
|
|
value: !0
|
|
});
|
|
lb.default = void 0;
|
|
var WKe = yc(), $Ke = lK(), VKe = ez(), HKe = rP(), KKe = tP(), oa = iP(), oz = az();
|
|
function zKe(e) {
|
|
switch (e.parent.type) {
|
|
case "TSTypeReference":
|
|
case "TSExpressionWithTypeArguments":
|
|
case "TSExpressionWithTypeArguments":
|
|
case "TSTypeQuery":
|
|
return !0;
|
|
case "TSQualifiedName":
|
|
return e.parentPath.findParent((t) => t.type !== "TSQualifiedName").type !== "TSImportEqualsDeclaration";
|
|
case "ExportSpecifier":
|
|
return e.parent.exportKind === "type" || e.parentPath.parent.exportKind === "type";
|
|
default:
|
|
return !1;
|
|
}
|
|
}
|
|
s(zKe, "isInType");
|
|
var cn = /* @__PURE__ */ new WeakMap(), uz = /* @__PURE__ */ new WeakSet();
|
|
function ub(e) {
|
|
let t = e.getBindingIdentifiers();
|
|
for (let r of Object.keys(t)) {
|
|
let i = e.scope.getBinding(r);
|
|
i && i.identifier === t[r] && i.scope.removeBinding(r);
|
|
}
|
|
e.opts.noScope = !0, e.remove(), e.opts.noScope = !1;
|
|
}
|
|
s(ub, "safeRemove");
|
|
function lz(e, t, r, i, n = "") {
|
|
if (t.file.get("@babel/plugin-transform-modules-*") !== "commonjs")
|
|
throw e.buildCodeFrameError(`\`${r}\` is only supported when compiling modules to CommonJS.
|
|
Please consider using \`${i}\`${n}, or add @babel/plugin-transform-modules-commonjs to your Babel config.`);
|
|
}
|
|
s(lz, "assertCjsTransformEnabled");
|
|
var _0t = lb.default = (0, WKe.declare)((e, t) => {
|
|
let {
|
|
types: r,
|
|
template: i
|
|
} = e;
|
|
e.assertVersion(7);
|
|
let n = /\*?\s*@jsx((?:Frag)?)\s+(\S+)/, {
|
|
allowNamespaces: a = !0,
|
|
jsxPragma: o = "React.createElement",
|
|
jsxPragmaFrag: u = "React.Fragment",
|
|
onlyRemoveTypeImports: l = !1,
|
|
optimizeConstEnums: c = !1
|
|
} = t;
|
|
var {
|
|
allowDeclareFields: f = !1
|
|
} = t;
|
|
let m = {
|
|
field(p) {
|
|
let {
|
|
node: g
|
|
} = p;
|
|
if (!f && g.declare)
|
|
throw p.buildCodeFrameError("The 'declare' modifier is only allowed when the 'allowDeclareFields' option of @babel/plugin-transfor\
|
|
m-typescript or @babel/preset-typescript is enabled.");
|
|
if (g.declare) {
|
|
if (g.value)
|
|
throw p.buildCodeFrameError("Fields with the 'declare' modifier cannot be initialized here, but only in the constructor");
|
|
g.decorators || p.remove();
|
|
} else if (g.definite) {
|
|
if (g.value)
|
|
throw p.buildCodeFrameError("Definitely assigned fields cannot be initialized here, but only in the constructor");
|
|
!f && !g.decorators && !r.isClassPrivateProperty(g) && p.remove();
|
|
} else (g.abstract || !f && !g.value && !g.decorators && !r.isClassPrivateProperty(g)) && p.remove();
|
|
g.accessibility && (g.accessibility = null), g.abstract && (g.abstract = null), g.readonly && (g.readonly = null), g.optional && (g.
|
|
optional = null), g.typeAnnotation && (g.typeAnnotation = null), g.definite && (g.definite = null), g.declare && (g.declare = null),
|
|
g.override && (g.override = null);
|
|
},
|
|
method({
|
|
node: p
|
|
}) {
|
|
p.accessibility && (p.accessibility = null), p.abstract && (p.abstract = null), p.optional && (p.optional = null), p.override && (p.
|
|
override = null);
|
|
},
|
|
constructor(p, g) {
|
|
p.node.accessibility && (p.node.accessibility = null);
|
|
let b = [], {
|
|
scope: D
|
|
} = p;
|
|
for (let v of p.get("params")) {
|
|
let S = v.node;
|
|
if (S.type === "TSParameterProperty") {
|
|
let C = S.parameter;
|
|
if (uz.has(C)) continue;
|
|
uz.add(C);
|
|
let O;
|
|
if (r.isIdentifier(C))
|
|
O = C;
|
|
else if (r.isAssignmentPattern(C) && r.isIdentifier(C.left))
|
|
O = C.left;
|
|
else
|
|
throw v.buildCodeFrameError("Parameter properties can not be destructuring patterns.");
|
|
b.push(i.statement.ast`
|
|
this.${r.cloneNode(O)} = ${r.cloneNode(O)}
|
|
`), v.replaceWith(v.get("parameter")), D.registerBinding("param", v);
|
|
}
|
|
}
|
|
(0, VKe.injectInitialization)(g, p, b);
|
|
}
|
|
};
|
|
return {
|
|
name: "transform-typescript",
|
|
inherits: $Ke.default,
|
|
visitor: {
|
|
Pattern: d,
|
|
Identifier: d,
|
|
RestElement: d,
|
|
Program: {
|
|
enter(p, g) {
|
|
let {
|
|
file: b
|
|
} = g, D = null, v = null, S = p.scope;
|
|
if (oa.GLOBAL_TYPES.has(S) || oa.GLOBAL_TYPES.set(S, /* @__PURE__ */ new Set()), b.ast.comments)
|
|
for (let k of b.ast.comments) {
|
|
let U = n.exec(k.value);
|
|
U && (U[1] ? v = U[2] : D = U[2]);
|
|
}
|
|
let C = D || o;
|
|
C && ([C] = C.split("."));
|
|
let O = v || u;
|
|
O && ([O] = O.split("."));
|
|
for (let k of p.get("body")) {
|
|
if (k.isImportDeclaration()) {
|
|
if (cn.has(g.file.ast.program) || cn.set(g.file.ast.program, !0), k.node.importKind === "type") {
|
|
for (let R of k.node.specifiers)
|
|
(0, oa.registerGlobalType)(S, R.local.name);
|
|
k.remove();
|
|
continue;
|
|
}
|
|
let U = /* @__PURE__ */ new Set(), j = k.node.specifiers.length, K = /* @__PURE__ */ s(() => j > 0 && j === U.size, "isAllSp\
|
|
ecifiersElided");
|
|
for (let R of k.node.specifiers)
|
|
if (R.type === "ImportSpecifier" && R.importKind === "type") {
|
|
(0, oa.registerGlobalType)(S, R.local.name);
|
|
let ee = k.scope.getBinding(R.local.name);
|
|
ee && U.add(ee.path);
|
|
}
|
|
if (l)
|
|
cn.set(p.node, !1);
|
|
else {
|
|
if (k.node.specifiers.length === 0) {
|
|
cn.set(p.node, !1);
|
|
continue;
|
|
}
|
|
for (let R of k.node.specifiers) {
|
|
let ee = k.scope.getBinding(R.local.name);
|
|
ee && !U.has(ee.path) && (y({
|
|
binding: ee,
|
|
programPath: p,
|
|
pragmaImportName: C,
|
|
pragmaFragImportName: O
|
|
}) ? U.add(ee.path) : cn.set(p.node, !1));
|
|
}
|
|
}
|
|
if (K() && !l)
|
|
k.remove();
|
|
else
|
|
for (let R of U)
|
|
R.remove();
|
|
continue;
|
|
}
|
|
if (!l && k.isTSImportEqualsDeclaration()) {
|
|
let {
|
|
id: U
|
|
} = k.node, j = k.scope.getBinding(U.name);
|
|
if (j && !k.node.isExport && y({
|
|
binding: j,
|
|
programPath: p,
|
|
pragmaImportName: C,
|
|
pragmaFragImportName: O
|
|
})) {
|
|
k.remove();
|
|
continue;
|
|
}
|
|
}
|
|
if (k.isExportDeclaration() && (k = k.get("declaration")), k.isVariableDeclaration({
|
|
declare: !0
|
|
}))
|
|
for (let U of Object.keys(k.getBindingIdentifiers()))
|
|
(0, oa.registerGlobalType)(S, U);
|
|
else (k.isTSTypeAliasDeclaration() || k.isTSDeclareFunction() && k.get("id").isIdentifier() || k.isTSInterfaceDeclaration() ||
|
|
k.isClassDeclaration({
|
|
declare: !0
|
|
}) || k.isTSEnumDeclaration({
|
|
declare: !0
|
|
}) || k.isTSModuleDeclaration({
|
|
declare: !0
|
|
}) && k.get("id").isIdentifier()) && (0, oa.registerGlobalType)(S, k.node.id.name);
|
|
}
|
|
},
|
|
exit(p) {
|
|
p.node.sourceType === "module" && cn.get(p.node) && p.pushContainer("body", r.exportNamedDeclaration());
|
|
}
|
|
},
|
|
ExportNamedDeclaration(p, g) {
|
|
if (cn.has(g.file.ast.program) || cn.set(g.file.ast.program, !0), p.node.exportKind === "type") {
|
|
p.remove();
|
|
return;
|
|
}
|
|
if (p.node.source && p.node.specifiers.length > 0 && p.node.specifiers.every((b) => b.type === "ExportSpecifier" && b.exportKind ===
|
|
"type")) {
|
|
p.remove();
|
|
return;
|
|
}
|
|
if (!p.node.source && p.node.specifiers.length > 0 && p.node.specifiers.every((b) => r.isExportSpecifier(b) && (0, oa.isGlobalType)(
|
|
p, b.local.name))) {
|
|
p.remove();
|
|
return;
|
|
}
|
|
if (r.isTSModuleDeclaration(p.node.declaration)) {
|
|
let b = p.node.declaration;
|
|
if (!r.isStringLiteral(b.id)) {
|
|
let D = (0, oz.getFirstIdentifier)(b.id);
|
|
if (p.scope.hasOwnBinding(D.name))
|
|
p.replaceWith(b);
|
|
else {
|
|
let [v] = p.replaceWithMultiple([r.exportNamedDeclaration(r.variableDeclaration("let", [r.variableDeclarator(r.cloneNode(D))])),
|
|
b]);
|
|
p.scope.registerDeclaration(v);
|
|
}
|
|
}
|
|
}
|
|
cn.set(g.file.ast.program, !1);
|
|
},
|
|
ExportAllDeclaration(p) {
|
|
p.node.exportKind === "type" && p.remove();
|
|
},
|
|
ExportSpecifier(p) {
|
|
(!p.parent.source && (0, oa.isGlobalType)(p, p.node.local.name) || p.node.exportKind === "type") && p.remove();
|
|
},
|
|
ExportDefaultDeclaration(p, g) {
|
|
if (cn.has(g.file.ast.program) || cn.set(g.file.ast.program, !0), r.isIdentifier(p.node.declaration) && (0, oa.isGlobalType)(p, p.
|
|
node.declaration.name)) {
|
|
p.remove();
|
|
return;
|
|
}
|
|
cn.set(g.file.ast.program, !1);
|
|
},
|
|
TSDeclareFunction(p) {
|
|
ub(p);
|
|
},
|
|
TSDeclareMethod(p) {
|
|
ub(p);
|
|
},
|
|
VariableDeclaration(p) {
|
|
p.node.declare && ub(p);
|
|
},
|
|
VariableDeclarator({
|
|
node: p
|
|
}) {
|
|
p.definite && (p.definite = null);
|
|
},
|
|
TSIndexSignature(p) {
|
|
p.remove();
|
|
},
|
|
ClassDeclaration(p) {
|
|
let {
|
|
node: g
|
|
} = p;
|
|
g.declare && ub(p);
|
|
},
|
|
Class(p) {
|
|
let {
|
|
node: g
|
|
} = p;
|
|
g.typeParameters && (g.typeParameters = null), g.superTypeParameters && (g.superTypeParameters = null), g.implements && (g.implements =
|
|
null), g.abstract && (g.abstract = null), p.get("body.body").forEach((b) => {
|
|
b.isClassMethod() || b.isClassPrivateMethod() ? b.node.kind === "constructor" ? m.constructor(b, p) : m.method(b) : (b.isClassProperty() ||
|
|
b.isClassPrivateProperty() || b.isClassAccessorProperty()) && m.field(b);
|
|
});
|
|
},
|
|
Function(p) {
|
|
let {
|
|
node: g
|
|
} = p;
|
|
g.typeParameters && (g.typeParameters = null), g.returnType && (g.returnType = null);
|
|
let b = g.params;
|
|
b.length > 0 && r.isIdentifier(b[0], {
|
|
name: "this"
|
|
}) && b.shift();
|
|
},
|
|
TSModuleDeclaration(p) {
|
|
(0, oz.default)(p, a);
|
|
},
|
|
TSInterfaceDeclaration(p) {
|
|
p.remove();
|
|
},
|
|
TSTypeAliasDeclaration(p) {
|
|
p.remove();
|
|
},
|
|
TSEnumDeclaration(p) {
|
|
c && p.node.const ? (0, HKe.default)(p, r) : (0, KKe.default)(p, r);
|
|
},
|
|
TSImportEqualsDeclaration(p, g) {
|
|
let {
|
|
id: b,
|
|
moduleReference: D
|
|
} = p.node, v, S;
|
|
r.isTSExternalModuleReference(D) ? (lz(p, g, `import ${b.name} = require(...);`, `import ${b.name} from '...';`, " alongside Types\
|
|
cript's --allowSyntheticDefaultImports option"), v = r.callExpression(r.identifier("require"), [D.expression]), S = "const") : (v = h(D), S =
|
|
"var");
|
|
let C = r.variableDeclaration(S, [r.variableDeclarator(b, v)]);
|
|
p.replaceWith(p.node.isExport ? r.exportNamedDeclaration(C) : C), p.scope.registerDeclaration(p);
|
|
},
|
|
TSExportAssignment(p, g) {
|
|
lz(p, g, "export = <value>;", "export default <value>;"), p.replaceWith(i.statement.ast`module.exports = ${p.node.expression}`);
|
|
},
|
|
TSTypeAssertion(p) {
|
|
p.replaceWith(p.node.expression);
|
|
},
|
|
[`TSAsExpression${r.tsSatisfiesExpression ? "|TSSatisfiesExpression" : ""}`](p) {
|
|
let {
|
|
node: g
|
|
} = p;
|
|
do
|
|
g = g.expression;
|
|
while (r.isTSAsExpression(g) || r.isTSSatisfiesExpression != null && r.isTSSatisfiesExpression(g));
|
|
p.replaceWith(g);
|
|
},
|
|
[e.types.tsInstantiationExpression ? "TSNonNullExpression|TSInstantiationExpression" : "TSNonNullExpression"](p) {
|
|
p.replaceWith(p.node.expression);
|
|
},
|
|
CallExpression(p) {
|
|
p.node.typeParameters = null;
|
|
},
|
|
OptionalCallExpression(p) {
|
|
p.node.typeParameters = null;
|
|
},
|
|
NewExpression(p) {
|
|
p.node.typeParameters = null;
|
|
},
|
|
JSXOpeningElement(p) {
|
|
p.node.typeParameters = null;
|
|
},
|
|
TaggedTemplateExpression(p) {
|
|
p.node.typeParameters = null;
|
|
}
|
|
}
|
|
};
|
|
function h(p) {
|
|
return r.isTSQualifiedName(p) ? r.memberExpression(h(p.left), p.right) : p;
|
|
}
|
|
function d({
|
|
node: p
|
|
}) {
|
|
p.typeAnnotation && (p.typeAnnotation = null), r.isIdentifier(p) && p.optional && (p.optional = null);
|
|
}
|
|
function y({
|
|
binding: p,
|
|
programPath: g,
|
|
pragmaImportName: b,
|
|
pragmaFragImportName: D
|
|
}) {
|
|
for (let S of p.referencePaths)
|
|
if (!zKe(S))
|
|
return !1;
|
|
if (p.identifier.name !== b && p.identifier.name !== D)
|
|
return !0;
|
|
let v = !1;
|
|
return g.traverse({
|
|
"JSXElement|JSXFragment"(S) {
|
|
v = !0, S.stop();
|
|
}
|
|
}), !v;
|
|
}
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/plugin-syntax-jsx/lib/index.js
|
|
var fz = E((cb) => {
|
|
"use strict";
|
|
Object.defineProperty(cb, "__esModule", {
|
|
value: !0
|
|
});
|
|
cb.default = void 0;
|
|
var GKe = yc(), I0t = cb.default = (0, GKe.declare)((e) => (e.assertVersion(7), {
|
|
name: "syntax-jsx",
|
|
manipulateOptions(t, r) {
|
|
r.plugins.some((i) => (Array.isArray(i) ? i[0] : i) === "typescript") || r.plugins.push("jsx");
|
|
}
|
|
}));
|
|
});
|
|
|
|
// ../node_modules/@babel/plugin-transform-modules-commonjs/lib/dynamic-import.js
|
|
var hz = E((uP) => {
|
|
"use strict";
|
|
Object.defineProperty(uP, "__esModule", {
|
|
value: !0
|
|
});
|
|
uP.transformDynamicImport = YKe;
|
|
var dz = hr(), JKe = Yd(), pz = /* @__PURE__ */ s((e) => dz.template.expression.ast`require(${e})`, "requireNoInterop"), XKe = /* @__PURE__ */ s(
|
|
(e, t) => dz.types.callExpression(t.addHelper("interopRequireWildcard"), [pz(e)]), "requireInterop");
|
|
function YKe(e, t, r) {
|
|
let i = t ? pz : XKe;
|
|
e.replaceWith((0, JKe.buildDynamicImport)(e.node, !0, !1, (n) => i(n, r)));
|
|
}
|
|
s(YKe, "transformDynamicImport");
|
|
});
|
|
|
|
// ../node_modules/@babel/plugin-transform-modules-commonjs/lib/lazy.js
|
|
var yz = E((fb) => {
|
|
"use strict";
|
|
Object.defineProperty(fb, "__esModule", {
|
|
value: !0
|
|
});
|
|
fb.lazyImportsHook = void 0;
|
|
var mz = hr(), ZKe = Yd(), QKe = /* @__PURE__ */ s((e) => ({
|
|
name: "@babel/plugin-transform-modules-commonjs/lazy",
|
|
version: "7.26.3",
|
|
getWrapperPayload(t, r) {
|
|
if ((0, ZKe.isSideEffectImport)(r) || r.reexportAll)
|
|
return null;
|
|
if (e === !0)
|
|
return t.includes(".") ? null : "lazy/function";
|
|
if (Array.isArray(e))
|
|
return e.includes(t) ? "lazy/function" : null;
|
|
if (typeof e == "function")
|
|
return e(t) ? "lazy/function" : null;
|
|
},
|
|
buildRequireWrapper(t, r, i, n) {
|
|
if (i === "lazy/function")
|
|
return n ? mz.template.statement.ast`
|
|
function ${t}() {
|
|
const data = ${r};
|
|
${t} = function(){ return data; };
|
|
return data;
|
|
}
|
|
` : !1;
|
|
},
|
|
wrapReference(t, r) {
|
|
if (r === "lazy/function") return mz.types.callExpression(t, []);
|
|
}
|
|
}), "lazyImportsHook");
|
|
fb.lazyImportsHook = QKe;
|
|
});
|
|
|
|
// ../node_modules/@babel/plugin-transform-modules-commonjs/lib/hooks.js
|
|
var gz = E((db) => {
|
|
"use strict";
|
|
Object.defineProperty(db, "__esModule", {
|
|
value: !0
|
|
});
|
|
db.defineCommonJSHook = eze;
|
|
db.makeInvokers = tze;
|
|
var cP = "@babel/plugin-transform-modules-commonjs/customWrapperPlugin";
|
|
function eze(e, t) {
|
|
let r = e.get(cP);
|
|
r || e.set(cP, r = []), r.push(t);
|
|
}
|
|
s(eze, "defineCommonJSHook");
|
|
function lP(e, t) {
|
|
if (e)
|
|
for (let r of e) {
|
|
let i = t(r);
|
|
if (i != null) return i;
|
|
}
|
|
}
|
|
s(lP, "findMap");
|
|
function tze(e) {
|
|
let t = e.get(cP);
|
|
return {
|
|
getWrapperPayload(...r) {
|
|
return lP(t, (i) => i.getWrapperPayload == null ? void 0 : i.getWrapperPayload(...r));
|
|
},
|
|
wrapReference(...r) {
|
|
return lP(t, (i) => i.wrapReference == null ? void 0 : i.wrapReference(...r));
|
|
},
|
|
buildRequireWrapper(...r) {
|
|
return lP(t, (i) => i.buildRequireWrapper == null ? void 0 : i.buildRequireWrapper(...r));
|
|
}
|
|
};
|
|
}
|
|
s(tze, "makeInvokers");
|
|
});
|
|
|
|
// ../node_modules/@babel/plugin-transform-modules-commonjs/lib/index.js
|
|
var bz = E((Ip) => {
|
|
"use strict";
|
|
Object.defineProperty(Ip, "__esModule", {
|
|
value: !0
|
|
});
|
|
Ip.default = void 0;
|
|
Object.defineProperty(Ip, "defineCommonJSHook", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return fP.defineCommonJSHook;
|
|
}, "get")
|
|
});
|
|
var rze = yc(), Tu = Yd(), Bn = hr(), ize = hz(), nze = yz(), fP = gz(), L0t = Ip.default = (0, rze.declare)((e, t) => {
|
|
var r, i, n;
|
|
e.assertVersion(7);
|
|
let {
|
|
strictNamespace: a = !1,
|
|
mjsStrictNamespace: o = a,
|
|
allowTopLevelThis: u,
|
|
strict: l,
|
|
strictMode: c,
|
|
noInterop: f,
|
|
importInterop: m,
|
|
lazy: h = !1,
|
|
allowCommonJSExports: d = !0,
|
|
loose: y = !1
|
|
} = t, p = (r = e.assumption("constantReexports")) != null ? r : y, g = (i = e.assumption("enumerableModuleMeta")) != null ? i : y, b = (n =
|
|
e.assumption("noIncompleteNsImportDetection")) != null ? n : !1;
|
|
if (typeof h != "boolean" && typeof h != "function" && (!Array.isArray(h) || !h.every((S) => typeof S == "string")))
|
|
throw new Error(".lazy must be a boolean, array of strings, or a function");
|
|
if (typeof a != "boolean")
|
|
throw new Error(".strictNamespace must be a boolean, or undefined");
|
|
if (typeof o != "boolean")
|
|
throw new Error(".mjsStrictNamespace must be a boolean, or undefined");
|
|
let D = /* @__PURE__ */ s((S) => Bn.template.expression.ast`
|
|
(function(){
|
|
throw new Error(
|
|
"The CommonJS '" + "${S}" + "' variable is not available in ES6 modules." +
|
|
"Consider setting setting sourceType:script or sourceType:unambiguous in your " +
|
|
"Babel config for this file.");
|
|
})()
|
|
`, "getAssertion"), v = {
|
|
ReferencedIdentifier(S) {
|
|
let C = S.node.name;
|
|
if (C !== "module" && C !== "exports") return;
|
|
let O = S.scope.getBinding(C);
|
|
this.scope.getBinding(C) !== O || S.parentPath.isObjectProperty({
|
|
value: S.node
|
|
}) && S.parentPath.parentPath.isObjectPattern() || S.parentPath.isAssignmentExpression({
|
|
left: S.node
|
|
}) || S.isAssignmentExpression({
|
|
left: S.node
|
|
}) || S.replaceWith(D(C));
|
|
},
|
|
UpdateExpression(S) {
|
|
let C = S.get("argument");
|
|
if (!C.isIdentifier()) return;
|
|
let O = C.node.name;
|
|
if (O !== "module" && O !== "exports") return;
|
|
let k = S.scope.getBinding(O);
|
|
this.scope.getBinding(O) === k && S.replaceWith(Bn.types.assignmentExpression(S.node.operator[0] + "=", C.node, D(O)));
|
|
},
|
|
AssignmentExpression(S) {
|
|
let C = S.get("left");
|
|
if (C.isIdentifier()) {
|
|
let O = C.node.name;
|
|
if (O !== "module" && O !== "exports") return;
|
|
let k = S.scope.getBinding(O);
|
|
if (this.scope.getBinding(O) !== k) return;
|
|
let j = S.get("right");
|
|
j.replaceWith(Bn.types.sequenceExpression([j.node, D(O)]));
|
|
} else if (C.isPattern()) {
|
|
let O = C.getOuterBindingIdentifiers(), k = Object.keys(O).find((U) => U !== "module" && U !== "exports" ? !1 : this.scope.getBinding(
|
|
U) === S.scope.getBinding(U));
|
|
if (k) {
|
|
let U = S.get("right");
|
|
U.replaceWith(Bn.types.sequenceExpression([U.node, D(k)]));
|
|
}
|
|
}
|
|
}
|
|
};
|
|
return {
|
|
name: "transform-modules-commonjs",
|
|
pre() {
|
|
this.file.set("@babel/plugin-transform-modules-*", "commonjs"), h && (0, fP.defineCommonJSHook)(this.file, (0, nze.lazyImportsHook)(
|
|
h));
|
|
},
|
|
visitor: {
|
|
["CallExpression" + (e.types.importExpression ? "|ImportExpression" : "")](S) {
|
|
if (!this.file.has("@babel/plugin-proposal-dynamic-import") || S.isCallExpression() && !Bn.types.isImport(S.node.callee)) return;
|
|
let {
|
|
scope: C
|
|
} = S;
|
|
do
|
|
C.rename("require");
|
|
while (C = C.parent);
|
|
(0, ize.transformDynamicImport)(S, f, this.file);
|
|
},
|
|
Program: {
|
|
exit(S, C) {
|
|
if (!(0, Tu.isModule)(S)) return;
|
|
S.scope.rename("exports"), S.scope.rename("module"), S.scope.rename("require"), S.scope.rename("__filename"), S.scope.rename("__\
|
|
dirname"), d || S.traverse(v, {
|
|
scope: S.scope
|
|
});
|
|
let O = (0, Tu.getModuleName)(this.file.opts, t);
|
|
O && (O = Bn.types.stringLiteral(O));
|
|
let k = (0, fP.makeInvokers)(this.file), {
|
|
meta: U,
|
|
headers: j
|
|
} = (0, Tu.rewriteModuleStatementsAndPrepareHeader)(S, {
|
|
exportName: "exports",
|
|
constantReexports: p,
|
|
enumerableModuleMeta: g,
|
|
strict: l,
|
|
strictMode: c,
|
|
allowTopLevelThis: u,
|
|
noInterop: f,
|
|
importInterop: m,
|
|
wrapReference: k.wrapReference,
|
|
getWrapperPayload: k.getWrapperPayload,
|
|
esNamespaceOnly: typeof C.filename == "string" && /\.mjs$/.test(C.filename) ? o : a,
|
|
noIncompleteNsImportDetection: b,
|
|
filename: this.file.opts.filename
|
|
});
|
|
for (let [R, ee] of U.source) {
|
|
let re = Bn.types.callExpression(Bn.types.identifier("require"), [Bn.types.stringLiteral(R)]), te;
|
|
if ((0, Tu.isSideEffectImport)(ee)) {
|
|
if (h && ee.wrap === "function")
|
|
throw new Error("Assertion failure");
|
|
te = Bn.types.expressionStatement(re);
|
|
} else {
|
|
var K;
|
|
let Z = (0, Tu.wrapInterop)(S, re, ee.interop) || re;
|
|
if (ee.wrap) {
|
|
let ie = k.buildRequireWrapper(ee.name, Z, ee.wrap, ee.referenced);
|
|
if (ie === !1) continue;
|
|
te = ie;
|
|
}
|
|
(K = te) != null || (te = Bn.template.statement.ast`
|
|
var ${ee.name} = ${Z};
|
|
`);
|
|
}
|
|
te.loc = ee.loc, j.push(te), j.push(...(0, Tu.buildNamespaceInitStatements)(U, ee, p, k.wrapReference));
|
|
}
|
|
(0, Tu.ensureStatementsHoisted)(j), S.unshiftContainer("body", j), S.get("body").forEach((R) => {
|
|
j.includes(R.node) && R.isVariableDeclaration() && R.scope.registerDeclaration(R);
|
|
});
|
|
}
|
|
}
|
|
}
|
|
};
|
|
});
|
|
});
|
|
|
|
// ../node_modules/@babel/preset-typescript/lib/index.js
|
|
var xz = E((dP) => {
|
|
"use strict";
|
|
Object.defineProperty(dP, "__esModule", { value: !0 });
|
|
var vz = yc(), sze = cz();
|
|
fz();
|
|
var aze = bz(), oze = mg();
|
|
function Ez(e) {
|
|
return e && e.__esModule ? e : { default: e };
|
|
}
|
|
s(Ez, "_interopDefault");
|
|
var Dz = /* @__PURE__ */ Ez(sze), uze = /* @__PURE__ */ Ez(aze), ua = new oze.OptionValidator("@babel/preset-typescript");
|
|
function lze(e = {}) {
|
|
let {
|
|
allowNamespaces: t = !0,
|
|
jsxPragma: r,
|
|
onlyRemoveTypeImports: i
|
|
} = e, n = {
|
|
ignoreExtensions: "ignoreExtensions",
|
|
allowNamespaces: "allowNamespaces",
|
|
disallowAmbiguousJSXLike: "disallowAmbiguousJSXLike",
|
|
jsxPragma: "jsxPragma",
|
|
jsxPragmaFrag: "jsxPragmaFrag",
|
|
onlyRemoveTypeImports: "onlyRemoveTypeImports",
|
|
optimizeConstEnums: "optimizeConstEnums",
|
|
rewriteImportExtensions: "rewriteImportExtensions",
|
|
allExtensions: "allExtensions",
|
|
isTSX: "isTSX"
|
|
}, a = ua.validateStringOption(n.jsxPragmaFrag, e.jsxPragmaFrag, "React.Fragment");
|
|
{
|
|
var o = ua.validateBooleanOption(n.allExtensions, e.allExtensions, !1), u = ua.validateBooleanOption(n.isTSX, e.isTSX, !1);
|
|
u && ua.invariant(o, "isTSX:true requires allExtensions:true");
|
|
}
|
|
let l = ua.validateBooleanOption(n.ignoreExtensions, e.ignoreExtensions, !1), c = ua.validateBooleanOption(n.disallowAmbiguousJSXLike, e.
|
|
disallowAmbiguousJSXLike, !1);
|
|
c && ua.invariant(o, "disallowAmbiguousJSXLike:true requires allExtensions:true");
|
|
let f = ua.validateBooleanOption(n.optimizeConstEnums, e.optimizeConstEnums, !1), m = ua.validateBooleanOption(n.rewriteImportExtensions,
|
|
e.rewriteImportExtensions, !1), h = {
|
|
ignoreExtensions: l,
|
|
allowNamespaces: t,
|
|
disallowAmbiguousJSXLike: c,
|
|
jsxPragma: r,
|
|
jsxPragmaFrag: a,
|
|
onlyRemoveTypeImports: i,
|
|
optimizeConstEnums: f,
|
|
rewriteImportExtensions: m
|
|
};
|
|
return h.allExtensions = o, h.isTSX = u, h;
|
|
}
|
|
s(lze, "normalizeOptions");
|
|
var cze = vz.declare(function({
|
|
types: e,
|
|
template: t
|
|
}) {
|
|
function r(i, n, a) {
|
|
if (i) {
|
|
if (e.isStringLiteral(i)) {
|
|
/^\.\.?\//.test(i.value) && (i.value = i.value.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i, function(o, u, l, c, f) {
|
|
return u ? ".js" : l && (!c || !f) ? o : l + c + "." + f.toLowerCase() + "js";
|
|
}));
|
|
return;
|
|
}
|
|
a.availableHelper("tsRewriteRelativeImportExtensions") ? n.replaceWith(e.callExpression(a.addHelper("tsRewriteRelativeImportExtensio\
|
|
ns"), [i])) : n.replaceWith(t.expression.ast`(${i} + "").replace(/([\\/].*\.[mc]?)tsx?$/, "$1js")`);
|
|
}
|
|
}
|
|
return s(r, "maybeReplace"), {
|
|
name: "preset-typescript/plugin-rewrite-ts-imports",
|
|
visitor: {
|
|
"ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration"(i, n) {
|
|
let a = i.node;
|
|
(e.isImportDeclaration(a) ? a.importKind : a.exportKind) === "value" && r(a.source, i.get("source"), n);
|
|
},
|
|
CallExpression(i, n) {
|
|
e.isImport(i.node.callee) && r(i.node.arguments[0], i.get("arguments.0"), n);
|
|
},
|
|
ImportExpression(i, n) {
|
|
r(i.node.source, i.get("source"), n);
|
|
}
|
|
}
|
|
};
|
|
}), fze = vz.declarePreset((e, t) => {
|
|
e.assertVersion(7);
|
|
let {
|
|
allExtensions: r,
|
|
ignoreExtensions: i,
|
|
allowNamespaces: n,
|
|
disallowAmbiguousJSXLike: a,
|
|
isTSX: o,
|
|
jsxPragma: u,
|
|
jsxPragmaFrag: l,
|
|
onlyRemoveTypeImports: c,
|
|
optimizeConstEnums: f,
|
|
rewriteImportExtensions: m
|
|
} = lze(t), h = /* @__PURE__ */ s((p) => ({
|
|
allowDeclareFields: t.allowDeclareFields,
|
|
allowNamespaces: n,
|
|
disallowAmbiguousJSXLike: p,
|
|
jsxPragma: u,
|
|
jsxPragmaFrag: l,
|
|
onlyRemoveTypeImports: c,
|
|
optimizeConstEnums: f
|
|
}), "pluginOptions"), d = /* @__PURE__ */ s((p, g) => [[Dz.default, Object.assign({
|
|
isTSX: p
|
|
}, h(g))]], "getPlugins");
|
|
return {
|
|
plugins: m ? [cze] : [],
|
|
overrides: r || i ? [{
|
|
plugins: d(o, a)
|
|
}] : [{
|
|
test: /\.ts$/,
|
|
plugins: d(!1, !1)
|
|
}, {
|
|
test: /\.mts$/,
|
|
sourceType: "module",
|
|
plugins: d(!1, !0)
|
|
}, {
|
|
test: /\.cts$/,
|
|
sourceType: "unambiguous",
|
|
plugins: [[uze.default, {
|
|
allowTopLevelThis: !0
|
|
}], [Dz.default, h(!0)]]
|
|
}, {
|
|
test: /\.tsx$/,
|
|
plugins: d(!0, !1)
|
|
}]
|
|
};
|
|
});
|
|
dP.default = fze;
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/files/module-types.js
|
|
var DP = E((kp) => {
|
|
"use strict";
|
|
Object.defineProperty(kp, "__esModule", {
|
|
value: !0
|
|
});
|
|
kp.default = mze;
|
|
kp.supportsESM = void 0;
|
|
var pP = Ya();
|
|
function gP() {
|
|
let e = V("path");
|
|
return gP = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_path"), e;
|
|
}
|
|
s(gP, "_path");
|
|
function Az() {
|
|
let e = V("url");
|
|
return Az = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_url"), e;
|
|
}
|
|
s(Az, "_url");
|
|
V("module");
|
|
function bP() {
|
|
let e = V("semver");
|
|
return bP = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_semver"), e;
|
|
}
|
|
s(bP, "_semver");
|
|
function _z() {
|
|
let e = Jo();
|
|
return _z = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_debug"), e;
|
|
}
|
|
s(_z, "_debug");
|
|
var Pz = Js(), Op = fu(), dze = y2();
|
|
function Sz(e, t, r, i, n, a, o) {
|
|
try {
|
|
var u = e[a](o), l = u.value;
|
|
} catch (c) {
|
|
return void r(c);
|
|
}
|
|
u.done ? t(l) : Promise.resolve(l).then(i, n);
|
|
}
|
|
s(Sz, "asyncGeneratorStep");
|
|
function pze(e) {
|
|
return function() {
|
|
var t = this, r = arguments;
|
|
return new Promise(function(i, n) {
|
|
var a = e.apply(t, r);
|
|
function o(l) {
|
|
Sz(a, i, n, o, u, "next", l);
|
|
}
|
|
s(o, "_next");
|
|
function u(l) {
|
|
Sz(a, i, n, o, u, "throw", l);
|
|
}
|
|
s(u, "_throw"), o(void 0);
|
|
});
|
|
};
|
|
}
|
|
s(pze, "_asyncToGenerator");
|
|
var hze = _z()("babel:config:loading:files:module-types");
|
|
try {
|
|
yP = aK();
|
|
} catch {
|
|
}
|
|
var yP, V0t = kp.supportsESM = bP().satisfies(process.versions.node, "^12.17 || >=13.2"), hP = /* @__PURE__ */ new Set();
|
|
function pb(e) {
|
|
if (hP.has(e))
|
|
return hze("Auto-ignoring usage of config %o.", e), {};
|
|
let t;
|
|
try {
|
|
hP.add(e), t = (0, Pz.endHiddenCallStack)(V)(e);
|
|
} finally {
|
|
hP.delete(e);
|
|
}
|
|
return t != null && (t.__esModule || t[Symbol.toStringTag] === "Module") ? t.default || (arguments[1] ? t : void 0) : t;
|
|
}
|
|
s(pb, "loadCjsDefault");
|
|
var Tz = (0, Pz.endHiddenCallStack)(function() {
|
|
var e = pze(function* (r) {
|
|
let i = (0, Az().pathToFileURL)(r).toString() + "?import";
|
|
{
|
|
if (!yP)
|
|
throw new Op.default(`Internal error: Native ECMAScript modules aren't supported by this platform.
|
|
`, r);
|
|
return yield yP(i);
|
|
}
|
|
});
|
|
function t(r) {
|
|
return e.apply(this, arguments);
|
|
}
|
|
return s(t, "loadMjsFromPath"), t;
|
|
}()), Cz = {
|
|
".js": "unknown",
|
|
".mjs": "esm",
|
|
".cjs": "cjs",
|
|
".ts": "unknown",
|
|
".mts": "esm",
|
|
".cts": "cjs"
|
|
}, wz = /* @__PURE__ */ new Set();
|
|
function* mze(e, t, r, i) {
|
|
let n, a = gP().extname(e), o = a === ".ts" || a === ".cts" || a === ".mts", u = Cz[hasOwnProperty.call(Cz, a) ? a : ".js"];
|
|
switch (`${t} ${u}`) {
|
|
case "require cjs":
|
|
case "auto cjs":
|
|
return o ? mP(e, a, () => pb(e)) : pb(e, arguments[2]);
|
|
case "auto unknown":
|
|
case "require unknown":
|
|
case "require esm":
|
|
try {
|
|
return o ? mP(e, a, () => pb(e)) : pb(e, arguments[2]);
|
|
} catch (c) {
|
|
if (c.code === "ERR_REQUIRE_ASYNC_MODULE" || c.code === "ERR_REQUIRE_CYCLE_MODULE" && wz.has(e)) {
|
|
if (wz.add(e), !(n ?? (n = yield* (0, pP.isAsync)())))
|
|
throw new Op.default(i, e);
|
|
} else if (!(c.code === "ERR_REQUIRE_ESM" || u === "esm"))
|
|
throw c;
|
|
}
|
|
case "auto esm":
|
|
if (n ?? (n = yield* (0, pP.isAsync)())) {
|
|
let c = o ? mP(e, a, () => Tz(e)) : Tz(e);
|
|
return (yield* (0, pP.waitFor)(c)).default;
|
|
}
|
|
throw new Op.default(r, e);
|
|
default:
|
|
throw new Error("Internal Babel error: unreachable code.");
|
|
}
|
|
}
|
|
s(mze, "loadCodeDefault");
|
|
function mP(e, t, r) {
|
|
if (V.extensions[".ts"] || V.extensions[".cts"] || V.extensions[".mts"])
|
|
return r();
|
|
if (t !== ".cts")
|
|
throw new Op.default(`You are using a ${t} config file, but Babel only supports transpiling .cts configs. Either:
|
|
- Use a .cts config file
|
|
- Update to Node.js 23.6.0, which has native TypeScript support
|
|
- Install ts-node to transpile ${t} files on the fly`, e);
|
|
let i = {
|
|
babelrc: !1,
|
|
configFile: !1,
|
|
sourceType: "unambiguous",
|
|
sourceMaps: "inline",
|
|
sourceFileName: gP().basename(e),
|
|
presets: [[yze(e), Object.assign({
|
|
onlyRemoveTypeImports: !0,
|
|
optimizeConstEnums: !0
|
|
}, {
|
|
allowDeclareFields: !0
|
|
})]]
|
|
}, n = /* @__PURE__ */ s(function(a, o) {
|
|
if (n && o.endsWith(".cts"))
|
|
try {
|
|
return a._compile((0, dze.transformFileSync)(o, Object.assign({}, i, {
|
|
filename: o
|
|
})).code, o);
|
|
} catch (u) {
|
|
let l = oK();
|
|
throw bP().lt(l.version, "7.21.4") && console.error("`.cts` configuration file failed to load, please try to update `@babel/preset\
|
|
-typescript`."), u;
|
|
}
|
|
return V.extensions[".js"](a, o);
|
|
}, "handler");
|
|
V.extensions[t] = n;
|
|
try {
|
|
return r();
|
|
} finally {
|
|
V.extensions[t] === n && delete V.extensions[t], n = void 0;
|
|
}
|
|
}
|
|
s(mP, "ensureTsSupport");
|
|
function yze(e) {
|
|
try {
|
|
return xz();
|
|
} catch (t) {
|
|
if (t.code !== "MODULE_NOT_FOUND") throw t;
|
|
let r = "You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please i\
|
|
nstall it!";
|
|
throw process.versions.pnp && (r += `
|
|
If you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file:
|
|
|
|
packageExtensions:
|
|
"@babel/core@*":
|
|
peerDependencies:
|
|
"@babel/preset-typescript": "*"
|
|
`), new Op.default(r, e);
|
|
}
|
|
}
|
|
s(yze, "getTSPreset");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/files/configuration.js
|
|
var Lz = E((la) => {
|
|
"use strict";
|
|
Object.defineProperty(la, "__esModule", {
|
|
value: !0
|
|
});
|
|
la.ROOT_CONFIG_FILENAMES = void 0;
|
|
la.findConfigUpwards = Ize;
|
|
la.findRelativeConfig = Oze;
|
|
la.findRootConfig = kze;
|
|
la.loadConfig = Bze;
|
|
la.resolveShowConfigPath = Nze;
|
|
function Iz() {
|
|
let e = Jo();
|
|
return Iz = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_debug"), e;
|
|
}
|
|
s(Iz, "_debug");
|
|
function vP() {
|
|
let e = V("fs");
|
|
return vP = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_fs"), e;
|
|
}
|
|
s(vP, "_fs");
|
|
function qi() {
|
|
let e = V("path");
|
|
return qi = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_path"), e;
|
|
}
|
|
s(qi, "_path");
|
|
function Oz() {
|
|
let e = $W();
|
|
return Oz = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_json"), e;
|
|
}
|
|
s(Oz, "_json");
|
|
function kz() {
|
|
let e = Ri();
|
|
return kz = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_gensync"), e;
|
|
}
|
|
s(kz, "_gensync");
|
|
var Bz = cu(), gze = FA(), Nz = bA(), bze = DP(), Dze = E_(), Nn = fu(), vze = H0();
|
|
V("module");
|
|
var Eze = Js(), xze = Ya(), EP = Iz()("babel:config:loading:files:configuration"), Mz = la.ROOT_CONFIG_FILENAMES = ["babel.config.js", "ba\
|
|
bel.config.cjs", "babel.config.mjs", "babel.config.json", "babel.config.cts"], Sze = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.m\
|
|
js", ".babelrc.json", ".babelrc.cts"], Tze = ".babelignore", Cze = (0, Bz.makeWeakCache)(/* @__PURE__ */ s(function* (t, r) {
|
|
return yield* [], {
|
|
options: (0, Eze.endHiddenCallStack)(t)((0, gze.makeConfigAPI)(r)),
|
|
cacheNeedsConfiguration: !r.configured()
|
|
};
|
|
}, "runConfig"));
|
|
function* wze(e, t) {
|
|
if (!vP().existsSync(e)) return null;
|
|
let r = yield* (0, bze.default)(e, (yield* (0, xze.isAsync)()) ? "auto" : "require", "You appear to be using a native ECMAScript module \
|
|
configuration file, which is only supported when running Babel asynchronously or when using the Node.js `--experimental-require-module` flag\
|
|
.", "You appear to be using a configuration file that contains top-level await, which is only supported when running Babel asynchronously."),
|
|
i = !1;
|
|
if (typeof r == "function" && ({
|
|
options: r,
|
|
cacheNeedsConfiguration: i
|
|
} = yield* Cze(r, t)), !r || typeof r != "object" || Array.isArray(r))
|
|
throw new Nn.default("Configuration should be an exported JavaScript object.", e);
|
|
if (typeof r.then == "function")
|
|
throw r.catch == null || r.catch(() => {
|
|
}), new Nn.default("You appear to be using an async configuration, which your current version of Babel does not support. We may add su\
|
|
pport for this in the future, but if you're on the most recent version of @babel/core and still seeing this error, then you'll need to synch\
|
|
ronously return your config.", e);
|
|
return i && Mze(e), Aze(r, e);
|
|
}
|
|
s(wze, "readConfigCode");
|
|
var Fz = /* @__PURE__ */ new WeakMap();
|
|
function Aze(e, t) {
|
|
let r = Fz.get(e);
|
|
r || Fz.set(e, r = /* @__PURE__ */ new Map());
|
|
let i = r.get(t);
|
|
return i || (i = {
|
|
filepath: t,
|
|
dirname: qi().dirname(t),
|
|
options: e
|
|
}, r.set(t, i)), i;
|
|
}
|
|
s(Aze, "buildConfigFileObject");
|
|
var _ze = (0, Bz.makeWeakCacheSync)((e) => {
|
|
let t = e.options.babel;
|
|
if (t === void 0) return null;
|
|
if (typeof t != "object" || Array.isArray(t) || t === null)
|
|
throw new Nn.default(".babel property must be an object", e.filepath);
|
|
return {
|
|
filepath: e.filepath,
|
|
dirname: e.dirname,
|
|
options: t
|
|
};
|
|
}), Pze = (0, Nz.makeStaticFileCache)((e, t) => {
|
|
let r;
|
|
try {
|
|
r = Oz().parse(t);
|
|
} catch (i) {
|
|
throw new Nn.default(`Error while parsing config - ${i.message}`, e);
|
|
}
|
|
if (!r) throw new Nn.default("No config detected", e);
|
|
if (typeof r != "object")
|
|
throw new Nn.default(`Config returned typeof ${typeof r}`, e);
|
|
if (Array.isArray(r))
|
|
throw new Nn.default("Expected config object but found array", e);
|
|
return delete r.$schema, {
|
|
filepath: e,
|
|
dirname: qi().dirname(e),
|
|
options: r
|
|
};
|
|
}), Fze = (0, Nz.makeStaticFileCache)((e, t) => {
|
|
let r = qi().dirname(e), i = t.split(`
|
|
`).map((n) => n.replace(/#.*$/, "").trim()).filter(Boolean);
|
|
for (let n of i)
|
|
if (n[0] === "!")
|
|
throw new Nn.default("Negation of file paths is not supported.", e);
|
|
return {
|
|
filepath: e,
|
|
dirname: qi().dirname(e),
|
|
ignore: i.map((n) => (0, Dze.default)(n, r))
|
|
};
|
|
});
|
|
function Ize(e) {
|
|
let t = e;
|
|
for (; ; ) {
|
|
for (let i of Mz)
|
|
if (vP().existsSync(qi().join(t, i)))
|
|
return t;
|
|
let r = qi().dirname(t);
|
|
if (t === r) break;
|
|
t = r;
|
|
}
|
|
return null;
|
|
}
|
|
s(Ize, "findConfigUpwards");
|
|
function* Oze(e, t, r) {
|
|
let i = null, n = null, a = qi().dirname(e.filepath);
|
|
for (let u of e.directories) {
|
|
if (!i) {
|
|
var o;
|
|
i = yield* Rz(Sze, u, t, r, ((o = e.pkg) == null ? void 0 : o.dirname) === u ? _ze(e.pkg) : null);
|
|
}
|
|
if (!n) {
|
|
let l = qi().join(u, Tze);
|
|
n = yield* Fze(l), n && EP("Found ignore %o from %o.", n.filepath, a);
|
|
}
|
|
}
|
|
return {
|
|
config: i,
|
|
ignore: n
|
|
};
|
|
}
|
|
s(Oze, "findRelativeConfig");
|
|
function kze(e, t, r) {
|
|
return Rz(Mz, e, t, r);
|
|
}
|
|
s(kze, "findRootConfig");
|
|
function* Rz(e, t, r, i, n = null) {
|
|
let o = (yield* kz().all(e.map((u) => jz(qi().join(t, u), r, i)))).reduce((u, l) => {
|
|
if (l && u)
|
|
throw new Nn.default(`Multiple configuration files found. Please remove one:
|
|
- ${qi().basename(u.filepath)}
|
|
- ${l.filepath}
|
|
from ${t}`);
|
|
return l || u;
|
|
}, n);
|
|
return o && EP("Found configuration %o from %o.", o.filepath, t), o;
|
|
}
|
|
s(Rz, "loadOneConfig");
|
|
function* Bze(e, t, r, i) {
|
|
let n = (((o, u) => (o = o.split("."), u = u.split("."), +o[0] > +u[0] || o[0] == u[0] && +o[1] >= +u[1]))(process.versions.node, "8.9") ?
|
|
V.resolve : (o, {
|
|
paths: [u]
|
|
}, l = V("module")) => {
|
|
let c = l._findPath(o, l._nodeModulePaths(u).concat(u));
|
|
if (c) return c;
|
|
throw c = new Error(`Cannot resolve module '${o}'`), c.code = "MODULE_NOT_FOUND", c;
|
|
})(e, {
|
|
paths: [t]
|
|
}), a = yield* jz(n, r, i);
|
|
if (!a)
|
|
throw new Nn.default("Config file contains no configuration data", n);
|
|
return EP("Loaded config %o from %o.", e, t), a;
|
|
}
|
|
s(Bze, "loadConfig");
|
|
function jz(e, t, r) {
|
|
switch (qi().extname(e)) {
|
|
case ".js":
|
|
case ".cjs":
|
|
case ".mjs":
|
|
case ".ts":
|
|
case ".cts":
|
|
case ".mts":
|
|
return wze(e, {
|
|
envName: t,
|
|
caller: r
|
|
});
|
|
default:
|
|
return Pze(e);
|
|
}
|
|
}
|
|
s(jz, "readConfig");
|
|
function* Nze(e) {
|
|
let t = process.env.BABEL_SHOW_CONFIG_FOR;
|
|
if (t != null) {
|
|
let r = qi().resolve(e, t);
|
|
if (!(yield* vze.stat(r)).isFile())
|
|
throw new Error(`${r}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`);
|
|
return r;
|
|
}
|
|
return null;
|
|
}
|
|
s(Nze, "resolveShowConfigPath");
|
|
function Mze(e) {
|
|
throw new Nn.default(`Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured
|
|
for various types of caching, using the first param of their handler functions:
|
|
|
|
module.exports = function(api) {
|
|
// The API exposes the following:
|
|
|
|
// Cache the returned value forever and don't call this function again.
|
|
api.cache(true);
|
|
|
|
// Don't cache at all. Not recommended because it will be very slow.
|
|
api.cache(false);
|
|
|
|
// Cached based on the value of some function. If this function returns a value different from
|
|
// a previously-encountered value, the plugins will re-evaluate.
|
|
var env = api.cache(() => process.env.NODE_ENV);
|
|
|
|
// If testing for a specific env, we recommend specifics to avoid instantiating a plugin for
|
|
// any possible NODE_ENV value that might come up during plugin execution.
|
|
var isProd = api.cache(() => process.env.NODE_ENV === "production");
|
|
|
|
// .cache(fn) will perform a linear search though instances to find the matching plugin based
|
|
// based on previous instantiated plugins. If you want to recreate the plugin and discard the
|
|
// previous instance whenever something changes, you may use:
|
|
var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production");
|
|
|
|
// Note, we also expose the following more-verbose versions of the above examples:
|
|
api.cache.forever(); // api.cache(true)
|
|
api.cache.never(); // api.cache(false)
|
|
api.cache.using(fn); // api.cache(fn)
|
|
|
|
// Return the value that will be cached.
|
|
return { };
|
|
};`, e);
|
|
}
|
|
s(Mze, "throwConfigError");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/vendor/import-meta-resolve.js
|
|
var cG = E((Db) => {
|
|
"use strict";
|
|
Object.defineProperty(Db, "__esModule", {
|
|
value: !0
|
|
});
|
|
Db.moduleResolve = lG;
|
|
Db.resolve = _Ge;
|
|
function cs() {
|
|
let e = V("assert");
|
|
return cs = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_assert"), e;
|
|
}
|
|
s(cs, "_assert");
|
|
function Rp() {
|
|
let e = Rze(V("fs"), !0);
|
|
return Rp = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_fs"), e;
|
|
}
|
|
s(Rp, "_fs");
|
|
function lo() {
|
|
let e = V("process");
|
|
return lo = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_process"), e;
|
|
}
|
|
s(lo, "_process");
|
|
function Ne() {
|
|
let e = V("url");
|
|
return Ne = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_url"), e;
|
|
}
|
|
s(Ne, "_url");
|
|
function yb() {
|
|
let e = V("path");
|
|
return yb = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_path"), e;
|
|
}
|
|
s(yb, "_path");
|
|
function gb() {
|
|
let e = V("module");
|
|
return gb = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_module"), e;
|
|
}
|
|
s(gb, "_module");
|
|
function Zz() {
|
|
let e = V("v8");
|
|
return Zz = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_v"), e;
|
|
}
|
|
s(Zz, "_v");
|
|
function Mp() {
|
|
let e = V("util");
|
|
return Mp = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_util"), e;
|
|
}
|
|
s(Mp, "_util");
|
|
function Qz(e) {
|
|
if (typeof WeakMap != "function") return null;
|
|
var t = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap();
|
|
return (Qz = /* @__PURE__ */ s(function(i) {
|
|
return i ? r : t;
|
|
}, "_getRequireWildcardCache"))(e);
|
|
}
|
|
s(Qz, "_getRequireWildcardCache");
|
|
function Rze(e, t) {
|
|
if (!t && e && e.__esModule) return e;
|
|
if (e === null || typeof e != "object" && typeof e != "function") return { default: e };
|
|
var r = Qz(t);
|
|
if (r && r.has(e)) return r.get(e);
|
|
var i = { __proto__: null }, n = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
for (var a in e) if (a !== "default" && {}.hasOwnProperty.call(e, a)) {
|
|
var o = n ? Object.getOwnPropertyDescriptor(e, a) : null;
|
|
o && (o.get || o.set) ? Object.defineProperty(i, a, o) : i[a] = e[a];
|
|
}
|
|
return i.default = e, r && r.set(e, i), i;
|
|
}
|
|
s(Rze, "_interopRequireWildcard");
|
|
var jze = {}.hasOwnProperty, Lze = /^([A-Z][a-z\d]*)+$/, qze = /* @__PURE__ */ new Set(["string", "function", "number", "object", "Functio\
|
|
n", "Object", "boolean", "bigint", "symbol"]), Yr = {};
|
|
function xP(e, t = "and") {
|
|
return e.length < 3 ? e.join(` ${t} `) : `${e.slice(0, -1).join(", ")}, ${t} ${e[e.length - 1]}`;
|
|
}
|
|
s(xP, "formatList");
|
|
var eG = /* @__PURE__ */ new Map(), Uze = "__node_internal_", qz;
|
|
Yr.ERR_INVALID_ARG_TYPE = fn("ERR_INVALID_ARG_TYPE", (e, t, r) => {
|
|
cs()(typeof e == "string", "'name' must be a string"), Array.isArray(t) || (t = [t]);
|
|
let i = "The ";
|
|
if (e.endsWith(" argument"))
|
|
i += `${e} `;
|
|
else {
|
|
let u = e.includes(".") ? "property" : "argument";
|
|
i += `"${e}" ${u} `;
|
|
}
|
|
i += "must be ";
|
|
let n = [], a = [], o = [];
|
|
for (let u of t)
|
|
cs()(typeof u == "string", "All expected entries have to be of type string"), qze.has(u) ? n.push(u.toLowerCase()) : Lze.exec(u) === null ?
|
|
(cs()(u !== "object", 'The value "object" should be written as "Object"'), o.push(u)) : a.push(u);
|
|
if (a.length > 0) {
|
|
let u = n.indexOf("object");
|
|
u !== -1 && (n.slice(u, 1), a.push("Object"));
|
|
}
|
|
return n.length > 0 && (i += `${n.length > 1 ? "one of type" : "of type"} ${xP(n, "or")}`, (a.length > 0 || o.length > 0) && (i += " or ")),
|
|
a.length > 0 && (i += `an instance of ${xP(a, "or")}`, o.length > 0 && (i += " or ")), o.length > 0 && (o.length > 1 ? i += `one of ${xP(
|
|
o, "or")}` : (o[0].toLowerCase() !== o[0] && (i += "an "), i += `${o[0]}`)), i += `. Received ${Kze(r)}`, i;
|
|
}, TypeError);
|
|
Yr.ERR_INVALID_MODULE_SPECIFIER = fn("ERR_INVALID_MODULE_SPECIFIER", (e, t, r = void 0) => `Invalid module "${e}" ${t}${r ? ` imported fro\
|
|
m ${r}` : ""}`, TypeError);
|
|
Yr.ERR_INVALID_PACKAGE_CONFIG = fn("ERR_INVALID_PACKAGE_CONFIG", (e, t, r) => `Invalid package config ${e}${t ? ` while importing ${t}` : ""}${r ?
|
|
`. ${r}` : ""}`, Error);
|
|
Yr.ERR_INVALID_PACKAGE_TARGET = fn("ERR_INVALID_PACKAGE_TARGET", (e, t, r, i = !1, n = void 0) => {
|
|
let a = typeof r == "string" && !i && r.length > 0 && !r.startsWith("./");
|
|
return t === "." ? (cs()(i === !1), `Invalid "exports" main target ${JSON.stringify(r)} defined in the package config ${e}package.json${n ?
|
|
` imported from ${n}` : ""}${a ? '; targets must start with "./"' : ""}`) : `Invalid "${i ? "imports" : "exports"}" target ${JSON.stringify(
|
|
r)} defined for '${t}' in the package config ${e}package.json${n ? ` imported from ${n}` : ""}${a ? '; targets must start with "./"' : ""}`;
|
|
}, Error);
|
|
Yr.ERR_MODULE_NOT_FOUND = fn("ERR_MODULE_NOT_FOUND", (e, t, r = !1) => `Cannot find ${r ? "module" : "package"} '${e}' imported from ${t}`,
|
|
Error);
|
|
Yr.ERR_NETWORK_IMPORT_DISALLOWED = fn("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error);
|
|
Yr.ERR_PACKAGE_IMPORT_NOT_DEFINED = fn("ERR_PACKAGE_IMPORT_NOT_DEFINED", (e, t, r) => `Package import specifier "${e}" is not defined${t ?
|
|
` in package ${t}package.json` : ""} imported from ${r}`, TypeError);
|
|
Yr.ERR_PACKAGE_PATH_NOT_EXPORTED = fn("ERR_PACKAGE_PATH_NOT_EXPORTED", (e, t, r = void 0) => t === "." ? `No "exports" main defined in ${e}\
|
|
package.json${r ? ` imported from ${r}` : ""}` : `Package subpath '${t}' is not defined by "exports" in ${e}package.json${r ? ` imported fro\
|
|
m ${r}` : ""}`, Error);
|
|
Yr.ERR_UNSUPPORTED_DIR_IMPORT = fn("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported fro\
|
|
m %s", Error);
|
|
Yr.ERR_UNSUPPORTED_RESOLVE_REQUEST = fn("ERR_UNSUPPORTED_RESOLVE_REQUEST", 'Failed to resolve module specifier "%s" from "%s": Invalid rel\
|
|
ative URL or base scheme is not hierarchical.', TypeError);
|
|
Yr.ERR_UNKNOWN_FILE_EXTENSION = fn("ERR_UNKNOWN_FILE_EXTENSION", (e, t) => `Unknown file extension "${e}" for ${t}`, TypeError);
|
|
Yr.ERR_INVALID_ARG_VALUE = fn("ERR_INVALID_ARG_VALUE", (e, t, r = "is invalid") => {
|
|
let i = (0, Mp().inspect)(t);
|
|
return i.length > 128 && (i = `${i.slice(0, 128)}...`), `The ${e.includes(".") ? "property" : "argument"} '${e}' ${r}. Received ${i}`;
|
|
}, TypeError);
|
|
function fn(e, t, r) {
|
|
return eG.set(e, t), Wze(r, e);
|
|
}
|
|
s(fn, "createError");
|
|
function Wze(e, t) {
|
|
return r;
|
|
function r(...i) {
|
|
let n = Error.stackTraceLimit;
|
|
wP() && (Error.stackTraceLimit = 0);
|
|
let a = new e();
|
|
wP() && (Error.stackTraceLimit = n);
|
|
let o = Hze(t, i, a);
|
|
return Object.defineProperties(a, {
|
|
message: {
|
|
value: o,
|
|
enumerable: !1,
|
|
writable: !0,
|
|
configurable: !0
|
|
},
|
|
toString: {
|
|
value() {
|
|
return `${this.name} [${t}]: ${this.message}`;
|
|
},
|
|
enumerable: !1,
|
|
writable: !0,
|
|
configurable: !0
|
|
}
|
|
}), Vze(a), a.code = t, a;
|
|
}
|
|
}
|
|
s(Wze, "makeNodeErrorWithCode");
|
|
function wP() {
|
|
try {
|
|
if (Zz().startupSnapshot.isBuildingSnapshot())
|
|
return !1;
|
|
} catch {
|
|
}
|
|
let e = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
return e === void 0 ? Object.isExtensible(Error) : jze.call(e, "writable") && e.writable !== void 0 ? e.writable : e.set !== void 0;
|
|
}
|
|
s(wP, "isErrorStackTraceLimitWritable");
|
|
function $ze(e) {
|
|
let t = Uze + e.name;
|
|
return Object.defineProperty(e, "name", {
|
|
value: t
|
|
}), e;
|
|
}
|
|
s($ze, "hideStackFrames");
|
|
var Vze = $ze(function(e) {
|
|
let t = wP();
|
|
return t && (qz = Error.stackTraceLimit, Error.stackTraceLimit = Number.POSITIVE_INFINITY), Error.captureStackTrace(e), t && (Error.stackTraceLimit =
|
|
qz), e;
|
|
});
|
|
function Hze(e, t, r) {
|
|
let i = eG.get(e);
|
|
if (cs()(i !== void 0, "expected `message` to be found"), typeof i == "function")
|
|
return cs()(i.length <= t.length, `Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${i.length}\
|
|
).`), Reflect.apply(i, r, t);
|
|
let n = /%[dfijoOs]/g, a = 0;
|
|
for (; n.exec(i) !== null; ) a++;
|
|
return cs()(a === t.length, `Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${a}).`), t.length ===
|
|
0 ? i : (t.unshift(i), Reflect.apply(Mp().format, null, t));
|
|
}
|
|
s(Hze, "getMessage");
|
|
function Kze(e) {
|
|
if (e == null)
|
|
return String(e);
|
|
if (typeof e == "function" && e.name)
|
|
return `function ${e.name}`;
|
|
if (typeof e == "object")
|
|
return e.constructor && e.constructor.name ? `an instance of ${e.constructor.name}` : `${(0, Mp().inspect)(e, {
|
|
depth: -1
|
|
})}`;
|
|
let t = (0, Mp().inspect)(e, {
|
|
colors: !1
|
|
});
|
|
return t.length > 28 && (t = `${t.slice(0, 25)}...`), `type ${typeof e} (${t})`;
|
|
}
|
|
s(Kze, "determineSpecificType");
|
|
var Bp = {}.hasOwnProperty, {
|
|
ERR_INVALID_PACKAGE_CONFIG: zze
|
|
} = Yr, Uz = /* @__PURE__ */ new Map();
|
|
function tG(e, {
|
|
base: t,
|
|
specifier: r
|
|
}) {
|
|
let i = Uz.get(e);
|
|
if (i)
|
|
return i;
|
|
let n;
|
|
try {
|
|
n = Rp().default.readFileSync(yb().toNamespacedPath(e), "utf8");
|
|
} catch (o) {
|
|
let u = o;
|
|
if (u.code !== "ENOENT")
|
|
throw u;
|
|
}
|
|
let a = {
|
|
exists: !1,
|
|
pjsonPath: e,
|
|
main: void 0,
|
|
name: void 0,
|
|
type: "none",
|
|
exports: void 0,
|
|
imports: void 0
|
|
};
|
|
if (n !== void 0) {
|
|
let o;
|
|
try {
|
|
o = JSON.parse(n);
|
|
} catch (u) {
|
|
let l = u, c = new zze(e, (t ? `"${r}" from ` : "") + (0, Ne().fileURLToPath)(t || r), l.message);
|
|
throw c.cause = l, c;
|
|
}
|
|
a.exists = !0, Bp.call(o, "name") && typeof o.name == "string" && (a.name = o.name), Bp.call(o, "main") && typeof o.main == "string" &&
|
|
(a.main = o.main), Bp.call(o, "exports") && (a.exports = o.exports), Bp.call(o, "imports") && (a.imports = o.imports), Bp.call(o, "typ\
|
|
e") && (o.type === "commonjs" || o.type === "module") && (a.type = o.type);
|
|
}
|
|
return Uz.set(e, a), a;
|
|
}
|
|
s(tG, "read");
|
|
function AP(e) {
|
|
let t = new URL("package.json", e);
|
|
for (; !t.pathname.endsWith("node_modules/package.json"); ) {
|
|
let n = tG((0, Ne().fileURLToPath)(t), {
|
|
specifier: e
|
|
});
|
|
if (n.exists)
|
|
return n;
|
|
let a = t;
|
|
if (t = new URL("../package.json", t), t.pathname === a.pathname)
|
|
break;
|
|
}
|
|
return {
|
|
pjsonPath: (0, Ne().fileURLToPath)(t),
|
|
exists: !1,
|
|
type: "none"
|
|
};
|
|
}
|
|
s(AP, "getPackageScopeConfig");
|
|
function Wz(e) {
|
|
return AP(e).type;
|
|
}
|
|
s(Wz, "getPackageType");
|
|
var {
|
|
ERR_UNKNOWN_FILE_EXTENSION: Gze
|
|
} = Yr, Jze = {}.hasOwnProperty, Xze = {
|
|
__proto__: null,
|
|
".cjs": "commonjs",
|
|
".js": "module",
|
|
".json": "json",
|
|
".mjs": "module"
|
|
};
|
|
function Yze(e) {
|
|
return e && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e) ? "module" : e === "application/json" ? "json" : null;
|
|
}
|
|
s(Yze, "mimeToFormat");
|
|
var $z = {
|
|
__proto__: null,
|
|
"data:": Zze,
|
|
"file:": eGe,
|
|
"http:": Vz,
|
|
"https:": Vz,
|
|
"node:"() {
|
|
return "builtin";
|
|
}
|
|
};
|
|
function Zze(e) {
|
|
let {
|
|
1: t
|
|
} = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname) || [null, null, null];
|
|
return Yze(t);
|
|
}
|
|
s(Zze, "getDataProtocolModuleFormat");
|
|
function Qze(e) {
|
|
let t = e.pathname, r = t.length;
|
|
for (; r--; ) {
|
|
let i = t.codePointAt(r);
|
|
if (i === 47)
|
|
return "";
|
|
if (i === 46)
|
|
return t.codePointAt(r - 1) === 47 ? "" : t.slice(r);
|
|
}
|
|
return "";
|
|
}
|
|
s(Qze, "extname");
|
|
function eGe(e, t, r) {
|
|
let i = Qze(e);
|
|
if (i === ".js") {
|
|
let o = Wz(e);
|
|
return o !== "none" ? o : "commonjs";
|
|
}
|
|
if (i === "") {
|
|
let o = Wz(e);
|
|
return o === "none" || o === "commonjs" ? "commonjs" : "module";
|
|
}
|
|
let n = Xze[i];
|
|
if (n) return n;
|
|
if (r)
|
|
return;
|
|
let a = (0, Ne().fileURLToPath)(e);
|
|
throw new Gze(i, a);
|
|
}
|
|
s(eGe, "getFileProtocolModuleFormat");
|
|
function Vz() {
|
|
}
|
|
s(Vz, "getHttpProtocolModuleFormat");
|
|
function rG(e, t) {
|
|
let r = e.protocol;
|
|
return Jze.call($z, r) && $z[r](e, t, !0) || null;
|
|
}
|
|
s(rG, "defaultGetFormatWithoutErrors");
|
|
var {
|
|
ERR_INVALID_ARG_VALUE: tGe
|
|
} = Yr, iG = Object.freeze(["node", "import"]), rGe = new Set(iG);
|
|
function iGe() {
|
|
return iG;
|
|
}
|
|
s(iGe, "getDefaultConditions");
|
|
function nGe() {
|
|
return rGe;
|
|
}
|
|
s(nGe, "getDefaultConditionsSet");
|
|
function sGe(e) {
|
|
if (e !== void 0 && e !== iGe()) {
|
|
if (!Array.isArray(e))
|
|
throw new tGe("conditions", e, "expected an array");
|
|
return new Set(e);
|
|
}
|
|
return nGe();
|
|
}
|
|
s(sGe, "getConditionsSet");
|
|
var hb = RegExp.prototype[Symbol.replace], {
|
|
ERR_NETWORK_IMPORT_DISALLOWED: SP,
|
|
ERR_INVALID_MODULE_SPECIFIER: bb,
|
|
ERR_INVALID_PACKAGE_CONFIG: nG,
|
|
ERR_INVALID_PACKAGE_TARGET: aGe,
|
|
ERR_MODULE_NOT_FOUND: _P,
|
|
ERR_PACKAGE_IMPORT_NOT_DEFINED: oGe,
|
|
ERR_PACKAGE_PATH_NOT_EXPORTED: uGe,
|
|
ERR_UNSUPPORTED_DIR_IMPORT: lGe,
|
|
ERR_UNSUPPORTED_RESOLVE_REQUEST: Hz
|
|
} = Yr, sG = {}.hasOwnProperty, Kz = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,
|
|
zz = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,
|
|
cGe = /^\.|%|\\/, mb = /\*/g, fGe = /%2f|%5c/i, Gz = /* @__PURE__ */ new Set(), dGe = /[/\\]{2}/;
|
|
function Jz(e, t, r, i, n, a, o) {
|
|
if (lo().noDeprecation)
|
|
return;
|
|
let u = (0, Ne().fileURLToPath)(i), l = dGe.exec(o ? e : t) !== null;
|
|
lo().emitWarning(`Use of deprecated ${l ? "double slash" : "leading or trailing slash matching"} resolving "${e}" for module request "${t}\
|
|
" ${t === r ? "" : `matched to "${r}" `}in the "${n ? "imports" : "exports"}" field module resolution of the package at ${u}${a ? ` imported\
|
|
from ${(0, Ne().fileURLToPath)(a)}` : ""}.`, "DeprecationWarning", "DEP0166");
|
|
}
|
|
s(Jz, "emitInvalidSegmentDeprecation");
|
|
function Xz(e, t, r, i) {
|
|
if (lo().noDeprecation || rG(e, {
|
|
parentURL: r.href
|
|
}) !== "module") return;
|
|
let a = (0, Ne().fileURLToPath)(e.href), o = (0, Ne().fileURLToPath)(new (Ne()).URL(".", t)), u = (0, Ne().fileURLToPath)(r);
|
|
i ? yb().resolve(o, i) !== a && lo().emitWarning(`Package ${o} has a "main" field set to "${i}", excluding the full filename and extensi\
|
|
on to the resolved file at "${a.slice(o.length)}", imported from ${u}.
|
|
Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151") : lo().emitWarning(`No \
|
|
"main" or "exports" field defined in the package.json for ${o} resolving the main entry point "${a.slice(o.length)}", imported from ${u}.
|
|
Default "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
|
|
}
|
|
s(Xz, "emitLegacyIndexDeprecation");
|
|
function aG(e) {
|
|
try {
|
|
return (0, Rp().statSync)(e);
|
|
} catch {
|
|
}
|
|
}
|
|
s(aG, "tryStatSync");
|
|
function TP(e) {
|
|
let t = (0, Rp().statSync)(e, {
|
|
throwIfNoEntry: !1
|
|
}), r = t ? t.isFile() : void 0;
|
|
return r ?? !1;
|
|
}
|
|
s(TP, "fileExists");
|
|
function pGe(e, t, r) {
|
|
let i;
|
|
if (t.main !== void 0) {
|
|
if (i = new (Ne()).URL(t.main, e), TP(i)) return i;
|
|
let o = [`./${t.main}.js`, `./${t.main}.json`, `./${t.main}.node`, `./${t.main}/index.js`, `./${t.main}/index.json`, `./${t.main}/inde\
|
|
x.node`], u = -1;
|
|
for (; ++u < o.length && (i = new (Ne()).URL(o[u], e), !TP(i)); )
|
|
i = void 0;
|
|
if (i)
|
|
return Xz(i, e, r, t.main), i;
|
|
}
|
|
let n = ["./index.js", "./index.json", "./index.node"], a = -1;
|
|
for (; ++a < n.length && (i = new (Ne()).URL(n[a], e), !TP(i)); )
|
|
i = void 0;
|
|
if (i)
|
|
return Xz(i, e, r, t.main), i;
|
|
throw new _P((0, Ne().fileURLToPath)(new (Ne()).URL(".", e)), (0, Ne().fileURLToPath)(r));
|
|
}
|
|
s(pGe, "legacyMainResolve");
|
|
function hGe(e, t, r) {
|
|
if (fGe.exec(e.pathname) !== null)
|
|
throw new bb(e.pathname, 'must not include encoded "/" or "\\" characters', (0, Ne().fileURLToPath)(t));
|
|
let i;
|
|
try {
|
|
i = (0, Ne().fileURLToPath)(e);
|
|
} catch (a) {
|
|
let o = a;
|
|
throw Object.defineProperty(o, "input", {
|
|
value: String(e)
|
|
}), Object.defineProperty(o, "module", {
|
|
value: String(t)
|
|
}), o;
|
|
}
|
|
let n = aG(i.endsWith("/") ? i.slice(-1) : i);
|
|
if (n && n.isDirectory()) {
|
|
let a = new lGe(i, (0, Ne().fileURLToPath)(t));
|
|
throw a.url = String(e), a;
|
|
}
|
|
if (!n || !n.isFile()) {
|
|
let a = new _P(i || e.pathname, t && (0, Ne().fileURLToPath)(t), !0);
|
|
throw a.url = String(e), a;
|
|
}
|
|
if (!r) {
|
|
let a = (0, Rp().realpathSync)(i), {
|
|
search: o,
|
|
hash: u
|
|
} = e;
|
|
e = (0, Ne().pathToFileURL)(a + (i.endsWith(yb().sep) ? "/" : "")), e.search = o, e.hash = u;
|
|
}
|
|
return e;
|
|
}
|
|
s(hGe, "finalizeResolution");
|
|
function mGe(e, t, r) {
|
|
return new oGe(e, t && (0, Ne().fileURLToPath)(new (Ne()).URL(".", t)), (0, Ne().fileURLToPath)(r));
|
|
}
|
|
s(mGe, "importNotDefined");
|
|
function CP(e, t, r) {
|
|
return new uGe((0, Ne().fileURLToPath)(new (Ne()).URL(".", t)), e, r && (0, Ne().fileURLToPath)(r));
|
|
}
|
|
s(CP, "exportsNotFound");
|
|
function yGe(e, t, r, i, n) {
|
|
let a = `request is not a valid match in pattern "${t}" for the "${i ? "imports" : "exports"}" resolution of ${(0, Ne().fileURLToPath)(r)}`;
|
|
throw new bb(e, a, n && (0, Ne().fileURLToPath)(n));
|
|
}
|
|
s(yGe, "throwInvalidSubpath");
|
|
function Np(e, t, r, i, n) {
|
|
return t = typeof t == "object" && t !== null ? JSON.stringify(t, null, "") : `${t}`, new aGe((0, Ne().fileURLToPath)(new (Ne()).URL(".",
|
|
r)), e, t, i, n && (0, Ne().fileURLToPath)(n));
|
|
}
|
|
s(Np, "invalidPackageTarget");
|
|
function gGe(e, t, r, i, n, a, o, u, l) {
|
|
if (t !== "" && !a && e[e.length - 1] !== "/") throw Np(r, e, i, o, n);
|
|
if (!e.startsWith("./")) {
|
|
if (o && !e.startsWith("../") && !e.startsWith("/")) {
|
|
let h = !1;
|
|
try {
|
|
new (Ne()).URL(e), h = !0;
|
|
} catch {
|
|
}
|
|
if (!h) {
|
|
let d = a ? hb.call(mb, e, () => t) : e + t;
|
|
return uG(d, i, l);
|
|
}
|
|
}
|
|
throw Np(r, e, i, o, n);
|
|
}
|
|
if (Kz.exec(e.slice(2)) !== null)
|
|
if (zz.exec(e.slice(2)) === null) {
|
|
if (!u) {
|
|
let h = a ? r.replace("*", () => t) : r + t, d = a ? hb.call(mb, e, () => t) : e;
|
|
Jz(d, h, r, i, o, n, !0);
|
|
}
|
|
} else
|
|
throw Np(r, e, i, o, n);
|
|
let c = new (Ne()).URL(e, i), f = c.pathname, m = new (Ne()).URL(".", i).pathname;
|
|
if (!f.startsWith(m)) throw Np(r, e, i, o, n);
|
|
if (t === "") return c;
|
|
if (Kz.exec(t) !== null) {
|
|
let h = a ? r.replace("*", () => t) : r + t;
|
|
if (zz.exec(t) === null) {
|
|
if (!u) {
|
|
let d = a ? hb.call(mb, e, () => t) : e;
|
|
Jz(d, h, r, i, o, n, !1);
|
|
}
|
|
} else
|
|
yGe(h, r, i, o, n);
|
|
}
|
|
return a ? new (Ne()).URL(hb.call(mb, c.href, () => t)) : new (Ne()).URL(t, c);
|
|
}
|
|
s(gGe, "resolvePackageTargetString");
|
|
function bGe(e) {
|
|
let t = Number(e);
|
|
return `${t}` !== e ? !1 : t >= 0 && t < 4294967295;
|
|
}
|
|
s(bGe, "isArrayIndex");
|
|
function Tc(e, t, r, i, n, a, o, u, l) {
|
|
if (typeof t == "string")
|
|
return gGe(t, r, i, e, n, a, o, u, l);
|
|
if (Array.isArray(t)) {
|
|
let c = t;
|
|
if (c.length === 0) return null;
|
|
let f, m = -1;
|
|
for (; ++m < c.length; ) {
|
|
let h = c[m], d;
|
|
try {
|
|
d = Tc(e, h, r, i, n, a, o, u, l);
|
|
} catch (y) {
|
|
let p = y;
|
|
if (f = p, p.code === "ERR_INVALID_PACKAGE_TARGET") continue;
|
|
throw y;
|
|
}
|
|
if (d !== void 0) {
|
|
if (d === null) {
|
|
f = null;
|
|
continue;
|
|
}
|
|
return d;
|
|
}
|
|
}
|
|
if (f == null)
|
|
return null;
|
|
throw f;
|
|
}
|
|
if (typeof t == "object" && t !== null) {
|
|
let c = Object.getOwnPropertyNames(t), f = -1;
|
|
for (; ++f < c.length; ) {
|
|
let m = c[f];
|
|
if (bGe(m))
|
|
throw new nG((0, Ne().fileURLToPath)(e), n, '"exports" cannot contain numeric property keys.');
|
|
}
|
|
for (f = -1; ++f < c.length; ) {
|
|
let m = c[f];
|
|
if (m === "default" || l && l.has(m)) {
|
|
let h = t[m], d = Tc(e, h, r, i, n, a, o, u, l);
|
|
if (d === void 0) continue;
|
|
return d;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
if (t === null)
|
|
return null;
|
|
throw Np(i, t, e, o, n);
|
|
}
|
|
s(Tc, "resolvePackageTarget");
|
|
function DGe(e, t, r) {
|
|
if (typeof e == "string" || Array.isArray(e)) return !0;
|
|
if (typeof e != "object" || e === null) return !1;
|
|
let i = Object.getOwnPropertyNames(e), n = !1, a = 0, o = -1;
|
|
for (; ++o < i.length; ) {
|
|
let u = i[o], l = u === "" || u[0] !== ".";
|
|
if (a++ === 0)
|
|
n = l;
|
|
else if (n !== l)
|
|
throw new nG((0, Ne().fileURLToPath)(t), r, `"exports" cannot contain some keys starting with '.' and some not. The exports object m\
|
|
ust either be an object of package subpath keys or an object of main entry condition name keys only.`);
|
|
}
|
|
return n;
|
|
}
|
|
s(DGe, "isConditionalExportsMainSugar");
|
|
function vGe(e, t, r) {
|
|
if (lo().noDeprecation)
|
|
return;
|
|
let i = (0, Ne().fileURLToPath)(t);
|
|
Gz.has(i + "|" + e) || (Gz.add(i + "|" + e), lo().emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" \
|
|
field module resolution of the package at ${i}${r ? ` imported from ${(0, Ne().fileURLToPath)(r)}` : ""}. Mapping specifiers ending in "/" i\
|
|
s no longer supported.`, "DeprecationWarning", "DEP0155"));
|
|
}
|
|
s(vGe, "emitTrailingSlashPatternDeprecation");
|
|
function Yz(e, t, r, i, n) {
|
|
let a = r.exports;
|
|
if (DGe(a, e, i) && (a = {
|
|
".": a
|
|
}), sG.call(a, t) && !t.includes("*") && !t.endsWith("/")) {
|
|
let f = a[t], m = Tc(e, f, "", t, i, !1, !1, !1, n);
|
|
if (m == null)
|
|
throw CP(t, e, i);
|
|
return m;
|
|
}
|
|
let o = "", u = "", l = Object.getOwnPropertyNames(a), c = -1;
|
|
for (; ++c < l.length; ) {
|
|
let f = l[c], m = f.indexOf("*");
|
|
if (m !== -1 && t.startsWith(f.slice(0, m))) {
|
|
t.endsWith("/") && vGe(t, e, i);
|
|
let h = f.slice(m + 1);
|
|
t.length >= f.length && t.endsWith(h) && oG(o, f) === 1 && f.lastIndexOf("*") === m && (o = f, u = t.slice(m, t.length - h.length));
|
|
}
|
|
}
|
|
if (o) {
|
|
let f = a[o], m = Tc(e, f, u, o, i, !0, !1, t.endsWith("/"), n);
|
|
if (m == null)
|
|
throw CP(t, e, i);
|
|
return m;
|
|
}
|
|
throw CP(t, e, i);
|
|
}
|
|
s(Yz, "packageExportsResolve");
|
|
function oG(e, t) {
|
|
let r = e.indexOf("*"), i = t.indexOf("*"), n = r === -1 ? e.length : r + 1, a = i === -1 ? t.length : i + 1;
|
|
return n > a ? -1 : a > n || r === -1 ? 1 : i === -1 || e.length > t.length ? -1 : t.length > e.length ? 1 : 0;
|
|
}
|
|
s(oG, "patternKeyCompare");
|
|
function EGe(e, t, r) {
|
|
if (e === "#" || e.startsWith("#/") || e.endsWith("/")) {
|
|
let a = "is not a valid internal imports specifier name";
|
|
throw new bb(e, a, (0, Ne().fileURLToPath)(t));
|
|
}
|
|
let i, n = AP(t);
|
|
if (n.exists) {
|
|
i = (0, Ne().pathToFileURL)(n.pjsonPath);
|
|
let a = n.imports;
|
|
if (a)
|
|
if (sG.call(a, e) && !e.includes("*")) {
|
|
let o = Tc(i, a[e], "", e, t, !1, !0, !1, r);
|
|
if (o != null)
|
|
return o;
|
|
} else {
|
|
let o = "", u = "", l = Object.getOwnPropertyNames(a), c = -1;
|
|
for (; ++c < l.length; ) {
|
|
let f = l[c], m = f.indexOf("*");
|
|
if (m !== -1 && e.startsWith(f.slice(0, -1))) {
|
|
let h = f.slice(m + 1);
|
|
e.length >= f.length && e.endsWith(h) && oG(o, f) === 1 && f.lastIndexOf("*") === m && (o = f, u = e.slice(m, e.length - h.length));
|
|
}
|
|
}
|
|
if (o) {
|
|
let f = a[o], m = Tc(i, f, u, o, t, !0, !0, !1, r);
|
|
if (m != null)
|
|
return m;
|
|
}
|
|
}
|
|
}
|
|
throw mGe(e, i, t);
|
|
}
|
|
s(EGe, "packageImportsResolve");
|
|
function xGe(e, t) {
|
|
let r = e.indexOf("/"), i = !0, n = !1;
|
|
e[0] === "@" && (n = !0, r === -1 || e.length === 0 ? i = !1 : r = e.indexOf("/", r + 1));
|
|
let a = r === -1 ? e : e.slice(0, r);
|
|
if (cGe.exec(a) !== null && (i = !1), !i)
|
|
throw new bb(e, "is not a valid package name", (0, Ne().fileURLToPath)(t));
|
|
let o = "." + (r === -1 ? "" : e.slice(r));
|
|
return {
|
|
packageName: a,
|
|
packageSubpath: o,
|
|
isScoped: n
|
|
};
|
|
}
|
|
s(xGe, "parsePackageName");
|
|
function uG(e, t, r) {
|
|
if (gb().builtinModules.includes(e))
|
|
return new (Ne()).URL("node:" + e);
|
|
let {
|
|
packageName: i,
|
|
packageSubpath: n,
|
|
isScoped: a
|
|
} = xGe(e, t), o = AP(t);
|
|
if (o.exists) {
|
|
let f = (0, Ne().pathToFileURL)(o.pjsonPath);
|
|
if (o.name === i && o.exports !== void 0 && o.exports !== null)
|
|
return Yz(f, n, o, t, r);
|
|
}
|
|
let u = new (Ne()).URL("./node_modules/" + i + "/package.json", t), l = (0, Ne().fileURLToPath)(u), c;
|
|
do {
|
|
let f = aG(l.slice(0, -13));
|
|
if (!f || !f.isDirectory()) {
|
|
c = l, u = new (Ne()).URL((a ? "../../../../node_modules/" : "../../../node_modules/") + i + "/package.json", u), l = (0, Ne().fileURLToPath)(
|
|
u);
|
|
continue;
|
|
}
|
|
let m = tG(l, {
|
|
base: t,
|
|
specifier: e
|
|
});
|
|
return m.exports !== void 0 && m.exports !== null ? Yz(u, n, m, t, r) : n === "." ? pGe(u, m, t) : new (Ne()).URL(n, u);
|
|
} while (l.length !== c.length);
|
|
throw new _P(i, (0, Ne().fileURLToPath)(t), !1);
|
|
}
|
|
s(uG, "packageResolve");
|
|
function SGe(e) {
|
|
return e[0] === "." && (e.length === 1 || e[1] === "/" || e[1] === "." && (e.length === 2 || e[2] === "/"));
|
|
}
|
|
s(SGe, "isRelativeSpecifier");
|
|
function PP(e) {
|
|
return e === "" ? !1 : e[0] === "/" ? !0 : SGe(e);
|
|
}
|
|
s(PP, "shouldBeTreatedAsRelativeOrAbsolutePath");
|
|
function lG(e, t, r, i) {
|
|
let n = t.protocol, o = n === "data:" || n === "http:" || n === "https:", u;
|
|
if (PP(e))
|
|
try {
|
|
u = new (Ne()).URL(e, t);
|
|
} catch (l) {
|
|
let c = new Hz(e, t);
|
|
throw c.cause = l, c;
|
|
}
|
|
else if (n === "file:" && e[0] === "#")
|
|
u = EGe(e, t, r);
|
|
else
|
|
try {
|
|
u = new (Ne()).URL(e);
|
|
} catch (l) {
|
|
if (o && !gb().builtinModules.includes(e)) {
|
|
let c = new Hz(e, t);
|
|
throw c.cause = l, c;
|
|
}
|
|
u = uG(e, t, r);
|
|
}
|
|
return cs()(u !== void 0, "expected to be defined"), u.protocol !== "file:" ? u : hGe(u, t, i);
|
|
}
|
|
s(lG, "moduleResolve");
|
|
function TGe(e, t, r) {
|
|
if (r) {
|
|
let i = r.protocol;
|
|
if (i === "http:" || i === "https:") {
|
|
if (PP(e)) {
|
|
let n = t?.protocol;
|
|
if (n && n !== "https:" && n !== "http:")
|
|
throw new SP(e, r, "remote imports cannot import from a local location.");
|
|
return {
|
|
url: t?.href || ""
|
|
};
|
|
}
|
|
throw gb().builtinModules.includes(e) ? new SP(e, r, "remote imports cannot import from a local location.") : new SP(e, r, "only rel\
|
|
ative and absolute specifiers are supported.");
|
|
}
|
|
}
|
|
}
|
|
s(TGe, "checkIfDisallowedImport");
|
|
function CGe(e) {
|
|
return !!(e && typeof e == "object" && "href" in e && typeof e.href == "string" && "protocol" in e && typeof e.protocol == "string" && e.
|
|
href && e.protocol);
|
|
}
|
|
s(CGe, "isURL");
|
|
function wGe(e) {
|
|
if (e !== void 0 && typeof e != "string" && !CGe(e))
|
|
throw new Yr.ERR_INVALID_ARG_TYPE("parentURL", ["string", "URL"], e);
|
|
}
|
|
s(wGe, "throwIfInvalidParentURL");
|
|
function AGe(e, t = {}) {
|
|
let {
|
|
parentURL: r
|
|
} = t;
|
|
cs()(r !== void 0, "expected `parentURL` to be defined"), wGe(r);
|
|
let i;
|
|
if (r)
|
|
try {
|
|
i = new (Ne()).URL(r);
|
|
} catch {
|
|
}
|
|
let n, a;
|
|
try {
|
|
if (n = PP(e) ? new (Ne()).URL(e, i) : new (Ne()).URL(e), a = n.protocol, a === "data:")
|
|
return {
|
|
url: n.href,
|
|
format: null
|
|
};
|
|
} catch {
|
|
}
|
|
let o = TGe(e, n, i);
|
|
if (o) return o;
|
|
if (a === void 0 && n && (a = n.protocol), a === "node:")
|
|
return {
|
|
url: e
|
|
};
|
|
if (n && n.protocol === "node:") return {
|
|
url: e
|
|
};
|
|
let u = sGe(t.conditions), l = lG(e, new (Ne()).URL(r), u, !1);
|
|
return {
|
|
url: l.href,
|
|
format: rG(l, {
|
|
parentURL: r
|
|
})
|
|
};
|
|
}
|
|
s(AGe, "defaultResolve");
|
|
function _Ge(e, t) {
|
|
if (!t)
|
|
throw new Error("Please pass `parent`: `import-meta-resolve` cannot ponyfill that");
|
|
try {
|
|
return AGe(e, {
|
|
parentURL: t
|
|
}).url;
|
|
} catch (r) {
|
|
let i = r;
|
|
if ((i.code === "ERR_UNSUPPORTED_DIR_IMPORT" || i.code === "ERR_MODULE_NOT_FOUND") && typeof i.url == "string")
|
|
return i.url;
|
|
throw r;
|
|
}
|
|
}
|
|
s(_Ge, "resolve");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/files/plugins.js
|
|
var DG = E((co) => {
|
|
"use strict";
|
|
Object.defineProperty(co, "__esModule", {
|
|
value: !0
|
|
});
|
|
co.loadPlugin = qGe;
|
|
co.loadPreset = UGe;
|
|
co.resolvePreset = co.resolvePlugin = void 0;
|
|
function dG() {
|
|
let e = Jo();
|
|
return dG = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_debug"), e;
|
|
}
|
|
s(dG, "_debug");
|
|
function OP() {
|
|
let e = V("path");
|
|
return OP = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_path"), e;
|
|
}
|
|
s(OP, "_path");
|
|
var kP = Ya(), pG = DP();
|
|
function IP() {
|
|
let e = V("url");
|
|
return IP = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_url"), e;
|
|
}
|
|
s(IP, "_url");
|
|
var PGe = cG();
|
|
V("module");
|
|
function hG() {
|
|
let e = V("fs");
|
|
return hG = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_fs"), e;
|
|
}
|
|
s(hG, "_fs");
|
|
var mG = dG()("babel:config:loading:files:plugins"), FGe = /^module:/, IGe = /^(?!@|module:|[^/]+\/|babel-plugin-)/, OGe = /^(?!@|module:|[^/]+\/|babel-preset-)/,
|
|
kGe = /^(@babel\/)(?!plugin-|[^/]+\/)/, BGe = /^(@babel\/)(?!preset-|[^/]+\/)/, NGe = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-plugin(?:-|\/|$)|[^/]+\/)/,
|
|
MGe = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-preset(?:-|\/|$)|[^/]+\/)/, RGe = /^(@(?!babel$)[^/]+)$/, jGe = co.resolvePlugin = gG.bind(null,
|
|
"plugin"), LGe = co.resolvePreset = gG.bind(null, "preset");
|
|
function* qGe(e, t) {
|
|
let {
|
|
filepath: r,
|
|
loader: i
|
|
} = jGe(e, t, yield* (0, kP.isAsync)()), n = yield* bG("plugin", i, r);
|
|
return mG("Loaded plugin %o from %o.", e, t), {
|
|
filepath: r,
|
|
value: n
|
|
};
|
|
}
|
|
s(qGe, "loadPlugin");
|
|
function* UGe(e, t) {
|
|
let {
|
|
filepath: r,
|
|
loader: i
|
|
} = LGe(e, t, yield* (0, kP.isAsync)()), n = yield* bG("preset", i, r);
|
|
return mG("Loaded preset %o from %o.", e, t), {
|
|
filepath: r,
|
|
value: n
|
|
};
|
|
}
|
|
s(UGe, "loadPreset");
|
|
function FP(e, t) {
|
|
if (OP().isAbsolute(t)) return t;
|
|
let r = e === "preset";
|
|
return t.replace(r ? OGe : IGe, `babel-${e}-`).replace(r ? BGe : kGe, `$1${e}-`).replace(r ? MGe : NGe, `$1babel-${e}-`).replace(RGe, `$\
|
|
1/babel-${e}`).replace(FGe, "");
|
|
}
|
|
s(FP, "standardizeName");
|
|
function* yG(e, t) {
|
|
let r = FP(e, t), {
|
|
error: i,
|
|
value: n
|
|
} = yield r;
|
|
if (!i) return n;
|
|
if (i.code !== "MODULE_NOT_FOUND") throw i;
|
|
r !== t && !(yield t).error && (i.message += `
|
|
- If you want to resolve "${t}", use "module:${t}"`), (yield FP(e, "@babel/" + t)).error || (i.message += `
|
|
- Did you mean "@babel/${t}"?`);
|
|
let a = e === "preset" ? "plugin" : "preset";
|
|
if ((yield FP(a, t)).error || (i.message += `
|
|
- Did you accidentally pass a ${a} as a ${e}?`), e === "plugin") {
|
|
let o = r.replace("-proposal-", "-transform-");
|
|
o !== r && !(yield o).error && (i.message += `
|
|
- Did you mean "${o}"?`);
|
|
}
|
|
throw i.message += `
|
|
|
|
Make sure that all the Babel plugins and presets you are using
|
|
are defined as dependencies or devDependencies in your package.json
|
|
file. It's possible that the missing plugin is loaded by a preset
|
|
you are using that forgot to add the plugin to its dependencies: you
|
|
can workaround this problem by explicitly adding the missing package
|
|
to your top-level package.json.
|
|
`, i;
|
|
}
|
|
s(yG, "resolveAlternativesHelper");
|
|
function WGe(e, t) {
|
|
try {
|
|
return t ? {
|
|
error: null,
|
|
value: (((r, i) => (r = r.split("."), i = i.split("."), +r[0] > +i[0] || r[0] == i[0] && +r[1] >= +i[1]))(process.versions.node, "8.\
|
|
9") ? V.resolve : (r, {
|
|
paths: [i]
|
|
}, n = V("module")) => {
|
|
let a = n._findPath(r, n._nodeModulePaths(i).concat(i));
|
|
if (a) return a;
|
|
throw a = new Error(`Cannot resolve module '${r}'`), a.code = "MODULE_NOT_FOUND", a;
|
|
})(e, {
|
|
paths: [t]
|
|
})
|
|
} : {
|
|
error: null,
|
|
value: V.resolve(e)
|
|
};
|
|
} catch (r) {
|
|
return {
|
|
error: r,
|
|
value: null
|
|
};
|
|
}
|
|
}
|
|
s(WGe, "tryRequireResolve");
|
|
function $Ge(e, t) {
|
|
try {
|
|
return {
|
|
error: null,
|
|
value: (0, PGe.resolve)(e, t)
|
|
};
|
|
} catch (r) {
|
|
return {
|
|
error: r,
|
|
value: null
|
|
};
|
|
}
|
|
}
|
|
s($Ge, "tryImportMetaResolve");
|
|
function fG(e, t, r) {
|
|
let i = yG(e, t), n = i.next();
|
|
for (; !n.done; )
|
|
n = i.next(WGe(n.value, r));
|
|
return {
|
|
loader: "require",
|
|
filepath: n.value
|
|
};
|
|
}
|
|
s(fG, "resolveStandardizedNameForRequire");
|
|
function VGe(e, t, r) {
|
|
let i = (0, IP().pathToFileURL)(OP().join(r, "./babel-virtual-resolve-base.js")).href, n = yG(e, t), a = n.next();
|
|
for (; !a.done; )
|
|
a = n.next($Ge(a.value, i));
|
|
return {
|
|
loader: "auto",
|
|
filepath: (0, IP().fileURLToPath)(a.value)
|
|
};
|
|
}
|
|
s(VGe, "resolveStandardizedNameForImport");
|
|
function gG(e, t, r, i) {
|
|
if (!pG.supportsESM || !i)
|
|
return fG(e, t, r);
|
|
try {
|
|
let n = VGe(e, t, r);
|
|
if (!(0, hG().existsSync)(n.filepath))
|
|
throw Object.assign(new Error(`Could not resolve "${t}" in file ${r}.`), {
|
|
type: "MODULE_NOT_FOUND"
|
|
});
|
|
return n;
|
|
} catch (n) {
|
|
try {
|
|
return fG(e, t, r);
|
|
} catch (a) {
|
|
throw n.type === "MODULE_NOT_FOUND" ? n : a.type === "MODULE_NOT_FOUND" ? a : n;
|
|
}
|
|
}
|
|
}
|
|
s(gG, "resolveStandardizedName");
|
|
vb = /* @__PURE__ */ new Set();
|
|
var vb;
|
|
function* bG(e, t, r) {
|
|
if (!(yield* (0, kP.isAsync)()) && vb.has(r))
|
|
throw new Error(`Reentrant ${e} detected trying to load "${r}". This module is not ignored and is trying to load itself while compilin\
|
|
g itself, leading to a dependency cycle. We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.`);
|
|
try {
|
|
return vb.add(r), yield* (0, pG.default)(r, t, `You appear to be using a native ECMAScript module ${e}, which is only supported when r\
|
|
unning Babel asynchronously or when using the Node.js \`--experimental-require-module\` flag.`, `You appear to be using a ${e} that contains\
|
|
top-level await, which is only supported when running Babel asynchronously.`, !0);
|
|
} catch (i) {
|
|
throw i.message = `[BABEL]: ${i.message} (While processing: ${r})`, i;
|
|
} finally {
|
|
vb.delete(r);
|
|
}
|
|
}
|
|
s(bG, "requireModule");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/config/files/index.js
|
|
var dp = E((Ui) => {
|
|
"use strict";
|
|
Object.defineProperty(Ui, "__esModule", {
|
|
value: !0
|
|
});
|
|
Object.defineProperty(Ui, "ROOT_CONFIG_FILENAMES", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Cc.ROOT_CONFIG_FILENAMES;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Ui, "findConfigUpwards", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Cc.findConfigUpwards;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Ui, "findPackageData", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return HGe.findPackageData;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Ui, "findRelativeConfig", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Cc.findRelativeConfig;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Ui, "findRootConfig", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Cc.findRootConfig;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Ui, "loadConfig", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Cc.loadConfig;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Ui, "loadPlugin", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Eb.loadPlugin;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Ui, "loadPreset", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Eb.loadPreset;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Ui, "resolvePlugin", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Eb.resolvePlugin;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Ui, "resolvePreset", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Eb.resolvePreset;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(Ui, "resolveShowConfigPath", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return Cc.resolveShowConfigPath;
|
|
}, "get")
|
|
});
|
|
var HGe = OW(), Cc = Lz(), Eb = DG();
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transform.js
|
|
var EG = E((wc) => {
|
|
"use strict";
|
|
Object.defineProperty(wc, "__esModule", {
|
|
value: !0
|
|
});
|
|
wc.transform = void 0;
|
|
wc.transformAsync = JGe;
|
|
wc.transformSync = GGe;
|
|
function vG() {
|
|
let e = Ri();
|
|
return vG = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_gensync"), e;
|
|
}
|
|
s(vG, "_gensync");
|
|
var KGe = mc(), zGe = Hg(), xb = Js(), Sb = vG()(/* @__PURE__ */ s(function* (t, r) {
|
|
let i = yield* (0, KGe.default)(r);
|
|
return i === null ? null : yield* (0, zGe.run)(i, t);
|
|
}, "transform")), tgt = wc.transform = /* @__PURE__ */ s(function(t, r, i) {
|
|
let n, a;
|
|
if (typeof r == "function" ? (a = r, n = void 0) : (n = r, a = i), a === void 0)
|
|
return (0, xb.beginHiddenCallStack)(Sb.sync)(t, n);
|
|
(0, xb.beginHiddenCallStack)(Sb.errback)(t, n, a);
|
|
}, "transform");
|
|
function GGe(...e) {
|
|
return (0, xb.beginHiddenCallStack)(Sb.sync)(...e);
|
|
}
|
|
s(GGe, "transformSync");
|
|
function JGe(...e) {
|
|
return (0, xb.beginHiddenCallStack)(Sb.async)(...e);
|
|
}
|
|
s(JGe, "transformAsync");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/transform-ast.js
|
|
var SG = E((Ac) => {
|
|
"use strict";
|
|
Object.defineProperty(Ac, "__esModule", {
|
|
value: !0
|
|
});
|
|
Ac.transformFromAst = void 0;
|
|
Ac.transformFromAstAsync = QGe;
|
|
Ac.transformFromAstSync = ZGe;
|
|
function xG() {
|
|
let e = Ri();
|
|
return xG = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_gensync"), e;
|
|
}
|
|
s(xG, "_gensync");
|
|
var XGe = mc(), YGe = Hg(), Tb = Js(), Cb = xG()(function* (e, t, r) {
|
|
let i = yield* (0, XGe.default)(r);
|
|
if (i === null) return null;
|
|
if (!e) throw new Error("No AST given");
|
|
return yield* (0, YGe.run)(i, t, e);
|
|
}), ngt = Ac.transformFromAst = /* @__PURE__ */ s(function(t, r, i, n) {
|
|
let a, o;
|
|
if (typeof i == "function" ? (o = i, a = void 0) : (a = i, o = n), o === void 0)
|
|
return (0, Tb.beginHiddenCallStack)(Cb.sync)(t, r, a);
|
|
(0, Tb.beginHiddenCallStack)(Cb.errback)(t, r, a, o);
|
|
}, "transformFromAst");
|
|
function ZGe(...e) {
|
|
return (0, Tb.beginHiddenCallStack)(Cb.sync)(...e);
|
|
}
|
|
s(ZGe, "transformFromAstSync");
|
|
function QGe(...e) {
|
|
return (0, Tb.beginHiddenCallStack)(Cb.async)(...e);
|
|
}
|
|
s(QGe, "transformFromAstAsync");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/parse.js
|
|
var CG = E((_c) => {
|
|
"use strict";
|
|
Object.defineProperty(_c, "__esModule", {
|
|
value: !0
|
|
});
|
|
_c.parse = void 0;
|
|
_c.parseAsync = nJe;
|
|
_c.parseSync = iJe;
|
|
function TG() {
|
|
let e = Ri();
|
|
return TG = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_gensync"), e;
|
|
}
|
|
s(TG, "_gensync");
|
|
var eJe = mc(), tJe = Q_(), rJe = G_(), wb = Js(), Ab = TG()(/* @__PURE__ */ s(function* (t, r) {
|
|
let i = yield* (0, eJe.default)(r);
|
|
return i === null ? null : yield* (0, tJe.default)(i.passes, (0, rJe.default)(i), t);
|
|
}, "parse")), ogt = _c.parse = /* @__PURE__ */ s(function(t, r, i) {
|
|
if (typeof r == "function" && (i = r, r = void 0), i === void 0)
|
|
return (0, wb.beginHiddenCallStack)(Ab.sync)(t, r);
|
|
(0, wb.beginHiddenCallStack)(Ab.errback)(t, r, i);
|
|
}, "parse");
|
|
function iJe(...e) {
|
|
return (0, wb.beginHiddenCallStack)(Ab.sync)(...e);
|
|
}
|
|
s(iJe, "parseSync");
|
|
function nJe(...e) {
|
|
return (0, wb.beginHiddenCallStack)(Ab.async)(...e);
|
|
}
|
|
s(nJe, "parseAsync");
|
|
});
|
|
|
|
// ../node_modules/@babel/core/lib/index.js
|
|
var hr = E((et) => {
|
|
"use strict";
|
|
Object.defineProperty(et, "__esModule", {
|
|
value: !0
|
|
});
|
|
et.DEFAULT_EXTENSIONS = void 0;
|
|
Object.defineProperty(et, "File", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return sJe.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "buildExternalHelpers", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return aJe.default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "createConfigItem", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return fs.createConfigItem;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "createConfigItemAsync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return fs.createConfigItemAsync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "createConfigItemSync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return fs.createConfigItemSync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "getEnv", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return oJe.getEnv;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "loadOptions", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return fs.loadOptions;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "loadOptionsAsync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return fs.loadOptionsAsync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "loadOptionsSync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return fs.loadOptionsSync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "loadPartialConfig", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return fs.loadPartialConfig;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "loadPartialConfigAsync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return fs.loadPartialConfigAsync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "loadPartialConfigSync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return fs.loadPartialConfigSync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "parse", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return RP.parse;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "parseAsync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return RP.parseAsync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "parseSync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return RP.parseSync;
|
|
}, "get")
|
|
});
|
|
et.resolvePreset = et.resolvePlugin = void 0;
|
|
Object.defineProperty(et, "template", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return FG().default;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "tokTypes", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return _G().tokTypes;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "transform", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return BP.transform;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "transformAsync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return BP.transformAsync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "transformFile", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return NP.transformFile;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "transformFileAsync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return NP.transformFileAsync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "transformFileSync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return NP.transformFileSync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "transformFromAst", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return MP.transformFromAst;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "transformFromAstAsync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return MP.transformFromAstAsync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "transformFromAstSync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return MP.transformFromAstSync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "transformSync", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return BP.transformSync;
|
|
}, "get")
|
|
});
|
|
Object.defineProperty(et, "traverse", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return PG().default;
|
|
}, "get")
|
|
});
|
|
et.version = et.types = void 0;
|
|
var sJe = iA(), aJe = sW(), wG = dp(), oJe = M_();
|
|
function AG() {
|
|
let e = Ve();
|
|
return AG = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_types"), e;
|
|
}
|
|
s(AG, "_types");
|
|
Object.defineProperty(et, "types", {
|
|
enumerable: !0,
|
|
get: /* @__PURE__ */ s(function() {
|
|
return AG();
|
|
}, "get")
|
|
});
|
|
function _G() {
|
|
let e = zo();
|
|
return _G = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_parser"), e;
|
|
}
|
|
s(_G, "_parser");
|
|
function PG() {
|
|
let e = Ar();
|
|
return PG = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_traverse"), e;
|
|
}
|
|
s(PG, "_traverse");
|
|
function FG() {
|
|
let e = Od();
|
|
return FG = /* @__PURE__ */ s(function() {
|
|
return e;
|
|
}, "_template"), e;
|
|
}
|
|
s(FG, "_template");
|
|
var fs = mc(), BP = EG(), NP = y2(), MP = SG(), RP = CG(), cgt = et.version = "7.26.10", uJe = /* @__PURE__ */ s((e, t) => wG.resolvePlugin(
|
|
e, t, !1).filepath, "resolvePlugin");
|
|
et.resolvePlugin = uJe;
|
|
var lJe = /* @__PURE__ */ s((e, t) => wG.resolvePreset(e, t, !1).filepath, "resolvePreset");
|
|
et.resolvePreset = lJe;
|
|
var fgt = et.DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]);
|
|
et.OptionManager = class {
|
|
static {
|
|
s(this, "OptionManager");
|
|
}
|
|
init(t) {
|
|
return (0, fs.loadOptionsSync)(t);
|
|
}
|
|
}, et.Plugin = /* @__PURE__ */ s(function(t) {
|
|
throw new Error(`The (${t}) Babel 5 plugin is being run with an unsupported Babel version.`);
|
|
}, "Plugin");
|
|
});
|
|
|
|
// ../node_modules/zod/lib/helpers/util.js
|
|
var jp = E((Wt) => {
|
|
"use strict";
|
|
Object.defineProperty(Wt, "__esModule", { value: !0 });
|
|
Wt.getParsedType = Wt.ZodParsedType = Wt.objectUtil = Wt.util = void 0;
|
|
var KP;
|
|
(function(e) {
|
|
e.assertEqual = (n) => n;
|
|
function t(n) {
|
|
}
|
|
s(t, "assertIs"), e.assertIs = t;
|
|
function r(n) {
|
|
throw new Error();
|
|
}
|
|
s(r, "assertNever"), e.assertNever = r, e.arrayToEnum = (n) => {
|
|
let a = {};
|
|
for (let o of n)
|
|
a[o] = o;
|
|
return a;
|
|
}, e.getValidEnumValues = (n) => {
|
|
let a = e.objectKeys(n).filter((u) => typeof n[n[u]] != "number"), o = {};
|
|
for (let u of a)
|
|
o[u] = n[u];
|
|
return e.objectValues(o);
|
|
}, e.objectValues = (n) => e.objectKeys(n).map(function(a) {
|
|
return n[a];
|
|
}), e.objectKeys = typeof Object.keys == "function" ? (n) => Object.keys(n) : (n) => {
|
|
let a = [];
|
|
for (let o in n)
|
|
Object.prototype.hasOwnProperty.call(n, o) && a.push(o);
|
|
return a;
|
|
}, e.find = (n, a) => {
|
|
for (let o of n)
|
|
if (a(o))
|
|
return o;
|
|
}, e.isInteger = typeof Number.isInteger == "function" ? (n) => Number.isInteger(n) : (n) => typeof n == "number" && isFinite(n) && Math.
|
|
floor(n) === n;
|
|
function i(n, a = " | ") {
|
|
return n.map((o) => typeof o == "string" ? `'${o}'` : o).join(a);
|
|
}
|
|
s(i, "joinValues"), e.joinValues = i, e.jsonStringifyReplacer = (n, a) => typeof a == "bigint" ? a.toString() : a;
|
|
})(KP || (Wt.util = KP = {}));
|
|
var LG;
|
|
(function(e) {
|
|
e.mergeShapes = (t, r) => ({
|
|
...t,
|
|
...r
|
|
// second overwrites first
|
|
});
|
|
})(LG || (Wt.objectUtil = LG = {}));
|
|
Wt.ZodParsedType = KP.arrayToEnum([
|
|
"string",
|
|
"nan",
|
|
"number",
|
|
"integer",
|
|
"float",
|
|
"boolean",
|
|
"date",
|
|
"bigint",
|
|
"symbol",
|
|
"function",
|
|
"undefined",
|
|
"null",
|
|
"array",
|
|
"object",
|
|
"unknown",
|
|
"promise",
|
|
"void",
|
|
"never",
|
|
"map",
|
|
"set"
|
|
]);
|
|
var EJe = /* @__PURE__ */ s((e) => {
|
|
switch (typeof e) {
|
|
case "undefined":
|
|
return Wt.ZodParsedType.undefined;
|
|
case "string":
|
|
return Wt.ZodParsedType.string;
|
|
case "number":
|
|
return isNaN(e) ? Wt.ZodParsedType.nan : Wt.ZodParsedType.number;
|
|
case "boolean":
|
|
return Wt.ZodParsedType.boolean;
|
|
case "function":
|
|
return Wt.ZodParsedType.function;
|
|
case "bigint":
|
|
return Wt.ZodParsedType.bigint;
|
|
case "symbol":
|
|
return Wt.ZodParsedType.symbol;
|
|
case "object":
|
|
return Array.isArray(e) ? Wt.ZodParsedType.array : e === null ? Wt.ZodParsedType.null : e.then && typeof e.then == "function" && e.catch &&
|
|
typeof e.catch == "function" ? Wt.ZodParsedType.promise : typeof Map < "u" && e instanceof Map ? Wt.ZodParsedType.map : typeof Set <
|
|
"u" && e instanceof Set ? Wt.ZodParsedType.set : typeof Date < "u" && e instanceof Date ? Wt.ZodParsedType.date : Wt.ZodParsedType.object;
|
|
default:
|
|
return Wt.ZodParsedType.unknown;
|
|
}
|
|
}, "getParsedType");
|
|
Wt.getParsedType = EJe;
|
|
});
|
|
|
|
// ../node_modules/zod/lib/ZodError.js
|
|
var _b = E((fo) => {
|
|
"use strict";
|
|
Object.defineProperty(fo, "__esModule", { value: !0 });
|
|
fo.ZodError = fo.quotelessJson = fo.ZodIssueCode = void 0;
|
|
var qG = jp();
|
|
fo.ZodIssueCode = qG.util.arrayToEnum([
|
|
"invalid_type",
|
|
"invalid_literal",
|
|
"custom",
|
|
"invalid_union",
|
|
"invalid_union_discriminator",
|
|
"invalid_enum_value",
|
|
"unrecognized_keys",
|
|
"invalid_arguments",
|
|
"invalid_return_type",
|
|
"invalid_date",
|
|
"invalid_string",
|
|
"too_small",
|
|
"too_big",
|
|
"invalid_intersection_types",
|
|
"not_multiple_of",
|
|
"not_finite"
|
|
]);
|
|
var xJe = /* @__PURE__ */ s((e) => JSON.stringify(e, null, 2).replace(/"([^"]+)":/g, "$1:"), "quotelessJson");
|
|
fo.quotelessJson = xJe;
|
|
var Lp = class e extends Error {
|
|
static {
|
|
s(this, "ZodError");
|
|
}
|
|
get errors() {
|
|
return this.issues;
|
|
}
|
|
constructor(t) {
|
|
super(), this.issues = [], this.addIssue = (i) => {
|
|
this.issues = [...this.issues, i];
|
|
}, this.addIssues = (i = []) => {
|
|
this.issues = [...this.issues, ...i];
|
|
};
|
|
let r = new.target.prototype;
|
|
Object.setPrototypeOf ? Object.setPrototypeOf(this, r) : this.__proto__ = r, this.name = "ZodError", this.issues = t;
|
|
}
|
|
format(t) {
|
|
let r = t || function(a) {
|
|
return a.message;
|
|
}, i = { _errors: [] }, n = /* @__PURE__ */ s((a) => {
|
|
for (let o of a.issues)
|
|
if (o.code === "invalid_union")
|
|
o.unionErrors.map(n);
|
|
else if (o.code === "invalid_return_type")
|
|
n(o.returnTypeError);
|
|
else if (o.code === "invalid_arguments")
|
|
n(o.argumentsError);
|
|
else if (o.path.length === 0)
|
|
i._errors.push(r(o));
|
|
else {
|
|
let u = i, l = 0;
|
|
for (; l < o.path.length; ) {
|
|
let c = o.path[l];
|
|
l === o.path.length - 1 ? (u[c] = u[c] || { _errors: [] }, u[c]._errors.push(r(o))) : u[c] = u[c] || { _errors: [] }, u = u[c],
|
|
l++;
|
|
}
|
|
}
|
|
}, "processError");
|
|
return n(this), i;
|
|
}
|
|
static assert(t) {
|
|
if (!(t instanceof e))
|
|
throw new Error(`Not a ZodError: ${t}`);
|
|
}
|
|
toString() {
|
|
return this.message;
|
|
}
|
|
get message() {
|
|
return JSON.stringify(this.issues, qG.util.jsonStringifyReplacer, 2);
|
|
}
|
|
get isEmpty() {
|
|
return this.issues.length === 0;
|
|
}
|
|
flatten(t = (r) => r.message) {
|
|
let r = {}, i = [];
|
|
for (let n of this.issues)
|
|
n.path.length > 0 ? (r[n.path[0]] = r[n.path[0]] || [], r[n.path[0]].push(t(n))) : i.push(t(n));
|
|
return { formErrors: i, fieldErrors: r };
|
|
}
|
|
get formErrors() {
|
|
return this.flatten();
|
|
}
|
|
};
|
|
fo.ZodError = Lp;
|
|
Lp.create = (e) => new Lp(e);
|
|
});
|
|
|
|
// ../node_modules/zod/lib/locales/en.js
|
|
var GP = E((zP) => {
|
|
"use strict";
|
|
Object.defineProperty(zP, "__esModule", { value: !0 });
|
|
var Cu = jp(), li = _b(), SJe = /* @__PURE__ */ s((e, t) => {
|
|
let r;
|
|
switch (e.code) {
|
|
case li.ZodIssueCode.invalid_type:
|
|
e.received === Cu.ZodParsedType.undefined ? r = "Required" : r = `Expected ${e.expected}, received ${e.received}`;
|
|
break;
|
|
case li.ZodIssueCode.invalid_literal:
|
|
r = `Invalid literal value, expected ${JSON.stringify(e.expected, Cu.util.jsonStringifyReplacer)}`;
|
|
break;
|
|
case li.ZodIssueCode.unrecognized_keys:
|
|
r = `Unrecognized key(s) in object: ${Cu.util.joinValues(e.keys, ", ")}`;
|
|
break;
|
|
case li.ZodIssueCode.invalid_union:
|
|
r = "Invalid input";
|
|
break;
|
|
case li.ZodIssueCode.invalid_union_discriminator:
|
|
r = `Invalid discriminator value. Expected ${Cu.util.joinValues(e.options)}`;
|
|
break;
|
|
case li.ZodIssueCode.invalid_enum_value:
|
|
r = `Invalid enum value. Expected ${Cu.util.joinValues(e.options)}, received '${e.received}'`;
|
|
break;
|
|
case li.ZodIssueCode.invalid_arguments:
|
|
r = "Invalid function arguments";
|
|
break;
|
|
case li.ZodIssueCode.invalid_return_type:
|
|
r = "Invalid function return type";
|
|
break;
|
|
case li.ZodIssueCode.invalid_date:
|
|
r = "Invalid date";
|
|
break;
|
|
case li.ZodIssueCode.invalid_string:
|
|
typeof e.validation == "object" ? "includes" in e.validation ? (r = `Invalid input: must include "${e.validation.includes}"`, typeof e.
|
|
validation.position == "number" && (r = `${r} at one or more positions greater than or equal to ${e.validation.position}`)) : "start\
|
|
sWith" in e.validation ? r = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? r = `Invalid input\
|
|
: must end with "${e.validation.endsWith}"` : Cu.util.assertNever(e.validation) : e.validation !== "regex" ? r = `Invalid ${e.validation}` :
|
|
r = "Invalid";
|
|
break;
|
|
case li.ZodIssueCode.too_small:
|
|
e.type === "array" ? r = `Array must contain ${e.exact ? "exactly" : e.inclusive ? "at least" : "more than"} ${e.minimum} element(s)` :
|
|
e.type === "string" ? r = `String must contain ${e.exact ? "exactly" : e.inclusive ? "at least" : "over"} ${e.minimum} character(s)` :
|
|
e.type === "number" ? r = `Number must be ${e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "greater tha\
|
|
n "}${e.minimum}` : e.type === "date" ? r = `Date must be ${e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "gre\
|
|
ater than "}${new Date(Number(e.minimum))}` : r = "Invalid input";
|
|
break;
|
|
case li.ZodIssueCode.too_big:
|
|
e.type === "array" ? r = `Array must contain ${e.exact ? "exactly" : e.inclusive ? "at most" : "less than"} ${e.maximum} element(s)` :
|
|
e.type === "string" ? r = `String must contain ${e.exact ? "exactly" : e.inclusive ? "at most" : "under"} ${e.maximum} character(s)` :
|
|
e.type === "number" ? r = `Number must be ${e.exact ? "exactly" : e.inclusive ? "less than or equal to" : "less than"} ${e.maximum}` :
|
|
e.type === "bigint" ? r = `BigInt must be ${e.exact ? "exactly" : e.inclusive ? "less than or equal to" : "less than"} ${e.maximum}` :
|
|
e.type === "date" ? r = `Date must be ${e.exact ? "exactly" : e.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(
|
|
Number(e.maximum))}` : r = "Invalid input";
|
|
break;
|
|
case li.ZodIssueCode.custom:
|
|
r = "Invalid input";
|
|
break;
|
|
case li.ZodIssueCode.invalid_intersection_types:
|
|
r = "Intersection results could not be merged";
|
|
break;
|
|
case li.ZodIssueCode.not_multiple_of:
|
|
r = `Number must be a multiple of ${e.multipleOf}`;
|
|
break;
|
|
case li.ZodIssueCode.not_finite:
|
|
r = "Number must be finite";
|
|
break;
|
|
default:
|
|
r = t.defaultError, Cu.util.assertNever(e);
|
|
}
|
|
return { message: r };
|
|
}, "errorMap");
|
|
zP.default = SJe;
|
|
});
|
|
|
|
// ../node_modules/zod/lib/errors.js
|
|
var Pb = E((ds) => {
|
|
"use strict";
|
|
var TJe = ds && ds.__importDefault || function(e) {
|
|
return e && e.__esModule ? e : { default: e };
|
|
};
|
|
Object.defineProperty(ds, "__esModule", { value: !0 });
|
|
ds.getErrorMap = ds.setErrorMap = ds.defaultErrorMap = void 0;
|
|
var UG = TJe(GP());
|
|
ds.defaultErrorMap = UG.default;
|
|
var WG = UG.default;
|
|
function CJe(e) {
|
|
WG = e;
|
|
}
|
|
s(CJe, "setErrorMap");
|
|
ds.setErrorMap = CJe;
|
|
function wJe() {
|
|
return WG;
|
|
}
|
|
s(wJe, "getErrorMap");
|
|
ds.getErrorMap = wJe;
|
|
});
|
|
|
|
// ../node_modules/zod/lib/helpers/parseUtil.js
|
|
var XP = E((It) => {
|
|
"use strict";
|
|
var AJe = It && It.__importDefault || function(e) {
|
|
return e && e.__esModule ? e : { default: e };
|
|
};
|
|
Object.defineProperty(It, "__esModule", { value: !0 });
|
|
It.isAsync = It.isValid = It.isDirty = It.isAborted = It.OK = It.DIRTY = It.INVALID = It.ParseStatus = It.addIssueToContext = It.EMPTY_PATH =
|
|
It.makeIssue = void 0;
|
|
var _Je = Pb(), $G = AJe(GP()), PJe = /* @__PURE__ */ s((e) => {
|
|
let { data: t, path: r, errorMaps: i, issueData: n } = e, a = [...r, ...n.path || []], o = {
|
|
...n,
|
|
path: a
|
|
};
|
|
if (n.message !== void 0)
|
|
return {
|
|
...n,
|
|
path: a,
|
|
message: n.message
|
|
};
|
|
let u = "", l = i.filter((c) => !!c).slice().reverse();
|
|
for (let c of l)
|
|
u = c(o, { data: t, defaultError: u }).message;
|
|
return {
|
|
...n,
|
|
path: a,
|
|
message: u
|
|
};
|
|
}, "makeIssue");
|
|
It.makeIssue = PJe;
|
|
It.EMPTY_PATH = [];
|
|
function FJe(e, t) {
|
|
let r = (0, _Je.getErrorMap)(), i = (0, It.makeIssue)({
|
|
issueData: t,
|
|
data: e.data,
|
|
path: e.path,
|
|
errorMaps: [
|
|
e.common.contextualErrorMap,
|
|
// contextual error map is first priority
|
|
e.schemaErrorMap,
|
|
// then schema-bound map if available
|
|
r,
|
|
// then global override map
|
|
r === $G.default ? void 0 : $G.default
|
|
// then global default map
|
|
].filter((n) => !!n)
|
|
});
|
|
e.common.issues.push(i);
|
|
}
|
|
s(FJe, "addIssueToContext");
|
|
It.addIssueToContext = FJe;
|
|
var JP = class e {
|
|
static {
|
|
s(this, "ParseStatus");
|
|
}
|
|
constructor() {
|
|
this.value = "valid";
|
|
}
|
|
dirty() {
|
|
this.value === "valid" && (this.value = "dirty");
|
|
}
|
|
abort() {
|
|
this.value !== "aborted" && (this.value = "aborted");
|
|
}
|
|
static mergeArray(t, r) {
|
|
let i = [];
|
|
for (let n of r) {
|
|
if (n.status === "aborted")
|
|
return It.INVALID;
|
|
n.status === "dirty" && t.dirty(), i.push(n.value);
|
|
}
|
|
return { status: t.value, value: i };
|
|
}
|
|
static async mergeObjectAsync(t, r) {
|
|
let i = [];
|
|
for (let n of r) {
|
|
let a = await n.key, o = await n.value;
|
|
i.push({
|
|
key: a,
|
|
value: o
|
|
});
|
|
}
|
|
return e.mergeObjectSync(t, i);
|
|
}
|
|
static mergeObjectSync(t, r) {
|
|
let i = {};
|
|
for (let n of r) {
|
|
let { key: a, value: o } = n;
|
|
if (a.status === "aborted" || o.status === "aborted")
|
|
return It.INVALID;
|
|
a.status === "dirty" && t.dirty(), o.status === "dirty" && t.dirty(), a.value !== "__proto__" && (typeof o.value < "u" || n.alwaysSet) &&
|
|
(i[a.value] = o.value);
|
|
}
|
|
return { status: t.value, value: i };
|
|
}
|
|
};
|
|
It.ParseStatus = JP;
|
|
It.INVALID = Object.freeze({
|
|
status: "aborted"
|
|
});
|
|
var IJe = /* @__PURE__ */ s((e) => ({ status: "dirty", value: e }), "DIRTY");
|
|
It.DIRTY = IJe;
|
|
var OJe = /* @__PURE__ */ s((e) => ({ status: "valid", value: e }), "OK");
|
|
It.OK = OJe;
|
|
var kJe = /* @__PURE__ */ s((e) => e.status === "aborted", "isAborted");
|
|
It.isAborted = kJe;
|
|
var BJe = /* @__PURE__ */ s((e) => e.status === "dirty", "isDirty");
|
|
It.isDirty = BJe;
|
|
var NJe = /* @__PURE__ */ s((e) => e.status === "valid", "isValid");
|
|
It.isValid = NJe;
|
|
var MJe = /* @__PURE__ */ s((e) => typeof Promise < "u" && e instanceof Promise, "isAsync");
|
|
It.isAsync = MJe;
|
|
});
|
|
|
|
// ../node_modules/zod/lib/helpers/typeAliases.js
|
|
var HG = E((VG) => {
|
|
"use strict";
|
|
Object.defineProperty(VG, "__esModule", { value: !0 });
|
|
});
|
|
|
|
// ../node_modules/zod/lib/helpers/errorUtil.js
|
|
var zG = E((Fb) => {
|
|
"use strict";
|
|
Object.defineProperty(Fb, "__esModule", { value: !0 });
|
|
Fb.errorUtil = void 0;
|
|
var KG;
|
|
(function(e) {
|
|
e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t?.message;
|
|
})(KG || (Fb.errorUtil = KG = {}));
|
|
});
|
|
|
|
// ../node_modules/zod/lib/types.js
|
|
var aJ = E((H) => {
|
|
"use strict";
|
|
var Ob = H && H.__classPrivateFieldGet || function(e, t, r, i) {
|
|
if (r === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
|
|
if (typeof t == "function" ? e !== t || !i : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did n\
|
|
ot declare it");
|
|
return r === "m" ? i : r === "a" ? i.call(e) : i ? i.value : t.get(e);
|
|
}, XG = H && H.__classPrivateFieldSet || function(e, t, r, i, n) {
|
|
if (i === "m") throw new TypeError("Private method is not writable");
|
|
if (i === "a" && !n) throw new TypeError("Private accessor was defined without a setter");
|
|
if (typeof t == "function" ? e !== t || !n : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did no\
|
|
t declare it");
|
|
return i === "a" ? n.call(e, r) : n ? n.value = r : t.set(e, r), r;
|
|
}, qp, Up;
|
|
Object.defineProperty(H, "__esModule", { value: !0 });
|
|
H.boolean = H.bigint = H.array = H.any = H.coerce = H.ZodFirstPartyTypeKind = H.late = H.ZodSchema = H.Schema = H.custom = H.ZodReadonly =
|
|
H.ZodPipeline = H.ZodBranded = H.BRAND = H.ZodNaN = H.ZodCatch = H.ZodDefault = H.ZodNullable = H.ZodOptional = H.ZodTransformer = H.ZodEffects =
|
|
H.ZodPromise = H.ZodNativeEnum = H.ZodEnum = H.ZodLiteral = H.ZodLazy = H.ZodFunction = H.ZodSet = H.ZodMap = H.ZodRecord = H.ZodTuple = H.
|
|
ZodIntersection = H.ZodDiscriminatedUnion = H.ZodUnion = H.ZodObject = H.ZodArray = H.ZodVoid = H.ZodNever = H.ZodUnknown = H.ZodAny = H.ZodNull =
|
|
H.ZodUndefined = H.ZodSymbol = H.ZodDate = H.ZodBoolean = H.ZodBigInt = H.ZodNumber = H.ZodString = H.datetimeRegex = H.ZodType = void 0;
|
|
H.NEVER = H.void = H.unknown = H.union = H.undefined = H.tuple = H.transformer = H.symbol = H.string = H.strictObject = H.set = H.record =
|
|
H.promise = H.preprocess = H.pipeline = H.ostring = H.optional = H.onumber = H.oboolean = H.object = H.number = H.nullable = H.null = H.never =
|
|
H.nativeEnum = H.nan = H.map = H.literal = H.lazy = H.intersection = H.instanceof = H.function = H.enum = H.effect = H.discriminatedUnion =
|
|
H.date = void 0;
|
|
var Ib = Pb(), je = zG(), z = XP(), Se = jp(), Ee = _b(), pn = class {
|
|
static {
|
|
s(this, "ParseInputLazyPath");
|
|
}
|
|
constructor(t, r, i, n) {
|
|
this._cachedPath = [], this.parent = t, this.data = r, this._path = i, this._key = n;
|
|
}
|
|
get path() {
|
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.
|
|
push(...this._path, this._key)), this._cachedPath;
|
|
}
|
|
}, GG = /* @__PURE__ */ s((e, t) => {
|
|
if ((0, z.isValid)(t))
|
|
return { success: !0, data: t.value };
|
|
if (!e.common.issues.length)
|
|
throw new Error("Validation failed but no issues detected.");
|
|
return {
|
|
success: !1,
|
|
get error() {
|
|
if (this._error)
|
|
return this._error;
|
|
let r = new Ee.ZodError(e.common.issues);
|
|
return this._error = r, this._error;
|
|
}
|
|
};
|
|
}, "handleResult");
|
|
function Ze(e) {
|
|
if (!e)
|
|
return {};
|
|
let { errorMap: t, invalid_type_error: r, required_error: i, description: n } = e;
|
|
if (t && (r || i))
|
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
return t ? { errorMap: t, description: n } : { errorMap: /* @__PURE__ */ s((o, u) => {
|
|
var l, c;
|
|
let { message: f } = e;
|
|
return o.code === "invalid_enum_value" ? { message: f ?? u.defaultError } : typeof u.data > "u" ? { message: (l = f ?? i) !== null && l !==
|
|
void 0 ? l : u.defaultError } : o.code !== "invalid_type" ? { message: u.defaultError } : { message: (c = f ?? r) !== null && c !== void 0 ?
|
|
c : u.defaultError };
|
|
}, "customMap"), description: n };
|
|
}
|
|
s(Ze, "processCreateParams");
|
|
var Qe = class {
|
|
static {
|
|
s(this, "ZodType");
|
|
}
|
|
get description() {
|
|
return this._def.description;
|
|
}
|
|
_getType(t) {
|
|
return (0, Se.getParsedType)(t.data);
|
|
}
|
|
_getOrReturnCtx(t, r) {
|
|
return r || {
|
|
common: t.parent.common,
|
|
data: t.data,
|
|
parsedType: (0, Se.getParsedType)(t.data),
|
|
schemaErrorMap: this._def.errorMap,
|
|
path: t.path,
|
|
parent: t.parent
|
|
};
|
|
}
|
|
_processInputParams(t) {
|
|
return {
|
|
status: new z.ParseStatus(),
|
|
ctx: {
|
|
common: t.parent.common,
|
|
data: t.data,
|
|
parsedType: (0, Se.getParsedType)(t.data),
|
|
schemaErrorMap: this._def.errorMap,
|
|
path: t.path,
|
|
parent: t.parent
|
|
}
|
|
};
|
|
}
|
|
_parseSync(t) {
|
|
let r = this._parse(t);
|
|
if ((0, z.isAsync)(r))
|
|
throw new Error("Synchronous parse encountered promise.");
|
|
return r;
|
|
}
|
|
_parseAsync(t) {
|
|
let r = this._parse(t);
|
|
return Promise.resolve(r);
|
|
}
|
|
parse(t, r) {
|
|
let i = this.safeParse(t, r);
|
|
if (i.success)
|
|
return i.data;
|
|
throw i.error;
|
|
}
|
|
safeParse(t, r) {
|
|
var i;
|
|
let n = {
|
|
common: {
|
|
issues: [],
|
|
async: (i = r?.async) !== null && i !== void 0 ? i : !1,
|
|
contextualErrorMap: r?.errorMap
|
|
},
|
|
path: r?.path || [],
|
|
schemaErrorMap: this._def.errorMap,
|
|
parent: null,
|
|
data: t,
|
|
parsedType: (0, Se.getParsedType)(t)
|
|
}, a = this._parseSync({ data: t, path: n.path, parent: n });
|
|
return GG(n, a);
|
|
}
|
|
"~validate"(t) {
|
|
var r, i;
|
|
let n = {
|
|
common: {
|
|
issues: [],
|
|
async: !!this["~standard"].async
|
|
},
|
|
path: [],
|
|
schemaErrorMap: this._def.errorMap,
|
|
parent: null,
|
|
data: t,
|
|
parsedType: (0, Se.getParsedType)(t)
|
|
};
|
|
if (!this["~standard"].async)
|
|
try {
|
|
let a = this._parseSync({ data: t, path: [], parent: n });
|
|
return (0, z.isValid)(a) ? {
|
|
value: a.value
|
|
} : {
|
|
issues: n.common.issues
|
|
};
|
|
} catch (a) {
|
|
!((i = (r = a?.message) === null || r === void 0 ? void 0 : r.toLowerCase()) === null || i === void 0) && i.includes("encountered") &&
|
|
(this["~standard"].async = !0), n.common = {
|
|
issues: [],
|
|
async: !0
|
|
};
|
|
}
|
|
return this._parseAsync({ data: t, path: [], parent: n }).then((a) => (0, z.isValid)(a) ? {
|
|
value: a.value
|
|
} : {
|
|
issues: n.common.issues
|
|
});
|
|
}
|
|
async parseAsync(t, r) {
|
|
let i = await this.safeParseAsync(t, r);
|
|
if (i.success)
|
|
return i.data;
|
|
throw i.error;
|
|
}
|
|
async safeParseAsync(t, r) {
|
|
let i = {
|
|
common: {
|
|
issues: [],
|
|
contextualErrorMap: r?.errorMap,
|
|
async: !0
|
|
},
|
|
path: r?.path || [],
|
|
schemaErrorMap: this._def.errorMap,
|
|
parent: null,
|
|
data: t,
|
|
parsedType: (0, Se.getParsedType)(t)
|
|
}, n = this._parse({ data: t, path: i.path, parent: i }), a = await ((0, z.isAsync)(n) ? n : Promise.resolve(n));
|
|
return GG(i, a);
|
|
}
|
|
refine(t, r) {
|
|
let i = /* @__PURE__ */ s((n) => typeof r == "string" || typeof r > "u" ? { message: r } : typeof r == "function" ? r(n) : r, "getIssu\
|
|
eProperties");
|
|
return this._refinement((n, a) => {
|
|
let o = t(n), u = /* @__PURE__ */ s(() => a.addIssue({
|
|
code: Ee.ZodIssueCode.custom,
|
|
...i(n)
|
|
}), "setError");
|
|
return typeof Promise < "u" && o instanceof Promise ? o.then((l) => l ? !0 : (u(), !1)) : o ? !0 : (u(), !1);
|
|
});
|
|
}
|
|
refinement(t, r) {
|
|
return this._refinement((i, n) => t(i) ? !0 : (n.addIssue(typeof r == "function" ? r(i, n) : r), !1));
|
|
}
|
|
_refinement(t) {
|
|
return new Wi({
|
|
schema: this,
|
|
typeName: Ge.ZodEffects,
|
|
effect: { type: "refinement", refinement: t }
|
|
});
|
|
}
|
|
superRefine(t) {
|
|
return this._refinement(t);
|
|
}
|
|
constructor(t) {
|
|
this.spa = this.safeParseAsync, this._def = t, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync =
|
|
this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.
|
|
bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.
|
|
bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.
|
|
promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(
|
|
this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe =
|
|
this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.
|
|
bind(this), this.isOptional = this.isOptional.bind(this), this["~standard"] = {
|
|
version: 1,
|
|
vendor: "zod",
|
|
validate: /* @__PURE__ */ s((r) => this["~validate"](r), "validate")
|
|
};
|
|
}
|
|
optional() {
|
|
return dn.create(this, this._def);
|
|
}
|
|
nullable() {
|
|
return hs.create(this, this._def);
|
|
}
|
|
nullish() {
|
|
return this.nullable().optional();
|
|
}
|
|
array() {
|
|
return da.create(this);
|
|
}
|
|
promise() {
|
|
return mo.create(this, this._def);
|
|
}
|
|
or(t) {
|
|
return Ou.create([this, t], this._def);
|
|
}
|
|
and(t) {
|
|
return ku.create(this, t, this._def);
|
|
}
|
|
transform(t) {
|
|
return new Wi({
|
|
...Ze(this._def),
|
|
schema: this,
|
|
typeName: Ge.ZodEffects,
|
|
effect: { type: "transform", transform: t }
|
|
});
|
|
}
|
|
default(t) {
|
|
let r = typeof t == "function" ? t : () => t;
|
|
return new ju({
|
|
...Ze(this._def),
|
|
innerType: this,
|
|
defaultValue: r,
|
|
typeName: Ge.ZodDefault
|
|
});
|
|
}
|
|
brand() {
|
|
return new Wp({
|
|
typeName: Ge.ZodBranded,
|
|
type: this,
|
|
...Ze(this._def)
|
|
});
|
|
}
|
|
catch(t) {
|
|
let r = typeof t == "function" ? t : () => t;
|
|
return new Lu({
|
|
...Ze(this._def),
|
|
innerType: this,
|
|
catchValue: r,
|
|
typeName: Ge.ZodCatch
|
|
});
|
|
}
|
|
describe(t) {
|
|
let r = this.constructor;
|
|
return new r({
|
|
...this._def,
|
|
description: t
|
|
});
|
|
}
|
|
pipe(t) {
|
|
return $p.create(this, t);
|
|
}
|
|
readonly() {
|
|
return qu.create(this);
|
|
}
|
|
isOptional() {
|
|
return this.safeParse(void 0).success;
|
|
}
|
|
isNullable() {
|
|
return this.safeParse(null).success;
|
|
}
|
|
};
|
|
H.ZodType = Qe;
|
|
H.Schema = Qe;
|
|
H.ZodSchema = Qe;
|
|
var RJe = /^c[^\s-]{8,}$/i, jJe = /^[0-9a-z]+$/, LJe = /^[0-9A-HJKMNP-TV-Z]{26}$/i, qJe = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,
|
|
UJe = /^[a-z0-9_-]{21}$/i, WJe = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, $Je = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,
|
|
VJe = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, HJe = "^(\\p{Extended_Pictographic}|\\p{Emoji_Co\
|
|
mponent})+$", YP, KJe = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
|
|
zJe = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
|
|
GJe = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,
|
|
JJe = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
|
|
XJe = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, YJe = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
|
|
YG = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469\
|
|
]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", ZJe = new RegExp(`^${YG}$`);
|
|
function ZG(e) {
|
|
let t = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
return e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision == null && (t = `${t}(\\.\\d+)?`), t;
|
|
}
|
|
s(ZG, "timeRegexSource");
|
|
function QJe(e) {
|
|
return new RegExp(`^${ZG(e)}$`);
|
|
}
|
|
s(QJe, "timeRegex");
|
|
function QG(e) {
|
|
let t = `${YG}T${ZG(e)}`, r = [];
|
|
return r.push(e.local ? "Z?" : "Z"), e.offset && r.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${r.join("|")})`, new RegExp(`^${t}$`);
|
|
}
|
|
s(QG, "datetimeRegex");
|
|
H.datetimeRegex = QG;
|
|
function eXe(e, t) {
|
|
return !!((t === "v4" || !t) && KJe.test(e) || (t === "v6" || !t) && GJe.test(e));
|
|
}
|
|
s(eXe, "isValidIP");
|
|
function tXe(e, t) {
|
|
if (!WJe.test(e))
|
|
return !1;
|
|
try {
|
|
let [r] = e.split("."), i = r.replace(/-/g, "+").replace(/_/g, "/").padEnd(r.length + (4 - r.length % 4) % 4, "="), n = JSON.parse(atob(
|
|
i));
|
|
return !(typeof n != "object" || n === null || !n.typ || !n.alg || t && n.alg !== t);
|
|
} catch {
|
|
return !1;
|
|
}
|
|
}
|
|
s(tXe, "isValidJWT");
|
|
function rXe(e, t) {
|
|
return !!((t === "v4" || !t) && zJe.test(e) || (t === "v6" || !t) && JJe.test(e));
|
|
}
|
|
s(rXe, "isValidCidr");
|
|
var po = class e extends Qe {
|
|
static {
|
|
s(this, "ZodString");
|
|
}
|
|
_parse(t) {
|
|
if (this._def.coerce && (t.data = String(t.data)), this._getType(t) !== Se.ZodParsedType.string) {
|
|
let a = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(a, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.string,
|
|
received: a.parsedType
|
|
}), z.INVALID;
|
|
}
|
|
let i = new z.ParseStatus(), n;
|
|
for (let a of this._def.checks)
|
|
if (a.kind === "min")
|
|
t.data.length < a.value && (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.too_small,
|
|
minimum: a.value,
|
|
type: "string",
|
|
inclusive: !0,
|
|
exact: !1,
|
|
message: a.message
|
|
}), i.dirty());
|
|
else if (a.kind === "max")
|
|
t.data.length > a.value && (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.too_big,
|
|
maximum: a.value,
|
|
type: "string",
|
|
inclusive: !0,
|
|
exact: !1,
|
|
message: a.message
|
|
}), i.dirty());
|
|
else if (a.kind === "length") {
|
|
let o = t.data.length > a.value, u = t.data.length < a.value;
|
|
(o || u) && (n = this._getOrReturnCtx(t, n), o ? (0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.too_big,
|
|
maximum: a.value,
|
|
type: "string",
|
|
inclusive: !0,
|
|
exact: !0,
|
|
message: a.message
|
|
}) : u && (0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.too_small,
|
|
minimum: a.value,
|
|
type: "string",
|
|
inclusive: !0,
|
|
exact: !0,
|
|
message: a.message
|
|
}), i.dirty());
|
|
} else if (a.kind === "email")
|
|
VJe.test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "email",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty());
|
|
else if (a.kind === "emoji")
|
|
YP || (YP = new RegExp(HJe, "u")), YP.test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "emoji",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty());
|
|
else if (a.kind === "uuid")
|
|
qJe.test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "uuid",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty());
|
|
else if (a.kind === "nanoid")
|
|
UJe.test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "nanoid",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty());
|
|
else if (a.kind === "cuid")
|
|
RJe.test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "cuid",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty());
|
|
else if (a.kind === "cuid2")
|
|
jJe.test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "cuid2",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty());
|
|
else if (a.kind === "ulid")
|
|
LJe.test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "ulid",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty());
|
|
else if (a.kind === "url")
|
|
try {
|
|
new URL(t.data);
|
|
} catch {
|
|
n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "url",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty();
|
|
}
|
|
else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(
|
|
n, {
|
|
validation: "regex",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty())) : a.kind === "trim" ? t.data = t.data.trim() : a.kind === "includes" ? t.data.includes(a.value, a.position) || (n = this.
|
|
_getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
validation: { includes: a.value, position: a.position },
|
|
message: a.message
|
|
}), i.dirty()) : a.kind === "toLowerCase" ? t.data = t.data.toLowerCase() : a.kind === "toUpperCase" ? t.data = t.data.toUpperCase() :
|
|
a.kind === "startsWith" ? t.data.startsWith(a.value) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
validation: { startsWith: a.value },
|
|
message: a.message
|
|
}), i.dirty()) : a.kind === "endsWith" ? t.data.endsWith(a.value) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
validation: { endsWith: a.value },
|
|
message: a.message
|
|
}), i.dirty()) : a.kind === "datetime" ? QG(a).test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
validation: "datetime",
|
|
message: a.message
|
|
}), i.dirty()) : a.kind === "date" ? ZJe.test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
validation: "date",
|
|
message: a.message
|
|
}), i.dirty()) : a.kind === "time" ? QJe(a).test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
validation: "time",
|
|
message: a.message
|
|
}), i.dirty()) : a.kind === "duration" ? $Je.test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "duration",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty()) : a.kind === "ip" ? eXe(t.data, a.version) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "ip",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty()) : a.kind === "jwt" ? tXe(t.data, a.alg) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "jwt",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty()) : a.kind === "cidr" ? rXe(t.data, a.version) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "cidr",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty()) : a.kind === "base64" ? XJe.test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "base64",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty()) : a.kind === "base64url" ? YJe.test(t.data) || (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
validation: "base64url",
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
message: a.message
|
|
}), i.dirty()) : Se.util.assertNever(a);
|
|
return { status: i.value, value: t.data };
|
|
}
|
|
_regex(t, r, i) {
|
|
return this.refinement((n) => t.test(n), {
|
|
validation: r,
|
|
code: Ee.ZodIssueCode.invalid_string,
|
|
...je.errorUtil.errToObj(i)
|
|
});
|
|
}
|
|
_addCheck(t) {
|
|
return new e({
|
|
...this._def,
|
|
checks: [...this._def.checks, t]
|
|
});
|
|
}
|
|
email(t) {
|
|
return this._addCheck({ kind: "email", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
url(t) {
|
|
return this._addCheck({ kind: "url", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
emoji(t) {
|
|
return this._addCheck({ kind: "emoji", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
uuid(t) {
|
|
return this._addCheck({ kind: "uuid", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
nanoid(t) {
|
|
return this._addCheck({ kind: "nanoid", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
cuid(t) {
|
|
return this._addCheck({ kind: "cuid", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
cuid2(t) {
|
|
return this._addCheck({ kind: "cuid2", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
ulid(t) {
|
|
return this._addCheck({ kind: "ulid", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
base64(t) {
|
|
return this._addCheck({ kind: "base64", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
base64url(t) {
|
|
return this._addCheck({
|
|
kind: "base64url",
|
|
...je.errorUtil.errToObj(t)
|
|
});
|
|
}
|
|
jwt(t) {
|
|
return this._addCheck({ kind: "jwt", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
ip(t) {
|
|
return this._addCheck({ kind: "ip", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
cidr(t) {
|
|
return this._addCheck({ kind: "cidr", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
datetime(t) {
|
|
var r, i;
|
|
return typeof t == "string" ? this._addCheck({
|
|
kind: "datetime",
|
|
precision: null,
|
|
offset: !1,
|
|
local: !1,
|
|
message: t
|
|
}) : this._addCheck({
|
|
kind: "datetime",
|
|
precision: typeof t?.precision > "u" ? null : t?.precision,
|
|
offset: (r = t?.offset) !== null && r !== void 0 ? r : !1,
|
|
local: (i = t?.local) !== null && i !== void 0 ? i : !1,
|
|
...je.errorUtil.errToObj(t?.message)
|
|
});
|
|
}
|
|
date(t) {
|
|
return this._addCheck({ kind: "date", message: t });
|
|
}
|
|
time(t) {
|
|
return typeof t == "string" ? this._addCheck({
|
|
kind: "time",
|
|
precision: null,
|
|
message: t
|
|
}) : this._addCheck({
|
|
kind: "time",
|
|
precision: typeof t?.precision > "u" ? null : t?.precision,
|
|
...je.errorUtil.errToObj(t?.message)
|
|
});
|
|
}
|
|
duration(t) {
|
|
return this._addCheck({ kind: "duration", ...je.errorUtil.errToObj(t) });
|
|
}
|
|
regex(t, r) {
|
|
return this._addCheck({
|
|
kind: "regex",
|
|
regex: t,
|
|
...je.errorUtil.errToObj(r)
|
|
});
|
|
}
|
|
includes(t, r) {
|
|
return this._addCheck({
|
|
kind: "includes",
|
|
value: t,
|
|
position: r?.position,
|
|
...je.errorUtil.errToObj(r?.message)
|
|
});
|
|
}
|
|
startsWith(t, r) {
|
|
return this._addCheck({
|
|
kind: "startsWith",
|
|
value: t,
|
|
...je.errorUtil.errToObj(r)
|
|
});
|
|
}
|
|
endsWith(t, r) {
|
|
return this._addCheck({
|
|
kind: "endsWith",
|
|
value: t,
|
|
...je.errorUtil.errToObj(r)
|
|
});
|
|
}
|
|
min(t, r) {
|
|
return this._addCheck({
|
|
kind: "min",
|
|
value: t,
|
|
...je.errorUtil.errToObj(r)
|
|
});
|
|
}
|
|
max(t, r) {
|
|
return this._addCheck({
|
|
kind: "max",
|
|
value: t,
|
|
...je.errorUtil.errToObj(r)
|
|
});
|
|
}
|
|
length(t, r) {
|
|
return this._addCheck({
|
|
kind: "length",
|
|
value: t,
|
|
...je.errorUtil.errToObj(r)
|
|
});
|
|
}
|
|
/**
|
|
* Equivalent to `.min(1)`
|
|
*/
|
|
nonempty(t) {
|
|
return this.min(1, je.errorUtil.errToObj(t));
|
|
}
|
|
trim() {
|
|
return new e({
|
|
...this._def,
|
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
});
|
|
}
|
|
toLowerCase() {
|
|
return new e({
|
|
...this._def,
|
|
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
});
|
|
}
|
|
toUpperCase() {
|
|
return new e({
|
|
...this._def,
|
|
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
});
|
|
}
|
|
get isDatetime() {
|
|
return !!this._def.checks.find((t) => t.kind === "datetime");
|
|
}
|
|
get isDate() {
|
|
return !!this._def.checks.find((t) => t.kind === "date");
|
|
}
|
|
get isTime() {
|
|
return !!this._def.checks.find((t) => t.kind === "time");
|
|
}
|
|
get isDuration() {
|
|
return !!this._def.checks.find((t) => t.kind === "duration");
|
|
}
|
|
get isEmail() {
|
|
return !!this._def.checks.find((t) => t.kind === "email");
|
|
}
|
|
get isURL() {
|
|
return !!this._def.checks.find((t) => t.kind === "url");
|
|
}
|
|
get isEmoji() {
|
|
return !!this._def.checks.find((t) => t.kind === "emoji");
|
|
}
|
|
get isUUID() {
|
|
return !!this._def.checks.find((t) => t.kind === "uuid");
|
|
}
|
|
get isNANOID() {
|
|
return !!this._def.checks.find((t) => t.kind === "nanoid");
|
|
}
|
|
get isCUID() {
|
|
return !!this._def.checks.find((t) => t.kind === "cuid");
|
|
}
|
|
get isCUID2() {
|
|
return !!this._def.checks.find((t) => t.kind === "cuid2");
|
|
}
|
|
get isULID() {
|
|
return !!this._def.checks.find((t) => t.kind === "ulid");
|
|
}
|
|
get isIP() {
|
|
return !!this._def.checks.find((t) => t.kind === "ip");
|
|
}
|
|
get isCIDR() {
|
|
return !!this._def.checks.find((t) => t.kind === "cidr");
|
|
}
|
|
get isBase64() {
|
|
return !!this._def.checks.find((t) => t.kind === "base64");
|
|
}
|
|
get isBase64url() {
|
|
return !!this._def.checks.find((t) => t.kind === "base64url");
|
|
}
|
|
get minLength() {
|
|
let t = null;
|
|
for (let r of this._def.checks)
|
|
r.kind === "min" && (t === null || r.value > t) && (t = r.value);
|
|
return t;
|
|
}
|
|
get maxLength() {
|
|
let t = null;
|
|
for (let r of this._def.checks)
|
|
r.kind === "max" && (t === null || r.value < t) && (t = r.value);
|
|
return t;
|
|
}
|
|
};
|
|
H.ZodString = po;
|
|
po.create = (e) => {
|
|
var t;
|
|
return new po({
|
|
checks: [],
|
|
typeName: Ge.ZodString,
|
|
coerce: (t = e?.coerce) !== null && t !== void 0 ? t : !1,
|
|
...Ze(e)
|
|
});
|
|
};
|
|
function iXe(e, t) {
|
|
let r = (e.toString().split(".")[1] || "").length, i = (t.toString().split(".")[1] || "").length, n = r > i ? r : i, a = parseInt(e.toFixed(
|
|
n).replace(".", "")), o = parseInt(t.toFixed(n).replace(".", ""));
|
|
return a % o / Math.pow(10, n);
|
|
}
|
|
s(iXe, "floatSafeRemainder");
|
|
var wu = class e extends Qe {
|
|
static {
|
|
s(this, "ZodNumber");
|
|
}
|
|
constructor() {
|
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
}
|
|
_parse(t) {
|
|
if (this._def.coerce && (t.data = Number(t.data)), this._getType(t) !== Se.ZodParsedType.number) {
|
|
let a = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(a, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.number,
|
|
received: a.parsedType
|
|
}), z.INVALID;
|
|
}
|
|
let i, n = new z.ParseStatus();
|
|
for (let a of this._def.checks)
|
|
a.kind === "int" ? Se.util.isInteger(t.data) || (i = this._getOrReturnCtx(t, i), (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: "integer",
|
|
received: "float",
|
|
message: a.message
|
|
}), n.dirty()) : a.kind === "min" ? (a.inclusive ? t.data < a.value : t.data <= a.value) && (i = this._getOrReturnCtx(t, i), (0, z.addIssueToContext)(
|
|
i, {
|
|
code: Ee.ZodIssueCode.too_small,
|
|
minimum: a.value,
|
|
type: "number",
|
|
inclusive: a.inclusive,
|
|
exact: !1,
|
|
message: a.message
|
|
}), n.dirty()) : a.kind === "max" ? (a.inclusive ? t.data > a.value : t.data >= a.value) && (i = this._getOrReturnCtx(t, i), (0, z.addIssueToContext)(
|
|
i, {
|
|
code: Ee.ZodIssueCode.too_big,
|
|
maximum: a.value,
|
|
type: "number",
|
|
inclusive: a.inclusive,
|
|
exact: !1,
|
|
message: a.message
|
|
}), n.dirty()) : a.kind === "multipleOf" ? iXe(t.data, a.value) !== 0 && (i = this._getOrReturnCtx(t, i), (0, z.addIssueToContext)(i,
|
|
{
|
|
code: Ee.ZodIssueCode.not_multiple_of,
|
|
multipleOf: a.value,
|
|
message: a.message
|
|
}), n.dirty()) : a.kind === "finite" ? Number.isFinite(t.data) || (i = this._getOrReturnCtx(t, i), (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.not_finite,
|
|
message: a.message
|
|
}), n.dirty()) : Se.util.assertNever(a);
|
|
return { status: n.value, value: t.data };
|
|
}
|
|
gte(t, r) {
|
|
return this.setLimit("min", t, !0, je.errorUtil.toString(r));
|
|
}
|
|
gt(t, r) {
|
|
return this.setLimit("min", t, !1, je.errorUtil.toString(r));
|
|
}
|
|
lte(t, r) {
|
|
return this.setLimit("max", t, !0, je.errorUtil.toString(r));
|
|
}
|
|
lt(t, r) {
|
|
return this.setLimit("max", t, !1, je.errorUtil.toString(r));
|
|
}
|
|
setLimit(t, r, i, n) {
|
|
return new e({
|
|
...this._def,
|
|
checks: [
|
|
...this._def.checks,
|
|
{
|
|
kind: t,
|
|
value: r,
|
|
inclusive: i,
|
|
message: je.errorUtil.toString(n)
|
|
}
|
|
]
|
|
});
|
|
}
|
|
_addCheck(t) {
|
|
return new e({
|
|
...this._def,
|
|
checks: [...this._def.checks, t]
|
|
});
|
|
}
|
|
int(t) {
|
|
return this._addCheck({
|
|
kind: "int",
|
|
message: je.errorUtil.toString(t)
|
|
});
|
|
}
|
|
positive(t) {
|
|
return this._addCheck({
|
|
kind: "min",
|
|
value: 0,
|
|
inclusive: !1,
|
|
message: je.errorUtil.toString(t)
|
|
});
|
|
}
|
|
negative(t) {
|
|
return this._addCheck({
|
|
kind: "max",
|
|
value: 0,
|
|
inclusive: !1,
|
|
message: je.errorUtil.toString(t)
|
|
});
|
|
}
|
|
nonpositive(t) {
|
|
return this._addCheck({
|
|
kind: "max",
|
|
value: 0,
|
|
inclusive: !0,
|
|
message: je.errorUtil.toString(t)
|
|
});
|
|
}
|
|
nonnegative(t) {
|
|
return this._addCheck({
|
|
kind: "min",
|
|
value: 0,
|
|
inclusive: !0,
|
|
message: je.errorUtil.toString(t)
|
|
});
|
|
}
|
|
multipleOf(t, r) {
|
|
return this._addCheck({
|
|
kind: "multipleOf",
|
|
value: t,
|
|
message: je.errorUtil.toString(r)
|
|
});
|
|
}
|
|
finite(t) {
|
|
return this._addCheck({
|
|
kind: "finite",
|
|
message: je.errorUtil.toString(t)
|
|
});
|
|
}
|
|
safe(t) {
|
|
return this._addCheck({
|
|
kind: "min",
|
|
inclusive: !0,
|
|
value: Number.MIN_SAFE_INTEGER,
|
|
message: je.errorUtil.toString(t)
|
|
})._addCheck({
|
|
kind: "max",
|
|
inclusive: !0,
|
|
value: Number.MAX_SAFE_INTEGER,
|
|
message: je.errorUtil.toString(t)
|
|
});
|
|
}
|
|
get minValue() {
|
|
let t = null;
|
|
for (let r of this._def.checks)
|
|
r.kind === "min" && (t === null || r.value > t) && (t = r.value);
|
|
return t;
|
|
}
|
|
get maxValue() {
|
|
let t = null;
|
|
for (let r of this._def.checks)
|
|
r.kind === "max" && (t === null || r.value < t) && (t = r.value);
|
|
return t;
|
|
}
|
|
get isInt() {
|
|
return !!this._def.checks.find((t) => t.kind === "int" || t.kind === "multipleOf" && Se.util.isInteger(t.value));
|
|
}
|
|
get isFinite() {
|
|
let t = null, r = null;
|
|
for (let i of this._def.checks) {
|
|
if (i.kind === "finite" || i.kind === "int" || i.kind === "multipleOf")
|
|
return !0;
|
|
i.kind === "min" ? (r === null || i.value > r) && (r = i.value) : i.kind === "max" && (t === null || i.value < t) && (t = i.value);
|
|
}
|
|
return Number.isFinite(r) && Number.isFinite(t);
|
|
}
|
|
};
|
|
H.ZodNumber = wu;
|
|
wu.create = (e) => new wu({
|
|
checks: [],
|
|
typeName: Ge.ZodNumber,
|
|
coerce: e?.coerce || !1,
|
|
...Ze(e)
|
|
});
|
|
var Au = class e extends Qe {
|
|
static {
|
|
s(this, "ZodBigInt");
|
|
}
|
|
constructor() {
|
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
}
|
|
_parse(t) {
|
|
if (this._def.coerce)
|
|
try {
|
|
t.data = BigInt(t.data);
|
|
} catch {
|
|
return this._getInvalidInput(t);
|
|
}
|
|
if (this._getType(t) !== Se.ZodParsedType.bigint)
|
|
return this._getInvalidInput(t);
|
|
let i, n = new z.ParseStatus();
|
|
for (let a of this._def.checks)
|
|
a.kind === "min" ? (a.inclusive ? t.data < a.value : t.data <= a.value) && (i = this._getOrReturnCtx(t, i), (0, z.addIssueToContext)(
|
|
i, {
|
|
code: Ee.ZodIssueCode.too_small,
|
|
type: "bigint",
|
|
minimum: a.value,
|
|
inclusive: a.inclusive,
|
|
message: a.message
|
|
}), n.dirty()) : a.kind === "max" ? (a.inclusive ? t.data > a.value : t.data >= a.value) && (i = this._getOrReturnCtx(t, i), (0, z.addIssueToContext)(
|
|
i, {
|
|
code: Ee.ZodIssueCode.too_big,
|
|
type: "bigint",
|
|
maximum: a.value,
|
|
inclusive: a.inclusive,
|
|
message: a.message
|
|
}), n.dirty()) : a.kind === "multipleOf" ? t.data % a.value !== BigInt(0) && (i = this._getOrReturnCtx(t, i), (0, z.addIssueToContext)(
|
|
i, {
|
|
code: Ee.ZodIssueCode.not_multiple_of,
|
|
multipleOf: a.value,
|
|
message: a.message
|
|
}), n.dirty()) : Se.util.assertNever(a);
|
|
return { status: n.value, value: t.data };
|
|
}
|
|
_getInvalidInput(t) {
|
|
let r = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(r, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.bigint,
|
|
received: r.parsedType
|
|
}), z.INVALID;
|
|
}
|
|
gte(t, r) {
|
|
return this.setLimit("min", t, !0, je.errorUtil.toString(r));
|
|
}
|
|
gt(t, r) {
|
|
return this.setLimit("min", t, !1, je.errorUtil.toString(r));
|
|
}
|
|
lte(t, r) {
|
|
return this.setLimit("max", t, !0, je.errorUtil.toString(r));
|
|
}
|
|
lt(t, r) {
|
|
return this.setLimit("max", t, !1, je.errorUtil.toString(r));
|
|
}
|
|
setLimit(t, r, i, n) {
|
|
return new e({
|
|
...this._def,
|
|
checks: [
|
|
...this._def.checks,
|
|
{
|
|
kind: t,
|
|
value: r,
|
|
inclusive: i,
|
|
message: je.errorUtil.toString(n)
|
|
}
|
|
]
|
|
});
|
|
}
|
|
_addCheck(t) {
|
|
return new e({
|
|
...this._def,
|
|
checks: [...this._def.checks, t]
|
|
});
|
|
}
|
|
positive(t) {
|
|
return this._addCheck({
|
|
kind: "min",
|
|
value: BigInt(0),
|
|
inclusive: !1,
|
|
message: je.errorUtil.toString(t)
|
|
});
|
|
}
|
|
negative(t) {
|
|
return this._addCheck({
|
|
kind: "max",
|
|
value: BigInt(0),
|
|
inclusive: !1,
|
|
message: je.errorUtil.toString(t)
|
|
});
|
|
}
|
|
nonpositive(t) {
|
|
return this._addCheck({
|
|
kind: "max",
|
|
value: BigInt(0),
|
|
inclusive: !0,
|
|
message: je.errorUtil.toString(t)
|
|
});
|
|
}
|
|
nonnegative(t) {
|
|
return this._addCheck({
|
|
kind: "min",
|
|
value: BigInt(0),
|
|
inclusive: !0,
|
|
message: je.errorUtil.toString(t)
|
|
});
|
|
}
|
|
multipleOf(t, r) {
|
|
return this._addCheck({
|
|
kind: "multipleOf",
|
|
value: t,
|
|
message: je.errorUtil.toString(r)
|
|
});
|
|
}
|
|
get minValue() {
|
|
let t = null;
|
|
for (let r of this._def.checks)
|
|
r.kind === "min" && (t === null || r.value > t) && (t = r.value);
|
|
return t;
|
|
}
|
|
get maxValue() {
|
|
let t = null;
|
|
for (let r of this._def.checks)
|
|
r.kind === "max" && (t === null || r.value < t) && (t = r.value);
|
|
return t;
|
|
}
|
|
};
|
|
H.ZodBigInt = Au;
|
|
Au.create = (e) => {
|
|
var t;
|
|
return new Au({
|
|
checks: [],
|
|
typeName: Ge.ZodBigInt,
|
|
coerce: (t = e?.coerce) !== null && t !== void 0 ? t : !1,
|
|
...Ze(e)
|
|
});
|
|
};
|
|
var _u = class extends Qe {
|
|
static {
|
|
s(this, "ZodBoolean");
|
|
}
|
|
_parse(t) {
|
|
if (this._def.coerce && (t.data = !!t.data), this._getType(t) !== Se.ZodParsedType.boolean) {
|
|
let i = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.boolean,
|
|
received: i.parsedType
|
|
}), z.INVALID;
|
|
}
|
|
return (0, z.OK)(t.data);
|
|
}
|
|
};
|
|
H.ZodBoolean = _u;
|
|
_u.create = (e) => new _u({
|
|
typeName: Ge.ZodBoolean,
|
|
coerce: e?.coerce || !1,
|
|
...Ze(e)
|
|
});
|
|
var Pu = class e extends Qe {
|
|
static {
|
|
s(this, "ZodDate");
|
|
}
|
|
_parse(t) {
|
|
if (this._def.coerce && (t.data = new Date(t.data)), this._getType(t) !== Se.ZodParsedType.date) {
|
|
let a = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(a, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.date,
|
|
received: a.parsedType
|
|
}), z.INVALID;
|
|
}
|
|
if (isNaN(t.data.getTime())) {
|
|
let a = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(a, {
|
|
code: Ee.ZodIssueCode.invalid_date
|
|
}), z.INVALID;
|
|
}
|
|
let i = new z.ParseStatus(), n;
|
|
for (let a of this._def.checks)
|
|
a.kind === "min" ? t.data.getTime() < a.value && (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.too_small,
|
|
message: a.message,
|
|
inclusive: !0,
|
|
exact: !1,
|
|
minimum: a.value,
|
|
type: "date"
|
|
}), i.dirty()) : a.kind === "max" ? t.data.getTime() > a.value && (n = this._getOrReturnCtx(t, n), (0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.too_big,
|
|
message: a.message,
|
|
inclusive: !0,
|
|
exact: !1,
|
|
maximum: a.value,
|
|
type: "date"
|
|
}), i.dirty()) : Se.util.assertNever(a);
|
|
return {
|
|
status: i.value,
|
|
value: new Date(t.data.getTime())
|
|
};
|
|
}
|
|
_addCheck(t) {
|
|
return new e({
|
|
...this._def,
|
|
checks: [...this._def.checks, t]
|
|
});
|
|
}
|
|
min(t, r) {
|
|
return this._addCheck({
|
|
kind: "min",
|
|
value: t.getTime(),
|
|
message: je.errorUtil.toString(r)
|
|
});
|
|
}
|
|
max(t, r) {
|
|
return this._addCheck({
|
|
kind: "max",
|
|
value: t.getTime(),
|
|
message: je.errorUtil.toString(r)
|
|
});
|
|
}
|
|
get minDate() {
|
|
let t = null;
|
|
for (let r of this._def.checks)
|
|
r.kind === "min" && (t === null || r.value > t) && (t = r.value);
|
|
return t != null ? new Date(t) : null;
|
|
}
|
|
get maxDate() {
|
|
let t = null;
|
|
for (let r of this._def.checks)
|
|
r.kind === "max" && (t === null || r.value < t) && (t = r.value);
|
|
return t != null ? new Date(t) : null;
|
|
}
|
|
};
|
|
H.ZodDate = Pu;
|
|
Pu.create = (e) => new Pu({
|
|
checks: [],
|
|
coerce: e?.coerce || !1,
|
|
typeName: Ge.ZodDate,
|
|
...Ze(e)
|
|
});
|
|
var Fc = class extends Qe {
|
|
static {
|
|
s(this, "ZodSymbol");
|
|
}
|
|
_parse(t) {
|
|
if (this._getType(t) !== Se.ZodParsedType.symbol) {
|
|
let i = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.symbol,
|
|
received: i.parsedType
|
|
}), z.INVALID;
|
|
}
|
|
return (0, z.OK)(t.data);
|
|
}
|
|
};
|
|
H.ZodSymbol = Fc;
|
|
Fc.create = (e) => new Fc({
|
|
typeName: Ge.ZodSymbol,
|
|
...Ze(e)
|
|
});
|
|
var Fu = class extends Qe {
|
|
static {
|
|
s(this, "ZodUndefined");
|
|
}
|
|
_parse(t) {
|
|
if (this._getType(t) !== Se.ZodParsedType.undefined) {
|
|
let i = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.undefined,
|
|
received: i.parsedType
|
|
}), z.INVALID;
|
|
}
|
|
return (0, z.OK)(t.data);
|
|
}
|
|
};
|
|
H.ZodUndefined = Fu;
|
|
Fu.create = (e) => new Fu({
|
|
typeName: Ge.ZodUndefined,
|
|
...Ze(e)
|
|
});
|
|
var Iu = class extends Qe {
|
|
static {
|
|
s(this, "ZodNull");
|
|
}
|
|
_parse(t) {
|
|
if (this._getType(t) !== Se.ZodParsedType.null) {
|
|
let i = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.null,
|
|
received: i.parsedType
|
|
}), z.INVALID;
|
|
}
|
|
return (0, z.OK)(t.data);
|
|
}
|
|
};
|
|
H.ZodNull = Iu;
|
|
Iu.create = (e) => new Iu({
|
|
typeName: Ge.ZodNull,
|
|
...Ze(e)
|
|
});
|
|
var ho = class extends Qe {
|
|
static {
|
|
s(this, "ZodAny");
|
|
}
|
|
constructor() {
|
|
super(...arguments), this._any = !0;
|
|
}
|
|
_parse(t) {
|
|
return (0, z.OK)(t.data);
|
|
}
|
|
};
|
|
H.ZodAny = ho;
|
|
ho.create = (e) => new ho({
|
|
typeName: Ge.ZodAny,
|
|
...Ze(e)
|
|
});
|
|
var fa = class extends Qe {
|
|
static {
|
|
s(this, "ZodUnknown");
|
|
}
|
|
constructor() {
|
|
super(...arguments), this._unknown = !0;
|
|
}
|
|
_parse(t) {
|
|
return (0, z.OK)(t.data);
|
|
}
|
|
};
|
|
H.ZodUnknown = fa;
|
|
fa.create = (e) => new fa({
|
|
typeName: Ge.ZodUnknown,
|
|
...Ze(e)
|
|
});
|
|
var Mn = class extends Qe {
|
|
static {
|
|
s(this, "ZodNever");
|
|
}
|
|
_parse(t) {
|
|
let r = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(r, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.never,
|
|
received: r.parsedType
|
|
}), z.INVALID;
|
|
}
|
|
};
|
|
H.ZodNever = Mn;
|
|
Mn.create = (e) => new Mn({
|
|
typeName: Ge.ZodNever,
|
|
...Ze(e)
|
|
});
|
|
var Ic = class extends Qe {
|
|
static {
|
|
s(this, "ZodVoid");
|
|
}
|
|
_parse(t) {
|
|
if (this._getType(t) !== Se.ZodParsedType.undefined) {
|
|
let i = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.void,
|
|
received: i.parsedType
|
|
}), z.INVALID;
|
|
}
|
|
return (0, z.OK)(t.data);
|
|
}
|
|
};
|
|
H.ZodVoid = Ic;
|
|
Ic.create = (e) => new Ic({
|
|
typeName: Ge.ZodVoid,
|
|
...Ze(e)
|
|
});
|
|
var da = class e extends Qe {
|
|
static {
|
|
s(this, "ZodArray");
|
|
}
|
|
_parse(t) {
|
|
let { ctx: r, status: i } = this._processInputParams(t), n = this._def;
|
|
if (r.parsedType !== Se.ZodParsedType.array)
|
|
return (0, z.addIssueToContext)(r, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.array,
|
|
received: r.parsedType
|
|
}), z.INVALID;
|
|
if (n.exactLength !== null) {
|
|
let o = r.data.length > n.exactLength.value, u = r.data.length < n.exactLength.value;
|
|
(o || u) && ((0, z.addIssueToContext)(r, {
|
|
code: o ? Ee.ZodIssueCode.too_big : Ee.ZodIssueCode.too_small,
|
|
minimum: u ? n.exactLength.value : void 0,
|
|
maximum: o ? n.exactLength.value : void 0,
|
|
type: "array",
|
|
inclusive: !0,
|
|
exact: !0,
|
|
message: n.exactLength.message
|
|
}), i.dirty());
|
|
}
|
|
if (n.minLength !== null && r.data.length < n.minLength.value && ((0, z.addIssueToContext)(r, {
|
|
code: Ee.ZodIssueCode.too_small,
|
|
minimum: n.minLength.value,
|
|
type: "array",
|
|
inclusive: !0,
|
|
exact: !1,
|
|
message: n.minLength.message
|
|
}), i.dirty()), n.maxLength !== null && r.data.length > n.maxLength.value && ((0, z.addIssueToContext)(r, {
|
|
code: Ee.ZodIssueCode.too_big,
|
|
maximum: n.maxLength.value,
|
|
type: "array",
|
|
inclusive: !0,
|
|
exact: !1,
|
|
message: n.maxLength.message
|
|
}), i.dirty()), r.common.async)
|
|
return Promise.all([...r.data].map((o, u) => n.type._parseAsync(new pn(r, o, r.path, u)))).then((o) => z.ParseStatus.mergeArray(i, o));
|
|
let a = [...r.data].map((o, u) => n.type._parseSync(new pn(r, o, r.path, u)));
|
|
return z.ParseStatus.mergeArray(i, a);
|
|
}
|
|
get element() {
|
|
return this._def.type;
|
|
}
|
|
min(t, r) {
|
|
return new e({
|
|
...this._def,
|
|
minLength: { value: t, message: je.errorUtil.toString(r) }
|
|
});
|
|
}
|
|
max(t, r) {
|
|
return new e({
|
|
...this._def,
|
|
maxLength: { value: t, message: je.errorUtil.toString(r) }
|
|
});
|
|
}
|
|
length(t, r) {
|
|
return new e({
|
|
...this._def,
|
|
exactLength: { value: t, message: je.errorUtil.toString(r) }
|
|
});
|
|
}
|
|
nonempty(t) {
|
|
return this.min(1, t);
|
|
}
|
|
};
|
|
H.ZodArray = da;
|
|
da.create = (e, t) => new da({
|
|
type: e,
|
|
minLength: null,
|
|
maxLength: null,
|
|
exactLength: null,
|
|
typeName: Ge.ZodArray,
|
|
...Ze(t)
|
|
});
|
|
function Pc(e) {
|
|
if (e instanceof Pi) {
|
|
let t = {};
|
|
for (let r in e.shape) {
|
|
let i = e.shape[r];
|
|
t[r] = dn.create(Pc(i));
|
|
}
|
|
return new Pi({
|
|
...e._def,
|
|
shape: /* @__PURE__ */ s(() => t, "shape")
|
|
});
|
|
} else return e instanceof da ? new da({
|
|
...e._def,
|
|
type: Pc(e.element)
|
|
}) : e instanceof dn ? dn.create(Pc(e.unwrap())) : e instanceof hs ? hs.create(Pc(e.unwrap())) : e instanceof ps ? ps.create(e.items.map(
|
|
(t) => Pc(t))) : e;
|
|
}
|
|
s(Pc, "deepPartialify");
|
|
var Pi = class e extends Qe {
|
|
static {
|
|
s(this, "ZodObject");
|
|
}
|
|
constructor() {
|
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
}
|
|
_getCached() {
|
|
if (this._cached !== null)
|
|
return this._cached;
|
|
let t = this._def.shape(), r = Se.util.objectKeys(t);
|
|
return this._cached = { shape: t, keys: r };
|
|
}
|
|
_parse(t) {
|
|
if (this._getType(t) !== Se.ZodParsedType.object) {
|
|
let c = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(c, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.object,
|
|
received: c.parsedType
|
|
}), z.INVALID;
|
|
}
|
|
let { status: i, ctx: n } = this._processInputParams(t), { shape: a, keys: o } = this._getCached(), u = [];
|
|
if (!(this._def.catchall instanceof Mn && this._def.unknownKeys === "strip"))
|
|
for (let c in n.data)
|
|
o.includes(c) || u.push(c);
|
|
let l = [];
|
|
for (let c of o) {
|
|
let f = a[c], m = n.data[c];
|
|
l.push({
|
|
key: { status: "valid", value: c },
|
|
value: f._parse(new pn(n, m, n.path, c)),
|
|
alwaysSet: c in n.data
|
|
});
|
|
}
|
|
if (this._def.catchall instanceof Mn) {
|
|
let c = this._def.unknownKeys;
|
|
if (c === "passthrough")
|
|
for (let f of u)
|
|
l.push({
|
|
key: { status: "valid", value: f },
|
|
value: { status: "valid", value: n.data[f] }
|
|
});
|
|
else if (c === "strict")
|
|
u.length > 0 && ((0, z.addIssueToContext)(n, {
|
|
code: Ee.ZodIssueCode.unrecognized_keys,
|
|
keys: u
|
|
}), i.dirty());
|
|
else if (c !== "strip")
|
|
throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
} else {
|
|
let c = this._def.catchall;
|
|
for (let f of u) {
|
|
let m = n.data[f];
|
|
l.push({
|
|
key: { status: "valid", value: f },
|
|
value: c._parse(
|
|
new pn(n, m, n.path, f)
|
|
//, ctx.child(key), value, getParsedType(value)
|
|
),
|
|
alwaysSet: f in n.data
|
|
});
|
|
}
|
|
}
|
|
return n.common.async ? Promise.resolve().then(async () => {
|
|
let c = [];
|
|
for (let f of l) {
|
|
let m = await f.key, h = await f.value;
|
|
c.push({
|
|
key: m,
|
|
value: h,
|
|
alwaysSet: f.alwaysSet
|
|
});
|
|
}
|
|
return c;
|
|
}).then((c) => z.ParseStatus.mergeObjectSync(i, c)) : z.ParseStatus.mergeObjectSync(i, l);
|
|
}
|
|
get shape() {
|
|
return this._def.shape();
|
|
}
|
|
strict(t) {
|
|
return je.errorUtil.errToObj, new e({
|
|
...this._def,
|
|
unknownKeys: "strict",
|
|
...t !== void 0 ? {
|
|
errorMap: /* @__PURE__ */ s((r, i) => {
|
|
var n, a, o, u;
|
|
let l = (o = (a = (n = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(n, r, i).message) !== null && o !== void 0 ?
|
|
o : i.defaultError;
|
|
return r.code === "unrecognized_keys" ? {
|
|
message: (u = je.errorUtil.errToObj(t).message) !== null && u !== void 0 ? u : l
|
|
} : {
|
|
message: l
|
|
};
|
|
}, "errorMap")
|
|
} : {}
|
|
});
|
|
}
|
|
strip() {
|
|
return new e({
|
|
...this._def,
|
|
unknownKeys: "strip"
|
|
});
|
|
}
|
|
passthrough() {
|
|
return new e({
|
|
...this._def,
|
|
unknownKeys: "passthrough"
|
|
});
|
|
}
|
|
// const AugmentFactory =
|
|
// <Def extends ZodObjectDef>(def: Def) =>
|
|
// <Augmentation extends ZodRawShape>(
|
|
// augmentation: Augmentation
|
|
// ): ZodObject<
|
|
// extendShape<ReturnType<Def["shape"]>, Augmentation>,
|
|
// Def["unknownKeys"],
|
|
// Def["catchall"]
|
|
// > => {
|
|
// return new ZodObject({
|
|
// ...def,
|
|
// shape: () => ({
|
|
// ...def.shape(),
|
|
// ...augmentation,
|
|
// }),
|
|
// }) as any;
|
|
// };
|
|
extend(t) {
|
|
return new e({
|
|
...this._def,
|
|
shape: /* @__PURE__ */ s(() => ({
|
|
...this._def.shape(),
|
|
...t
|
|
}), "shape")
|
|
});
|
|
}
|
|
/**
|
|
* Prior to zod@1.0.12 there was a bug in the
|
|
* inferred type of merged objects. Please
|
|
* upgrade if you are experiencing issues.
|
|
*/
|
|
merge(t) {
|
|
return new e({
|
|
unknownKeys: t._def.unknownKeys,
|
|
catchall: t._def.catchall,
|
|
shape: /* @__PURE__ */ s(() => ({
|
|
...this._def.shape(),
|
|
...t._def.shape()
|
|
}), "shape"),
|
|
typeName: Ge.ZodObject
|
|
});
|
|
}
|
|
// merge<
|
|
// Incoming extends AnyZodObject,
|
|
// Augmentation extends Incoming["shape"],
|
|
// NewOutput extends {
|
|
// [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
|
|
// ? Augmentation[k]["_output"]
|
|
// : k extends keyof Output
|
|
// ? Output[k]
|
|
// : never;
|
|
// },
|
|
// NewInput extends {
|
|
// [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
|
|
// ? Augmentation[k]["_input"]
|
|
// : k extends keyof Input
|
|
// ? Input[k]
|
|
// : never;
|
|
// }
|
|
// >(
|
|
// merging: Incoming
|
|
// ): ZodObject<
|
|
// extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
|
|
// Incoming["_def"]["unknownKeys"],
|
|
// Incoming["_def"]["catchall"],
|
|
// NewOutput,
|
|
// NewInput
|
|
// > {
|
|
// const merged: any = new ZodObject({
|
|
// unknownKeys: merging._def.unknownKeys,
|
|
// catchall: merging._def.catchall,
|
|
// shape: () =>
|
|
// objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
|
|
// typeName: ZodFirstPartyTypeKind.ZodObject,
|
|
// }) as any;
|
|
// return merged;
|
|
// }
|
|
setKey(t, r) {
|
|
return this.augment({ [t]: r });
|
|
}
|
|
// merge<Incoming extends AnyZodObject>(
|
|
// merging: Incoming
|
|
// ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => {
|
|
// ZodObject<
|
|
// extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
|
|
// Incoming["_def"]["unknownKeys"],
|
|
// Incoming["_def"]["catchall"]
|
|
// > {
|
|
// // const mergedShape = objectUtil.mergeShapes(
|
|
// // this._def.shape(),
|
|
// // merging._def.shape()
|
|
// // );
|
|
// const merged: any = new ZodObject({
|
|
// unknownKeys: merging._def.unknownKeys,
|
|
// catchall: merging._def.catchall,
|
|
// shape: () =>
|
|
// objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
|
|
// typeName: ZodFirstPartyTypeKind.ZodObject,
|
|
// }) as any;
|
|
// return merged;
|
|
// }
|
|
catchall(t) {
|
|
return new e({
|
|
...this._def,
|
|
catchall: t
|
|
});
|
|
}
|
|
pick(t) {
|
|
let r = {};
|
|
return Se.util.objectKeys(t).forEach((i) => {
|
|
t[i] && this.shape[i] && (r[i] = this.shape[i]);
|
|
}), new e({
|
|
...this._def,
|
|
shape: /* @__PURE__ */ s(() => r, "shape")
|
|
});
|
|
}
|
|
omit(t) {
|
|
let r = {};
|
|
return Se.util.objectKeys(this.shape).forEach((i) => {
|
|
t[i] || (r[i] = this.shape[i]);
|
|
}), new e({
|
|
...this._def,
|
|
shape: /* @__PURE__ */ s(() => r, "shape")
|
|
});
|
|
}
|
|
/**
|
|
* @deprecated
|
|
*/
|
|
deepPartial() {
|
|
return Pc(this);
|
|
}
|
|
partial(t) {
|
|
let r = {};
|
|
return Se.util.objectKeys(this.shape).forEach((i) => {
|
|
let n = this.shape[i];
|
|
t && !t[i] ? r[i] = n : r[i] = n.optional();
|
|
}), new e({
|
|
...this._def,
|
|
shape: /* @__PURE__ */ s(() => r, "shape")
|
|
});
|
|
}
|
|
required(t) {
|
|
let r = {};
|
|
return Se.util.objectKeys(this.shape).forEach((i) => {
|
|
if (t && !t[i])
|
|
r[i] = this.shape[i];
|
|
else {
|
|
let a = this.shape[i];
|
|
for (; a instanceof dn; )
|
|
a = a._def.innerType;
|
|
r[i] = a;
|
|
}
|
|
}), new e({
|
|
...this._def,
|
|
shape: /* @__PURE__ */ s(() => r, "shape")
|
|
});
|
|
}
|
|
keyof() {
|
|
return eJ(Se.util.objectKeys(this.shape));
|
|
}
|
|
};
|
|
H.ZodObject = Pi;
|
|
Pi.create = (e, t) => new Pi({
|
|
shape: /* @__PURE__ */ s(() => e, "shape"),
|
|
unknownKeys: "strip",
|
|
catchall: Mn.create(),
|
|
typeName: Ge.ZodObject,
|
|
...Ze(t)
|
|
});
|
|
Pi.strictCreate = (e, t) => new Pi({
|
|
shape: /* @__PURE__ */ s(() => e, "shape"),
|
|
unknownKeys: "strict",
|
|
catchall: Mn.create(),
|
|
typeName: Ge.ZodObject,
|
|
...Ze(t)
|
|
});
|
|
Pi.lazycreate = (e, t) => new Pi({
|
|
shape: e,
|
|
unknownKeys: "strip",
|
|
catchall: Mn.create(),
|
|
typeName: Ge.ZodObject,
|
|
...Ze(t)
|
|
});
|
|
var Ou = class extends Qe {
|
|
static {
|
|
s(this, "ZodUnion");
|
|
}
|
|
_parse(t) {
|
|
let { ctx: r } = this._processInputParams(t), i = this._def.options;
|
|
function n(a) {
|
|
for (let u of a)
|
|
if (u.result.status === "valid")
|
|
return u.result;
|
|
for (let u of a)
|
|
if (u.result.status === "dirty")
|
|
return r.common.issues.push(...u.ctx.common.issues), u.result;
|
|
let o = a.map((u) => new Ee.ZodError(u.ctx.common.issues));
|
|
return (0, z.addIssueToContext)(r, {
|
|
code: Ee.ZodIssueCode.invalid_union,
|
|
unionErrors: o
|
|
}), z.INVALID;
|
|
}
|
|
if (s(n, "handleResults"), r.common.async)
|
|
return Promise.all(i.map(async (a) => {
|
|
let o = {
|
|
...r,
|
|
common: {
|
|
...r.common,
|
|
issues: []
|
|
},
|
|
parent: null
|
|
};
|
|
return {
|
|
result: await a._parseAsync({
|
|
data: r.data,
|
|
path: r.path,
|
|
parent: o
|
|
}),
|
|
ctx: o
|
|
};
|
|
})).then(n);
|
|
{
|
|
let a, o = [];
|
|
for (let l of i) {
|
|
let c = {
|
|
...r,
|
|
common: {
|
|
...r.common,
|
|
issues: []
|
|
},
|
|
parent: null
|
|
}, f = l._parseSync({
|
|
data: r.data,
|
|
path: r.path,
|
|
parent: c
|
|
});
|
|
if (f.status === "valid")
|
|
return f;
|
|
f.status === "dirty" && !a && (a = { result: f, ctx: c }), c.common.issues.length && o.push(c.common.issues);
|
|
}
|
|
if (a)
|
|
return r.common.issues.push(...a.ctx.common.issues), a.result;
|
|
let u = o.map((l) => new Ee.ZodError(l));
|
|
return (0, z.addIssueToContext)(r, {
|
|
code: Ee.ZodIssueCode.invalid_union,
|
|
unionErrors: u
|
|
}), z.INVALID;
|
|
}
|
|
}
|
|
get options() {
|
|
return this._def.options;
|
|
}
|
|
};
|
|
H.ZodUnion = Ou;
|
|
Ou.create = (e, t) => new Ou({
|
|
options: e,
|
|
typeName: Ge.ZodUnion,
|
|
...Ze(t)
|
|
});
|
|
var ca = /* @__PURE__ */ s((e) => e instanceof Bu ? ca(e.schema) : e instanceof Wi ? ca(e.innerType()) : e instanceof Nu ? [e.value] : e instanceof
|
|
Mu ? e.options : e instanceof Ru ? Se.util.objectValues(e.enum) : e instanceof ju ? ca(e._def.innerType) : e instanceof Fu ? [void 0] : e instanceof
|
|
Iu ? [null] : e instanceof dn ? [void 0, ...ca(e.unwrap())] : e instanceof hs ? [null, ...ca(e.unwrap())] : e instanceof Wp || e instanceof
|
|
qu ? ca(e.unwrap()) : e instanceof Lu ? ca(e._def.innerType) : [], "getDiscriminator"), kb = class e extends Qe {
|
|
static {
|
|
s(this, "ZodDiscriminatedUnion");
|
|
}
|
|
_parse(t) {
|
|
let { ctx: r } = this._processInputParams(t);
|
|
if (r.parsedType !== Se.ZodParsedType.object)
|
|
return (0, z.addIssueToContext)(r, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.object,
|
|
received: r.parsedType
|
|
}), z.INVALID;
|
|
let i = this.discriminator, n = r.data[i], a = this.optionsMap.get(n);
|
|
return a ? r.common.async ? a._parseAsync({
|
|
data: r.data,
|
|
path: r.path,
|
|
parent: r
|
|
}) : a._parseSync({
|
|
data: r.data,
|
|
path: r.path,
|
|
parent: r
|
|
}) : ((0, z.addIssueToContext)(r, {
|
|
code: Ee.ZodIssueCode.invalid_union_discriminator,
|
|
options: Array.from(this.optionsMap.keys()),
|
|
path: [i]
|
|
}), z.INVALID);
|
|
}
|
|
get discriminator() {
|
|
return this._def.discriminator;
|
|
}
|
|
get options() {
|
|
return this._def.options;
|
|
}
|
|
get optionsMap() {
|
|
return this._def.optionsMap;
|
|
}
|
|
/**
|
|
* The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
|
|
* However, it only allows a union of objects, all of which need to share a discriminator property. This property must
|
|
* have a different value for each object in the union.
|
|
* @param discriminator the name of the discriminator property
|
|
* @param types an array of object schemas
|
|
* @param params
|
|
*/
|
|
static create(t, r, i) {
|
|
let n = /* @__PURE__ */ new Map();
|
|
for (let a of r) {
|
|
let o = ca(a.shape[t]);
|
|
if (!o.length)
|
|
throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);
|
|
for (let u of o) {
|
|
if (n.has(u))
|
|
throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);
|
|
n.set(u, a);
|
|
}
|
|
}
|
|
return new e({
|
|
typeName: Ge.ZodDiscriminatedUnion,
|
|
discriminator: t,
|
|
options: r,
|
|
optionsMap: n,
|
|
...Ze(i)
|
|
});
|
|
}
|
|
};
|
|
H.ZodDiscriminatedUnion = kb;
|
|
function ZP(e, t) {
|
|
let r = (0, Se.getParsedType)(e), i = (0, Se.getParsedType)(t);
|
|
if (e === t)
|
|
return { valid: !0, data: e };
|
|
if (r === Se.ZodParsedType.object && i === Se.ZodParsedType.object) {
|
|
let n = Se.util.objectKeys(t), a = Se.util.objectKeys(e).filter((u) => n.indexOf(u) !== -1), o = { ...e, ...t };
|
|
for (let u of a) {
|
|
let l = ZP(e[u], t[u]);
|
|
if (!l.valid)
|
|
return { valid: !1 };
|
|
o[u] = l.data;
|
|
}
|
|
return { valid: !0, data: o };
|
|
} else if (r === Se.ZodParsedType.array && i === Se.ZodParsedType.array) {
|
|
if (e.length !== t.length)
|
|
return { valid: !1 };
|
|
let n = [];
|
|
for (let a = 0; a < e.length; a++) {
|
|
let o = e[a], u = t[a], l = ZP(o, u);
|
|
if (!l.valid)
|
|
return { valid: !1 };
|
|
n.push(l.data);
|
|
}
|
|
return { valid: !0, data: n };
|
|
} else return r === Se.ZodParsedType.date && i === Se.ZodParsedType.date && +e == +t ? { valid: !0, data: e } : { valid: !1 };
|
|
}
|
|
s(ZP, "mergeValues");
|
|
var ku = class extends Qe {
|
|
static {
|
|
s(this, "ZodIntersection");
|
|
}
|
|
_parse(t) {
|
|
let { status: r, ctx: i } = this._processInputParams(t), n = /* @__PURE__ */ s((a, o) => {
|
|
if ((0, z.isAborted)(a) || (0, z.isAborted)(o))
|
|
return z.INVALID;
|
|
let u = ZP(a.value, o.value);
|
|
return u.valid ? (((0, z.isDirty)(a) || (0, z.isDirty)(o)) && r.dirty(), { status: r.value, value: u.data }) : ((0, z.addIssueToContext)(
|
|
i, {
|
|
code: Ee.ZodIssueCode.invalid_intersection_types
|
|
}), z.INVALID);
|
|
}, "handleParsed");
|
|
return i.common.async ? Promise.all([
|
|
this._def.left._parseAsync({
|
|
data: i.data,
|
|
path: i.path,
|
|
parent: i
|
|
}),
|
|
this._def.right._parseAsync({
|
|
data: i.data,
|
|
path: i.path,
|
|
parent: i
|
|
})
|
|
]).then(([a, o]) => n(a, o)) : n(this._def.left._parseSync({
|
|
data: i.data,
|
|
path: i.path,
|
|
parent: i
|
|
}), this._def.right._parseSync({
|
|
data: i.data,
|
|
path: i.path,
|
|
parent: i
|
|
}));
|
|
}
|
|
};
|
|
H.ZodIntersection = ku;
|
|
ku.create = (e, t, r) => new ku({
|
|
left: e,
|
|
right: t,
|
|
typeName: Ge.ZodIntersection,
|
|
...Ze(r)
|
|
});
|
|
var ps = class e extends Qe {
|
|
static {
|
|
s(this, "ZodTuple");
|
|
}
|
|
_parse(t) {
|
|
let { status: r, ctx: i } = this._processInputParams(t);
|
|
if (i.parsedType !== Se.ZodParsedType.array)
|
|
return (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.array,
|
|
received: i.parsedType
|
|
}), z.INVALID;
|
|
if (i.data.length < this._def.items.length)
|
|
return (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.too_small,
|
|
minimum: this._def.items.length,
|
|
inclusive: !0,
|
|
exact: !1,
|
|
type: "array"
|
|
}), z.INVALID;
|
|
!this._def.rest && i.data.length > this._def.items.length && ((0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.too_big,
|
|
maximum: this._def.items.length,
|
|
inclusive: !0,
|
|
exact: !1,
|
|
type: "array"
|
|
}), r.dirty());
|
|
let a = [...i.data].map((o, u) => {
|
|
let l = this._def.items[u] || this._def.rest;
|
|
return l ? l._parse(new pn(i, o, i.path, u)) : null;
|
|
}).filter((o) => !!o);
|
|
return i.common.async ? Promise.all(a).then((o) => z.ParseStatus.mergeArray(r, o)) : z.ParseStatus.mergeArray(r, a);
|
|
}
|
|
get items() {
|
|
return this._def.items;
|
|
}
|
|
rest(t) {
|
|
return new e({
|
|
...this._def,
|
|
rest: t
|
|
});
|
|
}
|
|
};
|
|
H.ZodTuple = ps;
|
|
ps.create = (e, t) => {
|
|
if (!Array.isArray(e))
|
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
return new ps({
|
|
items: e,
|
|
typeName: Ge.ZodTuple,
|
|
rest: null,
|
|
...Ze(t)
|
|
});
|
|
};
|
|
var Bb = class e extends Qe {
|
|
static {
|
|
s(this, "ZodRecord");
|
|
}
|
|
get keySchema() {
|
|
return this._def.keyType;
|
|
}
|
|
get valueSchema() {
|
|
return this._def.valueType;
|
|
}
|
|
_parse(t) {
|
|
let { status: r, ctx: i } = this._processInputParams(t);
|
|
if (i.parsedType !== Se.ZodParsedType.object)
|
|
return (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.object,
|
|
received: i.parsedType
|
|
}), z.INVALID;
|
|
let n = [], a = this._def.keyType, o = this._def.valueType;
|
|
for (let u in i.data)
|
|
n.push({
|
|
key: a._parse(new pn(i, u, i.path, u)),
|
|
value: o._parse(new pn(i, i.data[u], i.path, u)),
|
|
alwaysSet: u in i.data
|
|
});
|
|
return i.common.async ? z.ParseStatus.mergeObjectAsync(r, n) : z.ParseStatus.mergeObjectSync(r, n);
|
|
}
|
|
get element() {
|
|
return this._def.valueType;
|
|
}
|
|
static create(t, r, i) {
|
|
return r instanceof Qe ? new e({
|
|
keyType: t,
|
|
valueType: r,
|
|
typeName: Ge.ZodRecord,
|
|
...Ze(i)
|
|
}) : new e({
|
|
keyType: po.create(),
|
|
valueType: t,
|
|
typeName: Ge.ZodRecord,
|
|
...Ze(r)
|
|
});
|
|
}
|
|
};
|
|
H.ZodRecord = Bb;
|
|
var Oc = class extends Qe {
|
|
static {
|
|
s(this, "ZodMap");
|
|
}
|
|
get keySchema() {
|
|
return this._def.keyType;
|
|
}
|
|
get valueSchema() {
|
|
return this._def.valueType;
|
|
}
|
|
_parse(t) {
|
|
let { status: r, ctx: i } = this._processInputParams(t);
|
|
if (i.parsedType !== Se.ZodParsedType.map)
|
|
return (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.map,
|
|
received: i.parsedType
|
|
}), z.INVALID;
|
|
let n = this._def.keyType, a = this._def.valueType, o = [...i.data.entries()].map(([u, l], c) => ({
|
|
key: n._parse(new pn(i, u, i.path, [c, "key"])),
|
|
value: a._parse(new pn(i, l, i.path, [c, "value"]))
|
|
}));
|
|
if (i.common.async) {
|
|
let u = /* @__PURE__ */ new Map();
|
|
return Promise.resolve().then(async () => {
|
|
for (let l of o) {
|
|
let c = await l.key, f = await l.value;
|
|
if (c.status === "aborted" || f.status === "aborted")
|
|
return z.INVALID;
|
|
(c.status === "dirty" || f.status === "dirty") && r.dirty(), u.set(c.value, f.value);
|
|
}
|
|
return { status: r.value, value: u };
|
|
});
|
|
} else {
|
|
let u = /* @__PURE__ */ new Map();
|
|
for (let l of o) {
|
|
let c = l.key, f = l.value;
|
|
if (c.status === "aborted" || f.status === "aborted")
|
|
return z.INVALID;
|
|
(c.status === "dirty" || f.status === "dirty") && r.dirty(), u.set(c.value, f.value);
|
|
}
|
|
return { status: r.value, value: u };
|
|
}
|
|
}
|
|
};
|
|
H.ZodMap = Oc;
|
|
Oc.create = (e, t, r) => new Oc({
|
|
valueType: t,
|
|
keyType: e,
|
|
typeName: Ge.ZodMap,
|
|
...Ze(r)
|
|
});
|
|
var kc = class e extends Qe {
|
|
static {
|
|
s(this, "ZodSet");
|
|
}
|
|
_parse(t) {
|
|
let { status: r, ctx: i } = this._processInputParams(t);
|
|
if (i.parsedType !== Se.ZodParsedType.set)
|
|
return (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.set,
|
|
received: i.parsedType
|
|
}), z.INVALID;
|
|
let n = this._def;
|
|
n.minSize !== null && i.data.size < n.minSize.value && ((0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.too_small,
|
|
minimum: n.minSize.value,
|
|
type: "set",
|
|
inclusive: !0,
|
|
exact: !1,
|
|
message: n.minSize.message
|
|
}), r.dirty()), n.maxSize !== null && i.data.size > n.maxSize.value && ((0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.too_big,
|
|
maximum: n.maxSize.value,
|
|
type: "set",
|
|
inclusive: !0,
|
|
exact: !1,
|
|
message: n.maxSize.message
|
|
}), r.dirty());
|
|
let a = this._def.valueType;
|
|
function o(l) {
|
|
let c = /* @__PURE__ */ new Set();
|
|
for (let f of l) {
|
|
if (f.status === "aborted")
|
|
return z.INVALID;
|
|
f.status === "dirty" && r.dirty(), c.add(f.value);
|
|
}
|
|
return { status: r.value, value: c };
|
|
}
|
|
s(o, "finalizeSet");
|
|
let u = [...i.data.values()].map((l, c) => a._parse(new pn(i, l, i.path, c)));
|
|
return i.common.async ? Promise.all(u).then((l) => o(l)) : o(u);
|
|
}
|
|
min(t, r) {
|
|
return new e({
|
|
...this._def,
|
|
minSize: { value: t, message: je.errorUtil.toString(r) }
|
|
});
|
|
}
|
|
max(t, r) {
|
|
return new e({
|
|
...this._def,
|
|
maxSize: { value: t, message: je.errorUtil.toString(r) }
|
|
});
|
|
}
|
|
size(t, r) {
|
|
return this.min(t, r).max(t, r);
|
|
}
|
|
nonempty(t) {
|
|
return this.min(1, t);
|
|
}
|
|
};
|
|
H.ZodSet = kc;
|
|
kc.create = (e, t) => new kc({
|
|
valueType: e,
|
|
minSize: null,
|
|
maxSize: null,
|
|
typeName: Ge.ZodSet,
|
|
...Ze(t)
|
|
});
|
|
var Nb = class e extends Qe {
|
|
static {
|
|
s(this, "ZodFunction");
|
|
}
|
|
constructor() {
|
|
super(...arguments), this.validate = this.implement;
|
|
}
|
|
_parse(t) {
|
|
let { ctx: r } = this._processInputParams(t);
|
|
if (r.parsedType !== Se.ZodParsedType.function)
|
|
return (0, z.addIssueToContext)(r, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.function,
|
|
received: r.parsedType
|
|
}), z.INVALID;
|
|
function i(u, l) {
|
|
return (0, z.makeIssue)({
|
|
data: u,
|
|
path: r.path,
|
|
errorMaps: [
|
|
r.common.contextualErrorMap,
|
|
r.schemaErrorMap,
|
|
(0, Ib.getErrorMap)(),
|
|
Ib.defaultErrorMap
|
|
].filter((c) => !!c),
|
|
issueData: {
|
|
code: Ee.ZodIssueCode.invalid_arguments,
|
|
argumentsError: l
|
|
}
|
|
});
|
|
}
|
|
s(i, "makeArgsIssue");
|
|
function n(u, l) {
|
|
return (0, z.makeIssue)({
|
|
data: u,
|
|
path: r.path,
|
|
errorMaps: [
|
|
r.common.contextualErrorMap,
|
|
r.schemaErrorMap,
|
|
(0, Ib.getErrorMap)(),
|
|
Ib.defaultErrorMap
|
|
].filter((c) => !!c),
|
|
issueData: {
|
|
code: Ee.ZodIssueCode.invalid_return_type,
|
|
returnTypeError: l
|
|
}
|
|
});
|
|
}
|
|
s(n, "makeReturnsIssue");
|
|
let a = { errorMap: r.common.contextualErrorMap }, o = r.data;
|
|
if (this._def.returns instanceof mo) {
|
|
let u = this;
|
|
return (0, z.OK)(async function(...l) {
|
|
let c = new Ee.ZodError([]), f = await u._def.args.parseAsync(l, a).catch((d) => {
|
|
throw c.addIssue(i(l, d)), c;
|
|
}), m = await Reflect.apply(o, this, f);
|
|
return await u._def.returns._def.type.parseAsync(m, a).catch((d) => {
|
|
throw c.addIssue(n(m, d)), c;
|
|
});
|
|
});
|
|
} else {
|
|
let u = this;
|
|
return (0, z.OK)(function(...l) {
|
|
let c = u._def.args.safeParse(l, a);
|
|
if (!c.success)
|
|
throw new Ee.ZodError([i(l, c.error)]);
|
|
let f = Reflect.apply(o, this, c.data), m = u._def.returns.safeParse(f, a);
|
|
if (!m.success)
|
|
throw new Ee.ZodError([n(f, m.error)]);
|
|
return m.data;
|
|
});
|
|
}
|
|
}
|
|
parameters() {
|
|
return this._def.args;
|
|
}
|
|
returnType() {
|
|
return this._def.returns;
|
|
}
|
|
args(...t) {
|
|
return new e({
|
|
...this._def,
|
|
args: ps.create(t).rest(fa.create())
|
|
});
|
|
}
|
|
returns(t) {
|
|
return new e({
|
|
...this._def,
|
|
returns: t
|
|
});
|
|
}
|
|
implement(t) {
|
|
return this.parse(t);
|
|
}
|
|
strictImplement(t) {
|
|
return this.parse(t);
|
|
}
|
|
static create(t, r, i) {
|
|
return new e({
|
|
args: t || ps.create([]).rest(fa.create()),
|
|
returns: r || fa.create(),
|
|
typeName: Ge.ZodFunction,
|
|
...Ze(i)
|
|
});
|
|
}
|
|
};
|
|
H.ZodFunction = Nb;
|
|
var Bu = class extends Qe {
|
|
static {
|
|
s(this, "ZodLazy");
|
|
}
|
|
get schema() {
|
|
return this._def.getter();
|
|
}
|
|
_parse(t) {
|
|
let { ctx: r } = this._processInputParams(t);
|
|
return this._def.getter()._parse({ data: r.data, path: r.path, parent: r });
|
|
}
|
|
};
|
|
H.ZodLazy = Bu;
|
|
Bu.create = (e, t) => new Bu({
|
|
getter: e,
|
|
typeName: Ge.ZodLazy,
|
|
...Ze(t)
|
|
});
|
|
var Nu = class extends Qe {
|
|
static {
|
|
s(this, "ZodLiteral");
|
|
}
|
|
_parse(t) {
|
|
if (t.data !== this._def.value) {
|
|
let r = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(r, {
|
|
received: r.data,
|
|
code: Ee.ZodIssueCode.invalid_literal,
|
|
expected: this._def.value
|
|
}), z.INVALID;
|
|
}
|
|
return { status: "valid", value: t.data };
|
|
}
|
|
get value() {
|
|
return this._def.value;
|
|
}
|
|
};
|
|
H.ZodLiteral = Nu;
|
|
Nu.create = (e, t) => new Nu({
|
|
value: e,
|
|
typeName: Ge.ZodLiteral,
|
|
...Ze(t)
|
|
});
|
|
function eJ(e, t) {
|
|
return new Mu({
|
|
values: e,
|
|
typeName: Ge.ZodEnum,
|
|
...Ze(t)
|
|
});
|
|
}
|
|
s(eJ, "createZodEnum");
|
|
var Mu = class e extends Qe {
|
|
static {
|
|
s(this, "ZodEnum");
|
|
}
|
|
constructor() {
|
|
super(...arguments), qp.set(this, void 0);
|
|
}
|
|
_parse(t) {
|
|
if (typeof t.data != "string") {
|
|
let r = this._getOrReturnCtx(t), i = this._def.values;
|
|
return (0, z.addIssueToContext)(r, {
|
|
expected: Se.util.joinValues(i),
|
|
received: r.parsedType,
|
|
code: Ee.ZodIssueCode.invalid_type
|
|
}), z.INVALID;
|
|
}
|
|
if (Ob(this, qp, "f") || XG(this, qp, new Set(this._def.values), "f"), !Ob(this, qp, "f").has(t.data)) {
|
|
let r = this._getOrReturnCtx(t), i = this._def.values;
|
|
return (0, z.addIssueToContext)(r, {
|
|
received: r.data,
|
|
code: Ee.ZodIssueCode.invalid_enum_value,
|
|
options: i
|
|
}), z.INVALID;
|
|
}
|
|
return (0, z.OK)(t.data);
|
|
}
|
|
get options() {
|
|
return this._def.values;
|
|
}
|
|
get enum() {
|
|
let t = {};
|
|
for (let r of this._def.values)
|
|
t[r] = r;
|
|
return t;
|
|
}
|
|
get Values() {
|
|
let t = {};
|
|
for (let r of this._def.values)
|
|
t[r] = r;
|
|
return t;
|
|
}
|
|
get Enum() {
|
|
let t = {};
|
|
for (let r of this._def.values)
|
|
t[r] = r;
|
|
return t;
|
|
}
|
|
extract(t, r = this._def) {
|
|
return e.create(t, {
|
|
...this._def,
|
|
...r
|
|
});
|
|
}
|
|
exclude(t, r = this._def) {
|
|
return e.create(this.options.filter((i) => !t.includes(i)), {
|
|
...this._def,
|
|
...r
|
|
});
|
|
}
|
|
};
|
|
H.ZodEnum = Mu;
|
|
qp = /* @__PURE__ */ new WeakMap();
|
|
Mu.create = eJ;
|
|
var Ru = class extends Qe {
|
|
static {
|
|
s(this, "ZodNativeEnum");
|
|
}
|
|
constructor() {
|
|
super(...arguments), Up.set(this, void 0);
|
|
}
|
|
_parse(t) {
|
|
let r = Se.util.getValidEnumValues(this._def.values), i = this._getOrReturnCtx(t);
|
|
if (i.parsedType !== Se.ZodParsedType.string && i.parsedType !== Se.ZodParsedType.number) {
|
|
let n = Se.util.objectValues(r);
|
|
return (0, z.addIssueToContext)(i, {
|
|
expected: Se.util.joinValues(n),
|
|
received: i.parsedType,
|
|
code: Ee.ZodIssueCode.invalid_type
|
|
}), z.INVALID;
|
|
}
|
|
if (Ob(this, Up, "f") || XG(this, Up, new Set(Se.util.getValidEnumValues(this._def.values)), "f"), !Ob(this, Up, "f").has(t.data)) {
|
|
let n = Se.util.objectValues(r);
|
|
return (0, z.addIssueToContext)(i, {
|
|
received: i.data,
|
|
code: Ee.ZodIssueCode.invalid_enum_value,
|
|
options: n
|
|
}), z.INVALID;
|
|
}
|
|
return (0, z.OK)(t.data);
|
|
}
|
|
get enum() {
|
|
return this._def.values;
|
|
}
|
|
};
|
|
H.ZodNativeEnum = Ru;
|
|
Up = /* @__PURE__ */ new WeakMap();
|
|
Ru.create = (e, t) => new Ru({
|
|
values: e,
|
|
typeName: Ge.ZodNativeEnum,
|
|
...Ze(t)
|
|
});
|
|
var mo = class extends Qe {
|
|
static {
|
|
s(this, "ZodPromise");
|
|
}
|
|
unwrap() {
|
|
return this._def.type;
|
|
}
|
|
_parse(t) {
|
|
let { ctx: r } = this._processInputParams(t);
|
|
if (r.parsedType !== Se.ZodParsedType.promise && r.common.async === !1)
|
|
return (0, z.addIssueToContext)(r, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.promise,
|
|
received: r.parsedType
|
|
}), z.INVALID;
|
|
let i = r.parsedType === Se.ZodParsedType.promise ? r.data : Promise.resolve(r.data);
|
|
return (0, z.OK)(i.then((n) => this._def.type.parseAsync(n, {
|
|
path: r.path,
|
|
errorMap: r.common.contextualErrorMap
|
|
})));
|
|
}
|
|
};
|
|
H.ZodPromise = mo;
|
|
mo.create = (e, t) => new mo({
|
|
type: e,
|
|
typeName: Ge.ZodPromise,
|
|
...Ze(t)
|
|
});
|
|
var Wi = class extends Qe {
|
|
static {
|
|
s(this, "ZodEffects");
|
|
}
|
|
innerType() {
|
|
return this._def.schema;
|
|
}
|
|
sourceType() {
|
|
return this._def.schema._def.typeName === Ge.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
}
|
|
_parse(t) {
|
|
let { status: r, ctx: i } = this._processInputParams(t), n = this._def.effect || null, a = {
|
|
addIssue: /* @__PURE__ */ s((o) => {
|
|
(0, z.addIssueToContext)(i, o), o.fatal ? r.abort() : r.dirty();
|
|
}, "addIssue"),
|
|
get path() {
|
|
return i.path;
|
|
}
|
|
};
|
|
if (a.addIssue = a.addIssue.bind(a), n.type === "preprocess") {
|
|
let o = n.transform(i.data, a);
|
|
if (i.common.async)
|
|
return Promise.resolve(o).then(async (u) => {
|
|
if (r.value === "aborted")
|
|
return z.INVALID;
|
|
let l = await this._def.schema._parseAsync({
|
|
data: u,
|
|
path: i.path,
|
|
parent: i
|
|
});
|
|
return l.status === "aborted" ? z.INVALID : l.status === "dirty" || r.value === "dirty" ? (0, z.DIRTY)(l.value) : l;
|
|
});
|
|
{
|
|
if (r.value === "aborted")
|
|
return z.INVALID;
|
|
let u = this._def.schema._parseSync({
|
|
data: o,
|
|
path: i.path,
|
|
parent: i
|
|
});
|
|
return u.status === "aborted" ? z.INVALID : u.status === "dirty" || r.value === "dirty" ? (0, z.DIRTY)(u.value) : u;
|
|
}
|
|
}
|
|
if (n.type === "refinement") {
|
|
let o = /* @__PURE__ */ s((u) => {
|
|
let l = n.refinement(u, a);
|
|
if (i.common.async)
|
|
return Promise.resolve(l);
|
|
if (l instanceof Promise)
|
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
return u;
|
|
}, "executeRefinement");
|
|
if (i.common.async === !1) {
|
|
let u = this._def.schema._parseSync({
|
|
data: i.data,
|
|
path: i.path,
|
|
parent: i
|
|
});
|
|
return u.status === "aborted" ? z.INVALID : (u.status === "dirty" && r.dirty(), o(u.value), { status: r.value, value: u.value });
|
|
} else
|
|
return this._def.schema._parseAsync({ data: i.data, path: i.path, parent: i }).then((u) => u.status === "aborted" ? z.INVALID : (u.
|
|
status === "dirty" && r.dirty(), o(u.value).then(() => ({ status: r.value, value: u.value }))));
|
|
}
|
|
if (n.type === "transform")
|
|
if (i.common.async === !1) {
|
|
let o = this._def.schema._parseSync({
|
|
data: i.data,
|
|
path: i.path,
|
|
parent: i
|
|
});
|
|
if (!(0, z.isValid)(o))
|
|
return o;
|
|
let u = n.transform(o.value, a);
|
|
if (u instanceof Promise)
|
|
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
return { status: r.value, value: u };
|
|
} else
|
|
return this._def.schema._parseAsync({ data: i.data, path: i.path, parent: i }).then((o) => (0, z.isValid)(o) ? Promise.resolve(n.transform(
|
|
o.value, a)).then((u) => ({ status: r.value, value: u })) : o);
|
|
Se.util.assertNever(n);
|
|
}
|
|
};
|
|
H.ZodEffects = Wi;
|
|
H.ZodTransformer = Wi;
|
|
Wi.create = (e, t, r) => new Wi({
|
|
schema: e,
|
|
typeName: Ge.ZodEffects,
|
|
effect: t,
|
|
...Ze(r)
|
|
});
|
|
Wi.createWithPreprocess = (e, t, r) => new Wi({
|
|
schema: t,
|
|
effect: { type: "preprocess", transform: e },
|
|
typeName: Ge.ZodEffects,
|
|
...Ze(r)
|
|
});
|
|
var dn = class extends Qe {
|
|
static {
|
|
s(this, "ZodOptional");
|
|
}
|
|
_parse(t) {
|
|
return this._getType(t) === Se.ZodParsedType.undefined ? (0, z.OK)(void 0) : this._def.innerType._parse(t);
|
|
}
|
|
unwrap() {
|
|
return this._def.innerType;
|
|
}
|
|
};
|
|
H.ZodOptional = dn;
|
|
dn.create = (e, t) => new dn({
|
|
innerType: e,
|
|
typeName: Ge.ZodOptional,
|
|
...Ze(t)
|
|
});
|
|
var hs = class extends Qe {
|
|
static {
|
|
s(this, "ZodNullable");
|
|
}
|
|
_parse(t) {
|
|
return this._getType(t) === Se.ZodParsedType.null ? (0, z.OK)(null) : this._def.innerType._parse(t);
|
|
}
|
|
unwrap() {
|
|
return this._def.innerType;
|
|
}
|
|
};
|
|
H.ZodNullable = hs;
|
|
hs.create = (e, t) => new hs({
|
|
innerType: e,
|
|
typeName: Ge.ZodNullable,
|
|
...Ze(t)
|
|
});
|
|
var ju = class extends Qe {
|
|
static {
|
|
s(this, "ZodDefault");
|
|
}
|
|
_parse(t) {
|
|
let { ctx: r } = this._processInputParams(t), i = r.data;
|
|
return r.parsedType === Se.ZodParsedType.undefined && (i = this._def.defaultValue()), this._def.innerType._parse({
|
|
data: i,
|
|
path: r.path,
|
|
parent: r
|
|
});
|
|
}
|
|
removeDefault() {
|
|
return this._def.innerType;
|
|
}
|
|
};
|
|
H.ZodDefault = ju;
|
|
ju.create = (e, t) => new ju({
|
|
innerType: e,
|
|
typeName: Ge.ZodDefault,
|
|
defaultValue: typeof t.default == "function" ? t.default : () => t.default,
|
|
...Ze(t)
|
|
});
|
|
var Lu = class extends Qe {
|
|
static {
|
|
s(this, "ZodCatch");
|
|
}
|
|
_parse(t) {
|
|
let { ctx: r } = this._processInputParams(t), i = {
|
|
...r,
|
|
common: {
|
|
...r.common,
|
|
issues: []
|
|
}
|
|
}, n = this._def.innerType._parse({
|
|
data: i.data,
|
|
path: i.path,
|
|
parent: {
|
|
...i
|
|
}
|
|
});
|
|
return (0, z.isAsync)(n) ? n.then((a) => ({
|
|
status: "valid",
|
|
value: a.status === "valid" ? a.value : this._def.catchValue({
|
|
get error() {
|
|
return new Ee.ZodError(i.common.issues);
|
|
},
|
|
input: i.data
|
|
})
|
|
})) : {
|
|
status: "valid",
|
|
value: n.status === "valid" ? n.value : this._def.catchValue({
|
|
get error() {
|
|
return new Ee.ZodError(i.common.issues);
|
|
},
|
|
input: i.data
|
|
})
|
|
};
|
|
}
|
|
removeCatch() {
|
|
return this._def.innerType;
|
|
}
|
|
};
|
|
H.ZodCatch = Lu;
|
|
Lu.create = (e, t) => new Lu({
|
|
innerType: e,
|
|
typeName: Ge.ZodCatch,
|
|
catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
|
|
...Ze(t)
|
|
});
|
|
var Bc = class extends Qe {
|
|
static {
|
|
s(this, "ZodNaN");
|
|
}
|
|
_parse(t) {
|
|
if (this._getType(t) !== Se.ZodParsedType.nan) {
|
|
let i = this._getOrReturnCtx(t);
|
|
return (0, z.addIssueToContext)(i, {
|
|
code: Ee.ZodIssueCode.invalid_type,
|
|
expected: Se.ZodParsedType.nan,
|
|
received: i.parsedType
|
|
}), z.INVALID;
|
|
}
|
|
return { status: "valid", value: t.data };
|
|
}
|
|
};
|
|
H.ZodNaN = Bc;
|
|
Bc.create = (e) => new Bc({
|
|
typeName: Ge.ZodNaN,
|
|
...Ze(e)
|
|
});
|
|
H.BRAND = Symbol("zod_brand");
|
|
var Wp = class extends Qe {
|
|
static {
|
|
s(this, "ZodBranded");
|
|
}
|
|
_parse(t) {
|
|
let { ctx: r } = this._processInputParams(t), i = r.data;
|
|
return this._def.type._parse({
|
|
data: i,
|
|
path: r.path,
|
|
parent: r
|
|
});
|
|
}
|
|
unwrap() {
|
|
return this._def.type;
|
|
}
|
|
};
|
|
H.ZodBranded = Wp;
|
|
var $p = class e extends Qe {
|
|
static {
|
|
s(this, "ZodPipeline");
|
|
}
|
|
_parse(t) {
|
|
let { status: r, ctx: i } = this._processInputParams(t);
|
|
if (i.common.async)
|
|
return (/* @__PURE__ */ s(async () => {
|
|
let a = await this._def.in._parseAsync({
|
|
data: i.data,
|
|
path: i.path,
|
|
parent: i
|
|
});
|
|
return a.status === "aborted" ? z.INVALID : a.status === "dirty" ? (r.dirty(), (0, z.DIRTY)(a.value)) : this._def.out._parseAsync(
|
|
{
|
|
data: a.value,
|
|
path: i.path,
|
|
parent: i
|
|
});
|
|
}, "handleAsync"))();
|
|
{
|
|
let n = this._def.in._parseSync({
|
|
data: i.data,
|
|
path: i.path,
|
|
parent: i
|
|
});
|
|
return n.status === "aborted" ? z.INVALID : n.status === "dirty" ? (r.dirty(), {
|
|
status: "dirty",
|
|
value: n.value
|
|
}) : this._def.out._parseSync({
|
|
data: n.value,
|
|
path: i.path,
|
|
parent: i
|
|
});
|
|
}
|
|
}
|
|
static create(t, r) {
|
|
return new e({
|
|
in: t,
|
|
out: r,
|
|
typeName: Ge.ZodPipeline
|
|
});
|
|
}
|
|
};
|
|
H.ZodPipeline = $p;
|
|
var qu = class extends Qe {
|
|
static {
|
|
s(this, "ZodReadonly");
|
|
}
|
|
_parse(t) {
|
|
let r = this._def.innerType._parse(t), i = /* @__PURE__ */ s((n) => ((0, z.isValid)(n) && (n.value = Object.freeze(n.value)), n), "fre\
|
|
eze");
|
|
return (0, z.isAsync)(r) ? r.then((n) => i(n)) : i(r);
|
|
}
|
|
unwrap() {
|
|
return this._def.innerType;
|
|
}
|
|
};
|
|
H.ZodReadonly = qu;
|
|
qu.create = (e, t) => new qu({
|
|
innerType: e,
|
|
typeName: Ge.ZodReadonly,
|
|
...Ze(t)
|
|
});
|
|
function JG(e, t) {
|
|
let r = typeof e == "function" ? e(t) : typeof e == "string" ? { message: e } : e;
|
|
return typeof r == "string" ? { message: r } : r;
|
|
}
|
|
s(JG, "cleanParams");
|
|
function tJ(e, t = {}, r) {
|
|
return e ? ho.create().superRefine((i, n) => {
|
|
var a, o;
|
|
let u = e(i);
|
|
if (u instanceof Promise)
|
|
return u.then((l) => {
|
|
var c, f;
|
|
if (!l) {
|
|
let m = JG(t, i), h = (f = (c = m.fatal) !== null && c !== void 0 ? c : r) !== null && f !== void 0 ? f : !0;
|
|
n.addIssue({ code: "custom", ...m, fatal: h });
|
|
}
|
|
});
|
|
if (!u) {
|
|
let l = JG(t, i), c = (o = (a = l.fatal) !== null && a !== void 0 ? a : r) !== null && o !== void 0 ? o : !0;
|
|
n.addIssue({ code: "custom", ...l, fatal: c });
|
|
}
|
|
}) : ho.create();
|
|
}
|
|
s(tJ, "custom");
|
|
H.custom = tJ;
|
|
H.late = {
|
|
object: Pi.lazycreate
|
|
};
|
|
var Ge;
|
|
(function(e) {
|
|
e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate =
|
|
"ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUn\
|
|
known", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion =
|
|
"ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap",
|
|
e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects =
|
|
"ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefaul\
|
|
t", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodRe\
|
|
adonly";
|
|
})(Ge || (H.ZodFirstPartyTypeKind = Ge = {}));
|
|
var nXe = /* @__PURE__ */ s((e, t = {
|
|
message: `Input not instance of ${e.name}`
|
|
}) => tJ((r) => r instanceof e, t), "instanceOfType");
|
|
H.instanceof = nXe;
|
|
var rJ = po.create;
|
|
H.string = rJ;
|
|
var iJ = wu.create;
|
|
H.number = iJ;
|
|
var sXe = Bc.create;
|
|
H.nan = sXe;
|
|
var aXe = Au.create;
|
|
H.bigint = aXe;
|
|
var nJ = _u.create;
|
|
H.boolean = nJ;
|
|
var oXe = Pu.create;
|
|
H.date = oXe;
|
|
var uXe = Fc.create;
|
|
H.symbol = uXe;
|
|
var lXe = Fu.create;
|
|
H.undefined = lXe;
|
|
var cXe = Iu.create;
|
|
H.null = cXe;
|
|
var fXe = ho.create;
|
|
H.any = fXe;
|
|
var dXe = fa.create;
|
|
H.unknown = dXe;
|
|
var pXe = Mn.create;
|
|
H.never = pXe;
|
|
var hXe = Ic.create;
|
|
H.void = hXe;
|
|
var mXe = da.create;
|
|
H.array = mXe;
|
|
var yXe = Pi.create;
|
|
H.object = yXe;
|
|
var gXe = Pi.strictCreate;
|
|
H.strictObject = gXe;
|
|
var bXe = Ou.create;
|
|
H.union = bXe;
|
|
var DXe = kb.create;
|
|
H.discriminatedUnion = DXe;
|
|
var vXe = ku.create;
|
|
H.intersection = vXe;
|
|
var EXe = ps.create;
|
|
H.tuple = EXe;
|
|
var xXe = Bb.create;
|
|
H.record = xXe;
|
|
var SXe = Oc.create;
|
|
H.map = SXe;
|
|
var TXe = kc.create;
|
|
H.set = TXe;
|
|
var CXe = Nb.create;
|
|
H.function = CXe;
|
|
var wXe = Bu.create;
|
|
H.lazy = wXe;
|
|
var AXe = Nu.create;
|
|
H.literal = AXe;
|
|
var _Xe = Mu.create;
|
|
H.enum = _Xe;
|
|
var PXe = Ru.create;
|
|
H.nativeEnum = PXe;
|
|
var FXe = mo.create;
|
|
H.promise = FXe;
|
|
var sJ = Wi.create;
|
|
H.effect = sJ;
|
|
H.transformer = sJ;
|
|
var IXe = dn.create;
|
|
H.optional = IXe;
|
|
var OXe = hs.create;
|
|
H.nullable = OXe;
|
|
var kXe = Wi.createWithPreprocess;
|
|
H.preprocess = kXe;
|
|
var BXe = $p.create;
|
|
H.pipeline = BXe;
|
|
var NXe = /* @__PURE__ */ s(() => rJ().optional(), "ostring");
|
|
H.ostring = NXe;
|
|
var MXe = /* @__PURE__ */ s(() => iJ().optional(), "onumber");
|
|
H.onumber = MXe;
|
|
var RXe = /* @__PURE__ */ s(() => nJ().optional(), "oboolean");
|
|
H.oboolean = RXe;
|
|
H.coerce = {
|
|
string: /* @__PURE__ */ s((e) => po.create({ ...e, coerce: !0 }), "string"),
|
|
number: /* @__PURE__ */ s((e) => wu.create({ ...e, coerce: !0 }), "number"),
|
|
boolean: /* @__PURE__ */ s((e) => _u.create({
|
|
...e,
|
|
coerce: !0
|
|
}), "boolean"),
|
|
bigint: /* @__PURE__ */ s((e) => Au.create({ ...e, coerce: !0 }), "bigint"),
|
|
date: /* @__PURE__ */ s((e) => Pu.create({ ...e, coerce: !0 }), "date")
|
|
};
|
|
H.NEVER = z.INVALID;
|
|
});
|
|
|
|
// ../node_modules/zod/lib/external.js
|
|
var QP = E((hn) => {
|
|
"use strict";
|
|
var jXe = hn && hn.__createBinding || (Object.create ? function(e, t, r, i) {
|
|
i === void 0 && (i = r);
|
|
var n = Object.getOwnPropertyDescriptor(t, r);
|
|
(!n || ("get" in n ? !t.__esModule : n.writable || n.configurable)) && (n = { enumerable: !0, get: /* @__PURE__ */ s(function() {
|
|
return t[r];
|
|
}, "get") }), Object.defineProperty(e, i, n);
|
|
} : function(e, t, r, i) {
|
|
i === void 0 && (i = r), e[i] = t[r];
|
|
}), Nc = hn && hn.__exportStar || function(e, t) {
|
|
for (var r in e) r !== "default" && !Object.prototype.hasOwnProperty.call(t, r) && jXe(t, e, r);
|
|
};
|
|
Object.defineProperty(hn, "__esModule", { value: !0 });
|
|
Nc(Pb(), hn);
|
|
Nc(XP(), hn);
|
|
Nc(HG(), hn);
|
|
Nc(jp(), hn);
|
|
Nc(aJ(), hn);
|
|
Nc(_b(), hn);
|
|
});
|
|
|
|
// ../node_modules/zod/lib/index.js
|
|
var lJ = E((Fi) => {
|
|
"use strict";
|
|
var oJ = Fi && Fi.__createBinding || (Object.create ? function(e, t, r, i) {
|
|
i === void 0 && (i = r);
|
|
var n = Object.getOwnPropertyDescriptor(t, r);
|
|
(!n || ("get" in n ? !t.__esModule : n.writable || n.configurable)) && (n = { enumerable: !0, get: /* @__PURE__ */ s(function() {
|
|
return t[r];
|
|
}, "get") }), Object.defineProperty(e, i, n);
|
|
} : function(e, t, r, i) {
|
|
i === void 0 && (i = r), e[i] = t[r];
|
|
}), LXe = Fi && Fi.__setModuleDefault || (Object.create ? function(e, t) {
|
|
Object.defineProperty(e, "default", { enumerable: !0, value: t });
|
|
} : function(e, t) {
|
|
e.default = t;
|
|
}), qXe = Fi && Fi.__importStar || function(e) {
|
|
if (e && e.__esModule) return e;
|
|
var t = {};
|
|
if (e != null) for (var r in e) r !== "default" && Object.prototype.hasOwnProperty.call(e, r) && oJ(t, e, r);
|
|
return LXe(t, e), t;
|
|
}, UXe = Fi && Fi.__exportStar || function(e, t) {
|
|
for (var r in e) r !== "default" && !Object.prototype.hasOwnProperty.call(t, r) && oJ(t, e, r);
|
|
};
|
|
Object.defineProperty(Fi, "__esModule", { value: !0 });
|
|
Fi.z = void 0;
|
|
var uJ = qXe(QP());
|
|
Fi.z = uJ;
|
|
UXe(QP(), Fi);
|
|
Fi.default = uJ;
|
|
});
|
|
|
|
// src/cli/detect.ts
|
|
import { existsSync as Nm } from "node:fs";
|
|
import { resolve as Zoe } from "node:path";
|
|
import { HandledError as Qoe, commandLog as W4, getProjectRoot as $4 } from "storybook/internal/common";
|
|
import { logger as eue } from "storybook/internal/node-logger";
|
|
|
|
// ../node_modules/find-up/index.js
|
|
import Rn from "node:path";
|
|
|
|
// ../node_modules/locate-path/index.js
|
|
import aF from "node:process";
|
|
import oF from "node:path";
|
|
import nF, { promises as sF } from "node:fs";
|
|
import { fileURLToPath as vJ } from "node:url";
|
|
|
|
// ../node_modules/yocto-queue/index.js
|
|
var qb = class {
|
|
static {
|
|
s(this, "Node");
|
|
}
|
|
value;
|
|
next;
|
|
constructor(t) {
|
|
this.value = t;
|
|
}
|
|
}, Rc = class {
|
|
static {
|
|
s(this, "Queue");
|
|
}
|
|
#e;
|
|
#t;
|
|
#r;
|
|
constructor() {
|
|
this.clear();
|
|
}
|
|
enqueue(t) {
|
|
let r = new qb(t);
|
|
this.#e ? (this.#t.next = r, this.#t = r) : (this.#e = r, this.#t = r), this.#r++;
|
|
}
|
|
dequeue() {
|
|
let t = this.#e;
|
|
if (t)
|
|
return this.#e = this.#e.next, this.#r--, t.value;
|
|
}
|
|
peek() {
|
|
if (this.#e)
|
|
return this.#e.value;
|
|
}
|
|
clear() {
|
|
this.#e = void 0, this.#t = void 0, this.#r = 0;
|
|
}
|
|
get size() {
|
|
return this.#r;
|
|
}
|
|
*[Symbol.iterator]() {
|
|
let t = this.#e;
|
|
for (; t; )
|
|
yield t.value, t = t.next;
|
|
}
|
|
*drain() {
|
|
for (; this.#e; )
|
|
yield this.dequeue();
|
|
}
|
|
};
|
|
|
|
// ../node_modules/locate-path/node_modules/p-limit/index.js
|
|
function Hp(e) {
|
|
if (!((Number.isInteger(e) || e === Number.POSITIVE_INFINITY) && e > 0))
|
|
throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
|
let t = new Rc(), r = 0, i = /* @__PURE__ */ s(() => {
|
|
r--, t.size > 0 && t.dequeue()();
|
|
}, "next"), n = /* @__PURE__ */ s(async (u, l, c) => {
|
|
r++;
|
|
let f = (async () => u(...c))();
|
|
l(f);
|
|
try {
|
|
await f;
|
|
} catch {
|
|
}
|
|
i();
|
|
}, "run"), a = /* @__PURE__ */ s((u, l, c) => {
|
|
t.enqueue(n.bind(void 0, u, l, c)), (async () => (await Promise.resolve(), r < e && t.size > 0 && t.dequeue()()))();
|
|
}, "enqueue"), o = /* @__PURE__ */ s((u, ...l) => new Promise((c) => {
|
|
a(u, c, l);
|
|
}), "generator");
|
|
return Object.defineProperties(o, {
|
|
activeCount: {
|
|
get: /* @__PURE__ */ s(() => r, "get")
|
|
},
|
|
pendingCount: {
|
|
get: /* @__PURE__ */ s(() => t.size, "get")
|
|
},
|
|
clearQueue: {
|
|
value: /* @__PURE__ */ s(() => {
|
|
t.clear();
|
|
}, "value")
|
|
}
|
|
}), o;
|
|
}
|
|
s(Hp, "pLimit");
|
|
|
|
// ../node_modules/locate-path/node_modules/p-locate/index.js
|
|
var Kp = class extends Error {
|
|
static {
|
|
s(this, "EndError");
|
|
}
|
|
constructor(t) {
|
|
super(), this.value = t;
|
|
}
|
|
}, bJ = /* @__PURE__ */ s(async (e, t) => t(await e), "testElement"), DJ = /* @__PURE__ */ s(async (e) => {
|
|
let t = await Promise.all(e);
|
|
if (t[1] === !0)
|
|
throw new Kp(t[0]);
|
|
return !1;
|
|
}, "finder");
|
|
async function Ub(e, t, {
|
|
concurrency: r = Number.POSITIVE_INFINITY,
|
|
preserveOrder: i = !0
|
|
} = {}) {
|
|
let n = Hp(r), a = [...e].map((u) => [u, n(bJ, u, t)]), o = Hp(i ? 1 : Number.POSITIVE_INFINITY);
|
|
try {
|
|
await Promise.all(a.map((u) => o(DJ, u)));
|
|
} catch (u) {
|
|
if (u instanceof Kp)
|
|
return u.value;
|
|
throw u;
|
|
}
|
|
}
|
|
s(Ub, "pLocate");
|
|
|
|
// ../node_modules/locate-path/index.js
|
|
var uF = {
|
|
directory: "isDirectory",
|
|
file: "isFile"
|
|
};
|
|
function lF(e) {
|
|
if (!Object.hasOwnProperty.call(uF, e))
|
|
throw new Error(`Invalid type specified: ${e}`);
|
|
}
|
|
s(lF, "checkType");
|
|
var cF = /* @__PURE__ */ s((e, t) => t[uF[e]](), "matchType"), fF = /* @__PURE__ */ s((e) => e instanceof URL ? vJ(e) : e, "toPath");
|
|
async function Wb(e, {
|
|
cwd: t = aF.cwd(),
|
|
type: r = "file",
|
|
allowSymlinks: i = !0,
|
|
concurrency: n,
|
|
preserveOrder: a
|
|
} = {}) {
|
|
lF(r), t = fF(t);
|
|
let o = i ? sF.stat : sF.lstat;
|
|
return Ub(e, async (u) => {
|
|
try {
|
|
let l = await o(oF.resolve(t, u));
|
|
return cF(r, l);
|
|
} catch {
|
|
return !1;
|
|
}
|
|
}, { concurrency: n, preserveOrder: a });
|
|
}
|
|
s(Wb, "locatePath");
|
|
function $b(e, {
|
|
cwd: t = aF.cwd(),
|
|
type: r = "file",
|
|
allowSymlinks: i = !0
|
|
} = {}) {
|
|
lF(r), t = fF(t);
|
|
let n = i ? nF.statSync : nF.lstatSync;
|
|
for (let a of e)
|
|
try {
|
|
let o = n(oF.resolve(t, a), {
|
|
throwIfNoEntry: !1
|
|
});
|
|
if (!o)
|
|
continue;
|
|
if (cF(r, o))
|
|
return a;
|
|
} catch {
|
|
}
|
|
}
|
|
s($b, "locatePathSync");
|
|
|
|
// ../node_modules/find-up/node_modules/unicorn-magic/node.js
|
|
import { fileURLToPath as EJ } from "node:url";
|
|
function jc(e) {
|
|
return e instanceof URL ? EJ(e) : e;
|
|
}
|
|
s(jc, "toPath");
|
|
|
|
// ../node_modules/find-up/node_modules/path-exists/index.js
|
|
import mYe, { promises as yYe } from "node:fs";
|
|
|
|
// ../node_modules/find-up/index.js
|
|
var dF = Symbol("findUpStop");
|
|
async function xJ(e, t = {}) {
|
|
let r = Rn.resolve(jc(t.cwd) ?? ""), { root: i } = Rn.parse(r), n = Rn.resolve(r, jc(t.stopAt ?? i)), a = t.limit ?? Number.POSITIVE_INFINITY,
|
|
o = [e].flat(), u = /* @__PURE__ */ s(async (c) => {
|
|
if (typeof e != "function")
|
|
return Wb(o, c);
|
|
let f = await e(c.cwd);
|
|
return typeof f == "string" ? Wb([f], c) : f;
|
|
}, "runMatcher"), l = [];
|
|
for (; ; ) {
|
|
let c = await u({ ...t, cwd: r });
|
|
if (c === dF || (c && l.push(Rn.resolve(r, c)), r === n || l.length >= a))
|
|
break;
|
|
r = Rn.dirname(r);
|
|
}
|
|
return l;
|
|
}
|
|
s(xJ, "findUpMultiple");
|
|
function SJ(e, t = {}) {
|
|
let r = Rn.resolve(jc(t.cwd) ?? ""), { root: i } = Rn.parse(r), n = Rn.resolve(r, jc(t.stopAt) ?? i), a = t.limit ?? Number.POSITIVE_INFINITY,
|
|
o = [e].flat(), u = /* @__PURE__ */ s((c) => {
|
|
if (typeof e != "function")
|
|
return $b(o, c);
|
|
let f = e(c.cwd);
|
|
return typeof f == "string" ? $b([f], c) : f;
|
|
}, "runMatcher"), l = [];
|
|
for (; ; ) {
|
|
let c = u({ ...t, cwd: r });
|
|
if (c === dF || (c && l.push(Rn.resolve(r, c)), r === n || l.length >= a))
|
|
break;
|
|
r = Rn.dirname(r);
|
|
}
|
|
return l;
|
|
}
|
|
s(SJ, "findUpMultipleSync");
|
|
async function Vb(e, t = {}) {
|
|
return (await xJ(e, { ...t, limit: 1 }))[0];
|
|
}
|
|
s(Vb, "findUp");
|
|
function Wu(e, t = {}) {
|
|
return SJ(e, { ...t, limit: 1 })[0];
|
|
}
|
|
s(Wu, "findUpSync");
|
|
|
|
// src/cli/detect.ts
|
|
var V4 = Rt(rv(), 1);
|
|
import Wf from "semver";
|
|
|
|
// src/cli/helpers.ts
|
|
import { cpSync as Uoe, existsSync as Aa, readFileSync as Woe, writeFileSync as $oe } from "node:fs";
|
|
import { cp as j4, readFile as Voe, writeFile as Hoe } from "node:fs/promises";
|
|
import { join as Uf, resolve as yx } from "node:path";
|
|
import {
|
|
frameworkToRenderer as Koe,
|
|
getProjectRoot as zoe
|
|
} from "storybook/internal/common";
|
|
import { logger as Goe } from "storybook/internal/node-logger";
|
|
var L4 = Rt(fh(), 1);
|
|
import { coerce as q4, satisfies as Joe } from "semver";
|
|
|
|
// ../node_modules/strip-json-comments/index.js
|
|
var nv = Symbol("singleComment"), V3 = Symbol("multiComment"), IZ = /* @__PURE__ */ s(() => "", "stripWithoutWhitespace"), OZ = /* @__PURE__ */ s(
|
|
(e, t, r) => e.slice(t, r).replace(/\S/g, " "), "stripWithWhitespace"), kZ = /* @__PURE__ */ s((e, t) => {
|
|
let r = t - 1, i = 0;
|
|
for (; e[r] === "\\"; )
|
|
r -= 1, i += 1;
|
|
return !!(i % 2);
|
|
}, "isEscaped");
|
|
function sv(e, { whitespace: t = !0, trailingCommas: r = !1 } = {}) {
|
|
if (typeof e != "string")
|
|
throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);
|
|
let i = t ? OZ : IZ, n = !1, a = !1, o = 0, u = "", l = "", c = -1;
|
|
for (let f = 0; f < e.length; f++) {
|
|
let m = e[f], h = e[f + 1];
|
|
if (!a && m === '"' && (kZ(e, f) || (n = !n)), !n)
|
|
if (!a && m + h === "//")
|
|
u += e.slice(o, f), o = f, a = nv, f++;
|
|
else if (a === nv && m + h === `\r
|
|
`) {
|
|
f++, a = !1, u += i(e, o, f), o = f;
|
|
continue;
|
|
} else if (a === nv && m === `
|
|
`)
|
|
a = !1, u += i(e, o, f), o = f;
|
|
else if (!a && m + h === "/*") {
|
|
u += e.slice(o, f), o = f, a = V3, f++;
|
|
continue;
|
|
} else if (a === V3 && m + h === "*/") {
|
|
f++, a = !1, u += i(e, o, f + 1), o = f + 1;
|
|
continue;
|
|
} else r && !a && (c !== -1 ? m === "}" || m === "]" ? (u += e.slice(o, f), l += i(u, 0, 1) + u.slice(1), u = "", o = f, c = -1) : m !==
|
|
" " && m !== " " && m !== "\r" && m !== `
|
|
` && (u += e.slice(o, f), o = f, c = -1) : m === "," && (l += u + e.slice(o, f), u = "", o = f, c = f));
|
|
}
|
|
return l + u + (a ? i(e.slice(o)) : e.slice(o));
|
|
}
|
|
s(sv, "stripJsonComments");
|
|
|
|
// ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
var BZ = process.env.NODE_ENV === "production", av = "Invariant failed";
|
|
function Xc(e, t) {
|
|
if (!e) {
|
|
if (BZ)
|
|
throw new Error(av);
|
|
var r = typeof t == "function" ? t() : t, i = r ? "".concat(av, ": ").concat(r) : av;
|
|
throw new Error(i);
|
|
}
|
|
}
|
|
s(Xc, "invariant");
|
|
|
|
// src/cli/dirs.ts
|
|
var hx = Rt(A4(), 1), mx = Rt(F4(), 1);
|
|
import { dirname as Roe, join as M4 } from "node:path";
|
|
import { temporaryDirectory as joe, versions as Loe } from "storybook/internal/common";
|
|
|
|
// src/cli/project_types.ts
|
|
import { minVersion as Ioe, validRange as Ooe } from "semver";
|
|
function koe(e, t) {
|
|
return Ooe(e) ? Ioe(e)?.major === t : !1;
|
|
}
|
|
s(koe, "eqMajor");
|
|
var I4 = [
|
|
{ name: "qwik", packageName: "storybook-framework-qwik" },
|
|
{ name: "solid", frameworks: ["storybook-solidjs-vite"], renderer: "storybook-solidjs" },
|
|
{
|
|
name: "nuxt",
|
|
packageName: "@storybook-vue/nuxt",
|
|
frameworks: ["@storybook-vue/nuxt"],
|
|
renderer: "@storybook/vue3"
|
|
}
|
|
], oit = [
|
|
"react",
|
|
"react-native",
|
|
"vue3",
|
|
"angular",
|
|
"ember",
|
|
"preact",
|
|
"svelte",
|
|
"qwik",
|
|
"solid"
|
|
], px = /* @__PURE__ */ ((k) => (k.UNDETECTED = "UNDETECTED", k.UNSUPPORTED = "UNSUPPORTED", k.REACT = "REACT", k.REACT_SCRIPTS = "REACT_SCR\
|
|
IPTS", k.REACT_NATIVE = "REACT_NATIVE", k.REACT_NATIVE_WEB = "REACT_NATIVE_WEB", k.REACT_NATIVE_AND_RNW = "REACT_NATIVE_AND_RNW", k.REACT_PROJECT =
|
|
"REACT_PROJECT", k.WEBPACK_REACT = "WEBPACK_REACT", k.NEXTJS = "NEXTJS", k.VUE3 = "VUE3", k.NUXT = "NUXT", k.ANGULAR = "ANGULAR", k.EMBER = "\
|
|
EMBER", k.WEB_COMPONENTS = "WEB_COMPONENTS", k.HTML = "HTML", k.QWIK = "QWIK", k.PREACT = "PREACT", k.SVELTE = "SVELTE", k.SVELTEKIT = "SVEL\
|
|
TEKIT", k.SERVER = "SERVER", k.NX = "NX", k.SOLID = "SOLID", k))(px || {}), O4 = /* @__PURE__ */ ((r) => (r.Webpack5 = "webpack5", r.Vite = "\
|
|
vite", r))(O4 || {}), Boe = /* @__PURE__ */ ((r) => (r.Babel = "babel", r.SWC = "swc", r))(Boe || {}), Noe = /* @__PURE__ */ ((t) => (t.Rsbuild =
|
|
"rsbuild", t))(Noe || {}), uit = {
|
|
"@storybook/addon-webpack5-compiler-babel": "babel",
|
|
"@storybook/addon-webpack5-compiler-swc": "swc"
|
|
}, lit = {
|
|
"@storybook/builder-webpack5": "webpack5",
|
|
"@storybook/builder-vite": "vite"
|
|
}, k4 = /* @__PURE__ */ ((r) => (r.JAVASCRIPT = "javascript", r.TYPESCRIPT = "typescript", r))(k4 || {}), B4 = [
|
|
{
|
|
preset: "NUXT",
|
|
dependencies: ["nuxt"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.every(Boolean) ?? !0, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "VUE3",
|
|
dependencies: {
|
|
// This Vue template works with Vue 3
|
|
vue: /* @__PURE__ */ s((e) => e === "next" || koe(e, 3), "vue")
|
|
},
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.some(Boolean) ?? !1, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "EMBER",
|
|
dependencies: ["ember-cli"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.every(Boolean) ?? !0, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "NEXTJS",
|
|
dependencies: ["next"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.every(Boolean) ?? !0, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "QWIK",
|
|
dependencies: ["@builder.io/qwik"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.every(Boolean) ?? !0, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "REACT_PROJECT",
|
|
peerDependencies: ["react"],
|
|
matcherFunction: /* @__PURE__ */ s(({ peerDependencies: e }) => e?.every(Boolean) ?? !0, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "REACT_NATIVE",
|
|
dependencies: ["react-native", "react-native-scripts"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.some(Boolean) ?? !1, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "REACT_SCRIPTS",
|
|
// For projects using a custom/forked `react-scripts` package.
|
|
files: ["/node_modules/.bin/react-scripts"],
|
|
// For standard CRA projects
|
|
dependencies: ["react-scripts"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e, files: t }) => (e?.every(Boolean) || t?.every(Boolean)) ?? !1, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "ANGULAR",
|
|
dependencies: ["@angular/core"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.every(Boolean) ?? !0, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "WEB_COMPONENTS",
|
|
dependencies: ["lit-element", "lit-html", "lit"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.some(Boolean) ?? !1, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "PREACT",
|
|
dependencies: ["preact"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.every(Boolean) ?? !0, "matcherFunction")
|
|
},
|
|
{
|
|
// TODO: This only works because it is before the SVELTE template. could be more explicit
|
|
preset: "SVELTEKIT",
|
|
dependencies: ["@sveltejs/kit"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.every(Boolean) ?? !0, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "SVELTE",
|
|
dependencies: ["svelte"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.every(Boolean) ?? !0, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "SOLID",
|
|
dependencies: ["solid-js"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.every(Boolean) ?? !0, "matcherFunction")
|
|
},
|
|
// DO NOT MOVE ANY TEMPLATES BELOW THIS LINE
|
|
// React is part of every Template, after Storybook is initialized once
|
|
{
|
|
preset: "WEBPACK_REACT",
|
|
dependencies: ["react", "webpack"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.every(Boolean) ?? !0, "matcherFunction")
|
|
},
|
|
{
|
|
preset: "REACT",
|
|
dependencies: ["react"],
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.every(Boolean) ?? !0, "matcherFunction")
|
|
}
|
|
], N4 = {
|
|
preset: "UNSUPPORTED",
|
|
dependencies: {},
|
|
matcherFunction: /* @__PURE__ */ s(({ dependencies: e }) => e?.some(Boolean) ?? !1, "matcherFunction")
|
|
}, Moe = [
|
|
"UNDETECTED",
|
|
"UNSUPPORTED",
|
|
"NX"
|
|
], cit = Object.values(px).filter((e) => !Moe.includes(e)).map((e) => e.toLowerCase());
|
|
|
|
// src/cli/dirs.ts
|
|
var qoe = /* @__PURE__ */ s(async (e, t) => {
|
|
let r = await joe(), n = Loe[t] || await e.latestVersion(t), a = mx.default.default || mx.default, o = hx.default.default || hx.default, u = a(
|
|
t, n, {
|
|
registry: await e.getRegistryURL()
|
|
});
|
|
return await o({ url: u, dir: r }), M4(r, "package");
|
|
}, "resolveUsingBranchInstall");
|
|
async function R4(e, t) {
|
|
let r = I4.find((o) => o.name === t), i = r?.packageName || r?.renderer || `@storybook/${t}`, n = M4(i, "package.json"), a = [];
|
|
try {
|
|
return Roe(
|
|
V.resolve(n, {
|
|
paths: [process.cwd()]
|
|
})
|
|
);
|
|
} catch (o) {
|
|
Xc(o instanceof Error), a.push(o);
|
|
}
|
|
try {
|
|
return await qoe(e, i);
|
|
} catch (o) {
|
|
Xc(o instanceof Error), a.push(o);
|
|
}
|
|
throw new Error(`Cannot find ${n}, ${a.map((o) => o.stack).join(`
|
|
|
|
`)}`);
|
|
}
|
|
s(R4, "getRendererDir");
|
|
|
|
// src/cli/helpers.ts
|
|
function Pit(e, t) {
|
|
let r = yx(e);
|
|
if (!Aa(r))
|
|
return !1;
|
|
let i = Woe(r, "utf8"), n = t ? sv(i) : i;
|
|
try {
|
|
return JSON.parse(n);
|
|
} catch (a) {
|
|
throw Goe.error(L4.default.red(`Invalid json in file: ${r}`)), a;
|
|
}
|
|
}
|
|
s(Pit, "readFileAsJson");
|
|
var Fit = /* @__PURE__ */ s((e, t) => {
|
|
let r = yx(e);
|
|
return Aa(r) ? ($oe(r, `${JSON.stringify(t, null, 2)}
|
|
`), !0) : !1;
|
|
}, "writeFileAsJson");
|
|
async function Iit(e) {
|
|
let t = [], r = "^8.0.0-0", i = e.getDependencyVersion("babel-core");
|
|
if (i) {
|
|
let n = await e.latestVersion(
|
|
"babel-core",
|
|
i
|
|
);
|
|
n && Joe(n, "^6.0.0") && (r = "^7.0.0");
|
|
} else if (!e.getDependencyVersion("@babel/core")) {
|
|
let n = await e.getVersion("@babel/core");
|
|
t.push(`@babel/core@${n}`);
|
|
}
|
|
if (!e.getDependencyVersion("babel-loader")) {
|
|
let n = await e.getVersion(
|
|
"babel-loader",
|
|
r
|
|
);
|
|
t.push(`babel-loader@${n}`);
|
|
}
|
|
return t;
|
|
}
|
|
s(Iit, "getBabelDependencies");
|
|
function Oit(e, t, r) {
|
|
!e.dependencies?.[t] && !e.devDependencies?.[t] && (e.devDependencies ? e.devDependencies[t] = r : e.devDependencies = {
|
|
[t]: r
|
|
});
|
|
}
|
|
s(Oit, "addToDevDependenciesIfNotPresent");
|
|
function kit(e, t = ".") {
|
|
let r = yx(e, "template-csf/");
|
|
if (!Aa(r))
|
|
throw new Error("Couldn't find template dir");
|
|
Uoe(r, t, { recursive: !0 });
|
|
}
|
|
s(kit, "copyTemplate");
|
|
var Bit = {
|
|
angular: "webpack5",
|
|
ember: "webpack5",
|
|
"html-vite": "vite",
|
|
nextjs: "webpack5",
|
|
nuxt: "vite",
|
|
"nextjs-vite": "vite",
|
|
"preact-vite": "vite",
|
|
qwik: "vite",
|
|
"react-native-web-vite": "vite",
|
|
"react-vite": "vite",
|
|
"react-webpack5": "webpack5",
|
|
"server-webpack5": "webpack5",
|
|
solid: "vite",
|
|
"svelte-vite": "vite",
|
|
sveltekit: "vite",
|
|
"vue3-vite": "vite",
|
|
"web-components-vite": "vite",
|
|
// Only to pass type checking, will never be used
|
|
"react-rsbuild": "rsbuild",
|
|
"vue3-rsbuild": "rsbuild"
|
|
};
|
|
async function Nit(e, t) {
|
|
try {
|
|
let r = await e.getInstalledVersion(t);
|
|
return r || (r = e.getAllDependencies()[t] ?? ""), q4(r, { includePrerelease: !0 })?.toString();
|
|
} catch {
|
|
}
|
|
}
|
|
s(Nit, "getVersionSafe");
|
|
var Xoe = /* @__PURE__ */ s(async () => Aa("./src") ? "./src/stories" : "./stories", "cliStoriesTargetPath");
|
|
async function Mit({
|
|
packageManager: e,
|
|
templateLocation: t,
|
|
language: r,
|
|
destination: i,
|
|
commonAssetsDir: n,
|
|
features: a
|
|
}) {
|
|
let o = {
|
|
javascript: "js",
|
|
typescript: "ts"
|
|
}, u = /* @__PURE__ */ s(async () => {
|
|
let f = await R4(e, t), m = Uf(f, "template", "cli"), h = Uf(m, o[r]), d = Uf(m, o.javascript), y = Uf(m, o.typescript);
|
|
if (Aa(h))
|
|
return h;
|
|
if (Aa(y))
|
|
return y;
|
|
if (Aa(d))
|
|
return d;
|
|
if (Aa(m))
|
|
return m;
|
|
throw new Error(`Unsupported renderer: ${t} (${f})`);
|
|
}, "templatePath"), l = i ?? await Xoe(), c = /* @__PURE__ */ s((f) => a.includes("docs") || !f.endsWith(".mdx"), "filter");
|
|
if (n && await j4(n, l, { recursive: !0, filter: c }), await j4(await u(), l, { recursive: !0, filter: c }), n && a.includes("docs")) {
|
|
let f = Koe[t] || "react";
|
|
f === "vue3" && (f = "vue"), await Yoe(Uf(l, "Configure.mdx"), { renderer: f });
|
|
}
|
|
}
|
|
s(Mit, "copyTemplateFiles");
|
|
async function Yoe(e, t) {
|
|
let r = await Voe(e, { encoding: "utf8" });
|
|
Object.keys(t).forEach((i) => {
|
|
r = r.replaceAll(`{{${i}}}`, `${t[i]}`);
|
|
}), await Hoe(e, r);
|
|
}
|
|
s(Yoe, "adjustTemplate");
|
|
async function U4() {
|
|
return Wu("nx.json", { stopAt: zoe() });
|
|
}
|
|
s(U4, "isNxProject");
|
|
function Rit(e) {
|
|
let t = q4(e);
|
|
return Xc(t != null, `Could not coerce ${e} into a semver.`), t;
|
|
}
|
|
s(Rit, "coerceSemver");
|
|
function jit(e) {
|
|
let t = e.getAllDependencies();
|
|
return Object.keys(t).some((r) => r.includes("storybook"));
|
|
}
|
|
s(jit, "hasStorybookDependencies");
|
|
|
|
// src/cli/detect.ts
|
|
var tue = ["vite.config.ts", "vite.config.js", "vite.config.mjs"], rue = ["webpack.config.js"], iue = /* @__PURE__ */ s((e, t, r) => {
|
|
let i = e.dependencies?.[t] || e.devDependencies?.[t];
|
|
return i && typeof r == "function" ? r(i) : !!i;
|
|
}, "hasDependency"), nue = /* @__PURE__ */ s((e, t, r) => {
|
|
let i = e.peerDependencies?.[t];
|
|
return i && typeof r == "function" ? r(i) : !!i;
|
|
}, "hasPeerDependency"), sue = /* @__PURE__ */ s((e, t) => {
|
|
let r = {
|
|
dependencies: [!1],
|
|
peerDependencies: [!1],
|
|
files: [!1]
|
|
}, { preset: i, files: n, dependencies: a, peerDependencies: o, matcherFunction: u } = t, l = [];
|
|
Array.isArray(a) ? l = a.map((f) => [f, void 0]) : typeof a == "object" && (l = Object.entries(a)), l.length > 0 && (r.dependencies = l.map(
|
|
([f, m]) => iue(e, f, m)
|
|
));
|
|
let c = [];
|
|
return Array.isArray(o) ? c = o.map((f) => [f, void 0]) : typeof o == "object" && (c = Object.entries(o)), c.length > 0 && (r.peerDependencies =
|
|
c.map(
|
|
([f, m]) => nue(e, f, m)
|
|
)), Array.isArray(n) && n.length > 0 && (r.files = n.map((f) => Nm(f))), u(r) ? i : null;
|
|
}, "getFrameworkPreset");
|
|
function aue(e = {}) {
|
|
let t = [...B4, N4].find((r) => sue(e, r) !== null);
|
|
return t ? t.preset : "UNDETECTED";
|
|
}
|
|
s(aue, "detectFrameworkPreset");
|
|
async function Jit(e, t) {
|
|
let r = Wu(tue, { stopAt: $4() }), i = Wu(rue, { stopAt: $4() }), n = e.getAllDependencies();
|
|
if (r || n.vite && n.webpack === void 0)
|
|
return W4("Detected Vite project. Setting builder to Vite")(), "vite";
|
|
if (i || (n.webpack || n["@nuxt/webpack-builder"]) && n.vite !== void 0)
|
|
return W4("Detected webpack project. Setting builder to webpack")(), "webpack5";
|
|
switch (t) {
|
|
case "REACT_NATIVE_WEB":
|
|
return "vite";
|
|
case "REACT_SCRIPTS":
|
|
case "ANGULAR":
|
|
case "REACT_NATIVE":
|
|
// technically react native doesn't use webpack, we just want to set something
|
|
case "NEXTJS":
|
|
case "EMBER":
|
|
return "webpack5";
|
|
case "NUXT":
|
|
return "vite";
|
|
default:
|
|
let { builder: a } = await (0, V4.default)(
|
|
{
|
|
type: "select",
|
|
name: "builder",
|
|
message: `
|
|
We were not able to detect the right builder for your project. Please select one:`,
|
|
choices: [
|
|
{ title: "Vite", value: "vite" },
|
|
{ title: "Webpack 5", value: "webpack5" }
|
|
]
|
|
},
|
|
{
|
|
onCancel: /* @__PURE__ */ s(() => {
|
|
throw new Qoe("Canceled by the user");
|
|
}, "onCancel")
|
|
}
|
|
);
|
|
return a;
|
|
}
|
|
}
|
|
s(Jit, "detectBuilder");
|
|
function Xit(e = Zoe(process.cwd(), ".storybook")) {
|
|
return Nm(e);
|
|
}
|
|
s(Xit, "isStorybookInstantiated");
|
|
async function Yit() {
|
|
return !!Wu([".pnp.js", ".pnp.cjs"]);
|
|
}
|
|
s(Yit, "detectPnp");
|
|
async function Zit(e) {
|
|
let t = "javascript";
|
|
if (Nm("jsconfig.json"))
|
|
return t;
|
|
let r = !!e.getAllDependencies().typescript, i = /* @__PURE__ */ s((c) => e.getModulePackageJSON(c)?.version ?? null, "getModulePackageJSO\
|
|
NVersion"), n = i("typescript"), a = i("prettier"), o = i(
|
|
"@babel/plugin-transform-typescript"
|
|
), u = i("@typescript-eslint/parser"), l = i("eslint-plugin-storybook");
|
|
return r && n ? Wf.gte(n, "4.9.0") && (!a || Wf.gte(a, "2.8.0")) && (!o || Wf.gte(o, "7.20.0")) && (!u || Wf.gte(u, "5.44.0")) && (!l || Wf.
|
|
gte(l, "0.6.8")) ? t = "typescript" : eue.warn(
|
|
"Detected TypeScript < 4.9 or incompatible tooling, populating with JavaScript examples"
|
|
) : Nm("tsconfig.json") && (t = "typescript"), t;
|
|
}
|
|
s(Zit, "detectLanguage");
|
|
async function Qit(e, t = {}) {
|
|
try {
|
|
if (await U4())
|
|
return "NX";
|
|
if (t.html)
|
|
return "HTML";
|
|
let { packageJson: r } = e.primaryPackageJson;
|
|
return aue(r);
|
|
} catch {
|
|
return "UNDETECTED";
|
|
}
|
|
}
|
|
s(Qit, "detect");
|
|
|
|
// src/cli/angular/helpers.ts
|
|
import { existsSync as tle, readFileSync as rle, writeFileSync as ile } from "node:fs";
|
|
import { join as nle } from "node:path";
|
|
import { logger as sle } from "storybook/internal/node-logger";
|
|
import { MissingAngularJsonError as ale } from "storybook/internal/server-errors";
|
|
|
|
// ../node_modules/boxen/index.js
|
|
import Um from "node:process";
|
|
|
|
// ../node_modules/ansi-regex/index.js
|
|
function gx({ onlyFirst: e = !1 } = {}) {
|
|
let r = [
|
|
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u00\
|
|
9C))",
|
|
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
|
|
].join("|");
|
|
return new RegExp(r, e ? void 0 : "g");
|
|
}
|
|
s(gx, "ansiRegex");
|
|
|
|
// ../node_modules/strip-ansi/index.js
|
|
var oue = gx();
|
|
function ko(e) {
|
|
if (typeof e != "string")
|
|
throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);
|
|
return e.replace(oue, "");
|
|
}
|
|
s(ko, "stripAnsi");
|
|
|
|
// ../node_modules/boxen/node_modules/string-width/index.js
|
|
var z4 = Rt(Dx(), 1), G4 = Rt(vx(), 1);
|
|
function zi(e, t = {}) {
|
|
if (typeof e != "string" || e.length === 0 || (t = {
|
|
ambiguousIsNarrow: !0,
|
|
...t
|
|
}, e = ko(e), e.length === 0))
|
|
return 0;
|
|
e = e.replace((0, G4.default)(), " ");
|
|
let r = t.ambiguousIsNarrow ? 1 : 2, i = 0;
|
|
for (let n of e) {
|
|
let a = n.codePointAt(0);
|
|
if (a <= 31 || a >= 127 && a <= 159 || a >= 768 && a <= 879)
|
|
continue;
|
|
switch (z4.default.eastAsianWidth(n)) {
|
|
case "F":
|
|
case "W":
|
|
i += 2;
|
|
break;
|
|
case "A":
|
|
i += r;
|
|
break;
|
|
default:
|
|
i += 1;
|
|
}
|
|
}
|
|
return i;
|
|
}
|
|
s(zi, "stringWidth");
|
|
|
|
// ../node_modules/boxen/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
var J4 = /* @__PURE__ */ s((e = 0) => (t) => `\x1B[${t + e}m`, "wrapAnsi16"), X4 = /* @__PURE__ */ s((e = 0) => (t) => `\x1B[${38 + e};5;${t}\
|
|
m`, "wrapAnsi256"), Y4 = /* @__PURE__ */ s((e = 0) => (t, r, i) => `\x1B[${38 + e};2;${t};${r};${i}m`, "wrapAnsi16m"), er = {
|
|
modifier: {
|
|
reset: [0, 0],
|
|
// 21 isn't widely supported and 22 does the same thing
|
|
bold: [1, 22],
|
|
dim: [2, 22],
|
|
italic: [3, 23],
|
|
underline: [4, 24],
|
|
overline: [53, 55],
|
|
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],
|
|
// Bright color
|
|
blackBright: [90, 39],
|
|
gray: [90, 39],
|
|
// Alias of `blackBright`
|
|
grey: [90, 39],
|
|
// Alias of `blackBright`
|
|
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],
|
|
// Bright color
|
|
bgBlackBright: [100, 49],
|
|
bgGray: [100, 49],
|
|
// Alias of `bgBlackBright`
|
|
bgGrey: [100, 49],
|
|
// Alias of `bgBlackBright`
|
|
bgRedBright: [101, 49],
|
|
bgGreenBright: [102, 49],
|
|
bgYellowBright: [103, 49],
|
|
bgBlueBright: [104, 49],
|
|
bgMagentaBright: [105, 49],
|
|
bgCyanBright: [106, 49],
|
|
bgWhiteBright: [107, 49]
|
|
}
|
|
}, pnt = Object.keys(er.modifier), uue = Object.keys(er.color), lue = Object.keys(er.bgColor), hnt = [...uue, ...lue];
|
|
function cue() {
|
|
let e = /* @__PURE__ */ new Map();
|
|
for (let [t, r] of Object.entries(er)) {
|
|
for (let [i, n] of Object.entries(r))
|
|
er[i] = {
|
|
open: `\x1B[${n[0]}m`,
|
|
close: `\x1B[${n[1]}m`
|
|
}, r[i] = er[i], e.set(n[0], n[1]);
|
|
Object.defineProperty(er, t, {
|
|
value: r,
|
|
enumerable: !1
|
|
});
|
|
}
|
|
return Object.defineProperty(er, "codes", {
|
|
value: e,
|
|
enumerable: !1
|
|
}), er.color.close = "\x1B[39m", er.bgColor.close = "\x1B[49m", er.color.ansi = J4(), er.color.ansi256 = X4(), er.color.ansi16m = Y4(), er.
|
|
bgColor.ansi = J4(10), er.bgColor.ansi256 = X4(10), er.bgColor.ansi16m = Y4(10), Object.defineProperties(er, {
|
|
rgbToAnsi256: {
|
|
value(t, r, i) {
|
|
return t === r && r === i ? t < 8 ? 16 : t > 248 ? 231 : Math.round((t - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(t / 255 * 5) + 6 *
|
|
Math.round(r / 255 * 5) + Math.round(i / 255 * 5);
|
|
},
|
|
enumerable: !1
|
|
},
|
|
hexToRgb: {
|
|
value(t) {
|
|
let r = /[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));
|
|
if (!r)
|
|
return [0, 0, 0];
|
|
let [i] = r;
|
|
i.length === 3 && (i = [...i].map((a) => a + a).join(""));
|
|
let n = Number.parseInt(i, 16);
|
|
return [
|
|
/* eslint-disable no-bitwise */
|
|
n >> 16 & 255,
|
|
n >> 8 & 255,
|
|
n & 255
|
|
/* eslint-enable no-bitwise */
|
|
];
|
|
},
|
|
enumerable: !1
|
|
},
|
|
hexToAnsi256: {
|
|
value: /* @__PURE__ */ s((t) => er.rgbToAnsi256(...er.hexToRgb(t)), "value"),
|
|
enumerable: !1
|
|
},
|
|
ansi256ToAnsi: {
|
|
value(t) {
|
|
if (t < 8)
|
|
return 30 + t;
|
|
if (t < 16)
|
|
return 90 + (t - 8);
|
|
let r, i, n;
|
|
if (t >= 232)
|
|
r = ((t - 232) * 10 + 8) / 255, i = r, n = r;
|
|
else {
|
|
t -= 16;
|
|
let u = t % 36;
|
|
r = Math.floor(t / 36) / 5, i = Math.floor(u / 6) / 5, n = u % 6 / 5;
|
|
}
|
|
let a = Math.max(r, i, n) * 2;
|
|
if (a === 0)
|
|
return 30;
|
|
let o = 30 + (Math.round(n) << 2 | Math.round(i) << 1 | Math.round(r));
|
|
return a === 2 && (o += 60), o;
|
|
},
|
|
enumerable: !1
|
|
},
|
|
rgbToAnsi: {
|
|
value: /* @__PURE__ */ s((t, r, i) => er.ansi256ToAnsi(er.rgbToAnsi256(t, r, i)), "value"),
|
|
enumerable: !1
|
|
},
|
|
hexToAnsi: {
|
|
value: /* @__PURE__ */ s((t) => er.ansi256ToAnsi(er.hexToAnsi256(t)), "value"),
|
|
enumerable: !1
|
|
}
|
|
}), er;
|
|
}
|
|
s(cue, "assembleStyles");
|
|
var fue = cue(), En = fue;
|
|
|
|
// ../node_modules/boxen/node_modules/chalk/source/vendor/supports-color/index.js
|
|
import Ex from "node:process";
|
|
import due from "node:os";
|
|
import Z4 from "node:tty";
|
|
function Gi(e, t = globalThis.Deno ? globalThis.Deno.args : Ex.argv) {
|
|
let r = e.startsWith("-") ? "" : e.length === 1 ? "-" : "--", i = t.indexOf(r + e), n = t.indexOf("--");
|
|
return i !== -1 && (n === -1 || i < n);
|
|
}
|
|
s(Gi, "hasFlag");
|
|
var { env: cr } = Ex, Mm;
|
|
Gi("no-color") || Gi("no-colors") || Gi("color=false") || Gi("color=never") ? Mm = 0 : (Gi("color") || Gi("colors") || Gi("color=true") || Gi(
|
|
"color=always")) && (Mm = 1);
|
|
function pue() {
|
|
if ("FORCE_COLOR" in cr)
|
|
return cr.FORCE_COLOR === "true" ? 1 : cr.FORCE_COLOR === "false" ? 0 : cr.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(cr.FORCE_COLOR,
|
|
10), 3);
|
|
}
|
|
s(pue, "envForceColor");
|
|
function hue(e) {
|
|
return e === 0 ? !1 : {
|
|
level: e,
|
|
hasBasic: !0,
|
|
has256: e >= 2,
|
|
has16m: e >= 3
|
|
};
|
|
}
|
|
s(hue, "translateLevel");
|
|
function mue(e, { streamIsTTY: t, sniffFlags: r = !0 } = {}) {
|
|
let i = pue();
|
|
i !== void 0 && (Mm = i);
|
|
let n = r ? Mm : i;
|
|
if (n === 0)
|
|
return 0;
|
|
if (r) {
|
|
if (Gi("color=16m") || Gi("color=full") || Gi("color=truecolor"))
|
|
return 3;
|
|
if (Gi("color=256"))
|
|
return 2;
|
|
}
|
|
if ("TF_BUILD" in cr && "AGENT_NAME" in cr)
|
|
return 1;
|
|
if (e && !t && n === void 0)
|
|
return 0;
|
|
let a = n || 0;
|
|
if (cr.TERM === "dumb")
|
|
return a;
|
|
if (Ex.platform === "win32") {
|
|
let o = due.release().split(".");
|
|
return Number(o[0]) >= 10 && Number(o[2]) >= 10586 ? Number(o[2]) >= 14931 ? 3 : 2 : 1;
|
|
}
|
|
if ("CI" in cr)
|
|
return ["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((o) => o in cr) ? 3 : ["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRON\
|
|
E"].some((o) => o in cr) || cr.CI_NAME === "codeship" ? 1 : a;
|
|
if ("TEAMCITY_VERSION" in cr)
|
|
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(cr.TEAMCITY_VERSION) ? 1 : 0;
|
|
if (cr.COLORTERM === "truecolor" || cr.TERM === "xterm-kitty")
|
|
return 3;
|
|
if ("TERM_PROGRAM" in cr) {
|
|
let o = Number.parseInt((cr.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
switch (cr.TERM_PROGRAM) {
|
|
case "iTerm.app":
|
|
return o >= 3 ? 3 : 2;
|
|
case "Apple_Terminal":
|
|
return 2;
|
|
}
|
|
}
|
|
return /-256(color)?$/i.test(cr.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(cr.TERM) || "COLORTERM" in cr ?
|
|
1 : a;
|
|
}
|
|
s(mue, "_supportsColor");
|
|
function Q4(e, t = {}) {
|
|
let r = mue(e, {
|
|
streamIsTTY: e && e.isTTY,
|
|
...t
|
|
});
|
|
return hue(r);
|
|
}
|
|
s(Q4, "createSupportsColor");
|
|
var yue = {
|
|
stdout: Q4({ isTTY: Z4.isatty(1) }),
|
|
stderr: Q4({ isTTY: Z4.isatty(2) })
|
|
}, eM = yue;
|
|
|
|
// ../node_modules/boxen/node_modules/chalk/source/utilities.js
|
|
function tM(e, t, r) {
|
|
let i = e.indexOf(t);
|
|
if (i === -1)
|
|
return e;
|
|
let n = t.length, a = 0, o = "";
|
|
do
|
|
o += e.slice(a, i) + t + r, a = i + n, i = e.indexOf(t, a);
|
|
while (i !== -1);
|
|
return o += e.slice(a), o;
|
|
}
|
|
s(tM, "stringReplaceAll");
|
|
function rM(e, t, r, i) {
|
|
let n = 0, a = "";
|
|
do {
|
|
let o = e[i - 1] === "\r";
|
|
a += e.slice(n, o ? i - 1 : i) + t + (o ? `\r
|
|
` : `
|
|
`) + r, n = i + 1, i = e.indexOf(`
|
|
`, n);
|
|
} while (i !== -1);
|
|
return a += e.slice(n), a;
|
|
}
|
|
s(rM, "stringEncaseCRLFWithFirstIndex");
|
|
|
|
// ../node_modules/boxen/node_modules/chalk/source/index.js
|
|
var { stdout: iM, stderr: nM } = eM, xx = Symbol("GENERATOR"), El = Symbol("STYLER"), $f = Symbol("IS_EMPTY"), sM = [
|
|
"ansi",
|
|
"ansi",
|
|
"ansi256",
|
|
"ansi16m"
|
|
], xl = /* @__PURE__ */ Object.create(null), gue = /* @__PURE__ */ s((e, t = {}) => {
|
|
if (t.level && !(Number.isInteger(t.level) && t.level >= 0 && t.level <= 3))
|
|
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
let r = iM ? iM.level : 0;
|
|
e.level = t.level === void 0 ? r : t.level;
|
|
}, "applyOptions");
|
|
var bue = /* @__PURE__ */ s((e) => {
|
|
let t = /* @__PURE__ */ s((...r) => r.join(" "), "chalk");
|
|
return gue(t, e), Object.setPrototypeOf(t, Vf.prototype), t;
|
|
}, "chalkFactory");
|
|
function Vf(e) {
|
|
return bue(e);
|
|
}
|
|
s(Vf, "createChalk");
|
|
Object.setPrototypeOf(Vf.prototype, Function.prototype);
|
|
for (let [e, t] of Object.entries(En))
|
|
xl[e] = {
|
|
get() {
|
|
let r = Rm(this, Tx(t.open, t.close, this[El]), this[$f]);
|
|
return Object.defineProperty(this, e, { value: r }), r;
|
|
}
|
|
};
|
|
xl.visible = {
|
|
get() {
|
|
let e = Rm(this, this[El], !0);
|
|
return Object.defineProperty(this, "visible", { value: e }), e;
|
|
}
|
|
};
|
|
var Sx = /* @__PURE__ */ s((e, t, r, ...i) => e === "rgb" ? t === "ansi16m" ? En[r].ansi16m(...i) : t === "ansi256" ? En[r].ansi256(En.rgbToAnsi256(
|
|
...i)) : En[r].ansi(En.rgbToAnsi(...i)) : e === "hex" ? Sx("rgb", t, r, ...En.hexToRgb(...i)) : En[r][e](...i), "getModelAnsi"), Due = ["rgb",
|
|
"hex", "ansi256"];
|
|
for (let e of Due) {
|
|
xl[e] = {
|
|
get() {
|
|
let { level: r } = this;
|
|
return function(...i) {
|
|
let n = Tx(Sx(e, sM[r], "color", ...i), En.color.close, this[El]);
|
|
return Rm(this, n, this[$f]);
|
|
};
|
|
}
|
|
};
|
|
let t = "bg" + e[0].toUpperCase() + e.slice(1);
|
|
xl[t] = {
|
|
get() {
|
|
let { level: r } = this;
|
|
return function(...i) {
|
|
let n = Tx(Sx(e, sM[r], "bgColor", ...i), En.bgColor.close, this[El]);
|
|
return Rm(this, n, this[$f]);
|
|
};
|
|
}
|
|
};
|
|
}
|
|
var vue = Object.defineProperties(() => {
|
|
}, {
|
|
...xl,
|
|
level: {
|
|
enumerable: !0,
|
|
get() {
|
|
return this[xx].level;
|
|
},
|
|
set(e) {
|
|
this[xx].level = e;
|
|
}
|
|
}
|
|
}), Tx = /* @__PURE__ */ s((e, t, r) => {
|
|
let i, n;
|
|
return r === void 0 ? (i = e, n = t) : (i = r.openAll + e, n = t + r.closeAll), {
|
|
open: e,
|
|
close: t,
|
|
openAll: i,
|
|
closeAll: n,
|
|
parent: r
|
|
};
|
|
}, "createStyler"), Rm = /* @__PURE__ */ s((e, t, r) => {
|
|
let i = /* @__PURE__ */ s((...n) => Eue(i, n.length === 1 ? "" + n[0] : n.join(" ")), "builder");
|
|
return Object.setPrototypeOf(i, vue), i[xx] = e, i[El] = t, i[$f] = r, i;
|
|
}, "createBuilder"), Eue = /* @__PURE__ */ s((e, t) => {
|
|
if (e.level <= 0 || !t)
|
|
return e[$f] ? "" : t;
|
|
let r = e[El];
|
|
if (r === void 0)
|
|
return t;
|
|
let { openAll: i, closeAll: n } = r;
|
|
if (t.includes("\x1B"))
|
|
for (; r !== void 0; )
|
|
t = tM(t, r.close, r.open), r = r.parent;
|
|
let a = t.indexOf(`
|
|
`);
|
|
return a !== -1 && (t = rM(t, n, i, a)), i + t + n;
|
|
}, "applyStyle");
|
|
Object.defineProperties(Vf.prototype, xl);
|
|
var xue = Vf(), Ant = Vf({ level: nM ? nM.level : 0 });
|
|
var Bo = xue;
|
|
|
|
// ../node_modules/boxen/node_modules/widest-line/index.js
|
|
function jm(e) {
|
|
let t = 0;
|
|
for (let r of e.split(`
|
|
`))
|
|
t = Math.max(t, zi(r));
|
|
return t;
|
|
}
|
|
s(jm, "widestLine");
|
|
|
|
// ../node_modules/boxen/index.js
|
|
var RM = Rt(wx(), 1);
|
|
|
|
// ../node_modules/boxen/node_modules/camelcase/index.js
|
|
var Tue = /[\p{Lu}]/u, Cue = /[\p{Ll}]/u, uM = /^[\p{Lu}](?![\p{Lu}])/gu, fM = /([\p{Alpha}\p{N}_]|$)/u, Ax = /[_.\- ]+/, wue = new RegExp("\
|
|
^" + Ax.source), lM = new RegExp(Ax.source + fM.source, "gu"), cM = new RegExp("\\d+" + fM.source, "gu"), Aue = /* @__PURE__ */ s((e, t, r, i) => {
|
|
let n = !1, a = !1, o = !1, u = !1;
|
|
for (let l = 0; l < e.length; l++) {
|
|
let c = e[l];
|
|
u = l > 2 ? e[l - 3] === "-" : !0, n && Tue.test(c) ? (e = e.slice(0, l) + "-" + e.slice(l), n = !1, o = a, a = !0, l++) : a && o && Cue.
|
|
test(c) && (!u || i) ? (e = e.slice(0, l - 1) + "-" + e.slice(l - 1), o = a, a = !1, n = !0) : (n = t(c) === c && r(c) !== c, o = a, a =
|
|
r(c) === c && t(c) !== c);
|
|
}
|
|
return e;
|
|
}, "preserveCamelCase"), _ue = /* @__PURE__ */ s((e, t) => (uM.lastIndex = 0, e.replace(uM, (r) => t(r))), "preserveConsecutiveUppercase"), Pue = /* @__PURE__ */ s(
|
|
(e, t) => (lM.lastIndex = 0, cM.lastIndex = 0, e.replace(lM, (r, i) => t(i)).replace(cM, (r) => t(r))), "postProcess");
|
|
function _x(e, t) {
|
|
if (!(typeof e == "string" || Array.isArray(e)))
|
|
throw new TypeError("Expected the input to be `string | string[]`");
|
|
if (t = {
|
|
pascalCase: !1,
|
|
preserveConsecutiveUppercase: !1,
|
|
...t
|
|
}, Array.isArray(e) ? e = e.map((a) => a.trim()).filter((a) => a.length).join("-") : e = e.trim(), e.length === 0)
|
|
return "";
|
|
let r = t.locale === !1 ? (a) => a.toLowerCase() : (a) => a.toLocaleLowerCase(t.locale), i = t.locale === !1 ? (a) => a.toUpperCase() : (a) => a.
|
|
toLocaleUpperCase(t.locale);
|
|
return e.length === 1 ? Ax.test(e) ? "" : t.pascalCase ? i(e) : r(e) : (e !== r(e) && (e = Aue(e, r, i, t.preserveConsecutiveUppercase)), e =
|
|
e.replace(wue, ""), e = t.preserveConsecutiveUppercase ? _ue(e, r) : r(e), t.pascalCase && (e = i(e.charAt(0)) + e.slice(1)), Pue(e, i));
|
|
}
|
|
s(_x, "camelCase");
|
|
|
|
// ../node_modules/boxen/index.js
|
|
var Bx = Rt(SM(), 1);
|
|
|
|
// ../node_modules/wrap-ansi/node_modules/string-width/index.js
|
|
var TM = Rt(Dx(), 1), CM = Rt(vx(), 1);
|
|
function Mo(e, t = {}) {
|
|
if (typeof e != "string" || e.length === 0 || (t = {
|
|
ambiguousIsNarrow: !0,
|
|
...t
|
|
}, e = ko(e), e.length === 0))
|
|
return 0;
|
|
e = e.replace((0, CM.default)(), " ");
|
|
let r = t.ambiguousIsNarrow ? 1 : 2, i = 0;
|
|
for (let n of e) {
|
|
let a = n.codePointAt(0);
|
|
if (a <= 31 || a >= 127 && a <= 159 || a >= 768 && a <= 879)
|
|
continue;
|
|
switch (TM.default.eastAsianWidth(n)) {
|
|
case "F":
|
|
case "W":
|
|
i += 2;
|
|
break;
|
|
case "A":
|
|
i += r;
|
|
break;
|
|
default:
|
|
i += 1;
|
|
}
|
|
}
|
|
return i;
|
|
}
|
|
s(Mo, "stringWidth");
|
|
|
|
// ../node_modules/wrap-ansi/node_modules/ansi-styles/index.js
|
|
var wM = /* @__PURE__ */ s((e = 0) => (t) => `\x1B[${t + e}m`, "wrapAnsi16"), AM = /* @__PURE__ */ s((e = 0) => (t) => `\x1B[${38 + e};5;${t}\
|
|
m`, "wrapAnsi256"), _M = /* @__PURE__ */ s((e = 0) => (t, r, i) => `\x1B[${38 + e};2;${t};${r};${i}m`, "wrapAnsi16m"), tr = {
|
|
modifier: {
|
|
reset: [0, 0],
|
|
// 21 isn't widely supported and 22 does the same thing
|
|
bold: [1, 22],
|
|
dim: [2, 22],
|
|
italic: [3, 23],
|
|
underline: [4, 24],
|
|
overline: [53, 55],
|
|
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],
|
|
// Bright color
|
|
blackBright: [90, 39],
|
|
gray: [90, 39],
|
|
// Alias of `blackBright`
|
|
grey: [90, 39],
|
|
// Alias of `blackBright`
|
|
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],
|
|
// Bright color
|
|
bgBlackBright: [100, 49],
|
|
bgGray: [100, 49],
|
|
// Alias of `bgBlackBright`
|
|
bgGrey: [100, 49],
|
|
// Alias of `bgBlackBright`
|
|
bgRedBright: [101, 49],
|
|
bgGreenBright: [102, 49],
|
|
bgYellowBright: [103, 49],
|
|
bgBlueBright: [104, 49],
|
|
bgMagentaBright: [105, 49],
|
|
bgCyanBright: [106, 49],
|
|
bgWhiteBright: [107, 49]
|
|
}
|
|
}, Jnt = Object.keys(tr.modifier), Rue = Object.keys(tr.color), jue = Object.keys(tr.bgColor), Xnt = [...Rue, ...jue];
|
|
function Lue() {
|
|
let e = /* @__PURE__ */ new Map();
|
|
for (let [t, r] of Object.entries(tr)) {
|
|
for (let [i, n] of Object.entries(r))
|
|
tr[i] = {
|
|
open: `\x1B[${n[0]}m`,
|
|
close: `\x1B[${n[1]}m`
|
|
}, r[i] = tr[i], e.set(n[0], n[1]);
|
|
Object.defineProperty(tr, t, {
|
|
value: r,
|
|
enumerable: !1
|
|
});
|
|
}
|
|
return Object.defineProperty(tr, "codes", {
|
|
value: e,
|
|
enumerable: !1
|
|
}), tr.color.close = "\x1B[39m", tr.bgColor.close = "\x1B[49m", tr.color.ansi = wM(), tr.color.ansi256 = AM(), tr.color.ansi16m = _M(), tr.
|
|
bgColor.ansi = wM(10), tr.bgColor.ansi256 = AM(10), tr.bgColor.ansi16m = _M(10), Object.defineProperties(tr, {
|
|
rgbToAnsi256: {
|
|
value: /* @__PURE__ */ s((t, r, i) => t === r && r === i ? t < 8 ? 16 : t > 248 ? 231 : Math.round((t - 8) / 247 * 24) + 232 : 16 + 36 *
|
|
Math.round(t / 255 * 5) + 6 * Math.round(r / 255 * 5) + Math.round(i / 255 * 5), "value"),
|
|
enumerable: !1
|
|
},
|
|
hexToRgb: {
|
|
value: /* @__PURE__ */ s((t) => {
|
|
let r = /[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));
|
|
if (!r)
|
|
return [0, 0, 0];
|
|
let [i] = r;
|
|
i.length === 3 && (i = [...i].map((a) => a + a).join(""));
|
|
let n = Number.parseInt(i, 16);
|
|
return [
|
|
/* eslint-disable no-bitwise */
|
|
n >> 16 & 255,
|
|
n >> 8 & 255,
|
|
n & 255
|
|
/* eslint-enable no-bitwise */
|
|
];
|
|
}, "value"),
|
|
enumerable: !1
|
|
},
|
|
hexToAnsi256: {
|
|
value: /* @__PURE__ */ s((t) => tr.rgbToAnsi256(...tr.hexToRgb(t)), "value"),
|
|
enumerable: !1
|
|
},
|
|
ansi256ToAnsi: {
|
|
value: /* @__PURE__ */ s((t) => {
|
|
if (t < 8)
|
|
return 30 + t;
|
|
if (t < 16)
|
|
return 90 + (t - 8);
|
|
let r, i, n;
|
|
if (t >= 232)
|
|
r = ((t - 232) * 10 + 8) / 255, i = r, n = r;
|
|
else {
|
|
t -= 16;
|
|
let u = t % 36;
|
|
r = Math.floor(t / 36) / 5, i = Math.floor(u / 6) / 5, n = u % 6 / 5;
|
|
}
|
|
let a = Math.max(r, i, n) * 2;
|
|
if (a === 0)
|
|
return 30;
|
|
let o = 30 + (Math.round(n) << 2 | Math.round(i) << 1 | Math.round(r));
|
|
return a === 2 && (o += 60), o;
|
|
}, "value"),
|
|
enumerable: !1
|
|
},
|
|
rgbToAnsi: {
|
|
value: /* @__PURE__ */ s((t, r, i) => tr.ansi256ToAnsi(tr.rgbToAnsi256(t, r, i)), "value"),
|
|
enumerable: !1
|
|
},
|
|
hexToAnsi: {
|
|
value: /* @__PURE__ */ s((t) => tr.ansi256ToAnsi(tr.hexToAnsi256(t)), "value"),
|
|
enumerable: !1
|
|
}
|
|
}), tr;
|
|
}
|
|
s(Lue, "assembleStyles");
|
|
var que = Lue(), PM = que;
|
|
|
|
// ../node_modules/wrap-ansi/index.js
|
|
var Lm = /* @__PURE__ */ new Set([
|
|
"\x1B",
|
|
"\x9B"
|
|
]), Uue = 39, Ox = "\x07", OM = "[", Wue = "]", kM = "m", kx = `${Wue}8;;`, FM = /* @__PURE__ */ s((e) => `${Lm.values().next().value}${OM}${e}${kM}`,
|
|
"wrapAnsiCode"), IM = /* @__PURE__ */ s((e) => `${Lm.values().next().value}${kx}${e}${Ox}`, "wrapAnsiHyperlink"), $ue = /* @__PURE__ */ s((e) => e.
|
|
split(" ").map((t) => Mo(t)), "wordLengths"), Ix = /* @__PURE__ */ s((e, t, r) => {
|
|
let i = [...t], n = !1, a = !1, o = Mo(ko(e[e.length - 1]));
|
|
for (let [u, l] of i.entries()) {
|
|
let c = Mo(l);
|
|
if (o + c <= r ? e[e.length - 1] += l : (e.push(l), o = 0), Lm.has(l) && (n = !0, a = i.slice(u + 1).join("").startsWith(kx)), n) {
|
|
a ? l === Ox && (n = !1, a = !1) : l === kM && (n = !1);
|
|
continue;
|
|
}
|
|
o += c, o === r && u < i.length - 1 && (e.push(""), o = 0);
|
|
}
|
|
!o && e[e.length - 1].length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
|
|
}, "wrapWord"), Vue = /* @__PURE__ */ s((e) => {
|
|
let t = e.split(" "), r = t.length;
|
|
for (; r > 0 && !(Mo(t[r - 1]) > 0); )
|
|
r--;
|
|
return r === t.length ? e : t.slice(0, r).join(" ") + t.slice(r).join("");
|
|
}, "stringVisibleTrimSpacesRight"), Hue = /* @__PURE__ */ s((e, t, r = {}) => {
|
|
if (r.trim !== !1 && e.trim() === "")
|
|
return "";
|
|
let i = "", n, a, o = $ue(e), u = [""];
|
|
for (let [c, f] of e.split(" ").entries()) {
|
|
r.trim !== !1 && (u[u.length - 1] = u[u.length - 1].trimStart());
|
|
let m = Mo(u[u.length - 1]);
|
|
if (c !== 0 && (m >= t && (r.wordWrap === !1 || r.trim === !1) && (u.push(""), m = 0), (m > 0 || r.trim === !1) && (u[u.length - 1] += "\
|
|
", m++)), r.hard && o[c] > t) {
|
|
let h = t - m, d = 1 + Math.floor((o[c] - h - 1) / t);
|
|
Math.floor((o[c] - 1) / t) < d && u.push(""), Ix(u, f, t);
|
|
continue;
|
|
}
|
|
if (m + o[c] > t && m > 0 && o[c] > 0) {
|
|
if (r.wordWrap === !1 && m < t) {
|
|
Ix(u, f, t);
|
|
continue;
|
|
}
|
|
u.push("");
|
|
}
|
|
if (m + o[c] > t && r.wordWrap === !1) {
|
|
Ix(u, f, t);
|
|
continue;
|
|
}
|
|
u[u.length - 1] += f;
|
|
}
|
|
r.trim !== !1 && (u = u.map((c) => Vue(c)));
|
|
let l = [...u.join(`
|
|
`)];
|
|
for (let [c, f] of l.entries()) {
|
|
if (i += f, Lm.has(f)) {
|
|
let { groups: h } = new RegExp(`(?:\\${OM}(?<code>\\d+)m|\\${kx}(?<uri>.*)${Ox})`).exec(l.slice(c).join("")) || { groups: {} };
|
|
if (h.code !== void 0) {
|
|
let d = Number.parseFloat(h.code);
|
|
n = d === Uue ? void 0 : d;
|
|
} else h.uri !== void 0 && (a = h.uri.length === 0 ? void 0 : h.uri);
|
|
}
|
|
let m = PM.codes.get(Number(n));
|
|
l[c + 1] === `
|
|
` ? (a && (i += IM("")), n && m && (i += FM(m))) : f === `
|
|
` && (n && m && (i += FM(n)), a && (i += IM(a)));
|
|
}
|
|
return i;
|
|
}, "exec");
|
|
function qm(e, t, r) {
|
|
return String(e).normalize().replace(/\r\n/g, `
|
|
`).split(`
|
|
`).map((i) => Hue(i, t, r)).join(`
|
|
`);
|
|
}
|
|
s(qm, "wrapAnsi");
|
|
|
|
// ../node_modules/boxen/index.js
|
|
var ele = Rt(wx(), 1);
|
|
var Pa = `
|
|
`, fi = " ", Hf = "none", jM = /* @__PURE__ */ s(() => {
|
|
let { env: e, stdout: t, stderr: r } = Um;
|
|
return t?.columns ? t.columns : r?.columns ? r.columns : e.COLUMNS ? Number.parseInt(e.COLUMNS, 10) : 80;
|
|
}, "terminalColumns"), BM = /* @__PURE__ */ s((e) => typeof e == "number" ? {
|
|
top: e,
|
|
right: e * 3,
|
|
bottom: e,
|
|
left: e * 3
|
|
} : {
|
|
top: 0,
|
|
right: 0,
|
|
bottom: 0,
|
|
left: 0,
|
|
...e
|
|
}, "getObject"), Kf = /* @__PURE__ */ s((e) => e === Hf ? 0 : 2, "getBorderWidth"), Kue = /* @__PURE__ */ s((e) => {
|
|
let t = [
|
|
"topLeft",
|
|
"topRight",
|
|
"bottomRight",
|
|
"bottomLeft",
|
|
"left",
|
|
"right",
|
|
"top",
|
|
"bottom"
|
|
], r;
|
|
if (e === Hf) {
|
|
e = {};
|
|
for (let i of t)
|
|
e[i] = "";
|
|
}
|
|
if (typeof e == "string") {
|
|
if (r = RM.default[e], !r)
|
|
throw new TypeError(`Invalid border style: ${e}`);
|
|
} else {
|
|
typeof e?.vertical == "string" && (e.left = e.vertical, e.right = e.vertical), typeof e?.horizontal == "string" && (e.top = e.horizontal,
|
|
e.bottom = e.horizontal);
|
|
for (let i of t)
|
|
if (e[i] === null || typeof e[i] != "string")
|
|
throw new TypeError(`Invalid border style: ${i}`);
|
|
r = e;
|
|
}
|
|
return r;
|
|
}, "getBorderChars"), zue = /* @__PURE__ */ s((e, t, r) => {
|
|
let i = "", n = zi(e);
|
|
switch (r) {
|
|
case "left": {
|
|
i = e + t.slice(n);
|
|
break;
|
|
}
|
|
case "right": {
|
|
i = t.slice(n) + e;
|
|
break;
|
|
}
|
|
default: {
|
|
t = t.slice(n), t.length % 2 === 1 ? (t = t.slice(Math.floor(t.length / 2)), i = t.slice(1) + e + t) : (t = t.slice(t.length / 2), i =
|
|
t + e + t);
|
|
break;
|
|
}
|
|
}
|
|
return i;
|
|
}, "makeTitle"), Gue = /* @__PURE__ */ s((e, { padding: t, width: r, textAlignment: i, height: n }) => {
|
|
e = (0, Bx.default)(e, { align: i });
|
|
let a = e.split(Pa), o = jm(e), u = r - t.left - t.right;
|
|
if (o > u) {
|
|
let f = [];
|
|
for (let m of a) {
|
|
let h = qm(m, u, { hard: !0 }), y = (0, Bx.default)(h, { align: i }).split(`
|
|
`), p = Math.max(...y.map((g) => zi(g)));
|
|
for (let g of y) {
|
|
let b;
|
|
switch (i) {
|
|
case "center": {
|
|
b = fi.repeat((u - p) / 2) + g;
|
|
break;
|
|
}
|
|
case "right": {
|
|
b = fi.repeat(u - p) + g;
|
|
break;
|
|
}
|
|
default: {
|
|
b = g;
|
|
break;
|
|
}
|
|
}
|
|
f.push(b);
|
|
}
|
|
}
|
|
a = f;
|
|
}
|
|
i === "center" && o < u ? a = a.map((f) => fi.repeat((u - o) / 2) + f) : i === "right" && o < u && (a = a.map((f) => fi.repeat(u - o) + f));
|
|
let l = fi.repeat(t.left), c = fi.repeat(t.right);
|
|
return a = a.map((f) => l + f + c), a = a.map((f) => {
|
|
if (r - zi(f) > 0)
|
|
switch (i) {
|
|
case "center":
|
|
return f + fi.repeat(r - zi(f));
|
|
case "right":
|
|
return f + fi.repeat(r - zi(f));
|
|
default:
|
|
return f + fi.repeat(r - zi(f));
|
|
}
|
|
return f;
|
|
}), t.top > 0 && (a = [...Array.from({ length: t.top }).fill(fi.repeat(r)), ...a]), t.bottom > 0 && (a = [...a, ...Array.from({ length: t.
|
|
bottom }).fill(fi.repeat(r))]), n && a.length > n ? a = a.slice(0, n) : n && a.length < n && (a = [...a, ...Array.from({ length: n - a.length }).
|
|
fill(fi.repeat(r))]), a.join(Pa);
|
|
}, "makeContentText"), Jue = /* @__PURE__ */ s((e, t, r) => {
|
|
let i = /* @__PURE__ */ s((f) => {
|
|
let m = r.borderColor ? Zue(r.borderColor)(f) : f;
|
|
return r.dimBorder ? Bo.dim(m) : m;
|
|
}, "colorizeBorder"), n = /* @__PURE__ */ s((f) => r.backgroundColor ? Que(r.backgroundColor)(f) : f, "colorizeContent"), a = Kue(r.borderStyle),
|
|
o = jM(), u = fi.repeat(r.margin.left);
|
|
if (r.float === "center") {
|
|
let f = Math.max((o - t - Kf(r.borderStyle)) / 2, 0);
|
|
u = fi.repeat(f);
|
|
} else if (r.float === "right") {
|
|
let f = Math.max(o - t - r.margin.right - Kf(r.borderStyle), 0);
|
|
u = fi.repeat(f);
|
|
}
|
|
let l = "";
|
|
r.margin.top && (l += Pa.repeat(r.margin.top)), (r.borderStyle !== Hf || r.title) && (l += i(u + a.topLeft + (r.title ? zue(r.title, a.top.
|
|
repeat(t), r.titleAlignment) : a.top.repeat(t)) + a.topRight) + Pa);
|
|
let c = e.split(Pa);
|
|
return l += c.map((f) => u + i(a.left) + n(f) + i(a.right)).join(Pa), r.borderStyle !== Hf && (l += Pa + i(u + a.bottomLeft + a.bottom.repeat(
|
|
t) + a.bottomRight)), r.margin.bottom && (l += Pa.repeat(r.margin.bottom)), l;
|
|
}, "boxContent"), Xue = /* @__PURE__ */ s((e) => {
|
|
if (e.fullscreen && Um?.stdout) {
|
|
let t = [Um.stdout.columns, Um.stdout.rows];
|
|
typeof e.fullscreen == "function" && (t = e.fullscreen(...t)), e.width || (e.width = t[0]), e.height || (e.height = t[1]);
|
|
}
|
|
return e.width && (e.width = Math.max(1, e.width - Kf(e.borderStyle))), e.height && (e.height = Math.max(1, e.height - Kf(e.borderStyle))),
|
|
e;
|
|
}, "sanitizeOptions"), NM = /* @__PURE__ */ s((e, t) => t === Hf ? e : ` ${e} `, "formatTitle"), Yue = /* @__PURE__ */ s((e, t) => {
|
|
t = Xue(t);
|
|
let r = t.width !== void 0, i = jM(), n = Kf(t.borderStyle), a = i - t.margin.left - t.margin.right - n, o = jm(qm(e, i - n, { hard: !0, trim: !1 })) +
|
|
t.padding.left + t.padding.right;
|
|
if (t.title && r ? (t.title = t.title.slice(0, Math.max(0, t.width - 2)), t.title && (t.title = NM(t.title, t.borderStyle))) : t.title && (t.
|
|
title = t.title.slice(0, Math.max(0, a - 2)), t.title && (t.title = NM(t.title, t.borderStyle), zi(t.title) > o && (t.width = zi(t.title)))),
|
|
t.width = t.width ? t.width : o, !r) {
|
|
if (t.margin.left && t.margin.right && t.width > a) {
|
|
let l = (i - t.width - n) / (t.margin.left + t.margin.right);
|
|
t.margin.left = Math.max(0, Math.floor(t.margin.left * l)), t.margin.right = Math.max(0, Math.floor(t.margin.right * l));
|
|
}
|
|
t.width = Math.min(t.width, i - n - t.margin.left - t.margin.right);
|
|
}
|
|
return t.width - (t.padding.left + t.padding.right) <= 0 && (t.padding.left = 0, t.padding.right = 0), t.height && t.height - (t.padding.top +
|
|
t.padding.bottom) <= 0 && (t.padding.top = 0, t.padding.bottom = 0), t;
|
|
}, "determineDimensions"), Nx = /* @__PURE__ */ s((e) => e.match(/^#(?:[0-f]{3}){1,2}$/i), "isHex"), MM = /* @__PURE__ */ s((e) => typeof e ==
|
|
"string" && (Bo[e] ?? Nx(e)), "isColorValid"), Zue = /* @__PURE__ */ s((e) => Nx(e) ? Bo.hex(e) : Bo[e], "getColorFn"), Que = /* @__PURE__ */ s(
|
|
(e) => Nx(e) ? Bo.bgHex(e) : Bo[_x(["bg", e])], "getBGColorFn");
|
|
function Mx(e, t) {
|
|
if (t = {
|
|
padding: 0,
|
|
borderStyle: "single",
|
|
dimBorder: !1,
|
|
textAlignment: "left",
|
|
float: "left",
|
|
titleAlignment: "left",
|
|
...t
|
|
}, t.align && (t.textAlignment = t.align), t.borderColor && !MM(t.borderColor))
|
|
throw new Error(`${t.borderColor} is not a valid borderColor`);
|
|
if (t.backgroundColor && !MM(t.backgroundColor))
|
|
throw new Error(`${t.backgroundColor} is not a valid backgroundColor`);
|
|
return t.padding = BM(t.padding), t.margin = BM(t.margin), t = Yue(e, t), e = Gue(e, t), Jue(e, t.width, t);
|
|
}
|
|
s(Mx, "boxen");
|
|
|
|
// src/cli/angular/helpers.ts
|
|
var Rx = Rt(rv(), 1), jx = Rt(Wm(), 1);
|
|
var $m = "angular.json", Dst = jx.dedent`
|
|
import { setCompodocJson } from "@storybook/addon-docs/angular";
|
|
import docJson from "../documentation.json";
|
|
setCompodocJson(docJson);
|
|
`.trimStart(), vst = /* @__PURE__ */ s(async () => {
|
|
sle.plain(
|
|
// Create a text which explains the user why compodoc is necessary
|
|
Mx(
|
|
jx.dedent`
|
|
Compodoc is a great tool to generate documentation for your Angular projects.
|
|
Storybook can use the documentation generated by Compodoc to extract argument definitions
|
|
and JSDOC comments to display them in the Storybook UI. We highly recommend using Compodoc for
|
|
your Angular projects to get the best experience out of Storybook.
|
|
`,
|
|
{ title: "Compodoc", borderStyle: "round", padding: 1, borderColor: "#F1618C" }
|
|
)
|
|
);
|
|
let { useCompoDoc: e } = await (0, Rx.default)({
|
|
type: "confirm",
|
|
name: "useCompoDoc",
|
|
message: "Do you want to use Compodoc for documentation?"
|
|
});
|
|
return e;
|
|
}, "promptForCompoDocs"), qM = class {
|
|
static {
|
|
s(this, "AngularJSON");
|
|
}
|
|
constructor() {
|
|
if (!tle($m))
|
|
throw new ale({ path: nle(process.cwd(), $m) });
|
|
let t = rle($m, "utf8");
|
|
this.json = JSON.parse(t);
|
|
}
|
|
get projects() {
|
|
return this.json.projects;
|
|
}
|
|
get projectsWithoutStorybook() {
|
|
return Object.keys(this.projects).filter((t) => {
|
|
let { architect: r } = this.projects[t];
|
|
return !r.storybook;
|
|
});
|
|
}
|
|
get hasStorybookBuilder() {
|
|
return Object.keys(this.projects).some((t) => {
|
|
let { architect: r } = this.projects[t];
|
|
return Object.keys(r).some((i) => r[i].builder === "@storybook/angular:start-storybook");
|
|
});
|
|
}
|
|
get rootProject() {
|
|
let t = Object.keys(this.projects).find((r) => {
|
|
let { root: i } = this.projects[r];
|
|
return i === "" || i === ".";
|
|
});
|
|
return t ? this.projects[t] : null;
|
|
}
|
|
getProjectSettingsByName(t) {
|
|
return this.projects[t];
|
|
}
|
|
async getProjectName() {
|
|
if (this.projectsWithoutStorybook.length > 1) {
|
|
let { projectName: t } = await (0, Rx.default)({
|
|
type: "select",
|
|
name: "projectName",
|
|
message: "For which project do you want to generate Storybook configuration?",
|
|
choices: this.projectsWithoutStorybook.map((r) => ({
|
|
title: r,
|
|
value: r
|
|
}))
|
|
});
|
|
return t;
|
|
}
|
|
return this.projectsWithoutStorybook[0];
|
|
}
|
|
addStorybookEntries({
|
|
angularProjectName: t,
|
|
storybookFolder: r,
|
|
useCompodoc: i,
|
|
root: n
|
|
}) {
|
|
let { architect: a } = this.projects[t], o = {
|
|
configDir: r,
|
|
browserTarget: `${t}:build`,
|
|
compodoc: i,
|
|
...i && { compodocArgs: ["-e", "json", "-d", n || "."] }
|
|
};
|
|
a.storybook || (a.storybook = {
|
|
builder: "@storybook/angular:start-storybook",
|
|
options: {
|
|
...o,
|
|
port: 6006
|
|
}
|
|
}), a["build-storybook"] || (a["build-storybook"] = {
|
|
builder: "@storybook/angular:build-storybook",
|
|
options: {
|
|
...o,
|
|
outputDir: Object.keys(this.projects).length === 1 ? "storybook-static" : `dist/storybook/${t}`
|
|
}
|
|
});
|
|
}
|
|
write() {
|
|
ile($m, JSON.stringify(this.json, null, 2));
|
|
}
|
|
};
|
|
|
|
// src/cli/eslintPlugin.ts
|
|
var VP = Rt(HR(), 1);
|
|
import { readFile as BG, writeFile as NG } from "node:fs/promises";
|
|
import { getProjectRoot as MG } from "storybook/internal/common";
|
|
import { readConfig as hJe, writeConfig as mJe } from "storybook/internal/csf-tools";
|
|
import { logger as WP, prompt as yJe } from "storybook/internal/node-logger";
|
|
|
|
// ../node_modules/detect-indent/index.js
|
|
var Sce = /^(?:( )+|\t+)/, td = "space", zR = "tab";
|
|
function KR(e, t) {
|
|
let r = /* @__PURE__ */ new Map(), i = 0, n, a;
|
|
for (let o of e.split(/\n/g)) {
|
|
if (!o)
|
|
continue;
|
|
let u, l, c, f, m, h = o.match(Sce);
|
|
if (h === null)
|
|
i = 0, n = "";
|
|
else {
|
|
if (u = h[0].length, l = h[1] ? td : zR, t && l === td && u === 1)
|
|
continue;
|
|
l !== n && (i = 0), n = l, c = 1, f = 0;
|
|
let d = u - i;
|
|
if (i = u, d === 0)
|
|
c = 0, f = 1;
|
|
else {
|
|
let y = d > 0 ? d : -d;
|
|
a = Tce(l, y);
|
|
}
|
|
m = r.get(a), m = m === void 0 ? [1, 0] : [m[0] + c, m[1] + f], r.set(a, m);
|
|
}
|
|
}
|
|
return r;
|
|
}
|
|
s(KR, "makeIndentsMap");
|
|
function Tce(e, t) {
|
|
return (e === td ? "s" : "t") + String(t);
|
|
}
|
|
s(Tce, "encodeIndentsKey");
|
|
function Cce(e) {
|
|
let r = e[0] === "s" ? td : zR, i = Number(e.slice(1));
|
|
return { type: r, amount: i };
|
|
}
|
|
s(Cce, "decodeIndentsKey");
|
|
function wce(e) {
|
|
let t, r = 0, i = 0;
|
|
for (let [n, [a, o]] of e)
|
|
(a > r || a === r && o > i) && (r = a, i = o, t = n);
|
|
return t;
|
|
}
|
|
s(wce, "getMostUsedKey");
|
|
function Ace(e, t) {
|
|
return (e === td ? " " : " ").repeat(t);
|
|
}
|
|
s(Ace, "makeIndentString");
|
|
function p1(e) {
|
|
if (typeof e != "string")
|
|
throw new TypeError("Expected a string");
|
|
let t = KR(e, !0);
|
|
t.size === 0 && (t = KR(e, !1));
|
|
let r = wce(t), i, n = 0, a = "";
|
|
return r !== void 0 && ({ type: i, amount: n } = Cce(r), a = Ace(i, n)), {
|
|
amount: n,
|
|
type: i,
|
|
indent: a
|
|
};
|
|
}
|
|
s(p1, "detectIndent");
|
|
|
|
// src/cli/eslintPlugin.ts
|
|
var RG = Rt(fh(), 1), jG = Rt(Wm(), 1);
|
|
|
|
// src/babel/index.ts
|
|
var dJe = Rt(hr(), 1), ggt = Rt(hr(), 1), pJe = Rt(hr(), 1), qP = Rt(qd(), 1), bgt = Rt(zo(), 1), UP = Rt(Ar(), 1), nr = Rt(Ve(), 1);
|
|
import * as OG from "recast";
|
|
|
|
// src/babel/babelParse.ts
|
|
var jP = Rt(zo(), 1);
|
|
import * as LP from "recast";
|
|
function cJe(e, t) {
|
|
let n = /^\s*\/\/\s*@flow/.test(e) ? ["flow"] : ["typescript"], a = {
|
|
...t,
|
|
plugins: [...t.plugins ?? [], ...n]
|
|
};
|
|
return jP.parse(e, a);
|
|
}
|
|
s(cJe, "parseWithFlowOrTypescript");
|
|
var fJe = {
|
|
sourceType: "module",
|
|
// FIXME: we should get this from the project config somehow?
|
|
plugins: ["jsx", "decorators-legacy", "classProperties"],
|
|
tokens: !0
|
|
}, IG = /* @__PURE__ */ s((e) => LP.parse(e, {
|
|
parser: {
|
|
parse(t) {
|
|
return cJe(t, fJe);
|
|
}
|
|
}
|
|
}), "babelParse");
|
|
|
|
// src/babel/index.ts
|
|
var kG = UP.default.default || UP.default, Dgt = qP.default.default || qP.default;
|
|
|
|
// src/cli/eslintPlugin.ts
|
|
var gJe = ["ts", "mts", "cts", "mjs", "js", "cjs", "json"], bJe = ["yaml", "yml"], DJe = /* @__PURE__ */ s(async (e) => {
|
|
let t = ["eslint.config", ".eslintrc"];
|
|
for (let r of t)
|
|
for (let i of bJe)
|
|
if (await Vb(`${r}.${i}`, { cwd: e, stopAt: MG() }))
|
|
throw new Error(`Unsupported ESLint config extension: .${i}`);
|
|
for (let r of t)
|
|
for (let i of gJe) {
|
|
let n = await Vb(`${r}.${i}`, { cwd: e, stopAt: MG() });
|
|
if (n)
|
|
return n;
|
|
}
|
|
}, "findEslintFile");
|
|
function HP(e) {
|
|
return e && (nr.isTSAsExpression(e) || nr.isTSSatisfiesExpression(e) ? HP(e.expression) : e);
|
|
}
|
|
s(HP, "unwrapTSExpression");
|
|
var vJe = /* @__PURE__ */ s(async (e) => {
|
|
let t = IG(e), r = "", i = null;
|
|
return kG(t, {
|
|
ImportDeclaration(n) {
|
|
if (n.node.source.value === "typescript-eslint") {
|
|
let a = n.node.specifiers.find((o) => nr.isImportDefaultSpecifier(o));
|
|
a && (r = a.local.name);
|
|
}
|
|
},
|
|
ExportDefaultDeclaration(n) {
|
|
let a = n.node;
|
|
i = HP(a.declaration);
|
|
let o = nr.memberExpression(
|
|
nr.memberExpression(nr.identifier("storybook"), nr.identifier("configs")),
|
|
nr.stringLiteral("flat/recommended"),
|
|
!0
|
|
);
|
|
if (nr.isArrayExpression(i) && i.elements.push(nr.spreadElement(o)), nr.isCallExpression(i) && nr.isMemberExpression(i.callee) && r &&
|
|
nr.isIdentifier(i.callee.object, { name: r }) && nr.isIdentifier(i.callee.property, { name: "config" }) && i.arguments.push(o), nr.isIdentifier(
|
|
i)) {
|
|
let u = n.scope.getBinding(i.name);
|
|
if (u && nr.isVariableDeclarator(u.path.node)) {
|
|
let l = HP(u.path.node.init);
|
|
nr.isArrayExpression(l) && l.elements.push(nr.spreadElement(o));
|
|
}
|
|
}
|
|
},
|
|
Program(n) {
|
|
if (!n.node.body.some(
|
|
(o) => nr.isImportDeclaration(o) && o.source.value === "eslint-plugin-storybook"
|
|
)) {
|
|
let o = nr.importDeclaration(
|
|
[nr.importDefaultSpecifier(nr.identifier("storybook"))],
|
|
nr.stringLiteral("eslint-plugin-storybook")
|
|
);
|
|
o.comments = [
|
|
{
|
|
type: "CommentLine",
|
|
value: " For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format"
|
|
}
|
|
], n.node.body.unshift(o);
|
|
}
|
|
}
|
|
}), OG.print(t).code;
|
|
}, "configureFlatConfig");
|
|
async function Pgt(e) {
|
|
let t, r = e.getAllDependencies(), { packageJson: i } = e.primaryPackageJson, n;
|
|
try {
|
|
n = await DJe(e.instanceDir);
|
|
} catch (u) {
|
|
if (u instanceof Error && u.message.includes("Unsupported ESLint"))
|
|
t = String(u);
|
|
else
|
|
throw u;
|
|
}
|
|
let a = !!r["eslint-plugin-storybook"];
|
|
return {
|
|
hasEslint: !!(r.eslint || n || i.eslintConfig),
|
|
isStorybookPluginInstalled: a,
|
|
eslintConfigFile: n,
|
|
unsupportedExtension: t,
|
|
isFlatConfig: !!(n && n.match(/eslint\.config\.[^/]+/))
|
|
};
|
|
}
|
|
s(Pgt, "extractEslintInfo");
|
|
var $P = /* @__PURE__ */ s((e) => {
|
|
if (!e)
|
|
return [];
|
|
if (typeof e == "string")
|
|
return [e];
|
|
if (Array.isArray(e))
|
|
return e;
|
|
throw new Error(`Invalid eslint extends ${e}`);
|
|
}, "normalizeExtends");
|
|
async function Fgt({
|
|
eslintConfigFile: e,
|
|
packageManager: t,
|
|
isFlatConfig: r
|
|
}) {
|
|
if (e)
|
|
if (e.endsWith("json")) {
|
|
WP.debug(`Detected JSON config at ${e}`);
|
|
let i = await BG(e, { encoding: "utf8" }), n = VP.default.parse(i);
|
|
if ($P(n.extends).filter(Boolean).includes("plugin:storybook/recommended"))
|
|
return;
|
|
Array.isArray(n.extends) || (n.extends = n.extends ? [n.extends] : []), n.extends.push("plugin:storybook/recommended");
|
|
let o = p1(i).amount || 2;
|
|
await NG(e, VP.default.stringify(n, null, o));
|
|
} else if (r) {
|
|
WP.debug(`Detected flat config at ${e}`);
|
|
let i = await BG(e, { encoding: "utf8" }), n = await vJe(i);
|
|
await NG(e, n);
|
|
} else {
|
|
let i = await hJe(e), n = $P(i.getFieldValue(["extends"])).filter(Boolean);
|
|
if (n.includes("plugin:storybook/recommended"))
|
|
return;
|
|
i.setFieldValue(["extends"], [...n, "plugin:storybook/recommended"]), await mJe(i);
|
|
}
|
|
else {
|
|
WP.debug("No ESLint config file found, configuring in package.json instead");
|
|
let { packageJson: i } = t.primaryPackageJson, n = $P(i.eslintConfig?.extends).filter(Boolean);
|
|
t.writePackageJson({
|
|
...i,
|
|
eslintConfig: {
|
|
...i.eslintConfig,
|
|
extends: [...n, "plugin:storybook/recommended"]
|
|
}
|
|
});
|
|
}
|
|
}
|
|
s(Fgt, "configureEslintPlugin");
|
|
var Igt = /* @__PURE__ */ s(async () => await yJe.confirm({
|
|
message: jG.dedent`
|
|
We have detected that you're using ESLint. Storybook provides a plugin that gives the best experience with Storybook and helps follow best practices: ${RG.default.
|
|
yellow(
|
|
"https://storybook.js.org/docs/9/configure/integration/eslint-plugin"
|
|
)}
|
|
|
|
Would you like to install it?
|
|
`,
|
|
initialValue: !0
|
|
}), "suggestESLintPlugin");
|
|
|
|
// src/cli/globalSettings.ts
|
|
var Mc = Rt(lJ(), 1);
|
|
import eF from "node:fs/promises";
|
|
import { homedir as WXe } from "node:os";
|
|
import { dirname as $Xe, join as VXe } from "node:path";
|
|
|
|
// src/server-errors.ts
|
|
var fJ = Rt(Wm(), 1);
|
|
|
|
// src/storybook-error.ts
|
|
function cJ({
|
|
code: e,
|
|
category: t
|
|
}) {
|
|
let r = String(e).padStart(4, "0");
|
|
return `SB_${t}_${r}`;
|
|
}
|
|
s(cJ, "parseErrorCode");
|
|
var Mb = class e extends Error {
|
|
constructor(r) {
|
|
super(e.getFullMessage(r));
|
|
/**
|
|
* Data associated with the error. Used to provide additional information in the error message or
|
|
* to be passed to telemetry.
|
|
*/
|
|
this.data = {};
|
|
/** Flag used to easily determine if the error originates from Storybook. */
|
|
this.fromStorybook = !0;
|
|
this.category = r.category, this.documentation = r.documentation ?? !1, this.code = r.code;
|
|
}
|
|
static {
|
|
s(this, "StorybookError");
|
|
}
|
|
get fullErrorCode() {
|
|
return cJ({ code: this.code, category: this.category });
|
|
}
|
|
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
|
|
get name() {
|
|
let r = this.constructor.name;
|
|
return `${this.fullErrorCode} (${r})`;
|
|
}
|
|
/** Generates the error message along with additional documentation link (if applicable). */
|
|
static getFullMessage({
|
|
documentation: r,
|
|
code: i,
|
|
category: n,
|
|
message: a
|
|
}) {
|
|
let o;
|
|
return r === !0 ? o = `https://storybook.js.org/error/${cJ({ code: i, category: n })}` : typeof r == "string" ? o = r : Array.isArray(r) &&
|
|
(o = `
|
|
${r.map((u) => ` - ${u}`).join(`
|
|
`)}`), `${a}${o != null ? `
|
|
|
|
More info: ${o}
|
|
` : ""}`;
|
|
}
|
|
};
|
|
|
|
// src/server-errors.ts
|
|
var Rb = class extends Mb {
|
|
constructor(r) {
|
|
super({
|
|
category: "CORE-SERVER",
|
|
code: 1,
|
|
message: fJ.dedent`
|
|
Unable to save global settings file to ${r.filePath}
|
|
${r.error && `Reason: ${r.error}`}`
|
|
});
|
|
this.data = r;
|
|
}
|
|
static {
|
|
s(this, "SavingGlobalSettingsFileError");
|
|
}
|
|
};
|
|
|
|
// src/cli/globalSettings.ts
|
|
var HXe = VXe(WXe(), ".storybook", "settings.json"), KXe = 1, zXe = Mc.z.object({
|
|
version: Mc.z.number(),
|
|
// NOTE: every key (and subkey) below must be optional, for forwards compatibility reasons
|
|
// (we can remove keys once they are deprecated)
|
|
userSince: Mc.z.number().optional(),
|
|
init: Mc.z.object({ skipOnboarding: Mc.z.boolean().optional() }).optional()
|
|
}), Uu;
|
|
async function obt(e = HXe) {
|
|
if (Uu)
|
|
return Uu;
|
|
try {
|
|
let t = await eF.readFile(e, "utf8"), r = zXe.parse(JSON.parse(t));
|
|
Uu = new jb(e, r);
|
|
} catch {
|
|
Uu = new jb(e, { version: KXe, userSince: Date.now() }), await Uu.save();
|
|
}
|
|
return Uu;
|
|
}
|
|
s(obt, "globalSettings");
|
|
function ubt() {
|
|
Uu = void 0;
|
|
}
|
|
s(ubt, "_clearGlobalSettings");
|
|
var jb = class {
|
|
static {
|
|
s(this, "Settings");
|
|
}
|
|
/**
|
|
* Create a new Settings instance
|
|
*
|
|
* @param filePath Path to the JSON settings file
|
|
* @param value Loaded value of settings
|
|
*/
|
|
constructor(t, r) {
|
|
this.filePath = t, this.value = r;
|
|
}
|
|
/** Save settings to the file */
|
|
async save() {
|
|
try {
|
|
await eF.mkdir($Xe(this.filePath), { recursive: !0 }), await eF.writeFile(this.filePath, JSON.stringify(this.value, null, 2));
|
|
} catch (t) {
|
|
throw new Rb({
|
|
filePath: this.filePath,
|
|
error: t
|
|
});
|
|
}
|
|
}
|
|
};
|
|
export {
|
|
$m as ANGULAR_JSON_PATH,
|
|
qM as AngularJSON,
|
|
Noe as CommunityBuilder,
|
|
O4 as CoreBuilder,
|
|
Boe as CoreWebpackCompilers,
|
|
px as ProjectType,
|
|
gJe as SUPPORTED_ESLINT_EXTENSIONS,
|
|
oit as SUPPORTED_RENDERERS,
|
|
jb as Settings,
|
|
k4 as SupportedLanguage,
|
|
ubt as _clearGlobalSettings,
|
|
Oit as addToDevDependenciesIfNotPresent,
|
|
Yoe as adjustTemplate,
|
|
lit as builderNameToCoreBuilder,
|
|
Xoe as cliStoriesTargetPath,
|
|
Rit as coerceSemver,
|
|
uit as compilerNameToCoreCompiler,
|
|
Dst as compoDocPreviewPrefix,
|
|
Fgt as configureEslintPlugin,
|
|
vJe as configureFlatConfig,
|
|
kit as copyTemplate,
|
|
Mit as copyTemplateFiles,
|
|
Qit as detect,
|
|
Jit as detectBuilder,
|
|
aue as detectFrameworkPreset,
|
|
Zit as detectLanguage,
|
|
Yit as detectPnp,
|
|
I4 as externalFrameworks,
|
|
Pgt as extractEslintInfo,
|
|
DJe as findEslintFile,
|
|
Bit as frameworkToDefaultBuilder,
|
|
Iit as getBabelDependencies,
|
|
R4 as getRendererDir,
|
|
Nit as getVersionSafe,
|
|
obt as globalSettings,
|
|
jit as hasStorybookDependencies,
|
|
cit as installableProjectTypes,
|
|
U4 as isNxProject,
|
|
Xit as isStorybookInstantiated,
|
|
$P as normalizeExtends,
|
|
vst as promptForCompoDocs,
|
|
Pit as readFileAsJson,
|
|
Igt as suggestESLintPlugin,
|
|
B4 as supportedTemplates,
|
|
N4 as unsupportedTemplate,
|
|
Fit as writeFileAsJson
|
|
};
|