@prisma/internals 6.6.0-integration-mcp.2 → 6.6.0-integration-push-xmzqvqxpztks.12
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/Generator.d.ts +23 -5
- package/dist/Generator.js +4 -2
- package/dist/{chunk-2LDG4PID.js → chunk-2QTAK7KO.js} +5 -5
- package/dist/{chunk-SAAMENIS.js → chunk-3DQANJMY.js} +7 -7
- package/dist/{chunk-MEOOYUIZ.js → chunk-5AI4FIZ3.js} +10 -10
- package/dist/{chunk-WOIJKMTZ.js → chunk-62LU4TVK.js} +8 -8
- package/dist/{chunk-4KCLNFE4.js → chunk-62PNTFVL.js} +5 -5
- package/dist/{chunk-URRVX2VQ.js → chunk-67I7CEQJ.js} +6 -6
- package/dist/{chunk-GV244NDE.js → chunk-72C2UHFB.js} +7 -7
- package/dist/{chunk-UB2X7DGZ.js → chunk-75BIJ5PX.js} +9 -9
- package/dist/{chunk-R45GQNKO.js → chunk-BD2NGNRL.js} +85 -200
- package/dist/{chunk-DYVL6P7F.js → chunk-BPDMLM32.js} +46 -13
- package/dist/{chunk-ORPBIAE5.js → chunk-BTAROFR3.js} +8 -8
- package/dist/{chunk-PING5S2U.js → chunk-BWPH7QBV.js} +8 -8
- package/dist/{chunk-IRWX4FCC.js → chunk-D4VDA2TZ.js} +6 -6
- package/dist/{chunk-EKESIUIK.js → chunk-DKSUHQGA.js} +7 -7
- package/dist/{chunk-2I3VYCA7.js → chunk-EPXBOIA5.js} +5 -5
- package/dist/{chunk-WF5LZFJS.js → chunk-ETYWYJBX.js} +12 -12
- package/dist/{chunk-AXD7KB4D.js → chunk-HG3YOAAE.js} +5 -5
- package/dist/{chunk-IWTEX7EE.js → chunk-IDINCQMN.js} +780 -9
- package/dist/{chunk-2LOGW45F.js → chunk-JOIIWB3U.js} +33 -68
- package/dist/{chunk-3GYXMWBM.js → chunk-KB5DKCI4.js} +7 -7
- package/dist/{chunk-VTJOX6HO.js → chunk-LVXOY25I.js} +5 -5
- package/dist/{chunk-R4ZFFYJA.js → chunk-MJIP3FY5.js} +2502 -238
- package/dist/{chunk-XRBOJLES.js → chunk-MM2LGTOC.js} +5 -6
- package/dist/{chunk-FAPPXX7W.js → chunk-MVXDMOUP.js} +8 -8
- package/dist/{chunk-KNNTV7IN.js → chunk-NVNI2SRU.js} +213 -687
- package/dist/{chunk-VYJSNZF3.js → chunk-P3WMSDK6.js} +4 -5
- package/dist/{chunk-SNSJWJTA.js → chunk-R3ZRLDO2.js} +5 -5
- package/dist/{chunk-XMVJRTN5.js → chunk-RTT3E5AL.js} +5 -5
- package/dist/{chunk-PWGQKUJW.js → chunk-SDEBGULW.js} +85 -200
- package/dist/{chunk-MXAUURHG.js → chunk-TQFONRJP.js} +5 -5
- package/dist/{chunk-RABVZXRU.js → chunk-TURIBUFP.js} +7 -7
- package/dist/{chunk-5CBAXTAF.js → chunk-UKGGGBT7.js} +5 -5
- package/dist/{chunk-LWBLVV7Y.js → chunk-VEXYKK6K.js} +8 -8
- package/dist/{chunk-Q2IBLC6D.js → chunk-VXSXRDY2.js} +5 -5
- package/dist/{chunk-AP52B62F.js → chunk-XAAXHLR3.js} +5 -5
- package/dist/{chunk-OUQPIJFQ.js → chunk-XARFXSI5.js} +5 -5
- package/dist/{chunk-SUOMIRLO.js → chunk-YR5KNFKN.js} +6 -6
- package/dist/{chunk-UFYFNNCN.js → chunk-Z5PI6LVB.js} +8 -8
- package/dist/cli/checkUnsupportedDataProxy.js +37 -44
- package/dist/cli/getSchema.js +40 -47
- package/dist/cli/hashes.js +37 -44
- package/dist/cli/schemaContext.js +37 -44
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +36 -43
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/getEngineVersion.js +6 -7
- package/dist/engine-commands/getEnginesMetaInfo.js +8 -9
- package/dist/engine-commands/index.js +47 -54
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.js +7 -7
- package/dist/errorReporting.js +6 -6
- package/dist/get-generators/getGenerators.d.ts +18 -9
- package/dist/get-generators/getGenerators.js +39 -46
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +3 -4
- package/dist/getPackedPackage.js +4 -5
- package/dist/index.d.ts +2 -4
- package/dist/index.js +80 -87
- package/dist/{multipart-parser-UV3WZSWW.js → multipart-parser-3AFJFP6K.js} +6 -6
- package/dist/resolveBinary.js +7 -8
- package/dist/resolvePkg.d.ts +7 -0
- package/dist/{get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js → resolvePkg.js} +6 -6
- package/dist/schemaEngineCommands.js +9 -10
- package/dist/sendPanic.js +4 -4
- package/dist/utils/cloudflareD1.js +3 -3
- package/dist/utils/fs-functional.js +10 -10
- package/dist/utils/fs-utils.js +8 -8
- package/dist/utils/getEnvPaths.js +36 -43
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +5 -5
- package/dist/utils/loadEnvFile.js +36 -43
- package/dist/wasm.js +4 -4
- package/package.json +11 -12
- package/dist/chunk-72UZXEBG.js +0 -28
- package/dist/chunk-BWGDP6B5.js +0 -4948
- package/dist/chunk-DYV47NUW.js +0 -796
- package/dist/chunk-EUTJYQDW.js +0 -46
- package/dist/chunk-GHHABGYW.js +0 -28
- package/dist/chunk-OQ2NRV2Y.js +0 -35
- package/dist/chunk-PE6DXWOX.js +0 -52
- package/dist/get-generators/generatorResolvers/generatorResolvers.d.ts +0 -15
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +0 -139
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +0 -6
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +0 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +0 -9
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +0 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +0 -8
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +0 -29
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +0 -6
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +0 -139
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +0 -1
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +0 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +0 -20
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +0 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +0 -7
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.d.ts +0 -1
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +0 -17
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +0 -20
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +0 -140
@@ -26,21 +26,20 @@ 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_MJIP3FY5_exports = {};
|
30
|
+
__export(chunk_MJIP3FY5_exports, {
|
31
31
|
getPackedPackage: () => getPackedPackage,
|
32
32
|
readPackageUp: () => readPackageUp,
|
33
33
|
require_p_map: () => require_p_map,
|
34
34
|
toPath: () => toPath2
|
35
35
|
});
|
36
|
-
module.exports = __toCommonJS(
|
37
|
-
var import_chunk_URRVX2VQ = require("./chunk-URRVX2VQ.js");
|
36
|
+
module.exports = __toCommonJS(chunk_MJIP3FY5_exports);
|
38
37
|
var import_chunk_KDP6C3CB = require("./chunk-KDP6C3CB.js");
|
39
38
|
var import_chunk_UZTXEBTM = require("./chunk-UZTXEBTM.js");
|
40
|
-
var
|
39
|
+
var import_chunk_JOIIWB3U = require("./chunk-JOIIWB3U.js");
|
40
|
+
var import_chunk_67I7CEQJ = require("./chunk-67I7CEQJ.js");
|
41
41
|
var import_chunk_MM4ARWWY = require("./chunk-MM4ARWWY.js");
|
42
42
|
var import_chunk_5VQNKCKW = require("./chunk-5VQNKCKW.js");
|
43
|
-
var import_chunk_DYV47NUW = require("./chunk-DYV47NUW.js");
|
44
43
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
45
44
|
var import_fs = __toESM(require("fs"));
|
46
45
|
var import_path = __toESM(require("path"));
|
@@ -3166,77 +3165,6 @@ var require_lib5 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
3166
3165
|
walk.Walker = Walker;
|
3167
3166
|
}
|
3168
3167
|
});
|
3169
|
-
var require_picocolors = (0, import_chunk_4VNS5WPM.__commonJS)({
|
3170
|
-
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module2) {
|
3171
|
-
"use strict";
|
3172
|
-
var p = process || {};
|
3173
|
-
var argv = p.argv || [];
|
3174
|
-
var env = p.env || {};
|
3175
|
-
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);
|
3176
|
-
var formatter = (open, close, replace = open) => (input) => {
|
3177
|
-
let string = "" + input, index = string.indexOf(close, open.length);
|
3178
|
-
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
3179
|
-
};
|
3180
|
-
var replaceClose = (string, close, replace, index) => {
|
3181
|
-
let result = "", cursor = 0;
|
3182
|
-
do {
|
3183
|
-
result += string.substring(cursor, index) + replace;
|
3184
|
-
cursor = index + close.length;
|
3185
|
-
index = string.indexOf(close, cursor);
|
3186
|
-
} while (~index);
|
3187
|
-
return result + string.substring(cursor);
|
3188
|
-
};
|
3189
|
-
var createColors = (enabled = isColorSupported) => {
|
3190
|
-
let f = enabled ? formatter : () => String;
|
3191
|
-
return {
|
3192
|
-
isColorSupported: enabled,
|
3193
|
-
reset: f("\x1B[0m", "\x1B[0m"),
|
3194
|
-
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
3195
|
-
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
3196
|
-
italic: f("\x1B[3m", "\x1B[23m"),
|
3197
|
-
underline: f("\x1B[4m", "\x1B[24m"),
|
3198
|
-
inverse: f("\x1B[7m", "\x1B[27m"),
|
3199
|
-
hidden: f("\x1B[8m", "\x1B[28m"),
|
3200
|
-
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
3201
|
-
black: f("\x1B[30m", "\x1B[39m"),
|
3202
|
-
red: f("\x1B[31m", "\x1B[39m"),
|
3203
|
-
green: f("\x1B[32m", "\x1B[39m"),
|
3204
|
-
yellow: f("\x1B[33m", "\x1B[39m"),
|
3205
|
-
blue: f("\x1B[34m", "\x1B[39m"),
|
3206
|
-
magenta: f("\x1B[35m", "\x1B[39m"),
|
3207
|
-
cyan: f("\x1B[36m", "\x1B[39m"),
|
3208
|
-
white: f("\x1B[37m", "\x1B[39m"),
|
3209
|
-
gray: f("\x1B[90m", "\x1B[39m"),
|
3210
|
-
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
3211
|
-
bgRed: f("\x1B[41m", "\x1B[49m"),
|
3212
|
-
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
3213
|
-
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
3214
|
-
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
3215
|
-
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
3216
|
-
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
3217
|
-
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
3218
|
-
blackBright: f("\x1B[90m", "\x1B[39m"),
|
3219
|
-
redBright: f("\x1B[91m", "\x1B[39m"),
|
3220
|
-
greenBright: f("\x1B[92m", "\x1B[39m"),
|
3221
|
-
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
3222
|
-
blueBright: f("\x1B[94m", "\x1B[39m"),
|
3223
|
-
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
3224
|
-
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
3225
|
-
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
3226
|
-
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
3227
|
-
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
3228
|
-
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
3229
|
-
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
3230
|
-
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
3231
|
-
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
3232
|
-
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
3233
|
-
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
3234
|
-
};
|
3235
|
-
};
|
3236
|
-
module2.exports = createColors();
|
3237
|
-
module2.exports.createColors = createColors;
|
3238
|
-
}
|
3239
|
-
});
|
3240
3168
|
var require_js_tokens = (0, import_chunk_4VNS5WPM.__commonJS)({
|
3241
3169
|
"../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js"(exports) {
|
3242
3170
|
"use strict";
|
@@ -3258,51 +3186,1587 @@ var require_js_tokens = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
3258
3186
|
};
|
3259
3187
|
}
|
3260
3188
|
});
|
3261
|
-
var
|
3262
|
-
"../../node_modules/.pnpm
|
3189
|
+
var require_escape_string_regexp = (0, import_chunk_4VNS5WPM.__commonJS)({
|
3190
|
+
"../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js"(exports, module2) {
|
3263
3191
|
"use strict";
|
3264
|
-
|
3265
|
-
|
3266
|
-
|
3267
|
-
|
3268
|
-
|
3269
|
-
return
|
3270
|
-
}
|
3271
|
-
|
3272
|
-
|
3192
|
+
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
3193
|
+
module2.exports = function(str) {
|
3194
|
+
if (typeof str !== "string") {
|
3195
|
+
throw new TypeError("Expected a string");
|
3196
|
+
}
|
3197
|
+
return str.replace(matchOperatorsRe, "\\$&");
|
3198
|
+
};
|
3199
|
+
}
|
3200
|
+
});
|
3201
|
+
var require_color_name = (0, import_chunk_4VNS5WPM.__commonJS)({
|
3202
|
+
"../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js"(exports, module2) {
|
3203
|
+
"use strict";
|
3204
|
+
module2.exports = {
|
3205
|
+
"aliceblue": [240, 248, 255],
|
3206
|
+
"antiquewhite": [250, 235, 215],
|
3207
|
+
"aqua": [0, 255, 255],
|
3208
|
+
"aquamarine": [127, 255, 212],
|
3209
|
+
"azure": [240, 255, 255],
|
3210
|
+
"beige": [245, 245, 220],
|
3211
|
+
"bisque": [255, 228, 196],
|
3212
|
+
"black": [0, 0, 0],
|
3213
|
+
"blanchedalmond": [255, 235, 205],
|
3214
|
+
"blue": [0, 0, 255],
|
3215
|
+
"blueviolet": [138, 43, 226],
|
3216
|
+
"brown": [165, 42, 42],
|
3217
|
+
"burlywood": [222, 184, 135],
|
3218
|
+
"cadetblue": [95, 158, 160],
|
3219
|
+
"chartreuse": [127, 255, 0],
|
3220
|
+
"chocolate": [210, 105, 30],
|
3221
|
+
"coral": [255, 127, 80],
|
3222
|
+
"cornflowerblue": [100, 149, 237],
|
3223
|
+
"cornsilk": [255, 248, 220],
|
3224
|
+
"crimson": [220, 20, 60],
|
3225
|
+
"cyan": [0, 255, 255],
|
3226
|
+
"darkblue": [0, 0, 139],
|
3227
|
+
"darkcyan": [0, 139, 139],
|
3228
|
+
"darkgoldenrod": [184, 134, 11],
|
3229
|
+
"darkgray": [169, 169, 169],
|
3230
|
+
"darkgreen": [0, 100, 0],
|
3231
|
+
"darkgrey": [169, 169, 169],
|
3232
|
+
"darkkhaki": [189, 183, 107],
|
3233
|
+
"darkmagenta": [139, 0, 139],
|
3234
|
+
"darkolivegreen": [85, 107, 47],
|
3235
|
+
"darkorange": [255, 140, 0],
|
3236
|
+
"darkorchid": [153, 50, 204],
|
3237
|
+
"darkred": [139, 0, 0],
|
3238
|
+
"darksalmon": [233, 150, 122],
|
3239
|
+
"darkseagreen": [143, 188, 143],
|
3240
|
+
"darkslateblue": [72, 61, 139],
|
3241
|
+
"darkslategray": [47, 79, 79],
|
3242
|
+
"darkslategrey": [47, 79, 79],
|
3243
|
+
"darkturquoise": [0, 206, 209],
|
3244
|
+
"darkviolet": [148, 0, 211],
|
3245
|
+
"deeppink": [255, 20, 147],
|
3246
|
+
"deepskyblue": [0, 191, 255],
|
3247
|
+
"dimgray": [105, 105, 105],
|
3248
|
+
"dimgrey": [105, 105, 105],
|
3249
|
+
"dodgerblue": [30, 144, 255],
|
3250
|
+
"firebrick": [178, 34, 34],
|
3251
|
+
"floralwhite": [255, 250, 240],
|
3252
|
+
"forestgreen": [34, 139, 34],
|
3253
|
+
"fuchsia": [255, 0, 255],
|
3254
|
+
"gainsboro": [220, 220, 220],
|
3255
|
+
"ghostwhite": [248, 248, 255],
|
3256
|
+
"gold": [255, 215, 0],
|
3257
|
+
"goldenrod": [218, 165, 32],
|
3258
|
+
"gray": [128, 128, 128],
|
3259
|
+
"green": [0, 128, 0],
|
3260
|
+
"greenyellow": [173, 255, 47],
|
3261
|
+
"grey": [128, 128, 128],
|
3262
|
+
"honeydew": [240, 255, 240],
|
3263
|
+
"hotpink": [255, 105, 180],
|
3264
|
+
"indianred": [205, 92, 92],
|
3265
|
+
"indigo": [75, 0, 130],
|
3266
|
+
"ivory": [255, 255, 240],
|
3267
|
+
"khaki": [240, 230, 140],
|
3268
|
+
"lavender": [230, 230, 250],
|
3269
|
+
"lavenderblush": [255, 240, 245],
|
3270
|
+
"lawngreen": [124, 252, 0],
|
3271
|
+
"lemonchiffon": [255, 250, 205],
|
3272
|
+
"lightblue": [173, 216, 230],
|
3273
|
+
"lightcoral": [240, 128, 128],
|
3274
|
+
"lightcyan": [224, 255, 255],
|
3275
|
+
"lightgoldenrodyellow": [250, 250, 210],
|
3276
|
+
"lightgray": [211, 211, 211],
|
3277
|
+
"lightgreen": [144, 238, 144],
|
3278
|
+
"lightgrey": [211, 211, 211],
|
3279
|
+
"lightpink": [255, 182, 193],
|
3280
|
+
"lightsalmon": [255, 160, 122],
|
3281
|
+
"lightseagreen": [32, 178, 170],
|
3282
|
+
"lightskyblue": [135, 206, 250],
|
3283
|
+
"lightslategray": [119, 136, 153],
|
3284
|
+
"lightslategrey": [119, 136, 153],
|
3285
|
+
"lightsteelblue": [176, 196, 222],
|
3286
|
+
"lightyellow": [255, 255, 224],
|
3287
|
+
"lime": [0, 255, 0],
|
3288
|
+
"limegreen": [50, 205, 50],
|
3289
|
+
"linen": [250, 240, 230],
|
3290
|
+
"magenta": [255, 0, 255],
|
3291
|
+
"maroon": [128, 0, 0],
|
3292
|
+
"mediumaquamarine": [102, 205, 170],
|
3293
|
+
"mediumblue": [0, 0, 205],
|
3294
|
+
"mediumorchid": [186, 85, 211],
|
3295
|
+
"mediumpurple": [147, 112, 219],
|
3296
|
+
"mediumseagreen": [60, 179, 113],
|
3297
|
+
"mediumslateblue": [123, 104, 238],
|
3298
|
+
"mediumspringgreen": [0, 250, 154],
|
3299
|
+
"mediumturquoise": [72, 209, 204],
|
3300
|
+
"mediumvioletred": [199, 21, 133],
|
3301
|
+
"midnightblue": [25, 25, 112],
|
3302
|
+
"mintcream": [245, 255, 250],
|
3303
|
+
"mistyrose": [255, 228, 225],
|
3304
|
+
"moccasin": [255, 228, 181],
|
3305
|
+
"navajowhite": [255, 222, 173],
|
3306
|
+
"navy": [0, 0, 128],
|
3307
|
+
"oldlace": [253, 245, 230],
|
3308
|
+
"olive": [128, 128, 0],
|
3309
|
+
"olivedrab": [107, 142, 35],
|
3310
|
+
"orange": [255, 165, 0],
|
3311
|
+
"orangered": [255, 69, 0],
|
3312
|
+
"orchid": [218, 112, 214],
|
3313
|
+
"palegoldenrod": [238, 232, 170],
|
3314
|
+
"palegreen": [152, 251, 152],
|
3315
|
+
"paleturquoise": [175, 238, 238],
|
3316
|
+
"palevioletred": [219, 112, 147],
|
3317
|
+
"papayawhip": [255, 239, 213],
|
3318
|
+
"peachpuff": [255, 218, 185],
|
3319
|
+
"peru": [205, 133, 63],
|
3320
|
+
"pink": [255, 192, 203],
|
3321
|
+
"plum": [221, 160, 221],
|
3322
|
+
"powderblue": [176, 224, 230],
|
3323
|
+
"purple": [128, 0, 128],
|
3324
|
+
"rebeccapurple": [102, 51, 153],
|
3325
|
+
"red": [255, 0, 0],
|
3326
|
+
"rosybrown": [188, 143, 143],
|
3327
|
+
"royalblue": [65, 105, 225],
|
3328
|
+
"saddlebrown": [139, 69, 19],
|
3329
|
+
"salmon": [250, 128, 114],
|
3330
|
+
"sandybrown": [244, 164, 96],
|
3331
|
+
"seagreen": [46, 139, 87],
|
3332
|
+
"seashell": [255, 245, 238],
|
3333
|
+
"sienna": [160, 82, 45],
|
3334
|
+
"silver": [192, 192, 192],
|
3335
|
+
"skyblue": [135, 206, 235],
|
3336
|
+
"slateblue": [106, 90, 205],
|
3337
|
+
"slategray": [112, 128, 144],
|
3338
|
+
"slategrey": [112, 128, 144],
|
3339
|
+
"snow": [255, 250, 250],
|
3340
|
+
"springgreen": [0, 255, 127],
|
3341
|
+
"steelblue": [70, 130, 180],
|
3342
|
+
"tan": [210, 180, 140],
|
3343
|
+
"teal": [0, 128, 128],
|
3344
|
+
"thistle": [216, 191, 216],
|
3345
|
+
"tomato": [255, 99, 71],
|
3346
|
+
"turquoise": [64, 224, 208],
|
3347
|
+
"violet": [238, 130, 238],
|
3348
|
+
"wheat": [245, 222, 179],
|
3349
|
+
"white": [255, 255, 255],
|
3350
|
+
"whitesmoke": [245, 245, 245],
|
3351
|
+
"yellow": [255, 255, 0],
|
3352
|
+
"yellowgreen": [154, 205, 50]
|
3353
|
+
};
|
3354
|
+
}
|
3355
|
+
});
|
3356
|
+
var require_conversions = (0, import_chunk_4VNS5WPM.__commonJS)({
|
3357
|
+
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js"(exports, module2) {
|
3358
|
+
"use strict";
|
3359
|
+
var cssKeywords = require_color_name();
|
3360
|
+
var reverseKeywords = {};
|
3361
|
+
for (key in cssKeywords) {
|
3362
|
+
if (cssKeywords.hasOwnProperty(key)) {
|
3363
|
+
reverseKeywords[cssKeywords[key]] = key;
|
3364
|
+
}
|
3365
|
+
}
|
3366
|
+
var key;
|
3367
|
+
var convert = module2.exports = {
|
3368
|
+
rgb: { channels: 3, labels: "rgb" },
|
3369
|
+
hsl: { channels: 3, labels: "hsl" },
|
3370
|
+
hsv: { channels: 3, labels: "hsv" },
|
3371
|
+
hwb: { channels: 3, labels: "hwb" },
|
3372
|
+
cmyk: { channels: 4, labels: "cmyk" },
|
3373
|
+
xyz: { channels: 3, labels: "xyz" },
|
3374
|
+
lab: { channels: 3, labels: "lab" },
|
3375
|
+
lch: { channels: 3, labels: "lch" },
|
3376
|
+
hex: { channels: 1, labels: ["hex"] },
|
3377
|
+
keyword: { channels: 1, labels: ["keyword"] },
|
3378
|
+
ansi16: { channels: 1, labels: ["ansi16"] },
|
3379
|
+
ansi256: { channels: 1, labels: ["ansi256"] },
|
3380
|
+
hcg: { channels: 3, labels: ["h", "c", "g"] },
|
3381
|
+
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
3382
|
+
gray: { channels: 1, labels: ["gray"] }
|
3383
|
+
};
|
3384
|
+
for (model in convert) {
|
3385
|
+
if (convert.hasOwnProperty(model)) {
|
3386
|
+
if (!("channels" in convert[model])) {
|
3387
|
+
throw new Error("missing channels property: " + model);
|
3388
|
+
}
|
3389
|
+
if (!("labels" in convert[model])) {
|
3390
|
+
throw new Error("missing channel labels property: " + model);
|
3391
|
+
}
|
3392
|
+
if (convert[model].labels.length !== convert[model].channels) {
|
3393
|
+
throw new Error("channel and label counts mismatch: " + model);
|
3394
|
+
}
|
3395
|
+
channels = convert[model].channels;
|
3396
|
+
labels = convert[model].labels;
|
3397
|
+
delete convert[model].channels;
|
3398
|
+
delete convert[model].labels;
|
3399
|
+
Object.defineProperty(convert[model], "channels", { value: channels });
|
3400
|
+
Object.defineProperty(convert[model], "labels", { value: labels });
|
3401
|
+
}
|
3402
|
+
}
|
3403
|
+
var channels;
|
3404
|
+
var labels;
|
3405
|
+
var model;
|
3406
|
+
convert.rgb.hsl = function(rgb) {
|
3407
|
+
var r = rgb[0] / 255;
|
3408
|
+
var g = rgb[1] / 255;
|
3409
|
+
var b = rgb[2] / 255;
|
3410
|
+
var min = Math.min(r, g, b);
|
3411
|
+
var max = Math.max(r, g, b);
|
3412
|
+
var delta = max - min;
|
3413
|
+
var h;
|
3414
|
+
var s;
|
3415
|
+
var l;
|
3416
|
+
if (max === min) {
|
3417
|
+
h = 0;
|
3418
|
+
} else if (r === max) {
|
3419
|
+
h = (g - b) / delta;
|
3420
|
+
} else if (g === max) {
|
3421
|
+
h = 2 + (b - r) / delta;
|
3422
|
+
} else if (b === max) {
|
3423
|
+
h = 4 + (r - g) / delta;
|
3424
|
+
}
|
3425
|
+
h = Math.min(h * 60, 360);
|
3426
|
+
if (h < 0) {
|
3427
|
+
h += 360;
|
3428
|
+
}
|
3429
|
+
l = (min + max) / 2;
|
3430
|
+
if (max === min) {
|
3431
|
+
s = 0;
|
3432
|
+
} else if (l <= 0.5) {
|
3433
|
+
s = delta / (max + min);
|
3434
|
+
} else {
|
3435
|
+
s = delta / (2 - max - min);
|
3436
|
+
}
|
3437
|
+
return [h, s * 100, l * 100];
|
3438
|
+
};
|
3439
|
+
convert.rgb.hsv = function(rgb) {
|
3440
|
+
var rdif;
|
3441
|
+
var gdif;
|
3442
|
+
var bdif;
|
3443
|
+
var h;
|
3444
|
+
var s;
|
3445
|
+
var r = rgb[0] / 255;
|
3446
|
+
var g = rgb[1] / 255;
|
3447
|
+
var b = rgb[2] / 255;
|
3448
|
+
var v = Math.max(r, g, b);
|
3449
|
+
var diff = v - Math.min(r, g, b);
|
3450
|
+
var diffc = function(c) {
|
3451
|
+
return (v - c) / 6 / diff + 1 / 2;
|
3452
|
+
};
|
3453
|
+
if (diff === 0) {
|
3454
|
+
h = s = 0;
|
3455
|
+
} else {
|
3456
|
+
s = diff / v;
|
3457
|
+
rdif = diffc(r);
|
3458
|
+
gdif = diffc(g);
|
3459
|
+
bdif = diffc(b);
|
3460
|
+
if (r === v) {
|
3461
|
+
h = bdif - gdif;
|
3462
|
+
} else if (g === v) {
|
3463
|
+
h = 1 / 3 + rdif - bdif;
|
3464
|
+
} else if (b === v) {
|
3465
|
+
h = 2 / 3 + gdif - rdif;
|
3466
|
+
}
|
3467
|
+
if (h < 0) {
|
3468
|
+
h += 1;
|
3469
|
+
} else if (h > 1) {
|
3470
|
+
h -= 1;
|
3471
|
+
}
|
3472
|
+
}
|
3473
|
+
return [
|
3474
|
+
h * 360,
|
3475
|
+
s * 100,
|
3476
|
+
v * 100
|
3477
|
+
];
|
3478
|
+
};
|
3479
|
+
convert.rgb.hwb = function(rgb) {
|
3480
|
+
var r = rgb[0];
|
3481
|
+
var g = rgb[1];
|
3482
|
+
var b = rgb[2];
|
3483
|
+
var h = convert.rgb.hsl(rgb)[0];
|
3484
|
+
var w = 1 / 255 * Math.min(r, Math.min(g, b));
|
3485
|
+
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
3486
|
+
return [h, w * 100, b * 100];
|
3487
|
+
};
|
3488
|
+
convert.rgb.cmyk = function(rgb) {
|
3489
|
+
var r = rgb[0] / 255;
|
3490
|
+
var g = rgb[1] / 255;
|
3491
|
+
var b = rgb[2] / 255;
|
3492
|
+
var c;
|
3493
|
+
var m;
|
3494
|
+
var y;
|
3495
|
+
var k;
|
3496
|
+
k = Math.min(1 - r, 1 - g, 1 - b);
|
3497
|
+
c = (1 - r - k) / (1 - k) || 0;
|
3498
|
+
m = (1 - g - k) / (1 - k) || 0;
|
3499
|
+
y = (1 - b - k) / (1 - k) || 0;
|
3500
|
+
return [c * 100, m * 100, y * 100, k * 100];
|
3501
|
+
};
|
3502
|
+
function comparativeDistance(x, y) {
|
3503
|
+
return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
|
3504
|
+
}
|
3505
|
+
convert.rgb.keyword = function(rgb) {
|
3506
|
+
var reversed = reverseKeywords[rgb];
|
3507
|
+
if (reversed) {
|
3508
|
+
return reversed;
|
3509
|
+
}
|
3510
|
+
var currentClosestDistance = Infinity;
|
3511
|
+
var currentClosestKeyword;
|
3512
|
+
for (var keyword in cssKeywords) {
|
3513
|
+
if (cssKeywords.hasOwnProperty(keyword)) {
|
3514
|
+
var value = cssKeywords[keyword];
|
3515
|
+
var distance = comparativeDistance(rgb, value);
|
3516
|
+
if (distance < currentClosestDistance) {
|
3517
|
+
currentClosestDistance = distance;
|
3518
|
+
currentClosestKeyword = keyword;
|
3519
|
+
}
|
3520
|
+
}
|
3521
|
+
}
|
3522
|
+
return currentClosestKeyword;
|
3523
|
+
};
|
3524
|
+
convert.keyword.rgb = function(keyword) {
|
3525
|
+
return cssKeywords[keyword];
|
3526
|
+
};
|
3527
|
+
convert.rgb.xyz = function(rgb) {
|
3528
|
+
var r = rgb[0] / 255;
|
3529
|
+
var g = rgb[1] / 255;
|
3530
|
+
var b = rgb[2] / 255;
|
3531
|
+
r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
|
3532
|
+
g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
|
3533
|
+
b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
|
3534
|
+
var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
|
3535
|
+
var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
|
3536
|
+
var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
|
3537
|
+
return [x * 100, y * 100, z * 100];
|
3538
|
+
};
|
3539
|
+
convert.rgb.lab = function(rgb) {
|
3540
|
+
var xyz = convert.rgb.xyz(rgb);
|
3541
|
+
var x = xyz[0];
|
3542
|
+
var y = xyz[1];
|
3543
|
+
var z = xyz[2];
|
3544
|
+
var l;
|
3545
|
+
var a;
|
3546
|
+
var b;
|
3547
|
+
x /= 95.047;
|
3548
|
+
y /= 100;
|
3549
|
+
z /= 108.883;
|
3550
|
+
x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
|
3551
|
+
y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
|
3552
|
+
z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
|
3553
|
+
l = 116 * y - 16;
|
3554
|
+
a = 500 * (x - y);
|
3555
|
+
b = 200 * (y - z);
|
3556
|
+
return [l, a, b];
|
3557
|
+
};
|
3558
|
+
convert.hsl.rgb = function(hsl) {
|
3559
|
+
var h = hsl[0] / 360;
|
3560
|
+
var s = hsl[1] / 100;
|
3561
|
+
var l = hsl[2] / 100;
|
3562
|
+
var t1;
|
3563
|
+
var t2;
|
3564
|
+
var t3;
|
3565
|
+
var rgb;
|
3566
|
+
var val;
|
3567
|
+
if (s === 0) {
|
3568
|
+
val = l * 255;
|
3569
|
+
return [val, val, val];
|
3570
|
+
}
|
3571
|
+
if (l < 0.5) {
|
3572
|
+
t2 = l * (1 + s);
|
3573
|
+
} else {
|
3574
|
+
t2 = l + s - l * s;
|
3575
|
+
}
|
3576
|
+
t1 = 2 * l - t2;
|
3577
|
+
rgb = [0, 0, 0];
|
3578
|
+
for (var i = 0; i < 3; i++) {
|
3579
|
+
t3 = h + 1 / 3 * -(i - 1);
|
3580
|
+
if (t3 < 0) {
|
3581
|
+
t3++;
|
3582
|
+
}
|
3583
|
+
if (t3 > 1) {
|
3584
|
+
t3--;
|
3585
|
+
}
|
3586
|
+
if (6 * t3 < 1) {
|
3587
|
+
val = t1 + (t2 - t1) * 6 * t3;
|
3588
|
+
} else if (2 * t3 < 1) {
|
3589
|
+
val = t2;
|
3590
|
+
} else if (3 * t3 < 2) {
|
3591
|
+
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
3592
|
+
} else {
|
3593
|
+
val = t1;
|
3594
|
+
}
|
3595
|
+
rgb[i] = val * 255;
|
3596
|
+
}
|
3597
|
+
return rgb;
|
3598
|
+
};
|
3599
|
+
convert.hsl.hsv = function(hsl) {
|
3600
|
+
var h = hsl[0];
|
3601
|
+
var s = hsl[1] / 100;
|
3602
|
+
var l = hsl[2] / 100;
|
3603
|
+
var smin = s;
|
3604
|
+
var lmin = Math.max(l, 0.01);
|
3605
|
+
var sv;
|
3606
|
+
var v;
|
3607
|
+
l *= 2;
|
3608
|
+
s *= l <= 1 ? l : 2 - l;
|
3609
|
+
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
3610
|
+
v = (l + s) / 2;
|
3611
|
+
sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
3612
|
+
return [h, sv * 100, v * 100];
|
3613
|
+
};
|
3614
|
+
convert.hsv.rgb = function(hsv) {
|
3615
|
+
var h = hsv[0] / 60;
|
3616
|
+
var s = hsv[1] / 100;
|
3617
|
+
var v = hsv[2] / 100;
|
3618
|
+
var hi = Math.floor(h) % 6;
|
3619
|
+
var f = h - Math.floor(h);
|
3620
|
+
var p = 255 * v * (1 - s);
|
3621
|
+
var q = 255 * v * (1 - s * f);
|
3622
|
+
var t = 255 * v * (1 - s * (1 - f));
|
3623
|
+
v *= 255;
|
3624
|
+
switch (hi) {
|
3625
|
+
case 0:
|
3626
|
+
return [v, t, p];
|
3627
|
+
case 1:
|
3628
|
+
return [q, v, p];
|
3629
|
+
case 2:
|
3630
|
+
return [p, v, t];
|
3631
|
+
case 3:
|
3632
|
+
return [p, q, v];
|
3633
|
+
case 4:
|
3634
|
+
return [t, p, v];
|
3635
|
+
case 5:
|
3636
|
+
return [v, p, q];
|
3637
|
+
}
|
3638
|
+
};
|
3639
|
+
convert.hsv.hsl = function(hsv) {
|
3640
|
+
var h = hsv[0];
|
3641
|
+
var s = hsv[1] / 100;
|
3642
|
+
var v = hsv[2] / 100;
|
3643
|
+
var vmin = Math.max(v, 0.01);
|
3644
|
+
var lmin;
|
3645
|
+
var sl;
|
3646
|
+
var l;
|
3647
|
+
l = (2 - s) * v;
|
3648
|
+
lmin = (2 - s) * vmin;
|
3649
|
+
sl = s * vmin;
|
3650
|
+
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
3651
|
+
sl = sl || 0;
|
3652
|
+
l /= 2;
|
3653
|
+
return [h, sl * 100, l * 100];
|
3654
|
+
};
|
3655
|
+
convert.hwb.rgb = function(hwb) {
|
3656
|
+
var h = hwb[0] / 360;
|
3657
|
+
var wh = hwb[1] / 100;
|
3658
|
+
var bl = hwb[2] / 100;
|
3659
|
+
var ratio = wh + bl;
|
3660
|
+
var i;
|
3661
|
+
var v;
|
3662
|
+
var f;
|
3663
|
+
var n;
|
3664
|
+
if (ratio > 1) {
|
3665
|
+
wh /= ratio;
|
3666
|
+
bl /= ratio;
|
3667
|
+
}
|
3668
|
+
i = Math.floor(6 * h);
|
3669
|
+
v = 1 - bl;
|
3670
|
+
f = 6 * h - i;
|
3671
|
+
if ((i & 1) !== 0) {
|
3672
|
+
f = 1 - f;
|
3673
|
+
}
|
3674
|
+
n = wh + f * (v - wh);
|
3675
|
+
var r;
|
3676
|
+
var g;
|
3677
|
+
var b;
|
3678
|
+
switch (i) {
|
3679
|
+
default:
|
3680
|
+
case 6:
|
3681
|
+
case 0:
|
3682
|
+
r = v;
|
3683
|
+
g = n;
|
3684
|
+
b = wh;
|
3685
|
+
break;
|
3686
|
+
case 1:
|
3687
|
+
r = n;
|
3688
|
+
g = v;
|
3689
|
+
b = wh;
|
3690
|
+
break;
|
3691
|
+
case 2:
|
3692
|
+
r = wh;
|
3693
|
+
g = v;
|
3694
|
+
b = n;
|
3695
|
+
break;
|
3696
|
+
case 3:
|
3697
|
+
r = wh;
|
3698
|
+
g = n;
|
3699
|
+
b = v;
|
3700
|
+
break;
|
3701
|
+
case 4:
|
3702
|
+
r = n;
|
3703
|
+
g = wh;
|
3704
|
+
b = v;
|
3705
|
+
break;
|
3706
|
+
case 5:
|
3707
|
+
r = v;
|
3708
|
+
g = wh;
|
3709
|
+
b = n;
|
3710
|
+
break;
|
3711
|
+
}
|
3712
|
+
return [r * 255, g * 255, b * 255];
|
3713
|
+
};
|
3714
|
+
convert.cmyk.rgb = function(cmyk) {
|
3715
|
+
var c = cmyk[0] / 100;
|
3716
|
+
var m = cmyk[1] / 100;
|
3717
|
+
var y = cmyk[2] / 100;
|
3718
|
+
var k = cmyk[3] / 100;
|
3719
|
+
var r;
|
3720
|
+
var g;
|
3721
|
+
var b;
|
3722
|
+
r = 1 - Math.min(1, c * (1 - k) + k);
|
3723
|
+
g = 1 - Math.min(1, m * (1 - k) + k);
|
3724
|
+
b = 1 - Math.min(1, y * (1 - k) + k);
|
3725
|
+
return [r * 255, g * 255, b * 255];
|
3726
|
+
};
|
3727
|
+
convert.xyz.rgb = function(xyz) {
|
3728
|
+
var x = xyz[0] / 100;
|
3729
|
+
var y = xyz[1] / 100;
|
3730
|
+
var z = xyz[2] / 100;
|
3731
|
+
var r;
|
3732
|
+
var g;
|
3733
|
+
var b;
|
3734
|
+
r = x * 3.2406 + y * -1.5372 + z * -0.4986;
|
3735
|
+
g = x * -0.9689 + y * 1.8758 + z * 0.0415;
|
3736
|
+
b = x * 0.0557 + y * -0.204 + z * 1.057;
|
3737
|
+
r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
|
3738
|
+
g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
|
3739
|
+
b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
|
3740
|
+
r = Math.min(Math.max(0, r), 1);
|
3741
|
+
g = Math.min(Math.max(0, g), 1);
|
3742
|
+
b = Math.min(Math.max(0, b), 1);
|
3743
|
+
return [r * 255, g * 255, b * 255];
|
3744
|
+
};
|
3745
|
+
convert.xyz.lab = function(xyz) {
|
3746
|
+
var x = xyz[0];
|
3747
|
+
var y = xyz[1];
|
3748
|
+
var z = xyz[2];
|
3749
|
+
var l;
|
3750
|
+
var a;
|
3751
|
+
var b;
|
3752
|
+
x /= 95.047;
|
3753
|
+
y /= 100;
|
3754
|
+
z /= 108.883;
|
3755
|
+
x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
|
3756
|
+
y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
|
3757
|
+
z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
|
3758
|
+
l = 116 * y - 16;
|
3759
|
+
a = 500 * (x - y);
|
3760
|
+
b = 200 * (y - z);
|
3761
|
+
return [l, a, b];
|
3762
|
+
};
|
3763
|
+
convert.lab.xyz = function(lab) {
|
3764
|
+
var l = lab[0];
|
3765
|
+
var a = lab[1];
|
3766
|
+
var b = lab[2];
|
3767
|
+
var x;
|
3768
|
+
var y;
|
3769
|
+
var z;
|
3770
|
+
y = (l + 16) / 116;
|
3771
|
+
x = a / 500 + y;
|
3772
|
+
z = y - b / 200;
|
3773
|
+
var y2 = Math.pow(y, 3);
|
3774
|
+
var x2 = Math.pow(x, 3);
|
3775
|
+
var z2 = Math.pow(z, 3);
|
3776
|
+
y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
|
3777
|
+
x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
|
3778
|
+
z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
|
3779
|
+
x *= 95.047;
|
3780
|
+
y *= 100;
|
3781
|
+
z *= 108.883;
|
3782
|
+
return [x, y, z];
|
3783
|
+
};
|
3784
|
+
convert.lab.lch = function(lab) {
|
3785
|
+
var l = lab[0];
|
3786
|
+
var a = lab[1];
|
3787
|
+
var b = lab[2];
|
3788
|
+
var hr;
|
3789
|
+
var h;
|
3790
|
+
var c;
|
3791
|
+
hr = Math.atan2(b, a);
|
3792
|
+
h = hr * 360 / 2 / Math.PI;
|
3793
|
+
if (h < 0) {
|
3794
|
+
h += 360;
|
3795
|
+
}
|
3796
|
+
c = Math.sqrt(a * a + b * b);
|
3797
|
+
return [l, c, h];
|
3798
|
+
};
|
3799
|
+
convert.lch.lab = function(lch) {
|
3800
|
+
var l = lch[0];
|
3801
|
+
var c = lch[1];
|
3802
|
+
var h = lch[2];
|
3803
|
+
var a;
|
3804
|
+
var b;
|
3805
|
+
var hr;
|
3806
|
+
hr = h / 360 * 2 * Math.PI;
|
3807
|
+
a = c * Math.cos(hr);
|
3808
|
+
b = c * Math.sin(hr);
|
3809
|
+
return [l, a, b];
|
3810
|
+
};
|
3811
|
+
convert.rgb.ansi16 = function(args) {
|
3812
|
+
var r = args[0];
|
3813
|
+
var g = args[1];
|
3814
|
+
var b = args[2];
|
3815
|
+
var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2];
|
3816
|
+
value = Math.round(value / 50);
|
3817
|
+
if (value === 0) {
|
3818
|
+
return 30;
|
3819
|
+
}
|
3820
|
+
var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
3821
|
+
if (value === 2) {
|
3822
|
+
ansi += 60;
|
3823
|
+
}
|
3824
|
+
return ansi;
|
3825
|
+
};
|
3826
|
+
convert.hsv.ansi16 = function(args) {
|
3827
|
+
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
3828
|
+
};
|
3829
|
+
convert.rgb.ansi256 = function(args) {
|
3830
|
+
var r = args[0];
|
3831
|
+
var g = args[1];
|
3832
|
+
var b = args[2];
|
3833
|
+
if (r === g && g === b) {
|
3834
|
+
if (r < 8) {
|
3835
|
+
return 16;
|
3836
|
+
}
|
3837
|
+
if (r > 248) {
|
3838
|
+
return 231;
|
3839
|
+
}
|
3840
|
+
return Math.round((r - 8) / 247 * 24) + 232;
|
3841
|
+
}
|
3842
|
+
var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
3843
|
+
return ansi;
|
3844
|
+
};
|
3845
|
+
convert.ansi16.rgb = function(args) {
|
3846
|
+
var color = args % 10;
|
3847
|
+
if (color === 0 || color === 7) {
|
3848
|
+
if (args > 50) {
|
3849
|
+
color += 3.5;
|
3850
|
+
}
|
3851
|
+
color = color / 10.5 * 255;
|
3852
|
+
return [color, color, color];
|
3853
|
+
}
|
3854
|
+
var mult = (~~(args > 50) + 1) * 0.5;
|
3855
|
+
var r = (color & 1) * mult * 255;
|
3856
|
+
var g = (color >> 1 & 1) * mult * 255;
|
3857
|
+
var b = (color >> 2 & 1) * mult * 255;
|
3858
|
+
return [r, g, b];
|
3859
|
+
};
|
3860
|
+
convert.ansi256.rgb = function(args) {
|
3861
|
+
if (args >= 232) {
|
3862
|
+
var c = (args - 232) * 10 + 8;
|
3863
|
+
return [c, c, c];
|
3864
|
+
}
|
3865
|
+
args -= 16;
|
3866
|
+
var rem;
|
3867
|
+
var r = Math.floor(args / 36) / 5 * 255;
|
3868
|
+
var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
3869
|
+
var b = rem % 6 / 5 * 255;
|
3870
|
+
return [r, g, b];
|
3871
|
+
};
|
3872
|
+
convert.rgb.hex = function(args) {
|
3873
|
+
var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
3874
|
+
var string = integer.toString(16).toUpperCase();
|
3875
|
+
return "000000".substring(string.length) + string;
|
3876
|
+
};
|
3877
|
+
convert.hex.rgb = function(args) {
|
3878
|
+
var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
3879
|
+
if (!match) {
|
3880
|
+
return [0, 0, 0];
|
3881
|
+
}
|
3882
|
+
var colorString = match[0];
|
3883
|
+
if (match[0].length === 3) {
|
3884
|
+
colorString = colorString.split("").map(function(char) {
|
3885
|
+
return char + char;
|
3886
|
+
}).join("");
|
3887
|
+
}
|
3888
|
+
var integer = parseInt(colorString, 16);
|
3889
|
+
var r = integer >> 16 & 255;
|
3890
|
+
var g = integer >> 8 & 255;
|
3891
|
+
var b = integer & 255;
|
3892
|
+
return [r, g, b];
|
3893
|
+
};
|
3894
|
+
convert.rgb.hcg = function(rgb) {
|
3895
|
+
var r = rgb[0] / 255;
|
3896
|
+
var g = rgb[1] / 255;
|
3897
|
+
var b = rgb[2] / 255;
|
3898
|
+
var max = Math.max(Math.max(r, g), b);
|
3899
|
+
var min = Math.min(Math.min(r, g), b);
|
3900
|
+
var chroma = max - min;
|
3901
|
+
var grayscale;
|
3902
|
+
var hue;
|
3903
|
+
if (chroma < 1) {
|
3904
|
+
grayscale = min / (1 - chroma);
|
3905
|
+
} else {
|
3906
|
+
grayscale = 0;
|
3907
|
+
}
|
3908
|
+
if (chroma <= 0) {
|
3909
|
+
hue = 0;
|
3910
|
+
} else if (max === r) {
|
3911
|
+
hue = (g - b) / chroma % 6;
|
3912
|
+
} else if (max === g) {
|
3913
|
+
hue = 2 + (b - r) / chroma;
|
3914
|
+
} else {
|
3915
|
+
hue = 4 + (r - g) / chroma + 4;
|
3916
|
+
}
|
3917
|
+
hue /= 6;
|
3918
|
+
hue %= 1;
|
3919
|
+
return [hue * 360, chroma * 100, grayscale * 100];
|
3920
|
+
};
|
3921
|
+
convert.hsl.hcg = function(hsl) {
|
3922
|
+
var s = hsl[1] / 100;
|
3923
|
+
var l = hsl[2] / 100;
|
3924
|
+
var c = 1;
|
3925
|
+
var f = 0;
|
3926
|
+
if (l < 0.5) {
|
3927
|
+
c = 2 * s * l;
|
3928
|
+
} else {
|
3929
|
+
c = 2 * s * (1 - l);
|
3930
|
+
}
|
3931
|
+
if (c < 1) {
|
3932
|
+
f = (l - 0.5 * c) / (1 - c);
|
3933
|
+
}
|
3934
|
+
return [hsl[0], c * 100, f * 100];
|
3935
|
+
};
|
3936
|
+
convert.hsv.hcg = function(hsv) {
|
3937
|
+
var s = hsv[1] / 100;
|
3938
|
+
var v = hsv[2] / 100;
|
3939
|
+
var c = s * v;
|
3940
|
+
var f = 0;
|
3941
|
+
if (c < 1) {
|
3942
|
+
f = (v - c) / (1 - c);
|
3943
|
+
}
|
3944
|
+
return [hsv[0], c * 100, f * 100];
|
3945
|
+
};
|
3946
|
+
convert.hcg.rgb = function(hcg) {
|
3947
|
+
var h = hcg[0] / 360;
|
3948
|
+
var c = hcg[1] / 100;
|
3949
|
+
var g = hcg[2] / 100;
|
3950
|
+
if (c === 0) {
|
3951
|
+
return [g * 255, g * 255, g * 255];
|
3952
|
+
}
|
3953
|
+
var pure = [0, 0, 0];
|
3954
|
+
var hi = h % 1 * 6;
|
3955
|
+
var v = hi % 1;
|
3956
|
+
var w = 1 - v;
|
3957
|
+
var mg = 0;
|
3958
|
+
switch (Math.floor(hi)) {
|
3959
|
+
case 0:
|
3960
|
+
pure[0] = 1;
|
3961
|
+
pure[1] = v;
|
3962
|
+
pure[2] = 0;
|
3963
|
+
break;
|
3964
|
+
case 1:
|
3965
|
+
pure[0] = w;
|
3966
|
+
pure[1] = 1;
|
3967
|
+
pure[2] = 0;
|
3968
|
+
break;
|
3969
|
+
case 2:
|
3970
|
+
pure[0] = 0;
|
3971
|
+
pure[1] = 1;
|
3972
|
+
pure[2] = v;
|
3973
|
+
break;
|
3974
|
+
case 3:
|
3975
|
+
pure[0] = 0;
|
3976
|
+
pure[1] = w;
|
3977
|
+
pure[2] = 1;
|
3978
|
+
break;
|
3979
|
+
case 4:
|
3980
|
+
pure[0] = v;
|
3981
|
+
pure[1] = 0;
|
3982
|
+
pure[2] = 1;
|
3983
|
+
break;
|
3984
|
+
default:
|
3985
|
+
pure[0] = 1;
|
3986
|
+
pure[1] = 0;
|
3987
|
+
pure[2] = w;
|
3988
|
+
}
|
3989
|
+
mg = (1 - c) * g;
|
3990
|
+
return [
|
3991
|
+
(c * pure[0] + mg) * 255,
|
3992
|
+
(c * pure[1] + mg) * 255,
|
3993
|
+
(c * pure[2] + mg) * 255
|
3994
|
+
];
|
3995
|
+
};
|
3996
|
+
convert.hcg.hsv = function(hcg) {
|
3997
|
+
var c = hcg[1] / 100;
|
3998
|
+
var g = hcg[2] / 100;
|
3999
|
+
var v = c + g * (1 - c);
|
4000
|
+
var f = 0;
|
4001
|
+
if (v > 0) {
|
4002
|
+
f = c / v;
|
4003
|
+
}
|
4004
|
+
return [hcg[0], f * 100, v * 100];
|
4005
|
+
};
|
4006
|
+
convert.hcg.hsl = function(hcg) {
|
4007
|
+
var c = hcg[1] / 100;
|
4008
|
+
var g = hcg[2] / 100;
|
4009
|
+
var l = g * (1 - c) + 0.5 * c;
|
4010
|
+
var s = 0;
|
4011
|
+
if (l > 0 && l < 0.5) {
|
4012
|
+
s = c / (2 * l);
|
4013
|
+
} else if (l >= 0.5 && l < 1) {
|
4014
|
+
s = c / (2 * (1 - l));
|
4015
|
+
}
|
4016
|
+
return [hcg[0], s * 100, l * 100];
|
4017
|
+
};
|
4018
|
+
convert.hcg.hwb = function(hcg) {
|
4019
|
+
var c = hcg[1] / 100;
|
4020
|
+
var g = hcg[2] / 100;
|
4021
|
+
var v = c + g * (1 - c);
|
4022
|
+
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
4023
|
+
};
|
4024
|
+
convert.hwb.hcg = function(hwb) {
|
4025
|
+
var w = hwb[1] / 100;
|
4026
|
+
var b = hwb[2] / 100;
|
4027
|
+
var v = 1 - b;
|
4028
|
+
var c = v - w;
|
4029
|
+
var g = 0;
|
4030
|
+
if (c < 1) {
|
4031
|
+
g = (v - c) / (1 - c);
|
4032
|
+
}
|
4033
|
+
return [hwb[0], c * 100, g * 100];
|
4034
|
+
};
|
4035
|
+
convert.apple.rgb = function(apple) {
|
4036
|
+
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
4037
|
+
};
|
4038
|
+
convert.rgb.apple = function(rgb) {
|
4039
|
+
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
4040
|
+
};
|
4041
|
+
convert.gray.rgb = function(args) {
|
4042
|
+
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
4043
|
+
};
|
4044
|
+
convert.gray.hsl = convert.gray.hsv = function(args) {
|
4045
|
+
return [0, 0, args[0]];
|
4046
|
+
};
|
4047
|
+
convert.gray.hwb = function(gray) {
|
4048
|
+
return [0, 100, gray[0]];
|
4049
|
+
};
|
4050
|
+
convert.gray.cmyk = function(gray) {
|
4051
|
+
return [0, 0, 0, gray[0]];
|
4052
|
+
};
|
4053
|
+
convert.gray.lab = function(gray) {
|
4054
|
+
return [gray[0], 0, 0];
|
4055
|
+
};
|
4056
|
+
convert.gray.hex = function(gray) {
|
4057
|
+
var val = Math.round(gray[0] / 100 * 255) & 255;
|
4058
|
+
var integer = (val << 16) + (val << 8) + val;
|
4059
|
+
var string = integer.toString(16).toUpperCase();
|
4060
|
+
return "000000".substring(string.length) + string;
|
4061
|
+
};
|
4062
|
+
convert.rgb.gray = function(rgb) {
|
4063
|
+
var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
4064
|
+
return [val / 255 * 100];
|
4065
|
+
};
|
4066
|
+
}
|
4067
|
+
});
|
4068
|
+
var require_route = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4069
|
+
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js"(exports, module2) {
|
4070
|
+
"use strict";
|
4071
|
+
var conversions = require_conversions();
|
4072
|
+
function buildGraph() {
|
4073
|
+
var graph = {};
|
4074
|
+
var models = Object.keys(conversions);
|
4075
|
+
for (var len = models.length, i = 0; i < len; i++) {
|
4076
|
+
graph[models[i]] = {
|
4077
|
+
// http://jsperf.com/1-vs-infinity
|
4078
|
+
// micro-opt, but this is simple.
|
4079
|
+
distance: -1,
|
4080
|
+
parent: null
|
4081
|
+
};
|
4082
|
+
}
|
4083
|
+
return graph;
|
4084
|
+
}
|
4085
|
+
function deriveBFS(fromModel) {
|
4086
|
+
var graph = buildGraph();
|
4087
|
+
var queue = [fromModel];
|
4088
|
+
graph[fromModel].distance = 0;
|
4089
|
+
while (queue.length) {
|
4090
|
+
var current = queue.pop();
|
4091
|
+
var adjacents = Object.keys(conversions[current]);
|
4092
|
+
for (var len = adjacents.length, i = 0; i < len; i++) {
|
4093
|
+
var adjacent = adjacents[i];
|
4094
|
+
var node = graph[adjacent];
|
4095
|
+
if (node.distance === -1) {
|
4096
|
+
node.distance = graph[current].distance + 1;
|
4097
|
+
node.parent = current;
|
4098
|
+
queue.unshift(adjacent);
|
4099
|
+
}
|
4100
|
+
}
|
4101
|
+
}
|
4102
|
+
return graph;
|
4103
|
+
}
|
4104
|
+
function link(from, to) {
|
4105
|
+
return function(args) {
|
4106
|
+
return to(from(args));
|
4107
|
+
};
|
4108
|
+
}
|
4109
|
+
function wrapConversion(toModel, graph) {
|
4110
|
+
var path5 = [graph[toModel].parent, toModel];
|
4111
|
+
var fn = conversions[graph[toModel].parent][toModel];
|
4112
|
+
var cur = graph[toModel].parent;
|
4113
|
+
while (graph[cur].parent) {
|
4114
|
+
path5.unshift(graph[cur].parent);
|
4115
|
+
fn = link(conversions[graph[cur].parent][cur], fn);
|
4116
|
+
cur = graph[cur].parent;
|
4117
|
+
}
|
4118
|
+
fn.conversion = path5;
|
4119
|
+
return fn;
|
4120
|
+
}
|
4121
|
+
module2.exports = function(fromModel) {
|
4122
|
+
var graph = deriveBFS(fromModel);
|
4123
|
+
var conversion = {};
|
4124
|
+
var models = Object.keys(graph);
|
4125
|
+
for (var len = models.length, i = 0; i < len; i++) {
|
4126
|
+
var toModel = models[i];
|
4127
|
+
var node = graph[toModel];
|
4128
|
+
if (node.parent === null) {
|
4129
|
+
continue;
|
4130
|
+
}
|
4131
|
+
conversion[toModel] = wrapConversion(toModel, graph);
|
4132
|
+
}
|
4133
|
+
return conversion;
|
4134
|
+
};
|
4135
|
+
}
|
4136
|
+
});
|
4137
|
+
var require_color_convert = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4138
|
+
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js"(exports, module2) {
|
4139
|
+
"use strict";
|
4140
|
+
var conversions = require_conversions();
|
4141
|
+
var route = require_route();
|
4142
|
+
var convert = {};
|
4143
|
+
var models = Object.keys(conversions);
|
4144
|
+
function wrapRaw(fn) {
|
4145
|
+
var wrappedFn = function(args) {
|
4146
|
+
if (args === void 0 || args === null) {
|
4147
|
+
return args;
|
4148
|
+
}
|
4149
|
+
if (arguments.length > 1) {
|
4150
|
+
args = Array.prototype.slice.call(arguments);
|
4151
|
+
}
|
4152
|
+
return fn(args);
|
4153
|
+
};
|
4154
|
+
if ("conversion" in fn) {
|
4155
|
+
wrappedFn.conversion = fn.conversion;
|
4156
|
+
}
|
4157
|
+
return wrappedFn;
|
4158
|
+
}
|
4159
|
+
function wrapRounded(fn) {
|
4160
|
+
var wrappedFn = function(args) {
|
4161
|
+
if (args === void 0 || args === null) {
|
4162
|
+
return args;
|
4163
|
+
}
|
4164
|
+
if (arguments.length > 1) {
|
4165
|
+
args = Array.prototype.slice.call(arguments);
|
4166
|
+
}
|
4167
|
+
var result = fn(args);
|
4168
|
+
if (typeof result === "object") {
|
4169
|
+
for (var len = result.length, i = 0; i < len; i++) {
|
4170
|
+
result[i] = Math.round(result[i]);
|
4171
|
+
}
|
4172
|
+
}
|
4173
|
+
return result;
|
4174
|
+
};
|
4175
|
+
if ("conversion" in fn) {
|
4176
|
+
wrappedFn.conversion = fn.conversion;
|
4177
|
+
}
|
4178
|
+
return wrappedFn;
|
4179
|
+
}
|
4180
|
+
models.forEach(function(fromModel) {
|
4181
|
+
convert[fromModel] = {};
|
4182
|
+
Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
|
4183
|
+
Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
|
4184
|
+
var routes = route(fromModel);
|
4185
|
+
var routeModels = Object.keys(routes);
|
4186
|
+
routeModels.forEach(function(toModel) {
|
4187
|
+
var fn = routes[toModel];
|
4188
|
+
convert[fromModel][toModel] = wrapRounded(fn);
|
4189
|
+
convert[fromModel][toModel].raw = wrapRaw(fn);
|
4190
|
+
});
|
4191
|
+
});
|
4192
|
+
module2.exports = convert;
|
4193
|
+
}
|
4194
|
+
});
|
4195
|
+
var require_ansi_styles = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4196
|
+
"../../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js"(exports, module2) {
|
4197
|
+
"use strict";
|
4198
|
+
var colorConvert = require_color_convert();
|
4199
|
+
var wrapAnsi16 = (fn, offset) => function() {
|
4200
|
+
const code = fn.apply(colorConvert, arguments);
|
4201
|
+
return `\x1B[${code + offset}m`;
|
4202
|
+
};
|
4203
|
+
var wrapAnsi256 = (fn, offset) => function() {
|
4204
|
+
const code = fn.apply(colorConvert, arguments);
|
4205
|
+
return `\x1B[${38 + offset};5;${code}m`;
|
4206
|
+
};
|
4207
|
+
var wrapAnsi16m = (fn, offset) => function() {
|
4208
|
+
const rgb = fn.apply(colorConvert, arguments);
|
4209
|
+
return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
4210
|
+
};
|
4211
|
+
function assembleStyles() {
|
4212
|
+
const codes = /* @__PURE__ */ new Map();
|
4213
|
+
const styles = {
|
4214
|
+
modifier: {
|
4215
|
+
reset: [0, 0],
|
4216
|
+
// 21 isn't widely supported and 22 does the same thing
|
4217
|
+
bold: [1, 22],
|
4218
|
+
dim: [2, 22],
|
4219
|
+
italic: [3, 23],
|
4220
|
+
underline: [4, 24],
|
4221
|
+
inverse: [7, 27],
|
4222
|
+
hidden: [8, 28],
|
4223
|
+
strikethrough: [9, 29]
|
4224
|
+
},
|
4225
|
+
color: {
|
4226
|
+
black: [30, 39],
|
4227
|
+
red: [31, 39],
|
4228
|
+
green: [32, 39],
|
4229
|
+
yellow: [33, 39],
|
4230
|
+
blue: [34, 39],
|
4231
|
+
magenta: [35, 39],
|
4232
|
+
cyan: [36, 39],
|
4233
|
+
white: [37, 39],
|
4234
|
+
gray: [90, 39],
|
4235
|
+
// Bright color
|
4236
|
+
redBright: [91, 39],
|
4237
|
+
greenBright: [92, 39],
|
4238
|
+
yellowBright: [93, 39],
|
4239
|
+
blueBright: [94, 39],
|
4240
|
+
magentaBright: [95, 39],
|
4241
|
+
cyanBright: [96, 39],
|
4242
|
+
whiteBright: [97, 39]
|
4243
|
+
},
|
4244
|
+
bgColor: {
|
4245
|
+
bgBlack: [40, 49],
|
4246
|
+
bgRed: [41, 49],
|
4247
|
+
bgGreen: [42, 49],
|
4248
|
+
bgYellow: [43, 49],
|
4249
|
+
bgBlue: [44, 49],
|
4250
|
+
bgMagenta: [45, 49],
|
4251
|
+
bgCyan: [46, 49],
|
4252
|
+
bgWhite: [47, 49],
|
4253
|
+
// Bright color
|
4254
|
+
bgBlackBright: [100, 49],
|
4255
|
+
bgRedBright: [101, 49],
|
4256
|
+
bgGreenBright: [102, 49],
|
4257
|
+
bgYellowBright: [103, 49],
|
4258
|
+
bgBlueBright: [104, 49],
|
4259
|
+
bgMagentaBright: [105, 49],
|
4260
|
+
bgCyanBright: [106, 49],
|
4261
|
+
bgWhiteBright: [107, 49]
|
4262
|
+
}
|
4263
|
+
};
|
4264
|
+
styles.color.grey = styles.color.gray;
|
4265
|
+
for (const groupName of Object.keys(styles)) {
|
4266
|
+
const group = styles[groupName];
|
4267
|
+
for (const styleName of Object.keys(group)) {
|
4268
|
+
const style = group[styleName];
|
4269
|
+
styles[styleName] = {
|
4270
|
+
open: `\x1B[${style[0]}m`,
|
4271
|
+
close: `\x1B[${style[1]}m`
|
4272
|
+
};
|
4273
|
+
group[styleName] = styles[styleName];
|
4274
|
+
codes.set(style[0], style[1]);
|
4275
|
+
}
|
4276
|
+
Object.defineProperty(styles, groupName, {
|
4277
|
+
value: group,
|
4278
|
+
enumerable: false
|
4279
|
+
});
|
4280
|
+
Object.defineProperty(styles, "codes", {
|
4281
|
+
value: codes,
|
4282
|
+
enumerable: false
|
4283
|
+
});
|
4284
|
+
}
|
4285
|
+
const ansi2ansi = (n) => n;
|
4286
|
+
const rgb2rgb = (r, g, b) => [r, g, b];
|
4287
|
+
styles.color.close = "\x1B[39m";
|
4288
|
+
styles.bgColor.close = "\x1B[49m";
|
4289
|
+
styles.color.ansi = {
|
4290
|
+
ansi: wrapAnsi16(ansi2ansi, 0)
|
4291
|
+
};
|
4292
|
+
styles.color.ansi256 = {
|
4293
|
+
ansi256: wrapAnsi256(ansi2ansi, 0)
|
4294
|
+
};
|
4295
|
+
styles.color.ansi16m = {
|
4296
|
+
rgb: wrapAnsi16m(rgb2rgb, 0)
|
4297
|
+
};
|
4298
|
+
styles.bgColor.ansi = {
|
4299
|
+
ansi: wrapAnsi16(ansi2ansi, 10)
|
4300
|
+
};
|
4301
|
+
styles.bgColor.ansi256 = {
|
4302
|
+
ansi256: wrapAnsi256(ansi2ansi, 10)
|
4303
|
+
};
|
4304
|
+
styles.bgColor.ansi16m = {
|
4305
|
+
rgb: wrapAnsi16m(rgb2rgb, 10)
|
4306
|
+
};
|
4307
|
+
for (let key of Object.keys(colorConvert)) {
|
4308
|
+
if (typeof colorConvert[key] !== "object") {
|
4309
|
+
continue;
|
4310
|
+
}
|
4311
|
+
const suite = colorConvert[key];
|
4312
|
+
if (key === "ansi16") {
|
4313
|
+
key = "ansi";
|
4314
|
+
}
|
4315
|
+
if ("ansi16" in suite) {
|
4316
|
+
styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
|
4317
|
+
styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
|
4318
|
+
}
|
4319
|
+
if ("ansi256" in suite) {
|
4320
|
+
styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
|
4321
|
+
styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
|
4322
|
+
}
|
4323
|
+
if ("rgb" in suite) {
|
4324
|
+
styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
|
4325
|
+
styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
|
4326
|
+
}
|
4327
|
+
}
|
4328
|
+
return styles;
|
4329
|
+
}
|
4330
|
+
Object.defineProperty(module2, "exports", {
|
4331
|
+
enumerable: true,
|
4332
|
+
get: assembleStyles
|
4333
|
+
});
|
4334
|
+
}
|
4335
|
+
});
|
4336
|
+
var require_has_flag = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4337
|
+
"../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports, module2) {
|
4338
|
+
"use strict";
|
4339
|
+
module2.exports = (flag, argv) => {
|
4340
|
+
argv = argv || process.argv;
|
4341
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
4342
|
+
const pos = argv.indexOf(prefix + flag);
|
4343
|
+
const terminatorPos = argv.indexOf("--");
|
4344
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
4345
|
+
};
|
4346
|
+
}
|
4347
|
+
});
|
4348
|
+
var require_supports_color = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4349
|
+
"../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports, module2) {
|
4350
|
+
"use strict";
|
4351
|
+
var os = (0, import_chunk_4VNS5WPM.__require)("os");
|
4352
|
+
var hasFlag = require_has_flag();
|
4353
|
+
var env = process.env;
|
4354
|
+
var forceColor;
|
4355
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
4356
|
+
forceColor = false;
|
4357
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
4358
|
+
forceColor = true;
|
4359
|
+
}
|
4360
|
+
if ("FORCE_COLOR" in env) {
|
4361
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
4362
|
+
}
|
4363
|
+
function translateLevel(level) {
|
4364
|
+
if (level === 0) {
|
4365
|
+
return false;
|
4366
|
+
}
|
3273
4367
|
return {
|
3274
|
-
|
3275
|
-
|
3276
|
-
|
3277
|
-
|
3278
|
-
number: colors.magenta,
|
3279
|
-
string: colors.green,
|
3280
|
-
regex: colors.magenta,
|
3281
|
-
comment: colors.gray,
|
3282
|
-
invalid: compose(compose(colors.white, colors.bgRed), colors.bold),
|
3283
|
-
gutter: colors.gray,
|
3284
|
-
marker: compose(colors.red, colors.bold),
|
3285
|
-
message: compose(colors.red, colors.bold),
|
3286
|
-
reset: colors.reset
|
4368
|
+
level,
|
4369
|
+
hasBasic: true,
|
4370
|
+
has256: level >= 2,
|
4371
|
+
has16m: level >= 3
|
3287
4372
|
};
|
3288
4373
|
}
|
3289
|
-
|
3290
|
-
|
3291
|
-
|
3292
|
-
|
4374
|
+
function supportsColor(stream) {
|
4375
|
+
if (forceColor === false) {
|
4376
|
+
return 0;
|
4377
|
+
}
|
4378
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
4379
|
+
return 3;
|
4380
|
+
}
|
4381
|
+
if (hasFlag("color=256")) {
|
4382
|
+
return 2;
|
4383
|
+
}
|
4384
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
4385
|
+
return 0;
|
4386
|
+
}
|
4387
|
+
const min = forceColor ? 1 : 0;
|
4388
|
+
if (process.platform === "win32") {
|
4389
|
+
const osRelease = os.release().split(".");
|
4390
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
4391
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
4392
|
+
}
|
4393
|
+
return 1;
|
4394
|
+
}
|
4395
|
+
if ("CI" in env) {
|
4396
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
4397
|
+
return 1;
|
4398
|
+
}
|
4399
|
+
return min;
|
4400
|
+
}
|
4401
|
+
if ("TEAMCITY_VERSION" in env) {
|
4402
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
4403
|
+
}
|
4404
|
+
if (env.COLORTERM === "truecolor") {
|
4405
|
+
return 3;
|
4406
|
+
}
|
4407
|
+
if ("TERM_PROGRAM" in env) {
|
4408
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
4409
|
+
switch (env.TERM_PROGRAM) {
|
4410
|
+
case "iTerm.app":
|
4411
|
+
return version >= 3 ? 3 : 2;
|
4412
|
+
case "Apple_Terminal":
|
4413
|
+
return 2;
|
4414
|
+
}
|
4415
|
+
}
|
4416
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
4417
|
+
return 2;
|
4418
|
+
}
|
4419
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
4420
|
+
return 1;
|
4421
|
+
}
|
4422
|
+
if ("COLORTERM" in env) {
|
4423
|
+
return 1;
|
4424
|
+
}
|
4425
|
+
if (env.TERM === "dumb") {
|
4426
|
+
return min;
|
4427
|
+
}
|
4428
|
+
return min;
|
4429
|
+
}
|
4430
|
+
function getSupportLevel(stream) {
|
4431
|
+
const level = supportsColor(stream);
|
4432
|
+
return translateLevel(level);
|
4433
|
+
}
|
4434
|
+
module2.exports = {
|
4435
|
+
supportsColor: getSupportLevel,
|
4436
|
+
stdout: getSupportLevel(process.stdout),
|
4437
|
+
stderr: getSupportLevel(process.stderr)
|
4438
|
+
};
|
4439
|
+
}
|
4440
|
+
});
|
4441
|
+
var require_templates = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4442
|
+
"../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js"(exports, module2) {
|
4443
|
+
"use strict";
|
4444
|
+
var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
4445
|
+
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
4446
|
+
var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
4447
|
+
var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
|
4448
|
+
var ESCAPES = /* @__PURE__ */ new Map([
|
4449
|
+
["n", "\n"],
|
4450
|
+
["r", "\r"],
|
4451
|
+
["t", " "],
|
4452
|
+
["b", "\b"],
|
4453
|
+
["f", "\f"],
|
4454
|
+
["v", "\v"],
|
4455
|
+
["0", "\0"],
|
4456
|
+
["\\", "\\"],
|
4457
|
+
["e", "\x1B"],
|
4458
|
+
["a", "\x07"]
|
4459
|
+
]);
|
4460
|
+
function unescape(c) {
|
4461
|
+
if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) {
|
4462
|
+
return String.fromCharCode(parseInt(c.slice(1), 16));
|
4463
|
+
}
|
4464
|
+
return ESCAPES.get(c) || c;
|
4465
|
+
}
|
4466
|
+
function parseArguments(name, args) {
|
4467
|
+
const results = [];
|
4468
|
+
const chunks = args.trim().split(/\s*,\s*/g);
|
4469
|
+
let matches;
|
4470
|
+
for (const chunk of chunks) {
|
4471
|
+
if (!isNaN(chunk)) {
|
4472
|
+
results.push(Number(chunk));
|
4473
|
+
} else if (matches = chunk.match(STRING_REGEX)) {
|
4474
|
+
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
|
4475
|
+
} else {
|
4476
|
+
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
|
4477
|
+
}
|
4478
|
+
}
|
4479
|
+
return results;
|
4480
|
+
}
|
4481
|
+
function parseStyle(style) {
|
4482
|
+
STYLE_REGEX.lastIndex = 0;
|
4483
|
+
const results = [];
|
4484
|
+
let matches;
|
4485
|
+
while ((matches = STYLE_REGEX.exec(style)) !== null) {
|
4486
|
+
const name = matches[1];
|
4487
|
+
if (matches[2]) {
|
4488
|
+
const args = parseArguments(name, matches[2]);
|
4489
|
+
results.push([name].concat(args));
|
4490
|
+
} else {
|
4491
|
+
results.push([name]);
|
4492
|
+
}
|
4493
|
+
}
|
4494
|
+
return results;
|
4495
|
+
}
|
4496
|
+
function buildStyle(chalk, styles) {
|
4497
|
+
const enabled = {};
|
4498
|
+
for (const layer of styles) {
|
4499
|
+
for (const style of layer.styles) {
|
4500
|
+
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
4501
|
+
}
|
4502
|
+
}
|
4503
|
+
let current = chalk;
|
4504
|
+
for (const styleName of Object.keys(enabled)) {
|
4505
|
+
if (Array.isArray(enabled[styleName])) {
|
4506
|
+
if (!(styleName in current)) {
|
4507
|
+
throw new Error(`Unknown Chalk style: ${styleName}`);
|
4508
|
+
}
|
4509
|
+
if (enabled[styleName].length > 0) {
|
4510
|
+
current = current[styleName].apply(current, enabled[styleName]);
|
4511
|
+
} else {
|
4512
|
+
current = current[styleName];
|
4513
|
+
}
|
4514
|
+
}
|
4515
|
+
}
|
4516
|
+
return current;
|
4517
|
+
}
|
4518
|
+
module2.exports = (chalk, tmp) => {
|
4519
|
+
const styles = [];
|
4520
|
+
const chunks = [];
|
4521
|
+
let chunk = [];
|
4522
|
+
tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
|
4523
|
+
if (escapeChar) {
|
4524
|
+
chunk.push(unescape(escapeChar));
|
4525
|
+
} else if (style) {
|
4526
|
+
const str = chunk.join("");
|
4527
|
+
chunk = [];
|
4528
|
+
chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
|
4529
|
+
styles.push({ inverse, styles: parseStyle(style) });
|
4530
|
+
} else if (close) {
|
4531
|
+
if (styles.length === 0) {
|
4532
|
+
throw new Error("Found extraneous } in Chalk template literal");
|
4533
|
+
}
|
4534
|
+
chunks.push(buildStyle(chalk, styles)(chunk.join("")));
|
4535
|
+
chunk = [];
|
4536
|
+
styles.pop();
|
4537
|
+
} else {
|
4538
|
+
chunk.push(chr);
|
4539
|
+
}
|
4540
|
+
});
|
4541
|
+
chunks.push(chunk.join(""));
|
4542
|
+
if (styles.length > 0) {
|
4543
|
+
const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
4544
|
+
throw new Error(errMsg);
|
4545
|
+
}
|
4546
|
+
return chunks.join("");
|
4547
|
+
};
|
4548
|
+
}
|
4549
|
+
});
|
4550
|
+
var require_chalk = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4551
|
+
"../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js"(exports, module2) {
|
4552
|
+
"use strict";
|
4553
|
+
var escapeStringRegexp = require_escape_string_regexp();
|
4554
|
+
var ansiStyles = require_ansi_styles();
|
4555
|
+
var stdoutColor = require_supports_color().stdout;
|
4556
|
+
var template = require_templates();
|
4557
|
+
var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
|
4558
|
+
var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
|
4559
|
+
var skipModels = /* @__PURE__ */ new Set(["gray"]);
|
4560
|
+
var styles = /* @__PURE__ */ Object.create(null);
|
4561
|
+
function applyOptions(obj, options) {
|
4562
|
+
options = options || {};
|
4563
|
+
const scLevel = stdoutColor ? stdoutColor.level : 0;
|
4564
|
+
obj.level = options.level === void 0 ? scLevel : options.level;
|
4565
|
+
obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
|
4566
|
+
}
|
4567
|
+
function Chalk(options) {
|
4568
|
+
if (!this || !(this instanceof Chalk) || this.template) {
|
4569
|
+
const chalk = {};
|
4570
|
+
applyOptions(chalk, options);
|
4571
|
+
chalk.template = function() {
|
4572
|
+
const args = [].slice.call(arguments);
|
4573
|
+
return chalkTag.apply(null, [chalk.template].concat(args));
|
4574
|
+
};
|
4575
|
+
Object.setPrototypeOf(chalk, Chalk.prototype);
|
4576
|
+
Object.setPrototypeOf(chalk.template, chalk);
|
4577
|
+
chalk.template.constructor = Chalk;
|
4578
|
+
return chalk.template;
|
4579
|
+
}
|
4580
|
+
applyOptions(this, options);
|
4581
|
+
}
|
4582
|
+
if (isSimpleWindowsTerm) {
|
4583
|
+
ansiStyles.blue.open = "\x1B[94m";
|
4584
|
+
}
|
4585
|
+
for (const key of Object.keys(ansiStyles)) {
|
4586
|
+
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
|
4587
|
+
styles[key] = {
|
4588
|
+
get() {
|
4589
|
+
const codes = ansiStyles[key];
|
4590
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
|
4591
|
+
}
|
4592
|
+
};
|
4593
|
+
}
|
4594
|
+
styles.visible = {
|
4595
|
+
get() {
|
4596
|
+
return build.call(this, this._styles || [], true, "visible");
|
4597
|
+
}
|
4598
|
+
};
|
4599
|
+
ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
|
4600
|
+
for (const model of Object.keys(ansiStyles.color.ansi)) {
|
4601
|
+
if (skipModels.has(model)) {
|
4602
|
+
continue;
|
4603
|
+
}
|
4604
|
+
styles[model] = {
|
4605
|
+
get() {
|
4606
|
+
const level = this.level;
|
4607
|
+
return function() {
|
4608
|
+
const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
|
4609
|
+
const codes = {
|
4610
|
+
open,
|
4611
|
+
close: ansiStyles.color.close,
|
4612
|
+
closeRe: ansiStyles.color.closeRe
|
4613
|
+
};
|
4614
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
4615
|
+
};
|
4616
|
+
}
|
4617
|
+
};
|
4618
|
+
}
|
4619
|
+
ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
|
4620
|
+
for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
|
4621
|
+
if (skipModels.has(model)) {
|
4622
|
+
continue;
|
4623
|
+
}
|
4624
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
4625
|
+
styles[bgModel] = {
|
4626
|
+
get() {
|
4627
|
+
const level = this.level;
|
4628
|
+
return function() {
|
4629
|
+
const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
|
4630
|
+
const codes = {
|
4631
|
+
open,
|
4632
|
+
close: ansiStyles.bgColor.close,
|
4633
|
+
closeRe: ansiStyles.bgColor.closeRe
|
4634
|
+
};
|
4635
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
4636
|
+
};
|
4637
|
+
}
|
4638
|
+
};
|
4639
|
+
}
|
4640
|
+
var proto = Object.defineProperties(() => {
|
4641
|
+
}, styles);
|
4642
|
+
function build(_styles, _empty, key) {
|
4643
|
+
const builder = function() {
|
4644
|
+
return applyStyle.apply(builder, arguments);
|
4645
|
+
};
|
4646
|
+
builder._styles = _styles;
|
4647
|
+
builder._empty = _empty;
|
4648
|
+
const self = this;
|
4649
|
+
Object.defineProperty(builder, "level", {
|
4650
|
+
enumerable: true,
|
4651
|
+
get() {
|
4652
|
+
return self.level;
|
4653
|
+
},
|
4654
|
+
set(level) {
|
4655
|
+
self.level = level;
|
4656
|
+
}
|
4657
|
+
});
|
4658
|
+
Object.defineProperty(builder, "enabled", {
|
4659
|
+
enumerable: true,
|
4660
|
+
get() {
|
4661
|
+
return self.enabled;
|
4662
|
+
},
|
4663
|
+
set(enabled) {
|
4664
|
+
self.enabled = enabled;
|
4665
|
+
}
|
4666
|
+
});
|
4667
|
+
builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
|
4668
|
+
builder.__proto__ = proto;
|
4669
|
+
return builder;
|
4670
|
+
}
|
4671
|
+
function applyStyle() {
|
4672
|
+
const args = arguments;
|
4673
|
+
const argsLen = args.length;
|
4674
|
+
let str = String(arguments[0]);
|
4675
|
+
if (argsLen === 0) {
|
4676
|
+
return "";
|
4677
|
+
}
|
4678
|
+
if (argsLen > 1) {
|
4679
|
+
for (let a = 1; a < argsLen; a++) {
|
4680
|
+
str += " " + args[a];
|
4681
|
+
}
|
4682
|
+
}
|
4683
|
+
if (!this.enabled || this.level <= 0 || !str) {
|
4684
|
+
return this._empty ? "" : str;
|
4685
|
+
}
|
4686
|
+
const originalDim = ansiStyles.dim.open;
|
4687
|
+
if (isSimpleWindowsTerm && this.hasGrey) {
|
4688
|
+
ansiStyles.dim.open = "";
|
4689
|
+
}
|
4690
|
+
for (const code of this._styles.slice().reverse()) {
|
4691
|
+
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
4692
|
+
str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
|
4693
|
+
}
|
4694
|
+
ansiStyles.dim.open = originalDim;
|
4695
|
+
return str;
|
4696
|
+
}
|
4697
|
+
function chalkTag(chalk, strings) {
|
4698
|
+
if (!Array.isArray(strings)) {
|
4699
|
+
return [].slice.call(arguments, 1).join(" ");
|
4700
|
+
}
|
4701
|
+
const args = [].slice.call(arguments, 2);
|
4702
|
+
const parts = [strings.raw[0]];
|
4703
|
+
for (let i = 1; i < strings.length; i++) {
|
4704
|
+
parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
4705
|
+
parts.push(String(strings.raw[i]));
|
4706
|
+
}
|
4707
|
+
return template(chalk, parts.join(""));
|
4708
|
+
}
|
4709
|
+
Object.defineProperties(Chalk.prototype, styles);
|
4710
|
+
module2.exports = Chalk();
|
4711
|
+
module2.exports.supportsColor = stdoutColor;
|
4712
|
+
module2.exports.default = module2.exports;
|
4713
|
+
}
|
4714
|
+
});
|
4715
|
+
var require_lib6 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4716
|
+
"../../node_modules/.pnpm/@babel+highlight@7.23.4/node_modules/@babel/highlight/lib/index.js"(exports) {
|
4717
|
+
"use strict";
|
4718
|
+
Object.defineProperty(exports, "__esModule", {
|
4719
|
+
value: true
|
4720
|
+
});
|
4721
|
+
exports.default = highlight;
|
4722
|
+
exports.shouldHighlight = shouldHighlight;
|
4723
|
+
var _jsTokens = require_js_tokens();
|
4724
|
+
var _helperValidatorIdentifier = (0, import_chunk_UZTXEBTM.require_lib)();
|
4725
|
+
var _chalk = _interopRequireWildcard(require_chalk(), true);
|
4726
|
+
function _getRequireWildcardCache(e) {
|
4727
|
+
if ("function" != typeof WeakMap) return null;
|
4728
|
+
var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
|
4729
|
+
return (_getRequireWildcardCache = function(e2) {
|
4730
|
+
return e2 ? t : r;
|
4731
|
+
})(e);
|
4732
|
+
}
|
4733
|
+
function _interopRequireWildcard(e, r) {
|
4734
|
+
if (!r && e && e.__esModule) return e;
|
4735
|
+
if (null === e || "object" != typeof e && "function" != typeof e) return { default: e };
|
4736
|
+
var t = _getRequireWildcardCache(r);
|
4737
|
+
if (t && t.has(e)) return t.get(e);
|
4738
|
+
var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
4739
|
+
for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
|
4740
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
4741
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
4742
|
+
}
|
4743
|
+
return n.default = e, t && t.set(e, n), n;
|
3293
4744
|
}
|
3294
4745
|
var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
|
3295
|
-
|
4746
|
+
function getDefs(chalk) {
|
4747
|
+
return {
|
4748
|
+
keyword: chalk.cyan,
|
4749
|
+
capitalized: chalk.yellow,
|
4750
|
+
jsxIdentifier: chalk.yellow,
|
4751
|
+
punctuator: chalk.yellow,
|
4752
|
+
number: chalk.magenta,
|
4753
|
+
string: chalk.green,
|
4754
|
+
regex: chalk.magenta,
|
4755
|
+
comment: chalk.grey,
|
4756
|
+
invalid: chalk.white.bgRed.bold
|
4757
|
+
};
|
4758
|
+
}
|
4759
|
+
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
3296
4760
|
var BRACKET = /^[()[\]{}]$/;
|
3297
4761
|
var tokenize;
|
3298
4762
|
{
|
3299
4763
|
const JSX_TAG = /^[a-z][\w-]*$/i;
|
3300
4764
|
const getTokenType = function(token, offset, text) {
|
3301
4765
|
if (token.type === "name") {
|
3302
|
-
if (
|
4766
|
+
if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
|
3303
4767
|
return "keyword";
|
3304
4768
|
}
|
3305
|
-
if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset)
|
4769
|
+
if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) == "</")) {
|
3306
4770
|
return "jsxIdentifier";
|
3307
4771
|
}
|
3308
4772
|
if (token.value[0] !== token.value[0].toLowerCase()) {
|
@@ -3319,8 +4783,8 @@ var require_lib6 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
3319
4783
|
};
|
3320
4784
|
tokenize = function* (text) {
|
3321
4785
|
let match;
|
3322
|
-
while (match =
|
3323
|
-
const token =
|
4786
|
+
while (match = _jsTokens.default.exec(text)) {
|
4787
|
+
const token = _jsTokens.matchToToken(match);
|
3324
4788
|
yield {
|
3325
4789
|
type: getTokenType(token, match.index, text),
|
3326
4790
|
value: token.value
|
@@ -3328,23 +4792,98 @@ var require_lib6 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
3328
4792
|
}
|
3329
4793
|
};
|
3330
4794
|
}
|
3331
|
-
function
|
3332
|
-
if (text === "") return "";
|
3333
|
-
const defs = getDefs(true);
|
4795
|
+
function highlightTokens(defs, text) {
|
3334
4796
|
let highlighted = "";
|
3335
4797
|
for (const {
|
3336
4798
|
type,
|
3337
4799
|
value
|
3338
4800
|
} of tokenize(text)) {
|
3339
|
-
|
3340
|
-
|
4801
|
+
const colorize = defs[type];
|
4802
|
+
if (colorize) {
|
4803
|
+
highlighted += value.split(NEWLINE).map((str) => colorize(str)).join("\n");
|
3341
4804
|
} else {
|
3342
4805
|
highlighted += value;
|
3343
4806
|
}
|
3344
4807
|
}
|
3345
4808
|
return highlighted;
|
3346
4809
|
}
|
4810
|
+
function shouldHighlight(options) {
|
4811
|
+
return _chalk.default.level > 0 || options.forceColor;
|
4812
|
+
}
|
4813
|
+
var chalkWithForcedColor = void 0;
|
4814
|
+
function getChalk(forceColor) {
|
4815
|
+
if (forceColor) {
|
4816
|
+
var _chalkWithForcedColor;
|
4817
|
+
(_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({
|
4818
|
+
enabled: true,
|
4819
|
+
level: 1
|
4820
|
+
});
|
4821
|
+
return chalkWithForcedColor;
|
4822
|
+
}
|
4823
|
+
return _chalk.default;
|
4824
|
+
}
|
4825
|
+
{
|
4826
|
+
exports.getChalk = (options) => getChalk(options.forceColor);
|
4827
|
+
}
|
4828
|
+
function highlight(code, options = {}) {
|
4829
|
+
if (code !== "" && shouldHighlight(options)) {
|
4830
|
+
const defs = getDefs(getChalk(options.forceColor));
|
4831
|
+
return highlightTokens(defs, code);
|
4832
|
+
} else {
|
4833
|
+
return code;
|
4834
|
+
}
|
4835
|
+
}
|
4836
|
+
}
|
4837
|
+
});
|
4838
|
+
var require_lib7 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4839
|
+
"../../node_modules/.pnpm/@babel+code-frame@7.23.5/node_modules/@babel/code-frame/lib/index.js"(exports) {
|
4840
|
+
"use strict";
|
4841
|
+
Object.defineProperty(exports, "__esModule", {
|
4842
|
+
value: true
|
4843
|
+
});
|
4844
|
+
exports.codeFrameColumns = codeFrameColumns2;
|
4845
|
+
exports.default = _default;
|
4846
|
+
var _highlight = require_lib6();
|
4847
|
+
var _chalk = _interopRequireWildcard(require_chalk(), true);
|
4848
|
+
function _getRequireWildcardCache(e) {
|
4849
|
+
if ("function" != typeof WeakMap) return null;
|
4850
|
+
var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
|
4851
|
+
return (_getRequireWildcardCache = function(e2) {
|
4852
|
+
return e2 ? t : r;
|
4853
|
+
})(e);
|
4854
|
+
}
|
4855
|
+
function _interopRequireWildcard(e, r) {
|
4856
|
+
if (!r && e && e.__esModule) return e;
|
4857
|
+
if (null === e || "object" != typeof e && "function" != typeof e) return { default: e };
|
4858
|
+
var t = _getRequireWildcardCache(r);
|
4859
|
+
if (t && t.has(e)) return t.get(e);
|
4860
|
+
var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
4861
|
+
for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
|
4862
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
4863
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
4864
|
+
}
|
4865
|
+
return n.default = e, t && t.set(e, n), n;
|
4866
|
+
}
|
4867
|
+
var chalkWithForcedColor = void 0;
|
4868
|
+
function getChalk(forceColor) {
|
4869
|
+
if (forceColor) {
|
4870
|
+
var _chalkWithForcedColor;
|
4871
|
+
(_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({
|
4872
|
+
enabled: true,
|
4873
|
+
level: 1
|
4874
|
+
});
|
4875
|
+
return chalkWithForcedColor;
|
4876
|
+
}
|
4877
|
+
return _chalk.default;
|
4878
|
+
}
|
3347
4879
|
var deprecationWarningShown = false;
|
4880
|
+
function getDefs(chalk) {
|
4881
|
+
return {
|
4882
|
+
gutter: chalk.grey,
|
4883
|
+
marker: chalk.red.bold,
|
4884
|
+
message: chalk.red.bold
|
4885
|
+
};
|
4886
|
+
}
|
3348
4887
|
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
3349
4888
|
function getMarkerLines(loc, source, opts) {
|
3350
4889
|
const startLoc = Object.assign({
|
@@ -3403,8 +4942,12 @@ var require_lib6 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
3403
4942
|
};
|
3404
4943
|
}
|
3405
4944
|
function codeFrameColumns2(rawLines, loc, opts = {}) {
|
3406
|
-
const
|
3407
|
-
const
|
4945
|
+
const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
|
4946
|
+
const chalk = getChalk(opts.forceColor);
|
4947
|
+
const defs = getDefs(chalk);
|
4948
|
+
const maybeHighlight = (chalkFn, string) => {
|
4949
|
+
return highlighted ? chalkFn(string) : string;
|
4950
|
+
};
|
3408
4951
|
const lines = rawLines.split(NEWLINE);
|
3409
4952
|
const {
|
3410
4953
|
start,
|
@@ -3413,9 +4956,9 @@ var require_lib6 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
3413
4956
|
} = getMarkerLines(loc, lines, opts);
|
3414
4957
|
const hasColumns = loc.start && typeof loc.start.column === "number";
|
3415
4958
|
const numberMaxWidth = String(end).length;
|
3416
|
-
const highlightedLines =
|
3417
|
-
let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line,
|
3418
|
-
const number = start + 1 +
|
4959
|
+
const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
|
4960
|
+
let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {
|
4961
|
+
const number = start + 1 + index;
|
3419
4962
|
const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
|
3420
4963
|
const gutter = ` ${paddedNumber} |`;
|
3421
4964
|
const hasMarker = markerLines[number];
|
@@ -3425,27 +4968,27 @@ var require_lib6 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
3425
4968
|
if (Array.isArray(hasMarker)) {
|
3426
4969
|
const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
|
3427
4970
|
const numberOfMarkers = hasMarker[1] || 1;
|
3428
|
-
markerLine = ["\n ", defs.gutter
|
4971
|
+
markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
|
3429
4972
|
if (lastMarkerLine && opts.message) {
|
3430
|
-
markerLine += " " + defs.message
|
4973
|
+
markerLine += " " + maybeHighlight(defs.message, opts.message);
|
3431
4974
|
}
|
3432
4975
|
}
|
3433
|
-
return [defs.marker
|
4976
|
+
return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
|
3434
4977
|
} else {
|
3435
|
-
return ` ${defs.gutter
|
4978
|
+
return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
|
3436
4979
|
}
|
3437
4980
|
}).join("\n");
|
3438
4981
|
if (opts.message && !hasColumns) {
|
3439
4982
|
frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
|
3440
4983
|
${frame}`;
|
3441
4984
|
}
|
3442
|
-
if (
|
3443
|
-
return
|
4985
|
+
if (highlighted) {
|
4986
|
+
return chalk.reset(frame);
|
3444
4987
|
} else {
|
3445
4988
|
return frame;
|
3446
4989
|
}
|
3447
4990
|
}
|
3448
|
-
function
|
4991
|
+
function _default(rawLines, lineNumber, colNumber, opts = {}) {
|
3449
4992
|
if (!deprecationWarningShown) {
|
3450
4993
|
deprecationWarningShown = true;
|
3451
4994
|
const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
|
@@ -3466,9 +5009,6 @@ ${frame}`;
|
|
3466
5009
|
};
|
3467
5010
|
return codeFrameColumns2(rawLines, location, opts);
|
3468
5011
|
}
|
3469
|
-
exports.codeFrameColumns = codeFrameColumns2;
|
3470
|
-
exports.default = index;
|
3471
|
-
exports.highlight = highlight;
|
3472
5012
|
}
|
3473
5013
|
});
|
3474
5014
|
var require_debug = (0, import_chunk_4VNS5WPM.__commonJS)({
|
@@ -4882,7 +6422,7 @@ var require_spdx_expression_parse = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
4882
6422
|
}
|
4883
6423
|
});
|
4884
6424
|
var require_spdx_correct = (0, import_chunk_4VNS5WPM.__commonJS)({
|
4885
|
-
"../../node_modules/.pnpm/spdx-correct@3.
|
6425
|
+
"../../node_modules/.pnpm/spdx-correct@3.1.1/node_modules/spdx-correct/index.js"(exports, module2) {
|
4886
6426
|
"use strict";
|
4887
6427
|
var parse = require_spdx_expression_parse();
|
4888
6428
|
var spdxLicenseIds = require_spdx_license_ids();
|
@@ -4894,11 +6434,6 @@ var require_spdx_correct = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
4894
6434
|
return false;
|
4895
6435
|
}
|
4896
6436
|
}
|
4897
|
-
function sortTranspositions(a, b) {
|
4898
|
-
var length = b[0].length - a[0].length;
|
4899
|
-
if (length !== 0) return length;
|
4900
|
-
return a[0].toUpperCase().localeCompare(b[0].toUpperCase());
|
4901
|
-
}
|
4902
6437
|
var transpositions = [
|
4903
6438
|
["APGL", "AGPL"],
|
4904
6439
|
["Gpl", "GPL"],
|
@@ -4914,17 +6449,8 @@ var require_spdx_correct = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
4914
6449
|
["GUN", "GPL"],
|
4915
6450
|
["+", ""],
|
4916
6451
|
["GNU GPL", "GPL"],
|
4917
|
-
["GNU LGPL", "LGPL"],
|
4918
6452
|
["GNU/GPL", "GPL"],
|
4919
6453
|
["GNU GLP", "GPL"],
|
4920
|
-
["GNU LESSER GENERAL PUBLIC LICENSE", "LGPL"],
|
4921
|
-
["GNU Lesser General Public License", "LGPL"],
|
4922
|
-
["GNU LESSER GENERAL PUBLIC LICENSE", "LGPL-2.1"],
|
4923
|
-
["GNU Lesser General Public License", "LGPL-2.1"],
|
4924
|
-
["LESSER GENERAL PUBLIC LICENSE", "LGPL"],
|
4925
|
-
["Lesser General Public License", "LGPL"],
|
4926
|
-
["LESSER GENERAL PUBLIC LICENSE", "LGPL-2.1"],
|
4927
|
-
["Lesser General Public License", "LGPL-2.1"],
|
4928
6454
|
["GNU General Public License", "GPL"],
|
4929
6455
|
["Gnu public license", "GPL"],
|
4930
6456
|
["GNU Public License", "GPL"],
|
@@ -4933,9 +6459,8 @@ var require_spdx_correct = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
4933
6459
|
["Mozilla Public License", "MPL"],
|
4934
6460
|
["Universal Permissive License", "UPL"],
|
4935
6461
|
["WTH", "WTF"],
|
4936
|
-
["WTFGPL", "WTFPL"],
|
4937
6462
|
["-License", ""]
|
4938
|
-
]
|
6463
|
+
];
|
4939
6464
|
var TRANSPOSED = 0;
|
4940
6465
|
var CORRECT = 1;
|
4941
6466
|
var transforms = [
|
@@ -5103,7 +6628,7 @@ var require_spdx_correct = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
5103
6628
|
["MPL", "MPL-2.0"],
|
5104
6629
|
["X11", "X11"],
|
5105
6630
|
["ZLIB", "Zlib"]
|
5106
|
-
].concat(licensesWithOneVersion)
|
6631
|
+
].concat(licensesWithOneVersion);
|
5107
6632
|
var SUBSTRING = 0;
|
5108
6633
|
var IDENTIFIER = 1;
|
5109
6634
|
var validTransformation = function(identifier) {
|
@@ -6659,7 +8184,7 @@ var require_commonjs = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
6659
8184
|
}
|
6660
8185
|
});
|
6661
8186
|
var require_hosts = (0, import_chunk_4VNS5WPM.__commonJS)({
|
6662
|
-
"../../node_modules/.pnpm/hosted-git-info@7.0.
|
8187
|
+
"../../node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/hosts.js"(exports, module2) {
|
6663
8188
|
"use strict";
|
6664
8189
|
var maybeJoin = (...args) => args.every((arg) => arg) ? args.join("") : "";
|
6665
8190
|
var maybeEncode = (arg) => arg ? encodeURIComponent(arg) : "";
|
@@ -6802,7 +8327,7 @@ var require_hosts = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
6802
8327
|
filetemplate: ({ domain, user, project, committish, path: path5 }) => `https://${domain}/${user}/${project}/blob/${maybeEncode(committish) || "HEAD"}/${path5}`,
|
6803
8328
|
httpstemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
|
6804
8329
|
tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/archive/${maybeEncode(committish) || "HEAD"}.tar.gz`,
|
6805
|
-
bugstemplate: () => null,
|
8330
|
+
bugstemplate: ({ user, project }) => null,
|
6806
8331
|
extract: (url) => {
|
6807
8332
|
let [, user, project, aux] = url.pathname.split("/", 4);
|
6808
8333
|
if (["archive"].includes(aux)) {
|
@@ -6824,7 +8349,7 @@ var require_hosts = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
6824
8349
|
}
|
6825
8350
|
});
|
6826
8351
|
var require_parse_url = (0, import_chunk_4VNS5WPM.__commonJS)({
|
6827
|
-
"../../node_modules/.pnpm/hosted-git-info@7.0.
|
8352
|
+
"../../node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/parse-url.js"(exports, module2) {
|
6828
8353
|
"use strict";
|
6829
8354
|
var url = (0, import_chunk_4VNS5WPM.__require)("url");
|
6830
8355
|
var lastIndexOfBefore = (str, char, beforeChar) => {
|
@@ -6875,7 +8400,7 @@ var require_parse_url = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
6875
8400
|
}
|
6876
8401
|
});
|
6877
8402
|
var require_from_url = (0, import_chunk_4VNS5WPM.__commonJS)({
|
6878
|
-
"../../node_modules/.pnpm/hosted-git-info@7.0.
|
8403
|
+
"../../node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/from-url.js"(exports, module2) {
|
6879
8404
|
"use strict";
|
6880
8405
|
var parseUrl = require_parse_url();
|
6881
8406
|
var isGitHubShorthand = (arg) => {
|
@@ -6966,8 +8491,8 @@ var require_from_url = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
6966
8491
|
};
|
6967
8492
|
}
|
6968
8493
|
});
|
6969
|
-
var
|
6970
|
-
"../../node_modules/.pnpm/hosted-git-info@7.0.
|
8494
|
+
var require_lib8 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
8495
|
+
"../../node_modules/.pnpm/hosted-git-info@7.0.1/node_modules/hosted-git-info/lib/index.js"(exports, module2) {
|
6971
8496
|
"use strict";
|
6972
8497
|
var { LRUCache } = require_commonjs();
|
6973
8498
|
var hosts = require_hosts();
|
@@ -7109,7 +8634,7 @@ var require_lib7 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
7109
8634
|
}
|
7110
8635
|
});
|
7111
8636
|
var require_extract_description = (0, import_chunk_4VNS5WPM.__commonJS)({
|
7112
|
-
"../../node_modules/.pnpm/normalize-package-data@6.0.
|
8637
|
+
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/extract_description.js"(exports, module2) {
|
7113
8638
|
"use strict";
|
7114
8639
|
module2.exports = extractDescription;
|
7115
8640
|
function extractDescription(d) {
|
@@ -7134,7 +8659,7 @@ var require_extract_description = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
7134
8659
|
}
|
7135
8660
|
});
|
7136
8661
|
var require_typos = (0, import_chunk_4VNS5WPM.__commonJS)({
|
7137
|
-
"../../node_modules/.pnpm/normalize-package-data@6.0.
|
8662
|
+
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/typos.json"(exports, module2) {
|
7138
8663
|
module2.exports = {
|
7139
8664
|
topLevel: {
|
7140
8665
|
dependancies: "dependencies",
|
@@ -7163,13 +8688,13 @@ var require_typos = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
7163
8688
|
}
|
7164
8689
|
});
|
7165
8690
|
var require_fixer = (0, import_chunk_4VNS5WPM.__commonJS)({
|
7166
|
-
"../../node_modules/.pnpm/normalize-package-data@6.0.
|
8691
|
+
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/fixer.js"(exports, module2) {
|
7167
8692
|
"use strict";
|
7168
8693
|
var isValidSemver = require_valid();
|
7169
8694
|
var cleanSemver = require_clean();
|
7170
8695
|
var validateLicense = require_validate_npm_package_license();
|
7171
|
-
var hostedGitInfo =
|
7172
|
-
var
|
8696
|
+
var hostedGitInfo = require_lib8();
|
8697
|
+
var isBuiltinModule = (0, import_chunk_67I7CEQJ.require_is_core_module)();
|
7173
8698
|
var depTypes = ["dependencies", "devDependencies", "optionalDependencies"];
|
7174
8699
|
var extractDescription = require_extract_description();
|
7175
8700
|
var url = (0, import_chunk_4VNS5WPM.__require)("url");
|
@@ -7296,7 +8821,7 @@ var require_fixer = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
7296
8821
|
}, this);
|
7297
8822
|
}
|
7298
8823
|
},
|
7299
|
-
fixDependencies: function(data) {
|
8824
|
+
fixDependencies: function(data, strict) {
|
7300
8825
|
objectifyDeps(data, this.warn);
|
7301
8826
|
addOptionalDepsToDeps(data, this.warn);
|
7302
8827
|
this.fixBundleDependenciesField(data);
|
@@ -7380,7 +8905,7 @@ var require_fixer = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
7380
8905
|
data.name = data.name.trim();
|
7381
8906
|
}
|
7382
8907
|
ensureValidName(data.name, strict, options.allowLegacyCase);
|
7383
|
-
if (
|
8908
|
+
if (isBuiltinModule(data.name)) {
|
7384
8909
|
this.warn("conflictingName", data.name);
|
7385
8910
|
}
|
7386
8911
|
},
|
@@ -7536,7 +9061,7 @@ var require_fixer = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
7536
9061
|
}
|
7537
9062
|
return obj;
|
7538
9063
|
}
|
7539
|
-
function addOptionalDepsToDeps(data) {
|
9064
|
+
function addOptionalDepsToDeps(data, warn) {
|
7540
9065
|
var o = data.optionalDependencies;
|
7541
9066
|
if (!o) {
|
7542
9067
|
return;
|
@@ -7594,7 +9119,7 @@ var require_fixer = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
7594
9119
|
}
|
7595
9120
|
});
|
7596
9121
|
var require_warning_messages = (0, import_chunk_4VNS5WPM.__commonJS)({
|
7597
|
-
"../../node_modules/.pnpm/normalize-package-data@6.0.
|
9122
|
+
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/warning_messages.json"(exports, module2) {
|
7598
9123
|
module2.exports = {
|
7599
9124
|
repositories: "'repositories' (plural) Not supported. Please pick one as the 'repository' field",
|
7600
9125
|
missingRepository: "No repository field.",
|
@@ -7628,7 +9153,7 @@ var require_warning_messages = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
7628
9153
|
}
|
7629
9154
|
});
|
7630
9155
|
var require_make_warning = (0, import_chunk_4VNS5WPM.__commonJS)({
|
7631
|
-
"../../node_modules/.pnpm/normalize-package-data@6.0.
|
9156
|
+
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/make_warning.js"(exports, module2) {
|
7632
9157
|
"use strict";
|
7633
9158
|
var util = (0, import_chunk_4VNS5WPM.__require)("util");
|
7634
9159
|
var messages = require_warning_messages();
|
@@ -7653,7 +9178,7 @@ var require_make_warning = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
7653
9178
|
}
|
7654
9179
|
});
|
7655
9180
|
var require_normalize = (0, import_chunk_4VNS5WPM.__commonJS)({
|
7656
|
-
"../../node_modules/.pnpm/normalize-package-data@6.0.
|
9181
|
+
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/normalize.js"(exports, module2) {
|
7657
9182
|
"use strict";
|
7658
9183
|
module2.exports = normalize;
|
7659
9184
|
var fixer = require_fixer();
|
@@ -7689,7 +9214,7 @@ var require_normalize = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
7689
9214
|
strict = false;
|
7690
9215
|
}
|
7691
9216
|
if (!warn || data.private) {
|
7692
|
-
warn = function() {
|
9217
|
+
warn = function(msg) {
|
7693
9218
|
};
|
7694
9219
|
}
|
7695
9220
|
if (data.scripts && data.scripts.install === "node-gyp rebuild" && !data.scripts.preinstall) {
|
@@ -7727,6 +9252,778 @@ var require_unique_string = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
7727
9252
|
module2.exports = () => cryptoRandomString(32);
|
7728
9253
|
}
|
7729
9254
|
});
|
9255
|
+
var require_polyfills = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9256
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js"(exports, module2) {
|
9257
|
+
"use strict";
|
9258
|
+
var constants = (0, import_chunk_4VNS5WPM.__require)("constants");
|
9259
|
+
var origCwd = process.cwd;
|
9260
|
+
var cwd = null;
|
9261
|
+
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
9262
|
+
process.cwd = function() {
|
9263
|
+
if (!cwd)
|
9264
|
+
cwd = origCwd.call(process);
|
9265
|
+
return cwd;
|
9266
|
+
};
|
9267
|
+
try {
|
9268
|
+
process.cwd();
|
9269
|
+
} catch (er) {
|
9270
|
+
}
|
9271
|
+
if (typeof process.chdir === "function") {
|
9272
|
+
chdir = process.chdir;
|
9273
|
+
process.chdir = function(d) {
|
9274
|
+
cwd = null;
|
9275
|
+
chdir.call(process, d);
|
9276
|
+
};
|
9277
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
|
9278
|
+
}
|
9279
|
+
var chdir;
|
9280
|
+
module2.exports = patch;
|
9281
|
+
function patch(fs4) {
|
9282
|
+
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
9283
|
+
patchLchmod(fs4);
|
9284
|
+
}
|
9285
|
+
if (!fs4.lutimes) {
|
9286
|
+
patchLutimes(fs4);
|
9287
|
+
}
|
9288
|
+
fs4.chown = chownFix(fs4.chown);
|
9289
|
+
fs4.fchown = chownFix(fs4.fchown);
|
9290
|
+
fs4.lchown = chownFix(fs4.lchown);
|
9291
|
+
fs4.chmod = chmodFix(fs4.chmod);
|
9292
|
+
fs4.fchmod = chmodFix(fs4.fchmod);
|
9293
|
+
fs4.lchmod = chmodFix(fs4.lchmod);
|
9294
|
+
fs4.chownSync = chownFixSync(fs4.chownSync);
|
9295
|
+
fs4.fchownSync = chownFixSync(fs4.fchownSync);
|
9296
|
+
fs4.lchownSync = chownFixSync(fs4.lchownSync);
|
9297
|
+
fs4.chmodSync = chmodFixSync(fs4.chmodSync);
|
9298
|
+
fs4.fchmodSync = chmodFixSync(fs4.fchmodSync);
|
9299
|
+
fs4.lchmodSync = chmodFixSync(fs4.lchmodSync);
|
9300
|
+
fs4.stat = statFix(fs4.stat);
|
9301
|
+
fs4.fstat = statFix(fs4.fstat);
|
9302
|
+
fs4.lstat = statFix(fs4.lstat);
|
9303
|
+
fs4.statSync = statFixSync(fs4.statSync);
|
9304
|
+
fs4.fstatSync = statFixSync(fs4.fstatSync);
|
9305
|
+
fs4.lstatSync = statFixSync(fs4.lstatSync);
|
9306
|
+
if (fs4.chmod && !fs4.lchmod) {
|
9307
|
+
fs4.lchmod = function(path5, mode, cb) {
|
9308
|
+
if (cb) process.nextTick(cb);
|
9309
|
+
};
|
9310
|
+
fs4.lchmodSync = function() {
|
9311
|
+
};
|
9312
|
+
}
|
9313
|
+
if (fs4.chown && !fs4.lchown) {
|
9314
|
+
fs4.lchown = function(path5, uid, gid, cb) {
|
9315
|
+
if (cb) process.nextTick(cb);
|
9316
|
+
};
|
9317
|
+
fs4.lchownSync = function() {
|
9318
|
+
};
|
9319
|
+
}
|
9320
|
+
if (platform === "win32") {
|
9321
|
+
fs4.rename = typeof fs4.rename !== "function" ? fs4.rename : function(fs$rename) {
|
9322
|
+
function rename(from, to, cb) {
|
9323
|
+
var start = Date.now();
|
9324
|
+
var backoff = 0;
|
9325
|
+
fs$rename(from, to, function CB(er) {
|
9326
|
+
if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) {
|
9327
|
+
setTimeout(function() {
|
9328
|
+
fs4.stat(to, function(stater, st) {
|
9329
|
+
if (stater && stater.code === "ENOENT")
|
9330
|
+
fs$rename(from, to, CB);
|
9331
|
+
else
|
9332
|
+
cb(er);
|
9333
|
+
});
|
9334
|
+
}, backoff);
|
9335
|
+
if (backoff < 100)
|
9336
|
+
backoff += 10;
|
9337
|
+
return;
|
9338
|
+
}
|
9339
|
+
if (cb) cb(er);
|
9340
|
+
});
|
9341
|
+
}
|
9342
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
9343
|
+
return rename;
|
9344
|
+
}(fs4.rename);
|
9345
|
+
}
|
9346
|
+
fs4.read = typeof fs4.read !== "function" ? fs4.read : function(fs$read) {
|
9347
|
+
function read(fd, buffer, offset, length, position, callback_) {
|
9348
|
+
var callback;
|
9349
|
+
if (callback_ && typeof callback_ === "function") {
|
9350
|
+
var eagCounter = 0;
|
9351
|
+
callback = function(er, _, __) {
|
9352
|
+
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
9353
|
+
eagCounter++;
|
9354
|
+
return fs$read.call(fs4, fd, buffer, offset, length, position, callback);
|
9355
|
+
}
|
9356
|
+
callback_.apply(this, arguments);
|
9357
|
+
};
|
9358
|
+
}
|
9359
|
+
return fs$read.call(fs4, fd, buffer, offset, length, position, callback);
|
9360
|
+
}
|
9361
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
9362
|
+
return read;
|
9363
|
+
}(fs4.read);
|
9364
|
+
fs4.readSync = typeof fs4.readSync !== "function" ? fs4.readSync : /* @__PURE__ */ function(fs$readSync) {
|
9365
|
+
return function(fd, buffer, offset, length, position) {
|
9366
|
+
var eagCounter = 0;
|
9367
|
+
while (true) {
|
9368
|
+
try {
|
9369
|
+
return fs$readSync.call(fs4, fd, buffer, offset, length, position);
|
9370
|
+
} catch (er) {
|
9371
|
+
if (er.code === "EAGAIN" && eagCounter < 10) {
|
9372
|
+
eagCounter++;
|
9373
|
+
continue;
|
9374
|
+
}
|
9375
|
+
throw er;
|
9376
|
+
}
|
9377
|
+
}
|
9378
|
+
};
|
9379
|
+
}(fs4.readSync);
|
9380
|
+
function patchLchmod(fs5) {
|
9381
|
+
fs5.lchmod = function(path5, mode, callback) {
|
9382
|
+
fs5.open(
|
9383
|
+
path5,
|
9384
|
+
constants.O_WRONLY | constants.O_SYMLINK,
|
9385
|
+
mode,
|
9386
|
+
function(err, fd) {
|
9387
|
+
if (err) {
|
9388
|
+
if (callback) callback(err);
|
9389
|
+
return;
|
9390
|
+
}
|
9391
|
+
fs5.fchmod(fd, mode, function(err2) {
|
9392
|
+
fs5.close(fd, function(err22) {
|
9393
|
+
if (callback) callback(err2 || err22);
|
9394
|
+
});
|
9395
|
+
});
|
9396
|
+
}
|
9397
|
+
);
|
9398
|
+
};
|
9399
|
+
fs5.lchmodSync = function(path5, mode) {
|
9400
|
+
var fd = fs5.openSync(path5, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
9401
|
+
var threw = true;
|
9402
|
+
var ret;
|
9403
|
+
try {
|
9404
|
+
ret = fs5.fchmodSync(fd, mode);
|
9405
|
+
threw = false;
|
9406
|
+
} finally {
|
9407
|
+
if (threw) {
|
9408
|
+
try {
|
9409
|
+
fs5.closeSync(fd);
|
9410
|
+
} catch (er) {
|
9411
|
+
}
|
9412
|
+
} else {
|
9413
|
+
fs5.closeSync(fd);
|
9414
|
+
}
|
9415
|
+
}
|
9416
|
+
return ret;
|
9417
|
+
};
|
9418
|
+
}
|
9419
|
+
function patchLutimes(fs5) {
|
9420
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs5.futimes) {
|
9421
|
+
fs5.lutimes = function(path5, at, mt, cb) {
|
9422
|
+
fs5.open(path5, constants.O_SYMLINK, function(er, fd) {
|
9423
|
+
if (er) {
|
9424
|
+
if (cb) cb(er);
|
9425
|
+
return;
|
9426
|
+
}
|
9427
|
+
fs5.futimes(fd, at, mt, function(er2) {
|
9428
|
+
fs5.close(fd, function(er22) {
|
9429
|
+
if (cb) cb(er2 || er22);
|
9430
|
+
});
|
9431
|
+
});
|
9432
|
+
});
|
9433
|
+
};
|
9434
|
+
fs5.lutimesSync = function(path5, at, mt) {
|
9435
|
+
var fd = fs5.openSync(path5, constants.O_SYMLINK);
|
9436
|
+
var ret;
|
9437
|
+
var threw = true;
|
9438
|
+
try {
|
9439
|
+
ret = fs5.futimesSync(fd, at, mt);
|
9440
|
+
threw = false;
|
9441
|
+
} finally {
|
9442
|
+
if (threw) {
|
9443
|
+
try {
|
9444
|
+
fs5.closeSync(fd);
|
9445
|
+
} catch (er) {
|
9446
|
+
}
|
9447
|
+
} else {
|
9448
|
+
fs5.closeSync(fd);
|
9449
|
+
}
|
9450
|
+
}
|
9451
|
+
return ret;
|
9452
|
+
};
|
9453
|
+
} else if (fs5.futimes) {
|
9454
|
+
fs5.lutimes = function(_a, _b, _c, cb) {
|
9455
|
+
if (cb) process.nextTick(cb);
|
9456
|
+
};
|
9457
|
+
fs5.lutimesSync = function() {
|
9458
|
+
};
|
9459
|
+
}
|
9460
|
+
}
|
9461
|
+
function chmodFix(orig) {
|
9462
|
+
if (!orig) return orig;
|
9463
|
+
return function(target, mode, cb) {
|
9464
|
+
return orig.call(fs4, target, mode, function(er) {
|
9465
|
+
if (chownErOk(er)) er = null;
|
9466
|
+
if (cb) cb.apply(this, arguments);
|
9467
|
+
});
|
9468
|
+
};
|
9469
|
+
}
|
9470
|
+
function chmodFixSync(orig) {
|
9471
|
+
if (!orig) return orig;
|
9472
|
+
return function(target, mode) {
|
9473
|
+
try {
|
9474
|
+
return orig.call(fs4, target, mode);
|
9475
|
+
} catch (er) {
|
9476
|
+
if (!chownErOk(er)) throw er;
|
9477
|
+
}
|
9478
|
+
};
|
9479
|
+
}
|
9480
|
+
function chownFix(orig) {
|
9481
|
+
if (!orig) return orig;
|
9482
|
+
return function(target, uid, gid, cb) {
|
9483
|
+
return orig.call(fs4, target, uid, gid, function(er) {
|
9484
|
+
if (chownErOk(er)) er = null;
|
9485
|
+
if (cb) cb.apply(this, arguments);
|
9486
|
+
});
|
9487
|
+
};
|
9488
|
+
}
|
9489
|
+
function chownFixSync(orig) {
|
9490
|
+
if (!orig) return orig;
|
9491
|
+
return function(target, uid, gid) {
|
9492
|
+
try {
|
9493
|
+
return orig.call(fs4, target, uid, gid);
|
9494
|
+
} catch (er) {
|
9495
|
+
if (!chownErOk(er)) throw er;
|
9496
|
+
}
|
9497
|
+
};
|
9498
|
+
}
|
9499
|
+
function statFix(orig) {
|
9500
|
+
if (!orig) return orig;
|
9501
|
+
return function(target, options, cb) {
|
9502
|
+
if (typeof options === "function") {
|
9503
|
+
cb = options;
|
9504
|
+
options = null;
|
9505
|
+
}
|
9506
|
+
function callback(er, stats) {
|
9507
|
+
if (stats) {
|
9508
|
+
if (stats.uid < 0) stats.uid += 4294967296;
|
9509
|
+
if (stats.gid < 0) stats.gid += 4294967296;
|
9510
|
+
}
|
9511
|
+
if (cb) cb.apply(this, arguments);
|
9512
|
+
}
|
9513
|
+
return options ? orig.call(fs4, target, options, callback) : orig.call(fs4, target, callback);
|
9514
|
+
};
|
9515
|
+
}
|
9516
|
+
function statFixSync(orig) {
|
9517
|
+
if (!orig) return orig;
|
9518
|
+
return function(target, options) {
|
9519
|
+
var stats = options ? orig.call(fs4, target, options) : orig.call(fs4, target);
|
9520
|
+
if (stats) {
|
9521
|
+
if (stats.uid < 0) stats.uid += 4294967296;
|
9522
|
+
if (stats.gid < 0) stats.gid += 4294967296;
|
9523
|
+
}
|
9524
|
+
return stats;
|
9525
|
+
};
|
9526
|
+
}
|
9527
|
+
function chownErOk(er) {
|
9528
|
+
if (!er)
|
9529
|
+
return true;
|
9530
|
+
if (er.code === "ENOSYS")
|
9531
|
+
return true;
|
9532
|
+
var nonroot = !process.getuid || process.getuid() !== 0;
|
9533
|
+
if (nonroot) {
|
9534
|
+
if (er.code === "EINVAL" || er.code === "EPERM")
|
9535
|
+
return true;
|
9536
|
+
}
|
9537
|
+
return false;
|
9538
|
+
}
|
9539
|
+
}
|
9540
|
+
}
|
9541
|
+
});
|
9542
|
+
var require_legacy_streams = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9543
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js"(exports, module2) {
|
9544
|
+
"use strict";
|
9545
|
+
var Stream = (0, import_chunk_4VNS5WPM.__require)("stream").Stream;
|
9546
|
+
module2.exports = legacy;
|
9547
|
+
function legacy(fs4) {
|
9548
|
+
return {
|
9549
|
+
ReadStream,
|
9550
|
+
WriteStream
|
9551
|
+
};
|
9552
|
+
function ReadStream(path5, options) {
|
9553
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path5, options);
|
9554
|
+
Stream.call(this);
|
9555
|
+
var self = this;
|
9556
|
+
this.path = path5;
|
9557
|
+
this.fd = null;
|
9558
|
+
this.readable = true;
|
9559
|
+
this.paused = false;
|
9560
|
+
this.flags = "r";
|
9561
|
+
this.mode = 438;
|
9562
|
+
this.bufferSize = 64 * 1024;
|
9563
|
+
options = options || {};
|
9564
|
+
var keys = Object.keys(options);
|
9565
|
+
for (var index = 0, length = keys.length; index < length; index++) {
|
9566
|
+
var key = keys[index];
|
9567
|
+
this[key] = options[key];
|
9568
|
+
}
|
9569
|
+
if (this.encoding) this.setEncoding(this.encoding);
|
9570
|
+
if (this.start !== void 0) {
|
9571
|
+
if ("number" !== typeof this.start) {
|
9572
|
+
throw TypeError("start must be a Number");
|
9573
|
+
}
|
9574
|
+
if (this.end === void 0) {
|
9575
|
+
this.end = Infinity;
|
9576
|
+
} else if ("number" !== typeof this.end) {
|
9577
|
+
throw TypeError("end must be a Number");
|
9578
|
+
}
|
9579
|
+
if (this.start > this.end) {
|
9580
|
+
throw new Error("start must be <= end");
|
9581
|
+
}
|
9582
|
+
this.pos = this.start;
|
9583
|
+
}
|
9584
|
+
if (this.fd !== null) {
|
9585
|
+
process.nextTick(function() {
|
9586
|
+
self._read();
|
9587
|
+
});
|
9588
|
+
return;
|
9589
|
+
}
|
9590
|
+
fs4.open(this.path, this.flags, this.mode, function(err, fd) {
|
9591
|
+
if (err) {
|
9592
|
+
self.emit("error", err);
|
9593
|
+
self.readable = false;
|
9594
|
+
return;
|
9595
|
+
}
|
9596
|
+
self.fd = fd;
|
9597
|
+
self.emit("open", fd);
|
9598
|
+
self._read();
|
9599
|
+
});
|
9600
|
+
}
|
9601
|
+
function WriteStream(path5, options) {
|
9602
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path5, options);
|
9603
|
+
Stream.call(this);
|
9604
|
+
this.path = path5;
|
9605
|
+
this.fd = null;
|
9606
|
+
this.writable = true;
|
9607
|
+
this.flags = "w";
|
9608
|
+
this.encoding = "binary";
|
9609
|
+
this.mode = 438;
|
9610
|
+
this.bytesWritten = 0;
|
9611
|
+
options = options || {};
|
9612
|
+
var keys = Object.keys(options);
|
9613
|
+
for (var index = 0, length = keys.length; index < length; index++) {
|
9614
|
+
var key = keys[index];
|
9615
|
+
this[key] = options[key];
|
9616
|
+
}
|
9617
|
+
if (this.start !== void 0) {
|
9618
|
+
if ("number" !== typeof this.start) {
|
9619
|
+
throw TypeError("start must be a Number");
|
9620
|
+
}
|
9621
|
+
if (this.start < 0) {
|
9622
|
+
throw new Error("start must be >= zero");
|
9623
|
+
}
|
9624
|
+
this.pos = this.start;
|
9625
|
+
}
|
9626
|
+
this.busy = false;
|
9627
|
+
this._queue = [];
|
9628
|
+
if (this.fd === null) {
|
9629
|
+
this._open = fs4.open;
|
9630
|
+
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
9631
|
+
this.flush();
|
9632
|
+
}
|
9633
|
+
}
|
9634
|
+
}
|
9635
|
+
}
|
9636
|
+
});
|
9637
|
+
var require_clone = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9638
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js"(exports, module2) {
|
9639
|
+
"use strict";
|
9640
|
+
module2.exports = clone;
|
9641
|
+
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
|
9642
|
+
return obj.__proto__;
|
9643
|
+
};
|
9644
|
+
function clone(obj) {
|
9645
|
+
if (obj === null || typeof obj !== "object")
|
9646
|
+
return obj;
|
9647
|
+
if (obj instanceof Object)
|
9648
|
+
var copy = { __proto__: getPrototypeOf(obj) };
|
9649
|
+
else
|
9650
|
+
var copy = /* @__PURE__ */ Object.create(null);
|
9651
|
+
Object.getOwnPropertyNames(obj).forEach(function(key) {
|
9652
|
+
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
|
9653
|
+
});
|
9654
|
+
return copy;
|
9655
|
+
}
|
9656
|
+
}
|
9657
|
+
});
|
9658
|
+
var require_graceful_fs = (0, import_chunk_4VNS5WPM.__commonJS)({
|
9659
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js"(exports, module2) {
|
9660
|
+
"use strict";
|
9661
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
9662
|
+
var polyfills = require_polyfills();
|
9663
|
+
var legacy = require_legacy_streams();
|
9664
|
+
var clone = require_clone();
|
9665
|
+
var util = (0, import_chunk_4VNS5WPM.__require)("util");
|
9666
|
+
var gracefulQueue;
|
9667
|
+
var previousSymbol;
|
9668
|
+
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
|
9669
|
+
gracefulQueue = Symbol.for("graceful-fs.queue");
|
9670
|
+
previousSymbol = Symbol.for("graceful-fs.previous");
|
9671
|
+
} else {
|
9672
|
+
gracefulQueue = "___graceful-fs.queue";
|
9673
|
+
previousSymbol = "___graceful-fs.previous";
|
9674
|
+
}
|
9675
|
+
function noop() {
|
9676
|
+
}
|
9677
|
+
function publishQueue(context, queue2) {
|
9678
|
+
Object.defineProperty(context, gracefulQueue, {
|
9679
|
+
get: function() {
|
9680
|
+
return queue2;
|
9681
|
+
}
|
9682
|
+
});
|
9683
|
+
}
|
9684
|
+
var debug = noop;
|
9685
|
+
if (util.debuglog)
|
9686
|
+
debug = util.debuglog("gfs4");
|
9687
|
+
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
9688
|
+
debug = function() {
|
9689
|
+
var m = util.format.apply(util, arguments);
|
9690
|
+
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
9691
|
+
console.error(m);
|
9692
|
+
};
|
9693
|
+
if (!fs4[gracefulQueue]) {
|
9694
|
+
queue = global[gracefulQueue] || [];
|
9695
|
+
publishQueue(fs4, queue);
|
9696
|
+
fs4.close = function(fs$close) {
|
9697
|
+
function close(fd, cb) {
|
9698
|
+
return fs$close.call(fs4, fd, function(err) {
|
9699
|
+
if (!err) {
|
9700
|
+
resetQueue();
|
9701
|
+
}
|
9702
|
+
if (typeof cb === "function")
|
9703
|
+
cb.apply(this, arguments);
|
9704
|
+
});
|
9705
|
+
}
|
9706
|
+
Object.defineProperty(close, previousSymbol, {
|
9707
|
+
value: fs$close
|
9708
|
+
});
|
9709
|
+
return close;
|
9710
|
+
}(fs4.close);
|
9711
|
+
fs4.closeSync = function(fs$closeSync) {
|
9712
|
+
function closeSync(fd) {
|
9713
|
+
fs$closeSync.apply(fs4, arguments);
|
9714
|
+
resetQueue();
|
9715
|
+
}
|
9716
|
+
Object.defineProperty(closeSync, previousSymbol, {
|
9717
|
+
value: fs$closeSync
|
9718
|
+
});
|
9719
|
+
return closeSync;
|
9720
|
+
}(fs4.closeSync);
|
9721
|
+
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
9722
|
+
process.on("exit", function() {
|
9723
|
+
debug(fs4[gracefulQueue]);
|
9724
|
+
(0, import_chunk_4VNS5WPM.__require)("assert").equal(fs4[gracefulQueue].length, 0);
|
9725
|
+
});
|
9726
|
+
}
|
9727
|
+
}
|
9728
|
+
var queue;
|
9729
|
+
if (!global[gracefulQueue]) {
|
9730
|
+
publishQueue(global, fs4[gracefulQueue]);
|
9731
|
+
}
|
9732
|
+
module2.exports = patch(clone(fs4));
|
9733
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs4.__patched) {
|
9734
|
+
module2.exports = patch(fs4);
|
9735
|
+
fs4.__patched = true;
|
9736
|
+
}
|
9737
|
+
function patch(fs5) {
|
9738
|
+
polyfills(fs5);
|
9739
|
+
fs5.gracefulify = patch;
|
9740
|
+
fs5.createReadStream = createReadStream;
|
9741
|
+
fs5.createWriteStream = createWriteStream;
|
9742
|
+
var fs$readFile = fs5.readFile;
|
9743
|
+
fs5.readFile = readFile;
|
9744
|
+
function readFile(path5, options, cb) {
|
9745
|
+
if (typeof options === "function")
|
9746
|
+
cb = options, options = null;
|
9747
|
+
return go$readFile(path5, options, cb);
|
9748
|
+
function go$readFile(path6, options2, cb2, startTime) {
|
9749
|
+
return fs$readFile(path6, options2, function(err) {
|
9750
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
9751
|
+
enqueue([go$readFile, [path6, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
9752
|
+
else {
|
9753
|
+
if (typeof cb2 === "function")
|
9754
|
+
cb2.apply(this, arguments);
|
9755
|
+
}
|
9756
|
+
});
|
9757
|
+
}
|
9758
|
+
}
|
9759
|
+
var fs$writeFile = fs5.writeFile;
|
9760
|
+
fs5.writeFile = writeFile;
|
9761
|
+
function writeFile(path5, data, options, cb) {
|
9762
|
+
if (typeof options === "function")
|
9763
|
+
cb = options, options = null;
|
9764
|
+
return go$writeFile(path5, data, options, cb);
|
9765
|
+
function go$writeFile(path6, data2, options2, cb2, startTime) {
|
9766
|
+
return fs$writeFile(path6, data2, options2, function(err) {
|
9767
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
9768
|
+
enqueue([go$writeFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
9769
|
+
else {
|
9770
|
+
if (typeof cb2 === "function")
|
9771
|
+
cb2.apply(this, arguments);
|
9772
|
+
}
|
9773
|
+
});
|
9774
|
+
}
|
9775
|
+
}
|
9776
|
+
var fs$appendFile = fs5.appendFile;
|
9777
|
+
if (fs$appendFile)
|
9778
|
+
fs5.appendFile = appendFile;
|
9779
|
+
function appendFile(path5, data, options, cb) {
|
9780
|
+
if (typeof options === "function")
|
9781
|
+
cb = options, options = null;
|
9782
|
+
return go$appendFile(path5, data, options, cb);
|
9783
|
+
function go$appendFile(path6, data2, options2, cb2, startTime) {
|
9784
|
+
return fs$appendFile(path6, data2, options2, function(err) {
|
9785
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
9786
|
+
enqueue([go$appendFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
9787
|
+
else {
|
9788
|
+
if (typeof cb2 === "function")
|
9789
|
+
cb2.apply(this, arguments);
|
9790
|
+
}
|
9791
|
+
});
|
9792
|
+
}
|
9793
|
+
}
|
9794
|
+
var fs$copyFile = fs5.copyFile;
|
9795
|
+
if (fs$copyFile)
|
9796
|
+
fs5.copyFile = copyFile;
|
9797
|
+
function copyFile(src, dest, flags, cb) {
|
9798
|
+
if (typeof flags === "function") {
|
9799
|
+
cb = flags;
|
9800
|
+
flags = 0;
|
9801
|
+
}
|
9802
|
+
return go$copyFile(src, dest, flags, cb);
|
9803
|
+
function go$copyFile(src2, dest2, flags2, cb2, startTime) {
|
9804
|
+
return fs$copyFile(src2, dest2, flags2, function(err) {
|
9805
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
9806
|
+
enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
|
9807
|
+
else {
|
9808
|
+
if (typeof cb2 === "function")
|
9809
|
+
cb2.apply(this, arguments);
|
9810
|
+
}
|
9811
|
+
});
|
9812
|
+
}
|
9813
|
+
}
|
9814
|
+
var fs$readdir = fs5.readdir;
|
9815
|
+
fs5.readdir = readdir;
|
9816
|
+
var noReaddirOptionVersions = /^v[0-5]\./;
|
9817
|
+
function readdir(path5, options, cb) {
|
9818
|
+
if (typeof options === "function")
|
9819
|
+
cb = options, options = null;
|
9820
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path6, options2, cb2, startTime) {
|
9821
|
+
return fs$readdir(path6, fs$readdirCallback(
|
9822
|
+
path6,
|
9823
|
+
options2,
|
9824
|
+
cb2,
|
9825
|
+
startTime
|
9826
|
+
));
|
9827
|
+
} : function go$readdir2(path6, options2, cb2, startTime) {
|
9828
|
+
return fs$readdir(path6, options2, fs$readdirCallback(
|
9829
|
+
path6,
|
9830
|
+
options2,
|
9831
|
+
cb2,
|
9832
|
+
startTime
|
9833
|
+
));
|
9834
|
+
};
|
9835
|
+
return go$readdir(path5, options, cb);
|
9836
|
+
function fs$readdirCallback(path6, options2, cb2, startTime) {
|
9837
|
+
return function(err, files) {
|
9838
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
9839
|
+
enqueue([
|
9840
|
+
go$readdir,
|
9841
|
+
[path6, options2, cb2],
|
9842
|
+
err,
|
9843
|
+
startTime || Date.now(),
|
9844
|
+
Date.now()
|
9845
|
+
]);
|
9846
|
+
else {
|
9847
|
+
if (files && files.sort)
|
9848
|
+
files.sort();
|
9849
|
+
if (typeof cb2 === "function")
|
9850
|
+
cb2.call(this, err, files);
|
9851
|
+
}
|
9852
|
+
};
|
9853
|
+
}
|
9854
|
+
}
|
9855
|
+
if (process.version.substr(0, 4) === "v0.8") {
|
9856
|
+
var legStreams = legacy(fs5);
|
9857
|
+
ReadStream = legStreams.ReadStream;
|
9858
|
+
WriteStream = legStreams.WriteStream;
|
9859
|
+
}
|
9860
|
+
var fs$ReadStream = fs5.ReadStream;
|
9861
|
+
if (fs$ReadStream) {
|
9862
|
+
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
9863
|
+
ReadStream.prototype.open = ReadStream$open;
|
9864
|
+
}
|
9865
|
+
var fs$WriteStream = fs5.WriteStream;
|
9866
|
+
if (fs$WriteStream) {
|
9867
|
+
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
9868
|
+
WriteStream.prototype.open = WriteStream$open;
|
9869
|
+
}
|
9870
|
+
Object.defineProperty(fs5, "ReadStream", {
|
9871
|
+
get: function() {
|
9872
|
+
return ReadStream;
|
9873
|
+
},
|
9874
|
+
set: function(val) {
|
9875
|
+
ReadStream = val;
|
9876
|
+
},
|
9877
|
+
enumerable: true,
|
9878
|
+
configurable: true
|
9879
|
+
});
|
9880
|
+
Object.defineProperty(fs5, "WriteStream", {
|
9881
|
+
get: function() {
|
9882
|
+
return WriteStream;
|
9883
|
+
},
|
9884
|
+
set: function(val) {
|
9885
|
+
WriteStream = val;
|
9886
|
+
},
|
9887
|
+
enumerable: true,
|
9888
|
+
configurable: true
|
9889
|
+
});
|
9890
|
+
var FileReadStream = ReadStream;
|
9891
|
+
Object.defineProperty(fs5, "FileReadStream", {
|
9892
|
+
get: function() {
|
9893
|
+
return FileReadStream;
|
9894
|
+
},
|
9895
|
+
set: function(val) {
|
9896
|
+
FileReadStream = val;
|
9897
|
+
},
|
9898
|
+
enumerable: true,
|
9899
|
+
configurable: true
|
9900
|
+
});
|
9901
|
+
var FileWriteStream = WriteStream;
|
9902
|
+
Object.defineProperty(fs5, "FileWriteStream", {
|
9903
|
+
get: function() {
|
9904
|
+
return FileWriteStream;
|
9905
|
+
},
|
9906
|
+
set: function(val) {
|
9907
|
+
FileWriteStream = val;
|
9908
|
+
},
|
9909
|
+
enumerable: true,
|
9910
|
+
configurable: true
|
9911
|
+
});
|
9912
|
+
function ReadStream(path5, options) {
|
9913
|
+
if (this instanceof ReadStream)
|
9914
|
+
return fs$ReadStream.apply(this, arguments), this;
|
9915
|
+
else
|
9916
|
+
return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
|
9917
|
+
}
|
9918
|
+
function ReadStream$open() {
|
9919
|
+
var that = this;
|
9920
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
9921
|
+
if (err) {
|
9922
|
+
if (that.autoClose)
|
9923
|
+
that.destroy();
|
9924
|
+
that.emit("error", err);
|
9925
|
+
} else {
|
9926
|
+
that.fd = fd;
|
9927
|
+
that.emit("open", fd);
|
9928
|
+
that.read();
|
9929
|
+
}
|
9930
|
+
});
|
9931
|
+
}
|
9932
|
+
function WriteStream(path5, options) {
|
9933
|
+
if (this instanceof WriteStream)
|
9934
|
+
return fs$WriteStream.apply(this, arguments), this;
|
9935
|
+
else
|
9936
|
+
return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
|
9937
|
+
}
|
9938
|
+
function WriteStream$open() {
|
9939
|
+
var that = this;
|
9940
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
9941
|
+
if (err) {
|
9942
|
+
that.destroy();
|
9943
|
+
that.emit("error", err);
|
9944
|
+
} else {
|
9945
|
+
that.fd = fd;
|
9946
|
+
that.emit("open", fd);
|
9947
|
+
}
|
9948
|
+
});
|
9949
|
+
}
|
9950
|
+
function createReadStream(path5, options) {
|
9951
|
+
return new fs5.ReadStream(path5, options);
|
9952
|
+
}
|
9953
|
+
function createWriteStream(path5, options) {
|
9954
|
+
return new fs5.WriteStream(path5, options);
|
9955
|
+
}
|
9956
|
+
var fs$open = fs5.open;
|
9957
|
+
fs5.open = open;
|
9958
|
+
function open(path5, flags, mode, cb) {
|
9959
|
+
if (typeof mode === "function")
|
9960
|
+
cb = mode, mode = null;
|
9961
|
+
return go$open(path5, flags, mode, cb);
|
9962
|
+
function go$open(path6, flags2, mode2, cb2, startTime) {
|
9963
|
+
return fs$open(path6, flags2, mode2, function(err, fd) {
|
9964
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
9965
|
+
enqueue([go$open, [path6, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
9966
|
+
else {
|
9967
|
+
if (typeof cb2 === "function")
|
9968
|
+
cb2.apply(this, arguments);
|
9969
|
+
}
|
9970
|
+
});
|
9971
|
+
}
|
9972
|
+
}
|
9973
|
+
return fs5;
|
9974
|
+
}
|
9975
|
+
function enqueue(elem) {
|
9976
|
+
debug("ENQUEUE", elem[0].name, elem[1]);
|
9977
|
+
fs4[gracefulQueue].push(elem);
|
9978
|
+
retry();
|
9979
|
+
}
|
9980
|
+
var retryTimer;
|
9981
|
+
function resetQueue() {
|
9982
|
+
var now = Date.now();
|
9983
|
+
for (var i = 0; i < fs4[gracefulQueue].length; ++i) {
|
9984
|
+
if (fs4[gracefulQueue][i].length > 2) {
|
9985
|
+
fs4[gracefulQueue][i][3] = now;
|
9986
|
+
fs4[gracefulQueue][i][4] = now;
|
9987
|
+
}
|
9988
|
+
}
|
9989
|
+
retry();
|
9990
|
+
}
|
9991
|
+
function retry() {
|
9992
|
+
clearTimeout(retryTimer);
|
9993
|
+
retryTimer = void 0;
|
9994
|
+
if (fs4[gracefulQueue].length === 0)
|
9995
|
+
return;
|
9996
|
+
var elem = fs4[gracefulQueue].shift();
|
9997
|
+
var fn = elem[0];
|
9998
|
+
var args = elem[1];
|
9999
|
+
var err = elem[2];
|
10000
|
+
var startTime = elem[3];
|
10001
|
+
var lastTime = elem[4];
|
10002
|
+
if (startTime === void 0) {
|
10003
|
+
debug("RETRY", fn.name, args);
|
10004
|
+
fn.apply(null, args);
|
10005
|
+
} else if (Date.now() - startTime >= 6e4) {
|
10006
|
+
debug("TIMEOUT", fn.name, args);
|
10007
|
+
var cb = args.pop();
|
10008
|
+
if (typeof cb === "function")
|
10009
|
+
cb.call(null, err);
|
10010
|
+
} else {
|
10011
|
+
var sinceAttempt = Date.now() - lastTime;
|
10012
|
+
var sinceStart = Math.max(lastTime - startTime, 1);
|
10013
|
+
var desiredDelay = Math.min(sinceStart * 1.2, 100);
|
10014
|
+
if (sinceAttempt >= desiredDelay) {
|
10015
|
+
debug("RETRY", fn.name, args);
|
10016
|
+
fn.apply(null, args.concat([startTime]));
|
10017
|
+
} else {
|
10018
|
+
fs4[gracefulQueue].push(elem);
|
10019
|
+
}
|
10020
|
+
}
|
10021
|
+
if (retryTimer === void 0) {
|
10022
|
+
retryTimer = setTimeout(retry, 0);
|
10023
|
+
}
|
10024
|
+
}
|
10025
|
+
}
|
10026
|
+
});
|
7730
10027
|
var require_is_path_cwd = (0, import_chunk_4VNS5WPM.__commonJS)({
|
7731
10028
|
"../../node_modules/.pnpm/is-path-cwd@2.2.0/node_modules/is-path-cwd/index.js"(exports, module2) {
|
7732
10029
|
"use strict";
|
@@ -10024,10 +12321,10 @@ var require_del = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
10024
12321
|
"use strict";
|
10025
12322
|
var { promisify } = (0, import_chunk_4VNS5WPM.__require)("util");
|
10026
12323
|
var path5 = (0, import_chunk_4VNS5WPM.__require)("path");
|
10027
|
-
var globby = (0,
|
10028
|
-
var isGlob = (0,
|
10029
|
-
var slash = (0,
|
10030
|
-
var gracefulFs =
|
12324
|
+
var globby = (0, import_chunk_JOIIWB3U.require_globby)();
|
12325
|
+
var isGlob = (0, import_chunk_JOIIWB3U.require_is_glob)();
|
12326
|
+
var slash = (0, import_chunk_JOIIWB3U.require_slash)();
|
12327
|
+
var gracefulFs = require_graceful_fs();
|
10031
12328
|
var isPathCwd = require_is_path_cwd();
|
10032
12329
|
var isPathInside = require_is_path_inside();
|
10033
12330
|
var rimraf = require_rimraf();
|
@@ -10202,9 +12499,8 @@ async function findUp(name, {
|
|
10202
12499
|
let directory = import_node_path2.default.resolve(toPath(cwd) ?? "");
|
10203
12500
|
const { root } = import_node_path2.default.parse(directory);
|
10204
12501
|
stopAt = import_node_path2.default.resolve(directory, toPath(stopAt ?? root));
|
10205
|
-
|
10206
|
-
|
10207
|
-
const filePath = isAbsoluteName ? name : import_node_path2.default.join(directory, name);
|
12502
|
+
while (directory && directory !== stopAt && directory !== root) {
|
12503
|
+
const filePath = import_node_path2.default.isAbsolute(name) ? name : import_node_path2.default.join(directory, name);
|
10208
12504
|
try {
|
10209
12505
|
const stats = await import_promises.default.stat(filePath);
|
10210
12506
|
if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) {
|
@@ -10212,9 +12508,6 @@ async function findUp(name, {
|
|
10212
12508
|
}
|
10213
12509
|
} catch {
|
10214
12510
|
}
|
10215
|
-
if (directory === stopAt || directory === root) {
|
10216
|
-
break;
|
10217
|
-
}
|
10218
12511
|
directory = import_node_path2.default.dirname(directory);
|
10219
12512
|
}
|
10220
12513
|
}
|
@@ -10226,9 +12519,8 @@ function findUpSync(name, {
|
|
10226
12519
|
let directory = import_node_path2.default.resolve(toPath(cwd) ?? "");
|
10227
12520
|
const { root } = import_node_path2.default.parse(directory);
|
10228
12521
|
stopAt = import_node_path2.default.resolve(directory, toPath(stopAt) ?? root);
|
10229
|
-
|
10230
|
-
|
10231
|
-
const filePath = isAbsoluteName ? name : import_node_path2.default.join(directory, name);
|
12522
|
+
while (directory && directory !== stopAt && directory !== root) {
|
12523
|
+
const filePath = import_node_path2.default.isAbsolute(name) ? name : import_node_path2.default.join(directory, name);
|
10232
12524
|
try {
|
10233
12525
|
const stats = import_node_fs.default.statSync(filePath, { throwIfNoEntry: false });
|
10234
12526
|
if (type === "file" && stats?.isFile() || type === "directory" && stats?.isDirectory()) {
|
@@ -10236,13 +12528,10 @@ function findUpSync(name, {
|
|
10236
12528
|
}
|
10237
12529
|
} catch {
|
10238
12530
|
}
|
10239
|
-
if (directory === stopAt || directory === root) {
|
10240
|
-
break;
|
10241
|
-
}
|
10242
12531
|
directory = import_node_path2.default.dirname(directory);
|
10243
12532
|
}
|
10244
12533
|
}
|
10245
|
-
var import_code_frame = (0, import_chunk_4VNS5WPM.__toESM)(
|
12534
|
+
var import_code_frame = (0, import_chunk_4VNS5WPM.__toESM)(require_lib7(), 1);
|
10246
12535
|
var safeLastIndexOf = (string, searchString, index) => index < 0 ? -1 : string.lastIndexOf(searchString, index);
|
10247
12536
|
function getPosition(text, textIndex) {
|
10248
12537
|
const lineBreakBefore = safeLastIndexOf(text, "\n", textIndex - 1);
|
@@ -10254,12 +12543,6 @@ function getPosition(text, textIndex) {
|
|
10254
12543
|
return { line, column };
|
10255
12544
|
}
|
10256
12545
|
function indexToLineColumn(text, textIndex, { oneBased = false } = {}) {
|
10257
|
-
if (typeof text !== "string") {
|
10258
|
-
throw new TypeError("Text parameter should be a string");
|
10259
|
-
}
|
10260
|
-
if (!Number.isInteger(textIndex)) {
|
10261
|
-
throw new TypeError("Index parameter should be an integer");
|
10262
|
-
}
|
10263
12546
|
if (textIndex < 0 || textIndex >= text.length && text.length > 0) {
|
10264
12547
|
throw new RangeError("Index out of bounds");
|
10265
12548
|
}
|
@@ -10270,28 +12553,17 @@ var getCodePoint = (character) => `\\u{${character.codePointAt(0).toString(16)}}
|
|
10270
12553
|
var JSONError = class _JSONError extends Error {
|
10271
12554
|
name = "JSONError";
|
10272
12555
|
fileName;
|
10273
|
-
|
10274
|
-
|
12556
|
+
codeFrame;
|
12557
|
+
rawCodeFrame;
|
10275
12558
|
#message;
|
10276
|
-
|
10277
|
-
|
10278
|
-
|
10279
|
-
if (typeof messageOrOptions === "string") {
|
10280
|
-
super();
|
10281
|
-
this.#message = messageOrOptions;
|
10282
|
-
} else {
|
10283
|
-
const { jsonParseError, fileName, input } = messageOrOptions;
|
10284
|
-
super(void 0, { cause: jsonParseError });
|
10285
|
-
this.#input = input;
|
10286
|
-
this.#jsonParseError = jsonParseError;
|
10287
|
-
this.fileName = fileName;
|
10288
|
-
}
|
12559
|
+
constructor(message) {
|
12560
|
+
super();
|
12561
|
+
this.#message = message;
|
10289
12562
|
Error.captureStackTrace?.(this, _JSONError);
|
10290
12563
|
}
|
10291
12564
|
get message() {
|
10292
|
-
|
10293
|
-
|
10294
|
-
return `${this.#message}${this.fileName ? ` in ${this.fileName}` : ""}${codeFrame ? `
|
12565
|
+
const { fileName, codeFrame } = this;
|
12566
|
+
return `${this.#message}${fileName ? ` in ${fileName}` : ""}${codeFrame ? `
|
10295
12567
|
|
10296
12568
|
${codeFrame}
|
10297
12569
|
` : ""}`;
|
@@ -10299,32 +12571,8 @@ ${codeFrame}
|
|
10299
12571
|
set message(message) {
|
10300
12572
|
this.#message = message;
|
10301
12573
|
}
|
10302
|
-
#getCodeFrame(highlightCode) {
|
10303
|
-
if (!this.#jsonParseError) {
|
10304
|
-
return;
|
10305
|
-
}
|
10306
|
-
const input = this.#input;
|
10307
|
-
const location = getErrorLocation(input, this.#jsonParseError.message);
|
10308
|
-
if (!location) {
|
10309
|
-
return;
|
10310
|
-
}
|
10311
|
-
return (0, import_code_frame.codeFrameColumns)(input, { start: location }, { highlightCode });
|
10312
|
-
}
|
10313
|
-
get codeFrame() {
|
10314
|
-
this.#codeFrame ??= this.#getCodeFrame(
|
10315
|
-
/* highlightCode */
|
10316
|
-
true
|
10317
|
-
);
|
10318
|
-
return this.#codeFrame;
|
10319
|
-
}
|
10320
|
-
get rawCodeFrame() {
|
10321
|
-
this.#rawCodeFrame ??= this.#getCodeFrame(
|
10322
|
-
/* highlightCode */
|
10323
|
-
false
|
10324
|
-
);
|
10325
|
-
return this.#rawCodeFrame;
|
10326
|
-
}
|
10327
12574
|
};
|
12575
|
+
var generateCodeFrame = (string, location, highlightCode = true) => (0, import_code_frame.codeFrameColumns)(string, { start: location }, { highlightCode });
|
10328
12576
|
var getErrorLocation = (string, message) => {
|
10329
12577
|
const match = message.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/);
|
10330
12578
|
if (!match) {
|
@@ -10351,15 +12599,31 @@ function parseJson(string, reviver, fileName) {
|
|
10351
12599
|
fileName = reviver;
|
10352
12600
|
reviver = void 0;
|
10353
12601
|
}
|
12602
|
+
let message;
|
10354
12603
|
try {
|
10355
12604
|
return JSON.parse(string, reviver);
|
10356
12605
|
} catch (error) {
|
10357
|
-
|
10358
|
-
|
10359
|
-
|
10360
|
-
|
10361
|
-
|
12606
|
+
message = error.message;
|
12607
|
+
}
|
12608
|
+
let location;
|
12609
|
+
if (string) {
|
12610
|
+
location = getErrorLocation(string, message);
|
12611
|
+
message = addCodePointToUnexpectedToken(message);
|
12612
|
+
} else {
|
12613
|
+
message += " while parsing empty string";
|
12614
|
+
}
|
12615
|
+
const jsonError = new JSONError(message);
|
12616
|
+
jsonError.fileName = fileName;
|
12617
|
+
if (location) {
|
12618
|
+
jsonError.codeFrame = generateCodeFrame(string, location);
|
12619
|
+
jsonError.rawCodeFrame = generateCodeFrame(
|
12620
|
+
string,
|
12621
|
+
location,
|
12622
|
+
/* highlightCode */
|
12623
|
+
false
|
12624
|
+
);
|
10362
12625
|
}
|
12626
|
+
throw jsonError;
|
10363
12627
|
}
|
10364
12628
|
var import_normalize_package_data = (0, import_chunk_4VNS5WPM.__toESM)(require_normalize(), 1);
|
10365
12629
|
function toPath2(urlOrPath) {
|
@@ -10403,7 +12667,7 @@ function readPackageUpSync(options) {
|
|
10403
12667
|
}
|
10404
12668
|
var import_tempy = (0, import_chunk_4VNS5WPM.__toESM)(require_tempy());
|
10405
12669
|
async function getPackedPackage(name, target, packageDir) {
|
10406
|
-
packageDir = packageDir || await (0,
|
12670
|
+
packageDir = packageDir || await (0, import_chunk_67I7CEQJ.resolvePkg)(name, { basedir: process.cwd() }) || await (0, import_chunk_67I7CEQJ.resolvePkg)(name, { basedir: target });
|
10407
12671
|
if (!packageDir) {
|
10408
12672
|
const pkg = readPackageUpSync({
|
10409
12673
|
cwd: target,
|