cross-spawn-cb 1.1.3 → 1.3.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.
- package/assets/cross-spawn-6.0.5.cjs +4077 -0
- package/dist/cjs/index.js +13 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/spawn.js +2 -1
- package/dist/cjs/spawn.js.map +1 -1
- package/dist/cjs/spawnCallback.js +0 -1
- package/dist/cjs/spawnCallback.js.map +1 -1
- package/dist/cjs/spawnCallbackSync.js +53 -1
- package/dist/cjs/spawnCallbackSync.js.map +1 -1
- package/package.json +7 -9
- package/assets/cross-spawn-6.0.5.js +0 -677
- package/dist/cjs/polyfills.js +0 -22
- package/dist/cjs/polyfills.js.map +0 -1
- package/dist/types/polyfills.d.cts +0 -1
|
@@ -0,0 +1,4077 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var require$$0 = require('buffer');
|
|
4
|
+
var require$$0$2 = require('path');
|
|
5
|
+
var require$$0$3 = require('child_process');
|
|
6
|
+
var require$$0$1 = require('fs');
|
|
7
|
+
|
|
8
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
|
+
function getDefaultExportFromCjs(x) {
|
|
10
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var es_object_assign = {};
|
|
14
|
+
|
|
15
|
+
function _type_of$6(obj) {
|
|
16
|
+
"@swc/helpers - typeof";
|
|
17
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
18
|
+
}
|
|
19
|
+
var globalThis_1;
|
|
20
|
+
var hasRequiredGlobalThis;
|
|
21
|
+
function requireGlobalThis() {
|
|
22
|
+
if (hasRequiredGlobalThis) return globalThis_1;
|
|
23
|
+
hasRequiredGlobalThis = 1;
|
|
24
|
+
var check = function check(it) {
|
|
25
|
+
return it && it.Math === Math && it;
|
|
26
|
+
};
|
|
27
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
28
|
+
globalThis_1 = // eslint-disable-next-line es/no-global-this -- safe
|
|
29
|
+
check((typeof globalThis === "undefined" ? "undefined" : _type_of$6(globalThis)) == 'object' && globalThis) || check((typeof window === "undefined" ? "undefined" : _type_of$6(window)) == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
30
|
+
check((typeof self === "undefined" ? "undefined" : _type_of$6(self)) == 'object' && self) || check(_type_of$6(commonjsGlobal) == 'object' && commonjsGlobal) || check((typeof globalThis_1 === "undefined" ? "undefined" : _type_of$6(globalThis_1)) == 'object' && globalThis_1) || // eslint-disable-next-line no-new-func -- fallback
|
|
31
|
+
function() {
|
|
32
|
+
return this;
|
|
33
|
+
}() || Function('return this')();
|
|
34
|
+
return globalThis_1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var objectGetOwnPropertyDescriptor = {};
|
|
38
|
+
|
|
39
|
+
var fails;
|
|
40
|
+
var hasRequiredFails;
|
|
41
|
+
function requireFails() {
|
|
42
|
+
if (hasRequiredFails) return fails;
|
|
43
|
+
hasRequiredFails = 1;
|
|
44
|
+
fails = function fails(exec) {
|
|
45
|
+
try {
|
|
46
|
+
return !!exec();
|
|
47
|
+
} catch (error) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
return fails;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var descriptors;
|
|
55
|
+
var hasRequiredDescriptors;
|
|
56
|
+
function requireDescriptors() {
|
|
57
|
+
if (hasRequiredDescriptors) return descriptors;
|
|
58
|
+
hasRequiredDescriptors = 1;
|
|
59
|
+
var fails = requireFails();
|
|
60
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
61
|
+
descriptors = !fails(function() {
|
|
62
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
63
|
+
return Object.defineProperty({}, 1, {
|
|
64
|
+
get: function get() {
|
|
65
|
+
return 7;
|
|
66
|
+
}
|
|
67
|
+
})[1] !== 7;
|
|
68
|
+
});
|
|
69
|
+
return descriptors;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
var functionBindNative;
|
|
73
|
+
var hasRequiredFunctionBindNative;
|
|
74
|
+
function requireFunctionBindNative() {
|
|
75
|
+
if (hasRequiredFunctionBindNative) return functionBindNative;
|
|
76
|
+
hasRequiredFunctionBindNative = 1;
|
|
77
|
+
var fails = requireFails();
|
|
78
|
+
functionBindNative = !fails(function() {
|
|
79
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
80
|
+
var test = (function() {}).bind();
|
|
81
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
82
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
83
|
+
});
|
|
84
|
+
return functionBindNative;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
var functionCall;
|
|
88
|
+
var hasRequiredFunctionCall;
|
|
89
|
+
function requireFunctionCall() {
|
|
90
|
+
if (hasRequiredFunctionCall) return functionCall;
|
|
91
|
+
hasRequiredFunctionCall = 1;
|
|
92
|
+
var NATIVE_BIND = requireFunctionBindNative();
|
|
93
|
+
var call = Function.prototype.call;
|
|
94
|
+
functionCall = NATIVE_BIND ? call.bind(call) : function functionCall() {
|
|
95
|
+
return call.apply(call, arguments);
|
|
96
|
+
};
|
|
97
|
+
return functionCall;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
var objectPropertyIsEnumerable = {};
|
|
101
|
+
|
|
102
|
+
var hasRequiredObjectPropertyIsEnumerable;
|
|
103
|
+
function requireObjectPropertyIsEnumerable() {
|
|
104
|
+
if (hasRequiredObjectPropertyIsEnumerable) return objectPropertyIsEnumerable;
|
|
105
|
+
hasRequiredObjectPropertyIsEnumerable = 1;
|
|
106
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
107
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
108
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
109
|
+
// Nashorn ~ JDK8 bug
|
|
110
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({
|
|
111
|
+
1: 2
|
|
112
|
+
}, 1);
|
|
113
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
114
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
115
|
+
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
116
|
+
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
117
|
+
return !!descriptor && descriptor.enumerable;
|
|
118
|
+
} : $propertyIsEnumerable;
|
|
119
|
+
return objectPropertyIsEnumerable;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
var createPropertyDescriptor;
|
|
123
|
+
var hasRequiredCreatePropertyDescriptor;
|
|
124
|
+
function requireCreatePropertyDescriptor() {
|
|
125
|
+
if (hasRequiredCreatePropertyDescriptor) return createPropertyDescriptor;
|
|
126
|
+
hasRequiredCreatePropertyDescriptor = 1;
|
|
127
|
+
createPropertyDescriptor = function createPropertyDescriptor(bitmap, value) {
|
|
128
|
+
return {
|
|
129
|
+
enumerable: !(bitmap & 1),
|
|
130
|
+
configurable: !(bitmap & 2),
|
|
131
|
+
writable: !(bitmap & 4),
|
|
132
|
+
value: value
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
return createPropertyDescriptor;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
var functionUncurryThis;
|
|
139
|
+
var hasRequiredFunctionUncurryThis;
|
|
140
|
+
function requireFunctionUncurryThis() {
|
|
141
|
+
if (hasRequiredFunctionUncurryThis) return functionUncurryThis;
|
|
142
|
+
hasRequiredFunctionUncurryThis = 1;
|
|
143
|
+
var NATIVE_BIND = requireFunctionBindNative();
|
|
144
|
+
var FunctionPrototype = Function.prototype;
|
|
145
|
+
var call = FunctionPrototype.call;
|
|
146
|
+
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
|
|
147
|
+
functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function functionUncurryThis(fn) {
|
|
148
|
+
return function() {
|
|
149
|
+
return call.apply(fn, arguments);
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
return functionUncurryThis;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
var classofRaw;
|
|
156
|
+
var hasRequiredClassofRaw;
|
|
157
|
+
function requireClassofRaw() {
|
|
158
|
+
if (hasRequiredClassofRaw) return classofRaw;
|
|
159
|
+
hasRequiredClassofRaw = 1;
|
|
160
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
161
|
+
var toString = uncurryThis({}.toString);
|
|
162
|
+
var stringSlice = uncurryThis(''.slice);
|
|
163
|
+
classofRaw = function classofRaw(it) {
|
|
164
|
+
return stringSlice(toString(it), 8, -1);
|
|
165
|
+
};
|
|
166
|
+
return classofRaw;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
var indexedObject;
|
|
170
|
+
var hasRequiredIndexedObject;
|
|
171
|
+
function requireIndexedObject() {
|
|
172
|
+
if (hasRequiredIndexedObject) return indexedObject;
|
|
173
|
+
hasRequiredIndexedObject = 1;
|
|
174
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
175
|
+
var fails = requireFails();
|
|
176
|
+
var classof = requireClassofRaw();
|
|
177
|
+
var $Object = Object;
|
|
178
|
+
var split = uncurryThis(''.split);
|
|
179
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
180
|
+
indexedObject = fails(function() {
|
|
181
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
182
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
183
|
+
return !$Object('z').propertyIsEnumerable(0);
|
|
184
|
+
}) ? function indexedObject(it) {
|
|
185
|
+
return classof(it) === 'String' ? split(it, '') : $Object(it);
|
|
186
|
+
} : $Object;
|
|
187
|
+
return indexedObject;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
var isNullOrUndefined;
|
|
191
|
+
var hasRequiredIsNullOrUndefined;
|
|
192
|
+
function requireIsNullOrUndefined() {
|
|
193
|
+
if (hasRequiredIsNullOrUndefined) return isNullOrUndefined;
|
|
194
|
+
hasRequiredIsNullOrUndefined = 1;
|
|
195
|
+
// we can't use just `it == null` since of `document.all` special case
|
|
196
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
197
|
+
isNullOrUndefined = function isNullOrUndefined(it) {
|
|
198
|
+
return it === null || it === undefined;
|
|
199
|
+
};
|
|
200
|
+
return isNullOrUndefined;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
var requireObjectCoercible;
|
|
204
|
+
var hasRequiredRequireObjectCoercible;
|
|
205
|
+
function requireRequireObjectCoercible() {
|
|
206
|
+
if (hasRequiredRequireObjectCoercible) return requireObjectCoercible;
|
|
207
|
+
hasRequiredRequireObjectCoercible = 1;
|
|
208
|
+
var isNullOrUndefined = requireIsNullOrUndefined();
|
|
209
|
+
var $TypeError = TypeError;
|
|
210
|
+
// `RequireObjectCoercible` abstract operation
|
|
211
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
212
|
+
requireObjectCoercible = function requireObjectCoercible(it) {
|
|
213
|
+
if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
|
|
214
|
+
return it;
|
|
215
|
+
};
|
|
216
|
+
return requireObjectCoercible;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
var toIndexedObject;
|
|
220
|
+
var hasRequiredToIndexedObject;
|
|
221
|
+
function requireToIndexedObject() {
|
|
222
|
+
if (hasRequiredToIndexedObject) return toIndexedObject;
|
|
223
|
+
hasRequiredToIndexedObject = 1;
|
|
224
|
+
// toObject with fallback for non-array-like ES3 strings
|
|
225
|
+
var IndexedObject = requireIndexedObject();
|
|
226
|
+
var requireObjectCoercible = requireRequireObjectCoercible();
|
|
227
|
+
toIndexedObject = function toIndexedObject(it) {
|
|
228
|
+
return IndexedObject(requireObjectCoercible(it));
|
|
229
|
+
};
|
|
230
|
+
return toIndexedObject;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function _type_of$5(obj) {
|
|
234
|
+
"@swc/helpers - typeof";
|
|
235
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
236
|
+
}
|
|
237
|
+
var isCallable;
|
|
238
|
+
var hasRequiredIsCallable;
|
|
239
|
+
function requireIsCallable() {
|
|
240
|
+
if (hasRequiredIsCallable) return isCallable;
|
|
241
|
+
hasRequiredIsCallable = 1;
|
|
242
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
243
|
+
var documentAll = (typeof document === "undefined" ? "undefined" : _type_of$5(document)) == 'object' && document.all;
|
|
244
|
+
// `IsCallable` abstract operation
|
|
245
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
246
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
247
|
+
isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function isCallable(argument) {
|
|
248
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
249
|
+
} : function(argument) {
|
|
250
|
+
return typeof argument == 'function';
|
|
251
|
+
};
|
|
252
|
+
return isCallable;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function _type_of$4(obj) {
|
|
256
|
+
"@swc/helpers - typeof";
|
|
257
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
258
|
+
}
|
|
259
|
+
var isObject;
|
|
260
|
+
var hasRequiredIsObject;
|
|
261
|
+
function requireIsObject() {
|
|
262
|
+
if (hasRequiredIsObject) return isObject;
|
|
263
|
+
hasRequiredIsObject = 1;
|
|
264
|
+
var isCallable = requireIsCallable();
|
|
265
|
+
isObject = function isObject(it) {
|
|
266
|
+
return (typeof it === "undefined" ? "undefined" : _type_of$4(it)) == 'object' ? it !== null : isCallable(it);
|
|
267
|
+
};
|
|
268
|
+
return isObject;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
var getBuiltIn;
|
|
272
|
+
var hasRequiredGetBuiltIn;
|
|
273
|
+
function requireGetBuiltIn() {
|
|
274
|
+
if (hasRequiredGetBuiltIn) return getBuiltIn;
|
|
275
|
+
hasRequiredGetBuiltIn = 1;
|
|
276
|
+
var globalThis = requireGlobalThis();
|
|
277
|
+
var isCallable = requireIsCallable();
|
|
278
|
+
var aFunction = function aFunction(argument) {
|
|
279
|
+
return isCallable(argument) ? argument : undefined;
|
|
280
|
+
};
|
|
281
|
+
getBuiltIn = function getBuiltIn(namespace, method) {
|
|
282
|
+
return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];
|
|
283
|
+
};
|
|
284
|
+
return getBuiltIn;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
var objectIsPrototypeOf;
|
|
288
|
+
var hasRequiredObjectIsPrototypeOf;
|
|
289
|
+
function requireObjectIsPrototypeOf() {
|
|
290
|
+
if (hasRequiredObjectIsPrototypeOf) return objectIsPrototypeOf;
|
|
291
|
+
hasRequiredObjectIsPrototypeOf = 1;
|
|
292
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
293
|
+
objectIsPrototypeOf = uncurryThis({}.isPrototypeOf);
|
|
294
|
+
return objectIsPrototypeOf;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
var environmentUserAgent;
|
|
298
|
+
var hasRequiredEnvironmentUserAgent;
|
|
299
|
+
function requireEnvironmentUserAgent() {
|
|
300
|
+
if (hasRequiredEnvironmentUserAgent) return environmentUserAgent;
|
|
301
|
+
hasRequiredEnvironmentUserAgent = 1;
|
|
302
|
+
var globalThis = requireGlobalThis();
|
|
303
|
+
var navigator = globalThis.navigator;
|
|
304
|
+
var userAgent = navigator && navigator.userAgent;
|
|
305
|
+
environmentUserAgent = userAgent ? String(userAgent) : '';
|
|
306
|
+
return environmentUserAgent;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
var environmentV8Version;
|
|
310
|
+
var hasRequiredEnvironmentV8Version;
|
|
311
|
+
function requireEnvironmentV8Version() {
|
|
312
|
+
if (hasRequiredEnvironmentV8Version) return environmentV8Version;
|
|
313
|
+
hasRequiredEnvironmentV8Version = 1;
|
|
314
|
+
var globalThis = requireGlobalThis();
|
|
315
|
+
var userAgent = requireEnvironmentUserAgent();
|
|
316
|
+
var process = globalThis.process;
|
|
317
|
+
var Deno = globalThis.Deno;
|
|
318
|
+
var versions = process && process.versions || Deno && Deno.version;
|
|
319
|
+
var v8 = versions && versions.v8;
|
|
320
|
+
var match, version;
|
|
321
|
+
if (v8) {
|
|
322
|
+
match = v8.split('.');
|
|
323
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
324
|
+
// but their correct versions are not interesting for us
|
|
325
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
326
|
+
}
|
|
327
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
328
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
329
|
+
if (!version && userAgent) {
|
|
330
|
+
match = userAgent.match(/Edge\/(\d+)/);
|
|
331
|
+
if (!match || match[1] >= 74) {
|
|
332
|
+
match = userAgent.match(/Chrome\/(\d+)/);
|
|
333
|
+
if (match) version = +match[1];
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
environmentV8Version = version;
|
|
337
|
+
return environmentV8Version;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
function _instanceof$1(left, right) {
|
|
341
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
342
|
+
return !!right[Symbol.hasInstance](left);
|
|
343
|
+
} else {
|
|
344
|
+
return left instanceof right;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
var symbolConstructorDetection;
|
|
348
|
+
var hasRequiredSymbolConstructorDetection;
|
|
349
|
+
function requireSymbolConstructorDetection() {
|
|
350
|
+
if (hasRequiredSymbolConstructorDetection) return symbolConstructorDetection;
|
|
351
|
+
hasRequiredSymbolConstructorDetection = 1;
|
|
352
|
+
/* eslint-disable es/no-symbol -- required for testing */ var V8_VERSION = requireEnvironmentV8Version();
|
|
353
|
+
var fails = requireFails();
|
|
354
|
+
var globalThis = requireGlobalThis();
|
|
355
|
+
var $String = globalThis.String;
|
|
356
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
357
|
+
symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function() {
|
|
358
|
+
var symbol = Symbol('symbol detection');
|
|
359
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
360
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
361
|
+
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
362
|
+
// of course, fail.
|
|
363
|
+
return !$String(symbol) || !_instanceof$1(Object(symbol), Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
364
|
+
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
365
|
+
});
|
|
366
|
+
return symbolConstructorDetection;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
function _type_of$3(obj) {
|
|
370
|
+
"@swc/helpers - typeof";
|
|
371
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
372
|
+
}
|
|
373
|
+
var useSymbolAsUid;
|
|
374
|
+
var hasRequiredUseSymbolAsUid;
|
|
375
|
+
function requireUseSymbolAsUid() {
|
|
376
|
+
if (hasRequiredUseSymbolAsUid) return useSymbolAsUid;
|
|
377
|
+
hasRequiredUseSymbolAsUid = 1;
|
|
378
|
+
/* eslint-disable es/no-symbol -- required for testing */ var NATIVE_SYMBOL = requireSymbolConstructorDetection();
|
|
379
|
+
useSymbolAsUid = NATIVE_SYMBOL && !Symbol.sham && _type_of$3(Symbol.iterator) == 'symbol';
|
|
380
|
+
return useSymbolAsUid;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
function _type_of$2(obj) {
|
|
384
|
+
"@swc/helpers - typeof";
|
|
385
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
386
|
+
}
|
|
387
|
+
var isSymbol;
|
|
388
|
+
var hasRequiredIsSymbol;
|
|
389
|
+
function requireIsSymbol() {
|
|
390
|
+
if (hasRequiredIsSymbol) return isSymbol;
|
|
391
|
+
hasRequiredIsSymbol = 1;
|
|
392
|
+
var getBuiltIn = requireGetBuiltIn();
|
|
393
|
+
var isCallable = requireIsCallable();
|
|
394
|
+
var isPrototypeOf = requireObjectIsPrototypeOf();
|
|
395
|
+
var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
|
|
396
|
+
var $Object = Object;
|
|
397
|
+
isSymbol = USE_SYMBOL_AS_UID ? function isSymbol(it) {
|
|
398
|
+
return (typeof it === "undefined" ? "undefined" : _type_of$2(it)) == 'symbol';
|
|
399
|
+
} : function(it) {
|
|
400
|
+
var $Symbol = getBuiltIn('Symbol');
|
|
401
|
+
return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
|
|
402
|
+
};
|
|
403
|
+
return isSymbol;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
var tryToString;
|
|
407
|
+
var hasRequiredTryToString;
|
|
408
|
+
function requireTryToString() {
|
|
409
|
+
if (hasRequiredTryToString) return tryToString;
|
|
410
|
+
hasRequiredTryToString = 1;
|
|
411
|
+
var $String = String;
|
|
412
|
+
tryToString = function tryToString(argument) {
|
|
413
|
+
try {
|
|
414
|
+
return $String(argument);
|
|
415
|
+
} catch (error) {
|
|
416
|
+
return 'Object';
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
return tryToString;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
var aCallable;
|
|
423
|
+
var hasRequiredACallable;
|
|
424
|
+
function requireACallable() {
|
|
425
|
+
if (hasRequiredACallable) return aCallable;
|
|
426
|
+
hasRequiredACallable = 1;
|
|
427
|
+
var isCallable = requireIsCallable();
|
|
428
|
+
var tryToString = requireTryToString();
|
|
429
|
+
var $TypeError = TypeError;
|
|
430
|
+
// `Assert: IsCallable(argument) is true`
|
|
431
|
+
aCallable = function aCallable(argument) {
|
|
432
|
+
if (isCallable(argument)) return argument;
|
|
433
|
+
throw new $TypeError(tryToString(argument) + ' is not a function');
|
|
434
|
+
};
|
|
435
|
+
return aCallable;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
var getMethod;
|
|
439
|
+
var hasRequiredGetMethod;
|
|
440
|
+
function requireGetMethod() {
|
|
441
|
+
if (hasRequiredGetMethod) return getMethod;
|
|
442
|
+
hasRequiredGetMethod = 1;
|
|
443
|
+
var aCallable = requireACallable();
|
|
444
|
+
var isNullOrUndefined = requireIsNullOrUndefined();
|
|
445
|
+
// `GetMethod` abstract operation
|
|
446
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
447
|
+
getMethod = function getMethod(V, P) {
|
|
448
|
+
var func = V[P];
|
|
449
|
+
return isNullOrUndefined(func) ? undefined : aCallable(func);
|
|
450
|
+
};
|
|
451
|
+
return getMethod;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
var ordinaryToPrimitive;
|
|
455
|
+
var hasRequiredOrdinaryToPrimitive;
|
|
456
|
+
function requireOrdinaryToPrimitive() {
|
|
457
|
+
if (hasRequiredOrdinaryToPrimitive) return ordinaryToPrimitive;
|
|
458
|
+
hasRequiredOrdinaryToPrimitive = 1;
|
|
459
|
+
var call = requireFunctionCall();
|
|
460
|
+
var isCallable = requireIsCallable();
|
|
461
|
+
var isObject = requireIsObject();
|
|
462
|
+
var $TypeError = TypeError;
|
|
463
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
464
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
465
|
+
ordinaryToPrimitive = function ordinaryToPrimitive(input, pref) {
|
|
466
|
+
var fn, val;
|
|
467
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
|
|
468
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
|
|
469
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
|
|
470
|
+
throw new $TypeError("Can't convert object to primitive value");
|
|
471
|
+
};
|
|
472
|
+
return ordinaryToPrimitive;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
var sharedStore = {
|
|
476
|
+
exports: {}
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
var isPure;
|
|
480
|
+
var hasRequiredIsPure;
|
|
481
|
+
function requireIsPure() {
|
|
482
|
+
if (hasRequiredIsPure) return isPure;
|
|
483
|
+
hasRequiredIsPure = 1;
|
|
484
|
+
isPure = false;
|
|
485
|
+
return isPure;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
var defineGlobalProperty;
|
|
489
|
+
var hasRequiredDefineGlobalProperty;
|
|
490
|
+
function requireDefineGlobalProperty() {
|
|
491
|
+
if (hasRequiredDefineGlobalProperty) return defineGlobalProperty;
|
|
492
|
+
hasRequiredDefineGlobalProperty = 1;
|
|
493
|
+
var globalThis = requireGlobalThis();
|
|
494
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
495
|
+
var defineProperty = Object.defineProperty;
|
|
496
|
+
defineGlobalProperty = function defineGlobalProperty(key, value) {
|
|
497
|
+
try {
|
|
498
|
+
defineProperty(globalThis, key, {
|
|
499
|
+
value: value,
|
|
500
|
+
configurable: true,
|
|
501
|
+
writable: true
|
|
502
|
+
});
|
|
503
|
+
} catch (error) {
|
|
504
|
+
globalThis[key] = value;
|
|
505
|
+
}
|
|
506
|
+
return value;
|
|
507
|
+
};
|
|
508
|
+
return defineGlobalProperty;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
var hasRequiredSharedStore;
|
|
512
|
+
function requireSharedStore() {
|
|
513
|
+
if (hasRequiredSharedStore) return sharedStore.exports;
|
|
514
|
+
hasRequiredSharedStore = 1;
|
|
515
|
+
var IS_PURE = requireIsPure();
|
|
516
|
+
var globalThis = requireGlobalThis();
|
|
517
|
+
var defineGlobalProperty = requireDefineGlobalProperty();
|
|
518
|
+
var SHARED = '__core-js_shared__';
|
|
519
|
+
var store = sharedStore.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
|
|
520
|
+
(store.versions || (store.versions = [])).push({
|
|
521
|
+
version: '3.39.0',
|
|
522
|
+
mode: IS_PURE ? 'pure' : 'global',
|
|
523
|
+
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
524
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE',
|
|
525
|
+
source: 'https://github.com/zloirock/core-js'
|
|
526
|
+
});
|
|
527
|
+
return sharedStore.exports;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
var shared;
|
|
531
|
+
var hasRequiredShared;
|
|
532
|
+
function requireShared() {
|
|
533
|
+
if (hasRequiredShared) return shared;
|
|
534
|
+
hasRequiredShared = 1;
|
|
535
|
+
var store = requireSharedStore();
|
|
536
|
+
shared = function shared(key, value) {
|
|
537
|
+
return store[key] || (store[key] = value || {});
|
|
538
|
+
};
|
|
539
|
+
return shared;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
var toObject;
|
|
543
|
+
var hasRequiredToObject;
|
|
544
|
+
function requireToObject() {
|
|
545
|
+
if (hasRequiredToObject) return toObject;
|
|
546
|
+
hasRequiredToObject = 1;
|
|
547
|
+
var requireObjectCoercible = requireRequireObjectCoercible();
|
|
548
|
+
var $Object = Object;
|
|
549
|
+
// `ToObject` abstract operation
|
|
550
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
551
|
+
toObject = function toObject(argument) {
|
|
552
|
+
return $Object(requireObjectCoercible(argument));
|
|
553
|
+
};
|
|
554
|
+
return toObject;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
var hasOwnProperty_1;
|
|
558
|
+
var hasRequiredHasOwnProperty;
|
|
559
|
+
function requireHasOwnProperty() {
|
|
560
|
+
if (hasRequiredHasOwnProperty) return hasOwnProperty_1;
|
|
561
|
+
hasRequiredHasOwnProperty = 1;
|
|
562
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
563
|
+
var toObject = requireToObject();
|
|
564
|
+
var hasOwnProperty = uncurryThis({}.hasOwnProperty);
|
|
565
|
+
// `HasOwnProperty` abstract operation
|
|
566
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
567
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
568
|
+
hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
569
|
+
return hasOwnProperty(toObject(it), key);
|
|
570
|
+
};
|
|
571
|
+
return hasOwnProperty_1;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
var uid;
|
|
575
|
+
var hasRequiredUid;
|
|
576
|
+
function requireUid() {
|
|
577
|
+
if (hasRequiredUid) return uid;
|
|
578
|
+
hasRequiredUid = 1;
|
|
579
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
580
|
+
var id = 0;
|
|
581
|
+
var postfix = Math.random();
|
|
582
|
+
var toString = uncurryThis(1.0.toString);
|
|
583
|
+
uid = function uid(key) {
|
|
584
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
585
|
+
};
|
|
586
|
+
return uid;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
var wellKnownSymbol;
|
|
590
|
+
var hasRequiredWellKnownSymbol;
|
|
591
|
+
function requireWellKnownSymbol() {
|
|
592
|
+
if (hasRequiredWellKnownSymbol) return wellKnownSymbol;
|
|
593
|
+
hasRequiredWellKnownSymbol = 1;
|
|
594
|
+
var globalThis = requireGlobalThis();
|
|
595
|
+
var shared = requireShared();
|
|
596
|
+
var hasOwn = requireHasOwnProperty();
|
|
597
|
+
var uid = requireUid();
|
|
598
|
+
var NATIVE_SYMBOL = requireSymbolConstructorDetection();
|
|
599
|
+
var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
|
|
600
|
+
var Symbol = globalThis.Symbol;
|
|
601
|
+
var WellKnownSymbolsStore = shared('wks');
|
|
602
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
|
|
603
|
+
wellKnownSymbol = function wellKnownSymbol(name) {
|
|
604
|
+
if (!hasOwn(WellKnownSymbolsStore, name)) {
|
|
605
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name) ? Symbol[name] : createWellKnownSymbol('Symbol.' + name);
|
|
606
|
+
}
|
|
607
|
+
return WellKnownSymbolsStore[name];
|
|
608
|
+
};
|
|
609
|
+
return wellKnownSymbol;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
var toPrimitive;
|
|
613
|
+
var hasRequiredToPrimitive;
|
|
614
|
+
function requireToPrimitive() {
|
|
615
|
+
if (hasRequiredToPrimitive) return toPrimitive;
|
|
616
|
+
hasRequiredToPrimitive = 1;
|
|
617
|
+
var call = requireFunctionCall();
|
|
618
|
+
var isObject = requireIsObject();
|
|
619
|
+
var isSymbol = requireIsSymbol();
|
|
620
|
+
var getMethod = requireGetMethod();
|
|
621
|
+
var ordinaryToPrimitive = requireOrdinaryToPrimitive();
|
|
622
|
+
var wellKnownSymbol = requireWellKnownSymbol();
|
|
623
|
+
var $TypeError = TypeError;
|
|
624
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
625
|
+
// `ToPrimitive` abstract operation
|
|
626
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
627
|
+
toPrimitive = function toPrimitive(input, pref) {
|
|
628
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
|
629
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
630
|
+
var result;
|
|
631
|
+
if (exoticToPrim) {
|
|
632
|
+
if (pref === undefined) pref = 'default';
|
|
633
|
+
result = call(exoticToPrim, input, pref);
|
|
634
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
|
635
|
+
throw new $TypeError("Can't convert object to primitive value");
|
|
636
|
+
}
|
|
637
|
+
if (pref === undefined) pref = 'number';
|
|
638
|
+
return ordinaryToPrimitive(input, pref);
|
|
639
|
+
};
|
|
640
|
+
return toPrimitive;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
var toPropertyKey;
|
|
644
|
+
var hasRequiredToPropertyKey;
|
|
645
|
+
function requireToPropertyKey() {
|
|
646
|
+
if (hasRequiredToPropertyKey) return toPropertyKey;
|
|
647
|
+
hasRequiredToPropertyKey = 1;
|
|
648
|
+
var toPrimitive = requireToPrimitive();
|
|
649
|
+
var isSymbol = requireIsSymbol();
|
|
650
|
+
// `ToPropertyKey` abstract operation
|
|
651
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
|
652
|
+
toPropertyKey = function toPropertyKey(argument) {
|
|
653
|
+
var key = toPrimitive(argument, 'string');
|
|
654
|
+
return isSymbol(key) ? key : key + '';
|
|
655
|
+
};
|
|
656
|
+
return toPropertyKey;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
var documentCreateElement;
|
|
660
|
+
var hasRequiredDocumentCreateElement;
|
|
661
|
+
function requireDocumentCreateElement() {
|
|
662
|
+
if (hasRequiredDocumentCreateElement) return documentCreateElement;
|
|
663
|
+
hasRequiredDocumentCreateElement = 1;
|
|
664
|
+
var globalThis = requireGlobalThis();
|
|
665
|
+
var isObject = requireIsObject();
|
|
666
|
+
var document = globalThis.document;
|
|
667
|
+
// typeof document.createElement is 'object' in old IE
|
|
668
|
+
var EXISTS = isObject(document) && isObject(document.createElement);
|
|
669
|
+
documentCreateElement = function documentCreateElement(it) {
|
|
670
|
+
return EXISTS ? document.createElement(it) : {};
|
|
671
|
+
};
|
|
672
|
+
return documentCreateElement;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
var ie8DomDefine;
|
|
676
|
+
var hasRequiredIe8DomDefine;
|
|
677
|
+
function requireIe8DomDefine() {
|
|
678
|
+
if (hasRequiredIe8DomDefine) return ie8DomDefine;
|
|
679
|
+
hasRequiredIe8DomDefine = 1;
|
|
680
|
+
var DESCRIPTORS = requireDescriptors();
|
|
681
|
+
var fails = requireFails();
|
|
682
|
+
var createElement = requireDocumentCreateElement();
|
|
683
|
+
// Thanks to IE8 for its funny defineProperty
|
|
684
|
+
ie8DomDefine = !DESCRIPTORS && !fails(function() {
|
|
685
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
686
|
+
return Object.defineProperty(createElement('div'), 'a', {
|
|
687
|
+
get: function get() {
|
|
688
|
+
return 7;
|
|
689
|
+
}
|
|
690
|
+
}).a !== 7;
|
|
691
|
+
});
|
|
692
|
+
return ie8DomDefine;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
var hasRequiredObjectGetOwnPropertyDescriptor;
|
|
696
|
+
function requireObjectGetOwnPropertyDescriptor() {
|
|
697
|
+
if (hasRequiredObjectGetOwnPropertyDescriptor) return objectGetOwnPropertyDescriptor;
|
|
698
|
+
hasRequiredObjectGetOwnPropertyDescriptor = 1;
|
|
699
|
+
var DESCRIPTORS = requireDescriptors();
|
|
700
|
+
var call = requireFunctionCall();
|
|
701
|
+
var propertyIsEnumerableModule = requireObjectPropertyIsEnumerable();
|
|
702
|
+
var createPropertyDescriptor = requireCreatePropertyDescriptor();
|
|
703
|
+
var toIndexedObject = requireToIndexedObject();
|
|
704
|
+
var toPropertyKey = requireToPropertyKey();
|
|
705
|
+
var hasOwn = requireHasOwnProperty();
|
|
706
|
+
var IE8_DOM_DEFINE = requireIe8DomDefine();
|
|
707
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
708
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
709
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
710
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
711
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
712
|
+
O = toIndexedObject(O);
|
|
713
|
+
P = toPropertyKey(P);
|
|
714
|
+
if (IE8_DOM_DEFINE) try {
|
|
715
|
+
return $getOwnPropertyDescriptor(O, P);
|
|
716
|
+
} catch (error) {}
|
|
717
|
+
if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
|
|
718
|
+
};
|
|
719
|
+
return objectGetOwnPropertyDescriptor;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
var objectDefineProperty = {};
|
|
723
|
+
|
|
724
|
+
var v8PrototypeDefineBug;
|
|
725
|
+
var hasRequiredV8PrototypeDefineBug;
|
|
726
|
+
function requireV8PrototypeDefineBug() {
|
|
727
|
+
if (hasRequiredV8PrototypeDefineBug) return v8PrototypeDefineBug;
|
|
728
|
+
hasRequiredV8PrototypeDefineBug = 1;
|
|
729
|
+
var DESCRIPTORS = requireDescriptors();
|
|
730
|
+
var fails = requireFails();
|
|
731
|
+
// V8 ~ Chrome 36-
|
|
732
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
733
|
+
v8PrototypeDefineBug = DESCRIPTORS && fails(function() {
|
|
734
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
735
|
+
return Object.defineProperty(function() {}, 'prototype', {
|
|
736
|
+
value: 42,
|
|
737
|
+
writable: false
|
|
738
|
+
}).prototype !== 42;
|
|
739
|
+
});
|
|
740
|
+
return v8PrototypeDefineBug;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
var anObject;
|
|
744
|
+
var hasRequiredAnObject;
|
|
745
|
+
function requireAnObject() {
|
|
746
|
+
if (hasRequiredAnObject) return anObject;
|
|
747
|
+
hasRequiredAnObject = 1;
|
|
748
|
+
var isObject = requireIsObject();
|
|
749
|
+
var $String = String;
|
|
750
|
+
var $TypeError = TypeError;
|
|
751
|
+
// `Assert: Type(argument) is Object`
|
|
752
|
+
anObject = function anObject(argument) {
|
|
753
|
+
if (isObject(argument)) return argument;
|
|
754
|
+
throw new $TypeError($String(argument) + ' is not an object');
|
|
755
|
+
};
|
|
756
|
+
return anObject;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
var hasRequiredObjectDefineProperty;
|
|
760
|
+
function requireObjectDefineProperty() {
|
|
761
|
+
if (hasRequiredObjectDefineProperty) return objectDefineProperty;
|
|
762
|
+
hasRequiredObjectDefineProperty = 1;
|
|
763
|
+
var DESCRIPTORS = requireDescriptors();
|
|
764
|
+
var IE8_DOM_DEFINE = requireIe8DomDefine();
|
|
765
|
+
var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
|
|
766
|
+
var anObject = requireAnObject();
|
|
767
|
+
var toPropertyKey = requireToPropertyKey();
|
|
768
|
+
var $TypeError = TypeError;
|
|
769
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
770
|
+
var $defineProperty = Object.defineProperty;
|
|
771
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
772
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
773
|
+
var ENUMERABLE = 'enumerable';
|
|
774
|
+
var CONFIGURABLE = 'configurable';
|
|
775
|
+
var WRITABLE = 'writable';
|
|
776
|
+
// `Object.defineProperty` method
|
|
777
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
778
|
+
objectDefineProperty.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
|
|
779
|
+
anObject(O);
|
|
780
|
+
P = toPropertyKey(P);
|
|
781
|
+
anObject(Attributes);
|
|
782
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
783
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
784
|
+
if (current && current[WRITABLE]) {
|
|
785
|
+
O[P] = Attributes.value;
|
|
786
|
+
Attributes = {
|
|
787
|
+
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
|
|
788
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
789
|
+
writable: false
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
return $defineProperty(O, P, Attributes);
|
|
794
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
795
|
+
anObject(O);
|
|
796
|
+
P = toPropertyKey(P);
|
|
797
|
+
anObject(Attributes);
|
|
798
|
+
if (IE8_DOM_DEFINE) try {
|
|
799
|
+
return $defineProperty(O, P, Attributes);
|
|
800
|
+
} catch (error) {}
|
|
801
|
+
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
|
|
802
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
803
|
+
return O;
|
|
804
|
+
};
|
|
805
|
+
return objectDefineProperty;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
var createNonEnumerableProperty;
|
|
809
|
+
var hasRequiredCreateNonEnumerableProperty;
|
|
810
|
+
function requireCreateNonEnumerableProperty() {
|
|
811
|
+
if (hasRequiredCreateNonEnumerableProperty) return createNonEnumerableProperty;
|
|
812
|
+
hasRequiredCreateNonEnumerableProperty = 1;
|
|
813
|
+
var DESCRIPTORS = requireDescriptors();
|
|
814
|
+
var definePropertyModule = requireObjectDefineProperty();
|
|
815
|
+
var createPropertyDescriptor = requireCreatePropertyDescriptor();
|
|
816
|
+
createNonEnumerableProperty = DESCRIPTORS ? function createNonEnumerableProperty(object, key, value) {
|
|
817
|
+
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
|
818
|
+
} : function(object, key, value) {
|
|
819
|
+
object[key] = value;
|
|
820
|
+
return object;
|
|
821
|
+
};
|
|
822
|
+
return createNonEnumerableProperty;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
var makeBuiltIn = {
|
|
826
|
+
exports: {}
|
|
827
|
+
};
|
|
828
|
+
|
|
829
|
+
var functionName;
|
|
830
|
+
var hasRequiredFunctionName;
|
|
831
|
+
function requireFunctionName() {
|
|
832
|
+
if (hasRequiredFunctionName) return functionName;
|
|
833
|
+
hasRequiredFunctionName = 1;
|
|
834
|
+
var DESCRIPTORS = requireDescriptors();
|
|
835
|
+
var hasOwn = requireHasOwnProperty();
|
|
836
|
+
var FunctionPrototype = Function.prototype;
|
|
837
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
838
|
+
var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
|
|
839
|
+
var EXISTS = hasOwn(FunctionPrototype, 'name');
|
|
840
|
+
// additional protection from minified / mangled / dropped function names
|
|
841
|
+
var PROPER = EXISTS && (function something() {}).name === 'something';
|
|
842
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS || DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable);
|
|
843
|
+
functionName = {
|
|
844
|
+
EXISTS: EXISTS,
|
|
845
|
+
PROPER: PROPER,
|
|
846
|
+
CONFIGURABLE: CONFIGURABLE
|
|
847
|
+
};
|
|
848
|
+
return functionName;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
var inspectSource;
|
|
852
|
+
var hasRequiredInspectSource;
|
|
853
|
+
function requireInspectSource() {
|
|
854
|
+
if (hasRequiredInspectSource) return inspectSource;
|
|
855
|
+
hasRequiredInspectSource = 1;
|
|
856
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
857
|
+
var isCallable = requireIsCallable();
|
|
858
|
+
var store = requireSharedStore();
|
|
859
|
+
var functionToString = uncurryThis(Function.toString);
|
|
860
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
861
|
+
if (!isCallable(store.inspectSource)) {
|
|
862
|
+
store.inspectSource = function(it) {
|
|
863
|
+
return functionToString(it);
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
inspectSource = store.inspectSource;
|
|
867
|
+
return inspectSource;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
var weakMapBasicDetection;
|
|
871
|
+
var hasRequiredWeakMapBasicDetection;
|
|
872
|
+
function requireWeakMapBasicDetection() {
|
|
873
|
+
if (hasRequiredWeakMapBasicDetection) return weakMapBasicDetection;
|
|
874
|
+
hasRequiredWeakMapBasicDetection = 1;
|
|
875
|
+
var globalThis = requireGlobalThis();
|
|
876
|
+
var isCallable = requireIsCallable();
|
|
877
|
+
var WeakMap = globalThis.WeakMap;
|
|
878
|
+
weakMapBasicDetection = isCallable(WeakMap) && /native code/.test(String(WeakMap));
|
|
879
|
+
return weakMapBasicDetection;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
var sharedKey;
|
|
883
|
+
var hasRequiredSharedKey;
|
|
884
|
+
function requireSharedKey() {
|
|
885
|
+
if (hasRequiredSharedKey) return sharedKey;
|
|
886
|
+
hasRequiredSharedKey = 1;
|
|
887
|
+
var shared = requireShared();
|
|
888
|
+
var uid = requireUid();
|
|
889
|
+
var keys = shared('keys');
|
|
890
|
+
sharedKey = function sharedKey(key) {
|
|
891
|
+
return keys[key] || (keys[key] = uid(key));
|
|
892
|
+
};
|
|
893
|
+
return sharedKey;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
var hiddenKeys;
|
|
897
|
+
var hasRequiredHiddenKeys;
|
|
898
|
+
function requireHiddenKeys() {
|
|
899
|
+
if (hasRequiredHiddenKeys) return hiddenKeys;
|
|
900
|
+
hasRequiredHiddenKeys = 1;
|
|
901
|
+
hiddenKeys = {};
|
|
902
|
+
return hiddenKeys;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
var internalState;
|
|
906
|
+
var hasRequiredInternalState;
|
|
907
|
+
function requireInternalState() {
|
|
908
|
+
if (hasRequiredInternalState) return internalState;
|
|
909
|
+
hasRequiredInternalState = 1;
|
|
910
|
+
var NATIVE_WEAK_MAP = requireWeakMapBasicDetection();
|
|
911
|
+
var globalThis = requireGlobalThis();
|
|
912
|
+
var isObject = requireIsObject();
|
|
913
|
+
var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
|
|
914
|
+
var hasOwn = requireHasOwnProperty();
|
|
915
|
+
var shared = requireSharedStore();
|
|
916
|
+
var sharedKey = requireSharedKey();
|
|
917
|
+
var hiddenKeys = requireHiddenKeys();
|
|
918
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
919
|
+
var TypeError = globalThis.TypeError;
|
|
920
|
+
var WeakMap = globalThis.WeakMap;
|
|
921
|
+
var set, get, has;
|
|
922
|
+
var enforce = function enforce(it) {
|
|
923
|
+
return has(it) ? get(it) : set(it, {});
|
|
924
|
+
};
|
|
925
|
+
var getterFor = function getterFor(TYPE) {
|
|
926
|
+
return function(it) {
|
|
927
|
+
var state;
|
|
928
|
+
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
929
|
+
throw new TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
930
|
+
}
|
|
931
|
+
return state;
|
|
932
|
+
};
|
|
933
|
+
};
|
|
934
|
+
if (NATIVE_WEAK_MAP || shared.state) {
|
|
935
|
+
var store = shared.state || (shared.state = new WeakMap());
|
|
936
|
+
/* eslint-disable no-self-assign -- prototype methods protection */ store.get = store.get;
|
|
937
|
+
store.has = store.has;
|
|
938
|
+
store.set = store.set;
|
|
939
|
+
/* eslint-enable no-self-assign -- prototype methods protection */ set = function set(it, metadata) {
|
|
940
|
+
if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
|
|
941
|
+
metadata.facade = it;
|
|
942
|
+
store.set(it, metadata);
|
|
943
|
+
return metadata;
|
|
944
|
+
};
|
|
945
|
+
get = function get(it) {
|
|
946
|
+
return store.get(it) || {};
|
|
947
|
+
};
|
|
948
|
+
has = function has(it) {
|
|
949
|
+
return store.has(it);
|
|
950
|
+
};
|
|
951
|
+
} else {
|
|
952
|
+
var STATE = sharedKey('state');
|
|
953
|
+
hiddenKeys[STATE] = true;
|
|
954
|
+
set = function set(it, metadata) {
|
|
955
|
+
if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
|
|
956
|
+
metadata.facade = it;
|
|
957
|
+
createNonEnumerableProperty(it, STATE, metadata);
|
|
958
|
+
return metadata;
|
|
959
|
+
};
|
|
960
|
+
get = function get(it) {
|
|
961
|
+
return hasOwn(it, STATE) ? it[STATE] : {};
|
|
962
|
+
};
|
|
963
|
+
has = function has(it) {
|
|
964
|
+
return hasOwn(it, STATE);
|
|
965
|
+
};
|
|
966
|
+
}
|
|
967
|
+
internalState = {
|
|
968
|
+
set: set,
|
|
969
|
+
get: get,
|
|
970
|
+
has: has,
|
|
971
|
+
enforce: enforce,
|
|
972
|
+
getterFor: getterFor
|
|
973
|
+
};
|
|
974
|
+
return internalState;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
var hasRequiredMakeBuiltIn;
|
|
978
|
+
function requireMakeBuiltIn() {
|
|
979
|
+
if (hasRequiredMakeBuiltIn) return makeBuiltIn.exports;
|
|
980
|
+
hasRequiredMakeBuiltIn = 1;
|
|
981
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
982
|
+
var fails = requireFails();
|
|
983
|
+
var isCallable = requireIsCallable();
|
|
984
|
+
var hasOwn = requireHasOwnProperty();
|
|
985
|
+
var DESCRIPTORS = requireDescriptors();
|
|
986
|
+
var CONFIGURABLE_FUNCTION_NAME = requireFunctionName().CONFIGURABLE;
|
|
987
|
+
var inspectSource = requireInspectSource();
|
|
988
|
+
var InternalStateModule = requireInternalState();
|
|
989
|
+
var enforceInternalState = InternalStateModule.enforce;
|
|
990
|
+
var getInternalState = InternalStateModule.get;
|
|
991
|
+
var $String = String;
|
|
992
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
993
|
+
var defineProperty = Object.defineProperty;
|
|
994
|
+
var stringSlice = uncurryThis(''.slice);
|
|
995
|
+
var replace = uncurryThis(''.replace);
|
|
996
|
+
var join = uncurryThis([].join);
|
|
997
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function() {
|
|
998
|
+
return defineProperty(function() {}, 'length', {
|
|
999
|
+
value: 8
|
|
1000
|
+
}).length !== 8;
|
|
1001
|
+
});
|
|
1002
|
+
var TEMPLATE = String(String).split('String');
|
|
1003
|
+
var makeBuiltIn$1 = makeBuiltIn.exports = function makeBuiltIn(value, name, options) {
|
|
1004
|
+
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
1005
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
1006
|
+
}
|
|
1007
|
+
if (options && options.getter) name = 'get ' + name;
|
|
1008
|
+
if (options && options.setter) name = 'set ' + name;
|
|
1009
|
+
if (!hasOwn(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
|
|
1010
|
+
if (DESCRIPTORS) defineProperty(value, 'name', {
|
|
1011
|
+
value: name,
|
|
1012
|
+
configurable: true
|
|
1013
|
+
});
|
|
1014
|
+
else value.name = name;
|
|
1015
|
+
}
|
|
1016
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
|
|
1017
|
+
defineProperty(value, 'length', {
|
|
1018
|
+
value: options.arity
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
try {
|
|
1022
|
+
if (options && hasOwn(options, 'constructor') && options.constructor) {
|
|
1023
|
+
if (DESCRIPTORS) defineProperty(value, 'prototype', {
|
|
1024
|
+
writable: false
|
|
1025
|
+
});
|
|
1026
|
+
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
1027
|
+
} else if (value.prototype) value.prototype = undefined;
|
|
1028
|
+
} catch (error) {}
|
|
1029
|
+
var state = enforceInternalState(value);
|
|
1030
|
+
if (!hasOwn(state, 'source')) {
|
|
1031
|
+
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
1032
|
+
}
|
|
1033
|
+
return value;
|
|
1034
|
+
};
|
|
1035
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
1036
|
+
// eslint-disable-next-line no-extend-native -- required
|
|
1037
|
+
Function.prototype.toString = makeBuiltIn$1(function toString() {
|
|
1038
|
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
|
1039
|
+
}, 'toString');
|
|
1040
|
+
return makeBuiltIn.exports;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
var defineBuiltIn;
|
|
1044
|
+
var hasRequiredDefineBuiltIn;
|
|
1045
|
+
function requireDefineBuiltIn() {
|
|
1046
|
+
if (hasRequiredDefineBuiltIn) return defineBuiltIn;
|
|
1047
|
+
hasRequiredDefineBuiltIn = 1;
|
|
1048
|
+
var isCallable = requireIsCallable();
|
|
1049
|
+
var definePropertyModule = requireObjectDefineProperty();
|
|
1050
|
+
var makeBuiltIn = requireMakeBuiltIn();
|
|
1051
|
+
var defineGlobalProperty = requireDefineGlobalProperty();
|
|
1052
|
+
defineBuiltIn = function defineBuiltIn(O, key, value, options) {
|
|
1053
|
+
if (!options) options = {};
|
|
1054
|
+
var simple = options.enumerable;
|
|
1055
|
+
var name = options.name !== undefined ? options.name : key;
|
|
1056
|
+
if (isCallable(value)) makeBuiltIn(value, name, options);
|
|
1057
|
+
if (options.global) {
|
|
1058
|
+
if (simple) O[key] = value;
|
|
1059
|
+
else defineGlobalProperty(key, value);
|
|
1060
|
+
} else {
|
|
1061
|
+
try {
|
|
1062
|
+
if (!options.unsafe) delete O[key];
|
|
1063
|
+
else if (O[key]) simple = true;
|
|
1064
|
+
} catch (error) {}
|
|
1065
|
+
if (simple) O[key] = value;
|
|
1066
|
+
else definePropertyModule.f(O, key, {
|
|
1067
|
+
value: value,
|
|
1068
|
+
enumerable: false,
|
|
1069
|
+
configurable: !options.nonConfigurable,
|
|
1070
|
+
writable: !options.nonWritable
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
return O;
|
|
1074
|
+
};
|
|
1075
|
+
return defineBuiltIn;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
var objectGetOwnPropertyNames = {};
|
|
1079
|
+
|
|
1080
|
+
var mathTrunc;
|
|
1081
|
+
var hasRequiredMathTrunc;
|
|
1082
|
+
function requireMathTrunc() {
|
|
1083
|
+
if (hasRequiredMathTrunc) return mathTrunc;
|
|
1084
|
+
hasRequiredMathTrunc = 1;
|
|
1085
|
+
var ceil = Math.ceil;
|
|
1086
|
+
var floor = Math.floor;
|
|
1087
|
+
// `Math.trunc` method
|
|
1088
|
+
// https://tc39.es/ecma262/#sec-math.trunc
|
|
1089
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
1090
|
+
mathTrunc = Math.trunc || function trunc(x) {
|
|
1091
|
+
var n = +x;
|
|
1092
|
+
return (n > 0 ? floor : ceil)(n);
|
|
1093
|
+
};
|
|
1094
|
+
return mathTrunc;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
var toIntegerOrInfinity;
|
|
1098
|
+
var hasRequiredToIntegerOrInfinity;
|
|
1099
|
+
function requireToIntegerOrInfinity() {
|
|
1100
|
+
if (hasRequiredToIntegerOrInfinity) return toIntegerOrInfinity;
|
|
1101
|
+
hasRequiredToIntegerOrInfinity = 1;
|
|
1102
|
+
var trunc = requireMathTrunc();
|
|
1103
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
1104
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
1105
|
+
toIntegerOrInfinity = function toIntegerOrInfinity(argument) {
|
|
1106
|
+
var number = +argument;
|
|
1107
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
1108
|
+
return number !== number || number === 0 ? 0 : trunc(number);
|
|
1109
|
+
};
|
|
1110
|
+
return toIntegerOrInfinity;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
var toAbsoluteIndex;
|
|
1114
|
+
var hasRequiredToAbsoluteIndex;
|
|
1115
|
+
function requireToAbsoluteIndex() {
|
|
1116
|
+
if (hasRequiredToAbsoluteIndex) return toAbsoluteIndex;
|
|
1117
|
+
hasRequiredToAbsoluteIndex = 1;
|
|
1118
|
+
var toIntegerOrInfinity = requireToIntegerOrInfinity();
|
|
1119
|
+
var max = Math.max;
|
|
1120
|
+
var min = Math.min;
|
|
1121
|
+
// Helper for a popular repeating case of the spec:
|
|
1122
|
+
// Let integer be ? ToInteger(index).
|
|
1123
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
1124
|
+
toAbsoluteIndex = function toAbsoluteIndex(index, length) {
|
|
1125
|
+
var integer = toIntegerOrInfinity(index);
|
|
1126
|
+
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
1127
|
+
};
|
|
1128
|
+
return toAbsoluteIndex;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
var toLength;
|
|
1132
|
+
var hasRequiredToLength;
|
|
1133
|
+
function requireToLength() {
|
|
1134
|
+
if (hasRequiredToLength) return toLength;
|
|
1135
|
+
hasRequiredToLength = 1;
|
|
1136
|
+
var toIntegerOrInfinity = requireToIntegerOrInfinity();
|
|
1137
|
+
var min = Math.min;
|
|
1138
|
+
// `ToLength` abstract operation
|
|
1139
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
1140
|
+
toLength = function toLength(argument) {
|
|
1141
|
+
var len = toIntegerOrInfinity(argument);
|
|
1142
|
+
return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
1143
|
+
};
|
|
1144
|
+
return toLength;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
var lengthOfArrayLike;
|
|
1148
|
+
var hasRequiredLengthOfArrayLike;
|
|
1149
|
+
function requireLengthOfArrayLike() {
|
|
1150
|
+
if (hasRequiredLengthOfArrayLike) return lengthOfArrayLike;
|
|
1151
|
+
hasRequiredLengthOfArrayLike = 1;
|
|
1152
|
+
var toLength = requireToLength();
|
|
1153
|
+
// `LengthOfArrayLike` abstract operation
|
|
1154
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
1155
|
+
lengthOfArrayLike = function lengthOfArrayLike(obj) {
|
|
1156
|
+
return toLength(obj.length);
|
|
1157
|
+
};
|
|
1158
|
+
return lengthOfArrayLike;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
var arrayIncludes;
|
|
1162
|
+
var hasRequiredArrayIncludes;
|
|
1163
|
+
function requireArrayIncludes() {
|
|
1164
|
+
if (hasRequiredArrayIncludes) return arrayIncludes;
|
|
1165
|
+
hasRequiredArrayIncludes = 1;
|
|
1166
|
+
var toIndexedObject = requireToIndexedObject();
|
|
1167
|
+
var toAbsoluteIndex = requireToAbsoluteIndex();
|
|
1168
|
+
var lengthOfArrayLike = requireLengthOfArrayLike();
|
|
1169
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
1170
|
+
var createMethod = function createMethod(IS_INCLUDES) {
|
|
1171
|
+
return function($this, el, fromIndex) {
|
|
1172
|
+
var O = toIndexedObject($this);
|
|
1173
|
+
var length = lengthOfArrayLike(O);
|
|
1174
|
+
if (length === 0) return !IS_INCLUDES && -1;
|
|
1175
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
1176
|
+
var value;
|
|
1177
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
1178
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
1179
|
+
if (IS_INCLUDES && el !== el) while(length > index){
|
|
1180
|
+
value = O[index++];
|
|
1181
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
1182
|
+
if (value !== value) return true;
|
|
1183
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
1184
|
+
}
|
|
1185
|
+
else for(; length > index; index++){
|
|
1186
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
1187
|
+
}
|
|
1188
|
+
return !IS_INCLUDES && -1;
|
|
1189
|
+
};
|
|
1190
|
+
};
|
|
1191
|
+
arrayIncludes = {
|
|
1192
|
+
// `Array.prototype.includes` method
|
|
1193
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
1194
|
+
includes: createMethod(true),
|
|
1195
|
+
// `Array.prototype.indexOf` method
|
|
1196
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
1197
|
+
indexOf: createMethod(false)
|
|
1198
|
+
};
|
|
1199
|
+
return arrayIncludes;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
var objectKeysInternal;
|
|
1203
|
+
var hasRequiredObjectKeysInternal;
|
|
1204
|
+
function requireObjectKeysInternal() {
|
|
1205
|
+
if (hasRequiredObjectKeysInternal) return objectKeysInternal;
|
|
1206
|
+
hasRequiredObjectKeysInternal = 1;
|
|
1207
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
1208
|
+
var hasOwn = requireHasOwnProperty();
|
|
1209
|
+
var toIndexedObject = requireToIndexedObject();
|
|
1210
|
+
var indexOf = requireArrayIncludes().indexOf;
|
|
1211
|
+
var hiddenKeys = requireHiddenKeys();
|
|
1212
|
+
var push = uncurryThis([].push);
|
|
1213
|
+
objectKeysInternal = function objectKeysInternal(object, names) {
|
|
1214
|
+
var O = toIndexedObject(object);
|
|
1215
|
+
var i = 0;
|
|
1216
|
+
var result = [];
|
|
1217
|
+
var key;
|
|
1218
|
+
for(key in O)!hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
|
|
1219
|
+
// Don't enum bug & hidden keys
|
|
1220
|
+
while(names.length > i)if (hasOwn(O, key = names[i++])) {
|
|
1221
|
+
~indexOf(result, key) || push(result, key);
|
|
1222
|
+
}
|
|
1223
|
+
return result;
|
|
1224
|
+
};
|
|
1225
|
+
return objectKeysInternal;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
var enumBugKeys;
|
|
1229
|
+
var hasRequiredEnumBugKeys;
|
|
1230
|
+
function requireEnumBugKeys() {
|
|
1231
|
+
if (hasRequiredEnumBugKeys) return enumBugKeys;
|
|
1232
|
+
hasRequiredEnumBugKeys = 1;
|
|
1233
|
+
// IE8- don't enum bug keys
|
|
1234
|
+
enumBugKeys = [
|
|
1235
|
+
'constructor',
|
|
1236
|
+
'hasOwnProperty',
|
|
1237
|
+
'isPrototypeOf',
|
|
1238
|
+
'propertyIsEnumerable',
|
|
1239
|
+
'toLocaleString',
|
|
1240
|
+
'toString',
|
|
1241
|
+
'valueOf'
|
|
1242
|
+
];
|
|
1243
|
+
return enumBugKeys;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
var hasRequiredObjectGetOwnPropertyNames;
|
|
1247
|
+
function requireObjectGetOwnPropertyNames() {
|
|
1248
|
+
if (hasRequiredObjectGetOwnPropertyNames) return objectGetOwnPropertyNames;
|
|
1249
|
+
hasRequiredObjectGetOwnPropertyNames = 1;
|
|
1250
|
+
var internalObjectKeys = requireObjectKeysInternal();
|
|
1251
|
+
var enumBugKeys = requireEnumBugKeys();
|
|
1252
|
+
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
|
|
1253
|
+
// `Object.getOwnPropertyNames` method
|
|
1254
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
1255
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
1256
|
+
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
1257
|
+
return internalObjectKeys(O, hiddenKeys);
|
|
1258
|
+
};
|
|
1259
|
+
return objectGetOwnPropertyNames;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
var objectGetOwnPropertySymbols = {};
|
|
1263
|
+
|
|
1264
|
+
var hasRequiredObjectGetOwnPropertySymbols;
|
|
1265
|
+
function requireObjectGetOwnPropertySymbols() {
|
|
1266
|
+
if (hasRequiredObjectGetOwnPropertySymbols) return objectGetOwnPropertySymbols;
|
|
1267
|
+
hasRequiredObjectGetOwnPropertySymbols = 1;
|
|
1268
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
1269
|
+
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
1270
|
+
return objectGetOwnPropertySymbols;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
var ownKeys;
|
|
1274
|
+
var hasRequiredOwnKeys;
|
|
1275
|
+
function requireOwnKeys() {
|
|
1276
|
+
if (hasRequiredOwnKeys) return ownKeys;
|
|
1277
|
+
hasRequiredOwnKeys = 1;
|
|
1278
|
+
var getBuiltIn = requireGetBuiltIn();
|
|
1279
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
1280
|
+
var getOwnPropertyNamesModule = requireObjectGetOwnPropertyNames();
|
|
1281
|
+
var getOwnPropertySymbolsModule = requireObjectGetOwnPropertySymbols();
|
|
1282
|
+
var anObject = requireAnObject();
|
|
1283
|
+
var concat = uncurryThis([].concat);
|
|
1284
|
+
// all object keys, includes non-enumerable and symbols
|
|
1285
|
+
ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
1286
|
+
var keys = getOwnPropertyNamesModule.f(anObject(it));
|
|
1287
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1288
|
+
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
1289
|
+
};
|
|
1290
|
+
return ownKeys;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
var copyConstructorProperties;
|
|
1294
|
+
var hasRequiredCopyConstructorProperties;
|
|
1295
|
+
function requireCopyConstructorProperties() {
|
|
1296
|
+
if (hasRequiredCopyConstructorProperties) return copyConstructorProperties;
|
|
1297
|
+
hasRequiredCopyConstructorProperties = 1;
|
|
1298
|
+
var hasOwn = requireHasOwnProperty();
|
|
1299
|
+
var ownKeys = requireOwnKeys();
|
|
1300
|
+
var getOwnPropertyDescriptorModule = requireObjectGetOwnPropertyDescriptor();
|
|
1301
|
+
var definePropertyModule = requireObjectDefineProperty();
|
|
1302
|
+
copyConstructorProperties = function copyConstructorProperties(target, source, exceptions) {
|
|
1303
|
+
var keys = ownKeys(source);
|
|
1304
|
+
var defineProperty = definePropertyModule.f;
|
|
1305
|
+
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
1306
|
+
for(var i = 0; i < keys.length; i++){
|
|
1307
|
+
var key = keys[i];
|
|
1308
|
+
if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
|
|
1309
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
};
|
|
1313
|
+
return copyConstructorProperties;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
var isForced_1;
|
|
1317
|
+
var hasRequiredIsForced;
|
|
1318
|
+
function requireIsForced() {
|
|
1319
|
+
if (hasRequiredIsForced) return isForced_1;
|
|
1320
|
+
hasRequiredIsForced = 1;
|
|
1321
|
+
var fails = requireFails();
|
|
1322
|
+
var isCallable = requireIsCallable();
|
|
1323
|
+
var replacement = /#|\.prototype\./;
|
|
1324
|
+
var isForced = function isForced(feature, detection) {
|
|
1325
|
+
var value = data[normalize(feature)];
|
|
1326
|
+
return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
|
|
1327
|
+
};
|
|
1328
|
+
var normalize = isForced.normalize = function normalize(string) {
|
|
1329
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
1330
|
+
};
|
|
1331
|
+
var data = isForced.data = {};
|
|
1332
|
+
var NATIVE = isForced.NATIVE = 'N';
|
|
1333
|
+
var POLYFILL = isForced.POLYFILL = 'P';
|
|
1334
|
+
isForced_1 = isForced;
|
|
1335
|
+
return isForced_1;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
function _type_of$1(obj) {
|
|
1339
|
+
"@swc/helpers - typeof";
|
|
1340
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
1341
|
+
}
|
|
1342
|
+
var _export;
|
|
1343
|
+
var hasRequired_export;
|
|
1344
|
+
function require_export() {
|
|
1345
|
+
if (hasRequired_export) return _export;
|
|
1346
|
+
hasRequired_export = 1;
|
|
1347
|
+
var globalThis = requireGlobalThis();
|
|
1348
|
+
var getOwnPropertyDescriptor = requireObjectGetOwnPropertyDescriptor().f;
|
|
1349
|
+
var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
|
|
1350
|
+
var defineBuiltIn = requireDefineBuiltIn();
|
|
1351
|
+
var defineGlobalProperty = requireDefineGlobalProperty();
|
|
1352
|
+
var copyConstructorProperties = requireCopyConstructorProperties();
|
|
1353
|
+
var isForced = requireIsForced();
|
|
1354
|
+
/*
|
|
1355
|
+
options.target - name of the target object
|
|
1356
|
+
options.global - target is the global object
|
|
1357
|
+
options.stat - export as static methods of target
|
|
1358
|
+
options.proto - export as prototype methods of target
|
|
1359
|
+
options.real - real prototype method for the `pure` version
|
|
1360
|
+
options.forced - export even if the native feature is available
|
|
1361
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
1362
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
1363
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
1364
|
+
options.sham - add a flag to not completely full polyfills
|
|
1365
|
+
options.enumerable - export as enumerable property
|
|
1366
|
+
options.dontCallGetSet - prevent calling a getter on target
|
|
1367
|
+
options.name - the .name of the function if it does not match the key
|
|
1368
|
+
*/ _export = function _export(options, source) {
|
|
1369
|
+
var TARGET = options.target;
|
|
1370
|
+
var GLOBAL = options.global;
|
|
1371
|
+
var STATIC = options.stat;
|
|
1372
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1373
|
+
if (GLOBAL) {
|
|
1374
|
+
target = globalThis;
|
|
1375
|
+
} else if (STATIC) {
|
|
1376
|
+
target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1377
|
+
} else {
|
|
1378
|
+
target = globalThis[TARGET] && globalThis[TARGET].prototype;
|
|
1379
|
+
}
|
|
1380
|
+
if (target) for(key in source){
|
|
1381
|
+
sourceProperty = source[key];
|
|
1382
|
+
if (options.dontCallGetSet) {
|
|
1383
|
+
descriptor = getOwnPropertyDescriptor(target, key);
|
|
1384
|
+
targetProperty = descriptor && descriptor.value;
|
|
1385
|
+
} else targetProperty = target[key];
|
|
1386
|
+
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
1387
|
+
// contained in target
|
|
1388
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
1389
|
+
if ((typeof sourceProperty === "undefined" ? "undefined" : _type_of$1(sourceProperty)) == (typeof targetProperty === "undefined" ? "undefined" : _type_of$1(targetProperty))) continue;
|
|
1390
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1391
|
+
}
|
|
1392
|
+
// add a flag to not completely full polyfills
|
|
1393
|
+
if (options.sham || targetProperty && targetProperty.sham) {
|
|
1394
|
+
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
1395
|
+
}
|
|
1396
|
+
defineBuiltIn(target, key, sourceProperty, options);
|
|
1397
|
+
}
|
|
1398
|
+
};
|
|
1399
|
+
return _export;
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
var objectKeys;
|
|
1403
|
+
var hasRequiredObjectKeys;
|
|
1404
|
+
function requireObjectKeys() {
|
|
1405
|
+
if (hasRequiredObjectKeys) return objectKeys;
|
|
1406
|
+
hasRequiredObjectKeys = 1;
|
|
1407
|
+
var internalObjectKeys = requireObjectKeysInternal();
|
|
1408
|
+
var enumBugKeys = requireEnumBugKeys();
|
|
1409
|
+
// `Object.keys` method
|
|
1410
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
1411
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
1412
|
+
objectKeys = Object.keys || function keys(O) {
|
|
1413
|
+
return internalObjectKeys(O, enumBugKeys);
|
|
1414
|
+
};
|
|
1415
|
+
return objectKeys;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
var objectAssign;
|
|
1419
|
+
var hasRequiredObjectAssign;
|
|
1420
|
+
function requireObjectAssign() {
|
|
1421
|
+
if (hasRequiredObjectAssign) return objectAssign;
|
|
1422
|
+
hasRequiredObjectAssign = 1;
|
|
1423
|
+
var DESCRIPTORS = requireDescriptors();
|
|
1424
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
1425
|
+
var call = requireFunctionCall();
|
|
1426
|
+
var fails = requireFails();
|
|
1427
|
+
var objectKeys = requireObjectKeys();
|
|
1428
|
+
var getOwnPropertySymbolsModule = requireObjectGetOwnPropertySymbols();
|
|
1429
|
+
var propertyIsEnumerableModule = requireObjectPropertyIsEnumerable();
|
|
1430
|
+
var toObject = requireToObject();
|
|
1431
|
+
var IndexedObject = requireIndexedObject();
|
|
1432
|
+
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1433
|
+
var $assign = Object.assign;
|
|
1434
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1435
|
+
var defineProperty = Object.defineProperty;
|
|
1436
|
+
var concat = uncurryThis([].concat);
|
|
1437
|
+
// `Object.assign` method
|
|
1438
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1439
|
+
objectAssign = !$assign || fails(function() {
|
|
1440
|
+
// should have correct order of operations (Edge bug)
|
|
1441
|
+
if (DESCRIPTORS && $assign({
|
|
1442
|
+
b: 1
|
|
1443
|
+
}, $assign(defineProperty({}, 'a', {
|
|
1444
|
+
enumerable: true,
|
|
1445
|
+
get: function get() {
|
|
1446
|
+
defineProperty(this, 'b', {
|
|
1447
|
+
value: 3,
|
|
1448
|
+
enumerable: false
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1451
|
+
}), {
|
|
1452
|
+
b: 2
|
|
1453
|
+
})).b !== 1) return true;
|
|
1454
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1455
|
+
var A = {};
|
|
1456
|
+
var B = {};
|
|
1457
|
+
// eslint-disable-next-line es/no-symbol -- safe
|
|
1458
|
+
var symbol = Symbol('assign detection');
|
|
1459
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
1460
|
+
A[symbol] = 7;
|
|
1461
|
+
alphabet.split('').forEach(function(chr) {
|
|
1462
|
+
B[chr] = chr;
|
|
1463
|
+
});
|
|
1464
|
+
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1465
|
+
}) ? function assign(target, source) {
|
|
1466
|
+
var T = toObject(target);
|
|
1467
|
+
var argumentsLength = arguments.length;
|
|
1468
|
+
var index = 1;
|
|
1469
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1470
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1471
|
+
while(argumentsLength > index){
|
|
1472
|
+
var S = IndexedObject(arguments[index++]);
|
|
1473
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
1474
|
+
var length = keys.length;
|
|
1475
|
+
var j = 0;
|
|
1476
|
+
var key;
|
|
1477
|
+
while(length > j){
|
|
1478
|
+
key = keys[j++];
|
|
1479
|
+
if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
return T;
|
|
1483
|
+
} : $assign;
|
|
1484
|
+
return objectAssign;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
var hasRequiredEs_object_assign;
|
|
1488
|
+
function requireEs_object_assign() {
|
|
1489
|
+
if (hasRequiredEs_object_assign) return es_object_assign;
|
|
1490
|
+
hasRequiredEs_object_assign = 1;
|
|
1491
|
+
var $ = require_export();
|
|
1492
|
+
var assign = requireObjectAssign();
|
|
1493
|
+
// `Object.assign` method
|
|
1494
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1495
|
+
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1496
|
+
$({
|
|
1497
|
+
target: 'Object',
|
|
1498
|
+
stat: true,
|
|
1499
|
+
arity: 2,
|
|
1500
|
+
forced: Object.assign !== assign
|
|
1501
|
+
}, {
|
|
1502
|
+
assign: assign
|
|
1503
|
+
});
|
|
1504
|
+
return es_object_assign;
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
var path;
|
|
1508
|
+
var hasRequiredPath;
|
|
1509
|
+
function requirePath() {
|
|
1510
|
+
if (hasRequiredPath) return path;
|
|
1511
|
+
hasRequiredPath = 1;
|
|
1512
|
+
var globalThis = requireGlobalThis();
|
|
1513
|
+
path = globalThis;
|
|
1514
|
+
return path;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
var assign$2;
|
|
1518
|
+
var hasRequiredAssign$2;
|
|
1519
|
+
function requireAssign$2() {
|
|
1520
|
+
if (hasRequiredAssign$2) return assign$2;
|
|
1521
|
+
hasRequiredAssign$2 = 1;
|
|
1522
|
+
requireEs_object_assign();
|
|
1523
|
+
var path = requirePath();
|
|
1524
|
+
assign$2 = path.Object.assign;
|
|
1525
|
+
return assign$2;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
var assign$1;
|
|
1529
|
+
var hasRequiredAssign$1;
|
|
1530
|
+
function requireAssign$1() {
|
|
1531
|
+
if (hasRequiredAssign$1) return assign$1;
|
|
1532
|
+
hasRequiredAssign$1 = 1;
|
|
1533
|
+
var parent = requireAssign$2();
|
|
1534
|
+
assign$1 = parent;
|
|
1535
|
+
return assign$1;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
var assign;
|
|
1539
|
+
var hasRequiredAssign;
|
|
1540
|
+
function requireAssign() {
|
|
1541
|
+
if (hasRequiredAssign) return assign;
|
|
1542
|
+
hasRequiredAssign = 1;
|
|
1543
|
+
var parent = requireAssign$1();
|
|
1544
|
+
assign = parent;
|
|
1545
|
+
return assign;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
var es_object_keys = {};
|
|
1549
|
+
|
|
1550
|
+
var hasRequiredEs_object_keys;
|
|
1551
|
+
function requireEs_object_keys() {
|
|
1552
|
+
if (hasRequiredEs_object_keys) return es_object_keys;
|
|
1553
|
+
hasRequiredEs_object_keys = 1;
|
|
1554
|
+
var $ = require_export();
|
|
1555
|
+
var toObject = requireToObject();
|
|
1556
|
+
var nativeKeys = requireObjectKeys();
|
|
1557
|
+
var fails = requireFails();
|
|
1558
|
+
var FAILS_ON_PRIMITIVES = fails(function() {
|
|
1559
|
+
nativeKeys(1);
|
|
1560
|
+
});
|
|
1561
|
+
// `Object.keys` method
|
|
1562
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
1563
|
+
$({
|
|
1564
|
+
target: 'Object',
|
|
1565
|
+
stat: true,
|
|
1566
|
+
forced: FAILS_ON_PRIMITIVES
|
|
1567
|
+
}, {
|
|
1568
|
+
keys: function keys(it) {
|
|
1569
|
+
return nativeKeys(toObject(it));
|
|
1570
|
+
}
|
|
1571
|
+
});
|
|
1572
|
+
return es_object_keys;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
var keys$2;
|
|
1576
|
+
var hasRequiredKeys$2;
|
|
1577
|
+
function requireKeys$2() {
|
|
1578
|
+
if (hasRequiredKeys$2) return keys$2;
|
|
1579
|
+
hasRequiredKeys$2 = 1;
|
|
1580
|
+
requireEs_object_keys();
|
|
1581
|
+
var path = requirePath();
|
|
1582
|
+
keys$2 = path.Object.keys;
|
|
1583
|
+
return keys$2;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
var keys$1;
|
|
1587
|
+
var hasRequiredKeys$1;
|
|
1588
|
+
function requireKeys$1() {
|
|
1589
|
+
if (hasRequiredKeys$1) return keys$1;
|
|
1590
|
+
hasRequiredKeys$1 = 1;
|
|
1591
|
+
var parent = requireKeys$2();
|
|
1592
|
+
keys$1 = parent;
|
|
1593
|
+
return keys$1;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
var keys;
|
|
1597
|
+
var hasRequiredKeys;
|
|
1598
|
+
function requireKeys() {
|
|
1599
|
+
if (hasRequiredKeys) return keys;
|
|
1600
|
+
hasRequiredKeys = 1;
|
|
1601
|
+
var parent = requireKeys$1();
|
|
1602
|
+
keys = parent;
|
|
1603
|
+
return keys;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
var es_array_find = {};
|
|
1607
|
+
|
|
1608
|
+
var functionUncurryThisClause;
|
|
1609
|
+
var hasRequiredFunctionUncurryThisClause;
|
|
1610
|
+
function requireFunctionUncurryThisClause() {
|
|
1611
|
+
if (hasRequiredFunctionUncurryThisClause) return functionUncurryThisClause;
|
|
1612
|
+
hasRequiredFunctionUncurryThisClause = 1;
|
|
1613
|
+
var classofRaw = requireClassofRaw();
|
|
1614
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
1615
|
+
functionUncurryThisClause = function functionUncurryThisClause(fn) {
|
|
1616
|
+
// Nashorn bug:
|
|
1617
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
1618
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
1619
|
+
if (classofRaw(fn) === 'Function') return uncurryThis(fn);
|
|
1620
|
+
};
|
|
1621
|
+
return functionUncurryThisClause;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
var functionBindContext;
|
|
1625
|
+
var hasRequiredFunctionBindContext;
|
|
1626
|
+
function requireFunctionBindContext() {
|
|
1627
|
+
if (hasRequiredFunctionBindContext) return functionBindContext;
|
|
1628
|
+
hasRequiredFunctionBindContext = 1;
|
|
1629
|
+
var uncurryThis = requireFunctionUncurryThisClause();
|
|
1630
|
+
var aCallable = requireACallable();
|
|
1631
|
+
var NATIVE_BIND = requireFunctionBindNative();
|
|
1632
|
+
var bind = uncurryThis(uncurryThis.bind);
|
|
1633
|
+
// optional / simple context binding
|
|
1634
|
+
functionBindContext = function functionBindContext(fn, that) {
|
|
1635
|
+
aCallable(fn);
|
|
1636
|
+
return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function() {
|
|
1637
|
+
return fn.apply(that, arguments);
|
|
1638
|
+
};
|
|
1639
|
+
};
|
|
1640
|
+
return functionBindContext;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
var isArray;
|
|
1644
|
+
var hasRequiredIsArray;
|
|
1645
|
+
function requireIsArray() {
|
|
1646
|
+
if (hasRequiredIsArray) return isArray;
|
|
1647
|
+
hasRequiredIsArray = 1;
|
|
1648
|
+
var classof = requireClassofRaw();
|
|
1649
|
+
// `IsArray` abstract operation
|
|
1650
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
1651
|
+
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
1652
|
+
isArray = Array.isArray || function isArray(argument) {
|
|
1653
|
+
return classof(argument) === 'Array';
|
|
1654
|
+
};
|
|
1655
|
+
return isArray;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
var toStringTagSupport;
|
|
1659
|
+
var hasRequiredToStringTagSupport;
|
|
1660
|
+
function requireToStringTagSupport() {
|
|
1661
|
+
if (hasRequiredToStringTagSupport) return toStringTagSupport;
|
|
1662
|
+
hasRequiredToStringTagSupport = 1;
|
|
1663
|
+
var wellKnownSymbol = requireWellKnownSymbol();
|
|
1664
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
1665
|
+
var test = {};
|
|
1666
|
+
test[TO_STRING_TAG] = 'z';
|
|
1667
|
+
toStringTagSupport = String(test) === '[object z]';
|
|
1668
|
+
return toStringTagSupport;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
var classof;
|
|
1672
|
+
var hasRequiredClassof;
|
|
1673
|
+
function requireClassof() {
|
|
1674
|
+
if (hasRequiredClassof) return classof;
|
|
1675
|
+
hasRequiredClassof = 1;
|
|
1676
|
+
var TO_STRING_TAG_SUPPORT = requireToStringTagSupport();
|
|
1677
|
+
var isCallable = requireIsCallable();
|
|
1678
|
+
var classofRaw = requireClassofRaw();
|
|
1679
|
+
var wellKnownSymbol = requireWellKnownSymbol();
|
|
1680
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
1681
|
+
var $Object = Object;
|
|
1682
|
+
// ES3 wrong here
|
|
1683
|
+
var CORRECT_ARGUMENTS = classofRaw(function() {
|
|
1684
|
+
return arguments;
|
|
1685
|
+
}()) === 'Arguments';
|
|
1686
|
+
// fallback for IE11 Script Access Denied error
|
|
1687
|
+
var tryGet = function tryGet(it, key) {
|
|
1688
|
+
try {
|
|
1689
|
+
return it[key];
|
|
1690
|
+
} catch (error) {}
|
|
1691
|
+
};
|
|
1692
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
1693
|
+
classof = TO_STRING_TAG_SUPPORT ? classofRaw : function classof(it) {
|
|
1694
|
+
var O, tag, result;
|
|
1695
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null' : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
1696
|
+
};
|
|
1697
|
+
return classof;
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
var isConstructor;
|
|
1701
|
+
var hasRequiredIsConstructor;
|
|
1702
|
+
function requireIsConstructor() {
|
|
1703
|
+
if (hasRequiredIsConstructor) return isConstructor;
|
|
1704
|
+
hasRequiredIsConstructor = 1;
|
|
1705
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
1706
|
+
var fails = requireFails();
|
|
1707
|
+
var isCallable = requireIsCallable();
|
|
1708
|
+
var classof = requireClassof();
|
|
1709
|
+
var getBuiltIn = requireGetBuiltIn();
|
|
1710
|
+
var inspectSource = requireInspectSource();
|
|
1711
|
+
var noop = function noop() {};
|
|
1712
|
+
var construct = getBuiltIn('Reflect', 'construct');
|
|
1713
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1714
|
+
var exec = uncurryThis(constructorRegExp.exec);
|
|
1715
|
+
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
1716
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
1717
|
+
if (!isCallable(argument)) return false;
|
|
1718
|
+
try {
|
|
1719
|
+
construct(noop, [], argument);
|
|
1720
|
+
return true;
|
|
1721
|
+
} catch (error) {
|
|
1722
|
+
return false;
|
|
1723
|
+
}
|
|
1724
|
+
};
|
|
1725
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
1726
|
+
if (!isCallable(argument)) return false;
|
|
1727
|
+
switch(classof(argument)){
|
|
1728
|
+
case 'AsyncFunction':
|
|
1729
|
+
case 'GeneratorFunction':
|
|
1730
|
+
case 'AsyncGeneratorFunction':
|
|
1731
|
+
return false;
|
|
1732
|
+
}
|
|
1733
|
+
try {
|
|
1734
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1735
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1736
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
1737
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
|
1738
|
+
} catch (error) {
|
|
1739
|
+
return true;
|
|
1740
|
+
}
|
|
1741
|
+
};
|
|
1742
|
+
isConstructorLegacy.sham = true;
|
|
1743
|
+
// `IsConstructor` abstract operation
|
|
1744
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1745
|
+
isConstructor = !construct || fails(function() {
|
|
1746
|
+
var called;
|
|
1747
|
+
return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function() {
|
|
1748
|
+
called = true;
|
|
1749
|
+
}) || called;
|
|
1750
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
1751
|
+
return isConstructor;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
var arraySpeciesConstructor;
|
|
1755
|
+
var hasRequiredArraySpeciesConstructor;
|
|
1756
|
+
function requireArraySpeciesConstructor() {
|
|
1757
|
+
if (hasRequiredArraySpeciesConstructor) return arraySpeciesConstructor;
|
|
1758
|
+
hasRequiredArraySpeciesConstructor = 1;
|
|
1759
|
+
var isArray = requireIsArray();
|
|
1760
|
+
var isConstructor = requireIsConstructor();
|
|
1761
|
+
var isObject = requireIsObject();
|
|
1762
|
+
var wellKnownSymbol = requireWellKnownSymbol();
|
|
1763
|
+
var SPECIES = wellKnownSymbol('species');
|
|
1764
|
+
var $Array = Array;
|
|
1765
|
+
// a part of `ArraySpeciesCreate` abstract operation
|
|
1766
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
1767
|
+
arraySpeciesConstructor = function arraySpeciesConstructor(originalArray) {
|
|
1768
|
+
var C;
|
|
1769
|
+
if (isArray(originalArray)) {
|
|
1770
|
+
C = originalArray.constructor;
|
|
1771
|
+
// cross-realm fallback
|
|
1772
|
+
if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
|
|
1773
|
+
else if (isObject(C)) {
|
|
1774
|
+
C = C[SPECIES];
|
|
1775
|
+
if (C === null) C = undefined;
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
return C === undefined ? $Array : C;
|
|
1779
|
+
};
|
|
1780
|
+
return arraySpeciesConstructor;
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
var arraySpeciesCreate;
|
|
1784
|
+
var hasRequiredArraySpeciesCreate;
|
|
1785
|
+
function requireArraySpeciesCreate() {
|
|
1786
|
+
if (hasRequiredArraySpeciesCreate) return arraySpeciesCreate;
|
|
1787
|
+
hasRequiredArraySpeciesCreate = 1;
|
|
1788
|
+
var arraySpeciesConstructor = requireArraySpeciesConstructor();
|
|
1789
|
+
// `ArraySpeciesCreate` abstract operation
|
|
1790
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
1791
|
+
arraySpeciesCreate = function arraySpeciesCreate(originalArray, length) {
|
|
1792
|
+
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
|
1793
|
+
};
|
|
1794
|
+
return arraySpeciesCreate;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
var arrayIteration;
|
|
1798
|
+
var hasRequiredArrayIteration;
|
|
1799
|
+
function requireArrayIteration() {
|
|
1800
|
+
if (hasRequiredArrayIteration) return arrayIteration;
|
|
1801
|
+
hasRequiredArrayIteration = 1;
|
|
1802
|
+
var bind = requireFunctionBindContext();
|
|
1803
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
1804
|
+
var IndexedObject = requireIndexedObject();
|
|
1805
|
+
var toObject = requireToObject();
|
|
1806
|
+
var lengthOfArrayLike = requireLengthOfArrayLike();
|
|
1807
|
+
var arraySpeciesCreate = requireArraySpeciesCreate();
|
|
1808
|
+
var push = uncurryThis([].push);
|
|
1809
|
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
|
1810
|
+
var createMethod = function createMethod(TYPE) {
|
|
1811
|
+
var IS_MAP = TYPE === 1;
|
|
1812
|
+
var IS_FILTER = TYPE === 2;
|
|
1813
|
+
var IS_SOME = TYPE === 3;
|
|
1814
|
+
var IS_EVERY = TYPE === 4;
|
|
1815
|
+
var IS_FIND_INDEX = TYPE === 6;
|
|
1816
|
+
var IS_FILTER_REJECT = TYPE === 7;
|
|
1817
|
+
var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
|
|
1818
|
+
return function($this, callbackfn, that, specificCreate) {
|
|
1819
|
+
var O = toObject($this);
|
|
1820
|
+
var self = IndexedObject(O);
|
|
1821
|
+
var length = lengthOfArrayLike(self);
|
|
1822
|
+
var boundFunction = bind(callbackfn, that);
|
|
1823
|
+
var index = 0;
|
|
1824
|
+
var create = specificCreate || arraySpeciesCreate;
|
|
1825
|
+
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
|
|
1826
|
+
var value, result;
|
|
1827
|
+
for(; length > index; index++)if (NO_HOLES || index in self) {
|
|
1828
|
+
value = self[index];
|
|
1829
|
+
result = boundFunction(value, index, O);
|
|
1830
|
+
if (TYPE) {
|
|
1831
|
+
if (IS_MAP) target[index] = result; // map
|
|
1832
|
+
else if (result) switch(TYPE){
|
|
1833
|
+
case 3:
|
|
1834
|
+
return true; // some
|
|
1835
|
+
case 5:
|
|
1836
|
+
return value; // find
|
|
1837
|
+
case 6:
|
|
1838
|
+
return index; // findIndex
|
|
1839
|
+
case 2:
|
|
1840
|
+
push(target, value); // filter
|
|
1841
|
+
}
|
|
1842
|
+
else switch(TYPE){
|
|
1843
|
+
case 4:
|
|
1844
|
+
return false; // every
|
|
1845
|
+
case 7:
|
|
1846
|
+
push(target, value); // filterReject
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
|
1851
|
+
};
|
|
1852
|
+
};
|
|
1853
|
+
arrayIteration = {
|
|
1854
|
+
// `Array.prototype.forEach` method
|
|
1855
|
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
1856
|
+
forEach: createMethod(0),
|
|
1857
|
+
// `Array.prototype.map` method
|
|
1858
|
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
1859
|
+
map: createMethod(1),
|
|
1860
|
+
// `Array.prototype.filter` method
|
|
1861
|
+
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
|
1862
|
+
filter: createMethod(2),
|
|
1863
|
+
// `Array.prototype.some` method
|
|
1864
|
+
// https://tc39.es/ecma262/#sec-array.prototype.some
|
|
1865
|
+
some: createMethod(3),
|
|
1866
|
+
// `Array.prototype.every` method
|
|
1867
|
+
// https://tc39.es/ecma262/#sec-array.prototype.every
|
|
1868
|
+
every: createMethod(4),
|
|
1869
|
+
// `Array.prototype.find` method
|
|
1870
|
+
// https://tc39.es/ecma262/#sec-array.prototype.find
|
|
1871
|
+
find: createMethod(5),
|
|
1872
|
+
// `Array.prototype.findIndex` method
|
|
1873
|
+
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
|
1874
|
+
findIndex: createMethod(6),
|
|
1875
|
+
// `Array.prototype.filterReject` method
|
|
1876
|
+
// https://github.com/tc39/proposal-array-filtering
|
|
1877
|
+
filterReject: createMethod(7)
|
|
1878
|
+
};
|
|
1879
|
+
return arrayIteration;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
var objectDefineProperties = {};
|
|
1883
|
+
|
|
1884
|
+
var hasRequiredObjectDefineProperties;
|
|
1885
|
+
function requireObjectDefineProperties() {
|
|
1886
|
+
if (hasRequiredObjectDefineProperties) return objectDefineProperties;
|
|
1887
|
+
hasRequiredObjectDefineProperties = 1;
|
|
1888
|
+
var DESCRIPTORS = requireDescriptors();
|
|
1889
|
+
var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
|
|
1890
|
+
var definePropertyModule = requireObjectDefineProperty();
|
|
1891
|
+
var anObject = requireAnObject();
|
|
1892
|
+
var toIndexedObject = requireToIndexedObject();
|
|
1893
|
+
var objectKeys = requireObjectKeys();
|
|
1894
|
+
// `Object.defineProperties` method
|
|
1895
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1896
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1897
|
+
objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1898
|
+
anObject(O);
|
|
1899
|
+
var props = toIndexedObject(Properties);
|
|
1900
|
+
var keys = objectKeys(Properties);
|
|
1901
|
+
var length = keys.length;
|
|
1902
|
+
var index = 0;
|
|
1903
|
+
var key;
|
|
1904
|
+
while(length > index)definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1905
|
+
return O;
|
|
1906
|
+
};
|
|
1907
|
+
return objectDefineProperties;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
var html;
|
|
1911
|
+
var hasRequiredHtml;
|
|
1912
|
+
function requireHtml() {
|
|
1913
|
+
if (hasRequiredHtml) return html;
|
|
1914
|
+
hasRequiredHtml = 1;
|
|
1915
|
+
var getBuiltIn = requireGetBuiltIn();
|
|
1916
|
+
html = getBuiltIn('document', 'documentElement');
|
|
1917
|
+
return html;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
var objectCreate;
|
|
1921
|
+
var hasRequiredObjectCreate;
|
|
1922
|
+
function requireObjectCreate() {
|
|
1923
|
+
if (hasRequiredObjectCreate) return objectCreate;
|
|
1924
|
+
hasRequiredObjectCreate = 1;
|
|
1925
|
+
/* global ActiveXObject -- old IE, WSH */ var anObject = requireAnObject();
|
|
1926
|
+
var definePropertiesModule = requireObjectDefineProperties();
|
|
1927
|
+
var enumBugKeys = requireEnumBugKeys();
|
|
1928
|
+
var hiddenKeys = requireHiddenKeys();
|
|
1929
|
+
var html = requireHtml();
|
|
1930
|
+
var documentCreateElement = requireDocumentCreateElement();
|
|
1931
|
+
var sharedKey = requireSharedKey();
|
|
1932
|
+
var GT = '>';
|
|
1933
|
+
var LT = '<';
|
|
1934
|
+
var PROTOTYPE = 'prototype';
|
|
1935
|
+
var SCRIPT = 'script';
|
|
1936
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1937
|
+
var EmptyConstructor = function EmptyConstructor() {};
|
|
1938
|
+
var scriptTag = function scriptTag(content) {
|
|
1939
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
1940
|
+
};
|
|
1941
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
1942
|
+
var NullProtoObjectViaActiveX = function NullProtoObjectViaActiveX(activeXDocument) {
|
|
1943
|
+
activeXDocument.write(scriptTag(''));
|
|
1944
|
+
activeXDocument.close();
|
|
1945
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
1946
|
+
// eslint-disable-next-line no-useless-assignment -- avoid memory leak
|
|
1947
|
+
activeXDocument = null;
|
|
1948
|
+
return temp;
|
|
1949
|
+
};
|
|
1950
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
1951
|
+
var NullProtoObjectViaIFrame = function NullProtoObjectViaIFrame() {
|
|
1952
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
1953
|
+
var iframe = documentCreateElement('iframe');
|
|
1954
|
+
var JS = 'java' + SCRIPT + ':';
|
|
1955
|
+
var iframeDocument;
|
|
1956
|
+
iframe.style.display = 'none';
|
|
1957
|
+
html.appendChild(iframe);
|
|
1958
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
1959
|
+
iframe.src = String(JS);
|
|
1960
|
+
iframeDocument = iframe.contentWindow.document;
|
|
1961
|
+
iframeDocument.open();
|
|
1962
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
1963
|
+
iframeDocument.close();
|
|
1964
|
+
return iframeDocument.F;
|
|
1965
|
+
};
|
|
1966
|
+
// Check for document.domain and active x support
|
|
1967
|
+
// No need to use active x approach when document.domain is not set
|
|
1968
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
1969
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
1970
|
+
// avoid IE GC bug
|
|
1971
|
+
var activeXDocument;
|
|
1972
|
+
var NullProtoObject = function NullProtoObject1() {
|
|
1973
|
+
try {
|
|
1974
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
1975
|
+
} catch (error) {}
|
|
1976
|
+
NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
1977
|
+
: NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
1978
|
+
var length = enumBugKeys.length;
|
|
1979
|
+
while(length--)delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
1980
|
+
return NullProtoObject();
|
|
1981
|
+
};
|
|
1982
|
+
hiddenKeys[IE_PROTO] = true;
|
|
1983
|
+
// `Object.create` method
|
|
1984
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
1985
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
1986
|
+
objectCreate = Object.create || function create(O, Properties) {
|
|
1987
|
+
var result;
|
|
1988
|
+
if (O !== null) {
|
|
1989
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
1990
|
+
result = new EmptyConstructor();
|
|
1991
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
1992
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1993
|
+
result[IE_PROTO] = O;
|
|
1994
|
+
} else result = NullProtoObject();
|
|
1995
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1996
|
+
};
|
|
1997
|
+
return objectCreate;
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
var addToUnscopables;
|
|
2001
|
+
var hasRequiredAddToUnscopables;
|
|
2002
|
+
function requireAddToUnscopables() {
|
|
2003
|
+
if (hasRequiredAddToUnscopables) return addToUnscopables;
|
|
2004
|
+
hasRequiredAddToUnscopables = 1;
|
|
2005
|
+
var wellKnownSymbol = requireWellKnownSymbol();
|
|
2006
|
+
var create = requireObjectCreate();
|
|
2007
|
+
var defineProperty = requireObjectDefineProperty().f;
|
|
2008
|
+
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
2009
|
+
var ArrayPrototype = Array.prototype;
|
|
2010
|
+
// Array.prototype[@@unscopables]
|
|
2011
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2012
|
+
if (ArrayPrototype[UNSCOPABLES] === undefined) {
|
|
2013
|
+
defineProperty(ArrayPrototype, UNSCOPABLES, {
|
|
2014
|
+
configurable: true,
|
|
2015
|
+
value: create(null)
|
|
2016
|
+
});
|
|
2017
|
+
}
|
|
2018
|
+
// add a key to Array.prototype[@@unscopables]
|
|
2019
|
+
addToUnscopables = function addToUnscopables(key) {
|
|
2020
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
2021
|
+
};
|
|
2022
|
+
return addToUnscopables;
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
var hasRequiredEs_array_find;
|
|
2026
|
+
function requireEs_array_find() {
|
|
2027
|
+
if (hasRequiredEs_array_find) return es_array_find;
|
|
2028
|
+
hasRequiredEs_array_find = 1;
|
|
2029
|
+
var $ = require_export();
|
|
2030
|
+
var $find = requireArrayIteration().find;
|
|
2031
|
+
var addToUnscopables = requireAddToUnscopables();
|
|
2032
|
+
var FIND = 'find';
|
|
2033
|
+
var SKIPS_HOLES = true;
|
|
2034
|
+
// Shouldn't skip holes
|
|
2035
|
+
// eslint-disable-next-line es/no-array-prototype-find -- testing
|
|
2036
|
+
if (FIND in []) Array(1)[FIND](function() {
|
|
2037
|
+
SKIPS_HOLES = false;
|
|
2038
|
+
});
|
|
2039
|
+
// `Array.prototype.find` method
|
|
2040
|
+
// https://tc39.es/ecma262/#sec-array.prototype.find
|
|
2041
|
+
$({
|
|
2042
|
+
target: 'Array',
|
|
2043
|
+
proto: true,
|
|
2044
|
+
forced: SKIPS_HOLES
|
|
2045
|
+
}, {
|
|
2046
|
+
find: function find(callbackfn /* , that = undefined */ ) {
|
|
2047
|
+
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
2048
|
+
}
|
|
2049
|
+
});
|
|
2050
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2051
|
+
addToUnscopables(FIND);
|
|
2052
|
+
return es_array_find;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
var entryUnbind;
|
|
2056
|
+
var hasRequiredEntryUnbind;
|
|
2057
|
+
function requireEntryUnbind() {
|
|
2058
|
+
if (hasRequiredEntryUnbind) return entryUnbind;
|
|
2059
|
+
hasRequiredEntryUnbind = 1;
|
|
2060
|
+
var globalThis = requireGlobalThis();
|
|
2061
|
+
var uncurryThis = requireFunctionUncurryThis();
|
|
2062
|
+
entryUnbind = function entryUnbind(CONSTRUCTOR, METHOD) {
|
|
2063
|
+
return uncurryThis(globalThis[CONSTRUCTOR].prototype[METHOD]);
|
|
2064
|
+
};
|
|
2065
|
+
return entryUnbind;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
var find$2;
|
|
2069
|
+
var hasRequiredFind$2;
|
|
2070
|
+
function requireFind$2() {
|
|
2071
|
+
if (hasRequiredFind$2) return find$2;
|
|
2072
|
+
hasRequiredFind$2 = 1;
|
|
2073
|
+
requireEs_array_find();
|
|
2074
|
+
var entryUnbind = requireEntryUnbind();
|
|
2075
|
+
find$2 = entryUnbind('Array', 'find');
|
|
2076
|
+
return find$2;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
var find$1;
|
|
2080
|
+
var hasRequiredFind$1;
|
|
2081
|
+
function requireFind$1() {
|
|
2082
|
+
if (hasRequiredFind$1) return find$1;
|
|
2083
|
+
hasRequiredFind$1 = 1;
|
|
2084
|
+
var parent = requireFind$2();
|
|
2085
|
+
find$1 = parent;
|
|
2086
|
+
return find$1;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
var find;
|
|
2090
|
+
var hasRequiredFind;
|
|
2091
|
+
function requireFind() {
|
|
2092
|
+
if (hasRequiredFind) return find;
|
|
2093
|
+
hasRequiredFind = 1;
|
|
2094
|
+
var parent = requireFind$1();
|
|
2095
|
+
find = parent;
|
|
2096
|
+
return find;
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
var bufferV6Polyfill = {};
|
|
2100
|
+
|
|
2101
|
+
var hasRequiredBufferV6Polyfill;
|
|
2102
|
+
function requireBufferV6Polyfill() {
|
|
2103
|
+
if (hasRequiredBufferV6Polyfill) return bufferV6Polyfill;
|
|
2104
|
+
hasRequiredBufferV6Polyfill = 1;
|
|
2105
|
+
(function() {
|
|
2106
|
+
if (Number(process.version.match(/^v(\d+\.\d+)/)[1]) >= 6.0) {
|
|
2107
|
+
return;
|
|
2108
|
+
}
|
|
2109
|
+
function newBuffer(data, encoding, len) {
|
|
2110
|
+
return new Buffer(data, encoding, len);
|
|
2111
|
+
}
|
|
2112
|
+
function newSlowBuffer(data, encoding, len) {
|
|
2113
|
+
var SlowBuffer = require$$0.SlowBuffer;
|
|
2114
|
+
return new SlowBuffer(data, encoding, len);
|
|
2115
|
+
}
|
|
2116
|
+
if (!Buffer.alloc) {
|
|
2117
|
+
Buffer.alloc = newBuffer;
|
|
2118
|
+
}
|
|
2119
|
+
if (!Buffer.allocUnsafe) {
|
|
2120
|
+
Buffer.allocUnsafe = newBuffer;
|
|
2121
|
+
}
|
|
2122
|
+
if (!Buffer.allocUnsafeSlow) {
|
|
2123
|
+
Buffer.allocUnsafeSlow = newSlowBuffer;
|
|
2124
|
+
}
|
|
2125
|
+
if (!Buffer.from) {
|
|
2126
|
+
Buffer.from = newBuffer;
|
|
2127
|
+
}
|
|
2128
|
+
try {
|
|
2129
|
+
Buffer.from('1337', 'hex');
|
|
2130
|
+
} catch (e) {
|
|
2131
|
+
// wish I could do something here to fix the broken Buffer.from
|
|
2132
|
+
try {
|
|
2133
|
+
Buffer.from = newBuffer;
|
|
2134
|
+
} catch (e) {
|
|
2135
|
+
// but alas, I cannot
|
|
2136
|
+
console.warn("Your node version has buggy Buffer.from support. Please update to node >= v4.5 or >= v6.3");
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
})();
|
|
2140
|
+
return bufferV6Polyfill;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
var crossSpawn = {
|
|
2144
|
+
exports: {}
|
|
2145
|
+
};
|
|
2146
|
+
|
|
2147
|
+
var src$1;
|
|
2148
|
+
var hasRequiredSrc$1;
|
|
2149
|
+
function requireSrc$1() {
|
|
2150
|
+
if (hasRequiredSrc$1) return src$1;
|
|
2151
|
+
hasRequiredSrc$1 = 1;
|
|
2152
|
+
/**
|
|
2153
|
+
* Tries to execute a function and discards any error that occurs.
|
|
2154
|
+
* @param {Function} fn - Function that might or might not throw an error.
|
|
2155
|
+
* @returns {?*} Return-value of the function when no error occurred.
|
|
2156
|
+
*/ src$1 = function src(fn) {
|
|
2157
|
+
try {
|
|
2158
|
+
return fn();
|
|
2159
|
+
} catch (e) {}
|
|
2160
|
+
};
|
|
2161
|
+
return src$1;
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
var windows;
|
|
2165
|
+
var hasRequiredWindows;
|
|
2166
|
+
function requireWindows() {
|
|
2167
|
+
if (hasRequiredWindows) return windows;
|
|
2168
|
+
hasRequiredWindows = 1;
|
|
2169
|
+
windows = isexe;
|
|
2170
|
+
isexe.sync = sync;
|
|
2171
|
+
var fs = require$$0$1;
|
|
2172
|
+
function checkPathExt(path, options) {
|
|
2173
|
+
var pathext = options.pathExt !== undefined ? options.pathExt : process.env.PATHEXT;
|
|
2174
|
+
if (!pathext) {
|
|
2175
|
+
return true;
|
|
2176
|
+
}
|
|
2177
|
+
pathext = pathext.split(';');
|
|
2178
|
+
if (pathext.indexOf('') !== -1) {
|
|
2179
|
+
return true;
|
|
2180
|
+
}
|
|
2181
|
+
for(var i = 0; i < pathext.length; i++){
|
|
2182
|
+
var p = pathext[i].toLowerCase();
|
|
2183
|
+
if (p && path.substr(-p.length).toLowerCase() === p) {
|
|
2184
|
+
return true;
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
return false;
|
|
2188
|
+
}
|
|
2189
|
+
function checkStat(stat, path, options) {
|
|
2190
|
+
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
2191
|
+
return false;
|
|
2192
|
+
}
|
|
2193
|
+
return checkPathExt(path, options);
|
|
2194
|
+
}
|
|
2195
|
+
function isexe(path, options, cb) {
|
|
2196
|
+
fs.stat(path, function(er, stat) {
|
|
2197
|
+
cb(er, er ? false : checkStat(stat, path, options));
|
|
2198
|
+
});
|
|
2199
|
+
}
|
|
2200
|
+
function sync(path, options) {
|
|
2201
|
+
return checkStat(fs.statSync(path), path, options);
|
|
2202
|
+
}
|
|
2203
|
+
return windows;
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
var mode;
|
|
2207
|
+
var hasRequiredMode;
|
|
2208
|
+
function requireMode() {
|
|
2209
|
+
if (hasRequiredMode) return mode;
|
|
2210
|
+
hasRequiredMode = 1;
|
|
2211
|
+
mode = isexe;
|
|
2212
|
+
isexe.sync = sync;
|
|
2213
|
+
var fs = require$$0$1;
|
|
2214
|
+
function isexe(path, options, cb) {
|
|
2215
|
+
fs.stat(path, function(er, stat) {
|
|
2216
|
+
cb(er, er ? false : checkStat(stat, options));
|
|
2217
|
+
});
|
|
2218
|
+
}
|
|
2219
|
+
function sync(path, options) {
|
|
2220
|
+
return checkStat(fs.statSync(path), options);
|
|
2221
|
+
}
|
|
2222
|
+
function checkStat(stat, options) {
|
|
2223
|
+
return stat.isFile() && checkMode(stat, options);
|
|
2224
|
+
}
|
|
2225
|
+
function checkMode(stat, options) {
|
|
2226
|
+
var mod = stat.mode;
|
|
2227
|
+
var uid = stat.uid;
|
|
2228
|
+
var gid = stat.gid;
|
|
2229
|
+
var myUid = options.uid !== undefined ? options.uid : process.getuid && process.getuid();
|
|
2230
|
+
var myGid = options.gid !== undefined ? options.gid : process.getgid && process.getgid();
|
|
2231
|
+
var u = parseInt('100', 8);
|
|
2232
|
+
var g = parseInt('010', 8);
|
|
2233
|
+
var o = parseInt('001', 8);
|
|
2234
|
+
var ug = u | g;
|
|
2235
|
+
var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
2236
|
+
return ret;
|
|
2237
|
+
}
|
|
2238
|
+
return mode;
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
var isexe_1;
|
|
2242
|
+
var hasRequiredIsexe;
|
|
2243
|
+
function requireIsexe() {
|
|
2244
|
+
if (hasRequiredIsexe) return isexe_1;
|
|
2245
|
+
hasRequiredIsexe = 1;
|
|
2246
|
+
var core;
|
|
2247
|
+
if (process.platform === 'win32' || commonjsGlobal.TESTING_WINDOWS) {
|
|
2248
|
+
core = requireWindows();
|
|
2249
|
+
} else {
|
|
2250
|
+
core = requireMode();
|
|
2251
|
+
}
|
|
2252
|
+
isexe_1 = isexe;
|
|
2253
|
+
isexe.sync = sync;
|
|
2254
|
+
function isexe(path, options, cb) {
|
|
2255
|
+
if (typeof options === 'function') {
|
|
2256
|
+
cb = options;
|
|
2257
|
+
options = {};
|
|
2258
|
+
}
|
|
2259
|
+
if (!cb) {
|
|
2260
|
+
if (typeof Promise !== 'function') {
|
|
2261
|
+
throw new TypeError('callback not provided');
|
|
2262
|
+
}
|
|
2263
|
+
return new Promise(function(resolve, reject) {
|
|
2264
|
+
isexe(path, options || {}, function(er, is) {
|
|
2265
|
+
if (er) {
|
|
2266
|
+
reject(er);
|
|
2267
|
+
} else {
|
|
2268
|
+
resolve(is);
|
|
2269
|
+
}
|
|
2270
|
+
});
|
|
2271
|
+
});
|
|
2272
|
+
}
|
|
2273
|
+
core(path, options || {}, function(er, is) {
|
|
2274
|
+
// ignore EACCES because that just means we aren't allowed to run it
|
|
2275
|
+
if (er) {
|
|
2276
|
+
if (er.code === 'EACCES' || options && options.ignoreErrors) {
|
|
2277
|
+
er = null;
|
|
2278
|
+
is = false;
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
cb(er, is);
|
|
2282
|
+
});
|
|
2283
|
+
}
|
|
2284
|
+
function sync(path, options) {
|
|
2285
|
+
// my kingdom for a filtered catch
|
|
2286
|
+
try {
|
|
2287
|
+
return core.sync(path, options || {});
|
|
2288
|
+
} catch (er) {
|
|
2289
|
+
if (options && options.ignoreErrors || er.code === 'EACCES') {
|
|
2290
|
+
return false;
|
|
2291
|
+
} else {
|
|
2292
|
+
throw er;
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2296
|
+
return isexe_1;
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
var which_1;
|
|
2300
|
+
var hasRequiredWhich;
|
|
2301
|
+
function requireWhich() {
|
|
2302
|
+
if (hasRequiredWhich) return which_1;
|
|
2303
|
+
hasRequiredWhich = 1;
|
|
2304
|
+
which_1 = which;
|
|
2305
|
+
which.sync = whichSync;
|
|
2306
|
+
var isWindows = process.platform === 'win32' || process.env.OSTYPE === 'cygwin' || process.env.OSTYPE === 'msys';
|
|
2307
|
+
var path = require$$0$2;
|
|
2308
|
+
var COLON = isWindows ? ';' : ':';
|
|
2309
|
+
var isexe = requireIsexe();
|
|
2310
|
+
function getNotFoundError(cmd) {
|
|
2311
|
+
var er = new Error('not found: ' + cmd);
|
|
2312
|
+
er.code = 'ENOENT';
|
|
2313
|
+
return er;
|
|
2314
|
+
}
|
|
2315
|
+
function getPathInfo(cmd, opt) {
|
|
2316
|
+
var colon = opt.colon || COLON;
|
|
2317
|
+
var pathEnv = opt.path || process.env.PATH || '';
|
|
2318
|
+
var pathExt = [
|
|
2319
|
+
''
|
|
2320
|
+
];
|
|
2321
|
+
pathEnv = pathEnv.split(colon);
|
|
2322
|
+
var pathExtExe = '';
|
|
2323
|
+
if (isWindows) {
|
|
2324
|
+
pathEnv.unshift(process.cwd());
|
|
2325
|
+
pathExtExe = opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM';
|
|
2326
|
+
pathExt = pathExtExe.split(colon);
|
|
2327
|
+
// Always test the cmd itself first. isexe will check to make sure
|
|
2328
|
+
// it's found in the pathExt set.
|
|
2329
|
+
if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') pathExt.unshift('');
|
|
2330
|
+
}
|
|
2331
|
+
// If it has a slash, then we don't bother searching the pathenv.
|
|
2332
|
+
// just check the file itself, and that's it.
|
|
2333
|
+
if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) pathEnv = [
|
|
2334
|
+
''
|
|
2335
|
+
];
|
|
2336
|
+
return {
|
|
2337
|
+
env: pathEnv,
|
|
2338
|
+
ext: pathExt,
|
|
2339
|
+
extExe: pathExtExe
|
|
2340
|
+
};
|
|
2341
|
+
}
|
|
2342
|
+
function which(cmd, opt, cb) {
|
|
2343
|
+
if (typeof opt === 'function') {
|
|
2344
|
+
cb = opt;
|
|
2345
|
+
opt = {};
|
|
2346
|
+
}
|
|
2347
|
+
var info = getPathInfo(cmd, opt);
|
|
2348
|
+
var pathEnv = info.env;
|
|
2349
|
+
var pathExt = info.ext;
|
|
2350
|
+
var pathExtExe = info.extExe;
|
|
2351
|
+
var found = [];
|
|
2352
|
+
(function F(i, l) {
|
|
2353
|
+
if (i === l) {
|
|
2354
|
+
if (opt.all && found.length) return cb(null, found);
|
|
2355
|
+
else return cb(getNotFoundError(cmd));
|
|
2356
|
+
}
|
|
2357
|
+
var pathPart = pathEnv[i];
|
|
2358
|
+
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') pathPart = pathPart.slice(1, -1);
|
|
2359
|
+
var p = path.join(pathPart, cmd);
|
|
2360
|
+
if (!pathPart && /^\.[\\\/]/.test(cmd)) {
|
|
2361
|
+
p = cmd.slice(0, 2) + p;
|
|
2362
|
+
}
|
|
2363
|
+
(function E(ii, ll) {
|
|
2364
|
+
if (ii === ll) return F(i + 1, l);
|
|
2365
|
+
var ext = pathExt[ii];
|
|
2366
|
+
isexe(p + ext, {
|
|
2367
|
+
pathExt: pathExtExe
|
|
2368
|
+
}, function(er, is) {
|
|
2369
|
+
if (!er && is) {
|
|
2370
|
+
if (opt.all) found.push(p + ext);
|
|
2371
|
+
else return cb(null, p + ext);
|
|
2372
|
+
}
|
|
2373
|
+
return E(ii + 1, ll);
|
|
2374
|
+
});
|
|
2375
|
+
})(0, pathExt.length);
|
|
2376
|
+
})(0, pathEnv.length);
|
|
2377
|
+
}
|
|
2378
|
+
function whichSync(cmd, opt) {
|
|
2379
|
+
opt = opt || {};
|
|
2380
|
+
var info = getPathInfo(cmd, opt);
|
|
2381
|
+
var pathEnv = info.env;
|
|
2382
|
+
var pathExt = info.ext;
|
|
2383
|
+
var pathExtExe = info.extExe;
|
|
2384
|
+
var found = [];
|
|
2385
|
+
for(var i = 0, l = pathEnv.length; i < l; i++){
|
|
2386
|
+
var pathPart = pathEnv[i];
|
|
2387
|
+
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') pathPart = pathPart.slice(1, -1);
|
|
2388
|
+
var p = path.join(pathPart, cmd);
|
|
2389
|
+
if (!pathPart && /^\.[\\\/]/.test(cmd)) {
|
|
2390
|
+
p = cmd.slice(0, 2) + p;
|
|
2391
|
+
}
|
|
2392
|
+
for(var j = 0, ll = pathExt.length; j < ll; j++){
|
|
2393
|
+
var cur = p + pathExt[j];
|
|
2394
|
+
var is;
|
|
2395
|
+
try {
|
|
2396
|
+
is = isexe.sync(cur, {
|
|
2397
|
+
pathExt: pathExtExe
|
|
2398
|
+
});
|
|
2399
|
+
if (is) {
|
|
2400
|
+
if (opt.all) found.push(cur);
|
|
2401
|
+
else return cur;
|
|
2402
|
+
}
|
|
2403
|
+
} catch (ex) {}
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
if (opt.all && found.length) return found;
|
|
2407
|
+
if (opt.nothrow) return null;
|
|
2408
|
+
throw getNotFoundError(cmd);
|
|
2409
|
+
}
|
|
2410
|
+
return which_1;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
var pathKey;
|
|
2414
|
+
var hasRequiredPathKey;
|
|
2415
|
+
function requirePathKey() {
|
|
2416
|
+
if (hasRequiredPathKey) return pathKey;
|
|
2417
|
+
hasRequiredPathKey = 1;
|
|
2418
|
+
pathKey = function(opts) {
|
|
2419
|
+
opts = opts || {};
|
|
2420
|
+
var env = opts.env || process.env;
|
|
2421
|
+
var platform = opts.platform || process.platform;
|
|
2422
|
+
if (platform !== 'win32') {
|
|
2423
|
+
return 'PATH';
|
|
2424
|
+
}
|
|
2425
|
+
return Object.keys(env).find(function(x) {
|
|
2426
|
+
return x.toUpperCase() === 'PATH';
|
|
2427
|
+
}) || 'Path';
|
|
2428
|
+
};
|
|
2429
|
+
return pathKey;
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
var resolveCommand_1;
|
|
2433
|
+
var hasRequiredResolveCommand;
|
|
2434
|
+
function requireResolveCommand() {
|
|
2435
|
+
if (hasRequiredResolveCommand) return resolveCommand_1;
|
|
2436
|
+
hasRequiredResolveCommand = 1;
|
|
2437
|
+
var path = require$$0$2;
|
|
2438
|
+
var which = requireWhich();
|
|
2439
|
+
var pathKey = requirePathKey()();
|
|
2440
|
+
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
2441
|
+
var cwd = process.cwd();
|
|
2442
|
+
var hasCustomCwd = parsed.options.cwd != null;
|
|
2443
|
+
// Worker threads do not have process.chdir()
|
|
2444
|
+
var shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined;
|
|
2445
|
+
// If a custom `cwd` was specified, we need to change the process cwd
|
|
2446
|
+
// because `which` will do stat calls but does not support a custom cwd
|
|
2447
|
+
if (shouldSwitchCwd) {
|
|
2448
|
+
try {
|
|
2449
|
+
process.chdir(parsed.options.cwd);
|
|
2450
|
+
} catch (err) {
|
|
2451
|
+
/* Empty */ }
|
|
2452
|
+
}
|
|
2453
|
+
var resolved;
|
|
2454
|
+
try {
|
|
2455
|
+
resolved = which.sync(parsed.command, {
|
|
2456
|
+
path: (parsed.options.env || process.env)[pathKey],
|
|
2457
|
+
pathExt: withoutPathExt ? path.delimiter : undefined
|
|
2458
|
+
});
|
|
2459
|
+
} catch (e) {
|
|
2460
|
+
/* Empty */ } finally{
|
|
2461
|
+
if (shouldSwitchCwd) {
|
|
2462
|
+
process.chdir(cwd);
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
// If we successfully resolved, ensure that an absolute path is returned
|
|
2466
|
+
// Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it
|
|
2467
|
+
if (resolved) {
|
|
2468
|
+
resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);
|
|
2469
|
+
}
|
|
2470
|
+
return resolved;
|
|
2471
|
+
}
|
|
2472
|
+
function resolveCommand(parsed) {
|
|
2473
|
+
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
2474
|
+
}
|
|
2475
|
+
resolveCommand_1 = resolveCommand;
|
|
2476
|
+
return resolveCommand_1;
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
var _escape = {};
|
|
2480
|
+
|
|
2481
|
+
var hasRequired_escape;
|
|
2482
|
+
function require_escape() {
|
|
2483
|
+
if (hasRequired_escape) return _escape;
|
|
2484
|
+
hasRequired_escape = 1;
|
|
2485
|
+
// See http://www.robvanderwoude.com/escapechars.php
|
|
2486
|
+
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
2487
|
+
function escapeCommand(arg) {
|
|
2488
|
+
// Escape meta chars
|
|
2489
|
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
|
2490
|
+
return arg;
|
|
2491
|
+
}
|
|
2492
|
+
function escapeArgument(arg, doubleEscapeMetaChars) {
|
|
2493
|
+
// Convert to string
|
|
2494
|
+
arg = "".concat(arg);
|
|
2495
|
+
// Algorithm below is based on https://qntm.org/cmd
|
|
2496
|
+
// It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input
|
|
2497
|
+
// Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information
|
|
2498
|
+
// Sequence of backslashes followed by a double quote:
|
|
2499
|
+
// double up all the backslashes and escape the double quote
|
|
2500
|
+
arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
|
|
2501
|
+
// Sequence of backslashes followed by the end of the string
|
|
2502
|
+
// (which will become a double quote later):
|
|
2503
|
+
// double up all the backslashes
|
|
2504
|
+
arg = arg.replace(/(?=(\\+?)?)\1$/, '$1$1');
|
|
2505
|
+
// All other backslashes occur literally
|
|
2506
|
+
// Quote the whole thing:
|
|
2507
|
+
arg = '"'.concat(arg, '"');
|
|
2508
|
+
// Escape meta chars
|
|
2509
|
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
|
2510
|
+
// Double escape meta chars if necessary
|
|
2511
|
+
if (doubleEscapeMetaChars) {
|
|
2512
|
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
|
2513
|
+
}
|
|
2514
|
+
return arg;
|
|
2515
|
+
}
|
|
2516
|
+
_escape.command = escapeCommand;
|
|
2517
|
+
_escape.argument = escapeArgument;
|
|
2518
|
+
return _escape;
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
var shebangRegex;
|
|
2522
|
+
var hasRequiredShebangRegex;
|
|
2523
|
+
function requireShebangRegex() {
|
|
2524
|
+
if (hasRequiredShebangRegex) return shebangRegex;
|
|
2525
|
+
hasRequiredShebangRegex = 1;
|
|
2526
|
+
shebangRegex = /^#!.*/;
|
|
2527
|
+
return shebangRegex;
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
var shebangCommand;
|
|
2531
|
+
var hasRequiredShebangCommand;
|
|
2532
|
+
function requireShebangCommand() {
|
|
2533
|
+
if (hasRequiredShebangCommand) return shebangCommand;
|
|
2534
|
+
hasRequiredShebangCommand = 1;
|
|
2535
|
+
var shebangRegex = requireShebangRegex();
|
|
2536
|
+
shebangCommand = function shebangCommand(str) {
|
|
2537
|
+
var match = str.match(shebangRegex);
|
|
2538
|
+
if (!match) {
|
|
2539
|
+
return null;
|
|
2540
|
+
}
|
|
2541
|
+
var arr = match[0].replace(/#! ?/, '').split(' ');
|
|
2542
|
+
var bin = arr[0].split('/').pop();
|
|
2543
|
+
var arg = arr[1];
|
|
2544
|
+
return bin === 'env' ? arg : bin + (arg ? ' ' + arg : '');
|
|
2545
|
+
};
|
|
2546
|
+
return shebangCommand;
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
var readShebang_1;
|
|
2550
|
+
var hasRequiredReadShebang;
|
|
2551
|
+
function requireReadShebang() {
|
|
2552
|
+
if (hasRequiredReadShebang) return readShebang_1;
|
|
2553
|
+
hasRequiredReadShebang = 1;
|
|
2554
|
+
var fs = require$$0$1;
|
|
2555
|
+
var shebangCommand = requireShebangCommand();
|
|
2556
|
+
function readShebang(command) {
|
|
2557
|
+
// Read the first 150 bytes from the file
|
|
2558
|
+
var size = 150;
|
|
2559
|
+
var buffer;
|
|
2560
|
+
if (Buffer.alloc) {
|
|
2561
|
+
// Node.js v4.5+ / v5.10+
|
|
2562
|
+
buffer = Buffer.alloc(size);
|
|
2563
|
+
} else {
|
|
2564
|
+
// Old Node.js API
|
|
2565
|
+
buffer = new Buffer(size);
|
|
2566
|
+
buffer.fill(0); // zero-fill
|
|
2567
|
+
}
|
|
2568
|
+
var fd;
|
|
2569
|
+
try {
|
|
2570
|
+
fd = fs.openSync(command, 'r');
|
|
2571
|
+
fs.readSync(fd, buffer, 0, size, 0);
|
|
2572
|
+
fs.closeSync(fd);
|
|
2573
|
+
} catch (e) {}
|
|
2574
|
+
// Attempt to extract shebang (null is returned if not a shebang)
|
|
2575
|
+
return shebangCommand(buffer.toString());
|
|
2576
|
+
}
|
|
2577
|
+
readShebang_1 = readShebang;
|
|
2578
|
+
return readShebang_1;
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
var semver = {
|
|
2582
|
+
exports: {}
|
|
2583
|
+
};
|
|
2584
|
+
|
|
2585
|
+
function _instanceof(left, right) {
|
|
2586
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
2587
|
+
return !!right[Symbol.hasInstance](left);
|
|
2588
|
+
} else {
|
|
2589
|
+
return left instanceof right;
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
function _type_of(obj) {
|
|
2593
|
+
"@swc/helpers - typeof";
|
|
2594
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
2595
|
+
}
|
|
2596
|
+
var hasRequiredSemver;
|
|
2597
|
+
function requireSemver() {
|
|
2598
|
+
if (hasRequiredSemver) return semver.exports;
|
|
2599
|
+
hasRequiredSemver = 1;
|
|
2600
|
+
(function(module, exports) {
|
|
2601
|
+
exports = module.exports = SemVer;
|
|
2602
|
+
var debug;
|
|
2603
|
+
/* istanbul ignore next */ if ((typeof process === "undefined" ? "undefined" : _type_of(process)) === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
|
|
2604
|
+
debug = function debug() {
|
|
2605
|
+
var args = Array.prototype.slice.call(arguments, 0);
|
|
2606
|
+
args.unshift('SEMVER');
|
|
2607
|
+
console.log.apply(console, args);
|
|
2608
|
+
};
|
|
2609
|
+
} else {
|
|
2610
|
+
debug = function debug() {};
|
|
2611
|
+
}
|
|
2612
|
+
// Note: this is the semver.org version of the spec that it implements
|
|
2613
|
+
// Not necessarily the package version of this code.
|
|
2614
|
+
exports.SEMVER_SPEC_VERSION = '2.0.0';
|
|
2615
|
+
var MAX_LENGTH = 256;
|
|
2616
|
+
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991;
|
|
2617
|
+
// Max safe segment length for coercion.
|
|
2618
|
+
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
2619
|
+
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
2620
|
+
// The actual regexps go on exports.re
|
|
2621
|
+
var re = exports.re = [];
|
|
2622
|
+
var safeRe = exports.safeRe = [];
|
|
2623
|
+
var src = exports.src = [];
|
|
2624
|
+
var R = 0;
|
|
2625
|
+
var LETTERDASHNUMBER = '[a-zA-Z0-9-]';
|
|
2626
|
+
// Replace some greedy regex tokens to prevent regex dos issues. These regex are
|
|
2627
|
+
// used internally via the safeRe object since all inputs in this library get
|
|
2628
|
+
// normalized first to trim and collapse all extra whitespace. The original
|
|
2629
|
+
// regexes are exported for userland consumption and lower level usage. A
|
|
2630
|
+
// future breaking change could export the safer regex only with a note that
|
|
2631
|
+
// all input should have extra whitespace removed.
|
|
2632
|
+
var safeRegexReplacements = [
|
|
2633
|
+
[
|
|
2634
|
+
'\\s',
|
|
2635
|
+
1
|
|
2636
|
+
],
|
|
2637
|
+
[
|
|
2638
|
+
'\\d',
|
|
2639
|
+
MAX_LENGTH
|
|
2640
|
+
],
|
|
2641
|
+
[
|
|
2642
|
+
LETTERDASHNUMBER,
|
|
2643
|
+
MAX_SAFE_BUILD_LENGTH
|
|
2644
|
+
]
|
|
2645
|
+
];
|
|
2646
|
+
function makeSafeRe(value) {
|
|
2647
|
+
for(var i = 0; i < safeRegexReplacements.length; i++){
|
|
2648
|
+
var token = safeRegexReplacements[i][0];
|
|
2649
|
+
var max = safeRegexReplacements[i][1];
|
|
2650
|
+
value = value.split(token + '*').join(token + '{0,' + max + '}').split(token + '+').join(token + '{1,' + max + '}');
|
|
2651
|
+
}
|
|
2652
|
+
return value;
|
|
2653
|
+
}
|
|
2654
|
+
// The following Regular Expressions can be used for tokenizing,
|
|
2655
|
+
// validating, and parsing SemVer version strings.
|
|
2656
|
+
// ## Numeric Identifier
|
|
2657
|
+
// A single `0`, or a non-zero digit followed by zero or more digits.
|
|
2658
|
+
var NUMERICIDENTIFIER = R++;
|
|
2659
|
+
src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
|
|
2660
|
+
var NUMERICIDENTIFIERLOOSE = R++;
|
|
2661
|
+
src[NUMERICIDENTIFIERLOOSE] = '\\d+';
|
|
2662
|
+
// ## Non-numeric Identifier
|
|
2663
|
+
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
|
2664
|
+
// more letters, digits, or hyphens.
|
|
2665
|
+
var NONNUMERICIDENTIFIER = R++;
|
|
2666
|
+
src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*';
|
|
2667
|
+
// ## Main Version
|
|
2668
|
+
// Three dot-separated numeric identifiers.
|
|
2669
|
+
var MAINVERSION = R++;
|
|
2670
|
+
src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')\\.' + '(' + src[NUMERICIDENTIFIER] + ')';
|
|
2671
|
+
var MAINVERSIONLOOSE = R++;
|
|
2672
|
+
src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
|
|
2673
|
+
// ## Pre-release Version Identifier
|
|
2674
|
+
// A numeric identifier, or a non-numeric identifier.
|
|
2675
|
+
var PRERELEASEIDENTIFIER = R++;
|
|
2676
|
+
src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + '|' + src[NONNUMERICIDENTIFIER] + ')';
|
|
2677
|
+
var PRERELEASEIDENTIFIERLOOSE = R++;
|
|
2678
|
+
src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + '|' + src[NONNUMERICIDENTIFIER] + ')';
|
|
2679
|
+
// ## Pre-release Version
|
|
2680
|
+
// Hyphen, followed by one or more dot-separated pre-release version
|
|
2681
|
+
// identifiers.
|
|
2682
|
+
var PRERELEASE = R++;
|
|
2683
|
+
src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
|
|
2684
|
+
var PRERELEASELOOSE = R++;
|
|
2685
|
+
src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
|
|
2686
|
+
// ## Build Metadata Identifier
|
|
2687
|
+
// Any combination of digits, letters, or hyphens.
|
|
2688
|
+
var BUILDIDENTIFIER = R++;
|
|
2689
|
+
src[BUILDIDENTIFIER] = LETTERDASHNUMBER + '+';
|
|
2690
|
+
// ## Build Metadata
|
|
2691
|
+
// Plus sign, followed by one or more period-separated build metadata
|
|
2692
|
+
// identifiers.
|
|
2693
|
+
var BUILD = R++;
|
|
2694
|
+
src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
|
|
2695
|
+
// ## Full Version String
|
|
2696
|
+
// A main version, followed optionally by a pre-release version and
|
|
2697
|
+
// build metadata.
|
|
2698
|
+
// Note that the only major, minor, patch, and pre-release sections of
|
|
2699
|
+
// the version string are capturing groups. The build metadata is not a
|
|
2700
|
+
// capturing group, because it should not ever be used in version
|
|
2701
|
+
// comparison.
|
|
2702
|
+
var FULL = R++;
|
|
2703
|
+
var FULLPLAIN = 'v?' + src[MAINVERSION] + src[PRERELEASE] + '?' + src[BUILD] + '?';
|
|
2704
|
+
src[FULL] = '^' + FULLPLAIN + '$';
|
|
2705
|
+
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
|
|
2706
|
+
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
|
|
2707
|
+
// common in the npm registry.
|
|
2708
|
+
var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + '?' + src[BUILD] + '?';
|
|
2709
|
+
var LOOSE = R++;
|
|
2710
|
+
src[LOOSE] = '^' + LOOSEPLAIN + '$';
|
|
2711
|
+
var GTLT = R++;
|
|
2712
|
+
src[GTLT] = '((?:<|>)?=?)';
|
|
2713
|
+
// Something like "2.*" or "1.2.x".
|
|
2714
|
+
// Note that "x.x" is a valid xRange identifer, meaning "any version"
|
|
2715
|
+
// Only the first item is strictly required.
|
|
2716
|
+
var XRANGEIDENTIFIERLOOSE = R++;
|
|
2717
|
+
src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
|
|
2718
|
+
var XRANGEIDENTIFIER = R++;
|
|
2719
|
+
src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
|
|
2720
|
+
var XRANGEPLAIN = R++;
|
|
2721
|
+
src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + '(?:' + src[PRERELEASE] + ')?' + src[BUILD] + '?' + ')?)?';
|
|
2722
|
+
var XRANGEPLAINLOOSE = R++;
|
|
2723
|
+
src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[PRERELEASELOOSE] + ')?' + src[BUILD] + '?' + ')?)?';
|
|
2724
|
+
var XRANGE = R++;
|
|
2725
|
+
src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
|
|
2726
|
+
var XRANGELOOSE = R++;
|
|
2727
|
+
src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
|
|
2728
|
+
// Coercion.
|
|
2729
|
+
// Extract anything that could conceivably be a part of a valid semver
|
|
2730
|
+
var COERCE = R++;
|
|
2731
|
+
src[COERCE] = '(?:^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])';
|
|
2732
|
+
// Tilde ranges.
|
|
2733
|
+
// Meaning is "reasonably at or greater than"
|
|
2734
|
+
var LONETILDE = R++;
|
|
2735
|
+
src[LONETILDE] = '(?:~>?)';
|
|
2736
|
+
var TILDETRIM = R++;
|
|
2737
|
+
src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
|
|
2738
|
+
re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
|
|
2739
|
+
safeRe[TILDETRIM] = new RegExp(makeSafeRe(src[TILDETRIM]), 'g');
|
|
2740
|
+
var tildeTrimReplace = '$1~';
|
|
2741
|
+
var TILDE = R++;
|
|
2742
|
+
src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
|
|
2743
|
+
var TILDELOOSE = R++;
|
|
2744
|
+
src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
|
|
2745
|
+
// Caret ranges.
|
|
2746
|
+
// Meaning is "at least and backwards compatible with"
|
|
2747
|
+
var LONECARET = R++;
|
|
2748
|
+
src[LONECARET] = '(?:\\^)';
|
|
2749
|
+
var CARETTRIM = R++;
|
|
2750
|
+
src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
|
|
2751
|
+
re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
|
|
2752
|
+
safeRe[CARETTRIM] = new RegExp(makeSafeRe(src[CARETTRIM]), 'g');
|
|
2753
|
+
var caretTrimReplace = '$1^';
|
|
2754
|
+
var CARET = R++;
|
|
2755
|
+
src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
|
|
2756
|
+
var CARETLOOSE = R++;
|
|
2757
|
+
src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
|
|
2758
|
+
// A simple gt/lt/eq thing, or just "" to indicate "any version"
|
|
2759
|
+
var COMPARATORLOOSE = R++;
|
|
2760
|
+
src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
|
|
2761
|
+
var COMPARATOR = R++;
|
|
2762
|
+
src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
|
|
2763
|
+
// An expression to strip any whitespace between the gtlt and the thing
|
|
2764
|
+
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
|
|
2765
|
+
var COMPARATORTRIM = R++;
|
|
2766
|
+
src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
|
|
2767
|
+
// this one has to use the /g flag
|
|
2768
|
+
re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
|
|
2769
|
+
safeRe[COMPARATORTRIM] = new RegExp(makeSafeRe(src[COMPARATORTRIM]), 'g');
|
|
2770
|
+
var comparatorTrimReplace = '$1$2$3';
|
|
2771
|
+
// Something like `1.2.3 - 1.2.4`
|
|
2772
|
+
// Note that these all use the loose form, because they'll be
|
|
2773
|
+
// checked against either the strict or loose comparator form
|
|
2774
|
+
// later.
|
|
2775
|
+
var HYPHENRANGE = R++;
|
|
2776
|
+
src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAIN] + ')' + '\\s*$';
|
|
2777
|
+
var HYPHENRANGELOOSE = R++;
|
|
2778
|
+
src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[XRANGEPLAINLOOSE] + ')' + '\\s*$';
|
|
2779
|
+
// Star ranges basically just allow anything at all.
|
|
2780
|
+
var STAR = R++;
|
|
2781
|
+
src[STAR] = '(<|>)?=?\\s*\\*';
|
|
2782
|
+
// Compile to actual regexp objects.
|
|
2783
|
+
// All are flag-free, unless they were created above with a flag.
|
|
2784
|
+
for(var i = 0; i < R; i++){
|
|
2785
|
+
debug(i, src[i]);
|
|
2786
|
+
if (!re[i]) {
|
|
2787
|
+
re[i] = new RegExp(src[i]);
|
|
2788
|
+
// Replace all greedy whitespace to prevent regex dos issues. These regex are
|
|
2789
|
+
// used internally via the safeRe object since all inputs in this library get
|
|
2790
|
+
// normalized first to trim and collapse all extra whitespace. The original
|
|
2791
|
+
// regexes are exported for userland consumption and lower level usage. A
|
|
2792
|
+
// future breaking change could export the safer regex only with a note that
|
|
2793
|
+
// all input should have extra whitespace removed.
|
|
2794
|
+
safeRe[i] = new RegExp(makeSafeRe(src[i]));
|
|
2795
|
+
}
|
|
2796
|
+
}
|
|
2797
|
+
exports.parse = parse;
|
|
2798
|
+
function parse(version, options) {
|
|
2799
|
+
if (!options || (typeof options === "undefined" ? "undefined" : _type_of(options)) !== 'object') {
|
|
2800
|
+
options = {
|
|
2801
|
+
loose: !!options,
|
|
2802
|
+
includePrerelease: false
|
|
2803
|
+
};
|
|
2804
|
+
}
|
|
2805
|
+
if (_instanceof(version, SemVer)) {
|
|
2806
|
+
return version;
|
|
2807
|
+
}
|
|
2808
|
+
if (typeof version !== 'string') {
|
|
2809
|
+
return null;
|
|
2810
|
+
}
|
|
2811
|
+
if (version.length > MAX_LENGTH) {
|
|
2812
|
+
return null;
|
|
2813
|
+
}
|
|
2814
|
+
var r = options.loose ? safeRe[LOOSE] : safeRe[FULL];
|
|
2815
|
+
if (!r.test(version)) {
|
|
2816
|
+
return null;
|
|
2817
|
+
}
|
|
2818
|
+
try {
|
|
2819
|
+
return new SemVer(version, options);
|
|
2820
|
+
} catch (er) {
|
|
2821
|
+
return null;
|
|
2822
|
+
}
|
|
2823
|
+
}
|
|
2824
|
+
exports.valid = valid;
|
|
2825
|
+
function valid(version, options) {
|
|
2826
|
+
var v = parse(version, options);
|
|
2827
|
+
return v ? v.version : null;
|
|
2828
|
+
}
|
|
2829
|
+
exports.clean = clean;
|
|
2830
|
+
function clean(version, options) {
|
|
2831
|
+
var s = parse(version.trim().replace(/^[=v]+/, ''), options);
|
|
2832
|
+
return s ? s.version : null;
|
|
2833
|
+
}
|
|
2834
|
+
exports.SemVer = SemVer;
|
|
2835
|
+
function SemVer(version, options) {
|
|
2836
|
+
if (!options || (typeof options === "undefined" ? "undefined" : _type_of(options)) !== 'object') {
|
|
2837
|
+
options = {
|
|
2838
|
+
loose: !!options,
|
|
2839
|
+
includePrerelease: false
|
|
2840
|
+
};
|
|
2841
|
+
}
|
|
2842
|
+
if (_instanceof(version, SemVer)) {
|
|
2843
|
+
if (version.loose === options.loose) {
|
|
2844
|
+
return version;
|
|
2845
|
+
} else {
|
|
2846
|
+
version = version.version;
|
|
2847
|
+
}
|
|
2848
|
+
} else if (typeof version !== 'string') {
|
|
2849
|
+
throw new TypeError('Invalid Version: ' + version);
|
|
2850
|
+
}
|
|
2851
|
+
if (version.length > MAX_LENGTH) {
|
|
2852
|
+
throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters');
|
|
2853
|
+
}
|
|
2854
|
+
if (!_instanceof(this, SemVer)) {
|
|
2855
|
+
return new SemVer(version, options);
|
|
2856
|
+
}
|
|
2857
|
+
debug('SemVer', version, options);
|
|
2858
|
+
this.options = options;
|
|
2859
|
+
this.loose = !!options.loose;
|
|
2860
|
+
var m = version.trim().match(options.loose ? safeRe[LOOSE] : safeRe[FULL]);
|
|
2861
|
+
if (!m) {
|
|
2862
|
+
throw new TypeError('Invalid Version: ' + version);
|
|
2863
|
+
}
|
|
2864
|
+
this.raw = version;
|
|
2865
|
+
// these are actually numbers
|
|
2866
|
+
this.major = +m[1];
|
|
2867
|
+
this.minor = +m[2];
|
|
2868
|
+
this.patch = +m[3];
|
|
2869
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
2870
|
+
throw new TypeError('Invalid major version');
|
|
2871
|
+
}
|
|
2872
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
2873
|
+
throw new TypeError('Invalid minor version');
|
|
2874
|
+
}
|
|
2875
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
2876
|
+
throw new TypeError('Invalid patch version');
|
|
2877
|
+
}
|
|
2878
|
+
// numberify any prerelease numeric ids
|
|
2879
|
+
if (!m[4]) {
|
|
2880
|
+
this.prerelease = [];
|
|
2881
|
+
} else {
|
|
2882
|
+
this.prerelease = m[4].split('.').map(function(id) {
|
|
2883
|
+
if (/^[0-9]+$/.test(id)) {
|
|
2884
|
+
var num = +id;
|
|
2885
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
2886
|
+
return num;
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
return id;
|
|
2890
|
+
});
|
|
2891
|
+
}
|
|
2892
|
+
this.build = m[5] ? m[5].split('.') : [];
|
|
2893
|
+
this.format();
|
|
2894
|
+
}
|
|
2895
|
+
SemVer.prototype.format = function() {
|
|
2896
|
+
this.version = this.major + '.' + this.minor + '.' + this.patch;
|
|
2897
|
+
if (this.prerelease.length) {
|
|
2898
|
+
this.version += '-' + this.prerelease.join('.');
|
|
2899
|
+
}
|
|
2900
|
+
return this.version;
|
|
2901
|
+
};
|
|
2902
|
+
SemVer.prototype.toString = function() {
|
|
2903
|
+
return this.version;
|
|
2904
|
+
};
|
|
2905
|
+
SemVer.prototype.compare = function(other) {
|
|
2906
|
+
debug('SemVer.compare', this.version, this.options, other);
|
|
2907
|
+
if (!_instanceof(other, SemVer)) {
|
|
2908
|
+
other = new SemVer(other, this.options);
|
|
2909
|
+
}
|
|
2910
|
+
return this.compareMain(other) || this.comparePre(other);
|
|
2911
|
+
};
|
|
2912
|
+
SemVer.prototype.compareMain = function(other) {
|
|
2913
|
+
if (!_instanceof(other, SemVer)) {
|
|
2914
|
+
other = new SemVer(other, this.options);
|
|
2915
|
+
}
|
|
2916
|
+
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
2917
|
+
};
|
|
2918
|
+
SemVer.prototype.comparePre = function(other) {
|
|
2919
|
+
if (!_instanceof(other, SemVer)) {
|
|
2920
|
+
other = new SemVer(other, this.options);
|
|
2921
|
+
}
|
|
2922
|
+
// NOT having a prerelease is > having one
|
|
2923
|
+
if (this.prerelease.length && !other.prerelease.length) {
|
|
2924
|
+
return -1;
|
|
2925
|
+
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
2926
|
+
return 1;
|
|
2927
|
+
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
2928
|
+
return 0;
|
|
2929
|
+
}
|
|
2930
|
+
var i = 0;
|
|
2931
|
+
do {
|
|
2932
|
+
var a = this.prerelease[i];
|
|
2933
|
+
var b = other.prerelease[i];
|
|
2934
|
+
debug('prerelease compare', i, a, b);
|
|
2935
|
+
if (a === undefined && b === undefined) {
|
|
2936
|
+
return 0;
|
|
2937
|
+
} else if (b === undefined) {
|
|
2938
|
+
return 1;
|
|
2939
|
+
} else if (a === undefined) {
|
|
2940
|
+
return -1;
|
|
2941
|
+
} else if (a === b) {
|
|
2942
|
+
continue;
|
|
2943
|
+
} else {
|
|
2944
|
+
return compareIdentifiers(a, b);
|
|
2945
|
+
}
|
|
2946
|
+
}while (++i);
|
|
2947
|
+
};
|
|
2948
|
+
// preminor will bump the version up to the next minor release, and immediately
|
|
2949
|
+
// down to pre-release. premajor and prepatch work the same way.
|
|
2950
|
+
SemVer.prototype.inc = function(release, identifier) {
|
|
2951
|
+
switch(release){
|
|
2952
|
+
case 'premajor':
|
|
2953
|
+
this.prerelease.length = 0;
|
|
2954
|
+
this.patch = 0;
|
|
2955
|
+
this.minor = 0;
|
|
2956
|
+
this.major++;
|
|
2957
|
+
this.inc('pre', identifier);
|
|
2958
|
+
break;
|
|
2959
|
+
case 'preminor':
|
|
2960
|
+
this.prerelease.length = 0;
|
|
2961
|
+
this.patch = 0;
|
|
2962
|
+
this.minor++;
|
|
2963
|
+
this.inc('pre', identifier);
|
|
2964
|
+
break;
|
|
2965
|
+
case 'prepatch':
|
|
2966
|
+
// If this is already a prerelease, it will bump to the next version
|
|
2967
|
+
// drop any prereleases that might already exist, since they are not
|
|
2968
|
+
// relevant at this point.
|
|
2969
|
+
this.prerelease.length = 0;
|
|
2970
|
+
this.inc('patch', identifier);
|
|
2971
|
+
this.inc('pre', identifier);
|
|
2972
|
+
break;
|
|
2973
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
2974
|
+
// prepatch.
|
|
2975
|
+
case 'prerelease':
|
|
2976
|
+
if (this.prerelease.length === 0) {
|
|
2977
|
+
this.inc('patch', identifier);
|
|
2978
|
+
}
|
|
2979
|
+
this.inc('pre', identifier);
|
|
2980
|
+
break;
|
|
2981
|
+
case 'major':
|
|
2982
|
+
// If this is a pre-major version, bump up to the same major version.
|
|
2983
|
+
// Otherwise increment major.
|
|
2984
|
+
// 1.0.0-5 bumps to 1.0.0
|
|
2985
|
+
// 1.1.0 bumps to 2.0.0
|
|
2986
|
+
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
2987
|
+
this.major++;
|
|
2988
|
+
}
|
|
2989
|
+
this.minor = 0;
|
|
2990
|
+
this.patch = 0;
|
|
2991
|
+
this.prerelease = [];
|
|
2992
|
+
break;
|
|
2993
|
+
case 'minor':
|
|
2994
|
+
// If this is a pre-minor version, bump up to the same minor version.
|
|
2995
|
+
// Otherwise increment minor.
|
|
2996
|
+
// 1.2.0-5 bumps to 1.2.0
|
|
2997
|
+
// 1.2.1 bumps to 1.3.0
|
|
2998
|
+
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
2999
|
+
this.minor++;
|
|
3000
|
+
}
|
|
3001
|
+
this.patch = 0;
|
|
3002
|
+
this.prerelease = [];
|
|
3003
|
+
break;
|
|
3004
|
+
case 'patch':
|
|
3005
|
+
// If this is not a pre-release version, it will increment the patch.
|
|
3006
|
+
// If it is a pre-release it will bump up to the same patch version.
|
|
3007
|
+
// 1.2.0-5 patches to 1.2.0
|
|
3008
|
+
// 1.2.0 patches to 1.2.1
|
|
3009
|
+
if (this.prerelease.length === 0) {
|
|
3010
|
+
this.patch++;
|
|
3011
|
+
}
|
|
3012
|
+
this.prerelease = [];
|
|
3013
|
+
break;
|
|
3014
|
+
// This probably shouldn't be used publicly.
|
|
3015
|
+
// 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
|
|
3016
|
+
case 'pre':
|
|
3017
|
+
if (this.prerelease.length === 0) {
|
|
3018
|
+
this.prerelease = [
|
|
3019
|
+
0
|
|
3020
|
+
];
|
|
3021
|
+
} else {
|
|
3022
|
+
var i = this.prerelease.length;
|
|
3023
|
+
while(--i >= 0){
|
|
3024
|
+
if (typeof this.prerelease[i] === 'number') {
|
|
3025
|
+
this.prerelease[i]++;
|
|
3026
|
+
i = -2;
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
if (i === -1) {
|
|
3030
|
+
// didn't increment anything
|
|
3031
|
+
this.prerelease.push(0);
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
if (identifier) {
|
|
3035
|
+
// 1.2.0-beta.1 bumps to 1.2.0-beta.2,
|
|
3036
|
+
// 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
|
|
3037
|
+
if (this.prerelease[0] === identifier) {
|
|
3038
|
+
if (isNaN(this.prerelease[1])) {
|
|
3039
|
+
this.prerelease = [
|
|
3040
|
+
identifier,
|
|
3041
|
+
0
|
|
3042
|
+
];
|
|
3043
|
+
}
|
|
3044
|
+
} else {
|
|
3045
|
+
this.prerelease = [
|
|
3046
|
+
identifier,
|
|
3047
|
+
0
|
|
3048
|
+
];
|
|
3049
|
+
}
|
|
3050
|
+
}
|
|
3051
|
+
break;
|
|
3052
|
+
default:
|
|
3053
|
+
throw new Error('invalid increment argument: ' + release);
|
|
3054
|
+
}
|
|
3055
|
+
this.format();
|
|
3056
|
+
this.raw = this.version;
|
|
3057
|
+
return this;
|
|
3058
|
+
};
|
|
3059
|
+
exports.inc = inc;
|
|
3060
|
+
function inc(version, release, loose, identifier) {
|
|
3061
|
+
if (typeof loose === 'string') {
|
|
3062
|
+
identifier = loose;
|
|
3063
|
+
loose = undefined;
|
|
3064
|
+
}
|
|
3065
|
+
try {
|
|
3066
|
+
return new SemVer(version, loose).inc(release, identifier).version;
|
|
3067
|
+
} catch (er) {
|
|
3068
|
+
return null;
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
exports.diff = diff;
|
|
3072
|
+
function diff(version1, version2) {
|
|
3073
|
+
if (eq(version1, version2)) {
|
|
3074
|
+
return null;
|
|
3075
|
+
} else {
|
|
3076
|
+
var v1 = parse(version1);
|
|
3077
|
+
var v2 = parse(version2);
|
|
3078
|
+
var prefix = '';
|
|
3079
|
+
if (v1.prerelease.length || v2.prerelease.length) {
|
|
3080
|
+
prefix = 'pre';
|
|
3081
|
+
var defaultResult = 'prerelease';
|
|
3082
|
+
}
|
|
3083
|
+
for(var key in v1){
|
|
3084
|
+
if (key === 'major' || key === 'minor' || key === 'patch') {
|
|
3085
|
+
if (v1[key] !== v2[key]) {
|
|
3086
|
+
return prefix + key;
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
return defaultResult // may be undefined
|
|
3091
|
+
;
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
exports.compareIdentifiers = compareIdentifiers;
|
|
3095
|
+
var numeric = /^[0-9]+$/;
|
|
3096
|
+
function compareIdentifiers(a, b) {
|
|
3097
|
+
var anum = numeric.test(a);
|
|
3098
|
+
var bnum = numeric.test(b);
|
|
3099
|
+
if (anum && bnum) {
|
|
3100
|
+
a = +a;
|
|
3101
|
+
b = +b;
|
|
3102
|
+
}
|
|
3103
|
+
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
3104
|
+
}
|
|
3105
|
+
exports.rcompareIdentifiers = rcompareIdentifiers;
|
|
3106
|
+
function rcompareIdentifiers(a, b) {
|
|
3107
|
+
return compareIdentifiers(b, a);
|
|
3108
|
+
}
|
|
3109
|
+
exports.major = major;
|
|
3110
|
+
function major(a, loose) {
|
|
3111
|
+
return new SemVer(a, loose).major;
|
|
3112
|
+
}
|
|
3113
|
+
exports.minor = minor;
|
|
3114
|
+
function minor(a, loose) {
|
|
3115
|
+
return new SemVer(a, loose).minor;
|
|
3116
|
+
}
|
|
3117
|
+
exports.patch = patch;
|
|
3118
|
+
function patch(a, loose) {
|
|
3119
|
+
return new SemVer(a, loose).patch;
|
|
3120
|
+
}
|
|
3121
|
+
exports.compare = compare;
|
|
3122
|
+
function compare(a, b, loose) {
|
|
3123
|
+
return new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
3124
|
+
}
|
|
3125
|
+
exports.compareLoose = compareLoose;
|
|
3126
|
+
function compareLoose(a, b) {
|
|
3127
|
+
return compare(a, b, true);
|
|
3128
|
+
}
|
|
3129
|
+
exports.rcompare = rcompare;
|
|
3130
|
+
function rcompare(a, b, loose) {
|
|
3131
|
+
return compare(b, a, loose);
|
|
3132
|
+
}
|
|
3133
|
+
exports.sort = sort;
|
|
3134
|
+
function sort(list, loose) {
|
|
3135
|
+
return list.sort(function(a, b) {
|
|
3136
|
+
return exports.compare(a, b, loose);
|
|
3137
|
+
});
|
|
3138
|
+
}
|
|
3139
|
+
exports.rsort = rsort;
|
|
3140
|
+
function rsort(list, loose) {
|
|
3141
|
+
return list.sort(function(a, b) {
|
|
3142
|
+
return exports.rcompare(a, b, loose);
|
|
3143
|
+
});
|
|
3144
|
+
}
|
|
3145
|
+
exports.gt = gt;
|
|
3146
|
+
function gt(a, b, loose) {
|
|
3147
|
+
return compare(a, b, loose) > 0;
|
|
3148
|
+
}
|
|
3149
|
+
exports.lt = lt;
|
|
3150
|
+
function lt(a, b, loose) {
|
|
3151
|
+
return compare(a, b, loose) < 0;
|
|
3152
|
+
}
|
|
3153
|
+
exports.eq = eq;
|
|
3154
|
+
function eq(a, b, loose) {
|
|
3155
|
+
return compare(a, b, loose) === 0;
|
|
3156
|
+
}
|
|
3157
|
+
exports.neq = neq;
|
|
3158
|
+
function neq(a, b, loose) {
|
|
3159
|
+
return compare(a, b, loose) !== 0;
|
|
3160
|
+
}
|
|
3161
|
+
exports.gte = gte;
|
|
3162
|
+
function gte(a, b, loose) {
|
|
3163
|
+
return compare(a, b, loose) >= 0;
|
|
3164
|
+
}
|
|
3165
|
+
exports.lte = lte;
|
|
3166
|
+
function lte(a, b, loose) {
|
|
3167
|
+
return compare(a, b, loose) <= 0;
|
|
3168
|
+
}
|
|
3169
|
+
exports.cmp = cmp;
|
|
3170
|
+
function cmp(a, op, b, loose) {
|
|
3171
|
+
switch(op){
|
|
3172
|
+
case '===':
|
|
3173
|
+
if ((typeof a === "undefined" ? "undefined" : _type_of(a)) === 'object') a = a.version;
|
|
3174
|
+
if ((typeof b === "undefined" ? "undefined" : _type_of(b)) === 'object') b = b.version;
|
|
3175
|
+
return a === b;
|
|
3176
|
+
case '!==':
|
|
3177
|
+
if ((typeof a === "undefined" ? "undefined" : _type_of(a)) === 'object') a = a.version;
|
|
3178
|
+
if ((typeof b === "undefined" ? "undefined" : _type_of(b)) === 'object') b = b.version;
|
|
3179
|
+
return a !== b;
|
|
3180
|
+
case '':
|
|
3181
|
+
case '=':
|
|
3182
|
+
case '==':
|
|
3183
|
+
return eq(a, b, loose);
|
|
3184
|
+
case '!=':
|
|
3185
|
+
return neq(a, b, loose);
|
|
3186
|
+
case '>':
|
|
3187
|
+
return gt(a, b, loose);
|
|
3188
|
+
case '>=':
|
|
3189
|
+
return gte(a, b, loose);
|
|
3190
|
+
case '<':
|
|
3191
|
+
return lt(a, b, loose);
|
|
3192
|
+
case '<=':
|
|
3193
|
+
return lte(a, b, loose);
|
|
3194
|
+
default:
|
|
3195
|
+
throw new TypeError('Invalid operator: ' + op);
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
exports.Comparator = Comparator;
|
|
3199
|
+
function Comparator(comp, options) {
|
|
3200
|
+
if (!options || (typeof options === "undefined" ? "undefined" : _type_of(options)) !== 'object') {
|
|
3201
|
+
options = {
|
|
3202
|
+
loose: !!options,
|
|
3203
|
+
includePrerelease: false
|
|
3204
|
+
};
|
|
3205
|
+
}
|
|
3206
|
+
if (_instanceof(comp, Comparator)) {
|
|
3207
|
+
if (comp.loose === !!options.loose) {
|
|
3208
|
+
return comp;
|
|
3209
|
+
} else {
|
|
3210
|
+
comp = comp.value;
|
|
3211
|
+
}
|
|
3212
|
+
}
|
|
3213
|
+
if (!_instanceof(this, Comparator)) {
|
|
3214
|
+
return new Comparator(comp, options);
|
|
3215
|
+
}
|
|
3216
|
+
comp = comp.trim().split(/\s+/).join(' ');
|
|
3217
|
+
debug('comparator', comp, options);
|
|
3218
|
+
this.options = options;
|
|
3219
|
+
this.loose = !!options.loose;
|
|
3220
|
+
this.parse(comp);
|
|
3221
|
+
if (this.semver === ANY) {
|
|
3222
|
+
this.value = '';
|
|
3223
|
+
} else {
|
|
3224
|
+
this.value = this.operator + this.semver.version;
|
|
3225
|
+
}
|
|
3226
|
+
debug('comp', this);
|
|
3227
|
+
}
|
|
3228
|
+
var ANY = {};
|
|
3229
|
+
Comparator.prototype.parse = function(comp) {
|
|
3230
|
+
var r = this.options.loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR];
|
|
3231
|
+
var m = comp.match(r);
|
|
3232
|
+
if (!m) {
|
|
3233
|
+
throw new TypeError('Invalid comparator: ' + comp);
|
|
3234
|
+
}
|
|
3235
|
+
this.operator = m[1];
|
|
3236
|
+
if (this.operator === '=') {
|
|
3237
|
+
this.operator = '';
|
|
3238
|
+
}
|
|
3239
|
+
// if it literally is just '>' or '' then allow anything.
|
|
3240
|
+
if (!m[2]) {
|
|
3241
|
+
this.semver = ANY;
|
|
3242
|
+
} else {
|
|
3243
|
+
this.semver = new SemVer(m[2], this.options.loose);
|
|
3244
|
+
}
|
|
3245
|
+
};
|
|
3246
|
+
Comparator.prototype.toString = function() {
|
|
3247
|
+
return this.value;
|
|
3248
|
+
};
|
|
3249
|
+
Comparator.prototype.test = function(version) {
|
|
3250
|
+
debug('Comparator.test', version, this.options.loose);
|
|
3251
|
+
if (this.semver === ANY) {
|
|
3252
|
+
return true;
|
|
3253
|
+
}
|
|
3254
|
+
if (typeof version === 'string') {
|
|
3255
|
+
version = new SemVer(version, this.options);
|
|
3256
|
+
}
|
|
3257
|
+
return cmp(version, this.operator, this.semver, this.options);
|
|
3258
|
+
};
|
|
3259
|
+
Comparator.prototype.intersects = function(comp, options) {
|
|
3260
|
+
if (!_instanceof(comp, Comparator)) {
|
|
3261
|
+
throw new TypeError('a Comparator is required');
|
|
3262
|
+
}
|
|
3263
|
+
if (!options || (typeof options === "undefined" ? "undefined" : _type_of(options)) !== 'object') {
|
|
3264
|
+
options = {
|
|
3265
|
+
loose: !!options,
|
|
3266
|
+
includePrerelease: false
|
|
3267
|
+
};
|
|
3268
|
+
}
|
|
3269
|
+
var rangeTmp;
|
|
3270
|
+
if (this.operator === '') {
|
|
3271
|
+
rangeTmp = new Range(comp.value, options);
|
|
3272
|
+
return satisfies(this.value, rangeTmp, options);
|
|
3273
|
+
} else if (comp.operator === '') {
|
|
3274
|
+
rangeTmp = new Range(this.value, options);
|
|
3275
|
+
return satisfies(comp.semver, rangeTmp, options);
|
|
3276
|
+
}
|
|
3277
|
+
var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
|
|
3278
|
+
var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
|
|
3279
|
+
var sameSemVer = this.semver.version === comp.semver.version;
|
|
3280
|
+
var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
|
|
3281
|
+
var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
|
|
3282
|
+
var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
|
|
3283
|
+
return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
|
|
3284
|
+
};
|
|
3285
|
+
exports.Range = Range;
|
|
3286
|
+
function Range(range, options) {
|
|
3287
|
+
if (!options || (typeof options === "undefined" ? "undefined" : _type_of(options)) !== 'object') {
|
|
3288
|
+
options = {
|
|
3289
|
+
loose: !!options,
|
|
3290
|
+
includePrerelease: false
|
|
3291
|
+
};
|
|
3292
|
+
}
|
|
3293
|
+
if (_instanceof(range, Range)) {
|
|
3294
|
+
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
|
3295
|
+
return range;
|
|
3296
|
+
} else {
|
|
3297
|
+
return new Range(range.raw, options);
|
|
3298
|
+
}
|
|
3299
|
+
}
|
|
3300
|
+
if (_instanceof(range, Comparator)) {
|
|
3301
|
+
return new Range(range.value, options);
|
|
3302
|
+
}
|
|
3303
|
+
if (!_instanceof(this, Range)) {
|
|
3304
|
+
return new Range(range, options);
|
|
3305
|
+
}
|
|
3306
|
+
this.options = options;
|
|
3307
|
+
this.loose = !!options.loose;
|
|
3308
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
3309
|
+
// First reduce all whitespace as much as possible so we do not have to rely
|
|
3310
|
+
// on potentially slow regexes like \s*. This is then stored and used for
|
|
3311
|
+
// future error messages as well.
|
|
3312
|
+
this.raw = range.trim().split(/\s+/).join(' ');
|
|
3313
|
+
// First, split based on boolean or ||
|
|
3314
|
+
this.set = this.raw.split('||').map(function(range) {
|
|
3315
|
+
return this.parseRange(range.trim());
|
|
3316
|
+
}, this).filter(function(c) {
|
|
3317
|
+
// throw out any that are not relevant for whatever reason
|
|
3318
|
+
return c.length;
|
|
3319
|
+
});
|
|
3320
|
+
if (!this.set.length) {
|
|
3321
|
+
throw new TypeError('Invalid SemVer Range: ' + this.raw);
|
|
3322
|
+
}
|
|
3323
|
+
this.format();
|
|
3324
|
+
}
|
|
3325
|
+
Range.prototype.format = function() {
|
|
3326
|
+
this.range = this.set.map(function(comps) {
|
|
3327
|
+
return comps.join(' ').trim();
|
|
3328
|
+
}).join('||').trim();
|
|
3329
|
+
return this.range;
|
|
3330
|
+
};
|
|
3331
|
+
Range.prototype.toString = function() {
|
|
3332
|
+
return this.range;
|
|
3333
|
+
};
|
|
3334
|
+
Range.prototype.parseRange = function(range) {
|
|
3335
|
+
var loose = this.options.loose;
|
|
3336
|
+
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
|
3337
|
+
var hr = loose ? safeRe[HYPHENRANGELOOSE] : safeRe[HYPHENRANGE];
|
|
3338
|
+
range = range.replace(hr, hyphenReplace);
|
|
3339
|
+
debug('hyphen replace', range);
|
|
3340
|
+
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
|
|
3341
|
+
range = range.replace(safeRe[COMPARATORTRIM], comparatorTrimReplace);
|
|
3342
|
+
debug('comparator trim', range, safeRe[COMPARATORTRIM]);
|
|
3343
|
+
// `~ 1.2.3` => `~1.2.3`
|
|
3344
|
+
range = range.replace(safeRe[TILDETRIM], tildeTrimReplace);
|
|
3345
|
+
// `^ 1.2.3` => `^1.2.3`
|
|
3346
|
+
range = range.replace(safeRe[CARETTRIM], caretTrimReplace);
|
|
3347
|
+
// At this point, the range is completely trimmed and
|
|
3348
|
+
// ready to be split into comparators.
|
|
3349
|
+
var compRe = loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR];
|
|
3350
|
+
var set = range.split(' ').map(function(comp) {
|
|
3351
|
+
return parseComparator(comp, this.options);
|
|
3352
|
+
}, this).join(' ').split(/\s+/);
|
|
3353
|
+
if (this.options.loose) {
|
|
3354
|
+
// in loose mode, throw out any that are not valid comparators
|
|
3355
|
+
set = set.filter(function(comp) {
|
|
3356
|
+
return !!comp.match(compRe);
|
|
3357
|
+
});
|
|
3358
|
+
}
|
|
3359
|
+
set = set.map(function(comp) {
|
|
3360
|
+
return new Comparator(comp, this.options);
|
|
3361
|
+
}, this);
|
|
3362
|
+
return set;
|
|
3363
|
+
};
|
|
3364
|
+
Range.prototype.intersects = function(range, options) {
|
|
3365
|
+
if (!_instanceof(range, Range)) {
|
|
3366
|
+
throw new TypeError('a Range is required');
|
|
3367
|
+
}
|
|
3368
|
+
return this.set.some(function(thisComparators) {
|
|
3369
|
+
return thisComparators.every(function(thisComparator) {
|
|
3370
|
+
return range.set.some(function(rangeComparators) {
|
|
3371
|
+
return rangeComparators.every(function(rangeComparator) {
|
|
3372
|
+
return thisComparator.intersects(rangeComparator, options);
|
|
3373
|
+
});
|
|
3374
|
+
});
|
|
3375
|
+
});
|
|
3376
|
+
});
|
|
3377
|
+
};
|
|
3378
|
+
// Mostly just for testing and legacy API reasons
|
|
3379
|
+
exports.toComparators = toComparators;
|
|
3380
|
+
function toComparators(range, options) {
|
|
3381
|
+
return new Range(range, options).set.map(function(comp) {
|
|
3382
|
+
return comp.map(function(c) {
|
|
3383
|
+
return c.value;
|
|
3384
|
+
}).join(' ').trim().split(' ');
|
|
3385
|
+
});
|
|
3386
|
+
}
|
|
3387
|
+
// comprised of xranges, tildes, stars, and gtlt's at this point.
|
|
3388
|
+
// already replaced the hyphen ranges
|
|
3389
|
+
// turn into a set of JUST comparators.
|
|
3390
|
+
function parseComparator(comp, options) {
|
|
3391
|
+
debug('comp', comp, options);
|
|
3392
|
+
comp = replaceCarets(comp, options);
|
|
3393
|
+
debug('caret', comp);
|
|
3394
|
+
comp = replaceTildes(comp, options);
|
|
3395
|
+
debug('tildes', comp);
|
|
3396
|
+
comp = replaceXRanges(comp, options);
|
|
3397
|
+
debug('xrange', comp);
|
|
3398
|
+
comp = replaceStars(comp, options);
|
|
3399
|
+
debug('stars', comp);
|
|
3400
|
+
return comp;
|
|
3401
|
+
}
|
|
3402
|
+
function isX(id) {
|
|
3403
|
+
return !id || id.toLowerCase() === 'x' || id === '*';
|
|
3404
|
+
}
|
|
3405
|
+
// ~, ~> --> * (any, kinda silly)
|
|
3406
|
+
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
|
|
3407
|
+
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
|
|
3408
|
+
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
|
|
3409
|
+
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
|
|
3410
|
+
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
|
|
3411
|
+
function replaceTildes(comp, options) {
|
|
3412
|
+
return comp.trim().split(/\s+/).map(function(comp) {
|
|
3413
|
+
return replaceTilde(comp, options);
|
|
3414
|
+
}).join(' ');
|
|
3415
|
+
}
|
|
3416
|
+
function replaceTilde(comp, options) {
|
|
3417
|
+
var r = options.loose ? safeRe[TILDELOOSE] : safeRe[TILDE];
|
|
3418
|
+
return comp.replace(r, function(_, M, m, p, pr) {
|
|
3419
|
+
debug('tilde', comp, _, M, m, p, pr);
|
|
3420
|
+
var ret;
|
|
3421
|
+
if (isX(M)) {
|
|
3422
|
+
ret = '';
|
|
3423
|
+
} else if (isX(m)) {
|
|
3424
|
+
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
|
|
3425
|
+
} else if (isX(p)) {
|
|
3426
|
+
// ~1.2 == >=1.2.0 <1.3.0
|
|
3427
|
+
ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
|
|
3428
|
+
} else if (pr) {
|
|
3429
|
+
debug('replaceTilde pr', pr);
|
|
3430
|
+
ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
|
|
3431
|
+
} else {
|
|
3432
|
+
// ~1.2.3 == >=1.2.3 <1.3.0
|
|
3433
|
+
ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
|
|
3434
|
+
}
|
|
3435
|
+
debug('tilde return', ret);
|
|
3436
|
+
return ret;
|
|
3437
|
+
});
|
|
3438
|
+
}
|
|
3439
|
+
// ^ --> * (any, kinda silly)
|
|
3440
|
+
// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
|
|
3441
|
+
// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
|
|
3442
|
+
// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
|
|
3443
|
+
// ^1.2.3 --> >=1.2.3 <2.0.0
|
|
3444
|
+
// ^1.2.0 --> >=1.2.0 <2.0.0
|
|
3445
|
+
function replaceCarets(comp, options) {
|
|
3446
|
+
return comp.trim().split(/\s+/).map(function(comp) {
|
|
3447
|
+
return replaceCaret(comp, options);
|
|
3448
|
+
}).join(' ');
|
|
3449
|
+
}
|
|
3450
|
+
function replaceCaret(comp, options) {
|
|
3451
|
+
debug('caret', comp, options);
|
|
3452
|
+
var r = options.loose ? safeRe[CARETLOOSE] : safeRe[CARET];
|
|
3453
|
+
return comp.replace(r, function(_, M, m, p, pr) {
|
|
3454
|
+
debug('caret', comp, _, M, m, p, pr);
|
|
3455
|
+
var ret;
|
|
3456
|
+
if (isX(M)) {
|
|
3457
|
+
ret = '';
|
|
3458
|
+
} else if (isX(m)) {
|
|
3459
|
+
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
|
|
3460
|
+
} else if (isX(p)) {
|
|
3461
|
+
if (M === '0') {
|
|
3462
|
+
ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
|
|
3463
|
+
} else {
|
|
3464
|
+
ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
|
|
3465
|
+
}
|
|
3466
|
+
} else if (pr) {
|
|
3467
|
+
debug('replaceCaret pr', pr);
|
|
3468
|
+
if (M === '0') {
|
|
3469
|
+
if (m === '0') {
|
|
3470
|
+
ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + m + '.' + (+p + 1);
|
|
3471
|
+
} else {
|
|
3472
|
+
ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
|
|
3473
|
+
}
|
|
3474
|
+
} else {
|
|
3475
|
+
ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + (+M + 1) + '.0.0';
|
|
3476
|
+
}
|
|
3477
|
+
} else {
|
|
3478
|
+
debug('no pr');
|
|
3479
|
+
if (M === '0') {
|
|
3480
|
+
if (m === '0') {
|
|
3481
|
+
ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);
|
|
3482
|
+
} else {
|
|
3483
|
+
ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
|
|
3484
|
+
}
|
|
3485
|
+
} else {
|
|
3486
|
+
ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0';
|
|
3487
|
+
}
|
|
3488
|
+
}
|
|
3489
|
+
debug('caret return', ret);
|
|
3490
|
+
return ret;
|
|
3491
|
+
});
|
|
3492
|
+
}
|
|
3493
|
+
function replaceXRanges(comp, options) {
|
|
3494
|
+
debug('replaceXRanges', comp, options);
|
|
3495
|
+
return comp.split(/\s+/).map(function(comp) {
|
|
3496
|
+
return replaceXRange(comp, options);
|
|
3497
|
+
}).join(' ');
|
|
3498
|
+
}
|
|
3499
|
+
function replaceXRange(comp, options) {
|
|
3500
|
+
comp = comp.trim();
|
|
3501
|
+
var r = options.loose ? safeRe[XRANGELOOSE] : safeRe[XRANGE];
|
|
3502
|
+
return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
|
|
3503
|
+
debug('xRange', comp, ret, gtlt, M, m, p, pr);
|
|
3504
|
+
var xM = isX(M);
|
|
3505
|
+
var xm = xM || isX(m);
|
|
3506
|
+
var xp = xm || isX(p);
|
|
3507
|
+
var anyX = xp;
|
|
3508
|
+
if (gtlt === '=' && anyX) {
|
|
3509
|
+
gtlt = '';
|
|
3510
|
+
}
|
|
3511
|
+
if (xM) {
|
|
3512
|
+
if (gtlt === '>' || gtlt === '<') {
|
|
3513
|
+
// nothing is allowed
|
|
3514
|
+
ret = '<0.0.0';
|
|
3515
|
+
} else {
|
|
3516
|
+
// nothing is forbidden
|
|
3517
|
+
ret = '*';
|
|
3518
|
+
}
|
|
3519
|
+
} else if (gtlt && anyX) {
|
|
3520
|
+
// we know patch is an x, because we have any x at all.
|
|
3521
|
+
// replace X with 0
|
|
3522
|
+
if (xm) {
|
|
3523
|
+
m = 0;
|
|
3524
|
+
}
|
|
3525
|
+
p = 0;
|
|
3526
|
+
if (gtlt === '>') {
|
|
3527
|
+
// >1 => >=2.0.0
|
|
3528
|
+
// >1.2 => >=1.3.0
|
|
3529
|
+
// >1.2.3 => >= 1.2.4
|
|
3530
|
+
gtlt = '>=';
|
|
3531
|
+
if (xm) {
|
|
3532
|
+
M = +M + 1;
|
|
3533
|
+
m = 0;
|
|
3534
|
+
p = 0;
|
|
3535
|
+
} else {
|
|
3536
|
+
m = +m + 1;
|
|
3537
|
+
p = 0;
|
|
3538
|
+
}
|
|
3539
|
+
} else if (gtlt === '<=') {
|
|
3540
|
+
// <=0.7.x is actually <0.8.0, since any 0.7.x should
|
|
3541
|
+
// pass. Similarly, <=7.x is actually <8.0.0, etc.
|
|
3542
|
+
gtlt = '<';
|
|
3543
|
+
if (xm) {
|
|
3544
|
+
M = +M + 1;
|
|
3545
|
+
} else {
|
|
3546
|
+
m = +m + 1;
|
|
3547
|
+
}
|
|
3548
|
+
}
|
|
3549
|
+
ret = gtlt + M + '.' + m + '.' + p;
|
|
3550
|
+
} else if (xm) {
|
|
3551
|
+
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
|
|
3552
|
+
} else if (xp) {
|
|
3553
|
+
ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
|
|
3554
|
+
}
|
|
3555
|
+
debug('xRange return', ret);
|
|
3556
|
+
return ret;
|
|
3557
|
+
});
|
|
3558
|
+
}
|
|
3559
|
+
// Because * is AND-ed with everything else in the comparator,
|
|
3560
|
+
// and '' means "any version", just remove the *s entirely.
|
|
3561
|
+
function replaceStars(comp, options) {
|
|
3562
|
+
debug('replaceStars', comp, options);
|
|
3563
|
+
// Looseness is ignored here. star is always as loose as it gets!
|
|
3564
|
+
return comp.trim().replace(safeRe[STAR], '');
|
|
3565
|
+
}
|
|
3566
|
+
// This function is passed to string.replace(safeRe[HYPHENRANGE])
|
|
3567
|
+
// M, m, patch, prerelease, build
|
|
3568
|
+
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
|
|
3569
|
+
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
|
|
3570
|
+
// 1.2 - 3.4 => >=1.2.0 <3.5.0
|
|
3571
|
+
function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
|
|
3572
|
+
if (isX(fM)) {
|
|
3573
|
+
from = '';
|
|
3574
|
+
} else if (isX(fm)) {
|
|
3575
|
+
from = '>=' + fM + '.0.0';
|
|
3576
|
+
} else if (isX(fp)) {
|
|
3577
|
+
from = '>=' + fM + '.' + fm + '.0';
|
|
3578
|
+
} else {
|
|
3579
|
+
from = '>=' + from;
|
|
3580
|
+
}
|
|
3581
|
+
if (isX(tM)) {
|
|
3582
|
+
to = '';
|
|
3583
|
+
} else if (isX(tm)) {
|
|
3584
|
+
to = '<' + (+tM + 1) + '.0.0';
|
|
3585
|
+
} else if (isX(tp)) {
|
|
3586
|
+
to = '<' + tM + '.' + (+tm + 1) + '.0';
|
|
3587
|
+
} else if (tpr) {
|
|
3588
|
+
to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
|
|
3589
|
+
} else {
|
|
3590
|
+
to = '<=' + to;
|
|
3591
|
+
}
|
|
3592
|
+
return (from + ' ' + to).trim();
|
|
3593
|
+
}
|
|
3594
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
|
3595
|
+
Range.prototype.test = function(version) {
|
|
3596
|
+
if (!version) {
|
|
3597
|
+
return false;
|
|
3598
|
+
}
|
|
3599
|
+
if (typeof version === 'string') {
|
|
3600
|
+
version = new SemVer(version, this.options);
|
|
3601
|
+
}
|
|
3602
|
+
for(var i = 0; i < this.set.length; i++){
|
|
3603
|
+
if (testSet(this.set[i], version, this.options)) {
|
|
3604
|
+
return true;
|
|
3605
|
+
}
|
|
3606
|
+
}
|
|
3607
|
+
return false;
|
|
3608
|
+
};
|
|
3609
|
+
function testSet(set, version, options) {
|
|
3610
|
+
for(var i = 0; i < set.length; i++){
|
|
3611
|
+
if (!set[i].test(version)) {
|
|
3612
|
+
return false;
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
if (version.prerelease.length && !options.includePrerelease) {
|
|
3616
|
+
// Find the set of versions that are allowed to have prereleases
|
|
3617
|
+
// For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
|
|
3618
|
+
// That should allow `1.2.3-pr.2` to pass.
|
|
3619
|
+
// However, `1.2.4-alpha.notready` should NOT be allowed,
|
|
3620
|
+
// even though it's within the range set by the comparators.
|
|
3621
|
+
for(i = 0; i < set.length; i++){
|
|
3622
|
+
debug(set[i].semver);
|
|
3623
|
+
if (set[i].semver === ANY) {
|
|
3624
|
+
continue;
|
|
3625
|
+
}
|
|
3626
|
+
if (set[i].semver.prerelease.length > 0) {
|
|
3627
|
+
var allowed = set[i].semver;
|
|
3628
|
+
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
|
|
3629
|
+
return true;
|
|
3630
|
+
}
|
|
3631
|
+
}
|
|
3632
|
+
}
|
|
3633
|
+
// Version has a -pre, but it's not one of the ones we like.
|
|
3634
|
+
return false;
|
|
3635
|
+
}
|
|
3636
|
+
return true;
|
|
3637
|
+
}
|
|
3638
|
+
exports.satisfies = satisfies;
|
|
3639
|
+
function satisfies(version, range, options) {
|
|
3640
|
+
try {
|
|
3641
|
+
range = new Range(range, options);
|
|
3642
|
+
} catch (er) {
|
|
3643
|
+
return false;
|
|
3644
|
+
}
|
|
3645
|
+
return range.test(version);
|
|
3646
|
+
}
|
|
3647
|
+
exports.maxSatisfying = maxSatisfying;
|
|
3648
|
+
function maxSatisfying(versions, range, options) {
|
|
3649
|
+
var max = null;
|
|
3650
|
+
var maxSV = null;
|
|
3651
|
+
try {
|
|
3652
|
+
var rangeObj = new Range(range, options);
|
|
3653
|
+
} catch (er) {
|
|
3654
|
+
return null;
|
|
3655
|
+
}
|
|
3656
|
+
versions.forEach(function(v) {
|
|
3657
|
+
if (rangeObj.test(v)) {
|
|
3658
|
+
// satisfies(v, range, options)
|
|
3659
|
+
if (!max || maxSV.compare(v) === -1) {
|
|
3660
|
+
// compare(max, v, true)
|
|
3661
|
+
max = v;
|
|
3662
|
+
maxSV = new SemVer(max, options);
|
|
3663
|
+
}
|
|
3664
|
+
}
|
|
3665
|
+
});
|
|
3666
|
+
return max;
|
|
3667
|
+
}
|
|
3668
|
+
exports.minSatisfying = minSatisfying;
|
|
3669
|
+
function minSatisfying(versions, range, options) {
|
|
3670
|
+
var min = null;
|
|
3671
|
+
var minSV = null;
|
|
3672
|
+
try {
|
|
3673
|
+
var rangeObj = new Range(range, options);
|
|
3674
|
+
} catch (er) {
|
|
3675
|
+
return null;
|
|
3676
|
+
}
|
|
3677
|
+
versions.forEach(function(v) {
|
|
3678
|
+
if (rangeObj.test(v)) {
|
|
3679
|
+
// satisfies(v, range, options)
|
|
3680
|
+
if (!min || minSV.compare(v) === 1) {
|
|
3681
|
+
// compare(min, v, true)
|
|
3682
|
+
min = v;
|
|
3683
|
+
minSV = new SemVer(min, options);
|
|
3684
|
+
}
|
|
3685
|
+
}
|
|
3686
|
+
});
|
|
3687
|
+
return min;
|
|
3688
|
+
}
|
|
3689
|
+
exports.minVersion = minVersion;
|
|
3690
|
+
function minVersion(range, loose) {
|
|
3691
|
+
range = new Range(range, loose);
|
|
3692
|
+
var minver = new SemVer('0.0.0');
|
|
3693
|
+
if (range.test(minver)) {
|
|
3694
|
+
return minver;
|
|
3695
|
+
}
|
|
3696
|
+
minver = new SemVer('0.0.0-0');
|
|
3697
|
+
if (range.test(minver)) {
|
|
3698
|
+
return minver;
|
|
3699
|
+
}
|
|
3700
|
+
minver = null;
|
|
3701
|
+
for(var i = 0; i < range.set.length; ++i){
|
|
3702
|
+
var comparators = range.set[i];
|
|
3703
|
+
comparators.forEach(function(comparator) {
|
|
3704
|
+
// Clone to avoid manipulating the comparator's semver object.
|
|
3705
|
+
var compver = new SemVer(comparator.semver.version);
|
|
3706
|
+
switch(comparator.operator){
|
|
3707
|
+
case '>':
|
|
3708
|
+
if (compver.prerelease.length === 0) {
|
|
3709
|
+
compver.patch++;
|
|
3710
|
+
} else {
|
|
3711
|
+
compver.prerelease.push(0);
|
|
3712
|
+
}
|
|
3713
|
+
compver.raw = compver.format();
|
|
3714
|
+
/* fallthrough */ case '':
|
|
3715
|
+
case '>=':
|
|
3716
|
+
if (!minver || gt(minver, compver)) {
|
|
3717
|
+
minver = compver;
|
|
3718
|
+
}
|
|
3719
|
+
break;
|
|
3720
|
+
case '<':
|
|
3721
|
+
case '<=':
|
|
3722
|
+
break;
|
|
3723
|
+
/* istanbul ignore next */ default:
|
|
3724
|
+
throw new Error('Unexpected operation: ' + comparator.operator);
|
|
3725
|
+
}
|
|
3726
|
+
});
|
|
3727
|
+
}
|
|
3728
|
+
if (minver && range.test(minver)) {
|
|
3729
|
+
return minver;
|
|
3730
|
+
}
|
|
3731
|
+
return null;
|
|
3732
|
+
}
|
|
3733
|
+
exports.validRange = validRange;
|
|
3734
|
+
function validRange(range, options) {
|
|
3735
|
+
try {
|
|
3736
|
+
// Return '*' instead of '' so that truthiness works.
|
|
3737
|
+
// This will throw if it's invalid anyway
|
|
3738
|
+
return new Range(range, options).range || '*';
|
|
3739
|
+
} catch (er) {
|
|
3740
|
+
return null;
|
|
3741
|
+
}
|
|
3742
|
+
}
|
|
3743
|
+
// Determine if version is less than all the versions possible in the range
|
|
3744
|
+
exports.ltr = ltr;
|
|
3745
|
+
function ltr(version, range, options) {
|
|
3746
|
+
return outside(version, range, '<', options);
|
|
3747
|
+
}
|
|
3748
|
+
// Determine if version is greater than all the versions possible in the range.
|
|
3749
|
+
exports.gtr = gtr;
|
|
3750
|
+
function gtr(version, range, options) {
|
|
3751
|
+
return outside(version, range, '>', options);
|
|
3752
|
+
}
|
|
3753
|
+
exports.outside = outside;
|
|
3754
|
+
function outside(version, range, hilo, options) {
|
|
3755
|
+
version = new SemVer(version, options);
|
|
3756
|
+
range = new Range(range, options);
|
|
3757
|
+
var gtfn, ltefn, ltfn, comp, ecomp;
|
|
3758
|
+
switch(hilo){
|
|
3759
|
+
case '>':
|
|
3760
|
+
gtfn = gt;
|
|
3761
|
+
ltefn = lte;
|
|
3762
|
+
ltfn = lt;
|
|
3763
|
+
comp = '>';
|
|
3764
|
+
ecomp = '>=';
|
|
3765
|
+
break;
|
|
3766
|
+
case '<':
|
|
3767
|
+
gtfn = lt;
|
|
3768
|
+
ltefn = gte;
|
|
3769
|
+
ltfn = gt;
|
|
3770
|
+
comp = '<';
|
|
3771
|
+
ecomp = '<=';
|
|
3772
|
+
break;
|
|
3773
|
+
default:
|
|
3774
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
3775
|
+
}
|
|
3776
|
+
// If it satisifes the range it is not outside
|
|
3777
|
+
if (satisfies(version, range, options)) {
|
|
3778
|
+
return false;
|
|
3779
|
+
}
|
|
3780
|
+
// From now on, variable terms are as if we're in "gtr" mode.
|
|
3781
|
+
// but note that everything is flipped for the "ltr" function.
|
|
3782
|
+
for(var i = 0; i < range.set.length; ++i){
|
|
3783
|
+
var comparators = range.set[i];
|
|
3784
|
+
var high = null;
|
|
3785
|
+
var low = null;
|
|
3786
|
+
comparators.forEach(function(comparator) {
|
|
3787
|
+
if (comparator.semver === ANY) {
|
|
3788
|
+
comparator = new Comparator('>=0.0.0');
|
|
3789
|
+
}
|
|
3790
|
+
high = high || comparator;
|
|
3791
|
+
low = low || comparator;
|
|
3792
|
+
if (gtfn(comparator.semver, high.semver, options)) {
|
|
3793
|
+
high = comparator;
|
|
3794
|
+
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
3795
|
+
low = comparator;
|
|
3796
|
+
}
|
|
3797
|
+
});
|
|
3798
|
+
// If the edge version comparator has a operator then our version
|
|
3799
|
+
// isn't outside it
|
|
3800
|
+
if (high.operator === comp || high.operator === ecomp) {
|
|
3801
|
+
return false;
|
|
3802
|
+
}
|
|
3803
|
+
// If the lowest version comparator has an operator and our version
|
|
3804
|
+
// is less than it then it isn't higher than the range
|
|
3805
|
+
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
|
|
3806
|
+
return false;
|
|
3807
|
+
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
|
3808
|
+
return false;
|
|
3809
|
+
}
|
|
3810
|
+
}
|
|
3811
|
+
return true;
|
|
3812
|
+
}
|
|
3813
|
+
exports.prerelease = prerelease;
|
|
3814
|
+
function prerelease(version, options) {
|
|
3815
|
+
var parsed = parse(version, options);
|
|
3816
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
3817
|
+
}
|
|
3818
|
+
exports.intersects = intersects;
|
|
3819
|
+
function intersects(r1, r2, options) {
|
|
3820
|
+
r1 = new Range(r1, options);
|
|
3821
|
+
r2 = new Range(r2, options);
|
|
3822
|
+
return r1.intersects(r2);
|
|
3823
|
+
}
|
|
3824
|
+
exports.coerce = coerce;
|
|
3825
|
+
function coerce(version) {
|
|
3826
|
+
if (_instanceof(version, SemVer)) {
|
|
3827
|
+
return version;
|
|
3828
|
+
}
|
|
3829
|
+
if (typeof version !== 'string') {
|
|
3830
|
+
return null;
|
|
3831
|
+
}
|
|
3832
|
+
var match = version.match(safeRe[COERCE]);
|
|
3833
|
+
if (match == null) {
|
|
3834
|
+
return null;
|
|
3835
|
+
}
|
|
3836
|
+
return parse(match[1] + '.' + (match[2] || '0') + '.' + (match[3] || '0'));
|
|
3837
|
+
}
|
|
3838
|
+
})(semver, semver.exports);
|
|
3839
|
+
return semver.exports;
|
|
3840
|
+
}
|
|
3841
|
+
|
|
3842
|
+
var parse_1;
|
|
3843
|
+
var hasRequiredParse;
|
|
3844
|
+
function requireParse() {
|
|
3845
|
+
if (hasRequiredParse) return parse_1;
|
|
3846
|
+
hasRequiredParse = 1;
|
|
3847
|
+
var path = require$$0$2;
|
|
3848
|
+
var niceTry = requireSrc$1();
|
|
3849
|
+
var resolveCommand = requireResolveCommand();
|
|
3850
|
+
var escape = require_escape();
|
|
3851
|
+
var readShebang = requireReadShebang();
|
|
3852
|
+
var semver = requireSemver();
|
|
3853
|
+
var isWin = process.platform === 'win32';
|
|
3854
|
+
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
3855
|
+
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
3856
|
+
// `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0
|
|
3857
|
+
var supportsShellOption = niceTry(function() {
|
|
3858
|
+
return semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true);
|
|
3859
|
+
}) || false;
|
|
3860
|
+
function detectShebang(parsed) {
|
|
3861
|
+
parsed.file = resolveCommand(parsed);
|
|
3862
|
+
var shebang = parsed.file && readShebang(parsed.file);
|
|
3863
|
+
if (shebang) {
|
|
3864
|
+
parsed.args.unshift(parsed.file);
|
|
3865
|
+
parsed.command = shebang;
|
|
3866
|
+
return resolveCommand(parsed);
|
|
3867
|
+
}
|
|
3868
|
+
return parsed.file;
|
|
3869
|
+
}
|
|
3870
|
+
function parseNonShell(parsed) {
|
|
3871
|
+
if (!isWin) {
|
|
3872
|
+
return parsed;
|
|
3873
|
+
}
|
|
3874
|
+
// Detect & add support for shebangs
|
|
3875
|
+
var commandFile = detectShebang(parsed);
|
|
3876
|
+
// We don't need a shell if the command filename is an executable
|
|
3877
|
+
var needsShell = !isExecutableRegExp.test(commandFile);
|
|
3878
|
+
// If a shell is required, use cmd.exe and take care of escaping everything correctly
|
|
3879
|
+
// Note that `forceShell` is an hidden option used only in tests
|
|
3880
|
+
if (parsed.options.forceShell || needsShell) {
|
|
3881
|
+
// Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
|
|
3882
|
+
// The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
|
|
3883
|
+
// Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
|
|
3884
|
+
// we need to double escape them
|
|
3885
|
+
var needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
3886
|
+
// Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
|
|
3887
|
+
// This is necessary otherwise it will always fail with ENOENT in those cases
|
|
3888
|
+
parsed.command = path.normalize(parsed.command);
|
|
3889
|
+
// Escape command & arguments
|
|
3890
|
+
parsed.command = escape.command(parsed.command);
|
|
3891
|
+
parsed.args = parsed.args.map(function(arg) {
|
|
3892
|
+
return escape.argument(arg, needsDoubleEscapeMetaChars);
|
|
3893
|
+
});
|
|
3894
|
+
var shellCommand = [
|
|
3895
|
+
parsed.command
|
|
3896
|
+
].concat(parsed.args).join(' ');
|
|
3897
|
+
parsed.args = [
|
|
3898
|
+
'/d',
|
|
3899
|
+
'/s',
|
|
3900
|
+
'/c',
|
|
3901
|
+
'"'.concat(shellCommand, '"')
|
|
3902
|
+
];
|
|
3903
|
+
parsed.command = process.env.comspec || 'cmd.exe';
|
|
3904
|
+
parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
|
|
3905
|
+
}
|
|
3906
|
+
return parsed;
|
|
3907
|
+
}
|
|
3908
|
+
function parseShell(parsed) {
|
|
3909
|
+
// If node supports the shell option, there's no need to mimic its behavior
|
|
3910
|
+
if (supportsShellOption) {
|
|
3911
|
+
return parsed;
|
|
3912
|
+
}
|
|
3913
|
+
// Mimic node shell option
|
|
3914
|
+
// See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335
|
|
3915
|
+
var shellCommand = [
|
|
3916
|
+
parsed.command
|
|
3917
|
+
].concat(parsed.args).join(' ');
|
|
3918
|
+
if (isWin) {
|
|
3919
|
+
parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe';
|
|
3920
|
+
parsed.args = [
|
|
3921
|
+
'/d',
|
|
3922
|
+
'/s',
|
|
3923
|
+
'/c',
|
|
3924
|
+
'"'.concat(shellCommand, '"')
|
|
3925
|
+
];
|
|
3926
|
+
parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
|
|
3927
|
+
} else {
|
|
3928
|
+
if (typeof parsed.options.shell === 'string') {
|
|
3929
|
+
parsed.command = parsed.options.shell;
|
|
3930
|
+
} else if (process.platform === 'android') {
|
|
3931
|
+
parsed.command = '/system/bin/sh';
|
|
3932
|
+
} else {
|
|
3933
|
+
parsed.command = '/bin/sh';
|
|
3934
|
+
}
|
|
3935
|
+
parsed.args = [
|
|
3936
|
+
'-c',
|
|
3937
|
+
shellCommand
|
|
3938
|
+
];
|
|
3939
|
+
}
|
|
3940
|
+
return parsed;
|
|
3941
|
+
}
|
|
3942
|
+
function parse(command, args, options) {
|
|
3943
|
+
// Normalize arguments, similar to nodejs
|
|
3944
|
+
if (args && !Array.isArray(args)) {
|
|
3945
|
+
options = args;
|
|
3946
|
+
args = null;
|
|
3947
|
+
}
|
|
3948
|
+
args = args ? args.slice(0) : []; // Clone array to avoid changing the original
|
|
3949
|
+
options = Object.assign({}, options); // Clone object to avoid changing the original
|
|
3950
|
+
// Build our parsed object
|
|
3951
|
+
var parsed = {
|
|
3952
|
+
command: command,
|
|
3953
|
+
args: args,
|
|
3954
|
+
options: options,
|
|
3955
|
+
file: undefined,
|
|
3956
|
+
original: {
|
|
3957
|
+
command: command,
|
|
3958
|
+
args: args
|
|
3959
|
+
}
|
|
3960
|
+
};
|
|
3961
|
+
// Delegate further parsing to shell or non-shell
|
|
3962
|
+
return options.shell ? parseShell(parsed) : parseNonShell(parsed);
|
|
3963
|
+
}
|
|
3964
|
+
parse_1 = parse;
|
|
3965
|
+
return parse_1;
|
|
3966
|
+
}
|
|
3967
|
+
|
|
3968
|
+
var enoent;
|
|
3969
|
+
var hasRequiredEnoent;
|
|
3970
|
+
function requireEnoent() {
|
|
3971
|
+
if (hasRequiredEnoent) return enoent;
|
|
3972
|
+
hasRequiredEnoent = 1;
|
|
3973
|
+
var isWin = process.platform === 'win32';
|
|
3974
|
+
function notFoundError(original, syscall) {
|
|
3975
|
+
return Object.assign(new Error("".concat(syscall, " ").concat(original.command, " ENOENT")), {
|
|
3976
|
+
code: 'ENOENT',
|
|
3977
|
+
errno: 'ENOENT',
|
|
3978
|
+
syscall: "".concat(syscall, " ").concat(original.command),
|
|
3979
|
+
path: original.command,
|
|
3980
|
+
spawnargs: original.args
|
|
3981
|
+
});
|
|
3982
|
+
}
|
|
3983
|
+
function hookChildProcess(cp, parsed) {
|
|
3984
|
+
if (!isWin) {
|
|
3985
|
+
return;
|
|
3986
|
+
}
|
|
3987
|
+
var originalEmit = cp.emit;
|
|
3988
|
+
cp.emit = function(name, arg1) {
|
|
3989
|
+
// If emitting "exit" event and exit code is 1, we need to check if
|
|
3990
|
+
// the command exists and emit an "error" instead
|
|
3991
|
+
// See https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
|
3992
|
+
if (name === 'exit') {
|
|
3993
|
+
var err = verifyENOENT(arg1, parsed);
|
|
3994
|
+
if (err) {
|
|
3995
|
+
return originalEmit.call(cp, 'error', err);
|
|
3996
|
+
}
|
|
3997
|
+
}
|
|
3998
|
+
return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
|
|
3999
|
+
};
|
|
4000
|
+
}
|
|
4001
|
+
function verifyENOENT(status, parsed) {
|
|
4002
|
+
if (isWin && status === 1 && !parsed.file) {
|
|
4003
|
+
return notFoundError(parsed.original, 'spawn');
|
|
4004
|
+
}
|
|
4005
|
+
return null;
|
|
4006
|
+
}
|
|
4007
|
+
function verifyENOENTSync(status, parsed) {
|
|
4008
|
+
if (isWin && status === 1 && !parsed.file) {
|
|
4009
|
+
return notFoundError(parsed.original, 'spawnSync');
|
|
4010
|
+
}
|
|
4011
|
+
return null;
|
|
4012
|
+
}
|
|
4013
|
+
enoent = {
|
|
4014
|
+
hookChildProcess: hookChildProcess,
|
|
4015
|
+
verifyENOENT: verifyENOENT,
|
|
4016
|
+
verifyENOENTSync: verifyENOENTSync,
|
|
4017
|
+
notFoundError: notFoundError
|
|
4018
|
+
};
|
|
4019
|
+
return enoent;
|
|
4020
|
+
}
|
|
4021
|
+
|
|
4022
|
+
var hasRequiredCrossSpawn;
|
|
4023
|
+
function requireCrossSpawn() {
|
|
4024
|
+
if (hasRequiredCrossSpawn) return crossSpawn.exports;
|
|
4025
|
+
hasRequiredCrossSpawn = 1;
|
|
4026
|
+
var cp = require$$0$3;
|
|
4027
|
+
var parse = requireParse();
|
|
4028
|
+
var enoent = requireEnoent();
|
|
4029
|
+
function spawn(command, args, options) {
|
|
4030
|
+
// Parse the arguments
|
|
4031
|
+
var parsed = parse(command, args, options);
|
|
4032
|
+
// Spawn the child process
|
|
4033
|
+
var spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
4034
|
+
// Hook into child process "exit" event to emit an error if the command
|
|
4035
|
+
// does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
|
4036
|
+
enoent.hookChildProcess(spawned, parsed);
|
|
4037
|
+
return spawned;
|
|
4038
|
+
}
|
|
4039
|
+
function spawnSync(command, args, options) {
|
|
4040
|
+
// Parse the arguments
|
|
4041
|
+
var parsed = parse(command, args, options);
|
|
4042
|
+
// Spawn the child process
|
|
4043
|
+
var result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
4044
|
+
// Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
|
4045
|
+
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
4046
|
+
return result;
|
|
4047
|
+
}
|
|
4048
|
+
crossSpawn.exports = spawn;
|
|
4049
|
+
crossSpawn.exports.spawn = spawn;
|
|
4050
|
+
crossSpawn.exports.sync = spawnSync;
|
|
4051
|
+
crossSpawn.exports._parse = parse;
|
|
4052
|
+
crossSpawn.exports._enoent = enoent;
|
|
4053
|
+
return crossSpawn.exports;
|
|
4054
|
+
}
|
|
4055
|
+
|
|
4056
|
+
var src;
|
|
4057
|
+
var hasRequiredSrc;
|
|
4058
|
+
function requireSrc() {
|
|
4059
|
+
if (hasRequiredSrc) return src;
|
|
4060
|
+
hasRequiredSrc = 1;
|
|
4061
|
+
requireAssign();
|
|
4062
|
+
requireKeys();
|
|
4063
|
+
requireFind();
|
|
4064
|
+
requireBufferV6Polyfill();
|
|
4065
|
+
var path = require$$0$2;
|
|
4066
|
+
if (!path.delimiter) {
|
|
4067
|
+
var isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE);
|
|
4068
|
+
path.delimiter = isWindows ? ';' : ':';
|
|
4069
|
+
}
|
|
4070
|
+
src = requireCrossSpawn();
|
|
4071
|
+
return src;
|
|
4072
|
+
}
|
|
4073
|
+
|
|
4074
|
+
var srcExports = requireSrc();
|
|
4075
|
+
var index = /*@__PURE__*/ getDefaultExportFromCjs(srcExports);
|
|
4076
|
+
|
|
4077
|
+
module.exports = index;
|