@upstash/workflow 0.2.1 → 0.2.3
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/astro.d.mts +2 -2
- package/astro.d.ts +2 -2
- package/astro.js +248 -76
- package/astro.mjs +5 -5
- package/{chunk-ADOBNR4O.mjs → chunk-QBJ3LQIO.mjs} +222 -221
- package/cloudflare.d.mts +2 -2
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +248 -76
- package/cloudflare.mjs +5 -5
- package/express.d.mts +1 -1
- package/express.d.ts +1 -1
- package/express.js +1620 -1305
- package/express.mjs +1395 -1252
- package/h3.d.mts +2 -2
- package/h3.d.ts +2 -2
- package/h3.js +248 -76
- package/h3.mjs +5 -5
- package/hono.d.mts +4 -2
- package/hono.d.ts +4 -2
- package/hono.js +248 -76
- package/hono.mjs +5 -5
- package/index.d.mts +3 -3
- package/index.d.ts +3 -3
- package/index.js +252 -74
- package/index.mjs +189 -3
- package/nextjs.d.mts +3 -3
- package/nextjs.d.ts +3 -3
- package/nextjs.js +249 -77
- package/nextjs.mjs +6 -6
- package/package.json +1 -1
- package/solidjs.d.mts +2 -2
- package/solidjs.d.ts +2 -2
- package/solidjs.js +248 -76
- package/solidjs.mjs +5 -5
- package/svelte.d.mts +3 -3
- package/svelte.d.ts +3 -3
- package/svelte.js +251 -76
- package/svelte.mjs +8 -5
- package/{types-Be4hC1mu.d.mts → types-R9q4MUwl.d.mts} +246 -12
- package/{types-Be4hC1mu.d.ts → types-R9q4MUwl.d.ts} +246 -12
package/express.js
CHANGED
|
@@ -14484,46 +14484,6 @@ var require_text = __commonJS({
|
|
|
14484
14484
|
}
|
|
14485
14485
|
});
|
|
14486
14486
|
|
|
14487
|
-
// node_modules/es-errors/index.js
|
|
14488
|
-
var require_es_errors = __commonJS({
|
|
14489
|
-
"node_modules/es-errors/index.js"(exports2, module2) {
|
|
14490
|
-
"use strict";
|
|
14491
|
-
module2.exports = Error;
|
|
14492
|
-
}
|
|
14493
|
-
});
|
|
14494
|
-
|
|
14495
|
-
// node_modules/es-errors/eval.js
|
|
14496
|
-
var require_eval = __commonJS({
|
|
14497
|
-
"node_modules/es-errors/eval.js"(exports2, module2) {
|
|
14498
|
-
"use strict";
|
|
14499
|
-
module2.exports = EvalError;
|
|
14500
|
-
}
|
|
14501
|
-
});
|
|
14502
|
-
|
|
14503
|
-
// node_modules/es-errors/range.js
|
|
14504
|
-
var require_range = __commonJS({
|
|
14505
|
-
"node_modules/es-errors/range.js"(exports2, module2) {
|
|
14506
|
-
"use strict";
|
|
14507
|
-
module2.exports = RangeError;
|
|
14508
|
-
}
|
|
14509
|
-
});
|
|
14510
|
-
|
|
14511
|
-
// node_modules/es-errors/ref.js
|
|
14512
|
-
var require_ref = __commonJS({
|
|
14513
|
-
"node_modules/es-errors/ref.js"(exports2, module2) {
|
|
14514
|
-
"use strict";
|
|
14515
|
-
module2.exports = ReferenceError;
|
|
14516
|
-
}
|
|
14517
|
-
});
|
|
14518
|
-
|
|
14519
|
-
// node_modules/es-errors/syntax.js
|
|
14520
|
-
var require_syntax = __commonJS({
|
|
14521
|
-
"node_modules/es-errors/syntax.js"(exports2, module2) {
|
|
14522
|
-
"use strict";
|
|
14523
|
-
module2.exports = SyntaxError;
|
|
14524
|
-
}
|
|
14525
|
-
});
|
|
14526
|
-
|
|
14527
14487
|
// node_modules/es-errors/type.js
|
|
14528
14488
|
var require_type = __commonJS({
|
|
14529
14489
|
"node_modules/es-errors/type.js"(exports2, module2) {
|
|
@@ -14532,1369 +14492,1536 @@ var require_type = __commonJS({
|
|
|
14532
14492
|
}
|
|
14533
14493
|
});
|
|
14534
14494
|
|
|
14535
|
-
// node_modules/
|
|
14536
|
-
var
|
|
14537
|
-
"node_modules/
|
|
14495
|
+
// node_modules/object-inspect/util.inspect.js
|
|
14496
|
+
var require_util_inspect = __commonJS({
|
|
14497
|
+
"node_modules/object-inspect/util.inspect.js"(exports2, module2) {
|
|
14538
14498
|
"use strict";
|
|
14539
|
-
module2.exports =
|
|
14499
|
+
module2.exports = require("util").inspect;
|
|
14540
14500
|
}
|
|
14541
14501
|
});
|
|
14542
14502
|
|
|
14543
|
-
// node_modules/
|
|
14544
|
-
var
|
|
14545
|
-
"node_modules/
|
|
14503
|
+
// node_modules/object-inspect/index.js
|
|
14504
|
+
var require_object_inspect = __commonJS({
|
|
14505
|
+
"node_modules/object-inspect/index.js"(exports2, module2) {
|
|
14546
14506
|
"use strict";
|
|
14547
|
-
|
|
14548
|
-
|
|
14549
|
-
|
|
14507
|
+
var hasMap = typeof Map === "function" && Map.prototype;
|
|
14508
|
+
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
|
|
14509
|
+
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
|
|
14510
|
+
var mapForEach = hasMap && Map.prototype.forEach;
|
|
14511
|
+
var hasSet = typeof Set === "function" && Set.prototype;
|
|
14512
|
+
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
|
|
14513
|
+
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
|
|
14514
|
+
var setForEach = hasSet && Set.prototype.forEach;
|
|
14515
|
+
var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
|
|
14516
|
+
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
14517
|
+
var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
|
|
14518
|
+
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
14519
|
+
var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
|
|
14520
|
+
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
14521
|
+
var booleanValueOf = Boolean.prototype.valueOf;
|
|
14522
|
+
var objectToString = Object.prototype.toString;
|
|
14523
|
+
var functionToString = Function.prototype.toString;
|
|
14524
|
+
var $match = String.prototype.match;
|
|
14525
|
+
var $slice = String.prototype.slice;
|
|
14526
|
+
var $replace = String.prototype.replace;
|
|
14527
|
+
var $toUpperCase = String.prototype.toUpperCase;
|
|
14528
|
+
var $toLowerCase = String.prototype.toLowerCase;
|
|
14529
|
+
var $test = RegExp.prototype.test;
|
|
14530
|
+
var $concat = Array.prototype.concat;
|
|
14531
|
+
var $join = Array.prototype.join;
|
|
14532
|
+
var $arrSlice = Array.prototype.slice;
|
|
14533
|
+
var $floor = Math.floor;
|
|
14534
|
+
var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
|
|
14535
|
+
var gOPS = Object.getOwnPropertySymbols;
|
|
14536
|
+
var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
|
|
14537
|
+
var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
|
|
14538
|
+
var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
|
|
14539
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
14540
|
+
var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
|
|
14541
|
+
return O.__proto__;
|
|
14542
|
+
} : null);
|
|
14543
|
+
function addNumericSeparator(num, str) {
|
|
14544
|
+
if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
|
|
14545
|
+
return str;
|
|
14550
14546
|
}
|
|
14551
|
-
|
|
14552
|
-
|
|
14547
|
+
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
14548
|
+
if (typeof num === "number") {
|
|
14549
|
+
var int = num < 0 ? -$floor(-num) : $floor(num);
|
|
14550
|
+
if (int !== num) {
|
|
14551
|
+
var intStr = String(int);
|
|
14552
|
+
var dec = $slice.call(str, intStr.length + 1);
|
|
14553
|
+
return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
14554
|
+
}
|
|
14553
14555
|
}
|
|
14554
|
-
|
|
14555
|
-
|
|
14556
|
-
|
|
14557
|
-
|
|
14558
|
-
|
|
14556
|
+
return $replace.call(str, sepRegex, "$&_");
|
|
14557
|
+
}
|
|
14558
|
+
var utilInspect = require_util_inspect();
|
|
14559
|
+
var inspectCustom = utilInspect.custom;
|
|
14560
|
+
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
14561
|
+
var quotes = {
|
|
14562
|
+
__proto__: null,
|
|
14563
|
+
"double": '"',
|
|
14564
|
+
single: "'"
|
|
14565
|
+
};
|
|
14566
|
+
var quoteREs = {
|
|
14567
|
+
__proto__: null,
|
|
14568
|
+
"double": /(["\\])/g,
|
|
14569
|
+
single: /(['\\])/g
|
|
14570
|
+
};
|
|
14571
|
+
module2.exports = function inspect_(obj, options, depth, seen) {
|
|
14572
|
+
var opts = options || {};
|
|
14573
|
+
if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) {
|
|
14574
|
+
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
14559
14575
|
}
|
|
14560
|
-
if (
|
|
14561
|
-
|
|
14576
|
+
if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
|
|
14577
|
+
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
14562
14578
|
}
|
|
14563
|
-
|
|
14564
|
-
|
|
14579
|
+
var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
|
|
14580
|
+
if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
|
|
14581
|
+
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
14565
14582
|
}
|
|
14566
|
-
|
|
14567
|
-
|
|
14568
|
-
for (sym in obj) {
|
|
14569
|
-
return false;
|
|
14583
|
+
if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
|
|
14584
|
+
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
14570
14585
|
}
|
|
14571
|
-
if (
|
|
14572
|
-
|
|
14586
|
+
if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
|
|
14587
|
+
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
14573
14588
|
}
|
|
14574
|
-
|
|
14575
|
-
|
|
14589
|
+
var numericSeparator = opts.numericSeparator;
|
|
14590
|
+
if (typeof obj === "undefined") {
|
|
14591
|
+
return "undefined";
|
|
14576
14592
|
}
|
|
14577
|
-
|
|
14578
|
-
|
|
14579
|
-
return false;
|
|
14593
|
+
if (obj === null) {
|
|
14594
|
+
return "null";
|
|
14580
14595
|
}
|
|
14581
|
-
if (
|
|
14582
|
-
return false;
|
|
14596
|
+
if (typeof obj === "boolean") {
|
|
14597
|
+
return obj ? "true" : "false";
|
|
14583
14598
|
}
|
|
14584
|
-
if (typeof
|
|
14585
|
-
|
|
14586
|
-
|
|
14587
|
-
|
|
14599
|
+
if (typeof obj === "string") {
|
|
14600
|
+
return inspectString(obj, opts);
|
|
14601
|
+
}
|
|
14602
|
+
if (typeof obj === "number") {
|
|
14603
|
+
if (obj === 0) {
|
|
14604
|
+
return Infinity / obj > 0 ? "0" : "-0";
|
|
14588
14605
|
}
|
|
14606
|
+
var str = String(obj);
|
|
14607
|
+
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
14589
14608
|
}
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
});
|
|
14594
|
-
|
|
14595
|
-
// node_modules/has-symbols/index.js
|
|
14596
|
-
var require_has_symbols = __commonJS({
|
|
14597
|
-
"node_modules/has-symbols/index.js"(exports2, module2) {
|
|
14598
|
-
"use strict";
|
|
14599
|
-
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
14600
|
-
var hasSymbolSham = require_shams();
|
|
14601
|
-
module2.exports = function hasNativeSymbols() {
|
|
14602
|
-
if (typeof origSymbol !== "function") {
|
|
14603
|
-
return false;
|
|
14609
|
+
if (typeof obj === "bigint") {
|
|
14610
|
+
var bigIntStr = String(obj) + "n";
|
|
14611
|
+
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
14604
14612
|
}
|
|
14605
|
-
|
|
14606
|
-
|
|
14613
|
+
var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
|
|
14614
|
+
if (typeof depth === "undefined") {
|
|
14615
|
+
depth = 0;
|
|
14607
14616
|
}
|
|
14608
|
-
if (typeof
|
|
14609
|
-
return
|
|
14617
|
+
if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
|
|
14618
|
+
return isArray(obj) ? "[Array]" : "[Object]";
|
|
14610
14619
|
}
|
|
14611
|
-
|
|
14612
|
-
|
|
14620
|
+
var indent = getIndent(opts, depth);
|
|
14621
|
+
if (typeof seen === "undefined") {
|
|
14622
|
+
seen = [];
|
|
14623
|
+
} else if (indexOf(seen, obj) >= 0) {
|
|
14624
|
+
return "[Circular]";
|
|
14613
14625
|
}
|
|
14614
|
-
|
|
14615
|
-
|
|
14616
|
-
|
|
14617
|
-
|
|
14618
|
-
|
|
14619
|
-
|
|
14620
|
-
var
|
|
14621
|
-
|
|
14622
|
-
|
|
14623
|
-
|
|
14624
|
-
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
return { __proto__: test }.foo === test.foo && !(test instanceof $Object);
|
|
14630
|
-
};
|
|
14631
|
-
}
|
|
14632
|
-
});
|
|
14633
|
-
|
|
14634
|
-
// node_modules/function-bind/implementation.js
|
|
14635
|
-
var require_implementation = __commonJS({
|
|
14636
|
-
"node_modules/function-bind/implementation.js"(exports2, module2) {
|
|
14637
|
-
"use strict";
|
|
14638
|
-
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
14639
|
-
var toStr = Object.prototype.toString;
|
|
14640
|
-
var max = Math.max;
|
|
14641
|
-
var funcType = "[object Function]";
|
|
14642
|
-
var concatty = function concatty2(a, b) {
|
|
14643
|
-
var arr = [];
|
|
14644
|
-
for (var i = 0; i < a.length; i += 1) {
|
|
14645
|
-
arr[i] = a[i];
|
|
14626
|
+
function inspect(value, from, noIndent) {
|
|
14627
|
+
if (from) {
|
|
14628
|
+
seen = $arrSlice.call(seen);
|
|
14629
|
+
seen.push(from);
|
|
14630
|
+
}
|
|
14631
|
+
if (noIndent) {
|
|
14632
|
+
var newOpts = {
|
|
14633
|
+
depth: opts.depth
|
|
14634
|
+
};
|
|
14635
|
+
if (has(opts, "quoteStyle")) {
|
|
14636
|
+
newOpts.quoteStyle = opts.quoteStyle;
|
|
14637
|
+
}
|
|
14638
|
+
return inspect_(value, newOpts, depth + 1, seen);
|
|
14639
|
+
}
|
|
14640
|
+
return inspect_(value, opts, depth + 1, seen);
|
|
14646
14641
|
}
|
|
14647
|
-
|
|
14648
|
-
|
|
14642
|
+
if (typeof obj === "function" && !isRegExp(obj)) {
|
|
14643
|
+
var name = nameOf(obj);
|
|
14644
|
+
var keys = arrObjKeys(obj, inspect);
|
|
14645
|
+
return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
|
|
14649
14646
|
}
|
|
14650
|
-
|
|
14651
|
-
|
|
14652
|
-
|
|
14653
|
-
var arr = [];
|
|
14654
|
-
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
14655
|
-
arr[j] = arrLike[i];
|
|
14647
|
+
if (isSymbol(obj)) {
|
|
14648
|
+
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
|
|
14649
|
+
return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
14656
14650
|
}
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
|
|
14660
|
-
|
|
14661
|
-
|
|
14662
|
-
|
|
14663
|
-
|
|
14664
|
-
|
|
14651
|
+
if (isElement(obj)) {
|
|
14652
|
+
var s = "<" + $toLowerCase.call(String(obj.nodeName));
|
|
14653
|
+
var attrs = obj.attributes || [];
|
|
14654
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
14655
|
+
s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
|
|
14656
|
+
}
|
|
14657
|
+
s += ">";
|
|
14658
|
+
if (obj.childNodes && obj.childNodes.length) {
|
|
14659
|
+
s += "...";
|
|
14665
14660
|
}
|
|
14661
|
+
s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
|
|
14662
|
+
return s;
|
|
14666
14663
|
}
|
|
14667
|
-
|
|
14668
|
-
|
|
14669
|
-
|
|
14670
|
-
|
|
14671
|
-
|
|
14672
|
-
|
|
14664
|
+
if (isArray(obj)) {
|
|
14665
|
+
if (obj.length === 0) {
|
|
14666
|
+
return "[]";
|
|
14667
|
+
}
|
|
14668
|
+
var xs = arrObjKeys(obj, inspect);
|
|
14669
|
+
if (indent && !singleLineValues(xs)) {
|
|
14670
|
+
return "[" + indentedJoin(xs, indent) + "]";
|
|
14671
|
+
}
|
|
14672
|
+
return "[ " + $join.call(xs, ", ") + " ]";
|
|
14673
14673
|
}
|
|
14674
|
-
|
|
14675
|
-
|
|
14676
|
-
|
|
14677
|
-
|
|
14678
|
-
var result = target.apply(
|
|
14679
|
-
this,
|
|
14680
|
-
concatty(args, arguments)
|
|
14681
|
-
);
|
|
14682
|
-
if (Object(result) === result) {
|
|
14683
|
-
return result;
|
|
14684
|
-
}
|
|
14685
|
-
return this;
|
|
14674
|
+
if (isError(obj)) {
|
|
14675
|
+
var parts = arrObjKeys(obj, inspect);
|
|
14676
|
+
if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
|
|
14677
|
+
return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
|
|
14686
14678
|
}
|
|
14687
|
-
|
|
14688
|
-
|
|
14689
|
-
|
|
14690
|
-
);
|
|
14691
|
-
};
|
|
14692
|
-
var boundLength = max(0, target.length - args.length);
|
|
14693
|
-
var boundArgs = [];
|
|
14694
|
-
for (var i = 0; i < boundLength; i++) {
|
|
14695
|
-
boundArgs[i] = "$" + i;
|
|
14679
|
+
if (parts.length === 0) {
|
|
14680
|
+
return "[" + String(obj) + "]";
|
|
14681
|
+
}
|
|
14682
|
+
return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
|
|
14696
14683
|
}
|
|
14697
|
-
|
|
14698
|
-
|
|
14699
|
-
|
|
14700
|
-
}
|
|
14701
|
-
|
|
14702
|
-
|
|
14703
|
-
Empty.prototype = null;
|
|
14684
|
+
if (typeof obj === "object" && customInspect) {
|
|
14685
|
+
if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
|
|
14686
|
+
return utilInspect(obj, { depth: maxDepth - depth });
|
|
14687
|
+
} else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
|
|
14688
|
+
return obj.inspect();
|
|
14689
|
+
}
|
|
14704
14690
|
}
|
|
14705
|
-
|
|
14691
|
+
if (isMap(obj)) {
|
|
14692
|
+
var mapParts = [];
|
|
14693
|
+
if (mapForEach) {
|
|
14694
|
+
mapForEach.call(obj, function(value, key) {
|
|
14695
|
+
mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
|
|
14696
|
+
});
|
|
14697
|
+
}
|
|
14698
|
+
return collectionOf("Map", mapSize.call(obj), mapParts, indent);
|
|
14699
|
+
}
|
|
14700
|
+
if (isSet(obj)) {
|
|
14701
|
+
var setParts = [];
|
|
14702
|
+
if (setForEach) {
|
|
14703
|
+
setForEach.call(obj, function(value) {
|
|
14704
|
+
setParts.push(inspect(value, obj));
|
|
14705
|
+
});
|
|
14706
|
+
}
|
|
14707
|
+
return collectionOf("Set", setSize.call(obj), setParts, indent);
|
|
14708
|
+
}
|
|
14709
|
+
if (isWeakMap(obj)) {
|
|
14710
|
+
return weakCollectionOf("WeakMap");
|
|
14711
|
+
}
|
|
14712
|
+
if (isWeakSet(obj)) {
|
|
14713
|
+
return weakCollectionOf("WeakSet");
|
|
14714
|
+
}
|
|
14715
|
+
if (isWeakRef(obj)) {
|
|
14716
|
+
return weakCollectionOf("WeakRef");
|
|
14717
|
+
}
|
|
14718
|
+
if (isNumber(obj)) {
|
|
14719
|
+
return markBoxed(inspect(Number(obj)));
|
|
14720
|
+
}
|
|
14721
|
+
if (isBigInt(obj)) {
|
|
14722
|
+
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
14723
|
+
}
|
|
14724
|
+
if (isBoolean(obj)) {
|
|
14725
|
+
return markBoxed(booleanValueOf.call(obj));
|
|
14726
|
+
}
|
|
14727
|
+
if (isString(obj)) {
|
|
14728
|
+
return markBoxed(inspect(String(obj)));
|
|
14729
|
+
}
|
|
14730
|
+
if (typeof window !== "undefined" && obj === window) {
|
|
14731
|
+
return "{ [object Window] }";
|
|
14732
|
+
}
|
|
14733
|
+
if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) {
|
|
14734
|
+
return "{ [object globalThis] }";
|
|
14735
|
+
}
|
|
14736
|
+
if (!isDate(obj) && !isRegExp(obj)) {
|
|
14737
|
+
var ys = arrObjKeys(obj, inspect);
|
|
14738
|
+
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
14739
|
+
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
14740
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
14741
|
+
var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
14742
|
+
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
14743
|
+
if (ys.length === 0) {
|
|
14744
|
+
return tag + "{}";
|
|
14745
|
+
}
|
|
14746
|
+
if (indent) {
|
|
14747
|
+
return tag + "{" + indentedJoin(ys, indent) + "}";
|
|
14748
|
+
}
|
|
14749
|
+
return tag + "{ " + $join.call(ys, ", ") + " }";
|
|
14750
|
+
}
|
|
14751
|
+
return String(obj);
|
|
14706
14752
|
};
|
|
14707
|
-
|
|
14708
|
-
|
|
14709
|
-
|
|
14710
|
-
|
|
14711
|
-
|
|
14712
|
-
|
|
14713
|
-
|
|
14714
|
-
|
|
14715
|
-
|
|
14716
|
-
|
|
14717
|
-
}
|
|
14718
|
-
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
|
|
14726
|
-
|
|
14727
|
-
|
|
14728
|
-
|
|
14729
|
-
|
|
14730
|
-
|
|
14731
|
-
|
|
14732
|
-
|
|
14733
|
-
|
|
14734
|
-
|
|
14735
|
-
|
|
14736
|
-
|
|
14737
|
-
|
|
14738
|
-
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
|
|
14742
|
-
|
|
14743
|
-
|
|
14753
|
+
function wrapQuotes(s, defaultStyle, opts) {
|
|
14754
|
+
var style = opts.quoteStyle || defaultStyle;
|
|
14755
|
+
var quoteChar = quotes[style];
|
|
14756
|
+
return quoteChar + s + quoteChar;
|
|
14757
|
+
}
|
|
14758
|
+
function quote(s) {
|
|
14759
|
+
return $replace.call(String(s), /"/g, """);
|
|
14760
|
+
}
|
|
14761
|
+
function isArray(obj) {
|
|
14762
|
+
return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
14763
|
+
}
|
|
14764
|
+
function isDate(obj) {
|
|
14765
|
+
return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
14766
|
+
}
|
|
14767
|
+
function isRegExp(obj) {
|
|
14768
|
+
return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
14769
|
+
}
|
|
14770
|
+
function isError(obj) {
|
|
14771
|
+
return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
14772
|
+
}
|
|
14773
|
+
function isString(obj) {
|
|
14774
|
+
return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
14775
|
+
}
|
|
14776
|
+
function isNumber(obj) {
|
|
14777
|
+
return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
14778
|
+
}
|
|
14779
|
+
function isBoolean(obj) {
|
|
14780
|
+
return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
14781
|
+
}
|
|
14782
|
+
function isSymbol(obj) {
|
|
14783
|
+
if (hasShammedSymbols) {
|
|
14784
|
+
return obj && typeof obj === "object" && obj instanceof Symbol;
|
|
14785
|
+
}
|
|
14786
|
+
if (typeof obj === "symbol") {
|
|
14787
|
+
return true;
|
|
14788
|
+
}
|
|
14789
|
+
if (!obj || typeof obj !== "object" || !symToString) {
|
|
14790
|
+
return false;
|
|
14791
|
+
}
|
|
14744
14792
|
try {
|
|
14745
|
-
|
|
14793
|
+
symToString.call(obj);
|
|
14794
|
+
return true;
|
|
14746
14795
|
} catch (e) {
|
|
14747
14796
|
}
|
|
14748
|
-
|
|
14749
|
-
|
|
14750
|
-
|
|
14797
|
+
return false;
|
|
14798
|
+
}
|
|
14799
|
+
function isBigInt(obj) {
|
|
14800
|
+
if (!obj || typeof obj !== "object" || !bigIntValueOf) {
|
|
14801
|
+
return false;
|
|
14802
|
+
}
|
|
14751
14803
|
try {
|
|
14752
|
-
|
|
14804
|
+
bigIntValueOf.call(obj);
|
|
14805
|
+
return true;
|
|
14753
14806
|
} catch (e) {
|
|
14754
|
-
$gOPD = null;
|
|
14755
14807
|
}
|
|
14808
|
+
return false;
|
|
14756
14809
|
}
|
|
14757
|
-
var
|
|
14758
|
-
|
|
14810
|
+
var hasOwn = Object.prototype.hasOwnProperty || function(key) {
|
|
14811
|
+
return key in this;
|
|
14759
14812
|
};
|
|
14760
|
-
|
|
14761
|
-
|
|
14762
|
-
|
|
14763
|
-
|
|
14764
|
-
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14776
|
-
|
|
14777
|
-
|
|
14778
|
-
|
|
14779
|
-
|
|
14780
|
-
|
|
14781
|
-
|
|
14782
|
-
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14788
|
-
"
|
|
14789
|
-
|
|
14790
|
-
|
|
14791
|
-
"%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
|
|
14792
|
-
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
|
|
14793
|
-
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
|
|
14794
|
-
"%Boolean%": Boolean,
|
|
14795
|
-
"%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
|
|
14796
|
-
"%Date%": Date,
|
|
14797
|
-
"%decodeURI%": decodeURI,
|
|
14798
|
-
"%decodeURIComponent%": decodeURIComponent,
|
|
14799
|
-
"%encodeURI%": encodeURI,
|
|
14800
|
-
"%encodeURIComponent%": encodeURIComponent,
|
|
14801
|
-
"%Error%": $Error,
|
|
14802
|
-
"%eval%": eval,
|
|
14803
|
-
// eslint-disable-line no-eval
|
|
14804
|
-
"%EvalError%": $EvalError,
|
|
14805
|
-
"%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
|
|
14806
|
-
"%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
|
|
14807
|
-
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
|
|
14808
|
-
"%Function%": $Function,
|
|
14809
|
-
"%GeneratorFunction%": needsEval,
|
|
14810
|
-
"%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
|
|
14811
|
-
"%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
|
|
14812
|
-
"%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
|
|
14813
|
-
"%isFinite%": isFinite,
|
|
14814
|
-
"%isNaN%": isNaN,
|
|
14815
|
-
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
|
|
14816
|
-
"%JSON%": typeof JSON === "object" ? JSON : undefined2,
|
|
14817
|
-
"%Map%": typeof Map === "undefined" ? undefined2 : Map,
|
|
14818
|
-
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
14819
|
-
"%Math%": Math,
|
|
14820
|
-
"%Number%": Number,
|
|
14821
|
-
"%Object%": Object,
|
|
14822
|
-
"%parseFloat%": parseFloat,
|
|
14823
|
-
"%parseInt%": parseInt,
|
|
14824
|
-
"%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
|
|
14825
|
-
"%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
|
|
14826
|
-
"%RangeError%": $RangeError,
|
|
14827
|
-
"%ReferenceError%": $ReferenceError,
|
|
14828
|
-
"%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
|
|
14829
|
-
"%RegExp%": RegExp,
|
|
14830
|
-
"%Set%": typeof Set === "undefined" ? undefined2 : Set,
|
|
14831
|
-
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
14832
|
-
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
|
|
14833
|
-
"%String%": String,
|
|
14834
|
-
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
|
|
14835
|
-
"%Symbol%": hasSymbols ? Symbol : undefined2,
|
|
14836
|
-
"%SyntaxError%": $SyntaxError,
|
|
14837
|
-
"%ThrowTypeError%": ThrowTypeError,
|
|
14838
|
-
"%TypedArray%": TypedArray,
|
|
14839
|
-
"%TypeError%": $TypeError,
|
|
14840
|
-
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
|
|
14841
|
-
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
|
|
14842
|
-
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
|
|
14843
|
-
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
|
|
14844
|
-
"%URIError%": $URIError,
|
|
14845
|
-
"%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
|
|
14846
|
-
"%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
|
|
14847
|
-
"%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
|
|
14848
|
-
};
|
|
14849
|
-
if (getProto) {
|
|
14813
|
+
function has(obj, key) {
|
|
14814
|
+
return hasOwn.call(obj, key);
|
|
14815
|
+
}
|
|
14816
|
+
function toStr(obj) {
|
|
14817
|
+
return objectToString.call(obj);
|
|
14818
|
+
}
|
|
14819
|
+
function nameOf(f) {
|
|
14820
|
+
if (f.name) {
|
|
14821
|
+
return f.name;
|
|
14822
|
+
}
|
|
14823
|
+
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
14824
|
+
if (m) {
|
|
14825
|
+
return m[1];
|
|
14826
|
+
}
|
|
14827
|
+
return null;
|
|
14828
|
+
}
|
|
14829
|
+
function indexOf(xs, x) {
|
|
14830
|
+
if (xs.indexOf) {
|
|
14831
|
+
return xs.indexOf(x);
|
|
14832
|
+
}
|
|
14833
|
+
for (var i = 0, l = xs.length; i < l; i++) {
|
|
14834
|
+
if (xs[i] === x) {
|
|
14835
|
+
return i;
|
|
14836
|
+
}
|
|
14837
|
+
}
|
|
14838
|
+
return -1;
|
|
14839
|
+
}
|
|
14840
|
+
function isMap(x) {
|
|
14841
|
+
if (!mapSize || !x || typeof x !== "object") {
|
|
14842
|
+
return false;
|
|
14843
|
+
}
|
|
14850
14844
|
try {
|
|
14851
|
-
|
|
14845
|
+
mapSize.call(x);
|
|
14846
|
+
try {
|
|
14847
|
+
setSize.call(x);
|
|
14848
|
+
} catch (s) {
|
|
14849
|
+
return true;
|
|
14850
|
+
}
|
|
14851
|
+
return x instanceof Map;
|
|
14852
14852
|
} catch (e) {
|
|
14853
|
-
errorProto = getProto(getProto(e));
|
|
14854
|
-
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
14855
14853
|
}
|
|
14854
|
+
return false;
|
|
14856
14855
|
}
|
|
14857
|
-
|
|
14858
|
-
|
|
14859
|
-
|
|
14860
|
-
|
|
14861
|
-
|
|
14862
|
-
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
14868
|
-
if (fn) {
|
|
14869
|
-
value = fn.prototype;
|
|
14856
|
+
function isWeakMap(x) {
|
|
14857
|
+
if (!weakMapHas || !x || typeof x !== "object") {
|
|
14858
|
+
return false;
|
|
14859
|
+
}
|
|
14860
|
+
try {
|
|
14861
|
+
weakMapHas.call(x, weakMapHas);
|
|
14862
|
+
try {
|
|
14863
|
+
weakSetHas.call(x, weakSetHas);
|
|
14864
|
+
} catch (s) {
|
|
14865
|
+
return true;
|
|
14870
14866
|
}
|
|
14871
|
-
|
|
14872
|
-
|
|
14873
|
-
|
|
14874
|
-
|
|
14867
|
+
return x instanceof WeakMap;
|
|
14868
|
+
} catch (e) {
|
|
14869
|
+
}
|
|
14870
|
+
return false;
|
|
14871
|
+
}
|
|
14872
|
+
function isWeakRef(x) {
|
|
14873
|
+
if (!weakRefDeref || !x || typeof x !== "object") {
|
|
14874
|
+
return false;
|
|
14875
|
+
}
|
|
14876
|
+
try {
|
|
14877
|
+
weakRefDeref.call(x);
|
|
14878
|
+
return true;
|
|
14879
|
+
} catch (e) {
|
|
14880
|
+
}
|
|
14881
|
+
return false;
|
|
14882
|
+
}
|
|
14883
|
+
function isSet(x) {
|
|
14884
|
+
if (!setSize || !x || typeof x !== "object") {
|
|
14885
|
+
return false;
|
|
14886
|
+
}
|
|
14887
|
+
try {
|
|
14888
|
+
setSize.call(x);
|
|
14889
|
+
try {
|
|
14890
|
+
mapSize.call(x);
|
|
14891
|
+
} catch (m) {
|
|
14892
|
+
return true;
|
|
14875
14893
|
}
|
|
14894
|
+
return x instanceof Set;
|
|
14895
|
+
} catch (e) {
|
|
14876
14896
|
}
|
|
14877
|
-
|
|
14878
|
-
|
|
14879
|
-
|
|
14880
|
-
|
|
14881
|
-
|
|
14882
|
-
|
|
14883
|
-
|
|
14884
|
-
|
|
14885
|
-
|
|
14886
|
-
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
|
|
14890
|
-
|
|
14891
|
-
|
|
14892
|
-
|
|
14893
|
-
|
|
14894
|
-
|
|
14895
|
-
|
|
14896
|
-
|
|
14897
|
-
|
|
14898
|
-
|
|
14899
|
-
|
|
14900
|
-
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
|
|
14904
|
-
|
|
14905
|
-
|
|
14906
|
-
|
|
14907
|
-
|
|
14908
|
-
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
"
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
|
|
14949
|
-
|
|
14897
|
+
return false;
|
|
14898
|
+
}
|
|
14899
|
+
function isWeakSet(x) {
|
|
14900
|
+
if (!weakSetHas || !x || typeof x !== "object") {
|
|
14901
|
+
return false;
|
|
14902
|
+
}
|
|
14903
|
+
try {
|
|
14904
|
+
weakSetHas.call(x, weakSetHas);
|
|
14905
|
+
try {
|
|
14906
|
+
weakMapHas.call(x, weakMapHas);
|
|
14907
|
+
} catch (s) {
|
|
14908
|
+
return true;
|
|
14909
|
+
}
|
|
14910
|
+
return x instanceof WeakSet;
|
|
14911
|
+
} catch (e) {
|
|
14912
|
+
}
|
|
14913
|
+
return false;
|
|
14914
|
+
}
|
|
14915
|
+
function isElement(x) {
|
|
14916
|
+
if (!x || typeof x !== "object") {
|
|
14917
|
+
return false;
|
|
14918
|
+
}
|
|
14919
|
+
if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
|
|
14920
|
+
return true;
|
|
14921
|
+
}
|
|
14922
|
+
return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
|
|
14923
|
+
}
|
|
14924
|
+
function inspectString(str, opts) {
|
|
14925
|
+
if (str.length > opts.maxStringLength) {
|
|
14926
|
+
var remaining = str.length - opts.maxStringLength;
|
|
14927
|
+
var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
|
|
14928
|
+
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
14929
|
+
}
|
|
14930
|
+
var quoteRE = quoteREs[opts.quoteStyle || "single"];
|
|
14931
|
+
quoteRE.lastIndex = 0;
|
|
14932
|
+
var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte);
|
|
14933
|
+
return wrapQuotes(s, "single", opts);
|
|
14934
|
+
}
|
|
14935
|
+
function lowbyte(c) {
|
|
14936
|
+
var n = c.charCodeAt(0);
|
|
14937
|
+
var x = {
|
|
14938
|
+
8: "b",
|
|
14939
|
+
9: "t",
|
|
14940
|
+
10: "n",
|
|
14941
|
+
12: "f",
|
|
14942
|
+
13: "r"
|
|
14943
|
+
}[n];
|
|
14944
|
+
if (x) {
|
|
14945
|
+
return "\\" + x;
|
|
14946
|
+
}
|
|
14947
|
+
return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
|
|
14948
|
+
}
|
|
14949
|
+
function markBoxed(str) {
|
|
14950
|
+
return "Object(" + str + ")";
|
|
14951
|
+
}
|
|
14952
|
+
function weakCollectionOf(type) {
|
|
14953
|
+
return type + " { ? }";
|
|
14954
|
+
}
|
|
14955
|
+
function collectionOf(type, size, entries, indent) {
|
|
14956
|
+
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
|
|
14957
|
+
return type + " (" + size + ") {" + joinedEntries + "}";
|
|
14958
|
+
}
|
|
14959
|
+
function singleLineValues(xs) {
|
|
14960
|
+
for (var i = 0; i < xs.length; i++) {
|
|
14961
|
+
if (indexOf(xs[i], "\n") >= 0) {
|
|
14962
|
+
return false;
|
|
14963
|
+
}
|
|
14964
|
+
}
|
|
14965
|
+
return true;
|
|
14966
|
+
}
|
|
14967
|
+
function getIndent(opts, depth) {
|
|
14968
|
+
var baseIndent;
|
|
14969
|
+
if (opts.indent === " ") {
|
|
14970
|
+
baseIndent = " ";
|
|
14971
|
+
} else if (typeof opts.indent === "number" && opts.indent > 0) {
|
|
14972
|
+
baseIndent = $join.call(Array(opts.indent + 1), " ");
|
|
14973
|
+
} else {
|
|
14974
|
+
return null;
|
|
14950
14975
|
}
|
|
14951
|
-
|
|
14952
|
-
|
|
14953
|
-
|
|
14954
|
-
}
|
|
14955
|
-
|
|
14956
|
-
|
|
14957
|
-
|
|
14958
|
-
|
|
14959
|
-
var alias;
|
|
14960
|
-
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
14961
|
-
alias = LEGACY_ALIASES[intrinsicName];
|
|
14962
|
-
intrinsicName = "%" + alias[0] + "%";
|
|
14976
|
+
return {
|
|
14977
|
+
base: baseIndent,
|
|
14978
|
+
prev: $join.call(Array(depth + 1), baseIndent)
|
|
14979
|
+
};
|
|
14980
|
+
}
|
|
14981
|
+
function indentedJoin(xs, indent) {
|
|
14982
|
+
if (xs.length === 0) {
|
|
14983
|
+
return "";
|
|
14963
14984
|
}
|
|
14964
|
-
|
|
14965
|
-
|
|
14966
|
-
|
|
14967
|
-
|
|
14985
|
+
var lineJoiner = "\n" + indent.prev + indent.base;
|
|
14986
|
+
return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
|
|
14987
|
+
}
|
|
14988
|
+
function arrObjKeys(obj, inspect) {
|
|
14989
|
+
var isArr = isArray(obj);
|
|
14990
|
+
var xs = [];
|
|
14991
|
+
if (isArr) {
|
|
14992
|
+
xs.length = obj.length;
|
|
14993
|
+
for (var i = 0; i < obj.length; i++) {
|
|
14994
|
+
xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
|
|
14968
14995
|
}
|
|
14969
|
-
|
|
14970
|
-
|
|
14996
|
+
}
|
|
14997
|
+
var syms = typeof gOPS === "function" ? gOPS(obj) : [];
|
|
14998
|
+
var symMap;
|
|
14999
|
+
if (hasShammedSymbols) {
|
|
15000
|
+
symMap = {};
|
|
15001
|
+
for (var k = 0; k < syms.length; k++) {
|
|
15002
|
+
symMap["$" + syms[k]] = syms[k];
|
|
15003
|
+
}
|
|
15004
|
+
}
|
|
15005
|
+
for (var key in obj) {
|
|
15006
|
+
if (!has(obj, key)) {
|
|
15007
|
+
continue;
|
|
15008
|
+
}
|
|
15009
|
+
if (isArr && String(Number(key)) === key && key < obj.length) {
|
|
15010
|
+
continue;
|
|
15011
|
+
}
|
|
15012
|
+
if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
|
|
15013
|
+
continue;
|
|
15014
|
+
} else if ($test.call(/[^\w$]/, key)) {
|
|
15015
|
+
xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
|
|
15016
|
+
} else {
|
|
15017
|
+
xs.push(key + ": " + inspect(obj[key], obj));
|
|
15018
|
+
}
|
|
15019
|
+
}
|
|
15020
|
+
if (typeof gOPS === "function") {
|
|
15021
|
+
for (var j = 0; j < syms.length; j++) {
|
|
15022
|
+
if (isEnumerable.call(obj, syms[j])) {
|
|
15023
|
+
xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
|
|
15024
|
+
}
|
|
15025
|
+
}
|
|
15026
|
+
}
|
|
15027
|
+
return xs;
|
|
15028
|
+
}
|
|
15029
|
+
}
|
|
15030
|
+
});
|
|
15031
|
+
|
|
15032
|
+
// node_modules/side-channel-list/index.js
|
|
15033
|
+
var require_side_channel_list = __commonJS({
|
|
15034
|
+
"node_modules/side-channel-list/index.js"(exports2, module2) {
|
|
15035
|
+
"use strict";
|
|
15036
|
+
var inspect = require_object_inspect();
|
|
15037
|
+
var $TypeError = require_type();
|
|
15038
|
+
var listGetNode = function(list, key, isDelete) {
|
|
15039
|
+
var prev = list;
|
|
15040
|
+
var curr;
|
|
15041
|
+
for (; (curr = prev.next) != null; prev = curr) {
|
|
15042
|
+
if (curr.key === key) {
|
|
15043
|
+
prev.next = curr.next;
|
|
15044
|
+
if (!isDelete) {
|
|
15045
|
+
curr.next = /** @type {NonNullable<typeof list.next>} */
|
|
15046
|
+
list.next;
|
|
15047
|
+
list.next = curr;
|
|
15048
|
+
}
|
|
15049
|
+
return curr;
|
|
14971
15050
|
}
|
|
14972
|
-
return {
|
|
14973
|
-
alias,
|
|
14974
|
-
name: intrinsicName,
|
|
14975
|
-
value
|
|
14976
|
-
};
|
|
14977
15051
|
}
|
|
14978
|
-
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
14979
15052
|
};
|
|
14980
|
-
|
|
14981
|
-
if (
|
|
14982
|
-
|
|
15053
|
+
var listGet = function(objects, key) {
|
|
15054
|
+
if (!objects) {
|
|
15055
|
+
return void 0;
|
|
14983
15056
|
}
|
|
14984
|
-
|
|
14985
|
-
|
|
15057
|
+
var node = listGetNode(objects, key);
|
|
15058
|
+
return node && node.value;
|
|
15059
|
+
};
|
|
15060
|
+
var listSet = function(objects, key, value) {
|
|
15061
|
+
var node = listGetNode(objects, key);
|
|
15062
|
+
if (node) {
|
|
15063
|
+
node.value = value;
|
|
15064
|
+
} else {
|
|
15065
|
+
objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
|
|
15066
|
+
{
|
|
15067
|
+
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
15068
|
+
key,
|
|
15069
|
+
next: objects.next,
|
|
15070
|
+
value
|
|
15071
|
+
};
|
|
14986
15072
|
}
|
|
14987
|
-
|
|
14988
|
-
|
|
15073
|
+
};
|
|
15074
|
+
var listHas = function(objects, key) {
|
|
15075
|
+
if (!objects) {
|
|
15076
|
+
return false;
|
|
14989
15077
|
}
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
|
|
14995
|
-
var skipFurtherCaching = false;
|
|
14996
|
-
var alias = intrinsic.alias;
|
|
14997
|
-
if (alias) {
|
|
14998
|
-
intrinsicBaseName = alias[0];
|
|
14999
|
-
$spliceApply(parts, $concat([0, 1], alias));
|
|
15078
|
+
return !!listGetNode(objects, key);
|
|
15079
|
+
};
|
|
15080
|
+
var listDelete = function(objects, key) {
|
|
15081
|
+
if (objects) {
|
|
15082
|
+
return listGetNode(objects, key, true);
|
|
15000
15083
|
}
|
|
15001
|
-
|
|
15002
|
-
|
|
15003
|
-
|
|
15004
|
-
|
|
15005
|
-
|
|
15006
|
-
|
|
15007
|
-
|
|
15008
|
-
if (part === "constructor" || !isOwn) {
|
|
15009
|
-
skipFurtherCaching = true;
|
|
15010
|
-
}
|
|
15011
|
-
intrinsicBaseName += "." + part;
|
|
15012
|
-
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
15013
|
-
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
15014
|
-
value = INTRINSICS[intrinsicRealName];
|
|
15015
|
-
} else if (value != null) {
|
|
15016
|
-
if (!(part in value)) {
|
|
15017
|
-
if (!allowMissing) {
|
|
15018
|
-
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
15019
|
-
}
|
|
15020
|
-
return void 0;
|
|
15084
|
+
};
|
|
15085
|
+
module2.exports = function getSideChannelList() {
|
|
15086
|
+
var $o;
|
|
15087
|
+
var channel = {
|
|
15088
|
+
assert: function(key) {
|
|
15089
|
+
if (!channel.has(key)) {
|
|
15090
|
+
throw new $TypeError("Side channel does not contain " + inspect(key));
|
|
15021
15091
|
}
|
|
15022
|
-
|
|
15023
|
-
|
|
15024
|
-
|
|
15025
|
-
|
|
15026
|
-
|
|
15027
|
-
|
|
15028
|
-
value = value[part];
|
|
15029
|
-
}
|
|
15030
|
-
} else {
|
|
15031
|
-
isOwn = hasOwn(value, part);
|
|
15032
|
-
value = value[part];
|
|
15092
|
+
},
|
|
15093
|
+
"delete": function(key) {
|
|
15094
|
+
var root = $o && $o.next;
|
|
15095
|
+
var deletedNode = listDelete($o, key);
|
|
15096
|
+
if (deletedNode && root && root === deletedNode) {
|
|
15097
|
+
$o = void 0;
|
|
15033
15098
|
}
|
|
15034
|
-
|
|
15035
|
-
|
|
15099
|
+
return !!deletedNode;
|
|
15100
|
+
},
|
|
15101
|
+
get: function(key) {
|
|
15102
|
+
return listGet($o, key);
|
|
15103
|
+
},
|
|
15104
|
+
has: function(key) {
|
|
15105
|
+
return listHas($o, key);
|
|
15106
|
+
},
|
|
15107
|
+
set: function(key, value) {
|
|
15108
|
+
if (!$o) {
|
|
15109
|
+
$o = {
|
|
15110
|
+
next: void 0
|
|
15111
|
+
};
|
|
15036
15112
|
}
|
|
15113
|
+
listSet(
|
|
15114
|
+
/** @type {NonNullable<typeof $o>} */
|
|
15115
|
+
$o,
|
|
15116
|
+
key,
|
|
15117
|
+
value
|
|
15118
|
+
);
|
|
15037
15119
|
}
|
|
15038
|
-
}
|
|
15039
|
-
return
|
|
15120
|
+
};
|
|
15121
|
+
return channel;
|
|
15040
15122
|
};
|
|
15041
15123
|
}
|
|
15042
15124
|
});
|
|
15043
15125
|
|
|
15044
|
-
// node_modules/es-
|
|
15045
|
-
var
|
|
15046
|
-
"node_modules/es-
|
|
15126
|
+
// node_modules/es-object-atoms/index.js
|
|
15127
|
+
var require_es_object_atoms = __commonJS({
|
|
15128
|
+
"node_modules/es-object-atoms/index.js"(exports2, module2) {
|
|
15047
15129
|
"use strict";
|
|
15048
|
-
|
|
15049
|
-
var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false;
|
|
15050
|
-
if ($defineProperty) {
|
|
15051
|
-
try {
|
|
15052
|
-
$defineProperty({}, "a", { value: 1 });
|
|
15053
|
-
} catch (e) {
|
|
15054
|
-
$defineProperty = false;
|
|
15055
|
-
}
|
|
15056
|
-
}
|
|
15057
|
-
module2.exports = $defineProperty;
|
|
15130
|
+
module2.exports = Object;
|
|
15058
15131
|
}
|
|
15059
15132
|
});
|
|
15060
15133
|
|
|
15061
|
-
// node_modules/
|
|
15062
|
-
var
|
|
15063
|
-
"node_modules/
|
|
15134
|
+
// node_modules/es-errors/index.js
|
|
15135
|
+
var require_es_errors = __commonJS({
|
|
15136
|
+
"node_modules/es-errors/index.js"(exports2, module2) {
|
|
15064
15137
|
"use strict";
|
|
15065
|
-
|
|
15066
|
-
var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
|
|
15067
|
-
if ($gOPD) {
|
|
15068
|
-
try {
|
|
15069
|
-
$gOPD([], "length");
|
|
15070
|
-
} catch (e) {
|
|
15071
|
-
$gOPD = null;
|
|
15072
|
-
}
|
|
15073
|
-
}
|
|
15074
|
-
module2.exports = $gOPD;
|
|
15138
|
+
module2.exports = Error;
|
|
15075
15139
|
}
|
|
15076
15140
|
});
|
|
15077
15141
|
|
|
15078
|
-
// node_modules/
|
|
15079
|
-
var
|
|
15080
|
-
"node_modules/
|
|
15142
|
+
// node_modules/es-errors/eval.js
|
|
15143
|
+
var require_eval = __commonJS({
|
|
15144
|
+
"node_modules/es-errors/eval.js"(exports2, module2) {
|
|
15081
15145
|
"use strict";
|
|
15082
|
-
|
|
15083
|
-
|
|
15084
|
-
|
|
15085
|
-
|
|
15086
|
-
|
|
15087
|
-
|
|
15088
|
-
|
|
15089
|
-
|
|
15090
|
-
|
|
15091
|
-
|
|
15092
|
-
|
|
15093
|
-
|
|
15094
|
-
|
|
15095
|
-
|
|
15096
|
-
|
|
15097
|
-
|
|
15098
|
-
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
|
|
15104
|
-
|
|
15105
|
-
|
|
15106
|
-
|
|
15107
|
-
|
|
15108
|
-
|
|
15109
|
-
|
|
15110
|
-
|
|
15111
|
-
|
|
15112
|
-
|
|
15113
|
-
|
|
15114
|
-
|
|
15115
|
-
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
15116
|
-
});
|
|
15117
|
-
} else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
|
|
15118
|
-
obj[property] = value;
|
|
15119
|
-
} else {
|
|
15120
|
-
throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
15121
|
-
}
|
|
15122
|
-
};
|
|
15146
|
+
module2.exports = EvalError;
|
|
15147
|
+
}
|
|
15148
|
+
});
|
|
15149
|
+
|
|
15150
|
+
// node_modules/es-errors/range.js
|
|
15151
|
+
var require_range = __commonJS({
|
|
15152
|
+
"node_modules/es-errors/range.js"(exports2, module2) {
|
|
15153
|
+
"use strict";
|
|
15154
|
+
module2.exports = RangeError;
|
|
15155
|
+
}
|
|
15156
|
+
});
|
|
15157
|
+
|
|
15158
|
+
// node_modules/es-errors/ref.js
|
|
15159
|
+
var require_ref = __commonJS({
|
|
15160
|
+
"node_modules/es-errors/ref.js"(exports2, module2) {
|
|
15161
|
+
"use strict";
|
|
15162
|
+
module2.exports = ReferenceError;
|
|
15163
|
+
}
|
|
15164
|
+
});
|
|
15165
|
+
|
|
15166
|
+
// node_modules/es-errors/syntax.js
|
|
15167
|
+
var require_syntax = __commonJS({
|
|
15168
|
+
"node_modules/es-errors/syntax.js"(exports2, module2) {
|
|
15169
|
+
"use strict";
|
|
15170
|
+
module2.exports = SyntaxError;
|
|
15171
|
+
}
|
|
15172
|
+
});
|
|
15173
|
+
|
|
15174
|
+
// node_modules/es-errors/uri.js
|
|
15175
|
+
var require_uri = __commonJS({
|
|
15176
|
+
"node_modules/es-errors/uri.js"(exports2, module2) {
|
|
15177
|
+
"use strict";
|
|
15178
|
+
module2.exports = URIError;
|
|
15123
15179
|
}
|
|
15124
15180
|
});
|
|
15125
15181
|
|
|
15126
|
-
// node_modules/
|
|
15127
|
-
var
|
|
15128
|
-
"node_modules/
|
|
15182
|
+
// node_modules/math-intrinsics/abs.js
|
|
15183
|
+
var require_abs = __commonJS({
|
|
15184
|
+
"node_modules/math-intrinsics/abs.js"(exports2, module2) {
|
|
15129
15185
|
"use strict";
|
|
15130
|
-
|
|
15131
|
-
var hasPropertyDescriptors = function hasPropertyDescriptors2() {
|
|
15132
|
-
return !!$defineProperty;
|
|
15133
|
-
};
|
|
15134
|
-
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
15135
|
-
if (!$defineProperty) {
|
|
15136
|
-
return null;
|
|
15137
|
-
}
|
|
15138
|
-
try {
|
|
15139
|
-
return $defineProperty([], "length", { value: 1 }).length !== 1;
|
|
15140
|
-
} catch (e) {
|
|
15141
|
-
return true;
|
|
15142
|
-
}
|
|
15143
|
-
};
|
|
15144
|
-
module2.exports = hasPropertyDescriptors;
|
|
15186
|
+
module2.exports = Math.abs;
|
|
15145
15187
|
}
|
|
15146
15188
|
});
|
|
15147
15189
|
|
|
15148
|
-
// node_modules/
|
|
15149
|
-
var
|
|
15150
|
-
"node_modules/
|
|
15190
|
+
// node_modules/math-intrinsics/floor.js
|
|
15191
|
+
var require_floor = __commonJS({
|
|
15192
|
+
"node_modules/math-intrinsics/floor.js"(exports2, module2) {
|
|
15151
15193
|
"use strict";
|
|
15152
|
-
|
|
15153
|
-
var define = require_define_data_property();
|
|
15154
|
-
var hasDescriptors = require_has_property_descriptors()();
|
|
15155
|
-
var gOPD = require_gopd();
|
|
15156
|
-
var $TypeError = require_type();
|
|
15157
|
-
var $floor = GetIntrinsic("%Math.floor%");
|
|
15158
|
-
module2.exports = function setFunctionLength(fn, length) {
|
|
15159
|
-
if (typeof fn !== "function") {
|
|
15160
|
-
throw new $TypeError("`fn` is not a function");
|
|
15161
|
-
}
|
|
15162
|
-
if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
|
|
15163
|
-
throw new $TypeError("`length` must be a positive 32-bit integer");
|
|
15164
|
-
}
|
|
15165
|
-
var loose = arguments.length > 2 && !!arguments[2];
|
|
15166
|
-
var functionLengthIsConfigurable = true;
|
|
15167
|
-
var functionLengthIsWritable = true;
|
|
15168
|
-
if ("length" in fn && gOPD) {
|
|
15169
|
-
var desc = gOPD(fn, "length");
|
|
15170
|
-
if (desc && !desc.configurable) {
|
|
15171
|
-
functionLengthIsConfigurable = false;
|
|
15172
|
-
}
|
|
15173
|
-
if (desc && !desc.writable) {
|
|
15174
|
-
functionLengthIsWritable = false;
|
|
15175
|
-
}
|
|
15176
|
-
}
|
|
15177
|
-
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
15178
|
-
if (hasDescriptors) {
|
|
15179
|
-
define(
|
|
15180
|
-
/** @type {Parameters<define>[0]} */
|
|
15181
|
-
fn,
|
|
15182
|
-
"length",
|
|
15183
|
-
length,
|
|
15184
|
-
true,
|
|
15185
|
-
true
|
|
15186
|
-
);
|
|
15187
|
-
} else {
|
|
15188
|
-
define(
|
|
15189
|
-
/** @type {Parameters<define>[0]} */
|
|
15190
|
-
fn,
|
|
15191
|
-
"length",
|
|
15192
|
-
length
|
|
15193
|
-
);
|
|
15194
|
-
}
|
|
15195
|
-
}
|
|
15196
|
-
return fn;
|
|
15197
|
-
};
|
|
15194
|
+
module2.exports = Math.floor;
|
|
15198
15195
|
}
|
|
15199
15196
|
});
|
|
15200
15197
|
|
|
15201
|
-
// node_modules/
|
|
15202
|
-
var
|
|
15203
|
-
"node_modules/
|
|
15198
|
+
// node_modules/math-intrinsics/max.js
|
|
15199
|
+
var require_max = __commonJS({
|
|
15200
|
+
"node_modules/math-intrinsics/max.js"(exports2, module2) {
|
|
15204
15201
|
"use strict";
|
|
15205
|
-
|
|
15206
|
-
var GetIntrinsic = require_get_intrinsic();
|
|
15207
|
-
var setFunctionLength = require_set_function_length();
|
|
15208
|
-
var $TypeError = require_type();
|
|
15209
|
-
var $apply = GetIntrinsic("%Function.prototype.apply%");
|
|
15210
|
-
var $call = GetIntrinsic("%Function.prototype.call%");
|
|
15211
|
-
var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
|
|
15212
|
-
var $defineProperty = require_es_define_property();
|
|
15213
|
-
var $max = GetIntrinsic("%Math.max%");
|
|
15214
|
-
module2.exports = function callBind(originalFunction) {
|
|
15215
|
-
if (typeof originalFunction !== "function") {
|
|
15216
|
-
throw new $TypeError("a function is required");
|
|
15217
|
-
}
|
|
15218
|
-
var func = $reflectApply(bind, $call, arguments);
|
|
15219
|
-
return setFunctionLength(
|
|
15220
|
-
func,
|
|
15221
|
-
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
|
15222
|
-
true
|
|
15223
|
-
);
|
|
15224
|
-
};
|
|
15225
|
-
var applyBind = function applyBind2() {
|
|
15226
|
-
return $reflectApply(bind, $apply, arguments);
|
|
15227
|
-
};
|
|
15228
|
-
if ($defineProperty) {
|
|
15229
|
-
$defineProperty(module2.exports, "apply", { value: applyBind });
|
|
15230
|
-
} else {
|
|
15231
|
-
module2.exports.apply = applyBind;
|
|
15232
|
-
}
|
|
15202
|
+
module2.exports = Math.max;
|
|
15233
15203
|
}
|
|
15234
15204
|
});
|
|
15235
15205
|
|
|
15236
|
-
// node_modules/
|
|
15237
|
-
var
|
|
15238
|
-
"node_modules/
|
|
15206
|
+
// node_modules/math-intrinsics/min.js
|
|
15207
|
+
var require_min = __commonJS({
|
|
15208
|
+
"node_modules/math-intrinsics/min.js"(exports2, module2) {
|
|
15239
15209
|
"use strict";
|
|
15240
|
-
|
|
15241
|
-
var callBind = require_call_bind();
|
|
15242
|
-
var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
|
|
15243
|
-
module2.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
15244
|
-
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
15245
|
-
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
|
15246
|
-
return callBind(intrinsic);
|
|
15247
|
-
}
|
|
15248
|
-
return intrinsic;
|
|
15249
|
-
};
|
|
15210
|
+
module2.exports = Math.min;
|
|
15250
15211
|
}
|
|
15251
15212
|
});
|
|
15252
15213
|
|
|
15253
|
-
// node_modules/
|
|
15254
|
-
var
|
|
15255
|
-
"node_modules/
|
|
15214
|
+
// node_modules/math-intrinsics/pow.js
|
|
15215
|
+
var require_pow = __commonJS({
|
|
15216
|
+
"node_modules/math-intrinsics/pow.js"(exports2, module2) {
|
|
15256
15217
|
"use strict";
|
|
15257
|
-
module2.exports =
|
|
15218
|
+
module2.exports = Math.pow;
|
|
15258
15219
|
}
|
|
15259
15220
|
});
|
|
15260
15221
|
|
|
15261
|
-
// node_modules/
|
|
15262
|
-
var
|
|
15263
|
-
"node_modules/
|
|
15222
|
+
// node_modules/gopd/gOPD.js
|
|
15223
|
+
var require_gOPD = __commonJS({
|
|
15224
|
+
"node_modules/gopd/gOPD.js"(exports2, module2) {
|
|
15264
15225
|
"use strict";
|
|
15265
|
-
|
|
15266
|
-
|
|
15267
|
-
|
|
15268
|
-
|
|
15269
|
-
|
|
15270
|
-
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
var
|
|
15274
|
-
|
|
15275
|
-
|
|
15276
|
-
|
|
15277
|
-
|
|
15278
|
-
|
|
15279
|
-
var booleanValueOf = Boolean.prototype.valueOf;
|
|
15280
|
-
var objectToString = Object.prototype.toString;
|
|
15281
|
-
var functionToString = Function.prototype.toString;
|
|
15282
|
-
var $match = String.prototype.match;
|
|
15283
|
-
var $slice = String.prototype.slice;
|
|
15284
|
-
var $replace = String.prototype.replace;
|
|
15285
|
-
var $toUpperCase = String.prototype.toUpperCase;
|
|
15286
|
-
var $toLowerCase = String.prototype.toLowerCase;
|
|
15287
|
-
var $test = RegExp.prototype.test;
|
|
15288
|
-
var $concat = Array.prototype.concat;
|
|
15289
|
-
var $join = Array.prototype.join;
|
|
15290
|
-
var $arrSlice = Array.prototype.slice;
|
|
15291
|
-
var $floor = Math.floor;
|
|
15292
|
-
var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
|
|
15293
|
-
var gOPS = Object.getOwnPropertySymbols;
|
|
15294
|
-
var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
|
|
15295
|
-
var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
|
|
15296
|
-
var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
|
|
15297
|
-
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
15298
|
-
var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
|
|
15299
|
-
return O.__proto__;
|
|
15300
|
-
} : null);
|
|
15301
|
-
function addNumericSeparator(num, str) {
|
|
15302
|
-
if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
|
|
15303
|
-
return str;
|
|
15304
|
-
}
|
|
15305
|
-
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
15306
|
-
if (typeof num === "number") {
|
|
15307
|
-
var int = num < 0 ? -$floor(-num) : $floor(num);
|
|
15308
|
-
if (int !== num) {
|
|
15309
|
-
var intStr = String(int);
|
|
15310
|
-
var dec = $slice.call(str, intStr.length + 1);
|
|
15311
|
-
return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
15312
|
-
}
|
|
15226
|
+
module2.exports = Object.getOwnPropertyDescriptor;
|
|
15227
|
+
}
|
|
15228
|
+
});
|
|
15229
|
+
|
|
15230
|
+
// node_modules/gopd/index.js
|
|
15231
|
+
var require_gopd = __commonJS({
|
|
15232
|
+
"node_modules/gopd/index.js"(exports2, module2) {
|
|
15233
|
+
"use strict";
|
|
15234
|
+
var $gOPD = require_gOPD();
|
|
15235
|
+
if ($gOPD) {
|
|
15236
|
+
try {
|
|
15237
|
+
$gOPD([], "length");
|
|
15238
|
+
} catch (e) {
|
|
15239
|
+
$gOPD = null;
|
|
15313
15240
|
}
|
|
15314
|
-
return $replace.call(str, sepRegex, "$&_");
|
|
15315
15241
|
}
|
|
15316
|
-
|
|
15317
|
-
|
|
15318
|
-
|
|
15319
|
-
|
|
15320
|
-
|
|
15321
|
-
|
|
15322
|
-
|
|
15323
|
-
|
|
15324
|
-
var
|
|
15325
|
-
|
|
15326
|
-
|
|
15327
|
-
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
var opts = options || {};
|
|
15331
|
-
if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) {
|
|
15332
|
-
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
15333
|
-
}
|
|
15334
|
-
if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
|
|
15335
|
-
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
15336
|
-
}
|
|
15337
|
-
var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
|
|
15338
|
-
if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
|
|
15339
|
-
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
15340
|
-
}
|
|
15341
|
-
if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
|
|
15342
|
-
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
15343
|
-
}
|
|
15344
|
-
if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
|
|
15345
|
-
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
15346
|
-
}
|
|
15347
|
-
var numericSeparator = opts.numericSeparator;
|
|
15348
|
-
if (typeof obj === "undefined") {
|
|
15349
|
-
return "undefined";
|
|
15350
|
-
}
|
|
15351
|
-
if (obj === null) {
|
|
15352
|
-
return "null";
|
|
15353
|
-
}
|
|
15354
|
-
if (typeof obj === "boolean") {
|
|
15355
|
-
return obj ? "true" : "false";
|
|
15356
|
-
}
|
|
15357
|
-
if (typeof obj === "string") {
|
|
15358
|
-
return inspectString(obj, opts);
|
|
15359
|
-
}
|
|
15360
|
-
if (typeof obj === "number") {
|
|
15361
|
-
if (obj === 0) {
|
|
15362
|
-
return Infinity / obj > 0 ? "0" : "-0";
|
|
15363
|
-
}
|
|
15364
|
-
var str = String(obj);
|
|
15365
|
-
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
15366
|
-
}
|
|
15367
|
-
if (typeof obj === "bigint") {
|
|
15368
|
-
var bigIntStr = String(obj) + "n";
|
|
15369
|
-
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
15370
|
-
}
|
|
15371
|
-
var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
|
|
15372
|
-
if (typeof depth === "undefined") {
|
|
15373
|
-
depth = 0;
|
|
15374
|
-
}
|
|
15375
|
-
if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
|
|
15376
|
-
return isArray(obj) ? "[Array]" : "[Object]";
|
|
15377
|
-
}
|
|
15378
|
-
var indent = getIndent(opts, depth);
|
|
15379
|
-
if (typeof seen === "undefined") {
|
|
15380
|
-
seen = [];
|
|
15381
|
-
} else if (indexOf(seen, obj) >= 0) {
|
|
15382
|
-
return "[Circular]";
|
|
15383
|
-
}
|
|
15384
|
-
function inspect(value, from, noIndent) {
|
|
15385
|
-
if (from) {
|
|
15386
|
-
seen = $arrSlice.call(seen);
|
|
15387
|
-
seen.push(from);
|
|
15388
|
-
}
|
|
15389
|
-
if (noIndent) {
|
|
15390
|
-
var newOpts = {
|
|
15391
|
-
depth: opts.depth
|
|
15392
|
-
};
|
|
15393
|
-
if (has(opts, "quoteStyle")) {
|
|
15394
|
-
newOpts.quoteStyle = opts.quoteStyle;
|
|
15395
|
-
}
|
|
15396
|
-
return inspect_(value, newOpts, depth + 1, seen);
|
|
15397
|
-
}
|
|
15398
|
-
return inspect_(value, opts, depth + 1, seen);
|
|
15242
|
+
module2.exports = $gOPD;
|
|
15243
|
+
}
|
|
15244
|
+
});
|
|
15245
|
+
|
|
15246
|
+
// node_modules/es-define-property/index.js
|
|
15247
|
+
var require_es_define_property = __commonJS({
|
|
15248
|
+
"node_modules/es-define-property/index.js"(exports2, module2) {
|
|
15249
|
+
"use strict";
|
|
15250
|
+
var $defineProperty = Object.defineProperty || false;
|
|
15251
|
+
if ($defineProperty) {
|
|
15252
|
+
try {
|
|
15253
|
+
$defineProperty({}, "a", { value: 1 });
|
|
15254
|
+
} catch (e) {
|
|
15255
|
+
$defineProperty = false;
|
|
15399
15256
|
}
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15403
|
-
|
|
15257
|
+
}
|
|
15258
|
+
module2.exports = $defineProperty;
|
|
15259
|
+
}
|
|
15260
|
+
});
|
|
15261
|
+
|
|
15262
|
+
// node_modules/has-symbols/shams.js
|
|
15263
|
+
var require_shams = __commonJS({
|
|
15264
|
+
"node_modules/has-symbols/shams.js"(exports2, module2) {
|
|
15265
|
+
"use strict";
|
|
15266
|
+
module2.exports = function hasSymbols() {
|
|
15267
|
+
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
|
|
15268
|
+
return false;
|
|
15404
15269
|
}
|
|
15405
|
-
if (
|
|
15406
|
-
|
|
15407
|
-
return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
15270
|
+
if (typeof Symbol.iterator === "symbol") {
|
|
15271
|
+
return true;
|
|
15408
15272
|
}
|
|
15409
|
-
|
|
15410
|
-
|
|
15411
|
-
|
|
15412
|
-
|
|
15413
|
-
|
|
15414
|
-
}
|
|
15415
|
-
s += ">";
|
|
15416
|
-
if (obj.childNodes && obj.childNodes.length) {
|
|
15417
|
-
s += "...";
|
|
15418
|
-
}
|
|
15419
|
-
s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
|
|
15420
|
-
return s;
|
|
15273
|
+
var obj = {};
|
|
15274
|
+
var sym = Symbol("test");
|
|
15275
|
+
var symObj = Object(sym);
|
|
15276
|
+
if (typeof sym === "string") {
|
|
15277
|
+
return false;
|
|
15421
15278
|
}
|
|
15422
|
-
if (
|
|
15423
|
-
|
|
15424
|
-
return "[]";
|
|
15425
|
-
}
|
|
15426
|
-
var xs = arrObjKeys(obj, inspect);
|
|
15427
|
-
if (indent && !singleLineValues(xs)) {
|
|
15428
|
-
return "[" + indentedJoin(xs, indent) + "]";
|
|
15429
|
-
}
|
|
15430
|
-
return "[ " + $join.call(xs, ", ") + " ]";
|
|
15279
|
+
if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
|
|
15280
|
+
return false;
|
|
15431
15281
|
}
|
|
15432
|
-
if (
|
|
15433
|
-
|
|
15434
|
-
if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
|
|
15435
|
-
return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
|
|
15436
|
-
}
|
|
15437
|
-
if (parts.length === 0) {
|
|
15438
|
-
return "[" + String(obj) + "]";
|
|
15439
|
-
}
|
|
15440
|
-
return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
|
|
15282
|
+
if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
|
|
15283
|
+
return false;
|
|
15441
15284
|
}
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
|
|
15445
|
-
|
|
15446
|
-
return obj.inspect();
|
|
15447
|
-
}
|
|
15285
|
+
var symVal = 42;
|
|
15286
|
+
obj[sym] = symVal;
|
|
15287
|
+
for (var _ in obj) {
|
|
15288
|
+
return false;
|
|
15448
15289
|
}
|
|
15449
|
-
if (
|
|
15450
|
-
|
|
15451
|
-
if (mapForEach) {
|
|
15452
|
-
mapForEach.call(obj, function(value, key) {
|
|
15453
|
-
mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
|
|
15454
|
-
});
|
|
15455
|
-
}
|
|
15456
|
-
return collectionOf("Map", mapSize.call(obj), mapParts, indent);
|
|
15290
|
+
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
|
|
15291
|
+
return false;
|
|
15457
15292
|
}
|
|
15458
|
-
if (
|
|
15459
|
-
|
|
15460
|
-
if (setForEach) {
|
|
15461
|
-
setForEach.call(obj, function(value) {
|
|
15462
|
-
setParts.push(inspect(value, obj));
|
|
15463
|
-
});
|
|
15464
|
-
}
|
|
15465
|
-
return collectionOf("Set", setSize.call(obj), setParts, indent);
|
|
15293
|
+
if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
|
|
15294
|
+
return false;
|
|
15466
15295
|
}
|
|
15467
|
-
|
|
15468
|
-
|
|
15296
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
15297
|
+
if (syms.length !== 1 || syms[0] !== sym) {
|
|
15298
|
+
return false;
|
|
15469
15299
|
}
|
|
15470
|
-
if (
|
|
15471
|
-
return
|
|
15300
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
|
|
15301
|
+
return false;
|
|
15472
15302
|
}
|
|
15473
|
-
if (
|
|
15474
|
-
|
|
15303
|
+
if (typeof Object.getOwnPropertyDescriptor === "function") {
|
|
15304
|
+
var descriptor = (
|
|
15305
|
+
/** @type {PropertyDescriptor} */
|
|
15306
|
+
Object.getOwnPropertyDescriptor(obj, sym)
|
|
15307
|
+
);
|
|
15308
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) {
|
|
15309
|
+
return false;
|
|
15310
|
+
}
|
|
15475
15311
|
}
|
|
15476
|
-
|
|
15477
|
-
|
|
15312
|
+
return true;
|
|
15313
|
+
};
|
|
15314
|
+
}
|
|
15315
|
+
});
|
|
15316
|
+
|
|
15317
|
+
// node_modules/has-symbols/index.js
|
|
15318
|
+
var require_has_symbols = __commonJS({
|
|
15319
|
+
"node_modules/has-symbols/index.js"(exports2, module2) {
|
|
15320
|
+
"use strict";
|
|
15321
|
+
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
15322
|
+
var hasSymbolSham = require_shams();
|
|
15323
|
+
module2.exports = function hasNativeSymbols() {
|
|
15324
|
+
if (typeof origSymbol !== "function") {
|
|
15325
|
+
return false;
|
|
15478
15326
|
}
|
|
15479
|
-
if (
|
|
15480
|
-
return
|
|
15327
|
+
if (typeof Symbol !== "function") {
|
|
15328
|
+
return false;
|
|
15481
15329
|
}
|
|
15482
|
-
if (
|
|
15483
|
-
return
|
|
15330
|
+
if (typeof origSymbol("foo") !== "symbol") {
|
|
15331
|
+
return false;
|
|
15484
15332
|
}
|
|
15485
|
-
if (
|
|
15486
|
-
return
|
|
15333
|
+
if (typeof Symbol("bar") !== "symbol") {
|
|
15334
|
+
return false;
|
|
15487
15335
|
}
|
|
15488
|
-
|
|
15489
|
-
|
|
15336
|
+
return hasSymbolSham();
|
|
15337
|
+
};
|
|
15338
|
+
}
|
|
15339
|
+
});
|
|
15340
|
+
|
|
15341
|
+
// node_modules/function-bind/implementation.js
|
|
15342
|
+
var require_implementation = __commonJS({
|
|
15343
|
+
"node_modules/function-bind/implementation.js"(exports2, module2) {
|
|
15344
|
+
"use strict";
|
|
15345
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
15346
|
+
var toStr = Object.prototype.toString;
|
|
15347
|
+
var max = Math.max;
|
|
15348
|
+
var funcType = "[object Function]";
|
|
15349
|
+
var concatty = function concatty2(a, b) {
|
|
15350
|
+
var arr = [];
|
|
15351
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
15352
|
+
arr[i] = a[i];
|
|
15490
15353
|
}
|
|
15491
|
-
|
|
15492
|
-
|
|
15354
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
15355
|
+
arr[j + a.length] = b[j];
|
|
15493
15356
|
}
|
|
15494
|
-
|
|
15495
|
-
|
|
15496
|
-
|
|
15497
|
-
|
|
15498
|
-
|
|
15499
|
-
|
|
15500
|
-
|
|
15501
|
-
|
|
15502
|
-
|
|
15503
|
-
|
|
15504
|
-
|
|
15505
|
-
|
|
15357
|
+
return arr;
|
|
15358
|
+
};
|
|
15359
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
15360
|
+
var arr = [];
|
|
15361
|
+
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
15362
|
+
arr[j] = arrLike[i];
|
|
15363
|
+
}
|
|
15364
|
+
return arr;
|
|
15365
|
+
};
|
|
15366
|
+
var joiny = function(arr, joiner) {
|
|
15367
|
+
var str = "";
|
|
15368
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
15369
|
+
str += arr[i];
|
|
15370
|
+
if (i + 1 < arr.length) {
|
|
15371
|
+
str += joiner;
|
|
15506
15372
|
}
|
|
15507
|
-
return tag + "{ " + $join.call(ys, ", ") + " }";
|
|
15508
15373
|
}
|
|
15509
|
-
return
|
|
15374
|
+
return str;
|
|
15510
15375
|
};
|
|
15511
|
-
function
|
|
15512
|
-
var
|
|
15513
|
-
|
|
15514
|
-
|
|
15515
|
-
}
|
|
15516
|
-
function quote(s) {
|
|
15517
|
-
return $replace.call(String(s), /"/g, """);
|
|
15518
|
-
}
|
|
15519
|
-
function isArray(obj) {
|
|
15520
|
-
return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
15521
|
-
}
|
|
15522
|
-
function isDate(obj) {
|
|
15523
|
-
return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
15524
|
-
}
|
|
15525
|
-
function isRegExp(obj) {
|
|
15526
|
-
return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
15527
|
-
}
|
|
15528
|
-
function isError(obj) {
|
|
15529
|
-
return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
15530
|
-
}
|
|
15531
|
-
function isString(obj) {
|
|
15532
|
-
return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
15533
|
-
}
|
|
15534
|
-
function isNumber(obj) {
|
|
15535
|
-
return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
15536
|
-
}
|
|
15537
|
-
function isBoolean(obj) {
|
|
15538
|
-
return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
15539
|
-
}
|
|
15540
|
-
function isSymbol(obj) {
|
|
15541
|
-
if (hasShammedSymbols) {
|
|
15542
|
-
return obj && typeof obj === "object" && obj instanceof Symbol;
|
|
15376
|
+
module2.exports = function bind(that) {
|
|
15377
|
+
var target = this;
|
|
15378
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
15379
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
15543
15380
|
}
|
|
15544
|
-
|
|
15545
|
-
|
|
15381
|
+
var args = slicy(arguments, 1);
|
|
15382
|
+
var bound;
|
|
15383
|
+
var binder = function() {
|
|
15384
|
+
if (this instanceof bound) {
|
|
15385
|
+
var result = target.apply(
|
|
15386
|
+
this,
|
|
15387
|
+
concatty(args, arguments)
|
|
15388
|
+
);
|
|
15389
|
+
if (Object(result) === result) {
|
|
15390
|
+
return result;
|
|
15391
|
+
}
|
|
15392
|
+
return this;
|
|
15393
|
+
}
|
|
15394
|
+
return target.apply(
|
|
15395
|
+
that,
|
|
15396
|
+
concatty(args, arguments)
|
|
15397
|
+
);
|
|
15398
|
+
};
|
|
15399
|
+
var boundLength = max(0, target.length - args.length);
|
|
15400
|
+
var boundArgs = [];
|
|
15401
|
+
for (var i = 0; i < boundLength; i++) {
|
|
15402
|
+
boundArgs[i] = "$" + i;
|
|
15546
15403
|
}
|
|
15547
|
-
|
|
15548
|
-
|
|
15404
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
15405
|
+
if (target.prototype) {
|
|
15406
|
+
var Empty = function Empty2() {
|
|
15407
|
+
};
|
|
15408
|
+
Empty.prototype = target.prototype;
|
|
15409
|
+
bound.prototype = new Empty();
|
|
15410
|
+
Empty.prototype = null;
|
|
15549
15411
|
}
|
|
15550
|
-
|
|
15551
|
-
|
|
15552
|
-
|
|
15553
|
-
|
|
15412
|
+
return bound;
|
|
15413
|
+
};
|
|
15414
|
+
}
|
|
15415
|
+
});
|
|
15416
|
+
|
|
15417
|
+
// node_modules/function-bind/index.js
|
|
15418
|
+
var require_function_bind = __commonJS({
|
|
15419
|
+
"node_modules/function-bind/index.js"(exports2, module2) {
|
|
15420
|
+
"use strict";
|
|
15421
|
+
var implementation = require_implementation();
|
|
15422
|
+
module2.exports = Function.prototype.bind || implementation;
|
|
15423
|
+
}
|
|
15424
|
+
});
|
|
15425
|
+
|
|
15426
|
+
// node_modules/call-bind-apply-helpers/functionCall.js
|
|
15427
|
+
var require_functionCall = __commonJS({
|
|
15428
|
+
"node_modules/call-bind-apply-helpers/functionCall.js"(exports2, module2) {
|
|
15429
|
+
"use strict";
|
|
15430
|
+
module2.exports = Function.prototype.call;
|
|
15431
|
+
}
|
|
15432
|
+
});
|
|
15433
|
+
|
|
15434
|
+
// node_modules/call-bind-apply-helpers/functionApply.js
|
|
15435
|
+
var require_functionApply = __commonJS({
|
|
15436
|
+
"node_modules/call-bind-apply-helpers/functionApply.js"(exports2, module2) {
|
|
15437
|
+
"use strict";
|
|
15438
|
+
module2.exports = Function.prototype.apply;
|
|
15439
|
+
}
|
|
15440
|
+
});
|
|
15441
|
+
|
|
15442
|
+
// node_modules/call-bind-apply-helpers/reflectApply.js
|
|
15443
|
+
var require_reflectApply = __commonJS({
|
|
15444
|
+
"node_modules/call-bind-apply-helpers/reflectApply.js"(exports2, module2) {
|
|
15445
|
+
"use strict";
|
|
15446
|
+
module2.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
15447
|
+
}
|
|
15448
|
+
});
|
|
15449
|
+
|
|
15450
|
+
// node_modules/call-bind-apply-helpers/actualApply.js
|
|
15451
|
+
var require_actualApply = __commonJS({
|
|
15452
|
+
"node_modules/call-bind-apply-helpers/actualApply.js"(exports2, module2) {
|
|
15453
|
+
"use strict";
|
|
15454
|
+
var bind = require_function_bind();
|
|
15455
|
+
var $apply = require_functionApply();
|
|
15456
|
+
var $call = require_functionCall();
|
|
15457
|
+
var $reflectApply = require_reflectApply();
|
|
15458
|
+
module2.exports = $reflectApply || bind.call($call, $apply);
|
|
15459
|
+
}
|
|
15460
|
+
});
|
|
15461
|
+
|
|
15462
|
+
// node_modules/call-bind-apply-helpers/index.js
|
|
15463
|
+
var require_call_bind_apply_helpers = __commonJS({
|
|
15464
|
+
"node_modules/call-bind-apply-helpers/index.js"(exports2, module2) {
|
|
15465
|
+
"use strict";
|
|
15466
|
+
var bind = require_function_bind();
|
|
15467
|
+
var $TypeError = require_type();
|
|
15468
|
+
var $call = require_functionCall();
|
|
15469
|
+
var $actualApply = require_actualApply();
|
|
15470
|
+
module2.exports = function callBindBasic(args) {
|
|
15471
|
+
if (args.length < 1 || typeof args[0] !== "function") {
|
|
15472
|
+
throw new $TypeError("a function is required");
|
|
15473
|
+
}
|
|
15474
|
+
return $actualApply(bind, $call, args);
|
|
15475
|
+
};
|
|
15476
|
+
}
|
|
15477
|
+
});
|
|
15478
|
+
|
|
15479
|
+
// node_modules/dunder-proto/get.js
|
|
15480
|
+
var require_get = __commonJS({
|
|
15481
|
+
"node_modules/dunder-proto/get.js"(exports2, module2) {
|
|
15482
|
+
"use strict";
|
|
15483
|
+
var callBind = require_call_bind_apply_helpers();
|
|
15484
|
+
var gOPD = require_gopd();
|
|
15485
|
+
var hasProtoAccessor;
|
|
15486
|
+
try {
|
|
15487
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
15488
|
+
[].__proto__ === Array.prototype;
|
|
15489
|
+
} catch (e) {
|
|
15490
|
+
if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
|
|
15491
|
+
throw e;
|
|
15554
15492
|
}
|
|
15555
|
-
return false;
|
|
15556
15493
|
}
|
|
15557
|
-
|
|
15558
|
-
|
|
15559
|
-
|
|
15494
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(
|
|
15495
|
+
Object.prototype,
|
|
15496
|
+
/** @type {keyof typeof Object.prototype} */
|
|
15497
|
+
"__proto__"
|
|
15498
|
+
);
|
|
15499
|
+
var $Object = Object;
|
|
15500
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
15501
|
+
module2.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
|
|
15502
|
+
/** @type {import('./get')} */
|
|
15503
|
+
function getDunder(value) {
|
|
15504
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
15560
15505
|
}
|
|
15506
|
+
) : false;
|
|
15507
|
+
}
|
|
15508
|
+
});
|
|
15509
|
+
|
|
15510
|
+
// node_modules/hasown/index.js
|
|
15511
|
+
var require_hasown = __commonJS({
|
|
15512
|
+
"node_modules/hasown/index.js"(exports2, module2) {
|
|
15513
|
+
"use strict";
|
|
15514
|
+
var call = Function.prototype.call;
|
|
15515
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
15516
|
+
var bind = require_function_bind();
|
|
15517
|
+
module2.exports = bind.call(call, $hasOwn);
|
|
15518
|
+
}
|
|
15519
|
+
});
|
|
15520
|
+
|
|
15521
|
+
// node_modules/get-intrinsic/index.js
|
|
15522
|
+
var require_get_intrinsic = __commonJS({
|
|
15523
|
+
"node_modules/get-intrinsic/index.js"(exports2, module2) {
|
|
15524
|
+
"use strict";
|
|
15525
|
+
var undefined2;
|
|
15526
|
+
var $Object = require_es_object_atoms();
|
|
15527
|
+
var $Error = require_es_errors();
|
|
15528
|
+
var $EvalError = require_eval();
|
|
15529
|
+
var $RangeError = require_range();
|
|
15530
|
+
var $ReferenceError = require_ref();
|
|
15531
|
+
var $SyntaxError = require_syntax();
|
|
15532
|
+
var $TypeError = require_type();
|
|
15533
|
+
var $URIError = require_uri();
|
|
15534
|
+
var abs = require_abs();
|
|
15535
|
+
var floor = require_floor();
|
|
15536
|
+
var max = require_max();
|
|
15537
|
+
var min = require_min();
|
|
15538
|
+
var pow = require_pow();
|
|
15539
|
+
var $Function = Function;
|
|
15540
|
+
var getEvalledConstructor = function(expressionSyntax) {
|
|
15561
15541
|
try {
|
|
15562
|
-
|
|
15563
|
-
return true;
|
|
15542
|
+
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
15564
15543
|
} catch (e) {
|
|
15565
15544
|
}
|
|
15566
|
-
return false;
|
|
15567
|
-
}
|
|
15568
|
-
var hasOwn = Object.prototype.hasOwnProperty || function(key) {
|
|
15569
|
-
return key in this;
|
|
15570
15545
|
};
|
|
15571
|
-
|
|
15572
|
-
|
|
15573
|
-
|
|
15574
|
-
|
|
15575
|
-
|
|
15576
|
-
|
|
15577
|
-
function nameOf(f) {
|
|
15578
|
-
if (f.name) {
|
|
15579
|
-
return f.name;
|
|
15580
|
-
}
|
|
15581
|
-
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
15582
|
-
if (m) {
|
|
15583
|
-
return m[1];
|
|
15584
|
-
}
|
|
15585
|
-
return null;
|
|
15586
|
-
}
|
|
15587
|
-
function indexOf(xs, x) {
|
|
15588
|
-
if (xs.indexOf) {
|
|
15589
|
-
return xs.indexOf(x);
|
|
15590
|
-
}
|
|
15591
|
-
for (var i = 0, l = xs.length; i < l; i++) {
|
|
15592
|
-
if (xs[i] === x) {
|
|
15593
|
-
return i;
|
|
15594
|
-
}
|
|
15595
|
-
}
|
|
15596
|
-
return -1;
|
|
15597
|
-
}
|
|
15598
|
-
function isMap(x) {
|
|
15599
|
-
if (!mapSize || !x || typeof x !== "object") {
|
|
15600
|
-
return false;
|
|
15601
|
-
}
|
|
15546
|
+
var $gOPD = require_gopd();
|
|
15547
|
+
var $defineProperty = require_es_define_property();
|
|
15548
|
+
var throwTypeError = function() {
|
|
15549
|
+
throw new $TypeError();
|
|
15550
|
+
};
|
|
15551
|
+
var ThrowTypeError = $gOPD ? function() {
|
|
15602
15552
|
try {
|
|
15603
|
-
|
|
15553
|
+
arguments.callee;
|
|
15554
|
+
return throwTypeError;
|
|
15555
|
+
} catch (calleeThrows) {
|
|
15604
15556
|
try {
|
|
15605
|
-
|
|
15606
|
-
} catch (
|
|
15607
|
-
return
|
|
15557
|
+
return $gOPD(arguments, "callee").get;
|
|
15558
|
+
} catch (gOPDthrows) {
|
|
15559
|
+
return throwTypeError;
|
|
15608
15560
|
}
|
|
15609
|
-
return x instanceof Map;
|
|
15610
|
-
} catch (e) {
|
|
15611
|
-
}
|
|
15612
|
-
return false;
|
|
15613
|
-
}
|
|
15614
|
-
function isWeakMap(x) {
|
|
15615
|
-
if (!weakMapHas || !x || typeof x !== "object") {
|
|
15616
|
-
return false;
|
|
15617
15561
|
}
|
|
15562
|
+
}() : throwTypeError;
|
|
15563
|
+
var hasSymbols = require_has_symbols()();
|
|
15564
|
+
var getDunderProto = require_get();
|
|
15565
|
+
var getProto = typeof Reflect === "function" && Reflect.getPrototypeOf || $Object.getPrototypeOf || getDunderProto;
|
|
15566
|
+
var $apply = require_functionApply();
|
|
15567
|
+
var $call = require_functionCall();
|
|
15568
|
+
var needsEval = {};
|
|
15569
|
+
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
|
|
15570
|
+
var INTRINSICS = {
|
|
15571
|
+
__proto__: null,
|
|
15572
|
+
"%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
|
|
15573
|
+
"%Array%": Array,
|
|
15574
|
+
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
|
|
15575
|
+
"%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
|
|
15576
|
+
"%AsyncFromSyncIteratorPrototype%": undefined2,
|
|
15577
|
+
"%AsyncFunction%": needsEval,
|
|
15578
|
+
"%AsyncGenerator%": needsEval,
|
|
15579
|
+
"%AsyncGeneratorFunction%": needsEval,
|
|
15580
|
+
"%AsyncIteratorPrototype%": needsEval,
|
|
15581
|
+
"%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
|
|
15582
|
+
"%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
|
|
15583
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
|
|
15584
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
|
|
15585
|
+
"%Boolean%": Boolean,
|
|
15586
|
+
"%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
|
|
15587
|
+
"%Date%": Date,
|
|
15588
|
+
"%decodeURI%": decodeURI,
|
|
15589
|
+
"%decodeURIComponent%": decodeURIComponent,
|
|
15590
|
+
"%encodeURI%": encodeURI,
|
|
15591
|
+
"%encodeURIComponent%": encodeURIComponent,
|
|
15592
|
+
"%Error%": $Error,
|
|
15593
|
+
"%eval%": eval,
|
|
15594
|
+
// eslint-disable-line no-eval
|
|
15595
|
+
"%EvalError%": $EvalError,
|
|
15596
|
+
"%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
|
|
15597
|
+
"%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
|
|
15598
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
|
|
15599
|
+
"%Function%": $Function,
|
|
15600
|
+
"%GeneratorFunction%": needsEval,
|
|
15601
|
+
"%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
|
|
15602
|
+
"%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
|
|
15603
|
+
"%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
|
|
15604
|
+
"%isFinite%": isFinite,
|
|
15605
|
+
"%isNaN%": isNaN,
|
|
15606
|
+
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
|
|
15607
|
+
"%JSON%": typeof JSON === "object" ? JSON : undefined2,
|
|
15608
|
+
"%Map%": typeof Map === "undefined" ? undefined2 : Map,
|
|
15609
|
+
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
15610
|
+
"%Math%": Math,
|
|
15611
|
+
"%Number%": Number,
|
|
15612
|
+
"%Object%": $Object,
|
|
15613
|
+
"%Object.getOwnPropertyDescriptor%": $gOPD,
|
|
15614
|
+
"%parseFloat%": parseFloat,
|
|
15615
|
+
"%parseInt%": parseInt,
|
|
15616
|
+
"%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
|
|
15617
|
+
"%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
|
|
15618
|
+
"%RangeError%": $RangeError,
|
|
15619
|
+
"%ReferenceError%": $ReferenceError,
|
|
15620
|
+
"%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
|
|
15621
|
+
"%RegExp%": RegExp,
|
|
15622
|
+
"%Set%": typeof Set === "undefined" ? undefined2 : Set,
|
|
15623
|
+
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
15624
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
|
|
15625
|
+
"%String%": String,
|
|
15626
|
+
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
|
|
15627
|
+
"%Symbol%": hasSymbols ? Symbol : undefined2,
|
|
15628
|
+
"%SyntaxError%": $SyntaxError,
|
|
15629
|
+
"%ThrowTypeError%": ThrowTypeError,
|
|
15630
|
+
"%TypedArray%": TypedArray,
|
|
15631
|
+
"%TypeError%": $TypeError,
|
|
15632
|
+
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
|
|
15633
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
|
|
15634
|
+
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
|
|
15635
|
+
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
|
|
15636
|
+
"%URIError%": $URIError,
|
|
15637
|
+
"%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
|
|
15638
|
+
"%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
|
|
15639
|
+
"%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet,
|
|
15640
|
+
"%Function.prototype.call%": $call,
|
|
15641
|
+
"%Function.prototype.apply%": $apply,
|
|
15642
|
+
"%Object.defineProperty%": $defineProperty,
|
|
15643
|
+
"%Math.abs%": abs,
|
|
15644
|
+
"%Math.floor%": floor,
|
|
15645
|
+
"%Math.max%": max,
|
|
15646
|
+
"%Math.min%": min,
|
|
15647
|
+
"%Math.pow%": pow
|
|
15648
|
+
};
|
|
15649
|
+
if (getProto) {
|
|
15618
15650
|
try {
|
|
15619
|
-
|
|
15620
|
-
try {
|
|
15621
|
-
weakSetHas.call(x, weakSetHas);
|
|
15622
|
-
} catch (s) {
|
|
15623
|
-
return true;
|
|
15624
|
-
}
|
|
15625
|
-
return x instanceof WeakMap;
|
|
15651
|
+
null.error;
|
|
15626
15652
|
} catch (e) {
|
|
15653
|
+
errorProto = getProto(getProto(e));
|
|
15654
|
+
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
15627
15655
|
}
|
|
15628
|
-
return false;
|
|
15629
15656
|
}
|
|
15630
|
-
|
|
15631
|
-
|
|
15632
|
-
|
|
15657
|
+
var errorProto;
|
|
15658
|
+
var doEval = function doEval2(name) {
|
|
15659
|
+
var value;
|
|
15660
|
+
if (name === "%AsyncFunction%") {
|
|
15661
|
+
value = getEvalledConstructor("async function () {}");
|
|
15662
|
+
} else if (name === "%GeneratorFunction%") {
|
|
15663
|
+
value = getEvalledConstructor("function* () {}");
|
|
15664
|
+
} else if (name === "%AsyncGeneratorFunction%") {
|
|
15665
|
+
value = getEvalledConstructor("async function* () {}");
|
|
15666
|
+
} else if (name === "%AsyncGenerator%") {
|
|
15667
|
+
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
15668
|
+
if (fn) {
|
|
15669
|
+
value = fn.prototype;
|
|
15670
|
+
}
|
|
15671
|
+
} else if (name === "%AsyncIteratorPrototype%") {
|
|
15672
|
+
var gen = doEval2("%AsyncGenerator%");
|
|
15673
|
+
if (gen && getProto) {
|
|
15674
|
+
value = getProto(gen.prototype);
|
|
15675
|
+
}
|
|
15633
15676
|
}
|
|
15634
|
-
|
|
15635
|
-
|
|
15636
|
-
|
|
15637
|
-
|
|
15677
|
+
INTRINSICS[name] = value;
|
|
15678
|
+
return value;
|
|
15679
|
+
};
|
|
15680
|
+
var LEGACY_ALIASES = {
|
|
15681
|
+
__proto__: null,
|
|
15682
|
+
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
15683
|
+
"%ArrayPrototype%": ["Array", "prototype"],
|
|
15684
|
+
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
15685
|
+
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
|
|
15686
|
+
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
|
|
15687
|
+
"%ArrayProto_values%": ["Array", "prototype", "values"],
|
|
15688
|
+
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
15689
|
+
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
15690
|
+
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
|
|
15691
|
+
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
15692
|
+
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
15693
|
+
"%DatePrototype%": ["Date", "prototype"],
|
|
15694
|
+
"%ErrorPrototype%": ["Error", "prototype"],
|
|
15695
|
+
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
15696
|
+
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
15697
|
+
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
15698
|
+
"%FunctionPrototype%": ["Function", "prototype"],
|
|
15699
|
+
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
15700
|
+
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
|
|
15701
|
+
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
15702
|
+
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
15703
|
+
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
15704
|
+
"%JSONParse%": ["JSON", "parse"],
|
|
15705
|
+
"%JSONStringify%": ["JSON", "stringify"],
|
|
15706
|
+
"%MapPrototype%": ["Map", "prototype"],
|
|
15707
|
+
"%NumberPrototype%": ["Number", "prototype"],
|
|
15708
|
+
"%ObjectPrototype%": ["Object", "prototype"],
|
|
15709
|
+
"%ObjProto_toString%": ["Object", "prototype", "toString"],
|
|
15710
|
+
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
|
|
15711
|
+
"%PromisePrototype%": ["Promise", "prototype"],
|
|
15712
|
+
"%PromiseProto_then%": ["Promise", "prototype", "then"],
|
|
15713
|
+
"%Promise_all%": ["Promise", "all"],
|
|
15714
|
+
"%Promise_reject%": ["Promise", "reject"],
|
|
15715
|
+
"%Promise_resolve%": ["Promise", "resolve"],
|
|
15716
|
+
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
15717
|
+
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
15718
|
+
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
15719
|
+
"%SetPrototype%": ["Set", "prototype"],
|
|
15720
|
+
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
15721
|
+
"%StringPrototype%": ["String", "prototype"],
|
|
15722
|
+
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
15723
|
+
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
15724
|
+
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
15725
|
+
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
15726
|
+
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
15727
|
+
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
15728
|
+
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
15729
|
+
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
15730
|
+
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
15731
|
+
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
15732
|
+
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
15733
|
+
};
|
|
15734
|
+
var bind = require_function_bind();
|
|
15735
|
+
var hasOwn = require_hasown();
|
|
15736
|
+
var $concat = bind.call($call, Array.prototype.concat);
|
|
15737
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
15738
|
+
var $replace = bind.call($call, String.prototype.replace);
|
|
15739
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
15740
|
+
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
15741
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
15742
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
15743
|
+
var stringToPath = function stringToPath2(string) {
|
|
15744
|
+
var first = $strSlice(string, 0, 1);
|
|
15745
|
+
var last = $strSlice(string, -1);
|
|
15746
|
+
if (first === "%" && last !== "%") {
|
|
15747
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
15748
|
+
} else if (last === "%" && first !== "%") {
|
|
15749
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
15638
15750
|
}
|
|
15639
|
-
|
|
15640
|
-
|
|
15641
|
-
|
|
15642
|
-
|
|
15643
|
-
|
|
15751
|
+
var result = [];
|
|
15752
|
+
$replace(string, rePropName, function(match, number, quote, subString) {
|
|
15753
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
|
|
15754
|
+
});
|
|
15755
|
+
return result;
|
|
15756
|
+
};
|
|
15757
|
+
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
15758
|
+
var intrinsicName = name;
|
|
15759
|
+
var alias;
|
|
15760
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
15761
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
15762
|
+
intrinsicName = "%" + alias[0] + "%";
|
|
15644
15763
|
}
|
|
15645
|
-
|
|
15646
|
-
|
|
15647
|
-
|
|
15648
|
-
|
|
15649
|
-
} catch (m) {
|
|
15650
|
-
return true;
|
|
15764
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
15765
|
+
var value = INTRINSICS[intrinsicName];
|
|
15766
|
+
if (value === needsEval) {
|
|
15767
|
+
value = doEval(intrinsicName);
|
|
15651
15768
|
}
|
|
15652
|
-
|
|
15653
|
-
|
|
15654
|
-
}
|
|
15655
|
-
return false;
|
|
15656
|
-
}
|
|
15657
|
-
function isWeakSet(x) {
|
|
15658
|
-
if (!weakSetHas || !x || typeof x !== "object") {
|
|
15659
|
-
return false;
|
|
15660
|
-
}
|
|
15661
|
-
try {
|
|
15662
|
-
weakSetHas.call(x, weakSetHas);
|
|
15663
|
-
try {
|
|
15664
|
-
weakMapHas.call(x, weakMapHas);
|
|
15665
|
-
} catch (s) {
|
|
15666
|
-
return true;
|
|
15769
|
+
if (typeof value === "undefined" && !allowMissing) {
|
|
15770
|
+
throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
15667
15771
|
}
|
|
15668
|
-
return
|
|
15669
|
-
|
|
15772
|
+
return {
|
|
15773
|
+
alias,
|
|
15774
|
+
name: intrinsicName,
|
|
15775
|
+
value
|
|
15776
|
+
};
|
|
15670
15777
|
}
|
|
15671
|
-
|
|
15672
|
-
}
|
|
15673
|
-
function
|
|
15674
|
-
if (
|
|
15675
|
-
|
|
15778
|
+
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
15779
|
+
};
|
|
15780
|
+
module2.exports = function GetIntrinsic(name, allowMissing) {
|
|
15781
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
15782
|
+
throw new $TypeError("intrinsic name must be a non-empty string");
|
|
15676
15783
|
}
|
|
15677
|
-
if (typeof
|
|
15678
|
-
|
|
15784
|
+
if (arguments.length > 1 && typeof allowMissing !== "boolean") {
|
|
15785
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
15679
15786
|
}
|
|
15680
|
-
|
|
15681
|
-
|
|
15682
|
-
function inspectString(str, opts) {
|
|
15683
|
-
if (str.length > opts.maxStringLength) {
|
|
15684
|
-
var remaining = str.length - opts.maxStringLength;
|
|
15685
|
-
var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
|
|
15686
|
-
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
15787
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
15788
|
+
throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
15687
15789
|
}
|
|
15688
|
-
var
|
|
15689
|
-
|
|
15690
|
-
var
|
|
15691
|
-
|
|
15692
|
-
|
|
15693
|
-
|
|
15694
|
-
var
|
|
15695
|
-
|
|
15696
|
-
|
|
15697
|
-
|
|
15698
|
-
10: "n",
|
|
15699
|
-
12: "f",
|
|
15700
|
-
13: "r"
|
|
15701
|
-
}[n];
|
|
15702
|
-
if (x) {
|
|
15703
|
-
return "\\" + x;
|
|
15790
|
+
var parts = stringToPath(name);
|
|
15791
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
15792
|
+
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
15793
|
+
var intrinsicRealName = intrinsic.name;
|
|
15794
|
+
var value = intrinsic.value;
|
|
15795
|
+
var skipFurtherCaching = false;
|
|
15796
|
+
var alias = intrinsic.alias;
|
|
15797
|
+
if (alias) {
|
|
15798
|
+
intrinsicBaseName = alias[0];
|
|
15799
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
15704
15800
|
}
|
|
15705
|
-
|
|
15706
|
-
|
|
15707
|
-
|
|
15708
|
-
|
|
15709
|
-
|
|
15710
|
-
|
|
15711
|
-
return type + " { ? }";
|
|
15712
|
-
}
|
|
15713
|
-
function collectionOf(type, size, entries, indent) {
|
|
15714
|
-
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
|
|
15715
|
-
return type + " (" + size + ") {" + joinedEntries + "}";
|
|
15716
|
-
}
|
|
15717
|
-
function singleLineValues(xs) {
|
|
15718
|
-
for (var i = 0; i < xs.length; i++) {
|
|
15719
|
-
if (indexOf(xs[i], "\n") >= 0) {
|
|
15720
|
-
return false;
|
|
15801
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
15802
|
+
var part = parts[i];
|
|
15803
|
+
var first = $strSlice(part, 0, 1);
|
|
15804
|
+
var last = $strSlice(part, -1);
|
|
15805
|
+
if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
|
|
15806
|
+
throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
15721
15807
|
}
|
|
15722
|
-
|
|
15723
|
-
|
|
15724
|
-
}
|
|
15725
|
-
function getIndent(opts, depth) {
|
|
15726
|
-
var baseIndent;
|
|
15727
|
-
if (opts.indent === " ") {
|
|
15728
|
-
baseIndent = " ";
|
|
15729
|
-
} else if (typeof opts.indent === "number" && opts.indent > 0) {
|
|
15730
|
-
baseIndent = $join.call(Array(opts.indent + 1), " ");
|
|
15731
|
-
} else {
|
|
15732
|
-
return null;
|
|
15733
|
-
}
|
|
15734
|
-
return {
|
|
15735
|
-
base: baseIndent,
|
|
15736
|
-
prev: $join.call(Array(depth + 1), baseIndent)
|
|
15737
|
-
};
|
|
15738
|
-
}
|
|
15739
|
-
function indentedJoin(xs, indent) {
|
|
15740
|
-
if (xs.length === 0) {
|
|
15741
|
-
return "";
|
|
15742
|
-
}
|
|
15743
|
-
var lineJoiner = "\n" + indent.prev + indent.base;
|
|
15744
|
-
return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
|
|
15745
|
-
}
|
|
15746
|
-
function arrObjKeys(obj, inspect) {
|
|
15747
|
-
var isArr = isArray(obj);
|
|
15748
|
-
var xs = [];
|
|
15749
|
-
if (isArr) {
|
|
15750
|
-
xs.length = obj.length;
|
|
15751
|
-
for (var i = 0; i < obj.length; i++) {
|
|
15752
|
-
xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
|
|
15808
|
+
if (part === "constructor" || !isOwn) {
|
|
15809
|
+
skipFurtherCaching = true;
|
|
15753
15810
|
}
|
|
15754
|
-
|
|
15755
|
-
|
|
15756
|
-
|
|
15757
|
-
|
|
15758
|
-
|
|
15759
|
-
|
|
15760
|
-
|
|
15811
|
+
intrinsicBaseName += "." + part;
|
|
15812
|
+
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
15813
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
15814
|
+
value = INTRINSICS[intrinsicRealName];
|
|
15815
|
+
} else if (value != null) {
|
|
15816
|
+
if (!(part in value)) {
|
|
15817
|
+
if (!allowMissing) {
|
|
15818
|
+
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
15819
|
+
}
|
|
15820
|
+
return void 0;
|
|
15821
|
+
}
|
|
15822
|
+
if ($gOPD && i + 1 >= parts.length) {
|
|
15823
|
+
var desc = $gOPD(value, part);
|
|
15824
|
+
isOwn = !!desc;
|
|
15825
|
+
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
15826
|
+
value = desc.get;
|
|
15827
|
+
} else {
|
|
15828
|
+
value = value[part];
|
|
15829
|
+
}
|
|
15830
|
+
} else {
|
|
15831
|
+
isOwn = hasOwn(value, part);
|
|
15832
|
+
value = value[part];
|
|
15833
|
+
}
|
|
15834
|
+
if (isOwn && !skipFurtherCaching) {
|
|
15835
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
15836
|
+
}
|
|
15761
15837
|
}
|
|
15762
15838
|
}
|
|
15763
|
-
|
|
15764
|
-
|
|
15765
|
-
|
|
15766
|
-
|
|
15767
|
-
|
|
15768
|
-
|
|
15769
|
-
|
|
15770
|
-
|
|
15771
|
-
|
|
15772
|
-
|
|
15773
|
-
|
|
15774
|
-
|
|
15775
|
-
|
|
15776
|
-
|
|
15839
|
+
return value;
|
|
15840
|
+
};
|
|
15841
|
+
}
|
|
15842
|
+
});
|
|
15843
|
+
|
|
15844
|
+
// node_modules/call-bound/index.js
|
|
15845
|
+
var require_call_bound = __commonJS({
|
|
15846
|
+
"node_modules/call-bound/index.js"(exports2, module2) {
|
|
15847
|
+
"use strict";
|
|
15848
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
15849
|
+
var callBindBasic = require_call_bind_apply_helpers();
|
|
15850
|
+
var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
|
|
15851
|
+
module2.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
15852
|
+
var intrinsic = (
|
|
15853
|
+
/** @type {Parameters<typeof callBindBasic>[0][0]} */
|
|
15854
|
+
GetIntrinsic(name, !!allowMissing)
|
|
15855
|
+
);
|
|
15856
|
+
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
|
15857
|
+
return callBindBasic([intrinsic]);
|
|
15777
15858
|
}
|
|
15778
|
-
|
|
15779
|
-
|
|
15780
|
-
|
|
15781
|
-
|
|
15859
|
+
return intrinsic;
|
|
15860
|
+
};
|
|
15861
|
+
}
|
|
15862
|
+
});
|
|
15863
|
+
|
|
15864
|
+
// node_modules/side-channel-map/index.js
|
|
15865
|
+
var require_side_channel_map = __commonJS({
|
|
15866
|
+
"node_modules/side-channel-map/index.js"(exports2, module2) {
|
|
15867
|
+
"use strict";
|
|
15868
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
15869
|
+
var callBound = require_call_bound();
|
|
15870
|
+
var inspect = require_object_inspect();
|
|
15871
|
+
var $TypeError = require_type();
|
|
15872
|
+
var $Map = GetIntrinsic("%Map%", true);
|
|
15873
|
+
var $mapGet = callBound("Map.prototype.get", true);
|
|
15874
|
+
var $mapSet = callBound("Map.prototype.set", true);
|
|
15875
|
+
var $mapHas = callBound("Map.prototype.has", true);
|
|
15876
|
+
var $mapDelete = callBound("Map.prototype.delete", true);
|
|
15877
|
+
var $mapSize = callBound("Map.prototype.size", true);
|
|
15878
|
+
module2.exports = !!$Map && /** @type {Exclude<import('.'), false>} */
|
|
15879
|
+
function getSideChannelMap() {
|
|
15880
|
+
var $m;
|
|
15881
|
+
var channel = {
|
|
15882
|
+
assert: function(key) {
|
|
15883
|
+
if (!channel.has(key)) {
|
|
15884
|
+
throw new $TypeError("Side channel does not contain " + inspect(key));
|
|
15885
|
+
}
|
|
15886
|
+
},
|
|
15887
|
+
"delete": function(key) {
|
|
15888
|
+
if ($m) {
|
|
15889
|
+
var result = $mapDelete($m, key);
|
|
15890
|
+
if ($mapSize($m) === 0) {
|
|
15891
|
+
$m = void 0;
|
|
15892
|
+
}
|
|
15893
|
+
return result;
|
|
15894
|
+
}
|
|
15895
|
+
return false;
|
|
15896
|
+
},
|
|
15897
|
+
get: function(key) {
|
|
15898
|
+
if ($m) {
|
|
15899
|
+
return $mapGet($m, key);
|
|
15900
|
+
}
|
|
15901
|
+
},
|
|
15902
|
+
has: function(key) {
|
|
15903
|
+
if ($m) {
|
|
15904
|
+
return $mapHas($m, key);
|
|
15905
|
+
}
|
|
15906
|
+
return false;
|
|
15907
|
+
},
|
|
15908
|
+
set: function(key, value) {
|
|
15909
|
+
if (!$m) {
|
|
15910
|
+
$m = new $Map();
|
|
15782
15911
|
}
|
|
15912
|
+
$mapSet($m, key, value);
|
|
15783
15913
|
}
|
|
15784
|
-
}
|
|
15785
|
-
return
|
|
15786
|
-
}
|
|
15914
|
+
};
|
|
15915
|
+
return channel;
|
|
15916
|
+
};
|
|
15787
15917
|
}
|
|
15788
15918
|
});
|
|
15789
15919
|
|
|
15790
|
-
// node_modules/side-channel/index.js
|
|
15791
|
-
var
|
|
15792
|
-
"node_modules/side-channel/index.js"(exports2, module2) {
|
|
15920
|
+
// node_modules/side-channel-weakmap/index.js
|
|
15921
|
+
var require_side_channel_weakmap = __commonJS({
|
|
15922
|
+
"node_modules/side-channel-weakmap/index.js"(exports2, module2) {
|
|
15793
15923
|
"use strict";
|
|
15794
15924
|
var GetIntrinsic = require_get_intrinsic();
|
|
15795
|
-
var callBound =
|
|
15925
|
+
var callBound = require_call_bound();
|
|
15796
15926
|
var inspect = require_object_inspect();
|
|
15927
|
+
var getSideChannelMap = require_side_channel_map();
|
|
15797
15928
|
var $TypeError = require_type();
|
|
15798
15929
|
var $WeakMap = GetIntrinsic("%WeakMap%", true);
|
|
15799
|
-
var $Map = GetIntrinsic("%Map%", true);
|
|
15800
15930
|
var $weakMapGet = callBound("WeakMap.prototype.get", true);
|
|
15801
15931
|
var $weakMapSet = callBound("WeakMap.prototype.set", true);
|
|
15802
15932
|
var $weakMapHas = callBound("WeakMap.prototype.has", true);
|
|
15803
|
-
var $
|
|
15804
|
-
|
|
15805
|
-
|
|
15806
|
-
|
|
15807
|
-
|
|
15808
|
-
|
|
15809
|
-
|
|
15810
|
-
|
|
15811
|
-
|
|
15812
|
-
|
|
15813
|
-
|
|
15814
|
-
|
|
15815
|
-
|
|
15816
|
-
|
|
15817
|
-
|
|
15818
|
-
|
|
15819
|
-
|
|
15820
|
-
|
|
15821
|
-
|
|
15822
|
-
|
|
15823
|
-
|
|
15824
|
-
|
|
15825
|
-
|
|
15826
|
-
|
|
15827
|
-
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
|
|
15831
|
-
|
|
15832
|
-
|
|
15833
|
-
|
|
15933
|
+
var $weakMapDelete = callBound("WeakMap.prototype.delete", true);
|
|
15934
|
+
module2.exports = $WeakMap ? (
|
|
15935
|
+
/** @type {Exclude<import('.'), false>} */
|
|
15936
|
+
function getSideChannelWeakMap() {
|
|
15937
|
+
var $wm;
|
|
15938
|
+
var $m;
|
|
15939
|
+
var channel = {
|
|
15940
|
+
assert: function(key) {
|
|
15941
|
+
if (!channel.has(key)) {
|
|
15942
|
+
throw new $TypeError("Side channel does not contain " + inspect(key));
|
|
15943
|
+
}
|
|
15944
|
+
},
|
|
15945
|
+
"delete": function(key) {
|
|
15946
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
15947
|
+
if ($wm) {
|
|
15948
|
+
return $weakMapDelete($wm, key);
|
|
15949
|
+
}
|
|
15950
|
+
} else if (getSideChannelMap) {
|
|
15951
|
+
if ($m) {
|
|
15952
|
+
return $m["delete"](key);
|
|
15953
|
+
}
|
|
15954
|
+
}
|
|
15955
|
+
return false;
|
|
15956
|
+
},
|
|
15957
|
+
get: function(key) {
|
|
15958
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
15959
|
+
if ($wm) {
|
|
15960
|
+
return $weakMapGet($wm, key);
|
|
15961
|
+
}
|
|
15962
|
+
}
|
|
15963
|
+
return $m && $m.get(key);
|
|
15964
|
+
},
|
|
15965
|
+
has: function(key) {
|
|
15966
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
15967
|
+
if ($wm) {
|
|
15968
|
+
return $weakMapHas($wm, key);
|
|
15969
|
+
}
|
|
15970
|
+
}
|
|
15971
|
+
return !!$m && $m.has(key);
|
|
15972
|
+
},
|
|
15973
|
+
set: function(key, value) {
|
|
15974
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
15975
|
+
if (!$wm) {
|
|
15976
|
+
$wm = new $WeakMap();
|
|
15977
|
+
}
|
|
15978
|
+
$weakMapSet($wm, key, value);
|
|
15979
|
+
} else if (getSideChannelMap) {
|
|
15980
|
+
if (!$m) {
|
|
15981
|
+
$m = getSideChannelMap();
|
|
15982
|
+
}
|
|
15983
|
+
$m.set(key, value);
|
|
15984
|
+
}
|
|
15985
|
+
}
|
|
15834
15986
|
};
|
|
15987
|
+
return channel;
|
|
15835
15988
|
}
|
|
15836
|
-
|
|
15837
|
-
|
|
15838
|
-
|
|
15839
|
-
|
|
15989
|
+
) : getSideChannelMap;
|
|
15990
|
+
}
|
|
15991
|
+
});
|
|
15992
|
+
|
|
15993
|
+
// node_modules/side-channel/index.js
|
|
15994
|
+
var require_side_channel = __commonJS({
|
|
15995
|
+
"node_modules/side-channel/index.js"(exports2, module2) {
|
|
15996
|
+
"use strict";
|
|
15997
|
+
var $TypeError = require_type();
|
|
15998
|
+
var inspect = require_object_inspect();
|
|
15999
|
+
var getSideChannelList = require_side_channel_list();
|
|
16000
|
+
var getSideChannelMap = require_side_channel_map();
|
|
16001
|
+
var getSideChannelWeakMap = require_side_channel_weakmap();
|
|
16002
|
+
var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
|
|
15840
16003
|
module2.exports = function getSideChannel() {
|
|
15841
|
-
var $
|
|
15842
|
-
var $m;
|
|
15843
|
-
var $o;
|
|
16004
|
+
var $channelData;
|
|
15844
16005
|
var channel = {
|
|
15845
16006
|
assert: function(key) {
|
|
15846
16007
|
if (!channel.has(key)) {
|
|
15847
16008
|
throw new $TypeError("Side channel does not contain " + inspect(key));
|
|
15848
16009
|
}
|
|
15849
16010
|
},
|
|
16011
|
+
"delete": function(key) {
|
|
16012
|
+
return !!$channelData && $channelData["delete"](key);
|
|
16013
|
+
},
|
|
15850
16014
|
get: function(key) {
|
|
15851
|
-
|
|
15852
|
-
if ($wm) {
|
|
15853
|
-
return $weakMapGet($wm, key);
|
|
15854
|
-
}
|
|
15855
|
-
} else if ($Map) {
|
|
15856
|
-
if ($m) {
|
|
15857
|
-
return $mapGet($m, key);
|
|
15858
|
-
}
|
|
15859
|
-
} else {
|
|
15860
|
-
if ($o) {
|
|
15861
|
-
return listGet($o, key);
|
|
15862
|
-
}
|
|
15863
|
-
}
|
|
16015
|
+
return $channelData && $channelData.get(key);
|
|
15864
16016
|
},
|
|
15865
16017
|
has: function(key) {
|
|
15866
|
-
|
|
15867
|
-
if ($wm) {
|
|
15868
|
-
return $weakMapHas($wm, key);
|
|
15869
|
-
}
|
|
15870
|
-
} else if ($Map) {
|
|
15871
|
-
if ($m) {
|
|
15872
|
-
return $mapHas($m, key);
|
|
15873
|
-
}
|
|
15874
|
-
} else {
|
|
15875
|
-
if ($o) {
|
|
15876
|
-
return listHas($o, key);
|
|
15877
|
-
}
|
|
15878
|
-
}
|
|
15879
|
-
return false;
|
|
16018
|
+
return !!$channelData && $channelData.has(key);
|
|
15880
16019
|
},
|
|
15881
16020
|
set: function(key, value) {
|
|
15882
|
-
if (
|
|
15883
|
-
|
|
15884
|
-
$wm = new $WeakMap();
|
|
15885
|
-
}
|
|
15886
|
-
$weakMapSet($wm, key, value);
|
|
15887
|
-
} else if ($Map) {
|
|
15888
|
-
if (!$m) {
|
|
15889
|
-
$m = new $Map();
|
|
15890
|
-
}
|
|
15891
|
-
$mapSet($m, key, value);
|
|
15892
|
-
} else {
|
|
15893
|
-
if (!$o) {
|
|
15894
|
-
$o = { key: {}, next: null };
|
|
15895
|
-
}
|
|
15896
|
-
listSet($o, key, value);
|
|
16021
|
+
if (!$channelData) {
|
|
16022
|
+
$channelData = makeChannel();
|
|
15897
16023
|
}
|
|
16024
|
+
$channelData.set(key, value);
|
|
15898
16025
|
}
|
|
15899
16026
|
};
|
|
15900
16027
|
return channel;
|
|
@@ -18161,20 +18288,29 @@ var require_path_to_regexp = __commonJS({
|
|
|
18161
18288
|
});
|
|
18162
18289
|
return new RegExp(path.join("|"), flags);
|
|
18163
18290
|
}
|
|
18291
|
+
if (typeof path !== "string") {
|
|
18292
|
+
throw new TypeError("path must be a string, array of strings, or regular expression");
|
|
18293
|
+
}
|
|
18164
18294
|
path = path.replace(
|
|
18165
18295
|
/\\.|(\/)?(\.)?:(\w+)(\(.*?\))?(\*)?(\?)?|[.*]|\/\(/g,
|
|
18166
18296
|
function(match, slash, format, key, capture, star, optional, offset) {
|
|
18167
|
-
pos = offset + match.length;
|
|
18168
18297
|
if (match[0] === "\\") {
|
|
18169
18298
|
backtrack += match;
|
|
18299
|
+
pos += 2;
|
|
18170
18300
|
return match;
|
|
18171
18301
|
}
|
|
18172
18302
|
if (match === ".") {
|
|
18173
18303
|
backtrack += "\\.";
|
|
18174
18304
|
extraOffset += 1;
|
|
18305
|
+
pos += 1;
|
|
18175
18306
|
return "\\.";
|
|
18176
18307
|
}
|
|
18177
|
-
|
|
18308
|
+
if (slash || format) {
|
|
18309
|
+
backtrack = "";
|
|
18310
|
+
} else {
|
|
18311
|
+
backtrack += path.slice(pos, offset);
|
|
18312
|
+
}
|
|
18313
|
+
pos = offset + match.length;
|
|
18178
18314
|
if (match === "*") {
|
|
18179
18315
|
extraOffset += 3;
|
|
18180
18316
|
return "(.*)";
|
|
@@ -23556,52 +23692,12 @@ var require_express2 = __commonJS({
|
|
|
23556
23692
|
// platforms/express.ts
|
|
23557
23693
|
var express_exports = {};
|
|
23558
23694
|
__export(express_exports, {
|
|
23559
|
-
serve: () =>
|
|
23695
|
+
serve: () => serve
|
|
23560
23696
|
});
|
|
23561
23697
|
module.exports = __toCommonJS(express_exports);
|
|
23562
23698
|
|
|
23563
|
-
// src/error.ts
|
|
23564
|
-
var import_qstash = require("@upstash/qstash");
|
|
23565
|
-
var WorkflowError = class extends import_qstash.QstashError {
|
|
23566
|
-
constructor(message) {
|
|
23567
|
-
super(message);
|
|
23568
|
-
this.name = "WorkflowError";
|
|
23569
|
-
}
|
|
23570
|
-
};
|
|
23571
|
-
var WorkflowAbort = class extends Error {
|
|
23572
|
-
stepInfo;
|
|
23573
|
-
stepName;
|
|
23574
|
-
/**
|
|
23575
|
-
* whether workflow is to be canceled on abort
|
|
23576
|
-
*/
|
|
23577
|
-
cancelWorkflow;
|
|
23578
|
-
/**
|
|
23579
|
-
*
|
|
23580
|
-
* @param stepName name of the aborting step
|
|
23581
|
-
* @param stepInfo step information
|
|
23582
|
-
* @param cancelWorkflow
|
|
23583
|
-
*/
|
|
23584
|
-
constructor(stepName, stepInfo, cancelWorkflow = false) {
|
|
23585
|
-
super(
|
|
23586
|
-
`This is an Upstash Workflow error thrown after a step executes. It is expected to be raised. Make sure that you await for each step. Also, if you are using try/catch blocks, you should not wrap context.run/sleep/sleepUntil/call methods with try/catch. Aborting workflow after executing step '${stepName}'.`
|
|
23587
|
-
);
|
|
23588
|
-
this.name = "WorkflowAbort";
|
|
23589
|
-
this.stepName = stepName;
|
|
23590
|
-
this.stepInfo = stepInfo;
|
|
23591
|
-
this.cancelWorkflow = cancelWorkflow;
|
|
23592
|
-
}
|
|
23593
|
-
};
|
|
23594
|
-
var formatWorkflowError = (error) => {
|
|
23595
|
-
return error instanceof Error ? {
|
|
23596
|
-
error: error.name,
|
|
23597
|
-
message: error.message
|
|
23598
|
-
} : {
|
|
23599
|
-
error: "Error",
|
|
23600
|
-
message: "An error occured while executing workflow."
|
|
23601
|
-
};
|
|
23602
|
-
};
|
|
23603
|
-
|
|
23604
23699
|
// src/client/utils.ts
|
|
23700
|
+
var import_qstash = require("@upstash/qstash");
|
|
23605
23701
|
var makeNotifyRequest = async (requester, eventId, eventData) => {
|
|
23606
23702
|
const result = await requester.request({
|
|
23607
23703
|
path: ["v2", "notify", eventId],
|
|
@@ -23628,26 +23724,71 @@ var getSteps = async (requester, workflowRunId, messageId, debug) => {
|
|
|
23628
23724
|
await debug?.log("INFO", "ENDPOINT_START", {
|
|
23629
23725
|
message: `Pulled ${steps.length} steps from QStashand returned them without filtering with messageId.`
|
|
23630
23726
|
});
|
|
23631
|
-
return steps;
|
|
23727
|
+
return { steps, workflowRunEnded: false };
|
|
23632
23728
|
} else {
|
|
23633
23729
|
const index = steps.findIndex((item) => item.messageId === messageId);
|
|
23634
23730
|
if (index === -1) {
|
|
23635
|
-
return [];
|
|
23731
|
+
return { steps: [], workflowRunEnded: false };
|
|
23636
23732
|
}
|
|
23637
23733
|
const filteredSteps = steps.slice(0, index + 1);
|
|
23638
23734
|
await debug?.log("INFO", "ENDPOINT_START", {
|
|
23639
23735
|
message: `Pulled ${steps.length} steps from QStash and filtered them to ${filteredSteps.length} using messageId.`
|
|
23640
23736
|
});
|
|
23641
|
-
return filteredSteps;
|
|
23737
|
+
return { steps: filteredSteps, workflowRunEnded: false };
|
|
23642
23738
|
}
|
|
23643
23739
|
} catch (error) {
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
|
|
23647
|
-
|
|
23648
|
-
|
|
23740
|
+
if (error instanceof import_qstash.QstashError && error.status === 404) {
|
|
23741
|
+
await debug?.log("WARN", "ENDPOINT_START", {
|
|
23742
|
+
message: "Couldn't fetch workflow run steps. This can happen if the workflow run succesfully ends before some callback is executed.",
|
|
23743
|
+
error
|
|
23744
|
+
});
|
|
23745
|
+
return { steps: void 0, workflowRunEnded: true };
|
|
23746
|
+
} else {
|
|
23747
|
+
throw error;
|
|
23748
|
+
}
|
|
23749
|
+
}
|
|
23750
|
+
};
|
|
23751
|
+
|
|
23752
|
+
// src/error.ts
|
|
23753
|
+
var import_qstash2 = require("@upstash/qstash");
|
|
23754
|
+
var WorkflowError = class extends import_qstash2.QstashError {
|
|
23755
|
+
constructor(message) {
|
|
23756
|
+
super(message);
|
|
23757
|
+
this.name = "WorkflowError";
|
|
23758
|
+
}
|
|
23759
|
+
};
|
|
23760
|
+
var WorkflowAbort = class extends Error {
|
|
23761
|
+
stepInfo;
|
|
23762
|
+
stepName;
|
|
23763
|
+
/**
|
|
23764
|
+
* whether workflow is to be canceled on abort
|
|
23765
|
+
*/
|
|
23766
|
+
cancelWorkflow;
|
|
23767
|
+
/**
|
|
23768
|
+
*
|
|
23769
|
+
* @param stepName name of the aborting step
|
|
23770
|
+
* @param stepInfo step information
|
|
23771
|
+
* @param cancelWorkflow
|
|
23772
|
+
*/
|
|
23773
|
+
constructor(stepName, stepInfo, cancelWorkflow = false) {
|
|
23774
|
+
super(
|
|
23775
|
+
`This is an Upstash Workflow error thrown after a step executes. It is expected to be raised. Make sure that you await for each step. Also, if you are using try/catch blocks, you should not wrap context.run/sleep/sleepUntil/call methods with try/catch. Aborting workflow after executing step '${stepName}'.`
|
|
23776
|
+
);
|
|
23777
|
+
this.name = "WorkflowAbort";
|
|
23778
|
+
this.stepName = stepName;
|
|
23779
|
+
this.stepInfo = stepInfo;
|
|
23780
|
+
this.cancelWorkflow = cancelWorkflow;
|
|
23649
23781
|
}
|
|
23650
23782
|
};
|
|
23783
|
+
var formatWorkflowError = (error) => {
|
|
23784
|
+
return error instanceof Error ? {
|
|
23785
|
+
error: error.name,
|
|
23786
|
+
message: error.message
|
|
23787
|
+
} : {
|
|
23788
|
+
error: "Error",
|
|
23789
|
+
message: "An error occured while executing workflow."
|
|
23790
|
+
};
|
|
23791
|
+
};
|
|
23651
23792
|
|
|
23652
23793
|
// src/context/steps.ts
|
|
23653
23794
|
var BaseLazyStep = class {
|
|
@@ -24269,8 +24410,8 @@ var StepTypes = [
|
|
|
24269
24410
|
];
|
|
24270
24411
|
|
|
24271
24412
|
// src/workflow-requests.ts
|
|
24272
|
-
var
|
|
24273
|
-
var triggerFirstInvocation = async (workflowContext, retries, debug) => {
|
|
24413
|
+
var import_qstash3 = require("@upstash/qstash");
|
|
24414
|
+
var triggerFirstInvocation = async (workflowContext, retries, useJSONContent, debug) => {
|
|
24274
24415
|
const { headers } = getHeaders(
|
|
24275
24416
|
"true",
|
|
24276
24417
|
workflowContext.workflowRunId,
|
|
@@ -24280,6 +24421,9 @@ var triggerFirstInvocation = async (workflowContext, retries, debug) => {
|
|
|
24280
24421
|
workflowContext.failureUrl,
|
|
24281
24422
|
retries
|
|
24282
24423
|
);
|
|
24424
|
+
if (useJSONContent) {
|
|
24425
|
+
headers["content-type"] = "application/json";
|
|
24426
|
+
}
|
|
24283
24427
|
try {
|
|
24284
24428
|
const body = typeof workflowContext.requestPayload === "string" ? workflowContext.requestPayload : JSON.stringify(workflowContext.requestPayload);
|
|
24285
24429
|
const result = await workflowContext.qstashClient.publish({
|
|
@@ -24323,7 +24467,7 @@ var triggerRouteFunction = async ({
|
|
|
24323
24467
|
return ok("workflow-finished");
|
|
24324
24468
|
} catch (error) {
|
|
24325
24469
|
const error_ = error;
|
|
24326
|
-
if (error instanceof
|
|
24470
|
+
if (error instanceof import_qstash3.QstashError && error.status === 400) {
|
|
24327
24471
|
await debug?.log("WARN", "RESPONSE_WORKFLOW", {
|
|
24328
24472
|
message: `tried to append to a cancelled workflow. exiting without publishing.`,
|
|
24329
24473
|
name: error.name,
|
|
@@ -24357,7 +24501,7 @@ var triggerWorkflowDelete = async (workflowContext, debug, cancel = false) => {
|
|
|
24357
24501
|
);
|
|
24358
24502
|
return { deleted: true };
|
|
24359
24503
|
} catch (error) {
|
|
24360
|
-
if (error instanceof
|
|
24504
|
+
if (error instanceof import_qstash3.QstashError && error.status === 404) {
|
|
24361
24505
|
await debug?.log("WARN", "SUBMIT_CLEANUP", {
|
|
24362
24506
|
message: `Failed to remove workflow run ${workflowContext.workflowRunId} as it doesn't exist.`,
|
|
24363
24507
|
name: error.name,
|
|
@@ -24394,11 +24538,19 @@ var handleThirdPartyCallResult = async (request, requestPayload, client, workflo
|
|
|
24394
24538
|
if (!workflowRunId2)
|
|
24395
24539
|
throw new WorkflowError("workflow run id missing in context.call lazy fetch.");
|
|
24396
24540
|
if (!messageId) throw new WorkflowError("message id missing in context.call lazy fetch.");
|
|
24397
|
-
const steps = await getSteps(
|
|
24541
|
+
const { steps, workflowRunEnded } = await getSteps(
|
|
24542
|
+
client.http,
|
|
24543
|
+
workflowRunId2,
|
|
24544
|
+
messageId,
|
|
24545
|
+
debug
|
|
24546
|
+
);
|
|
24547
|
+
if (workflowRunEnded) {
|
|
24548
|
+
return ok("workflow-ended");
|
|
24549
|
+
}
|
|
24398
24550
|
const failingStep = steps.find((step) => step.messageId === messageId);
|
|
24399
24551
|
if (!failingStep)
|
|
24400
24552
|
throw new WorkflowError(
|
|
24401
|
-
"Failed to submit the context.call." + (steps.length === 0 ? "No steps found." : `No step was found with matching messageId ${messageId} out of ${steps.length} steps.`)
|
|
24553
|
+
"Failed to submit the context.call. " + (steps.length === 0 ? "No steps found." : `No step was found with matching messageId ${messageId} out of ${steps.length} steps.`)
|
|
24402
24554
|
);
|
|
24403
24555
|
callbackPayload = atob(failingStep.body);
|
|
24404
24556
|
}
|
|
@@ -24981,6 +25133,127 @@ var sortSteps = (steps) => {
|
|
|
24981
25133
|
return [...steps].sort((step, stepOther) => getStepId(step) - getStepId(stepOther));
|
|
24982
25134
|
};
|
|
24983
25135
|
|
|
25136
|
+
// src/context/api/anthropic.ts
|
|
25137
|
+
var import_qstash4 = require("@upstash/qstash");
|
|
25138
|
+
|
|
25139
|
+
// src/context/provider.ts
|
|
25140
|
+
var getProviderInfo = (api) => {
|
|
25141
|
+
if (!api.provider) {
|
|
25142
|
+
throw new WorkflowError("A Provider must be provided.");
|
|
25143
|
+
}
|
|
25144
|
+
if (api.provider.owner === "upstash") {
|
|
25145
|
+
throw new WorkflowError("Upstash provider isn't supported.");
|
|
25146
|
+
}
|
|
25147
|
+
const { name, provider, ...parameters } = api;
|
|
25148
|
+
if (!provider.baseUrl) throw new TypeError("baseUrl cannot be empty or undefined!");
|
|
25149
|
+
if (!provider.token) throw new TypeError("token cannot be empty or undefined!");
|
|
25150
|
+
if (provider.apiKind !== name) {
|
|
25151
|
+
throw new TypeError(`Unexpected api name. Expected '${provider.apiKind}', received ${name}`);
|
|
25152
|
+
}
|
|
25153
|
+
const providerInfo = {
|
|
25154
|
+
url: provider.getUrl(),
|
|
25155
|
+
baseUrl: provider.baseUrl,
|
|
25156
|
+
route: provider.getRoute(),
|
|
25157
|
+
appendHeaders: provider.getHeaders(parameters),
|
|
25158
|
+
owner: provider.owner,
|
|
25159
|
+
method: provider.method
|
|
25160
|
+
};
|
|
25161
|
+
return provider.onFinish(providerInfo, parameters);
|
|
25162
|
+
};
|
|
25163
|
+
|
|
25164
|
+
// src/context/api/base.ts
|
|
25165
|
+
var BaseWorkflowApi = class {
|
|
25166
|
+
context;
|
|
25167
|
+
constructor({ context }) {
|
|
25168
|
+
this.context = context;
|
|
25169
|
+
}
|
|
25170
|
+
/**
|
|
25171
|
+
* context.call which uses a QStash API
|
|
25172
|
+
*
|
|
25173
|
+
* @param stepName
|
|
25174
|
+
* @param settings
|
|
25175
|
+
* @returns
|
|
25176
|
+
*/
|
|
25177
|
+
async callApi(stepName, settings) {
|
|
25178
|
+
const { url, appendHeaders, method } = getProviderInfo(settings.api);
|
|
25179
|
+
const { method: userMethod, body, headers = {}, retries = 0, timeout } = settings;
|
|
25180
|
+
return await this.context.call(stepName, {
|
|
25181
|
+
url,
|
|
25182
|
+
method: userMethod ?? method,
|
|
25183
|
+
body,
|
|
25184
|
+
headers: {
|
|
25185
|
+
...appendHeaders,
|
|
25186
|
+
...headers
|
|
25187
|
+
},
|
|
25188
|
+
retries,
|
|
25189
|
+
timeout
|
|
25190
|
+
});
|
|
25191
|
+
}
|
|
25192
|
+
};
|
|
25193
|
+
|
|
25194
|
+
// src/context/api/anthropic.ts
|
|
25195
|
+
var AnthropicAPI = class extends BaseWorkflowApi {
|
|
25196
|
+
async call(stepName, settings) {
|
|
25197
|
+
const { token, operation, ...parameters } = settings;
|
|
25198
|
+
return await this.callApi(stepName, {
|
|
25199
|
+
api: {
|
|
25200
|
+
name: "llm",
|
|
25201
|
+
provider: (0, import_qstash4.anthropic)({ token })
|
|
25202
|
+
},
|
|
25203
|
+
...parameters
|
|
25204
|
+
});
|
|
25205
|
+
}
|
|
25206
|
+
};
|
|
25207
|
+
|
|
25208
|
+
// src/context/api/openai.ts
|
|
25209
|
+
var import_qstash5 = require("@upstash/qstash");
|
|
25210
|
+
var OpenAIAPI = class extends BaseWorkflowApi {
|
|
25211
|
+
async call(stepName, settings) {
|
|
25212
|
+
const { token, organization, operation, ...parameters } = settings;
|
|
25213
|
+
return await this.callApi(stepName, {
|
|
25214
|
+
api: {
|
|
25215
|
+
name: "llm",
|
|
25216
|
+
provider: (0, import_qstash5.openai)({ token, organization })
|
|
25217
|
+
},
|
|
25218
|
+
...parameters
|
|
25219
|
+
});
|
|
25220
|
+
}
|
|
25221
|
+
};
|
|
25222
|
+
|
|
25223
|
+
// src/context/api/resend.ts
|
|
25224
|
+
var import_qstash6 = require("@upstash/qstash");
|
|
25225
|
+
var ResendAPI = class extends BaseWorkflowApi {
|
|
25226
|
+
async call(stepName, settings) {
|
|
25227
|
+
const { token, batch = false, ...parameters } = settings;
|
|
25228
|
+
return await this.callApi(stepName, {
|
|
25229
|
+
api: {
|
|
25230
|
+
name: "email",
|
|
25231
|
+
provider: (0, import_qstash6.resend)({ token, batch })
|
|
25232
|
+
},
|
|
25233
|
+
...parameters
|
|
25234
|
+
});
|
|
25235
|
+
}
|
|
25236
|
+
};
|
|
25237
|
+
|
|
25238
|
+
// src/context/api/index.ts
|
|
25239
|
+
var WorkflowApi = class extends BaseWorkflowApi {
|
|
25240
|
+
get openai() {
|
|
25241
|
+
return new OpenAIAPI({
|
|
25242
|
+
context: this.context
|
|
25243
|
+
});
|
|
25244
|
+
}
|
|
25245
|
+
get resend() {
|
|
25246
|
+
return new ResendAPI({
|
|
25247
|
+
context: this.context
|
|
25248
|
+
});
|
|
25249
|
+
}
|
|
25250
|
+
get anthropic() {
|
|
25251
|
+
return new AnthropicAPI({
|
|
25252
|
+
context: this.context
|
|
25253
|
+
});
|
|
25254
|
+
}
|
|
25255
|
+
};
|
|
25256
|
+
|
|
24984
25257
|
// src/context/context.ts
|
|
24985
25258
|
var WorkflowContext = class {
|
|
24986
25259
|
executor;
|
|
@@ -25360,6 +25633,11 @@ var WorkflowContext = class {
|
|
|
25360
25633
|
async addStep(step) {
|
|
25361
25634
|
return await this.executor.addStep(step);
|
|
25362
25635
|
}
|
|
25636
|
+
get api() {
|
|
25637
|
+
return new WorkflowApi({
|
|
25638
|
+
context: this
|
|
25639
|
+
});
|
|
25640
|
+
}
|
|
25363
25641
|
};
|
|
25364
25642
|
|
|
25365
25643
|
// src/logger.ts
|
|
@@ -25437,7 +25715,7 @@ function decodeBase64(base64) {
|
|
|
25437
25715
|
}
|
|
25438
25716
|
|
|
25439
25717
|
// src/serve/authorization.ts
|
|
25440
|
-
var
|
|
25718
|
+
var import_qstash7 = require("@upstash/qstash");
|
|
25441
25719
|
var DisabledWorkflowContext = class _DisabledWorkflowContext extends WorkflowContext {
|
|
25442
25720
|
static disabledMessage = "disabled-qstash-worklfow-run";
|
|
25443
25721
|
/**
|
|
@@ -25468,7 +25746,7 @@ var DisabledWorkflowContext = class _DisabledWorkflowContext extends WorkflowCon
|
|
|
25468
25746
|
*/
|
|
25469
25747
|
static async tryAuthentication(routeFunction, context) {
|
|
25470
25748
|
const disabledContext = new _DisabledWorkflowContext({
|
|
25471
|
-
qstashClient: new
|
|
25749
|
+
qstashClient: new import_qstash7.Client({
|
|
25472
25750
|
baseUrl: "disabled-client",
|
|
25473
25751
|
token: "disabled-client"
|
|
25474
25752
|
}),
|
|
@@ -25592,7 +25870,8 @@ var parseRequest = async (requestPayload, isFirstInvocation, workflowRunId, requ
|
|
|
25592
25870
|
return {
|
|
25593
25871
|
rawInitialPayload: requestPayload ?? "",
|
|
25594
25872
|
steps: [],
|
|
25595
|
-
isLastDuplicate: false
|
|
25873
|
+
isLastDuplicate: false,
|
|
25874
|
+
workflowRunEnded: false
|
|
25596
25875
|
};
|
|
25597
25876
|
} else {
|
|
25598
25877
|
let rawSteps;
|
|
@@ -25602,7 +25881,21 @@ var parseRequest = async (requestPayload, isFirstInvocation, workflowRunId, requ
|
|
|
25602
25881
|
"ENDPOINT_START",
|
|
25603
25882
|
"request payload is empty, steps will be fetched from QStash."
|
|
25604
25883
|
);
|
|
25605
|
-
|
|
25884
|
+
const { steps: fetchedSteps, workflowRunEnded } = await getSteps(
|
|
25885
|
+
requester,
|
|
25886
|
+
workflowRunId,
|
|
25887
|
+
messageId,
|
|
25888
|
+
debug
|
|
25889
|
+
);
|
|
25890
|
+
if (workflowRunEnded) {
|
|
25891
|
+
return {
|
|
25892
|
+
rawInitialPayload: void 0,
|
|
25893
|
+
steps: void 0,
|
|
25894
|
+
isLastDuplicate: void 0,
|
|
25895
|
+
workflowRunEnded: true
|
|
25896
|
+
};
|
|
25897
|
+
}
|
|
25898
|
+
rawSteps = fetchedSteps;
|
|
25606
25899
|
} else {
|
|
25607
25900
|
rawSteps = JSON.parse(requestPayload);
|
|
25608
25901
|
}
|
|
@@ -25612,7 +25905,8 @@ var parseRequest = async (requestPayload, isFirstInvocation, workflowRunId, requ
|
|
|
25612
25905
|
return {
|
|
25613
25906
|
rawInitialPayload,
|
|
25614
25907
|
steps: deduplicatedSteps,
|
|
25615
|
-
isLastDuplicate
|
|
25908
|
+
isLastDuplicate,
|
|
25909
|
+
workflowRunEnded: false
|
|
25616
25910
|
};
|
|
25617
25911
|
}
|
|
25618
25912
|
};
|
|
@@ -25666,15 +25960,15 @@ var handleFailure = async (request, requestPayload, qstashClient, initialPayload
|
|
|
25666
25960
|
};
|
|
25667
25961
|
|
|
25668
25962
|
// src/serve/options.ts
|
|
25669
|
-
var
|
|
25670
|
-
var
|
|
25963
|
+
var import_qstash8 = require("@upstash/qstash");
|
|
25964
|
+
var import_qstash9 = require("@upstash/qstash");
|
|
25671
25965
|
var processOptions = (options) => {
|
|
25672
25966
|
const environment = options?.env ?? (typeof process === "undefined" ? {} : process.env);
|
|
25673
25967
|
const receiverEnvironmentVariablesSet = Boolean(
|
|
25674
25968
|
environment.QSTASH_CURRENT_SIGNING_KEY && environment.QSTASH_NEXT_SIGNING_KEY
|
|
25675
25969
|
);
|
|
25676
25970
|
return {
|
|
25677
|
-
qstashClient: new
|
|
25971
|
+
qstashClient: new import_qstash9.Client({
|
|
25678
25972
|
baseUrl: environment.QSTASH_URL,
|
|
25679
25973
|
token: environment.QSTASH_TOKEN
|
|
25680
25974
|
}),
|
|
@@ -25708,13 +26002,14 @@ var processOptions = (options) => {
|
|
|
25708
26002
|
throw error;
|
|
25709
26003
|
}
|
|
25710
26004
|
},
|
|
25711
|
-
receiver: receiverEnvironmentVariablesSet ? new
|
|
26005
|
+
receiver: receiverEnvironmentVariablesSet ? new import_qstash8.Receiver({
|
|
25712
26006
|
currentSigningKey: environment.QSTASH_CURRENT_SIGNING_KEY,
|
|
25713
26007
|
nextSigningKey: environment.QSTASH_NEXT_SIGNING_KEY
|
|
25714
26008
|
}) : void 0,
|
|
25715
26009
|
baseUrl: environment.UPSTASH_WORKFLOW_URL,
|
|
25716
26010
|
env: environment,
|
|
25717
26011
|
retries: DEFAULT_RETRIES,
|
|
26012
|
+
useJSONContent: false,
|
|
25718
26013
|
...options
|
|
25719
26014
|
};
|
|
25720
26015
|
};
|
|
@@ -25731,6 +26026,16 @@ var determineUrls = async (request, url, baseUrl, failureFunction, failureUrl, d
|
|
|
25731
26026
|
});
|
|
25732
26027
|
}
|
|
25733
26028
|
const workflowFailureUrl = failureFunction ? workflowUrl : failureUrl;
|
|
26029
|
+
if (workflowUrl.includes("localhost")) {
|
|
26030
|
+
await debug?.log("WARN", "ENDPOINT_START", {
|
|
26031
|
+
message: `Workflow URL contains localhost. This can happen in local development, but shouldn't happen in production unless you have a route which contains localhost. Received: ${workflowUrl}`
|
|
26032
|
+
});
|
|
26033
|
+
}
|
|
26034
|
+
if (!(workflowUrl.startsWith("http://") || workflowUrl.startsWith("https://"))) {
|
|
26035
|
+
throw new WorkflowError(
|
|
26036
|
+
`Workflow URL should start with 'http://' or 'https://'. Recevied is '${workflowUrl}'`
|
|
26037
|
+
);
|
|
26038
|
+
}
|
|
25734
26039
|
return {
|
|
25735
26040
|
workflowUrl,
|
|
25736
26041
|
workflowFailureUrl
|
|
@@ -25739,7 +26044,7 @@ var determineUrls = async (request, url, baseUrl, failureFunction, failureUrl, d
|
|
|
25739
26044
|
var AUTH_FAIL_MESSAGE = `Failed to authenticate Workflow request. If this is unexpected, see the caveat https://upstash.com/docs/workflow/basics/caveats#avoid-non-deterministic-code-outside-context-run`;
|
|
25740
26045
|
|
|
25741
26046
|
// src/serve/index.ts
|
|
25742
|
-
var
|
|
26047
|
+
var serveBase = (routeFunction, options) => {
|
|
25743
26048
|
const {
|
|
25744
26049
|
qstashClient,
|
|
25745
26050
|
onStepFinish,
|
|
@@ -25751,7 +26056,8 @@ var serve = (routeFunction, options) => {
|
|
|
25751
26056
|
failureFunction,
|
|
25752
26057
|
baseUrl,
|
|
25753
26058
|
env,
|
|
25754
|
-
retries
|
|
26059
|
+
retries,
|
|
26060
|
+
useJSONContent
|
|
25755
26061
|
} = processOptions(options);
|
|
25756
26062
|
const debug = WorkflowLogger.getLogger(verbose);
|
|
25757
26063
|
const handler = async (request) => {
|
|
@@ -25768,7 +26074,7 @@ var serve = (routeFunction, options) => {
|
|
|
25768
26074
|
await verifyRequest(requestPayload, request.headers.get("upstash-signature"), receiver);
|
|
25769
26075
|
const { isFirstInvocation, workflowRunId } = validateRequest(request);
|
|
25770
26076
|
debug?.setWorkflowRunId(workflowRunId);
|
|
25771
|
-
const { rawInitialPayload, steps, isLastDuplicate } = await parseRequest(
|
|
26077
|
+
const { rawInitialPayload, steps, isLastDuplicate, workflowRunEnded } = await parseRequest(
|
|
25772
26078
|
requestPayload,
|
|
25773
26079
|
isFirstInvocation,
|
|
25774
26080
|
workflowRunId,
|
|
@@ -25776,8 +26082,11 @@ var serve = (routeFunction, options) => {
|
|
|
25776
26082
|
request.headers.get("upstash-message-id"),
|
|
25777
26083
|
debug
|
|
25778
26084
|
);
|
|
26085
|
+
if (workflowRunEnded) {
|
|
26086
|
+
return onStepFinish(workflowRunId, "workflow-already-ended");
|
|
26087
|
+
}
|
|
25779
26088
|
if (isLastDuplicate) {
|
|
25780
|
-
return onStepFinish(
|
|
26089
|
+
return onStepFinish(workflowRunId, "duplicate-step");
|
|
25781
26090
|
}
|
|
25782
26091
|
const failureCheck = await handleFailure(
|
|
25783
26092
|
request,
|
|
@@ -25791,7 +26100,7 @@ var serve = (routeFunction, options) => {
|
|
|
25791
26100
|
throw failureCheck.error;
|
|
25792
26101
|
} else if (failureCheck.value === "is-failure-callback") {
|
|
25793
26102
|
await debug?.log("WARN", "RESPONSE_DEFAULT", "failureFunction executed");
|
|
25794
|
-
return onStepFinish(
|
|
26103
|
+
return onStepFinish(workflowRunId, "failure-callback");
|
|
25795
26104
|
}
|
|
25796
26105
|
const workflowContext = new WorkflowContext({
|
|
25797
26106
|
qstashClient,
|
|
@@ -25834,7 +26143,7 @@ var serve = (routeFunction, options) => {
|
|
|
25834
26143
|
});
|
|
25835
26144
|
throw callReturnCheck.error;
|
|
25836
26145
|
} else if (callReturnCheck.value === "continue-workflow") {
|
|
25837
|
-
const result = isFirstInvocation ? await triggerFirstInvocation(workflowContext, retries, debug) : await triggerRouteFunction({
|
|
26146
|
+
const result = isFirstInvocation ? await triggerFirstInvocation(workflowContext, retries, useJSONContent, debug) : await triggerRouteFunction({
|
|
25838
26147
|
onStep: async () => routeFunction(workflowContext),
|
|
25839
26148
|
onCleanup: async () => {
|
|
25840
26149
|
await triggerWorkflowDelete(workflowContext, debug);
|
|
@@ -25850,6 +26159,8 @@ var serve = (routeFunction, options) => {
|
|
|
25850
26159
|
}
|
|
25851
26160
|
await debug?.log("INFO", "RESPONSE_WORKFLOW");
|
|
25852
26161
|
return onStepFinish(workflowContext.workflowRunId, "success");
|
|
26162
|
+
} else if (callReturnCheck.value === "workflow-ended") {
|
|
26163
|
+
return onStepFinish(workflowContext.workflowRunId, "workflow-already-ended");
|
|
25853
26164
|
}
|
|
25854
26165
|
await debug?.log("INFO", "RESPONSE_DEFAULT");
|
|
25855
26166
|
return onStepFinish("no-workflow-id", "fromCallback");
|
|
@@ -25867,21 +26178,22 @@ var serve = (routeFunction, options) => {
|
|
|
25867
26178
|
return { handler: safeHandler };
|
|
25868
26179
|
};
|
|
25869
26180
|
|
|
25870
|
-
// src/client/index.ts
|
|
25871
|
-
var import_qstash6 = require("@upstash/qstash");
|
|
25872
|
-
|
|
25873
26181
|
// platforms/express.ts
|
|
25874
26182
|
var import_express = __toESM(require_express2());
|
|
25875
|
-
function
|
|
26183
|
+
function serve(routeFunction, options) {
|
|
25876
26184
|
const router = (0, import_express.Router)();
|
|
25877
26185
|
const handler = async (request_, res) => {
|
|
25878
26186
|
if (request_.method.toUpperCase() !== "POST") {
|
|
25879
26187
|
res.status(405).json("Only POST requests are allowed in workflows");
|
|
25880
26188
|
return;
|
|
25881
26189
|
}
|
|
25882
|
-
|
|
25883
|
-
|
|
25884
|
-
|
|
26190
|
+
let requestBody;
|
|
26191
|
+
if (request_.headers["content-type"]?.includes("text/plain")) {
|
|
26192
|
+
requestBody = request_.body;
|
|
26193
|
+
} else if (request_.headers["content-type"]?.includes("application/json")) {
|
|
26194
|
+
requestBody = JSON.stringify(request_.body);
|
|
26195
|
+
} else {
|
|
26196
|
+
requestBody = typeof request_.body === "string" ? request_.body : JSON.stringify(request_.body);
|
|
25885
26197
|
}
|
|
25886
26198
|
const protocol = request_.protocol;
|
|
25887
26199
|
const host = request_.get("host") || "localhost";
|
|
@@ -25889,11 +26201,14 @@ function serve2(routeFunction, options) {
|
|
|
25889
26201
|
const webRequest = new Request(url, {
|
|
25890
26202
|
method: request_.method,
|
|
25891
26203
|
headers: new Headers(request_.headers),
|
|
25892
|
-
body:
|
|
26204
|
+
body: requestBody
|
|
25893
26205
|
});
|
|
25894
|
-
const { handler: serveHandler } =
|
|
26206
|
+
const { handler: serveHandler } = serveBase(
|
|
25895
26207
|
(workflowContext) => routeFunction(workflowContext),
|
|
25896
|
-
|
|
26208
|
+
{
|
|
26209
|
+
...options,
|
|
26210
|
+
useJSONContent: true
|
|
26211
|
+
}
|
|
25897
26212
|
);
|
|
25898
26213
|
const response = await serveHandler(webRequest);
|
|
25899
26214
|
res.status(response.status).json(await response.json());
|