@strkfarm/sdk 1.0.16 → 1.0.17
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/cli.js +18 -5
- package/dist/cli.mjs +18 -11
- package/dist/index.browser.global.js +111 -2348
- package/dist/index.browser.mjs +2582 -0
- package/dist/index.d.ts +82 -42
- package/dist/index.js +117 -19
- package/dist/index.mjs +115 -25
- package/package.json +14 -8
- package/src/global.ts +2 -0
- package/src/interfaces/common.ts +34 -2
- package/src/modules/index.ts +2 -1
- package/src/modules/pricer-from-api.ts +61 -0
- package/src/modules/pricer.ts +7 -19
- package/src/modules/pricerBase.ts +15 -0
- package/src/modules/zkLend.ts +1 -0
- package/src/node/pricer-redis.ts +1 -0
- package/src/strategies/vesu-rebalance.ts +40 -3
|
@@ -13937,2339 +13937,6 @@ var strkfarm_risk_engine = (() => {
|
|
|
13937
13937
|
}
|
|
13938
13938
|
});
|
|
13939
13939
|
|
|
13940
|
-
// node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/browser.js
|
|
13941
|
-
var require_browser = __commonJS({
|
|
13942
|
-
"node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/browser.js"(exports, module) {
|
|
13943
|
-
"use strict";
|
|
13944
|
-
var getGlobal = function() {
|
|
13945
|
-
if (typeof self !== "undefined") {
|
|
13946
|
-
return self;
|
|
13947
|
-
}
|
|
13948
|
-
if (typeof window !== "undefined") {
|
|
13949
|
-
return window;
|
|
13950
|
-
}
|
|
13951
|
-
if (typeof global !== "undefined") {
|
|
13952
|
-
return global;
|
|
13953
|
-
}
|
|
13954
|
-
throw new Error("unable to locate global object");
|
|
13955
|
-
};
|
|
13956
|
-
var globalObject = getGlobal();
|
|
13957
|
-
module.exports = exports = globalObject.fetch;
|
|
13958
|
-
if (globalObject.fetch) {
|
|
13959
|
-
exports.default = globalObject.fetch.bind(globalObject);
|
|
13960
|
-
}
|
|
13961
|
-
exports.Headers = globalObject.Headers;
|
|
13962
|
-
exports.Request = globalObject.Request;
|
|
13963
|
-
exports.Response = globalObject.Response;
|
|
13964
|
-
}
|
|
13965
|
-
});
|
|
13966
|
-
|
|
13967
|
-
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js
|
|
13968
|
-
var require_es_errors = __commonJS({
|
|
13969
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports, module) {
|
|
13970
|
-
"use strict";
|
|
13971
|
-
module.exports = Error;
|
|
13972
|
-
}
|
|
13973
|
-
});
|
|
13974
|
-
|
|
13975
|
-
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js
|
|
13976
|
-
var require_eval = __commonJS({
|
|
13977
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports, module) {
|
|
13978
|
-
"use strict";
|
|
13979
|
-
module.exports = EvalError;
|
|
13980
|
-
}
|
|
13981
|
-
});
|
|
13982
|
-
|
|
13983
|
-
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js
|
|
13984
|
-
var require_range = __commonJS({
|
|
13985
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports, module) {
|
|
13986
|
-
"use strict";
|
|
13987
|
-
module.exports = RangeError;
|
|
13988
|
-
}
|
|
13989
|
-
});
|
|
13990
|
-
|
|
13991
|
-
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js
|
|
13992
|
-
var require_ref = __commonJS({
|
|
13993
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports, module) {
|
|
13994
|
-
"use strict";
|
|
13995
|
-
module.exports = ReferenceError;
|
|
13996
|
-
}
|
|
13997
|
-
});
|
|
13998
|
-
|
|
13999
|
-
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js
|
|
14000
|
-
var require_syntax = __commonJS({
|
|
14001
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports, module) {
|
|
14002
|
-
"use strict";
|
|
14003
|
-
module.exports = SyntaxError;
|
|
14004
|
-
}
|
|
14005
|
-
});
|
|
14006
|
-
|
|
14007
|
-
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js
|
|
14008
|
-
var require_type = __commonJS({
|
|
14009
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports, module) {
|
|
14010
|
-
"use strict";
|
|
14011
|
-
module.exports = TypeError;
|
|
14012
|
-
}
|
|
14013
|
-
});
|
|
14014
|
-
|
|
14015
|
-
// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js
|
|
14016
|
-
var require_uri = __commonJS({
|
|
14017
|
-
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports, module) {
|
|
14018
|
-
"use strict";
|
|
14019
|
-
module.exports = URIError;
|
|
14020
|
-
}
|
|
14021
|
-
});
|
|
14022
|
-
|
|
14023
|
-
// node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js
|
|
14024
|
-
var require_shams = __commonJS({
|
|
14025
|
-
"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(exports, module) {
|
|
14026
|
-
"use strict";
|
|
14027
|
-
module.exports = function hasSymbols() {
|
|
14028
|
-
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
|
|
14029
|
-
return false;
|
|
14030
|
-
}
|
|
14031
|
-
if (typeof Symbol.iterator === "symbol") {
|
|
14032
|
-
return true;
|
|
14033
|
-
}
|
|
14034
|
-
var obj = {};
|
|
14035
|
-
var sym = Symbol("test");
|
|
14036
|
-
var symObj = Object(sym);
|
|
14037
|
-
if (typeof sym === "string") {
|
|
14038
|
-
return false;
|
|
14039
|
-
}
|
|
14040
|
-
if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
|
|
14041
|
-
return false;
|
|
14042
|
-
}
|
|
14043
|
-
if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
|
|
14044
|
-
return false;
|
|
14045
|
-
}
|
|
14046
|
-
var symVal = 42;
|
|
14047
|
-
obj[sym] = symVal;
|
|
14048
|
-
for (sym in obj) {
|
|
14049
|
-
return false;
|
|
14050
|
-
}
|
|
14051
|
-
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
|
|
14052
|
-
return false;
|
|
14053
|
-
}
|
|
14054
|
-
if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
|
|
14055
|
-
return false;
|
|
14056
|
-
}
|
|
14057
|
-
var syms = Object.getOwnPropertySymbols(obj);
|
|
14058
|
-
if (syms.length !== 1 || syms[0] !== sym) {
|
|
14059
|
-
return false;
|
|
14060
|
-
}
|
|
14061
|
-
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
|
|
14062
|
-
return false;
|
|
14063
|
-
}
|
|
14064
|
-
if (typeof Object.getOwnPropertyDescriptor === "function") {
|
|
14065
|
-
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
14066
|
-
if (descriptor.value !== symVal || descriptor.enumerable !== true) {
|
|
14067
|
-
return false;
|
|
14068
|
-
}
|
|
14069
|
-
}
|
|
14070
|
-
return true;
|
|
14071
|
-
};
|
|
14072
|
-
}
|
|
14073
|
-
});
|
|
14074
|
-
|
|
14075
|
-
// node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js
|
|
14076
|
-
var require_has_symbols = __commonJS({
|
|
14077
|
-
"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js"(exports, module) {
|
|
14078
|
-
"use strict";
|
|
14079
|
-
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
14080
|
-
var hasSymbolSham = require_shams();
|
|
14081
|
-
module.exports = function hasNativeSymbols() {
|
|
14082
|
-
if (typeof origSymbol !== "function") {
|
|
14083
|
-
return false;
|
|
14084
|
-
}
|
|
14085
|
-
if (typeof Symbol !== "function") {
|
|
14086
|
-
return false;
|
|
14087
|
-
}
|
|
14088
|
-
if (typeof origSymbol("foo") !== "symbol") {
|
|
14089
|
-
return false;
|
|
14090
|
-
}
|
|
14091
|
-
if (typeof Symbol("bar") !== "symbol") {
|
|
14092
|
-
return false;
|
|
14093
|
-
}
|
|
14094
|
-
return hasSymbolSham();
|
|
14095
|
-
};
|
|
14096
|
-
}
|
|
14097
|
-
});
|
|
14098
|
-
|
|
14099
|
-
// node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js
|
|
14100
|
-
var require_has_proto = __commonJS({
|
|
14101
|
-
"node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js"(exports, module) {
|
|
14102
|
-
"use strict";
|
|
14103
|
-
var test = {
|
|
14104
|
-
__proto__: null,
|
|
14105
|
-
foo: {}
|
|
14106
|
-
};
|
|
14107
|
-
var $Object = Object;
|
|
14108
|
-
module.exports = function hasProto() {
|
|
14109
|
-
return { __proto__: test }.foo === test.foo && !(test instanceof $Object);
|
|
14110
|
-
};
|
|
14111
|
-
}
|
|
14112
|
-
});
|
|
14113
|
-
|
|
14114
|
-
// node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js
|
|
14115
|
-
var require_implementation = __commonJS({
|
|
14116
|
-
"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module) {
|
|
14117
|
-
"use strict";
|
|
14118
|
-
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
14119
|
-
var toStr3 = Object.prototype.toString;
|
|
14120
|
-
var max = Math.max;
|
|
14121
|
-
var funcType = "[object Function]";
|
|
14122
|
-
var concatty = function concatty2(a, b) {
|
|
14123
|
-
var arr = [];
|
|
14124
|
-
for (var i = 0; i < a.length; i += 1) {
|
|
14125
|
-
arr[i] = a[i];
|
|
14126
|
-
}
|
|
14127
|
-
for (var j = 0; j < b.length; j += 1) {
|
|
14128
|
-
arr[j + a.length] = b[j];
|
|
14129
|
-
}
|
|
14130
|
-
return arr;
|
|
14131
|
-
};
|
|
14132
|
-
var slicy = function slicy2(arrLike, offset) {
|
|
14133
|
-
var arr = [];
|
|
14134
|
-
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
14135
|
-
arr[j] = arrLike[i];
|
|
14136
|
-
}
|
|
14137
|
-
return arr;
|
|
14138
|
-
};
|
|
14139
|
-
var joiny = function(arr, joiner) {
|
|
14140
|
-
var str = "";
|
|
14141
|
-
for (var i = 0; i < arr.length; i += 1) {
|
|
14142
|
-
str += arr[i];
|
|
14143
|
-
if (i + 1 < arr.length) {
|
|
14144
|
-
str += joiner;
|
|
14145
|
-
}
|
|
14146
|
-
}
|
|
14147
|
-
return str;
|
|
14148
|
-
};
|
|
14149
|
-
module.exports = function bind2(that) {
|
|
14150
|
-
var target = this;
|
|
14151
|
-
if (typeof target !== "function" || toStr3.apply(target) !== funcType) {
|
|
14152
|
-
throw new TypeError(ERROR_MESSAGE + target);
|
|
14153
|
-
}
|
|
14154
|
-
var args = slicy(arguments, 1);
|
|
14155
|
-
var bound;
|
|
14156
|
-
var binder = function() {
|
|
14157
|
-
if (this instanceof bound) {
|
|
14158
|
-
var result = target.apply(
|
|
14159
|
-
this,
|
|
14160
|
-
concatty(args, arguments)
|
|
14161
|
-
);
|
|
14162
|
-
if (Object(result) === result) {
|
|
14163
|
-
return result;
|
|
14164
|
-
}
|
|
14165
|
-
return this;
|
|
14166
|
-
}
|
|
14167
|
-
return target.apply(
|
|
14168
|
-
that,
|
|
14169
|
-
concatty(args, arguments)
|
|
14170
|
-
);
|
|
14171
|
-
};
|
|
14172
|
-
var boundLength = max(0, target.length - args.length);
|
|
14173
|
-
var boundArgs = [];
|
|
14174
|
-
for (var i = 0; i < boundLength; i++) {
|
|
14175
|
-
boundArgs[i] = "$" + i;
|
|
14176
|
-
}
|
|
14177
|
-
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
14178
|
-
if (target.prototype) {
|
|
14179
|
-
var Empty = function Empty2() {
|
|
14180
|
-
};
|
|
14181
|
-
Empty.prototype = target.prototype;
|
|
14182
|
-
bound.prototype = new Empty();
|
|
14183
|
-
Empty.prototype = null;
|
|
14184
|
-
}
|
|
14185
|
-
return bound;
|
|
14186
|
-
};
|
|
14187
|
-
}
|
|
14188
|
-
});
|
|
14189
|
-
|
|
14190
|
-
// node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js
|
|
14191
|
-
var require_function_bind = __commonJS({
|
|
14192
|
-
"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module) {
|
|
14193
|
-
"use strict";
|
|
14194
|
-
var implementation = require_implementation();
|
|
14195
|
-
module.exports = Function.prototype.bind || implementation;
|
|
14196
|
-
}
|
|
14197
|
-
});
|
|
14198
|
-
|
|
14199
|
-
// node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js
|
|
14200
|
-
var require_hasown = __commonJS({
|
|
14201
|
-
"node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports, module) {
|
|
14202
|
-
"use strict";
|
|
14203
|
-
var call = Function.prototype.call;
|
|
14204
|
-
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
14205
|
-
var bind2 = require_function_bind();
|
|
14206
|
-
module.exports = bind2.call(call, $hasOwn);
|
|
14207
|
-
}
|
|
14208
|
-
});
|
|
14209
|
-
|
|
14210
|
-
// node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js
|
|
14211
|
-
var require_get_intrinsic = __commonJS({
|
|
14212
|
-
"node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js"(exports, module) {
|
|
14213
|
-
"use strict";
|
|
14214
|
-
var undefined2;
|
|
14215
|
-
var $Error = require_es_errors();
|
|
14216
|
-
var $EvalError = require_eval();
|
|
14217
|
-
var $RangeError = require_range();
|
|
14218
|
-
var $ReferenceError = require_ref();
|
|
14219
|
-
var $SyntaxError = require_syntax();
|
|
14220
|
-
var $TypeError = require_type();
|
|
14221
|
-
var $URIError = require_uri();
|
|
14222
|
-
var $Function = Function;
|
|
14223
|
-
var getEvalledConstructor = function(expressionSyntax) {
|
|
14224
|
-
try {
|
|
14225
|
-
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
14226
|
-
} catch (e) {
|
|
14227
|
-
}
|
|
14228
|
-
};
|
|
14229
|
-
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
14230
|
-
if ($gOPD) {
|
|
14231
|
-
try {
|
|
14232
|
-
$gOPD({}, "");
|
|
14233
|
-
} catch (e) {
|
|
14234
|
-
$gOPD = null;
|
|
14235
|
-
}
|
|
14236
|
-
}
|
|
14237
|
-
var throwTypeError = function() {
|
|
14238
|
-
throw new $TypeError();
|
|
14239
|
-
};
|
|
14240
|
-
var ThrowTypeError = $gOPD ? function() {
|
|
14241
|
-
try {
|
|
14242
|
-
arguments.callee;
|
|
14243
|
-
return throwTypeError;
|
|
14244
|
-
} catch (calleeThrows) {
|
|
14245
|
-
try {
|
|
14246
|
-
return $gOPD(arguments, "callee").get;
|
|
14247
|
-
} catch (gOPDthrows) {
|
|
14248
|
-
return throwTypeError;
|
|
14249
|
-
}
|
|
14250
|
-
}
|
|
14251
|
-
}() : throwTypeError;
|
|
14252
|
-
var hasSymbols = require_has_symbols()();
|
|
14253
|
-
var hasProto = require_has_proto()();
|
|
14254
|
-
var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
|
|
14255
|
-
return x.__proto__;
|
|
14256
|
-
} : null);
|
|
14257
|
-
var needsEval = {};
|
|
14258
|
-
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
|
|
14259
|
-
var INTRINSICS = {
|
|
14260
|
-
__proto__: null,
|
|
14261
|
-
"%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
|
|
14262
|
-
"%Array%": Array,
|
|
14263
|
-
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
|
|
14264
|
-
"%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
|
|
14265
|
-
"%AsyncFromSyncIteratorPrototype%": undefined2,
|
|
14266
|
-
"%AsyncFunction%": needsEval,
|
|
14267
|
-
"%AsyncGenerator%": needsEval,
|
|
14268
|
-
"%AsyncGeneratorFunction%": needsEval,
|
|
14269
|
-
"%AsyncIteratorPrototype%": needsEval,
|
|
14270
|
-
"%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
|
|
14271
|
-
"%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
|
|
14272
|
-
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
|
|
14273
|
-
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
|
|
14274
|
-
"%Boolean%": Boolean,
|
|
14275
|
-
"%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
|
|
14276
|
-
"%Date%": Date,
|
|
14277
|
-
"%decodeURI%": decodeURI,
|
|
14278
|
-
"%decodeURIComponent%": decodeURIComponent,
|
|
14279
|
-
"%encodeURI%": encodeURI,
|
|
14280
|
-
"%encodeURIComponent%": encodeURIComponent,
|
|
14281
|
-
"%Error%": $Error,
|
|
14282
|
-
"%eval%": eval,
|
|
14283
|
-
// eslint-disable-line no-eval
|
|
14284
|
-
"%EvalError%": $EvalError,
|
|
14285
|
-
"%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
|
|
14286
|
-
"%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
|
|
14287
|
-
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
|
|
14288
|
-
"%Function%": $Function,
|
|
14289
|
-
"%GeneratorFunction%": needsEval,
|
|
14290
|
-
"%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
|
|
14291
|
-
"%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
|
|
14292
|
-
"%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
|
|
14293
|
-
"%isFinite%": isFinite,
|
|
14294
|
-
"%isNaN%": isNaN,
|
|
14295
|
-
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
|
|
14296
|
-
"%JSON%": typeof JSON === "object" ? JSON : undefined2,
|
|
14297
|
-
"%Map%": typeof Map === "undefined" ? undefined2 : Map,
|
|
14298
|
-
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
14299
|
-
"%Math%": Math,
|
|
14300
|
-
"%Number%": Number,
|
|
14301
|
-
"%Object%": Object,
|
|
14302
|
-
"%parseFloat%": parseFloat,
|
|
14303
|
-
"%parseInt%": parseInt,
|
|
14304
|
-
"%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
|
|
14305
|
-
"%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
|
|
14306
|
-
"%RangeError%": $RangeError,
|
|
14307
|
-
"%ReferenceError%": $ReferenceError,
|
|
14308
|
-
"%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
|
|
14309
|
-
"%RegExp%": RegExp,
|
|
14310
|
-
"%Set%": typeof Set === "undefined" ? undefined2 : Set,
|
|
14311
|
-
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
14312
|
-
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
|
|
14313
|
-
"%String%": String,
|
|
14314
|
-
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
|
|
14315
|
-
"%Symbol%": hasSymbols ? Symbol : undefined2,
|
|
14316
|
-
"%SyntaxError%": $SyntaxError,
|
|
14317
|
-
"%ThrowTypeError%": ThrowTypeError,
|
|
14318
|
-
"%TypedArray%": TypedArray,
|
|
14319
|
-
"%TypeError%": $TypeError,
|
|
14320
|
-
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
|
|
14321
|
-
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
|
|
14322
|
-
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
|
|
14323
|
-
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
|
|
14324
|
-
"%URIError%": $URIError,
|
|
14325
|
-
"%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
|
|
14326
|
-
"%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
|
|
14327
|
-
"%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
|
|
14328
|
-
};
|
|
14329
|
-
if (getProto) {
|
|
14330
|
-
try {
|
|
14331
|
-
null.error;
|
|
14332
|
-
} catch (e) {
|
|
14333
|
-
errorProto = getProto(getProto(e));
|
|
14334
|
-
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
14335
|
-
}
|
|
14336
|
-
}
|
|
14337
|
-
var errorProto;
|
|
14338
|
-
var doEval = function doEval2(name) {
|
|
14339
|
-
var value;
|
|
14340
|
-
if (name === "%AsyncFunction%") {
|
|
14341
|
-
value = getEvalledConstructor("async function () {}");
|
|
14342
|
-
} else if (name === "%GeneratorFunction%") {
|
|
14343
|
-
value = getEvalledConstructor("function* () {}");
|
|
14344
|
-
} else if (name === "%AsyncGeneratorFunction%") {
|
|
14345
|
-
value = getEvalledConstructor("async function* () {}");
|
|
14346
|
-
} else if (name === "%AsyncGenerator%") {
|
|
14347
|
-
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
14348
|
-
if (fn) {
|
|
14349
|
-
value = fn.prototype;
|
|
14350
|
-
}
|
|
14351
|
-
} else if (name === "%AsyncIteratorPrototype%") {
|
|
14352
|
-
var gen3 = doEval2("%AsyncGenerator%");
|
|
14353
|
-
if (gen3 && getProto) {
|
|
14354
|
-
value = getProto(gen3.prototype);
|
|
14355
|
-
}
|
|
14356
|
-
}
|
|
14357
|
-
INTRINSICS[name] = value;
|
|
14358
|
-
return value;
|
|
14359
|
-
};
|
|
14360
|
-
var LEGACY_ALIASES = {
|
|
14361
|
-
__proto__: null,
|
|
14362
|
-
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
14363
|
-
"%ArrayPrototype%": ["Array", "prototype"],
|
|
14364
|
-
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
14365
|
-
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
|
|
14366
|
-
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
|
|
14367
|
-
"%ArrayProto_values%": ["Array", "prototype", "values"],
|
|
14368
|
-
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
14369
|
-
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
14370
|
-
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
|
|
14371
|
-
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
14372
|
-
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
14373
|
-
"%DatePrototype%": ["Date", "prototype"],
|
|
14374
|
-
"%ErrorPrototype%": ["Error", "prototype"],
|
|
14375
|
-
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
14376
|
-
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
14377
|
-
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
14378
|
-
"%FunctionPrototype%": ["Function", "prototype"],
|
|
14379
|
-
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
14380
|
-
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
|
|
14381
|
-
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
14382
|
-
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
14383
|
-
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
14384
|
-
"%JSONParse%": ["JSON", "parse"],
|
|
14385
|
-
"%JSONStringify%": ["JSON", "stringify"],
|
|
14386
|
-
"%MapPrototype%": ["Map", "prototype"],
|
|
14387
|
-
"%NumberPrototype%": ["Number", "prototype"],
|
|
14388
|
-
"%ObjectPrototype%": ["Object", "prototype"],
|
|
14389
|
-
"%ObjProto_toString%": ["Object", "prototype", "toString"],
|
|
14390
|
-
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
|
|
14391
|
-
"%PromisePrototype%": ["Promise", "prototype"],
|
|
14392
|
-
"%PromiseProto_then%": ["Promise", "prototype", "then"],
|
|
14393
|
-
"%Promise_all%": ["Promise", "all"],
|
|
14394
|
-
"%Promise_reject%": ["Promise", "reject"],
|
|
14395
|
-
"%Promise_resolve%": ["Promise", "resolve"],
|
|
14396
|
-
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
14397
|
-
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
14398
|
-
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
14399
|
-
"%SetPrototype%": ["Set", "prototype"],
|
|
14400
|
-
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
14401
|
-
"%StringPrototype%": ["String", "prototype"],
|
|
14402
|
-
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
14403
|
-
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
14404
|
-
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
14405
|
-
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
14406
|
-
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
14407
|
-
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
14408
|
-
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
14409
|
-
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
14410
|
-
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
14411
|
-
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
14412
|
-
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
14413
|
-
};
|
|
14414
|
-
var bind2 = require_function_bind();
|
|
14415
|
-
var hasOwn = require_hasown();
|
|
14416
|
-
var $concat = bind2.call(Function.call, Array.prototype.concat);
|
|
14417
|
-
var $spliceApply = bind2.call(Function.apply, Array.prototype.splice);
|
|
14418
|
-
var $replace = bind2.call(Function.call, String.prototype.replace);
|
|
14419
|
-
var $strSlice = bind2.call(Function.call, String.prototype.slice);
|
|
14420
|
-
var $exec = bind2.call(Function.call, RegExp.prototype.exec);
|
|
14421
|
-
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
14422
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
14423
|
-
var stringToPath = function stringToPath2(string) {
|
|
14424
|
-
var first = $strSlice(string, 0, 1);
|
|
14425
|
-
var last = $strSlice(string, -1);
|
|
14426
|
-
if (first === "%" && last !== "%") {
|
|
14427
|
-
throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
14428
|
-
} else if (last === "%" && first !== "%") {
|
|
14429
|
-
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
14430
|
-
}
|
|
14431
|
-
var result = [];
|
|
14432
|
-
$replace(string, rePropName, function(match, number3, quote, subString) {
|
|
14433
|
-
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number3 || match;
|
|
14434
|
-
});
|
|
14435
|
-
return result;
|
|
14436
|
-
};
|
|
14437
|
-
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
14438
|
-
var intrinsicName = name;
|
|
14439
|
-
var alias;
|
|
14440
|
-
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
14441
|
-
alias = LEGACY_ALIASES[intrinsicName];
|
|
14442
|
-
intrinsicName = "%" + alias[0] + "%";
|
|
14443
|
-
}
|
|
14444
|
-
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
14445
|
-
var value = INTRINSICS[intrinsicName];
|
|
14446
|
-
if (value === needsEval) {
|
|
14447
|
-
value = doEval(intrinsicName);
|
|
14448
|
-
}
|
|
14449
|
-
if (typeof value === "undefined" && !allowMissing) {
|
|
14450
|
-
throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
14451
|
-
}
|
|
14452
|
-
return {
|
|
14453
|
-
alias,
|
|
14454
|
-
name: intrinsicName,
|
|
14455
|
-
value
|
|
14456
|
-
};
|
|
14457
|
-
}
|
|
14458
|
-
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
14459
|
-
};
|
|
14460
|
-
module.exports = function GetIntrinsic(name, allowMissing) {
|
|
14461
|
-
if (typeof name !== "string" || name.length === 0) {
|
|
14462
|
-
throw new $TypeError("intrinsic name must be a non-empty string");
|
|
14463
|
-
}
|
|
14464
|
-
if (arguments.length > 1 && typeof allowMissing !== "boolean") {
|
|
14465
|
-
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
14466
|
-
}
|
|
14467
|
-
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
14468
|
-
throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
14469
|
-
}
|
|
14470
|
-
var parts = stringToPath(name);
|
|
14471
|
-
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
14472
|
-
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
14473
|
-
var intrinsicRealName = intrinsic.name;
|
|
14474
|
-
var value = intrinsic.value;
|
|
14475
|
-
var skipFurtherCaching = false;
|
|
14476
|
-
var alias = intrinsic.alias;
|
|
14477
|
-
if (alias) {
|
|
14478
|
-
intrinsicBaseName = alias[0];
|
|
14479
|
-
$spliceApply(parts, $concat([0, 1], alias));
|
|
14480
|
-
}
|
|
14481
|
-
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
14482
|
-
var part = parts[i];
|
|
14483
|
-
var first = $strSlice(part, 0, 1);
|
|
14484
|
-
var last = $strSlice(part, -1);
|
|
14485
|
-
if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
|
|
14486
|
-
throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
14487
|
-
}
|
|
14488
|
-
if (part === "constructor" || !isOwn) {
|
|
14489
|
-
skipFurtherCaching = true;
|
|
14490
|
-
}
|
|
14491
|
-
intrinsicBaseName += "." + part;
|
|
14492
|
-
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
14493
|
-
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
14494
|
-
value = INTRINSICS[intrinsicRealName];
|
|
14495
|
-
} else if (value != null) {
|
|
14496
|
-
if (!(part in value)) {
|
|
14497
|
-
if (!allowMissing) {
|
|
14498
|
-
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
14499
|
-
}
|
|
14500
|
-
return void 0;
|
|
14501
|
-
}
|
|
14502
|
-
if ($gOPD && i + 1 >= parts.length) {
|
|
14503
|
-
var desc = $gOPD(value, part);
|
|
14504
|
-
isOwn = !!desc;
|
|
14505
|
-
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
14506
|
-
value = desc.get;
|
|
14507
|
-
} else {
|
|
14508
|
-
value = value[part];
|
|
14509
|
-
}
|
|
14510
|
-
} else {
|
|
14511
|
-
isOwn = hasOwn(value, part);
|
|
14512
|
-
value = value[part];
|
|
14513
|
-
}
|
|
14514
|
-
if (isOwn && !skipFurtherCaching) {
|
|
14515
|
-
INTRINSICS[intrinsicRealName] = value;
|
|
14516
|
-
}
|
|
14517
|
-
}
|
|
14518
|
-
}
|
|
14519
|
-
return value;
|
|
14520
|
-
};
|
|
14521
|
-
}
|
|
14522
|
-
});
|
|
14523
|
-
|
|
14524
|
-
// node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js
|
|
14525
|
-
var require_es_define_property = __commonJS({
|
|
14526
|
-
"node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js"(exports, module) {
|
|
14527
|
-
"use strict";
|
|
14528
|
-
var GetIntrinsic = require_get_intrinsic();
|
|
14529
|
-
var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false;
|
|
14530
|
-
if ($defineProperty) {
|
|
14531
|
-
try {
|
|
14532
|
-
$defineProperty({}, "a", { value: 1 });
|
|
14533
|
-
} catch (e) {
|
|
14534
|
-
$defineProperty = false;
|
|
14535
|
-
}
|
|
14536
|
-
}
|
|
14537
|
-
module.exports = $defineProperty;
|
|
14538
|
-
}
|
|
14539
|
-
});
|
|
14540
|
-
|
|
14541
|
-
// node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js
|
|
14542
|
-
var require_gopd = __commonJS({
|
|
14543
|
-
"node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(exports, module) {
|
|
14544
|
-
"use strict";
|
|
14545
|
-
var GetIntrinsic = require_get_intrinsic();
|
|
14546
|
-
var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
|
|
14547
|
-
if ($gOPD) {
|
|
14548
|
-
try {
|
|
14549
|
-
$gOPD([], "length");
|
|
14550
|
-
} catch (e) {
|
|
14551
|
-
$gOPD = null;
|
|
14552
|
-
}
|
|
14553
|
-
}
|
|
14554
|
-
module.exports = $gOPD;
|
|
14555
|
-
}
|
|
14556
|
-
});
|
|
14557
|
-
|
|
14558
|
-
// node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js
|
|
14559
|
-
var require_define_data_property = __commonJS({
|
|
14560
|
-
"node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js"(exports, module) {
|
|
14561
|
-
"use strict";
|
|
14562
|
-
var $defineProperty = require_es_define_property();
|
|
14563
|
-
var $SyntaxError = require_syntax();
|
|
14564
|
-
var $TypeError = require_type();
|
|
14565
|
-
var gopd = require_gopd();
|
|
14566
|
-
module.exports = function defineDataProperty(obj, property, value) {
|
|
14567
|
-
if (!obj || typeof obj !== "object" && typeof obj !== "function") {
|
|
14568
|
-
throw new $TypeError("`obj` must be an object or a function`");
|
|
14569
|
-
}
|
|
14570
|
-
if (typeof property !== "string" && typeof property !== "symbol") {
|
|
14571
|
-
throw new $TypeError("`property` must be a string or a symbol`");
|
|
14572
|
-
}
|
|
14573
|
-
if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
|
|
14574
|
-
throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
|
|
14575
|
-
}
|
|
14576
|
-
if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
|
|
14577
|
-
throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
|
|
14578
|
-
}
|
|
14579
|
-
if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
|
|
14580
|
-
throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
|
|
14581
|
-
}
|
|
14582
|
-
if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
|
|
14583
|
-
throw new $TypeError("`loose`, if provided, must be a boolean");
|
|
14584
|
-
}
|
|
14585
|
-
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
14586
|
-
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
14587
|
-
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
14588
|
-
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
14589
|
-
var desc = !!gopd && gopd(obj, property);
|
|
14590
|
-
if ($defineProperty) {
|
|
14591
|
-
$defineProperty(obj, property, {
|
|
14592
|
-
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
14593
|
-
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
14594
|
-
value,
|
|
14595
|
-
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
14596
|
-
});
|
|
14597
|
-
} else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
|
|
14598
|
-
obj[property] = value;
|
|
14599
|
-
} else {
|
|
14600
|
-
throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
14601
|
-
}
|
|
14602
|
-
};
|
|
14603
|
-
}
|
|
14604
|
-
});
|
|
14605
|
-
|
|
14606
|
-
// node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js
|
|
14607
|
-
var require_has_property_descriptors = __commonJS({
|
|
14608
|
-
"node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js"(exports, module) {
|
|
14609
|
-
"use strict";
|
|
14610
|
-
var $defineProperty = require_es_define_property();
|
|
14611
|
-
var hasPropertyDescriptors = function hasPropertyDescriptors2() {
|
|
14612
|
-
return !!$defineProperty;
|
|
14613
|
-
};
|
|
14614
|
-
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
14615
|
-
if (!$defineProperty) {
|
|
14616
|
-
return null;
|
|
14617
|
-
}
|
|
14618
|
-
try {
|
|
14619
|
-
return $defineProperty([], "length", { value: 1 }).length !== 1;
|
|
14620
|
-
} catch (e) {
|
|
14621
|
-
return true;
|
|
14622
|
-
}
|
|
14623
|
-
};
|
|
14624
|
-
module.exports = hasPropertyDescriptors;
|
|
14625
|
-
}
|
|
14626
|
-
});
|
|
14627
|
-
|
|
14628
|
-
// node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js
|
|
14629
|
-
var require_set_function_length = __commonJS({
|
|
14630
|
-
"node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js"(exports, module) {
|
|
14631
|
-
"use strict";
|
|
14632
|
-
var GetIntrinsic = require_get_intrinsic();
|
|
14633
|
-
var define2 = require_define_data_property();
|
|
14634
|
-
var hasDescriptors = require_has_property_descriptors()();
|
|
14635
|
-
var gOPD = require_gopd();
|
|
14636
|
-
var $TypeError = require_type();
|
|
14637
|
-
var $floor = GetIntrinsic("%Math.floor%");
|
|
14638
|
-
module.exports = function setFunctionLength(fn, length) {
|
|
14639
|
-
if (typeof fn !== "function") {
|
|
14640
|
-
throw new $TypeError("`fn` is not a function");
|
|
14641
|
-
}
|
|
14642
|
-
if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
|
|
14643
|
-
throw new $TypeError("`length` must be a positive 32-bit integer");
|
|
14644
|
-
}
|
|
14645
|
-
var loose = arguments.length > 2 && !!arguments[2];
|
|
14646
|
-
var functionLengthIsConfigurable = true;
|
|
14647
|
-
var functionLengthIsWritable = true;
|
|
14648
|
-
if ("length" in fn && gOPD) {
|
|
14649
|
-
var desc = gOPD(fn, "length");
|
|
14650
|
-
if (desc && !desc.configurable) {
|
|
14651
|
-
functionLengthIsConfigurable = false;
|
|
14652
|
-
}
|
|
14653
|
-
if (desc && !desc.writable) {
|
|
14654
|
-
functionLengthIsWritable = false;
|
|
14655
|
-
}
|
|
14656
|
-
}
|
|
14657
|
-
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
14658
|
-
if (hasDescriptors) {
|
|
14659
|
-
define2(
|
|
14660
|
-
/** @type {Parameters<define>[0]} */
|
|
14661
|
-
fn,
|
|
14662
|
-
"length",
|
|
14663
|
-
length,
|
|
14664
|
-
true,
|
|
14665
|
-
true
|
|
14666
|
-
);
|
|
14667
|
-
} else {
|
|
14668
|
-
define2(
|
|
14669
|
-
/** @type {Parameters<define>[0]} */
|
|
14670
|
-
fn,
|
|
14671
|
-
"length",
|
|
14672
|
-
length
|
|
14673
|
-
);
|
|
14674
|
-
}
|
|
14675
|
-
}
|
|
14676
|
-
return fn;
|
|
14677
|
-
};
|
|
14678
|
-
}
|
|
14679
|
-
});
|
|
14680
|
-
|
|
14681
|
-
// node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js
|
|
14682
|
-
var require_call_bind = __commonJS({
|
|
14683
|
-
"node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js"(exports, module) {
|
|
14684
|
-
"use strict";
|
|
14685
|
-
var bind2 = require_function_bind();
|
|
14686
|
-
var GetIntrinsic = require_get_intrinsic();
|
|
14687
|
-
var setFunctionLength = require_set_function_length();
|
|
14688
|
-
var $TypeError = require_type();
|
|
14689
|
-
var $apply = GetIntrinsic("%Function.prototype.apply%");
|
|
14690
|
-
var $call = GetIntrinsic("%Function.prototype.call%");
|
|
14691
|
-
var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind2.call($call, $apply);
|
|
14692
|
-
var $defineProperty = require_es_define_property();
|
|
14693
|
-
var $max = GetIntrinsic("%Math.max%");
|
|
14694
|
-
module.exports = function callBind(originalFunction) {
|
|
14695
|
-
if (typeof originalFunction !== "function") {
|
|
14696
|
-
throw new $TypeError("a function is required");
|
|
14697
|
-
}
|
|
14698
|
-
var func = $reflectApply(bind2, $call, arguments);
|
|
14699
|
-
return setFunctionLength(
|
|
14700
|
-
func,
|
|
14701
|
-
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
|
14702
|
-
true
|
|
14703
|
-
);
|
|
14704
|
-
};
|
|
14705
|
-
var applyBind = function applyBind2() {
|
|
14706
|
-
return $reflectApply(bind2, $apply, arguments);
|
|
14707
|
-
};
|
|
14708
|
-
if ($defineProperty) {
|
|
14709
|
-
$defineProperty(module.exports, "apply", { value: applyBind });
|
|
14710
|
-
} else {
|
|
14711
|
-
module.exports.apply = applyBind;
|
|
14712
|
-
}
|
|
14713
|
-
}
|
|
14714
|
-
});
|
|
14715
|
-
|
|
14716
|
-
// node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js
|
|
14717
|
-
var require_callBound = __commonJS({
|
|
14718
|
-
"node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js"(exports, module) {
|
|
14719
|
-
"use strict";
|
|
14720
|
-
var GetIntrinsic = require_get_intrinsic();
|
|
14721
|
-
var callBind = require_call_bind();
|
|
14722
|
-
var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
|
|
14723
|
-
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
14724
|
-
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
14725
|
-
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
|
14726
|
-
return callBind(intrinsic);
|
|
14727
|
-
}
|
|
14728
|
-
return intrinsic;
|
|
14729
|
-
};
|
|
14730
|
-
}
|
|
14731
|
-
});
|
|
14732
|
-
|
|
14733
|
-
// (disabled):node_modules/.pnpm/object-inspect@1.13.2/node_modules/object-inspect/util.inspect
|
|
14734
|
-
var require_util = __commonJS({
|
|
14735
|
-
"(disabled):node_modules/.pnpm/object-inspect@1.13.2/node_modules/object-inspect/util.inspect"() {
|
|
14736
|
-
"use strict";
|
|
14737
|
-
}
|
|
14738
|
-
});
|
|
14739
|
-
|
|
14740
|
-
// node_modules/.pnpm/object-inspect@1.13.2/node_modules/object-inspect/index.js
|
|
14741
|
-
var require_object_inspect = __commonJS({
|
|
14742
|
-
"node_modules/.pnpm/object-inspect@1.13.2/node_modules/object-inspect/index.js"(exports, module) {
|
|
14743
|
-
"use strict";
|
|
14744
|
-
var hasMap = typeof Map === "function" && Map.prototype;
|
|
14745
|
-
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
|
|
14746
|
-
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
|
|
14747
|
-
var mapForEach = hasMap && Map.prototype.forEach;
|
|
14748
|
-
var hasSet = typeof Set === "function" && Set.prototype;
|
|
14749
|
-
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
|
|
14750
|
-
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
|
|
14751
|
-
var setForEach = hasSet && Set.prototype.forEach;
|
|
14752
|
-
var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
|
|
14753
|
-
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
14754
|
-
var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
|
|
14755
|
-
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
14756
|
-
var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
|
|
14757
|
-
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
14758
|
-
var booleanValueOf = Boolean.prototype.valueOf;
|
|
14759
|
-
var objectToString = Object.prototype.toString;
|
|
14760
|
-
var functionToString = Function.prototype.toString;
|
|
14761
|
-
var $match = String.prototype.match;
|
|
14762
|
-
var $slice = String.prototype.slice;
|
|
14763
|
-
var $replace = String.prototype.replace;
|
|
14764
|
-
var $toUpperCase = String.prototype.toUpperCase;
|
|
14765
|
-
var $toLowerCase = String.prototype.toLowerCase;
|
|
14766
|
-
var $test = RegExp.prototype.test;
|
|
14767
|
-
var $concat = Array.prototype.concat;
|
|
14768
|
-
var $join = Array.prototype.join;
|
|
14769
|
-
var $arrSlice = Array.prototype.slice;
|
|
14770
|
-
var $floor = Math.floor;
|
|
14771
|
-
var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
|
|
14772
|
-
var gOPS = Object.getOwnPropertySymbols;
|
|
14773
|
-
var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
|
|
14774
|
-
var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
|
|
14775
|
-
var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
|
|
14776
|
-
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
14777
|
-
var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
|
|
14778
|
-
return O.__proto__;
|
|
14779
|
-
} : null);
|
|
14780
|
-
function addNumericSeparator(num, str) {
|
|
14781
|
-
if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
|
|
14782
|
-
return str;
|
|
14783
|
-
}
|
|
14784
|
-
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
14785
|
-
if (typeof num === "number") {
|
|
14786
|
-
var int = num < 0 ? -$floor(-num) : $floor(num);
|
|
14787
|
-
if (int !== num) {
|
|
14788
|
-
var intStr = String(int);
|
|
14789
|
-
var dec = $slice.call(str, intStr.length + 1);
|
|
14790
|
-
return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
14791
|
-
}
|
|
14792
|
-
}
|
|
14793
|
-
return $replace.call(str, sepRegex, "$&_");
|
|
14794
|
-
}
|
|
14795
|
-
var utilInspect = require_util();
|
|
14796
|
-
var inspectCustom = utilInspect.custom;
|
|
14797
|
-
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
14798
|
-
module.exports = function inspect_(obj, options, depth, seen) {
|
|
14799
|
-
var opts = options || {};
|
|
14800
|
-
if (has(opts, "quoteStyle") && (opts.quoteStyle !== "single" && opts.quoteStyle !== "double")) {
|
|
14801
|
-
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
14802
|
-
}
|
|
14803
|
-
if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
|
|
14804
|
-
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
14805
|
-
}
|
|
14806
|
-
var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
|
|
14807
|
-
if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
|
|
14808
|
-
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
14809
|
-
}
|
|
14810
|
-
if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
|
|
14811
|
-
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
14812
|
-
}
|
|
14813
|
-
if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
|
|
14814
|
-
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
14815
|
-
}
|
|
14816
|
-
var numericSeparator = opts.numericSeparator;
|
|
14817
|
-
if (typeof obj === "undefined") {
|
|
14818
|
-
return "undefined";
|
|
14819
|
-
}
|
|
14820
|
-
if (obj === null) {
|
|
14821
|
-
return "null";
|
|
14822
|
-
}
|
|
14823
|
-
if (typeof obj === "boolean") {
|
|
14824
|
-
return obj ? "true" : "false";
|
|
14825
|
-
}
|
|
14826
|
-
if (typeof obj === "string") {
|
|
14827
|
-
return inspectString(obj, opts);
|
|
14828
|
-
}
|
|
14829
|
-
if (typeof obj === "number") {
|
|
14830
|
-
if (obj === 0) {
|
|
14831
|
-
return Infinity / obj > 0 ? "0" : "-0";
|
|
14832
|
-
}
|
|
14833
|
-
var str = String(obj);
|
|
14834
|
-
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
14835
|
-
}
|
|
14836
|
-
if (typeof obj === "bigint") {
|
|
14837
|
-
var bigIntStr = String(obj) + "n";
|
|
14838
|
-
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
14839
|
-
}
|
|
14840
|
-
var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
|
|
14841
|
-
if (typeof depth === "undefined") {
|
|
14842
|
-
depth = 0;
|
|
14843
|
-
}
|
|
14844
|
-
if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
|
|
14845
|
-
return isArray2(obj) ? "[Array]" : "[Object]";
|
|
14846
|
-
}
|
|
14847
|
-
var indent = getIndent(opts, depth);
|
|
14848
|
-
if (typeof seen === "undefined") {
|
|
14849
|
-
seen = [];
|
|
14850
|
-
} else if (indexOf(seen, obj) >= 0) {
|
|
14851
|
-
return "[Circular]";
|
|
14852
|
-
}
|
|
14853
|
-
function inspect(value, from, noIndent) {
|
|
14854
|
-
if (from) {
|
|
14855
|
-
seen = $arrSlice.call(seen);
|
|
14856
|
-
seen.push(from);
|
|
14857
|
-
}
|
|
14858
|
-
if (noIndent) {
|
|
14859
|
-
var newOpts = {
|
|
14860
|
-
depth: opts.depth
|
|
14861
|
-
};
|
|
14862
|
-
if (has(opts, "quoteStyle")) {
|
|
14863
|
-
newOpts.quoteStyle = opts.quoteStyle;
|
|
14864
|
-
}
|
|
14865
|
-
return inspect_(value, newOpts, depth + 1, seen);
|
|
14866
|
-
}
|
|
14867
|
-
return inspect_(value, opts, depth + 1, seen);
|
|
14868
|
-
}
|
|
14869
|
-
if (typeof obj === "function" && !isRegExp2(obj)) {
|
|
14870
|
-
var name = nameOf(obj);
|
|
14871
|
-
var keys = arrObjKeys(obj, inspect);
|
|
14872
|
-
return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
|
|
14873
|
-
}
|
|
14874
|
-
if (isSymbol(obj)) {
|
|
14875
|
-
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
|
|
14876
|
-
return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
14877
|
-
}
|
|
14878
|
-
if (isElement(obj)) {
|
|
14879
|
-
var s = "<" + $toLowerCase.call(String(obj.nodeName));
|
|
14880
|
-
var attrs = obj.attributes || [];
|
|
14881
|
-
for (var i = 0; i < attrs.length; i++) {
|
|
14882
|
-
s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
|
|
14883
|
-
}
|
|
14884
|
-
s += ">";
|
|
14885
|
-
if (obj.childNodes && obj.childNodes.length) {
|
|
14886
|
-
s += "...";
|
|
14887
|
-
}
|
|
14888
|
-
s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
|
|
14889
|
-
return s;
|
|
14890
|
-
}
|
|
14891
|
-
if (isArray2(obj)) {
|
|
14892
|
-
if (obj.length === 0) {
|
|
14893
|
-
return "[]";
|
|
14894
|
-
}
|
|
14895
|
-
var xs = arrObjKeys(obj, inspect);
|
|
14896
|
-
if (indent && !singleLineValues(xs)) {
|
|
14897
|
-
return "[" + indentedJoin(xs, indent) + "]";
|
|
14898
|
-
}
|
|
14899
|
-
return "[ " + $join.call(xs, ", ") + " ]";
|
|
14900
|
-
}
|
|
14901
|
-
if (isError(obj)) {
|
|
14902
|
-
var parts = arrObjKeys(obj, inspect);
|
|
14903
|
-
if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
|
|
14904
|
-
return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
|
|
14905
|
-
}
|
|
14906
|
-
if (parts.length === 0) {
|
|
14907
|
-
return "[" + String(obj) + "]";
|
|
14908
|
-
}
|
|
14909
|
-
return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
|
|
14910
|
-
}
|
|
14911
|
-
if (typeof obj === "object" && customInspect) {
|
|
14912
|
-
if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
|
|
14913
|
-
return utilInspect(obj, { depth: maxDepth - depth });
|
|
14914
|
-
} else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
|
|
14915
|
-
return obj.inspect();
|
|
14916
|
-
}
|
|
14917
|
-
}
|
|
14918
|
-
if (isMap(obj)) {
|
|
14919
|
-
var mapParts = [];
|
|
14920
|
-
if (mapForEach) {
|
|
14921
|
-
mapForEach.call(obj, function(value, key) {
|
|
14922
|
-
mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
|
|
14923
|
-
});
|
|
14924
|
-
}
|
|
14925
|
-
return collectionOf("Map", mapSize.call(obj), mapParts, indent);
|
|
14926
|
-
}
|
|
14927
|
-
if (isSet(obj)) {
|
|
14928
|
-
var setParts = [];
|
|
14929
|
-
if (setForEach) {
|
|
14930
|
-
setForEach.call(obj, function(value) {
|
|
14931
|
-
setParts.push(inspect(value, obj));
|
|
14932
|
-
});
|
|
14933
|
-
}
|
|
14934
|
-
return collectionOf("Set", setSize.call(obj), setParts, indent);
|
|
14935
|
-
}
|
|
14936
|
-
if (isWeakMap(obj)) {
|
|
14937
|
-
return weakCollectionOf("WeakMap");
|
|
14938
|
-
}
|
|
14939
|
-
if (isWeakSet(obj)) {
|
|
14940
|
-
return weakCollectionOf("WeakSet");
|
|
14941
|
-
}
|
|
14942
|
-
if (isWeakRef(obj)) {
|
|
14943
|
-
return weakCollectionOf("WeakRef");
|
|
14944
|
-
}
|
|
14945
|
-
if (isNumber4(obj)) {
|
|
14946
|
-
return markBoxed(inspect(Number(obj)));
|
|
14947
|
-
}
|
|
14948
|
-
if (isBigInt2(obj)) {
|
|
14949
|
-
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
14950
|
-
}
|
|
14951
|
-
if (isBoolean3(obj)) {
|
|
14952
|
-
return markBoxed(booleanValueOf.call(obj));
|
|
14953
|
-
}
|
|
14954
|
-
if (isString3(obj)) {
|
|
14955
|
-
return markBoxed(inspect(String(obj)));
|
|
14956
|
-
}
|
|
14957
|
-
if (typeof window !== "undefined" && obj === window) {
|
|
14958
|
-
return "{ [object Window] }";
|
|
14959
|
-
}
|
|
14960
|
-
if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) {
|
|
14961
|
-
return "{ [object globalThis] }";
|
|
14962
|
-
}
|
|
14963
|
-
if (!isDate2(obj) && !isRegExp2(obj)) {
|
|
14964
|
-
var ys = arrObjKeys(obj, inspect);
|
|
14965
|
-
var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
14966
|
-
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
14967
|
-
var stringTag = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr3(obj), 8, -1) : protoTag ? "Object" : "";
|
|
14968
|
-
var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
14969
|
-
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
14970
|
-
if (ys.length === 0) {
|
|
14971
|
-
return tag + "{}";
|
|
14972
|
-
}
|
|
14973
|
-
if (indent) {
|
|
14974
|
-
return tag + "{" + indentedJoin(ys, indent) + "}";
|
|
14975
|
-
}
|
|
14976
|
-
return tag + "{ " + $join.call(ys, ", ") + " }";
|
|
14977
|
-
}
|
|
14978
|
-
return String(obj);
|
|
14979
|
-
};
|
|
14980
|
-
function wrapQuotes(s, defaultStyle, opts) {
|
|
14981
|
-
var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'";
|
|
14982
|
-
return quoteChar + s + quoteChar;
|
|
14983
|
-
}
|
|
14984
|
-
function quote(s) {
|
|
14985
|
-
return $replace.call(String(s), /"/g, """);
|
|
14986
|
-
}
|
|
14987
|
-
function isArray2(obj) {
|
|
14988
|
-
return toStr3(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
14989
|
-
}
|
|
14990
|
-
function isDate2(obj) {
|
|
14991
|
-
return toStr3(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
14992
|
-
}
|
|
14993
|
-
function isRegExp2(obj) {
|
|
14994
|
-
return toStr3(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
14995
|
-
}
|
|
14996
|
-
function isError(obj) {
|
|
14997
|
-
return toStr3(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
14998
|
-
}
|
|
14999
|
-
function isString3(obj) {
|
|
15000
|
-
return toStr3(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
15001
|
-
}
|
|
15002
|
-
function isNumber4(obj) {
|
|
15003
|
-
return toStr3(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
15004
|
-
}
|
|
15005
|
-
function isBoolean3(obj) {
|
|
15006
|
-
return toStr3(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
15007
|
-
}
|
|
15008
|
-
function isSymbol(obj) {
|
|
15009
|
-
if (hasShammedSymbols) {
|
|
15010
|
-
return obj && typeof obj === "object" && obj instanceof Symbol;
|
|
15011
|
-
}
|
|
15012
|
-
if (typeof obj === "symbol") {
|
|
15013
|
-
return true;
|
|
15014
|
-
}
|
|
15015
|
-
if (!obj || typeof obj !== "object" || !symToString) {
|
|
15016
|
-
return false;
|
|
15017
|
-
}
|
|
15018
|
-
try {
|
|
15019
|
-
symToString.call(obj);
|
|
15020
|
-
return true;
|
|
15021
|
-
} catch (e) {
|
|
15022
|
-
}
|
|
15023
|
-
return false;
|
|
15024
|
-
}
|
|
15025
|
-
function isBigInt2(obj) {
|
|
15026
|
-
if (!obj || typeof obj !== "object" || !bigIntValueOf) {
|
|
15027
|
-
return false;
|
|
15028
|
-
}
|
|
15029
|
-
try {
|
|
15030
|
-
bigIntValueOf.call(obj);
|
|
15031
|
-
return true;
|
|
15032
|
-
} catch (e) {
|
|
15033
|
-
}
|
|
15034
|
-
return false;
|
|
15035
|
-
}
|
|
15036
|
-
var hasOwn = Object.prototype.hasOwnProperty || function(key) {
|
|
15037
|
-
return key in this;
|
|
15038
|
-
};
|
|
15039
|
-
function has(obj, key) {
|
|
15040
|
-
return hasOwn.call(obj, key);
|
|
15041
|
-
}
|
|
15042
|
-
function toStr3(obj) {
|
|
15043
|
-
return objectToString.call(obj);
|
|
15044
|
-
}
|
|
15045
|
-
function nameOf(f) {
|
|
15046
|
-
if (f.name) {
|
|
15047
|
-
return f.name;
|
|
15048
|
-
}
|
|
15049
|
-
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
15050
|
-
if (m) {
|
|
15051
|
-
return m[1];
|
|
15052
|
-
}
|
|
15053
|
-
return null;
|
|
15054
|
-
}
|
|
15055
|
-
function indexOf(xs, x) {
|
|
15056
|
-
if (xs.indexOf) {
|
|
15057
|
-
return xs.indexOf(x);
|
|
15058
|
-
}
|
|
15059
|
-
for (var i = 0, l = xs.length; i < l; i++) {
|
|
15060
|
-
if (xs[i] === x) {
|
|
15061
|
-
return i;
|
|
15062
|
-
}
|
|
15063
|
-
}
|
|
15064
|
-
return -1;
|
|
15065
|
-
}
|
|
15066
|
-
function isMap(x) {
|
|
15067
|
-
if (!mapSize || !x || typeof x !== "object") {
|
|
15068
|
-
return false;
|
|
15069
|
-
}
|
|
15070
|
-
try {
|
|
15071
|
-
mapSize.call(x);
|
|
15072
|
-
try {
|
|
15073
|
-
setSize.call(x);
|
|
15074
|
-
} catch (s) {
|
|
15075
|
-
return true;
|
|
15076
|
-
}
|
|
15077
|
-
return x instanceof Map;
|
|
15078
|
-
} catch (e) {
|
|
15079
|
-
}
|
|
15080
|
-
return false;
|
|
15081
|
-
}
|
|
15082
|
-
function isWeakMap(x) {
|
|
15083
|
-
if (!weakMapHas || !x || typeof x !== "object") {
|
|
15084
|
-
return false;
|
|
15085
|
-
}
|
|
15086
|
-
try {
|
|
15087
|
-
weakMapHas.call(x, weakMapHas);
|
|
15088
|
-
try {
|
|
15089
|
-
weakSetHas.call(x, weakSetHas);
|
|
15090
|
-
} catch (s) {
|
|
15091
|
-
return true;
|
|
15092
|
-
}
|
|
15093
|
-
return x instanceof WeakMap;
|
|
15094
|
-
} catch (e) {
|
|
15095
|
-
}
|
|
15096
|
-
return false;
|
|
15097
|
-
}
|
|
15098
|
-
function isWeakRef(x) {
|
|
15099
|
-
if (!weakRefDeref || !x || typeof x !== "object") {
|
|
15100
|
-
return false;
|
|
15101
|
-
}
|
|
15102
|
-
try {
|
|
15103
|
-
weakRefDeref.call(x);
|
|
15104
|
-
return true;
|
|
15105
|
-
} catch (e) {
|
|
15106
|
-
}
|
|
15107
|
-
return false;
|
|
15108
|
-
}
|
|
15109
|
-
function isSet(x) {
|
|
15110
|
-
if (!setSize || !x || typeof x !== "object") {
|
|
15111
|
-
return false;
|
|
15112
|
-
}
|
|
15113
|
-
try {
|
|
15114
|
-
setSize.call(x);
|
|
15115
|
-
try {
|
|
15116
|
-
mapSize.call(x);
|
|
15117
|
-
} catch (m) {
|
|
15118
|
-
return true;
|
|
15119
|
-
}
|
|
15120
|
-
return x instanceof Set;
|
|
15121
|
-
} catch (e) {
|
|
15122
|
-
}
|
|
15123
|
-
return false;
|
|
15124
|
-
}
|
|
15125
|
-
function isWeakSet(x) {
|
|
15126
|
-
if (!weakSetHas || !x || typeof x !== "object") {
|
|
15127
|
-
return false;
|
|
15128
|
-
}
|
|
15129
|
-
try {
|
|
15130
|
-
weakSetHas.call(x, weakSetHas);
|
|
15131
|
-
try {
|
|
15132
|
-
weakMapHas.call(x, weakMapHas);
|
|
15133
|
-
} catch (s) {
|
|
15134
|
-
return true;
|
|
15135
|
-
}
|
|
15136
|
-
return x instanceof WeakSet;
|
|
15137
|
-
} catch (e) {
|
|
15138
|
-
}
|
|
15139
|
-
return false;
|
|
15140
|
-
}
|
|
15141
|
-
function isElement(x) {
|
|
15142
|
-
if (!x || typeof x !== "object") {
|
|
15143
|
-
return false;
|
|
15144
|
-
}
|
|
15145
|
-
if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
|
|
15146
|
-
return true;
|
|
15147
|
-
}
|
|
15148
|
-
return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
|
|
15149
|
-
}
|
|
15150
|
-
function inspectString(str, opts) {
|
|
15151
|
-
if (str.length > opts.maxStringLength) {
|
|
15152
|
-
var remaining = str.length - opts.maxStringLength;
|
|
15153
|
-
var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
|
|
15154
|
-
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
15155
|
-
}
|
|
15156
|
-
var s = $replace.call($replace.call(str, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte);
|
|
15157
|
-
return wrapQuotes(s, "single", opts);
|
|
15158
|
-
}
|
|
15159
|
-
function lowbyte(c) {
|
|
15160
|
-
var n = c.charCodeAt(0);
|
|
15161
|
-
var x = {
|
|
15162
|
-
8: "b",
|
|
15163
|
-
9: "t",
|
|
15164
|
-
10: "n",
|
|
15165
|
-
12: "f",
|
|
15166
|
-
13: "r"
|
|
15167
|
-
}[n];
|
|
15168
|
-
if (x) {
|
|
15169
|
-
return "\\" + x;
|
|
15170
|
-
}
|
|
15171
|
-
return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
|
|
15172
|
-
}
|
|
15173
|
-
function markBoxed(str) {
|
|
15174
|
-
return "Object(" + str + ")";
|
|
15175
|
-
}
|
|
15176
|
-
function weakCollectionOf(type) {
|
|
15177
|
-
return type + " { ? }";
|
|
15178
|
-
}
|
|
15179
|
-
function collectionOf(type, size, entries, indent) {
|
|
15180
|
-
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
|
|
15181
|
-
return type + " (" + size + ") {" + joinedEntries + "}";
|
|
15182
|
-
}
|
|
15183
|
-
function singleLineValues(xs) {
|
|
15184
|
-
for (var i = 0; i < xs.length; i++) {
|
|
15185
|
-
if (indexOf(xs[i], "\n") >= 0) {
|
|
15186
|
-
return false;
|
|
15187
|
-
}
|
|
15188
|
-
}
|
|
15189
|
-
return true;
|
|
15190
|
-
}
|
|
15191
|
-
function getIndent(opts, depth) {
|
|
15192
|
-
var baseIndent;
|
|
15193
|
-
if (opts.indent === " ") {
|
|
15194
|
-
baseIndent = " ";
|
|
15195
|
-
} else if (typeof opts.indent === "number" && opts.indent > 0) {
|
|
15196
|
-
baseIndent = $join.call(Array(opts.indent + 1), " ");
|
|
15197
|
-
} else {
|
|
15198
|
-
return null;
|
|
15199
|
-
}
|
|
15200
|
-
return {
|
|
15201
|
-
base: baseIndent,
|
|
15202
|
-
prev: $join.call(Array(depth + 1), baseIndent)
|
|
15203
|
-
};
|
|
15204
|
-
}
|
|
15205
|
-
function indentedJoin(xs, indent) {
|
|
15206
|
-
if (xs.length === 0) {
|
|
15207
|
-
return "";
|
|
15208
|
-
}
|
|
15209
|
-
var lineJoiner = "\n" + indent.prev + indent.base;
|
|
15210
|
-
return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
|
|
15211
|
-
}
|
|
15212
|
-
function arrObjKeys(obj, inspect) {
|
|
15213
|
-
var isArr = isArray2(obj);
|
|
15214
|
-
var xs = [];
|
|
15215
|
-
if (isArr) {
|
|
15216
|
-
xs.length = obj.length;
|
|
15217
|
-
for (var i = 0; i < obj.length; i++) {
|
|
15218
|
-
xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
|
|
15219
|
-
}
|
|
15220
|
-
}
|
|
15221
|
-
var syms = typeof gOPS === "function" ? gOPS(obj) : [];
|
|
15222
|
-
var symMap;
|
|
15223
|
-
if (hasShammedSymbols) {
|
|
15224
|
-
symMap = {};
|
|
15225
|
-
for (var k = 0; k < syms.length; k++) {
|
|
15226
|
-
symMap["$" + syms[k]] = syms[k];
|
|
15227
|
-
}
|
|
15228
|
-
}
|
|
15229
|
-
for (var key in obj) {
|
|
15230
|
-
if (!has(obj, key)) {
|
|
15231
|
-
continue;
|
|
15232
|
-
}
|
|
15233
|
-
if (isArr && String(Number(key)) === key && key < obj.length) {
|
|
15234
|
-
continue;
|
|
15235
|
-
}
|
|
15236
|
-
if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
|
|
15237
|
-
continue;
|
|
15238
|
-
} else if ($test.call(/[^\w$]/, key)) {
|
|
15239
|
-
xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
|
|
15240
|
-
} else {
|
|
15241
|
-
xs.push(key + ": " + inspect(obj[key], obj));
|
|
15242
|
-
}
|
|
15243
|
-
}
|
|
15244
|
-
if (typeof gOPS === "function") {
|
|
15245
|
-
for (var j = 0; j < syms.length; j++) {
|
|
15246
|
-
if (isEnumerable.call(obj, syms[j])) {
|
|
15247
|
-
xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
|
|
15248
|
-
}
|
|
15249
|
-
}
|
|
15250
|
-
}
|
|
15251
|
-
return xs;
|
|
15252
|
-
}
|
|
15253
|
-
}
|
|
15254
|
-
});
|
|
15255
|
-
|
|
15256
|
-
// node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.js
|
|
15257
|
-
var require_side_channel = __commonJS({
|
|
15258
|
-
"node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.js"(exports, module) {
|
|
15259
|
-
"use strict";
|
|
15260
|
-
var GetIntrinsic = require_get_intrinsic();
|
|
15261
|
-
var callBound = require_callBound();
|
|
15262
|
-
var inspect = require_object_inspect();
|
|
15263
|
-
var $TypeError = require_type();
|
|
15264
|
-
var $WeakMap = GetIntrinsic("%WeakMap%", true);
|
|
15265
|
-
var $Map = GetIntrinsic("%Map%", true);
|
|
15266
|
-
var $weakMapGet = callBound("WeakMap.prototype.get", true);
|
|
15267
|
-
var $weakMapSet = callBound("WeakMap.prototype.set", true);
|
|
15268
|
-
var $weakMapHas = callBound("WeakMap.prototype.has", true);
|
|
15269
|
-
var $mapGet = callBound("Map.prototype.get", true);
|
|
15270
|
-
var $mapSet = callBound("Map.prototype.set", true);
|
|
15271
|
-
var $mapHas = callBound("Map.prototype.has", true);
|
|
15272
|
-
var listGetNode = function(list, key) {
|
|
15273
|
-
var prev = list;
|
|
15274
|
-
var curr;
|
|
15275
|
-
for (; (curr = prev.next) !== null; prev = curr) {
|
|
15276
|
-
if (curr.key === key) {
|
|
15277
|
-
prev.next = curr.next;
|
|
15278
|
-
curr.next = /** @type {NonNullable<typeof list.next>} */
|
|
15279
|
-
list.next;
|
|
15280
|
-
list.next = curr;
|
|
15281
|
-
return curr;
|
|
15282
|
-
}
|
|
15283
|
-
}
|
|
15284
|
-
};
|
|
15285
|
-
var listGet = function(objects, key) {
|
|
15286
|
-
var node = listGetNode(objects, key);
|
|
15287
|
-
return node && node.value;
|
|
15288
|
-
};
|
|
15289
|
-
var listSet = function(objects, key, value) {
|
|
15290
|
-
var node = listGetNode(objects, key);
|
|
15291
|
-
if (node) {
|
|
15292
|
-
node.value = value;
|
|
15293
|
-
} else {
|
|
15294
|
-
objects.next = /** @type {import('.').ListNode<typeof value>} */
|
|
15295
|
-
{
|
|
15296
|
-
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
15297
|
-
key,
|
|
15298
|
-
next: objects.next,
|
|
15299
|
-
value
|
|
15300
|
-
};
|
|
15301
|
-
}
|
|
15302
|
-
};
|
|
15303
|
-
var listHas = function(objects, key) {
|
|
15304
|
-
return !!listGetNode(objects, key);
|
|
15305
|
-
};
|
|
15306
|
-
module.exports = function getSideChannel() {
|
|
15307
|
-
var $wm;
|
|
15308
|
-
var $m;
|
|
15309
|
-
var $o;
|
|
15310
|
-
var channel = {
|
|
15311
|
-
assert: function(key) {
|
|
15312
|
-
if (!channel.has(key)) {
|
|
15313
|
-
throw new $TypeError("Side channel does not contain " + inspect(key));
|
|
15314
|
-
}
|
|
15315
|
-
},
|
|
15316
|
-
get: function(key) {
|
|
15317
|
-
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
15318
|
-
if ($wm) {
|
|
15319
|
-
return $weakMapGet($wm, key);
|
|
15320
|
-
}
|
|
15321
|
-
} else if ($Map) {
|
|
15322
|
-
if ($m) {
|
|
15323
|
-
return $mapGet($m, key);
|
|
15324
|
-
}
|
|
15325
|
-
} else {
|
|
15326
|
-
if ($o) {
|
|
15327
|
-
return listGet($o, key);
|
|
15328
|
-
}
|
|
15329
|
-
}
|
|
15330
|
-
},
|
|
15331
|
-
has: function(key) {
|
|
15332
|
-
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
15333
|
-
if ($wm) {
|
|
15334
|
-
return $weakMapHas($wm, key);
|
|
15335
|
-
}
|
|
15336
|
-
} else if ($Map) {
|
|
15337
|
-
if ($m) {
|
|
15338
|
-
return $mapHas($m, key);
|
|
15339
|
-
}
|
|
15340
|
-
} else {
|
|
15341
|
-
if ($o) {
|
|
15342
|
-
return listHas($o, key);
|
|
15343
|
-
}
|
|
15344
|
-
}
|
|
15345
|
-
return false;
|
|
15346
|
-
},
|
|
15347
|
-
set: function(key, value) {
|
|
15348
|
-
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
15349
|
-
if (!$wm) {
|
|
15350
|
-
$wm = new $WeakMap();
|
|
15351
|
-
}
|
|
15352
|
-
$weakMapSet($wm, key, value);
|
|
15353
|
-
} else if ($Map) {
|
|
15354
|
-
if (!$m) {
|
|
15355
|
-
$m = new $Map();
|
|
15356
|
-
}
|
|
15357
|
-
$mapSet($m, key, value);
|
|
15358
|
-
} else {
|
|
15359
|
-
if (!$o) {
|
|
15360
|
-
$o = { key: {}, next: null };
|
|
15361
|
-
}
|
|
15362
|
-
listSet($o, key, value);
|
|
15363
|
-
}
|
|
15364
|
-
}
|
|
15365
|
-
};
|
|
15366
|
-
return channel;
|
|
15367
|
-
};
|
|
15368
|
-
}
|
|
15369
|
-
});
|
|
15370
|
-
|
|
15371
|
-
// node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/formats.js
|
|
15372
|
-
var require_formats = __commonJS({
|
|
15373
|
-
"node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/formats.js"(exports, module) {
|
|
15374
|
-
"use strict";
|
|
15375
|
-
var replace = String.prototype.replace;
|
|
15376
|
-
var percentTwenties = /%20/g;
|
|
15377
|
-
var Format = {
|
|
15378
|
-
RFC1738: "RFC1738",
|
|
15379
|
-
RFC3986: "RFC3986"
|
|
15380
|
-
};
|
|
15381
|
-
module.exports = {
|
|
15382
|
-
"default": Format.RFC3986,
|
|
15383
|
-
formatters: {
|
|
15384
|
-
RFC1738: function(value) {
|
|
15385
|
-
return replace.call(value, percentTwenties, "+");
|
|
15386
|
-
},
|
|
15387
|
-
RFC3986: function(value) {
|
|
15388
|
-
return String(value);
|
|
15389
|
-
}
|
|
15390
|
-
},
|
|
15391
|
-
RFC1738: Format.RFC1738,
|
|
15392
|
-
RFC3986: Format.RFC3986
|
|
15393
|
-
};
|
|
15394
|
-
}
|
|
15395
|
-
});
|
|
15396
|
-
|
|
15397
|
-
// node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/utils.js
|
|
15398
|
-
var require_utils = __commonJS({
|
|
15399
|
-
"node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/utils.js"(exports, module) {
|
|
15400
|
-
"use strict";
|
|
15401
|
-
var formats = require_formats();
|
|
15402
|
-
var has = Object.prototype.hasOwnProperty;
|
|
15403
|
-
var isArray2 = Array.isArray;
|
|
15404
|
-
var hexTable = function() {
|
|
15405
|
-
var array = [];
|
|
15406
|
-
for (var i = 0; i < 256; ++i) {
|
|
15407
|
-
array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase());
|
|
15408
|
-
}
|
|
15409
|
-
return array;
|
|
15410
|
-
}();
|
|
15411
|
-
var compactQueue = function compactQueue2(queue) {
|
|
15412
|
-
while (queue.length > 1) {
|
|
15413
|
-
var item = queue.pop();
|
|
15414
|
-
var obj = item.obj[item.prop];
|
|
15415
|
-
if (isArray2(obj)) {
|
|
15416
|
-
var compacted = [];
|
|
15417
|
-
for (var j = 0; j < obj.length; ++j) {
|
|
15418
|
-
if (typeof obj[j] !== "undefined") {
|
|
15419
|
-
compacted.push(obj[j]);
|
|
15420
|
-
}
|
|
15421
|
-
}
|
|
15422
|
-
item.obj[item.prop] = compacted;
|
|
15423
|
-
}
|
|
15424
|
-
}
|
|
15425
|
-
};
|
|
15426
|
-
var arrayToObject2 = function arrayToObject3(source, options) {
|
|
15427
|
-
var obj = options && options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
15428
|
-
for (var i = 0; i < source.length; ++i) {
|
|
15429
|
-
if (typeof source[i] !== "undefined") {
|
|
15430
|
-
obj[i] = source[i];
|
|
15431
|
-
}
|
|
15432
|
-
}
|
|
15433
|
-
return obj;
|
|
15434
|
-
};
|
|
15435
|
-
var merge2 = function merge3(target, source, options) {
|
|
15436
|
-
if (!source) {
|
|
15437
|
-
return target;
|
|
15438
|
-
}
|
|
15439
|
-
if (typeof source !== "object") {
|
|
15440
|
-
if (isArray2(target)) {
|
|
15441
|
-
target.push(source);
|
|
15442
|
-
} else if (target && typeof target === "object") {
|
|
15443
|
-
if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
|
|
15444
|
-
target[source] = true;
|
|
15445
|
-
}
|
|
15446
|
-
} else {
|
|
15447
|
-
return [target, source];
|
|
15448
|
-
}
|
|
15449
|
-
return target;
|
|
15450
|
-
}
|
|
15451
|
-
if (!target || typeof target !== "object") {
|
|
15452
|
-
return [target].concat(source);
|
|
15453
|
-
}
|
|
15454
|
-
var mergeTarget = target;
|
|
15455
|
-
if (isArray2(target) && !isArray2(source)) {
|
|
15456
|
-
mergeTarget = arrayToObject2(target, options);
|
|
15457
|
-
}
|
|
15458
|
-
if (isArray2(target) && isArray2(source)) {
|
|
15459
|
-
source.forEach(function(item, i) {
|
|
15460
|
-
if (has.call(target, i)) {
|
|
15461
|
-
var targetItem = target[i];
|
|
15462
|
-
if (targetItem && typeof targetItem === "object" && item && typeof item === "object") {
|
|
15463
|
-
target[i] = merge3(targetItem, item, options);
|
|
15464
|
-
} else {
|
|
15465
|
-
target.push(item);
|
|
15466
|
-
}
|
|
15467
|
-
} else {
|
|
15468
|
-
target[i] = item;
|
|
15469
|
-
}
|
|
15470
|
-
});
|
|
15471
|
-
return target;
|
|
15472
|
-
}
|
|
15473
|
-
return Object.keys(source).reduce(function(acc, key) {
|
|
15474
|
-
var value = source[key];
|
|
15475
|
-
if (has.call(acc, key)) {
|
|
15476
|
-
acc[key] = merge3(acc[key], value, options);
|
|
15477
|
-
} else {
|
|
15478
|
-
acc[key] = value;
|
|
15479
|
-
}
|
|
15480
|
-
return acc;
|
|
15481
|
-
}, mergeTarget);
|
|
15482
|
-
};
|
|
15483
|
-
var assign2 = function assignSingleSource(target, source) {
|
|
15484
|
-
return Object.keys(source).reduce(function(acc, key) {
|
|
15485
|
-
acc[key] = source[key];
|
|
15486
|
-
return acc;
|
|
15487
|
-
}, target);
|
|
15488
|
-
};
|
|
15489
|
-
var decode3 = function(str, decoder, charset) {
|
|
15490
|
-
var strWithoutPlus = str.replace(/\+/g, " ");
|
|
15491
|
-
if (charset === "iso-8859-1") {
|
|
15492
|
-
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
15493
|
-
}
|
|
15494
|
-
try {
|
|
15495
|
-
return decodeURIComponent(strWithoutPlus);
|
|
15496
|
-
} catch (e) {
|
|
15497
|
-
return strWithoutPlus;
|
|
15498
|
-
}
|
|
15499
|
-
};
|
|
15500
|
-
var encode4 = function encode5(str, defaultEncoder, charset, kind, format) {
|
|
15501
|
-
if (str.length === 0) {
|
|
15502
|
-
return str;
|
|
15503
|
-
}
|
|
15504
|
-
var string = str;
|
|
15505
|
-
if (typeof str === "symbol") {
|
|
15506
|
-
string = Symbol.prototype.toString.call(str);
|
|
15507
|
-
} else if (typeof str !== "string") {
|
|
15508
|
-
string = String(str);
|
|
15509
|
-
}
|
|
15510
|
-
if (charset === "iso-8859-1") {
|
|
15511
|
-
return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
|
|
15512
|
-
return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
|
|
15513
|
-
});
|
|
15514
|
-
}
|
|
15515
|
-
var out = "";
|
|
15516
|
-
for (var i = 0; i < string.length; ++i) {
|
|
15517
|
-
var c = string.charCodeAt(i);
|
|
15518
|
-
if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) {
|
|
15519
|
-
out += string.charAt(i);
|
|
15520
|
-
continue;
|
|
15521
|
-
}
|
|
15522
|
-
if (c < 128) {
|
|
15523
|
-
out = out + hexTable[c];
|
|
15524
|
-
continue;
|
|
15525
|
-
}
|
|
15526
|
-
if (c < 2048) {
|
|
15527
|
-
out = out + (hexTable[192 | c >> 6] + hexTable[128 | c & 63]);
|
|
15528
|
-
continue;
|
|
15529
|
-
}
|
|
15530
|
-
if (c < 55296 || c >= 57344) {
|
|
15531
|
-
out = out + (hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]);
|
|
15532
|
-
continue;
|
|
15533
|
-
}
|
|
15534
|
-
i += 1;
|
|
15535
|
-
c = 65536 + ((c & 1023) << 10 | string.charCodeAt(i) & 1023);
|
|
15536
|
-
out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
15537
|
-
}
|
|
15538
|
-
return out;
|
|
15539
|
-
};
|
|
15540
|
-
var compact = function compact2(value) {
|
|
15541
|
-
var queue = [{ obj: { o: value }, prop: "o" }];
|
|
15542
|
-
var refs = [];
|
|
15543
|
-
for (var i = 0; i < queue.length; ++i) {
|
|
15544
|
-
var item = queue[i];
|
|
15545
|
-
var obj = item.obj[item.prop];
|
|
15546
|
-
var keys = Object.keys(obj);
|
|
15547
|
-
for (var j = 0; j < keys.length; ++j) {
|
|
15548
|
-
var key = keys[j];
|
|
15549
|
-
var val = obj[key];
|
|
15550
|
-
if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) {
|
|
15551
|
-
queue.push({ obj, prop: key });
|
|
15552
|
-
refs.push(val);
|
|
15553
|
-
}
|
|
15554
|
-
}
|
|
15555
|
-
}
|
|
15556
|
-
compactQueue(queue);
|
|
15557
|
-
return value;
|
|
15558
|
-
};
|
|
15559
|
-
var isRegExp2 = function isRegExp3(obj) {
|
|
15560
|
-
return Object.prototype.toString.call(obj) === "[object RegExp]";
|
|
15561
|
-
};
|
|
15562
|
-
var isBuffer2 = function isBuffer3(obj) {
|
|
15563
|
-
if (!obj || typeof obj !== "object") {
|
|
15564
|
-
return false;
|
|
15565
|
-
}
|
|
15566
|
-
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
15567
|
-
};
|
|
15568
|
-
var combine = function combine2(a, b) {
|
|
15569
|
-
return [].concat(a, b);
|
|
15570
|
-
};
|
|
15571
|
-
var maybeMap = function maybeMap2(val, fn) {
|
|
15572
|
-
if (isArray2(val)) {
|
|
15573
|
-
var mapped = [];
|
|
15574
|
-
for (var i = 0; i < val.length; i += 1) {
|
|
15575
|
-
mapped.push(fn(val[i]));
|
|
15576
|
-
}
|
|
15577
|
-
return mapped;
|
|
15578
|
-
}
|
|
15579
|
-
return fn(val);
|
|
15580
|
-
};
|
|
15581
|
-
module.exports = {
|
|
15582
|
-
arrayToObject: arrayToObject2,
|
|
15583
|
-
assign: assign2,
|
|
15584
|
-
combine,
|
|
15585
|
-
compact,
|
|
15586
|
-
decode: decode3,
|
|
15587
|
-
encode: encode4,
|
|
15588
|
-
isBuffer: isBuffer2,
|
|
15589
|
-
isRegExp: isRegExp2,
|
|
15590
|
-
maybeMap,
|
|
15591
|
-
merge: merge2
|
|
15592
|
-
};
|
|
15593
|
-
}
|
|
15594
|
-
});
|
|
15595
|
-
|
|
15596
|
-
// node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/stringify.js
|
|
15597
|
-
var require_stringify = __commonJS({
|
|
15598
|
-
"node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/stringify.js"(exports, module) {
|
|
15599
|
-
"use strict";
|
|
15600
|
-
var getSideChannel = require_side_channel();
|
|
15601
|
-
var utils2 = require_utils();
|
|
15602
|
-
var formats = require_formats();
|
|
15603
|
-
var has = Object.prototype.hasOwnProperty;
|
|
15604
|
-
var arrayPrefixGenerators = {
|
|
15605
|
-
brackets: function brackets(prefix) {
|
|
15606
|
-
return prefix + "[]";
|
|
15607
|
-
},
|
|
15608
|
-
comma: "comma",
|
|
15609
|
-
indices: function indices(prefix, key) {
|
|
15610
|
-
return prefix + "[" + key + "]";
|
|
15611
|
-
},
|
|
15612
|
-
repeat: function repeat(prefix) {
|
|
15613
|
-
return prefix;
|
|
15614
|
-
}
|
|
15615
|
-
};
|
|
15616
|
-
var isArray2 = Array.isArray;
|
|
15617
|
-
var split3 = String.prototype.split;
|
|
15618
|
-
var push = Array.prototype.push;
|
|
15619
|
-
var pushToArray = function(arr, valueOrArray) {
|
|
15620
|
-
push.apply(arr, isArray2(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
15621
|
-
};
|
|
15622
|
-
var toISO = Date.prototype.toISOString;
|
|
15623
|
-
var defaultFormat = formats["default"];
|
|
15624
|
-
var defaults2 = {
|
|
15625
|
-
addQueryPrefix: false,
|
|
15626
|
-
allowDots: false,
|
|
15627
|
-
charset: "utf-8",
|
|
15628
|
-
charsetSentinel: false,
|
|
15629
|
-
delimiter: "&",
|
|
15630
|
-
encode: true,
|
|
15631
|
-
encoder: utils2.encode,
|
|
15632
|
-
encodeValuesOnly: false,
|
|
15633
|
-
format: defaultFormat,
|
|
15634
|
-
formatter: formats.formatters[defaultFormat],
|
|
15635
|
-
// deprecated
|
|
15636
|
-
indices: false,
|
|
15637
|
-
serializeDate: function serializeDate(date) {
|
|
15638
|
-
return toISO.call(date);
|
|
15639
|
-
},
|
|
15640
|
-
skipNulls: false,
|
|
15641
|
-
strictNullHandling: false
|
|
15642
|
-
};
|
|
15643
|
-
var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
|
|
15644
|
-
return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
|
|
15645
|
-
};
|
|
15646
|
-
var sentinel = {};
|
|
15647
|
-
var stringify3 = function stringify4(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter2, sort, allowDots, serializeDate, format, formatter2, encodeValuesOnly, charset, sideChannel) {
|
|
15648
|
-
var obj = object;
|
|
15649
|
-
var tmpSc = sideChannel;
|
|
15650
|
-
var step = 0;
|
|
15651
|
-
var findFlag = false;
|
|
15652
|
-
while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
|
|
15653
|
-
var pos = tmpSc.get(object);
|
|
15654
|
-
step += 1;
|
|
15655
|
-
if (typeof pos !== "undefined") {
|
|
15656
|
-
if (pos === step) {
|
|
15657
|
-
throw new RangeError("Cyclic object value");
|
|
15658
|
-
} else {
|
|
15659
|
-
findFlag = true;
|
|
15660
|
-
}
|
|
15661
|
-
}
|
|
15662
|
-
if (typeof tmpSc.get(sentinel) === "undefined") {
|
|
15663
|
-
step = 0;
|
|
15664
|
-
}
|
|
15665
|
-
}
|
|
15666
|
-
if (typeof filter2 === "function") {
|
|
15667
|
-
obj = filter2(prefix, obj);
|
|
15668
|
-
} else if (obj instanceof Date) {
|
|
15669
|
-
obj = serializeDate(obj);
|
|
15670
|
-
} else if (generateArrayPrefix === "comma" && isArray2(obj)) {
|
|
15671
|
-
obj = utils2.maybeMap(obj, function(value2) {
|
|
15672
|
-
if (value2 instanceof Date) {
|
|
15673
|
-
return serializeDate(value2);
|
|
15674
|
-
}
|
|
15675
|
-
return value2;
|
|
15676
|
-
});
|
|
15677
|
-
}
|
|
15678
|
-
if (obj === null) {
|
|
15679
|
-
if (strictNullHandling) {
|
|
15680
|
-
return encoder && !encodeValuesOnly ? encoder(prefix, defaults2.encoder, charset, "key", format) : prefix;
|
|
15681
|
-
}
|
|
15682
|
-
obj = "";
|
|
15683
|
-
}
|
|
15684
|
-
if (isNonNullishPrimitive(obj) || utils2.isBuffer(obj)) {
|
|
15685
|
-
if (encoder) {
|
|
15686
|
-
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults2.encoder, charset, "key", format);
|
|
15687
|
-
if (generateArrayPrefix === "comma" && encodeValuesOnly) {
|
|
15688
|
-
var valuesArray = split3.call(String(obj), ",");
|
|
15689
|
-
var valuesJoined = "";
|
|
15690
|
-
for (var i = 0; i < valuesArray.length; ++i) {
|
|
15691
|
-
valuesJoined += (i === 0 ? "" : ",") + formatter2(encoder(valuesArray[i], defaults2.encoder, charset, "value", format));
|
|
15692
|
-
}
|
|
15693
|
-
return [formatter2(keyValue) + (i === 1 ? "[]" : "") + "=" + valuesJoined];
|
|
15694
|
-
}
|
|
15695
|
-
return [formatter2(keyValue) + "=" + formatter2(encoder(obj, defaults2.encoder, charset, "value", format))];
|
|
15696
|
-
}
|
|
15697
|
-
return [formatter2(prefix) + "=" + formatter2(String(obj))];
|
|
15698
|
-
}
|
|
15699
|
-
var values = [];
|
|
15700
|
-
if (typeof obj === "undefined") {
|
|
15701
|
-
return values;
|
|
15702
|
-
}
|
|
15703
|
-
var objKeys;
|
|
15704
|
-
if (generateArrayPrefix === "comma" && isArray2(obj)) {
|
|
15705
|
-
objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
|
|
15706
|
-
} else if (isArray2(filter2)) {
|
|
15707
|
-
objKeys = filter2;
|
|
15708
|
-
} else {
|
|
15709
|
-
var keys = Object.keys(obj);
|
|
15710
|
-
objKeys = sort ? keys.sort(sort) : keys;
|
|
15711
|
-
}
|
|
15712
|
-
for (var j = 0; j < objKeys.length; ++j) {
|
|
15713
|
-
var key = objKeys[j];
|
|
15714
|
-
var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key];
|
|
15715
|
-
if (skipNulls && value === null) {
|
|
15716
|
-
continue;
|
|
15717
|
-
}
|
|
15718
|
-
var keyPrefix = isArray2(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(prefix, key) : prefix : prefix + (allowDots ? "." + key : "[" + key + "]");
|
|
15719
|
-
sideChannel.set(object, step);
|
|
15720
|
-
var valueSideChannel = getSideChannel();
|
|
15721
|
-
valueSideChannel.set(sentinel, sideChannel);
|
|
15722
|
-
pushToArray(values, stringify4(
|
|
15723
|
-
value,
|
|
15724
|
-
keyPrefix,
|
|
15725
|
-
generateArrayPrefix,
|
|
15726
|
-
strictNullHandling,
|
|
15727
|
-
skipNulls,
|
|
15728
|
-
encoder,
|
|
15729
|
-
filter2,
|
|
15730
|
-
sort,
|
|
15731
|
-
allowDots,
|
|
15732
|
-
serializeDate,
|
|
15733
|
-
format,
|
|
15734
|
-
formatter2,
|
|
15735
|
-
encodeValuesOnly,
|
|
15736
|
-
charset,
|
|
15737
|
-
valueSideChannel
|
|
15738
|
-
));
|
|
15739
|
-
}
|
|
15740
|
-
return values;
|
|
15741
|
-
};
|
|
15742
|
-
var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
|
|
15743
|
-
if (!opts) {
|
|
15744
|
-
return defaults2;
|
|
15745
|
-
}
|
|
15746
|
-
if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
|
|
15747
|
-
throw new TypeError("Encoder has to be a function.");
|
|
15748
|
-
}
|
|
15749
|
-
var charset = opts.charset || defaults2.charset;
|
|
15750
|
-
if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
|
|
15751
|
-
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
15752
|
-
}
|
|
15753
|
-
var format = formats["default"];
|
|
15754
|
-
if (typeof opts.format !== "undefined") {
|
|
15755
|
-
if (!has.call(formats.formatters, opts.format)) {
|
|
15756
|
-
throw new TypeError("Unknown format option provided.");
|
|
15757
|
-
}
|
|
15758
|
-
format = opts.format;
|
|
15759
|
-
}
|
|
15760
|
-
var formatter2 = formats.formatters[format];
|
|
15761
|
-
var filter2 = defaults2.filter;
|
|
15762
|
-
if (typeof opts.filter === "function" || isArray2(opts.filter)) {
|
|
15763
|
-
filter2 = opts.filter;
|
|
15764
|
-
}
|
|
15765
|
-
return {
|
|
15766
|
-
addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults2.addQueryPrefix,
|
|
15767
|
-
allowDots: typeof opts.allowDots === "undefined" ? defaults2.allowDots : !!opts.allowDots,
|
|
15768
|
-
charset,
|
|
15769
|
-
charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults2.charsetSentinel,
|
|
15770
|
-
delimiter: typeof opts.delimiter === "undefined" ? defaults2.delimiter : opts.delimiter,
|
|
15771
|
-
encode: typeof opts.encode === "boolean" ? opts.encode : defaults2.encode,
|
|
15772
|
-
encoder: typeof opts.encoder === "function" ? opts.encoder : defaults2.encoder,
|
|
15773
|
-
encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults2.encodeValuesOnly,
|
|
15774
|
-
filter: filter2,
|
|
15775
|
-
format,
|
|
15776
|
-
formatter: formatter2,
|
|
15777
|
-
serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults2.serializeDate,
|
|
15778
|
-
skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults2.skipNulls,
|
|
15779
|
-
sort: typeof opts.sort === "function" ? opts.sort : null,
|
|
15780
|
-
strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults2.strictNullHandling
|
|
15781
|
-
};
|
|
15782
|
-
};
|
|
15783
|
-
module.exports = function(object, opts) {
|
|
15784
|
-
var obj = object;
|
|
15785
|
-
var options = normalizeStringifyOptions(opts);
|
|
15786
|
-
var objKeys;
|
|
15787
|
-
var filter2;
|
|
15788
|
-
if (typeof options.filter === "function") {
|
|
15789
|
-
filter2 = options.filter;
|
|
15790
|
-
obj = filter2("", obj);
|
|
15791
|
-
} else if (isArray2(options.filter)) {
|
|
15792
|
-
filter2 = options.filter;
|
|
15793
|
-
objKeys = filter2;
|
|
15794
|
-
}
|
|
15795
|
-
var keys = [];
|
|
15796
|
-
if (typeof obj !== "object" || obj === null) {
|
|
15797
|
-
return "";
|
|
15798
|
-
}
|
|
15799
|
-
var arrayFormat;
|
|
15800
|
-
if (opts && opts.arrayFormat in arrayPrefixGenerators) {
|
|
15801
|
-
arrayFormat = opts.arrayFormat;
|
|
15802
|
-
} else if (opts && "indices" in opts) {
|
|
15803
|
-
arrayFormat = opts.indices ? "indices" : "repeat";
|
|
15804
|
-
} else {
|
|
15805
|
-
arrayFormat = "indices";
|
|
15806
|
-
}
|
|
15807
|
-
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
|
15808
|
-
if (!objKeys) {
|
|
15809
|
-
objKeys = Object.keys(obj);
|
|
15810
|
-
}
|
|
15811
|
-
if (options.sort) {
|
|
15812
|
-
objKeys.sort(options.sort);
|
|
15813
|
-
}
|
|
15814
|
-
var sideChannel = getSideChannel();
|
|
15815
|
-
for (var i = 0; i < objKeys.length; ++i) {
|
|
15816
|
-
var key = objKeys[i];
|
|
15817
|
-
if (options.skipNulls && obj[key] === null) {
|
|
15818
|
-
continue;
|
|
15819
|
-
}
|
|
15820
|
-
pushToArray(keys, stringify3(
|
|
15821
|
-
obj[key],
|
|
15822
|
-
key,
|
|
15823
|
-
generateArrayPrefix,
|
|
15824
|
-
options.strictNullHandling,
|
|
15825
|
-
options.skipNulls,
|
|
15826
|
-
options.encode ? options.encoder : null,
|
|
15827
|
-
options.filter,
|
|
15828
|
-
options.sort,
|
|
15829
|
-
options.allowDots,
|
|
15830
|
-
options.serializeDate,
|
|
15831
|
-
options.format,
|
|
15832
|
-
options.formatter,
|
|
15833
|
-
options.encodeValuesOnly,
|
|
15834
|
-
options.charset,
|
|
15835
|
-
sideChannel
|
|
15836
|
-
));
|
|
15837
|
-
}
|
|
15838
|
-
var joined = keys.join(options.delimiter);
|
|
15839
|
-
var prefix = options.addQueryPrefix === true ? "?" : "";
|
|
15840
|
-
if (options.charsetSentinel) {
|
|
15841
|
-
if (options.charset === "iso-8859-1") {
|
|
15842
|
-
prefix += "utf8=%26%2310003%3B&";
|
|
15843
|
-
} else {
|
|
15844
|
-
prefix += "utf8=%E2%9C%93&";
|
|
15845
|
-
}
|
|
15846
|
-
}
|
|
15847
|
-
return joined.length > 0 ? prefix + joined : "";
|
|
15848
|
-
};
|
|
15849
|
-
}
|
|
15850
|
-
});
|
|
15851
|
-
|
|
15852
|
-
// node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/parse.js
|
|
15853
|
-
var require_parse = __commonJS({
|
|
15854
|
-
"node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/parse.js"(exports, module) {
|
|
15855
|
-
"use strict";
|
|
15856
|
-
var utils2 = require_utils();
|
|
15857
|
-
var has = Object.prototype.hasOwnProperty;
|
|
15858
|
-
var isArray2 = Array.isArray;
|
|
15859
|
-
var defaults2 = {
|
|
15860
|
-
allowDots: false,
|
|
15861
|
-
allowPrototypes: false,
|
|
15862
|
-
allowSparse: false,
|
|
15863
|
-
arrayLimit: 20,
|
|
15864
|
-
charset: "utf-8",
|
|
15865
|
-
charsetSentinel: false,
|
|
15866
|
-
comma: false,
|
|
15867
|
-
decoder: utils2.decode,
|
|
15868
|
-
delimiter: "&",
|
|
15869
|
-
depth: 5,
|
|
15870
|
-
ignoreQueryPrefix: false,
|
|
15871
|
-
interpretNumericEntities: false,
|
|
15872
|
-
parameterLimit: 1e3,
|
|
15873
|
-
parseArrays: true,
|
|
15874
|
-
plainObjects: false,
|
|
15875
|
-
strictNullHandling: false
|
|
15876
|
-
};
|
|
15877
|
-
var interpretNumericEntities = function(str) {
|
|
15878
|
-
return str.replace(/&#(\d+);/g, function($0, numberStr) {
|
|
15879
|
-
return String.fromCharCode(parseInt(numberStr, 10));
|
|
15880
|
-
});
|
|
15881
|
-
};
|
|
15882
|
-
var parseArrayValue = function(val, options) {
|
|
15883
|
-
if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
|
|
15884
|
-
return val.split(",");
|
|
15885
|
-
}
|
|
15886
|
-
return val;
|
|
15887
|
-
};
|
|
15888
|
-
var isoSentinel = "utf8=%26%2310003%3B";
|
|
15889
|
-
var charsetSentinel = "utf8=%E2%9C%93";
|
|
15890
|
-
var parseValues = function parseQueryStringValues(str, options) {
|
|
15891
|
-
var obj = {};
|
|
15892
|
-
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
|
|
15893
|
-
var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
|
|
15894
|
-
var parts = cleanStr.split(options.delimiter, limit);
|
|
15895
|
-
var skipIndex = -1;
|
|
15896
|
-
var i;
|
|
15897
|
-
var charset = options.charset;
|
|
15898
|
-
if (options.charsetSentinel) {
|
|
15899
|
-
for (i = 0; i < parts.length; ++i) {
|
|
15900
|
-
if (parts[i].indexOf("utf8=") === 0) {
|
|
15901
|
-
if (parts[i] === charsetSentinel) {
|
|
15902
|
-
charset = "utf-8";
|
|
15903
|
-
} else if (parts[i] === isoSentinel) {
|
|
15904
|
-
charset = "iso-8859-1";
|
|
15905
|
-
}
|
|
15906
|
-
skipIndex = i;
|
|
15907
|
-
i = parts.length;
|
|
15908
|
-
}
|
|
15909
|
-
}
|
|
15910
|
-
}
|
|
15911
|
-
for (i = 0; i < parts.length; ++i) {
|
|
15912
|
-
if (i === skipIndex) {
|
|
15913
|
-
continue;
|
|
15914
|
-
}
|
|
15915
|
-
var part = parts[i];
|
|
15916
|
-
var bracketEqualsPos = part.indexOf("]=");
|
|
15917
|
-
var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
|
|
15918
|
-
var key, val;
|
|
15919
|
-
if (pos === -1) {
|
|
15920
|
-
key = options.decoder(part, defaults2.decoder, charset, "key");
|
|
15921
|
-
val = options.strictNullHandling ? null : "";
|
|
15922
|
-
} else {
|
|
15923
|
-
key = options.decoder(part.slice(0, pos), defaults2.decoder, charset, "key");
|
|
15924
|
-
val = utils2.maybeMap(
|
|
15925
|
-
parseArrayValue(part.slice(pos + 1), options),
|
|
15926
|
-
function(encodedVal) {
|
|
15927
|
-
return options.decoder(encodedVal, defaults2.decoder, charset, "value");
|
|
15928
|
-
}
|
|
15929
|
-
);
|
|
15930
|
-
}
|
|
15931
|
-
if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
|
|
15932
|
-
val = interpretNumericEntities(val);
|
|
15933
|
-
}
|
|
15934
|
-
if (part.indexOf("[]=") > -1) {
|
|
15935
|
-
val = isArray2(val) ? [val] : val;
|
|
15936
|
-
}
|
|
15937
|
-
if (has.call(obj, key)) {
|
|
15938
|
-
obj[key] = utils2.combine(obj[key], val);
|
|
15939
|
-
} else {
|
|
15940
|
-
obj[key] = val;
|
|
15941
|
-
}
|
|
15942
|
-
}
|
|
15943
|
-
return obj;
|
|
15944
|
-
};
|
|
15945
|
-
var parseObject = function(chain2, val, options, valuesParsed) {
|
|
15946
|
-
var leaf = valuesParsed ? val : parseArrayValue(val, options);
|
|
15947
|
-
for (var i = chain2.length - 1; i >= 0; --i) {
|
|
15948
|
-
var obj;
|
|
15949
|
-
var root = chain2[i];
|
|
15950
|
-
if (root === "[]" && options.parseArrays) {
|
|
15951
|
-
obj = [].concat(leaf);
|
|
15952
|
-
} else {
|
|
15953
|
-
obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
15954
|
-
var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
|
|
15955
|
-
var index = parseInt(cleanRoot, 10);
|
|
15956
|
-
if (!options.parseArrays && cleanRoot === "") {
|
|
15957
|
-
obj = { 0: leaf };
|
|
15958
|
-
} else if (!isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
|
|
15959
|
-
obj = [];
|
|
15960
|
-
obj[index] = leaf;
|
|
15961
|
-
} else if (cleanRoot !== "__proto__") {
|
|
15962
|
-
obj[cleanRoot] = leaf;
|
|
15963
|
-
}
|
|
15964
|
-
}
|
|
15965
|
-
leaf = obj;
|
|
15966
|
-
}
|
|
15967
|
-
return leaf;
|
|
15968
|
-
};
|
|
15969
|
-
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
15970
|
-
if (!givenKey) {
|
|
15971
|
-
return;
|
|
15972
|
-
}
|
|
15973
|
-
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
|
|
15974
|
-
var brackets = /(\[[^[\]]*])/;
|
|
15975
|
-
var child = /(\[[^[\]]*])/g;
|
|
15976
|
-
var segment = options.depth > 0 && brackets.exec(key);
|
|
15977
|
-
var parent = segment ? key.slice(0, segment.index) : key;
|
|
15978
|
-
var keys = [];
|
|
15979
|
-
if (parent) {
|
|
15980
|
-
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
15981
|
-
if (!options.allowPrototypes) {
|
|
15982
|
-
return;
|
|
15983
|
-
}
|
|
15984
|
-
}
|
|
15985
|
-
keys.push(parent);
|
|
15986
|
-
}
|
|
15987
|
-
var i = 0;
|
|
15988
|
-
while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
|
|
15989
|
-
i += 1;
|
|
15990
|
-
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
|
15991
|
-
if (!options.allowPrototypes) {
|
|
15992
|
-
return;
|
|
15993
|
-
}
|
|
15994
|
-
}
|
|
15995
|
-
keys.push(segment[1]);
|
|
15996
|
-
}
|
|
15997
|
-
if (segment) {
|
|
15998
|
-
keys.push("[" + key.slice(segment.index) + "]");
|
|
15999
|
-
}
|
|
16000
|
-
return parseObject(keys, val, options, valuesParsed);
|
|
16001
|
-
};
|
|
16002
|
-
var normalizeParseOptions = function normalizeParseOptions2(opts) {
|
|
16003
|
-
if (!opts) {
|
|
16004
|
-
return defaults2;
|
|
16005
|
-
}
|
|
16006
|
-
if (opts.decoder !== null && opts.decoder !== void 0 && typeof opts.decoder !== "function") {
|
|
16007
|
-
throw new TypeError("Decoder has to be a function.");
|
|
16008
|
-
}
|
|
16009
|
-
if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
|
|
16010
|
-
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
16011
|
-
}
|
|
16012
|
-
var charset = typeof opts.charset === "undefined" ? defaults2.charset : opts.charset;
|
|
16013
|
-
return {
|
|
16014
|
-
allowDots: typeof opts.allowDots === "undefined" ? defaults2.allowDots : !!opts.allowDots,
|
|
16015
|
-
allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults2.allowPrototypes,
|
|
16016
|
-
allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults2.allowSparse,
|
|
16017
|
-
arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults2.arrayLimit,
|
|
16018
|
-
charset,
|
|
16019
|
-
charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults2.charsetSentinel,
|
|
16020
|
-
comma: typeof opts.comma === "boolean" ? opts.comma : defaults2.comma,
|
|
16021
|
-
decoder: typeof opts.decoder === "function" ? opts.decoder : defaults2.decoder,
|
|
16022
|
-
delimiter: typeof opts.delimiter === "string" || utils2.isRegExp(opts.delimiter) ? opts.delimiter : defaults2.delimiter,
|
|
16023
|
-
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
16024
|
-
depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults2.depth,
|
|
16025
|
-
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
16026
|
-
interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults2.interpretNumericEntities,
|
|
16027
|
-
parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults2.parameterLimit,
|
|
16028
|
-
parseArrays: opts.parseArrays !== false,
|
|
16029
|
-
plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults2.plainObjects,
|
|
16030
|
-
strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults2.strictNullHandling
|
|
16031
|
-
};
|
|
16032
|
-
};
|
|
16033
|
-
module.exports = function(str, opts) {
|
|
16034
|
-
var options = normalizeParseOptions(opts);
|
|
16035
|
-
if (str === "" || str === null || typeof str === "undefined") {
|
|
16036
|
-
return options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
16037
|
-
}
|
|
16038
|
-
var tempObj = typeof str === "string" ? parseValues(str, options) : str;
|
|
16039
|
-
var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
16040
|
-
var keys = Object.keys(tempObj);
|
|
16041
|
-
for (var i = 0; i < keys.length; ++i) {
|
|
16042
|
-
var key = keys[i];
|
|
16043
|
-
var newObj = parseKeys(key, tempObj[key], options, typeof str === "string");
|
|
16044
|
-
obj = utils2.merge(obj, newObj, options);
|
|
16045
|
-
}
|
|
16046
|
-
if (options.allowSparse === true) {
|
|
16047
|
-
return obj;
|
|
16048
|
-
}
|
|
16049
|
-
return utils2.compact(obj);
|
|
16050
|
-
};
|
|
16051
|
-
}
|
|
16052
|
-
});
|
|
16053
|
-
|
|
16054
|
-
// node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/index.js
|
|
16055
|
-
var require_lib = __commonJS({
|
|
16056
|
-
"node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/index.js"(exports, module) {
|
|
16057
|
-
"use strict";
|
|
16058
|
-
var stringify3 = require_stringify();
|
|
16059
|
-
var parse3 = require_parse();
|
|
16060
|
-
var formats = require_formats();
|
|
16061
|
-
module.exports = {
|
|
16062
|
-
formats,
|
|
16063
|
-
parse: parse3,
|
|
16064
|
-
stringify: stringify3
|
|
16065
|
-
};
|
|
16066
|
-
}
|
|
16067
|
-
});
|
|
16068
|
-
|
|
16069
|
-
// node_modules/.pnpm/coinmarketcap-api@3.1.1/node_modules/coinmarketcap-api/index.js
|
|
16070
|
-
var require_coinmarketcap_api = __commonJS({
|
|
16071
|
-
"node_modules/.pnpm/coinmarketcap-api@3.1.1/node_modules/coinmarketcap-api/index.js"(exports, module) {
|
|
16072
|
-
"use strict";
|
|
16073
|
-
var fetch3 = require_browser();
|
|
16074
|
-
var qs = require_lib();
|
|
16075
|
-
var BASE_URL = "https://pro-api.coinmarketcap.com";
|
|
16076
|
-
var CoinMarketCap2 = class {
|
|
16077
|
-
/**
|
|
16078
|
-
*
|
|
16079
|
-
* @param {String} apiKey API key for accessing the CoinMarketCap API
|
|
16080
|
-
* @param {Object=} Options Options for the CoinMarketCap instance
|
|
16081
|
-
* @param {String=} options.version Version of API. Defaults to 'v2'
|
|
16082
|
-
* @param {Function=} options.fetcher fetch function to use. Defaults to node-fetch
|
|
16083
|
-
* @param {Object=} options.config = Configuration for fetch request
|
|
16084
|
-
*
|
|
16085
|
-
*/
|
|
16086
|
-
constructor(apiKey, { version = "v1", fetcher = fetch3, config: config2 = {} } = {}) {
|
|
16087
|
-
this.apiKey = apiKey;
|
|
16088
|
-
this.config = Object.assign({}, {
|
|
16089
|
-
method: "GET",
|
|
16090
|
-
headers: {
|
|
16091
|
-
"X-CMC_PRO_API_KEY": this.apiKey,
|
|
16092
|
-
Accept: "application/json",
|
|
16093
|
-
"Accept-Charset": "utf-8",
|
|
16094
|
-
"Accept-Encoding": "deflate, gzip"
|
|
16095
|
-
}
|
|
16096
|
-
}, config2);
|
|
16097
|
-
this.fetcher = fetcher;
|
|
16098
|
-
this.url = `${BASE_URL}/${version}`;
|
|
16099
|
-
}
|
|
16100
|
-
/**
|
|
16101
|
-
* Get a paginated list of all cryptocurrencies by CoinMarketCap ID.
|
|
16102
|
-
*
|
|
16103
|
-
* @param {Object=} options Options for the request:
|
|
16104
|
-
* @param {String=} [options.listingStatus="active"] active or inactive coins
|
|
16105
|
-
* @param {Number|String=} [options.start=1] Return results from rank start and above
|
|
16106
|
-
* @param {Number|String=} options.limit Only returns limit number of results
|
|
16107
|
-
* @param {String[]|String=} options.symbol Comma separated list of symbols, will ignore the other options
|
|
16108
|
-
* @param {String=} [options.sort="id"] Sort results by the options at https://coinmarketcap.com/api/documentation/v1/#operation/getV1CryptocurrencyMap
|
|
16109
|
-
*
|
|
16110
|
-
* @example
|
|
16111
|
-
* const client = new CoinMarketCap('api key')
|
|
16112
|
-
* client.getIdMap().then(console.log).catch(console.error)
|
|
16113
|
-
* client.getIdMap({listingStatus: 'inactive', limit: 10}).then(console.log).catch(console.error)
|
|
16114
|
-
* client.getIdMap({symbol: 'BTC,ETH'}).then(console.log).catch(console.error)
|
|
16115
|
-
* client.getIdMap({symbol: ['BTC', 'ETH']}).then(console.log).catch(console.error)
|
|
16116
|
-
* client.getIdMap({sort: 'cmc_rank'}).then(console.log).catch(console.error)
|
|
16117
|
-
*/
|
|
16118
|
-
getIdMap(args = {}) {
|
|
16119
|
-
let { listingStatus, start, limit, symbol, sort } = args;
|
|
16120
|
-
if (symbol instanceof Array) {
|
|
16121
|
-
symbol = symbol.join(",");
|
|
16122
|
-
}
|
|
16123
|
-
return createRequest({
|
|
16124
|
-
fetcher: this.fetcher,
|
|
16125
|
-
url: `${this.url}/cryptocurrency/map`,
|
|
16126
|
-
config: this.config,
|
|
16127
|
-
query: { listing_status: listingStatus, start, limit, symbol, sort }
|
|
16128
|
-
});
|
|
16129
|
-
}
|
|
16130
|
-
/**
|
|
16131
|
-
* Get static metadata for one or more cryptocurrencies.
|
|
16132
|
-
* Either id or symbol is required, but passing in both is not allowed.
|
|
16133
|
-
*
|
|
16134
|
-
* @param {Object=} options Options for the request:
|
|
16135
|
-
* @param {Array|String|Number=} options.id One or more comma separated cryptocurrency IDs
|
|
16136
|
-
* @param {String[]|String} options.symbol One or more comma separated cryptocurrency symbols
|
|
16137
|
-
*
|
|
16138
|
-
* @example
|
|
16139
|
-
* const client = new CoinMarketCap('api key')
|
|
16140
|
-
* client.getMetadata({id: '1'}).then(console.log).catch(console.error)
|
|
16141
|
-
* client.getMetadata({id: [1, 2]}).then(console.log).catch(console.error)
|
|
16142
|
-
* client.getMetadata({symbol: 'BTC,ETH'}).then(console.log).catch(console.error)
|
|
16143
|
-
* client.getMetadata({symbol: ['BTC', 'ETH']}).then(console.log).catch(console.error)
|
|
16144
|
-
*/
|
|
16145
|
-
getMetadata(args = {}) {
|
|
16146
|
-
return createRequest({
|
|
16147
|
-
fetcher: this.fetcher,
|
|
16148
|
-
url: `${this.url}/cryptocurrency/info`,
|
|
16149
|
-
config: this.config,
|
|
16150
|
-
query: sanitizeIdAndSymbol(args.id, args.symbol)
|
|
16151
|
-
});
|
|
16152
|
-
}
|
|
16153
|
-
/**
|
|
16154
|
-
* Get information on all tickers.
|
|
16155
|
-
* Start and limit options can only be used when currency or ID is not given.
|
|
16156
|
-
* Currency and ID cannot be passed in at the same time.
|
|
16157
|
-
*
|
|
16158
|
-
* @param {Object=} options Options for the request
|
|
16159
|
-
* @param {Number|String=} [options.start=1] Return results from rank start and above
|
|
16160
|
-
* @param {Number|String=} [options.limit=100] Only returns limit number of results [1..5000]
|
|
16161
|
-
* @param {String[]|String=} [options.convert="USD"] Return info in terms of another currency
|
|
16162
|
-
* @param {String=} [options.sort="market_cap"] Sort results by the options at https://pro.coinmarketcap.com/api/v1#operation/getV1CryptocurrencyListingsLatest
|
|
16163
|
-
* @param {String=} options.sortDir Direction in which to order cryptocurrencies ("asc" | "desc")
|
|
16164
|
-
* @param {String=} [options.cryptocurrencyType="all"] Type of cryptocurrency to include ("all" | "coins" | "tokens")
|
|
16165
|
-
*
|
|
16166
|
-
* @example
|
|
16167
|
-
* const client = new CoinMarketCap('api key')
|
|
16168
|
-
* client.getTickers({limit: 3}).then(console.log).catch(console.error)
|
|
16169
|
-
* client.getTickers({convert: 'EUR'}).then(console.log).catch(console.error)
|
|
16170
|
-
* client.getTickers({start: 0, limit: 5}).then(console.log).catch(console.error)
|
|
16171
|
-
* client.getTickers({sort: 'name'}).then(console.log).catch(console.error)
|
|
16172
|
-
*/
|
|
16173
|
-
getTickers(args = {}) {
|
|
16174
|
-
let { start, limit, convert, sort, sortDir, cryptocurrencyType } = args;
|
|
16175
|
-
if (start && limit == 0) {
|
|
16176
|
-
throw new Error("Start and limit = 0 cannot be passed in at the same time.");
|
|
16177
|
-
}
|
|
16178
|
-
if (limit == 0) {
|
|
16179
|
-
limit = 5e3;
|
|
16180
|
-
}
|
|
16181
|
-
if (convert && convert instanceof Array) {
|
|
16182
|
-
convert = convert.join(",");
|
|
16183
|
-
}
|
|
16184
|
-
return createRequest({
|
|
16185
|
-
fetcher: this.fetcher,
|
|
16186
|
-
url: `${this.url}/cryptocurrency/listings/latest`,
|
|
16187
|
-
config: this.config,
|
|
16188
|
-
query: { start, limit, convert, sort, sort_dir: sortDir, cryptocurrency_type: cryptocurrencyType }
|
|
16189
|
-
});
|
|
16190
|
-
}
|
|
16191
|
-
/**
|
|
16192
|
-
* Get latest market quote for 1 or more cryptocurrencies.
|
|
16193
|
-
*
|
|
16194
|
-
* @param {Object=} options Options for the request:
|
|
16195
|
-
* @param {Array|String|Number=} options.id One or more comma separated cryptocurrency IDs
|
|
16196
|
-
* @param {String[]|String=} options.symbol One or more comma separated cryptocurrency symbols
|
|
16197
|
-
* @param {String[]|String=} [options.convert="USD"] Return quotes in terms of another currency
|
|
16198
|
-
*
|
|
16199
|
-
* @example
|
|
16200
|
-
* const client = new CoinMarketCap('api key')
|
|
16201
|
-
* client.getQuotes({id: '1'}).then(console.log).catch(console.error)
|
|
16202
|
-
* client.getQuotes({id: [1, 2], convert: 'USD,EUR'}).then(console.log).catch(console.error)
|
|
16203
|
-
* client.getQuotes({symbol: 'BTC,ETH'}).then(console.log).catch(console.error)
|
|
16204
|
-
* client.getQuotes({symbol: ['BTC', 'ETH']}).then(console.log).catch(console.error)
|
|
16205
|
-
*/
|
|
16206
|
-
getQuotes(args = {}) {
|
|
16207
|
-
let convert = args.convert;
|
|
16208
|
-
const { id, symbol } = sanitizeIdAndSymbol(args.id, args.symbol);
|
|
16209
|
-
if (convert instanceof Array) {
|
|
16210
|
-
convert = convert.join(",");
|
|
16211
|
-
}
|
|
16212
|
-
return createRequest({
|
|
16213
|
-
fetcher: this.fetcher,
|
|
16214
|
-
url: `${this.url}/cryptocurrency/quotes/latest`,
|
|
16215
|
-
config: this.config,
|
|
16216
|
-
query: { id, symbol, convert }
|
|
16217
|
-
});
|
|
16218
|
-
}
|
|
16219
|
-
/**
|
|
16220
|
-
* Get global information
|
|
16221
|
-
*
|
|
16222
|
-
* @param {Object|String[]|String=} options Options for the request:
|
|
16223
|
-
* @param {String[]|String=} [options.convert="USD"] Return quotes in terms of another currency
|
|
16224
|
-
*
|
|
16225
|
-
* @example
|
|
16226
|
-
* const client = new CoinMarketCap()
|
|
16227
|
-
* client.getGlobal('GBP').then(console.log).catch(console.error)
|
|
16228
|
-
* client.getGlobal({convert: 'GBP'}).then(console.log).catch(console.error)
|
|
16229
|
-
*/
|
|
16230
|
-
getGlobal(convert) {
|
|
16231
|
-
if (typeof convert === "string") {
|
|
16232
|
-
convert = { convert: convert.toUpperCase() };
|
|
16233
|
-
}
|
|
16234
|
-
if (convert instanceof Array) {
|
|
16235
|
-
convert = { convert: convert.map((currency) => currency.toUpperCase()) };
|
|
16236
|
-
}
|
|
16237
|
-
if (convert && convert.convert instanceof Array) {
|
|
16238
|
-
convert.convert = convert.convert.join(",");
|
|
16239
|
-
}
|
|
16240
|
-
return createRequest({
|
|
16241
|
-
fetcher: this.fetcher,
|
|
16242
|
-
url: `${this.url}/global-metrics/quotes/latest`,
|
|
16243
|
-
config: this.config,
|
|
16244
|
-
query: convert
|
|
16245
|
-
});
|
|
16246
|
-
}
|
|
16247
|
-
};
|
|
16248
|
-
var sanitizeIdAndSymbol = (id, symbol) => {
|
|
16249
|
-
if (id && symbol) {
|
|
16250
|
-
throw new Error("ID and symbol cannot be passed in at the same time.");
|
|
16251
|
-
}
|
|
16252
|
-
if (!id && !symbol) {
|
|
16253
|
-
throw new Error("Either ID or symbol is required to be passed in.");
|
|
16254
|
-
}
|
|
16255
|
-
if (id instanceof Array) {
|
|
16256
|
-
id = id.join(",");
|
|
16257
|
-
}
|
|
16258
|
-
if (symbol instanceof Array) {
|
|
16259
|
-
symbol = symbol.join(",");
|
|
16260
|
-
}
|
|
16261
|
-
return { id, symbol };
|
|
16262
|
-
};
|
|
16263
|
-
var createRequest = (args = {}) => {
|
|
16264
|
-
const { url, config: config2, query, fetcher } = args;
|
|
16265
|
-
return fetcher(`${url}${query ? `?${qs.stringify(query)}` : ""}`, config2).then(
|
|
16266
|
-
(res) => res.json()
|
|
16267
|
-
);
|
|
16268
|
-
};
|
|
16269
|
-
module.exports = CoinMarketCap2;
|
|
16270
|
-
}
|
|
16271
|
-
});
|
|
16272
|
-
|
|
16273
13940
|
// src/index.browser.ts
|
|
16274
13941
|
var index_browser_exports = {};
|
|
16275
13942
|
__export(index_browser_exports, {
|
|
@@ -16283,7 +13950,8 @@ var strkfarm_risk_engine = (() => {
|
|
|
16283
13950
|
Network: () => Network,
|
|
16284
13951
|
Pragma: () => Pragma,
|
|
16285
13952
|
Pricer: () => Pricer,
|
|
16286
|
-
|
|
13953
|
+
PricerFromApi: () => PricerFromApi,
|
|
13954
|
+
RiskType: () => RiskType,
|
|
16287
13955
|
VesuRebalance: () => VesuRebalance,
|
|
16288
13956
|
VesuRebalanceStrategies: () => VesuRebalanceStrategies,
|
|
16289
13957
|
Web3Number: () => Web3Number,
|
|
@@ -18737,6 +16405,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
18737
16405
|
var tokens = [{
|
|
18738
16406
|
name: "Starknet",
|
|
18739
16407
|
symbol: "STRK",
|
|
16408
|
+
logo: "https://assets.coingecko.com/coins/images/26433/small/starknet.png",
|
|
18740
16409
|
address: "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
|
|
18741
16410
|
decimals: 18,
|
|
18742
16411
|
coingeckId: "starknet"
|
|
@@ -18769,6 +16438,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
18769
16438
|
symbol: token.symbol,
|
|
18770
16439
|
address: token.address,
|
|
18771
16440
|
decimals: token.decimals,
|
|
16441
|
+
logo: token.logoUri,
|
|
18772
16442
|
coingeckId: token.extensions.coingeckoId
|
|
18773
16443
|
});
|
|
18774
16444
|
});
|
|
@@ -35046,16 +32716,22 @@ var strkfarm_risk_engine = (() => {
|
|
|
35046
32716
|
}
|
|
35047
32717
|
};
|
|
35048
32718
|
|
|
35049
|
-
// src/modules/
|
|
35050
|
-
var CoinMarketCap = require_coinmarketcap_api();
|
|
32719
|
+
// src/modules/pricerBase.ts
|
|
35051
32720
|
var PricerBase = class {
|
|
32721
|
+
constructor(config2, tokens2) {
|
|
32722
|
+
this.config = config2;
|
|
32723
|
+
this.tokens = tokens2;
|
|
32724
|
+
}
|
|
35052
32725
|
async getPrice(tokenSymbol) {
|
|
35053
32726
|
throw new Error("Method not implemented");
|
|
35054
32727
|
}
|
|
35055
32728
|
};
|
|
35056
|
-
|
|
32729
|
+
|
|
32730
|
+
// src/modules/pricer.ts
|
|
32731
|
+
var Pricer = class extends PricerBase {
|
|
32732
|
+
// e.g. ETH/USDC
|
|
35057
32733
|
constructor(config2, tokens2) {
|
|
35058
|
-
|
|
32734
|
+
super(config2, tokens2);
|
|
35059
32735
|
this.prices = {};
|
|
35060
32736
|
// code populates this map during runtime to determine which method to use for a given token
|
|
35061
32737
|
// The method set will be the first one to try after first attempt
|
|
@@ -35065,11 +32741,6 @@ var strkfarm_risk_engine = (() => {
|
|
|
35065
32741
|
*/
|
|
35066
32742
|
this.PRICE_API = `https://api.coinbase.com/v2/prices/{{PRICER_KEY}}/buy`;
|
|
35067
32743
|
this.EKUBO_API = "https://quoter-mainnet-api.ekubo.org/{{AMOUNT}}/{{TOKEN_ADDRESS}}/0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8";
|
|
35068
|
-
// e.g. ETH/USDC
|
|
35069
|
-
// backup oracle001
|
|
35070
|
-
this.client = new CoinMarketCap(process.env.COINMARKETCAP_KEY);
|
|
35071
|
-
this.config = config2;
|
|
35072
|
-
this.tokens = tokens2;
|
|
35073
32744
|
}
|
|
35074
32745
|
isReady() {
|
|
35075
32746
|
const allPricesExist = Object.keys(this.prices).length === this.tokens.length;
|
|
@@ -35201,10 +32872,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
35201
32872
|
return Number(data.data.amount);
|
|
35202
32873
|
}
|
|
35203
32874
|
async _getPriceCoinMarketCap(token) {
|
|
35204
|
-
|
|
35205
|
-
if (result.data)
|
|
35206
|
-
return result.data[token.symbol].quote.USD.price;
|
|
35207
|
-
throw new Error(result);
|
|
32875
|
+
throw new Error("Not implemented");
|
|
35208
32876
|
}
|
|
35209
32877
|
async _getPriceEkubo(token, amountIn = new Web3Number(1, token.decimals), retry = 0) {
|
|
35210
32878
|
const url = this.EKUBO_API.replace("{{TOKEN_ADDRESS}}", token.address).replace("{{AMOUNT}}", amountIn.toWei());
|
|
@@ -35392,6 +33060,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
35392
33060
|
name: pool.token.name,
|
|
35393
33061
|
symbol: pool.token.symbol,
|
|
35394
33062
|
address: savedTokenInfo?.address || "",
|
|
33063
|
+
logo: "",
|
|
35395
33064
|
decimals: pool.token.decimals,
|
|
35396
33065
|
borrowFactor: Web3Number.fromWei(pool.borrow_factor.value, pool.borrow_factor.decimals),
|
|
35397
33066
|
collareralFactor
|
|
@@ -35501,7 +33170,70 @@ var strkfarm_risk_engine = (() => {
|
|
|
35501
33170
|
_ZkLend.POOLS_URL = "https://app.zklend.com/api/pools";
|
|
35502
33171
|
var ZkLend = _ZkLend;
|
|
35503
33172
|
|
|
33173
|
+
// src/modules/pricer-from-api.ts
|
|
33174
|
+
var PricerFromApi = class extends PricerBase {
|
|
33175
|
+
constructor(config2, tokens2) {
|
|
33176
|
+
super(config2, tokens2);
|
|
33177
|
+
}
|
|
33178
|
+
async getPrice(tokenSymbol) {
|
|
33179
|
+
try {
|
|
33180
|
+
return await this.getPriceFromMyAPI(tokenSymbol);
|
|
33181
|
+
} catch (e) {
|
|
33182
|
+
logger.warn("getPriceFromMyAPI error", e);
|
|
33183
|
+
}
|
|
33184
|
+
logger.log("getPrice coinbase", tokenSymbol);
|
|
33185
|
+
let retry = 0;
|
|
33186
|
+
const MAX_RETRIES = 5;
|
|
33187
|
+
for (retry = 1; retry < MAX_RETRIES + 1; retry++) {
|
|
33188
|
+
try {
|
|
33189
|
+
const priceInfo = await axios_default.get(
|
|
33190
|
+
`https://api.coinbase.com/v2/prices/${tokenSymbol}-USDT/spot`
|
|
33191
|
+
);
|
|
33192
|
+
if (!priceInfo) {
|
|
33193
|
+
throw new Error("Failed to fetch price");
|
|
33194
|
+
}
|
|
33195
|
+
const data = await priceInfo.data;
|
|
33196
|
+
const price = Number(data.data.amount);
|
|
33197
|
+
return {
|
|
33198
|
+
price,
|
|
33199
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
33200
|
+
};
|
|
33201
|
+
} catch (e) {
|
|
33202
|
+
logger.warn("getPrice coinbase error", e, retry);
|
|
33203
|
+
await new Promise((resolve) => setTimeout(resolve, retry * 1e3));
|
|
33204
|
+
}
|
|
33205
|
+
}
|
|
33206
|
+
throw new Error(`Failed to fetch price for ${tokenSymbol}`);
|
|
33207
|
+
}
|
|
33208
|
+
async getPriceFromMyAPI(tokenSymbol) {
|
|
33209
|
+
logger.verbose(`getPrice from redis: ${tokenSymbol}`);
|
|
33210
|
+
const endpoint = "https://app.strkfarm.com";
|
|
33211
|
+
const url = `${endpoint}/api/price/${tokenSymbol}`;
|
|
33212
|
+
const priceInfoRes = await fetch(url);
|
|
33213
|
+
const priceInfo = await priceInfoRes.json();
|
|
33214
|
+
const now = /* @__PURE__ */ new Date();
|
|
33215
|
+
const priceTime = new Date(priceInfo.timestamp);
|
|
33216
|
+
if (now.getTime() - priceTime.getTime() > 9e5) {
|
|
33217
|
+
throw new Error("Price is stale");
|
|
33218
|
+
}
|
|
33219
|
+
const price = Number(priceInfo.price);
|
|
33220
|
+
return {
|
|
33221
|
+
price,
|
|
33222
|
+
timestamp: new Date(priceInfo.timestamp)
|
|
33223
|
+
};
|
|
33224
|
+
}
|
|
33225
|
+
};
|
|
33226
|
+
|
|
35504
33227
|
// src/interfaces/common.ts
|
|
33228
|
+
var RiskType = /* @__PURE__ */ ((RiskType2) => {
|
|
33229
|
+
RiskType2["MARKET_RISK"] = "MARKET_RISK";
|
|
33230
|
+
RiskType2["IMPERMANENT_LOSS"] = "IMPERMANENT_LOSS";
|
|
33231
|
+
RiskType2["LIQUIDITY_RISK"] = "LIQUIDITY_RISK";
|
|
33232
|
+
RiskType2["SMART_CONTRACT_RISK"] = "SMART_CONTRACT_RISK";
|
|
33233
|
+
RiskType2["TECHNICAL_RISK"] = "TECHNICAL_RISK";
|
|
33234
|
+
RiskType2["COUNTERPARTY_RISK"] = "COUNTERPARTY_RISK";
|
|
33235
|
+
return RiskType2;
|
|
33236
|
+
})(RiskType || {});
|
|
35505
33237
|
var Network = /* @__PURE__ */ ((Network2) => {
|
|
35506
33238
|
Network2["mainnet"] = "mainnet";
|
|
35507
33239
|
Network2["sepolia"] = "sepolia";
|
|
@@ -37355,16 +35087,47 @@ var strkfarm_risk_engine = (() => {
|
|
|
37355
35087
|
}
|
|
37356
35088
|
return this.contract.populate("rebalance", [actions]);
|
|
37357
35089
|
}
|
|
35090
|
+
async getInvestmentFlows(pools) {
|
|
35091
|
+
const netYield = this.netAPYGivenPools(pools);
|
|
35092
|
+
const baseFlow = {
|
|
35093
|
+
title: "Deposit $1000",
|
|
35094
|
+
subItems: [`Net yield: ${(netYield * 100).toFixed(2)}%`],
|
|
35095
|
+
linkedFlows: []
|
|
35096
|
+
};
|
|
35097
|
+
pools.forEach((p) => {
|
|
35098
|
+
if (p.amount.eq(0)) return;
|
|
35099
|
+
const flow = {
|
|
35100
|
+
title: `${p.pool_name} - $${(p.current_weight * 1e3).toFixed(2)}`,
|
|
35101
|
+
subItems: [
|
|
35102
|
+
`APY: ${(p.APY.netApy * 100).toFixed(2)}%`,
|
|
35103
|
+
`Weight: ${(p.current_weight * 100).toFixed(2)}% / ${(p.max_weight * 100).toFixed(2)}%`
|
|
35104
|
+
],
|
|
35105
|
+
linkedFlows: []
|
|
35106
|
+
};
|
|
35107
|
+
baseFlow.linkedFlows.push(flow);
|
|
35108
|
+
});
|
|
35109
|
+
return [baseFlow];
|
|
35110
|
+
}
|
|
37358
35111
|
};
|
|
37359
35112
|
var _description = "Automatically diversify {{TOKEN}} holdings into different Vesu pools while reducing risk and maximizing yield. Defi spring STRK Rewards are auto-compounded as well.";
|
|
37360
35113
|
var _protocol = { name: "Vesu", logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png" };
|
|
35114
|
+
var _riskFactor = [
|
|
35115
|
+
{ type: "SMART_CONTRACT_RISK" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 },
|
|
35116
|
+
{ type: "TECHNICAL_RISK" /* TECHNICAL_RISK */, value: 0.5, weight: 25 },
|
|
35117
|
+
{ type: "COUNTERPARTY_RISK" /* COUNTERPARTY_RISK */, value: 1, weight: 50 }
|
|
35118
|
+
];
|
|
37361
35119
|
var VesuRebalanceStrategies = [{
|
|
37362
35120
|
name: "Vesu STRK",
|
|
37363
35121
|
description: _description.replace("{{TOKEN}}", "STRK"),
|
|
37364
35122
|
address: ContractAddr.from("0xeeb729d554ae486387147b13a9c8871bc7991d454e8b5ff570d4bf94de71e1"),
|
|
37365
35123
|
type: "ERC4626",
|
|
37366
35124
|
depositTokens: [Global.getDefaultTokens().find((t) => t.symbol === "STRK")],
|
|
37367
|
-
protocols: [_protocol]
|
|
35125
|
+
protocols: [_protocol],
|
|
35126
|
+
maxTVL: Web3Number.fromWei("0", 18),
|
|
35127
|
+
risk: {
|
|
35128
|
+
riskFactor: _riskFactor,
|
|
35129
|
+
netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / 100
|
|
35130
|
+
}
|
|
37368
35131
|
}];
|
|
37369
35132
|
return __toCommonJS(index_browser_exports);
|
|
37370
35133
|
})();
|