@prisma/migrate 6.6.0-integration-feat-orm-693-d1-driver-create-migration-adapter-using-new-http-binding.4 → 6.6.0-integration-mcp.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +14 -14
- package/dist/{chunk-EJUXYFV3.js → chunk-BYRRPHGM.js} +206 -3
- package/dist/{chunk-CKRN45WP.js → chunk-FJ22R36R.js} +6 -6
- package/dist/{chunk-B4SUSDC2.js → chunk-GBMQW4HZ.js} +6 -6
- package/dist/{chunk-UWQXMKQO.js → chunk-KF6K4EE5.js} +297 -2135
- package/dist/{chunk-O723A5JE.js → chunk-LVDALRAV.js} +6 -6
- package/dist/{chunk-L53C3AX3.js → chunk-PPOA6UUS.js} +296 -2134
- package/dist/{chunk-TGV6QGEF.js → chunk-QVMYNWAN.js} +191 -37
- package/dist/{chunk-5LKIRKDL.js → chunk-XPJHNEKB.js} +12 -12
- package/dist/{chunk-QJT4H5N6.js → chunk-ZJ4IDCRR.js} +4 -4
- package/dist/commands/DbPull.js +3 -3
- package/dist/commands/DbSeed.js +3 -3
- package/dist/commands/MigrateDev.js +3 -3
- package/dist/commands/MigrateDiff.js +3 -3
- package/dist/commands/MigrateReset.js +3 -3
- package/dist/index.js +14 -17
- package/dist/internals/src/cli/directoryConfig.d.ts +1 -1
- package/dist/internals/src/cli/getSchema.d.ts +3 -28
- package/dist/internals/src/cli/hashes.d.ts +1 -2
- package/dist/internals/src/cli/schemaContext.d.ts +4 -3
- package/dist/internals/src/index.d.ts +1 -1
- package/dist/migrate/src/index.d.ts +0 -1
- package/dist/{multipart-parser-ASKQAOL4-WZ47HU6G.js → multipart-parser-AOASR4DL-AXIJXW2B.js} +702 -228
- package/dist/{multipart-parser-QCI3Y5IB.js → multipart-parser-GQA7KJYT.js} +687 -213
- package/dist/open-KDTCMDK7.js +530 -0
- package/dist/utils/seed.js +3 -3
- package/dist/utils/setupCockroach.js +2 -2
- package/dist/utils/setupMSSQL.js +21636 -30315
- package/dist/utils/setupMongo.js +3327 -834
- package/dist/utils/setupPostgres.js +2 -2
- package/package.json +8 -8
- package/dist/chunk-GKDFIHM2.js +0 -45
- package/dist/migrate/src/utils/getSchemaPathAndPrint.d.ts +0 -10
- package/dist/utils/getSchemaPathAndPrint.js +0 -27
|
@@ -26,13 +26,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_PPOA6UUS_exports = {};
|
|
30
|
+
__export(chunk_PPOA6UUS_exports, {
|
|
31
31
|
MigrateDiff: () => MigrateDiff
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
|
|
33
|
+
module.exports = __toCommonJS(chunk_PPOA6UUS_exports);
|
|
35
34
|
var import_chunk_ZB5NPOJW = require("./chunk-ZB5NPOJW.js");
|
|
35
|
+
var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
|
|
36
36
|
var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
|
|
37
37
|
var import_chunk_PDCXVUV3 = require("./chunk-PDCXVUV3.js");
|
|
38
38
|
var import_chunk_V6PVGSDJ = require("./chunk-V6PVGSDJ.js");
|
|
@@ -1131,7 +1131,7 @@ var require_tree_walker = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1131
1131
|
}
|
|
1132
1132
|
});
|
|
1133
1133
|
var require_path = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
1134
|
-
"../../node_modules/.pnpm/minimatch@5.1.
|
|
1134
|
+
"../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/lib/path.js"(exports, module2) {
|
|
1135
1135
|
"use strict";
|
|
1136
1136
|
var isWindows = typeof process === "object" && process && process.platform === "win32";
|
|
1137
1137
|
module2.exports = isWindows ? { sep: "\\" } : { sep: "/" };
|
|
@@ -1343,7 +1343,7 @@ var require_brace_expansion = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1343
1343
|
}
|
|
1344
1344
|
});
|
|
1345
1345
|
var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
1346
|
-
"../../node_modules/.pnpm/minimatch@5.1.
|
|
1346
|
+
"../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js"(exports, module2) {
|
|
1347
1347
|
"use strict";
|
|
1348
1348
|
var minimatch = module2.exports = (p, pattern, options = {}) => {
|
|
1349
1349
|
assertValidPattern(pattern);
|
|
@@ -1430,7 +1430,9 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1430
1430
|
return list;
|
|
1431
1431
|
};
|
|
1432
1432
|
var globUnescape = (s) => s.replace(/\\(.)/g, "$1");
|
|
1433
|
+
var charUnescape = (s) => s.replace(/\\([^-\]])/g, "$1");
|
|
1433
1434
|
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
1435
|
+
var braExpEscape = (s) => s.replace(/[[\]\\]/g, "\\$&");
|
|
1434
1436
|
var Minimatch = class {
|
|
1435
1437
|
constructor(pattern, options) {
|
|
1436
1438
|
assertValidPattern(pattern);
|
|
@@ -1483,7 +1485,7 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1483
1485
|
negate = !negate;
|
|
1484
1486
|
negateOffset++;
|
|
1485
1487
|
}
|
|
1486
|
-
if (negateOffset) this.pattern = pattern.
|
|
1488
|
+
if (negateOffset) this.pattern = pattern.slice(negateOffset);
|
|
1487
1489
|
this.negate = negate;
|
|
1488
1490
|
}
|
|
1489
1491
|
// set partial to true to test if, for example,
|
|
@@ -1569,7 +1571,7 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1569
1571
|
}
|
|
1570
1572
|
if (pattern === "") return "";
|
|
1571
1573
|
let re = "";
|
|
1572
|
-
let hasMagic =
|
|
1574
|
+
let hasMagic = false;
|
|
1573
1575
|
let escaping = false;
|
|
1574
1576
|
const patternListStack = [];
|
|
1575
1577
|
const negativeLists = [];
|
|
@@ -1580,7 +1582,10 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1580
1582
|
let cs;
|
|
1581
1583
|
let pl;
|
|
1582
1584
|
let sp;
|
|
1583
|
-
|
|
1585
|
+
let dotTravAllowed = pattern.charAt(0) === ".";
|
|
1586
|
+
let dotFileAllowed = options.dot || dotTravAllowed;
|
|
1587
|
+
const patternStart = () => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
|
|
1588
|
+
const subPatternStart = (p) => p.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
|
|
1584
1589
|
const clearStateChar = () => {
|
|
1585
1590
|
if (stateChar) {
|
|
1586
1591
|
switch (stateChar) {
|
|
@@ -1619,6 +1624,10 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1619
1624
|
return false;
|
|
1620
1625
|
}
|
|
1621
1626
|
case "\\":
|
|
1627
|
+
if (inClass && pattern.charAt(i + 1) === "-") {
|
|
1628
|
+
re += c;
|
|
1629
|
+
continue;
|
|
1630
|
+
}
|
|
1622
1631
|
clearStateChar();
|
|
1623
1632
|
escaping = true;
|
|
1624
1633
|
continue;
|
|
@@ -1641,7 +1650,7 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1641
1650
|
stateChar = c;
|
|
1642
1651
|
if (options.noext) clearStateChar();
|
|
1643
1652
|
continue;
|
|
1644
|
-
case "(":
|
|
1653
|
+
case "(": {
|
|
1645
1654
|
if (inClass) {
|
|
1646
1655
|
re += "(";
|
|
1647
1656
|
continue;
|
|
@@ -1650,39 +1659,54 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1650
1659
|
re += "\\(";
|
|
1651
1660
|
continue;
|
|
1652
1661
|
}
|
|
1653
|
-
|
|
1662
|
+
const plEntry = {
|
|
1654
1663
|
type: stateChar,
|
|
1655
1664
|
start: i - 1,
|
|
1656
1665
|
reStart: re.length,
|
|
1657
1666
|
open: plTypes[stateChar].open,
|
|
1658
1667
|
close: plTypes[stateChar].close
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1668
|
+
};
|
|
1669
|
+
this.debug(this.pattern, " ", plEntry);
|
|
1670
|
+
patternListStack.push(plEntry);
|
|
1671
|
+
re += plEntry.open;
|
|
1672
|
+
if (plEntry.start === 0 && plEntry.type !== "!") {
|
|
1673
|
+
dotTravAllowed = true;
|
|
1674
|
+
re += subPatternStart(pattern.slice(i + 1));
|
|
1675
|
+
}
|
|
1661
1676
|
this.debug("plType %j %j", stateChar, re);
|
|
1662
1677
|
stateChar = false;
|
|
1663
1678
|
continue;
|
|
1664
|
-
|
|
1665
|
-
|
|
1679
|
+
}
|
|
1680
|
+
case ")": {
|
|
1681
|
+
const plEntry = patternListStack[patternListStack.length - 1];
|
|
1682
|
+
if (inClass || !plEntry) {
|
|
1666
1683
|
re += "\\)";
|
|
1667
1684
|
continue;
|
|
1668
1685
|
}
|
|
1686
|
+
patternListStack.pop();
|
|
1669
1687
|
clearStateChar();
|
|
1670
1688
|
hasMagic = true;
|
|
1671
|
-
pl =
|
|
1689
|
+
pl = plEntry;
|
|
1672
1690
|
re += pl.close;
|
|
1673
1691
|
if (pl.type === "!") {
|
|
1674
|
-
negativeLists.push(pl);
|
|
1692
|
+
negativeLists.push(Object.assign(pl, { reEnd: re.length }));
|
|
1675
1693
|
}
|
|
1676
|
-
pl.reEnd = re.length;
|
|
1677
1694
|
continue;
|
|
1678
|
-
|
|
1679
|
-
|
|
1695
|
+
}
|
|
1696
|
+
case "|": {
|
|
1697
|
+
const plEntry = patternListStack[patternListStack.length - 1];
|
|
1698
|
+
if (inClass || !plEntry) {
|
|
1680
1699
|
re += "\\|";
|
|
1681
1700
|
continue;
|
|
1682
1701
|
}
|
|
1683
1702
|
clearStateChar();
|
|
1684
1703
|
re += "|";
|
|
1704
|
+
if (plEntry.start === 0 && plEntry.type !== "!") {
|
|
1705
|
+
dotTravAllowed = true;
|
|
1706
|
+
re += subPatternStart(pattern.slice(i + 1));
|
|
1707
|
+
}
|
|
1685
1708
|
continue;
|
|
1709
|
+
}
|
|
1686
1710
|
// these are mostly the same in regexp and glob
|
|
1687
1711
|
case "[":
|
|
1688
1712
|
clearStateChar();
|
|
@@ -1702,17 +1726,13 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1702
1726
|
}
|
|
1703
1727
|
cs = pattern.substring(classStart + 1, i);
|
|
1704
1728
|
try {
|
|
1705
|
-
RegExp("[" + cs + "]");
|
|
1729
|
+
RegExp("[" + braExpEscape(charUnescape(cs)) + "]");
|
|
1730
|
+
re += c;
|
|
1706
1731
|
} catch (er) {
|
|
1707
|
-
|
|
1708
|
-
re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
|
|
1709
|
-
hasMagic = hasMagic || sp[1];
|
|
1710
|
-
inClass = false;
|
|
1711
|
-
continue;
|
|
1732
|
+
re = re.substring(0, reClassStart) + "(?:$.)";
|
|
1712
1733
|
}
|
|
1713
1734
|
hasMagic = true;
|
|
1714
1735
|
inClass = false;
|
|
1715
|
-
re += c;
|
|
1716
1736
|
continue;
|
|
1717
1737
|
default:
|
|
1718
1738
|
clearStateChar();
|
|
@@ -1724,9 +1744,9 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1724
1744
|
}
|
|
1725
1745
|
}
|
|
1726
1746
|
if (inClass) {
|
|
1727
|
-
cs = pattern.
|
|
1747
|
+
cs = pattern.slice(classStart + 1);
|
|
1728
1748
|
sp = this.parse(cs, SUBPARSE);
|
|
1729
|
-
re = re.
|
|
1749
|
+
re = re.substring(0, reClassStart) + "\\[" + sp[0];
|
|
1730
1750
|
hasMagic = hasMagic || sp[1];
|
|
1731
1751
|
}
|
|
1732
1752
|
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
|
|
@@ -1755,24 +1775,28 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
1755
1775
|
const nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
|
|
1756
1776
|
let nlAfter = re.slice(nl.reEnd);
|
|
1757
1777
|
const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter;
|
|
1758
|
-
const
|
|
1778
|
+
const closeParensBefore = nlBefore.split(")").length;
|
|
1779
|
+
const openParensBefore = nlBefore.split("(").length - closeParensBefore;
|
|
1759
1780
|
let cleanAfter = nlAfter;
|
|
1760
1781
|
for (let i = 0; i < openParensBefore; i++) {
|
|
1761
1782
|
cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
|
|
1762
1783
|
}
|
|
1763
1784
|
nlAfter = cleanAfter;
|
|
1764
|
-
const dollar = nlAfter === "" && isSub !== SUBPARSE ? "
|
|
1785
|
+
const dollar = nlAfter === "" && isSub !== SUBPARSE ? "(?:$|\\/)" : "";
|
|
1765
1786
|
re = nlBefore + nlFirst + nlAfter + dollar + nlLast;
|
|
1766
1787
|
}
|
|
1767
1788
|
if (re !== "" && hasMagic) {
|
|
1768
1789
|
re = "(?=.)" + re;
|
|
1769
1790
|
}
|
|
1770
1791
|
if (addPatternStart) {
|
|
1771
|
-
re = patternStart + re;
|
|
1792
|
+
re = patternStart() + re;
|
|
1772
1793
|
}
|
|
1773
1794
|
if (isSub === SUBPARSE) {
|
|
1774
1795
|
return [re, hasMagic];
|
|
1775
1796
|
}
|
|
1797
|
+
if (options.nocase && !hasMagic) {
|
|
1798
|
+
hasMagic = pattern.toUpperCase() !== pattern.toLowerCase();
|
|
1799
|
+
}
|
|
1776
1800
|
if (!hasMagic) {
|
|
1777
1801
|
return globUnescape(pattern);
|
|
1778
1802
|
}
|
|
@@ -5537,6 +5561,77 @@ var require_dist = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
5537
5561
|
}
|
|
5538
5562
|
}
|
|
5539
5563
|
});
|
|
5564
|
+
var require_picocolors = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
5565
|
+
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module2) {
|
|
5566
|
+
"use strict";
|
|
5567
|
+
var p = process || {};
|
|
5568
|
+
var argv = p.argv || [];
|
|
5569
|
+
var env = p.env || {};
|
|
5570
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
5571
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
5572
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
5573
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
5574
|
+
};
|
|
5575
|
+
var replaceClose = (string, close, replace, index) => {
|
|
5576
|
+
let result = "", cursor = 0;
|
|
5577
|
+
do {
|
|
5578
|
+
result += string.substring(cursor, index) + replace;
|
|
5579
|
+
cursor = index + close.length;
|
|
5580
|
+
index = string.indexOf(close, cursor);
|
|
5581
|
+
} while (~index);
|
|
5582
|
+
return result + string.substring(cursor);
|
|
5583
|
+
};
|
|
5584
|
+
var createColors = (enabled = isColorSupported) => {
|
|
5585
|
+
let f = enabled ? formatter : () => String;
|
|
5586
|
+
return {
|
|
5587
|
+
isColorSupported: enabled,
|
|
5588
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
5589
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
5590
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
5591
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
5592
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
5593
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
5594
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
5595
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
5596
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
5597
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
5598
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
5599
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
5600
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
5601
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
5602
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
5603
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
5604
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
5605
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
5606
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
5607
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
5608
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
5609
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
5610
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
5611
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
5612
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
5613
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
5614
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
5615
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
5616
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
5617
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
5618
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
5619
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
5620
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
5621
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
5622
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
5623
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
5624
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
5625
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
5626
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
5627
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
5628
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
5629
|
+
};
|
|
5630
|
+
};
|
|
5631
|
+
module2.exports = createColors();
|
|
5632
|
+
module2.exports.createColors = createColors;
|
|
5633
|
+
}
|
|
5634
|
+
});
|
|
5540
5635
|
var require_js_tokens = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
5541
5636
|
"../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js"(exports) {
|
|
5542
5637
|
"use strict";
|
|
@@ -5723,1587 +5818,51 @@ var require_lib2 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
5723
5818
|
var _keyword = require_keyword();
|
|
5724
5819
|
}
|
|
5725
5820
|
});
|
|
5726
|
-
var
|
|
5727
|
-
"../../node_modules/.pnpm
|
|
5728
|
-
"use strict";
|
|
5729
|
-
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
|
5730
|
-
module2.exports = function(str) {
|
|
5731
|
-
if (typeof str !== "string") {
|
|
5732
|
-
throw new TypeError("Expected a string");
|
|
5733
|
-
}
|
|
5734
|
-
return str.replace(matchOperatorsRe, "\\$&");
|
|
5735
|
-
};
|
|
5736
|
-
}
|
|
5737
|
-
});
|
|
5738
|
-
var require_color_name = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
5739
|
-
"../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js"(exports, module2) {
|
|
5740
|
-
"use strict";
|
|
5741
|
-
module2.exports = {
|
|
5742
|
-
"aliceblue": [240, 248, 255],
|
|
5743
|
-
"antiquewhite": [250, 235, 215],
|
|
5744
|
-
"aqua": [0, 255, 255],
|
|
5745
|
-
"aquamarine": [127, 255, 212],
|
|
5746
|
-
"azure": [240, 255, 255],
|
|
5747
|
-
"beige": [245, 245, 220],
|
|
5748
|
-
"bisque": [255, 228, 196],
|
|
5749
|
-
"black": [0, 0, 0],
|
|
5750
|
-
"blanchedalmond": [255, 235, 205],
|
|
5751
|
-
"blue": [0, 0, 255],
|
|
5752
|
-
"blueviolet": [138, 43, 226],
|
|
5753
|
-
"brown": [165, 42, 42],
|
|
5754
|
-
"burlywood": [222, 184, 135],
|
|
5755
|
-
"cadetblue": [95, 158, 160],
|
|
5756
|
-
"chartreuse": [127, 255, 0],
|
|
5757
|
-
"chocolate": [210, 105, 30],
|
|
5758
|
-
"coral": [255, 127, 80],
|
|
5759
|
-
"cornflowerblue": [100, 149, 237],
|
|
5760
|
-
"cornsilk": [255, 248, 220],
|
|
5761
|
-
"crimson": [220, 20, 60],
|
|
5762
|
-
"cyan": [0, 255, 255],
|
|
5763
|
-
"darkblue": [0, 0, 139],
|
|
5764
|
-
"darkcyan": [0, 139, 139],
|
|
5765
|
-
"darkgoldenrod": [184, 134, 11],
|
|
5766
|
-
"darkgray": [169, 169, 169],
|
|
5767
|
-
"darkgreen": [0, 100, 0],
|
|
5768
|
-
"darkgrey": [169, 169, 169],
|
|
5769
|
-
"darkkhaki": [189, 183, 107],
|
|
5770
|
-
"darkmagenta": [139, 0, 139],
|
|
5771
|
-
"darkolivegreen": [85, 107, 47],
|
|
5772
|
-
"darkorange": [255, 140, 0],
|
|
5773
|
-
"darkorchid": [153, 50, 204],
|
|
5774
|
-
"darkred": [139, 0, 0],
|
|
5775
|
-
"darksalmon": [233, 150, 122],
|
|
5776
|
-
"darkseagreen": [143, 188, 143],
|
|
5777
|
-
"darkslateblue": [72, 61, 139],
|
|
5778
|
-
"darkslategray": [47, 79, 79],
|
|
5779
|
-
"darkslategrey": [47, 79, 79],
|
|
5780
|
-
"darkturquoise": [0, 206, 209],
|
|
5781
|
-
"darkviolet": [148, 0, 211],
|
|
5782
|
-
"deeppink": [255, 20, 147],
|
|
5783
|
-
"deepskyblue": [0, 191, 255],
|
|
5784
|
-
"dimgray": [105, 105, 105],
|
|
5785
|
-
"dimgrey": [105, 105, 105],
|
|
5786
|
-
"dodgerblue": [30, 144, 255],
|
|
5787
|
-
"firebrick": [178, 34, 34],
|
|
5788
|
-
"floralwhite": [255, 250, 240],
|
|
5789
|
-
"forestgreen": [34, 139, 34],
|
|
5790
|
-
"fuchsia": [255, 0, 255],
|
|
5791
|
-
"gainsboro": [220, 220, 220],
|
|
5792
|
-
"ghostwhite": [248, 248, 255],
|
|
5793
|
-
"gold": [255, 215, 0],
|
|
5794
|
-
"goldenrod": [218, 165, 32],
|
|
5795
|
-
"gray": [128, 128, 128],
|
|
5796
|
-
"green": [0, 128, 0],
|
|
5797
|
-
"greenyellow": [173, 255, 47],
|
|
5798
|
-
"grey": [128, 128, 128],
|
|
5799
|
-
"honeydew": [240, 255, 240],
|
|
5800
|
-
"hotpink": [255, 105, 180],
|
|
5801
|
-
"indianred": [205, 92, 92],
|
|
5802
|
-
"indigo": [75, 0, 130],
|
|
5803
|
-
"ivory": [255, 255, 240],
|
|
5804
|
-
"khaki": [240, 230, 140],
|
|
5805
|
-
"lavender": [230, 230, 250],
|
|
5806
|
-
"lavenderblush": [255, 240, 245],
|
|
5807
|
-
"lawngreen": [124, 252, 0],
|
|
5808
|
-
"lemonchiffon": [255, 250, 205],
|
|
5809
|
-
"lightblue": [173, 216, 230],
|
|
5810
|
-
"lightcoral": [240, 128, 128],
|
|
5811
|
-
"lightcyan": [224, 255, 255],
|
|
5812
|
-
"lightgoldenrodyellow": [250, 250, 210],
|
|
5813
|
-
"lightgray": [211, 211, 211],
|
|
5814
|
-
"lightgreen": [144, 238, 144],
|
|
5815
|
-
"lightgrey": [211, 211, 211],
|
|
5816
|
-
"lightpink": [255, 182, 193],
|
|
5817
|
-
"lightsalmon": [255, 160, 122],
|
|
5818
|
-
"lightseagreen": [32, 178, 170],
|
|
5819
|
-
"lightskyblue": [135, 206, 250],
|
|
5820
|
-
"lightslategray": [119, 136, 153],
|
|
5821
|
-
"lightslategrey": [119, 136, 153],
|
|
5822
|
-
"lightsteelblue": [176, 196, 222],
|
|
5823
|
-
"lightyellow": [255, 255, 224],
|
|
5824
|
-
"lime": [0, 255, 0],
|
|
5825
|
-
"limegreen": [50, 205, 50],
|
|
5826
|
-
"linen": [250, 240, 230],
|
|
5827
|
-
"magenta": [255, 0, 255],
|
|
5828
|
-
"maroon": [128, 0, 0],
|
|
5829
|
-
"mediumaquamarine": [102, 205, 170],
|
|
5830
|
-
"mediumblue": [0, 0, 205],
|
|
5831
|
-
"mediumorchid": [186, 85, 211],
|
|
5832
|
-
"mediumpurple": [147, 112, 219],
|
|
5833
|
-
"mediumseagreen": [60, 179, 113],
|
|
5834
|
-
"mediumslateblue": [123, 104, 238],
|
|
5835
|
-
"mediumspringgreen": [0, 250, 154],
|
|
5836
|
-
"mediumturquoise": [72, 209, 204],
|
|
5837
|
-
"mediumvioletred": [199, 21, 133],
|
|
5838
|
-
"midnightblue": [25, 25, 112],
|
|
5839
|
-
"mintcream": [245, 255, 250],
|
|
5840
|
-
"mistyrose": [255, 228, 225],
|
|
5841
|
-
"moccasin": [255, 228, 181],
|
|
5842
|
-
"navajowhite": [255, 222, 173],
|
|
5843
|
-
"navy": [0, 0, 128],
|
|
5844
|
-
"oldlace": [253, 245, 230],
|
|
5845
|
-
"olive": [128, 128, 0],
|
|
5846
|
-
"olivedrab": [107, 142, 35],
|
|
5847
|
-
"orange": [255, 165, 0],
|
|
5848
|
-
"orangered": [255, 69, 0],
|
|
5849
|
-
"orchid": [218, 112, 214],
|
|
5850
|
-
"palegoldenrod": [238, 232, 170],
|
|
5851
|
-
"palegreen": [152, 251, 152],
|
|
5852
|
-
"paleturquoise": [175, 238, 238],
|
|
5853
|
-
"palevioletred": [219, 112, 147],
|
|
5854
|
-
"papayawhip": [255, 239, 213],
|
|
5855
|
-
"peachpuff": [255, 218, 185],
|
|
5856
|
-
"peru": [205, 133, 63],
|
|
5857
|
-
"pink": [255, 192, 203],
|
|
5858
|
-
"plum": [221, 160, 221],
|
|
5859
|
-
"powderblue": [176, 224, 230],
|
|
5860
|
-
"purple": [128, 0, 128],
|
|
5861
|
-
"rebeccapurple": [102, 51, 153],
|
|
5862
|
-
"red": [255, 0, 0],
|
|
5863
|
-
"rosybrown": [188, 143, 143],
|
|
5864
|
-
"royalblue": [65, 105, 225],
|
|
5865
|
-
"saddlebrown": [139, 69, 19],
|
|
5866
|
-
"salmon": [250, 128, 114],
|
|
5867
|
-
"sandybrown": [244, 164, 96],
|
|
5868
|
-
"seagreen": [46, 139, 87],
|
|
5869
|
-
"seashell": [255, 245, 238],
|
|
5870
|
-
"sienna": [160, 82, 45],
|
|
5871
|
-
"silver": [192, 192, 192],
|
|
5872
|
-
"skyblue": [135, 206, 235],
|
|
5873
|
-
"slateblue": [106, 90, 205],
|
|
5874
|
-
"slategray": [112, 128, 144],
|
|
5875
|
-
"slategrey": [112, 128, 144],
|
|
5876
|
-
"snow": [255, 250, 250],
|
|
5877
|
-
"springgreen": [0, 255, 127],
|
|
5878
|
-
"steelblue": [70, 130, 180],
|
|
5879
|
-
"tan": [210, 180, 140],
|
|
5880
|
-
"teal": [0, 128, 128],
|
|
5881
|
-
"thistle": [216, 191, 216],
|
|
5882
|
-
"tomato": [255, 99, 71],
|
|
5883
|
-
"turquoise": [64, 224, 208],
|
|
5884
|
-
"violet": [238, 130, 238],
|
|
5885
|
-
"wheat": [245, 222, 179],
|
|
5886
|
-
"white": [255, 255, 255],
|
|
5887
|
-
"whitesmoke": [245, 245, 245],
|
|
5888
|
-
"yellow": [255, 255, 0],
|
|
5889
|
-
"yellowgreen": [154, 205, 50]
|
|
5890
|
-
};
|
|
5891
|
-
}
|
|
5892
|
-
});
|
|
5893
|
-
var require_conversions = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
5894
|
-
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js"(exports, module2) {
|
|
5895
|
-
"use strict";
|
|
5896
|
-
var cssKeywords = require_color_name();
|
|
5897
|
-
var reverseKeywords = {};
|
|
5898
|
-
for (key in cssKeywords) {
|
|
5899
|
-
if (cssKeywords.hasOwnProperty(key)) {
|
|
5900
|
-
reverseKeywords[cssKeywords[key]] = key;
|
|
5901
|
-
}
|
|
5902
|
-
}
|
|
5903
|
-
var key;
|
|
5904
|
-
var convert = module2.exports = {
|
|
5905
|
-
rgb: { channels: 3, labels: "rgb" },
|
|
5906
|
-
hsl: { channels: 3, labels: "hsl" },
|
|
5907
|
-
hsv: { channels: 3, labels: "hsv" },
|
|
5908
|
-
hwb: { channels: 3, labels: "hwb" },
|
|
5909
|
-
cmyk: { channels: 4, labels: "cmyk" },
|
|
5910
|
-
xyz: { channels: 3, labels: "xyz" },
|
|
5911
|
-
lab: { channels: 3, labels: "lab" },
|
|
5912
|
-
lch: { channels: 3, labels: "lch" },
|
|
5913
|
-
hex: { channels: 1, labels: ["hex"] },
|
|
5914
|
-
keyword: { channels: 1, labels: ["keyword"] },
|
|
5915
|
-
ansi16: { channels: 1, labels: ["ansi16"] },
|
|
5916
|
-
ansi256: { channels: 1, labels: ["ansi256"] },
|
|
5917
|
-
hcg: { channels: 3, labels: ["h", "c", "g"] },
|
|
5918
|
-
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
5919
|
-
gray: { channels: 1, labels: ["gray"] }
|
|
5920
|
-
};
|
|
5921
|
-
for (model in convert) {
|
|
5922
|
-
if (convert.hasOwnProperty(model)) {
|
|
5923
|
-
if (!("channels" in convert[model])) {
|
|
5924
|
-
throw new Error("missing channels property: " + model);
|
|
5925
|
-
}
|
|
5926
|
-
if (!("labels" in convert[model])) {
|
|
5927
|
-
throw new Error("missing channel labels property: " + model);
|
|
5928
|
-
}
|
|
5929
|
-
if (convert[model].labels.length !== convert[model].channels) {
|
|
5930
|
-
throw new Error("channel and label counts mismatch: " + model);
|
|
5931
|
-
}
|
|
5932
|
-
channels = convert[model].channels;
|
|
5933
|
-
labels = convert[model].labels;
|
|
5934
|
-
delete convert[model].channels;
|
|
5935
|
-
delete convert[model].labels;
|
|
5936
|
-
Object.defineProperty(convert[model], "channels", { value: channels });
|
|
5937
|
-
Object.defineProperty(convert[model], "labels", { value: labels });
|
|
5938
|
-
}
|
|
5939
|
-
}
|
|
5940
|
-
var channels;
|
|
5941
|
-
var labels;
|
|
5942
|
-
var model;
|
|
5943
|
-
convert.rgb.hsl = function(rgb) {
|
|
5944
|
-
var r = rgb[0] / 255;
|
|
5945
|
-
var g = rgb[1] / 255;
|
|
5946
|
-
var b = rgb[2] / 255;
|
|
5947
|
-
var min = Math.min(r, g, b);
|
|
5948
|
-
var max = Math.max(r, g, b);
|
|
5949
|
-
var delta = max - min;
|
|
5950
|
-
var h;
|
|
5951
|
-
var s;
|
|
5952
|
-
var l;
|
|
5953
|
-
if (max === min) {
|
|
5954
|
-
h = 0;
|
|
5955
|
-
} else if (r === max) {
|
|
5956
|
-
h = (g - b) / delta;
|
|
5957
|
-
} else if (g === max) {
|
|
5958
|
-
h = 2 + (b - r) / delta;
|
|
5959
|
-
} else if (b === max) {
|
|
5960
|
-
h = 4 + (r - g) / delta;
|
|
5961
|
-
}
|
|
5962
|
-
h = Math.min(h * 60, 360);
|
|
5963
|
-
if (h < 0) {
|
|
5964
|
-
h += 360;
|
|
5965
|
-
}
|
|
5966
|
-
l = (min + max) / 2;
|
|
5967
|
-
if (max === min) {
|
|
5968
|
-
s = 0;
|
|
5969
|
-
} else if (l <= 0.5) {
|
|
5970
|
-
s = delta / (max + min);
|
|
5971
|
-
} else {
|
|
5972
|
-
s = delta / (2 - max - min);
|
|
5973
|
-
}
|
|
5974
|
-
return [h, s * 100, l * 100];
|
|
5975
|
-
};
|
|
5976
|
-
convert.rgb.hsv = function(rgb) {
|
|
5977
|
-
var rdif;
|
|
5978
|
-
var gdif;
|
|
5979
|
-
var bdif;
|
|
5980
|
-
var h;
|
|
5981
|
-
var s;
|
|
5982
|
-
var r = rgb[0] / 255;
|
|
5983
|
-
var g = rgb[1] / 255;
|
|
5984
|
-
var b = rgb[2] / 255;
|
|
5985
|
-
var v = Math.max(r, g, b);
|
|
5986
|
-
var diff = v - Math.min(r, g, b);
|
|
5987
|
-
var diffc = function(c) {
|
|
5988
|
-
return (v - c) / 6 / diff + 1 / 2;
|
|
5989
|
-
};
|
|
5990
|
-
if (diff === 0) {
|
|
5991
|
-
h = s = 0;
|
|
5992
|
-
} else {
|
|
5993
|
-
s = diff / v;
|
|
5994
|
-
rdif = diffc(r);
|
|
5995
|
-
gdif = diffc(g);
|
|
5996
|
-
bdif = diffc(b);
|
|
5997
|
-
if (r === v) {
|
|
5998
|
-
h = bdif - gdif;
|
|
5999
|
-
} else if (g === v) {
|
|
6000
|
-
h = 1 / 3 + rdif - bdif;
|
|
6001
|
-
} else if (b === v) {
|
|
6002
|
-
h = 2 / 3 + gdif - rdif;
|
|
6003
|
-
}
|
|
6004
|
-
if (h < 0) {
|
|
6005
|
-
h += 1;
|
|
6006
|
-
} else if (h > 1) {
|
|
6007
|
-
h -= 1;
|
|
6008
|
-
}
|
|
6009
|
-
}
|
|
6010
|
-
return [
|
|
6011
|
-
h * 360,
|
|
6012
|
-
s * 100,
|
|
6013
|
-
v * 100
|
|
6014
|
-
];
|
|
6015
|
-
};
|
|
6016
|
-
convert.rgb.hwb = function(rgb) {
|
|
6017
|
-
var r = rgb[0];
|
|
6018
|
-
var g = rgb[1];
|
|
6019
|
-
var b = rgb[2];
|
|
6020
|
-
var h = convert.rgb.hsl(rgb)[0];
|
|
6021
|
-
var w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
6022
|
-
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
6023
|
-
return [h, w * 100, b * 100];
|
|
6024
|
-
};
|
|
6025
|
-
convert.rgb.cmyk = function(rgb) {
|
|
6026
|
-
var r = rgb[0] / 255;
|
|
6027
|
-
var g = rgb[1] / 255;
|
|
6028
|
-
var b = rgb[2] / 255;
|
|
6029
|
-
var c;
|
|
6030
|
-
var m;
|
|
6031
|
-
var y;
|
|
6032
|
-
var k;
|
|
6033
|
-
k = Math.min(1 - r, 1 - g, 1 - b);
|
|
6034
|
-
c = (1 - r - k) / (1 - k) || 0;
|
|
6035
|
-
m = (1 - g - k) / (1 - k) || 0;
|
|
6036
|
-
y = (1 - b - k) / (1 - k) || 0;
|
|
6037
|
-
return [c * 100, m * 100, y * 100, k * 100];
|
|
6038
|
-
};
|
|
6039
|
-
function comparativeDistance(x, y) {
|
|
6040
|
-
return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
|
|
6041
|
-
}
|
|
6042
|
-
convert.rgb.keyword = function(rgb) {
|
|
6043
|
-
var reversed = reverseKeywords[rgb];
|
|
6044
|
-
if (reversed) {
|
|
6045
|
-
return reversed;
|
|
6046
|
-
}
|
|
6047
|
-
var currentClosestDistance = Infinity;
|
|
6048
|
-
var currentClosestKeyword;
|
|
6049
|
-
for (var keyword in cssKeywords) {
|
|
6050
|
-
if (cssKeywords.hasOwnProperty(keyword)) {
|
|
6051
|
-
var value = cssKeywords[keyword];
|
|
6052
|
-
var distance = comparativeDistance(rgb, value);
|
|
6053
|
-
if (distance < currentClosestDistance) {
|
|
6054
|
-
currentClosestDistance = distance;
|
|
6055
|
-
currentClosestKeyword = keyword;
|
|
6056
|
-
}
|
|
6057
|
-
}
|
|
6058
|
-
}
|
|
6059
|
-
return currentClosestKeyword;
|
|
6060
|
-
};
|
|
6061
|
-
convert.keyword.rgb = function(keyword) {
|
|
6062
|
-
return cssKeywords[keyword];
|
|
6063
|
-
};
|
|
6064
|
-
convert.rgb.xyz = function(rgb) {
|
|
6065
|
-
var r = rgb[0] / 255;
|
|
6066
|
-
var g = rgb[1] / 255;
|
|
6067
|
-
var b = rgb[2] / 255;
|
|
6068
|
-
r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
|
|
6069
|
-
g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
|
|
6070
|
-
b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
|
|
6071
|
-
var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
|
|
6072
|
-
var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
|
|
6073
|
-
var z2 = r * 0.0193 + g * 0.1192 + b * 0.9505;
|
|
6074
|
-
return [x * 100, y * 100, z2 * 100];
|
|
6075
|
-
};
|
|
6076
|
-
convert.rgb.lab = function(rgb) {
|
|
6077
|
-
var xyz = convert.rgb.xyz(rgb);
|
|
6078
|
-
var x = xyz[0];
|
|
6079
|
-
var y = xyz[1];
|
|
6080
|
-
var z2 = xyz[2];
|
|
6081
|
-
var l;
|
|
6082
|
-
var a;
|
|
6083
|
-
var b;
|
|
6084
|
-
x /= 95.047;
|
|
6085
|
-
y /= 100;
|
|
6086
|
-
z2 /= 108.883;
|
|
6087
|
-
x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
|
|
6088
|
-
y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
|
|
6089
|
-
z2 = z2 > 8856e-6 ? Math.pow(z2, 1 / 3) : 7.787 * z2 + 16 / 116;
|
|
6090
|
-
l = 116 * y - 16;
|
|
6091
|
-
a = 500 * (x - y);
|
|
6092
|
-
b = 200 * (y - z2);
|
|
6093
|
-
return [l, a, b];
|
|
6094
|
-
};
|
|
6095
|
-
convert.hsl.rgb = function(hsl) {
|
|
6096
|
-
var h = hsl[0] / 360;
|
|
6097
|
-
var s = hsl[1] / 100;
|
|
6098
|
-
var l = hsl[2] / 100;
|
|
6099
|
-
var t1;
|
|
6100
|
-
var t2;
|
|
6101
|
-
var t3;
|
|
6102
|
-
var rgb;
|
|
6103
|
-
var val;
|
|
6104
|
-
if (s === 0) {
|
|
6105
|
-
val = l * 255;
|
|
6106
|
-
return [val, val, val];
|
|
6107
|
-
}
|
|
6108
|
-
if (l < 0.5) {
|
|
6109
|
-
t2 = l * (1 + s);
|
|
6110
|
-
} else {
|
|
6111
|
-
t2 = l + s - l * s;
|
|
6112
|
-
}
|
|
6113
|
-
t1 = 2 * l - t2;
|
|
6114
|
-
rgb = [0, 0, 0];
|
|
6115
|
-
for (var i = 0; i < 3; i++) {
|
|
6116
|
-
t3 = h + 1 / 3 * -(i - 1);
|
|
6117
|
-
if (t3 < 0) {
|
|
6118
|
-
t3++;
|
|
6119
|
-
}
|
|
6120
|
-
if (t3 > 1) {
|
|
6121
|
-
t3--;
|
|
6122
|
-
}
|
|
6123
|
-
if (6 * t3 < 1) {
|
|
6124
|
-
val = t1 + (t2 - t1) * 6 * t3;
|
|
6125
|
-
} else if (2 * t3 < 1) {
|
|
6126
|
-
val = t2;
|
|
6127
|
-
} else if (3 * t3 < 2) {
|
|
6128
|
-
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
|
6129
|
-
} else {
|
|
6130
|
-
val = t1;
|
|
6131
|
-
}
|
|
6132
|
-
rgb[i] = val * 255;
|
|
6133
|
-
}
|
|
6134
|
-
return rgb;
|
|
6135
|
-
};
|
|
6136
|
-
convert.hsl.hsv = function(hsl) {
|
|
6137
|
-
var h = hsl[0];
|
|
6138
|
-
var s = hsl[1] / 100;
|
|
6139
|
-
var l = hsl[2] / 100;
|
|
6140
|
-
var smin = s;
|
|
6141
|
-
var lmin = Math.max(l, 0.01);
|
|
6142
|
-
var sv;
|
|
6143
|
-
var v;
|
|
6144
|
-
l *= 2;
|
|
6145
|
-
s *= l <= 1 ? l : 2 - l;
|
|
6146
|
-
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
6147
|
-
v = (l + s) / 2;
|
|
6148
|
-
sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
|
6149
|
-
return [h, sv * 100, v * 100];
|
|
6150
|
-
};
|
|
6151
|
-
convert.hsv.rgb = function(hsv) {
|
|
6152
|
-
var h = hsv[0] / 60;
|
|
6153
|
-
var s = hsv[1] / 100;
|
|
6154
|
-
var v = hsv[2] / 100;
|
|
6155
|
-
var hi = Math.floor(h) % 6;
|
|
6156
|
-
var f = h - Math.floor(h);
|
|
6157
|
-
var p = 255 * v * (1 - s);
|
|
6158
|
-
var q = 255 * v * (1 - s * f);
|
|
6159
|
-
var t = 255 * v * (1 - s * (1 - f));
|
|
6160
|
-
v *= 255;
|
|
6161
|
-
switch (hi) {
|
|
6162
|
-
case 0:
|
|
6163
|
-
return [v, t, p];
|
|
6164
|
-
case 1:
|
|
6165
|
-
return [q, v, p];
|
|
6166
|
-
case 2:
|
|
6167
|
-
return [p, v, t];
|
|
6168
|
-
case 3:
|
|
6169
|
-
return [p, q, v];
|
|
6170
|
-
case 4:
|
|
6171
|
-
return [t, p, v];
|
|
6172
|
-
case 5:
|
|
6173
|
-
return [v, p, q];
|
|
6174
|
-
}
|
|
6175
|
-
};
|
|
6176
|
-
convert.hsv.hsl = function(hsv) {
|
|
6177
|
-
var h = hsv[0];
|
|
6178
|
-
var s = hsv[1] / 100;
|
|
6179
|
-
var v = hsv[2] / 100;
|
|
6180
|
-
var vmin = Math.max(v, 0.01);
|
|
6181
|
-
var lmin;
|
|
6182
|
-
var sl;
|
|
6183
|
-
var l;
|
|
6184
|
-
l = (2 - s) * v;
|
|
6185
|
-
lmin = (2 - s) * vmin;
|
|
6186
|
-
sl = s * vmin;
|
|
6187
|
-
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
6188
|
-
sl = sl || 0;
|
|
6189
|
-
l /= 2;
|
|
6190
|
-
return [h, sl * 100, l * 100];
|
|
6191
|
-
};
|
|
6192
|
-
convert.hwb.rgb = function(hwb) {
|
|
6193
|
-
var h = hwb[0] / 360;
|
|
6194
|
-
var wh = hwb[1] / 100;
|
|
6195
|
-
var bl = hwb[2] / 100;
|
|
6196
|
-
var ratio = wh + bl;
|
|
6197
|
-
var i;
|
|
6198
|
-
var v;
|
|
6199
|
-
var f;
|
|
6200
|
-
var n;
|
|
6201
|
-
if (ratio > 1) {
|
|
6202
|
-
wh /= ratio;
|
|
6203
|
-
bl /= ratio;
|
|
6204
|
-
}
|
|
6205
|
-
i = Math.floor(6 * h);
|
|
6206
|
-
v = 1 - bl;
|
|
6207
|
-
f = 6 * h - i;
|
|
6208
|
-
if ((i & 1) !== 0) {
|
|
6209
|
-
f = 1 - f;
|
|
6210
|
-
}
|
|
6211
|
-
n = wh + f * (v - wh);
|
|
6212
|
-
var r;
|
|
6213
|
-
var g;
|
|
6214
|
-
var b;
|
|
6215
|
-
switch (i) {
|
|
6216
|
-
default:
|
|
6217
|
-
case 6:
|
|
6218
|
-
case 0:
|
|
6219
|
-
r = v;
|
|
6220
|
-
g = n;
|
|
6221
|
-
b = wh;
|
|
6222
|
-
break;
|
|
6223
|
-
case 1:
|
|
6224
|
-
r = n;
|
|
6225
|
-
g = v;
|
|
6226
|
-
b = wh;
|
|
6227
|
-
break;
|
|
6228
|
-
case 2:
|
|
6229
|
-
r = wh;
|
|
6230
|
-
g = v;
|
|
6231
|
-
b = n;
|
|
6232
|
-
break;
|
|
6233
|
-
case 3:
|
|
6234
|
-
r = wh;
|
|
6235
|
-
g = n;
|
|
6236
|
-
b = v;
|
|
6237
|
-
break;
|
|
6238
|
-
case 4:
|
|
6239
|
-
r = n;
|
|
6240
|
-
g = wh;
|
|
6241
|
-
b = v;
|
|
6242
|
-
break;
|
|
6243
|
-
case 5:
|
|
6244
|
-
r = v;
|
|
6245
|
-
g = wh;
|
|
6246
|
-
b = n;
|
|
6247
|
-
break;
|
|
6248
|
-
}
|
|
6249
|
-
return [r * 255, g * 255, b * 255];
|
|
6250
|
-
};
|
|
6251
|
-
convert.cmyk.rgb = function(cmyk) {
|
|
6252
|
-
var c = cmyk[0] / 100;
|
|
6253
|
-
var m = cmyk[1] / 100;
|
|
6254
|
-
var y = cmyk[2] / 100;
|
|
6255
|
-
var k = cmyk[3] / 100;
|
|
6256
|
-
var r;
|
|
6257
|
-
var g;
|
|
6258
|
-
var b;
|
|
6259
|
-
r = 1 - Math.min(1, c * (1 - k) + k);
|
|
6260
|
-
g = 1 - Math.min(1, m * (1 - k) + k);
|
|
6261
|
-
b = 1 - Math.min(1, y * (1 - k) + k);
|
|
6262
|
-
return [r * 255, g * 255, b * 255];
|
|
6263
|
-
};
|
|
6264
|
-
convert.xyz.rgb = function(xyz) {
|
|
6265
|
-
var x = xyz[0] / 100;
|
|
6266
|
-
var y = xyz[1] / 100;
|
|
6267
|
-
var z2 = xyz[2] / 100;
|
|
6268
|
-
var r;
|
|
6269
|
-
var g;
|
|
6270
|
-
var b;
|
|
6271
|
-
r = x * 3.2406 + y * -1.5372 + z2 * -0.4986;
|
|
6272
|
-
g = x * -0.9689 + y * 1.8758 + z2 * 0.0415;
|
|
6273
|
-
b = x * 0.0557 + y * -0.204 + z2 * 1.057;
|
|
6274
|
-
r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
|
|
6275
|
-
g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
|
|
6276
|
-
b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
|
|
6277
|
-
r = Math.min(Math.max(0, r), 1);
|
|
6278
|
-
g = Math.min(Math.max(0, g), 1);
|
|
6279
|
-
b = Math.min(Math.max(0, b), 1);
|
|
6280
|
-
return [r * 255, g * 255, b * 255];
|
|
6281
|
-
};
|
|
6282
|
-
convert.xyz.lab = function(xyz) {
|
|
6283
|
-
var x = xyz[0];
|
|
6284
|
-
var y = xyz[1];
|
|
6285
|
-
var z2 = xyz[2];
|
|
6286
|
-
var l;
|
|
6287
|
-
var a;
|
|
6288
|
-
var b;
|
|
6289
|
-
x /= 95.047;
|
|
6290
|
-
y /= 100;
|
|
6291
|
-
z2 /= 108.883;
|
|
6292
|
-
x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
|
|
6293
|
-
y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
|
|
6294
|
-
z2 = z2 > 8856e-6 ? Math.pow(z2, 1 / 3) : 7.787 * z2 + 16 / 116;
|
|
6295
|
-
l = 116 * y - 16;
|
|
6296
|
-
a = 500 * (x - y);
|
|
6297
|
-
b = 200 * (y - z2);
|
|
6298
|
-
return [l, a, b];
|
|
6299
|
-
};
|
|
6300
|
-
convert.lab.xyz = function(lab) {
|
|
6301
|
-
var l = lab[0];
|
|
6302
|
-
var a = lab[1];
|
|
6303
|
-
var b = lab[2];
|
|
6304
|
-
var x;
|
|
6305
|
-
var y;
|
|
6306
|
-
var z2;
|
|
6307
|
-
y = (l + 16) / 116;
|
|
6308
|
-
x = a / 500 + y;
|
|
6309
|
-
z2 = y - b / 200;
|
|
6310
|
-
var y2 = Math.pow(y, 3);
|
|
6311
|
-
var x2 = Math.pow(x, 3);
|
|
6312
|
-
var z22 = Math.pow(z2, 3);
|
|
6313
|
-
y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
|
|
6314
|
-
x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
|
|
6315
|
-
z2 = z22 > 8856e-6 ? z22 : (z2 - 16 / 116) / 7.787;
|
|
6316
|
-
x *= 95.047;
|
|
6317
|
-
y *= 100;
|
|
6318
|
-
z2 *= 108.883;
|
|
6319
|
-
return [x, y, z2];
|
|
6320
|
-
};
|
|
6321
|
-
convert.lab.lch = function(lab) {
|
|
6322
|
-
var l = lab[0];
|
|
6323
|
-
var a = lab[1];
|
|
6324
|
-
var b = lab[2];
|
|
6325
|
-
var hr;
|
|
6326
|
-
var h;
|
|
6327
|
-
var c;
|
|
6328
|
-
hr = Math.atan2(b, a);
|
|
6329
|
-
h = hr * 360 / 2 / Math.PI;
|
|
6330
|
-
if (h < 0) {
|
|
6331
|
-
h += 360;
|
|
6332
|
-
}
|
|
6333
|
-
c = Math.sqrt(a * a + b * b);
|
|
6334
|
-
return [l, c, h];
|
|
6335
|
-
};
|
|
6336
|
-
convert.lch.lab = function(lch) {
|
|
6337
|
-
var l = lch[0];
|
|
6338
|
-
var c = lch[1];
|
|
6339
|
-
var h = lch[2];
|
|
6340
|
-
var a;
|
|
6341
|
-
var b;
|
|
6342
|
-
var hr;
|
|
6343
|
-
hr = h / 360 * 2 * Math.PI;
|
|
6344
|
-
a = c * Math.cos(hr);
|
|
6345
|
-
b = c * Math.sin(hr);
|
|
6346
|
-
return [l, a, b];
|
|
6347
|
-
};
|
|
6348
|
-
convert.rgb.ansi16 = function(args) {
|
|
6349
|
-
var r = args[0];
|
|
6350
|
-
var g = args[1];
|
|
6351
|
-
var b = args[2];
|
|
6352
|
-
var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2];
|
|
6353
|
-
value = Math.round(value / 50);
|
|
6354
|
-
if (value === 0) {
|
|
6355
|
-
return 30;
|
|
6356
|
-
}
|
|
6357
|
-
var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
6358
|
-
if (value === 2) {
|
|
6359
|
-
ansi += 60;
|
|
6360
|
-
}
|
|
6361
|
-
return ansi;
|
|
6362
|
-
};
|
|
6363
|
-
convert.hsv.ansi16 = function(args) {
|
|
6364
|
-
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
6365
|
-
};
|
|
6366
|
-
convert.rgb.ansi256 = function(args) {
|
|
6367
|
-
var r = args[0];
|
|
6368
|
-
var g = args[1];
|
|
6369
|
-
var b = args[2];
|
|
6370
|
-
if (r === g && g === b) {
|
|
6371
|
-
if (r < 8) {
|
|
6372
|
-
return 16;
|
|
6373
|
-
}
|
|
6374
|
-
if (r > 248) {
|
|
6375
|
-
return 231;
|
|
6376
|
-
}
|
|
6377
|
-
return Math.round((r - 8) / 247 * 24) + 232;
|
|
6378
|
-
}
|
|
6379
|
-
var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
6380
|
-
return ansi;
|
|
6381
|
-
};
|
|
6382
|
-
convert.ansi16.rgb = function(args) {
|
|
6383
|
-
var color = args % 10;
|
|
6384
|
-
if (color === 0 || color === 7) {
|
|
6385
|
-
if (args > 50) {
|
|
6386
|
-
color += 3.5;
|
|
6387
|
-
}
|
|
6388
|
-
color = color / 10.5 * 255;
|
|
6389
|
-
return [color, color, color];
|
|
6390
|
-
}
|
|
6391
|
-
var mult = (~~(args > 50) + 1) * 0.5;
|
|
6392
|
-
var r = (color & 1) * mult * 255;
|
|
6393
|
-
var g = (color >> 1 & 1) * mult * 255;
|
|
6394
|
-
var b = (color >> 2 & 1) * mult * 255;
|
|
6395
|
-
return [r, g, b];
|
|
6396
|
-
};
|
|
6397
|
-
convert.ansi256.rgb = function(args) {
|
|
6398
|
-
if (args >= 232) {
|
|
6399
|
-
var c = (args - 232) * 10 + 8;
|
|
6400
|
-
return [c, c, c];
|
|
6401
|
-
}
|
|
6402
|
-
args -= 16;
|
|
6403
|
-
var rem;
|
|
6404
|
-
var r = Math.floor(args / 36) / 5 * 255;
|
|
6405
|
-
var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
6406
|
-
var b = rem % 6 / 5 * 255;
|
|
6407
|
-
return [r, g, b];
|
|
6408
|
-
};
|
|
6409
|
-
convert.rgb.hex = function(args) {
|
|
6410
|
-
var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
6411
|
-
var string = integer.toString(16).toUpperCase();
|
|
6412
|
-
return "000000".substring(string.length) + string;
|
|
6413
|
-
};
|
|
6414
|
-
convert.hex.rgb = function(args) {
|
|
6415
|
-
var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
6416
|
-
if (!match) {
|
|
6417
|
-
return [0, 0, 0];
|
|
6418
|
-
}
|
|
6419
|
-
var colorString = match[0];
|
|
6420
|
-
if (match[0].length === 3) {
|
|
6421
|
-
colorString = colorString.split("").map(function(char) {
|
|
6422
|
-
return char + char;
|
|
6423
|
-
}).join("");
|
|
6424
|
-
}
|
|
6425
|
-
var integer = parseInt(colorString, 16);
|
|
6426
|
-
var r = integer >> 16 & 255;
|
|
6427
|
-
var g = integer >> 8 & 255;
|
|
6428
|
-
var b = integer & 255;
|
|
6429
|
-
return [r, g, b];
|
|
6430
|
-
};
|
|
6431
|
-
convert.rgb.hcg = function(rgb) {
|
|
6432
|
-
var r = rgb[0] / 255;
|
|
6433
|
-
var g = rgb[1] / 255;
|
|
6434
|
-
var b = rgb[2] / 255;
|
|
6435
|
-
var max = Math.max(Math.max(r, g), b);
|
|
6436
|
-
var min = Math.min(Math.min(r, g), b);
|
|
6437
|
-
var chroma = max - min;
|
|
6438
|
-
var grayscale;
|
|
6439
|
-
var hue;
|
|
6440
|
-
if (chroma < 1) {
|
|
6441
|
-
grayscale = min / (1 - chroma);
|
|
6442
|
-
} else {
|
|
6443
|
-
grayscale = 0;
|
|
6444
|
-
}
|
|
6445
|
-
if (chroma <= 0) {
|
|
6446
|
-
hue = 0;
|
|
6447
|
-
} else if (max === r) {
|
|
6448
|
-
hue = (g - b) / chroma % 6;
|
|
6449
|
-
} else if (max === g) {
|
|
6450
|
-
hue = 2 + (b - r) / chroma;
|
|
6451
|
-
} else {
|
|
6452
|
-
hue = 4 + (r - g) / chroma + 4;
|
|
6453
|
-
}
|
|
6454
|
-
hue /= 6;
|
|
6455
|
-
hue %= 1;
|
|
6456
|
-
return [hue * 360, chroma * 100, grayscale * 100];
|
|
6457
|
-
};
|
|
6458
|
-
convert.hsl.hcg = function(hsl) {
|
|
6459
|
-
var s = hsl[1] / 100;
|
|
6460
|
-
var l = hsl[2] / 100;
|
|
6461
|
-
var c = 1;
|
|
6462
|
-
var f = 0;
|
|
6463
|
-
if (l < 0.5) {
|
|
6464
|
-
c = 2 * s * l;
|
|
6465
|
-
} else {
|
|
6466
|
-
c = 2 * s * (1 - l);
|
|
6467
|
-
}
|
|
6468
|
-
if (c < 1) {
|
|
6469
|
-
f = (l - 0.5 * c) / (1 - c);
|
|
6470
|
-
}
|
|
6471
|
-
return [hsl[0], c * 100, f * 100];
|
|
6472
|
-
};
|
|
6473
|
-
convert.hsv.hcg = function(hsv) {
|
|
6474
|
-
var s = hsv[1] / 100;
|
|
6475
|
-
var v = hsv[2] / 100;
|
|
6476
|
-
var c = s * v;
|
|
6477
|
-
var f = 0;
|
|
6478
|
-
if (c < 1) {
|
|
6479
|
-
f = (v - c) / (1 - c);
|
|
6480
|
-
}
|
|
6481
|
-
return [hsv[0], c * 100, f * 100];
|
|
6482
|
-
};
|
|
6483
|
-
convert.hcg.rgb = function(hcg) {
|
|
6484
|
-
var h = hcg[0] / 360;
|
|
6485
|
-
var c = hcg[1] / 100;
|
|
6486
|
-
var g = hcg[2] / 100;
|
|
6487
|
-
if (c === 0) {
|
|
6488
|
-
return [g * 255, g * 255, g * 255];
|
|
6489
|
-
}
|
|
6490
|
-
var pure = [0, 0, 0];
|
|
6491
|
-
var hi = h % 1 * 6;
|
|
6492
|
-
var v = hi % 1;
|
|
6493
|
-
var w = 1 - v;
|
|
6494
|
-
var mg = 0;
|
|
6495
|
-
switch (Math.floor(hi)) {
|
|
6496
|
-
case 0:
|
|
6497
|
-
pure[0] = 1;
|
|
6498
|
-
pure[1] = v;
|
|
6499
|
-
pure[2] = 0;
|
|
6500
|
-
break;
|
|
6501
|
-
case 1:
|
|
6502
|
-
pure[0] = w;
|
|
6503
|
-
pure[1] = 1;
|
|
6504
|
-
pure[2] = 0;
|
|
6505
|
-
break;
|
|
6506
|
-
case 2:
|
|
6507
|
-
pure[0] = 0;
|
|
6508
|
-
pure[1] = 1;
|
|
6509
|
-
pure[2] = v;
|
|
6510
|
-
break;
|
|
6511
|
-
case 3:
|
|
6512
|
-
pure[0] = 0;
|
|
6513
|
-
pure[1] = w;
|
|
6514
|
-
pure[2] = 1;
|
|
6515
|
-
break;
|
|
6516
|
-
case 4:
|
|
6517
|
-
pure[0] = v;
|
|
6518
|
-
pure[1] = 0;
|
|
6519
|
-
pure[2] = 1;
|
|
6520
|
-
break;
|
|
6521
|
-
default:
|
|
6522
|
-
pure[0] = 1;
|
|
6523
|
-
pure[1] = 0;
|
|
6524
|
-
pure[2] = w;
|
|
6525
|
-
}
|
|
6526
|
-
mg = (1 - c) * g;
|
|
6527
|
-
return [
|
|
6528
|
-
(c * pure[0] + mg) * 255,
|
|
6529
|
-
(c * pure[1] + mg) * 255,
|
|
6530
|
-
(c * pure[2] + mg) * 255
|
|
6531
|
-
];
|
|
6532
|
-
};
|
|
6533
|
-
convert.hcg.hsv = function(hcg) {
|
|
6534
|
-
var c = hcg[1] / 100;
|
|
6535
|
-
var g = hcg[2] / 100;
|
|
6536
|
-
var v = c + g * (1 - c);
|
|
6537
|
-
var f = 0;
|
|
6538
|
-
if (v > 0) {
|
|
6539
|
-
f = c / v;
|
|
6540
|
-
}
|
|
6541
|
-
return [hcg[0], f * 100, v * 100];
|
|
6542
|
-
};
|
|
6543
|
-
convert.hcg.hsl = function(hcg) {
|
|
6544
|
-
var c = hcg[1] / 100;
|
|
6545
|
-
var g = hcg[2] / 100;
|
|
6546
|
-
var l = g * (1 - c) + 0.5 * c;
|
|
6547
|
-
var s = 0;
|
|
6548
|
-
if (l > 0 && l < 0.5) {
|
|
6549
|
-
s = c / (2 * l);
|
|
6550
|
-
} else if (l >= 0.5 && l < 1) {
|
|
6551
|
-
s = c / (2 * (1 - l));
|
|
6552
|
-
}
|
|
6553
|
-
return [hcg[0], s * 100, l * 100];
|
|
6554
|
-
};
|
|
6555
|
-
convert.hcg.hwb = function(hcg) {
|
|
6556
|
-
var c = hcg[1] / 100;
|
|
6557
|
-
var g = hcg[2] / 100;
|
|
6558
|
-
var v = c + g * (1 - c);
|
|
6559
|
-
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
|
6560
|
-
};
|
|
6561
|
-
convert.hwb.hcg = function(hwb) {
|
|
6562
|
-
var w = hwb[1] / 100;
|
|
6563
|
-
var b = hwb[2] / 100;
|
|
6564
|
-
var v = 1 - b;
|
|
6565
|
-
var c = v - w;
|
|
6566
|
-
var g = 0;
|
|
6567
|
-
if (c < 1) {
|
|
6568
|
-
g = (v - c) / (1 - c);
|
|
6569
|
-
}
|
|
6570
|
-
return [hwb[0], c * 100, g * 100];
|
|
6571
|
-
};
|
|
6572
|
-
convert.apple.rgb = function(apple) {
|
|
6573
|
-
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
|
6574
|
-
};
|
|
6575
|
-
convert.rgb.apple = function(rgb) {
|
|
6576
|
-
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
|
6577
|
-
};
|
|
6578
|
-
convert.gray.rgb = function(args) {
|
|
6579
|
-
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
|
6580
|
-
};
|
|
6581
|
-
convert.gray.hsl = convert.gray.hsv = function(args) {
|
|
6582
|
-
return [0, 0, args[0]];
|
|
6583
|
-
};
|
|
6584
|
-
convert.gray.hwb = function(gray) {
|
|
6585
|
-
return [0, 100, gray[0]];
|
|
6586
|
-
};
|
|
6587
|
-
convert.gray.cmyk = function(gray) {
|
|
6588
|
-
return [0, 0, 0, gray[0]];
|
|
6589
|
-
};
|
|
6590
|
-
convert.gray.lab = function(gray) {
|
|
6591
|
-
return [gray[0], 0, 0];
|
|
6592
|
-
};
|
|
6593
|
-
convert.gray.hex = function(gray) {
|
|
6594
|
-
var val = Math.round(gray[0] / 100 * 255) & 255;
|
|
6595
|
-
var integer = (val << 16) + (val << 8) + val;
|
|
6596
|
-
var string = integer.toString(16).toUpperCase();
|
|
6597
|
-
return "000000".substring(string.length) + string;
|
|
6598
|
-
};
|
|
6599
|
-
convert.rgb.gray = function(rgb) {
|
|
6600
|
-
var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
|
6601
|
-
return [val / 255 * 100];
|
|
6602
|
-
};
|
|
6603
|
-
}
|
|
6604
|
-
});
|
|
6605
|
-
var require_route = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
6606
|
-
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js"(exports, module2) {
|
|
6607
|
-
"use strict";
|
|
6608
|
-
var conversions = require_conversions();
|
|
6609
|
-
function buildGraph() {
|
|
6610
|
-
var graph = {};
|
|
6611
|
-
var models = Object.keys(conversions);
|
|
6612
|
-
for (var len = models.length, i = 0; i < len; i++) {
|
|
6613
|
-
graph[models[i]] = {
|
|
6614
|
-
// http://jsperf.com/1-vs-infinity
|
|
6615
|
-
// micro-opt, but this is simple.
|
|
6616
|
-
distance: -1,
|
|
6617
|
-
parent: null
|
|
6618
|
-
};
|
|
6619
|
-
}
|
|
6620
|
-
return graph;
|
|
6621
|
-
}
|
|
6622
|
-
function deriveBFS(fromModel) {
|
|
6623
|
-
var graph = buildGraph();
|
|
6624
|
-
var queue = [fromModel];
|
|
6625
|
-
graph[fromModel].distance = 0;
|
|
6626
|
-
while (queue.length) {
|
|
6627
|
-
var current = queue.pop();
|
|
6628
|
-
var adjacents = Object.keys(conversions[current]);
|
|
6629
|
-
for (var len = adjacents.length, i = 0; i < len; i++) {
|
|
6630
|
-
var adjacent = adjacents[i];
|
|
6631
|
-
var node = graph[adjacent];
|
|
6632
|
-
if (node.distance === -1) {
|
|
6633
|
-
node.distance = graph[current].distance + 1;
|
|
6634
|
-
node.parent = current;
|
|
6635
|
-
queue.unshift(adjacent);
|
|
6636
|
-
}
|
|
6637
|
-
}
|
|
6638
|
-
}
|
|
6639
|
-
return graph;
|
|
6640
|
-
}
|
|
6641
|
-
function link2(from, to) {
|
|
6642
|
-
return function(args) {
|
|
6643
|
-
return to(from(args));
|
|
6644
|
-
};
|
|
6645
|
-
}
|
|
6646
|
-
function wrapConversion(toModel, graph) {
|
|
6647
|
-
var path7 = [graph[toModel].parent, toModel];
|
|
6648
|
-
var fn = conversions[graph[toModel].parent][toModel];
|
|
6649
|
-
var cur = graph[toModel].parent;
|
|
6650
|
-
while (graph[cur].parent) {
|
|
6651
|
-
path7.unshift(graph[cur].parent);
|
|
6652
|
-
fn = link2(conversions[graph[cur].parent][cur], fn);
|
|
6653
|
-
cur = graph[cur].parent;
|
|
6654
|
-
}
|
|
6655
|
-
fn.conversion = path7;
|
|
6656
|
-
return fn;
|
|
6657
|
-
}
|
|
6658
|
-
module2.exports = function(fromModel) {
|
|
6659
|
-
var graph = deriveBFS(fromModel);
|
|
6660
|
-
var conversion = {};
|
|
6661
|
-
var models = Object.keys(graph);
|
|
6662
|
-
for (var len = models.length, i = 0; i < len; i++) {
|
|
6663
|
-
var toModel = models[i];
|
|
6664
|
-
var node = graph[toModel];
|
|
6665
|
-
if (node.parent === null) {
|
|
6666
|
-
continue;
|
|
6667
|
-
}
|
|
6668
|
-
conversion[toModel] = wrapConversion(toModel, graph);
|
|
6669
|
-
}
|
|
6670
|
-
return conversion;
|
|
6671
|
-
};
|
|
6672
|
-
}
|
|
6673
|
-
});
|
|
6674
|
-
var require_color_convert = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
6675
|
-
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js"(exports, module2) {
|
|
6676
|
-
"use strict";
|
|
6677
|
-
var conversions = require_conversions();
|
|
6678
|
-
var route = require_route();
|
|
6679
|
-
var convert = {};
|
|
6680
|
-
var models = Object.keys(conversions);
|
|
6681
|
-
function wrapRaw(fn) {
|
|
6682
|
-
var wrappedFn = function(args) {
|
|
6683
|
-
if (args === void 0 || args === null) {
|
|
6684
|
-
return args;
|
|
6685
|
-
}
|
|
6686
|
-
if (arguments.length > 1) {
|
|
6687
|
-
args = Array.prototype.slice.call(arguments);
|
|
6688
|
-
}
|
|
6689
|
-
return fn(args);
|
|
6690
|
-
};
|
|
6691
|
-
if ("conversion" in fn) {
|
|
6692
|
-
wrappedFn.conversion = fn.conversion;
|
|
6693
|
-
}
|
|
6694
|
-
return wrappedFn;
|
|
6695
|
-
}
|
|
6696
|
-
function wrapRounded(fn) {
|
|
6697
|
-
var wrappedFn = function(args) {
|
|
6698
|
-
if (args === void 0 || args === null) {
|
|
6699
|
-
return args;
|
|
6700
|
-
}
|
|
6701
|
-
if (arguments.length > 1) {
|
|
6702
|
-
args = Array.prototype.slice.call(arguments);
|
|
6703
|
-
}
|
|
6704
|
-
var result = fn(args);
|
|
6705
|
-
if (typeof result === "object") {
|
|
6706
|
-
for (var len = result.length, i = 0; i < len; i++) {
|
|
6707
|
-
result[i] = Math.round(result[i]);
|
|
6708
|
-
}
|
|
6709
|
-
}
|
|
6710
|
-
return result;
|
|
6711
|
-
};
|
|
6712
|
-
if ("conversion" in fn) {
|
|
6713
|
-
wrappedFn.conversion = fn.conversion;
|
|
6714
|
-
}
|
|
6715
|
-
return wrappedFn;
|
|
6716
|
-
}
|
|
6717
|
-
models.forEach(function(fromModel) {
|
|
6718
|
-
convert[fromModel] = {};
|
|
6719
|
-
Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
|
|
6720
|
-
Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
|
|
6721
|
-
var routes = route(fromModel);
|
|
6722
|
-
var routeModels = Object.keys(routes);
|
|
6723
|
-
routeModels.forEach(function(toModel) {
|
|
6724
|
-
var fn = routes[toModel];
|
|
6725
|
-
convert[fromModel][toModel] = wrapRounded(fn);
|
|
6726
|
-
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
6727
|
-
});
|
|
6728
|
-
});
|
|
6729
|
-
module2.exports = convert;
|
|
6730
|
-
}
|
|
6731
|
-
});
|
|
6732
|
-
var require_ansi_styles = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
6733
|
-
"../../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js"(exports, module2) {
|
|
6734
|
-
"use strict";
|
|
6735
|
-
var colorConvert = require_color_convert();
|
|
6736
|
-
var wrapAnsi16 = (fn, offset) => function() {
|
|
6737
|
-
const code = fn.apply(colorConvert, arguments);
|
|
6738
|
-
return `\x1B[${code + offset}m`;
|
|
6739
|
-
};
|
|
6740
|
-
var wrapAnsi256 = (fn, offset) => function() {
|
|
6741
|
-
const code = fn.apply(colorConvert, arguments);
|
|
6742
|
-
return `\x1B[${38 + offset};5;${code}m`;
|
|
6743
|
-
};
|
|
6744
|
-
var wrapAnsi16m = (fn, offset) => function() {
|
|
6745
|
-
const rgb = fn.apply(colorConvert, arguments);
|
|
6746
|
-
return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
6747
|
-
};
|
|
6748
|
-
function assembleStyles() {
|
|
6749
|
-
const codes = /* @__PURE__ */ new Map();
|
|
6750
|
-
const styles = {
|
|
6751
|
-
modifier: {
|
|
6752
|
-
reset: [0, 0],
|
|
6753
|
-
// 21 isn't widely supported and 22 does the same thing
|
|
6754
|
-
bold: [1, 22],
|
|
6755
|
-
dim: [2, 22],
|
|
6756
|
-
italic: [3, 23],
|
|
6757
|
-
underline: [4, 24],
|
|
6758
|
-
inverse: [7, 27],
|
|
6759
|
-
hidden: [8, 28],
|
|
6760
|
-
strikethrough: [9, 29]
|
|
6761
|
-
},
|
|
6762
|
-
color: {
|
|
6763
|
-
black: [30, 39],
|
|
6764
|
-
red: [31, 39],
|
|
6765
|
-
green: [32, 39],
|
|
6766
|
-
yellow: [33, 39],
|
|
6767
|
-
blue: [34, 39],
|
|
6768
|
-
magenta: [35, 39],
|
|
6769
|
-
cyan: [36, 39],
|
|
6770
|
-
white: [37, 39],
|
|
6771
|
-
gray: [90, 39],
|
|
6772
|
-
// Bright color
|
|
6773
|
-
redBright: [91, 39],
|
|
6774
|
-
greenBright: [92, 39],
|
|
6775
|
-
yellowBright: [93, 39],
|
|
6776
|
-
blueBright: [94, 39],
|
|
6777
|
-
magentaBright: [95, 39],
|
|
6778
|
-
cyanBright: [96, 39],
|
|
6779
|
-
whiteBright: [97, 39]
|
|
6780
|
-
},
|
|
6781
|
-
bgColor: {
|
|
6782
|
-
bgBlack: [40, 49],
|
|
6783
|
-
bgRed: [41, 49],
|
|
6784
|
-
bgGreen: [42, 49],
|
|
6785
|
-
bgYellow: [43, 49],
|
|
6786
|
-
bgBlue: [44, 49],
|
|
6787
|
-
bgMagenta: [45, 49],
|
|
6788
|
-
bgCyan: [46, 49],
|
|
6789
|
-
bgWhite: [47, 49],
|
|
6790
|
-
// Bright color
|
|
6791
|
-
bgBlackBright: [100, 49],
|
|
6792
|
-
bgRedBright: [101, 49],
|
|
6793
|
-
bgGreenBright: [102, 49],
|
|
6794
|
-
bgYellowBright: [103, 49],
|
|
6795
|
-
bgBlueBright: [104, 49],
|
|
6796
|
-
bgMagentaBright: [105, 49],
|
|
6797
|
-
bgCyanBright: [106, 49],
|
|
6798
|
-
bgWhiteBright: [107, 49]
|
|
6799
|
-
}
|
|
6800
|
-
};
|
|
6801
|
-
styles.color.grey = styles.color.gray;
|
|
6802
|
-
for (const groupName of Object.keys(styles)) {
|
|
6803
|
-
const group = styles[groupName];
|
|
6804
|
-
for (const styleName of Object.keys(group)) {
|
|
6805
|
-
const style = group[styleName];
|
|
6806
|
-
styles[styleName] = {
|
|
6807
|
-
open: `\x1B[${style[0]}m`,
|
|
6808
|
-
close: `\x1B[${style[1]}m`
|
|
6809
|
-
};
|
|
6810
|
-
group[styleName] = styles[styleName];
|
|
6811
|
-
codes.set(style[0], style[1]);
|
|
6812
|
-
}
|
|
6813
|
-
Object.defineProperty(styles, groupName, {
|
|
6814
|
-
value: group,
|
|
6815
|
-
enumerable: false
|
|
6816
|
-
});
|
|
6817
|
-
Object.defineProperty(styles, "codes", {
|
|
6818
|
-
value: codes,
|
|
6819
|
-
enumerable: false
|
|
6820
|
-
});
|
|
6821
|
-
}
|
|
6822
|
-
const ansi2ansi = (n) => n;
|
|
6823
|
-
const rgb2rgb = (r, g, b) => [r, g, b];
|
|
6824
|
-
styles.color.close = "\x1B[39m";
|
|
6825
|
-
styles.bgColor.close = "\x1B[49m";
|
|
6826
|
-
styles.color.ansi = {
|
|
6827
|
-
ansi: wrapAnsi16(ansi2ansi, 0)
|
|
6828
|
-
};
|
|
6829
|
-
styles.color.ansi256 = {
|
|
6830
|
-
ansi256: wrapAnsi256(ansi2ansi, 0)
|
|
6831
|
-
};
|
|
6832
|
-
styles.color.ansi16m = {
|
|
6833
|
-
rgb: wrapAnsi16m(rgb2rgb, 0)
|
|
6834
|
-
};
|
|
6835
|
-
styles.bgColor.ansi = {
|
|
6836
|
-
ansi: wrapAnsi16(ansi2ansi, 10)
|
|
6837
|
-
};
|
|
6838
|
-
styles.bgColor.ansi256 = {
|
|
6839
|
-
ansi256: wrapAnsi256(ansi2ansi, 10)
|
|
6840
|
-
};
|
|
6841
|
-
styles.bgColor.ansi16m = {
|
|
6842
|
-
rgb: wrapAnsi16m(rgb2rgb, 10)
|
|
6843
|
-
};
|
|
6844
|
-
for (let key of Object.keys(colorConvert)) {
|
|
6845
|
-
if (typeof colorConvert[key] !== "object") {
|
|
6846
|
-
continue;
|
|
6847
|
-
}
|
|
6848
|
-
const suite = colorConvert[key];
|
|
6849
|
-
if (key === "ansi16") {
|
|
6850
|
-
key = "ansi";
|
|
6851
|
-
}
|
|
6852
|
-
if ("ansi16" in suite) {
|
|
6853
|
-
styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
|
|
6854
|
-
styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
|
|
6855
|
-
}
|
|
6856
|
-
if ("ansi256" in suite) {
|
|
6857
|
-
styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
|
|
6858
|
-
styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
|
|
6859
|
-
}
|
|
6860
|
-
if ("rgb" in suite) {
|
|
6861
|
-
styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
|
|
6862
|
-
styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
|
|
6863
|
-
}
|
|
6864
|
-
}
|
|
6865
|
-
return styles;
|
|
6866
|
-
}
|
|
6867
|
-
Object.defineProperty(module2, "exports", {
|
|
6868
|
-
enumerable: true,
|
|
6869
|
-
get: assembleStyles
|
|
6870
|
-
});
|
|
6871
|
-
}
|
|
6872
|
-
});
|
|
6873
|
-
var require_has_flag = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
6874
|
-
"../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports, module2) {
|
|
6875
|
-
"use strict";
|
|
6876
|
-
module2.exports = (flag, argv) => {
|
|
6877
|
-
argv = argv || process.argv;
|
|
6878
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
6879
|
-
const pos = argv.indexOf(prefix + flag);
|
|
6880
|
-
const terminatorPos = argv.indexOf("--");
|
|
6881
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
6882
|
-
};
|
|
6883
|
-
}
|
|
6884
|
-
});
|
|
6885
|
-
var require_supports_color = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
6886
|
-
"../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports, module2) {
|
|
5821
|
+
var require_lib3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
5822
|
+
"../../node_modules/.pnpm/@babel+code-frame@7.26.2/node_modules/@babel/code-frame/lib/index.js"(exports) {
|
|
6887
5823
|
"use strict";
|
|
6888
|
-
|
|
6889
|
-
var
|
|
6890
|
-
var
|
|
6891
|
-
var
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
}
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
if ("FORCE_COLOR" in env) {
|
|
6898
|
-
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
6899
|
-
}
|
|
6900
|
-
function translateLevel(level) {
|
|
6901
|
-
if (level === 0) {
|
|
6902
|
-
return false;
|
|
6903
|
-
}
|
|
5824
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5825
|
+
var picocolors = require_picocolors();
|
|
5826
|
+
var jsTokens = require_js_tokens();
|
|
5827
|
+
var helperValidatorIdentifier = require_lib2();
|
|
5828
|
+
function isColorSupported() {
|
|
5829
|
+
return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported;
|
|
5830
|
+
}
|
|
5831
|
+
var compose = (f, g) => (v) => f(g(v));
|
|
5832
|
+
function buildDefs(colors) {
|
|
6904
5833
|
return {
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
5834
|
+
keyword: colors.cyan,
|
|
5835
|
+
capitalized: colors.yellow,
|
|
5836
|
+
jsxIdentifier: colors.yellow,
|
|
5837
|
+
punctuator: colors.yellow,
|
|
5838
|
+
number: colors.magenta,
|
|
5839
|
+
string: colors.green,
|
|
5840
|
+
regex: colors.magenta,
|
|
5841
|
+
comment: colors.gray,
|
|
5842
|
+
invalid: compose(compose(colors.white, colors.bgRed), colors.bold),
|
|
5843
|
+
gutter: colors.gray,
|
|
5844
|
+
marker: compose(colors.red, colors.bold),
|
|
5845
|
+
message: compose(colors.red, colors.bold),
|
|
5846
|
+
reset: colors.reset
|
|
6909
5847
|
};
|
|
6910
5848
|
}
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
6916
|
-
return 3;
|
|
6917
|
-
}
|
|
6918
|
-
if (hasFlag("color=256")) {
|
|
6919
|
-
return 2;
|
|
6920
|
-
}
|
|
6921
|
-
if (stream && !stream.isTTY && forceColor !== true) {
|
|
6922
|
-
return 0;
|
|
6923
|
-
}
|
|
6924
|
-
const min = forceColor ? 1 : 0;
|
|
6925
|
-
if (process.platform === "win32") {
|
|
6926
|
-
const osRelease = os.release().split(".");
|
|
6927
|
-
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
6928
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
6929
|
-
}
|
|
6930
|
-
return 1;
|
|
6931
|
-
}
|
|
6932
|
-
if ("CI" in env) {
|
|
6933
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
6934
|
-
return 1;
|
|
6935
|
-
}
|
|
6936
|
-
return min;
|
|
6937
|
-
}
|
|
6938
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
6939
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
6940
|
-
}
|
|
6941
|
-
if (env.COLORTERM === "truecolor") {
|
|
6942
|
-
return 3;
|
|
6943
|
-
}
|
|
6944
|
-
if ("TERM_PROGRAM" in env) {
|
|
6945
|
-
const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
6946
|
-
switch (env.TERM_PROGRAM) {
|
|
6947
|
-
case "iTerm.app":
|
|
6948
|
-
return version2 >= 3 ? 3 : 2;
|
|
6949
|
-
case "Apple_Terminal":
|
|
6950
|
-
return 2;
|
|
6951
|
-
}
|
|
6952
|
-
}
|
|
6953
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
6954
|
-
return 2;
|
|
6955
|
-
}
|
|
6956
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
6957
|
-
return 1;
|
|
6958
|
-
}
|
|
6959
|
-
if ("COLORTERM" in env) {
|
|
6960
|
-
return 1;
|
|
6961
|
-
}
|
|
6962
|
-
if (env.TERM === "dumb") {
|
|
6963
|
-
return min;
|
|
6964
|
-
}
|
|
6965
|
-
return min;
|
|
6966
|
-
}
|
|
6967
|
-
function getSupportLevel(stream) {
|
|
6968
|
-
const level = supportsColor(stream);
|
|
6969
|
-
return translateLevel(level);
|
|
6970
|
-
}
|
|
6971
|
-
module2.exports = {
|
|
6972
|
-
supportsColor: getSupportLevel,
|
|
6973
|
-
stdout: getSupportLevel(process.stdout),
|
|
6974
|
-
stderr: getSupportLevel(process.stderr)
|
|
6975
|
-
};
|
|
6976
|
-
}
|
|
6977
|
-
});
|
|
6978
|
-
var require_templates = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
6979
|
-
"../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js"(exports, module2) {
|
|
6980
|
-
"use strict";
|
|
6981
|
-
var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
6982
|
-
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
6983
|
-
var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
6984
|
-
var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
6985
|
-
var ESCAPES = /* @__PURE__ */ new Map([
|
|
6986
|
-
["n", "\n"],
|
|
6987
|
-
["r", "\r"],
|
|
6988
|
-
["t", " "],
|
|
6989
|
-
["b", "\b"],
|
|
6990
|
-
["f", "\f"],
|
|
6991
|
-
["v", "\v"],
|
|
6992
|
-
["0", "\0"],
|
|
6993
|
-
["\\", "\\"],
|
|
6994
|
-
["e", "\x1B"],
|
|
6995
|
-
["a", "\x07"]
|
|
6996
|
-
]);
|
|
6997
|
-
function unescape(c) {
|
|
6998
|
-
if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) {
|
|
6999
|
-
return String.fromCharCode(parseInt(c.slice(1), 16));
|
|
7000
|
-
}
|
|
7001
|
-
return ESCAPES.get(c) || c;
|
|
7002
|
-
}
|
|
7003
|
-
function parseArguments(name, args) {
|
|
7004
|
-
const results = [];
|
|
7005
|
-
const chunks = args.trim().split(/\s*,\s*/g);
|
|
7006
|
-
let matches;
|
|
7007
|
-
for (const chunk of chunks) {
|
|
7008
|
-
if (!isNaN(chunk)) {
|
|
7009
|
-
results.push(Number(chunk));
|
|
7010
|
-
} else if (matches = chunk.match(STRING_REGEX)) {
|
|
7011
|
-
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
|
|
7012
|
-
} else {
|
|
7013
|
-
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
|
|
7014
|
-
}
|
|
7015
|
-
}
|
|
7016
|
-
return results;
|
|
7017
|
-
}
|
|
7018
|
-
function parseStyle(style) {
|
|
7019
|
-
STYLE_REGEX.lastIndex = 0;
|
|
7020
|
-
const results = [];
|
|
7021
|
-
let matches;
|
|
7022
|
-
while ((matches = STYLE_REGEX.exec(style)) !== null) {
|
|
7023
|
-
const name = matches[1];
|
|
7024
|
-
if (matches[2]) {
|
|
7025
|
-
const args = parseArguments(name, matches[2]);
|
|
7026
|
-
results.push([name].concat(args));
|
|
7027
|
-
} else {
|
|
7028
|
-
results.push([name]);
|
|
7029
|
-
}
|
|
7030
|
-
}
|
|
7031
|
-
return results;
|
|
7032
|
-
}
|
|
7033
|
-
function buildStyle(chalk, styles) {
|
|
7034
|
-
const enabled = {};
|
|
7035
|
-
for (const layer of styles) {
|
|
7036
|
-
for (const style of layer.styles) {
|
|
7037
|
-
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
7038
|
-
}
|
|
7039
|
-
}
|
|
7040
|
-
let current = chalk;
|
|
7041
|
-
for (const styleName of Object.keys(enabled)) {
|
|
7042
|
-
if (Array.isArray(enabled[styleName])) {
|
|
7043
|
-
if (!(styleName in current)) {
|
|
7044
|
-
throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
7045
|
-
}
|
|
7046
|
-
if (enabled[styleName].length > 0) {
|
|
7047
|
-
current = current[styleName].apply(current, enabled[styleName]);
|
|
7048
|
-
} else {
|
|
7049
|
-
current = current[styleName];
|
|
7050
|
-
}
|
|
7051
|
-
}
|
|
7052
|
-
}
|
|
7053
|
-
return current;
|
|
7054
|
-
}
|
|
7055
|
-
module2.exports = (chalk, tmp) => {
|
|
7056
|
-
const styles = [];
|
|
7057
|
-
const chunks = [];
|
|
7058
|
-
let chunk = [];
|
|
7059
|
-
tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
|
|
7060
|
-
if (escapeChar) {
|
|
7061
|
-
chunk.push(unescape(escapeChar));
|
|
7062
|
-
} else if (style) {
|
|
7063
|
-
const str = chunk.join("");
|
|
7064
|
-
chunk = [];
|
|
7065
|
-
chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
|
|
7066
|
-
styles.push({ inverse, styles: parseStyle(style) });
|
|
7067
|
-
} else if (close) {
|
|
7068
|
-
if (styles.length === 0) {
|
|
7069
|
-
throw new Error("Found extraneous } in Chalk template literal");
|
|
7070
|
-
}
|
|
7071
|
-
chunks.push(buildStyle(chalk, styles)(chunk.join("")));
|
|
7072
|
-
chunk = [];
|
|
7073
|
-
styles.pop();
|
|
7074
|
-
} else {
|
|
7075
|
-
chunk.push(chr);
|
|
7076
|
-
}
|
|
7077
|
-
});
|
|
7078
|
-
chunks.push(chunk.join(""));
|
|
7079
|
-
if (styles.length > 0) {
|
|
7080
|
-
const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
7081
|
-
throw new Error(errMsg);
|
|
7082
|
-
}
|
|
7083
|
-
return chunks.join("");
|
|
7084
|
-
};
|
|
7085
|
-
}
|
|
7086
|
-
});
|
|
7087
|
-
var require_chalk = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
7088
|
-
"../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js"(exports, module2) {
|
|
7089
|
-
"use strict";
|
|
7090
|
-
var escapeStringRegexp = require_escape_string_regexp();
|
|
7091
|
-
var ansiStyles = require_ansi_styles();
|
|
7092
|
-
var stdoutColor = require_supports_color().stdout;
|
|
7093
|
-
var template = require_templates();
|
|
7094
|
-
var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
|
|
7095
|
-
var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
|
|
7096
|
-
var skipModels = /* @__PURE__ */ new Set(["gray"]);
|
|
7097
|
-
var styles = /* @__PURE__ */ Object.create(null);
|
|
7098
|
-
function applyOptions(obj, options) {
|
|
7099
|
-
options = options || {};
|
|
7100
|
-
const scLevel = stdoutColor ? stdoutColor.level : 0;
|
|
7101
|
-
obj.level = options.level === void 0 ? scLevel : options.level;
|
|
7102
|
-
obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
|
|
7103
|
-
}
|
|
7104
|
-
function Chalk(options) {
|
|
7105
|
-
if (!this || !(this instanceof Chalk) || this.template) {
|
|
7106
|
-
const chalk = {};
|
|
7107
|
-
applyOptions(chalk, options);
|
|
7108
|
-
chalk.template = function() {
|
|
7109
|
-
const args = [].slice.call(arguments);
|
|
7110
|
-
return chalkTag.apply(null, [chalk.template].concat(args));
|
|
7111
|
-
};
|
|
7112
|
-
Object.setPrototypeOf(chalk, Chalk.prototype);
|
|
7113
|
-
Object.setPrototypeOf(chalk.template, chalk);
|
|
7114
|
-
chalk.template.constructor = Chalk;
|
|
7115
|
-
return chalk.template;
|
|
7116
|
-
}
|
|
7117
|
-
applyOptions(this, options);
|
|
7118
|
-
}
|
|
7119
|
-
if (isSimpleWindowsTerm) {
|
|
7120
|
-
ansiStyles.blue.open = "\x1B[94m";
|
|
7121
|
-
}
|
|
7122
|
-
for (const key of Object.keys(ansiStyles)) {
|
|
7123
|
-
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
|
|
7124
|
-
styles[key] = {
|
|
7125
|
-
get() {
|
|
7126
|
-
const codes = ansiStyles[key];
|
|
7127
|
-
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
|
|
7128
|
-
}
|
|
7129
|
-
};
|
|
7130
|
-
}
|
|
7131
|
-
styles.visible = {
|
|
7132
|
-
get() {
|
|
7133
|
-
return build.call(this, this._styles || [], true, "visible");
|
|
7134
|
-
}
|
|
7135
|
-
};
|
|
7136
|
-
ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
|
|
7137
|
-
for (const model of Object.keys(ansiStyles.color.ansi)) {
|
|
7138
|
-
if (skipModels.has(model)) {
|
|
7139
|
-
continue;
|
|
7140
|
-
}
|
|
7141
|
-
styles[model] = {
|
|
7142
|
-
get() {
|
|
7143
|
-
const level = this.level;
|
|
7144
|
-
return function() {
|
|
7145
|
-
const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
|
|
7146
|
-
const codes = {
|
|
7147
|
-
open,
|
|
7148
|
-
close: ansiStyles.color.close,
|
|
7149
|
-
closeRe: ansiStyles.color.closeRe
|
|
7150
|
-
};
|
|
7151
|
-
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
|
7152
|
-
};
|
|
7153
|
-
}
|
|
7154
|
-
};
|
|
7155
|
-
}
|
|
7156
|
-
ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
|
|
7157
|
-
for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
|
|
7158
|
-
if (skipModels.has(model)) {
|
|
7159
|
-
continue;
|
|
7160
|
-
}
|
|
7161
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
7162
|
-
styles[bgModel] = {
|
|
7163
|
-
get() {
|
|
7164
|
-
const level = this.level;
|
|
7165
|
-
return function() {
|
|
7166
|
-
const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
|
|
7167
|
-
const codes = {
|
|
7168
|
-
open,
|
|
7169
|
-
close: ansiStyles.bgColor.close,
|
|
7170
|
-
closeRe: ansiStyles.bgColor.closeRe
|
|
7171
|
-
};
|
|
7172
|
-
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
|
7173
|
-
};
|
|
7174
|
-
}
|
|
7175
|
-
};
|
|
7176
|
-
}
|
|
7177
|
-
var proto = Object.defineProperties(() => {
|
|
7178
|
-
}, styles);
|
|
7179
|
-
function build(_styles, _empty, key) {
|
|
7180
|
-
const builder = function() {
|
|
7181
|
-
return applyStyle.apply(builder, arguments);
|
|
7182
|
-
};
|
|
7183
|
-
builder._styles = _styles;
|
|
7184
|
-
builder._empty = _empty;
|
|
7185
|
-
const self = this;
|
|
7186
|
-
Object.defineProperty(builder, "level", {
|
|
7187
|
-
enumerable: true,
|
|
7188
|
-
get() {
|
|
7189
|
-
return self.level;
|
|
7190
|
-
},
|
|
7191
|
-
set(level) {
|
|
7192
|
-
self.level = level;
|
|
7193
|
-
}
|
|
7194
|
-
});
|
|
7195
|
-
Object.defineProperty(builder, "enabled", {
|
|
7196
|
-
enumerable: true,
|
|
7197
|
-
get() {
|
|
7198
|
-
return self.enabled;
|
|
7199
|
-
},
|
|
7200
|
-
set(enabled) {
|
|
7201
|
-
self.enabled = enabled;
|
|
7202
|
-
}
|
|
7203
|
-
});
|
|
7204
|
-
builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
|
|
7205
|
-
builder.__proto__ = proto;
|
|
7206
|
-
return builder;
|
|
7207
|
-
}
|
|
7208
|
-
function applyStyle() {
|
|
7209
|
-
const args = arguments;
|
|
7210
|
-
const argsLen = args.length;
|
|
7211
|
-
let str = String(arguments[0]);
|
|
7212
|
-
if (argsLen === 0) {
|
|
7213
|
-
return "";
|
|
7214
|
-
}
|
|
7215
|
-
if (argsLen > 1) {
|
|
7216
|
-
for (let a = 1; a < argsLen; a++) {
|
|
7217
|
-
str += " " + args[a];
|
|
7218
|
-
}
|
|
7219
|
-
}
|
|
7220
|
-
if (!this.enabled || this.level <= 0 || !str) {
|
|
7221
|
-
return this._empty ? "" : str;
|
|
7222
|
-
}
|
|
7223
|
-
const originalDim = ansiStyles.dim.open;
|
|
7224
|
-
if (isSimpleWindowsTerm && this.hasGrey) {
|
|
7225
|
-
ansiStyles.dim.open = "";
|
|
7226
|
-
}
|
|
7227
|
-
for (const code of this._styles.slice().reverse()) {
|
|
7228
|
-
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
|
7229
|
-
str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
|
|
7230
|
-
}
|
|
7231
|
-
ansiStyles.dim.open = originalDim;
|
|
7232
|
-
return str;
|
|
7233
|
-
}
|
|
7234
|
-
function chalkTag(chalk, strings) {
|
|
7235
|
-
if (!Array.isArray(strings)) {
|
|
7236
|
-
return [].slice.call(arguments, 1).join(" ");
|
|
7237
|
-
}
|
|
7238
|
-
const args = [].slice.call(arguments, 2);
|
|
7239
|
-
const parts = [strings.raw[0]];
|
|
7240
|
-
for (let i = 1; i < strings.length; i++) {
|
|
7241
|
-
parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
|
7242
|
-
parts.push(String(strings.raw[i]));
|
|
7243
|
-
}
|
|
7244
|
-
return template(chalk, parts.join(""));
|
|
7245
|
-
}
|
|
7246
|
-
Object.defineProperties(Chalk.prototype, styles);
|
|
7247
|
-
module2.exports = Chalk();
|
|
7248
|
-
module2.exports.supportsColor = stdoutColor;
|
|
7249
|
-
module2.exports.default = module2.exports;
|
|
7250
|
-
}
|
|
7251
|
-
});
|
|
7252
|
-
var require_lib3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
7253
|
-
"../../node_modules/.pnpm/@babel+highlight@7.23.4/node_modules/@babel/highlight/lib/index.js"(exports) {
|
|
7254
|
-
"use strict";
|
|
7255
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7256
|
-
value: true
|
|
7257
|
-
});
|
|
7258
|
-
exports.default = highlight;
|
|
7259
|
-
exports.shouldHighlight = shouldHighlight;
|
|
7260
|
-
var _jsTokens = require_js_tokens();
|
|
7261
|
-
var _helperValidatorIdentifier = require_lib2();
|
|
7262
|
-
var _chalk = _interopRequireWildcard(require_chalk(), true);
|
|
7263
|
-
function _getRequireWildcardCache(e) {
|
|
7264
|
-
if ("function" != typeof WeakMap) return null;
|
|
7265
|
-
var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
|
|
7266
|
-
return (_getRequireWildcardCache = function(e2) {
|
|
7267
|
-
return e2 ? t : r;
|
|
7268
|
-
})(e);
|
|
7269
|
-
}
|
|
7270
|
-
function _interopRequireWildcard(e, r) {
|
|
7271
|
-
if (!r && e && e.__esModule) return e;
|
|
7272
|
-
if (null === e || "object" != typeof e && "function" != typeof e) return { default: e };
|
|
7273
|
-
var t = _getRequireWildcardCache(r);
|
|
7274
|
-
if (t && t.has(e)) return t.get(e);
|
|
7275
|
-
var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
7276
|
-
for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
|
|
7277
|
-
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
7278
|
-
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
7279
|
-
}
|
|
7280
|
-
return n.default = e, t && t.set(e, n), n;
|
|
5849
|
+
var defsOn = buildDefs(picocolors.createColors(true));
|
|
5850
|
+
var defsOff = buildDefs(picocolors.createColors(false));
|
|
5851
|
+
function getDefs(enabled) {
|
|
5852
|
+
return enabled ? defsOn : defsOff;
|
|
7281
5853
|
}
|
|
7282
5854
|
var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
|
|
7283
|
-
|
|
7284
|
-
return {
|
|
7285
|
-
keyword: chalk.cyan,
|
|
7286
|
-
capitalized: chalk.yellow,
|
|
7287
|
-
jsxIdentifier: chalk.yellow,
|
|
7288
|
-
punctuator: chalk.yellow,
|
|
7289
|
-
number: chalk.magenta,
|
|
7290
|
-
string: chalk.green,
|
|
7291
|
-
regex: chalk.magenta,
|
|
7292
|
-
comment: chalk.grey,
|
|
7293
|
-
invalid: chalk.white.bgRed.bold
|
|
7294
|
-
};
|
|
7295
|
-
}
|
|
7296
|
-
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
5855
|
+
var NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/;
|
|
7297
5856
|
var BRACKET = /^[()[\]{}]$/;
|
|
7298
5857
|
var tokenize;
|
|
7299
5858
|
{
|
|
7300
5859
|
const JSX_TAG = /^[a-z][\w-]*$/i;
|
|
7301
5860
|
const getTokenType = function(token, offset, text) {
|
|
7302
5861
|
if (token.type === "name") {
|
|
7303
|
-
if (
|
|
5862
|
+
if (helperValidatorIdentifier.isKeyword(token.value) || helperValidatorIdentifier.isStrictReservedWord(token.value, true) || sometimesKeywords.has(token.value)) {
|
|
7304
5863
|
return "keyword";
|
|
7305
5864
|
}
|
|
7306
|
-
if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset)
|
|
5865
|
+
if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === "</")) {
|
|
7307
5866
|
return "jsxIdentifier";
|
|
7308
5867
|
}
|
|
7309
5868
|
if (token.value[0] !== token.value[0].toLowerCase()) {
|
|
@@ -7320,8 +5879,8 @@ var require_lib3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
7320
5879
|
};
|
|
7321
5880
|
tokenize = function* (text) {
|
|
7322
5881
|
let match;
|
|
7323
|
-
while (match =
|
|
7324
|
-
const token =
|
|
5882
|
+
while (match = jsTokens.default.exec(text)) {
|
|
5883
|
+
const token = jsTokens.matchToToken(match);
|
|
7325
5884
|
yield {
|
|
7326
5885
|
type: getTokenType(token, match.index, text),
|
|
7327
5886
|
value: token.value
|
|
@@ -7329,98 +5888,23 @@ var require_lib3 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
7329
5888
|
}
|
|
7330
5889
|
};
|
|
7331
5890
|
}
|
|
7332
|
-
function
|
|
5891
|
+
function highlight(text) {
|
|
5892
|
+
if (text === "") return "";
|
|
5893
|
+
const defs = getDefs(true);
|
|
7333
5894
|
let highlighted = "";
|
|
7334
5895
|
for (const {
|
|
7335
5896
|
type,
|
|
7336
5897
|
value
|
|
7337
5898
|
} of tokenize(text)) {
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
highlighted += value.split(NEWLINE).map((str) => colorize(str)).join("\n");
|
|
5899
|
+
if (type in defs) {
|
|
5900
|
+
highlighted += value.split(NEWLINE$1).map((str) => defs[type](str)).join("\n");
|
|
7341
5901
|
} else {
|
|
7342
5902
|
highlighted += value;
|
|
7343
5903
|
}
|
|
7344
5904
|
}
|
|
7345
5905
|
return highlighted;
|
|
7346
5906
|
}
|
|
7347
|
-
function shouldHighlight(options) {
|
|
7348
|
-
return _chalk.default.level > 0 || options.forceColor;
|
|
7349
|
-
}
|
|
7350
|
-
var chalkWithForcedColor = void 0;
|
|
7351
|
-
function getChalk(forceColor) {
|
|
7352
|
-
if (forceColor) {
|
|
7353
|
-
var _chalkWithForcedColor;
|
|
7354
|
-
(_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({
|
|
7355
|
-
enabled: true,
|
|
7356
|
-
level: 1
|
|
7357
|
-
});
|
|
7358
|
-
return chalkWithForcedColor;
|
|
7359
|
-
}
|
|
7360
|
-
return _chalk.default;
|
|
7361
|
-
}
|
|
7362
|
-
{
|
|
7363
|
-
exports.getChalk = (options) => getChalk(options.forceColor);
|
|
7364
|
-
}
|
|
7365
|
-
function highlight(code, options = {}) {
|
|
7366
|
-
if (code !== "" && shouldHighlight(options)) {
|
|
7367
|
-
const defs = getDefs(getChalk(options.forceColor));
|
|
7368
|
-
return highlightTokens(defs, code);
|
|
7369
|
-
} else {
|
|
7370
|
-
return code;
|
|
7371
|
-
}
|
|
7372
|
-
}
|
|
7373
|
-
}
|
|
7374
|
-
});
|
|
7375
|
-
var require_lib4 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
7376
|
-
"../../node_modules/.pnpm/@babel+code-frame@7.23.5/node_modules/@babel/code-frame/lib/index.js"(exports) {
|
|
7377
|
-
"use strict";
|
|
7378
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7379
|
-
value: true
|
|
7380
|
-
});
|
|
7381
|
-
exports.codeFrameColumns = codeFrameColumns2;
|
|
7382
|
-
exports.default = _default;
|
|
7383
|
-
var _highlight = require_lib3();
|
|
7384
|
-
var _chalk = _interopRequireWildcard(require_chalk(), true);
|
|
7385
|
-
function _getRequireWildcardCache(e) {
|
|
7386
|
-
if ("function" != typeof WeakMap) return null;
|
|
7387
|
-
var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
|
|
7388
|
-
return (_getRequireWildcardCache = function(e2) {
|
|
7389
|
-
return e2 ? t : r;
|
|
7390
|
-
})(e);
|
|
7391
|
-
}
|
|
7392
|
-
function _interopRequireWildcard(e, r) {
|
|
7393
|
-
if (!r && e && e.__esModule) return e;
|
|
7394
|
-
if (null === e || "object" != typeof e && "function" != typeof e) return { default: e };
|
|
7395
|
-
var t = _getRequireWildcardCache(r);
|
|
7396
|
-
if (t && t.has(e)) return t.get(e);
|
|
7397
|
-
var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
7398
|
-
for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
|
|
7399
|
-
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
7400
|
-
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
7401
|
-
}
|
|
7402
|
-
return n.default = e, t && t.set(e, n), n;
|
|
7403
|
-
}
|
|
7404
|
-
var chalkWithForcedColor = void 0;
|
|
7405
|
-
function getChalk(forceColor) {
|
|
7406
|
-
if (forceColor) {
|
|
7407
|
-
var _chalkWithForcedColor;
|
|
7408
|
-
(_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({
|
|
7409
|
-
enabled: true,
|
|
7410
|
-
level: 1
|
|
7411
|
-
});
|
|
7412
|
-
return chalkWithForcedColor;
|
|
7413
|
-
}
|
|
7414
|
-
return _chalk.default;
|
|
7415
|
-
}
|
|
7416
5907
|
var deprecationWarningShown = false;
|
|
7417
|
-
function getDefs(chalk) {
|
|
7418
|
-
return {
|
|
7419
|
-
gutter: chalk.grey,
|
|
7420
|
-
marker: chalk.red.bold,
|
|
7421
|
-
message: chalk.red.bold
|
|
7422
|
-
};
|
|
7423
|
-
}
|
|
7424
5908
|
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
7425
5909
|
function getMarkerLines(loc, source, opts) {
|
|
7426
5910
|
const startLoc = Object.assign({
|
|
@@ -7479,12 +5963,8 @@ var require_lib4 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
7479
5963
|
};
|
|
7480
5964
|
}
|
|
7481
5965
|
function codeFrameColumns2(rawLines, loc, opts = {}) {
|
|
7482
|
-
const
|
|
7483
|
-
const
|
|
7484
|
-
const defs = getDefs(chalk);
|
|
7485
|
-
const maybeHighlight = (chalkFn, string) => {
|
|
7486
|
-
return highlighted ? chalkFn(string) : string;
|
|
7487
|
-
};
|
|
5966
|
+
const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
|
|
5967
|
+
const defs = getDefs(shouldHighlight);
|
|
7488
5968
|
const lines = rawLines.split(NEWLINE);
|
|
7489
5969
|
const {
|
|
7490
5970
|
start,
|
|
@@ -7493,9 +5973,9 @@ var require_lib4 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
7493
5973
|
} = getMarkerLines(loc, lines, opts);
|
|
7494
5974
|
const hasColumns = loc.start && typeof loc.start.column === "number";
|
|
7495
5975
|
const numberMaxWidth = String(end).length;
|
|
7496
|
-
const highlightedLines =
|
|
7497
|
-
let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line,
|
|
7498
|
-
const number = start + 1 +
|
|
5976
|
+
const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;
|
|
5977
|
+
let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index2) => {
|
|
5978
|
+
const number = start + 1 + index2;
|
|
7499
5979
|
const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
|
|
7500
5980
|
const gutter = ` ${paddedNumber} |`;
|
|
7501
5981
|
const hasMarker = markerLines[number];
|
|
@@ -7505,27 +5985,27 @@ var require_lib4 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
7505
5985
|
if (Array.isArray(hasMarker)) {
|
|
7506
5986
|
const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
|
|
7507
5987
|
const numberOfMarkers = hasMarker[1] || 1;
|
|
7508
|
-
markerLine = ["\n ",
|
|
5988
|
+
markerLine = ["\n ", defs.gutter(gutter.replace(/\d/g, " ")), " ", markerSpacing, defs.marker("^").repeat(numberOfMarkers)].join("");
|
|
7509
5989
|
if (lastMarkerLine && opts.message) {
|
|
7510
|
-
markerLine += " " +
|
|
5990
|
+
markerLine += " " + defs.message(opts.message);
|
|
7511
5991
|
}
|
|
7512
5992
|
}
|
|
7513
|
-
return [
|
|
5993
|
+
return [defs.marker(">"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
|
|
7514
5994
|
} else {
|
|
7515
|
-
return ` ${
|
|
5995
|
+
return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`;
|
|
7516
5996
|
}
|
|
7517
5997
|
}).join("\n");
|
|
7518
5998
|
if (opts.message && !hasColumns) {
|
|
7519
5999
|
frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
|
|
7520
6000
|
${frame}`;
|
|
7521
6001
|
}
|
|
7522
|
-
if (
|
|
7523
|
-
return
|
|
6002
|
+
if (shouldHighlight) {
|
|
6003
|
+
return defs.reset(frame);
|
|
7524
6004
|
} else {
|
|
7525
6005
|
return frame;
|
|
7526
6006
|
}
|
|
7527
6007
|
}
|
|
7528
|
-
function
|
|
6008
|
+
function index(rawLines, lineNumber, colNumber, opts = {}) {
|
|
7529
6009
|
if (!deprecationWarningShown) {
|
|
7530
6010
|
deprecationWarningShown = true;
|
|
7531
6011
|
const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
|
|
@@ -7546,6 +6026,9 @@ ${frame}`;
|
|
|
7546
6026
|
};
|
|
7547
6027
|
return codeFrameColumns2(rawLines, location, opts);
|
|
7548
6028
|
}
|
|
6029
|
+
exports.codeFrameColumns = codeFrameColumns2;
|
|
6030
|
+
exports.default = index;
|
|
6031
|
+
exports.highlight = highlight;
|
|
7549
6032
|
}
|
|
7550
6033
|
});
|
|
7551
6034
|
var require_spdx_license_ids = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
@@ -8499,7 +6982,7 @@ var require_spdx_expression_parse = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8499
6982
|
}
|
|
8500
6983
|
});
|
|
8501
6984
|
var require_spdx_correct = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
8502
|
-
"../../node_modules/.pnpm/spdx-correct@3.
|
|
6985
|
+
"../../node_modules/.pnpm/spdx-correct@3.2.0/node_modules/spdx-correct/index.js"(exports, module2) {
|
|
8503
6986
|
"use strict";
|
|
8504
6987
|
var parse = require_spdx_expression_parse();
|
|
8505
6988
|
var spdxLicenseIds = require_spdx_license_ids();
|
|
@@ -8511,6 +6994,11 @@ var require_spdx_correct = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8511
6994
|
return false;
|
|
8512
6995
|
}
|
|
8513
6996
|
}
|
|
6997
|
+
function sortTranspositions(a, b) {
|
|
6998
|
+
var length = b[0].length - a[0].length;
|
|
6999
|
+
if (length !== 0) return length;
|
|
7000
|
+
return a[0].toUpperCase().localeCompare(b[0].toUpperCase());
|
|
7001
|
+
}
|
|
8514
7002
|
var transpositions = [
|
|
8515
7003
|
["APGL", "AGPL"],
|
|
8516
7004
|
["Gpl", "GPL"],
|
|
@@ -8526,8 +7014,17 @@ var require_spdx_correct = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8526
7014
|
["GUN", "GPL"],
|
|
8527
7015
|
["+", ""],
|
|
8528
7016
|
["GNU GPL", "GPL"],
|
|
7017
|
+
["GNU LGPL", "LGPL"],
|
|
8529
7018
|
["GNU/GPL", "GPL"],
|
|
8530
7019
|
["GNU GLP", "GPL"],
|
|
7020
|
+
["GNU LESSER GENERAL PUBLIC LICENSE", "LGPL"],
|
|
7021
|
+
["GNU Lesser General Public License", "LGPL"],
|
|
7022
|
+
["GNU LESSER GENERAL PUBLIC LICENSE", "LGPL-2.1"],
|
|
7023
|
+
["GNU Lesser General Public License", "LGPL-2.1"],
|
|
7024
|
+
["LESSER GENERAL PUBLIC LICENSE", "LGPL"],
|
|
7025
|
+
["Lesser General Public License", "LGPL"],
|
|
7026
|
+
["LESSER GENERAL PUBLIC LICENSE", "LGPL-2.1"],
|
|
7027
|
+
["Lesser General Public License", "LGPL-2.1"],
|
|
8531
7028
|
["GNU General Public License", "GPL"],
|
|
8532
7029
|
["Gnu public license", "GPL"],
|
|
8533
7030
|
["GNU Public License", "GPL"],
|
|
@@ -8536,8 +7033,9 @@ var require_spdx_correct = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8536
7033
|
["Mozilla Public License", "MPL"],
|
|
8537
7034
|
["Universal Permissive License", "UPL"],
|
|
8538
7035
|
["WTH", "WTF"],
|
|
7036
|
+
["WTFGPL", "WTFPL"],
|
|
8539
7037
|
["-License", ""]
|
|
8540
|
-
];
|
|
7038
|
+
].sort(sortTranspositions);
|
|
8541
7039
|
var TRANSPOSED = 0;
|
|
8542
7040
|
var CORRECT = 1;
|
|
8543
7041
|
var transforms = [
|
|
@@ -8705,7 +7203,7 @@ var require_spdx_correct = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
8705
7203
|
["MPL", "MPL-2.0"],
|
|
8706
7204
|
["X11", "X11"],
|
|
8707
7205
|
["ZLIB", "Zlib"]
|
|
8708
|
-
].concat(licensesWithOneVersion);
|
|
7206
|
+
].concat(licensesWithOneVersion).sort(sortTranspositions);
|
|
8709
7207
|
var SUBSTRING = 0;
|
|
8710
7208
|
var IDENTIFIER = 1;
|
|
8711
7209
|
var validTransformation = function(identifier) {
|
|
@@ -8886,7 +7384,7 @@ var require_validate_npm_package_license = (0, import_chunk_2ESYSVXG.__commonJS)
|
|
|
8886
7384
|
}
|
|
8887
7385
|
});
|
|
8888
7386
|
var require_hosts = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
8889
|
-
"../../node_modules/.pnpm/hosted-git-info@7.0.
|
|
7387
|
+
"../../node_modules/.pnpm/hosted-git-info@7.0.2/node_modules/hosted-git-info/lib/hosts.js"(exports, module2) {
|
|
8890
7388
|
"use strict";
|
|
8891
7389
|
var maybeJoin = (...args) => args.every((arg2) => arg2) ? args.join("") : "";
|
|
8892
7390
|
var maybeEncode = (arg2) => arg2 ? encodeURIComponent(arg2) : "";
|
|
@@ -9029,7 +7527,7 @@ var require_hosts = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9029
7527
|
filetemplate: ({ domain, user, project, committish, path: path7 }) => `https://${domain}/${user}/${project}/blob/${maybeEncode(committish) || "HEAD"}/${path7}`,
|
|
9030
7528
|
httpstemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
|
|
9031
7529
|
tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/archive/${maybeEncode(committish) || "HEAD"}.tar.gz`,
|
|
9032
|
-
bugstemplate: (
|
|
7530
|
+
bugstemplate: () => null,
|
|
9033
7531
|
extract: (url) => {
|
|
9034
7532
|
let [, user, project, aux] = url.pathname.split("/", 4);
|
|
9035
7533
|
if (["archive"].includes(aux)) {
|
|
@@ -9051,7 +7549,7 @@ var require_hosts = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9051
7549
|
}
|
|
9052
7550
|
});
|
|
9053
7551
|
var require_parse_url = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
9054
|
-
"../../node_modules/.pnpm/hosted-git-info@7.0.
|
|
7552
|
+
"../../node_modules/.pnpm/hosted-git-info@7.0.2/node_modules/hosted-git-info/lib/parse-url.js"(exports, module2) {
|
|
9055
7553
|
"use strict";
|
|
9056
7554
|
var url = (0, import_chunk_2ESYSVXG.__require)("url");
|
|
9057
7555
|
var lastIndexOfBefore = (str, char, beforeChar) => {
|
|
@@ -9102,7 +7600,7 @@ var require_parse_url = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9102
7600
|
}
|
|
9103
7601
|
});
|
|
9104
7602
|
var require_from_url = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
9105
|
-
"../../node_modules/.pnpm/hosted-git-info@7.0.
|
|
7603
|
+
"../../node_modules/.pnpm/hosted-git-info@7.0.2/node_modules/hosted-git-info/lib/from-url.js"(exports, module2) {
|
|
9106
7604
|
"use strict";
|
|
9107
7605
|
var parseUrl = require_parse_url();
|
|
9108
7606
|
var isGitHubShorthand = (arg2) => {
|
|
@@ -9193,8 +7691,8 @@ var require_from_url = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9193
7691
|
};
|
|
9194
7692
|
}
|
|
9195
7693
|
});
|
|
9196
|
-
var
|
|
9197
|
-
"../../node_modules/.pnpm/hosted-git-info@7.0.
|
|
7694
|
+
var require_lib4 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
7695
|
+
"../../node_modules/.pnpm/hosted-git-info@7.0.2/node_modules/hosted-git-info/lib/index.js"(exports, module2) {
|
|
9198
7696
|
"use strict";
|
|
9199
7697
|
var { LRUCache } = (0, import_chunk_33LPBNDX.require_commonjs)();
|
|
9200
7698
|
var hosts = require_hosts();
|
|
@@ -9335,321 +7833,8 @@ var require_lib5 = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9335
7833
|
module2.exports = GitHost;
|
|
9336
7834
|
}
|
|
9337
7835
|
});
|
|
9338
|
-
var require_implementation = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
9339
|
-
"../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module2) {
|
|
9340
|
-
"use strict";
|
|
9341
|
-
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
9342
|
-
var toStr = Object.prototype.toString;
|
|
9343
|
-
var max = Math.max;
|
|
9344
|
-
var funcType = "[object Function]";
|
|
9345
|
-
var concatty = function concatty2(a, b) {
|
|
9346
|
-
var arr = [];
|
|
9347
|
-
for (var i = 0; i < a.length; i += 1) {
|
|
9348
|
-
arr[i] = a[i];
|
|
9349
|
-
}
|
|
9350
|
-
for (var j = 0; j < b.length; j += 1) {
|
|
9351
|
-
arr[j + a.length] = b[j];
|
|
9352
|
-
}
|
|
9353
|
-
return arr;
|
|
9354
|
-
};
|
|
9355
|
-
var slicy = function slicy2(arrLike, offset) {
|
|
9356
|
-
var arr = [];
|
|
9357
|
-
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
9358
|
-
arr[j] = arrLike[i];
|
|
9359
|
-
}
|
|
9360
|
-
return arr;
|
|
9361
|
-
};
|
|
9362
|
-
var joiny = function(arr, joiner) {
|
|
9363
|
-
var str = "";
|
|
9364
|
-
for (var i = 0; i < arr.length; i += 1) {
|
|
9365
|
-
str += arr[i];
|
|
9366
|
-
if (i + 1 < arr.length) {
|
|
9367
|
-
str += joiner;
|
|
9368
|
-
}
|
|
9369
|
-
}
|
|
9370
|
-
return str;
|
|
9371
|
-
};
|
|
9372
|
-
module2.exports = function bind2(that) {
|
|
9373
|
-
var target = this;
|
|
9374
|
-
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
9375
|
-
throw new TypeError(ERROR_MESSAGE + target);
|
|
9376
|
-
}
|
|
9377
|
-
var args = slicy(arguments, 1);
|
|
9378
|
-
var bound;
|
|
9379
|
-
var binder = function() {
|
|
9380
|
-
if (this instanceof bound) {
|
|
9381
|
-
var result = target.apply(
|
|
9382
|
-
this,
|
|
9383
|
-
concatty(args, arguments)
|
|
9384
|
-
);
|
|
9385
|
-
if (Object(result) === result) {
|
|
9386
|
-
return result;
|
|
9387
|
-
}
|
|
9388
|
-
return this;
|
|
9389
|
-
}
|
|
9390
|
-
return target.apply(
|
|
9391
|
-
that,
|
|
9392
|
-
concatty(args, arguments)
|
|
9393
|
-
);
|
|
9394
|
-
};
|
|
9395
|
-
var boundLength = max(0, target.length - args.length);
|
|
9396
|
-
var boundArgs = [];
|
|
9397
|
-
for (var i = 0; i < boundLength; i++) {
|
|
9398
|
-
boundArgs[i] = "$" + i;
|
|
9399
|
-
}
|
|
9400
|
-
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
9401
|
-
if (target.prototype) {
|
|
9402
|
-
var Empty = function Empty2() {
|
|
9403
|
-
};
|
|
9404
|
-
Empty.prototype = target.prototype;
|
|
9405
|
-
bound.prototype = new Empty();
|
|
9406
|
-
Empty.prototype = null;
|
|
9407
|
-
}
|
|
9408
|
-
return bound;
|
|
9409
|
-
};
|
|
9410
|
-
}
|
|
9411
|
-
});
|
|
9412
|
-
var require_function_bind = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
9413
|
-
"../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module2) {
|
|
9414
|
-
"use strict";
|
|
9415
|
-
var implementation = require_implementation();
|
|
9416
|
-
module2.exports = Function.prototype.bind || implementation;
|
|
9417
|
-
}
|
|
9418
|
-
});
|
|
9419
|
-
var require_hasown = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
9420
|
-
"../../node_modules/.pnpm/hasown@2.0.0/node_modules/hasown/index.js"(exports, module2) {
|
|
9421
|
-
"use strict";
|
|
9422
|
-
var call = Function.prototype.call;
|
|
9423
|
-
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
9424
|
-
var bind2 = require_function_bind();
|
|
9425
|
-
module2.exports = bind2.call(call, $hasOwn);
|
|
9426
|
-
}
|
|
9427
|
-
});
|
|
9428
|
-
var require_core = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
9429
|
-
"../../node_modules/.pnpm/is-core-module@2.13.1/node_modules/is-core-module/core.json"(exports, module2) {
|
|
9430
|
-
module2.exports = {
|
|
9431
|
-
assert: true,
|
|
9432
|
-
"node:assert": [">= 14.18 && < 15", ">= 16"],
|
|
9433
|
-
"assert/strict": ">= 15",
|
|
9434
|
-
"node:assert/strict": ">= 16",
|
|
9435
|
-
async_hooks: ">= 8",
|
|
9436
|
-
"node:async_hooks": [">= 14.18 && < 15", ">= 16"],
|
|
9437
|
-
buffer_ieee754: ">= 0.5 && < 0.9.7",
|
|
9438
|
-
buffer: true,
|
|
9439
|
-
"node:buffer": [">= 14.18 && < 15", ">= 16"],
|
|
9440
|
-
child_process: true,
|
|
9441
|
-
"node:child_process": [">= 14.18 && < 15", ">= 16"],
|
|
9442
|
-
cluster: ">= 0.5",
|
|
9443
|
-
"node:cluster": [">= 14.18 && < 15", ">= 16"],
|
|
9444
|
-
console: true,
|
|
9445
|
-
"node:console": [">= 14.18 && < 15", ">= 16"],
|
|
9446
|
-
constants: true,
|
|
9447
|
-
"node:constants": [">= 14.18 && < 15", ">= 16"],
|
|
9448
|
-
crypto: true,
|
|
9449
|
-
"node:crypto": [">= 14.18 && < 15", ">= 16"],
|
|
9450
|
-
_debug_agent: ">= 1 && < 8",
|
|
9451
|
-
_debugger: "< 8",
|
|
9452
|
-
dgram: true,
|
|
9453
|
-
"node:dgram": [">= 14.18 && < 15", ">= 16"],
|
|
9454
|
-
diagnostics_channel: [">= 14.17 && < 15", ">= 15.1"],
|
|
9455
|
-
"node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
|
|
9456
|
-
dns: true,
|
|
9457
|
-
"node:dns": [">= 14.18 && < 15", ">= 16"],
|
|
9458
|
-
"dns/promises": ">= 15",
|
|
9459
|
-
"node:dns/promises": ">= 16",
|
|
9460
|
-
domain: ">= 0.7.12",
|
|
9461
|
-
"node:domain": [">= 14.18 && < 15", ">= 16"],
|
|
9462
|
-
events: true,
|
|
9463
|
-
"node:events": [">= 14.18 && < 15", ">= 16"],
|
|
9464
|
-
freelist: "< 6",
|
|
9465
|
-
fs: true,
|
|
9466
|
-
"node:fs": [">= 14.18 && < 15", ">= 16"],
|
|
9467
|
-
"fs/promises": [">= 10 && < 10.1", ">= 14"],
|
|
9468
|
-
"node:fs/promises": [">= 14.18 && < 15", ">= 16"],
|
|
9469
|
-
_http_agent: ">= 0.11.1",
|
|
9470
|
-
"node:_http_agent": [">= 14.18 && < 15", ">= 16"],
|
|
9471
|
-
_http_client: ">= 0.11.1",
|
|
9472
|
-
"node:_http_client": [">= 14.18 && < 15", ">= 16"],
|
|
9473
|
-
_http_common: ">= 0.11.1",
|
|
9474
|
-
"node:_http_common": [">= 14.18 && < 15", ">= 16"],
|
|
9475
|
-
_http_incoming: ">= 0.11.1",
|
|
9476
|
-
"node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
|
|
9477
|
-
_http_outgoing: ">= 0.11.1",
|
|
9478
|
-
"node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
|
|
9479
|
-
_http_server: ">= 0.11.1",
|
|
9480
|
-
"node:_http_server": [">= 14.18 && < 15", ">= 16"],
|
|
9481
|
-
http: true,
|
|
9482
|
-
"node:http": [">= 14.18 && < 15", ">= 16"],
|
|
9483
|
-
http2: ">= 8.8",
|
|
9484
|
-
"node:http2": [">= 14.18 && < 15", ">= 16"],
|
|
9485
|
-
https: true,
|
|
9486
|
-
"node:https": [">= 14.18 && < 15", ">= 16"],
|
|
9487
|
-
inspector: ">= 8",
|
|
9488
|
-
"node:inspector": [">= 14.18 && < 15", ">= 16"],
|
|
9489
|
-
"inspector/promises": [">= 19"],
|
|
9490
|
-
"node:inspector/promises": [">= 19"],
|
|
9491
|
-
_linklist: "< 8",
|
|
9492
|
-
module: true,
|
|
9493
|
-
"node:module": [">= 14.18 && < 15", ">= 16"],
|
|
9494
|
-
net: true,
|
|
9495
|
-
"node:net": [">= 14.18 && < 15", ">= 16"],
|
|
9496
|
-
"node-inspect/lib/_inspect": ">= 7.6 && < 12",
|
|
9497
|
-
"node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
|
|
9498
|
-
"node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
|
|
9499
|
-
os: true,
|
|
9500
|
-
"node:os": [">= 14.18 && < 15", ">= 16"],
|
|
9501
|
-
path: true,
|
|
9502
|
-
"node:path": [">= 14.18 && < 15", ">= 16"],
|
|
9503
|
-
"path/posix": ">= 15.3",
|
|
9504
|
-
"node:path/posix": ">= 16",
|
|
9505
|
-
"path/win32": ">= 15.3",
|
|
9506
|
-
"node:path/win32": ">= 16",
|
|
9507
|
-
perf_hooks: ">= 8.5",
|
|
9508
|
-
"node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
|
|
9509
|
-
process: ">= 1",
|
|
9510
|
-
"node:process": [">= 14.18 && < 15", ">= 16"],
|
|
9511
|
-
punycode: ">= 0.5",
|
|
9512
|
-
"node:punycode": [">= 14.18 && < 15", ">= 16"],
|
|
9513
|
-
querystring: true,
|
|
9514
|
-
"node:querystring": [">= 14.18 && < 15", ">= 16"],
|
|
9515
|
-
readline: true,
|
|
9516
|
-
"node:readline": [">= 14.18 && < 15", ">= 16"],
|
|
9517
|
-
"readline/promises": ">= 17",
|
|
9518
|
-
"node:readline/promises": ">= 17",
|
|
9519
|
-
repl: true,
|
|
9520
|
-
"node:repl": [">= 14.18 && < 15", ">= 16"],
|
|
9521
|
-
smalloc: ">= 0.11.5 && < 3",
|
|
9522
|
-
_stream_duplex: ">= 0.9.4",
|
|
9523
|
-
"node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
|
|
9524
|
-
_stream_transform: ">= 0.9.4",
|
|
9525
|
-
"node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
|
|
9526
|
-
_stream_wrap: ">= 1.4.1",
|
|
9527
|
-
"node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
|
|
9528
|
-
_stream_passthrough: ">= 0.9.4",
|
|
9529
|
-
"node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
|
|
9530
|
-
_stream_readable: ">= 0.9.4",
|
|
9531
|
-
"node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
|
|
9532
|
-
_stream_writable: ">= 0.9.4",
|
|
9533
|
-
"node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
|
|
9534
|
-
stream: true,
|
|
9535
|
-
"node:stream": [">= 14.18 && < 15", ">= 16"],
|
|
9536
|
-
"stream/consumers": ">= 16.7",
|
|
9537
|
-
"node:stream/consumers": ">= 16.7",
|
|
9538
|
-
"stream/promises": ">= 15",
|
|
9539
|
-
"node:stream/promises": ">= 16",
|
|
9540
|
-
"stream/web": ">= 16.5",
|
|
9541
|
-
"node:stream/web": ">= 16.5",
|
|
9542
|
-
string_decoder: true,
|
|
9543
|
-
"node:string_decoder": [">= 14.18 && < 15", ">= 16"],
|
|
9544
|
-
sys: [">= 0.4 && < 0.7", ">= 0.8"],
|
|
9545
|
-
"node:sys": [">= 14.18 && < 15", ">= 16"],
|
|
9546
|
-
"test/reporters": ">= 19.9 && < 20.2",
|
|
9547
|
-
"node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"],
|
|
9548
|
-
"node:test": [">= 16.17 && < 17", ">= 18"],
|
|
9549
|
-
timers: true,
|
|
9550
|
-
"node:timers": [">= 14.18 && < 15", ">= 16"],
|
|
9551
|
-
"timers/promises": ">= 15",
|
|
9552
|
-
"node:timers/promises": ">= 16",
|
|
9553
|
-
_tls_common: ">= 0.11.13",
|
|
9554
|
-
"node:_tls_common": [">= 14.18 && < 15", ">= 16"],
|
|
9555
|
-
_tls_legacy: ">= 0.11.3 && < 10",
|
|
9556
|
-
_tls_wrap: ">= 0.11.3",
|
|
9557
|
-
"node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
|
|
9558
|
-
tls: true,
|
|
9559
|
-
"node:tls": [">= 14.18 && < 15", ">= 16"],
|
|
9560
|
-
trace_events: ">= 10",
|
|
9561
|
-
"node:trace_events": [">= 14.18 && < 15", ">= 16"],
|
|
9562
|
-
tty: true,
|
|
9563
|
-
"node:tty": [">= 14.18 && < 15", ">= 16"],
|
|
9564
|
-
url: true,
|
|
9565
|
-
"node:url": [">= 14.18 && < 15", ">= 16"],
|
|
9566
|
-
util: true,
|
|
9567
|
-
"node:util": [">= 14.18 && < 15", ">= 16"],
|
|
9568
|
-
"util/types": ">= 15.3",
|
|
9569
|
-
"node:util/types": ">= 16",
|
|
9570
|
-
"v8/tools/arguments": ">= 10 && < 12",
|
|
9571
|
-
"v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
|
9572
|
-
"v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
|
9573
|
-
"v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
|
9574
|
-
"v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
|
9575
|
-
"v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
|
9576
|
-
"v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
|
9577
|
-
v8: ">= 1",
|
|
9578
|
-
"node:v8": [">= 14.18 && < 15", ">= 16"],
|
|
9579
|
-
vm: true,
|
|
9580
|
-
"node:vm": [">= 14.18 && < 15", ">= 16"],
|
|
9581
|
-
wasi: [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"],
|
|
9582
|
-
"node:wasi": [">= 18.17 && < 19", ">= 20"],
|
|
9583
|
-
worker_threads: ">= 11.7",
|
|
9584
|
-
"node:worker_threads": [">= 14.18 && < 15", ">= 16"],
|
|
9585
|
-
zlib: ">= 0.5",
|
|
9586
|
-
"node:zlib": [">= 14.18 && < 15", ">= 16"]
|
|
9587
|
-
};
|
|
9588
|
-
}
|
|
9589
|
-
});
|
|
9590
|
-
var require_is_core_module = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
9591
|
-
"../../node_modules/.pnpm/is-core-module@2.13.1/node_modules/is-core-module/index.js"(exports, module2) {
|
|
9592
|
-
"use strict";
|
|
9593
|
-
var hasOwn = require_hasown();
|
|
9594
|
-
function specifierIncluded(current, specifier) {
|
|
9595
|
-
var nodeParts = current.split(".");
|
|
9596
|
-
var parts = specifier.split(" ");
|
|
9597
|
-
var op = parts.length > 1 ? parts[0] : "=";
|
|
9598
|
-
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split(".");
|
|
9599
|
-
for (var i = 0; i < 3; ++i) {
|
|
9600
|
-
var cur = parseInt(nodeParts[i] || 0, 10);
|
|
9601
|
-
var ver = parseInt(versionParts[i] || 0, 10);
|
|
9602
|
-
if (cur === ver) {
|
|
9603
|
-
continue;
|
|
9604
|
-
}
|
|
9605
|
-
if (op === "<") {
|
|
9606
|
-
return cur < ver;
|
|
9607
|
-
}
|
|
9608
|
-
if (op === ">=") {
|
|
9609
|
-
return cur >= ver;
|
|
9610
|
-
}
|
|
9611
|
-
return false;
|
|
9612
|
-
}
|
|
9613
|
-
return op === ">=";
|
|
9614
|
-
}
|
|
9615
|
-
function matchesRange(current, range) {
|
|
9616
|
-
var specifiers = range.split(/ ?&& ?/);
|
|
9617
|
-
if (specifiers.length === 0) {
|
|
9618
|
-
return false;
|
|
9619
|
-
}
|
|
9620
|
-
for (var i = 0; i < specifiers.length; ++i) {
|
|
9621
|
-
if (!specifierIncluded(current, specifiers[i])) {
|
|
9622
|
-
return false;
|
|
9623
|
-
}
|
|
9624
|
-
}
|
|
9625
|
-
return true;
|
|
9626
|
-
}
|
|
9627
|
-
function versionIncluded(nodeVersion, specifierValue) {
|
|
9628
|
-
if (typeof specifierValue === "boolean") {
|
|
9629
|
-
return specifierValue;
|
|
9630
|
-
}
|
|
9631
|
-
var current = typeof nodeVersion === "undefined" ? process.versions && process.versions.node : nodeVersion;
|
|
9632
|
-
if (typeof current !== "string") {
|
|
9633
|
-
throw new TypeError(typeof nodeVersion === "undefined" ? "Unable to determine current node version" : "If provided, a valid node version is required");
|
|
9634
|
-
}
|
|
9635
|
-
if (specifierValue && typeof specifierValue === "object") {
|
|
9636
|
-
for (var i = 0; i < specifierValue.length; ++i) {
|
|
9637
|
-
if (matchesRange(current, specifierValue[i])) {
|
|
9638
|
-
return true;
|
|
9639
|
-
}
|
|
9640
|
-
}
|
|
9641
|
-
return false;
|
|
9642
|
-
}
|
|
9643
|
-
return matchesRange(current, specifierValue);
|
|
9644
|
-
}
|
|
9645
|
-
var data = require_core();
|
|
9646
|
-
module2.exports = function isCore(x, nodeVersion) {
|
|
9647
|
-
return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]);
|
|
9648
|
-
};
|
|
9649
|
-
}
|
|
9650
|
-
});
|
|
9651
7836
|
var require_extract_description = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
9652
|
-
"../../node_modules/.pnpm/normalize-package-data@6.0.
|
|
7837
|
+
"../../node_modules/.pnpm/normalize-package-data@6.0.2/node_modules/normalize-package-data/lib/extract_description.js"(exports, module2) {
|
|
9653
7838
|
"use strict";
|
|
9654
7839
|
module2.exports = extractDescription;
|
|
9655
7840
|
function extractDescription(d) {
|
|
@@ -9674,7 +7859,7 @@ var require_extract_description = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9674
7859
|
}
|
|
9675
7860
|
});
|
|
9676
7861
|
var require_typos = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
9677
|
-
"../../node_modules/.pnpm/normalize-package-data@6.0.
|
|
7862
|
+
"../../node_modules/.pnpm/normalize-package-data@6.0.2/node_modules/normalize-package-data/lib/typos.json"(exports, module2) {
|
|
9678
7863
|
module2.exports = {
|
|
9679
7864
|
topLevel: {
|
|
9680
7865
|
dependancies: "dependencies",
|
|
@@ -9703,13 +7888,13 @@ var require_typos = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9703
7888
|
}
|
|
9704
7889
|
});
|
|
9705
7890
|
var require_fixer = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
9706
|
-
"../../node_modules/.pnpm/normalize-package-data@6.0.
|
|
7891
|
+
"../../node_modules/.pnpm/normalize-package-data@6.0.2/node_modules/normalize-package-data/lib/fixer.js"(exports, module2) {
|
|
9707
7892
|
"use strict";
|
|
9708
7893
|
var isValidSemver = (0, import_chunk_ZB5NPOJW.require_valid)();
|
|
9709
7894
|
var cleanSemver = (0, import_chunk_ZB5NPOJW.require_clean)();
|
|
9710
7895
|
var validateLicense = require_validate_npm_package_license();
|
|
9711
|
-
var hostedGitInfo =
|
|
9712
|
-
var
|
|
7896
|
+
var hostedGitInfo = require_lib4();
|
|
7897
|
+
var moduleBuiltin = (0, import_chunk_2ESYSVXG.__require)("node:module");
|
|
9713
7898
|
var depTypes = ["dependencies", "devDependencies", "optionalDependencies"];
|
|
9714
7899
|
var extractDescription = require_extract_description();
|
|
9715
7900
|
var url = (0, import_chunk_2ESYSVXG.__require)("url");
|
|
@@ -9836,7 +8021,7 @@ var require_fixer = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9836
8021
|
}, this);
|
|
9837
8022
|
}
|
|
9838
8023
|
},
|
|
9839
|
-
fixDependencies: function(data
|
|
8024
|
+
fixDependencies: function(data) {
|
|
9840
8025
|
objectifyDeps(data, this.warn);
|
|
9841
8026
|
addOptionalDepsToDeps(data, this.warn);
|
|
9842
8027
|
this.fixBundleDependenciesField(data);
|
|
@@ -9920,7 +8105,7 @@ var require_fixer = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
9920
8105
|
data.name = data.name.trim();
|
|
9921
8106
|
}
|
|
9922
8107
|
ensureValidName(data.name, strict, options.allowLegacyCase);
|
|
9923
|
-
if (
|
|
8108
|
+
if (moduleBuiltin.builtinModules.includes(data.name)) {
|
|
9924
8109
|
this.warn("conflictingName", data.name);
|
|
9925
8110
|
}
|
|
9926
8111
|
},
|
|
@@ -10076,7 +8261,7 @@ var require_fixer = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10076
8261
|
}
|
|
10077
8262
|
return obj;
|
|
10078
8263
|
}
|
|
10079
|
-
function addOptionalDepsToDeps(data
|
|
8264
|
+
function addOptionalDepsToDeps(data) {
|
|
10080
8265
|
var o = data.optionalDependencies;
|
|
10081
8266
|
if (!o) {
|
|
10082
8267
|
return;
|
|
@@ -10134,7 +8319,7 @@ var require_fixer = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10134
8319
|
}
|
|
10135
8320
|
});
|
|
10136
8321
|
var require_warning_messages = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
10137
|
-
"../../node_modules/.pnpm/normalize-package-data@6.0.
|
|
8322
|
+
"../../node_modules/.pnpm/normalize-package-data@6.0.2/node_modules/normalize-package-data/lib/warning_messages.json"(exports, module2) {
|
|
10138
8323
|
module2.exports = {
|
|
10139
8324
|
repositories: "'repositories' (plural) Not supported. Please pick one as the 'repository' field",
|
|
10140
8325
|
missingRepository: "No repository field.",
|
|
@@ -10168,7 +8353,7 @@ var require_warning_messages = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10168
8353
|
}
|
|
10169
8354
|
});
|
|
10170
8355
|
var require_make_warning = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
10171
|
-
"../../node_modules/.pnpm/normalize-package-data@6.0.
|
|
8356
|
+
"../../node_modules/.pnpm/normalize-package-data@6.0.2/node_modules/normalize-package-data/lib/make_warning.js"(exports, module2) {
|
|
10172
8357
|
"use strict";
|
|
10173
8358
|
var util = (0, import_chunk_2ESYSVXG.__require)("util");
|
|
10174
8359
|
var messages = require_warning_messages();
|
|
@@ -10193,7 +8378,7 @@ var require_make_warning = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10193
8378
|
}
|
|
10194
8379
|
});
|
|
10195
8380
|
var require_normalize = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
10196
|
-
"../../node_modules/.pnpm/normalize-package-data@6.0.
|
|
8381
|
+
"../../node_modules/.pnpm/normalize-package-data@6.0.2/node_modules/normalize-package-data/lib/normalize.js"(exports, module2) {
|
|
10197
8382
|
"use strict";
|
|
10198
8383
|
module2.exports = normalize;
|
|
10199
8384
|
var fixer = require_fixer();
|
|
@@ -10229,7 +8414,7 @@ var require_normalize = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10229
8414
|
strict = false;
|
|
10230
8415
|
}
|
|
10231
8416
|
if (!warn || data.private) {
|
|
10232
|
-
warn = function(
|
|
8417
|
+
warn = function() {
|
|
10233
8418
|
};
|
|
10234
8419
|
}
|
|
10235
8420
|
if (data.scripts && data.scripts.install === "node-gyp rebuild" && !data.scripts.preinstall) {
|
|
@@ -10339,7 +8524,7 @@ var require_package = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
|
10339
8524
|
"@prisma/generator": "workspace:*",
|
|
10340
8525
|
"@prisma/generator-helper": "workspace:*",
|
|
10341
8526
|
"@prisma/get-platform": "workspace:*",
|
|
10342
|
-
"@prisma/prisma-schema-wasm": "6.6.0-
|
|
8527
|
+
"@prisma/prisma-schema-wasm": "6.6.0-26.47cb872770bc2c9ff45909bd09f7326df36d9130",
|
|
10343
8528
|
"@prisma/schema-files-loader": "workspace:*",
|
|
10344
8529
|
arg: "5.0.2",
|
|
10345
8530
|
prompts: "2.4.2"
|
|
@@ -10367,8 +8552,9 @@ async function findUp(name, {
|
|
|
10367
8552
|
let directory = import_node_path2.default.resolve(toPath(cwd) ?? "");
|
|
10368
8553
|
const { root } = import_node_path2.default.parse(directory);
|
|
10369
8554
|
stopAt = import_node_path2.default.resolve(directory, toPath(stopAt ?? root));
|
|
10370
|
-
|
|
10371
|
-
|
|
8555
|
+
const isAbsoluteName = import_node_path2.default.isAbsolute(name);
|
|
8556
|
+
while (directory) {
|
|
8557
|
+
const filePath = isAbsoluteName ? name : import_node_path2.default.join(directory, name);
|
|
10372
8558
|
try {
|
|
10373
8559
|
const stats = await import_promises.default.stat(filePath);
|
|
10374
8560
|
if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) {
|
|
@@ -10376,10 +8562,13 @@ async function findUp(name, {
|
|
|
10376
8562
|
}
|
|
10377
8563
|
} catch {
|
|
10378
8564
|
}
|
|
8565
|
+
if (directory === stopAt || directory === root) {
|
|
8566
|
+
break;
|
|
8567
|
+
}
|
|
10379
8568
|
directory = import_node_path2.default.dirname(directory);
|
|
10380
8569
|
}
|
|
10381
8570
|
}
|
|
10382
|
-
var import_code_frame = (0, import_chunk_2ESYSVXG.__toESM)(
|
|
8571
|
+
var import_code_frame = (0, import_chunk_2ESYSVXG.__toESM)(require_lib3(), 1);
|
|
10383
8572
|
var safeLastIndexOf = (string, searchString, index) => index < 0 ? -1 : string.lastIndexOf(searchString, index);
|
|
10384
8573
|
function getPosition(text, textIndex) {
|
|
10385
8574
|
const lineBreakBefore = safeLastIndexOf(text, "\n", textIndex - 1);
|
|
@@ -10391,6 +8580,12 @@ function getPosition(text, textIndex) {
|
|
|
10391
8580
|
return { line, column };
|
|
10392
8581
|
}
|
|
10393
8582
|
function indexToLineColumn(text, textIndex, { oneBased = false } = {}) {
|
|
8583
|
+
if (typeof text !== "string") {
|
|
8584
|
+
throw new TypeError("Text parameter should be a string");
|
|
8585
|
+
}
|
|
8586
|
+
if (!Number.isInteger(textIndex)) {
|
|
8587
|
+
throw new TypeError("Index parameter should be an integer");
|
|
8588
|
+
}
|
|
10394
8589
|
if (textIndex < 0 || textIndex >= text.length && text.length > 0) {
|
|
10395
8590
|
throw new RangeError("Index out of bounds");
|
|
10396
8591
|
}
|
|
@@ -10401,17 +8596,28 @@ var getCodePoint = (character) => `\\u{${character.codePointAt(0).toString(16)}}
|
|
|
10401
8596
|
var JSONError = class _JSONError extends Error {
|
|
10402
8597
|
name = "JSONError";
|
|
10403
8598
|
fileName;
|
|
10404
|
-
|
|
10405
|
-
|
|
8599
|
+
#input;
|
|
8600
|
+
#jsonParseError;
|
|
10406
8601
|
#message;
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
8602
|
+
#codeFrame;
|
|
8603
|
+
#rawCodeFrame;
|
|
8604
|
+
constructor(messageOrOptions) {
|
|
8605
|
+
if (typeof messageOrOptions === "string") {
|
|
8606
|
+
super();
|
|
8607
|
+
this.#message = messageOrOptions;
|
|
8608
|
+
} else {
|
|
8609
|
+
const { jsonParseError, fileName, input } = messageOrOptions;
|
|
8610
|
+
super(void 0, { cause: jsonParseError });
|
|
8611
|
+
this.#input = input;
|
|
8612
|
+
this.#jsonParseError = jsonParseError;
|
|
8613
|
+
this.fileName = fileName;
|
|
8614
|
+
}
|
|
10410
8615
|
Error.captureStackTrace?.(this, _JSONError);
|
|
10411
8616
|
}
|
|
10412
8617
|
get message() {
|
|
10413
|
-
|
|
10414
|
-
|
|
8618
|
+
this.#message ??= `${addCodePointToUnexpectedToken(this.#jsonParseError.message)}${this.#input === "" ? " while parsing empty string" : ""}`;
|
|
8619
|
+
const { codeFrame } = this;
|
|
8620
|
+
return `${this.#message}${this.fileName ? ` in ${this.fileName}` : ""}${codeFrame ? `
|
|
10415
8621
|
|
|
10416
8622
|
${codeFrame}
|
|
10417
8623
|
` : ""}`;
|
|
@@ -10419,8 +8625,32 @@ ${codeFrame}
|
|
|
10419
8625
|
set message(message) {
|
|
10420
8626
|
this.#message = message;
|
|
10421
8627
|
}
|
|
8628
|
+
#getCodeFrame(highlightCode) {
|
|
8629
|
+
if (!this.#jsonParseError) {
|
|
8630
|
+
return;
|
|
8631
|
+
}
|
|
8632
|
+
const input = this.#input;
|
|
8633
|
+
const location = getErrorLocation(input, this.#jsonParseError.message);
|
|
8634
|
+
if (!location) {
|
|
8635
|
+
return;
|
|
8636
|
+
}
|
|
8637
|
+
return (0, import_code_frame.codeFrameColumns)(input, { start: location }, { highlightCode });
|
|
8638
|
+
}
|
|
8639
|
+
get codeFrame() {
|
|
8640
|
+
this.#codeFrame ??= this.#getCodeFrame(
|
|
8641
|
+
/* highlightCode */
|
|
8642
|
+
true
|
|
8643
|
+
);
|
|
8644
|
+
return this.#codeFrame;
|
|
8645
|
+
}
|
|
8646
|
+
get rawCodeFrame() {
|
|
8647
|
+
this.#rawCodeFrame ??= this.#getCodeFrame(
|
|
8648
|
+
/* highlightCode */
|
|
8649
|
+
false
|
|
8650
|
+
);
|
|
8651
|
+
return this.#rawCodeFrame;
|
|
8652
|
+
}
|
|
10422
8653
|
};
|
|
10423
|
-
var generateCodeFrame = (string, location, highlightCode = true) => (0, import_code_frame.codeFrameColumns)(string, { start: location }, { highlightCode });
|
|
10424
8654
|
var getErrorLocation = (string, message) => {
|
|
10425
8655
|
const match = message.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/);
|
|
10426
8656
|
if (!match) {
|
|
@@ -10447,31 +8677,15 @@ function parseJson(string, reviver, fileName) {
|
|
|
10447
8677
|
fileName = reviver;
|
|
10448
8678
|
reviver = void 0;
|
|
10449
8679
|
}
|
|
10450
|
-
let message;
|
|
10451
8680
|
try {
|
|
10452
8681
|
return JSON.parse(string, reviver);
|
|
10453
8682
|
} catch (error) {
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
message = addCodePointToUnexpectedToken(message);
|
|
10460
|
-
} else {
|
|
10461
|
-
message += " while parsing empty string";
|
|
10462
|
-
}
|
|
10463
|
-
const jsonError = new JSONError(message);
|
|
10464
|
-
jsonError.fileName = fileName;
|
|
10465
|
-
if (location) {
|
|
10466
|
-
jsonError.codeFrame = generateCodeFrame(string, location);
|
|
10467
|
-
jsonError.rawCodeFrame = generateCodeFrame(
|
|
10468
|
-
string,
|
|
10469
|
-
location,
|
|
10470
|
-
/* highlightCode */
|
|
10471
|
-
false
|
|
10472
|
-
);
|
|
8683
|
+
throw new JSONError({
|
|
8684
|
+
jsonParseError: error,
|
|
8685
|
+
fileName,
|
|
8686
|
+
input: string
|
|
8687
|
+
});
|
|
10473
8688
|
}
|
|
10474
|
-
throw jsonError;
|
|
10475
8689
|
}
|
|
10476
8690
|
var import_normalize_package_data = (0, import_chunk_2ESYSVXG.__toESM)(require_normalize(), 1);
|
|
10477
8691
|
function toPath2(urlOrPath) {
|
|
@@ -10985,15 +9199,16 @@ function renderLookupError(error) {
|
|
|
10985
9199
|
function renderDefaultLookupError(error, cwd) {
|
|
10986
9200
|
const parts = [
|
|
10987
9201
|
`Could not find Prisma Schema that is required for this command.`,
|
|
10988
|
-
`You can either provide it with ${(0, import_chunk_SKRR5WT4.green)(
|
|
10989
|
-
|
|
10990
|
-
|
|
9202
|
+
`You can either provide it with ${(0, import_chunk_SKRR5WT4.green)("`--schema`")} argument,`,
|
|
9203
|
+
`set it in your ${(0, import_chunk_SKRR5WT4.green)("`prisma.config.ts`")},`,
|
|
9204
|
+
`set it as ${(0, import_chunk_SKRR5WT4.green)("`prisma.schema`")} in your ${(0, import_chunk_SKRR5WT4.green)("package.json")},`,
|
|
9205
|
+
`or put it into the default location (${(0, import_chunk_SKRR5WT4.green)("`./prisma/schema.prisma`")}, or ${(0, import_chunk_SKRR5WT4.green)("`./schema.prisma`")}.`,
|
|
10991
9206
|
"Checked following paths:\n"
|
|
10992
9207
|
];
|
|
10993
9208
|
const printedPaths = /* @__PURE__ */ new Set();
|
|
10994
9209
|
for (const failure of error.failures) {
|
|
10995
|
-
const filePath = failure.
|
|
10996
|
-
if (!printedPaths.has(failure.
|
|
9210
|
+
const filePath = failure.path;
|
|
9211
|
+
if (!printedPaths.has(failure.path)) {
|
|
10997
9212
|
parts.push(`${import_path2.default.relative(cwd, filePath)}: ${renderLookupError(failure.error)}`);
|
|
10998
9213
|
printedPaths.add(filePath);
|
|
10999
9214
|
}
|
|
@@ -11019,21 +9234,13 @@ async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
|
|
|
11019
9234
|
error: { kind: "PrismaConfigNotConfigured" }
|
|
11020
9235
|
};
|
|
11021
9236
|
}
|
|
11022
|
-
|
|
11023
|
-
if (
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
}
|
|
11030
|
-
} else {
|
|
11031
|
-
schemaResult = await readSchemaFromDirectory(schemaPathFromConfig.folderPath);
|
|
11032
|
-
if (!schemaResult.ok) {
|
|
11033
|
-
throw new Error(
|
|
11034
|
-
`Could not load schema from folder \`${schemaPathFromConfig.folderPath}\` provided by "prisma.config.ts"\`: ${renderLookupError(schemaResult.error)}`
|
|
11035
|
-
);
|
|
11036
|
-
}
|
|
9237
|
+
const schemaResult = await readSchemaFromFileOrDirectory(schemaPathFromConfig);
|
|
9238
|
+
if (!schemaResult.ok) {
|
|
9239
|
+
throw new Error(
|
|
9240
|
+
`Could not load schema from \`${schemaPathFromConfig}\` provided by "prisma.config.ts"\`: ${renderLookupError(
|
|
9241
|
+
schemaResult.error
|
|
9242
|
+
)}`
|
|
9243
|
+
);
|
|
11037
9244
|
}
|
|
11038
9245
|
return schemaResult;
|
|
11039
9246
|
}
|
|
@@ -11068,51 +9275,14 @@ async function getSchemaFromPackageJson(cwd) {
|
|
|
11068
9275
|
return lookupResult;
|
|
11069
9276
|
}
|
|
11070
9277
|
async function getDefaultSchema(cwd, failures = []) {
|
|
11071
|
-
const
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11075
|
-
}
|
|
11076
|
-
};
|
|
11077
|
-
const prismaSchemaFile = {
|
|
11078
|
-
schemaPath: {
|
|
11079
|
-
path: import_path2.default.join(cwd, "prisma", "schema.prisma"),
|
|
11080
|
-
kind: "file"
|
|
11081
|
-
},
|
|
11082
|
-
conflictsWith: {
|
|
11083
|
-
path: import_path2.default.join(cwd, "prisma", "schema"),
|
|
11084
|
-
kind: "directory"
|
|
11085
|
-
}
|
|
11086
|
-
};
|
|
11087
|
-
const prismaSchemaFolder = {
|
|
11088
|
-
schemaPath: {
|
|
11089
|
-
path: import_path2.default.join(cwd, "prisma", "schema"),
|
|
11090
|
-
kind: "directory"
|
|
11091
|
-
},
|
|
11092
|
-
conflictsWith: {
|
|
11093
|
-
path: import_path2.default.join(cwd, "prisma", "schema.prisma"),
|
|
11094
|
-
kind: "file"
|
|
11095
|
-
}
|
|
11096
|
-
};
|
|
11097
|
-
const rules = [schemaPrisma, prismaSchemaFile, prismaSchemaFolder];
|
|
11098
|
-
for (const rule of rules) {
|
|
11099
|
-
debug2(`Checking existence of ${rule.schemaPath.path}`);
|
|
11100
|
-
const schema = await loadSchemaFromDefaultLocation(rule.schemaPath);
|
|
9278
|
+
const lookupPaths = [import_path2.default.join(cwd, "schema.prisma"), import_path2.default.join(cwd, "prisma", "schema.prisma")];
|
|
9279
|
+
for (const path7 of lookupPaths) {
|
|
9280
|
+
debug2(`Checking existence of ${path7}`);
|
|
9281
|
+
const schema = await readSchemaFromSingleFile(path7);
|
|
11101
9282
|
if (!schema.ok) {
|
|
11102
|
-
failures.push({
|
|
9283
|
+
failures.push({ path: path7, error: schema.error });
|
|
11103
9284
|
continue;
|
|
11104
9285
|
}
|
|
11105
|
-
if (rule.conflictsWith) {
|
|
11106
|
-
const conflictingSchema = await loadSchemaFromDefaultLocation(rule.conflictsWith);
|
|
11107
|
-
if (conflictingSchema.ok) {
|
|
11108
|
-
throw new Error(
|
|
11109
|
-
`Found Prisma Schemas at both \`${import_path2.default.relative(cwd, rule.schemaPath.path)}\` and \`${import_path2.default.relative(
|
|
11110
|
-
cwd,
|
|
11111
|
-
rule.conflictsWith.path
|
|
11112
|
-
)}\`. Please remove one.`
|
|
11113
|
-
);
|
|
11114
|
-
}
|
|
11115
|
-
}
|
|
11116
9286
|
return schema;
|
|
11117
9287
|
}
|
|
11118
9288
|
return {
|
|
@@ -11123,14 +9293,6 @@ async function getDefaultSchema(cwd, failures = []) {
|
|
|
11123
9293
|
}
|
|
11124
9294
|
};
|
|
11125
9295
|
}
|
|
11126
|
-
async function loadSchemaFromDefaultLocation(lookupPath) {
|
|
11127
|
-
switch (lookupPath.kind) {
|
|
11128
|
-
case "file":
|
|
11129
|
-
return readSchemaFromSingleFile(lookupPath.path);
|
|
11130
|
-
case "directory":
|
|
11131
|
-
return readSchemaFromDirectory(lookupPath.path);
|
|
11132
|
-
}
|
|
11133
|
-
}
|
|
11134
9296
|
var debug3 = (0, import_debug.default)("prisma:migrate:diff");
|
|
11135
9297
|
var helpOptions = (0, import_internals.format)(
|
|
11136
9298
|
`${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|