@rpcbase/api 0.127.0 → 0.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +786 -453
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -56,7 +56,7 @@ var hasRequiredBluebird;
|
|
|
56
56
|
function requireBluebird() {
|
|
57
57
|
if (hasRequiredBluebird) return bluebird.exports;
|
|
58
58
|
hasRequiredBluebird = 1;
|
|
59
|
-
(function(module, exports
|
|
59
|
+
(function(module, exports) {
|
|
60
60
|
!(function(e) {
|
|
61
61
|
module.exports = e();
|
|
62
62
|
})(function() {
|
|
@@ -81,7 +81,7 @@ function requireBluebird() {
|
|
|
81
81
|
var i = typeof _dereq_ == "function" && _dereq_;
|
|
82
82
|
for (var o = 0; o < r.length; o++) s(r[o]);
|
|
83
83
|
return s;
|
|
84
|
-
})({ 1: [function(_dereq_2, module2,
|
|
84
|
+
})({ 1: [function(_dereq_2, module2, exports2) {
|
|
85
85
|
module2.exports = function(Promise2) {
|
|
86
86
|
var SomePromiseArray = Promise2._SomePromiseArray;
|
|
87
87
|
function any(promises) {
|
|
@@ -99,7 +99,7 @@ function requireBluebird() {
|
|
|
99
99
|
return any(this);
|
|
100
100
|
};
|
|
101
101
|
};
|
|
102
|
-
}, {}], 2: [function(_dereq_2, module2,
|
|
102
|
+
}, {}], 2: [function(_dereq_2, module2, exports2) {
|
|
103
103
|
var firstLineError;
|
|
104
104
|
try {
|
|
105
105
|
throw new Error();
|
|
@@ -206,7 +206,7 @@ function requireBluebird() {
|
|
|
206
206
|
};
|
|
207
207
|
module2.exports = Async;
|
|
208
208
|
module2.exports.firstLineError = firstLineError;
|
|
209
|
-
}, { "./queue": 26, "./schedule": 29 }], 3: [function(_dereq_2, module2,
|
|
209
|
+
}, { "./queue": 26, "./schedule": 29 }], 3: [function(_dereq_2, module2, exports2) {
|
|
210
210
|
module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, debug) {
|
|
211
211
|
var calledBind = false;
|
|
212
212
|
var rejectThis = function(_, e) {
|
|
@@ -271,7 +271,7 @@ function requireBluebird() {
|
|
|
271
271
|
return Promise2.resolve(value).bind(thisArg);
|
|
272
272
|
};
|
|
273
273
|
};
|
|
274
|
-
}, {}], 4: [function(_dereq_2, module2,
|
|
274
|
+
}, {}], 4: [function(_dereq_2, module2, exports2) {
|
|
275
275
|
var old;
|
|
276
276
|
if (typeof Promise !== "undefined") old = Promise;
|
|
277
277
|
function noConflict() {
|
|
@@ -284,7 +284,7 @@ function requireBluebird() {
|
|
|
284
284
|
var bluebird2 = _dereq_2("./promise")();
|
|
285
285
|
bluebird2.noConflict = noConflict;
|
|
286
286
|
module2.exports = bluebird2;
|
|
287
|
-
}, { "./promise": 22 }], 5: [function(_dereq_2, module2,
|
|
287
|
+
}, { "./promise": 22 }], 5: [function(_dereq_2, module2, exports2) {
|
|
288
288
|
var cr = Object.create;
|
|
289
289
|
if (cr) {
|
|
290
290
|
var callerCache = cr(null);
|
|
@@ -339,7 +339,7 @@ function requireBluebird() {
|
|
|
339
339
|
return this._then(getter, void 0, void 0, propertyName, void 0);
|
|
340
340
|
};
|
|
341
341
|
};
|
|
342
|
-
}, { "./util": 36 }], 6: [function(_dereq_2, module2,
|
|
342
|
+
}, { "./util": 36 }], 6: [function(_dereq_2, module2, exports2) {
|
|
343
343
|
module2.exports = function(Promise2, PromiseArray, apiRejection, debug) {
|
|
344
344
|
var util = _dereq_2("./util");
|
|
345
345
|
var tryCatch = util.tryCatch;
|
|
@@ -450,7 +450,7 @@ function requireBluebird() {
|
|
|
450
450
|
this.cancel();
|
|
451
451
|
};
|
|
452
452
|
};
|
|
453
|
-
}, { "./util": 36 }], 7: [function(_dereq_2, module2,
|
|
453
|
+
}, { "./util": 36 }], 7: [function(_dereq_2, module2, exports2) {
|
|
454
454
|
module2.exports = function(NEXT_FILTER) {
|
|
455
455
|
var util = _dereq_2("./util");
|
|
456
456
|
var getKeys = _dereq_2("./es5").keys;
|
|
@@ -488,7 +488,7 @@ function requireBluebird() {
|
|
|
488
488
|
}
|
|
489
489
|
return catchFilter;
|
|
490
490
|
};
|
|
491
|
-
}, { "./es5": 13, "./util": 36 }], 8: [function(_dereq_2, module2,
|
|
491
|
+
}, { "./es5": 13, "./util": 36 }], 8: [function(_dereq_2, module2, exports2) {
|
|
492
492
|
module2.exports = function(Promise2) {
|
|
493
493
|
var longStackTraces = false;
|
|
494
494
|
var contextStack = [];
|
|
@@ -558,7 +558,7 @@ function requireBluebird() {
|
|
|
558
558
|
};
|
|
559
559
|
return Context;
|
|
560
560
|
};
|
|
561
|
-
}, {}], 9: [function(_dereq_2, module2,
|
|
561
|
+
}, {}], 9: [function(_dereq_2, module2, exports2) {
|
|
562
562
|
module2.exports = function(Promise2, Context, enableAsyncHooks, disableAsyncHooks) {
|
|
563
563
|
var async = Promise2._async;
|
|
564
564
|
var Warning = _dereq_2("./errors").Warning;
|
|
@@ -1472,7 +1472,7 @@ function requireBluebird() {
|
|
|
1472
1472
|
fireGlobalEvent
|
|
1473
1473
|
};
|
|
1474
1474
|
};
|
|
1475
|
-
}, { "./errors": 12, "./es5": 13, "./util": 36 }], 10: [function(_dereq_2, module2,
|
|
1475
|
+
}, { "./errors": 12, "./es5": 13, "./util": 36 }], 10: [function(_dereq_2, module2, exports2) {
|
|
1476
1476
|
module2.exports = function(Promise2) {
|
|
1477
1477
|
function returner() {
|
|
1478
1478
|
return this.value;
|
|
@@ -1536,7 +1536,7 @@ function requireBluebird() {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
};
|
|
1538
1538
|
};
|
|
1539
|
-
}, {}], 11: [function(_dereq_2, module2,
|
|
1539
|
+
}, {}], 11: [function(_dereq_2, module2, exports2) {
|
|
1540
1540
|
module2.exports = function(Promise2, INTERNAL) {
|
|
1541
1541
|
var PromiseReduce = Promise2.reduce;
|
|
1542
1542
|
var PromiseAll = Promise2.all;
|
|
@@ -1557,7 +1557,7 @@ function requireBluebird() {
|
|
|
1557
1557
|
};
|
|
1558
1558
|
Promise2.mapSeries = PromiseMapSeries;
|
|
1559
1559
|
};
|
|
1560
|
-
}, {}], 12: [function(_dereq_2, module2,
|
|
1560
|
+
}, {}], 12: [function(_dereq_2, module2, exports2) {
|
|
1561
1561
|
var es5 = _dereq_2("./es5");
|
|
1562
1562
|
var Objectfreeze = es5.freeze;
|
|
1563
1563
|
var util = _dereq_2("./util");
|
|
@@ -1665,7 +1665,7 @@ function requireBluebird() {
|
|
|
1665
1665
|
AggregateError: errorTypes.AggregateError,
|
|
1666
1666
|
Warning
|
|
1667
1667
|
};
|
|
1668
|
-
}, { "./es5": 13, "./util": 36 }], 13: [function(_dereq_2, module2,
|
|
1668
|
+
}, { "./es5": 13, "./util": 36 }], 13: [function(_dereq_2, module2, exports2) {
|
|
1669
1669
|
var isES5 = /* @__PURE__ */ (function() {
|
|
1670
1670
|
return this === void 0;
|
|
1671
1671
|
})();
|
|
@@ -1735,7 +1735,7 @@ function requireBluebird() {
|
|
|
1735
1735
|
}
|
|
1736
1736
|
};
|
|
1737
1737
|
}
|
|
1738
|
-
}, {}], 14: [function(_dereq_2, module2,
|
|
1738
|
+
}, {}], 14: [function(_dereq_2, module2, exports2) {
|
|
1739
1739
|
module2.exports = function(Promise2, INTERNAL) {
|
|
1740
1740
|
var PromiseMap = Promise2.map;
|
|
1741
1741
|
Promise2.prototype.filter = function(fn, options) {
|
|
@@ -1745,7 +1745,7 @@ function requireBluebird() {
|
|
|
1745
1745
|
return PromiseMap(promises, fn, options, INTERNAL);
|
|
1746
1746
|
};
|
|
1747
1747
|
};
|
|
1748
|
-
}, {}], 15: [function(_dereq_2, module2,
|
|
1748
|
+
}, {}], 15: [function(_dereq_2, module2, exports2) {
|
|
1749
1749
|
module2.exports = function(Promise2, tryConvertToPromise, NEXT_FILTER) {
|
|
1750
1750
|
var util = _dereq_2("./util");
|
|
1751
1751
|
var CancellationError = Promise2.CancellationError;
|
|
@@ -1884,7 +1884,7 @@ function requireBluebird() {
|
|
|
1884
1884
|
};
|
|
1885
1885
|
return PassThroughHandlerContext;
|
|
1886
1886
|
};
|
|
1887
|
-
}, { "./catch_filter": 7, "./util": 36 }], 16: [function(_dereq_2, module2,
|
|
1887
|
+
}, { "./catch_filter": 7, "./util": 36 }], 16: [function(_dereq_2, module2, exports2) {
|
|
1888
1888
|
module2.exports = function(Promise2, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug) {
|
|
1889
1889
|
var errors = _dereq_2("./errors");
|
|
1890
1890
|
var TypeError2 = errors.TypeError;
|
|
@@ -2093,7 +2093,7 @@ function requireBluebird() {
|
|
|
2093
2093
|
return ret;
|
|
2094
2094
|
};
|
|
2095
2095
|
};
|
|
2096
|
-
}, { "./errors": 12, "./util": 36 }], 17: [function(_dereq_2, module2,
|
|
2096
|
+
}, { "./errors": 12, "./util": 36 }], 17: [function(_dereq_2, module2, exports2) {
|
|
2097
2097
|
module2.exports = function(Promise2, PromiseArray, tryConvertToPromise, INTERNAL, async) {
|
|
2098
2098
|
var util = _dereq_2("./util");
|
|
2099
2099
|
util.canEvaluate;
|
|
@@ -2112,7 +2112,7 @@ function requireBluebird() {
|
|
|
2112
2112
|
return fn !== void 0 ? ret.spread(fn) : ret;
|
|
2113
2113
|
};
|
|
2114
2114
|
};
|
|
2115
|
-
}, { "./util": 36 }], 18: [function(_dereq_2, module2,
|
|
2115
|
+
}, { "./util": 36 }], 18: [function(_dereq_2, module2, exports2) {
|
|
2116
2116
|
module2.exports = function(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug) {
|
|
2117
2117
|
var util = _dereq_2("./util");
|
|
2118
2118
|
var tryCatch = util.tryCatch;
|
|
@@ -2263,7 +2263,7 @@ function requireBluebird() {
|
|
|
2263
2263
|
return map(promises, fn, options, _filter);
|
|
2264
2264
|
};
|
|
2265
2265
|
};
|
|
2266
|
-
}, { "./util": 36 }], 19: [function(_dereq_2, module2,
|
|
2266
|
+
}, { "./util": 36 }], 19: [function(_dereq_2, module2, exports2) {
|
|
2267
2267
|
module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection, debug) {
|
|
2268
2268
|
var util = _dereq_2("./util");
|
|
2269
2269
|
var tryCatch = util.tryCatch;
|
|
@@ -2321,7 +2321,7 @@ function requireBluebird() {
|
|
|
2321
2321
|
}
|
|
2322
2322
|
};
|
|
2323
2323
|
};
|
|
2324
|
-
}, { "./util": 36 }], 20: [function(_dereq_2, module2,
|
|
2324
|
+
}, { "./util": 36 }], 20: [function(_dereq_2, module2, exports2) {
|
|
2325
2325
|
var util = _dereq_2("./util");
|
|
2326
2326
|
var maybeWrapAsError = util.maybeWrapAsError;
|
|
2327
2327
|
var errors = _dereq_2("./errors");
|
|
@@ -2367,7 +2367,7 @@ function requireBluebird() {
|
|
|
2367
2367
|
};
|
|
2368
2368
|
}
|
|
2369
2369
|
module2.exports = nodebackForPromise;
|
|
2370
|
-
}, { "./errors": 12, "./es5": 13, "./util": 36 }], 21: [function(_dereq_2, module2,
|
|
2370
|
+
}, { "./errors": 12, "./es5": 13, "./util": 36 }], 21: [function(_dereq_2, module2, exports2) {
|
|
2371
2371
|
module2.exports = function(Promise2) {
|
|
2372
2372
|
var util = _dereq_2("./util");
|
|
2373
2373
|
var async = Promise2._async;
|
|
@@ -2418,7 +2418,7 @@ function requireBluebird() {
|
|
|
2418
2418
|
return this;
|
|
2419
2419
|
};
|
|
2420
2420
|
};
|
|
2421
|
-
}, { "./util": 36 }], 22: [function(_dereq_2, module2,
|
|
2421
|
+
}, { "./util": 36 }], 22: [function(_dereq_2, module2, exports2) {
|
|
2422
2422
|
module2.exports = function() {
|
|
2423
2423
|
var makeSelfResolutionError = function() {
|
|
2424
2424
|
return new TypeError2("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n");
|
|
@@ -3141,7 +3141,7 @@ function requireBluebird() {
|
|
|
3141
3141
|
debug.setBounds(Async.firstLineError, util.lastLineError);
|
|
3142
3142
|
return Promise2;
|
|
3143
3143
|
};
|
|
3144
|
-
}, { "./any.js": 1, "./async": 2, "./bind": 3, "./call_get.js": 5, "./cancel": 6, "./catch_filter": 7, "./context": 8, "./debuggability": 9, "./direct_resolve": 10, "./each.js": 11, "./errors": 12, "./es5": 13, "./filter.js": 14, "./finally": 15, "./generators.js": 16, "./join": 17, "./map.js": 18, "./method": 19, "./nodeback": 20, "./nodeify.js": 21, "./promise_array": 23, "./promisify.js": 24, "./props.js": 25, "./race.js": 27, "./reduce.js": 28, "./settle.js": 30, "./some.js": 31, "./synchronous_inspection": 32, "./thenables": 33, "./timers.js": 34, "./using.js": 35, "./util": 36, "async_hooks": void 0 }], 23: [function(_dereq_2, module2,
|
|
3144
|
+
}, { "./any.js": 1, "./async": 2, "./bind": 3, "./call_get.js": 5, "./cancel": 6, "./catch_filter": 7, "./context": 8, "./debuggability": 9, "./direct_resolve": 10, "./each.js": 11, "./errors": 12, "./es5": 13, "./filter.js": 14, "./finally": 15, "./generators.js": 16, "./join": 17, "./map.js": 18, "./method": 19, "./nodeback": 20, "./nodeify.js": 21, "./promise_array": 23, "./promisify.js": 24, "./props.js": 25, "./race.js": 27, "./reduce.js": 28, "./settle.js": 30, "./some.js": 31, "./synchronous_inspection": 32, "./thenables": 33, "./timers.js": 34, "./using.js": 35, "./util": 36, "async_hooks": void 0 }], 23: [function(_dereq_2, module2, exports2) {
|
|
3145
3145
|
module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection, Proxyable) {
|
|
3146
3146
|
var util = _dereq_2("./util");
|
|
3147
3147
|
util.isArray;
|
|
@@ -3307,7 +3307,7 @@ function requireBluebird() {
|
|
|
3307
3307
|
};
|
|
3308
3308
|
return PromiseArray;
|
|
3309
3309
|
};
|
|
3310
|
-
}, { "./util": 36 }], 24: [function(_dereq_2, module2,
|
|
3310
|
+
}, { "./util": 36 }], 24: [function(_dereq_2, module2, exports2) {
|
|
3311
3311
|
module2.exports = function(Promise2, INTERNAL) {
|
|
3312
3312
|
var THIS = {};
|
|
3313
3313
|
var util = _dereq_2("./util");
|
|
@@ -3491,7 +3491,7 @@ function requireBluebird() {
|
|
|
3491
3491
|
return promisifyAll(target, suffix, filter, promisifier, multiArgs);
|
|
3492
3492
|
};
|
|
3493
3493
|
};
|
|
3494
|
-
}, { "./errors": 12, "./nodeback": 20, "./util": 36 }], 25: [function(_dereq_2, module2,
|
|
3494
|
+
}, { "./errors": 12, "./nodeback": 20, "./util": 36 }], 25: [function(_dereq_2, module2, exports2) {
|
|
3495
3495
|
module2.exports = function(Promise2, PromiseArray, tryConvertToPromise, apiRejection) {
|
|
3496
3496
|
var util = _dereq_2("./util");
|
|
3497
3497
|
var isObject = util.isObject;
|
|
@@ -3600,7 +3600,7 @@ function requireBluebird() {
|
|
|
3600
3600
|
return props(promises);
|
|
3601
3601
|
};
|
|
3602
3602
|
};
|
|
3603
|
-
}, { "./es5": 13, "./util": 36 }], 26: [function(_dereq_2, module2,
|
|
3603
|
+
}, { "./es5": 13, "./util": 36 }], 26: [function(_dereq_2, module2, exports2) {
|
|
3604
3604
|
function arrayMove(src, srcIndex, dst, dstIndex, len) {
|
|
3605
3605
|
for (var j = 0; j < len; ++j) {
|
|
3606
3606
|
dst[j + dstIndex] = src[j + srcIndex];
|
|
@@ -3662,7 +3662,7 @@ function requireBluebird() {
|
|
|
3662
3662
|
arrayMove(this, 0, this, oldCapacity, moveItemsCount);
|
|
3663
3663
|
};
|
|
3664
3664
|
module2.exports = Queue;
|
|
3665
|
-
}, {}], 27: [function(_dereq_2, module2,
|
|
3665
|
+
}, {}], 27: [function(_dereq_2, module2, exports2) {
|
|
3666
3666
|
module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection) {
|
|
3667
3667
|
var util = _dereq_2("./util");
|
|
3668
3668
|
var raceLater = function(promise) {
|
|
@@ -3701,7 +3701,7 @@ function requireBluebird() {
|
|
|
3701
3701
|
return race(this, void 0);
|
|
3702
3702
|
};
|
|
3703
3703
|
};
|
|
3704
|
-
}, { "./util": 36 }], 28: [function(_dereq_2, module2,
|
|
3704
|
+
}, { "./util": 36 }], 28: [function(_dereq_2, module2, exports2) {
|
|
3705
3705
|
module2.exports = function(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug) {
|
|
3706
3706
|
var util = _dereq_2("./util");
|
|
3707
3707
|
var tryCatch = util.tryCatch;
|
|
@@ -3860,7 +3860,7 @@ function requireBluebird() {
|
|
|
3860
3860
|
return ret;
|
|
3861
3861
|
}
|
|
3862
3862
|
};
|
|
3863
|
-
}, { "./util": 36 }], 29: [function(_dereq_2, module2,
|
|
3863
|
+
}, { "./util": 36 }], 29: [function(_dereq_2, module2, exports2) {
|
|
3864
3864
|
var util = _dereq_2("./util");
|
|
3865
3865
|
var schedule;
|
|
3866
3866
|
var noAsyncScheduler = function() {
|
|
@@ -3917,7 +3917,7 @@ function requireBluebird() {
|
|
|
3917
3917
|
schedule = noAsyncScheduler;
|
|
3918
3918
|
}
|
|
3919
3919
|
module2.exports = schedule;
|
|
3920
|
-
}, { "./util": 36 }], 30: [function(_dereq_2, module2,
|
|
3920
|
+
}, { "./util": 36 }], 30: [function(_dereq_2, module2, exports2) {
|
|
3921
3921
|
module2.exports = function(Promise2, PromiseArray, debug) {
|
|
3922
3922
|
var PromiseInspection = Promise2.PromiseInspection;
|
|
3923
3923
|
var util = _dereq_2("./util");
|
|
@@ -3957,7 +3957,7 @@ function requireBluebird() {
|
|
|
3957
3957
|
return Promise2.settle(this);
|
|
3958
3958
|
};
|
|
3959
3959
|
};
|
|
3960
|
-
}, { "./util": 36 }], 31: [function(_dereq_2, module2,
|
|
3960
|
+
}, { "./util": 36 }], 31: [function(_dereq_2, module2, exports2) {
|
|
3961
3961
|
module2.exports = function(Promise2, PromiseArray, apiRejection) {
|
|
3962
3962
|
var util = _dereq_2("./util");
|
|
3963
3963
|
var RangeError2 = _dereq_2("./errors").RangeError;
|
|
@@ -4079,7 +4079,7 @@ function requireBluebird() {
|
|
|
4079
4079
|
};
|
|
4080
4080
|
Promise2._SomePromiseArray = SomePromiseArray;
|
|
4081
4081
|
};
|
|
4082
|
-
}, { "./errors": 12, "./util": 36 }], 32: [function(_dereq_2, module2,
|
|
4082
|
+
}, { "./errors": 12, "./util": 36 }], 32: [function(_dereq_2, module2, exports2) {
|
|
4083
4083
|
module2.exports = function(Promise2) {
|
|
4084
4084
|
function PromiseInspection(promise) {
|
|
4085
4085
|
if (promise !== void 0) {
|
|
@@ -4159,7 +4159,7 @@ function requireBluebird() {
|
|
|
4159
4159
|
};
|
|
4160
4160
|
Promise2.PromiseInspection = PromiseInspection;
|
|
4161
4161
|
};
|
|
4162
|
-
}, {}], 33: [function(_dereq_2, module2,
|
|
4162
|
+
}, {}], 33: [function(_dereq_2, module2, exports2) {
|
|
4163
4163
|
module2.exports = function(Promise2, INTERNAL) {
|
|
4164
4164
|
var util = _dereq_2("./util");
|
|
4165
4165
|
var errorObj = util.errorObj;
|
|
@@ -4236,7 +4236,7 @@ function requireBluebird() {
|
|
|
4236
4236
|
}
|
|
4237
4237
|
return tryConvertToPromise;
|
|
4238
4238
|
};
|
|
4239
|
-
}, { "./util": 36 }], 34: [function(_dereq_2, module2,
|
|
4239
|
+
}, { "./util": 36 }], 34: [function(_dereq_2, module2, exports2) {
|
|
4240
4240
|
module2.exports = function(Promise2, INTERNAL, debug) {
|
|
4241
4241
|
var util = _dereq_2("./util");
|
|
4242
4242
|
var TimeoutError = Promise2.TimeoutError;
|
|
@@ -4329,7 +4329,7 @@ function requireBluebird() {
|
|
|
4329
4329
|
return ret;
|
|
4330
4330
|
};
|
|
4331
4331
|
};
|
|
4332
|
-
}, { "./util": 36 }], 35: [function(_dereq_2, module2,
|
|
4332
|
+
}, { "./util": 36 }], 35: [function(_dereq_2, module2, exports2) {
|
|
4333
4333
|
module2.exports = function(Promise2, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug) {
|
|
4334
4334
|
var util = _dereq_2("./util");
|
|
4335
4335
|
var TypeError2 = _dereq_2("./errors").TypeError;
|
|
@@ -4533,7 +4533,7 @@ function requireBluebird() {
|
|
|
4533
4533
|
throw new TypeError2();
|
|
4534
4534
|
};
|
|
4535
4535
|
};
|
|
4536
|
-
}, { "./errors": 12, "./util": 36 }], 36: [function(_dereq_2, module2,
|
|
4536
|
+
}, { "./errors": 12, "./util": 36 }], 36: [function(_dereq_2, module2, exports2) {
|
|
4537
4537
|
var es5 = _dereq_2("./es5");
|
|
4538
4538
|
var canEvaluate = typeof navigator == "undefined";
|
|
4539
4539
|
var errorObj = { e: {} };
|
|
@@ -5208,13 +5208,13 @@ var hasRequiredBrowser$1;
|
|
|
5208
5208
|
function requireBrowser$1() {
|
|
5209
5209
|
if (hasRequiredBrowser$1) return browser$1.exports;
|
|
5210
5210
|
hasRequiredBrowser$1 = 1;
|
|
5211
|
-
(function(module, exports
|
|
5212
|
-
exports
|
|
5213
|
-
exports
|
|
5214
|
-
exports
|
|
5215
|
-
exports
|
|
5216
|
-
exports
|
|
5217
|
-
exports
|
|
5211
|
+
(function(module, exports) {
|
|
5212
|
+
exports.formatArgs = formatArgs;
|
|
5213
|
+
exports.save = save;
|
|
5214
|
+
exports.load = load;
|
|
5215
|
+
exports.useColors = useColors;
|
|
5216
|
+
exports.storage = localstorage();
|
|
5217
|
+
exports.destroy = /* @__PURE__ */ (() => {
|
|
5218
5218
|
let warned = false;
|
|
5219
5219
|
return () => {
|
|
5220
5220
|
if (!warned) {
|
|
@@ -5223,7 +5223,7 @@ function requireBrowser$1() {
|
|
|
5223
5223
|
}
|
|
5224
5224
|
};
|
|
5225
5225
|
})();
|
|
5226
|
-
exports
|
|
5226
|
+
exports.colors = [
|
|
5227
5227
|
"#0000CC",
|
|
5228
5228
|
"#0000FF",
|
|
5229
5229
|
"#0033CC",
|
|
@@ -5335,14 +5335,14 @@ function requireBrowser$1() {
|
|
|
5335
5335
|
});
|
|
5336
5336
|
args.splice(lastC, 0, c);
|
|
5337
5337
|
}
|
|
5338
|
-
exports
|
|
5338
|
+
exports.log = console.debug || console.log || (() => {
|
|
5339
5339
|
});
|
|
5340
5340
|
function save(namespaces) {
|
|
5341
5341
|
try {
|
|
5342
5342
|
if (namespaces) {
|
|
5343
|
-
exports
|
|
5343
|
+
exports.storage.setItem("debug", namespaces);
|
|
5344
5344
|
} else {
|
|
5345
|
-
exports
|
|
5345
|
+
exports.storage.removeItem("debug");
|
|
5346
5346
|
}
|
|
5347
5347
|
} catch (error) {
|
|
5348
5348
|
}
|
|
@@ -5350,7 +5350,7 @@ function requireBrowser$1() {
|
|
|
5350
5350
|
function load() {
|
|
5351
5351
|
let r;
|
|
5352
5352
|
try {
|
|
5353
|
-
r = exports
|
|
5353
|
+
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
5354
5354
|
} catch (error) {
|
|
5355
5355
|
}
|
|
5356
5356
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
@@ -5364,7 +5364,7 @@ function requireBrowser$1() {
|
|
|
5364
5364
|
} catch (error) {
|
|
5365
5365
|
}
|
|
5366
5366
|
}
|
|
5367
|
-
module.exports = requireCommon()(exports
|
|
5367
|
+
module.exports = requireCommon()(exports);
|
|
5368
5368
|
const { formatters } = module.exports;
|
|
5369
5369
|
formatters.j = function(v) {
|
|
5370
5370
|
try {
|
|
@@ -5761,7 +5761,7 @@ function requireHttpErrors() {
|
|
|
5761
5761
|
Object.defineProperty(func, "name", desc);
|
|
5762
5762
|
}
|
|
5763
5763
|
}
|
|
5764
|
-
function populateConstructorExports(exports
|
|
5764
|
+
function populateConstructorExports(exports, codes, HttpError) {
|
|
5765
5765
|
codes.forEach(function forEachCode(code) {
|
|
5766
5766
|
var CodeError;
|
|
5767
5767
|
var name = toIdentifier(statuses2.message[code]);
|
|
@@ -5774,8 +5774,8 @@ function requireHttpErrors() {
|
|
|
5774
5774
|
break;
|
|
5775
5775
|
}
|
|
5776
5776
|
if (CodeError) {
|
|
5777
|
-
exports
|
|
5778
|
-
exports
|
|
5777
|
+
exports[code] = CodeError;
|
|
5778
|
+
exports[name] = CodeError;
|
|
5779
5779
|
}
|
|
5780
5780
|
});
|
|
5781
5781
|
}
|
|
@@ -9478,7 +9478,7 @@ var hasRequiredEncodings;
|
|
|
9478
9478
|
function requireEncodings() {
|
|
9479
9479
|
if (hasRequiredEncodings) return encodings;
|
|
9480
9480
|
hasRequiredEncodings = 1;
|
|
9481
|
-
(function(exports
|
|
9481
|
+
(function(exports) {
|
|
9482
9482
|
var mergeModules = requireMergeExports();
|
|
9483
9483
|
var modules = [
|
|
9484
9484
|
requireInternal(),
|
|
@@ -9493,7 +9493,7 @@ function requireEncodings() {
|
|
|
9493
9493
|
];
|
|
9494
9494
|
for (var i = 0; i < modules.length; i++) {
|
|
9495
9495
|
var module = modules[i];
|
|
9496
|
-
mergeModules(exports
|
|
9496
|
+
mergeModules(exports, module);
|
|
9497
9497
|
}
|
|
9498
9498
|
})(encodings);
|
|
9499
9499
|
return encodings;
|
|
@@ -10114,109 +10114,136 @@ function requireOnFinished() {
|
|
|
10114
10114
|
return onFinished.exports;
|
|
10115
10115
|
}
|
|
10116
10116
|
var typeIs = { exports: {} };
|
|
10117
|
-
var
|
|
10118
|
-
var
|
|
10119
|
-
function
|
|
10120
|
-
if (
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10117
|
+
var dist$2 = {};
|
|
10118
|
+
var hasRequiredDist$2;
|
|
10119
|
+
function requireDist$2() {
|
|
10120
|
+
if (hasRequiredDist$2) return dist$2;
|
|
10121
|
+
hasRequiredDist$2 = 1;
|
|
10122
|
+
Object.defineProperty(dist$2, "__esModule", { value: true });
|
|
10123
|
+
dist$2.format = format;
|
|
10124
|
+
dist$2.parse = parse2;
|
|
10125
|
+
const TEXT_REGEXP = /^[\u0009\u0020-\u007e\u0080-\u00ff]*$/;
|
|
10126
|
+
const TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
10127
|
+
const QUOTE_REGEXP = /[\\"]/g;
|
|
10128
|
+
const TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
10129
|
+
const NullObject = /* @__PURE__ */ (() => {
|
|
10130
|
+
const C = function() {
|
|
10131
|
+
};
|
|
10132
|
+
C.prototype = /* @__PURE__ */ Object.create(null);
|
|
10133
|
+
return C;
|
|
10134
|
+
})();
|
|
10130
10135
|
function format(obj) {
|
|
10131
|
-
|
|
10132
|
-
throw new TypeError("argument obj is required");
|
|
10133
|
-
}
|
|
10134
|
-
var parameters = obj.parameters;
|
|
10135
|
-
var type2 = obj.type;
|
|
10136
|
+
const { type: type2, parameters } = obj;
|
|
10136
10137
|
if (!type2 || !TYPE_REGEXP.test(type2)) {
|
|
10137
|
-
throw new TypeError(
|
|
10138
|
+
throw new TypeError(`Invalid type: ${type2}`);
|
|
10138
10139
|
}
|
|
10139
|
-
|
|
10140
|
-
if (parameters
|
|
10141
|
-
|
|
10142
|
-
var params = Object.keys(parameters).sort();
|
|
10143
|
-
for (var i = 0; i < params.length; i++) {
|
|
10144
|
-
param = params[i];
|
|
10140
|
+
let result = type2;
|
|
10141
|
+
if (parameters) {
|
|
10142
|
+
for (const param of Object.keys(parameters)) {
|
|
10145
10143
|
if (!TOKEN_REGEXP.test(param)) {
|
|
10146
|
-
throw new TypeError(
|
|
10144
|
+
throw new TypeError(`Invalid parameter name: ${param}`);
|
|
10147
10145
|
}
|
|
10148
|
-
|
|
10146
|
+
result += `; ${param}=${qstring(parameters[param])}`;
|
|
10149
10147
|
}
|
|
10150
10148
|
}
|
|
10151
|
-
return
|
|
10149
|
+
return result;
|
|
10152
10150
|
}
|
|
10153
|
-
function parse2(
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10151
|
+
function parse2(header, options) {
|
|
10152
|
+
const len = header.length;
|
|
10153
|
+
let index = skipOWS(header, 0, len);
|
|
10154
|
+
const valueStart = index;
|
|
10155
|
+
index = skipValue(header, index, len);
|
|
10156
|
+
const valueEnd = trailingOWS(header, valueStart, index);
|
|
10157
|
+
const type2 = header.slice(valueStart, valueEnd).toLowerCase();
|
|
10158
|
+
const parameters = options?.parameters === false ? new NullObject() : parseParameters(header, index, len);
|
|
10159
|
+
return { type: type2, parameters };
|
|
10160
|
+
}
|
|
10161
|
+
const SP = 32;
|
|
10162
|
+
const HTAB = 9;
|
|
10163
|
+
const SEMI = 59;
|
|
10164
|
+
const EQ = 61;
|
|
10165
|
+
const DQUOTE = 34;
|
|
10166
|
+
const BSLASH = 92;
|
|
10167
|
+
function parseParameters(header, index, len) {
|
|
10168
|
+
const parameters = new NullObject();
|
|
10169
|
+
parameter: while (index < len) {
|
|
10170
|
+
index = skipOWS(header, index + 1, len);
|
|
10171
|
+
const keyStart = index;
|
|
10172
|
+
while (index < len) {
|
|
10173
|
+
const code = header.charCodeAt(index);
|
|
10174
|
+
if (code === SEMI)
|
|
10175
|
+
continue parameter;
|
|
10176
|
+
if (code === EQ) {
|
|
10177
|
+
const keyEnd = trailingOWS(header, keyStart, index);
|
|
10178
|
+
const key = header.slice(keyStart, keyEnd).toLowerCase();
|
|
10179
|
+
index = skipOWS(header, index + 1, len);
|
|
10180
|
+
if (index < len && header.charCodeAt(index) === DQUOTE) {
|
|
10181
|
+
index++;
|
|
10182
|
+
let value = "";
|
|
10183
|
+
while (index < len) {
|
|
10184
|
+
const code2 = header.charCodeAt(index++);
|
|
10185
|
+
if (code2 === DQUOTE) {
|
|
10186
|
+
index = skipValue(header, index, len);
|
|
10187
|
+
if (parameters[key] === void 0)
|
|
10188
|
+
parameters[key] = value;
|
|
10189
|
+
break;
|
|
10190
|
+
}
|
|
10191
|
+
if (code2 === BSLASH && index < len) {
|
|
10192
|
+
value += header[index++];
|
|
10193
|
+
continue;
|
|
10194
|
+
}
|
|
10195
|
+
value += String.fromCharCode(code2);
|
|
10196
|
+
}
|
|
10197
|
+
continue parameter;
|
|
10198
|
+
}
|
|
10199
|
+
const valueStart = index;
|
|
10200
|
+
index = skipValue(header, index, len);
|
|
10201
|
+
if (parameters[key] === void 0) {
|
|
10202
|
+
const valueEnd = trailingOWS(header, valueStart, index);
|
|
10203
|
+
parameters[key] = header.slice(valueStart, valueEnd);
|
|
10183
10204
|
}
|
|
10205
|
+
continue parameter;
|
|
10184
10206
|
}
|
|
10185
|
-
|
|
10186
|
-
}
|
|
10187
|
-
if (index !== header.length) {
|
|
10188
|
-
throw new TypeError("invalid parameter format");
|
|
10207
|
+
index++;
|
|
10189
10208
|
}
|
|
10190
10209
|
}
|
|
10191
|
-
return
|
|
10210
|
+
return parameters;
|
|
10192
10211
|
}
|
|
10193
|
-
function
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
}
|
|
10200
|
-
if (typeof header !== "string") {
|
|
10201
|
-
throw new TypeError("content-type header is missing from object");
|
|
10212
|
+
function skipValue(str, index, len) {
|
|
10213
|
+
while (index < len) {
|
|
10214
|
+
const char = str.charCodeAt(index);
|
|
10215
|
+
if (char === SEMI)
|
|
10216
|
+
break;
|
|
10217
|
+
index++;
|
|
10202
10218
|
}
|
|
10203
|
-
return
|
|
10219
|
+
return index;
|
|
10204
10220
|
}
|
|
10205
|
-
function
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10221
|
+
function skipOWS(header, index, len) {
|
|
10222
|
+
while (index < len) {
|
|
10223
|
+
const char = header.charCodeAt(index);
|
|
10224
|
+
if (char !== SP && char !== HTAB)
|
|
10225
|
+
break;
|
|
10226
|
+
index++;
|
|
10209
10227
|
}
|
|
10210
|
-
|
|
10211
|
-
|
|
10228
|
+
return index;
|
|
10229
|
+
}
|
|
10230
|
+
function trailingOWS(header, start, end) {
|
|
10231
|
+
while (end > start) {
|
|
10232
|
+
const char = header.charCodeAt(end - 1);
|
|
10233
|
+
if (char !== SP && char !== HTAB)
|
|
10234
|
+
break;
|
|
10235
|
+
end--;
|
|
10212
10236
|
}
|
|
10213
|
-
return
|
|
10237
|
+
return end;
|
|
10214
10238
|
}
|
|
10215
|
-
function
|
|
10216
|
-
|
|
10217
|
-
|
|
10239
|
+
function qstring(str) {
|
|
10240
|
+
if (TOKEN_REGEXP.test(str))
|
|
10241
|
+
return str;
|
|
10242
|
+
if (TEXT_REGEXP.test(str))
|
|
10243
|
+
return `"${str.replace(QUOTE_REGEXP, "\\$&")}"`;
|
|
10244
|
+
throw new TypeError(`Invalid parameter value: ${str}`);
|
|
10218
10245
|
}
|
|
10219
|
-
return
|
|
10246
|
+
return dist$2;
|
|
10220
10247
|
}
|
|
10221
10248
|
var mimeTypes = {};
|
|
10222
10249
|
const require$$0$1 = {
|
|
@@ -12800,21 +12827,21 @@ var hasRequiredMimeTypes;
|
|
|
12800
12827
|
function requireMimeTypes() {
|
|
12801
12828
|
if (hasRequiredMimeTypes) return mimeTypes;
|
|
12802
12829
|
hasRequiredMimeTypes = 1;
|
|
12803
|
-
(function(exports
|
|
12830
|
+
(function(exports) {
|
|
12804
12831
|
var db = requireMimeDb();
|
|
12805
12832
|
var extname = require$$1$2.extname;
|
|
12806
12833
|
var mimeScore2 = requireMimeScore();
|
|
12807
12834
|
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
|
|
12808
12835
|
var TEXT_TYPE_REGEXP = /^text\//i;
|
|
12809
|
-
exports
|
|
12810
|
-
exports
|
|
12811
|
-
exports
|
|
12812
|
-
exports
|
|
12813
|
-
exports
|
|
12814
|
-
exports
|
|
12815
|
-
exports
|
|
12816
|
-
exports
|
|
12817
|
-
populateMaps(exports
|
|
12836
|
+
exports.charset = charset2;
|
|
12837
|
+
exports.charsets = { lookup: charset2 };
|
|
12838
|
+
exports.contentType = contentType2;
|
|
12839
|
+
exports.extension = extension;
|
|
12840
|
+
exports.extensions = /* @__PURE__ */ Object.create(null);
|
|
12841
|
+
exports.lookup = lookup;
|
|
12842
|
+
exports.types = /* @__PURE__ */ Object.create(null);
|
|
12843
|
+
exports._extensionConflicts = [];
|
|
12844
|
+
populateMaps(exports.extensions, exports.types);
|
|
12818
12845
|
function charset2(type2) {
|
|
12819
12846
|
if (!type2 || typeof type2 !== "string") {
|
|
12820
12847
|
return false;
|
|
@@ -12833,12 +12860,12 @@ function requireMimeTypes() {
|
|
|
12833
12860
|
if (!str || typeof str !== "string") {
|
|
12834
12861
|
return false;
|
|
12835
12862
|
}
|
|
12836
|
-
var mime = str.indexOf("/") === -1 ? exports
|
|
12863
|
+
var mime = str.indexOf("/") === -1 ? exports.lookup(str) : str;
|
|
12837
12864
|
if (!mime) {
|
|
12838
12865
|
return false;
|
|
12839
12866
|
}
|
|
12840
12867
|
if (mime.indexOf("charset") === -1) {
|
|
12841
|
-
var charset3 = exports
|
|
12868
|
+
var charset3 = exports.charset(mime);
|
|
12842
12869
|
if (charset3) mime += "; charset=" + charset3.toLowerCase();
|
|
12843
12870
|
}
|
|
12844
12871
|
return mime;
|
|
@@ -12848,7 +12875,7 @@ function requireMimeTypes() {
|
|
|
12848
12875
|
return false;
|
|
12849
12876
|
}
|
|
12850
12877
|
var match = EXTRACT_TYPE_REGEXP.exec(type2);
|
|
12851
|
-
var exts = match && exports
|
|
12878
|
+
var exts = match && exports.extensions[match[1].toLowerCase()];
|
|
12852
12879
|
if (!exts || !exts.length) {
|
|
12853
12880
|
return false;
|
|
12854
12881
|
}
|
|
@@ -12862,7 +12889,7 @@ function requireMimeTypes() {
|
|
|
12862
12889
|
if (!extension2) {
|
|
12863
12890
|
return false;
|
|
12864
12891
|
}
|
|
12865
|
-
return exports
|
|
12892
|
+
return exports.types[extension2] || false;
|
|
12866
12893
|
}
|
|
12867
12894
|
function populateMaps(extensions, types) {
|
|
12868
12895
|
Object.keys(db).forEach(function forEachMimeType(type2) {
|
|
@@ -12881,7 +12908,7 @@ function requireMimeTypes() {
|
|
|
12881
12908
|
type2
|
|
12882
12909
|
);
|
|
12883
12910
|
if (legacyType !== types[extension2]) {
|
|
12884
|
-
exports
|
|
12911
|
+
exports._extensionConflicts.push([extension2, legacyType, types[extension2]]);
|
|
12885
12912
|
}
|
|
12886
12913
|
}
|
|
12887
12914
|
});
|
|
@@ -12895,7 +12922,7 @@ function requireMimeTypes() {
|
|
|
12895
12922
|
var SOURCE_RANK = ["nginx", "apache", void 0, "iana"];
|
|
12896
12923
|
var score0 = type0 ? SOURCE_RANK.indexOf(db[type0].source) : 0;
|
|
12897
12924
|
var score1 = type1 ? SOURCE_RANK.indexOf(db[type1].source) : 0;
|
|
12898
|
-
if (exports
|
|
12925
|
+
if (exports.types[extension] !== "application/octet-stream" && (score0 > score1 || score0 === score1 && exports.types[extension]?.slice(0, 12) === "application/")) {
|
|
12899
12926
|
return type0;
|
|
12900
12927
|
}
|
|
12901
12928
|
return score0 > score1 ? type0 : type1;
|
|
@@ -12977,7 +13004,7 @@ var hasRequiredTypeIs;
|
|
|
12977
13004
|
function requireTypeIs() {
|
|
12978
13005
|
if (hasRequiredTypeIs) return typeIs.exports;
|
|
12979
13006
|
hasRequiredTypeIs = 1;
|
|
12980
|
-
var contentType2 =
|
|
13007
|
+
var contentType2 = requireDist$2();
|
|
12981
13008
|
var mime = requireMimeTypes();
|
|
12982
13009
|
var typer = requireMediaTyper();
|
|
12983
13010
|
typeIs.exports = typeofrequest;
|
|
@@ -12986,9 +13013,12 @@ function requireTypeIs() {
|
|
|
12986
13013
|
typeIs.exports.normalize = normalize;
|
|
12987
13014
|
typeIs.exports.match = mimeMatch;
|
|
12988
13015
|
function typeis(value, types_) {
|
|
13016
|
+
if (value && typeof value === "object") {
|
|
13017
|
+
value = value.headers["content-type"];
|
|
13018
|
+
}
|
|
12989
13019
|
var i;
|
|
12990
13020
|
var types = types_;
|
|
12991
|
-
var val =
|
|
13021
|
+
var val = normalizeType(value);
|
|
12992
13022
|
if (!val) {
|
|
12993
13023
|
return false;
|
|
12994
13024
|
}
|
|
@@ -13054,37 +13084,160 @@ function requireTypeIs() {
|
|
|
13054
13084
|
return true;
|
|
13055
13085
|
}
|
|
13056
13086
|
function normalizeType(value) {
|
|
13057
|
-
|
|
13087
|
+
if (!value) return null;
|
|
13088
|
+
var type2 = contentType2.parse(value, { parameters: false }).type;
|
|
13058
13089
|
return typer.test(type2) ? type2 : null;
|
|
13059
13090
|
}
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13091
|
+
return typeIs.exports;
|
|
13092
|
+
}
|
|
13093
|
+
var dist$1 = {};
|
|
13094
|
+
var hasRequiredDist$1;
|
|
13095
|
+
function requireDist$1() {
|
|
13096
|
+
if (hasRequiredDist$1) return dist$1;
|
|
13097
|
+
hasRequiredDist$1 = 1;
|
|
13098
|
+
Object.defineProperty(dist$1, "__esModule", { value: true });
|
|
13099
|
+
dist$1.format = format;
|
|
13100
|
+
dist$1.parse = parse2;
|
|
13101
|
+
const TEXT_REGEXP = /^[\u0009\u0020-\u007e\u0080-\u00ff]*$/;
|
|
13102
|
+
const TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
13103
|
+
const QUOTE_REGEXP = /[\\"]/g;
|
|
13104
|
+
const TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
13105
|
+
const NullObject = /* @__PURE__ */ (() => {
|
|
13106
|
+
const C = function() {
|
|
13107
|
+
};
|
|
13108
|
+
C.prototype = /* @__PURE__ */ Object.create(null);
|
|
13109
|
+
return C;
|
|
13110
|
+
})();
|
|
13111
|
+
function format(obj) {
|
|
13112
|
+
const { type: type2, parameters } = obj;
|
|
13113
|
+
if (!type2 || !TYPE_REGEXP.test(type2)) {
|
|
13114
|
+
throw new TypeError(`Invalid type: ${type2}`);
|
|
13115
|
+
}
|
|
13116
|
+
let result = type2;
|
|
13117
|
+
if (parameters) {
|
|
13118
|
+
for (const param of Object.keys(parameters)) {
|
|
13119
|
+
if (!TOKEN_REGEXP.test(param)) {
|
|
13120
|
+
throw new TypeError(`Invalid parameter name: ${param}`);
|
|
13121
|
+
}
|
|
13122
|
+
result += `; ${param}=${qstring(parameters[param])}`;
|
|
13123
|
+
}
|
|
13065
13124
|
}
|
|
13125
|
+
return result;
|
|
13066
13126
|
}
|
|
13067
|
-
|
|
13127
|
+
function parse2(header, options) {
|
|
13128
|
+
const len = header.length;
|
|
13129
|
+
let index = skipOWS(header, 0, len);
|
|
13130
|
+
const valueStart = index;
|
|
13131
|
+
index = skipValue(header, index, len);
|
|
13132
|
+
const valueEnd = trailingOWS(header, valueStart, index);
|
|
13133
|
+
const type2 = header.slice(valueStart, valueEnd).toLowerCase();
|
|
13134
|
+
const parameters = options?.parameters === false ? new NullObject() : parseParameters(header, index, len);
|
|
13135
|
+
return { type: type2, parameters };
|
|
13136
|
+
}
|
|
13137
|
+
const SP = 32;
|
|
13138
|
+
const HTAB = 9;
|
|
13139
|
+
const SEMI = 59;
|
|
13140
|
+
const EQ = 61;
|
|
13141
|
+
const DQUOTE = 34;
|
|
13142
|
+
const BSLASH = 92;
|
|
13143
|
+
function parseParameters(header, index, len) {
|
|
13144
|
+
const parameters = new NullObject();
|
|
13145
|
+
parameter: while (index < len) {
|
|
13146
|
+
index = skipOWS(header, index + 1, len);
|
|
13147
|
+
const keyStart = index;
|
|
13148
|
+
while (index < len) {
|
|
13149
|
+
const code = header.charCodeAt(index);
|
|
13150
|
+
if (code === SEMI)
|
|
13151
|
+
continue parameter;
|
|
13152
|
+
if (code === EQ) {
|
|
13153
|
+
const keyEnd = trailingOWS(header, keyStart, index);
|
|
13154
|
+
const key = header.slice(keyStart, keyEnd).toLowerCase();
|
|
13155
|
+
index = skipOWS(header, index + 1, len);
|
|
13156
|
+
if (index < len && header.charCodeAt(index) === DQUOTE) {
|
|
13157
|
+
index++;
|
|
13158
|
+
let value = "";
|
|
13159
|
+
while (index < len) {
|
|
13160
|
+
const code2 = header.charCodeAt(index++);
|
|
13161
|
+
if (code2 === DQUOTE) {
|
|
13162
|
+
index = skipValue(header, index, len);
|
|
13163
|
+
if (parameters[key] === void 0)
|
|
13164
|
+
parameters[key] = value;
|
|
13165
|
+
break;
|
|
13166
|
+
}
|
|
13167
|
+
if (code2 === BSLASH && index < len) {
|
|
13168
|
+
value += header[index++];
|
|
13169
|
+
continue;
|
|
13170
|
+
}
|
|
13171
|
+
value += String.fromCharCode(code2);
|
|
13172
|
+
}
|
|
13173
|
+
continue parameter;
|
|
13174
|
+
}
|
|
13175
|
+
const valueStart = index;
|
|
13176
|
+
index = skipValue(header, index, len);
|
|
13177
|
+
if (parameters[key] === void 0) {
|
|
13178
|
+
const valueEnd = trailingOWS(header, valueStart, index);
|
|
13179
|
+
parameters[key] = header.slice(valueStart, valueEnd);
|
|
13180
|
+
}
|
|
13181
|
+
continue parameter;
|
|
13182
|
+
}
|
|
13183
|
+
index++;
|
|
13184
|
+
}
|
|
13185
|
+
}
|
|
13186
|
+
return parameters;
|
|
13187
|
+
}
|
|
13188
|
+
function skipValue(str, index, len) {
|
|
13189
|
+
while (index < len) {
|
|
13190
|
+
const char = str.charCodeAt(index);
|
|
13191
|
+
if (char === SEMI)
|
|
13192
|
+
break;
|
|
13193
|
+
index++;
|
|
13194
|
+
}
|
|
13195
|
+
return index;
|
|
13196
|
+
}
|
|
13197
|
+
function skipOWS(header, index, len) {
|
|
13198
|
+
while (index < len) {
|
|
13199
|
+
const char = header.charCodeAt(index);
|
|
13200
|
+
if (char !== SP && char !== HTAB)
|
|
13201
|
+
break;
|
|
13202
|
+
index++;
|
|
13203
|
+
}
|
|
13204
|
+
return index;
|
|
13205
|
+
}
|
|
13206
|
+
function trailingOWS(header, start, end) {
|
|
13207
|
+
while (end > start) {
|
|
13208
|
+
const char = header.charCodeAt(end - 1);
|
|
13209
|
+
if (char !== SP && char !== HTAB)
|
|
13210
|
+
break;
|
|
13211
|
+
end--;
|
|
13212
|
+
}
|
|
13213
|
+
return end;
|
|
13214
|
+
}
|
|
13215
|
+
function qstring(str) {
|
|
13216
|
+
if (TOKEN_REGEXP.test(str))
|
|
13217
|
+
return str;
|
|
13218
|
+
if (TEXT_REGEXP.test(str))
|
|
13219
|
+
return `"${str.replace(QUOTE_REGEXP, "\\$&")}"`;
|
|
13220
|
+
throw new TypeError(`Invalid parameter value: ${str}`);
|
|
13221
|
+
}
|
|
13222
|
+
return dist$1;
|
|
13068
13223
|
}
|
|
13069
13224
|
var utils$2;
|
|
13070
13225
|
var hasRequiredUtils$2;
|
|
13071
13226
|
function requireUtils$2() {
|
|
13072
13227
|
if (hasRequiredUtils$2) return utils$2;
|
|
13073
13228
|
hasRequiredUtils$2 = 1;
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13229
|
+
const bytes2 = requireBytes();
|
|
13230
|
+
const contentType2 = requireDist$1();
|
|
13231
|
+
const typeis = requireTypeIs();
|
|
13077
13232
|
utils$2 = {
|
|
13078
13233
|
getCharset,
|
|
13079
13234
|
normalizeOptions,
|
|
13080
13235
|
passthrough
|
|
13081
13236
|
};
|
|
13082
13237
|
function getCharset(req) {
|
|
13083
|
-
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
return void 0;
|
|
13087
|
-
}
|
|
13238
|
+
const header = req.headers["content-type"];
|
|
13239
|
+
if (!header) return void 0;
|
|
13240
|
+
return contentType2.parse(header).parameters.charset?.toLowerCase();
|
|
13088
13241
|
}
|
|
13089
13242
|
function typeChecker(type2) {
|
|
13090
13243
|
return function checkType(req) {
|
|
@@ -13095,15 +13248,18 @@ function requireUtils$2() {
|
|
|
13095
13248
|
if (!defaultType) {
|
|
13096
13249
|
throw new TypeError("defaultType must be provided");
|
|
13097
13250
|
}
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13251
|
+
const inflate = options?.inflate !== false;
|
|
13252
|
+
const limit = typeof options?.limit === "undefined" || options?.limit === null ? 102400 : bytes2.parse(options.limit);
|
|
13253
|
+
const type2 = options?.type || defaultType;
|
|
13254
|
+
const verify = options?.verify || false;
|
|
13255
|
+
const defaultCharset = options?.defaultCharset || "utf-8";
|
|
13256
|
+
if (limit === null) {
|
|
13257
|
+
throw new TypeError(`option limit "${String(options.limit)}" is invalid`);
|
|
13258
|
+
}
|
|
13103
13259
|
if (verify !== false && typeof verify !== "function") {
|
|
13104
13260
|
throw new TypeError("option verify must be function");
|
|
13105
13261
|
}
|
|
13106
|
-
|
|
13262
|
+
const shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2;
|
|
13107
13263
|
return {
|
|
13108
13264
|
inflate,
|
|
13109
13265
|
limit,
|
|
@@ -13122,13 +13278,13 @@ var hasRequiredRead;
|
|
|
13122
13278
|
function requireRead() {
|
|
13123
13279
|
if (hasRequiredRead) return read_1;
|
|
13124
13280
|
hasRequiredRead = 1;
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13281
|
+
const createError = requireHttpErrors();
|
|
13282
|
+
const getBody = requireRawBody();
|
|
13283
|
+
const iconv = requireLib$2();
|
|
13284
|
+
const onFinished2 = requireOnFinished();
|
|
13285
|
+
const zlib = require$$4$1;
|
|
13286
|
+
const hasBody = requireTypeIs().hasBody;
|
|
13287
|
+
const { getCharset } = requireUtils$2();
|
|
13132
13288
|
read_1 = read;
|
|
13133
13289
|
function read(req, res, next, parse2, debug, options) {
|
|
13134
13290
|
if (onFinished2.isFinished(req)) {
|
|
@@ -13150,7 +13306,7 @@ function requireRead() {
|
|
|
13150
13306
|
next();
|
|
13151
13307
|
return;
|
|
13152
13308
|
}
|
|
13153
|
-
|
|
13309
|
+
let encoding2 = null;
|
|
13154
13310
|
if (options?.skipCharset !== true) {
|
|
13155
13311
|
encoding2 = getCharset(req) || options.defaultCharset;
|
|
13156
13312
|
if (!!options?.isValidCharset && !options.isValidCharset(encoding2)) {
|
|
@@ -13162,10 +13318,10 @@ function requireRead() {
|
|
|
13162
13318
|
return;
|
|
13163
13319
|
}
|
|
13164
13320
|
}
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
|
|
13321
|
+
let length;
|
|
13322
|
+
const opts = options;
|
|
13323
|
+
let stream;
|
|
13324
|
+
const verify = opts.verify;
|
|
13169
13325
|
try {
|
|
13170
13326
|
stream = contentstream(req, debug, opts.inflate);
|
|
13171
13327
|
length = stream.length;
|
|
@@ -13184,7 +13340,7 @@ function requireRead() {
|
|
|
13184
13340
|
debug("read body");
|
|
13185
13341
|
getBody(stream, opts, function(error, body) {
|
|
13186
13342
|
if (error) {
|
|
13187
|
-
|
|
13343
|
+
let _error;
|
|
13188
13344
|
if (error.type === "encoding.unsupported") {
|
|
13189
13345
|
_error = createError(415, 'unsupported charset "' + encoding2.toUpperCase() + '"', {
|
|
13190
13346
|
charset: encoding2.toLowerCase(),
|
|
@@ -13214,7 +13370,7 @@ function requireRead() {
|
|
|
13214
13370
|
return;
|
|
13215
13371
|
}
|
|
13216
13372
|
}
|
|
13217
|
-
|
|
13373
|
+
let str = body;
|
|
13218
13374
|
try {
|
|
13219
13375
|
debug("parse body");
|
|
13220
13376
|
str = typeof body !== "string" && encoding2 !== null ? iconv.decode(body, encoding2) : body;
|
|
@@ -13230,8 +13386,8 @@ function requireRead() {
|
|
|
13230
13386
|
});
|
|
13231
13387
|
}
|
|
13232
13388
|
function contentstream(req, debug, inflate) {
|
|
13233
|
-
|
|
13234
|
-
|
|
13389
|
+
const encoding2 = (req.headers["content-encoding"] || "identity").toLowerCase();
|
|
13390
|
+
const length = req.headers["content-length"];
|
|
13235
13391
|
debug('content-encoding "%s"', encoding2);
|
|
13236
13392
|
if (inflate === false && encoding2 !== "identity") {
|
|
13237
13393
|
throw createError(415, "content encoding unsupported", {
|
|
@@ -13243,7 +13399,7 @@ function requireRead() {
|
|
|
13243
13399
|
req.length = length;
|
|
13244
13400
|
return req;
|
|
13245
13401
|
}
|
|
13246
|
-
|
|
13402
|
+
const stream = createDecompressionStream(encoding2, debug);
|
|
13247
13403
|
req.pipe(stream);
|
|
13248
13404
|
return stream;
|
|
13249
13405
|
}
|
|
@@ -13280,27 +13436,52 @@ var hasRequiredJson;
|
|
|
13280
13436
|
function requireJson() {
|
|
13281
13437
|
if (hasRequiredJson) return json_1;
|
|
13282
13438
|
hasRequiredJson = 1;
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13439
|
+
const debug = requireBrowser$1()("body-parser:json");
|
|
13440
|
+
const read = requireRead();
|
|
13441
|
+
const { normalizeOptions } = requireUtils$2();
|
|
13286
13442
|
json_1 = json;
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13443
|
+
const FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/;
|
|
13444
|
+
const JSON_SYNTAX_CHAR = "#";
|
|
13445
|
+
const JSON_SYNTAX_REGEXP = /#+/g;
|
|
13290
13446
|
function json(options) {
|
|
13291
13447
|
const normalizedOptions = normalizeOptions(options, "application/json");
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13448
|
+
const parse2 = createJsonParser(options);
|
|
13449
|
+
const readOptions = {
|
|
13450
|
+
...normalizedOptions,
|
|
13451
|
+
// assert charset per RFC 7159 sec 8.1
|
|
13452
|
+
isValidCharset: (charset2) => charset2.slice(0, 4) === "utf-"
|
|
13453
|
+
};
|
|
13454
|
+
return function jsonParser(req, res, next) {
|
|
13455
|
+
read(req, res, next, parse2, debug, readOptions);
|
|
13456
|
+
};
|
|
13457
|
+
}
|
|
13458
|
+
function createJsonParser(options) {
|
|
13459
|
+
const reviver = options?.reviver;
|
|
13460
|
+
const strict = options?.strict !== false;
|
|
13461
|
+
if (strict) {
|
|
13462
|
+
return function parse2(body) {
|
|
13463
|
+
if (body.length === 0) {
|
|
13464
|
+
return {};
|
|
13465
|
+
}
|
|
13466
|
+
const first = firstchar(body);
|
|
13300
13467
|
if (first !== "{" && first !== "[") {
|
|
13301
13468
|
debug("strict violation");
|
|
13302
13469
|
throw createStrictSyntaxError(body, first);
|
|
13303
13470
|
}
|
|
13471
|
+
try {
|
|
13472
|
+
debug("parse json");
|
|
13473
|
+
return JSON.parse(body, reviver);
|
|
13474
|
+
} catch (e) {
|
|
13475
|
+
throw normalizeJsonSyntaxError(e, {
|
|
13476
|
+
message: e.message,
|
|
13477
|
+
stack: e.stack
|
|
13478
|
+
});
|
|
13479
|
+
}
|
|
13480
|
+
};
|
|
13481
|
+
}
|
|
13482
|
+
return function parse2(body) {
|
|
13483
|
+
if (body.length === 0) {
|
|
13484
|
+
return {};
|
|
13304
13485
|
}
|
|
13305
13486
|
try {
|
|
13306
13487
|
debug("parse json");
|
|
@@ -13311,19 +13492,11 @@ function requireJson() {
|
|
|
13311
13492
|
stack: e.stack
|
|
13312
13493
|
});
|
|
13313
13494
|
}
|
|
13314
|
-
}
|
|
13315
|
-
const readOptions = {
|
|
13316
|
-
...normalizedOptions,
|
|
13317
|
-
// assert charset per RFC 7159 sec 8.1
|
|
13318
|
-
isValidCharset: (charset2) => charset2.slice(0, 4) === "utf-"
|
|
13319
|
-
};
|
|
13320
|
-
return function jsonParser(req, res, next) {
|
|
13321
|
-
read(req, res, next, parse2, debug, readOptions);
|
|
13322
13495
|
};
|
|
13323
13496
|
}
|
|
13324
13497
|
function createStrictSyntaxError(str, char) {
|
|
13325
|
-
|
|
13326
|
-
|
|
13498
|
+
const index = str.indexOf(char);
|
|
13499
|
+
let partial = "";
|
|
13327
13500
|
if (index !== -1) {
|
|
13328
13501
|
partial = str.substring(0, index) + JSON_SYNTAX_CHAR.repeat(str.length - index);
|
|
13329
13502
|
}
|
|
@@ -13340,13 +13513,13 @@ function requireJson() {
|
|
|
13340
13513
|
}
|
|
13341
13514
|
}
|
|
13342
13515
|
function firstchar(str) {
|
|
13343
|
-
|
|
13516
|
+
const match = FIRST_CHAR_REGEXP.exec(str);
|
|
13344
13517
|
return match ? match[1] : void 0;
|
|
13345
13518
|
}
|
|
13346
13519
|
function normalizeJsonSyntaxError(error, obj) {
|
|
13347
|
-
|
|
13348
|
-
for (
|
|
13349
|
-
|
|
13520
|
+
const keys = Object.getOwnPropertyNames(error);
|
|
13521
|
+
for (let i = 0; i < keys.length; i++) {
|
|
13522
|
+
const key = keys[i];
|
|
13350
13523
|
if (key !== "stack" && key !== "message") {
|
|
13351
13524
|
delete error[key];
|
|
13352
13525
|
}
|
|
@@ -13362,9 +13535,9 @@ var hasRequiredRaw;
|
|
|
13362
13535
|
function requireRaw() {
|
|
13363
13536
|
if (hasRequiredRaw) return raw_1;
|
|
13364
13537
|
hasRequiredRaw = 1;
|
|
13365
|
-
|
|
13366
|
-
|
|
13367
|
-
|
|
13538
|
+
const debug = requireBrowser$1()("body-parser:raw");
|
|
13539
|
+
const read = requireRead();
|
|
13540
|
+
const { normalizeOptions, passthrough } = requireUtils$2();
|
|
13368
13541
|
raw_1 = raw;
|
|
13369
13542
|
function raw(options) {
|
|
13370
13543
|
const normalizedOptions = normalizeOptions(options, "application/octet-stream");
|
|
@@ -13384,9 +13557,9 @@ var hasRequiredText;
|
|
|
13384
13557
|
function requireText() {
|
|
13385
13558
|
if (hasRequiredText) return text_1;
|
|
13386
13559
|
hasRequiredText = 1;
|
|
13387
|
-
|
|
13388
|
-
|
|
13389
|
-
|
|
13560
|
+
const debug = requireBrowser$1()("body-parser:text");
|
|
13561
|
+
const read = requireRead();
|
|
13562
|
+
const { normalizeOptions, passthrough } = requireUtils$2();
|
|
13390
13563
|
text_1 = text;
|
|
13391
13564
|
function text(options) {
|
|
13392
13565
|
const normalizedOptions = normalizeOptions(options, "text/plain");
|
|
@@ -14005,9 +14178,8 @@ function requireSideChannelList() {
|
|
|
14005
14178
|
}
|
|
14006
14179
|
},
|
|
14007
14180
|
"delete": function(key) {
|
|
14008
|
-
var root = $o && $o.next;
|
|
14009
14181
|
var deletedNode = listDelete($o, key);
|
|
14010
|
-
if (deletedNode &&
|
|
14182
|
+
if (deletedNode && $o && !$o.next) {
|
|
14011
14183
|
$o = void 0;
|
|
14012
14184
|
}
|
|
14013
14185
|
return !!deletedNode;
|
|
@@ -14998,7 +15170,8 @@ function requireSideChannel() {
|
|
|
14998
15170
|
var channel = {
|
|
14999
15171
|
assert: function(key) {
|
|
15000
15172
|
if (!channel.has(key)) {
|
|
15001
|
-
|
|
15173
|
+
var keyDesc = key && Object(key) === key ? "the given object key" : inspect(key);
|
|
15174
|
+
throw new $TypeError("Side channel does not contain " + keyDesc);
|
|
15002
15175
|
}
|
|
15003
15176
|
},
|
|
15004
15177
|
"delete": function(key) {
|
|
@@ -15400,7 +15573,7 @@ function requireStringify() {
|
|
|
15400
15573
|
}
|
|
15401
15574
|
if (obj === null) {
|
|
15402
15575
|
if (strictNullHandling) {
|
|
15403
|
-
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset2, "key", format) : prefix;
|
|
15576
|
+
return formatter(encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset2, "key", format) : prefix);
|
|
15404
15577
|
}
|
|
15405
15578
|
obj = "";
|
|
15406
15579
|
}
|
|
@@ -15418,7 +15591,9 @@ function requireStringify() {
|
|
|
15418
15591
|
var objKeys;
|
|
15419
15592
|
if (generateArrayPrefix === "comma" && isArray(obj)) {
|
|
15420
15593
|
if (encodeValuesOnly && encoder) {
|
|
15421
|
-
obj = utils2.maybeMap(obj,
|
|
15594
|
+
obj = utils2.maybeMap(obj, function(v) {
|
|
15595
|
+
return v == null ? v : encoder(v);
|
|
15596
|
+
});
|
|
15422
15597
|
}
|
|
15423
15598
|
objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
|
|
15424
15599
|
} else if (isArray(filter)) {
|
|
@@ -15556,6 +15731,9 @@ function requireStringify() {
|
|
|
15556
15731
|
var sideChannel2 = getSideChannel();
|
|
15557
15732
|
for (var i = 0; i < objKeys.length; ++i) {
|
|
15558
15733
|
var key = objKeys[i];
|
|
15734
|
+
if (typeof key === "undefined" || key === null) {
|
|
15735
|
+
continue;
|
|
15736
|
+
}
|
|
15559
15737
|
var value = obj[key];
|
|
15560
15738
|
if (options.skipNulls && value === null) {
|
|
15561
15739
|
continue;
|
|
@@ -15585,9 +15763,9 @@ function requireStringify() {
|
|
|
15585
15763
|
var prefix = options.addQueryPrefix === true ? "?" : "";
|
|
15586
15764
|
if (options.charsetSentinel) {
|
|
15587
15765
|
if (options.charset === "iso-8859-1") {
|
|
15588
|
-
prefix += "utf8=%26%2310003%3B
|
|
15766
|
+
prefix += "utf8=%26%2310003%3B" + options.delimiter;
|
|
15589
15767
|
} else {
|
|
15590
|
-
prefix += "utf8=%E2%9C%93
|
|
15768
|
+
prefix += "utf8=%E2%9C%93" + options.delimiter;
|
|
15591
15769
|
}
|
|
15592
15770
|
}
|
|
15593
15771
|
return joined.length > 0 ? prefix + joined : "";
|
|
@@ -15649,9 +15827,9 @@ function requireParse() {
|
|
|
15649
15827
|
var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
|
|
15650
15828
|
var parts = cleanStr.split(
|
|
15651
15829
|
options.delimiter,
|
|
15652
|
-
options.throwOnLimitExceeded ? limit + 1 : limit
|
|
15830
|
+
options.throwOnLimitExceeded && typeof limit !== "undefined" ? limit + 1 : limit
|
|
15653
15831
|
);
|
|
15654
|
-
if (options.throwOnLimitExceeded && parts.length > limit) {
|
|
15832
|
+
if (options.throwOnLimitExceeded && typeof limit !== "undefined" && parts.length > limit) {
|
|
15655
15833
|
throw new RangeError("Parameter limit exceeded. Only " + limit + " parameter" + (limit === 1 ? "" : "s") + " allowed.");
|
|
15656
15834
|
}
|
|
15657
15835
|
var skipIndex = -1;
|
|
@@ -15770,8 +15948,8 @@ function requireParse() {
|
|
|
15770
15948
|
}
|
|
15771
15949
|
return leaf;
|
|
15772
15950
|
};
|
|
15773
|
-
var splitKeyIntoSegments = function splitKeyIntoSegments2(
|
|
15774
|
-
var key = options.allowDots ?
|
|
15951
|
+
var splitKeyIntoSegments = function splitKeyIntoSegments2(originalKey, options) {
|
|
15952
|
+
var key = options.allowDots ? originalKey.replace(/\.([^.[]+)/g, "[$1]") : originalKey;
|
|
15775
15953
|
if (options.depth <= 0) {
|
|
15776
15954
|
if (!options.plainObjects && has.call(Object.prototype, key)) {
|
|
15777
15955
|
if (!options.allowPrototypes) {
|
|
@@ -15780,37 +15958,56 @@ function requireParse() {
|
|
|
15780
15958
|
}
|
|
15781
15959
|
return [key];
|
|
15782
15960
|
}
|
|
15783
|
-
var
|
|
15784
|
-
var
|
|
15785
|
-
var
|
|
15786
|
-
var parent = segment ? key.slice(0, segment.index) : key;
|
|
15787
|
-
var keys = [];
|
|
15961
|
+
var segments = [];
|
|
15962
|
+
var first = key.indexOf("[");
|
|
15963
|
+
var parent = first >= 0 ? key.slice(0, first) : key;
|
|
15788
15964
|
if (parent) {
|
|
15789
15965
|
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
15790
15966
|
if (!options.allowPrototypes) {
|
|
15791
15967
|
return;
|
|
15792
15968
|
}
|
|
15793
15969
|
}
|
|
15794
|
-
|
|
15795
|
-
}
|
|
15796
|
-
var
|
|
15797
|
-
|
|
15798
|
-
|
|
15799
|
-
|
|
15800
|
-
|
|
15801
|
-
|
|
15802
|
-
|
|
15970
|
+
segments[segments.length] = parent;
|
|
15971
|
+
}
|
|
15972
|
+
var n = key.length;
|
|
15973
|
+
var open = first;
|
|
15974
|
+
var collected = 0;
|
|
15975
|
+
while (open >= 0 && collected < options.depth) {
|
|
15976
|
+
var level = 1;
|
|
15977
|
+
var i = open + 1;
|
|
15978
|
+
var close = -1;
|
|
15979
|
+
while (i < n && close < 0) {
|
|
15980
|
+
var cu = key.charCodeAt(i);
|
|
15981
|
+
if (cu === 91) {
|
|
15982
|
+
level += 1;
|
|
15983
|
+
} else if (cu === 93) {
|
|
15984
|
+
level -= 1;
|
|
15985
|
+
if (level === 0) {
|
|
15986
|
+
close = i;
|
|
15987
|
+
}
|
|
15803
15988
|
}
|
|
15989
|
+
i += 1;
|
|
15804
15990
|
}
|
|
15805
|
-
|
|
15991
|
+
if (close < 0) {
|
|
15992
|
+
segments[segments.length] = "[" + key.slice(open) + "]";
|
|
15993
|
+
return segments;
|
|
15994
|
+
}
|
|
15995
|
+
var seg = key.slice(open, close + 1);
|
|
15996
|
+
var content = seg.slice(1, -1);
|
|
15997
|
+
if (!options.plainObjects && has.call(Object.prototype, content) && !options.allowPrototypes) {
|
|
15998
|
+
return;
|
|
15999
|
+
}
|
|
16000
|
+
segments[segments.length] = seg;
|
|
16001
|
+
collected += 1;
|
|
16002
|
+
open = key.indexOf("[", close + 1);
|
|
15806
16003
|
}
|
|
15807
|
-
if (
|
|
16004
|
+
if (open >= 0) {
|
|
15808
16005
|
if (options.strictDepth === true) {
|
|
15809
16006
|
throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true");
|
|
15810
16007
|
}
|
|
15811
|
-
|
|
16008
|
+
segments[segments.length] = "[" + key.slice(open) + "]";
|
|
15812
16009
|
}
|
|
15813
|
-
return
|
|
16010
|
+
return segments;
|
|
15814
16011
|
};
|
|
15815
16012
|
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
15816
16013
|
if (!givenKey) {
|
|
@@ -15913,21 +16110,18 @@ var hasRequiredUrlencoded;
|
|
|
15913
16110
|
function requireUrlencoded() {
|
|
15914
16111
|
if (hasRequiredUrlencoded) return urlencoded_1;
|
|
15915
16112
|
hasRequiredUrlencoded = 1;
|
|
15916
|
-
|
|
15917
|
-
|
|
15918
|
-
|
|
15919
|
-
|
|
15920
|
-
|
|
16113
|
+
const createError = requireHttpErrors();
|
|
16114
|
+
const debug = requireBrowser$1()("body-parser:urlencoded");
|
|
16115
|
+
const read = requireRead();
|
|
16116
|
+
const qs = /* @__PURE__ */ requireLib$1();
|
|
16117
|
+
const { normalizeOptions } = requireUtils$2();
|
|
15921
16118
|
urlencoded_1 = urlencoded;
|
|
15922
16119
|
function urlencoded(options) {
|
|
15923
16120
|
const normalizedOptions = normalizeOptions(options, "application/x-www-form-urlencoded");
|
|
15924
16121
|
if (normalizedOptions.defaultCharset !== "utf-8" && normalizedOptions.defaultCharset !== "iso-8859-1") {
|
|
15925
16122
|
throw new TypeError("option defaultCharset must be either utf-8 or iso-8859-1");
|
|
15926
16123
|
}
|
|
15927
|
-
|
|
15928
|
-
function parse2(body, encoding2) {
|
|
15929
|
-
return body.length ? queryparse(body, encoding2) : {};
|
|
15930
|
-
}
|
|
16124
|
+
const parse2 = createQueryParser(options);
|
|
15931
16125
|
const readOptions = {
|
|
15932
16126
|
...normalizedOptions,
|
|
15933
16127
|
// assert charset
|
|
@@ -15938,11 +16132,11 @@ function requireUrlencoded() {
|
|
|
15938
16132
|
};
|
|
15939
16133
|
}
|
|
15940
16134
|
function createQueryParser(options) {
|
|
15941
|
-
|
|
15942
|
-
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
16135
|
+
const extended = Boolean(options?.extended);
|
|
16136
|
+
let parameterLimit = options?.parameterLimit !== void 0 ? options?.parameterLimit : 1e3;
|
|
16137
|
+
const charsetSentinel = options?.charsetSentinel;
|
|
16138
|
+
const interpretNumericEntities = options?.interpretNumericEntities;
|
|
16139
|
+
const depth = extended ? options?.depth !== void 0 ? options?.depth : 32 : 0;
|
|
15946
16140
|
if (isNaN(parameterLimit) || parameterLimit < 1) {
|
|
15947
16141
|
throw new TypeError("option parameterLimit must be a positive number");
|
|
15948
16142
|
}
|
|
@@ -15952,15 +16146,16 @@ function requireUrlencoded() {
|
|
|
15952
16146
|
if (isFinite(parameterLimit)) {
|
|
15953
16147
|
parameterLimit = parameterLimit | 0;
|
|
15954
16148
|
}
|
|
15955
|
-
return function
|
|
15956
|
-
|
|
16149
|
+
return function parse2(body, encoding2) {
|
|
16150
|
+
if (!body.length) return {};
|
|
16151
|
+
const paramCount = parameterCount(body, parameterLimit);
|
|
15957
16152
|
if (paramCount === void 0) {
|
|
15958
16153
|
debug("too many parameters");
|
|
15959
16154
|
throw createError(413, "too many parameters", {
|
|
15960
16155
|
type: "parameters.too.many"
|
|
15961
16156
|
});
|
|
15962
16157
|
}
|
|
15963
|
-
|
|
16158
|
+
const arrayLimit = extended ? Math.max(100, paramCount) : paramCount;
|
|
15964
16159
|
debug("parse " + (extended ? "extended " : "") + "urlencoding");
|
|
15965
16160
|
try {
|
|
15966
16161
|
return qs.parse(body, {
|
|
@@ -16000,28 +16195,12 @@ var hasRequiredBodyParser;
|
|
|
16000
16195
|
function requireBodyParser() {
|
|
16001
16196
|
if (hasRequiredBodyParser) return bodyParser.exports;
|
|
16002
16197
|
hasRequiredBodyParser = 1;
|
|
16003
|
-
(function(module, exports
|
|
16004
|
-
exports
|
|
16005
|
-
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
|
|
16009
|
-
});
|
|
16010
|
-
Object.defineProperty(exports$1, "raw", {
|
|
16011
|
-
configurable: true,
|
|
16012
|
-
enumerable: true,
|
|
16013
|
-
get: () => requireRaw()
|
|
16014
|
-
});
|
|
16015
|
-
Object.defineProperty(exports$1, "text", {
|
|
16016
|
-
configurable: true,
|
|
16017
|
-
enumerable: true,
|
|
16018
|
-
get: () => requireText()
|
|
16019
|
-
});
|
|
16020
|
-
Object.defineProperty(exports$1, "urlencoded", {
|
|
16021
|
-
configurable: true,
|
|
16022
|
-
enumerable: true,
|
|
16023
|
-
get: () => requireUrlencoded()
|
|
16024
|
-
});
|
|
16198
|
+
(function(module, exports) {
|
|
16199
|
+
exports = module.exports = bodyParser2;
|
|
16200
|
+
exports.json = requireJson();
|
|
16201
|
+
exports.raw = requireRaw();
|
|
16202
|
+
exports.text = requireText();
|
|
16203
|
+
exports.urlencoded = requireUrlencoded();
|
|
16025
16204
|
function bodyParser2() {
|
|
16026
16205
|
throw new Error("The bodyParser() generic has been split into individual middleware to use instead.");
|
|
16027
16206
|
}
|
|
@@ -16423,6 +16602,110 @@ function requireView() {
|
|
|
16423
16602
|
return view;
|
|
16424
16603
|
}
|
|
16425
16604
|
var utils = {};
|
|
16605
|
+
var contentType = {};
|
|
16606
|
+
var hasRequiredContentType;
|
|
16607
|
+
function requireContentType() {
|
|
16608
|
+
if (hasRequiredContentType) return contentType;
|
|
16609
|
+
hasRequiredContentType = 1;
|
|
16610
|
+
var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;
|
|
16611
|
+
var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;
|
|
16612
|
+
var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
16613
|
+
var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g;
|
|
16614
|
+
var QUOTE_REGEXP = /([\\"])/g;
|
|
16615
|
+
var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
16616
|
+
contentType.format = format;
|
|
16617
|
+
contentType.parse = parse2;
|
|
16618
|
+
function format(obj) {
|
|
16619
|
+
if (!obj || typeof obj !== "object") {
|
|
16620
|
+
throw new TypeError("argument obj is required");
|
|
16621
|
+
}
|
|
16622
|
+
var parameters = obj.parameters;
|
|
16623
|
+
var type2 = obj.type;
|
|
16624
|
+
if (!type2 || !TYPE_REGEXP.test(type2)) {
|
|
16625
|
+
throw new TypeError("invalid type");
|
|
16626
|
+
}
|
|
16627
|
+
var string = type2;
|
|
16628
|
+
if (parameters && typeof parameters === "object") {
|
|
16629
|
+
var param;
|
|
16630
|
+
var params = Object.keys(parameters).sort();
|
|
16631
|
+
for (var i = 0; i < params.length; i++) {
|
|
16632
|
+
param = params[i];
|
|
16633
|
+
if (!TOKEN_REGEXP.test(param)) {
|
|
16634
|
+
throw new TypeError("invalid parameter name");
|
|
16635
|
+
}
|
|
16636
|
+
string += "; " + param + "=" + qstring(parameters[param]);
|
|
16637
|
+
}
|
|
16638
|
+
}
|
|
16639
|
+
return string;
|
|
16640
|
+
}
|
|
16641
|
+
function parse2(string) {
|
|
16642
|
+
if (!string) {
|
|
16643
|
+
throw new TypeError("argument string is required");
|
|
16644
|
+
}
|
|
16645
|
+
var header = typeof string === "object" ? getcontenttype(string) : string;
|
|
16646
|
+
if (typeof header !== "string") {
|
|
16647
|
+
throw new TypeError("argument string is required to be a string");
|
|
16648
|
+
}
|
|
16649
|
+
var index = header.indexOf(";");
|
|
16650
|
+
var type2 = index !== -1 ? header.slice(0, index).trim() : header.trim();
|
|
16651
|
+
if (!TYPE_REGEXP.test(type2)) {
|
|
16652
|
+
throw new TypeError("invalid media type");
|
|
16653
|
+
}
|
|
16654
|
+
var obj = new ContentType(type2.toLowerCase());
|
|
16655
|
+
if (index !== -1) {
|
|
16656
|
+
var key;
|
|
16657
|
+
var match;
|
|
16658
|
+
var value;
|
|
16659
|
+
PARAM_REGEXP.lastIndex = index;
|
|
16660
|
+
while (match = PARAM_REGEXP.exec(header)) {
|
|
16661
|
+
if (match.index !== index) {
|
|
16662
|
+
throw new TypeError("invalid parameter format");
|
|
16663
|
+
}
|
|
16664
|
+
index += match[0].length;
|
|
16665
|
+
key = match[1].toLowerCase();
|
|
16666
|
+
value = match[2];
|
|
16667
|
+
if (value.charCodeAt(0) === 34) {
|
|
16668
|
+
value = value.slice(1, -1);
|
|
16669
|
+
if (value.indexOf("\\") !== -1) {
|
|
16670
|
+
value = value.replace(QESC_REGEXP, "$1");
|
|
16671
|
+
}
|
|
16672
|
+
}
|
|
16673
|
+
obj.parameters[key] = value;
|
|
16674
|
+
}
|
|
16675
|
+
if (index !== header.length) {
|
|
16676
|
+
throw new TypeError("invalid parameter format");
|
|
16677
|
+
}
|
|
16678
|
+
}
|
|
16679
|
+
return obj;
|
|
16680
|
+
}
|
|
16681
|
+
function getcontenttype(obj) {
|
|
16682
|
+
var header;
|
|
16683
|
+
if (typeof obj.getHeader === "function") {
|
|
16684
|
+
header = obj.getHeader("content-type");
|
|
16685
|
+
} else if (typeof obj.headers === "object") {
|
|
16686
|
+
header = obj.headers && obj.headers["content-type"];
|
|
16687
|
+
}
|
|
16688
|
+
if (typeof header !== "string") {
|
|
16689
|
+
throw new TypeError("content-type header is missing from object");
|
|
16690
|
+
}
|
|
16691
|
+
return header;
|
|
16692
|
+
}
|
|
16693
|
+
function qstring(val) {
|
|
16694
|
+
var str = String(val);
|
|
16695
|
+
if (TOKEN_REGEXP.test(str)) {
|
|
16696
|
+
return str;
|
|
16697
|
+
}
|
|
16698
|
+
if (str.length > 0 && !TEXT_REGEXP.test(str)) {
|
|
16699
|
+
throw new TypeError("invalid parameter value");
|
|
16700
|
+
}
|
|
16701
|
+
return '"' + str.replace(QUOTE_REGEXP, "\\$1") + '"';
|
|
16702
|
+
}
|
|
16703
|
+
function ContentType(type2) {
|
|
16704
|
+
this.parameters = /* @__PURE__ */ Object.create(null);
|
|
16705
|
+
this.type = type2;
|
|
16706
|
+
}
|
|
16707
|
+
return contentType;
|
|
16708
|
+
}
|
|
16426
16709
|
var etag_1;
|
|
16427
16710
|
var hasRequiredEtag;
|
|
16428
16711
|
function requireEtag() {
|
|
@@ -17293,7 +17576,7 @@ var hasRequiredUtils;
|
|
|
17293
17576
|
function requireUtils() {
|
|
17294
17577
|
if (hasRequiredUtils) return utils;
|
|
17295
17578
|
hasRequiredUtils = 1;
|
|
17296
|
-
(function(exports
|
|
17579
|
+
(function(exports) {
|
|
17297
17580
|
var { METHODS } = require$$2$2;
|
|
17298
17581
|
var contentType2 = requireContentType();
|
|
17299
17582
|
var etag = requireEtag();
|
|
@@ -17302,14 +17585,14 @@ function requireUtils() {
|
|
|
17302
17585
|
var qs = /* @__PURE__ */ requireLib$1();
|
|
17303
17586
|
var querystring = require$$6$1;
|
|
17304
17587
|
const { Buffer: Buffer2 } = require$$7$1;
|
|
17305
|
-
exports
|
|
17306
|
-
exports
|
|
17307
|
-
exports
|
|
17308
|
-
exports
|
|
17588
|
+
exports.methods = METHODS.map((method) => method.toLowerCase());
|
|
17589
|
+
exports.etag = createETagGenerator({ weak: false });
|
|
17590
|
+
exports.wetag = createETagGenerator({ weak: true });
|
|
17591
|
+
exports.normalizeType = function(type2) {
|
|
17309
17592
|
return ~type2.indexOf("/") ? acceptParams(type2) : { value: mime.lookup(type2) || "application/octet-stream", params: {} };
|
|
17310
17593
|
};
|
|
17311
|
-
exports
|
|
17312
|
-
return types.map(exports
|
|
17594
|
+
exports.normalizeTypes = function(types) {
|
|
17595
|
+
return types.map(exports.normalizeType);
|
|
17313
17596
|
};
|
|
17314
17597
|
function acceptParams(str) {
|
|
17315
17598
|
var length = str.length;
|
|
@@ -17336,7 +17619,7 @@ function requireUtils() {
|
|
|
17336
17619
|
}
|
|
17337
17620
|
return ret;
|
|
17338
17621
|
}
|
|
17339
|
-
exports
|
|
17622
|
+
exports.compileETag = function(val) {
|
|
17340
17623
|
var fn;
|
|
17341
17624
|
if (typeof val === "function") {
|
|
17342
17625
|
return val;
|
|
@@ -17344,19 +17627,19 @@ function requireUtils() {
|
|
|
17344
17627
|
switch (val) {
|
|
17345
17628
|
case true:
|
|
17346
17629
|
case "weak":
|
|
17347
|
-
fn = exports
|
|
17630
|
+
fn = exports.wetag;
|
|
17348
17631
|
break;
|
|
17349
17632
|
case false:
|
|
17350
17633
|
break;
|
|
17351
17634
|
case "strong":
|
|
17352
|
-
fn = exports
|
|
17635
|
+
fn = exports.etag;
|
|
17353
17636
|
break;
|
|
17354
17637
|
default:
|
|
17355
17638
|
throw new TypeError("unknown value for etag function: " + val);
|
|
17356
17639
|
}
|
|
17357
17640
|
return fn;
|
|
17358
17641
|
};
|
|
17359
|
-
exports
|
|
17642
|
+
exports.compileQueryParser = function compileQueryParser(val) {
|
|
17360
17643
|
var fn;
|
|
17361
17644
|
if (typeof val === "function") {
|
|
17362
17645
|
return val;
|
|
@@ -17376,7 +17659,7 @@ function requireUtils() {
|
|
|
17376
17659
|
}
|
|
17377
17660
|
return fn;
|
|
17378
17661
|
};
|
|
17379
|
-
exports
|
|
17662
|
+
exports.compileTrust = function(val) {
|
|
17380
17663
|
if (typeof val === "function") return val;
|
|
17381
17664
|
if (val === true) {
|
|
17382
17665
|
return function() {
|
|
@@ -17395,7 +17678,7 @@ function requireUtils() {
|
|
|
17395
17678
|
}
|
|
17396
17679
|
return proxyaddr.compile(val || []);
|
|
17397
17680
|
};
|
|
17398
|
-
exports
|
|
17681
|
+
exports.setCharset = function setCharset(type2, charset2) {
|
|
17399
17682
|
if (!type2 || !charset2) {
|
|
17400
17683
|
return type2;
|
|
17401
17684
|
}
|
|
@@ -17523,7 +17806,6 @@ function requireDist() {
|
|
|
17523
17806
|
const ID_START = /^[$_\p{ID_Start}]$/u;
|
|
17524
17807
|
const ID_CONTINUE = /^[$\u200c\u200d\p{ID_Continue}]$/u;
|
|
17525
17808
|
const ID = /^[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*$/u;
|
|
17526
|
-
const SIMPLE_TOKENS = "{}()[]+?!";
|
|
17527
17809
|
function escapeText(str) {
|
|
17528
17810
|
return str.replace(/[{}()\[\]+?!:*\\]/g, "\\$&");
|
|
17529
17811
|
}
|
|
@@ -17551,96 +17833,90 @@ function requireDist() {
|
|
|
17551
17833
|
function parse2(str, options = {}) {
|
|
17552
17834
|
const { encodePath = NOOP_VALUE } = options;
|
|
17553
17835
|
const chars = [...str];
|
|
17554
|
-
const tokens = [];
|
|
17555
17836
|
let index = 0;
|
|
17556
|
-
|
|
17557
|
-
function name() {
|
|
17558
|
-
let value = "";
|
|
17559
|
-
if (ID_START.test(chars[index])) {
|
|
17560
|
-
do {
|
|
17561
|
-
value += chars[index++];
|
|
17562
|
-
} while (ID_CONTINUE.test(chars[index]));
|
|
17563
|
-
} else if (chars[index] === '"') {
|
|
17564
|
-
let quoteStart = index;
|
|
17565
|
-
while (index < chars.length) {
|
|
17566
|
-
if (chars[++index] === '"') {
|
|
17567
|
-
index++;
|
|
17568
|
-
quoteStart = 0;
|
|
17569
|
-
break;
|
|
17570
|
-
}
|
|
17571
|
-
if (chars[index] === "\\")
|
|
17572
|
-
index++;
|
|
17573
|
-
value += chars[index];
|
|
17574
|
-
}
|
|
17575
|
-
if (quoteStart) {
|
|
17576
|
-
throw new PathError(`Unterminated quote at index ${quoteStart}`, str);
|
|
17577
|
-
}
|
|
17578
|
-
}
|
|
17579
|
-
if (!value) {
|
|
17580
|
-
throw new PathError(`Missing parameter name at index ${index}`, str);
|
|
17581
|
-
}
|
|
17582
|
-
return value;
|
|
17583
|
-
}
|
|
17584
|
-
while (index < chars.length) {
|
|
17585
|
-
const value = chars[index++];
|
|
17586
|
-
if (SIMPLE_TOKENS.includes(value)) {
|
|
17587
|
-
tokens.push({ type: value, index, value });
|
|
17588
|
-
} else if (value === "\\") {
|
|
17589
|
-
tokens.push({ type: "escape", index, value: chars[index++] });
|
|
17590
|
-
} else if (value === ":") {
|
|
17591
|
-
tokens.push({ type: "param", index, value: name() });
|
|
17592
|
-
} else if (value === "*") {
|
|
17593
|
-
tokens.push({ type: "wildcard", index, value: name() });
|
|
17594
|
-
} else {
|
|
17595
|
-
tokens.push({ type: "char", index, value });
|
|
17596
|
-
}
|
|
17597
|
-
}
|
|
17598
|
-
tokens.push({ type: "end", index, value: "" });
|
|
17599
|
-
function consumeUntil(endType) {
|
|
17837
|
+
function consumeUntil(end) {
|
|
17600
17838
|
const output = [];
|
|
17601
|
-
|
|
17602
|
-
|
|
17603
|
-
if (
|
|
17604
|
-
|
|
17605
|
-
|
|
17606
|
-
|
|
17607
|
-
|
|
17608
|
-
|
|
17609
|
-
|
|
17610
|
-
|
|
17839
|
+
let path = "";
|
|
17840
|
+
function writePath() {
|
|
17841
|
+
if (!path)
|
|
17842
|
+
return;
|
|
17843
|
+
output.push({
|
|
17844
|
+
type: "text",
|
|
17845
|
+
value: encodePath(path)
|
|
17846
|
+
});
|
|
17847
|
+
path = "";
|
|
17848
|
+
}
|
|
17849
|
+
while (index < chars.length) {
|
|
17850
|
+
const value = chars[index++];
|
|
17851
|
+
if (value === end) {
|
|
17852
|
+
writePath();
|
|
17853
|
+
return output;
|
|
17854
|
+
}
|
|
17855
|
+
if (value === "\\") {
|
|
17856
|
+
if (index === chars.length) {
|
|
17857
|
+
throw new PathError(`Unexpected end after \\ at index ${index}`, str);
|
|
17611
17858
|
}
|
|
17612
|
-
|
|
17613
|
-
type: "text",
|
|
17614
|
-
value: encodePath(path)
|
|
17615
|
-
});
|
|
17859
|
+
path += chars[index++];
|
|
17616
17860
|
continue;
|
|
17617
17861
|
}
|
|
17618
|
-
if (
|
|
17619
|
-
|
|
17620
|
-
|
|
17621
|
-
|
|
17622
|
-
|
|
17862
|
+
if (value === ":" || value === "*") {
|
|
17863
|
+
const type2 = value === ":" ? "param" : "wildcard";
|
|
17864
|
+
let name = "";
|
|
17865
|
+
if (ID_START.test(chars[index])) {
|
|
17866
|
+
do {
|
|
17867
|
+
name += chars[index++];
|
|
17868
|
+
} while (ID_CONTINUE.test(chars[index]));
|
|
17869
|
+
} else if (chars[index] === '"') {
|
|
17870
|
+
let quoteStart = index;
|
|
17871
|
+
while (index < chars.length) {
|
|
17872
|
+
if (chars[++index] === '"') {
|
|
17873
|
+
index++;
|
|
17874
|
+
quoteStart = 0;
|
|
17875
|
+
break;
|
|
17876
|
+
}
|
|
17877
|
+
if (chars[index] === "\\")
|
|
17878
|
+
index++;
|
|
17879
|
+
name += chars[index];
|
|
17880
|
+
}
|
|
17881
|
+
if (quoteStart) {
|
|
17882
|
+
throw new PathError(`Unterminated quote at index ${quoteStart}`, str);
|
|
17883
|
+
}
|
|
17884
|
+
}
|
|
17885
|
+
if (!name) {
|
|
17886
|
+
throw new PathError(`Missing parameter name at index ${index}`, str);
|
|
17887
|
+
}
|
|
17888
|
+
writePath();
|
|
17889
|
+
output.push({ type: type2, name });
|
|
17623
17890
|
continue;
|
|
17624
17891
|
}
|
|
17625
|
-
if (
|
|
17892
|
+
if (value === "{") {
|
|
17893
|
+
writePath();
|
|
17626
17894
|
output.push({
|
|
17627
17895
|
type: "group",
|
|
17628
17896
|
tokens: consumeUntil("}")
|
|
17629
17897
|
});
|
|
17630
17898
|
continue;
|
|
17631
17899
|
}
|
|
17632
|
-
|
|
17900
|
+
if (value === "}" || value === "(" || value === ")" || value === "[" || value === "]" || value === "+" || value === "?" || value === "!") {
|
|
17901
|
+
throw new PathError(`Unexpected ${value} at index ${index - 1}`, str);
|
|
17902
|
+
}
|
|
17903
|
+
path += value;
|
|
17904
|
+
}
|
|
17905
|
+
if (end) {
|
|
17906
|
+
throw new PathError(`Unexpected end at index ${index}, expected ${end}`, str);
|
|
17633
17907
|
}
|
|
17908
|
+
writePath();
|
|
17634
17909
|
return output;
|
|
17635
17910
|
}
|
|
17636
|
-
return new TokenData(consumeUntil("
|
|
17911
|
+
return new TokenData(consumeUntil(""), str);
|
|
17637
17912
|
}
|
|
17638
17913
|
function compile(path, options = {}) {
|
|
17639
17914
|
const { encode = encodeURIComponent, delimiter = DEFAULT_DELIMITER } = options;
|
|
17640
17915
|
const data = typeof path === "object" ? path : parse2(path, options);
|
|
17641
17916
|
const fn = tokensToFunction(data.tokens, delimiter, encode);
|
|
17642
17917
|
return function path2(params = {}) {
|
|
17643
|
-
const
|
|
17918
|
+
const missing = [];
|
|
17919
|
+
const path3 = fn(params, missing);
|
|
17644
17920
|
if (missing.length) {
|
|
17645
17921
|
throw new TypeError(`Missing parameters: ${missing.join(", ")}`);
|
|
17646
17922
|
}
|
|
@@ -17649,55 +17925,61 @@ function requireDist() {
|
|
|
17649
17925
|
}
|
|
17650
17926
|
function tokensToFunction(tokens, delimiter, encode) {
|
|
17651
17927
|
const encoders = tokens.map((token) => tokenToFunction(token, delimiter, encode));
|
|
17652
|
-
return (data) => {
|
|
17653
|
-
|
|
17928
|
+
return (data, missing) => {
|
|
17929
|
+
let result = "";
|
|
17654
17930
|
for (const encoder of encoders) {
|
|
17655
|
-
|
|
17656
|
-
result[0] += value;
|
|
17657
|
-
result.push(...extras);
|
|
17931
|
+
result += encoder(data, missing);
|
|
17658
17932
|
}
|
|
17659
17933
|
return result;
|
|
17660
17934
|
};
|
|
17661
17935
|
}
|
|
17662
17936
|
function tokenToFunction(token, delimiter, encode) {
|
|
17663
17937
|
if (token.type === "text")
|
|
17664
|
-
return () =>
|
|
17938
|
+
return () => token.value;
|
|
17665
17939
|
if (token.type === "group") {
|
|
17666
17940
|
const fn = tokensToFunction(token.tokens, delimiter, encode);
|
|
17667
|
-
return (data) => {
|
|
17668
|
-
const
|
|
17669
|
-
|
|
17670
|
-
|
|
17671
|
-
|
|
17941
|
+
return (data, missing) => {
|
|
17942
|
+
const len = missing.length;
|
|
17943
|
+
const value = fn(data, missing);
|
|
17944
|
+
if (missing.length === len)
|
|
17945
|
+
return value;
|
|
17946
|
+
missing.length = len;
|
|
17947
|
+
return "";
|
|
17672
17948
|
};
|
|
17673
17949
|
}
|
|
17674
17950
|
const encodeValue = encode || NOOP_VALUE;
|
|
17675
17951
|
if (token.type === "wildcard" && encode !== false) {
|
|
17676
|
-
return (data) => {
|
|
17952
|
+
return (data, missing) => {
|
|
17677
17953
|
const value = data[token.name];
|
|
17678
|
-
if (value == null)
|
|
17679
|
-
|
|
17954
|
+
if (value == null) {
|
|
17955
|
+
missing.push(token.name);
|
|
17956
|
+
return "";
|
|
17957
|
+
}
|
|
17680
17958
|
if (!Array.isArray(value) || value.length === 0) {
|
|
17681
17959
|
throw new TypeError(`Expected "${token.name}" to be a non-empty array`);
|
|
17682
17960
|
}
|
|
17683
|
-
|
|
17684
|
-
|
|
17685
|
-
|
|
17686
|
-
|
|
17687
|
-
|
|
17688
|
-
|
|
17689
|
-
|
|
17690
|
-
|
|
17961
|
+
let result = "";
|
|
17962
|
+
for (let i = 0; i < value.length; i++) {
|
|
17963
|
+
if (typeof value[i] !== "string") {
|
|
17964
|
+
throw new TypeError(`Expected "${token.name}/${i}" to be a string`);
|
|
17965
|
+
}
|
|
17966
|
+
if (i > 0)
|
|
17967
|
+
result += delimiter;
|
|
17968
|
+
result += encodeValue(value[i]);
|
|
17969
|
+
}
|
|
17970
|
+
return result;
|
|
17691
17971
|
};
|
|
17692
17972
|
}
|
|
17693
|
-
return (data) => {
|
|
17973
|
+
return (data, missing) => {
|
|
17694
17974
|
const value = data[token.name];
|
|
17695
|
-
if (value == null)
|
|
17696
|
-
|
|
17975
|
+
if (value == null) {
|
|
17976
|
+
missing.push(token.name);
|
|
17977
|
+
return "";
|
|
17978
|
+
}
|
|
17697
17979
|
if (typeof value !== "string") {
|
|
17698
17980
|
throw new TypeError(`Expected "${token.name}" to be a string`);
|
|
17699
17981
|
}
|
|
17700
|
-
return
|
|
17982
|
+
return encodeValue(value);
|
|
17701
17983
|
};
|
|
17702
17984
|
}
|
|
17703
17985
|
function match(path, options = {}) {
|
|
@@ -17729,24 +18011,27 @@ function requireDist() {
|
|
|
17729
18011
|
function pathToRegexp(path, options = {}) {
|
|
17730
18012
|
const { delimiter = DEFAULT_DELIMITER, end = true, sensitive = false, trailing = true } = options;
|
|
17731
18013
|
const keys = [];
|
|
17732
|
-
|
|
17733
|
-
const paths = [path];
|
|
18014
|
+
let source = "";
|
|
17734
18015
|
let combinations = 0;
|
|
17735
|
-
|
|
17736
|
-
const path2 = paths.shift();
|
|
18016
|
+
function process2(path2) {
|
|
17737
18017
|
if (Array.isArray(path2)) {
|
|
17738
|
-
|
|
17739
|
-
|
|
18018
|
+
for (const p of path2)
|
|
18019
|
+
process2(p);
|
|
18020
|
+
return;
|
|
17740
18021
|
}
|
|
17741
18022
|
const data = typeof path2 === "object" ? path2 : parse2(path2, options);
|
|
17742
18023
|
flatten(data.tokens, 0, [], (tokens) => {
|
|
17743
|
-
if (combinations
|
|
18024
|
+
if (combinations >= 256) {
|
|
17744
18025
|
throw new PathError("Too many path combinations", data.originalPath);
|
|
17745
18026
|
}
|
|
17746
|
-
|
|
18027
|
+
if (combinations > 0)
|
|
18028
|
+
source += "|";
|
|
18029
|
+
source += toRegExpSource(tokens, delimiter, keys, data.originalPath);
|
|
18030
|
+
combinations++;
|
|
17747
18031
|
});
|
|
17748
18032
|
}
|
|
17749
|
-
|
|
18033
|
+
process2(path);
|
|
18034
|
+
let pattern = `^(?:${source})`;
|
|
17750
18035
|
if (trailing)
|
|
17751
18036
|
pattern += "(?:" + escape2(delimiter) + "$)?";
|
|
17752
18037
|
pattern += end ? "$" : "(?=" + escape2(delimiter) + "|$)";
|
|
@@ -17756,7 +18041,9 @@ function requireDist() {
|
|
|
17756
18041
|
while (index < tokens.length) {
|
|
17757
18042
|
const token = tokens[index++];
|
|
17758
18043
|
if (token.type === "group") {
|
|
17759
|
-
|
|
18044
|
+
const len = result.length;
|
|
18045
|
+
flatten(token.tokens, 0, result, (seq) => flatten(tokens, index, seq, callback));
|
|
18046
|
+
result.length = len;
|
|
17760
18047
|
continue;
|
|
17761
18048
|
}
|
|
17762
18049
|
result.push(token);
|
|
@@ -18542,7 +18829,7 @@ var hasRequiredApplication;
|
|
|
18542
18829
|
function requireApplication() {
|
|
18543
18830
|
if (hasRequiredApplication) return application.exports;
|
|
18544
18831
|
hasRequiredApplication = 1;
|
|
18545
|
-
(function(module, exports
|
|
18832
|
+
(function(module, exports) {
|
|
18546
18833
|
var finalhandler = requireFinalhandler();
|
|
18547
18834
|
var debug = requireBrowser$1()("express:application");
|
|
18548
18835
|
var View = requireView();
|
|
@@ -19702,10 +19989,8 @@ function requireContentDisposition() {
|
|
|
19702
19989
|
hasRequiredContentDisposition = 1;
|
|
19703
19990
|
contentDisposition.exports = contentDisposition$1;
|
|
19704
19991
|
contentDisposition.exports.parse = parse2;
|
|
19705
|
-
|
|
19992
|
+
const utf8Decoder = new TextDecoder("utf-8");
|
|
19706
19993
|
var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g;
|
|
19707
|
-
var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/;
|
|
19708
|
-
var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g;
|
|
19709
19994
|
var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g;
|
|
19710
19995
|
var QESC_REGEXP = /\\([\u0000-\u007f])/g;
|
|
19711
19996
|
var QUOTE_REGEXP = /([\\"])/g;
|
|
@@ -19741,7 +20026,7 @@ function requireContentDisposition() {
|
|
|
19741
20026
|
var isQuotedString = TEXT_REGEXP.test(name);
|
|
19742
20027
|
var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name) : basename(fallback);
|
|
19743
20028
|
var hasFallback = typeof fallbackName === "string" && fallbackName !== name;
|
|
19744
|
-
if (hasFallback || !isQuotedString ||
|
|
20029
|
+
if (hasFallback || !isQuotedString || hasHexEscape(name)) {
|
|
19745
20030
|
params["filename*"] = name;
|
|
19746
20031
|
}
|
|
19747
20032
|
if (isQuotedString || hasFallback) {
|
|
@@ -19768,26 +20053,32 @@ function requireContentDisposition() {
|
|
|
19768
20053
|
return string;
|
|
19769
20054
|
}
|
|
19770
20055
|
function decodefield(str) {
|
|
19771
|
-
|
|
20056
|
+
const match = EXT_VALUE_REGEXP.exec(str);
|
|
19772
20057
|
if (!match) {
|
|
19773
20058
|
throw new TypeError("invalid extended field value");
|
|
19774
20059
|
}
|
|
19775
|
-
|
|
19776
|
-
|
|
19777
|
-
var value;
|
|
19778
|
-
var binary = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode);
|
|
20060
|
+
const charset2 = match[1].toLowerCase();
|
|
20061
|
+
const encoded = match[2];
|
|
19779
20062
|
switch (charset2) {
|
|
19780
|
-
case "iso-8859-1":
|
|
19781
|
-
|
|
19782
|
-
|
|
20063
|
+
case "iso-8859-1": {
|
|
20064
|
+
const binary = decodeHexEscapes(encoded);
|
|
20065
|
+
return getlatin1(binary);
|
|
20066
|
+
}
|
|
19783
20067
|
case "utf-8":
|
|
19784
|
-
case "utf8":
|
|
19785
|
-
|
|
19786
|
-
|
|
19787
|
-
|
|
19788
|
-
|
|
20068
|
+
case "utf8": {
|
|
20069
|
+
try {
|
|
20070
|
+
return decodeURIComponent(encoded);
|
|
20071
|
+
} catch {
|
|
20072
|
+
const binary = decodeHexEscapes(encoded);
|
|
20073
|
+
const bytes2 = new Uint8Array(binary.length);
|
|
20074
|
+
for (let idx = 0; idx < binary.length; idx++) {
|
|
20075
|
+
bytes2[idx] = binary.charCodeAt(idx);
|
|
20076
|
+
}
|
|
20077
|
+
return utf8Decoder.decode(bytes2);
|
|
20078
|
+
}
|
|
20079
|
+
}
|
|
19789
20080
|
}
|
|
19790
|
-
|
|
20081
|
+
throw new TypeError("unsupported charset in extended field");
|
|
19791
20082
|
}
|
|
19792
20083
|
function getlatin1(val) {
|
|
19793
20084
|
return String(val).replace(NON_LATIN1_REGEXP, "?");
|
|
@@ -19837,9 +20128,6 @@ function requireContentDisposition() {
|
|
|
19837
20128
|
}
|
|
19838
20129
|
return new ContentDisposition(type2, params);
|
|
19839
20130
|
}
|
|
19840
|
-
function pdecode(str, hex) {
|
|
19841
|
-
return String.fromCharCode(parseInt(hex, 16));
|
|
19842
|
-
}
|
|
19843
20131
|
function pencode(char) {
|
|
19844
20132
|
return "%" + String(char).charCodeAt(0).toString(16).toUpperCase();
|
|
19845
20133
|
}
|
|
@@ -19856,6 +20144,51 @@ function requireContentDisposition() {
|
|
|
19856
20144
|
this.type = type2;
|
|
19857
20145
|
this.parameters = parameters;
|
|
19858
20146
|
}
|
|
20147
|
+
function basename(path) {
|
|
20148
|
+
const normalized = path.replaceAll("\\", "/");
|
|
20149
|
+
let end = normalized.length;
|
|
20150
|
+
while (end > 0 && normalized[end - 1] === "/") {
|
|
20151
|
+
end--;
|
|
20152
|
+
}
|
|
20153
|
+
if (end === 0) {
|
|
20154
|
+
return "";
|
|
20155
|
+
}
|
|
20156
|
+
let start = end - 1;
|
|
20157
|
+
while (start >= 0 && normalized[start] !== "/") {
|
|
20158
|
+
start--;
|
|
20159
|
+
}
|
|
20160
|
+
return normalized.slice(start + 1, end);
|
|
20161
|
+
}
|
|
20162
|
+
function isHexDigit(char) {
|
|
20163
|
+
const code = char.charCodeAt(0);
|
|
20164
|
+
return code >= 48 && code <= 57 || // 0-9
|
|
20165
|
+
code >= 65 && code <= 70 || // A-F
|
|
20166
|
+
code >= 97 && code <= 102;
|
|
20167
|
+
}
|
|
20168
|
+
function hasHexEscape(str) {
|
|
20169
|
+
const maxIndex = str.length - 3;
|
|
20170
|
+
let lastIndex = -1;
|
|
20171
|
+
while ((lastIndex = str.indexOf("%", lastIndex + 1)) !== -1 && lastIndex <= maxIndex) {
|
|
20172
|
+
if (isHexDigit(str[lastIndex + 1]) && isHexDigit(str[lastIndex + 2])) {
|
|
20173
|
+
return true;
|
|
20174
|
+
}
|
|
20175
|
+
}
|
|
20176
|
+
return false;
|
|
20177
|
+
}
|
|
20178
|
+
function decodeHexEscapes(str) {
|
|
20179
|
+
const firstEscape = str.indexOf("%");
|
|
20180
|
+
if (firstEscape === -1) return str;
|
|
20181
|
+
let result = str.slice(0, firstEscape);
|
|
20182
|
+
for (let idx = firstEscape; idx < str.length; idx++) {
|
|
20183
|
+
if (str[idx] === "%" && idx + 2 < str.length && isHexDigit(str[idx + 1]) && isHexDigit(str[idx + 2])) {
|
|
20184
|
+
result += String.fromCharCode(Number.parseInt(str[idx + 1] + str[idx + 2], 16));
|
|
20185
|
+
idx += 2;
|
|
20186
|
+
} else {
|
|
20187
|
+
result += str[idx];
|
|
20188
|
+
}
|
|
20189
|
+
}
|
|
20190
|
+
return result;
|
|
20191
|
+
}
|
|
19859
20192
|
return contentDisposition.exports;
|
|
19860
20193
|
}
|
|
19861
20194
|
var cookieSignature = {};
|
|
@@ -19863,17 +20196,17 @@ var hasRequiredCookieSignature;
|
|
|
19863
20196
|
function requireCookieSignature() {
|
|
19864
20197
|
if (hasRequiredCookieSignature) return cookieSignature;
|
|
19865
20198
|
hasRequiredCookieSignature = 1;
|
|
19866
|
-
(function(exports
|
|
20199
|
+
(function(exports) {
|
|
19867
20200
|
var crypto = require$$0$6;
|
|
19868
|
-
exports
|
|
20201
|
+
exports.sign = function(val, secret) {
|
|
19869
20202
|
if ("string" != typeof val) throw new TypeError("Cookie value must be provided as a string.");
|
|
19870
20203
|
if (null == secret) throw new TypeError("Secret key must be provided.");
|
|
19871
20204
|
return val + "." + crypto.createHmac("sha256", secret).update(val).digest("base64").replace(/\=+$/, "");
|
|
19872
20205
|
};
|
|
19873
|
-
exports
|
|
20206
|
+
exports.unsign = function(input, secret) {
|
|
19874
20207
|
if ("string" != typeof input) throw new TypeError("Signed cookie string must be provided.");
|
|
19875
20208
|
if (null == secret) throw new TypeError("Secret key must be provided.");
|
|
19876
|
-
var tentativeValue = input.slice(0, input.lastIndexOf(".")), expectedInput = exports
|
|
20209
|
+
var tentativeValue = input.slice(0, input.lastIndexOf(".")), expectedInput = exports.sign(tentativeValue, secret), expectedBuffer = Buffer.from(expectedInput), inputBuffer = Buffer.from(input);
|
|
19877
20210
|
return expectedBuffer.length === inputBuffer.length && crypto.timingSafeEqual(expectedBuffer, inputBuffer) ? tentativeValue : false;
|
|
19878
20211
|
};
|
|
19879
20212
|
})(cookieSignature);
|
|
@@ -21179,7 +21512,7 @@ var hasRequiredExpress$1;
|
|
|
21179
21512
|
function requireExpress$1() {
|
|
21180
21513
|
if (hasRequiredExpress$1) return express$1.exports;
|
|
21181
21514
|
hasRequiredExpress$1 = 1;
|
|
21182
|
-
(function(module, exports
|
|
21515
|
+
(function(module, exports) {
|
|
21183
21516
|
var bodyParser2 = requireBodyParser();
|
|
21184
21517
|
var EventEmitter = require$$1$5.EventEmitter;
|
|
21185
21518
|
var mixin = /* @__PURE__ */ requireMergeDescriptors();
|
|
@@ -21187,7 +21520,7 @@ function requireExpress$1() {
|
|
|
21187
21520
|
var Router = requireRouter();
|
|
21188
21521
|
var req = requireRequest();
|
|
21189
21522
|
var res = requireResponse();
|
|
21190
|
-
exports
|
|
21523
|
+
exports = module.exports = createApplication;
|
|
21191
21524
|
function createApplication() {
|
|
21192
21525
|
var app = function(req2, res2, next) {
|
|
21193
21526
|
app.handle(req2, res2, next);
|
|
@@ -21203,16 +21536,16 @@ function requireExpress$1() {
|
|
|
21203
21536
|
app.init();
|
|
21204
21537
|
return app;
|
|
21205
21538
|
}
|
|
21206
|
-
exports
|
|
21207
|
-
exports
|
|
21208
|
-
exports
|
|
21209
|
-
exports
|
|
21210
|
-
exports
|
|
21211
|
-
exports
|
|
21212
|
-
exports
|
|
21213
|
-
exports
|
|
21214
|
-
exports
|
|
21215
|
-
exports
|
|
21539
|
+
exports.application = proto;
|
|
21540
|
+
exports.request = req;
|
|
21541
|
+
exports.response = res;
|
|
21542
|
+
exports.Route = Router.Route;
|
|
21543
|
+
exports.Router = Router;
|
|
21544
|
+
exports.json = bodyParser2.json;
|
|
21545
|
+
exports.raw = bodyParser2.raw;
|
|
21546
|
+
exports.static = requireServeStatic();
|
|
21547
|
+
exports.text = bodyParser2.text;
|
|
21548
|
+
exports.urlencoded = bodyParser2.urlencoded;
|
|
21216
21549
|
})(express$1, express$1.exports);
|
|
21217
21550
|
return express$1.exports;
|
|
21218
21551
|
}
|