@sourcegraph/cody-web 0.32.11 → 0.32.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/dist/{agent.worker-Qda9Vtb_.mjs → agent.worker-DP5t54b3.mjs} +89 -38
- package/dist/agent.worker.js +2 -2
- package/dist/{git-log-DkGd4KuH.mjs → git-log-BWXBE9bQ.mjs} +1 -1
- package/dist/index.js +61 -8
- package/dist/{lite-IdTumKP8.mjs → lite-DCslm11Y.mjs} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/util-n4JO9qgH.mjs +2033 -0
- package/dist/{vscode-shim-B21LtK8E.mjs → vscode-shim-FP11UcS5.mjs} +65 -66
- package/package.json +17 -15
- package/dist/util-Bw-hmK0e.mjs +0 -1811
|
@@ -0,0 +1,2033 @@
|
|
|
1
|
+
import { c as commonjsGlobal } from "./vscode-shim-FP11UcS5.mjs";
|
|
2
|
+
function _mergeNamespaces(n, m) {
|
|
3
|
+
for (var i = 0; i < m.length; i++) {
|
|
4
|
+
const e = m[i];
|
|
5
|
+
if (typeof e !== "string" && !Array.isArray(e)) {
|
|
6
|
+
for (const k in e) {
|
|
7
|
+
if (k !== "default" && !(k in n)) {
|
|
8
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
9
|
+
if (d) {
|
|
10
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: () => e[k]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
|
20
|
+
}
|
|
21
|
+
var inherits_browser = { exports: {} };
|
|
22
|
+
if (typeof Object.create === "function") {
|
|
23
|
+
inherits_browser.exports = function inherits(ctor, superCtor) {
|
|
24
|
+
if (superCtor) {
|
|
25
|
+
ctor.super_ = superCtor;
|
|
26
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
|
27
|
+
constructor: {
|
|
28
|
+
value: ctor,
|
|
29
|
+
enumerable: false,
|
|
30
|
+
writable: true,
|
|
31
|
+
configurable: true
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
} else {
|
|
37
|
+
inherits_browser.exports = function inherits(ctor, superCtor) {
|
|
38
|
+
if (superCtor) {
|
|
39
|
+
ctor.super_ = superCtor;
|
|
40
|
+
var TempCtor = function() {
|
|
41
|
+
};
|
|
42
|
+
TempCtor.prototype = superCtor.prototype;
|
|
43
|
+
ctor.prototype = new TempCtor();
|
|
44
|
+
ctor.prototype.constructor = ctor;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
var inherits_browserExports = inherits_browser.exports;
|
|
49
|
+
var util$1 = {};
|
|
50
|
+
var types = {};
|
|
51
|
+
var shams$1;
|
|
52
|
+
var hasRequiredShams$1;
|
|
53
|
+
function requireShams$1() {
|
|
54
|
+
if (hasRequiredShams$1) return shams$1;
|
|
55
|
+
hasRequiredShams$1 = 1;
|
|
56
|
+
shams$1 = function hasSymbols2() {
|
|
57
|
+
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
if (typeof Symbol.iterator === "symbol") {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
var obj = {};
|
|
64
|
+
var sym = Symbol("test");
|
|
65
|
+
var symObj = Object(sym);
|
|
66
|
+
if (typeof sym === "string") {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
var symVal = 42;
|
|
76
|
+
obj[sym] = symVal;
|
|
77
|
+
for (sym in obj) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
87
|
+
if (syms.length !== 1 || syms[0] !== sym) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
if (typeof Object.getOwnPropertyDescriptor === "function") {
|
|
94
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
95
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return true;
|
|
100
|
+
};
|
|
101
|
+
return shams$1;
|
|
102
|
+
}
|
|
103
|
+
var shams;
|
|
104
|
+
var hasRequiredShams;
|
|
105
|
+
function requireShams() {
|
|
106
|
+
if (hasRequiredShams) return shams;
|
|
107
|
+
hasRequiredShams = 1;
|
|
108
|
+
var hasSymbols2 = requireShams$1();
|
|
109
|
+
shams = function hasToStringTagShams() {
|
|
110
|
+
return hasSymbols2() && !!Symbol.toStringTag;
|
|
111
|
+
};
|
|
112
|
+
return shams;
|
|
113
|
+
}
|
|
114
|
+
var esErrors;
|
|
115
|
+
var hasRequiredEsErrors;
|
|
116
|
+
function requireEsErrors() {
|
|
117
|
+
if (hasRequiredEsErrors) return esErrors;
|
|
118
|
+
hasRequiredEsErrors = 1;
|
|
119
|
+
esErrors = Error;
|
|
120
|
+
return esErrors;
|
|
121
|
+
}
|
|
122
|
+
var _eval;
|
|
123
|
+
var hasRequired_eval;
|
|
124
|
+
function require_eval() {
|
|
125
|
+
if (hasRequired_eval) return _eval;
|
|
126
|
+
hasRequired_eval = 1;
|
|
127
|
+
_eval = EvalError;
|
|
128
|
+
return _eval;
|
|
129
|
+
}
|
|
130
|
+
var range;
|
|
131
|
+
var hasRequiredRange;
|
|
132
|
+
function requireRange() {
|
|
133
|
+
if (hasRequiredRange) return range;
|
|
134
|
+
hasRequiredRange = 1;
|
|
135
|
+
range = RangeError;
|
|
136
|
+
return range;
|
|
137
|
+
}
|
|
138
|
+
var ref;
|
|
139
|
+
var hasRequiredRef;
|
|
140
|
+
function requireRef() {
|
|
141
|
+
if (hasRequiredRef) return ref;
|
|
142
|
+
hasRequiredRef = 1;
|
|
143
|
+
ref = ReferenceError;
|
|
144
|
+
return ref;
|
|
145
|
+
}
|
|
146
|
+
var syntax;
|
|
147
|
+
var hasRequiredSyntax;
|
|
148
|
+
function requireSyntax() {
|
|
149
|
+
if (hasRequiredSyntax) return syntax;
|
|
150
|
+
hasRequiredSyntax = 1;
|
|
151
|
+
syntax = SyntaxError;
|
|
152
|
+
return syntax;
|
|
153
|
+
}
|
|
154
|
+
var type;
|
|
155
|
+
var hasRequiredType;
|
|
156
|
+
function requireType() {
|
|
157
|
+
if (hasRequiredType) return type;
|
|
158
|
+
hasRequiredType = 1;
|
|
159
|
+
type = TypeError;
|
|
160
|
+
return type;
|
|
161
|
+
}
|
|
162
|
+
var uri;
|
|
163
|
+
var hasRequiredUri;
|
|
164
|
+
function requireUri() {
|
|
165
|
+
if (hasRequiredUri) return uri;
|
|
166
|
+
hasRequiredUri = 1;
|
|
167
|
+
uri = URIError;
|
|
168
|
+
return uri;
|
|
169
|
+
}
|
|
170
|
+
var hasSymbols;
|
|
171
|
+
var hasRequiredHasSymbols;
|
|
172
|
+
function requireHasSymbols() {
|
|
173
|
+
if (hasRequiredHasSymbols) return hasSymbols;
|
|
174
|
+
hasRequiredHasSymbols = 1;
|
|
175
|
+
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
176
|
+
var hasSymbolSham = requireShams$1();
|
|
177
|
+
hasSymbols = function hasNativeSymbols() {
|
|
178
|
+
if (typeof origSymbol !== "function") {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
if (typeof Symbol !== "function") {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
if (typeof origSymbol("foo") !== "symbol") {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
if (typeof Symbol("bar") !== "symbol") {
|
|
188
|
+
return false;
|
|
189
|
+
}
|
|
190
|
+
return hasSymbolSham();
|
|
191
|
+
};
|
|
192
|
+
return hasSymbols;
|
|
193
|
+
}
|
|
194
|
+
var hasProto;
|
|
195
|
+
var hasRequiredHasProto;
|
|
196
|
+
function requireHasProto() {
|
|
197
|
+
if (hasRequiredHasProto) return hasProto;
|
|
198
|
+
hasRequiredHasProto = 1;
|
|
199
|
+
var test = {
|
|
200
|
+
__proto__: null,
|
|
201
|
+
foo: {}
|
|
202
|
+
};
|
|
203
|
+
var $Object = Object;
|
|
204
|
+
hasProto = function hasProto2() {
|
|
205
|
+
return { __proto__: test }.foo === test.foo && !(test instanceof $Object);
|
|
206
|
+
};
|
|
207
|
+
return hasProto;
|
|
208
|
+
}
|
|
209
|
+
var implementation;
|
|
210
|
+
var hasRequiredImplementation;
|
|
211
|
+
function requireImplementation() {
|
|
212
|
+
if (hasRequiredImplementation) return implementation;
|
|
213
|
+
hasRequiredImplementation = 1;
|
|
214
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
215
|
+
var toStr = Object.prototype.toString;
|
|
216
|
+
var max = Math.max;
|
|
217
|
+
var funcType = "[object Function]";
|
|
218
|
+
var concatty = function concatty2(a, b) {
|
|
219
|
+
var arr = [];
|
|
220
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
221
|
+
arr[i] = a[i];
|
|
222
|
+
}
|
|
223
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
224
|
+
arr[j + a.length] = b[j];
|
|
225
|
+
}
|
|
226
|
+
return arr;
|
|
227
|
+
};
|
|
228
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
229
|
+
var arr = [];
|
|
230
|
+
for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
231
|
+
arr[j] = arrLike[i];
|
|
232
|
+
}
|
|
233
|
+
return arr;
|
|
234
|
+
};
|
|
235
|
+
var joiny = function(arr, joiner) {
|
|
236
|
+
var str = "";
|
|
237
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
238
|
+
str += arr[i];
|
|
239
|
+
if (i + 1 < arr.length) {
|
|
240
|
+
str += joiner;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return str;
|
|
244
|
+
};
|
|
245
|
+
implementation = function bind(that) {
|
|
246
|
+
var target = this;
|
|
247
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
248
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
249
|
+
}
|
|
250
|
+
var args = slicy(arguments, 1);
|
|
251
|
+
var bound;
|
|
252
|
+
var binder = function() {
|
|
253
|
+
if (this instanceof bound) {
|
|
254
|
+
var result = target.apply(
|
|
255
|
+
this,
|
|
256
|
+
concatty(args, arguments)
|
|
257
|
+
);
|
|
258
|
+
if (Object(result) === result) {
|
|
259
|
+
return result;
|
|
260
|
+
}
|
|
261
|
+
return this;
|
|
262
|
+
}
|
|
263
|
+
return target.apply(
|
|
264
|
+
that,
|
|
265
|
+
concatty(args, arguments)
|
|
266
|
+
);
|
|
267
|
+
};
|
|
268
|
+
var boundLength = max(0, target.length - args.length);
|
|
269
|
+
var boundArgs = [];
|
|
270
|
+
for (var i = 0; i < boundLength; i++) {
|
|
271
|
+
boundArgs[i] = "$" + i;
|
|
272
|
+
}
|
|
273
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
274
|
+
if (target.prototype) {
|
|
275
|
+
var Empty = function Empty2() {
|
|
276
|
+
};
|
|
277
|
+
Empty.prototype = target.prototype;
|
|
278
|
+
bound.prototype = new Empty();
|
|
279
|
+
Empty.prototype = null;
|
|
280
|
+
}
|
|
281
|
+
return bound;
|
|
282
|
+
};
|
|
283
|
+
return implementation;
|
|
284
|
+
}
|
|
285
|
+
var functionBind;
|
|
286
|
+
var hasRequiredFunctionBind;
|
|
287
|
+
function requireFunctionBind() {
|
|
288
|
+
if (hasRequiredFunctionBind) return functionBind;
|
|
289
|
+
hasRequiredFunctionBind = 1;
|
|
290
|
+
var implementation2 = requireImplementation();
|
|
291
|
+
functionBind = Function.prototype.bind || implementation2;
|
|
292
|
+
return functionBind;
|
|
293
|
+
}
|
|
294
|
+
var hasown;
|
|
295
|
+
var hasRequiredHasown;
|
|
296
|
+
function requireHasown() {
|
|
297
|
+
if (hasRequiredHasown) return hasown;
|
|
298
|
+
hasRequiredHasown = 1;
|
|
299
|
+
var call = Function.prototype.call;
|
|
300
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
301
|
+
var bind = requireFunctionBind();
|
|
302
|
+
hasown = bind.call(call, $hasOwn);
|
|
303
|
+
return hasown;
|
|
304
|
+
}
|
|
305
|
+
var getIntrinsic;
|
|
306
|
+
var hasRequiredGetIntrinsic;
|
|
307
|
+
function requireGetIntrinsic() {
|
|
308
|
+
if (hasRequiredGetIntrinsic) return getIntrinsic;
|
|
309
|
+
hasRequiredGetIntrinsic = 1;
|
|
310
|
+
var undefined$1;
|
|
311
|
+
var $Error = requireEsErrors();
|
|
312
|
+
var $EvalError = require_eval();
|
|
313
|
+
var $RangeError = requireRange();
|
|
314
|
+
var $ReferenceError = requireRef();
|
|
315
|
+
var $SyntaxError = requireSyntax();
|
|
316
|
+
var $TypeError = requireType();
|
|
317
|
+
var $URIError = requireUri();
|
|
318
|
+
var $Function = Function;
|
|
319
|
+
var getEvalledConstructor = function(expressionSyntax) {
|
|
320
|
+
try {
|
|
321
|
+
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
322
|
+
} catch (e) {
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
326
|
+
if ($gOPD) {
|
|
327
|
+
try {
|
|
328
|
+
$gOPD({}, "");
|
|
329
|
+
} catch (e) {
|
|
330
|
+
$gOPD = null;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
var throwTypeError = function() {
|
|
334
|
+
throw new $TypeError();
|
|
335
|
+
};
|
|
336
|
+
var ThrowTypeError = $gOPD ? function() {
|
|
337
|
+
try {
|
|
338
|
+
arguments.callee;
|
|
339
|
+
return throwTypeError;
|
|
340
|
+
} catch (calleeThrows) {
|
|
341
|
+
try {
|
|
342
|
+
return $gOPD(arguments, "callee").get;
|
|
343
|
+
} catch (gOPDthrows) {
|
|
344
|
+
return throwTypeError;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}() : throwTypeError;
|
|
348
|
+
var hasSymbols2 = requireHasSymbols()();
|
|
349
|
+
var hasProto2 = requireHasProto()();
|
|
350
|
+
var getProto = Object.getPrototypeOf || (hasProto2 ? function(x) {
|
|
351
|
+
return x.__proto__;
|
|
352
|
+
} : null);
|
|
353
|
+
var needsEval = {};
|
|
354
|
+
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
355
|
+
var INTRINSICS = {
|
|
356
|
+
__proto__: null,
|
|
357
|
+
"%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
|
|
358
|
+
"%Array%": Array,
|
|
359
|
+
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
|
|
360
|
+
"%ArrayIteratorPrototype%": hasSymbols2 && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
361
|
+
"%AsyncFromSyncIteratorPrototype%": undefined$1,
|
|
362
|
+
"%AsyncFunction%": needsEval,
|
|
363
|
+
"%AsyncGenerator%": needsEval,
|
|
364
|
+
"%AsyncGeneratorFunction%": needsEval,
|
|
365
|
+
"%AsyncIteratorPrototype%": needsEval,
|
|
366
|
+
"%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics,
|
|
367
|
+
"%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt,
|
|
368
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array,
|
|
369
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array,
|
|
370
|
+
"%Boolean%": Boolean,
|
|
371
|
+
"%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView,
|
|
372
|
+
"%Date%": Date,
|
|
373
|
+
"%decodeURI%": decodeURI,
|
|
374
|
+
"%decodeURIComponent%": decodeURIComponent,
|
|
375
|
+
"%encodeURI%": encodeURI,
|
|
376
|
+
"%encodeURIComponent%": encodeURIComponent,
|
|
377
|
+
"%Error%": $Error,
|
|
378
|
+
"%eval%": eval,
|
|
379
|
+
// eslint-disable-line no-eval
|
|
380
|
+
"%EvalError%": $EvalError,
|
|
381
|
+
"%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array,
|
|
382
|
+
"%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array,
|
|
383
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry,
|
|
384
|
+
"%Function%": $Function,
|
|
385
|
+
"%GeneratorFunction%": needsEval,
|
|
386
|
+
"%Int8Array%": typeof Int8Array === "undefined" ? undefined$1 : Int8Array,
|
|
387
|
+
"%Int16Array%": typeof Int16Array === "undefined" ? undefined$1 : Int16Array,
|
|
388
|
+
"%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
|
|
389
|
+
"%isFinite%": isFinite,
|
|
390
|
+
"%isNaN%": isNaN,
|
|
391
|
+
"%IteratorPrototype%": hasSymbols2 && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
392
|
+
"%JSON%": typeof JSON === "object" ? JSON : undefined$1,
|
|
393
|
+
"%Map%": typeof Map === "undefined" ? undefined$1 : Map,
|
|
394
|
+
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols2 || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
395
|
+
"%Math%": Math,
|
|
396
|
+
"%Number%": Number,
|
|
397
|
+
"%Object%": Object,
|
|
398
|
+
"%parseFloat%": parseFloat,
|
|
399
|
+
"%parseInt%": parseInt,
|
|
400
|
+
"%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise,
|
|
401
|
+
"%Proxy%": typeof Proxy === "undefined" ? undefined$1 : Proxy,
|
|
402
|
+
"%RangeError%": $RangeError,
|
|
403
|
+
"%ReferenceError%": $ReferenceError,
|
|
404
|
+
"%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
|
|
405
|
+
"%RegExp%": RegExp,
|
|
406
|
+
"%Set%": typeof Set === "undefined" ? undefined$1 : Set,
|
|
407
|
+
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols2 || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
408
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
|
|
409
|
+
"%String%": String,
|
|
410
|
+
"%StringIteratorPrototype%": hasSymbols2 && getProto ? getProto(""[Symbol.iterator]()) : undefined$1,
|
|
411
|
+
"%Symbol%": hasSymbols2 ? Symbol : undefined$1,
|
|
412
|
+
"%SyntaxError%": $SyntaxError,
|
|
413
|
+
"%ThrowTypeError%": ThrowTypeError,
|
|
414
|
+
"%TypedArray%": TypedArray,
|
|
415
|
+
"%TypeError%": $TypeError,
|
|
416
|
+
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined$1 : Uint8Array,
|
|
417
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined$1 : Uint8ClampedArray,
|
|
418
|
+
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined$1 : Uint16Array,
|
|
419
|
+
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined$1 : Uint32Array,
|
|
420
|
+
"%URIError%": $URIError,
|
|
421
|
+
"%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap,
|
|
422
|
+
"%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef,
|
|
423
|
+
"%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet
|
|
424
|
+
};
|
|
425
|
+
if (getProto) {
|
|
426
|
+
try {
|
|
427
|
+
null.error;
|
|
428
|
+
} catch (e) {
|
|
429
|
+
var errorProto = getProto(getProto(e));
|
|
430
|
+
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
var doEval = function doEval2(name) {
|
|
434
|
+
var value;
|
|
435
|
+
if (name === "%AsyncFunction%") {
|
|
436
|
+
value = getEvalledConstructor("async function () {}");
|
|
437
|
+
} else if (name === "%GeneratorFunction%") {
|
|
438
|
+
value = getEvalledConstructor("function* () {}");
|
|
439
|
+
} else if (name === "%AsyncGeneratorFunction%") {
|
|
440
|
+
value = getEvalledConstructor("async function* () {}");
|
|
441
|
+
} else if (name === "%AsyncGenerator%") {
|
|
442
|
+
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
443
|
+
if (fn) {
|
|
444
|
+
value = fn.prototype;
|
|
445
|
+
}
|
|
446
|
+
} else if (name === "%AsyncIteratorPrototype%") {
|
|
447
|
+
var gen = doEval2("%AsyncGenerator%");
|
|
448
|
+
if (gen && getProto) {
|
|
449
|
+
value = getProto(gen.prototype);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
INTRINSICS[name] = value;
|
|
453
|
+
return value;
|
|
454
|
+
};
|
|
455
|
+
var LEGACY_ALIASES = {
|
|
456
|
+
__proto__: null,
|
|
457
|
+
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
458
|
+
"%ArrayPrototype%": ["Array", "prototype"],
|
|
459
|
+
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
460
|
+
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
|
|
461
|
+
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
|
|
462
|
+
"%ArrayProto_values%": ["Array", "prototype", "values"],
|
|
463
|
+
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
464
|
+
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
465
|
+
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
|
|
466
|
+
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
467
|
+
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
468
|
+
"%DatePrototype%": ["Date", "prototype"],
|
|
469
|
+
"%ErrorPrototype%": ["Error", "prototype"],
|
|
470
|
+
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
471
|
+
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
472
|
+
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
473
|
+
"%FunctionPrototype%": ["Function", "prototype"],
|
|
474
|
+
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
475
|
+
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
|
|
476
|
+
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
477
|
+
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
478
|
+
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
479
|
+
"%JSONParse%": ["JSON", "parse"],
|
|
480
|
+
"%JSONStringify%": ["JSON", "stringify"],
|
|
481
|
+
"%MapPrototype%": ["Map", "prototype"],
|
|
482
|
+
"%NumberPrototype%": ["Number", "prototype"],
|
|
483
|
+
"%ObjectPrototype%": ["Object", "prototype"],
|
|
484
|
+
"%ObjProto_toString%": ["Object", "prototype", "toString"],
|
|
485
|
+
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
|
|
486
|
+
"%PromisePrototype%": ["Promise", "prototype"],
|
|
487
|
+
"%PromiseProto_then%": ["Promise", "prototype", "then"],
|
|
488
|
+
"%Promise_all%": ["Promise", "all"],
|
|
489
|
+
"%Promise_reject%": ["Promise", "reject"],
|
|
490
|
+
"%Promise_resolve%": ["Promise", "resolve"],
|
|
491
|
+
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
492
|
+
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
493
|
+
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
494
|
+
"%SetPrototype%": ["Set", "prototype"],
|
|
495
|
+
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
496
|
+
"%StringPrototype%": ["String", "prototype"],
|
|
497
|
+
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
498
|
+
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
499
|
+
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
500
|
+
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
501
|
+
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
502
|
+
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
503
|
+
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
504
|
+
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
505
|
+
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
506
|
+
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
507
|
+
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
508
|
+
};
|
|
509
|
+
var bind = requireFunctionBind();
|
|
510
|
+
var hasOwn = requireHasown();
|
|
511
|
+
var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
512
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
513
|
+
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
514
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
515
|
+
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
516
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
517
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
518
|
+
var stringToPath = function stringToPath2(string) {
|
|
519
|
+
var first = $strSlice(string, 0, 1);
|
|
520
|
+
var last = $strSlice(string, -1);
|
|
521
|
+
if (first === "%" && last !== "%") {
|
|
522
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
523
|
+
} else if (last === "%" && first !== "%") {
|
|
524
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
525
|
+
}
|
|
526
|
+
var result = [];
|
|
527
|
+
$replace(string, rePropName, function(match, number, quote, subString) {
|
|
528
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
|
|
529
|
+
});
|
|
530
|
+
return result;
|
|
531
|
+
};
|
|
532
|
+
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
533
|
+
var intrinsicName = name;
|
|
534
|
+
var alias;
|
|
535
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
536
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
537
|
+
intrinsicName = "%" + alias[0] + "%";
|
|
538
|
+
}
|
|
539
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
540
|
+
var value = INTRINSICS[intrinsicName];
|
|
541
|
+
if (value === needsEval) {
|
|
542
|
+
value = doEval(intrinsicName);
|
|
543
|
+
}
|
|
544
|
+
if (typeof value === "undefined" && !allowMissing) {
|
|
545
|
+
throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
546
|
+
}
|
|
547
|
+
return {
|
|
548
|
+
alias,
|
|
549
|
+
name: intrinsicName,
|
|
550
|
+
value
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
554
|
+
};
|
|
555
|
+
getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
556
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
557
|
+
throw new $TypeError("intrinsic name must be a non-empty string");
|
|
558
|
+
}
|
|
559
|
+
if (arguments.length > 1 && typeof allowMissing !== "boolean") {
|
|
560
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
561
|
+
}
|
|
562
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
563
|
+
throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
564
|
+
}
|
|
565
|
+
var parts = stringToPath(name);
|
|
566
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
567
|
+
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
568
|
+
var intrinsicRealName = intrinsic.name;
|
|
569
|
+
var value = intrinsic.value;
|
|
570
|
+
var skipFurtherCaching = false;
|
|
571
|
+
var alias = intrinsic.alias;
|
|
572
|
+
if (alias) {
|
|
573
|
+
intrinsicBaseName = alias[0];
|
|
574
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
575
|
+
}
|
|
576
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
577
|
+
var part = parts[i];
|
|
578
|
+
var first = $strSlice(part, 0, 1);
|
|
579
|
+
var last = $strSlice(part, -1);
|
|
580
|
+
if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
|
|
581
|
+
throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
582
|
+
}
|
|
583
|
+
if (part === "constructor" || !isOwn) {
|
|
584
|
+
skipFurtherCaching = true;
|
|
585
|
+
}
|
|
586
|
+
intrinsicBaseName += "." + part;
|
|
587
|
+
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
588
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
589
|
+
value = INTRINSICS[intrinsicRealName];
|
|
590
|
+
} else if (value != null) {
|
|
591
|
+
if (!(part in value)) {
|
|
592
|
+
if (!allowMissing) {
|
|
593
|
+
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
594
|
+
}
|
|
595
|
+
return void 0;
|
|
596
|
+
}
|
|
597
|
+
if ($gOPD && i + 1 >= parts.length) {
|
|
598
|
+
var desc = $gOPD(value, part);
|
|
599
|
+
isOwn = !!desc;
|
|
600
|
+
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
601
|
+
value = desc.get;
|
|
602
|
+
} else {
|
|
603
|
+
value = value[part];
|
|
604
|
+
}
|
|
605
|
+
} else {
|
|
606
|
+
isOwn = hasOwn(value, part);
|
|
607
|
+
value = value[part];
|
|
608
|
+
}
|
|
609
|
+
if (isOwn && !skipFurtherCaching) {
|
|
610
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
return value;
|
|
615
|
+
};
|
|
616
|
+
return getIntrinsic;
|
|
617
|
+
}
|
|
618
|
+
var callBind = { exports: {} };
|
|
619
|
+
var esDefineProperty;
|
|
620
|
+
var hasRequiredEsDefineProperty;
|
|
621
|
+
function requireEsDefineProperty() {
|
|
622
|
+
if (hasRequiredEsDefineProperty) return esDefineProperty;
|
|
623
|
+
hasRequiredEsDefineProperty = 1;
|
|
624
|
+
var GetIntrinsic = requireGetIntrinsic();
|
|
625
|
+
var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false;
|
|
626
|
+
if ($defineProperty) {
|
|
627
|
+
try {
|
|
628
|
+
$defineProperty({}, "a", { value: 1 });
|
|
629
|
+
} catch (e) {
|
|
630
|
+
$defineProperty = false;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
esDefineProperty = $defineProperty;
|
|
634
|
+
return esDefineProperty;
|
|
635
|
+
}
|
|
636
|
+
var gopd;
|
|
637
|
+
var hasRequiredGopd;
|
|
638
|
+
function requireGopd() {
|
|
639
|
+
if (hasRequiredGopd) return gopd;
|
|
640
|
+
hasRequiredGopd = 1;
|
|
641
|
+
var GetIntrinsic = requireGetIntrinsic();
|
|
642
|
+
var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
|
|
643
|
+
if ($gOPD) {
|
|
644
|
+
try {
|
|
645
|
+
$gOPD([], "length");
|
|
646
|
+
} catch (e) {
|
|
647
|
+
$gOPD = null;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
gopd = $gOPD;
|
|
651
|
+
return gopd;
|
|
652
|
+
}
|
|
653
|
+
var defineDataProperty;
|
|
654
|
+
var hasRequiredDefineDataProperty;
|
|
655
|
+
function requireDefineDataProperty() {
|
|
656
|
+
if (hasRequiredDefineDataProperty) return defineDataProperty;
|
|
657
|
+
hasRequiredDefineDataProperty = 1;
|
|
658
|
+
var $defineProperty = requireEsDefineProperty();
|
|
659
|
+
var $SyntaxError = requireSyntax();
|
|
660
|
+
var $TypeError = requireType();
|
|
661
|
+
var gopd2 = requireGopd();
|
|
662
|
+
defineDataProperty = function defineDataProperty2(obj, property, value) {
|
|
663
|
+
if (!obj || typeof obj !== "object" && typeof obj !== "function") {
|
|
664
|
+
throw new $TypeError("`obj` must be an object or a function`");
|
|
665
|
+
}
|
|
666
|
+
if (typeof property !== "string" && typeof property !== "symbol") {
|
|
667
|
+
throw new $TypeError("`property` must be a string or a symbol`");
|
|
668
|
+
}
|
|
669
|
+
if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
|
|
670
|
+
throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
|
|
671
|
+
}
|
|
672
|
+
if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
|
|
673
|
+
throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
|
|
674
|
+
}
|
|
675
|
+
if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
|
|
676
|
+
throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
|
|
677
|
+
}
|
|
678
|
+
if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
|
|
679
|
+
throw new $TypeError("`loose`, if provided, must be a boolean");
|
|
680
|
+
}
|
|
681
|
+
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
682
|
+
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
683
|
+
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
684
|
+
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
685
|
+
var desc = !!gopd2 && gopd2(obj, property);
|
|
686
|
+
if ($defineProperty) {
|
|
687
|
+
$defineProperty(obj, property, {
|
|
688
|
+
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
689
|
+
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
690
|
+
value,
|
|
691
|
+
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
692
|
+
});
|
|
693
|
+
} else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
|
|
694
|
+
obj[property] = value;
|
|
695
|
+
} else {
|
|
696
|
+
throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
697
|
+
}
|
|
698
|
+
};
|
|
699
|
+
return defineDataProperty;
|
|
700
|
+
}
|
|
701
|
+
var hasPropertyDescriptors_1;
|
|
702
|
+
var hasRequiredHasPropertyDescriptors;
|
|
703
|
+
function requireHasPropertyDescriptors() {
|
|
704
|
+
if (hasRequiredHasPropertyDescriptors) return hasPropertyDescriptors_1;
|
|
705
|
+
hasRequiredHasPropertyDescriptors = 1;
|
|
706
|
+
var $defineProperty = requireEsDefineProperty();
|
|
707
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors2() {
|
|
708
|
+
return !!$defineProperty;
|
|
709
|
+
};
|
|
710
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
711
|
+
if (!$defineProperty) {
|
|
712
|
+
return null;
|
|
713
|
+
}
|
|
714
|
+
try {
|
|
715
|
+
return $defineProperty([], "length", { value: 1 }).length !== 1;
|
|
716
|
+
} catch (e) {
|
|
717
|
+
return true;
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
721
|
+
return hasPropertyDescriptors_1;
|
|
722
|
+
}
|
|
723
|
+
var setFunctionLength;
|
|
724
|
+
var hasRequiredSetFunctionLength;
|
|
725
|
+
function requireSetFunctionLength() {
|
|
726
|
+
if (hasRequiredSetFunctionLength) return setFunctionLength;
|
|
727
|
+
hasRequiredSetFunctionLength = 1;
|
|
728
|
+
var GetIntrinsic = requireGetIntrinsic();
|
|
729
|
+
var define = requireDefineDataProperty();
|
|
730
|
+
var hasDescriptors = requireHasPropertyDescriptors()();
|
|
731
|
+
var gOPD = requireGopd();
|
|
732
|
+
var $TypeError = requireType();
|
|
733
|
+
var $floor = GetIntrinsic("%Math.floor%");
|
|
734
|
+
setFunctionLength = function setFunctionLength2(fn, length) {
|
|
735
|
+
if (typeof fn !== "function") {
|
|
736
|
+
throw new $TypeError("`fn` is not a function");
|
|
737
|
+
}
|
|
738
|
+
if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
|
|
739
|
+
throw new $TypeError("`length` must be a positive 32-bit integer");
|
|
740
|
+
}
|
|
741
|
+
var loose = arguments.length > 2 && !!arguments[2];
|
|
742
|
+
var functionLengthIsConfigurable = true;
|
|
743
|
+
var functionLengthIsWritable = true;
|
|
744
|
+
if ("length" in fn && gOPD) {
|
|
745
|
+
var desc = gOPD(fn, "length");
|
|
746
|
+
if (desc && !desc.configurable) {
|
|
747
|
+
functionLengthIsConfigurable = false;
|
|
748
|
+
}
|
|
749
|
+
if (desc && !desc.writable) {
|
|
750
|
+
functionLengthIsWritable = false;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
754
|
+
if (hasDescriptors) {
|
|
755
|
+
define(
|
|
756
|
+
/** @type {Parameters<define>[0]} */
|
|
757
|
+
fn,
|
|
758
|
+
"length",
|
|
759
|
+
length,
|
|
760
|
+
true,
|
|
761
|
+
true
|
|
762
|
+
);
|
|
763
|
+
} else {
|
|
764
|
+
define(
|
|
765
|
+
/** @type {Parameters<define>[0]} */
|
|
766
|
+
fn,
|
|
767
|
+
"length",
|
|
768
|
+
length
|
|
769
|
+
);
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
return fn;
|
|
773
|
+
};
|
|
774
|
+
return setFunctionLength;
|
|
775
|
+
}
|
|
776
|
+
var hasRequiredCallBind;
|
|
777
|
+
function requireCallBind() {
|
|
778
|
+
if (hasRequiredCallBind) return callBind.exports;
|
|
779
|
+
hasRequiredCallBind = 1;
|
|
780
|
+
(function(module) {
|
|
781
|
+
var bind = requireFunctionBind();
|
|
782
|
+
var GetIntrinsic = requireGetIntrinsic();
|
|
783
|
+
var setFunctionLength2 = requireSetFunctionLength();
|
|
784
|
+
var $TypeError = requireType();
|
|
785
|
+
var $apply = GetIntrinsic("%Function.prototype.apply%");
|
|
786
|
+
var $call = GetIntrinsic("%Function.prototype.call%");
|
|
787
|
+
var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
|
|
788
|
+
var $defineProperty = requireEsDefineProperty();
|
|
789
|
+
var $max = GetIntrinsic("%Math.max%");
|
|
790
|
+
module.exports = function callBind2(originalFunction) {
|
|
791
|
+
if (typeof originalFunction !== "function") {
|
|
792
|
+
throw new $TypeError("a function is required");
|
|
793
|
+
}
|
|
794
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
795
|
+
return setFunctionLength2(
|
|
796
|
+
func,
|
|
797
|
+
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
|
798
|
+
true
|
|
799
|
+
);
|
|
800
|
+
};
|
|
801
|
+
var applyBind = function applyBind2() {
|
|
802
|
+
return $reflectApply(bind, $apply, arguments);
|
|
803
|
+
};
|
|
804
|
+
if ($defineProperty) {
|
|
805
|
+
$defineProperty(module.exports, "apply", { value: applyBind });
|
|
806
|
+
} else {
|
|
807
|
+
module.exports.apply = applyBind;
|
|
808
|
+
}
|
|
809
|
+
})(callBind);
|
|
810
|
+
return callBind.exports;
|
|
811
|
+
}
|
|
812
|
+
var callBound;
|
|
813
|
+
var hasRequiredCallBound;
|
|
814
|
+
function requireCallBound() {
|
|
815
|
+
if (hasRequiredCallBound) return callBound;
|
|
816
|
+
hasRequiredCallBound = 1;
|
|
817
|
+
var GetIntrinsic = requireGetIntrinsic();
|
|
818
|
+
var callBind2 = requireCallBind();
|
|
819
|
+
var $indexOf = callBind2(GetIntrinsic("String.prototype.indexOf"));
|
|
820
|
+
callBound = function callBoundIntrinsic(name, allowMissing) {
|
|
821
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
822
|
+
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
|
823
|
+
return callBind2(intrinsic);
|
|
824
|
+
}
|
|
825
|
+
return intrinsic;
|
|
826
|
+
};
|
|
827
|
+
return callBound;
|
|
828
|
+
}
|
|
829
|
+
var isArguments;
|
|
830
|
+
var hasRequiredIsArguments;
|
|
831
|
+
function requireIsArguments() {
|
|
832
|
+
if (hasRequiredIsArguments) return isArguments;
|
|
833
|
+
hasRequiredIsArguments = 1;
|
|
834
|
+
var hasToStringTag = requireShams()();
|
|
835
|
+
var callBound2 = requireCallBound();
|
|
836
|
+
var $toString = callBound2("Object.prototype.toString");
|
|
837
|
+
var isStandardArguments = function isArguments2(value) {
|
|
838
|
+
if (hasToStringTag && value && typeof value === "object" && Symbol.toStringTag in value) {
|
|
839
|
+
return false;
|
|
840
|
+
}
|
|
841
|
+
return $toString(value) === "[object Arguments]";
|
|
842
|
+
};
|
|
843
|
+
var isLegacyArguments = function isArguments2(value) {
|
|
844
|
+
if (isStandardArguments(value)) {
|
|
845
|
+
return true;
|
|
846
|
+
}
|
|
847
|
+
return value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && $toString(value) !== "[object Array]" && $toString(value.callee) === "[object Function]";
|
|
848
|
+
};
|
|
849
|
+
var supportsStandardArguments = function() {
|
|
850
|
+
return isStandardArguments(arguments);
|
|
851
|
+
}();
|
|
852
|
+
isStandardArguments.isLegacyArguments = isLegacyArguments;
|
|
853
|
+
isArguments = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
|
|
854
|
+
return isArguments;
|
|
855
|
+
}
|
|
856
|
+
var isGeneratorFunction;
|
|
857
|
+
var hasRequiredIsGeneratorFunction;
|
|
858
|
+
function requireIsGeneratorFunction() {
|
|
859
|
+
if (hasRequiredIsGeneratorFunction) return isGeneratorFunction;
|
|
860
|
+
hasRequiredIsGeneratorFunction = 1;
|
|
861
|
+
var toStr = Object.prototype.toString;
|
|
862
|
+
var fnToStr = Function.prototype.toString;
|
|
863
|
+
var isFnRegex = /^\s*(?:function)?\*/;
|
|
864
|
+
var hasToStringTag = requireShams()();
|
|
865
|
+
var getProto = Object.getPrototypeOf;
|
|
866
|
+
var getGeneratorFunc = function() {
|
|
867
|
+
if (!hasToStringTag) {
|
|
868
|
+
return false;
|
|
869
|
+
}
|
|
870
|
+
try {
|
|
871
|
+
return Function("return function*() {}")();
|
|
872
|
+
} catch (e) {
|
|
873
|
+
}
|
|
874
|
+
};
|
|
875
|
+
var GeneratorFunction;
|
|
876
|
+
isGeneratorFunction = function isGeneratorFunction2(fn) {
|
|
877
|
+
if (typeof fn !== "function") {
|
|
878
|
+
return false;
|
|
879
|
+
}
|
|
880
|
+
if (isFnRegex.test(fnToStr.call(fn))) {
|
|
881
|
+
return true;
|
|
882
|
+
}
|
|
883
|
+
if (!hasToStringTag) {
|
|
884
|
+
var str = toStr.call(fn);
|
|
885
|
+
return str === "[object GeneratorFunction]";
|
|
886
|
+
}
|
|
887
|
+
if (!getProto) {
|
|
888
|
+
return false;
|
|
889
|
+
}
|
|
890
|
+
if (typeof GeneratorFunction === "undefined") {
|
|
891
|
+
var generatorFunc = getGeneratorFunc();
|
|
892
|
+
GeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;
|
|
893
|
+
}
|
|
894
|
+
return getProto(fn) === GeneratorFunction;
|
|
895
|
+
};
|
|
896
|
+
return isGeneratorFunction;
|
|
897
|
+
}
|
|
898
|
+
var isCallable;
|
|
899
|
+
var hasRequiredIsCallable;
|
|
900
|
+
function requireIsCallable() {
|
|
901
|
+
if (hasRequiredIsCallable) return isCallable;
|
|
902
|
+
hasRequiredIsCallable = 1;
|
|
903
|
+
var fnToStr = Function.prototype.toString;
|
|
904
|
+
var reflectApply = typeof Reflect === "object" && Reflect !== null && Reflect.apply;
|
|
905
|
+
var badArrayLike;
|
|
906
|
+
var isCallableMarker;
|
|
907
|
+
if (typeof reflectApply === "function" && typeof Object.defineProperty === "function") {
|
|
908
|
+
try {
|
|
909
|
+
badArrayLike = Object.defineProperty({}, "length", {
|
|
910
|
+
get: function() {
|
|
911
|
+
throw isCallableMarker;
|
|
912
|
+
}
|
|
913
|
+
});
|
|
914
|
+
isCallableMarker = {};
|
|
915
|
+
reflectApply(function() {
|
|
916
|
+
throw 42;
|
|
917
|
+
}, null, badArrayLike);
|
|
918
|
+
} catch (_) {
|
|
919
|
+
if (_ !== isCallableMarker) {
|
|
920
|
+
reflectApply = null;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
} else {
|
|
924
|
+
reflectApply = null;
|
|
925
|
+
}
|
|
926
|
+
var constructorRegex = /^\s*class\b/;
|
|
927
|
+
var isES6ClassFn = function isES6ClassFunction(value) {
|
|
928
|
+
try {
|
|
929
|
+
var fnStr = fnToStr.call(value);
|
|
930
|
+
return constructorRegex.test(fnStr);
|
|
931
|
+
} catch (e) {
|
|
932
|
+
return false;
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
var tryFunctionObject = function tryFunctionToStr(value) {
|
|
936
|
+
try {
|
|
937
|
+
if (isES6ClassFn(value)) {
|
|
938
|
+
return false;
|
|
939
|
+
}
|
|
940
|
+
fnToStr.call(value);
|
|
941
|
+
return true;
|
|
942
|
+
} catch (e) {
|
|
943
|
+
return false;
|
|
944
|
+
}
|
|
945
|
+
};
|
|
946
|
+
var toStr = Object.prototype.toString;
|
|
947
|
+
var objectClass = "[object Object]";
|
|
948
|
+
var fnClass = "[object Function]";
|
|
949
|
+
var genClass = "[object GeneratorFunction]";
|
|
950
|
+
var ddaClass = "[object HTMLAllCollection]";
|
|
951
|
+
var ddaClass2 = "[object HTML document.all class]";
|
|
952
|
+
var ddaClass3 = "[object HTMLCollection]";
|
|
953
|
+
var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag;
|
|
954
|
+
var isIE68 = !(0 in [,]);
|
|
955
|
+
var isDDA = function isDocumentDotAll() {
|
|
956
|
+
return false;
|
|
957
|
+
};
|
|
958
|
+
if (typeof document === "object") {
|
|
959
|
+
var all = document.all;
|
|
960
|
+
if (toStr.call(all) === toStr.call(document.all)) {
|
|
961
|
+
isDDA = function isDocumentDotAll(value) {
|
|
962
|
+
if ((isIE68 || !value) && (typeof value === "undefined" || typeof value === "object")) {
|
|
963
|
+
try {
|
|
964
|
+
var str = toStr.call(value);
|
|
965
|
+
return (str === ddaClass || str === ddaClass2 || str === ddaClass3 || str === objectClass) && value("") == null;
|
|
966
|
+
} catch (e) {
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
return false;
|
|
970
|
+
};
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
isCallable = reflectApply ? function isCallable2(value) {
|
|
974
|
+
if (isDDA(value)) {
|
|
975
|
+
return true;
|
|
976
|
+
}
|
|
977
|
+
if (!value) {
|
|
978
|
+
return false;
|
|
979
|
+
}
|
|
980
|
+
if (typeof value !== "function" && typeof value !== "object") {
|
|
981
|
+
return false;
|
|
982
|
+
}
|
|
983
|
+
try {
|
|
984
|
+
reflectApply(value, null, badArrayLike);
|
|
985
|
+
} catch (e) {
|
|
986
|
+
if (e !== isCallableMarker) {
|
|
987
|
+
return false;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
return !isES6ClassFn(value) && tryFunctionObject(value);
|
|
991
|
+
} : function isCallable2(value) {
|
|
992
|
+
if (isDDA(value)) {
|
|
993
|
+
return true;
|
|
994
|
+
}
|
|
995
|
+
if (!value) {
|
|
996
|
+
return false;
|
|
997
|
+
}
|
|
998
|
+
if (typeof value !== "function" && typeof value !== "object") {
|
|
999
|
+
return false;
|
|
1000
|
+
}
|
|
1001
|
+
if (hasToStringTag) {
|
|
1002
|
+
return tryFunctionObject(value);
|
|
1003
|
+
}
|
|
1004
|
+
if (isES6ClassFn(value)) {
|
|
1005
|
+
return false;
|
|
1006
|
+
}
|
|
1007
|
+
var strClass = toStr.call(value);
|
|
1008
|
+
if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) {
|
|
1009
|
+
return false;
|
|
1010
|
+
}
|
|
1011
|
+
return tryFunctionObject(value);
|
|
1012
|
+
};
|
|
1013
|
+
return isCallable;
|
|
1014
|
+
}
|
|
1015
|
+
var forEach_1;
|
|
1016
|
+
var hasRequiredForEach;
|
|
1017
|
+
function requireForEach() {
|
|
1018
|
+
if (hasRequiredForEach) return forEach_1;
|
|
1019
|
+
hasRequiredForEach = 1;
|
|
1020
|
+
var isCallable2 = requireIsCallable();
|
|
1021
|
+
var toStr = Object.prototype.toString;
|
|
1022
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1023
|
+
var forEachArray = function forEachArray2(array, iterator, receiver) {
|
|
1024
|
+
for (var i = 0, len = array.length; i < len; i++) {
|
|
1025
|
+
if (hasOwnProperty.call(array, i)) {
|
|
1026
|
+
if (receiver == null) {
|
|
1027
|
+
iterator(array[i], i, array);
|
|
1028
|
+
} else {
|
|
1029
|
+
iterator.call(receiver, array[i], i, array);
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
};
|
|
1034
|
+
var forEachString = function forEachString2(string, iterator, receiver) {
|
|
1035
|
+
for (var i = 0, len = string.length; i < len; i++) {
|
|
1036
|
+
if (receiver == null) {
|
|
1037
|
+
iterator(string.charAt(i), i, string);
|
|
1038
|
+
} else {
|
|
1039
|
+
iterator.call(receiver, string.charAt(i), i, string);
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
};
|
|
1043
|
+
var forEachObject = function forEachObject2(object, iterator, receiver) {
|
|
1044
|
+
for (var k in object) {
|
|
1045
|
+
if (hasOwnProperty.call(object, k)) {
|
|
1046
|
+
if (receiver == null) {
|
|
1047
|
+
iterator(object[k], k, object);
|
|
1048
|
+
} else {
|
|
1049
|
+
iterator.call(receiver, object[k], k, object);
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
};
|
|
1054
|
+
var forEach = function forEach2(list, iterator, thisArg) {
|
|
1055
|
+
if (!isCallable2(iterator)) {
|
|
1056
|
+
throw new TypeError("iterator must be a function");
|
|
1057
|
+
}
|
|
1058
|
+
var receiver;
|
|
1059
|
+
if (arguments.length >= 3) {
|
|
1060
|
+
receiver = thisArg;
|
|
1061
|
+
}
|
|
1062
|
+
if (toStr.call(list) === "[object Array]") {
|
|
1063
|
+
forEachArray(list, iterator, receiver);
|
|
1064
|
+
} else if (typeof list === "string") {
|
|
1065
|
+
forEachString(list, iterator, receiver);
|
|
1066
|
+
} else {
|
|
1067
|
+
forEachObject(list, iterator, receiver);
|
|
1068
|
+
}
|
|
1069
|
+
};
|
|
1070
|
+
forEach_1 = forEach;
|
|
1071
|
+
return forEach_1;
|
|
1072
|
+
}
|
|
1073
|
+
var possibleTypedArrayNames;
|
|
1074
|
+
var hasRequiredPossibleTypedArrayNames;
|
|
1075
|
+
function requirePossibleTypedArrayNames() {
|
|
1076
|
+
if (hasRequiredPossibleTypedArrayNames) return possibleTypedArrayNames;
|
|
1077
|
+
hasRequiredPossibleTypedArrayNames = 1;
|
|
1078
|
+
possibleTypedArrayNames = [
|
|
1079
|
+
"Float32Array",
|
|
1080
|
+
"Float64Array",
|
|
1081
|
+
"Int8Array",
|
|
1082
|
+
"Int16Array",
|
|
1083
|
+
"Int32Array",
|
|
1084
|
+
"Uint8Array",
|
|
1085
|
+
"Uint8ClampedArray",
|
|
1086
|
+
"Uint16Array",
|
|
1087
|
+
"Uint32Array",
|
|
1088
|
+
"BigInt64Array",
|
|
1089
|
+
"BigUint64Array"
|
|
1090
|
+
];
|
|
1091
|
+
return possibleTypedArrayNames;
|
|
1092
|
+
}
|
|
1093
|
+
var availableTypedArrays;
|
|
1094
|
+
var hasRequiredAvailableTypedArrays;
|
|
1095
|
+
function requireAvailableTypedArrays() {
|
|
1096
|
+
if (hasRequiredAvailableTypedArrays) return availableTypedArrays;
|
|
1097
|
+
hasRequiredAvailableTypedArrays = 1;
|
|
1098
|
+
var possibleNames = requirePossibleTypedArrayNames();
|
|
1099
|
+
var g = typeof globalThis === "undefined" ? commonjsGlobal : globalThis;
|
|
1100
|
+
availableTypedArrays = function availableTypedArrays2() {
|
|
1101
|
+
var out = [];
|
|
1102
|
+
for (var i = 0; i < possibleNames.length; i++) {
|
|
1103
|
+
if (typeof g[possibleNames[i]] === "function") {
|
|
1104
|
+
out[out.length] = possibleNames[i];
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
return out;
|
|
1108
|
+
};
|
|
1109
|
+
return availableTypedArrays;
|
|
1110
|
+
}
|
|
1111
|
+
var whichTypedArray;
|
|
1112
|
+
var hasRequiredWhichTypedArray;
|
|
1113
|
+
function requireWhichTypedArray() {
|
|
1114
|
+
if (hasRequiredWhichTypedArray) return whichTypedArray;
|
|
1115
|
+
hasRequiredWhichTypedArray = 1;
|
|
1116
|
+
var forEach = requireForEach();
|
|
1117
|
+
var availableTypedArrays2 = requireAvailableTypedArrays();
|
|
1118
|
+
var callBind2 = requireCallBind();
|
|
1119
|
+
var callBound2 = requireCallBound();
|
|
1120
|
+
var gOPD = requireGopd();
|
|
1121
|
+
var $toString = callBound2("Object.prototype.toString");
|
|
1122
|
+
var hasToStringTag = requireShams()();
|
|
1123
|
+
var g = typeof globalThis === "undefined" ? commonjsGlobal : globalThis;
|
|
1124
|
+
var typedArrays = availableTypedArrays2();
|
|
1125
|
+
var $slice = callBound2("String.prototype.slice");
|
|
1126
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
|
1127
|
+
var $indexOf = callBound2("Array.prototype.indexOf", true) || function indexOf(array, value) {
|
|
1128
|
+
for (var i = 0; i < array.length; i += 1) {
|
|
1129
|
+
if (array[i] === value) {
|
|
1130
|
+
return i;
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
return -1;
|
|
1134
|
+
};
|
|
1135
|
+
var cache = { __proto__: null };
|
|
1136
|
+
if (hasToStringTag && gOPD && getPrototypeOf) {
|
|
1137
|
+
forEach(typedArrays, function(typedArray) {
|
|
1138
|
+
var arr = new g[typedArray]();
|
|
1139
|
+
if (Symbol.toStringTag in arr) {
|
|
1140
|
+
var proto = getPrototypeOf(arr);
|
|
1141
|
+
var descriptor = gOPD(proto, Symbol.toStringTag);
|
|
1142
|
+
if (!descriptor) {
|
|
1143
|
+
var superProto = getPrototypeOf(proto);
|
|
1144
|
+
descriptor = gOPD(superProto, Symbol.toStringTag);
|
|
1145
|
+
}
|
|
1146
|
+
cache["$" + typedArray] = callBind2(descriptor.get);
|
|
1147
|
+
}
|
|
1148
|
+
});
|
|
1149
|
+
} else {
|
|
1150
|
+
forEach(typedArrays, function(typedArray) {
|
|
1151
|
+
var arr = new g[typedArray]();
|
|
1152
|
+
var fn = arr.slice || arr.set;
|
|
1153
|
+
if (fn) {
|
|
1154
|
+
cache["$" + typedArray] = callBind2(fn);
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
var tryTypedArrays = function tryAllTypedArrays(value) {
|
|
1159
|
+
var found = false;
|
|
1160
|
+
forEach(
|
|
1161
|
+
// eslint-disable-next-line no-extra-parens
|
|
1162
|
+
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
1163
|
+
/** @type {any} */
|
|
1164
|
+
cache,
|
|
1165
|
+
/** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
1166
|
+
function(getter, typedArray) {
|
|
1167
|
+
if (!found) {
|
|
1168
|
+
try {
|
|
1169
|
+
if ("$" + getter(value) === typedArray) {
|
|
1170
|
+
found = $slice(typedArray, 1);
|
|
1171
|
+
}
|
|
1172
|
+
} catch (e) {
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
return found;
|
|
1178
|
+
};
|
|
1179
|
+
var trySlices = function tryAllSlices(value) {
|
|
1180
|
+
var found = false;
|
|
1181
|
+
forEach(
|
|
1182
|
+
// eslint-disable-next-line no-extra-parens
|
|
1183
|
+
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
1184
|
+
/** @type {any} */
|
|
1185
|
+
cache,
|
|
1186
|
+
/** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
1187
|
+
function(getter, name) {
|
|
1188
|
+
if (!found) {
|
|
1189
|
+
try {
|
|
1190
|
+
getter(value);
|
|
1191
|
+
found = $slice(name, 1);
|
|
1192
|
+
} catch (e) {
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
);
|
|
1197
|
+
return found;
|
|
1198
|
+
};
|
|
1199
|
+
whichTypedArray = function whichTypedArray2(value) {
|
|
1200
|
+
if (!value || typeof value !== "object") {
|
|
1201
|
+
return false;
|
|
1202
|
+
}
|
|
1203
|
+
if (!hasToStringTag) {
|
|
1204
|
+
var tag = $slice($toString(value), 8, -1);
|
|
1205
|
+
if ($indexOf(typedArrays, tag) > -1) {
|
|
1206
|
+
return tag;
|
|
1207
|
+
}
|
|
1208
|
+
if (tag !== "Object") {
|
|
1209
|
+
return false;
|
|
1210
|
+
}
|
|
1211
|
+
return trySlices(value);
|
|
1212
|
+
}
|
|
1213
|
+
if (!gOPD) {
|
|
1214
|
+
return null;
|
|
1215
|
+
}
|
|
1216
|
+
return tryTypedArrays(value);
|
|
1217
|
+
};
|
|
1218
|
+
return whichTypedArray;
|
|
1219
|
+
}
|
|
1220
|
+
var isTypedArray;
|
|
1221
|
+
var hasRequiredIsTypedArray;
|
|
1222
|
+
function requireIsTypedArray() {
|
|
1223
|
+
if (hasRequiredIsTypedArray) return isTypedArray;
|
|
1224
|
+
hasRequiredIsTypedArray = 1;
|
|
1225
|
+
var whichTypedArray2 = requireWhichTypedArray();
|
|
1226
|
+
isTypedArray = function isTypedArray2(value) {
|
|
1227
|
+
return !!whichTypedArray2(value);
|
|
1228
|
+
};
|
|
1229
|
+
return isTypedArray;
|
|
1230
|
+
}
|
|
1231
|
+
var hasRequiredTypes;
|
|
1232
|
+
function requireTypes() {
|
|
1233
|
+
if (hasRequiredTypes) return types;
|
|
1234
|
+
hasRequiredTypes = 1;
|
|
1235
|
+
(function(exports) {
|
|
1236
|
+
var isArgumentsObject = requireIsArguments();
|
|
1237
|
+
var isGeneratorFunction2 = requireIsGeneratorFunction();
|
|
1238
|
+
var whichTypedArray2 = requireWhichTypedArray();
|
|
1239
|
+
var isTypedArray2 = requireIsTypedArray();
|
|
1240
|
+
function uncurryThis(f) {
|
|
1241
|
+
return f.call.bind(f);
|
|
1242
|
+
}
|
|
1243
|
+
var BigIntSupported = typeof BigInt !== "undefined";
|
|
1244
|
+
var SymbolSupported = typeof Symbol !== "undefined";
|
|
1245
|
+
var ObjectToString = uncurryThis(Object.prototype.toString);
|
|
1246
|
+
var numberValue = uncurryThis(Number.prototype.valueOf);
|
|
1247
|
+
var stringValue = uncurryThis(String.prototype.valueOf);
|
|
1248
|
+
var booleanValue = uncurryThis(Boolean.prototype.valueOf);
|
|
1249
|
+
if (BigIntSupported) {
|
|
1250
|
+
var bigIntValue = uncurryThis(BigInt.prototype.valueOf);
|
|
1251
|
+
}
|
|
1252
|
+
if (SymbolSupported) {
|
|
1253
|
+
var symbolValue = uncurryThis(Symbol.prototype.valueOf);
|
|
1254
|
+
}
|
|
1255
|
+
function checkBoxedPrimitive(value, prototypeValueOf) {
|
|
1256
|
+
if (typeof value !== "object") {
|
|
1257
|
+
return false;
|
|
1258
|
+
}
|
|
1259
|
+
try {
|
|
1260
|
+
prototypeValueOf(value);
|
|
1261
|
+
return true;
|
|
1262
|
+
} catch (e) {
|
|
1263
|
+
return false;
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
exports.isArgumentsObject = isArgumentsObject;
|
|
1267
|
+
exports.isGeneratorFunction = isGeneratorFunction2;
|
|
1268
|
+
exports.isTypedArray = isTypedArray2;
|
|
1269
|
+
function isPromise(input) {
|
|
1270
|
+
return typeof Promise !== "undefined" && input instanceof Promise || input !== null && typeof input === "object" && typeof input.then === "function" && typeof input.catch === "function";
|
|
1271
|
+
}
|
|
1272
|
+
exports.isPromise = isPromise;
|
|
1273
|
+
function isArrayBufferView(value) {
|
|
1274
|
+
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
|
|
1275
|
+
return ArrayBuffer.isView(value);
|
|
1276
|
+
}
|
|
1277
|
+
return isTypedArray2(value) || isDataView(value);
|
|
1278
|
+
}
|
|
1279
|
+
exports.isArrayBufferView = isArrayBufferView;
|
|
1280
|
+
function isUint8Array(value) {
|
|
1281
|
+
return whichTypedArray2(value) === "Uint8Array";
|
|
1282
|
+
}
|
|
1283
|
+
exports.isUint8Array = isUint8Array;
|
|
1284
|
+
function isUint8ClampedArray(value) {
|
|
1285
|
+
return whichTypedArray2(value) === "Uint8ClampedArray";
|
|
1286
|
+
}
|
|
1287
|
+
exports.isUint8ClampedArray = isUint8ClampedArray;
|
|
1288
|
+
function isUint16Array(value) {
|
|
1289
|
+
return whichTypedArray2(value) === "Uint16Array";
|
|
1290
|
+
}
|
|
1291
|
+
exports.isUint16Array = isUint16Array;
|
|
1292
|
+
function isUint32Array(value) {
|
|
1293
|
+
return whichTypedArray2(value) === "Uint32Array";
|
|
1294
|
+
}
|
|
1295
|
+
exports.isUint32Array = isUint32Array;
|
|
1296
|
+
function isInt8Array(value) {
|
|
1297
|
+
return whichTypedArray2(value) === "Int8Array";
|
|
1298
|
+
}
|
|
1299
|
+
exports.isInt8Array = isInt8Array;
|
|
1300
|
+
function isInt16Array(value) {
|
|
1301
|
+
return whichTypedArray2(value) === "Int16Array";
|
|
1302
|
+
}
|
|
1303
|
+
exports.isInt16Array = isInt16Array;
|
|
1304
|
+
function isInt32Array(value) {
|
|
1305
|
+
return whichTypedArray2(value) === "Int32Array";
|
|
1306
|
+
}
|
|
1307
|
+
exports.isInt32Array = isInt32Array;
|
|
1308
|
+
function isFloat32Array(value) {
|
|
1309
|
+
return whichTypedArray2(value) === "Float32Array";
|
|
1310
|
+
}
|
|
1311
|
+
exports.isFloat32Array = isFloat32Array;
|
|
1312
|
+
function isFloat64Array(value) {
|
|
1313
|
+
return whichTypedArray2(value) === "Float64Array";
|
|
1314
|
+
}
|
|
1315
|
+
exports.isFloat64Array = isFloat64Array;
|
|
1316
|
+
function isBigInt64Array(value) {
|
|
1317
|
+
return whichTypedArray2(value) === "BigInt64Array";
|
|
1318
|
+
}
|
|
1319
|
+
exports.isBigInt64Array = isBigInt64Array;
|
|
1320
|
+
function isBigUint64Array(value) {
|
|
1321
|
+
return whichTypedArray2(value) === "BigUint64Array";
|
|
1322
|
+
}
|
|
1323
|
+
exports.isBigUint64Array = isBigUint64Array;
|
|
1324
|
+
function isMapToString(value) {
|
|
1325
|
+
return ObjectToString(value) === "[object Map]";
|
|
1326
|
+
}
|
|
1327
|
+
isMapToString.working = typeof Map !== "undefined" && isMapToString(/* @__PURE__ */ new Map());
|
|
1328
|
+
function isMap(value) {
|
|
1329
|
+
if (typeof Map === "undefined") {
|
|
1330
|
+
return false;
|
|
1331
|
+
}
|
|
1332
|
+
return isMapToString.working ? isMapToString(value) : value instanceof Map;
|
|
1333
|
+
}
|
|
1334
|
+
exports.isMap = isMap;
|
|
1335
|
+
function isSetToString(value) {
|
|
1336
|
+
return ObjectToString(value) === "[object Set]";
|
|
1337
|
+
}
|
|
1338
|
+
isSetToString.working = typeof Set !== "undefined" && isSetToString(/* @__PURE__ */ new Set());
|
|
1339
|
+
function isSet(value) {
|
|
1340
|
+
if (typeof Set === "undefined") {
|
|
1341
|
+
return false;
|
|
1342
|
+
}
|
|
1343
|
+
return isSetToString.working ? isSetToString(value) : value instanceof Set;
|
|
1344
|
+
}
|
|
1345
|
+
exports.isSet = isSet;
|
|
1346
|
+
function isWeakMapToString(value) {
|
|
1347
|
+
return ObjectToString(value) === "[object WeakMap]";
|
|
1348
|
+
}
|
|
1349
|
+
isWeakMapToString.working = typeof WeakMap !== "undefined" && isWeakMapToString(/* @__PURE__ */ new WeakMap());
|
|
1350
|
+
function isWeakMap(value) {
|
|
1351
|
+
if (typeof WeakMap === "undefined") {
|
|
1352
|
+
return false;
|
|
1353
|
+
}
|
|
1354
|
+
return isWeakMapToString.working ? isWeakMapToString(value) : value instanceof WeakMap;
|
|
1355
|
+
}
|
|
1356
|
+
exports.isWeakMap = isWeakMap;
|
|
1357
|
+
function isWeakSetToString(value) {
|
|
1358
|
+
return ObjectToString(value) === "[object WeakSet]";
|
|
1359
|
+
}
|
|
1360
|
+
isWeakSetToString.working = typeof WeakSet !== "undefined" && isWeakSetToString(/* @__PURE__ */ new WeakSet());
|
|
1361
|
+
function isWeakSet(value) {
|
|
1362
|
+
return isWeakSetToString(value);
|
|
1363
|
+
}
|
|
1364
|
+
exports.isWeakSet = isWeakSet;
|
|
1365
|
+
function isArrayBufferToString(value) {
|
|
1366
|
+
return ObjectToString(value) === "[object ArrayBuffer]";
|
|
1367
|
+
}
|
|
1368
|
+
isArrayBufferToString.working = typeof ArrayBuffer !== "undefined" && isArrayBufferToString(new ArrayBuffer());
|
|
1369
|
+
function isArrayBuffer(value) {
|
|
1370
|
+
if (typeof ArrayBuffer === "undefined") {
|
|
1371
|
+
return false;
|
|
1372
|
+
}
|
|
1373
|
+
return isArrayBufferToString.working ? isArrayBufferToString(value) : value instanceof ArrayBuffer;
|
|
1374
|
+
}
|
|
1375
|
+
exports.isArrayBuffer = isArrayBuffer;
|
|
1376
|
+
function isDataViewToString(value) {
|
|
1377
|
+
return ObjectToString(value) === "[object DataView]";
|
|
1378
|
+
}
|
|
1379
|
+
isDataViewToString.working = typeof ArrayBuffer !== "undefined" && typeof DataView !== "undefined" && isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1));
|
|
1380
|
+
function isDataView(value) {
|
|
1381
|
+
if (typeof DataView === "undefined") {
|
|
1382
|
+
return false;
|
|
1383
|
+
}
|
|
1384
|
+
return isDataViewToString.working ? isDataViewToString(value) : value instanceof DataView;
|
|
1385
|
+
}
|
|
1386
|
+
exports.isDataView = isDataView;
|
|
1387
|
+
var SharedArrayBufferCopy = typeof SharedArrayBuffer !== "undefined" ? SharedArrayBuffer : void 0;
|
|
1388
|
+
function isSharedArrayBufferToString(value) {
|
|
1389
|
+
return ObjectToString(value) === "[object SharedArrayBuffer]";
|
|
1390
|
+
}
|
|
1391
|
+
function isSharedArrayBuffer(value) {
|
|
1392
|
+
if (typeof SharedArrayBufferCopy === "undefined") {
|
|
1393
|
+
return false;
|
|
1394
|
+
}
|
|
1395
|
+
if (typeof isSharedArrayBufferToString.working === "undefined") {
|
|
1396
|
+
isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());
|
|
1397
|
+
}
|
|
1398
|
+
return isSharedArrayBufferToString.working ? isSharedArrayBufferToString(value) : value instanceof SharedArrayBufferCopy;
|
|
1399
|
+
}
|
|
1400
|
+
exports.isSharedArrayBuffer = isSharedArrayBuffer;
|
|
1401
|
+
function isAsyncFunction(value) {
|
|
1402
|
+
return ObjectToString(value) === "[object AsyncFunction]";
|
|
1403
|
+
}
|
|
1404
|
+
exports.isAsyncFunction = isAsyncFunction;
|
|
1405
|
+
function isMapIterator(value) {
|
|
1406
|
+
return ObjectToString(value) === "[object Map Iterator]";
|
|
1407
|
+
}
|
|
1408
|
+
exports.isMapIterator = isMapIterator;
|
|
1409
|
+
function isSetIterator(value) {
|
|
1410
|
+
return ObjectToString(value) === "[object Set Iterator]";
|
|
1411
|
+
}
|
|
1412
|
+
exports.isSetIterator = isSetIterator;
|
|
1413
|
+
function isGeneratorObject(value) {
|
|
1414
|
+
return ObjectToString(value) === "[object Generator]";
|
|
1415
|
+
}
|
|
1416
|
+
exports.isGeneratorObject = isGeneratorObject;
|
|
1417
|
+
function isWebAssemblyCompiledModule(value) {
|
|
1418
|
+
return ObjectToString(value) === "[object WebAssembly.Module]";
|
|
1419
|
+
}
|
|
1420
|
+
exports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;
|
|
1421
|
+
function isNumberObject(value) {
|
|
1422
|
+
return checkBoxedPrimitive(value, numberValue);
|
|
1423
|
+
}
|
|
1424
|
+
exports.isNumberObject = isNumberObject;
|
|
1425
|
+
function isStringObject(value) {
|
|
1426
|
+
return checkBoxedPrimitive(value, stringValue);
|
|
1427
|
+
}
|
|
1428
|
+
exports.isStringObject = isStringObject;
|
|
1429
|
+
function isBooleanObject(value) {
|
|
1430
|
+
return checkBoxedPrimitive(value, booleanValue);
|
|
1431
|
+
}
|
|
1432
|
+
exports.isBooleanObject = isBooleanObject;
|
|
1433
|
+
function isBigIntObject(value) {
|
|
1434
|
+
return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);
|
|
1435
|
+
}
|
|
1436
|
+
exports.isBigIntObject = isBigIntObject;
|
|
1437
|
+
function isSymbolObject(value) {
|
|
1438
|
+
return SymbolSupported && checkBoxedPrimitive(value, symbolValue);
|
|
1439
|
+
}
|
|
1440
|
+
exports.isSymbolObject = isSymbolObject;
|
|
1441
|
+
function isBoxedPrimitive(value) {
|
|
1442
|
+
return isNumberObject(value) || isStringObject(value) || isBooleanObject(value) || isBigIntObject(value) || isSymbolObject(value);
|
|
1443
|
+
}
|
|
1444
|
+
exports.isBoxedPrimitive = isBoxedPrimitive;
|
|
1445
|
+
function isAnyArrayBuffer(value) {
|
|
1446
|
+
return typeof Uint8Array !== "undefined" && (isArrayBuffer(value) || isSharedArrayBuffer(value));
|
|
1447
|
+
}
|
|
1448
|
+
exports.isAnyArrayBuffer = isAnyArrayBuffer;
|
|
1449
|
+
["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(method) {
|
|
1450
|
+
Object.defineProperty(exports, method, {
|
|
1451
|
+
enumerable: false,
|
|
1452
|
+
value: function() {
|
|
1453
|
+
throw new Error(method + " is not supported in userland");
|
|
1454
|
+
}
|
|
1455
|
+
});
|
|
1456
|
+
});
|
|
1457
|
+
})(types);
|
|
1458
|
+
return types;
|
|
1459
|
+
}
|
|
1460
|
+
var isBufferBrowser;
|
|
1461
|
+
var hasRequiredIsBufferBrowser;
|
|
1462
|
+
function requireIsBufferBrowser() {
|
|
1463
|
+
if (hasRequiredIsBufferBrowser) return isBufferBrowser;
|
|
1464
|
+
hasRequiredIsBufferBrowser = 1;
|
|
1465
|
+
isBufferBrowser = function isBuffer(arg) {
|
|
1466
|
+
return arg && typeof arg === "object" && typeof arg.copy === "function" && typeof arg.fill === "function" && typeof arg.readUInt8 === "function";
|
|
1467
|
+
};
|
|
1468
|
+
return isBufferBrowser;
|
|
1469
|
+
}
|
|
1470
|
+
var hasRequiredUtil;
|
|
1471
|
+
function requireUtil() {
|
|
1472
|
+
if (hasRequiredUtil) return util$1;
|
|
1473
|
+
hasRequiredUtil = 1;
|
|
1474
|
+
(function(exports) {
|
|
1475
|
+
var define_process_default = { env: {} };
|
|
1476
|
+
var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors2(obj) {
|
|
1477
|
+
var keys = Object.keys(obj);
|
|
1478
|
+
var descriptors = {};
|
|
1479
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1480
|
+
descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
|
|
1481
|
+
}
|
|
1482
|
+
return descriptors;
|
|
1483
|
+
};
|
|
1484
|
+
var formatRegExp = /%[sdj%]/g;
|
|
1485
|
+
exports.format = function(f) {
|
|
1486
|
+
if (!isString(f)) {
|
|
1487
|
+
var objects = [];
|
|
1488
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1489
|
+
objects.push(inspect(arguments[i]));
|
|
1490
|
+
}
|
|
1491
|
+
return objects.join(" ");
|
|
1492
|
+
}
|
|
1493
|
+
var i = 1;
|
|
1494
|
+
var args = arguments;
|
|
1495
|
+
var len = args.length;
|
|
1496
|
+
var str = String(f).replace(formatRegExp, function(x2) {
|
|
1497
|
+
if (x2 === "%%") return "%";
|
|
1498
|
+
if (i >= len) return x2;
|
|
1499
|
+
switch (x2) {
|
|
1500
|
+
case "%s":
|
|
1501
|
+
return String(args[i++]);
|
|
1502
|
+
case "%d":
|
|
1503
|
+
return Number(args[i++]);
|
|
1504
|
+
case "%j":
|
|
1505
|
+
try {
|
|
1506
|
+
return JSON.stringify(args[i++]);
|
|
1507
|
+
} catch (_) {
|
|
1508
|
+
return "[Circular]";
|
|
1509
|
+
}
|
|
1510
|
+
default:
|
|
1511
|
+
return x2;
|
|
1512
|
+
}
|
|
1513
|
+
});
|
|
1514
|
+
for (var x = args[i]; i < len; x = args[++i]) {
|
|
1515
|
+
if (isNull(x) || !isObject(x)) {
|
|
1516
|
+
str += " " + x;
|
|
1517
|
+
} else {
|
|
1518
|
+
str += " " + inspect(x);
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
return str;
|
|
1522
|
+
};
|
|
1523
|
+
exports.deprecate = function(fn, msg) {
|
|
1524
|
+
if (typeof define_process_default !== "undefined" && define_process_default.noDeprecation === true) {
|
|
1525
|
+
return fn;
|
|
1526
|
+
}
|
|
1527
|
+
if (typeof define_process_default === "undefined") {
|
|
1528
|
+
return function() {
|
|
1529
|
+
return exports.deprecate(fn, msg).apply(this, arguments);
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1532
|
+
var warned = false;
|
|
1533
|
+
function deprecated() {
|
|
1534
|
+
if (!warned) {
|
|
1535
|
+
if (define_process_default.throwDeprecation) {
|
|
1536
|
+
throw new Error(msg);
|
|
1537
|
+
} else if (define_process_default.traceDeprecation) {
|
|
1538
|
+
console.trace(msg);
|
|
1539
|
+
} else {
|
|
1540
|
+
console.error(msg);
|
|
1541
|
+
}
|
|
1542
|
+
warned = true;
|
|
1543
|
+
}
|
|
1544
|
+
return fn.apply(this, arguments);
|
|
1545
|
+
}
|
|
1546
|
+
return deprecated;
|
|
1547
|
+
};
|
|
1548
|
+
var debugs = {};
|
|
1549
|
+
var debugEnvRegex = /^$/;
|
|
1550
|
+
exports.debuglog = function(set) {
|
|
1551
|
+
set = set.toUpperCase();
|
|
1552
|
+
if (!debugs[set]) {
|
|
1553
|
+
if (debugEnvRegex.test(set)) {
|
|
1554
|
+
var pid = define_process_default.pid;
|
|
1555
|
+
debugs[set] = function() {
|
|
1556
|
+
var msg = exports.format.apply(exports, arguments);
|
|
1557
|
+
console.error("%s %d: %s", set, pid, msg);
|
|
1558
|
+
};
|
|
1559
|
+
} else {
|
|
1560
|
+
debugs[set] = function() {
|
|
1561
|
+
};
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
return debugs[set];
|
|
1565
|
+
};
|
|
1566
|
+
function inspect(obj, opts) {
|
|
1567
|
+
var ctx = {
|
|
1568
|
+
seen: [],
|
|
1569
|
+
stylize: stylizeNoColor
|
|
1570
|
+
};
|
|
1571
|
+
if (arguments.length >= 3) ctx.depth = arguments[2];
|
|
1572
|
+
if (arguments.length >= 4) ctx.colors = arguments[3];
|
|
1573
|
+
if (isBoolean(opts)) {
|
|
1574
|
+
ctx.showHidden = opts;
|
|
1575
|
+
} else if (opts) {
|
|
1576
|
+
exports._extend(ctx, opts);
|
|
1577
|
+
}
|
|
1578
|
+
if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
|
|
1579
|
+
if (isUndefined(ctx.depth)) ctx.depth = 2;
|
|
1580
|
+
if (isUndefined(ctx.colors)) ctx.colors = false;
|
|
1581
|
+
if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
|
|
1582
|
+
if (ctx.colors) ctx.stylize = stylizeWithColor;
|
|
1583
|
+
return formatValue(ctx, obj, ctx.depth);
|
|
1584
|
+
}
|
|
1585
|
+
exports.inspect = inspect;
|
|
1586
|
+
inspect.colors = {
|
|
1587
|
+
"bold": [1, 22],
|
|
1588
|
+
"italic": [3, 23],
|
|
1589
|
+
"underline": [4, 24],
|
|
1590
|
+
"inverse": [7, 27],
|
|
1591
|
+
"white": [37, 39],
|
|
1592
|
+
"grey": [90, 39],
|
|
1593
|
+
"black": [30, 39],
|
|
1594
|
+
"blue": [34, 39],
|
|
1595
|
+
"cyan": [36, 39],
|
|
1596
|
+
"green": [32, 39],
|
|
1597
|
+
"magenta": [35, 39],
|
|
1598
|
+
"red": [31, 39],
|
|
1599
|
+
"yellow": [33, 39]
|
|
1600
|
+
};
|
|
1601
|
+
inspect.styles = {
|
|
1602
|
+
"special": "cyan",
|
|
1603
|
+
"number": "yellow",
|
|
1604
|
+
"boolean": "yellow",
|
|
1605
|
+
"undefined": "grey",
|
|
1606
|
+
"null": "bold",
|
|
1607
|
+
"string": "green",
|
|
1608
|
+
"date": "magenta",
|
|
1609
|
+
// "name": intentionally not styling
|
|
1610
|
+
"regexp": "red"
|
|
1611
|
+
};
|
|
1612
|
+
function stylizeWithColor(str, styleType) {
|
|
1613
|
+
var style = inspect.styles[styleType];
|
|
1614
|
+
if (style) {
|
|
1615
|
+
return "\x1B[" + inspect.colors[style][0] + "m" + str + "\x1B[" + inspect.colors[style][1] + "m";
|
|
1616
|
+
} else {
|
|
1617
|
+
return str;
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
function stylizeNoColor(str, styleType) {
|
|
1621
|
+
return str;
|
|
1622
|
+
}
|
|
1623
|
+
function arrayToHash(array) {
|
|
1624
|
+
var hash = {};
|
|
1625
|
+
array.forEach(function(val, idx) {
|
|
1626
|
+
hash[val] = true;
|
|
1627
|
+
});
|
|
1628
|
+
return hash;
|
|
1629
|
+
}
|
|
1630
|
+
function formatValue(ctx, value, recurseTimes) {
|
|
1631
|
+
if (ctx.customInspect && value && isFunction(value.inspect) && // Filter out the util module, it's inspect function is special
|
|
1632
|
+
value.inspect !== exports.inspect && // Also filter out any prototype objects using the circular check.
|
|
1633
|
+
!(value.constructor && value.constructor.prototype === value)) {
|
|
1634
|
+
var ret = value.inspect(recurseTimes, ctx);
|
|
1635
|
+
if (!isString(ret)) {
|
|
1636
|
+
ret = formatValue(ctx, ret, recurseTimes);
|
|
1637
|
+
}
|
|
1638
|
+
return ret;
|
|
1639
|
+
}
|
|
1640
|
+
var primitive = formatPrimitive(ctx, value);
|
|
1641
|
+
if (primitive) {
|
|
1642
|
+
return primitive;
|
|
1643
|
+
}
|
|
1644
|
+
var keys = Object.keys(value);
|
|
1645
|
+
var visibleKeys = arrayToHash(keys);
|
|
1646
|
+
if (ctx.showHidden) {
|
|
1647
|
+
keys = Object.getOwnPropertyNames(value);
|
|
1648
|
+
}
|
|
1649
|
+
if (isError(value) && (keys.indexOf("message") >= 0 || keys.indexOf("description") >= 0)) {
|
|
1650
|
+
return formatError(value);
|
|
1651
|
+
}
|
|
1652
|
+
if (keys.length === 0) {
|
|
1653
|
+
if (isFunction(value)) {
|
|
1654
|
+
var name = value.name ? ": " + value.name : "";
|
|
1655
|
+
return ctx.stylize("[Function" + name + "]", "special");
|
|
1656
|
+
}
|
|
1657
|
+
if (isRegExp(value)) {
|
|
1658
|
+
return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
|
|
1659
|
+
}
|
|
1660
|
+
if (isDate(value)) {
|
|
1661
|
+
return ctx.stylize(Date.prototype.toString.call(value), "date");
|
|
1662
|
+
}
|
|
1663
|
+
if (isError(value)) {
|
|
1664
|
+
return formatError(value);
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
var base = "", array = false, braces = ["{", "}"];
|
|
1668
|
+
if (isArray(value)) {
|
|
1669
|
+
array = true;
|
|
1670
|
+
braces = ["[", "]"];
|
|
1671
|
+
}
|
|
1672
|
+
if (isFunction(value)) {
|
|
1673
|
+
var n = value.name ? ": " + value.name : "";
|
|
1674
|
+
base = " [Function" + n + "]";
|
|
1675
|
+
}
|
|
1676
|
+
if (isRegExp(value)) {
|
|
1677
|
+
base = " " + RegExp.prototype.toString.call(value);
|
|
1678
|
+
}
|
|
1679
|
+
if (isDate(value)) {
|
|
1680
|
+
base = " " + Date.prototype.toUTCString.call(value);
|
|
1681
|
+
}
|
|
1682
|
+
if (isError(value)) {
|
|
1683
|
+
base = " " + formatError(value);
|
|
1684
|
+
}
|
|
1685
|
+
if (keys.length === 0 && (!array || value.length == 0)) {
|
|
1686
|
+
return braces[0] + base + braces[1];
|
|
1687
|
+
}
|
|
1688
|
+
if (recurseTimes < 0) {
|
|
1689
|
+
if (isRegExp(value)) {
|
|
1690
|
+
return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
|
|
1691
|
+
} else {
|
|
1692
|
+
return ctx.stylize("[Object]", "special");
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
ctx.seen.push(value);
|
|
1696
|
+
var output;
|
|
1697
|
+
if (array) {
|
|
1698
|
+
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
|
|
1699
|
+
} else {
|
|
1700
|
+
output = keys.map(function(key) {
|
|
1701
|
+
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
ctx.seen.pop();
|
|
1705
|
+
return reduceToSingleString(output, base, braces);
|
|
1706
|
+
}
|
|
1707
|
+
function formatPrimitive(ctx, value) {
|
|
1708
|
+
if (isUndefined(value))
|
|
1709
|
+
return ctx.stylize("undefined", "undefined");
|
|
1710
|
+
if (isString(value)) {
|
|
1711
|
+
var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
1712
|
+
return ctx.stylize(simple, "string");
|
|
1713
|
+
}
|
|
1714
|
+
if (isNumber(value))
|
|
1715
|
+
return ctx.stylize("" + value, "number");
|
|
1716
|
+
if (isBoolean(value))
|
|
1717
|
+
return ctx.stylize("" + value, "boolean");
|
|
1718
|
+
if (isNull(value))
|
|
1719
|
+
return ctx.stylize("null", "null");
|
|
1720
|
+
}
|
|
1721
|
+
function formatError(value) {
|
|
1722
|
+
return "[" + Error.prototype.toString.call(value) + "]";
|
|
1723
|
+
}
|
|
1724
|
+
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
|
1725
|
+
var output = [];
|
|
1726
|
+
for (var i = 0, l = value.length; i < l; ++i) {
|
|
1727
|
+
if (hasOwnProperty(value, String(i))) {
|
|
1728
|
+
output.push(formatProperty(
|
|
1729
|
+
ctx,
|
|
1730
|
+
value,
|
|
1731
|
+
recurseTimes,
|
|
1732
|
+
visibleKeys,
|
|
1733
|
+
String(i),
|
|
1734
|
+
true
|
|
1735
|
+
));
|
|
1736
|
+
} else {
|
|
1737
|
+
output.push("");
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
keys.forEach(function(key) {
|
|
1741
|
+
if (!key.match(/^\d+$/)) {
|
|
1742
|
+
output.push(formatProperty(
|
|
1743
|
+
ctx,
|
|
1744
|
+
value,
|
|
1745
|
+
recurseTimes,
|
|
1746
|
+
visibleKeys,
|
|
1747
|
+
key,
|
|
1748
|
+
true
|
|
1749
|
+
));
|
|
1750
|
+
}
|
|
1751
|
+
});
|
|
1752
|
+
return output;
|
|
1753
|
+
}
|
|
1754
|
+
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
|
|
1755
|
+
var name, str, desc;
|
|
1756
|
+
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
|
|
1757
|
+
if (desc.get) {
|
|
1758
|
+
if (desc.set) {
|
|
1759
|
+
str = ctx.stylize("[Getter/Setter]", "special");
|
|
1760
|
+
} else {
|
|
1761
|
+
str = ctx.stylize("[Getter]", "special");
|
|
1762
|
+
}
|
|
1763
|
+
} else {
|
|
1764
|
+
if (desc.set) {
|
|
1765
|
+
str = ctx.stylize("[Setter]", "special");
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
if (!hasOwnProperty(visibleKeys, key)) {
|
|
1769
|
+
name = "[" + key + "]";
|
|
1770
|
+
}
|
|
1771
|
+
if (!str) {
|
|
1772
|
+
if (ctx.seen.indexOf(desc.value) < 0) {
|
|
1773
|
+
if (isNull(recurseTimes)) {
|
|
1774
|
+
str = formatValue(ctx, desc.value, null);
|
|
1775
|
+
} else {
|
|
1776
|
+
str = formatValue(ctx, desc.value, recurseTimes - 1);
|
|
1777
|
+
}
|
|
1778
|
+
if (str.indexOf("\n") > -1) {
|
|
1779
|
+
if (array) {
|
|
1780
|
+
str = str.split("\n").map(function(line) {
|
|
1781
|
+
return " " + line;
|
|
1782
|
+
}).join("\n").slice(2);
|
|
1783
|
+
} else {
|
|
1784
|
+
str = "\n" + str.split("\n").map(function(line) {
|
|
1785
|
+
return " " + line;
|
|
1786
|
+
}).join("\n");
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
} else {
|
|
1790
|
+
str = ctx.stylize("[Circular]", "special");
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
if (isUndefined(name)) {
|
|
1794
|
+
if (array && key.match(/^\d+$/)) {
|
|
1795
|
+
return str;
|
|
1796
|
+
}
|
|
1797
|
+
name = JSON.stringify("" + key);
|
|
1798
|
+
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
|
1799
|
+
name = name.slice(1, -1);
|
|
1800
|
+
name = ctx.stylize(name, "name");
|
|
1801
|
+
} else {
|
|
1802
|
+
name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
|
|
1803
|
+
name = ctx.stylize(name, "string");
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
return name + ": " + str;
|
|
1807
|
+
}
|
|
1808
|
+
function reduceToSingleString(output, base, braces) {
|
|
1809
|
+
var length = output.reduce(function(prev, cur) {
|
|
1810
|
+
if (cur.indexOf("\n") >= 0) ;
|
|
1811
|
+
return prev + cur.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
1812
|
+
}, 0);
|
|
1813
|
+
if (length > 60) {
|
|
1814
|
+
return braces[0] + (base === "" ? "" : base + "\n ") + " " + output.join(",\n ") + " " + braces[1];
|
|
1815
|
+
}
|
|
1816
|
+
return braces[0] + base + " " + output.join(", ") + " " + braces[1];
|
|
1817
|
+
}
|
|
1818
|
+
exports.types = requireTypes();
|
|
1819
|
+
function isArray(ar) {
|
|
1820
|
+
return Array.isArray(ar);
|
|
1821
|
+
}
|
|
1822
|
+
exports.isArray = isArray;
|
|
1823
|
+
function isBoolean(arg) {
|
|
1824
|
+
return typeof arg === "boolean";
|
|
1825
|
+
}
|
|
1826
|
+
exports.isBoolean = isBoolean;
|
|
1827
|
+
function isNull(arg) {
|
|
1828
|
+
return arg === null;
|
|
1829
|
+
}
|
|
1830
|
+
exports.isNull = isNull;
|
|
1831
|
+
function isNullOrUndefined(arg) {
|
|
1832
|
+
return arg == null;
|
|
1833
|
+
}
|
|
1834
|
+
exports.isNullOrUndefined = isNullOrUndefined;
|
|
1835
|
+
function isNumber(arg) {
|
|
1836
|
+
return typeof arg === "number";
|
|
1837
|
+
}
|
|
1838
|
+
exports.isNumber = isNumber;
|
|
1839
|
+
function isString(arg) {
|
|
1840
|
+
return typeof arg === "string";
|
|
1841
|
+
}
|
|
1842
|
+
exports.isString = isString;
|
|
1843
|
+
function isSymbol(arg) {
|
|
1844
|
+
return typeof arg === "symbol";
|
|
1845
|
+
}
|
|
1846
|
+
exports.isSymbol = isSymbol;
|
|
1847
|
+
function isUndefined(arg) {
|
|
1848
|
+
return arg === void 0;
|
|
1849
|
+
}
|
|
1850
|
+
exports.isUndefined = isUndefined;
|
|
1851
|
+
function isRegExp(re) {
|
|
1852
|
+
return isObject(re) && objectToString(re) === "[object RegExp]";
|
|
1853
|
+
}
|
|
1854
|
+
exports.isRegExp = isRegExp;
|
|
1855
|
+
exports.types.isRegExp = isRegExp;
|
|
1856
|
+
function isObject(arg) {
|
|
1857
|
+
return typeof arg === "object" && arg !== null;
|
|
1858
|
+
}
|
|
1859
|
+
exports.isObject = isObject;
|
|
1860
|
+
function isDate(d) {
|
|
1861
|
+
return isObject(d) && objectToString(d) === "[object Date]";
|
|
1862
|
+
}
|
|
1863
|
+
exports.isDate = isDate;
|
|
1864
|
+
exports.types.isDate = isDate;
|
|
1865
|
+
function isError(e) {
|
|
1866
|
+
return isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error);
|
|
1867
|
+
}
|
|
1868
|
+
exports.isError = isError;
|
|
1869
|
+
exports.types.isNativeError = isError;
|
|
1870
|
+
function isFunction(arg) {
|
|
1871
|
+
return typeof arg === "function";
|
|
1872
|
+
}
|
|
1873
|
+
exports.isFunction = isFunction;
|
|
1874
|
+
function isPrimitive(arg) {
|
|
1875
|
+
return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol
|
|
1876
|
+
typeof arg === "undefined";
|
|
1877
|
+
}
|
|
1878
|
+
exports.isPrimitive = isPrimitive;
|
|
1879
|
+
exports.isBuffer = requireIsBufferBrowser();
|
|
1880
|
+
function objectToString(o) {
|
|
1881
|
+
return Object.prototype.toString.call(o);
|
|
1882
|
+
}
|
|
1883
|
+
function pad(n) {
|
|
1884
|
+
return n < 10 ? "0" + n.toString(10) : n.toString(10);
|
|
1885
|
+
}
|
|
1886
|
+
var months = [
|
|
1887
|
+
"Jan",
|
|
1888
|
+
"Feb",
|
|
1889
|
+
"Mar",
|
|
1890
|
+
"Apr",
|
|
1891
|
+
"May",
|
|
1892
|
+
"Jun",
|
|
1893
|
+
"Jul",
|
|
1894
|
+
"Aug",
|
|
1895
|
+
"Sep",
|
|
1896
|
+
"Oct",
|
|
1897
|
+
"Nov",
|
|
1898
|
+
"Dec"
|
|
1899
|
+
];
|
|
1900
|
+
function timestamp() {
|
|
1901
|
+
var d = /* @__PURE__ */ new Date();
|
|
1902
|
+
var time = [
|
|
1903
|
+
pad(d.getHours()),
|
|
1904
|
+
pad(d.getMinutes()),
|
|
1905
|
+
pad(d.getSeconds())
|
|
1906
|
+
].join(":");
|
|
1907
|
+
return [d.getDate(), months[d.getMonth()], time].join(" ");
|
|
1908
|
+
}
|
|
1909
|
+
exports.log = function() {
|
|
1910
|
+
console.log("%s - %s", timestamp(), exports.format.apply(exports, arguments));
|
|
1911
|
+
};
|
|
1912
|
+
exports.inherits = inherits_browserExports;
|
|
1913
|
+
exports._extend = function(origin, add) {
|
|
1914
|
+
if (!add || !isObject(add)) return origin;
|
|
1915
|
+
var keys = Object.keys(add);
|
|
1916
|
+
var i = keys.length;
|
|
1917
|
+
while (i--) {
|
|
1918
|
+
origin[keys[i]] = add[keys[i]];
|
|
1919
|
+
}
|
|
1920
|
+
return origin;
|
|
1921
|
+
};
|
|
1922
|
+
function hasOwnProperty(obj, prop) {
|
|
1923
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
1924
|
+
}
|
|
1925
|
+
var kCustomPromisifiedSymbol = typeof Symbol !== "undefined" ? Symbol("util.promisify.custom") : void 0;
|
|
1926
|
+
exports.promisify = function promisify(original) {
|
|
1927
|
+
if (typeof original !== "function")
|
|
1928
|
+
throw new TypeError('The "original" argument must be of type Function');
|
|
1929
|
+
if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
|
|
1930
|
+
var fn = original[kCustomPromisifiedSymbol];
|
|
1931
|
+
if (typeof fn !== "function") {
|
|
1932
|
+
throw new TypeError('The "util.promisify.custom" argument must be of type Function');
|
|
1933
|
+
}
|
|
1934
|
+
Object.defineProperty(fn, kCustomPromisifiedSymbol, {
|
|
1935
|
+
value: fn,
|
|
1936
|
+
enumerable: false,
|
|
1937
|
+
writable: false,
|
|
1938
|
+
configurable: true
|
|
1939
|
+
});
|
|
1940
|
+
return fn;
|
|
1941
|
+
}
|
|
1942
|
+
function fn() {
|
|
1943
|
+
var promiseResolve, promiseReject;
|
|
1944
|
+
var promise = new Promise(function(resolve, reject) {
|
|
1945
|
+
promiseResolve = resolve;
|
|
1946
|
+
promiseReject = reject;
|
|
1947
|
+
});
|
|
1948
|
+
var args = [];
|
|
1949
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1950
|
+
args.push(arguments[i]);
|
|
1951
|
+
}
|
|
1952
|
+
args.push(function(err, value) {
|
|
1953
|
+
if (err) {
|
|
1954
|
+
promiseReject(err);
|
|
1955
|
+
} else {
|
|
1956
|
+
promiseResolve(value);
|
|
1957
|
+
}
|
|
1958
|
+
});
|
|
1959
|
+
try {
|
|
1960
|
+
original.apply(this, args);
|
|
1961
|
+
} catch (err) {
|
|
1962
|
+
promiseReject(err);
|
|
1963
|
+
}
|
|
1964
|
+
return promise;
|
|
1965
|
+
}
|
|
1966
|
+
Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
|
|
1967
|
+
if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
|
|
1968
|
+
value: fn,
|
|
1969
|
+
enumerable: false,
|
|
1970
|
+
writable: false,
|
|
1971
|
+
configurable: true
|
|
1972
|
+
});
|
|
1973
|
+
return Object.defineProperties(
|
|
1974
|
+
fn,
|
|
1975
|
+
getOwnPropertyDescriptors(original)
|
|
1976
|
+
);
|
|
1977
|
+
};
|
|
1978
|
+
exports.promisify.custom = kCustomPromisifiedSymbol;
|
|
1979
|
+
function callbackifyOnRejected(reason, cb) {
|
|
1980
|
+
if (!reason) {
|
|
1981
|
+
var newReason = new Error("Promise was rejected with a falsy value");
|
|
1982
|
+
newReason.reason = reason;
|
|
1983
|
+
reason = newReason;
|
|
1984
|
+
}
|
|
1985
|
+
return cb(reason);
|
|
1986
|
+
}
|
|
1987
|
+
function callbackify(original) {
|
|
1988
|
+
if (typeof original !== "function") {
|
|
1989
|
+
throw new TypeError('The "original" argument must be of type Function');
|
|
1990
|
+
}
|
|
1991
|
+
function callbackified() {
|
|
1992
|
+
var args = [];
|
|
1993
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1994
|
+
args.push(arguments[i]);
|
|
1995
|
+
}
|
|
1996
|
+
var maybeCb = args.pop();
|
|
1997
|
+
if (typeof maybeCb !== "function") {
|
|
1998
|
+
throw new TypeError("The last argument must be of type Function");
|
|
1999
|
+
}
|
|
2000
|
+
var self = this;
|
|
2001
|
+
var cb = function() {
|
|
2002
|
+
return maybeCb.apply(self, arguments);
|
|
2003
|
+
};
|
|
2004
|
+
original.apply(this, args).then(
|
|
2005
|
+
function(ret) {
|
|
2006
|
+
define_process_default.nextTick(cb.bind(null, null, ret));
|
|
2007
|
+
},
|
|
2008
|
+
function(rej) {
|
|
2009
|
+
define_process_default.nextTick(callbackifyOnRejected.bind(null, rej, cb));
|
|
2010
|
+
}
|
|
2011
|
+
);
|
|
2012
|
+
}
|
|
2013
|
+
Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
|
|
2014
|
+
Object.defineProperties(
|
|
2015
|
+
callbackified,
|
|
2016
|
+
getOwnPropertyDescriptors(original)
|
|
2017
|
+
);
|
|
2018
|
+
return callbackified;
|
|
2019
|
+
}
|
|
2020
|
+
exports.callbackify = callbackify;
|
|
2021
|
+
})(util$1);
|
|
2022
|
+
return util$1;
|
|
2023
|
+
}
|
|
2024
|
+
var utilExports = requireUtil();
|
|
2025
|
+
const util = /* @__PURE__ */ _mergeNamespaces({
|
|
2026
|
+
__proto__: null
|
|
2027
|
+
}, [utilExports]);
|
|
2028
|
+
export {
|
|
2029
|
+
utilExports as a,
|
|
2030
|
+
inherits_browserExports as i,
|
|
2031
|
+
requireUtil as r,
|
|
2032
|
+
util as u
|
|
2033
|
+
};
|