@jsenv/core 40.3.2 → 40.4.0

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 (123) hide show
  1. package/dist/build/browserslist_index/browserslist_index.js +4951 -0
  2. package/dist/build/build.js +228 -83
  3. package/dist/build/jsenv_core_node_modules.js +709 -0
  4. package/dist/build/jsenv_core_packages.js +10915 -0
  5. package/dist/start_build_server/jsenv_core_node_modules.js +685 -0
  6. package/dist/start_build_server/jsenv_core_packages.js +1550 -0
  7. package/dist/start_build_server/start_build_server.js +2 -9
  8. package/dist/start_dev_server/jsenv_core_node_modules.js +685 -0
  9. package/dist/start_dev_server/jsenv_core_packages.js +6185 -0
  10. package/dist/start_dev_server/start_dev_server.js +109 -75
  11. package/package.json +20 -20
  12. package/src/build/build.js +79 -0
  13. package/src/build/build_specifier_manager.js +2 -2
  14. package/src/build/build_urls_generator.js +42 -5
  15. package/src/kitchen/errors.js +6 -1
  16. package/src/kitchen/kitchen.js +95 -7
  17. package/src/plugins/package_side_effects/jsenv_plugin_package_side_effects.js +5 -65
  18. package/dist/babel_helpers/AsyncGenerator/AsyncGenerator.js +0 -112
  19. package/dist/babel_helpers/AwaitValue/AwaitValue.js +0 -3
  20. package/dist/babel_helpers/OverloadYield/OverloadYield.js +0 -11
  21. package/dist/babel_helpers/applyDecoratedDescriptor/applyDecoratedDescriptor.js +0 -32
  22. package/dist/babel_helpers/applyDecs/applyDecs.js +0 -813
  23. package/dist/babel_helpers/applyDecs2203/applyDecs2203.js +0 -635
  24. package/dist/babel_helpers/applyDecs2203R/applyDecs2203R.js +0 -654
  25. package/dist/babel_helpers/applyDecs2301/applyDecs2301.js +0 -721
  26. package/dist/babel_helpers/applyDecs2305/applyDecs2305.js +0 -531
  27. package/dist/babel_helpers/arrayLikeToArray/arrayLikeToArray.js +0 -7
  28. package/dist/babel_helpers/arrayWithHoles/arrayWithHoles.js +0 -4
  29. package/dist/babel_helpers/arrayWithoutHoles/arrayWithoutHoles.js +0 -6
  30. package/dist/babel_helpers/assertThisInitialized/assertThisInitialized.js +0 -9
  31. package/dist/babel_helpers/asyncGeneratorDelegate/asyncGeneratorDelegate.js +0 -55
  32. package/dist/babel_helpers/asyncIterator/asyncIterator.js +0 -68
  33. package/dist/babel_helpers/asyncToGenerator/asyncToGenerator.js +0 -34
  34. package/dist/babel_helpers/awaitAsyncGenerator/awaitAsyncGenerator.js +0 -5
  35. package/dist/babel_helpers/callSuper/callSuper.js +0 -25
  36. package/dist/babel_helpers/checkInRHS/checkInRHS.js +0 -11
  37. package/dist/babel_helpers/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js +0 -23
  38. package/dist/babel_helpers/classApplyDescriptorGet/classApplyDescriptorGet.js +0 -6
  39. package/dist/babel_helpers/classApplyDescriptorSet/classApplyDescriptorSet.js +0 -13
  40. package/dist/babel_helpers/classCallCheck/classCallCheck.js +0 -5
  41. package/dist/babel_helpers/classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js +0 -8
  42. package/dist/babel_helpers/classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js +0 -11
  43. package/dist/babel_helpers/classExtractFieldDescriptor/classExtractFieldDescriptor.js +0 -13
  44. package/dist/babel_helpers/classNameTDZError/classNameTDZError.js +0 -6
  45. package/dist/babel_helpers/classPrivateFieldDestructureSet/classPrivateFieldDestructureSet.js +0 -7
  46. package/dist/babel_helpers/classPrivateFieldGet/classPrivateFieldGet.js +0 -7
  47. package/dist/babel_helpers/classPrivateFieldLooseBase/classPrivateFieldLooseBase.js +0 -6
  48. package/dist/babel_helpers/classPrivateFieldLooseKey/classPrivateFieldLooseKey.js +0 -5
  49. package/dist/babel_helpers/classPrivateFieldSet/classPrivateFieldSet.js +0 -8
  50. package/dist/babel_helpers/classPrivateMethodGet/classPrivateMethodGet.js +0 -6
  51. package/dist/babel_helpers/classPrivateMethodSet/classPrivateMethodSet.js +0 -3
  52. package/dist/babel_helpers/classStaticPrivateFieldSpecGet/classStaticPrivateFieldSpecGet.js +0 -13
  53. package/dist/babel_helpers/classStaticPrivateFieldSpecSet/classStaticPrivateFieldSpecSet.js +0 -15
  54. package/dist/babel_helpers/classStaticPrivateMethodGet/classStaticPrivateMethodGet.js +0 -10
  55. package/dist/babel_helpers/classStaticPrivateMethodSet/classStaticPrivateMethodSet.js +0 -3
  56. package/dist/babel_helpers/construct/construct.js +0 -20
  57. package/dist/babel_helpers/createClass/createClass.js +0 -17
  58. package/dist/babel_helpers/createForOfIteratorHelper/createForOfIteratorHelper.js +0 -61
  59. package/dist/babel_helpers/createForOfIteratorHelperLoose/createForOfIteratorHelperLoose.js +0 -24
  60. package/dist/babel_helpers/createRawReactElement/createRawReactElement.js +0 -50
  61. package/dist/babel_helpers/createSuper/createSuper.js +0 -22
  62. package/dist/babel_helpers/decorate/decorate.js +0 -488
  63. package/dist/babel_helpers/defaults/defaults.js +0 -11
  64. package/dist/babel_helpers/defineAccessor/defineAccessor.js +0 -6
  65. package/dist/babel_helpers/defineEnumerableProperties/defineEnumerableProperties.js +0 -23
  66. package/dist/babel_helpers/defineProperty/defineProperty.js +0 -21
  67. package/dist/babel_helpers/dispose/dispose.js +0 -45
  68. package/dist/babel_helpers/extends/extends.js +0 -14
  69. package/dist/babel_helpers/get/get.js +0 -19
  70. package/dist/babel_helpers/getPrototypeOf/getPrototypeOf.js +0 -4
  71. package/dist/babel_helpers/identity/identity.js +0 -3
  72. package/dist/babel_helpers/importDeferProxy/importDeferProxy.js +0 -31
  73. package/dist/babel_helpers/inherits/inherits.js +0 -19
  74. package/dist/babel_helpers/inheritsLoose/inheritsLoose.js +0 -7
  75. package/dist/babel_helpers/initializerDefineProperty/initializerDefineProperty.js +0 -12
  76. package/dist/babel_helpers/initializerWarningHelper/initializerWarningHelper.js +0 -6
  77. package/dist/babel_helpers/instanceof/instanceof.js +0 -10
  78. package/dist/babel_helpers/interopRequireDefault/interopRequireDefault.js +0 -3
  79. package/dist/babel_helpers/interopRequireWildcard/interopRequireWildcard.js +0 -47
  80. package/dist/babel_helpers/isNativeFunction/isNativeFunction.js +0 -9
  81. package/dist/babel_helpers/isNativeReflectConstruct/isNativeReflectConstruct.js +0 -19
  82. package/dist/babel_helpers/iterableToArray/iterableToArray.js +0 -7
  83. package/dist/babel_helpers/iterableToArrayLimit/iterableToArrayLimit.js +0 -54
  84. package/dist/babel_helpers/iterableToArrayLimitLoose/iterableToArrayLimitLoose.js +0 -16
  85. package/dist/babel_helpers/jsx/jsx.js +0 -50
  86. package/dist/babel_helpers/maybeArrayLike/maybeArrayLike.js +0 -10
  87. package/dist/babel_helpers/newArrowCheck/newArrowCheck.js +0 -5
  88. package/dist/babel_helpers/nonIterableRest/nonIterableRest.js +0 -5
  89. package/dist/babel_helpers/nonIterableSpread/nonIterableSpread.js +0 -5
  90. package/dist/babel_helpers/nullishReceiverError/nullishReceiverError.js +0 -3
  91. package/dist/babel_helpers/objectDestructuringEmpty/objectDestructuringEmpty.js +0 -3
  92. package/dist/babel_helpers/objectSpread/objectSpread.js +0 -23
  93. package/dist/babel_helpers/objectSpread2/objectSpread2.js +0 -43
  94. package/dist/babel_helpers/objectWithoutProperties/objectWithoutProperties.js +0 -19
  95. package/dist/babel_helpers/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js +0 -13
  96. package/dist/babel_helpers/possibleConstructorReturn/possibleConstructorReturn.js +0 -12
  97. package/dist/babel_helpers/readOnlyError/readOnlyError.js +0 -4
  98. package/dist/babel_helpers/regeneratorRuntime/regeneratorRuntime.js +0 -698
  99. package/dist/babel_helpers/set/set.js +0 -47
  100. package/dist/babel_helpers/setFunctionName/setFunctionName.js +0 -19
  101. package/dist/babel_helpers/setPrototypeOf/setPrototypeOf.js +0 -7
  102. package/dist/babel_helpers/skipFirstGeneratorNext/skipFirstGeneratorNext.js +0 -8
  103. package/dist/babel_helpers/slicedToArray/slicedToArray.js +0 -10
  104. package/dist/babel_helpers/slicedToArrayLoose/slicedToArrayLoose.js +0 -13
  105. package/dist/babel_helpers/superPropBase/superPropBase.js +0 -10
  106. package/dist/babel_helpers/taggedTemplateLiteral/taggedTemplateLiteral.js +0 -10
  107. package/dist/babel_helpers/taggedTemplateLiteralLoose/taggedTemplateLiteralLoose.js +0 -7
  108. package/dist/babel_helpers/tdz/tdz.js +0 -4
  109. package/dist/babel_helpers/temporalRef/temporalRef.js +0 -6
  110. package/dist/babel_helpers/temporalUndefined/temporalUndefined.js +0 -3
  111. package/dist/babel_helpers/toArray/toArray.js +0 -10
  112. package/dist/babel_helpers/toConsumableArray/toConsumableArray.js +0 -10
  113. package/dist/babel_helpers/toPrimitive/toPrimitive.js +0 -14
  114. package/dist/babel_helpers/toPropertyKey/toPropertyKey.js +0 -10
  115. package/dist/babel_helpers/typeof/typeof.js +0 -15
  116. package/dist/babel_helpers/unsupportedIterableToArray/unsupportedIterableToArray.js +0 -12
  117. package/dist/babel_helpers/using/using.js +0 -23
  118. package/dist/babel_helpers/wrapAsyncGenerator/wrapAsyncGenerator.js +0 -8
  119. package/dist/babel_helpers/wrapNativeSuper/wrapNativeSuper.js +0 -30
  120. package/dist/babel_helpers/wrapRegExp/wrapRegExp.js +0 -79
  121. package/dist/babel_helpers/writeOnlyError/writeOnlyError.js +0 -3
  122. package/dist/jsenv_core_node_modules.js +0 -2045
  123. package/dist/jsenv_core_packages.js +0 -23833
@@ -1,2045 +0,0 @@
1
- import process from "node:process";
2
- import os from "node:os";
3
- import tty from "node:tty";
4
-
5
- // From: https://github.com/sindresorhus/has-flag/blob/main/index.js
6
- /// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
7
- function hasFlag$2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {
8
- const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
9
- const position = argv.indexOf(prefix + flag);
10
- const terminatorPosition = argv.indexOf('--');
11
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
12
- }
13
-
14
- const {env: env$2} = process;
15
-
16
- let flagForceColor$2;
17
- if (
18
- hasFlag$2('no-color')
19
- || hasFlag$2('no-colors')
20
- || hasFlag$2('color=false')
21
- || hasFlag$2('color=never')
22
- ) {
23
- flagForceColor$2 = 0;
24
- } else if (
25
- hasFlag$2('color')
26
- || hasFlag$2('colors')
27
- || hasFlag$2('color=true')
28
- || hasFlag$2('color=always')
29
- ) {
30
- flagForceColor$2 = 1;
31
- }
32
-
33
- function envForceColor$2() {
34
- if (!('FORCE_COLOR' in env$2)) {
35
- return;
36
- }
37
-
38
- if (env$2.FORCE_COLOR === 'true') {
39
- return 1;
40
- }
41
-
42
- if (env$2.FORCE_COLOR === 'false') {
43
- return 0;
44
- }
45
-
46
- if (env$2.FORCE_COLOR.length === 0) {
47
- return 1;
48
- }
49
-
50
- const level = Math.min(Number.parseInt(env$2.FORCE_COLOR, 10), 3);
51
-
52
- if (![0, 1, 2, 3].includes(level)) {
53
- return;
54
- }
55
-
56
- return level;
57
- }
58
-
59
- function translateLevel$2(level) {
60
- if (level === 0) {
61
- return false;
62
- }
63
-
64
- return {
65
- level,
66
- hasBasic: true,
67
- has256: level >= 2,
68
- has16m: level >= 3,
69
- };
70
- }
71
-
72
- function _supportsColor$2(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
73
- const noFlagForceColor = envForceColor$2();
74
- if (noFlagForceColor !== undefined) {
75
- flagForceColor$2 = noFlagForceColor;
76
- }
77
-
78
- const forceColor = sniffFlags ? flagForceColor$2 : noFlagForceColor;
79
-
80
- if (forceColor === 0) {
81
- return 0;
82
- }
83
-
84
- if (sniffFlags) {
85
- if (hasFlag$2('color=16m')
86
- || hasFlag$2('color=full')
87
- || hasFlag$2('color=truecolor')) {
88
- return 3;
89
- }
90
-
91
- if (hasFlag$2('color=256')) {
92
- return 2;
93
- }
94
- }
95
-
96
- // Check for Azure DevOps pipelines.
97
- // Has to be above the `!streamIsTTY` check.
98
- if ('TF_BUILD' in env$2 && 'AGENT_NAME' in env$2) {
99
- return 1;
100
- }
101
-
102
- if (haveStream && !streamIsTTY && forceColor === undefined) {
103
- return 0;
104
- }
105
-
106
- const min = forceColor || 0;
107
-
108
- if (env$2.TERM === 'dumb') {
109
- return min;
110
- }
111
-
112
- if (process.platform === 'win32') {
113
- // Windows 10 build 10586 is the first Windows release that supports 256 colors.
114
- // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
115
- const osRelease = os.release().split('.');
116
- if (
117
- Number(osRelease[0]) >= 10
118
- && Number(osRelease[2]) >= 10_586
119
- ) {
120
- return Number(osRelease[2]) >= 14_931 ? 3 : 2;
121
- }
122
-
123
- return 1;
124
- }
125
-
126
- if ('CI' in env$2) {
127
- if (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env$2)) {
128
- return 3;
129
- }
130
-
131
- if (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env$2) || env$2.CI_NAME === 'codeship') {
132
- return 1;
133
- }
134
-
135
- return min;
136
- }
137
-
138
- if ('TEAMCITY_VERSION' in env$2) {
139
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$2.TEAMCITY_VERSION) ? 1 : 0;
140
- }
141
-
142
- if (env$2.COLORTERM === 'truecolor') {
143
- return 3;
144
- }
145
-
146
- if (env$2.TERM === 'xterm-kitty') {
147
- return 3;
148
- }
149
-
150
- if ('TERM_PROGRAM' in env$2) {
151
- const version = Number.parseInt((env$2.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
152
-
153
- switch (env$2.TERM_PROGRAM) {
154
- case 'iTerm.app': {
155
- return version >= 3 ? 3 : 2;
156
- }
157
-
158
- case 'Apple_Terminal': {
159
- return 2;
160
- }
161
- // No default
162
- }
163
- }
164
-
165
- if (/-256(color)?$/i.test(env$2.TERM)) {
166
- return 2;
167
- }
168
-
169
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$2.TERM)) {
170
- return 1;
171
- }
172
-
173
- if ('COLORTERM' in env$2) {
174
- return 1;
175
- }
176
-
177
- return min;
178
- }
179
-
180
- function createSupportsColor$2(stream, options = {}) {
181
- const level = _supportsColor$2(stream, {
182
- streamIsTTY: stream && stream.isTTY,
183
- ...options,
184
- });
185
-
186
- return translateLevel$2(level);
187
- }
188
-
189
- ({
190
- stdout: createSupportsColor$2({isTTY: tty.isatty(1)}),
191
- stderr: createSupportsColor$2({isTTY: tty.isatty(2)}),
192
- });
193
-
194
- function isUnicodeSupported$2() {
195
- const {env} = process;
196
- const {TERM, TERM_PROGRAM} = env;
197
-
198
- if (process.platform !== 'win32') {
199
- return TERM !== 'linux'; // Linux console (kernel)
200
- }
201
-
202
- return Boolean(env.WT_SESSION) // Windows Terminal
203
- || Boolean(env.TERMINUS_SUBLIME) // Terminus (<0.2.27)
204
- || env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder
205
- || TERM_PROGRAM === 'Terminus-Sublime'
206
- || TERM_PROGRAM === 'vscode'
207
- || TERM === 'xterm-256color'
208
- || TERM === 'alacritty'
209
- || TERM === 'rxvt-unicode'
210
- || TERM === 'rxvt-unicode-256color'
211
- || env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
212
- }
213
-
214
- const r$2 = String.raw;
215
- const seq$2 = r$2`(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})`;
216
- const sTags$2 = r$2`\u{E0061}-\u{E007A}`;
217
- const emojiRegex$2 = () => new RegExp(r$2`[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[${sTags$2}]{2}[\u{E0030}-\u{E0039}${sTags$2}]{1,3}\u{E007F}|${seq$2}(?:\u200D${seq$2})*`, 'gu');
218
-
219
- // Generated code.
220
-
221
- function isAmbiguous$2(x) {
222
- return x === 0xA1
223
- || x === 0xA4
224
- || x === 0xA7
225
- || x === 0xA8
226
- || x === 0xAA
227
- || x === 0xAD
228
- || x === 0xAE
229
- || x >= 0xB0 && x <= 0xB4
230
- || x >= 0xB6 && x <= 0xBA
231
- || x >= 0xBC && x <= 0xBF
232
- || x === 0xC6
233
- || x === 0xD0
234
- || x === 0xD7
235
- || x === 0xD8
236
- || x >= 0xDE && x <= 0xE1
237
- || x === 0xE6
238
- || x >= 0xE8 && x <= 0xEA
239
- || x === 0xEC
240
- || x === 0xED
241
- || x === 0xF0
242
- || x === 0xF2
243
- || x === 0xF3
244
- || x >= 0xF7 && x <= 0xFA
245
- || x === 0xFC
246
- || x === 0xFE
247
- || x === 0x101
248
- || x === 0x111
249
- || x === 0x113
250
- || x === 0x11B
251
- || x === 0x126
252
- || x === 0x127
253
- || x === 0x12B
254
- || x >= 0x131 && x <= 0x133
255
- || x === 0x138
256
- || x >= 0x13F && x <= 0x142
257
- || x === 0x144
258
- || x >= 0x148 && x <= 0x14B
259
- || x === 0x14D
260
- || x === 0x152
261
- || x === 0x153
262
- || x === 0x166
263
- || x === 0x167
264
- || x === 0x16B
265
- || x === 0x1CE
266
- || x === 0x1D0
267
- || x === 0x1D2
268
- || x === 0x1D4
269
- || x === 0x1D6
270
- || x === 0x1D8
271
- || x === 0x1DA
272
- || x === 0x1DC
273
- || x === 0x251
274
- || x === 0x261
275
- || x === 0x2C4
276
- || x === 0x2C7
277
- || x >= 0x2C9 && x <= 0x2CB
278
- || x === 0x2CD
279
- || x === 0x2D0
280
- || x >= 0x2D8 && x <= 0x2DB
281
- || x === 0x2DD
282
- || x === 0x2DF
283
- || x >= 0x300 && x <= 0x36F
284
- || x >= 0x391 && x <= 0x3A1
285
- || x >= 0x3A3 && x <= 0x3A9
286
- || x >= 0x3B1 && x <= 0x3C1
287
- || x >= 0x3C3 && x <= 0x3C9
288
- || x === 0x401
289
- || x >= 0x410 && x <= 0x44F
290
- || x === 0x451
291
- || x === 0x2010
292
- || x >= 0x2013 && x <= 0x2016
293
- || x === 0x2018
294
- || x === 0x2019
295
- || x === 0x201C
296
- || x === 0x201D
297
- || x >= 0x2020 && x <= 0x2022
298
- || x >= 0x2024 && x <= 0x2027
299
- || x === 0x2030
300
- || x === 0x2032
301
- || x === 0x2033
302
- || x === 0x2035
303
- || x === 0x203B
304
- || x === 0x203E
305
- || x === 0x2074
306
- || x === 0x207F
307
- || x >= 0x2081 && x <= 0x2084
308
- || x === 0x20AC
309
- || x === 0x2103
310
- || x === 0x2105
311
- || x === 0x2109
312
- || x === 0x2113
313
- || x === 0x2116
314
- || x === 0x2121
315
- || x === 0x2122
316
- || x === 0x2126
317
- || x === 0x212B
318
- || x === 0x2153
319
- || x === 0x2154
320
- || x >= 0x215B && x <= 0x215E
321
- || x >= 0x2160 && x <= 0x216B
322
- || x >= 0x2170 && x <= 0x2179
323
- || x === 0x2189
324
- || x >= 0x2190 && x <= 0x2199
325
- || x === 0x21B8
326
- || x === 0x21B9
327
- || x === 0x21D2
328
- || x === 0x21D4
329
- || x === 0x21E7
330
- || x === 0x2200
331
- || x === 0x2202
332
- || x === 0x2203
333
- || x === 0x2207
334
- || x === 0x2208
335
- || x === 0x220B
336
- || x === 0x220F
337
- || x === 0x2211
338
- || x === 0x2215
339
- || x === 0x221A
340
- || x >= 0x221D && x <= 0x2220
341
- || x === 0x2223
342
- || x === 0x2225
343
- || x >= 0x2227 && x <= 0x222C
344
- || x === 0x222E
345
- || x >= 0x2234 && x <= 0x2237
346
- || x === 0x223C
347
- || x === 0x223D
348
- || x === 0x2248
349
- || x === 0x224C
350
- || x === 0x2252
351
- || x === 0x2260
352
- || x === 0x2261
353
- || x >= 0x2264 && x <= 0x2267
354
- || x === 0x226A
355
- || x === 0x226B
356
- || x === 0x226E
357
- || x === 0x226F
358
- || x === 0x2282
359
- || x === 0x2283
360
- || x === 0x2286
361
- || x === 0x2287
362
- || x === 0x2295
363
- || x === 0x2299
364
- || x === 0x22A5
365
- || x === 0x22BF
366
- || x === 0x2312
367
- || x >= 0x2460 && x <= 0x24E9
368
- || x >= 0x24EB && x <= 0x254B
369
- || x >= 0x2550 && x <= 0x2573
370
- || x >= 0x2580 && x <= 0x258F
371
- || x >= 0x2592 && x <= 0x2595
372
- || x === 0x25A0
373
- || x === 0x25A1
374
- || x >= 0x25A3 && x <= 0x25A9
375
- || x === 0x25B2
376
- || x === 0x25B3
377
- || x === 0x25B6
378
- || x === 0x25B7
379
- || x === 0x25BC
380
- || x === 0x25BD
381
- || x === 0x25C0
382
- || x === 0x25C1
383
- || x >= 0x25C6 && x <= 0x25C8
384
- || x === 0x25CB
385
- || x >= 0x25CE && x <= 0x25D1
386
- || x >= 0x25E2 && x <= 0x25E5
387
- || x === 0x25EF
388
- || x === 0x2605
389
- || x === 0x2606
390
- || x === 0x2609
391
- || x === 0x260E
392
- || x === 0x260F
393
- || x === 0x261C
394
- || x === 0x261E
395
- || x === 0x2640
396
- || x === 0x2642
397
- || x === 0x2660
398
- || x === 0x2661
399
- || x >= 0x2663 && x <= 0x2665
400
- || x >= 0x2667 && x <= 0x266A
401
- || x === 0x266C
402
- || x === 0x266D
403
- || x === 0x266F
404
- || x === 0x269E
405
- || x === 0x269F
406
- || x === 0x26BF
407
- || x >= 0x26C6 && x <= 0x26CD
408
- || x >= 0x26CF && x <= 0x26D3
409
- || x >= 0x26D5 && x <= 0x26E1
410
- || x === 0x26E3
411
- || x === 0x26E8
412
- || x === 0x26E9
413
- || x >= 0x26EB && x <= 0x26F1
414
- || x === 0x26F4
415
- || x >= 0x26F6 && x <= 0x26F9
416
- || x === 0x26FB
417
- || x === 0x26FC
418
- || x === 0x26FE
419
- || x === 0x26FF
420
- || x === 0x273D
421
- || x >= 0x2776 && x <= 0x277F
422
- || x >= 0x2B56 && x <= 0x2B59
423
- || x >= 0x3248 && x <= 0x324F
424
- || x >= 0xE000 && x <= 0xF8FF
425
- || x >= 0xFE00 && x <= 0xFE0F
426
- || x === 0xFFFD
427
- || x >= 0x1F100 && x <= 0x1F10A
428
- || x >= 0x1F110 && x <= 0x1F12D
429
- || x >= 0x1F130 && x <= 0x1F169
430
- || x >= 0x1F170 && x <= 0x1F18D
431
- || x === 0x1F18F
432
- || x === 0x1F190
433
- || x >= 0x1F19B && x <= 0x1F1AC
434
- || x >= 0xE0100 && x <= 0xE01EF
435
- || x >= 0xF0000 && x <= 0xFFFFD
436
- || x >= 0x100000 && x <= 0x10FFFD;
437
- }
438
-
439
- function isFullWidth$2(x) {
440
- return x === 0x3000
441
- || x >= 0xFF01 && x <= 0xFF60
442
- || x >= 0xFFE0 && x <= 0xFFE6;
443
- }
444
-
445
- function isWide$2(x) {
446
- return x >= 0x1100 && x <= 0x115F
447
- || x === 0x231A
448
- || x === 0x231B
449
- || x === 0x2329
450
- || x === 0x232A
451
- || x >= 0x23E9 && x <= 0x23EC
452
- || x === 0x23F0
453
- || x === 0x23F3
454
- || x === 0x25FD
455
- || x === 0x25FE
456
- || x === 0x2614
457
- || x === 0x2615
458
- || x >= 0x2630 && x <= 0x2637
459
- || x >= 0x2648 && x <= 0x2653
460
- || x === 0x267F
461
- || x >= 0x268A && x <= 0x268F
462
- || x === 0x2693
463
- || x === 0x26A1
464
- || x === 0x26AA
465
- || x === 0x26AB
466
- || x === 0x26BD
467
- || x === 0x26BE
468
- || x === 0x26C4
469
- || x === 0x26C5
470
- || x === 0x26CE
471
- || x === 0x26D4
472
- || x === 0x26EA
473
- || x === 0x26F2
474
- || x === 0x26F3
475
- || x === 0x26F5
476
- || x === 0x26FA
477
- || x === 0x26FD
478
- || x === 0x2705
479
- || x === 0x270A
480
- || x === 0x270B
481
- || x === 0x2728
482
- || x === 0x274C
483
- || x === 0x274E
484
- || x >= 0x2753 && x <= 0x2755
485
- || x === 0x2757
486
- || x >= 0x2795 && x <= 0x2797
487
- || x === 0x27B0
488
- || x === 0x27BF
489
- || x === 0x2B1B
490
- || x === 0x2B1C
491
- || x === 0x2B50
492
- || x === 0x2B55
493
- || x >= 0x2E80 && x <= 0x2E99
494
- || x >= 0x2E9B && x <= 0x2EF3
495
- || x >= 0x2F00 && x <= 0x2FD5
496
- || x >= 0x2FF0 && x <= 0x2FFF
497
- || x >= 0x3001 && x <= 0x303E
498
- || x >= 0x3041 && x <= 0x3096
499
- || x >= 0x3099 && x <= 0x30FF
500
- || x >= 0x3105 && x <= 0x312F
501
- || x >= 0x3131 && x <= 0x318E
502
- || x >= 0x3190 && x <= 0x31E5
503
- || x >= 0x31EF && x <= 0x321E
504
- || x >= 0x3220 && x <= 0x3247
505
- || x >= 0x3250 && x <= 0xA48C
506
- || x >= 0xA490 && x <= 0xA4C6
507
- || x >= 0xA960 && x <= 0xA97C
508
- || x >= 0xAC00 && x <= 0xD7A3
509
- || x >= 0xF900 && x <= 0xFAFF
510
- || x >= 0xFE10 && x <= 0xFE19
511
- || x >= 0xFE30 && x <= 0xFE52
512
- || x >= 0xFE54 && x <= 0xFE66
513
- || x >= 0xFE68 && x <= 0xFE6B
514
- || x >= 0x16FE0 && x <= 0x16FE4
515
- || x === 0x16FF0
516
- || x === 0x16FF1
517
- || x >= 0x17000 && x <= 0x187F7
518
- || x >= 0x18800 && x <= 0x18CD5
519
- || x >= 0x18CFF && x <= 0x18D08
520
- || x >= 0x1AFF0 && x <= 0x1AFF3
521
- || x >= 0x1AFF5 && x <= 0x1AFFB
522
- || x === 0x1AFFD
523
- || x === 0x1AFFE
524
- || x >= 0x1B000 && x <= 0x1B122
525
- || x === 0x1B132
526
- || x >= 0x1B150 && x <= 0x1B152
527
- || x === 0x1B155
528
- || x >= 0x1B164 && x <= 0x1B167
529
- || x >= 0x1B170 && x <= 0x1B2FB
530
- || x >= 0x1D300 && x <= 0x1D356
531
- || x >= 0x1D360 && x <= 0x1D376
532
- || x === 0x1F004
533
- || x === 0x1F0CF
534
- || x === 0x1F18E
535
- || x >= 0x1F191 && x <= 0x1F19A
536
- || x >= 0x1F200 && x <= 0x1F202
537
- || x >= 0x1F210 && x <= 0x1F23B
538
- || x >= 0x1F240 && x <= 0x1F248
539
- || x === 0x1F250
540
- || x === 0x1F251
541
- || x >= 0x1F260 && x <= 0x1F265
542
- || x >= 0x1F300 && x <= 0x1F320
543
- || x >= 0x1F32D && x <= 0x1F335
544
- || x >= 0x1F337 && x <= 0x1F37C
545
- || x >= 0x1F37E && x <= 0x1F393
546
- || x >= 0x1F3A0 && x <= 0x1F3CA
547
- || x >= 0x1F3CF && x <= 0x1F3D3
548
- || x >= 0x1F3E0 && x <= 0x1F3F0
549
- || x === 0x1F3F4
550
- || x >= 0x1F3F8 && x <= 0x1F43E
551
- || x === 0x1F440
552
- || x >= 0x1F442 && x <= 0x1F4FC
553
- || x >= 0x1F4FF && x <= 0x1F53D
554
- || x >= 0x1F54B && x <= 0x1F54E
555
- || x >= 0x1F550 && x <= 0x1F567
556
- || x === 0x1F57A
557
- || x === 0x1F595
558
- || x === 0x1F596
559
- || x === 0x1F5A4
560
- || x >= 0x1F5FB && x <= 0x1F64F
561
- || x >= 0x1F680 && x <= 0x1F6C5
562
- || x === 0x1F6CC
563
- || x >= 0x1F6D0 && x <= 0x1F6D2
564
- || x >= 0x1F6D5 && x <= 0x1F6D7
565
- || x >= 0x1F6DC && x <= 0x1F6DF
566
- || x === 0x1F6EB
567
- || x === 0x1F6EC
568
- || x >= 0x1F6F4 && x <= 0x1F6FC
569
- || x >= 0x1F7E0 && x <= 0x1F7EB
570
- || x === 0x1F7F0
571
- || x >= 0x1F90C && x <= 0x1F93A
572
- || x >= 0x1F93C && x <= 0x1F945
573
- || x >= 0x1F947 && x <= 0x1F9FF
574
- || x >= 0x1FA70 && x <= 0x1FA7C
575
- || x >= 0x1FA80 && x <= 0x1FA89
576
- || x >= 0x1FA8F && x <= 0x1FAC6
577
- || x >= 0x1FACE && x <= 0x1FADC
578
- || x >= 0x1FADF && x <= 0x1FAE9
579
- || x >= 0x1FAF0 && x <= 0x1FAF8
580
- || x >= 0x20000 && x <= 0x2FFFD
581
- || x >= 0x30000 && x <= 0x3FFFD;
582
- }
583
-
584
- function validate$2(codePoint) {
585
- if (!Number.isSafeInteger(codePoint)) {
586
- throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
587
- }
588
- }
589
-
590
- function eastAsianWidth$2(codePoint, {ambiguousAsWide = false} = {}) {
591
- validate$2(codePoint);
592
-
593
- if (
594
- isFullWidth$2(codePoint)
595
- || isWide$2(codePoint)
596
- || (ambiguousAsWide && isAmbiguous$2(codePoint))
597
- ) {
598
- return 2;
599
- }
600
-
601
- return 1;
602
- }
603
-
604
- /* globals WorkerGlobalScope, DedicatedWorkerGlobalScope, SharedWorkerGlobalScope, ServiceWorkerGlobalScope */
605
-
606
- const isBrowser$2 = globalThis.window?.document !== undefined;
607
-
608
- globalThis.process?.versions?.node !== undefined;
609
-
610
- globalThis.process?.versions?.bun !== undefined;
611
-
612
- globalThis.Deno?.version?.deno !== undefined;
613
-
614
- globalThis.process?.versions?.electron !== undefined;
615
-
616
- globalThis.navigator?.userAgent?.includes('jsdom') === true;
617
-
618
- typeof WorkerGlobalScope !== 'undefined' && globalThis instanceof WorkerGlobalScope;
619
-
620
- typeof DedicatedWorkerGlobalScope !== 'undefined' && globalThis instanceof DedicatedWorkerGlobalScope;
621
-
622
- typeof SharedWorkerGlobalScope !== 'undefined' && globalThis instanceof SharedWorkerGlobalScope;
623
-
624
- typeof ServiceWorkerGlobalScope !== 'undefined' && globalThis instanceof ServiceWorkerGlobalScope;
625
-
626
- // Note: I'm intentionally not DRYing up the other variables to keep them "lazy".
627
- const platform$2 = globalThis.navigator?.userAgentData?.platform;
628
-
629
- platform$2 === 'macOS'
630
- || globalThis.navigator?.platform === 'MacIntel' // Even on Apple silicon Macs.
631
- || globalThis.navigator?.userAgent?.includes(' Mac ') === true
632
- || globalThis.process?.platform === 'darwin';
633
-
634
- platform$2 === 'Windows'
635
- || globalThis.navigator?.platform === 'Win32'
636
- || globalThis.process?.platform === 'win32';
637
-
638
- platform$2 === 'Linux'
639
- || globalThis.navigator?.platform?.startsWith('Linux') === true
640
- || globalThis.navigator?.userAgent?.includes(' Linux ') === true
641
- || globalThis.process?.platform === 'linux';
642
-
643
- platform$2 === 'Android'
644
- || globalThis.navigator?.platform === 'Android'
645
- || globalThis.navigator?.userAgent?.includes(' Android ') === true
646
- || globalThis.process?.platform === 'android';
647
-
648
- const ESC$2 = '\u001B[';
649
-
650
- !isBrowser$2 && process.env.TERM_PROGRAM === 'Apple_Terminal';
651
- const isWindows$2 = !isBrowser$2 && process.platform === 'win32';
652
-
653
- isBrowser$2 ? () => {
654
- throw new Error('`process.cwd()` only works in Node.js, not the browser.');
655
- } : process.cwd;
656
-
657
- const cursorUp$2 = (count = 1) => ESC$2 + count + 'A';
658
-
659
- const cursorLeft$2 = ESC$2 + 'G';
660
-
661
- const eraseLines$2 = count => {
662
- let clear = '';
663
-
664
- for (let i = 0; i < count; i++) {
665
- clear += eraseLine$2 + (i < count - 1 ? cursorUp$2() : '');
666
- }
667
-
668
- if (count) {
669
- clear += cursorLeft$2;
670
- }
671
-
672
- return clear;
673
- };
674
- const eraseLine$2 = ESC$2 + '2K';
675
- const eraseScreen$2 = ESC$2 + '2J';
676
-
677
- const clearTerminal$2 = isWindows$2
678
- ? `${eraseScreen$2}${ESC$2}0f`
679
- // 1. Erases the screen (Only done in case `2` is not supported)
680
- // 2. Erases the whole screen including scrollback buffer
681
- // 3. Moves cursor to the top-left position
682
- // More info: https://www.real-world-systems.com/docs/ANSIcode.html
683
- : `${eraseScreen$2}${ESC$2}3J${ESC$2}H`;
684
-
685
- // From: https://github.com/sindresorhus/has-flag/blob/main/index.js
686
- /// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
687
- function hasFlag$1(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {
688
- const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
689
- const position = argv.indexOf(prefix + flag);
690
- const terminatorPosition = argv.indexOf('--');
691
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
692
- }
693
-
694
- const {env: env$1} = process;
695
-
696
- let flagForceColor$1;
697
- if (
698
- hasFlag$1('no-color')
699
- || hasFlag$1('no-colors')
700
- || hasFlag$1('color=false')
701
- || hasFlag$1('color=never')
702
- ) {
703
- flagForceColor$1 = 0;
704
- } else if (
705
- hasFlag$1('color')
706
- || hasFlag$1('colors')
707
- || hasFlag$1('color=true')
708
- || hasFlag$1('color=always')
709
- ) {
710
- flagForceColor$1 = 1;
711
- }
712
-
713
- function envForceColor$1() {
714
- if (!('FORCE_COLOR' in env$1)) {
715
- return;
716
- }
717
-
718
- if (env$1.FORCE_COLOR === 'true') {
719
- return 1;
720
- }
721
-
722
- if (env$1.FORCE_COLOR === 'false') {
723
- return 0;
724
- }
725
-
726
- if (env$1.FORCE_COLOR.length === 0) {
727
- return 1;
728
- }
729
-
730
- const level = Math.min(Number.parseInt(env$1.FORCE_COLOR, 10), 3);
731
-
732
- if (![0, 1, 2, 3].includes(level)) {
733
- return;
734
- }
735
-
736
- return level;
737
- }
738
-
739
- function translateLevel$1(level) {
740
- if (level === 0) {
741
- return false;
742
- }
743
-
744
- return {
745
- level,
746
- hasBasic: true,
747
- has256: level >= 2,
748
- has16m: level >= 3,
749
- };
750
- }
751
-
752
- function _supportsColor$1(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
753
- const noFlagForceColor = envForceColor$1();
754
- if (noFlagForceColor !== undefined) {
755
- flagForceColor$1 = noFlagForceColor;
756
- }
757
-
758
- const forceColor = sniffFlags ? flagForceColor$1 : noFlagForceColor;
759
-
760
- if (forceColor === 0) {
761
- return 0;
762
- }
763
-
764
- if (sniffFlags) {
765
- if (hasFlag$1('color=16m')
766
- || hasFlag$1('color=full')
767
- || hasFlag$1('color=truecolor')) {
768
- return 3;
769
- }
770
-
771
- if (hasFlag$1('color=256')) {
772
- return 2;
773
- }
774
- }
775
-
776
- // Check for Azure DevOps pipelines.
777
- // Has to be above the `!streamIsTTY` check.
778
- if ('TF_BUILD' in env$1 && 'AGENT_NAME' in env$1) {
779
- return 1;
780
- }
781
-
782
- if (haveStream && !streamIsTTY && forceColor === undefined) {
783
- return 0;
784
- }
785
-
786
- const min = forceColor || 0;
787
-
788
- if (env$1.TERM === 'dumb') {
789
- return min;
790
- }
791
-
792
- if (process.platform === 'win32') {
793
- // Windows 10 build 10586 is the first Windows release that supports 256 colors.
794
- // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
795
- const osRelease = os.release().split('.');
796
- if (
797
- Number(osRelease[0]) >= 10
798
- && Number(osRelease[2]) >= 10_586
799
- ) {
800
- return Number(osRelease[2]) >= 14_931 ? 3 : 2;
801
- }
802
-
803
- return 1;
804
- }
805
-
806
- if ('CI' in env$1) {
807
- if (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env$1)) {
808
- return 3;
809
- }
810
-
811
- if (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env$1) || env$1.CI_NAME === 'codeship') {
812
- return 1;
813
- }
814
-
815
- return min;
816
- }
817
-
818
- if ('TEAMCITY_VERSION' in env$1) {
819
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION) ? 1 : 0;
820
- }
821
-
822
- if (env$1.COLORTERM === 'truecolor') {
823
- return 3;
824
- }
825
-
826
- if (env$1.TERM === 'xterm-kitty') {
827
- return 3;
828
- }
829
-
830
- if ('TERM_PROGRAM' in env$1) {
831
- const version = Number.parseInt((env$1.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
832
-
833
- switch (env$1.TERM_PROGRAM) {
834
- case 'iTerm.app': {
835
- return version >= 3 ? 3 : 2;
836
- }
837
-
838
- case 'Apple_Terminal': {
839
- return 2;
840
- }
841
- // No default
842
- }
843
- }
844
-
845
- if (/-256(color)?$/i.test(env$1.TERM)) {
846
- return 2;
847
- }
848
-
849
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)) {
850
- return 1;
851
- }
852
-
853
- if ('COLORTERM' in env$1) {
854
- return 1;
855
- }
856
-
857
- return min;
858
- }
859
-
860
- function createSupportsColor$1(stream, options = {}) {
861
- const level = _supportsColor$1(stream, {
862
- streamIsTTY: stream && stream.isTTY,
863
- ...options,
864
- });
865
-
866
- return translateLevel$1(level);
867
- }
868
-
869
- ({
870
- stdout: createSupportsColor$1({isTTY: tty.isatty(1)}),
871
- stderr: createSupportsColor$1({isTTY: tty.isatty(2)}),
872
- });
873
-
874
- function isUnicodeSupported$1() {
875
- const {env} = process;
876
- const {TERM, TERM_PROGRAM} = env;
877
-
878
- if (process.platform !== 'win32') {
879
- return TERM !== 'linux'; // Linux console (kernel)
880
- }
881
-
882
- return Boolean(env.WT_SESSION) // Windows Terminal
883
- || Boolean(env.TERMINUS_SUBLIME) // Terminus (<0.2.27)
884
- || env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder
885
- || TERM_PROGRAM === 'Terminus-Sublime'
886
- || TERM_PROGRAM === 'vscode'
887
- || TERM === 'xterm-256color'
888
- || TERM === 'alacritty'
889
- || TERM === 'rxvt-unicode'
890
- || TERM === 'rxvt-unicode-256color'
891
- || env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
892
- }
893
-
894
- const r$1 = String.raw;
895
- const seq$1 = r$1`(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})`;
896
- const sTags$1 = r$1`\u{E0061}-\u{E007A}`;
897
- const emojiRegex$1 = () => new RegExp(r$1`[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[${sTags$1}]{2}[\u{E0030}-\u{E0039}${sTags$1}]{1,3}\u{E007F}|${seq$1}(?:\u200D${seq$1})*`, 'gu');
898
-
899
- // Generated code.
900
-
901
- function isAmbiguous$1(x) {
902
- return x === 0xA1
903
- || x === 0xA4
904
- || x === 0xA7
905
- || x === 0xA8
906
- || x === 0xAA
907
- || x === 0xAD
908
- || x === 0xAE
909
- || x >= 0xB0 && x <= 0xB4
910
- || x >= 0xB6 && x <= 0xBA
911
- || x >= 0xBC && x <= 0xBF
912
- || x === 0xC6
913
- || x === 0xD0
914
- || x === 0xD7
915
- || x === 0xD8
916
- || x >= 0xDE && x <= 0xE1
917
- || x === 0xE6
918
- || x >= 0xE8 && x <= 0xEA
919
- || x === 0xEC
920
- || x === 0xED
921
- || x === 0xF0
922
- || x === 0xF2
923
- || x === 0xF3
924
- || x >= 0xF7 && x <= 0xFA
925
- || x === 0xFC
926
- || x === 0xFE
927
- || x === 0x101
928
- || x === 0x111
929
- || x === 0x113
930
- || x === 0x11B
931
- || x === 0x126
932
- || x === 0x127
933
- || x === 0x12B
934
- || x >= 0x131 && x <= 0x133
935
- || x === 0x138
936
- || x >= 0x13F && x <= 0x142
937
- || x === 0x144
938
- || x >= 0x148 && x <= 0x14B
939
- || x === 0x14D
940
- || x === 0x152
941
- || x === 0x153
942
- || x === 0x166
943
- || x === 0x167
944
- || x === 0x16B
945
- || x === 0x1CE
946
- || x === 0x1D0
947
- || x === 0x1D2
948
- || x === 0x1D4
949
- || x === 0x1D6
950
- || x === 0x1D8
951
- || x === 0x1DA
952
- || x === 0x1DC
953
- || x === 0x251
954
- || x === 0x261
955
- || x === 0x2C4
956
- || x === 0x2C7
957
- || x >= 0x2C9 && x <= 0x2CB
958
- || x === 0x2CD
959
- || x === 0x2D0
960
- || x >= 0x2D8 && x <= 0x2DB
961
- || x === 0x2DD
962
- || x === 0x2DF
963
- || x >= 0x300 && x <= 0x36F
964
- || x >= 0x391 && x <= 0x3A1
965
- || x >= 0x3A3 && x <= 0x3A9
966
- || x >= 0x3B1 && x <= 0x3C1
967
- || x >= 0x3C3 && x <= 0x3C9
968
- || x === 0x401
969
- || x >= 0x410 && x <= 0x44F
970
- || x === 0x451
971
- || x === 0x2010
972
- || x >= 0x2013 && x <= 0x2016
973
- || x === 0x2018
974
- || x === 0x2019
975
- || x === 0x201C
976
- || x === 0x201D
977
- || x >= 0x2020 && x <= 0x2022
978
- || x >= 0x2024 && x <= 0x2027
979
- || x === 0x2030
980
- || x === 0x2032
981
- || x === 0x2033
982
- || x === 0x2035
983
- || x === 0x203B
984
- || x === 0x203E
985
- || x === 0x2074
986
- || x === 0x207F
987
- || x >= 0x2081 && x <= 0x2084
988
- || x === 0x20AC
989
- || x === 0x2103
990
- || x === 0x2105
991
- || x === 0x2109
992
- || x === 0x2113
993
- || x === 0x2116
994
- || x === 0x2121
995
- || x === 0x2122
996
- || x === 0x2126
997
- || x === 0x212B
998
- || x === 0x2153
999
- || x === 0x2154
1000
- || x >= 0x215B && x <= 0x215E
1001
- || x >= 0x2160 && x <= 0x216B
1002
- || x >= 0x2170 && x <= 0x2179
1003
- || x === 0x2189
1004
- || x >= 0x2190 && x <= 0x2199
1005
- || x === 0x21B8
1006
- || x === 0x21B9
1007
- || x === 0x21D2
1008
- || x === 0x21D4
1009
- || x === 0x21E7
1010
- || x === 0x2200
1011
- || x === 0x2202
1012
- || x === 0x2203
1013
- || x === 0x2207
1014
- || x === 0x2208
1015
- || x === 0x220B
1016
- || x === 0x220F
1017
- || x === 0x2211
1018
- || x === 0x2215
1019
- || x === 0x221A
1020
- || x >= 0x221D && x <= 0x2220
1021
- || x === 0x2223
1022
- || x === 0x2225
1023
- || x >= 0x2227 && x <= 0x222C
1024
- || x === 0x222E
1025
- || x >= 0x2234 && x <= 0x2237
1026
- || x === 0x223C
1027
- || x === 0x223D
1028
- || x === 0x2248
1029
- || x === 0x224C
1030
- || x === 0x2252
1031
- || x === 0x2260
1032
- || x === 0x2261
1033
- || x >= 0x2264 && x <= 0x2267
1034
- || x === 0x226A
1035
- || x === 0x226B
1036
- || x === 0x226E
1037
- || x === 0x226F
1038
- || x === 0x2282
1039
- || x === 0x2283
1040
- || x === 0x2286
1041
- || x === 0x2287
1042
- || x === 0x2295
1043
- || x === 0x2299
1044
- || x === 0x22A5
1045
- || x === 0x22BF
1046
- || x === 0x2312
1047
- || x >= 0x2460 && x <= 0x24E9
1048
- || x >= 0x24EB && x <= 0x254B
1049
- || x >= 0x2550 && x <= 0x2573
1050
- || x >= 0x2580 && x <= 0x258F
1051
- || x >= 0x2592 && x <= 0x2595
1052
- || x === 0x25A0
1053
- || x === 0x25A1
1054
- || x >= 0x25A3 && x <= 0x25A9
1055
- || x === 0x25B2
1056
- || x === 0x25B3
1057
- || x === 0x25B6
1058
- || x === 0x25B7
1059
- || x === 0x25BC
1060
- || x === 0x25BD
1061
- || x === 0x25C0
1062
- || x === 0x25C1
1063
- || x >= 0x25C6 && x <= 0x25C8
1064
- || x === 0x25CB
1065
- || x >= 0x25CE && x <= 0x25D1
1066
- || x >= 0x25E2 && x <= 0x25E5
1067
- || x === 0x25EF
1068
- || x === 0x2605
1069
- || x === 0x2606
1070
- || x === 0x2609
1071
- || x === 0x260E
1072
- || x === 0x260F
1073
- || x === 0x261C
1074
- || x === 0x261E
1075
- || x === 0x2640
1076
- || x === 0x2642
1077
- || x === 0x2660
1078
- || x === 0x2661
1079
- || x >= 0x2663 && x <= 0x2665
1080
- || x >= 0x2667 && x <= 0x266A
1081
- || x === 0x266C
1082
- || x === 0x266D
1083
- || x === 0x266F
1084
- || x === 0x269E
1085
- || x === 0x269F
1086
- || x === 0x26BF
1087
- || x >= 0x26C6 && x <= 0x26CD
1088
- || x >= 0x26CF && x <= 0x26D3
1089
- || x >= 0x26D5 && x <= 0x26E1
1090
- || x === 0x26E3
1091
- || x === 0x26E8
1092
- || x === 0x26E9
1093
- || x >= 0x26EB && x <= 0x26F1
1094
- || x === 0x26F4
1095
- || x >= 0x26F6 && x <= 0x26F9
1096
- || x === 0x26FB
1097
- || x === 0x26FC
1098
- || x === 0x26FE
1099
- || x === 0x26FF
1100
- || x === 0x273D
1101
- || x >= 0x2776 && x <= 0x277F
1102
- || x >= 0x2B56 && x <= 0x2B59
1103
- || x >= 0x3248 && x <= 0x324F
1104
- || x >= 0xE000 && x <= 0xF8FF
1105
- || x >= 0xFE00 && x <= 0xFE0F
1106
- || x === 0xFFFD
1107
- || x >= 0x1F100 && x <= 0x1F10A
1108
- || x >= 0x1F110 && x <= 0x1F12D
1109
- || x >= 0x1F130 && x <= 0x1F169
1110
- || x >= 0x1F170 && x <= 0x1F18D
1111
- || x === 0x1F18F
1112
- || x === 0x1F190
1113
- || x >= 0x1F19B && x <= 0x1F1AC
1114
- || x >= 0xE0100 && x <= 0xE01EF
1115
- || x >= 0xF0000 && x <= 0xFFFFD
1116
- || x >= 0x100000 && x <= 0x10FFFD;
1117
- }
1118
-
1119
- function isFullWidth$1(x) {
1120
- return x === 0x3000
1121
- || x >= 0xFF01 && x <= 0xFF60
1122
- || x >= 0xFFE0 && x <= 0xFFE6;
1123
- }
1124
-
1125
- function isWide$1(x) {
1126
- return x >= 0x1100 && x <= 0x115F
1127
- || x === 0x231A
1128
- || x === 0x231B
1129
- || x === 0x2329
1130
- || x === 0x232A
1131
- || x >= 0x23E9 && x <= 0x23EC
1132
- || x === 0x23F0
1133
- || x === 0x23F3
1134
- || x === 0x25FD
1135
- || x === 0x25FE
1136
- || x === 0x2614
1137
- || x === 0x2615
1138
- || x >= 0x2630 && x <= 0x2637
1139
- || x >= 0x2648 && x <= 0x2653
1140
- || x === 0x267F
1141
- || x >= 0x268A && x <= 0x268F
1142
- || x === 0x2693
1143
- || x === 0x26A1
1144
- || x === 0x26AA
1145
- || x === 0x26AB
1146
- || x === 0x26BD
1147
- || x === 0x26BE
1148
- || x === 0x26C4
1149
- || x === 0x26C5
1150
- || x === 0x26CE
1151
- || x === 0x26D4
1152
- || x === 0x26EA
1153
- || x === 0x26F2
1154
- || x === 0x26F3
1155
- || x === 0x26F5
1156
- || x === 0x26FA
1157
- || x === 0x26FD
1158
- || x === 0x2705
1159
- || x === 0x270A
1160
- || x === 0x270B
1161
- || x === 0x2728
1162
- || x === 0x274C
1163
- || x === 0x274E
1164
- || x >= 0x2753 && x <= 0x2755
1165
- || x === 0x2757
1166
- || x >= 0x2795 && x <= 0x2797
1167
- || x === 0x27B0
1168
- || x === 0x27BF
1169
- || x === 0x2B1B
1170
- || x === 0x2B1C
1171
- || x === 0x2B50
1172
- || x === 0x2B55
1173
- || x >= 0x2E80 && x <= 0x2E99
1174
- || x >= 0x2E9B && x <= 0x2EF3
1175
- || x >= 0x2F00 && x <= 0x2FD5
1176
- || x >= 0x2FF0 && x <= 0x2FFF
1177
- || x >= 0x3001 && x <= 0x303E
1178
- || x >= 0x3041 && x <= 0x3096
1179
- || x >= 0x3099 && x <= 0x30FF
1180
- || x >= 0x3105 && x <= 0x312F
1181
- || x >= 0x3131 && x <= 0x318E
1182
- || x >= 0x3190 && x <= 0x31E5
1183
- || x >= 0x31EF && x <= 0x321E
1184
- || x >= 0x3220 && x <= 0x3247
1185
- || x >= 0x3250 && x <= 0xA48C
1186
- || x >= 0xA490 && x <= 0xA4C6
1187
- || x >= 0xA960 && x <= 0xA97C
1188
- || x >= 0xAC00 && x <= 0xD7A3
1189
- || x >= 0xF900 && x <= 0xFAFF
1190
- || x >= 0xFE10 && x <= 0xFE19
1191
- || x >= 0xFE30 && x <= 0xFE52
1192
- || x >= 0xFE54 && x <= 0xFE66
1193
- || x >= 0xFE68 && x <= 0xFE6B
1194
- || x >= 0x16FE0 && x <= 0x16FE4
1195
- || x === 0x16FF0
1196
- || x === 0x16FF1
1197
- || x >= 0x17000 && x <= 0x187F7
1198
- || x >= 0x18800 && x <= 0x18CD5
1199
- || x >= 0x18CFF && x <= 0x18D08
1200
- || x >= 0x1AFF0 && x <= 0x1AFF3
1201
- || x >= 0x1AFF5 && x <= 0x1AFFB
1202
- || x === 0x1AFFD
1203
- || x === 0x1AFFE
1204
- || x >= 0x1B000 && x <= 0x1B122
1205
- || x === 0x1B132
1206
- || x >= 0x1B150 && x <= 0x1B152
1207
- || x === 0x1B155
1208
- || x >= 0x1B164 && x <= 0x1B167
1209
- || x >= 0x1B170 && x <= 0x1B2FB
1210
- || x >= 0x1D300 && x <= 0x1D356
1211
- || x >= 0x1D360 && x <= 0x1D376
1212
- || x === 0x1F004
1213
- || x === 0x1F0CF
1214
- || x === 0x1F18E
1215
- || x >= 0x1F191 && x <= 0x1F19A
1216
- || x >= 0x1F200 && x <= 0x1F202
1217
- || x >= 0x1F210 && x <= 0x1F23B
1218
- || x >= 0x1F240 && x <= 0x1F248
1219
- || x === 0x1F250
1220
- || x === 0x1F251
1221
- || x >= 0x1F260 && x <= 0x1F265
1222
- || x >= 0x1F300 && x <= 0x1F320
1223
- || x >= 0x1F32D && x <= 0x1F335
1224
- || x >= 0x1F337 && x <= 0x1F37C
1225
- || x >= 0x1F37E && x <= 0x1F393
1226
- || x >= 0x1F3A0 && x <= 0x1F3CA
1227
- || x >= 0x1F3CF && x <= 0x1F3D3
1228
- || x >= 0x1F3E0 && x <= 0x1F3F0
1229
- || x === 0x1F3F4
1230
- || x >= 0x1F3F8 && x <= 0x1F43E
1231
- || x === 0x1F440
1232
- || x >= 0x1F442 && x <= 0x1F4FC
1233
- || x >= 0x1F4FF && x <= 0x1F53D
1234
- || x >= 0x1F54B && x <= 0x1F54E
1235
- || x >= 0x1F550 && x <= 0x1F567
1236
- || x === 0x1F57A
1237
- || x === 0x1F595
1238
- || x === 0x1F596
1239
- || x === 0x1F5A4
1240
- || x >= 0x1F5FB && x <= 0x1F64F
1241
- || x >= 0x1F680 && x <= 0x1F6C5
1242
- || x === 0x1F6CC
1243
- || x >= 0x1F6D0 && x <= 0x1F6D2
1244
- || x >= 0x1F6D5 && x <= 0x1F6D7
1245
- || x >= 0x1F6DC && x <= 0x1F6DF
1246
- || x === 0x1F6EB
1247
- || x === 0x1F6EC
1248
- || x >= 0x1F6F4 && x <= 0x1F6FC
1249
- || x >= 0x1F7E0 && x <= 0x1F7EB
1250
- || x === 0x1F7F0
1251
- || x >= 0x1F90C && x <= 0x1F93A
1252
- || x >= 0x1F93C && x <= 0x1F945
1253
- || x >= 0x1F947 && x <= 0x1F9FF
1254
- || x >= 0x1FA70 && x <= 0x1FA7C
1255
- || x >= 0x1FA80 && x <= 0x1FA89
1256
- || x >= 0x1FA8F && x <= 0x1FAC6
1257
- || x >= 0x1FACE && x <= 0x1FADC
1258
- || x >= 0x1FADF && x <= 0x1FAE9
1259
- || x >= 0x1FAF0 && x <= 0x1FAF8
1260
- || x >= 0x20000 && x <= 0x2FFFD
1261
- || x >= 0x30000 && x <= 0x3FFFD;
1262
- }
1263
-
1264
- function validate$1(codePoint) {
1265
- if (!Number.isSafeInteger(codePoint)) {
1266
- throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
1267
- }
1268
- }
1269
-
1270
- function eastAsianWidth$1(codePoint, {ambiguousAsWide = false} = {}) {
1271
- validate$1(codePoint);
1272
-
1273
- if (
1274
- isFullWidth$1(codePoint)
1275
- || isWide$1(codePoint)
1276
- || (ambiguousAsWide && isAmbiguous$1(codePoint))
1277
- ) {
1278
- return 2;
1279
- }
1280
-
1281
- return 1;
1282
- }
1283
-
1284
- /* globals WorkerGlobalScope, DedicatedWorkerGlobalScope, SharedWorkerGlobalScope, ServiceWorkerGlobalScope */
1285
-
1286
- const isBrowser$1 = globalThis.window?.document !== undefined;
1287
-
1288
- globalThis.process?.versions?.node !== undefined;
1289
-
1290
- globalThis.process?.versions?.bun !== undefined;
1291
-
1292
- globalThis.Deno?.version?.deno !== undefined;
1293
-
1294
- globalThis.process?.versions?.electron !== undefined;
1295
-
1296
- globalThis.navigator?.userAgent?.includes('jsdom') === true;
1297
-
1298
- typeof WorkerGlobalScope !== 'undefined' && globalThis instanceof WorkerGlobalScope;
1299
-
1300
- typeof DedicatedWorkerGlobalScope !== 'undefined' && globalThis instanceof DedicatedWorkerGlobalScope;
1301
-
1302
- typeof SharedWorkerGlobalScope !== 'undefined' && globalThis instanceof SharedWorkerGlobalScope;
1303
-
1304
- typeof ServiceWorkerGlobalScope !== 'undefined' && globalThis instanceof ServiceWorkerGlobalScope;
1305
-
1306
- // Note: I'm intentionally not DRYing up the other variables to keep them "lazy".
1307
- const platform$1 = globalThis.navigator?.userAgentData?.platform;
1308
-
1309
- platform$1 === 'macOS'
1310
- || globalThis.navigator?.platform === 'MacIntel' // Even on Apple silicon Macs.
1311
- || globalThis.navigator?.userAgent?.includes(' Mac ') === true
1312
- || globalThis.process?.platform === 'darwin';
1313
-
1314
- platform$1 === 'Windows'
1315
- || globalThis.navigator?.platform === 'Win32'
1316
- || globalThis.process?.platform === 'win32';
1317
-
1318
- platform$1 === 'Linux'
1319
- || globalThis.navigator?.platform?.startsWith('Linux') === true
1320
- || globalThis.navigator?.userAgent?.includes(' Linux ') === true
1321
- || globalThis.process?.platform === 'linux';
1322
-
1323
- platform$1 === 'Android'
1324
- || globalThis.navigator?.platform === 'Android'
1325
- || globalThis.navigator?.userAgent?.includes(' Android ') === true
1326
- || globalThis.process?.platform === 'android';
1327
-
1328
- const ESC$1 = '\u001B[';
1329
-
1330
- !isBrowser$1 && process.env.TERM_PROGRAM === 'Apple_Terminal';
1331
- const isWindows$1 = !isBrowser$1 && process.platform === 'win32';
1332
-
1333
- isBrowser$1 ? () => {
1334
- throw new Error('`process.cwd()` only works in Node.js, not the browser.');
1335
- } : process.cwd;
1336
-
1337
- const cursorUp$1 = (count = 1) => ESC$1 + count + 'A';
1338
-
1339
- const cursorLeft$1 = ESC$1 + 'G';
1340
-
1341
- const eraseLines$1 = count => {
1342
- let clear = '';
1343
-
1344
- for (let i = 0; i < count; i++) {
1345
- clear += eraseLine$1 + (i < count - 1 ? cursorUp$1() : '');
1346
- }
1347
-
1348
- if (count) {
1349
- clear += cursorLeft$1;
1350
- }
1351
-
1352
- return clear;
1353
- };
1354
- const eraseLine$1 = ESC$1 + '2K';
1355
- const eraseScreen$1 = ESC$1 + '2J';
1356
-
1357
- const clearTerminal$1 = isWindows$1
1358
- ? `${eraseScreen$1}${ESC$1}0f`
1359
- // 1. Erases the screen (Only done in case `2` is not supported)
1360
- // 2. Erases the whole screen including scrollback buffer
1361
- // 3. Moves cursor to the top-left position
1362
- // More info: https://www.real-world-systems.com/docs/ANSIcode.html
1363
- : `${eraseScreen$1}${ESC$1}3J${ESC$1}H`;
1364
-
1365
- // From: https://github.com/sindresorhus/has-flag/blob/main/index.js
1366
- /// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
1367
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {
1368
- const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
1369
- const position = argv.indexOf(prefix + flag);
1370
- const terminatorPosition = argv.indexOf('--');
1371
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
1372
- }
1373
-
1374
- const {env} = process;
1375
-
1376
- let flagForceColor;
1377
- if (
1378
- hasFlag('no-color')
1379
- || hasFlag('no-colors')
1380
- || hasFlag('color=false')
1381
- || hasFlag('color=never')
1382
- ) {
1383
- flagForceColor = 0;
1384
- } else if (
1385
- hasFlag('color')
1386
- || hasFlag('colors')
1387
- || hasFlag('color=true')
1388
- || hasFlag('color=always')
1389
- ) {
1390
- flagForceColor = 1;
1391
- }
1392
-
1393
- function envForceColor() {
1394
- if (!('FORCE_COLOR' in env)) {
1395
- return;
1396
- }
1397
-
1398
- if (env.FORCE_COLOR === 'true') {
1399
- return 1;
1400
- }
1401
-
1402
- if (env.FORCE_COLOR === 'false') {
1403
- return 0;
1404
- }
1405
-
1406
- if (env.FORCE_COLOR.length === 0) {
1407
- return 1;
1408
- }
1409
-
1410
- const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
1411
-
1412
- if (![0, 1, 2, 3].includes(level)) {
1413
- return;
1414
- }
1415
-
1416
- return level;
1417
- }
1418
-
1419
- function translateLevel(level) {
1420
- if (level === 0) {
1421
- return false;
1422
- }
1423
-
1424
- return {
1425
- level,
1426
- hasBasic: true,
1427
- has256: level >= 2,
1428
- has16m: level >= 3,
1429
- };
1430
- }
1431
-
1432
- function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
1433
- const noFlagForceColor = envForceColor();
1434
- if (noFlagForceColor !== undefined) {
1435
- flagForceColor = noFlagForceColor;
1436
- }
1437
-
1438
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
1439
-
1440
- if (forceColor === 0) {
1441
- return 0;
1442
- }
1443
-
1444
- if (sniffFlags) {
1445
- if (hasFlag('color=16m')
1446
- || hasFlag('color=full')
1447
- || hasFlag('color=truecolor')) {
1448
- return 3;
1449
- }
1450
-
1451
- if (hasFlag('color=256')) {
1452
- return 2;
1453
- }
1454
- }
1455
-
1456
- // Check for Azure DevOps pipelines.
1457
- // Has to be above the `!streamIsTTY` check.
1458
- if ('TF_BUILD' in env && 'AGENT_NAME' in env) {
1459
- return 1;
1460
- }
1461
-
1462
- if (haveStream && !streamIsTTY && forceColor === undefined) {
1463
- return 0;
1464
- }
1465
-
1466
- const min = forceColor || 0;
1467
-
1468
- if (env.TERM === 'dumb') {
1469
- return min;
1470
- }
1471
-
1472
- if (process.platform === 'win32') {
1473
- // Windows 10 build 10586 is the first Windows release that supports 256 colors.
1474
- // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
1475
- const osRelease = os.release().split('.');
1476
- if (
1477
- Number(osRelease[0]) >= 10
1478
- && Number(osRelease[2]) >= 10_586
1479
- ) {
1480
- return Number(osRelease[2]) >= 14_931 ? 3 : 2;
1481
- }
1482
-
1483
- return 1;
1484
- }
1485
-
1486
- if ('CI' in env) {
1487
- if (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {
1488
- return 3;
1489
- }
1490
-
1491
- if (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
1492
- return 1;
1493
- }
1494
-
1495
- return min;
1496
- }
1497
-
1498
- if ('TEAMCITY_VERSION' in env) {
1499
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1500
- }
1501
-
1502
- if (env.COLORTERM === 'truecolor') {
1503
- return 3;
1504
- }
1505
-
1506
- if (env.TERM === 'xterm-kitty') {
1507
- return 3;
1508
- }
1509
-
1510
- if ('TERM_PROGRAM' in env) {
1511
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
1512
-
1513
- switch (env.TERM_PROGRAM) {
1514
- case 'iTerm.app': {
1515
- return version >= 3 ? 3 : 2;
1516
- }
1517
-
1518
- case 'Apple_Terminal': {
1519
- return 2;
1520
- }
1521
- // No default
1522
- }
1523
- }
1524
-
1525
- if (/-256(color)?$/i.test(env.TERM)) {
1526
- return 2;
1527
- }
1528
-
1529
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
1530
- return 1;
1531
- }
1532
-
1533
- if ('COLORTERM' in env) {
1534
- return 1;
1535
- }
1536
-
1537
- return min;
1538
- }
1539
-
1540
- function createSupportsColor(stream, options = {}) {
1541
- const level = _supportsColor(stream, {
1542
- streamIsTTY: stream && stream.isTTY,
1543
- ...options,
1544
- });
1545
-
1546
- return translateLevel(level);
1547
- }
1548
-
1549
- ({
1550
- stdout: createSupportsColor({isTTY: tty.isatty(1)}),
1551
- stderr: createSupportsColor({isTTY: tty.isatty(2)}),
1552
- });
1553
-
1554
- function isUnicodeSupported() {
1555
- const {env} = process;
1556
- const {TERM, TERM_PROGRAM} = env;
1557
-
1558
- if (process.platform !== 'win32') {
1559
- return TERM !== 'linux'; // Linux console (kernel)
1560
- }
1561
-
1562
- return Boolean(env.WT_SESSION) // Windows Terminal
1563
- || Boolean(env.TERMINUS_SUBLIME) // Terminus (<0.2.27)
1564
- || env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder
1565
- || TERM_PROGRAM === 'Terminus-Sublime'
1566
- || TERM_PROGRAM === 'vscode'
1567
- || TERM === 'xterm-256color'
1568
- || TERM === 'alacritty'
1569
- || TERM === 'rxvt-unicode'
1570
- || TERM === 'rxvt-unicode-256color'
1571
- || env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
1572
- }
1573
-
1574
- const r = String.raw;
1575
- const seq = r`(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})`;
1576
- const sTags = r`\u{E0061}-\u{E007A}`;
1577
- const emojiRegex = () => new RegExp(r`[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[${sTags}]{2}[\u{E0030}-\u{E0039}${sTags}]{1,3}\u{E007F}|${seq}(?:\u200D${seq})*`, 'gu');
1578
-
1579
- // Generated code.
1580
-
1581
- function isAmbiguous(x) {
1582
- return x === 0xA1
1583
- || x === 0xA4
1584
- || x === 0xA7
1585
- || x === 0xA8
1586
- || x === 0xAA
1587
- || x === 0xAD
1588
- || x === 0xAE
1589
- || x >= 0xB0 && x <= 0xB4
1590
- || x >= 0xB6 && x <= 0xBA
1591
- || x >= 0xBC && x <= 0xBF
1592
- || x === 0xC6
1593
- || x === 0xD0
1594
- || x === 0xD7
1595
- || x === 0xD8
1596
- || x >= 0xDE && x <= 0xE1
1597
- || x === 0xE6
1598
- || x >= 0xE8 && x <= 0xEA
1599
- || x === 0xEC
1600
- || x === 0xED
1601
- || x === 0xF0
1602
- || x === 0xF2
1603
- || x === 0xF3
1604
- || x >= 0xF7 && x <= 0xFA
1605
- || x === 0xFC
1606
- || x === 0xFE
1607
- || x === 0x101
1608
- || x === 0x111
1609
- || x === 0x113
1610
- || x === 0x11B
1611
- || x === 0x126
1612
- || x === 0x127
1613
- || x === 0x12B
1614
- || x >= 0x131 && x <= 0x133
1615
- || x === 0x138
1616
- || x >= 0x13F && x <= 0x142
1617
- || x === 0x144
1618
- || x >= 0x148 && x <= 0x14B
1619
- || x === 0x14D
1620
- || x === 0x152
1621
- || x === 0x153
1622
- || x === 0x166
1623
- || x === 0x167
1624
- || x === 0x16B
1625
- || x === 0x1CE
1626
- || x === 0x1D0
1627
- || x === 0x1D2
1628
- || x === 0x1D4
1629
- || x === 0x1D6
1630
- || x === 0x1D8
1631
- || x === 0x1DA
1632
- || x === 0x1DC
1633
- || x === 0x251
1634
- || x === 0x261
1635
- || x === 0x2C4
1636
- || x === 0x2C7
1637
- || x >= 0x2C9 && x <= 0x2CB
1638
- || x === 0x2CD
1639
- || x === 0x2D0
1640
- || x >= 0x2D8 && x <= 0x2DB
1641
- || x === 0x2DD
1642
- || x === 0x2DF
1643
- || x >= 0x300 && x <= 0x36F
1644
- || x >= 0x391 && x <= 0x3A1
1645
- || x >= 0x3A3 && x <= 0x3A9
1646
- || x >= 0x3B1 && x <= 0x3C1
1647
- || x >= 0x3C3 && x <= 0x3C9
1648
- || x === 0x401
1649
- || x >= 0x410 && x <= 0x44F
1650
- || x === 0x451
1651
- || x === 0x2010
1652
- || x >= 0x2013 && x <= 0x2016
1653
- || x === 0x2018
1654
- || x === 0x2019
1655
- || x === 0x201C
1656
- || x === 0x201D
1657
- || x >= 0x2020 && x <= 0x2022
1658
- || x >= 0x2024 && x <= 0x2027
1659
- || x === 0x2030
1660
- || x === 0x2032
1661
- || x === 0x2033
1662
- || x === 0x2035
1663
- || x === 0x203B
1664
- || x === 0x203E
1665
- || x === 0x2074
1666
- || x === 0x207F
1667
- || x >= 0x2081 && x <= 0x2084
1668
- || x === 0x20AC
1669
- || x === 0x2103
1670
- || x === 0x2105
1671
- || x === 0x2109
1672
- || x === 0x2113
1673
- || x === 0x2116
1674
- || x === 0x2121
1675
- || x === 0x2122
1676
- || x === 0x2126
1677
- || x === 0x212B
1678
- || x === 0x2153
1679
- || x === 0x2154
1680
- || x >= 0x215B && x <= 0x215E
1681
- || x >= 0x2160 && x <= 0x216B
1682
- || x >= 0x2170 && x <= 0x2179
1683
- || x === 0x2189
1684
- || x >= 0x2190 && x <= 0x2199
1685
- || x === 0x21B8
1686
- || x === 0x21B9
1687
- || x === 0x21D2
1688
- || x === 0x21D4
1689
- || x === 0x21E7
1690
- || x === 0x2200
1691
- || x === 0x2202
1692
- || x === 0x2203
1693
- || x === 0x2207
1694
- || x === 0x2208
1695
- || x === 0x220B
1696
- || x === 0x220F
1697
- || x === 0x2211
1698
- || x === 0x2215
1699
- || x === 0x221A
1700
- || x >= 0x221D && x <= 0x2220
1701
- || x === 0x2223
1702
- || x === 0x2225
1703
- || x >= 0x2227 && x <= 0x222C
1704
- || x === 0x222E
1705
- || x >= 0x2234 && x <= 0x2237
1706
- || x === 0x223C
1707
- || x === 0x223D
1708
- || x === 0x2248
1709
- || x === 0x224C
1710
- || x === 0x2252
1711
- || x === 0x2260
1712
- || x === 0x2261
1713
- || x >= 0x2264 && x <= 0x2267
1714
- || x === 0x226A
1715
- || x === 0x226B
1716
- || x === 0x226E
1717
- || x === 0x226F
1718
- || x === 0x2282
1719
- || x === 0x2283
1720
- || x === 0x2286
1721
- || x === 0x2287
1722
- || x === 0x2295
1723
- || x === 0x2299
1724
- || x === 0x22A5
1725
- || x === 0x22BF
1726
- || x === 0x2312
1727
- || x >= 0x2460 && x <= 0x24E9
1728
- || x >= 0x24EB && x <= 0x254B
1729
- || x >= 0x2550 && x <= 0x2573
1730
- || x >= 0x2580 && x <= 0x258F
1731
- || x >= 0x2592 && x <= 0x2595
1732
- || x === 0x25A0
1733
- || x === 0x25A1
1734
- || x >= 0x25A3 && x <= 0x25A9
1735
- || x === 0x25B2
1736
- || x === 0x25B3
1737
- || x === 0x25B6
1738
- || x === 0x25B7
1739
- || x === 0x25BC
1740
- || x === 0x25BD
1741
- || x === 0x25C0
1742
- || x === 0x25C1
1743
- || x >= 0x25C6 && x <= 0x25C8
1744
- || x === 0x25CB
1745
- || x >= 0x25CE && x <= 0x25D1
1746
- || x >= 0x25E2 && x <= 0x25E5
1747
- || x === 0x25EF
1748
- || x === 0x2605
1749
- || x === 0x2606
1750
- || x === 0x2609
1751
- || x === 0x260E
1752
- || x === 0x260F
1753
- || x === 0x261C
1754
- || x === 0x261E
1755
- || x === 0x2640
1756
- || x === 0x2642
1757
- || x === 0x2660
1758
- || x === 0x2661
1759
- || x >= 0x2663 && x <= 0x2665
1760
- || x >= 0x2667 && x <= 0x266A
1761
- || x === 0x266C
1762
- || x === 0x266D
1763
- || x === 0x266F
1764
- || x === 0x269E
1765
- || x === 0x269F
1766
- || x === 0x26BF
1767
- || x >= 0x26C6 && x <= 0x26CD
1768
- || x >= 0x26CF && x <= 0x26D3
1769
- || x >= 0x26D5 && x <= 0x26E1
1770
- || x === 0x26E3
1771
- || x === 0x26E8
1772
- || x === 0x26E9
1773
- || x >= 0x26EB && x <= 0x26F1
1774
- || x === 0x26F4
1775
- || x >= 0x26F6 && x <= 0x26F9
1776
- || x === 0x26FB
1777
- || x === 0x26FC
1778
- || x === 0x26FE
1779
- || x === 0x26FF
1780
- || x === 0x273D
1781
- || x >= 0x2776 && x <= 0x277F
1782
- || x >= 0x2B56 && x <= 0x2B59
1783
- || x >= 0x3248 && x <= 0x324F
1784
- || x >= 0xE000 && x <= 0xF8FF
1785
- || x >= 0xFE00 && x <= 0xFE0F
1786
- || x === 0xFFFD
1787
- || x >= 0x1F100 && x <= 0x1F10A
1788
- || x >= 0x1F110 && x <= 0x1F12D
1789
- || x >= 0x1F130 && x <= 0x1F169
1790
- || x >= 0x1F170 && x <= 0x1F18D
1791
- || x === 0x1F18F
1792
- || x === 0x1F190
1793
- || x >= 0x1F19B && x <= 0x1F1AC
1794
- || x >= 0xE0100 && x <= 0xE01EF
1795
- || x >= 0xF0000 && x <= 0xFFFFD
1796
- || x >= 0x100000 && x <= 0x10FFFD;
1797
- }
1798
-
1799
- function isFullWidth(x) {
1800
- return x === 0x3000
1801
- || x >= 0xFF01 && x <= 0xFF60
1802
- || x >= 0xFFE0 && x <= 0xFFE6;
1803
- }
1804
-
1805
- function isWide(x) {
1806
- return x >= 0x1100 && x <= 0x115F
1807
- || x === 0x231A
1808
- || x === 0x231B
1809
- || x === 0x2329
1810
- || x === 0x232A
1811
- || x >= 0x23E9 && x <= 0x23EC
1812
- || x === 0x23F0
1813
- || x === 0x23F3
1814
- || x === 0x25FD
1815
- || x === 0x25FE
1816
- || x === 0x2614
1817
- || x === 0x2615
1818
- || x >= 0x2630 && x <= 0x2637
1819
- || x >= 0x2648 && x <= 0x2653
1820
- || x === 0x267F
1821
- || x >= 0x268A && x <= 0x268F
1822
- || x === 0x2693
1823
- || x === 0x26A1
1824
- || x === 0x26AA
1825
- || x === 0x26AB
1826
- || x === 0x26BD
1827
- || x === 0x26BE
1828
- || x === 0x26C4
1829
- || x === 0x26C5
1830
- || x === 0x26CE
1831
- || x === 0x26D4
1832
- || x === 0x26EA
1833
- || x === 0x26F2
1834
- || x === 0x26F3
1835
- || x === 0x26F5
1836
- || x === 0x26FA
1837
- || x === 0x26FD
1838
- || x === 0x2705
1839
- || x === 0x270A
1840
- || x === 0x270B
1841
- || x === 0x2728
1842
- || x === 0x274C
1843
- || x === 0x274E
1844
- || x >= 0x2753 && x <= 0x2755
1845
- || x === 0x2757
1846
- || x >= 0x2795 && x <= 0x2797
1847
- || x === 0x27B0
1848
- || x === 0x27BF
1849
- || x === 0x2B1B
1850
- || x === 0x2B1C
1851
- || x === 0x2B50
1852
- || x === 0x2B55
1853
- || x >= 0x2E80 && x <= 0x2E99
1854
- || x >= 0x2E9B && x <= 0x2EF3
1855
- || x >= 0x2F00 && x <= 0x2FD5
1856
- || x >= 0x2FF0 && x <= 0x2FFF
1857
- || x >= 0x3001 && x <= 0x303E
1858
- || x >= 0x3041 && x <= 0x3096
1859
- || x >= 0x3099 && x <= 0x30FF
1860
- || x >= 0x3105 && x <= 0x312F
1861
- || x >= 0x3131 && x <= 0x318E
1862
- || x >= 0x3190 && x <= 0x31E5
1863
- || x >= 0x31EF && x <= 0x321E
1864
- || x >= 0x3220 && x <= 0x3247
1865
- || x >= 0x3250 && x <= 0xA48C
1866
- || x >= 0xA490 && x <= 0xA4C6
1867
- || x >= 0xA960 && x <= 0xA97C
1868
- || x >= 0xAC00 && x <= 0xD7A3
1869
- || x >= 0xF900 && x <= 0xFAFF
1870
- || x >= 0xFE10 && x <= 0xFE19
1871
- || x >= 0xFE30 && x <= 0xFE52
1872
- || x >= 0xFE54 && x <= 0xFE66
1873
- || x >= 0xFE68 && x <= 0xFE6B
1874
- || x >= 0x16FE0 && x <= 0x16FE4
1875
- || x === 0x16FF0
1876
- || x === 0x16FF1
1877
- || x >= 0x17000 && x <= 0x187F7
1878
- || x >= 0x18800 && x <= 0x18CD5
1879
- || x >= 0x18CFF && x <= 0x18D08
1880
- || x >= 0x1AFF0 && x <= 0x1AFF3
1881
- || x >= 0x1AFF5 && x <= 0x1AFFB
1882
- || x === 0x1AFFD
1883
- || x === 0x1AFFE
1884
- || x >= 0x1B000 && x <= 0x1B122
1885
- || x === 0x1B132
1886
- || x >= 0x1B150 && x <= 0x1B152
1887
- || x === 0x1B155
1888
- || x >= 0x1B164 && x <= 0x1B167
1889
- || x >= 0x1B170 && x <= 0x1B2FB
1890
- || x >= 0x1D300 && x <= 0x1D356
1891
- || x >= 0x1D360 && x <= 0x1D376
1892
- || x === 0x1F004
1893
- || x === 0x1F0CF
1894
- || x === 0x1F18E
1895
- || x >= 0x1F191 && x <= 0x1F19A
1896
- || x >= 0x1F200 && x <= 0x1F202
1897
- || x >= 0x1F210 && x <= 0x1F23B
1898
- || x >= 0x1F240 && x <= 0x1F248
1899
- || x === 0x1F250
1900
- || x === 0x1F251
1901
- || x >= 0x1F260 && x <= 0x1F265
1902
- || x >= 0x1F300 && x <= 0x1F320
1903
- || x >= 0x1F32D && x <= 0x1F335
1904
- || x >= 0x1F337 && x <= 0x1F37C
1905
- || x >= 0x1F37E && x <= 0x1F393
1906
- || x >= 0x1F3A0 && x <= 0x1F3CA
1907
- || x >= 0x1F3CF && x <= 0x1F3D3
1908
- || x >= 0x1F3E0 && x <= 0x1F3F0
1909
- || x === 0x1F3F4
1910
- || x >= 0x1F3F8 && x <= 0x1F43E
1911
- || x === 0x1F440
1912
- || x >= 0x1F442 && x <= 0x1F4FC
1913
- || x >= 0x1F4FF && x <= 0x1F53D
1914
- || x >= 0x1F54B && x <= 0x1F54E
1915
- || x >= 0x1F550 && x <= 0x1F567
1916
- || x === 0x1F57A
1917
- || x === 0x1F595
1918
- || x === 0x1F596
1919
- || x === 0x1F5A4
1920
- || x >= 0x1F5FB && x <= 0x1F64F
1921
- || x >= 0x1F680 && x <= 0x1F6C5
1922
- || x === 0x1F6CC
1923
- || x >= 0x1F6D0 && x <= 0x1F6D2
1924
- || x >= 0x1F6D5 && x <= 0x1F6D7
1925
- || x >= 0x1F6DC && x <= 0x1F6DF
1926
- || x === 0x1F6EB
1927
- || x === 0x1F6EC
1928
- || x >= 0x1F6F4 && x <= 0x1F6FC
1929
- || x >= 0x1F7E0 && x <= 0x1F7EB
1930
- || x === 0x1F7F0
1931
- || x >= 0x1F90C && x <= 0x1F93A
1932
- || x >= 0x1F93C && x <= 0x1F945
1933
- || x >= 0x1F947 && x <= 0x1F9FF
1934
- || x >= 0x1FA70 && x <= 0x1FA7C
1935
- || x >= 0x1FA80 && x <= 0x1FA89
1936
- || x >= 0x1FA8F && x <= 0x1FAC6
1937
- || x >= 0x1FACE && x <= 0x1FADC
1938
- || x >= 0x1FADF && x <= 0x1FAE9
1939
- || x >= 0x1FAF0 && x <= 0x1FAF8
1940
- || x >= 0x20000 && x <= 0x2FFFD
1941
- || x >= 0x30000 && x <= 0x3FFFD;
1942
- }
1943
-
1944
- function validate(codePoint) {
1945
- if (!Number.isSafeInteger(codePoint)) {
1946
- throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
1947
- }
1948
- }
1949
-
1950
- function eastAsianWidth(codePoint, {ambiguousAsWide = false} = {}) {
1951
- validate(codePoint);
1952
-
1953
- if (
1954
- isFullWidth(codePoint)
1955
- || isWide(codePoint)
1956
- || (ambiguousAsWide && isAmbiguous(codePoint))
1957
- ) {
1958
- return 2;
1959
- }
1960
-
1961
- return 1;
1962
- }
1963
-
1964
- /* globals WorkerGlobalScope, DedicatedWorkerGlobalScope, SharedWorkerGlobalScope, ServiceWorkerGlobalScope */
1965
-
1966
- const isBrowser = globalThis.window?.document !== undefined;
1967
-
1968
- globalThis.process?.versions?.node !== undefined;
1969
-
1970
- globalThis.process?.versions?.bun !== undefined;
1971
-
1972
- globalThis.Deno?.version?.deno !== undefined;
1973
-
1974
- globalThis.process?.versions?.electron !== undefined;
1975
-
1976
- globalThis.navigator?.userAgent?.includes('jsdom') === true;
1977
-
1978
- typeof WorkerGlobalScope !== 'undefined' && globalThis instanceof WorkerGlobalScope;
1979
-
1980
- typeof DedicatedWorkerGlobalScope !== 'undefined' && globalThis instanceof DedicatedWorkerGlobalScope;
1981
-
1982
- typeof SharedWorkerGlobalScope !== 'undefined' && globalThis instanceof SharedWorkerGlobalScope;
1983
-
1984
- typeof ServiceWorkerGlobalScope !== 'undefined' && globalThis instanceof ServiceWorkerGlobalScope;
1985
-
1986
- // Note: I'm intentionally not DRYing up the other variables to keep them "lazy".
1987
- const platform = globalThis.navigator?.userAgentData?.platform;
1988
-
1989
- platform === 'macOS'
1990
- || globalThis.navigator?.platform === 'MacIntel' // Even on Apple silicon Macs.
1991
- || globalThis.navigator?.userAgent?.includes(' Mac ') === true
1992
- || globalThis.process?.platform === 'darwin';
1993
-
1994
- platform === 'Windows'
1995
- || globalThis.navigator?.platform === 'Win32'
1996
- || globalThis.process?.platform === 'win32';
1997
-
1998
- platform === 'Linux'
1999
- || globalThis.navigator?.platform?.startsWith('Linux') === true
2000
- || globalThis.navigator?.userAgent?.includes(' Linux ') === true
2001
- || globalThis.process?.platform === 'linux';
2002
-
2003
- platform === 'Android'
2004
- || globalThis.navigator?.platform === 'Android'
2005
- || globalThis.navigator?.userAgent?.includes(' Android ') === true
2006
- || globalThis.process?.platform === 'android';
2007
-
2008
- const ESC = '\u001B[';
2009
-
2010
- !isBrowser && process.env.TERM_PROGRAM === 'Apple_Terminal';
2011
- const isWindows = !isBrowser && process.platform === 'win32';
2012
-
2013
- isBrowser ? () => {
2014
- throw new Error('`process.cwd()` only works in Node.js, not the browser.');
2015
- } : process.cwd;
2016
-
2017
- const cursorUp = (count = 1) => ESC + count + 'A';
2018
-
2019
- const cursorLeft = ESC + 'G';
2020
-
2021
- const eraseLines = count => {
2022
- let clear = '';
2023
-
2024
- for (let i = 0; i < count; i++) {
2025
- clear += eraseLine + (i < count - 1 ? cursorUp() : '');
2026
- }
2027
-
2028
- if (count) {
2029
- clear += cursorLeft;
2030
- }
2031
-
2032
- return clear;
2033
- };
2034
- const eraseLine = ESC + '2K';
2035
- const eraseScreen = ESC + '2J';
2036
-
2037
- const clearTerminal = isWindows
2038
- ? `${eraseScreen}${ESC}0f`
2039
- // 1. Erases the screen (Only done in case `2` is not supported)
2040
- // 2. Erases the whole screen including scrollback buffer
2041
- // 3. Moves cursor to the top-left position
2042
- // More info: https://www.real-world-systems.com/docs/ANSIcode.html
2043
- : `${eraseScreen}${ESC}3J${ESC}H`;
2044
-
2045
- export { clearTerminal$2 as clearTerminal, clearTerminal$1, clearTerminal as clearTerminal$2, createSupportsColor$2 as createSupportsColor, createSupportsColor$1, createSupportsColor as createSupportsColor$2, eastAsianWidth$2 as eastAsianWidth, eastAsianWidth$1, eastAsianWidth as eastAsianWidth$2, emojiRegex$2 as emojiRegex, emojiRegex$1, emojiRegex as emojiRegex$2, eraseLines$2 as eraseLines, eraseLines$1, eraseLines as eraseLines$2, isUnicodeSupported$2 as isUnicodeSupported, isUnicodeSupported$1, isUnicodeSupported as isUnicodeSupported$2 };