@prisma/migrate 6.6.0-dev.7 → 6.6.0-dev.70

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.
Files changed (150) hide show
  1. package/dist/CLI.js +3 -3
  2. package/dist/Migrate.js +8 -6
  3. package/dist/SchemaEngine.js +5 -5
  4. package/dist/bin.js +47 -46
  5. package/dist/chunk-23DZXSTI.js +62 -0
  6. package/dist/{chunk-WWAWV7DQ.js → chunk-2ESYSVXG.js} +3 -27
  7. package/dist/{chunk-LKTTJWFT.js → chunk-2R6DII47.js} +5 -5
  8. package/dist/chunk-33LPBNDX.js +1399 -0
  9. package/dist/{chunk-P6I3Y7KI.js → chunk-4ACBW57A.js} +371 -530
  10. package/dist/{chunk-V3ZMNXZC.js → chunk-5LKIRKDL.js} +307 -382
  11. package/dist/{chunk-IR55GBON.js → chunk-5LTDMS3H.js} +18 -18
  12. package/dist/{chunk-LOGAFLCN.js → chunk-5R44VVVX.js} +29 -29
  13. package/dist/{chunk-Q3ZLC44N.js → chunk-63X7FE2R.js} +57 -66
  14. package/dist/{chunk-DJMFXNR4.js → chunk-74LUB4XX.js} +56 -57
  15. package/dist/{chunk-N4XTKFY6.js → chunk-7RM467G7.js} +39 -38
  16. package/dist/{chunk-RP2N6UXA.js → chunk-AI6DH66U.js} +6 -6
  17. package/dist/{chunk-A6PMXMMT.js → chunk-AUGZZ6RT.js} +105 -13
  18. package/dist/{chunk-G2XUUMKH.js → chunk-B4SUSDC2.js} +31 -39
  19. package/dist/{chunk-ZOEKRXDP.js → chunk-D2DGSPW6.js} +29 -55
  20. package/dist/{chunk-W2SZNLK4.js → chunk-EJG7GKM7.js} +37 -39
  21. package/dist/{chunk-5PSO7BDO.js → chunk-EJUXYFV3.js} +15 -15
  22. package/dist/{chunk-HCBZB4XC.js → chunk-FFPSJTA6.js} +53 -52
  23. package/dist/{chunk-N3KYWSX2.js → chunk-FZGPSDP7.js} +55 -49
  24. package/dist/{chunk-MCWCB2AX.js → chunk-IINN7QUV.js} +170 -643
  25. package/dist/{chunk-3GHGKOL4.js → chunk-KJGJMCHL.js} +370 -529
  26. package/dist/{chunk-255BRND3.js → chunk-KRQEFTDT.js} +6 -6
  27. package/dist/{chunk-VVKOFN3Y.js → chunk-LLO7YF56.js} +44 -46
  28. package/dist/{chunk-VZ23KD5C.js → chunk-NGQA5JTN.js} +8 -10
  29. package/dist/{chunk-MKK3GSDF.js → chunk-NIKXBMZL.js} +5 -5
  30. package/dist/{chunk-GG54LOYV.js → chunk-O6RQXRWU.js} +45 -44
  31. package/dist/{chunk-MATFO4ZW.js → chunk-OEWQACEH.js} +38 -39
  32. package/dist/{chunk-EGPJABTW.js → chunk-QVMYNWAN.js} +257 -103
  33. package/dist/{chunk-V5TUSOJX.js → chunk-SQKGZVG3.js} +45 -45
  34. package/dist/{chunk-CQZFVAXC.js → chunk-TN7JMNXD.js} +42 -41
  35. package/dist/chunk-URKH6SE2.js +479 -0
  36. package/dist/chunk-V6PVGSDJ.js +76 -0
  37. package/dist/{chunk-DLLXDCI2.js → chunk-VAJ4VX67.js} +5 -6
  38. package/dist/{chunk-OCQGHQED.js → chunk-YBX7R3MT.js} +12 -12
  39. package/dist/{chunk-KS7IEA6Z.js → chunk-YGBJA7QJ.js} +50 -52
  40. package/dist/{chunk-WI2A2TQE.js → chunk-ZJ4IDCRR.js} +90 -91
  41. package/dist/chunk-ZLHWX5PJ.js +883 -0
  42. package/dist/commands/DbCommand.js +3 -3
  43. package/dist/commands/DbDrop.js +4 -5
  44. package/dist/commands/DbExecute.js +9 -7
  45. package/dist/commands/DbPull.js +11 -10
  46. package/dist/commands/DbPush.js +10 -9
  47. package/dist/commands/DbSeed.js +4 -5
  48. package/dist/commands/MigrateCommand.js +3 -3
  49. package/dist/commands/MigrateDeploy.js +12 -11
  50. package/dist/commands/MigrateDev.js +14 -13
  51. package/dist/commands/MigrateDiff.js +12 -10
  52. package/dist/commands/MigrateReset.js +13 -12
  53. package/dist/commands/MigrateResolve.js +10 -9
  54. package/dist/commands/MigrateStatus.js +10 -9
  55. package/dist/index.js +50 -51
  56. package/dist/internals/src/Generator.d.ts +23 -5
  57. package/dist/internals/src/cli/checkUnsupportedDataProxy.d.ts +12 -17
  58. package/dist/internals/src/cli/directoryConfig.d.ts +7 -0
  59. package/dist/internals/src/cli/getSchema.d.ts +3 -28
  60. package/dist/internals/src/cli/hashes.d.ts +1 -2
  61. package/dist/internals/src/cli/schemaContext.d.ts +59 -0
  62. package/dist/internals/src/client/getClientEngineType.d.ts +1 -1
  63. package/dist/internals/src/convertCredentials.d.ts +1 -1
  64. package/dist/internals/src/engine-commands/getConfig.d.ts +1 -5
  65. package/dist/internals/src/engine-commands/getDmmf.d.ts +3 -6
  66. package/dist/internals/src/engine-commands/lintSchema.d.ts +1 -1
  67. package/dist/internals/src/errorReporting.d.ts +0 -1
  68. package/dist/internals/src/get-generators/getGenerators.d.ts +22 -9
  69. package/dist/internals/src/get-generators/utils/binaryTypeToEngineType.d.ts +1 -1
  70. package/dist/internals/src/get-generators/utils/engineTypeToBinaryType.d.ts +1 -1
  71. package/dist/internals/src/get-generators/utils/fixBinaryTargets.d.ts +1 -1
  72. package/dist/internals/src/get-generators/utils/getBinaryPathsByVersion.d.ts +1 -1
  73. package/dist/internals/src/get-generators/utils/getEngineVersionForGenerator.d.ts +1 -1
  74. package/dist/internals/src/get-generators/utils/printGeneratorConfig.d.ts +1 -1
  75. package/dist/internals/src/index.d.ts +7 -7
  76. package/dist/internals/src/migrateTypes.d.ts +63 -0
  77. package/dist/internals/src/panic.d.ts +1 -4
  78. package/dist/internals/src/resolvePkg.d.ts +7 -0
  79. package/dist/internals/src/types.d.ts +1 -1
  80. package/dist/internals/src/utils/extractPreviewFeatures.d.ts +2 -2
  81. package/dist/internals/src/utils/getEnvPaths.d.ts +1 -1
  82. package/dist/internals/src/utils/parseEnvValue.d.ts +1 -1
  83. package/dist/internals/src/utils/schemaFileInput.d.ts +0 -4
  84. package/dist/internals/src/utils/toSchemasContainer.d.ts +2 -3
  85. package/dist/migrate/src/Migrate.d.ts +7 -5
  86. package/dist/migrate/src/SchemaEngine.d.ts +5 -9
  87. package/dist/migrate/src/index.d.ts +0 -1
  88. package/dist/migrate/src/types.d.ts +14 -10
  89. package/dist/migrate/src/utils/createMigration.d.ts +21 -0
  90. package/dist/migrate/src/utils/ensureDatabaseExists.d.ts +4 -6
  91. package/dist/migrate/src/utils/introspectSql.d.ts +3 -2
  92. package/dist/migrate/src/utils/listMigrations.d.ts +9 -0
  93. package/dist/migrate/src/utils/printDatasources.d.ts +1 -1
  94. package/dist/migrate/src/utils/seed.d.ts +0 -2
  95. package/dist/migrate/src/views/handleViewsIO.d.ts +2 -2
  96. package/dist/{multipart-parser-54WEFGGN-NLZG56KM.js → multipart-parser-ASKQAOL4-WZ47HU6G.js} +92 -125
  97. package/dist/{multipart-parser-NDLECNMN.js → multipart-parser-QCI3Y5IB.js} +66 -68
  98. package/dist/types.js +1 -1
  99. package/dist/{typescript-WN4QH2CP.js → typescript-2LKASCMC.js} +33 -33
  100. package/dist/{typescript-AILDXN3I.js → typescript-H3AVJ6KX.js} +32 -32
  101. package/dist/utils/byline.js +1 -1
  102. package/dist/utils/captureStdout.js +3 -3
  103. package/dist/utils/countModelsAndTypes.js +1 -1
  104. package/dist/utils/{getSchemaPathAndPrint.js → createMigration.js} +8 -8
  105. package/dist/utils/customColors.js +1 -1
  106. package/dist/utils/ensureDatabaseExists.js +7 -7
  107. package/dist/utils/errors.js +1 -1
  108. package/dist/utils/flagErrors.js +1 -1
  109. package/dist/utils/getDatabaseVersionSafe.js +5 -5
  110. package/dist/utils/handleEvaluateDataloss.js +1 -1
  111. package/dist/utils/introspectSql.js +5 -5
  112. package/dist/utils/isSchemaEmpty.js +1 -1
  113. package/dist/utils/listMigrations.js +25 -0
  114. package/dist/utils/now.js +1 -1
  115. package/dist/utils/printDatasource.js +1 -1
  116. package/dist/utils/printDatasources.js +5 -5
  117. package/dist/utils/printFiles.js +5 -5
  118. package/dist/utils/printIntrospectedSchema.js +1 -1
  119. package/dist/utils/printMigrationId.js +1 -1
  120. package/dist/utils/promptForMigrationName.js +3 -3
  121. package/dist/utils/removeSchemaFiles.js +1 -1
  122. package/dist/utils/replaceOrAddDatasource.js +1 -1
  123. package/dist/utils/replaceOrAddDatasource.test.js +1 -1
  124. package/dist/utils/saveSchemaFiles.js +1 -1
  125. package/dist/utils/seed.js +4 -7
  126. package/dist/utils/setupCockroach.js +3 -3
  127. package/dist/utils/setupMSSQL.js +1478 -707
  128. package/dist/utils/setupMongo.js +553 -552
  129. package/dist/utils/setupMysql.js +508 -563
  130. package/dist/utils/setupPostgres.js +3 -3
  131. package/dist/utils/spinner.js +4 -3
  132. package/dist/utils/test-handlePanic.js +1 -30
  133. package/dist/utils/unixSocket.js +1 -1
  134. package/dist/views/handleViewsIO.js +3 -3
  135. package/package.json +11 -11
  136. package/dist/chunk-GKDFIHM2.js +0 -45
  137. package/dist/chunk-J46BJQHT.js +0 -268
  138. package/dist/chunk-KOF4LGTS.js +0 -1817
  139. package/dist/chunk-YYPMC5FN.js +0 -1407
  140. package/dist/internals/src/get-generators/generatorResolvers/generatorResolvers.d.ts +0 -15
  141. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +0 -6
  142. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +0 -9
  143. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +0 -8
  144. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +0 -6
  145. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +0 -1
  146. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +0 -20
  147. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +0 -7
  148. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +0 -20
  149. package/dist/internals/src/get-generators/utils/check-feature-flags/checkFeatureFlags.d.ts +0 -8
  150. package/dist/migrate/src/utils/getSchemaPathAndPrint.d.ts +0 -10
@@ -1,1817 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_KOF4LGTS_exports = {};
30
- __export(chunk_KOF4LGTS_exports, {
31
- Migrate: () => Migrate
32
- });
33
- module.exports = __toCommonJS(chunk_KOF4LGTS_exports);
34
- var import_chunk_J46BJQHT = require("./chunk-J46BJQHT.js");
35
- var import_chunk_ZOEKRXDP = require("./chunk-ZOEKRXDP.js");
36
- var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
37
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
38
- var import_engines_version = require("@prisma/engines-version");
39
- var import_internals = require("@prisma/internals");
40
- var import_path = __toESM2(require("path"));
41
- var require_ansi_escapes = (0, import_chunk_WWAWV7DQ.__commonJS)({
42
- "../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js"(exports, module2) {
43
- "use strict";
44
- var ansiEscapes = module2.exports;
45
- module2.exports.default = ansiEscapes;
46
- var ESC = "\x1B[";
47
- var OSC = "\x1B]";
48
- var BEL = "\x07";
49
- var SEP = ";";
50
- var isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
51
- ansiEscapes.cursorTo = (x, y) => {
52
- if (typeof x !== "number") {
53
- throw new TypeError("The `x` argument is required");
54
- }
55
- if (typeof y !== "number") {
56
- return ESC + (x + 1) + "G";
57
- }
58
- return ESC + (y + 1) + ";" + (x + 1) + "H";
59
- };
60
- ansiEscapes.cursorMove = (x, y) => {
61
- if (typeof x !== "number") {
62
- throw new TypeError("The `x` argument is required");
63
- }
64
- let ret = "";
65
- if (x < 0) {
66
- ret += ESC + -x + "D";
67
- } else if (x > 0) {
68
- ret += ESC + x + "C";
69
- }
70
- if (y < 0) {
71
- ret += ESC + -y + "A";
72
- } else if (y > 0) {
73
- ret += ESC + y + "B";
74
- }
75
- return ret;
76
- };
77
- ansiEscapes.cursorUp = (count = 1) => ESC + count + "A";
78
- ansiEscapes.cursorDown = (count = 1) => ESC + count + "B";
79
- ansiEscapes.cursorForward = (count = 1) => ESC + count + "C";
80
- ansiEscapes.cursorBackward = (count = 1) => ESC + count + "D";
81
- ansiEscapes.cursorLeft = ESC + "G";
82
- ansiEscapes.cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
83
- ansiEscapes.cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
84
- ansiEscapes.cursorGetPosition = ESC + "6n";
85
- ansiEscapes.cursorNextLine = ESC + "E";
86
- ansiEscapes.cursorPrevLine = ESC + "F";
87
- ansiEscapes.cursorHide = ESC + "?25l";
88
- ansiEscapes.cursorShow = ESC + "?25h";
89
- ansiEscapes.eraseLines = (count) => {
90
- let clear = "";
91
- for (let i = 0; i < count; i++) {
92
- clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : "");
93
- }
94
- if (count) {
95
- clear += ansiEscapes.cursorLeft;
96
- }
97
- return clear;
98
- };
99
- ansiEscapes.eraseEndLine = ESC + "K";
100
- ansiEscapes.eraseStartLine = ESC + "1K";
101
- ansiEscapes.eraseLine = ESC + "2K";
102
- ansiEscapes.eraseDown = ESC + "J";
103
- ansiEscapes.eraseUp = ESC + "1J";
104
- ansiEscapes.eraseScreen = ESC + "2J";
105
- ansiEscapes.scrollUp = ESC + "S";
106
- ansiEscapes.scrollDown = ESC + "T";
107
- ansiEscapes.clearScreen = "\x1Bc";
108
- ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC}0f` : (
109
- // 1. Erases the screen (Only done in case `2` is not supported)
110
- // 2. Erases the whole screen including scrollback buffer
111
- // 3. Moves cursor to the top-left position
112
- // More info: https://www.real-world-systems.com/docs/ANSIcode.html
113
- `${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`
114
- );
115
- ansiEscapes.beep = BEL;
116
- ansiEscapes.link = (text, url) => {
117
- return [
118
- OSC,
119
- "8",
120
- SEP,
121
- SEP,
122
- url,
123
- BEL,
124
- text,
125
- OSC,
126
- "8",
127
- SEP,
128
- SEP,
129
- BEL
130
- ].join("");
131
- };
132
- ansiEscapes.image = (buffer, options = {}) => {
133
- let ret = `${OSC}1337;File=inline=1`;
134
- if (options.width) {
135
- ret += `;width=${options.width}`;
136
- }
137
- if (options.height) {
138
- ret += `;height=${options.height}`;
139
- }
140
- if (options.preserveAspectRatio === false) {
141
- ret += ";preserveAspectRatio=0";
142
- }
143
- return ret + ":" + buffer.toString("base64") + BEL;
144
- };
145
- ansiEscapes.iTerm = {
146
- setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
147
- annotation: (message, options = {}) => {
148
- let ret = `${OSC}1337;`;
149
- const hasX = typeof options.x !== "undefined";
150
- const hasY = typeof options.y !== "undefined";
151
- if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== "undefined")) {
152
- throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
153
- }
154
- message = message.replace(/\|/g, "");
155
- ret += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
156
- if (options.length > 0) {
157
- ret += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|");
158
- } else {
159
- ret += message;
160
- }
161
- return ret + BEL;
162
- }
163
- };
164
- }
165
- });
166
- var require_restore_cursor = (0, import_chunk_WWAWV7DQ.__commonJS)({
167
- "../../node_modules/.pnpm/restore-cursor@3.1.0/node_modules/restore-cursor/index.js"(exports, module2) {
168
- "use strict";
169
- var onetime = (0, import_chunk_J46BJQHT.require_onetime)();
170
- var signalExit = (0, import_chunk_J46BJQHT.require_signal_exit)();
171
- module2.exports = onetime(() => {
172
- signalExit(() => {
173
- process.stderr.write("\x1B[?25h");
174
- }, { alwaysLast: true });
175
- });
176
- }
177
- });
178
- var require_cli_cursor = (0, import_chunk_WWAWV7DQ.__commonJS)({
179
- "../../node_modules/.pnpm/cli-cursor@3.1.0/node_modules/cli-cursor/index.js"(exports) {
180
- "use strict";
181
- var restoreCursor = require_restore_cursor();
182
- var isHidden = false;
183
- exports.show = (writableStream = process.stderr) => {
184
- if (!writableStream.isTTY) {
185
- return;
186
- }
187
- isHidden = false;
188
- writableStream.write("\x1B[?25h");
189
- };
190
- exports.hide = (writableStream = process.stderr) => {
191
- if (!writableStream.isTTY) {
192
- return;
193
- }
194
- restoreCursor();
195
- isHidden = true;
196
- writableStream.write("\x1B[?25l");
197
- };
198
- exports.toggle = (force, writableStream) => {
199
- if (force !== void 0) {
200
- isHidden = force;
201
- }
202
- if (isHidden) {
203
- exports.show(writableStream);
204
- } else {
205
- exports.hide(writableStream);
206
- }
207
- };
208
- }
209
- });
210
- var require_ansi_regex = (0, import_chunk_WWAWV7DQ.__commonJS)({
211
- "../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module2) {
212
- "use strict";
213
- module2.exports = ({ onlyFirst = false } = {}) => {
214
- const pattern = [
215
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
216
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
217
- ].join("|");
218
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
219
- };
220
- }
221
- });
222
- var require_strip_ansi = (0, import_chunk_WWAWV7DQ.__commonJS)({
223
- "../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module2) {
224
- "use strict";
225
- var ansiRegex = require_ansi_regex();
226
- module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
227
- }
228
- });
229
- var require_is_fullwidth_code_point = (0, import_chunk_WWAWV7DQ.__commonJS)({
230
- "../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module2) {
231
- "use strict";
232
- var isFullwidthCodePoint = (codePoint) => {
233
- if (Number.isNaN(codePoint)) {
234
- return false;
235
- }
236
- if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
237
- codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
238
- codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
239
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
240
- 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
241
- 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
242
- 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
243
- 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
244
- 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
245
- 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
246
- 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
247
- 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
248
- 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
249
- 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
250
- 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
251
- 131072 <= codePoint && codePoint <= 262141)) {
252
- return true;
253
- }
254
- return false;
255
- };
256
- module2.exports = isFullwidthCodePoint;
257
- module2.exports.default = isFullwidthCodePoint;
258
- }
259
- });
260
- var require_emoji_regex = (0, import_chunk_WWAWV7DQ.__commonJS)({
261
- "../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module2) {
262
- "use strict";
263
- module2.exports = function() {
264
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
265
- };
266
- }
267
- });
268
- var require_string_width = (0, import_chunk_WWAWV7DQ.__commonJS)({
269
- "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module2) {
270
- "use strict";
271
- var stripAnsi = require_strip_ansi();
272
- var isFullwidthCodePoint = require_is_fullwidth_code_point();
273
- var emojiRegex = require_emoji_regex();
274
- var stringWidth = (string) => {
275
- if (typeof string !== "string" || string.length === 0) {
276
- return 0;
277
- }
278
- string = stripAnsi(string);
279
- if (string.length === 0) {
280
- return 0;
281
- }
282
- string = string.replace(emojiRegex(), " ");
283
- let width = 0;
284
- for (let i = 0; i < string.length; i++) {
285
- const code = string.codePointAt(i);
286
- if (code <= 31 || code >= 127 && code <= 159) {
287
- continue;
288
- }
289
- if (code >= 768 && code <= 879) {
290
- continue;
291
- }
292
- if (code > 65535) {
293
- i++;
294
- }
295
- width += isFullwidthCodePoint(code) ? 2 : 1;
296
- }
297
- return width;
298
- };
299
- module2.exports = stringWidth;
300
- module2.exports.default = stringWidth;
301
- }
302
- });
303
- var require_color_name = (0, import_chunk_WWAWV7DQ.__commonJS)({
304
- "../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports, module2) {
305
- "use strict";
306
- module2.exports = {
307
- "aliceblue": [240, 248, 255],
308
- "antiquewhite": [250, 235, 215],
309
- "aqua": [0, 255, 255],
310
- "aquamarine": [127, 255, 212],
311
- "azure": [240, 255, 255],
312
- "beige": [245, 245, 220],
313
- "bisque": [255, 228, 196],
314
- "black": [0, 0, 0],
315
- "blanchedalmond": [255, 235, 205],
316
- "blue": [0, 0, 255],
317
- "blueviolet": [138, 43, 226],
318
- "brown": [165, 42, 42],
319
- "burlywood": [222, 184, 135],
320
- "cadetblue": [95, 158, 160],
321
- "chartreuse": [127, 255, 0],
322
- "chocolate": [210, 105, 30],
323
- "coral": [255, 127, 80],
324
- "cornflowerblue": [100, 149, 237],
325
- "cornsilk": [255, 248, 220],
326
- "crimson": [220, 20, 60],
327
- "cyan": [0, 255, 255],
328
- "darkblue": [0, 0, 139],
329
- "darkcyan": [0, 139, 139],
330
- "darkgoldenrod": [184, 134, 11],
331
- "darkgray": [169, 169, 169],
332
- "darkgreen": [0, 100, 0],
333
- "darkgrey": [169, 169, 169],
334
- "darkkhaki": [189, 183, 107],
335
- "darkmagenta": [139, 0, 139],
336
- "darkolivegreen": [85, 107, 47],
337
- "darkorange": [255, 140, 0],
338
- "darkorchid": [153, 50, 204],
339
- "darkred": [139, 0, 0],
340
- "darksalmon": [233, 150, 122],
341
- "darkseagreen": [143, 188, 143],
342
- "darkslateblue": [72, 61, 139],
343
- "darkslategray": [47, 79, 79],
344
- "darkslategrey": [47, 79, 79],
345
- "darkturquoise": [0, 206, 209],
346
- "darkviolet": [148, 0, 211],
347
- "deeppink": [255, 20, 147],
348
- "deepskyblue": [0, 191, 255],
349
- "dimgray": [105, 105, 105],
350
- "dimgrey": [105, 105, 105],
351
- "dodgerblue": [30, 144, 255],
352
- "firebrick": [178, 34, 34],
353
- "floralwhite": [255, 250, 240],
354
- "forestgreen": [34, 139, 34],
355
- "fuchsia": [255, 0, 255],
356
- "gainsboro": [220, 220, 220],
357
- "ghostwhite": [248, 248, 255],
358
- "gold": [255, 215, 0],
359
- "goldenrod": [218, 165, 32],
360
- "gray": [128, 128, 128],
361
- "green": [0, 128, 0],
362
- "greenyellow": [173, 255, 47],
363
- "grey": [128, 128, 128],
364
- "honeydew": [240, 255, 240],
365
- "hotpink": [255, 105, 180],
366
- "indianred": [205, 92, 92],
367
- "indigo": [75, 0, 130],
368
- "ivory": [255, 255, 240],
369
- "khaki": [240, 230, 140],
370
- "lavender": [230, 230, 250],
371
- "lavenderblush": [255, 240, 245],
372
- "lawngreen": [124, 252, 0],
373
- "lemonchiffon": [255, 250, 205],
374
- "lightblue": [173, 216, 230],
375
- "lightcoral": [240, 128, 128],
376
- "lightcyan": [224, 255, 255],
377
- "lightgoldenrodyellow": [250, 250, 210],
378
- "lightgray": [211, 211, 211],
379
- "lightgreen": [144, 238, 144],
380
- "lightgrey": [211, 211, 211],
381
- "lightpink": [255, 182, 193],
382
- "lightsalmon": [255, 160, 122],
383
- "lightseagreen": [32, 178, 170],
384
- "lightskyblue": [135, 206, 250],
385
- "lightslategray": [119, 136, 153],
386
- "lightslategrey": [119, 136, 153],
387
- "lightsteelblue": [176, 196, 222],
388
- "lightyellow": [255, 255, 224],
389
- "lime": [0, 255, 0],
390
- "limegreen": [50, 205, 50],
391
- "linen": [250, 240, 230],
392
- "magenta": [255, 0, 255],
393
- "maroon": [128, 0, 0],
394
- "mediumaquamarine": [102, 205, 170],
395
- "mediumblue": [0, 0, 205],
396
- "mediumorchid": [186, 85, 211],
397
- "mediumpurple": [147, 112, 219],
398
- "mediumseagreen": [60, 179, 113],
399
- "mediumslateblue": [123, 104, 238],
400
- "mediumspringgreen": [0, 250, 154],
401
- "mediumturquoise": [72, 209, 204],
402
- "mediumvioletred": [199, 21, 133],
403
- "midnightblue": [25, 25, 112],
404
- "mintcream": [245, 255, 250],
405
- "mistyrose": [255, 228, 225],
406
- "moccasin": [255, 228, 181],
407
- "navajowhite": [255, 222, 173],
408
- "navy": [0, 0, 128],
409
- "oldlace": [253, 245, 230],
410
- "olive": [128, 128, 0],
411
- "olivedrab": [107, 142, 35],
412
- "orange": [255, 165, 0],
413
- "orangered": [255, 69, 0],
414
- "orchid": [218, 112, 214],
415
- "palegoldenrod": [238, 232, 170],
416
- "palegreen": [152, 251, 152],
417
- "paleturquoise": [175, 238, 238],
418
- "palevioletred": [219, 112, 147],
419
- "papayawhip": [255, 239, 213],
420
- "peachpuff": [255, 218, 185],
421
- "peru": [205, 133, 63],
422
- "pink": [255, 192, 203],
423
- "plum": [221, 160, 221],
424
- "powderblue": [176, 224, 230],
425
- "purple": [128, 0, 128],
426
- "rebeccapurple": [102, 51, 153],
427
- "red": [255, 0, 0],
428
- "rosybrown": [188, 143, 143],
429
- "royalblue": [65, 105, 225],
430
- "saddlebrown": [139, 69, 19],
431
- "salmon": [250, 128, 114],
432
- "sandybrown": [244, 164, 96],
433
- "seagreen": [46, 139, 87],
434
- "seashell": [255, 245, 238],
435
- "sienna": [160, 82, 45],
436
- "silver": [192, 192, 192],
437
- "skyblue": [135, 206, 235],
438
- "slateblue": [106, 90, 205],
439
- "slategray": [112, 128, 144],
440
- "slategrey": [112, 128, 144],
441
- "snow": [255, 250, 250],
442
- "springgreen": [0, 255, 127],
443
- "steelblue": [70, 130, 180],
444
- "tan": [210, 180, 140],
445
- "teal": [0, 128, 128],
446
- "thistle": [216, 191, 216],
447
- "tomato": [255, 99, 71],
448
- "turquoise": [64, 224, 208],
449
- "violet": [238, 130, 238],
450
- "wheat": [245, 222, 179],
451
- "white": [255, 255, 255],
452
- "whitesmoke": [245, 245, 245],
453
- "yellow": [255, 255, 0],
454
- "yellowgreen": [154, 205, 50]
455
- };
456
- }
457
- });
458
- var require_conversions = (0, import_chunk_WWAWV7DQ.__commonJS)({
459
- "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports, module2) {
460
- "use strict";
461
- var cssKeywords = require_color_name();
462
- var reverseKeywords = {};
463
- for (const key of Object.keys(cssKeywords)) {
464
- reverseKeywords[cssKeywords[key]] = key;
465
- }
466
- var convert = {
467
- rgb: { channels: 3, labels: "rgb" },
468
- hsl: { channels: 3, labels: "hsl" },
469
- hsv: { channels: 3, labels: "hsv" },
470
- hwb: { channels: 3, labels: "hwb" },
471
- cmyk: { channels: 4, labels: "cmyk" },
472
- xyz: { channels: 3, labels: "xyz" },
473
- lab: { channels: 3, labels: "lab" },
474
- lch: { channels: 3, labels: "lch" },
475
- hex: { channels: 1, labels: ["hex"] },
476
- keyword: { channels: 1, labels: ["keyword"] },
477
- ansi16: { channels: 1, labels: ["ansi16"] },
478
- ansi256: { channels: 1, labels: ["ansi256"] },
479
- hcg: { channels: 3, labels: ["h", "c", "g"] },
480
- apple: { channels: 3, labels: ["r16", "g16", "b16"] },
481
- gray: { channels: 1, labels: ["gray"] }
482
- };
483
- module2.exports = convert;
484
- for (const model of Object.keys(convert)) {
485
- if (!("channels" in convert[model])) {
486
- throw new Error("missing channels property: " + model);
487
- }
488
- if (!("labels" in convert[model])) {
489
- throw new Error("missing channel labels property: " + model);
490
- }
491
- if (convert[model].labels.length !== convert[model].channels) {
492
- throw new Error("channel and label counts mismatch: " + model);
493
- }
494
- const { channels, labels } = convert[model];
495
- delete convert[model].channels;
496
- delete convert[model].labels;
497
- Object.defineProperty(convert[model], "channels", { value: channels });
498
- Object.defineProperty(convert[model], "labels", { value: labels });
499
- }
500
- convert.rgb.hsl = function(rgb) {
501
- const r = rgb[0] / 255;
502
- const g = rgb[1] / 255;
503
- const b = rgb[2] / 255;
504
- const min = Math.min(r, g, b);
505
- const max = Math.max(r, g, b);
506
- const delta = max - min;
507
- let h;
508
- let s;
509
- if (max === min) {
510
- h = 0;
511
- } else if (r === max) {
512
- h = (g - b) / delta;
513
- } else if (g === max) {
514
- h = 2 + (b - r) / delta;
515
- } else if (b === max) {
516
- h = 4 + (r - g) / delta;
517
- }
518
- h = Math.min(h * 60, 360);
519
- if (h < 0) {
520
- h += 360;
521
- }
522
- const l = (min + max) / 2;
523
- if (max === min) {
524
- s = 0;
525
- } else if (l <= 0.5) {
526
- s = delta / (max + min);
527
- } else {
528
- s = delta / (2 - max - min);
529
- }
530
- return [h, s * 100, l * 100];
531
- };
532
- convert.rgb.hsv = function(rgb) {
533
- let rdif;
534
- let gdif;
535
- let bdif;
536
- let h;
537
- let s;
538
- const r = rgb[0] / 255;
539
- const g = rgb[1] / 255;
540
- const b = rgb[2] / 255;
541
- const v = Math.max(r, g, b);
542
- const diff = v - Math.min(r, g, b);
543
- const diffc = function(c) {
544
- return (v - c) / 6 / diff + 1 / 2;
545
- };
546
- if (diff === 0) {
547
- h = 0;
548
- s = 0;
549
- } else {
550
- s = diff / v;
551
- rdif = diffc(r);
552
- gdif = diffc(g);
553
- bdif = diffc(b);
554
- if (r === v) {
555
- h = bdif - gdif;
556
- } else if (g === v) {
557
- h = 1 / 3 + rdif - bdif;
558
- } else if (b === v) {
559
- h = 2 / 3 + gdif - rdif;
560
- }
561
- if (h < 0) {
562
- h += 1;
563
- } else if (h > 1) {
564
- h -= 1;
565
- }
566
- }
567
- return [
568
- h * 360,
569
- s * 100,
570
- v * 100
571
- ];
572
- };
573
- convert.rgb.hwb = function(rgb) {
574
- const r = rgb[0];
575
- const g = rgb[1];
576
- let b = rgb[2];
577
- const h = convert.rgb.hsl(rgb)[0];
578
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
579
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
580
- return [h, w * 100, b * 100];
581
- };
582
- convert.rgb.cmyk = function(rgb) {
583
- const r = rgb[0] / 255;
584
- const g = rgb[1] / 255;
585
- const b = rgb[2] / 255;
586
- const k = Math.min(1 - r, 1 - g, 1 - b);
587
- const c = (1 - r - k) / (1 - k) || 0;
588
- const m = (1 - g - k) / (1 - k) || 0;
589
- const y = (1 - b - k) / (1 - k) || 0;
590
- return [c * 100, m * 100, y * 100, k * 100];
591
- };
592
- function comparativeDistance(x, y) {
593
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
594
- }
595
- convert.rgb.keyword = function(rgb) {
596
- const reversed = reverseKeywords[rgb];
597
- if (reversed) {
598
- return reversed;
599
- }
600
- let currentClosestDistance = Infinity;
601
- let currentClosestKeyword;
602
- for (const keyword of Object.keys(cssKeywords)) {
603
- const value = cssKeywords[keyword];
604
- const distance = comparativeDistance(rgb, value);
605
- if (distance < currentClosestDistance) {
606
- currentClosestDistance = distance;
607
- currentClosestKeyword = keyword;
608
- }
609
- }
610
- return currentClosestKeyword;
611
- };
612
- convert.keyword.rgb = function(keyword) {
613
- return cssKeywords[keyword];
614
- };
615
- convert.rgb.xyz = function(rgb) {
616
- let r = rgb[0] / 255;
617
- let g = rgb[1] / 255;
618
- let b = rgb[2] / 255;
619
- r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
620
- g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
621
- b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
622
- const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
623
- const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
624
- const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
625
- return [x * 100, y * 100, z * 100];
626
- };
627
- convert.rgb.lab = function(rgb) {
628
- const xyz = convert.rgb.xyz(rgb);
629
- let x = xyz[0];
630
- let y = xyz[1];
631
- let z = xyz[2];
632
- x /= 95.047;
633
- y /= 100;
634
- z /= 108.883;
635
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
636
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
637
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
638
- const l = 116 * y - 16;
639
- const a = 500 * (x - y);
640
- const b = 200 * (y - z);
641
- return [l, a, b];
642
- };
643
- convert.hsl.rgb = function(hsl) {
644
- const h = hsl[0] / 360;
645
- const s = hsl[1] / 100;
646
- const l = hsl[2] / 100;
647
- let t2;
648
- let t3;
649
- let val;
650
- if (s === 0) {
651
- val = l * 255;
652
- return [val, val, val];
653
- }
654
- if (l < 0.5) {
655
- t2 = l * (1 + s);
656
- } else {
657
- t2 = l + s - l * s;
658
- }
659
- const t1 = 2 * l - t2;
660
- const rgb = [0, 0, 0];
661
- for (let i = 0; i < 3; i++) {
662
- t3 = h + 1 / 3 * -(i - 1);
663
- if (t3 < 0) {
664
- t3++;
665
- }
666
- if (t3 > 1) {
667
- t3--;
668
- }
669
- if (6 * t3 < 1) {
670
- val = t1 + (t2 - t1) * 6 * t3;
671
- } else if (2 * t3 < 1) {
672
- val = t2;
673
- } else if (3 * t3 < 2) {
674
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
675
- } else {
676
- val = t1;
677
- }
678
- rgb[i] = val * 255;
679
- }
680
- return rgb;
681
- };
682
- convert.hsl.hsv = function(hsl) {
683
- const h = hsl[0];
684
- let s = hsl[1] / 100;
685
- let l = hsl[2] / 100;
686
- let smin = s;
687
- const lmin = Math.max(l, 0.01);
688
- l *= 2;
689
- s *= l <= 1 ? l : 2 - l;
690
- smin *= lmin <= 1 ? lmin : 2 - lmin;
691
- const v = (l + s) / 2;
692
- const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
693
- return [h, sv * 100, v * 100];
694
- };
695
- convert.hsv.rgb = function(hsv) {
696
- const h = hsv[0] / 60;
697
- const s = hsv[1] / 100;
698
- let v = hsv[2] / 100;
699
- const hi = Math.floor(h) % 6;
700
- const f = h - Math.floor(h);
701
- const p = 255 * v * (1 - s);
702
- const q = 255 * v * (1 - s * f);
703
- const t = 255 * v * (1 - s * (1 - f));
704
- v *= 255;
705
- switch (hi) {
706
- case 0:
707
- return [v, t, p];
708
- case 1:
709
- return [q, v, p];
710
- case 2:
711
- return [p, v, t];
712
- case 3:
713
- return [p, q, v];
714
- case 4:
715
- return [t, p, v];
716
- case 5:
717
- return [v, p, q];
718
- }
719
- };
720
- convert.hsv.hsl = function(hsv) {
721
- const h = hsv[0];
722
- const s = hsv[1] / 100;
723
- const v = hsv[2] / 100;
724
- const vmin = Math.max(v, 0.01);
725
- let sl;
726
- let l;
727
- l = (2 - s) * v;
728
- const lmin = (2 - s) * vmin;
729
- sl = s * vmin;
730
- sl /= lmin <= 1 ? lmin : 2 - lmin;
731
- sl = sl || 0;
732
- l /= 2;
733
- return [h, sl * 100, l * 100];
734
- };
735
- convert.hwb.rgb = function(hwb) {
736
- const h = hwb[0] / 360;
737
- let wh = hwb[1] / 100;
738
- let bl = hwb[2] / 100;
739
- const ratio = wh + bl;
740
- let f;
741
- if (ratio > 1) {
742
- wh /= ratio;
743
- bl /= ratio;
744
- }
745
- const i = Math.floor(6 * h);
746
- const v = 1 - bl;
747
- f = 6 * h - i;
748
- if ((i & 1) !== 0) {
749
- f = 1 - f;
750
- }
751
- const n = wh + f * (v - wh);
752
- let r;
753
- let g;
754
- let b;
755
- switch (i) {
756
- default:
757
- case 6:
758
- case 0:
759
- r = v;
760
- g = n;
761
- b = wh;
762
- break;
763
- case 1:
764
- r = n;
765
- g = v;
766
- b = wh;
767
- break;
768
- case 2:
769
- r = wh;
770
- g = v;
771
- b = n;
772
- break;
773
- case 3:
774
- r = wh;
775
- g = n;
776
- b = v;
777
- break;
778
- case 4:
779
- r = n;
780
- g = wh;
781
- b = v;
782
- break;
783
- case 5:
784
- r = v;
785
- g = wh;
786
- b = n;
787
- break;
788
- }
789
- return [r * 255, g * 255, b * 255];
790
- };
791
- convert.cmyk.rgb = function(cmyk) {
792
- const c = cmyk[0] / 100;
793
- const m = cmyk[1] / 100;
794
- const y = cmyk[2] / 100;
795
- const k = cmyk[3] / 100;
796
- const r = 1 - Math.min(1, c * (1 - k) + k);
797
- const g = 1 - Math.min(1, m * (1 - k) + k);
798
- const b = 1 - Math.min(1, y * (1 - k) + k);
799
- return [r * 255, g * 255, b * 255];
800
- };
801
- convert.xyz.rgb = function(xyz) {
802
- const x = xyz[0] / 100;
803
- const y = xyz[1] / 100;
804
- const z = xyz[2] / 100;
805
- let r;
806
- let g;
807
- let b;
808
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
809
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
810
- b = x * 0.0557 + y * -0.204 + z * 1.057;
811
- r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
812
- g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
813
- b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
814
- r = Math.min(Math.max(0, r), 1);
815
- g = Math.min(Math.max(0, g), 1);
816
- b = Math.min(Math.max(0, b), 1);
817
- return [r * 255, g * 255, b * 255];
818
- };
819
- convert.xyz.lab = function(xyz) {
820
- let x = xyz[0];
821
- let y = xyz[1];
822
- let z = xyz[2];
823
- x /= 95.047;
824
- y /= 100;
825
- z /= 108.883;
826
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
827
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
828
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
829
- const l = 116 * y - 16;
830
- const a = 500 * (x - y);
831
- const b = 200 * (y - z);
832
- return [l, a, b];
833
- };
834
- convert.lab.xyz = function(lab) {
835
- const l = lab[0];
836
- const a = lab[1];
837
- const b = lab[2];
838
- let x;
839
- let y;
840
- let z;
841
- y = (l + 16) / 116;
842
- x = a / 500 + y;
843
- z = y - b / 200;
844
- const y2 = y ** 3;
845
- const x2 = x ** 3;
846
- const z2 = z ** 3;
847
- y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
848
- x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
849
- z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
850
- x *= 95.047;
851
- y *= 100;
852
- z *= 108.883;
853
- return [x, y, z];
854
- };
855
- convert.lab.lch = function(lab) {
856
- const l = lab[0];
857
- const a = lab[1];
858
- const b = lab[2];
859
- let h;
860
- const hr = Math.atan2(b, a);
861
- h = hr * 360 / 2 / Math.PI;
862
- if (h < 0) {
863
- h += 360;
864
- }
865
- const c = Math.sqrt(a * a + b * b);
866
- return [l, c, h];
867
- };
868
- convert.lch.lab = function(lch) {
869
- const l = lch[0];
870
- const c = lch[1];
871
- const h = lch[2];
872
- const hr = h / 360 * 2 * Math.PI;
873
- const a = c * Math.cos(hr);
874
- const b = c * Math.sin(hr);
875
- return [l, a, b];
876
- };
877
- convert.rgb.ansi16 = function(args, saturation = null) {
878
- const [r, g, b] = args;
879
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
880
- value = Math.round(value / 50);
881
- if (value === 0) {
882
- return 30;
883
- }
884
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
885
- if (value === 2) {
886
- ansi += 60;
887
- }
888
- return ansi;
889
- };
890
- convert.hsv.ansi16 = function(args) {
891
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
892
- };
893
- convert.rgb.ansi256 = function(args) {
894
- const r = args[0];
895
- const g = args[1];
896
- const b = args[2];
897
- if (r === g && g === b) {
898
- if (r < 8) {
899
- return 16;
900
- }
901
- if (r > 248) {
902
- return 231;
903
- }
904
- return Math.round((r - 8) / 247 * 24) + 232;
905
- }
906
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
907
- return ansi;
908
- };
909
- convert.ansi16.rgb = function(args) {
910
- let color = args % 10;
911
- if (color === 0 || color === 7) {
912
- if (args > 50) {
913
- color += 3.5;
914
- }
915
- color = color / 10.5 * 255;
916
- return [color, color, color];
917
- }
918
- const mult = (~~(args > 50) + 1) * 0.5;
919
- const r = (color & 1) * mult * 255;
920
- const g = (color >> 1 & 1) * mult * 255;
921
- const b = (color >> 2 & 1) * mult * 255;
922
- return [r, g, b];
923
- };
924
- convert.ansi256.rgb = function(args) {
925
- if (args >= 232) {
926
- const c = (args - 232) * 10 + 8;
927
- return [c, c, c];
928
- }
929
- args -= 16;
930
- let rem;
931
- const r = Math.floor(args / 36) / 5 * 255;
932
- const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
933
- const b = rem % 6 / 5 * 255;
934
- return [r, g, b];
935
- };
936
- convert.rgb.hex = function(args) {
937
- const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
938
- const string = integer.toString(16).toUpperCase();
939
- return "000000".substring(string.length) + string;
940
- };
941
- convert.hex.rgb = function(args) {
942
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
943
- if (!match) {
944
- return [0, 0, 0];
945
- }
946
- let colorString = match[0];
947
- if (match[0].length === 3) {
948
- colorString = colorString.split("").map((char) => {
949
- return char + char;
950
- }).join("");
951
- }
952
- const integer = parseInt(colorString, 16);
953
- const r = integer >> 16 & 255;
954
- const g = integer >> 8 & 255;
955
- const b = integer & 255;
956
- return [r, g, b];
957
- };
958
- convert.rgb.hcg = function(rgb) {
959
- const r = rgb[0] / 255;
960
- const g = rgb[1] / 255;
961
- const b = rgb[2] / 255;
962
- const max = Math.max(Math.max(r, g), b);
963
- const min = Math.min(Math.min(r, g), b);
964
- const chroma = max - min;
965
- let grayscale;
966
- let hue;
967
- if (chroma < 1) {
968
- grayscale = min / (1 - chroma);
969
- } else {
970
- grayscale = 0;
971
- }
972
- if (chroma <= 0) {
973
- hue = 0;
974
- } else if (max === r) {
975
- hue = (g - b) / chroma % 6;
976
- } else if (max === g) {
977
- hue = 2 + (b - r) / chroma;
978
- } else {
979
- hue = 4 + (r - g) / chroma;
980
- }
981
- hue /= 6;
982
- hue %= 1;
983
- return [hue * 360, chroma * 100, grayscale * 100];
984
- };
985
- convert.hsl.hcg = function(hsl) {
986
- const s = hsl[1] / 100;
987
- const l = hsl[2] / 100;
988
- const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
989
- let f = 0;
990
- if (c < 1) {
991
- f = (l - 0.5 * c) / (1 - c);
992
- }
993
- return [hsl[0], c * 100, f * 100];
994
- };
995
- convert.hsv.hcg = function(hsv) {
996
- const s = hsv[1] / 100;
997
- const v = hsv[2] / 100;
998
- const c = s * v;
999
- let f = 0;
1000
- if (c < 1) {
1001
- f = (v - c) / (1 - c);
1002
- }
1003
- return [hsv[0], c * 100, f * 100];
1004
- };
1005
- convert.hcg.rgb = function(hcg) {
1006
- const h = hcg[0] / 360;
1007
- const c = hcg[1] / 100;
1008
- const g = hcg[2] / 100;
1009
- if (c === 0) {
1010
- return [g * 255, g * 255, g * 255];
1011
- }
1012
- const pure = [0, 0, 0];
1013
- const hi = h % 1 * 6;
1014
- const v = hi % 1;
1015
- const w = 1 - v;
1016
- let mg = 0;
1017
- switch (Math.floor(hi)) {
1018
- case 0:
1019
- pure[0] = 1;
1020
- pure[1] = v;
1021
- pure[2] = 0;
1022
- break;
1023
- case 1:
1024
- pure[0] = w;
1025
- pure[1] = 1;
1026
- pure[2] = 0;
1027
- break;
1028
- case 2:
1029
- pure[0] = 0;
1030
- pure[1] = 1;
1031
- pure[2] = v;
1032
- break;
1033
- case 3:
1034
- pure[0] = 0;
1035
- pure[1] = w;
1036
- pure[2] = 1;
1037
- break;
1038
- case 4:
1039
- pure[0] = v;
1040
- pure[1] = 0;
1041
- pure[2] = 1;
1042
- break;
1043
- default:
1044
- pure[0] = 1;
1045
- pure[1] = 0;
1046
- pure[2] = w;
1047
- }
1048
- mg = (1 - c) * g;
1049
- return [
1050
- (c * pure[0] + mg) * 255,
1051
- (c * pure[1] + mg) * 255,
1052
- (c * pure[2] + mg) * 255
1053
- ];
1054
- };
1055
- convert.hcg.hsv = function(hcg) {
1056
- const c = hcg[1] / 100;
1057
- const g = hcg[2] / 100;
1058
- const v = c + g * (1 - c);
1059
- let f = 0;
1060
- if (v > 0) {
1061
- f = c / v;
1062
- }
1063
- return [hcg[0], f * 100, v * 100];
1064
- };
1065
- convert.hcg.hsl = function(hcg) {
1066
- const c = hcg[1] / 100;
1067
- const g = hcg[2] / 100;
1068
- const l = g * (1 - c) + 0.5 * c;
1069
- let s = 0;
1070
- if (l > 0 && l < 0.5) {
1071
- s = c / (2 * l);
1072
- } else if (l >= 0.5 && l < 1) {
1073
- s = c / (2 * (1 - l));
1074
- }
1075
- return [hcg[0], s * 100, l * 100];
1076
- };
1077
- convert.hcg.hwb = function(hcg) {
1078
- const c = hcg[1] / 100;
1079
- const g = hcg[2] / 100;
1080
- const v = c + g * (1 - c);
1081
- return [hcg[0], (v - c) * 100, (1 - v) * 100];
1082
- };
1083
- convert.hwb.hcg = function(hwb) {
1084
- const w = hwb[1] / 100;
1085
- const b = hwb[2] / 100;
1086
- const v = 1 - b;
1087
- const c = v - w;
1088
- let g = 0;
1089
- if (c < 1) {
1090
- g = (v - c) / (1 - c);
1091
- }
1092
- return [hwb[0], c * 100, g * 100];
1093
- };
1094
- convert.apple.rgb = function(apple) {
1095
- return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
1096
- };
1097
- convert.rgb.apple = function(rgb) {
1098
- return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
1099
- };
1100
- convert.gray.rgb = function(args) {
1101
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
1102
- };
1103
- convert.gray.hsl = function(args) {
1104
- return [0, 0, args[0]];
1105
- };
1106
- convert.gray.hsv = convert.gray.hsl;
1107
- convert.gray.hwb = function(gray) {
1108
- return [0, 100, gray[0]];
1109
- };
1110
- convert.gray.cmyk = function(gray) {
1111
- return [0, 0, 0, gray[0]];
1112
- };
1113
- convert.gray.lab = function(gray) {
1114
- return [gray[0], 0, 0];
1115
- };
1116
- convert.gray.hex = function(gray) {
1117
- const val = Math.round(gray[0] / 100 * 255) & 255;
1118
- const integer = (val << 16) + (val << 8) + val;
1119
- const string = integer.toString(16).toUpperCase();
1120
- return "000000".substring(string.length) + string;
1121
- };
1122
- convert.rgb.gray = function(rgb) {
1123
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
1124
- return [val / 255 * 100];
1125
- };
1126
- }
1127
- });
1128
- var require_route = (0, import_chunk_WWAWV7DQ.__commonJS)({
1129
- "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports, module2) {
1130
- "use strict";
1131
- var conversions = require_conversions();
1132
- function buildGraph() {
1133
- const graph = {};
1134
- const models = Object.keys(conversions);
1135
- for (let len = models.length, i = 0; i < len; i++) {
1136
- graph[models[i]] = {
1137
- // http://jsperf.com/1-vs-infinity
1138
- // micro-opt, but this is simple.
1139
- distance: -1,
1140
- parent: null
1141
- };
1142
- }
1143
- return graph;
1144
- }
1145
- function deriveBFS(fromModel) {
1146
- const graph = buildGraph();
1147
- const queue = [fromModel];
1148
- graph[fromModel].distance = 0;
1149
- while (queue.length) {
1150
- const current = queue.pop();
1151
- const adjacents = Object.keys(conversions[current]);
1152
- for (let len = adjacents.length, i = 0; i < len; i++) {
1153
- const adjacent = adjacents[i];
1154
- const node = graph[adjacent];
1155
- if (node.distance === -1) {
1156
- node.distance = graph[current].distance + 1;
1157
- node.parent = current;
1158
- queue.unshift(adjacent);
1159
- }
1160
- }
1161
- }
1162
- return graph;
1163
- }
1164
- function link(from, to) {
1165
- return function(args) {
1166
- return to(from(args));
1167
- };
1168
- }
1169
- function wrapConversion(toModel, graph) {
1170
- const path2 = [graph[toModel].parent, toModel];
1171
- let fn = conversions[graph[toModel].parent][toModel];
1172
- let cur = graph[toModel].parent;
1173
- while (graph[cur].parent) {
1174
- path2.unshift(graph[cur].parent);
1175
- fn = link(conversions[graph[cur].parent][cur], fn);
1176
- cur = graph[cur].parent;
1177
- }
1178
- fn.conversion = path2;
1179
- return fn;
1180
- }
1181
- module2.exports = function(fromModel) {
1182
- const graph = deriveBFS(fromModel);
1183
- const conversion = {};
1184
- const models = Object.keys(graph);
1185
- for (let len = models.length, i = 0; i < len; i++) {
1186
- const toModel = models[i];
1187
- const node = graph[toModel];
1188
- if (node.parent === null) {
1189
- continue;
1190
- }
1191
- conversion[toModel] = wrapConversion(toModel, graph);
1192
- }
1193
- return conversion;
1194
- };
1195
- }
1196
- });
1197
- var require_color_convert = (0, import_chunk_WWAWV7DQ.__commonJS)({
1198
- "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports, module2) {
1199
- "use strict";
1200
- var conversions = require_conversions();
1201
- var route = require_route();
1202
- var convert = {};
1203
- var models = Object.keys(conversions);
1204
- function wrapRaw(fn) {
1205
- const wrappedFn = function(...args) {
1206
- const arg0 = args[0];
1207
- if (arg0 === void 0 || arg0 === null) {
1208
- return arg0;
1209
- }
1210
- if (arg0.length > 1) {
1211
- args = arg0;
1212
- }
1213
- return fn(args);
1214
- };
1215
- if ("conversion" in fn) {
1216
- wrappedFn.conversion = fn.conversion;
1217
- }
1218
- return wrappedFn;
1219
- }
1220
- function wrapRounded(fn) {
1221
- const wrappedFn = function(...args) {
1222
- const arg0 = args[0];
1223
- if (arg0 === void 0 || arg0 === null) {
1224
- return arg0;
1225
- }
1226
- if (arg0.length > 1) {
1227
- args = arg0;
1228
- }
1229
- const result = fn(args);
1230
- if (typeof result === "object") {
1231
- for (let len = result.length, i = 0; i < len; i++) {
1232
- result[i] = Math.round(result[i]);
1233
- }
1234
- }
1235
- return result;
1236
- };
1237
- if ("conversion" in fn) {
1238
- wrappedFn.conversion = fn.conversion;
1239
- }
1240
- return wrappedFn;
1241
- }
1242
- models.forEach((fromModel) => {
1243
- convert[fromModel] = {};
1244
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
1245
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
1246
- const routes = route(fromModel);
1247
- const routeModels = Object.keys(routes);
1248
- routeModels.forEach((toModel) => {
1249
- const fn = routes[toModel];
1250
- convert[fromModel][toModel] = wrapRounded(fn);
1251
- convert[fromModel][toModel].raw = wrapRaw(fn);
1252
- });
1253
- });
1254
- module2.exports = convert;
1255
- }
1256
- });
1257
- var require_ansi_styles = (0, import_chunk_WWAWV7DQ.__commonJS)({
1258
- "../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js"(exports, module2) {
1259
- "use strict";
1260
- var wrapAnsi16 = (fn, offset) => (...args) => {
1261
- const code = fn(...args);
1262
- return `\x1B[${code + offset}m`;
1263
- };
1264
- var wrapAnsi256 = (fn, offset) => (...args) => {
1265
- const code = fn(...args);
1266
- return `\x1B[${38 + offset};5;${code}m`;
1267
- };
1268
- var wrapAnsi16m = (fn, offset) => (...args) => {
1269
- const rgb = fn(...args);
1270
- return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1271
- };
1272
- var ansi2ansi = (n) => n;
1273
- var rgb2rgb = (r, g, b) => [r, g, b];
1274
- var setLazyProperty = (object, property, get) => {
1275
- Object.defineProperty(object, property, {
1276
- get: () => {
1277
- const value = get();
1278
- Object.defineProperty(object, property, {
1279
- value,
1280
- enumerable: true,
1281
- configurable: true
1282
- });
1283
- return value;
1284
- },
1285
- enumerable: true,
1286
- configurable: true
1287
- });
1288
- };
1289
- var colorConvert;
1290
- var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1291
- if (colorConvert === void 0) {
1292
- colorConvert = require_color_convert();
1293
- }
1294
- const offset = isBackground ? 10 : 0;
1295
- const styles = {};
1296
- for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
1297
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1298
- if (sourceSpace === targetSpace) {
1299
- styles[name] = wrap(identity, offset);
1300
- } else if (typeof suite === "object") {
1301
- styles[name] = wrap(suite[targetSpace], offset);
1302
- }
1303
- }
1304
- return styles;
1305
- };
1306
- function assembleStyles() {
1307
- const codes = /* @__PURE__ */ new Map();
1308
- const styles = {
1309
- modifier: {
1310
- reset: [0, 0],
1311
- // 21 isn't widely supported and 22 does the same thing
1312
- bold: [1, 22],
1313
- dim: [2, 22],
1314
- italic: [3, 23],
1315
- underline: [4, 24],
1316
- inverse: [7, 27],
1317
- hidden: [8, 28],
1318
- strikethrough: [9, 29]
1319
- },
1320
- color: {
1321
- black: [30, 39],
1322
- red: [31, 39],
1323
- green: [32, 39],
1324
- yellow: [33, 39],
1325
- blue: [34, 39],
1326
- magenta: [35, 39],
1327
- cyan: [36, 39],
1328
- white: [37, 39],
1329
- // Bright color
1330
- blackBright: [90, 39],
1331
- redBright: [91, 39],
1332
- greenBright: [92, 39],
1333
- yellowBright: [93, 39],
1334
- blueBright: [94, 39],
1335
- magentaBright: [95, 39],
1336
- cyanBright: [96, 39],
1337
- whiteBright: [97, 39]
1338
- },
1339
- bgColor: {
1340
- bgBlack: [40, 49],
1341
- bgRed: [41, 49],
1342
- bgGreen: [42, 49],
1343
- bgYellow: [43, 49],
1344
- bgBlue: [44, 49],
1345
- bgMagenta: [45, 49],
1346
- bgCyan: [46, 49],
1347
- bgWhite: [47, 49],
1348
- // Bright color
1349
- bgBlackBright: [100, 49],
1350
- bgRedBright: [101, 49],
1351
- bgGreenBright: [102, 49],
1352
- bgYellowBright: [103, 49],
1353
- bgBlueBright: [104, 49],
1354
- bgMagentaBright: [105, 49],
1355
- bgCyanBright: [106, 49],
1356
- bgWhiteBright: [107, 49]
1357
- }
1358
- };
1359
- styles.color.gray = styles.color.blackBright;
1360
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
1361
- styles.color.grey = styles.color.blackBright;
1362
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
1363
- for (const [groupName, group] of Object.entries(styles)) {
1364
- for (const [styleName, style] of Object.entries(group)) {
1365
- styles[styleName] = {
1366
- open: `\x1B[${style[0]}m`,
1367
- close: `\x1B[${style[1]}m`
1368
- };
1369
- group[styleName] = styles[styleName];
1370
- codes.set(style[0], style[1]);
1371
- }
1372
- Object.defineProperty(styles, groupName, {
1373
- value: group,
1374
- enumerable: false
1375
- });
1376
- }
1377
- Object.defineProperty(styles, "codes", {
1378
- value: codes,
1379
- enumerable: false
1380
- });
1381
- styles.color.close = "\x1B[39m";
1382
- styles.bgColor.close = "\x1B[49m";
1383
- setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1384
- setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1385
- setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1386
- setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1387
- setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1388
- setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1389
- return styles;
1390
- }
1391
- Object.defineProperty(module2, "exports", {
1392
- enumerable: true,
1393
- get: assembleStyles
1394
- });
1395
- }
1396
- });
1397
- var require_wrap_ansi = (0, import_chunk_WWAWV7DQ.__commonJS)({
1398
- "../../node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js"(exports, module2) {
1399
- "use strict";
1400
- var stringWidth = require_string_width();
1401
- var stripAnsi = require_strip_ansi();
1402
- var ansiStyles = require_ansi_styles();
1403
- var ESCAPES = /* @__PURE__ */ new Set([
1404
- "\x1B",
1405
- "\x9B"
1406
- ]);
1407
- var END_CODE = 39;
1408
- var wrapAnsi = (code) => `${ESCAPES.values().next().value}[${code}m`;
1409
- var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
1410
- var wrapWord = (rows, word, columns) => {
1411
- const characters = [...word];
1412
- let isInsideEscape = false;
1413
- let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
1414
- for (const [index, character] of characters.entries()) {
1415
- const characterLength = stringWidth(character);
1416
- if (visible + characterLength <= columns) {
1417
- rows[rows.length - 1] += character;
1418
- } else {
1419
- rows.push(character);
1420
- visible = 0;
1421
- }
1422
- if (ESCAPES.has(character)) {
1423
- isInsideEscape = true;
1424
- } else if (isInsideEscape && character === "m") {
1425
- isInsideEscape = false;
1426
- continue;
1427
- }
1428
- if (isInsideEscape) {
1429
- continue;
1430
- }
1431
- visible += characterLength;
1432
- if (visible === columns && index < characters.length - 1) {
1433
- rows.push("");
1434
- visible = 0;
1435
- }
1436
- }
1437
- if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
1438
- rows[rows.length - 2] += rows.pop();
1439
- }
1440
- };
1441
- var stringVisibleTrimSpacesRight = (str) => {
1442
- const words = str.split(" ");
1443
- let last = words.length;
1444
- while (last > 0) {
1445
- if (stringWidth(words[last - 1]) > 0) {
1446
- break;
1447
- }
1448
- last--;
1449
- }
1450
- if (last === words.length) {
1451
- return str;
1452
- }
1453
- return words.slice(0, last).join(" ") + words.slice(last).join("");
1454
- };
1455
- var exec = (string, columns, options = {}) => {
1456
- if (options.trim !== false && string.trim() === "") {
1457
- return "";
1458
- }
1459
- let pre = "";
1460
- let ret = "";
1461
- let escapeCode;
1462
- const lengths = wordLengths(string);
1463
- let rows = [""];
1464
- for (const [index, word] of string.split(" ").entries()) {
1465
- if (options.trim !== false) {
1466
- rows[rows.length - 1] = rows[rows.length - 1].trimLeft();
1467
- }
1468
- let rowLength = stringWidth(rows[rows.length - 1]);
1469
- if (index !== 0) {
1470
- if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
1471
- rows.push("");
1472
- rowLength = 0;
1473
- }
1474
- if (rowLength > 0 || options.trim === false) {
1475
- rows[rows.length - 1] += " ";
1476
- rowLength++;
1477
- }
1478
- }
1479
- if (options.hard && lengths[index] > columns) {
1480
- const remainingColumns = columns - rowLength;
1481
- const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
1482
- const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
1483
- if (breaksStartingNextLine < breaksStartingThisLine) {
1484
- rows.push("");
1485
- }
1486
- wrapWord(rows, word, columns);
1487
- continue;
1488
- }
1489
- if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
1490
- if (options.wordWrap === false && rowLength < columns) {
1491
- wrapWord(rows, word, columns);
1492
- continue;
1493
- }
1494
- rows.push("");
1495
- }
1496
- if (rowLength + lengths[index] > columns && options.wordWrap === false) {
1497
- wrapWord(rows, word, columns);
1498
- continue;
1499
- }
1500
- rows[rows.length - 1] += word;
1501
- }
1502
- if (options.trim !== false) {
1503
- rows = rows.map(stringVisibleTrimSpacesRight);
1504
- }
1505
- pre = rows.join("\n");
1506
- for (const [index, character] of [...pre].entries()) {
1507
- ret += character;
1508
- if (ESCAPES.has(character)) {
1509
- const code2 = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4)));
1510
- escapeCode = code2 === END_CODE ? null : code2;
1511
- }
1512
- const code = ansiStyles.codes.get(Number(escapeCode));
1513
- if (escapeCode && code) {
1514
- if (pre[index + 1] === "\n") {
1515
- ret += wrapAnsi(code);
1516
- } else if (character === "\n") {
1517
- ret += wrapAnsi(escapeCode);
1518
- }
1519
- }
1520
- }
1521
- return ret;
1522
- };
1523
- module2.exports = (string, columns, options) => {
1524
- return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
1525
- };
1526
- }
1527
- });
1528
- var require_astral_regex = (0, import_chunk_WWAWV7DQ.__commonJS)({
1529
- "../../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js"(exports, module2) {
1530
- "use strict";
1531
- var regex = "[\uD800-\uDBFF][\uDC00-\uDFFF]";
1532
- var astralRegex = (options) => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, "g");
1533
- module2.exports = astralRegex;
1534
- }
1535
- });
1536
- var require_slice_ansi = (0, import_chunk_WWAWV7DQ.__commonJS)({
1537
- "../../node_modules/.pnpm/slice-ansi@4.0.0/node_modules/slice-ansi/index.js"(exports, module2) {
1538
- "use strict";
1539
- var isFullwidthCodePoint = require_is_fullwidth_code_point();
1540
- var astralRegex = require_astral_regex();
1541
- var ansiStyles = require_ansi_styles();
1542
- var ESCAPES = [
1543
- "\x1B",
1544
- "\x9B"
1545
- ];
1546
- var wrapAnsi = (code) => `${ESCAPES[0]}[${code}m`;
1547
- var checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
1548
- let output = [];
1549
- ansiCodes = [...ansiCodes];
1550
- for (let ansiCode of ansiCodes) {
1551
- const ansiCodeOrigin = ansiCode;
1552
- if (ansiCode.includes(";")) {
1553
- ansiCode = ansiCode.split(";")[0][0] + "0";
1554
- }
1555
- const item = ansiStyles.codes.get(Number.parseInt(ansiCode, 10));
1556
- if (item) {
1557
- const indexEscape = ansiCodes.indexOf(item.toString());
1558
- if (indexEscape === -1) {
1559
- output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin));
1560
- } else {
1561
- ansiCodes.splice(indexEscape, 1);
1562
- }
1563
- } else if (isEscapes) {
1564
- output.push(wrapAnsi(0));
1565
- break;
1566
- } else {
1567
- output.push(wrapAnsi(ansiCodeOrigin));
1568
- }
1569
- }
1570
- if (isEscapes) {
1571
- output = output.filter((element, index) => output.indexOf(element) === index);
1572
- if (endAnsiCode !== void 0) {
1573
- const fistEscapeCode = wrapAnsi(ansiStyles.codes.get(Number.parseInt(endAnsiCode, 10)));
1574
- output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);
1575
- }
1576
- }
1577
- return output.join("");
1578
- };
1579
- module2.exports = (string, begin, end) => {
1580
- const characters = [...string];
1581
- const ansiCodes = [];
1582
- let stringEnd = typeof end === "number" ? end : characters.length;
1583
- let isInsideEscape = false;
1584
- let ansiCode;
1585
- let visible = 0;
1586
- let output = "";
1587
- for (const [index, character] of characters.entries()) {
1588
- let leftEscape = false;
1589
- if (ESCAPES.includes(character)) {
1590
- const code = /\d[^m]*/.exec(string.slice(index, index + 18));
1591
- ansiCode = code && code.length > 0 ? code[0] : void 0;
1592
- if (visible < stringEnd) {
1593
- isInsideEscape = true;
1594
- if (ansiCode !== void 0) {
1595
- ansiCodes.push(ansiCode);
1596
- }
1597
- }
1598
- } else if (isInsideEscape && character === "m") {
1599
- isInsideEscape = false;
1600
- leftEscape = true;
1601
- }
1602
- if (!isInsideEscape && !leftEscape) {
1603
- visible++;
1604
- }
1605
- if (!astralRegex({ exact: true }).test(character) && isFullwidthCodePoint(character.codePointAt())) {
1606
- visible++;
1607
- if (typeof end !== "number") {
1608
- stringEnd++;
1609
- }
1610
- }
1611
- if (visible > begin && visible <= stringEnd) {
1612
- output += character;
1613
- } else if (visible === begin && !isInsideEscape && ansiCode !== void 0) {
1614
- output = checkAnsi(ansiCodes);
1615
- } else if (visible >= stringEnd) {
1616
- output += checkAnsi(ansiCodes, true, ansiCode);
1617
- break;
1618
- }
1619
- }
1620
- return output;
1621
- };
1622
- }
1623
- });
1624
- var require_log_update = (0, import_chunk_WWAWV7DQ.__commonJS)({
1625
- "../../node_modules/.pnpm/log-update@4.0.0/node_modules/log-update/index.js"(exports, module2) {
1626
- "use strict";
1627
- var ansiEscapes = require_ansi_escapes();
1628
- var cliCursor = require_cli_cursor();
1629
- var wrapAnsi = require_wrap_ansi();
1630
- var sliceAnsi = require_slice_ansi();
1631
- var defaultTerminalHeight = 24;
1632
- var getWidth = (stream) => {
1633
- const { columns } = stream;
1634
- if (!columns) {
1635
- return 80;
1636
- }
1637
- return columns;
1638
- };
1639
- var fitToTerminalHeight = (stream, text) => {
1640
- const terminalHeight = stream.rows || defaultTerminalHeight;
1641
- const lines = text.split("\n");
1642
- const toRemove = lines.length - terminalHeight;
1643
- if (toRemove <= 0) {
1644
- return text;
1645
- }
1646
- return sliceAnsi(
1647
- text,
1648
- lines.slice(0, toRemove).join("\n").length + 1,
1649
- text.length
1650
- );
1651
- };
1652
- var main = (stream, { showCursor = false } = {}) => {
1653
- let previousLineCount = 0;
1654
- let previousWidth = getWidth(stream);
1655
- let previousOutput = "";
1656
- const render = (...args) => {
1657
- if (!showCursor) {
1658
- cliCursor.hide();
1659
- }
1660
- let output = args.join(" ") + "\n";
1661
- output = fitToTerminalHeight(stream, output);
1662
- const width = getWidth(stream);
1663
- if (output === previousOutput && previousWidth === width) {
1664
- return;
1665
- }
1666
- previousOutput = output;
1667
- previousWidth = width;
1668
- output = wrapAnsi(output, width, {
1669
- trim: false,
1670
- hard: true,
1671
- wordWrap: false
1672
- });
1673
- stream.write(ansiEscapes.eraseLines(previousLineCount) + output);
1674
- previousLineCount = output.split("\n").length;
1675
- };
1676
- render.clear = () => {
1677
- stream.write(ansiEscapes.eraseLines(previousLineCount));
1678
- previousOutput = "";
1679
- previousWidth = getWidth(stream);
1680
- previousLineCount = 0;
1681
- };
1682
- render.done = () => {
1683
- previousOutput = "";
1684
- previousWidth = getWidth(stream);
1685
- previousLineCount = 0;
1686
- if (!showCursor) {
1687
- cliCursor.show();
1688
- }
1689
- };
1690
- return render;
1691
- };
1692
- module2.exports = main(process.stdout);
1693
- module2.exports.stderr = main(process.stderr);
1694
- module2.exports.create = main;
1695
- }
1696
- });
1697
- var import_log_update = (0, import_chunk_WWAWV7DQ.__toESM)(require_log_update());
1698
- var packageJson = eval(`require('../package.json')`);
1699
- var Migrate = class {
1700
- constructor(schemaPath, enabledPreviewFeatures) {
1701
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "engine");
1702
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "schemaPath");
1703
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "migrationsDirectoryPath");
1704
- if (schemaPath) {
1705
- this.schemaPath = import_path.default.resolve(process.cwd(), schemaPath);
1706
- this.migrationsDirectoryPath = import_path.default.join(import_path.default.dirname(this.schemaPath), "migrations");
1707
- this.engine = new import_chunk_ZOEKRXDP.SchemaEngine({
1708
- schemaPath: this.schemaPath,
1709
- enabledPreviewFeatures
1710
- });
1711
- } else {
1712
- this.engine = new import_chunk_ZOEKRXDP.SchemaEngine({
1713
- enabledPreviewFeatures
1714
- });
1715
- }
1716
- }
1717
- stop() {
1718
- this.engine.stop();
1719
- }
1720
- getPrismaSchema() {
1721
- if (!this.schemaPath) throw new Error("this.schemaPath is undefined");
1722
- return (0, import_internals.getSchemaWithPath)(this.schemaPath);
1723
- }
1724
- reset() {
1725
- return this.engine.reset();
1726
- }
1727
- createMigration(params) {
1728
- return this.engine.createMigration(params);
1729
- }
1730
- diagnoseMigrationHistory({
1731
- optInToShadowDatabase
1732
- }) {
1733
- if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
1734
- return this.engine.diagnoseMigrationHistory({
1735
- migrationsDirectoryPath: this.migrationsDirectoryPath,
1736
- optInToShadowDatabase
1737
- });
1738
- }
1739
- listMigrationDirectories() {
1740
- if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
1741
- return this.engine.listMigrationDirectories({
1742
- migrationsDirectoryPath: this.migrationsDirectoryPath
1743
- });
1744
- }
1745
- devDiagnostic() {
1746
- if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
1747
- return this.engine.devDiagnostic({
1748
- migrationsDirectoryPath: this.migrationsDirectoryPath
1749
- });
1750
- }
1751
- async markMigrationApplied({ migrationId }) {
1752
- if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
1753
- return await this.engine.markMigrationApplied({
1754
- migrationsDirectoryPath: this.migrationsDirectoryPath,
1755
- migrationName: migrationId
1756
- });
1757
- }
1758
- markMigrationRolledBack({ migrationId }) {
1759
- return this.engine.markMigrationRolledBack({
1760
- migrationName: migrationId
1761
- });
1762
- }
1763
- applyMigrations() {
1764
- if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
1765
- return this.engine.applyMigrations({
1766
- migrationsDirectoryPath: this.migrationsDirectoryPath
1767
- });
1768
- }
1769
- async evaluateDataLoss() {
1770
- if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
1771
- const schema = (0, import_internals.toSchemasContainer)((await this.getPrismaSchema()).schemas);
1772
- return this.engine.evaluateDataLoss({
1773
- migrationsDirectoryPath: this.migrationsDirectoryPath,
1774
- schema
1775
- });
1776
- }
1777
- async push({ force = false }) {
1778
- const schema = (0, import_internals.toSchemasContainer)((await this.getPrismaSchema()).schemas);
1779
- const { warnings, unexecutable, executedSteps } = await this.engine.schemaPush({
1780
- force,
1781
- schema
1782
- });
1783
- return {
1784
- executedSteps,
1785
- warnings,
1786
- unexecutable
1787
- };
1788
- }
1789
- async tryToRunGenerate(datasourceInfo) {
1790
- if (!this.schemaPath) throw new Error("this.schemaPath is undefined");
1791
- const skipEngines = (0, import_internals.isPrismaPostgres)(datasourceInfo.url);
1792
- const message = [];
1793
- process.stdout.write("\n");
1794
- (0, import_log_update.default)(`Running generate... ${(0, import_chunk_SKRR5WT4.dim)("(Use --skip-generate to skip the generators)")}`);
1795
- const generators = await (0, import_internals.getGenerators)({
1796
- schemaPath: this.schemaPath,
1797
- printDownloadProgress: true,
1798
- version: import_engines_version.enginesVersion,
1799
- cliVersion: packageJson.version,
1800
- noEngine: skipEngines
1801
- });
1802
- for (const generator of generators) {
1803
- (0, import_log_update.default)(`Running generate... - ${generator.getPrettyName()}`);
1804
- const before = Math.round(performance.now());
1805
- try {
1806
- await generator.generate();
1807
- const after = Math.round(performance.now());
1808
- message.push((0, import_internals.getGeneratorSuccessMessage)(generator, after - before));
1809
- generator.stop();
1810
- } catch (e) {
1811
- message.push(`${e.message}`);
1812
- generator.stop();
1813
- }
1814
- }
1815
- (0, import_log_update.default)(message.join("\n"));
1816
- }
1817
- };