@reporting-bi/cli 0.0.2
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/README.md +53 -0
- package/dist/index.js +3536 -0
- package/package.json +31 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,3536 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
|
|
29
|
+
// ../rp-client/dist/types.js
|
|
30
|
+
var require_types = __commonJS({
|
|
31
|
+
"../rp-client/dist/types.js"(exports2) {
|
|
32
|
+
"use strict";
|
|
33
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// ../rp-client/dist/cache.js
|
|
38
|
+
var require_cache = __commonJS({
|
|
39
|
+
"../rp-client/dist/cache.js"(exports2) {
|
|
40
|
+
"use strict";
|
|
41
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
42
|
+
exports2.ServiceCache = void 0;
|
|
43
|
+
var ServiceCache = class {
|
|
44
|
+
constructor() {
|
|
45
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
46
|
+
}
|
|
47
|
+
createKey(params) {
|
|
48
|
+
let key = params.path;
|
|
49
|
+
if (params.params) {
|
|
50
|
+
const paramStrings = [];
|
|
51
|
+
for (const k of Object.keys(params.params).sort()) {
|
|
52
|
+
paramStrings.push(`${k}=${params.params[k]}`);
|
|
53
|
+
}
|
|
54
|
+
if (paramStrings.length > 0) {
|
|
55
|
+
key += `?${paramStrings.join("&")}`;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return key;
|
|
59
|
+
}
|
|
60
|
+
set(params, data) {
|
|
61
|
+
const key = this.createKey(params);
|
|
62
|
+
this.cache.set(key, data);
|
|
63
|
+
}
|
|
64
|
+
get(params) {
|
|
65
|
+
const key = this.createKey(params);
|
|
66
|
+
return this.cache.get(key);
|
|
67
|
+
}
|
|
68
|
+
has(params) {
|
|
69
|
+
const key = this.createKey(params);
|
|
70
|
+
return this.cache.has(key);
|
|
71
|
+
}
|
|
72
|
+
clear() {
|
|
73
|
+
this.cache.clear();
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
exports2.ServiceCache = ServiceCache;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// ../rp-client/dist/accountingProvider.js
|
|
81
|
+
var require_accountingProvider = __commonJS({
|
|
82
|
+
"../rp-client/dist/accountingProvider.js"(exports2) {
|
|
83
|
+
"use strict";
|
|
84
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
85
|
+
exports2.AccountingProvider = void 0;
|
|
86
|
+
var AccountingProvider2 = class {
|
|
87
|
+
constructor() {
|
|
88
|
+
this._a = null;
|
|
89
|
+
this._accounting = null;
|
|
90
|
+
}
|
|
91
|
+
get a() {
|
|
92
|
+
return this._a;
|
|
93
|
+
}
|
|
94
|
+
set a(a) {
|
|
95
|
+
this._a = a;
|
|
96
|
+
if (this.accounting?.accounting != a) {
|
|
97
|
+
this._accounting = null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
get accounting() {
|
|
101
|
+
return this._accounting;
|
|
102
|
+
}
|
|
103
|
+
set accounting(accounting2) {
|
|
104
|
+
if (accounting2) {
|
|
105
|
+
this._a = accounting2.accounting ?? null;
|
|
106
|
+
}
|
|
107
|
+
this._accounting = accounting2;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
exports2.AccountingProvider = AccountingProvider2;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// ../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/type.js
|
|
115
|
+
var require_type = __commonJS({
|
|
116
|
+
"../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/type.js"(exports2, module2) {
|
|
117
|
+
"use strict";
|
|
118
|
+
module2.exports = TypeError;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
// ../../.yarn/cache/object-inspect-npm-1.13.4-4e741f9806-d7f8711e80.zip/node_modules/object-inspect/util.inspect.js
|
|
123
|
+
var require_util_inspect = __commonJS({
|
|
124
|
+
"../../.yarn/cache/object-inspect-npm-1.13.4-4e741f9806-d7f8711e80.zip/node_modules/object-inspect/util.inspect.js"(exports2, module2) {
|
|
125
|
+
module2.exports = require("util").inspect;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// ../../.yarn/cache/object-inspect-npm-1.13.4-4e741f9806-d7f8711e80.zip/node_modules/object-inspect/index.js
|
|
130
|
+
var require_object_inspect = __commonJS({
|
|
131
|
+
"../../.yarn/cache/object-inspect-npm-1.13.4-4e741f9806-d7f8711e80.zip/node_modules/object-inspect/index.js"(exports2, module2) {
|
|
132
|
+
var hasMap = typeof Map === "function" && Map.prototype;
|
|
133
|
+
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
|
|
134
|
+
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
|
|
135
|
+
var mapForEach = hasMap && Map.prototype.forEach;
|
|
136
|
+
var hasSet = typeof Set === "function" && Set.prototype;
|
|
137
|
+
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
|
|
138
|
+
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
|
|
139
|
+
var setForEach = hasSet && Set.prototype.forEach;
|
|
140
|
+
var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
|
|
141
|
+
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
142
|
+
var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
|
|
143
|
+
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
144
|
+
var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
|
|
145
|
+
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
146
|
+
var booleanValueOf = Boolean.prototype.valueOf;
|
|
147
|
+
var objectToString = Object.prototype.toString;
|
|
148
|
+
var functionToString = Function.prototype.toString;
|
|
149
|
+
var $match = String.prototype.match;
|
|
150
|
+
var $slice = String.prototype.slice;
|
|
151
|
+
var $replace = String.prototype.replace;
|
|
152
|
+
var $toUpperCase = String.prototype.toUpperCase;
|
|
153
|
+
var $toLowerCase = String.prototype.toLowerCase;
|
|
154
|
+
var $test = RegExp.prototype.test;
|
|
155
|
+
var $concat = Array.prototype.concat;
|
|
156
|
+
var $join = Array.prototype.join;
|
|
157
|
+
var $arrSlice = Array.prototype.slice;
|
|
158
|
+
var $floor = Math.floor;
|
|
159
|
+
var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
|
|
160
|
+
var gOPS = Object.getOwnPropertySymbols;
|
|
161
|
+
var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
|
|
162
|
+
var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
|
|
163
|
+
var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
|
|
164
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
165
|
+
var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
|
|
166
|
+
return O.__proto__;
|
|
167
|
+
} : null);
|
|
168
|
+
function addNumericSeparator(num, str) {
|
|
169
|
+
if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
|
|
170
|
+
return str;
|
|
171
|
+
}
|
|
172
|
+
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
173
|
+
if (typeof num === "number") {
|
|
174
|
+
var int = num < 0 ? -$floor(-num) : $floor(num);
|
|
175
|
+
if (int !== num) {
|
|
176
|
+
var intStr = String(int);
|
|
177
|
+
var dec = $slice.call(str, intStr.length + 1);
|
|
178
|
+
return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return $replace.call(str, sepRegex, "$&_");
|
|
182
|
+
}
|
|
183
|
+
var utilInspect = require_util_inspect();
|
|
184
|
+
var inspectCustom = utilInspect.custom;
|
|
185
|
+
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
186
|
+
var quotes = {
|
|
187
|
+
__proto__: null,
|
|
188
|
+
"double": '"',
|
|
189
|
+
single: "'"
|
|
190
|
+
};
|
|
191
|
+
var quoteREs = {
|
|
192
|
+
__proto__: null,
|
|
193
|
+
"double": /(["\\])/g,
|
|
194
|
+
single: /(['\\])/g
|
|
195
|
+
};
|
|
196
|
+
module2.exports = function inspect_(obj, options, depth, seen) {
|
|
197
|
+
var opts = options || {};
|
|
198
|
+
if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) {
|
|
199
|
+
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
200
|
+
}
|
|
201
|
+
if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
|
|
202
|
+
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
203
|
+
}
|
|
204
|
+
var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
|
|
205
|
+
if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
|
|
206
|
+
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
207
|
+
}
|
|
208
|
+
if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
|
|
209
|
+
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
210
|
+
}
|
|
211
|
+
if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
|
|
212
|
+
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
213
|
+
}
|
|
214
|
+
var numericSeparator = opts.numericSeparator;
|
|
215
|
+
if (typeof obj === "undefined") {
|
|
216
|
+
return "undefined";
|
|
217
|
+
}
|
|
218
|
+
if (obj === null) {
|
|
219
|
+
return "null";
|
|
220
|
+
}
|
|
221
|
+
if (typeof obj === "boolean") {
|
|
222
|
+
return obj ? "true" : "false";
|
|
223
|
+
}
|
|
224
|
+
if (typeof obj === "string") {
|
|
225
|
+
return inspectString(obj, opts);
|
|
226
|
+
}
|
|
227
|
+
if (typeof obj === "number") {
|
|
228
|
+
if (obj === 0) {
|
|
229
|
+
return Infinity / obj > 0 ? "0" : "-0";
|
|
230
|
+
}
|
|
231
|
+
var str = String(obj);
|
|
232
|
+
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
233
|
+
}
|
|
234
|
+
if (typeof obj === "bigint") {
|
|
235
|
+
var bigIntStr = String(obj) + "n";
|
|
236
|
+
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
237
|
+
}
|
|
238
|
+
var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
|
|
239
|
+
if (typeof depth === "undefined") {
|
|
240
|
+
depth = 0;
|
|
241
|
+
}
|
|
242
|
+
if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
|
|
243
|
+
return isArray(obj) ? "[Array]" : "[Object]";
|
|
244
|
+
}
|
|
245
|
+
var indent = getIndent(opts, depth);
|
|
246
|
+
if (typeof seen === "undefined") {
|
|
247
|
+
seen = [];
|
|
248
|
+
} else if (indexOf(seen, obj) >= 0) {
|
|
249
|
+
return "[Circular]";
|
|
250
|
+
}
|
|
251
|
+
function inspect(value, from, noIndent) {
|
|
252
|
+
if (from) {
|
|
253
|
+
seen = $arrSlice.call(seen);
|
|
254
|
+
seen.push(from);
|
|
255
|
+
}
|
|
256
|
+
if (noIndent) {
|
|
257
|
+
var newOpts = {
|
|
258
|
+
depth: opts.depth
|
|
259
|
+
};
|
|
260
|
+
if (has(opts, "quoteStyle")) {
|
|
261
|
+
newOpts.quoteStyle = opts.quoteStyle;
|
|
262
|
+
}
|
|
263
|
+
return inspect_(value, newOpts, depth + 1, seen);
|
|
264
|
+
}
|
|
265
|
+
return inspect_(value, opts, depth + 1, seen);
|
|
266
|
+
}
|
|
267
|
+
if (typeof obj === "function" && !isRegExp(obj)) {
|
|
268
|
+
var name = nameOf(obj);
|
|
269
|
+
var keys = arrObjKeys(obj, inspect);
|
|
270
|
+
return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
|
|
271
|
+
}
|
|
272
|
+
if (isSymbol(obj)) {
|
|
273
|
+
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
|
|
274
|
+
return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
275
|
+
}
|
|
276
|
+
if (isElement(obj)) {
|
|
277
|
+
var s = "<" + $toLowerCase.call(String(obj.nodeName));
|
|
278
|
+
var attrs = obj.attributes || [];
|
|
279
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
280
|
+
s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
|
|
281
|
+
}
|
|
282
|
+
s += ">";
|
|
283
|
+
if (obj.childNodes && obj.childNodes.length) {
|
|
284
|
+
s += "...";
|
|
285
|
+
}
|
|
286
|
+
s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
|
|
287
|
+
return s;
|
|
288
|
+
}
|
|
289
|
+
if (isArray(obj)) {
|
|
290
|
+
if (obj.length === 0) {
|
|
291
|
+
return "[]";
|
|
292
|
+
}
|
|
293
|
+
var xs = arrObjKeys(obj, inspect);
|
|
294
|
+
if (indent && !singleLineValues(xs)) {
|
|
295
|
+
return "[" + indentedJoin(xs, indent) + "]";
|
|
296
|
+
}
|
|
297
|
+
return "[ " + $join.call(xs, ", ") + " ]";
|
|
298
|
+
}
|
|
299
|
+
if (isError(obj)) {
|
|
300
|
+
var parts = arrObjKeys(obj, inspect);
|
|
301
|
+
if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
|
|
302
|
+
return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
|
|
303
|
+
}
|
|
304
|
+
if (parts.length === 0) {
|
|
305
|
+
return "[" + String(obj) + "]";
|
|
306
|
+
}
|
|
307
|
+
return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
|
|
308
|
+
}
|
|
309
|
+
if (typeof obj === "object" && customInspect) {
|
|
310
|
+
if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
|
|
311
|
+
return utilInspect(obj, { depth: maxDepth - depth });
|
|
312
|
+
} else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
|
|
313
|
+
return obj.inspect();
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (isMap(obj)) {
|
|
317
|
+
var mapParts = [];
|
|
318
|
+
if (mapForEach) {
|
|
319
|
+
mapForEach.call(obj, function(value, key) {
|
|
320
|
+
mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
return collectionOf("Map", mapSize.call(obj), mapParts, indent);
|
|
324
|
+
}
|
|
325
|
+
if (isSet(obj)) {
|
|
326
|
+
var setParts = [];
|
|
327
|
+
if (setForEach) {
|
|
328
|
+
setForEach.call(obj, function(value) {
|
|
329
|
+
setParts.push(inspect(value, obj));
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
return collectionOf("Set", setSize.call(obj), setParts, indent);
|
|
333
|
+
}
|
|
334
|
+
if (isWeakMap(obj)) {
|
|
335
|
+
return weakCollectionOf("WeakMap");
|
|
336
|
+
}
|
|
337
|
+
if (isWeakSet(obj)) {
|
|
338
|
+
return weakCollectionOf("WeakSet");
|
|
339
|
+
}
|
|
340
|
+
if (isWeakRef(obj)) {
|
|
341
|
+
return weakCollectionOf("WeakRef");
|
|
342
|
+
}
|
|
343
|
+
if (isNumber(obj)) {
|
|
344
|
+
return markBoxed(inspect(Number(obj)));
|
|
345
|
+
}
|
|
346
|
+
if (isBigInt(obj)) {
|
|
347
|
+
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
348
|
+
}
|
|
349
|
+
if (isBoolean(obj)) {
|
|
350
|
+
return markBoxed(booleanValueOf.call(obj));
|
|
351
|
+
}
|
|
352
|
+
if (isString(obj)) {
|
|
353
|
+
return markBoxed(inspect(String(obj)));
|
|
354
|
+
}
|
|
355
|
+
if (typeof window !== "undefined" && obj === window) {
|
|
356
|
+
return "{ [object Window] }";
|
|
357
|
+
}
|
|
358
|
+
if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) {
|
|
359
|
+
return "{ [object globalThis] }";
|
|
360
|
+
}
|
|
361
|
+
if (!isDate(obj) && !isRegExp(obj)) {
|
|
362
|
+
var ys = arrObjKeys(obj, inspect);
|
|
363
|
+
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
364
|
+
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
365
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr2(obj), 8, -1) : protoTag ? "Object" : "";
|
|
366
|
+
var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
367
|
+
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
368
|
+
if (ys.length === 0) {
|
|
369
|
+
return tag + "{}";
|
|
370
|
+
}
|
|
371
|
+
if (indent) {
|
|
372
|
+
return tag + "{" + indentedJoin(ys, indent) + "}";
|
|
373
|
+
}
|
|
374
|
+
return tag + "{ " + $join.call(ys, ", ") + " }";
|
|
375
|
+
}
|
|
376
|
+
return String(obj);
|
|
377
|
+
};
|
|
378
|
+
function wrapQuotes(s, defaultStyle, opts) {
|
|
379
|
+
var style = opts.quoteStyle || defaultStyle;
|
|
380
|
+
var quoteChar = quotes[style];
|
|
381
|
+
return quoteChar + s + quoteChar;
|
|
382
|
+
}
|
|
383
|
+
function quote(s) {
|
|
384
|
+
return $replace.call(String(s), /"/g, """);
|
|
385
|
+
}
|
|
386
|
+
function canTrustToString(obj) {
|
|
387
|
+
return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
|
|
388
|
+
}
|
|
389
|
+
function isArray(obj) {
|
|
390
|
+
return toStr2(obj) === "[object Array]" && canTrustToString(obj);
|
|
391
|
+
}
|
|
392
|
+
function isDate(obj) {
|
|
393
|
+
return toStr2(obj) === "[object Date]" && canTrustToString(obj);
|
|
394
|
+
}
|
|
395
|
+
function isRegExp(obj) {
|
|
396
|
+
return toStr2(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
397
|
+
}
|
|
398
|
+
function isError(obj) {
|
|
399
|
+
return toStr2(obj) === "[object Error]" && canTrustToString(obj);
|
|
400
|
+
}
|
|
401
|
+
function isString(obj) {
|
|
402
|
+
return toStr2(obj) === "[object String]" && canTrustToString(obj);
|
|
403
|
+
}
|
|
404
|
+
function isNumber(obj) {
|
|
405
|
+
return toStr2(obj) === "[object Number]" && canTrustToString(obj);
|
|
406
|
+
}
|
|
407
|
+
function isBoolean(obj) {
|
|
408
|
+
return toStr2(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
409
|
+
}
|
|
410
|
+
function isSymbol(obj) {
|
|
411
|
+
if (hasShammedSymbols) {
|
|
412
|
+
return obj && typeof obj === "object" && obj instanceof Symbol;
|
|
413
|
+
}
|
|
414
|
+
if (typeof obj === "symbol") {
|
|
415
|
+
return true;
|
|
416
|
+
}
|
|
417
|
+
if (!obj || typeof obj !== "object" || !symToString) {
|
|
418
|
+
return false;
|
|
419
|
+
}
|
|
420
|
+
try {
|
|
421
|
+
symToString.call(obj);
|
|
422
|
+
return true;
|
|
423
|
+
} catch (e) {
|
|
424
|
+
}
|
|
425
|
+
return false;
|
|
426
|
+
}
|
|
427
|
+
function isBigInt(obj) {
|
|
428
|
+
if (!obj || typeof obj !== "object" || !bigIntValueOf) {
|
|
429
|
+
return false;
|
|
430
|
+
}
|
|
431
|
+
try {
|
|
432
|
+
bigIntValueOf.call(obj);
|
|
433
|
+
return true;
|
|
434
|
+
} catch (e) {
|
|
435
|
+
}
|
|
436
|
+
return false;
|
|
437
|
+
}
|
|
438
|
+
var hasOwn = Object.prototype.hasOwnProperty || function(key) {
|
|
439
|
+
return key in this;
|
|
440
|
+
};
|
|
441
|
+
function has(obj, key) {
|
|
442
|
+
return hasOwn.call(obj, key);
|
|
443
|
+
}
|
|
444
|
+
function toStr2(obj) {
|
|
445
|
+
return objectToString.call(obj);
|
|
446
|
+
}
|
|
447
|
+
function nameOf(f) {
|
|
448
|
+
if (f.name) {
|
|
449
|
+
return f.name;
|
|
450
|
+
}
|
|
451
|
+
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
452
|
+
if (m) {
|
|
453
|
+
return m[1];
|
|
454
|
+
}
|
|
455
|
+
return null;
|
|
456
|
+
}
|
|
457
|
+
function indexOf(xs, x) {
|
|
458
|
+
if (xs.indexOf) {
|
|
459
|
+
return xs.indexOf(x);
|
|
460
|
+
}
|
|
461
|
+
for (var i = 0, l = xs.length; i < l; i++) {
|
|
462
|
+
if (xs[i] === x) {
|
|
463
|
+
return i;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
return -1;
|
|
467
|
+
}
|
|
468
|
+
function isMap(x) {
|
|
469
|
+
if (!mapSize || !x || typeof x !== "object") {
|
|
470
|
+
return false;
|
|
471
|
+
}
|
|
472
|
+
try {
|
|
473
|
+
mapSize.call(x);
|
|
474
|
+
try {
|
|
475
|
+
setSize.call(x);
|
|
476
|
+
} catch (s) {
|
|
477
|
+
return true;
|
|
478
|
+
}
|
|
479
|
+
return x instanceof Map;
|
|
480
|
+
} catch (e) {
|
|
481
|
+
}
|
|
482
|
+
return false;
|
|
483
|
+
}
|
|
484
|
+
function isWeakMap(x) {
|
|
485
|
+
if (!weakMapHas || !x || typeof x !== "object") {
|
|
486
|
+
return false;
|
|
487
|
+
}
|
|
488
|
+
try {
|
|
489
|
+
weakMapHas.call(x, weakMapHas);
|
|
490
|
+
try {
|
|
491
|
+
weakSetHas.call(x, weakSetHas);
|
|
492
|
+
} catch (s) {
|
|
493
|
+
return true;
|
|
494
|
+
}
|
|
495
|
+
return x instanceof WeakMap;
|
|
496
|
+
} catch (e) {
|
|
497
|
+
}
|
|
498
|
+
return false;
|
|
499
|
+
}
|
|
500
|
+
function isWeakRef(x) {
|
|
501
|
+
if (!weakRefDeref || !x || typeof x !== "object") {
|
|
502
|
+
return false;
|
|
503
|
+
}
|
|
504
|
+
try {
|
|
505
|
+
weakRefDeref.call(x);
|
|
506
|
+
return true;
|
|
507
|
+
} catch (e) {
|
|
508
|
+
}
|
|
509
|
+
return false;
|
|
510
|
+
}
|
|
511
|
+
function isSet(x) {
|
|
512
|
+
if (!setSize || !x || typeof x !== "object") {
|
|
513
|
+
return false;
|
|
514
|
+
}
|
|
515
|
+
try {
|
|
516
|
+
setSize.call(x);
|
|
517
|
+
try {
|
|
518
|
+
mapSize.call(x);
|
|
519
|
+
} catch (m) {
|
|
520
|
+
return true;
|
|
521
|
+
}
|
|
522
|
+
return x instanceof Set;
|
|
523
|
+
} catch (e) {
|
|
524
|
+
}
|
|
525
|
+
return false;
|
|
526
|
+
}
|
|
527
|
+
function isWeakSet(x) {
|
|
528
|
+
if (!weakSetHas || !x || typeof x !== "object") {
|
|
529
|
+
return false;
|
|
530
|
+
}
|
|
531
|
+
try {
|
|
532
|
+
weakSetHas.call(x, weakSetHas);
|
|
533
|
+
try {
|
|
534
|
+
weakMapHas.call(x, weakMapHas);
|
|
535
|
+
} catch (s) {
|
|
536
|
+
return true;
|
|
537
|
+
}
|
|
538
|
+
return x instanceof WeakSet;
|
|
539
|
+
} catch (e) {
|
|
540
|
+
}
|
|
541
|
+
return false;
|
|
542
|
+
}
|
|
543
|
+
function isElement(x) {
|
|
544
|
+
if (!x || typeof x !== "object") {
|
|
545
|
+
return false;
|
|
546
|
+
}
|
|
547
|
+
if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
|
|
548
|
+
return true;
|
|
549
|
+
}
|
|
550
|
+
return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
|
|
551
|
+
}
|
|
552
|
+
function inspectString(str, opts) {
|
|
553
|
+
if (str.length > opts.maxStringLength) {
|
|
554
|
+
var remaining = str.length - opts.maxStringLength;
|
|
555
|
+
var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
|
|
556
|
+
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
557
|
+
}
|
|
558
|
+
var quoteRE = quoteREs[opts.quoteStyle || "single"];
|
|
559
|
+
quoteRE.lastIndex = 0;
|
|
560
|
+
var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte);
|
|
561
|
+
return wrapQuotes(s, "single", opts);
|
|
562
|
+
}
|
|
563
|
+
function lowbyte(c) {
|
|
564
|
+
var n = c.charCodeAt(0);
|
|
565
|
+
var x = {
|
|
566
|
+
8: "b",
|
|
567
|
+
9: "t",
|
|
568
|
+
10: "n",
|
|
569
|
+
12: "f",
|
|
570
|
+
13: "r"
|
|
571
|
+
}[n];
|
|
572
|
+
if (x) {
|
|
573
|
+
return "\\" + x;
|
|
574
|
+
}
|
|
575
|
+
return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
|
|
576
|
+
}
|
|
577
|
+
function markBoxed(str) {
|
|
578
|
+
return "Object(" + str + ")";
|
|
579
|
+
}
|
|
580
|
+
function weakCollectionOf(type) {
|
|
581
|
+
return type + " { ? }";
|
|
582
|
+
}
|
|
583
|
+
function collectionOf(type, size, entries, indent) {
|
|
584
|
+
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
|
|
585
|
+
return type + " (" + size + ") {" + joinedEntries + "}";
|
|
586
|
+
}
|
|
587
|
+
function singleLineValues(xs) {
|
|
588
|
+
for (var i = 0; i < xs.length; i++) {
|
|
589
|
+
if (indexOf(xs[i], "\n") >= 0) {
|
|
590
|
+
return false;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
return true;
|
|
594
|
+
}
|
|
595
|
+
function getIndent(opts, depth) {
|
|
596
|
+
var baseIndent;
|
|
597
|
+
if (opts.indent === " ") {
|
|
598
|
+
baseIndent = " ";
|
|
599
|
+
} else if (typeof opts.indent === "number" && opts.indent > 0) {
|
|
600
|
+
baseIndent = $join.call(Array(opts.indent + 1), " ");
|
|
601
|
+
} else {
|
|
602
|
+
return null;
|
|
603
|
+
}
|
|
604
|
+
return {
|
|
605
|
+
base: baseIndent,
|
|
606
|
+
prev: $join.call(Array(depth + 1), baseIndent)
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
function indentedJoin(xs, indent) {
|
|
610
|
+
if (xs.length === 0) {
|
|
611
|
+
return "";
|
|
612
|
+
}
|
|
613
|
+
var lineJoiner = "\n" + indent.prev + indent.base;
|
|
614
|
+
return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
|
|
615
|
+
}
|
|
616
|
+
function arrObjKeys(obj, inspect) {
|
|
617
|
+
var isArr = isArray(obj);
|
|
618
|
+
var xs = [];
|
|
619
|
+
if (isArr) {
|
|
620
|
+
xs.length = obj.length;
|
|
621
|
+
for (var i = 0; i < obj.length; i++) {
|
|
622
|
+
xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
var syms = typeof gOPS === "function" ? gOPS(obj) : [];
|
|
626
|
+
var symMap;
|
|
627
|
+
if (hasShammedSymbols) {
|
|
628
|
+
symMap = {};
|
|
629
|
+
for (var k = 0; k < syms.length; k++) {
|
|
630
|
+
symMap["$" + syms[k]] = syms[k];
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
for (var key in obj) {
|
|
634
|
+
if (!has(obj, key)) {
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
637
|
+
if (isArr && String(Number(key)) === key && key < obj.length) {
|
|
638
|
+
continue;
|
|
639
|
+
}
|
|
640
|
+
if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
|
|
641
|
+
continue;
|
|
642
|
+
} else if ($test.call(/[^\w$]/, key)) {
|
|
643
|
+
xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
|
|
644
|
+
} else {
|
|
645
|
+
xs.push(key + ": " + inspect(obj[key], obj));
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
if (typeof gOPS === "function") {
|
|
649
|
+
for (var j = 0; j < syms.length; j++) {
|
|
650
|
+
if (isEnumerable.call(obj, syms[j])) {
|
|
651
|
+
xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
return xs;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
|
|
660
|
+
// ../../.yarn/cache/side-channel-list-npm-1.0.0-14f74146d1-644f4ac893.zip/node_modules/side-channel-list/index.js
|
|
661
|
+
var require_side_channel_list = __commonJS({
|
|
662
|
+
"../../.yarn/cache/side-channel-list-npm-1.0.0-14f74146d1-644f4ac893.zip/node_modules/side-channel-list/index.js"(exports2, module2) {
|
|
663
|
+
"use strict";
|
|
664
|
+
var inspect = require_object_inspect();
|
|
665
|
+
var $TypeError = require_type();
|
|
666
|
+
var listGetNode = function(list3, key, isDelete) {
|
|
667
|
+
var prev = list3;
|
|
668
|
+
var curr;
|
|
669
|
+
for (; (curr = prev.next) != null; prev = curr) {
|
|
670
|
+
if (curr.key === key) {
|
|
671
|
+
prev.next = curr.next;
|
|
672
|
+
if (!isDelete) {
|
|
673
|
+
curr.next = /** @type {NonNullable<typeof list.next>} */
|
|
674
|
+
list3.next;
|
|
675
|
+
list3.next = curr;
|
|
676
|
+
}
|
|
677
|
+
return curr;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
var listGet = function(objects, key) {
|
|
682
|
+
if (!objects) {
|
|
683
|
+
return void 0;
|
|
684
|
+
}
|
|
685
|
+
var node = listGetNode(objects, key);
|
|
686
|
+
return node && node.value;
|
|
687
|
+
};
|
|
688
|
+
var listSet = function(objects, key, value) {
|
|
689
|
+
var node = listGetNode(objects, key);
|
|
690
|
+
if (node) {
|
|
691
|
+
node.value = value;
|
|
692
|
+
} else {
|
|
693
|
+
objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
|
|
694
|
+
{
|
|
695
|
+
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
696
|
+
key,
|
|
697
|
+
next: objects.next,
|
|
698
|
+
value
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
var listHas = function(objects, key) {
|
|
703
|
+
if (!objects) {
|
|
704
|
+
return false;
|
|
705
|
+
}
|
|
706
|
+
return !!listGetNode(objects, key);
|
|
707
|
+
};
|
|
708
|
+
var listDelete = function(objects, key) {
|
|
709
|
+
if (objects) {
|
|
710
|
+
return listGetNode(objects, key, true);
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
module2.exports = function getSideChannelList() {
|
|
714
|
+
var $o;
|
|
715
|
+
var channel = {
|
|
716
|
+
assert: function(key) {
|
|
717
|
+
if (!channel.has(key)) {
|
|
718
|
+
throw new $TypeError("Side channel does not contain " + inspect(key));
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
"delete": function(key) {
|
|
722
|
+
var root = $o && $o.next;
|
|
723
|
+
var deletedNode = listDelete($o, key);
|
|
724
|
+
if (deletedNode && root && root === deletedNode) {
|
|
725
|
+
$o = void 0;
|
|
726
|
+
}
|
|
727
|
+
return !!deletedNode;
|
|
728
|
+
},
|
|
729
|
+
get: function(key) {
|
|
730
|
+
return listGet($o, key);
|
|
731
|
+
},
|
|
732
|
+
has: function(key) {
|
|
733
|
+
return listHas($o, key);
|
|
734
|
+
},
|
|
735
|
+
set: function(key, value) {
|
|
736
|
+
if (!$o) {
|
|
737
|
+
$o = {
|
|
738
|
+
next: void 0
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
listSet(
|
|
742
|
+
/** @type {NonNullable<typeof $o>} */
|
|
743
|
+
$o,
|
|
744
|
+
key,
|
|
745
|
+
value
|
|
746
|
+
);
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
return channel;
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
|
|
754
|
+
// ../../.yarn/cache/es-object-atoms-npm-1.1.1-362d8043c2-65364812ca.zip/node_modules/es-object-atoms/index.js
|
|
755
|
+
var require_es_object_atoms = __commonJS({
|
|
756
|
+
"../../.yarn/cache/es-object-atoms-npm-1.1.1-362d8043c2-65364812ca.zip/node_modules/es-object-atoms/index.js"(exports2, module2) {
|
|
757
|
+
"use strict";
|
|
758
|
+
module2.exports = Object;
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
|
|
762
|
+
// ../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/index.js
|
|
763
|
+
var require_es_errors = __commonJS({
|
|
764
|
+
"../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/index.js"(exports2, module2) {
|
|
765
|
+
"use strict";
|
|
766
|
+
module2.exports = Error;
|
|
767
|
+
}
|
|
768
|
+
});
|
|
769
|
+
|
|
770
|
+
// ../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/eval.js
|
|
771
|
+
var require_eval = __commonJS({
|
|
772
|
+
"../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/eval.js"(exports2, module2) {
|
|
773
|
+
"use strict";
|
|
774
|
+
module2.exports = EvalError;
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
|
|
778
|
+
// ../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/range.js
|
|
779
|
+
var require_range = __commonJS({
|
|
780
|
+
"../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/range.js"(exports2, module2) {
|
|
781
|
+
"use strict";
|
|
782
|
+
module2.exports = RangeError;
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
|
|
786
|
+
// ../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/ref.js
|
|
787
|
+
var require_ref = __commonJS({
|
|
788
|
+
"../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/ref.js"(exports2, module2) {
|
|
789
|
+
"use strict";
|
|
790
|
+
module2.exports = ReferenceError;
|
|
791
|
+
}
|
|
792
|
+
});
|
|
793
|
+
|
|
794
|
+
// ../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/syntax.js
|
|
795
|
+
var require_syntax = __commonJS({
|
|
796
|
+
"../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/syntax.js"(exports2, module2) {
|
|
797
|
+
"use strict";
|
|
798
|
+
module2.exports = SyntaxError;
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
|
|
802
|
+
// ../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/uri.js
|
|
803
|
+
var require_uri = __commonJS({
|
|
804
|
+
"../../.yarn/cache/es-errors-npm-1.3.0-fda0c9b8a8-0a61325670.zip/node_modules/es-errors/uri.js"(exports2, module2) {
|
|
805
|
+
"use strict";
|
|
806
|
+
module2.exports = URIError;
|
|
807
|
+
}
|
|
808
|
+
});
|
|
809
|
+
|
|
810
|
+
// ../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/abs.js
|
|
811
|
+
var require_abs = __commonJS({
|
|
812
|
+
"../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/abs.js"(exports2, module2) {
|
|
813
|
+
"use strict";
|
|
814
|
+
module2.exports = Math.abs;
|
|
815
|
+
}
|
|
816
|
+
});
|
|
817
|
+
|
|
818
|
+
// ../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/floor.js
|
|
819
|
+
var require_floor = __commonJS({
|
|
820
|
+
"../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/floor.js"(exports2, module2) {
|
|
821
|
+
"use strict";
|
|
822
|
+
module2.exports = Math.floor;
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
|
|
826
|
+
// ../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/max.js
|
|
827
|
+
var require_max = __commonJS({
|
|
828
|
+
"../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/max.js"(exports2, module2) {
|
|
829
|
+
"use strict";
|
|
830
|
+
module2.exports = Math.max;
|
|
831
|
+
}
|
|
832
|
+
});
|
|
833
|
+
|
|
834
|
+
// ../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/min.js
|
|
835
|
+
var require_min = __commonJS({
|
|
836
|
+
"../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/min.js"(exports2, module2) {
|
|
837
|
+
"use strict";
|
|
838
|
+
module2.exports = Math.min;
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
|
|
842
|
+
// ../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/pow.js
|
|
843
|
+
var require_pow = __commonJS({
|
|
844
|
+
"../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/pow.js"(exports2, module2) {
|
|
845
|
+
"use strict";
|
|
846
|
+
module2.exports = Math.pow;
|
|
847
|
+
}
|
|
848
|
+
});
|
|
849
|
+
|
|
850
|
+
// ../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/round.js
|
|
851
|
+
var require_round = __commonJS({
|
|
852
|
+
"../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/round.js"(exports2, module2) {
|
|
853
|
+
"use strict";
|
|
854
|
+
module2.exports = Math.round;
|
|
855
|
+
}
|
|
856
|
+
});
|
|
857
|
+
|
|
858
|
+
// ../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/isNaN.js
|
|
859
|
+
var require_isNaN = __commonJS({
|
|
860
|
+
"../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/isNaN.js"(exports2, module2) {
|
|
861
|
+
"use strict";
|
|
862
|
+
module2.exports = Number.isNaN || function isNaN2(a) {
|
|
863
|
+
return a !== a;
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
});
|
|
867
|
+
|
|
868
|
+
// ../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/sign.js
|
|
869
|
+
var require_sign = __commonJS({
|
|
870
|
+
"../../.yarn/cache/math-intrinsics-npm-1.1.0-9204d80e7d-7579ff94e8.zip/node_modules/math-intrinsics/sign.js"(exports2, module2) {
|
|
871
|
+
"use strict";
|
|
872
|
+
var $isNaN = require_isNaN();
|
|
873
|
+
module2.exports = function sign(number) {
|
|
874
|
+
if ($isNaN(number) || number === 0) {
|
|
875
|
+
return number;
|
|
876
|
+
}
|
|
877
|
+
return number < 0 ? -1 : 1;
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
|
|
882
|
+
// ../../.yarn/cache/gopd-npm-1.2.0-df89ffa78e-50fff1e04b.zip/node_modules/gopd/gOPD.js
|
|
883
|
+
var require_gOPD = __commonJS({
|
|
884
|
+
"../../.yarn/cache/gopd-npm-1.2.0-df89ffa78e-50fff1e04b.zip/node_modules/gopd/gOPD.js"(exports2, module2) {
|
|
885
|
+
"use strict";
|
|
886
|
+
module2.exports = Object.getOwnPropertyDescriptor;
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
|
|
890
|
+
// ../../.yarn/cache/gopd-npm-1.2.0-df89ffa78e-50fff1e04b.zip/node_modules/gopd/index.js
|
|
891
|
+
var require_gopd = __commonJS({
|
|
892
|
+
"../../.yarn/cache/gopd-npm-1.2.0-df89ffa78e-50fff1e04b.zip/node_modules/gopd/index.js"(exports2, module2) {
|
|
893
|
+
"use strict";
|
|
894
|
+
var $gOPD = require_gOPD();
|
|
895
|
+
if ($gOPD) {
|
|
896
|
+
try {
|
|
897
|
+
$gOPD([], "length");
|
|
898
|
+
} catch (e) {
|
|
899
|
+
$gOPD = null;
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
module2.exports = $gOPD;
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
|
|
906
|
+
// ../../.yarn/cache/es-define-property-npm-1.0.1-3fc6324f1c-3f54eb49c1.zip/node_modules/es-define-property/index.js
|
|
907
|
+
var require_es_define_property = __commonJS({
|
|
908
|
+
"../../.yarn/cache/es-define-property-npm-1.0.1-3fc6324f1c-3f54eb49c1.zip/node_modules/es-define-property/index.js"(exports2, module2) {
|
|
909
|
+
"use strict";
|
|
910
|
+
var $defineProperty = Object.defineProperty || false;
|
|
911
|
+
if ($defineProperty) {
|
|
912
|
+
try {
|
|
913
|
+
$defineProperty({}, "a", { value: 1 });
|
|
914
|
+
} catch (e) {
|
|
915
|
+
$defineProperty = false;
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
module2.exports = $defineProperty;
|
|
919
|
+
}
|
|
920
|
+
});
|
|
921
|
+
|
|
922
|
+
// ../../.yarn/cache/has-symbols-npm-1.1.0-9aa7dc2ac1-dde0a734b1.zip/node_modules/has-symbols/shams.js
|
|
923
|
+
var require_shams = __commonJS({
|
|
924
|
+
"../../.yarn/cache/has-symbols-npm-1.1.0-9aa7dc2ac1-dde0a734b1.zip/node_modules/has-symbols/shams.js"(exports2, module2) {
|
|
925
|
+
"use strict";
|
|
926
|
+
module2.exports = function hasSymbols() {
|
|
927
|
+
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
|
|
928
|
+
return false;
|
|
929
|
+
}
|
|
930
|
+
if (typeof Symbol.iterator === "symbol") {
|
|
931
|
+
return true;
|
|
932
|
+
}
|
|
933
|
+
var obj = {};
|
|
934
|
+
var sym = Symbol("test");
|
|
935
|
+
var symObj = Object(sym);
|
|
936
|
+
if (typeof sym === "string") {
|
|
937
|
+
return false;
|
|
938
|
+
}
|
|
939
|
+
if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
|
|
940
|
+
return false;
|
|
941
|
+
}
|
|
942
|
+
if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
|
|
943
|
+
return false;
|
|
944
|
+
}
|
|
945
|
+
var symVal = 42;
|
|
946
|
+
obj[sym] = symVal;
|
|
947
|
+
for (var _ in obj) {
|
|
948
|
+
return false;
|
|
949
|
+
}
|
|
950
|
+
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
|
|
951
|
+
return false;
|
|
952
|
+
}
|
|
953
|
+
if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
|
|
954
|
+
return false;
|
|
955
|
+
}
|
|
956
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
957
|
+
if (syms.length !== 1 || syms[0] !== sym) {
|
|
958
|
+
return false;
|
|
959
|
+
}
|
|
960
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
|
|
961
|
+
return false;
|
|
962
|
+
}
|
|
963
|
+
if (typeof Object.getOwnPropertyDescriptor === "function") {
|
|
964
|
+
var descriptor = (
|
|
965
|
+
/** @type {PropertyDescriptor} */
|
|
966
|
+
Object.getOwnPropertyDescriptor(obj, sym)
|
|
967
|
+
);
|
|
968
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) {
|
|
969
|
+
return false;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
return true;
|
|
973
|
+
};
|
|
974
|
+
}
|
|
975
|
+
});
|
|
976
|
+
|
|
977
|
+
// ../../.yarn/cache/has-symbols-npm-1.1.0-9aa7dc2ac1-dde0a734b1.zip/node_modules/has-symbols/index.js
|
|
978
|
+
var require_has_symbols = __commonJS({
|
|
979
|
+
"../../.yarn/cache/has-symbols-npm-1.1.0-9aa7dc2ac1-dde0a734b1.zip/node_modules/has-symbols/index.js"(exports2, module2) {
|
|
980
|
+
"use strict";
|
|
981
|
+
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
982
|
+
var hasSymbolSham = require_shams();
|
|
983
|
+
module2.exports = function hasNativeSymbols() {
|
|
984
|
+
if (typeof origSymbol !== "function") {
|
|
985
|
+
return false;
|
|
986
|
+
}
|
|
987
|
+
if (typeof Symbol !== "function") {
|
|
988
|
+
return false;
|
|
989
|
+
}
|
|
990
|
+
if (typeof origSymbol("foo") !== "symbol") {
|
|
991
|
+
return false;
|
|
992
|
+
}
|
|
993
|
+
if (typeof Symbol("bar") !== "symbol") {
|
|
994
|
+
return false;
|
|
995
|
+
}
|
|
996
|
+
return hasSymbolSham();
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
});
|
|
1000
|
+
|
|
1001
|
+
// ../../.yarn/cache/get-proto-npm-1.0.1-4d30bac614-9224acb446.zip/node_modules/get-proto/Reflect.getPrototypeOf.js
|
|
1002
|
+
var require_Reflect_getPrototypeOf = __commonJS({
|
|
1003
|
+
"../../.yarn/cache/get-proto-npm-1.0.1-4d30bac614-9224acb446.zip/node_modules/get-proto/Reflect.getPrototypeOf.js"(exports2, module2) {
|
|
1004
|
+
"use strict";
|
|
1005
|
+
module2.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
|
|
1006
|
+
}
|
|
1007
|
+
});
|
|
1008
|
+
|
|
1009
|
+
// ../../.yarn/cache/get-proto-npm-1.0.1-4d30bac614-9224acb446.zip/node_modules/get-proto/Object.getPrototypeOf.js
|
|
1010
|
+
var require_Object_getPrototypeOf = __commonJS({
|
|
1011
|
+
"../../.yarn/cache/get-proto-npm-1.0.1-4d30bac614-9224acb446.zip/node_modules/get-proto/Object.getPrototypeOf.js"(exports2, module2) {
|
|
1012
|
+
"use strict";
|
|
1013
|
+
var $Object = require_es_object_atoms();
|
|
1014
|
+
module2.exports = $Object.getPrototypeOf || null;
|
|
1015
|
+
}
|
|
1016
|
+
});
|
|
1017
|
+
|
|
1018
|
+
// ../../.yarn/cache/function-bind-npm-1.1.2-7a55be9b03-d8680ee1e5.zip/node_modules/function-bind/implementation.js
|
|
1019
|
+
var require_implementation = __commonJS({
|
|
1020
|
+
"../../.yarn/cache/function-bind-npm-1.1.2-7a55be9b03-d8680ee1e5.zip/node_modules/function-bind/implementation.js"(exports2, module2) {
|
|
1021
|
+
"use strict";
|
|
1022
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
1023
|
+
var toStr2 = Object.prototype.toString;
|
|
1024
|
+
var max = Math.max;
|
|
1025
|
+
var funcType = "[object Function]";
|
|
1026
|
+
var concatty = function concatty2(a, b) {
|
|
1027
|
+
var arr = [];
|
|
1028
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
1029
|
+
arr[i] = a[i];
|
|
1030
|
+
}
|
|
1031
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
1032
|
+
arr[j + a.length] = b[j];
|
|
1033
|
+
}
|
|
1034
|
+
return arr;
|
|
1035
|
+
};
|
|
1036
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
1037
|
+
var arr = [];
|
|
1038
|
+
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
1039
|
+
arr[j] = arrLike[i];
|
|
1040
|
+
}
|
|
1041
|
+
return arr;
|
|
1042
|
+
};
|
|
1043
|
+
var joiny = function(arr, joiner) {
|
|
1044
|
+
var str = "";
|
|
1045
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
1046
|
+
str += arr[i];
|
|
1047
|
+
if (i + 1 < arr.length) {
|
|
1048
|
+
str += joiner;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
return str;
|
|
1052
|
+
};
|
|
1053
|
+
module2.exports = function bind(that) {
|
|
1054
|
+
var target = this;
|
|
1055
|
+
if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
|
|
1056
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
1057
|
+
}
|
|
1058
|
+
var args2 = slicy(arguments, 1);
|
|
1059
|
+
var bound;
|
|
1060
|
+
var binder = function() {
|
|
1061
|
+
if (this instanceof bound) {
|
|
1062
|
+
var result = target.apply(
|
|
1063
|
+
this,
|
|
1064
|
+
concatty(args2, arguments)
|
|
1065
|
+
);
|
|
1066
|
+
if (Object(result) === result) {
|
|
1067
|
+
return result;
|
|
1068
|
+
}
|
|
1069
|
+
return this;
|
|
1070
|
+
}
|
|
1071
|
+
return target.apply(
|
|
1072
|
+
that,
|
|
1073
|
+
concatty(args2, arguments)
|
|
1074
|
+
);
|
|
1075
|
+
};
|
|
1076
|
+
var boundLength = max(0, target.length - args2.length);
|
|
1077
|
+
var boundArgs = [];
|
|
1078
|
+
for (var i = 0; i < boundLength; i++) {
|
|
1079
|
+
boundArgs[i] = "$" + i;
|
|
1080
|
+
}
|
|
1081
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
1082
|
+
if (target.prototype) {
|
|
1083
|
+
var Empty = function Empty2() {
|
|
1084
|
+
};
|
|
1085
|
+
Empty.prototype = target.prototype;
|
|
1086
|
+
bound.prototype = new Empty();
|
|
1087
|
+
Empty.prototype = null;
|
|
1088
|
+
}
|
|
1089
|
+
return bound;
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
|
|
1094
|
+
// ../../.yarn/cache/function-bind-npm-1.1.2-7a55be9b03-d8680ee1e5.zip/node_modules/function-bind/index.js
|
|
1095
|
+
var require_function_bind = __commonJS({
|
|
1096
|
+
"../../.yarn/cache/function-bind-npm-1.1.2-7a55be9b03-d8680ee1e5.zip/node_modules/function-bind/index.js"(exports2, module2) {
|
|
1097
|
+
"use strict";
|
|
1098
|
+
var implementation = require_implementation();
|
|
1099
|
+
module2.exports = Function.prototype.bind || implementation;
|
|
1100
|
+
}
|
|
1101
|
+
});
|
|
1102
|
+
|
|
1103
|
+
// ../../.yarn/cache/call-bind-apply-helpers-npm-1.0.2-3eedbea3bb-47bd9901d5.zip/node_modules/call-bind-apply-helpers/functionCall.js
|
|
1104
|
+
var require_functionCall = __commonJS({
|
|
1105
|
+
"../../.yarn/cache/call-bind-apply-helpers-npm-1.0.2-3eedbea3bb-47bd9901d5.zip/node_modules/call-bind-apply-helpers/functionCall.js"(exports2, module2) {
|
|
1106
|
+
"use strict";
|
|
1107
|
+
module2.exports = Function.prototype.call;
|
|
1108
|
+
}
|
|
1109
|
+
});
|
|
1110
|
+
|
|
1111
|
+
// ../../.yarn/cache/call-bind-apply-helpers-npm-1.0.2-3eedbea3bb-47bd9901d5.zip/node_modules/call-bind-apply-helpers/functionApply.js
|
|
1112
|
+
var require_functionApply = __commonJS({
|
|
1113
|
+
"../../.yarn/cache/call-bind-apply-helpers-npm-1.0.2-3eedbea3bb-47bd9901d5.zip/node_modules/call-bind-apply-helpers/functionApply.js"(exports2, module2) {
|
|
1114
|
+
"use strict";
|
|
1115
|
+
module2.exports = Function.prototype.apply;
|
|
1116
|
+
}
|
|
1117
|
+
});
|
|
1118
|
+
|
|
1119
|
+
// ../../.yarn/cache/call-bind-apply-helpers-npm-1.0.2-3eedbea3bb-47bd9901d5.zip/node_modules/call-bind-apply-helpers/reflectApply.js
|
|
1120
|
+
var require_reflectApply = __commonJS({
|
|
1121
|
+
"../../.yarn/cache/call-bind-apply-helpers-npm-1.0.2-3eedbea3bb-47bd9901d5.zip/node_modules/call-bind-apply-helpers/reflectApply.js"(exports2, module2) {
|
|
1122
|
+
"use strict";
|
|
1123
|
+
module2.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
1124
|
+
}
|
|
1125
|
+
});
|
|
1126
|
+
|
|
1127
|
+
// ../../.yarn/cache/call-bind-apply-helpers-npm-1.0.2-3eedbea3bb-47bd9901d5.zip/node_modules/call-bind-apply-helpers/actualApply.js
|
|
1128
|
+
var require_actualApply = __commonJS({
|
|
1129
|
+
"../../.yarn/cache/call-bind-apply-helpers-npm-1.0.2-3eedbea3bb-47bd9901d5.zip/node_modules/call-bind-apply-helpers/actualApply.js"(exports2, module2) {
|
|
1130
|
+
"use strict";
|
|
1131
|
+
var bind = require_function_bind();
|
|
1132
|
+
var $apply = require_functionApply();
|
|
1133
|
+
var $call = require_functionCall();
|
|
1134
|
+
var $reflectApply = require_reflectApply();
|
|
1135
|
+
module2.exports = $reflectApply || bind.call($call, $apply);
|
|
1136
|
+
}
|
|
1137
|
+
});
|
|
1138
|
+
|
|
1139
|
+
// ../../.yarn/cache/call-bind-apply-helpers-npm-1.0.2-3eedbea3bb-47bd9901d5.zip/node_modules/call-bind-apply-helpers/index.js
|
|
1140
|
+
var require_call_bind_apply_helpers = __commonJS({
|
|
1141
|
+
"../../.yarn/cache/call-bind-apply-helpers-npm-1.0.2-3eedbea3bb-47bd9901d5.zip/node_modules/call-bind-apply-helpers/index.js"(exports2, module2) {
|
|
1142
|
+
"use strict";
|
|
1143
|
+
var bind = require_function_bind();
|
|
1144
|
+
var $TypeError = require_type();
|
|
1145
|
+
var $call = require_functionCall();
|
|
1146
|
+
var $actualApply = require_actualApply();
|
|
1147
|
+
module2.exports = function callBindBasic(args2) {
|
|
1148
|
+
if (args2.length < 1 || typeof args2[0] !== "function") {
|
|
1149
|
+
throw new $TypeError("a function is required");
|
|
1150
|
+
}
|
|
1151
|
+
return $actualApply(bind, $call, args2);
|
|
1152
|
+
};
|
|
1153
|
+
}
|
|
1154
|
+
});
|
|
1155
|
+
|
|
1156
|
+
// ../../.yarn/cache/dunder-proto-npm-1.0.1-90eb6829db-199f2a0c1c.zip/node_modules/dunder-proto/get.js
|
|
1157
|
+
var require_get = __commonJS({
|
|
1158
|
+
"../../.yarn/cache/dunder-proto-npm-1.0.1-90eb6829db-199f2a0c1c.zip/node_modules/dunder-proto/get.js"(exports2, module2) {
|
|
1159
|
+
"use strict";
|
|
1160
|
+
var callBind = require_call_bind_apply_helpers();
|
|
1161
|
+
var gOPD = require_gopd();
|
|
1162
|
+
var hasProtoAccessor;
|
|
1163
|
+
try {
|
|
1164
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
1165
|
+
[].__proto__ === Array.prototype;
|
|
1166
|
+
} catch (e) {
|
|
1167
|
+
if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
|
|
1168
|
+
throw e;
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(
|
|
1172
|
+
Object.prototype,
|
|
1173
|
+
/** @type {keyof typeof Object.prototype} */
|
|
1174
|
+
"__proto__"
|
|
1175
|
+
);
|
|
1176
|
+
var $Object = Object;
|
|
1177
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
1178
|
+
module2.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
|
|
1179
|
+
/** @type {import('./get')} */
|
|
1180
|
+
function getDunder(value) {
|
|
1181
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
1182
|
+
}
|
|
1183
|
+
) : false;
|
|
1184
|
+
}
|
|
1185
|
+
});
|
|
1186
|
+
|
|
1187
|
+
// ../../.yarn/cache/get-proto-npm-1.0.1-4d30bac614-9224acb446.zip/node_modules/get-proto/index.js
|
|
1188
|
+
var require_get_proto = __commonJS({
|
|
1189
|
+
"../../.yarn/cache/get-proto-npm-1.0.1-4d30bac614-9224acb446.zip/node_modules/get-proto/index.js"(exports2, module2) {
|
|
1190
|
+
"use strict";
|
|
1191
|
+
var reflectGetProto = require_Reflect_getPrototypeOf();
|
|
1192
|
+
var originalGetProto = require_Object_getPrototypeOf();
|
|
1193
|
+
var getDunderProto = require_get();
|
|
1194
|
+
module2.exports = reflectGetProto ? function getProto(O) {
|
|
1195
|
+
return reflectGetProto(O);
|
|
1196
|
+
} : originalGetProto ? function getProto(O) {
|
|
1197
|
+
if (!O || typeof O !== "object" && typeof O !== "function") {
|
|
1198
|
+
throw new TypeError("getProto: not an object");
|
|
1199
|
+
}
|
|
1200
|
+
return originalGetProto(O);
|
|
1201
|
+
} : getDunderProto ? function getProto(O) {
|
|
1202
|
+
return getDunderProto(O);
|
|
1203
|
+
} : null;
|
|
1204
|
+
}
|
|
1205
|
+
});
|
|
1206
|
+
|
|
1207
|
+
// ../../.yarn/cache/hasown-npm-2.0.2-80fe6c9901-3769d43470.zip/node_modules/hasown/index.js
|
|
1208
|
+
var require_hasown = __commonJS({
|
|
1209
|
+
"../../.yarn/cache/hasown-npm-2.0.2-80fe6c9901-3769d43470.zip/node_modules/hasown/index.js"(exports2, module2) {
|
|
1210
|
+
"use strict";
|
|
1211
|
+
var call = Function.prototype.call;
|
|
1212
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
1213
|
+
var bind = require_function_bind();
|
|
1214
|
+
module2.exports = bind.call(call, $hasOwn);
|
|
1215
|
+
}
|
|
1216
|
+
});
|
|
1217
|
+
|
|
1218
|
+
// ../../.yarn/cache/get-intrinsic-npm-1.3.0-35558f27b6-52c81808af.zip/node_modules/get-intrinsic/index.js
|
|
1219
|
+
var require_get_intrinsic = __commonJS({
|
|
1220
|
+
"../../.yarn/cache/get-intrinsic-npm-1.3.0-35558f27b6-52c81808af.zip/node_modules/get-intrinsic/index.js"(exports2, module2) {
|
|
1221
|
+
"use strict";
|
|
1222
|
+
var undefined2;
|
|
1223
|
+
var $Object = require_es_object_atoms();
|
|
1224
|
+
var $Error = require_es_errors();
|
|
1225
|
+
var $EvalError = require_eval();
|
|
1226
|
+
var $RangeError = require_range();
|
|
1227
|
+
var $ReferenceError = require_ref();
|
|
1228
|
+
var $SyntaxError = require_syntax();
|
|
1229
|
+
var $TypeError = require_type();
|
|
1230
|
+
var $URIError = require_uri();
|
|
1231
|
+
var abs = require_abs();
|
|
1232
|
+
var floor = require_floor();
|
|
1233
|
+
var max = require_max();
|
|
1234
|
+
var min = require_min();
|
|
1235
|
+
var pow = require_pow();
|
|
1236
|
+
var round = require_round();
|
|
1237
|
+
var sign = require_sign();
|
|
1238
|
+
var $Function = Function;
|
|
1239
|
+
var getEvalledConstructor = function(expressionSyntax) {
|
|
1240
|
+
try {
|
|
1241
|
+
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
1242
|
+
} catch (e) {
|
|
1243
|
+
}
|
|
1244
|
+
};
|
|
1245
|
+
var $gOPD = require_gopd();
|
|
1246
|
+
var $defineProperty = require_es_define_property();
|
|
1247
|
+
var throwTypeError = function() {
|
|
1248
|
+
throw new $TypeError();
|
|
1249
|
+
};
|
|
1250
|
+
var ThrowTypeError = $gOPD ? function() {
|
|
1251
|
+
try {
|
|
1252
|
+
arguments.callee;
|
|
1253
|
+
return throwTypeError;
|
|
1254
|
+
} catch (calleeThrows) {
|
|
1255
|
+
try {
|
|
1256
|
+
return $gOPD(arguments, "callee").get;
|
|
1257
|
+
} catch (gOPDthrows) {
|
|
1258
|
+
return throwTypeError;
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
}() : throwTypeError;
|
|
1262
|
+
var hasSymbols = require_has_symbols()();
|
|
1263
|
+
var getProto = require_get_proto();
|
|
1264
|
+
var $ObjectGPO = require_Object_getPrototypeOf();
|
|
1265
|
+
var $ReflectGPO = require_Reflect_getPrototypeOf();
|
|
1266
|
+
var $apply = require_functionApply();
|
|
1267
|
+
var $call = require_functionCall();
|
|
1268
|
+
var needsEval = {};
|
|
1269
|
+
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
|
|
1270
|
+
var INTRINSICS = {
|
|
1271
|
+
__proto__: null,
|
|
1272
|
+
"%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
|
|
1273
|
+
"%Array%": Array,
|
|
1274
|
+
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
|
|
1275
|
+
"%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
|
|
1276
|
+
"%AsyncFromSyncIteratorPrototype%": undefined2,
|
|
1277
|
+
"%AsyncFunction%": needsEval,
|
|
1278
|
+
"%AsyncGenerator%": needsEval,
|
|
1279
|
+
"%AsyncGeneratorFunction%": needsEval,
|
|
1280
|
+
"%AsyncIteratorPrototype%": needsEval,
|
|
1281
|
+
"%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
|
|
1282
|
+
"%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
|
|
1283
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
|
|
1284
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
|
|
1285
|
+
"%Boolean%": Boolean,
|
|
1286
|
+
"%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
|
|
1287
|
+
"%Date%": Date,
|
|
1288
|
+
"%decodeURI%": decodeURI,
|
|
1289
|
+
"%decodeURIComponent%": decodeURIComponent,
|
|
1290
|
+
"%encodeURI%": encodeURI,
|
|
1291
|
+
"%encodeURIComponent%": encodeURIComponent,
|
|
1292
|
+
"%Error%": $Error,
|
|
1293
|
+
"%eval%": eval,
|
|
1294
|
+
// eslint-disable-line no-eval
|
|
1295
|
+
"%EvalError%": $EvalError,
|
|
1296
|
+
"%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array,
|
|
1297
|
+
"%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
|
|
1298
|
+
"%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
|
|
1299
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
|
|
1300
|
+
"%Function%": $Function,
|
|
1301
|
+
"%GeneratorFunction%": needsEval,
|
|
1302
|
+
"%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
|
|
1303
|
+
"%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
|
|
1304
|
+
"%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
|
|
1305
|
+
"%isFinite%": isFinite,
|
|
1306
|
+
"%isNaN%": isNaN,
|
|
1307
|
+
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
|
|
1308
|
+
"%JSON%": typeof JSON === "object" ? JSON : undefined2,
|
|
1309
|
+
"%Map%": typeof Map === "undefined" ? undefined2 : Map,
|
|
1310
|
+
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
1311
|
+
"%Math%": Math,
|
|
1312
|
+
"%Number%": Number,
|
|
1313
|
+
"%Object%": $Object,
|
|
1314
|
+
"%Object.getOwnPropertyDescriptor%": $gOPD,
|
|
1315
|
+
"%parseFloat%": parseFloat,
|
|
1316
|
+
"%parseInt%": parseInt,
|
|
1317
|
+
"%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
|
|
1318
|
+
"%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
|
|
1319
|
+
"%RangeError%": $RangeError,
|
|
1320
|
+
"%ReferenceError%": $ReferenceError,
|
|
1321
|
+
"%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
|
|
1322
|
+
"%RegExp%": RegExp,
|
|
1323
|
+
"%Set%": typeof Set === "undefined" ? undefined2 : Set,
|
|
1324
|
+
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
1325
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
|
|
1326
|
+
"%String%": String,
|
|
1327
|
+
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
|
|
1328
|
+
"%Symbol%": hasSymbols ? Symbol : undefined2,
|
|
1329
|
+
"%SyntaxError%": $SyntaxError,
|
|
1330
|
+
"%ThrowTypeError%": ThrowTypeError,
|
|
1331
|
+
"%TypedArray%": TypedArray,
|
|
1332
|
+
"%TypeError%": $TypeError,
|
|
1333
|
+
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
|
|
1334
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
|
|
1335
|
+
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
|
|
1336
|
+
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
|
|
1337
|
+
"%URIError%": $URIError,
|
|
1338
|
+
"%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
|
|
1339
|
+
"%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
|
|
1340
|
+
"%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet,
|
|
1341
|
+
"%Function.prototype.call%": $call,
|
|
1342
|
+
"%Function.prototype.apply%": $apply,
|
|
1343
|
+
"%Object.defineProperty%": $defineProperty,
|
|
1344
|
+
"%Object.getPrototypeOf%": $ObjectGPO,
|
|
1345
|
+
"%Math.abs%": abs,
|
|
1346
|
+
"%Math.floor%": floor,
|
|
1347
|
+
"%Math.max%": max,
|
|
1348
|
+
"%Math.min%": min,
|
|
1349
|
+
"%Math.pow%": pow,
|
|
1350
|
+
"%Math.round%": round,
|
|
1351
|
+
"%Math.sign%": sign,
|
|
1352
|
+
"%Reflect.getPrototypeOf%": $ReflectGPO
|
|
1353
|
+
};
|
|
1354
|
+
if (getProto) {
|
|
1355
|
+
try {
|
|
1356
|
+
null.error;
|
|
1357
|
+
} catch (e) {
|
|
1358
|
+
errorProto = getProto(getProto(e));
|
|
1359
|
+
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
var errorProto;
|
|
1363
|
+
var doEval = function doEval2(name) {
|
|
1364
|
+
var value;
|
|
1365
|
+
if (name === "%AsyncFunction%") {
|
|
1366
|
+
value = getEvalledConstructor("async function () {}");
|
|
1367
|
+
} else if (name === "%GeneratorFunction%") {
|
|
1368
|
+
value = getEvalledConstructor("function* () {}");
|
|
1369
|
+
} else if (name === "%AsyncGeneratorFunction%") {
|
|
1370
|
+
value = getEvalledConstructor("async function* () {}");
|
|
1371
|
+
} else if (name === "%AsyncGenerator%") {
|
|
1372
|
+
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
1373
|
+
if (fn) {
|
|
1374
|
+
value = fn.prototype;
|
|
1375
|
+
}
|
|
1376
|
+
} else if (name === "%AsyncIteratorPrototype%") {
|
|
1377
|
+
var gen = doEval2("%AsyncGenerator%");
|
|
1378
|
+
if (gen && getProto) {
|
|
1379
|
+
value = getProto(gen.prototype);
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
INTRINSICS[name] = value;
|
|
1383
|
+
return value;
|
|
1384
|
+
};
|
|
1385
|
+
var LEGACY_ALIASES = {
|
|
1386
|
+
__proto__: null,
|
|
1387
|
+
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
1388
|
+
"%ArrayPrototype%": ["Array", "prototype"],
|
|
1389
|
+
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
1390
|
+
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
|
|
1391
|
+
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
|
|
1392
|
+
"%ArrayProto_values%": ["Array", "prototype", "values"],
|
|
1393
|
+
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
1394
|
+
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
1395
|
+
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
|
|
1396
|
+
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
1397
|
+
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
1398
|
+
"%DatePrototype%": ["Date", "prototype"],
|
|
1399
|
+
"%ErrorPrototype%": ["Error", "prototype"],
|
|
1400
|
+
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
1401
|
+
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
1402
|
+
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
1403
|
+
"%FunctionPrototype%": ["Function", "prototype"],
|
|
1404
|
+
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
1405
|
+
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
|
|
1406
|
+
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
1407
|
+
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
1408
|
+
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
1409
|
+
"%JSONParse%": ["JSON", "parse"],
|
|
1410
|
+
"%JSONStringify%": ["JSON", "stringify"],
|
|
1411
|
+
"%MapPrototype%": ["Map", "prototype"],
|
|
1412
|
+
"%NumberPrototype%": ["Number", "prototype"],
|
|
1413
|
+
"%ObjectPrototype%": ["Object", "prototype"],
|
|
1414
|
+
"%ObjProto_toString%": ["Object", "prototype", "toString"],
|
|
1415
|
+
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
|
|
1416
|
+
"%PromisePrototype%": ["Promise", "prototype"],
|
|
1417
|
+
"%PromiseProto_then%": ["Promise", "prototype", "then"],
|
|
1418
|
+
"%Promise_all%": ["Promise", "all"],
|
|
1419
|
+
"%Promise_reject%": ["Promise", "reject"],
|
|
1420
|
+
"%Promise_resolve%": ["Promise", "resolve"],
|
|
1421
|
+
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
1422
|
+
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
1423
|
+
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
1424
|
+
"%SetPrototype%": ["Set", "prototype"],
|
|
1425
|
+
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
1426
|
+
"%StringPrototype%": ["String", "prototype"],
|
|
1427
|
+
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
1428
|
+
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
1429
|
+
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
1430
|
+
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
1431
|
+
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
1432
|
+
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
1433
|
+
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
1434
|
+
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
1435
|
+
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
1436
|
+
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
1437
|
+
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
1438
|
+
};
|
|
1439
|
+
var bind = require_function_bind();
|
|
1440
|
+
var hasOwn = require_hasown();
|
|
1441
|
+
var $concat = bind.call($call, Array.prototype.concat);
|
|
1442
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
1443
|
+
var $replace = bind.call($call, String.prototype.replace);
|
|
1444
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
1445
|
+
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
1446
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
1447
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
1448
|
+
var stringToPath = function stringToPath2(string) {
|
|
1449
|
+
var first = $strSlice(string, 0, 1);
|
|
1450
|
+
var last = $strSlice(string, -1);
|
|
1451
|
+
if (first === "%" && last !== "%") {
|
|
1452
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
1453
|
+
} else if (last === "%" && first !== "%") {
|
|
1454
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
1455
|
+
}
|
|
1456
|
+
var result = [];
|
|
1457
|
+
$replace(string, rePropName, function(match, number, quote, subString) {
|
|
1458
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
|
|
1459
|
+
});
|
|
1460
|
+
return result;
|
|
1461
|
+
};
|
|
1462
|
+
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
1463
|
+
var intrinsicName = name;
|
|
1464
|
+
var alias;
|
|
1465
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
1466
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
1467
|
+
intrinsicName = "%" + alias[0] + "%";
|
|
1468
|
+
}
|
|
1469
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
1470
|
+
var value = INTRINSICS[intrinsicName];
|
|
1471
|
+
if (value === needsEval) {
|
|
1472
|
+
value = doEval(intrinsicName);
|
|
1473
|
+
}
|
|
1474
|
+
if (typeof value === "undefined" && !allowMissing) {
|
|
1475
|
+
throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
1476
|
+
}
|
|
1477
|
+
return {
|
|
1478
|
+
alias,
|
|
1479
|
+
name: intrinsicName,
|
|
1480
|
+
value
|
|
1481
|
+
};
|
|
1482
|
+
}
|
|
1483
|
+
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
1484
|
+
};
|
|
1485
|
+
module2.exports = function GetIntrinsic(name, allowMissing) {
|
|
1486
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
1487
|
+
throw new $TypeError("intrinsic name must be a non-empty string");
|
|
1488
|
+
}
|
|
1489
|
+
if (arguments.length > 1 && typeof allowMissing !== "boolean") {
|
|
1490
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
1491
|
+
}
|
|
1492
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
1493
|
+
throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
1494
|
+
}
|
|
1495
|
+
var parts = stringToPath(name);
|
|
1496
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
1497
|
+
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
1498
|
+
var intrinsicRealName = intrinsic.name;
|
|
1499
|
+
var value = intrinsic.value;
|
|
1500
|
+
var skipFurtherCaching = false;
|
|
1501
|
+
var alias = intrinsic.alias;
|
|
1502
|
+
if (alias) {
|
|
1503
|
+
intrinsicBaseName = alias[0];
|
|
1504
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
1505
|
+
}
|
|
1506
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
1507
|
+
var part = parts[i];
|
|
1508
|
+
var first = $strSlice(part, 0, 1);
|
|
1509
|
+
var last = $strSlice(part, -1);
|
|
1510
|
+
if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
|
|
1511
|
+
throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
1512
|
+
}
|
|
1513
|
+
if (part === "constructor" || !isOwn) {
|
|
1514
|
+
skipFurtherCaching = true;
|
|
1515
|
+
}
|
|
1516
|
+
intrinsicBaseName += "." + part;
|
|
1517
|
+
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
1518
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
1519
|
+
value = INTRINSICS[intrinsicRealName];
|
|
1520
|
+
} else if (value != null) {
|
|
1521
|
+
if (!(part in value)) {
|
|
1522
|
+
if (!allowMissing) {
|
|
1523
|
+
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
1524
|
+
}
|
|
1525
|
+
return void undefined2;
|
|
1526
|
+
}
|
|
1527
|
+
if ($gOPD && i + 1 >= parts.length) {
|
|
1528
|
+
var desc = $gOPD(value, part);
|
|
1529
|
+
isOwn = !!desc;
|
|
1530
|
+
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
1531
|
+
value = desc.get;
|
|
1532
|
+
} else {
|
|
1533
|
+
value = value[part];
|
|
1534
|
+
}
|
|
1535
|
+
} else {
|
|
1536
|
+
isOwn = hasOwn(value, part);
|
|
1537
|
+
value = value[part];
|
|
1538
|
+
}
|
|
1539
|
+
if (isOwn && !skipFurtherCaching) {
|
|
1540
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
return value;
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1547
|
+
});
|
|
1548
|
+
|
|
1549
|
+
// ../../.yarn/cache/call-bound-npm-1.0.4-359cfa32c7-f4796a6a09.zip/node_modules/call-bound/index.js
|
|
1550
|
+
var require_call_bound = __commonJS({
|
|
1551
|
+
"../../.yarn/cache/call-bound-npm-1.0.4-359cfa32c7-f4796a6a09.zip/node_modules/call-bound/index.js"(exports2, module2) {
|
|
1552
|
+
"use strict";
|
|
1553
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
1554
|
+
var callBindBasic = require_call_bind_apply_helpers();
|
|
1555
|
+
var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
|
|
1556
|
+
module2.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
1557
|
+
var intrinsic = (
|
|
1558
|
+
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
1559
|
+
GetIntrinsic(name, !!allowMissing)
|
|
1560
|
+
);
|
|
1561
|
+
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
|
1562
|
+
return callBindBasic(
|
|
1563
|
+
/** @type {const} */
|
|
1564
|
+
[intrinsic]
|
|
1565
|
+
);
|
|
1566
|
+
}
|
|
1567
|
+
return intrinsic;
|
|
1568
|
+
};
|
|
1569
|
+
}
|
|
1570
|
+
});
|
|
1571
|
+
|
|
1572
|
+
// ../../.yarn/cache/side-channel-map-npm-1.0.1-5903573b3c-010584e644.zip/node_modules/side-channel-map/index.js
|
|
1573
|
+
var require_side_channel_map = __commonJS({
|
|
1574
|
+
"../../.yarn/cache/side-channel-map-npm-1.0.1-5903573b3c-010584e644.zip/node_modules/side-channel-map/index.js"(exports2, module2) {
|
|
1575
|
+
"use strict";
|
|
1576
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
1577
|
+
var callBound = require_call_bound();
|
|
1578
|
+
var inspect = require_object_inspect();
|
|
1579
|
+
var $TypeError = require_type();
|
|
1580
|
+
var $Map = GetIntrinsic("%Map%", true);
|
|
1581
|
+
var $mapGet = callBound("Map.prototype.get", true);
|
|
1582
|
+
var $mapSet = callBound("Map.prototype.set", true);
|
|
1583
|
+
var $mapHas = callBound("Map.prototype.has", true);
|
|
1584
|
+
var $mapDelete = callBound("Map.prototype.delete", true);
|
|
1585
|
+
var $mapSize = callBound("Map.prototype.size", true);
|
|
1586
|
+
module2.exports = !!$Map && /** @type {Exclude<import('.'), false>} */
|
|
1587
|
+
function getSideChannelMap() {
|
|
1588
|
+
var $m;
|
|
1589
|
+
var channel = {
|
|
1590
|
+
assert: function(key) {
|
|
1591
|
+
if (!channel.has(key)) {
|
|
1592
|
+
throw new $TypeError("Side channel does not contain " + inspect(key));
|
|
1593
|
+
}
|
|
1594
|
+
},
|
|
1595
|
+
"delete": function(key) {
|
|
1596
|
+
if ($m) {
|
|
1597
|
+
var result = $mapDelete($m, key);
|
|
1598
|
+
if ($mapSize($m) === 0) {
|
|
1599
|
+
$m = void 0;
|
|
1600
|
+
}
|
|
1601
|
+
return result;
|
|
1602
|
+
}
|
|
1603
|
+
return false;
|
|
1604
|
+
},
|
|
1605
|
+
get: function(key) {
|
|
1606
|
+
if ($m) {
|
|
1607
|
+
return $mapGet($m, key);
|
|
1608
|
+
}
|
|
1609
|
+
},
|
|
1610
|
+
has: function(key) {
|
|
1611
|
+
if ($m) {
|
|
1612
|
+
return $mapHas($m, key);
|
|
1613
|
+
}
|
|
1614
|
+
return false;
|
|
1615
|
+
},
|
|
1616
|
+
set: function(key, value) {
|
|
1617
|
+
if (!$m) {
|
|
1618
|
+
$m = new $Map();
|
|
1619
|
+
}
|
|
1620
|
+
$mapSet($m, key, value);
|
|
1621
|
+
}
|
|
1622
|
+
};
|
|
1623
|
+
return channel;
|
|
1624
|
+
};
|
|
1625
|
+
}
|
|
1626
|
+
});
|
|
1627
|
+
|
|
1628
|
+
// ../../.yarn/cache/side-channel-weakmap-npm-1.0.2-027acaf499-71362709ac.zip/node_modules/side-channel-weakmap/index.js
|
|
1629
|
+
var require_side_channel_weakmap = __commonJS({
|
|
1630
|
+
"../../.yarn/cache/side-channel-weakmap-npm-1.0.2-027acaf499-71362709ac.zip/node_modules/side-channel-weakmap/index.js"(exports2, module2) {
|
|
1631
|
+
"use strict";
|
|
1632
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
1633
|
+
var callBound = require_call_bound();
|
|
1634
|
+
var inspect = require_object_inspect();
|
|
1635
|
+
var getSideChannelMap = require_side_channel_map();
|
|
1636
|
+
var $TypeError = require_type();
|
|
1637
|
+
var $WeakMap = GetIntrinsic("%WeakMap%", true);
|
|
1638
|
+
var $weakMapGet = callBound("WeakMap.prototype.get", true);
|
|
1639
|
+
var $weakMapSet = callBound("WeakMap.prototype.set", true);
|
|
1640
|
+
var $weakMapHas = callBound("WeakMap.prototype.has", true);
|
|
1641
|
+
var $weakMapDelete = callBound("WeakMap.prototype.delete", true);
|
|
1642
|
+
module2.exports = $WeakMap ? (
|
|
1643
|
+
/** @type {Exclude<import('.'), false>} */
|
|
1644
|
+
function getSideChannelWeakMap() {
|
|
1645
|
+
var $wm;
|
|
1646
|
+
var $m;
|
|
1647
|
+
var channel = {
|
|
1648
|
+
assert: function(key) {
|
|
1649
|
+
if (!channel.has(key)) {
|
|
1650
|
+
throw new $TypeError("Side channel does not contain " + inspect(key));
|
|
1651
|
+
}
|
|
1652
|
+
},
|
|
1653
|
+
"delete": function(key) {
|
|
1654
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
1655
|
+
if ($wm) {
|
|
1656
|
+
return $weakMapDelete($wm, key);
|
|
1657
|
+
}
|
|
1658
|
+
} else if (getSideChannelMap) {
|
|
1659
|
+
if ($m) {
|
|
1660
|
+
return $m["delete"](key);
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
return false;
|
|
1664
|
+
},
|
|
1665
|
+
get: function(key) {
|
|
1666
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
1667
|
+
if ($wm) {
|
|
1668
|
+
return $weakMapGet($wm, key);
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
return $m && $m.get(key);
|
|
1672
|
+
},
|
|
1673
|
+
has: function(key) {
|
|
1674
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
1675
|
+
if ($wm) {
|
|
1676
|
+
return $weakMapHas($wm, key);
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
return !!$m && $m.has(key);
|
|
1680
|
+
},
|
|
1681
|
+
set: function(key, value) {
|
|
1682
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
1683
|
+
if (!$wm) {
|
|
1684
|
+
$wm = new $WeakMap();
|
|
1685
|
+
}
|
|
1686
|
+
$weakMapSet($wm, key, value);
|
|
1687
|
+
} else if (getSideChannelMap) {
|
|
1688
|
+
if (!$m) {
|
|
1689
|
+
$m = getSideChannelMap();
|
|
1690
|
+
}
|
|
1691
|
+
$m.set(key, value);
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
};
|
|
1695
|
+
return channel;
|
|
1696
|
+
}
|
|
1697
|
+
) : getSideChannelMap;
|
|
1698
|
+
}
|
|
1699
|
+
});
|
|
1700
|
+
|
|
1701
|
+
// ../../.yarn/cache/side-channel-npm-1.1.0-4993930974-cb20dad41e.zip/node_modules/side-channel/index.js
|
|
1702
|
+
var require_side_channel = __commonJS({
|
|
1703
|
+
"../../.yarn/cache/side-channel-npm-1.1.0-4993930974-cb20dad41e.zip/node_modules/side-channel/index.js"(exports2, module2) {
|
|
1704
|
+
"use strict";
|
|
1705
|
+
var $TypeError = require_type();
|
|
1706
|
+
var inspect = require_object_inspect();
|
|
1707
|
+
var getSideChannelList = require_side_channel_list();
|
|
1708
|
+
var getSideChannelMap = require_side_channel_map();
|
|
1709
|
+
var getSideChannelWeakMap = require_side_channel_weakmap();
|
|
1710
|
+
var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
|
|
1711
|
+
module2.exports = function getSideChannel() {
|
|
1712
|
+
var $channelData;
|
|
1713
|
+
var channel = {
|
|
1714
|
+
assert: function(key) {
|
|
1715
|
+
if (!channel.has(key)) {
|
|
1716
|
+
throw new $TypeError("Side channel does not contain " + inspect(key));
|
|
1717
|
+
}
|
|
1718
|
+
},
|
|
1719
|
+
"delete": function(key) {
|
|
1720
|
+
return !!$channelData && $channelData["delete"](key);
|
|
1721
|
+
},
|
|
1722
|
+
get: function(key) {
|
|
1723
|
+
return $channelData && $channelData.get(key);
|
|
1724
|
+
},
|
|
1725
|
+
has: function(key) {
|
|
1726
|
+
return !!$channelData && $channelData.has(key);
|
|
1727
|
+
},
|
|
1728
|
+
set: function(key, value) {
|
|
1729
|
+
if (!$channelData) {
|
|
1730
|
+
$channelData = makeChannel();
|
|
1731
|
+
}
|
|
1732
|
+
$channelData.set(key, value);
|
|
1733
|
+
}
|
|
1734
|
+
};
|
|
1735
|
+
return channel;
|
|
1736
|
+
};
|
|
1737
|
+
}
|
|
1738
|
+
});
|
|
1739
|
+
|
|
1740
|
+
// ../../.yarn/cache/qs-npm-6.14.1-2af4c28250-0e3b22dc45.zip/node_modules/qs/lib/formats.js
|
|
1741
|
+
var require_formats = __commonJS({
|
|
1742
|
+
"../../.yarn/cache/qs-npm-6.14.1-2af4c28250-0e3b22dc45.zip/node_modules/qs/lib/formats.js"(exports2, module2) {
|
|
1743
|
+
"use strict";
|
|
1744
|
+
var replace = String.prototype.replace;
|
|
1745
|
+
var percentTwenties = /%20/g;
|
|
1746
|
+
var Format = {
|
|
1747
|
+
RFC1738: "RFC1738",
|
|
1748
|
+
RFC3986: "RFC3986"
|
|
1749
|
+
};
|
|
1750
|
+
module2.exports = {
|
|
1751
|
+
"default": Format.RFC3986,
|
|
1752
|
+
formatters: {
|
|
1753
|
+
RFC1738: function(value) {
|
|
1754
|
+
return replace.call(value, percentTwenties, "+");
|
|
1755
|
+
},
|
|
1756
|
+
RFC3986: function(value) {
|
|
1757
|
+
return String(value);
|
|
1758
|
+
}
|
|
1759
|
+
},
|
|
1760
|
+
RFC1738: Format.RFC1738,
|
|
1761
|
+
RFC3986: Format.RFC3986
|
|
1762
|
+
};
|
|
1763
|
+
}
|
|
1764
|
+
});
|
|
1765
|
+
|
|
1766
|
+
// ../../.yarn/cache/qs-npm-6.14.1-2af4c28250-0e3b22dc45.zip/node_modules/qs/lib/utils.js
|
|
1767
|
+
var require_utils = __commonJS({
|
|
1768
|
+
"../../.yarn/cache/qs-npm-6.14.1-2af4c28250-0e3b22dc45.zip/node_modules/qs/lib/utils.js"(exports2, module2) {
|
|
1769
|
+
"use strict";
|
|
1770
|
+
var formats = require_formats();
|
|
1771
|
+
var getSideChannel = require_side_channel();
|
|
1772
|
+
var has = Object.prototype.hasOwnProperty;
|
|
1773
|
+
var isArray = Array.isArray;
|
|
1774
|
+
var overflowChannel = getSideChannel();
|
|
1775
|
+
var markOverflow = function markOverflow2(obj, maxIndex) {
|
|
1776
|
+
overflowChannel.set(obj, maxIndex);
|
|
1777
|
+
return obj;
|
|
1778
|
+
};
|
|
1779
|
+
var isOverflow = function isOverflow2(obj) {
|
|
1780
|
+
return overflowChannel.has(obj);
|
|
1781
|
+
};
|
|
1782
|
+
var getMaxIndex = function getMaxIndex2(obj) {
|
|
1783
|
+
return overflowChannel.get(obj);
|
|
1784
|
+
};
|
|
1785
|
+
var setMaxIndex = function setMaxIndex2(obj, maxIndex) {
|
|
1786
|
+
overflowChannel.set(obj, maxIndex);
|
|
1787
|
+
};
|
|
1788
|
+
var hexTable = function() {
|
|
1789
|
+
var array = [];
|
|
1790
|
+
for (var i = 0; i < 256; ++i) {
|
|
1791
|
+
array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase());
|
|
1792
|
+
}
|
|
1793
|
+
return array;
|
|
1794
|
+
}();
|
|
1795
|
+
var compactQueue = function compactQueue2(queue) {
|
|
1796
|
+
while (queue.length > 1) {
|
|
1797
|
+
var item = queue.pop();
|
|
1798
|
+
var obj = item.obj[item.prop];
|
|
1799
|
+
if (isArray(obj)) {
|
|
1800
|
+
var compacted = [];
|
|
1801
|
+
for (var j = 0; j < obj.length; ++j) {
|
|
1802
|
+
if (typeof obj[j] !== "undefined") {
|
|
1803
|
+
compacted.push(obj[j]);
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
item.obj[item.prop] = compacted;
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
};
|
|
1810
|
+
var arrayToObject = function arrayToObject2(source, options) {
|
|
1811
|
+
var obj = options && options.plainObjects ? { __proto__: null } : {};
|
|
1812
|
+
for (var i = 0; i < source.length; ++i) {
|
|
1813
|
+
if (typeof source[i] !== "undefined") {
|
|
1814
|
+
obj[i] = source[i];
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
return obj;
|
|
1818
|
+
};
|
|
1819
|
+
var merge = function merge2(target, source, options) {
|
|
1820
|
+
if (!source) {
|
|
1821
|
+
return target;
|
|
1822
|
+
}
|
|
1823
|
+
if (typeof source !== "object" && typeof source !== "function") {
|
|
1824
|
+
if (isArray(target)) {
|
|
1825
|
+
target.push(source);
|
|
1826
|
+
} else if (target && typeof target === "object") {
|
|
1827
|
+
if (isOverflow(target)) {
|
|
1828
|
+
var newIndex = getMaxIndex(target) + 1;
|
|
1829
|
+
target[newIndex] = source;
|
|
1830
|
+
setMaxIndex(target, newIndex);
|
|
1831
|
+
} else if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
|
|
1832
|
+
target[source] = true;
|
|
1833
|
+
}
|
|
1834
|
+
} else {
|
|
1835
|
+
return [target, source];
|
|
1836
|
+
}
|
|
1837
|
+
return target;
|
|
1838
|
+
}
|
|
1839
|
+
if (!target || typeof target !== "object") {
|
|
1840
|
+
if (isOverflow(source)) {
|
|
1841
|
+
var sourceKeys = Object.keys(source);
|
|
1842
|
+
var result = options && options.plainObjects ? { __proto__: null, 0: target } : { 0: target };
|
|
1843
|
+
for (var m = 0; m < sourceKeys.length; m++) {
|
|
1844
|
+
var oldKey = parseInt(sourceKeys[m], 10);
|
|
1845
|
+
result[oldKey + 1] = source[sourceKeys[m]];
|
|
1846
|
+
}
|
|
1847
|
+
return markOverflow(result, getMaxIndex(source) + 1);
|
|
1848
|
+
}
|
|
1849
|
+
return [target].concat(source);
|
|
1850
|
+
}
|
|
1851
|
+
var mergeTarget = target;
|
|
1852
|
+
if (isArray(target) && !isArray(source)) {
|
|
1853
|
+
mergeTarget = arrayToObject(target, options);
|
|
1854
|
+
}
|
|
1855
|
+
if (isArray(target) && isArray(source)) {
|
|
1856
|
+
source.forEach(function(item, i) {
|
|
1857
|
+
if (has.call(target, i)) {
|
|
1858
|
+
var targetItem = target[i];
|
|
1859
|
+
if (targetItem && typeof targetItem === "object" && item && typeof item === "object") {
|
|
1860
|
+
target[i] = merge2(targetItem, item, options);
|
|
1861
|
+
} else {
|
|
1862
|
+
target.push(item);
|
|
1863
|
+
}
|
|
1864
|
+
} else {
|
|
1865
|
+
target[i] = item;
|
|
1866
|
+
}
|
|
1867
|
+
});
|
|
1868
|
+
return target;
|
|
1869
|
+
}
|
|
1870
|
+
return Object.keys(source).reduce(function(acc, key) {
|
|
1871
|
+
var value = source[key];
|
|
1872
|
+
if (has.call(acc, key)) {
|
|
1873
|
+
acc[key] = merge2(acc[key], value, options);
|
|
1874
|
+
} else {
|
|
1875
|
+
acc[key] = value;
|
|
1876
|
+
}
|
|
1877
|
+
return acc;
|
|
1878
|
+
}, mergeTarget);
|
|
1879
|
+
};
|
|
1880
|
+
var assign = function assignSingleSource(target, source) {
|
|
1881
|
+
return Object.keys(source).reduce(function(acc, key) {
|
|
1882
|
+
acc[key] = source[key];
|
|
1883
|
+
return acc;
|
|
1884
|
+
}, target);
|
|
1885
|
+
};
|
|
1886
|
+
var decode = function(str, defaultDecoder, charset) {
|
|
1887
|
+
var strWithoutPlus = str.replace(/\+/g, " ");
|
|
1888
|
+
if (charset === "iso-8859-1") {
|
|
1889
|
+
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
1890
|
+
}
|
|
1891
|
+
try {
|
|
1892
|
+
return decodeURIComponent(strWithoutPlus);
|
|
1893
|
+
} catch (e) {
|
|
1894
|
+
return strWithoutPlus;
|
|
1895
|
+
}
|
|
1896
|
+
};
|
|
1897
|
+
var limit = 1024;
|
|
1898
|
+
var encode = function encode2(str, defaultEncoder, charset, kind, format) {
|
|
1899
|
+
if (str.length === 0) {
|
|
1900
|
+
return str;
|
|
1901
|
+
}
|
|
1902
|
+
var string = str;
|
|
1903
|
+
if (typeof str === "symbol") {
|
|
1904
|
+
string = Symbol.prototype.toString.call(str);
|
|
1905
|
+
} else if (typeof str !== "string") {
|
|
1906
|
+
string = String(str);
|
|
1907
|
+
}
|
|
1908
|
+
if (charset === "iso-8859-1") {
|
|
1909
|
+
return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
|
|
1910
|
+
return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
|
|
1911
|
+
});
|
|
1912
|
+
}
|
|
1913
|
+
var out = "";
|
|
1914
|
+
for (var j = 0; j < string.length; j += limit) {
|
|
1915
|
+
var segment = string.length >= limit ? string.slice(j, j + limit) : string;
|
|
1916
|
+
var arr = [];
|
|
1917
|
+
for (var i = 0; i < segment.length; ++i) {
|
|
1918
|
+
var c = segment.charCodeAt(i);
|
|
1919
|
+
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)) {
|
|
1920
|
+
arr[arr.length] = segment.charAt(i);
|
|
1921
|
+
continue;
|
|
1922
|
+
}
|
|
1923
|
+
if (c < 128) {
|
|
1924
|
+
arr[arr.length] = hexTable[c];
|
|
1925
|
+
continue;
|
|
1926
|
+
}
|
|
1927
|
+
if (c < 2048) {
|
|
1928
|
+
arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63];
|
|
1929
|
+
continue;
|
|
1930
|
+
}
|
|
1931
|
+
if (c < 55296 || c >= 57344) {
|
|
1932
|
+
arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
1933
|
+
continue;
|
|
1934
|
+
}
|
|
1935
|
+
i += 1;
|
|
1936
|
+
c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023);
|
|
1937
|
+
arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
1938
|
+
}
|
|
1939
|
+
out += arr.join("");
|
|
1940
|
+
}
|
|
1941
|
+
return out;
|
|
1942
|
+
};
|
|
1943
|
+
var compact = function compact2(value) {
|
|
1944
|
+
var queue = [{ obj: { o: value }, prop: "o" }];
|
|
1945
|
+
var refs = [];
|
|
1946
|
+
for (var i = 0; i < queue.length; ++i) {
|
|
1947
|
+
var item = queue[i];
|
|
1948
|
+
var obj = item.obj[item.prop];
|
|
1949
|
+
var keys = Object.keys(obj);
|
|
1950
|
+
for (var j = 0; j < keys.length; ++j) {
|
|
1951
|
+
var key = keys[j];
|
|
1952
|
+
var val = obj[key];
|
|
1953
|
+
if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) {
|
|
1954
|
+
queue.push({ obj, prop: key });
|
|
1955
|
+
refs.push(val);
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
compactQueue(queue);
|
|
1960
|
+
return value;
|
|
1961
|
+
};
|
|
1962
|
+
var isRegExp = function isRegExp2(obj) {
|
|
1963
|
+
return Object.prototype.toString.call(obj) === "[object RegExp]";
|
|
1964
|
+
};
|
|
1965
|
+
var isBuffer = function isBuffer2(obj) {
|
|
1966
|
+
if (!obj || typeof obj !== "object") {
|
|
1967
|
+
return false;
|
|
1968
|
+
}
|
|
1969
|
+
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
1970
|
+
};
|
|
1971
|
+
var combine = function combine2(a, b, arrayLimit, plainObjects) {
|
|
1972
|
+
if (isOverflow(a)) {
|
|
1973
|
+
var newIndex = getMaxIndex(a) + 1;
|
|
1974
|
+
a[newIndex] = b;
|
|
1975
|
+
setMaxIndex(a, newIndex);
|
|
1976
|
+
return a;
|
|
1977
|
+
}
|
|
1978
|
+
var result = [].concat(a, b);
|
|
1979
|
+
if (result.length > arrayLimit) {
|
|
1980
|
+
return markOverflow(arrayToObject(result, { plainObjects }), result.length - 1);
|
|
1981
|
+
}
|
|
1982
|
+
return result;
|
|
1983
|
+
};
|
|
1984
|
+
var maybeMap = function maybeMap2(val, fn) {
|
|
1985
|
+
if (isArray(val)) {
|
|
1986
|
+
var mapped = [];
|
|
1987
|
+
for (var i = 0; i < val.length; i += 1) {
|
|
1988
|
+
mapped.push(fn(val[i]));
|
|
1989
|
+
}
|
|
1990
|
+
return mapped;
|
|
1991
|
+
}
|
|
1992
|
+
return fn(val);
|
|
1993
|
+
};
|
|
1994
|
+
module2.exports = {
|
|
1995
|
+
arrayToObject,
|
|
1996
|
+
assign,
|
|
1997
|
+
combine,
|
|
1998
|
+
compact,
|
|
1999
|
+
decode,
|
|
2000
|
+
encode,
|
|
2001
|
+
isBuffer,
|
|
2002
|
+
isOverflow,
|
|
2003
|
+
isRegExp,
|
|
2004
|
+
maybeMap,
|
|
2005
|
+
merge
|
|
2006
|
+
};
|
|
2007
|
+
}
|
|
2008
|
+
});
|
|
2009
|
+
|
|
2010
|
+
// ../../.yarn/cache/qs-npm-6.14.1-2af4c28250-0e3b22dc45.zip/node_modules/qs/lib/stringify.js
|
|
2011
|
+
var require_stringify = __commonJS({
|
|
2012
|
+
"../../.yarn/cache/qs-npm-6.14.1-2af4c28250-0e3b22dc45.zip/node_modules/qs/lib/stringify.js"(exports2, module2) {
|
|
2013
|
+
"use strict";
|
|
2014
|
+
var getSideChannel = require_side_channel();
|
|
2015
|
+
var utils = require_utils();
|
|
2016
|
+
var formats = require_formats();
|
|
2017
|
+
var has = Object.prototype.hasOwnProperty;
|
|
2018
|
+
var arrayPrefixGenerators = {
|
|
2019
|
+
brackets: function brackets(prefix) {
|
|
2020
|
+
return prefix + "[]";
|
|
2021
|
+
},
|
|
2022
|
+
comma: "comma",
|
|
2023
|
+
indices: function indices(prefix, key) {
|
|
2024
|
+
return prefix + "[" + key + "]";
|
|
2025
|
+
},
|
|
2026
|
+
repeat: function repeat(prefix) {
|
|
2027
|
+
return prefix;
|
|
2028
|
+
}
|
|
2029
|
+
};
|
|
2030
|
+
var isArray = Array.isArray;
|
|
2031
|
+
var push = Array.prototype.push;
|
|
2032
|
+
var pushToArray = function(arr, valueOrArray) {
|
|
2033
|
+
push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
2034
|
+
};
|
|
2035
|
+
var toISO = Date.prototype.toISOString;
|
|
2036
|
+
var defaultFormat = formats["default"];
|
|
2037
|
+
var defaults = {
|
|
2038
|
+
addQueryPrefix: false,
|
|
2039
|
+
allowDots: false,
|
|
2040
|
+
allowEmptyArrays: false,
|
|
2041
|
+
arrayFormat: "indices",
|
|
2042
|
+
charset: "utf-8",
|
|
2043
|
+
charsetSentinel: false,
|
|
2044
|
+
commaRoundTrip: false,
|
|
2045
|
+
delimiter: "&",
|
|
2046
|
+
encode: true,
|
|
2047
|
+
encodeDotInKeys: false,
|
|
2048
|
+
encoder: utils.encode,
|
|
2049
|
+
encodeValuesOnly: false,
|
|
2050
|
+
filter: void 0,
|
|
2051
|
+
format: defaultFormat,
|
|
2052
|
+
formatter: formats.formatters[defaultFormat],
|
|
2053
|
+
// deprecated
|
|
2054
|
+
indices: false,
|
|
2055
|
+
serializeDate: function serializeDate(date) {
|
|
2056
|
+
return toISO.call(date);
|
|
2057
|
+
},
|
|
2058
|
+
skipNulls: false,
|
|
2059
|
+
strictNullHandling: false
|
|
2060
|
+
};
|
|
2061
|
+
var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
|
|
2062
|
+
return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
|
|
2063
|
+
};
|
|
2064
|
+
var sentinel = {};
|
|
2065
|
+
var stringify = function stringify2(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
|
|
2066
|
+
var obj = object;
|
|
2067
|
+
var tmpSc = sideChannel;
|
|
2068
|
+
var step = 0;
|
|
2069
|
+
var findFlag = false;
|
|
2070
|
+
while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
|
|
2071
|
+
var pos = tmpSc.get(object);
|
|
2072
|
+
step += 1;
|
|
2073
|
+
if (typeof pos !== "undefined") {
|
|
2074
|
+
if (pos === step) {
|
|
2075
|
+
throw new RangeError("Cyclic object value");
|
|
2076
|
+
} else {
|
|
2077
|
+
findFlag = true;
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
if (typeof tmpSc.get(sentinel) === "undefined") {
|
|
2081
|
+
step = 0;
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
if (typeof filter === "function") {
|
|
2085
|
+
obj = filter(prefix, obj);
|
|
2086
|
+
} else if (obj instanceof Date) {
|
|
2087
|
+
obj = serializeDate(obj);
|
|
2088
|
+
} else if (generateArrayPrefix === "comma" && isArray(obj)) {
|
|
2089
|
+
obj = utils.maybeMap(obj, function(value2) {
|
|
2090
|
+
if (value2 instanceof Date) {
|
|
2091
|
+
return serializeDate(value2);
|
|
2092
|
+
}
|
|
2093
|
+
return value2;
|
|
2094
|
+
});
|
|
2095
|
+
}
|
|
2096
|
+
if (obj === null) {
|
|
2097
|
+
if (strictNullHandling) {
|
|
2098
|
+
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix;
|
|
2099
|
+
}
|
|
2100
|
+
obj = "";
|
|
2101
|
+
}
|
|
2102
|
+
if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
|
2103
|
+
if (encoder) {
|
|
2104
|
+
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format);
|
|
2105
|
+
return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))];
|
|
2106
|
+
}
|
|
2107
|
+
return [formatter(prefix) + "=" + formatter(String(obj))];
|
|
2108
|
+
}
|
|
2109
|
+
var values = [];
|
|
2110
|
+
if (typeof obj === "undefined") {
|
|
2111
|
+
return values;
|
|
2112
|
+
}
|
|
2113
|
+
var objKeys;
|
|
2114
|
+
if (generateArrayPrefix === "comma" && isArray(obj)) {
|
|
2115
|
+
if (encodeValuesOnly && encoder) {
|
|
2116
|
+
obj = utils.maybeMap(obj, encoder);
|
|
2117
|
+
}
|
|
2118
|
+
objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
|
|
2119
|
+
} else if (isArray(filter)) {
|
|
2120
|
+
objKeys = filter;
|
|
2121
|
+
} else {
|
|
2122
|
+
var keys = Object.keys(obj);
|
|
2123
|
+
objKeys = sort ? keys.sort(sort) : keys;
|
|
2124
|
+
}
|
|
2125
|
+
var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix);
|
|
2126
|
+
var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix;
|
|
2127
|
+
if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
|
|
2128
|
+
return adjustedPrefix + "[]";
|
|
2129
|
+
}
|
|
2130
|
+
for (var j = 0; j < objKeys.length; ++j) {
|
|
2131
|
+
var key = objKeys[j];
|
|
2132
|
+
var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj[key];
|
|
2133
|
+
if (skipNulls && value === null) {
|
|
2134
|
+
continue;
|
|
2135
|
+
}
|
|
2136
|
+
var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, "%2E") : String(key);
|
|
2137
|
+
var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]");
|
|
2138
|
+
sideChannel.set(object, step);
|
|
2139
|
+
var valueSideChannel = getSideChannel();
|
|
2140
|
+
valueSideChannel.set(sentinel, sideChannel);
|
|
2141
|
+
pushToArray(values, stringify2(
|
|
2142
|
+
value,
|
|
2143
|
+
keyPrefix,
|
|
2144
|
+
generateArrayPrefix,
|
|
2145
|
+
commaRoundTrip,
|
|
2146
|
+
allowEmptyArrays,
|
|
2147
|
+
strictNullHandling,
|
|
2148
|
+
skipNulls,
|
|
2149
|
+
encodeDotInKeys,
|
|
2150
|
+
generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder,
|
|
2151
|
+
filter,
|
|
2152
|
+
sort,
|
|
2153
|
+
allowDots,
|
|
2154
|
+
serializeDate,
|
|
2155
|
+
format,
|
|
2156
|
+
formatter,
|
|
2157
|
+
encodeValuesOnly,
|
|
2158
|
+
charset,
|
|
2159
|
+
valueSideChannel
|
|
2160
|
+
));
|
|
2161
|
+
}
|
|
2162
|
+
return values;
|
|
2163
|
+
};
|
|
2164
|
+
var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
|
|
2165
|
+
if (!opts) {
|
|
2166
|
+
return defaults;
|
|
2167
|
+
}
|
|
2168
|
+
if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
|
|
2169
|
+
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
2170
|
+
}
|
|
2171
|
+
if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") {
|
|
2172
|
+
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
2173
|
+
}
|
|
2174
|
+
if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
|
|
2175
|
+
throw new TypeError("Encoder has to be a function.");
|
|
2176
|
+
}
|
|
2177
|
+
var charset = opts.charset || defaults.charset;
|
|
2178
|
+
if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
|
|
2179
|
+
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
2180
|
+
}
|
|
2181
|
+
var format = formats["default"];
|
|
2182
|
+
if (typeof opts.format !== "undefined") {
|
|
2183
|
+
if (!has.call(formats.formatters, opts.format)) {
|
|
2184
|
+
throw new TypeError("Unknown format option provided.");
|
|
2185
|
+
}
|
|
2186
|
+
format = opts.format;
|
|
2187
|
+
}
|
|
2188
|
+
var formatter = formats.formatters[format];
|
|
2189
|
+
var filter = defaults.filter;
|
|
2190
|
+
if (typeof opts.filter === "function" || isArray(opts.filter)) {
|
|
2191
|
+
filter = opts.filter;
|
|
2192
|
+
}
|
|
2193
|
+
var arrayFormat;
|
|
2194
|
+
if (opts.arrayFormat in arrayPrefixGenerators) {
|
|
2195
|
+
arrayFormat = opts.arrayFormat;
|
|
2196
|
+
} else if ("indices" in opts) {
|
|
2197
|
+
arrayFormat = opts.indices ? "indices" : "repeat";
|
|
2198
|
+
} else {
|
|
2199
|
+
arrayFormat = defaults.arrayFormat;
|
|
2200
|
+
}
|
|
2201
|
+
if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
|
|
2202
|
+
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
2203
|
+
}
|
|
2204
|
+
var allowDots = typeof opts.allowDots === "undefined" ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
|
|
2205
|
+
return {
|
|
2206
|
+
addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix,
|
|
2207
|
+
allowDots,
|
|
2208
|
+
allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
|
|
2209
|
+
arrayFormat,
|
|
2210
|
+
charset,
|
|
2211
|
+
charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
2212
|
+
commaRoundTrip: !!opts.commaRoundTrip,
|
|
2213
|
+
delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter,
|
|
2214
|
+
encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode,
|
|
2215
|
+
encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
|
|
2216
|
+
encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder,
|
|
2217
|
+
encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
|
|
2218
|
+
filter,
|
|
2219
|
+
format,
|
|
2220
|
+
formatter,
|
|
2221
|
+
serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults.serializeDate,
|
|
2222
|
+
skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults.skipNulls,
|
|
2223
|
+
sort: typeof opts.sort === "function" ? opts.sort : null,
|
|
2224
|
+
strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
|
|
2225
|
+
};
|
|
2226
|
+
};
|
|
2227
|
+
module2.exports = function(object, opts) {
|
|
2228
|
+
var obj = object;
|
|
2229
|
+
var options = normalizeStringifyOptions(opts);
|
|
2230
|
+
var objKeys;
|
|
2231
|
+
var filter;
|
|
2232
|
+
if (typeof options.filter === "function") {
|
|
2233
|
+
filter = options.filter;
|
|
2234
|
+
obj = filter("", obj);
|
|
2235
|
+
} else if (isArray(options.filter)) {
|
|
2236
|
+
filter = options.filter;
|
|
2237
|
+
objKeys = filter;
|
|
2238
|
+
}
|
|
2239
|
+
var keys = [];
|
|
2240
|
+
if (typeof obj !== "object" || obj === null) {
|
|
2241
|
+
return "";
|
|
2242
|
+
}
|
|
2243
|
+
var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
|
|
2244
|
+
var commaRoundTrip = generateArrayPrefix === "comma" && options.commaRoundTrip;
|
|
2245
|
+
if (!objKeys) {
|
|
2246
|
+
objKeys = Object.keys(obj);
|
|
2247
|
+
}
|
|
2248
|
+
if (options.sort) {
|
|
2249
|
+
objKeys.sort(options.sort);
|
|
2250
|
+
}
|
|
2251
|
+
var sideChannel = getSideChannel();
|
|
2252
|
+
for (var i = 0; i < objKeys.length; ++i) {
|
|
2253
|
+
var key = objKeys[i];
|
|
2254
|
+
var value = obj[key];
|
|
2255
|
+
if (options.skipNulls && value === null) {
|
|
2256
|
+
continue;
|
|
2257
|
+
}
|
|
2258
|
+
pushToArray(keys, stringify(
|
|
2259
|
+
value,
|
|
2260
|
+
key,
|
|
2261
|
+
generateArrayPrefix,
|
|
2262
|
+
commaRoundTrip,
|
|
2263
|
+
options.allowEmptyArrays,
|
|
2264
|
+
options.strictNullHandling,
|
|
2265
|
+
options.skipNulls,
|
|
2266
|
+
options.encodeDotInKeys,
|
|
2267
|
+
options.encode ? options.encoder : null,
|
|
2268
|
+
options.filter,
|
|
2269
|
+
options.sort,
|
|
2270
|
+
options.allowDots,
|
|
2271
|
+
options.serializeDate,
|
|
2272
|
+
options.format,
|
|
2273
|
+
options.formatter,
|
|
2274
|
+
options.encodeValuesOnly,
|
|
2275
|
+
options.charset,
|
|
2276
|
+
sideChannel
|
|
2277
|
+
));
|
|
2278
|
+
}
|
|
2279
|
+
var joined = keys.join(options.delimiter);
|
|
2280
|
+
var prefix = options.addQueryPrefix === true ? "?" : "";
|
|
2281
|
+
if (options.charsetSentinel) {
|
|
2282
|
+
if (options.charset === "iso-8859-1") {
|
|
2283
|
+
prefix += "utf8=%26%2310003%3B&";
|
|
2284
|
+
} else {
|
|
2285
|
+
prefix += "utf8=%E2%9C%93&";
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
return joined.length > 0 ? prefix + joined : "";
|
|
2289
|
+
};
|
|
2290
|
+
}
|
|
2291
|
+
});
|
|
2292
|
+
|
|
2293
|
+
// ../../.yarn/cache/qs-npm-6.14.1-2af4c28250-0e3b22dc45.zip/node_modules/qs/lib/parse.js
|
|
2294
|
+
var require_parse = __commonJS({
|
|
2295
|
+
"../../.yarn/cache/qs-npm-6.14.1-2af4c28250-0e3b22dc45.zip/node_modules/qs/lib/parse.js"(exports2, module2) {
|
|
2296
|
+
"use strict";
|
|
2297
|
+
var utils = require_utils();
|
|
2298
|
+
var has = Object.prototype.hasOwnProperty;
|
|
2299
|
+
var isArray = Array.isArray;
|
|
2300
|
+
var defaults = {
|
|
2301
|
+
allowDots: false,
|
|
2302
|
+
allowEmptyArrays: false,
|
|
2303
|
+
allowPrototypes: false,
|
|
2304
|
+
allowSparse: false,
|
|
2305
|
+
arrayLimit: 20,
|
|
2306
|
+
charset: "utf-8",
|
|
2307
|
+
charsetSentinel: false,
|
|
2308
|
+
comma: false,
|
|
2309
|
+
decodeDotInKeys: false,
|
|
2310
|
+
decoder: utils.decode,
|
|
2311
|
+
delimiter: "&",
|
|
2312
|
+
depth: 5,
|
|
2313
|
+
duplicates: "combine",
|
|
2314
|
+
ignoreQueryPrefix: false,
|
|
2315
|
+
interpretNumericEntities: false,
|
|
2316
|
+
parameterLimit: 1e3,
|
|
2317
|
+
parseArrays: true,
|
|
2318
|
+
plainObjects: false,
|
|
2319
|
+
strictDepth: false,
|
|
2320
|
+
strictNullHandling: false,
|
|
2321
|
+
throwOnLimitExceeded: false
|
|
2322
|
+
};
|
|
2323
|
+
var interpretNumericEntities = function(str) {
|
|
2324
|
+
return str.replace(/&#(\d+);/g, function($0, numberStr) {
|
|
2325
|
+
return String.fromCharCode(parseInt(numberStr, 10));
|
|
2326
|
+
});
|
|
2327
|
+
};
|
|
2328
|
+
var parseArrayValue = function(val, options, currentArrayLength) {
|
|
2329
|
+
if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
|
|
2330
|
+
return val.split(",");
|
|
2331
|
+
}
|
|
2332
|
+
if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {
|
|
2333
|
+
throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
|
|
2334
|
+
}
|
|
2335
|
+
return val;
|
|
2336
|
+
};
|
|
2337
|
+
var isoSentinel = "utf8=%26%2310003%3B";
|
|
2338
|
+
var charsetSentinel = "utf8=%E2%9C%93";
|
|
2339
|
+
var parseValues = function parseQueryStringValues(str, options) {
|
|
2340
|
+
var obj = { __proto__: null };
|
|
2341
|
+
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
|
|
2342
|
+
cleanStr = cleanStr.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
2343
|
+
var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
|
|
2344
|
+
var parts = cleanStr.split(
|
|
2345
|
+
options.delimiter,
|
|
2346
|
+
options.throwOnLimitExceeded ? limit + 1 : limit
|
|
2347
|
+
);
|
|
2348
|
+
if (options.throwOnLimitExceeded && parts.length > limit) {
|
|
2349
|
+
throw new RangeError("Parameter limit exceeded. Only " + limit + " parameter" + (limit === 1 ? "" : "s") + " allowed.");
|
|
2350
|
+
}
|
|
2351
|
+
var skipIndex = -1;
|
|
2352
|
+
var i;
|
|
2353
|
+
var charset = options.charset;
|
|
2354
|
+
if (options.charsetSentinel) {
|
|
2355
|
+
for (i = 0; i < parts.length; ++i) {
|
|
2356
|
+
if (parts[i].indexOf("utf8=") === 0) {
|
|
2357
|
+
if (parts[i] === charsetSentinel) {
|
|
2358
|
+
charset = "utf-8";
|
|
2359
|
+
} else if (parts[i] === isoSentinel) {
|
|
2360
|
+
charset = "iso-8859-1";
|
|
2361
|
+
}
|
|
2362
|
+
skipIndex = i;
|
|
2363
|
+
i = parts.length;
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
for (i = 0; i < parts.length; ++i) {
|
|
2368
|
+
if (i === skipIndex) {
|
|
2369
|
+
continue;
|
|
2370
|
+
}
|
|
2371
|
+
var part = parts[i];
|
|
2372
|
+
var bracketEqualsPos = part.indexOf("]=");
|
|
2373
|
+
var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
|
|
2374
|
+
var key;
|
|
2375
|
+
var val;
|
|
2376
|
+
if (pos === -1) {
|
|
2377
|
+
key = options.decoder(part, defaults.decoder, charset, "key");
|
|
2378
|
+
val = options.strictNullHandling ? null : "";
|
|
2379
|
+
} else {
|
|
2380
|
+
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key");
|
|
2381
|
+
if (key !== null) {
|
|
2382
|
+
val = utils.maybeMap(
|
|
2383
|
+
parseArrayValue(
|
|
2384
|
+
part.slice(pos + 1),
|
|
2385
|
+
options,
|
|
2386
|
+
isArray(obj[key]) ? obj[key].length : 0
|
|
2387
|
+
),
|
|
2388
|
+
function(encodedVal) {
|
|
2389
|
+
return options.decoder(encodedVal, defaults.decoder, charset, "value");
|
|
2390
|
+
}
|
|
2391
|
+
);
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
|
|
2395
|
+
val = interpretNumericEntities(String(val));
|
|
2396
|
+
}
|
|
2397
|
+
if (part.indexOf("[]=") > -1) {
|
|
2398
|
+
val = isArray(val) ? [val] : val;
|
|
2399
|
+
}
|
|
2400
|
+
if (key !== null) {
|
|
2401
|
+
var existing = has.call(obj, key);
|
|
2402
|
+
if (existing && options.duplicates === "combine") {
|
|
2403
|
+
obj[key] = utils.combine(
|
|
2404
|
+
obj[key],
|
|
2405
|
+
val,
|
|
2406
|
+
options.arrayLimit,
|
|
2407
|
+
options.plainObjects
|
|
2408
|
+
);
|
|
2409
|
+
} else if (!existing || options.duplicates === "last") {
|
|
2410
|
+
obj[key] = val;
|
|
2411
|
+
}
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
return obj;
|
|
2415
|
+
};
|
|
2416
|
+
var parseObject = function(chain, val, options, valuesParsed) {
|
|
2417
|
+
var currentArrayLength = 0;
|
|
2418
|
+
if (chain.length > 0 && chain[chain.length - 1] === "[]") {
|
|
2419
|
+
var parentKey = chain.slice(0, -1).join("");
|
|
2420
|
+
currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;
|
|
2421
|
+
}
|
|
2422
|
+
var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);
|
|
2423
|
+
for (var i = chain.length - 1; i >= 0; --i) {
|
|
2424
|
+
var obj;
|
|
2425
|
+
var root = chain[i];
|
|
2426
|
+
if (root === "[]" && options.parseArrays) {
|
|
2427
|
+
if (utils.isOverflow(leaf)) {
|
|
2428
|
+
obj = leaf;
|
|
2429
|
+
} else {
|
|
2430
|
+
obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils.combine(
|
|
2431
|
+
[],
|
|
2432
|
+
leaf,
|
|
2433
|
+
options.arrayLimit,
|
|
2434
|
+
options.plainObjects
|
|
2435
|
+
);
|
|
2436
|
+
}
|
|
2437
|
+
} else {
|
|
2438
|
+
obj = options.plainObjects ? { __proto__: null } : {};
|
|
2439
|
+
var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
|
|
2440
|
+
var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot;
|
|
2441
|
+
var index = parseInt(decodedRoot, 10);
|
|
2442
|
+
if (!options.parseArrays && decodedRoot === "") {
|
|
2443
|
+
obj = { 0: leaf };
|
|
2444
|
+
} else if (!isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
|
|
2445
|
+
obj = [];
|
|
2446
|
+
obj[index] = leaf;
|
|
2447
|
+
} else if (decodedRoot !== "__proto__") {
|
|
2448
|
+
obj[decodedRoot] = leaf;
|
|
2449
|
+
}
|
|
2450
|
+
}
|
|
2451
|
+
leaf = obj;
|
|
2452
|
+
}
|
|
2453
|
+
return leaf;
|
|
2454
|
+
};
|
|
2455
|
+
var splitKeyIntoSegments = function splitKeyIntoSegments2(givenKey, options) {
|
|
2456
|
+
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
|
|
2457
|
+
if (options.depth <= 0) {
|
|
2458
|
+
if (!options.plainObjects && has.call(Object.prototype, key)) {
|
|
2459
|
+
if (!options.allowPrototypes) {
|
|
2460
|
+
return;
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
return [key];
|
|
2464
|
+
}
|
|
2465
|
+
var brackets = /(\[[^[\]]*])/;
|
|
2466
|
+
var child = /(\[[^[\]]*])/g;
|
|
2467
|
+
var segment = brackets.exec(key);
|
|
2468
|
+
var parent = segment ? key.slice(0, segment.index) : key;
|
|
2469
|
+
var keys = [];
|
|
2470
|
+
if (parent) {
|
|
2471
|
+
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
2472
|
+
if (!options.allowPrototypes) {
|
|
2473
|
+
return;
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
keys.push(parent);
|
|
2477
|
+
}
|
|
2478
|
+
var i = 0;
|
|
2479
|
+
while ((segment = child.exec(key)) !== null && i < options.depth) {
|
|
2480
|
+
i += 1;
|
|
2481
|
+
var segmentContent = segment[1].slice(1, -1);
|
|
2482
|
+
if (!options.plainObjects && has.call(Object.prototype, segmentContent)) {
|
|
2483
|
+
if (!options.allowPrototypes) {
|
|
2484
|
+
return;
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
keys.push(segment[1]);
|
|
2488
|
+
}
|
|
2489
|
+
if (segment) {
|
|
2490
|
+
if (options.strictDepth === true) {
|
|
2491
|
+
throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true");
|
|
2492
|
+
}
|
|
2493
|
+
keys.push("[" + key.slice(segment.index) + "]");
|
|
2494
|
+
}
|
|
2495
|
+
return keys;
|
|
2496
|
+
};
|
|
2497
|
+
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
2498
|
+
if (!givenKey) {
|
|
2499
|
+
return;
|
|
2500
|
+
}
|
|
2501
|
+
var keys = splitKeyIntoSegments(givenKey, options);
|
|
2502
|
+
if (!keys) {
|
|
2503
|
+
return;
|
|
2504
|
+
}
|
|
2505
|
+
return parseObject(keys, val, options, valuesParsed);
|
|
2506
|
+
};
|
|
2507
|
+
var normalizeParseOptions = function normalizeParseOptions2(opts) {
|
|
2508
|
+
if (!opts) {
|
|
2509
|
+
return defaults;
|
|
2510
|
+
}
|
|
2511
|
+
if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
|
|
2512
|
+
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
2513
|
+
}
|
|
2514
|
+
if (typeof opts.decodeDotInKeys !== "undefined" && typeof opts.decodeDotInKeys !== "boolean") {
|
|
2515
|
+
throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
2516
|
+
}
|
|
2517
|
+
if (opts.decoder !== null && typeof opts.decoder !== "undefined" && typeof opts.decoder !== "function") {
|
|
2518
|
+
throw new TypeError("Decoder has to be a function.");
|
|
2519
|
+
}
|
|
2520
|
+
if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
|
|
2521
|
+
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
2522
|
+
}
|
|
2523
|
+
if (typeof opts.throwOnLimitExceeded !== "undefined" && typeof opts.throwOnLimitExceeded !== "boolean") {
|
|
2524
|
+
throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
|
|
2525
|
+
}
|
|
2526
|
+
var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset;
|
|
2527
|
+
var duplicates = typeof opts.duplicates === "undefined" ? defaults.duplicates : opts.duplicates;
|
|
2528
|
+
if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") {
|
|
2529
|
+
throw new TypeError("The duplicates option must be either combine, first, or last");
|
|
2530
|
+
}
|
|
2531
|
+
var allowDots = typeof opts.allowDots === "undefined" ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
|
|
2532
|
+
return {
|
|
2533
|
+
allowDots,
|
|
2534
|
+
allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
|
|
2535
|
+
allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes,
|
|
2536
|
+
allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse,
|
|
2537
|
+
arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit,
|
|
2538
|
+
charset,
|
|
2539
|
+
charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
2540
|
+
comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma,
|
|
2541
|
+
decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
|
|
2542
|
+
decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder,
|
|
2543
|
+
delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
|
2544
|
+
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
2545
|
+
depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth,
|
|
2546
|
+
duplicates,
|
|
2547
|
+
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
2548
|
+
interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
|
2549
|
+
parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit,
|
|
2550
|
+
parseArrays: opts.parseArrays !== false,
|
|
2551
|
+
plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects,
|
|
2552
|
+
strictDepth: typeof opts.strictDepth === "boolean" ? !!opts.strictDepth : defaults.strictDepth,
|
|
2553
|
+
strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling,
|
|
2554
|
+
throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === "boolean" ? opts.throwOnLimitExceeded : false
|
|
2555
|
+
};
|
|
2556
|
+
};
|
|
2557
|
+
module2.exports = function(str, opts) {
|
|
2558
|
+
var options = normalizeParseOptions(opts);
|
|
2559
|
+
if (str === "" || str === null || typeof str === "undefined") {
|
|
2560
|
+
return options.plainObjects ? { __proto__: null } : {};
|
|
2561
|
+
}
|
|
2562
|
+
var tempObj = typeof str === "string" ? parseValues(str, options) : str;
|
|
2563
|
+
var obj = options.plainObjects ? { __proto__: null } : {};
|
|
2564
|
+
var keys = Object.keys(tempObj);
|
|
2565
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
2566
|
+
var key = keys[i];
|
|
2567
|
+
var newObj = parseKeys(key, tempObj[key], options, typeof str === "string");
|
|
2568
|
+
obj = utils.merge(obj, newObj, options);
|
|
2569
|
+
}
|
|
2570
|
+
if (options.allowSparse === true) {
|
|
2571
|
+
return obj;
|
|
2572
|
+
}
|
|
2573
|
+
return utils.compact(obj);
|
|
2574
|
+
};
|
|
2575
|
+
}
|
|
2576
|
+
});
|
|
2577
|
+
|
|
2578
|
+
// ../../.yarn/cache/qs-npm-6.14.1-2af4c28250-0e3b22dc45.zip/node_modules/qs/lib/index.js
|
|
2579
|
+
var require_lib = __commonJS({
|
|
2580
|
+
"../../.yarn/cache/qs-npm-6.14.1-2af4c28250-0e3b22dc45.zip/node_modules/qs/lib/index.js"(exports2, module2) {
|
|
2581
|
+
"use strict";
|
|
2582
|
+
var stringify = require_stringify();
|
|
2583
|
+
var parse = require_parse();
|
|
2584
|
+
var formats = require_formats();
|
|
2585
|
+
module2.exports = {
|
|
2586
|
+
formats,
|
|
2587
|
+
parse,
|
|
2588
|
+
stringify
|
|
2589
|
+
};
|
|
2590
|
+
}
|
|
2591
|
+
});
|
|
2592
|
+
|
|
2593
|
+
// ../rp-client/dist/service.js
|
|
2594
|
+
var require_service = __commonJS({
|
|
2595
|
+
"../rp-client/dist/service.js"(exports2) {
|
|
2596
|
+
"use strict";
|
|
2597
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
2598
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
2599
|
+
};
|
|
2600
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2601
|
+
exports2.Service = exports2.ServiceAuthException = exports2.ServiceException = exports2.serializeRequestParams = void 0;
|
|
2602
|
+
var qs_1 = __importDefault(require_lib());
|
|
2603
|
+
var cache_1 = require_cache();
|
|
2604
|
+
function isObject(value) {
|
|
2605
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
2606
|
+
}
|
|
2607
|
+
function serializeRequestParams(params) {
|
|
2608
|
+
const p = {};
|
|
2609
|
+
for (const k in params) {
|
|
2610
|
+
switch (k) {
|
|
2611
|
+
case "customParams":
|
|
2612
|
+
p["p"] = JSON.stringify(params.customParams);
|
|
2613
|
+
break;
|
|
2614
|
+
default:
|
|
2615
|
+
p[k] = isObject(params[k]) || Array.isArray(params[k]) ? JSON.stringify(params[k]) : params[k];
|
|
2616
|
+
break;
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
return qs_1.default.stringify(p, { addQueryPrefix: false });
|
|
2620
|
+
}
|
|
2621
|
+
exports2.serializeRequestParams = serializeRequestParams;
|
|
2622
|
+
var ServiceException = class extends Error {
|
|
2623
|
+
constructor(data) {
|
|
2624
|
+
super(data.message);
|
|
2625
|
+
this.data = data;
|
|
2626
|
+
}
|
|
2627
|
+
};
|
|
2628
|
+
exports2.ServiceException = ServiceException;
|
|
2629
|
+
var ServiceAuthException = class extends Error {
|
|
2630
|
+
};
|
|
2631
|
+
exports2.ServiceAuthException = ServiceAuthException;
|
|
2632
|
+
var Service2 = class {
|
|
2633
|
+
get a() {
|
|
2634
|
+
return this.accountingProvider?.a;
|
|
2635
|
+
}
|
|
2636
|
+
get name() {
|
|
2637
|
+
return this.options.name;
|
|
2638
|
+
}
|
|
2639
|
+
get cache() {
|
|
2640
|
+
if (!this._cache)
|
|
2641
|
+
this._cache = new cache_1.ServiceCache();
|
|
2642
|
+
return this._cache;
|
|
2643
|
+
}
|
|
2644
|
+
constructor(options) {
|
|
2645
|
+
this.accountingProvider = null;
|
|
2646
|
+
this.tokenProvider = null;
|
|
2647
|
+
this._cache = null;
|
|
2648
|
+
this.options = { ...options };
|
|
2649
|
+
if (!/^(https?|\/)/.test(this.options.baseUrl)) {
|
|
2650
|
+
this.options.baseUrl = `https://${this.options.baseUrl}`;
|
|
2651
|
+
}
|
|
2652
|
+
}
|
|
2653
|
+
createUrl(path2 = "", params) {
|
|
2654
|
+
if (this.options.xdebugSession) {
|
|
2655
|
+
params = params || {};
|
|
2656
|
+
params.XDEBUG_SESSION = this.options.xdebugSession === true ? "1" : this.options.xdebugSession.toString();
|
|
2657
|
+
}
|
|
2658
|
+
if (this.options.params && Object.keys(this.options.params).length > 0) {
|
|
2659
|
+
params = { ...this.options.params, ...params };
|
|
2660
|
+
}
|
|
2661
|
+
const queryString = params ? "?" + serializeRequestParams(params) : "";
|
|
2662
|
+
const a = params && params.accounting ? params.accounting.toString() : this.a ? this.a.toString() : null;
|
|
2663
|
+
path2 = path2.replace(/^\//, "");
|
|
2664
|
+
const parts = [this.options.baseUrl, a, this.options.name, path2];
|
|
2665
|
+
return parts.filter((p) => p != null && p !== "").join("/") + queryString;
|
|
2666
|
+
}
|
|
2667
|
+
async createHeaders(headers) {
|
|
2668
|
+
const defaultHeaders = {};
|
|
2669
|
+
if (this.tokenProvider) {
|
|
2670
|
+
const token = await this.tokenProvider();
|
|
2671
|
+
if (token) {
|
|
2672
|
+
defaultHeaders["Authorization"] = `Bearer ${token}`;
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
return { ...defaultHeaders, ...headers };
|
|
2676
|
+
}
|
|
2677
|
+
get credentials() {
|
|
2678
|
+
return this.tokenProvider ? void 0 : "include";
|
|
2679
|
+
}
|
|
2680
|
+
async handleError(response) {
|
|
2681
|
+
const contentType = response.headers.get("Content-Type");
|
|
2682
|
+
let error;
|
|
2683
|
+
if (contentType?.includes("application/json")) {
|
|
2684
|
+
error = await response.json();
|
|
2685
|
+
error.status = response.status;
|
|
2686
|
+
} else {
|
|
2687
|
+
error = { status: response.status, message: "Unknown error", error: "unknown" };
|
|
2688
|
+
}
|
|
2689
|
+
if (this.options.throwExceptions) {
|
|
2690
|
+
throw new ServiceException(error);
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
async handleResponse(response, parse) {
|
|
2694
|
+
if (!response.ok) {
|
|
2695
|
+
await this.handleError(response);
|
|
2696
|
+
return null;
|
|
2697
|
+
}
|
|
2698
|
+
const contentType = response.headers.get("Content-Type");
|
|
2699
|
+
if (contentType?.includes("application/json") && parse !== false) {
|
|
2700
|
+
return await response.json();
|
|
2701
|
+
} else {
|
|
2702
|
+
return await response.text();
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2705
|
+
async getRaw(path2, params, options) {
|
|
2706
|
+
return fetch(this.createUrl(path2, params), {
|
|
2707
|
+
headers: await this.createHeaders(options?.headers),
|
|
2708
|
+
credentials: this.credentials
|
|
2709
|
+
});
|
|
2710
|
+
}
|
|
2711
|
+
async get(path2, params, options) {
|
|
2712
|
+
if (options?.cache) {
|
|
2713
|
+
const cachedData = this.cache.get({ path: path2, params });
|
|
2714
|
+
if (cachedData)
|
|
2715
|
+
return cachedData;
|
|
2716
|
+
}
|
|
2717
|
+
const response = await this.getRaw(path2, params, options);
|
|
2718
|
+
const responseData = await this.handleResponse(response, options?.parseResponse);
|
|
2719
|
+
if (options?.cache && responseData) {
|
|
2720
|
+
this.cache.set({ path: path2, params }, responseData);
|
|
2721
|
+
}
|
|
2722
|
+
return responseData;
|
|
2723
|
+
}
|
|
2724
|
+
async postRaw(path2, data, params, options) {
|
|
2725
|
+
const json = isObject(data) || Array.isArray(data);
|
|
2726
|
+
return fetch(this.createUrl(path2, params), {
|
|
2727
|
+
method: "POST",
|
|
2728
|
+
body: json ? JSON.stringify(data) : data,
|
|
2729
|
+
headers: await this.createHeaders({
|
|
2730
|
+
...options?.headers ?? {},
|
|
2731
|
+
"Content-Type": `${json ? "application/json" : "text/plain"}; charset=UTF-8`
|
|
2732
|
+
}),
|
|
2733
|
+
credentials: this.credentials
|
|
2734
|
+
});
|
|
2735
|
+
}
|
|
2736
|
+
async post(path2, data, params, options) {
|
|
2737
|
+
const response = await this.postRaw(path2, data, params, options);
|
|
2738
|
+
return this.handleResponse(response);
|
|
2739
|
+
}
|
|
2740
|
+
async deleteRaw(path2, params, options) {
|
|
2741
|
+
return fetch(this.createUrl(path2, params), {
|
|
2742
|
+
method: "DELETE",
|
|
2743
|
+
headers: await this.createHeaders(options?.headers),
|
|
2744
|
+
credentials: this.credentials
|
|
2745
|
+
});
|
|
2746
|
+
}
|
|
2747
|
+
async delete(path2, params, options) {
|
|
2748
|
+
const response = await this.deleteRaw(path2, params, options);
|
|
2749
|
+
return this.handleResponse(response);
|
|
2750
|
+
}
|
|
2751
|
+
async putRaw(path2, data, params, options) {
|
|
2752
|
+
const json = isObject(data) || Array.isArray(data);
|
|
2753
|
+
return fetch(this.createUrl(path2, params), {
|
|
2754
|
+
method: "PUT",
|
|
2755
|
+
body: json ? JSON.stringify(data) : data,
|
|
2756
|
+
headers: await this.createHeaders({
|
|
2757
|
+
...options?.headers ?? {},
|
|
2758
|
+
"Content-Type": `${json ? "application/json" : "text/plain"}; charset=UTF-8`
|
|
2759
|
+
}),
|
|
2760
|
+
credentials: this.credentials
|
|
2761
|
+
});
|
|
2762
|
+
}
|
|
2763
|
+
async put(path2, data, params, options) {
|
|
2764
|
+
const response = await this.putRaw(path2, data, params, options);
|
|
2765
|
+
return this.handleResponse(response);
|
|
2766
|
+
}
|
|
2767
|
+
};
|
|
2768
|
+
exports2.Service = Service2;
|
|
2769
|
+
}
|
|
2770
|
+
});
|
|
2771
|
+
|
|
2772
|
+
// ../rp-client/dist/index.js
|
|
2773
|
+
var require_dist = __commonJS({
|
|
2774
|
+
"../rp-client/dist/index.js"(exports2) {
|
|
2775
|
+
"use strict";
|
|
2776
|
+
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
2777
|
+
if (k2 === void 0) k2 = k;
|
|
2778
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2779
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
2780
|
+
desc = { enumerable: true, get: function() {
|
|
2781
|
+
return m[k];
|
|
2782
|
+
} };
|
|
2783
|
+
}
|
|
2784
|
+
Object.defineProperty(o, k2, desc);
|
|
2785
|
+
} : function(o, m, k, k2) {
|
|
2786
|
+
if (k2 === void 0) k2 = k;
|
|
2787
|
+
o[k2] = m[k];
|
|
2788
|
+
});
|
|
2789
|
+
var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
|
|
2790
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p);
|
|
2791
|
+
};
|
|
2792
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2793
|
+
__exportStar(require_types(), exports2);
|
|
2794
|
+
__exportStar(require_cache(), exports2);
|
|
2795
|
+
__exportStar(require_accountingProvider(), exports2);
|
|
2796
|
+
__exportStar(require_service(), exports2);
|
|
2797
|
+
}
|
|
2798
|
+
});
|
|
2799
|
+
|
|
2800
|
+
// src/commands/login.ts
|
|
2801
|
+
var http = __toESM(require("node:http"));
|
|
2802
|
+
var import_node_child_process = require("node:child_process");
|
|
2803
|
+
|
|
2804
|
+
// src/config.ts
|
|
2805
|
+
var fs = __toESM(require("node:fs"));
|
|
2806
|
+
var path = __toESM(require("node:path"));
|
|
2807
|
+
var os = __toESM(require("node:os"));
|
|
2808
|
+
|
|
2809
|
+
// ../rp-auth-client-v2/dist/client.js
|
|
2810
|
+
var DEFAULT_OPTIONS = {
|
|
2811
|
+
serviceUrl: null,
|
|
2812
|
+
redirectUrl: typeof window !== "undefined" ? window.location.href : null,
|
|
2813
|
+
accounting: -100,
|
|
2814
|
+
lang: null
|
|
2815
|
+
};
|
|
2816
|
+
var ReportingAuthClientException = class extends Error {
|
|
2817
|
+
constructor(data) {
|
|
2818
|
+
super(data.message);
|
|
2819
|
+
this.data = data;
|
|
2820
|
+
}
|
|
2821
|
+
};
|
|
2822
|
+
var ReportingAuthClient = class {
|
|
2823
|
+
get expiresAt() {
|
|
2824
|
+
return this._expiresAt;
|
|
2825
|
+
}
|
|
2826
|
+
get expiresIn() {
|
|
2827
|
+
if (this._expiresAt === null)
|
|
2828
|
+
return null;
|
|
2829
|
+
return this._expiresAt - Math.floor(Date.now() / 1e3);
|
|
2830
|
+
}
|
|
2831
|
+
async getAuthInit() {
|
|
2832
|
+
if (this.options.tokenProvider) {
|
|
2833
|
+
const token = await this.options.tokenProvider();
|
|
2834
|
+
return token ? { headers: { "Authorization": `Bearer ${token}` } } : {};
|
|
2835
|
+
}
|
|
2836
|
+
return { credentials: "include" };
|
|
2837
|
+
}
|
|
2838
|
+
async fetchWithAuth(url, init = {}) {
|
|
2839
|
+
const authInit = await this.getAuthInit();
|
|
2840
|
+
return fetch(url, {
|
|
2841
|
+
...init,
|
|
2842
|
+
...authInit,
|
|
2843
|
+
headers: {
|
|
2844
|
+
...init.headers,
|
|
2845
|
+
...authInit.headers
|
|
2846
|
+
}
|
|
2847
|
+
});
|
|
2848
|
+
}
|
|
2849
|
+
setOptions(options) {
|
|
2850
|
+
Object.assign(this.options, options);
|
|
2851
|
+
if (!/^(https?|\/)/.test(this.options.serviceUrl)) {
|
|
2852
|
+
this.options.serviceUrl = `https://${this.options.serviceUrl}`;
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
constructor(options) {
|
|
2856
|
+
this.options = DEFAULT_OPTIONS;
|
|
2857
|
+
this._expiresAt = null;
|
|
2858
|
+
this.setOptions(options);
|
|
2859
|
+
}
|
|
2860
|
+
async issueToken(options) {
|
|
2861
|
+
const scope = options.scope ? Array.isArray(options.scope) ? options.scope.join(" ") : options.scope : "";
|
|
2862
|
+
const accounting2 = options.accounting || this.options.accounting;
|
|
2863
|
+
this.response = await this.fetchWithAuth(`${this.options.serviceUrl}/delegateToken`, {
|
|
2864
|
+
method: "POST",
|
|
2865
|
+
headers: {
|
|
2866
|
+
"Content-Type": "application/json"
|
|
2867
|
+
},
|
|
2868
|
+
body: JSON.stringify(Object.assign({}, this.options.params, {
|
|
2869
|
+
"name": options.name || "",
|
|
2870
|
+
"username": options.username || "",
|
|
2871
|
+
"expiration": options.expiration,
|
|
2872
|
+
"scope": scope,
|
|
2873
|
+
"accounting": accounting2
|
|
2874
|
+
}))
|
|
2875
|
+
});
|
|
2876
|
+
return await this.response.json();
|
|
2877
|
+
}
|
|
2878
|
+
async impersonate(username) {
|
|
2879
|
+
await this.fetchWithAuth(`${this.options.serviceUrl}/impersonate`, {
|
|
2880
|
+
method: "POST",
|
|
2881
|
+
headers: {
|
|
2882
|
+
"Content-Type": "application/json"
|
|
2883
|
+
},
|
|
2884
|
+
body: JSON.stringify({
|
|
2885
|
+
"username": username
|
|
2886
|
+
})
|
|
2887
|
+
});
|
|
2888
|
+
}
|
|
2889
|
+
async authorize(authorizationCode) {
|
|
2890
|
+
this.response = await this.fetchWithAuth(`${this.options.serviceUrl}/token`, {
|
|
2891
|
+
method: "POST",
|
|
2892
|
+
headers: {
|
|
2893
|
+
"Content-Type": "application/json"
|
|
2894
|
+
},
|
|
2895
|
+
body: JSON.stringify(Object.assign({}, this.options.params, {
|
|
2896
|
+
"client_id": this.options.clientId || "",
|
|
2897
|
+
"client_secret": this.options.clientSecret || "",
|
|
2898
|
+
"grant_type": "code",
|
|
2899
|
+
"code": authorizationCode
|
|
2900
|
+
}))
|
|
2901
|
+
});
|
|
2902
|
+
if (!this.response.ok) {
|
|
2903
|
+
const err = await this.response.json();
|
|
2904
|
+
throw new ReportingAuthClientException(err);
|
|
2905
|
+
}
|
|
2906
|
+
return this.response;
|
|
2907
|
+
}
|
|
2908
|
+
redirect() {
|
|
2909
|
+
let url = `${this.options.serviceUrl}/redirect`;
|
|
2910
|
+
const queryParams = [];
|
|
2911
|
+
if (this.options.clientId) {
|
|
2912
|
+
queryParams.push("client_id=" + encodeURIComponent(this.options.clientId));
|
|
2913
|
+
}
|
|
2914
|
+
if (this.options.redirectUrl) {
|
|
2915
|
+
queryParams.push("redirect_uri=" + encodeURIComponent(this.options.redirectUrl));
|
|
2916
|
+
}
|
|
2917
|
+
url += (url.includes("?") ? "&" : "?") + queryParams.join("&");
|
|
2918
|
+
window.location.href = url;
|
|
2919
|
+
}
|
|
2920
|
+
async getTokenInfo() {
|
|
2921
|
+
this.response = await this.fetchWithAuth(`${this.options.serviceUrl}/info`, {
|
|
2922
|
+
method: "GET",
|
|
2923
|
+
headers: {
|
|
2924
|
+
"Content-Type": "application/json"
|
|
2925
|
+
}
|
|
2926
|
+
});
|
|
2927
|
+
this._expiresAt = null;
|
|
2928
|
+
if (!this.response.ok) {
|
|
2929
|
+
if (this.response.headers.get("content-type")?.includes("application/json")) {
|
|
2930
|
+
const err = await this.response.json();
|
|
2931
|
+
throw new ReportingAuthClientException(err);
|
|
2932
|
+
} else {
|
|
2933
|
+
throw new ReportingAuthClientException({
|
|
2934
|
+
message: "Gateway communication error"
|
|
2935
|
+
});
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
const tokenInfo = await this.response.json();
|
|
2939
|
+
if (tokenInfo.expires_in != null) {
|
|
2940
|
+
this._expiresAt = Math.floor(Date.now() / 1e3) + tokenInfo.expires_in;
|
|
2941
|
+
}
|
|
2942
|
+
return tokenInfo;
|
|
2943
|
+
}
|
|
2944
|
+
async logout() {
|
|
2945
|
+
await this.fetchWithAuth(`${this.options.serviceUrl}/revoke`, {
|
|
2946
|
+
method: "GET",
|
|
2947
|
+
headers: {
|
|
2948
|
+
"Content-Type": "application/json"
|
|
2949
|
+
}
|
|
2950
|
+
});
|
|
2951
|
+
}
|
|
2952
|
+
redirectToLogin() {
|
|
2953
|
+
if (typeof window === "undefined")
|
|
2954
|
+
throw new Error("Not in browser environment");
|
|
2955
|
+
if (!this.options.loginUrl)
|
|
2956
|
+
throw new Error("Login URL not set");
|
|
2957
|
+
let url = this.options.loginUrl;
|
|
2958
|
+
const queryParams = [];
|
|
2959
|
+
if (this.options.clientId) {
|
|
2960
|
+
queryParams.push("client_id=" + encodeURIComponent(this.options.clientId));
|
|
2961
|
+
}
|
|
2962
|
+
if (this.options.redirectUrl) {
|
|
2963
|
+
queryParams.push("redirect_uri=" + encodeURIComponent(this.options.redirectUrl));
|
|
2964
|
+
}
|
|
2965
|
+
if (queryParams.length > 0) {
|
|
2966
|
+
url += (url.includes("?") ? "&" : "?") + queryParams.join("&");
|
|
2967
|
+
}
|
|
2968
|
+
window.location.href = url;
|
|
2969
|
+
}
|
|
2970
|
+
async readCredentials() {
|
|
2971
|
+
if (!this.response)
|
|
2972
|
+
return null;
|
|
2973
|
+
return await this.response.json();
|
|
2974
|
+
}
|
|
2975
|
+
async refreshToken() {
|
|
2976
|
+
const body = { grant_type: "refresh_token" };
|
|
2977
|
+
if (this.options.clientId)
|
|
2978
|
+
body.client_id = this.options.clientId;
|
|
2979
|
+
if (this.options.clientSecret)
|
|
2980
|
+
body.client_secret = this.options.clientSecret;
|
|
2981
|
+
this.response = await this.fetchWithAuth(`${this.options.serviceUrl}/token`, {
|
|
2982
|
+
method: "POST",
|
|
2983
|
+
headers: {
|
|
2984
|
+
"Content-Type": "application/json"
|
|
2985
|
+
},
|
|
2986
|
+
body: JSON.stringify(body)
|
|
2987
|
+
});
|
|
2988
|
+
if (!this.response.ok) {
|
|
2989
|
+
const err = await this.response.json();
|
|
2990
|
+
throw new ReportingAuthClientException(err);
|
|
2991
|
+
}
|
|
2992
|
+
return this.response;
|
|
2993
|
+
}
|
|
2994
|
+
async revokeToken() {
|
|
2995
|
+
return await this.fetchWithAuth(`${this.options.serviceUrl}/revoke`, {
|
|
2996
|
+
method: "GET"
|
|
2997
|
+
});
|
|
2998
|
+
}
|
|
2999
|
+
};
|
|
3000
|
+
|
|
3001
|
+
// src/config.ts
|
|
3002
|
+
var import_rp_client = __toESM(require_dist());
|
|
3003
|
+
var CONFIG_DIR = path.join(os.homedir(), ".config", "reporting-bi");
|
|
3004
|
+
var CREDENTIALS_FILE = path.join(CONFIG_DIR, "credentials.json");
|
|
3005
|
+
var CLIENT_ID = "0D6693D4-4358-4C08-BA80-A94A97B7F47C";
|
|
3006
|
+
var CLIENT_SECRET = "48481427819bb41798bd74fa109c90b184ca4d64d20e60dfbe8430299f06f73e";
|
|
3007
|
+
function loadCredentials() {
|
|
3008
|
+
try {
|
|
3009
|
+
const data = fs.readFileSync(CREDENTIALS_FILE, "utf-8");
|
|
3010
|
+
return JSON.parse(data);
|
|
3011
|
+
} catch {
|
|
3012
|
+
return { active: null, connections: {} };
|
|
3013
|
+
}
|
|
3014
|
+
}
|
|
3015
|
+
function saveCredentials(data) {
|
|
3016
|
+
fs.mkdirSync(CONFIG_DIR, { recursive: true, mode: 448 });
|
|
3017
|
+
fs.writeFileSync(CREDENTIALS_FILE, JSON.stringify(data, null, 2), { mode: 384 });
|
|
3018
|
+
}
|
|
3019
|
+
function getActiveConnection() {
|
|
3020
|
+
const creds = loadCredentials();
|
|
3021
|
+
if (!creds.active || !creds.connections[creds.active]) return null;
|
|
3022
|
+
return { domain: creds.active, tokens: creds.connections[creds.active] };
|
|
3023
|
+
}
|
|
3024
|
+
function storeTokens(domain, tokens) {
|
|
3025
|
+
const creds = loadCredentials();
|
|
3026
|
+
creds.connections[domain] = tokens;
|
|
3027
|
+
creds.active = domain;
|
|
3028
|
+
saveCredentials(creds);
|
|
3029
|
+
}
|
|
3030
|
+
function removeTokens(domain) {
|
|
3031
|
+
const creds = loadCredentials();
|
|
3032
|
+
delete creds.connections[domain];
|
|
3033
|
+
if (creds.active === domain) {
|
|
3034
|
+
const remaining = Object.keys(creds.connections);
|
|
3035
|
+
creds.active = remaining.length > 0 ? remaining[0] : null;
|
|
3036
|
+
}
|
|
3037
|
+
saveCredentials(creds);
|
|
3038
|
+
}
|
|
3039
|
+
function setActive(domain, accounting2) {
|
|
3040
|
+
const creds = loadCredentials();
|
|
3041
|
+
if (!creds.connections[domain]) return false;
|
|
3042
|
+
creds.active = domain;
|
|
3043
|
+
if (accounting2 !== void 0) {
|
|
3044
|
+
creds.connections[domain].accounting = accounting2;
|
|
3045
|
+
}
|
|
3046
|
+
saveCredentials(creds);
|
|
3047
|
+
return true;
|
|
3048
|
+
}
|
|
3049
|
+
function createAuthClient(domain, tokenProvider) {
|
|
3050
|
+
return new ReportingAuthClient({
|
|
3051
|
+
serviceUrl: `${domain}/auth`,
|
|
3052
|
+
clientId: CLIENT_ID,
|
|
3053
|
+
clientSecret: CLIENT_SECRET,
|
|
3054
|
+
tokenProvider
|
|
3055
|
+
});
|
|
3056
|
+
}
|
|
3057
|
+
function createService(name, accountingOverride) {
|
|
3058
|
+
const conn = getActiveConnection();
|
|
3059
|
+
if (!conn) {
|
|
3060
|
+
console.error('Not logged in. Run "rp login" first.');
|
|
3061
|
+
process.exit(1);
|
|
3062
|
+
}
|
|
3063
|
+
const accounting2 = accountingOverride ?? conn.tokens.accounting;
|
|
3064
|
+
if (!accounting2) {
|
|
3065
|
+
console.error('No accounting set. Run "rp use <domain> --accounting <id>" first.');
|
|
3066
|
+
process.exit(1);
|
|
3067
|
+
}
|
|
3068
|
+
const service = new import_rp_client.Service({
|
|
3069
|
+
name,
|
|
3070
|
+
baseUrl: `${conn.domain}/ms`,
|
|
3071
|
+
throwExceptions: true
|
|
3072
|
+
});
|
|
3073
|
+
service.tokenProvider = () => conn.tokens.access_token;
|
|
3074
|
+
const ap = new import_rp_client.AccountingProvider();
|
|
3075
|
+
ap.a = accounting2;
|
|
3076
|
+
service.accountingProvider = ap;
|
|
3077
|
+
return service;
|
|
3078
|
+
}
|
|
3079
|
+
var FLAG_ALIASES = {
|
|
3080
|
+
a: "accounting"
|
|
3081
|
+
};
|
|
3082
|
+
function parseArgs(args2) {
|
|
3083
|
+
const positional = [];
|
|
3084
|
+
const flags = {};
|
|
3085
|
+
for (let i = 0; i < args2.length; i++) {
|
|
3086
|
+
if (args2[i].startsWith("--") && (i + 1 >= args2.length || args2[i + 1].startsWith("-"))) {
|
|
3087
|
+
flags[args2[i].slice(2)] = "true";
|
|
3088
|
+
} else if (args2[i].startsWith("--") && i + 1 < args2.length) {
|
|
3089
|
+
flags[args2[i].slice(2)] = args2[i + 1];
|
|
3090
|
+
i++;
|
|
3091
|
+
} else if (args2[i].startsWith("-") && !args2[i].startsWith("--") && i + 1 < args2.length) {
|
|
3092
|
+
const key = FLAG_ALIASES[args2[i].slice(1)] || args2[i].slice(1);
|
|
3093
|
+
flags[key] = args2[i + 1];
|
|
3094
|
+
i++;
|
|
3095
|
+
} else {
|
|
3096
|
+
positional.push(args2[i]);
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
return { positional, flags };
|
|
3100
|
+
}
|
|
3101
|
+
|
|
3102
|
+
// src/format.ts
|
|
3103
|
+
var MAX_CELL_WIDTH = 40;
|
|
3104
|
+
function toStr(value) {
|
|
3105
|
+
if (value == null) return "";
|
|
3106
|
+
if (typeof value === "boolean") return value ? "true" : "false";
|
|
3107
|
+
return String(value);
|
|
3108
|
+
}
|
|
3109
|
+
function truncate(str, max) {
|
|
3110
|
+
return str.length > max ? str.slice(0, max - 1) + "\u2026" : str;
|
|
3111
|
+
}
|
|
3112
|
+
function formatTableArray(data) {
|
|
3113
|
+
if (data.length === 0) return "No results.";
|
|
3114
|
+
const keys = [...new Set(data.flatMap(Object.keys))];
|
|
3115
|
+
const rows = data.map((row) => keys.map((k) => toStr(row[k])));
|
|
3116
|
+
const widths = keys.map((key, i) => {
|
|
3117
|
+
const max = Math.max(key.length, ...rows.map((r) => r[i].length));
|
|
3118
|
+
return Math.min(max, MAX_CELL_WIDTH);
|
|
3119
|
+
});
|
|
3120
|
+
const header = keys.map((k, i) => k.padEnd(widths[i])).join(" ");
|
|
3121
|
+
const separator = widths.map((w) => "\u2500".repeat(w)).join(" ");
|
|
3122
|
+
const body = rows.map(
|
|
3123
|
+
(row) => row.map((cell, i) => truncate(cell, widths[i]).padEnd(widths[i])).join(" ")
|
|
3124
|
+
);
|
|
3125
|
+
return [header, separator, ...body].join("\n");
|
|
3126
|
+
}
|
|
3127
|
+
function formatTableObject(data) {
|
|
3128
|
+
const entries = Object.entries(data);
|
|
3129
|
+
if (entries.length === 0) return "No data.";
|
|
3130
|
+
const keyWidth = Math.min(Math.max(...entries.map(([k]) => k.length)), MAX_CELL_WIDTH);
|
|
3131
|
+
return entries.map(([key, value]) => `${key.padEnd(keyWidth)} ${truncate(toStr(value), MAX_CELL_WIDTH)}`).join("\n");
|
|
3132
|
+
}
|
|
3133
|
+
function formatTable(data) {
|
|
3134
|
+
return Array.isArray(data) ? formatTableArray(data) : formatTableObject(data);
|
|
3135
|
+
}
|
|
3136
|
+
function output(data, flags) {
|
|
3137
|
+
if (flags.json) {
|
|
3138
|
+
console.log(JSON.stringify(data, null, 2));
|
|
3139
|
+
return;
|
|
3140
|
+
}
|
|
3141
|
+
if (Array.isArray(data) || data && typeof data === "object") {
|
|
3142
|
+
console.log(formatTable(data));
|
|
3143
|
+
} else {
|
|
3144
|
+
console.log(data);
|
|
3145
|
+
}
|
|
3146
|
+
}
|
|
3147
|
+
|
|
3148
|
+
// src/commands/accounting.ts
|
|
3149
|
+
async function fetchAccountingName(accountingId) {
|
|
3150
|
+
const service = createService("accounting", accountingId);
|
|
3151
|
+
const accountings = await service.get("accountings", { fields: ["accounting", "company"] });
|
|
3152
|
+
const match = accountings?.find((a) => a.accounting === accountingId);
|
|
3153
|
+
return match?.company ?? null;
|
|
3154
|
+
}
|
|
3155
|
+
async function accounting(args2) {
|
|
3156
|
+
const { positional, flags } = parseArgs(args2);
|
|
3157
|
+
const [subcommand] = positional;
|
|
3158
|
+
switch (subcommand) {
|
|
3159
|
+
case "list":
|
|
3160
|
+
return list(flags);
|
|
3161
|
+
default:
|
|
3162
|
+
console.log("Usage: rp accounting <list>");
|
|
3163
|
+
break;
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3166
|
+
async function list(flags) {
|
|
3167
|
+
const service = createService("accounting");
|
|
3168
|
+
const accountings = await service.get("accountings", { fields: ["accounting", "company"] });
|
|
3169
|
+
output(accountings || [], flags);
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3172
|
+
// src/callback.html
|
|
3173
|
+
var callback_default = `<!DOCTYPE html>
|
|
3174
|
+
<html lang="en">
|
|
3175
|
+
<head>
|
|
3176
|
+
<meta charset="UTF-8">
|
|
3177
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
3178
|
+
<title>Reporting.bi</title>
|
|
3179
|
+
<style>
|
|
3180
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
3181
|
+
body {
|
|
3182
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
3183
|
+
background: #0f1117;
|
|
3184
|
+
color: #e1e4e8;
|
|
3185
|
+
display: flex;
|
|
3186
|
+
justify-content: center;
|
|
3187
|
+
align-items: center;
|
|
3188
|
+
min-height: 100vh;
|
|
3189
|
+
}
|
|
3190
|
+
.card {
|
|
3191
|
+
text-align: center;
|
|
3192
|
+
padding: 3rem;
|
|
3193
|
+
max-width: 420px;
|
|
3194
|
+
}
|
|
3195
|
+
.logo {
|
|
3196
|
+
width: 128px;
|
|
3197
|
+
height: 128px;
|
|
3198
|
+
margin: 0 auto 2rem;
|
|
3199
|
+
}
|
|
3200
|
+
.logo svg { width: 100%; height: 100%; }
|
|
3201
|
+
h1 {
|
|
3202
|
+
font-size: 1.5rem;
|
|
3203
|
+
font-weight: 600;
|
|
3204
|
+
margin-bottom: 0.75rem;
|
|
3205
|
+
}
|
|
3206
|
+
p {
|
|
3207
|
+
color: #8b949e;
|
|
3208
|
+
font-size: 0.95rem;
|
|
3209
|
+
line-height: 1.5;
|
|
3210
|
+
}
|
|
3211
|
+
.success h1 { color: #5ec7d1; }
|
|
3212
|
+
.error h1 { color: #f85149; }
|
|
3213
|
+
</style>
|
|
3214
|
+
</head>
|
|
3215
|
+
<body>
|
|
3216
|
+
<div class="card {{status}}">
|
|
3217
|
+
<div class="logo">
|
|
3218
|
+
<svg viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
|
3219
|
+
<g transform="matrix(1.13592,1.91296e-18,-1.91296e-18,-1.1203,40.0006,53.1327)">
|
|
3220
|
+
<path d="M0,0L-8.658,4.999L-0.002,9.803L8.656,4.998L0,0ZM-9.934,17.336L-1.281,22.332L-1.281,12.124L-9.934,7.321L-9.934,17.336ZM9.934,7.319L1.254,12.137L1.254,22.347L9.934,17.336L9.934,7.319ZM0,37.496L-22.321,24.609L-22.321,-1.165L0,-14.051L22.32,-1.165L22.32,24.609L0,37.496Z" style="fill:rgb(94,199,209);fill-rule:nonzero;"/>
|
|
3221
|
+
</g>
|
|
3222
|
+
</svg>
|
|
3223
|
+
</div>
|
|
3224
|
+
<h1>{{title}}</h1>
|
|
3225
|
+
<p>{{message}}</p>
|
|
3226
|
+
</div>
|
|
3227
|
+
</body>
|
|
3228
|
+
</html>
|
|
3229
|
+
`;
|
|
3230
|
+
|
|
3231
|
+
// src/commands/login.ts
|
|
3232
|
+
function renderCallback(status2, title, message) {
|
|
3233
|
+
return callback_default.replace("{{status}}", status2).replace("{{title}}", title).replace("{{message}}", message);
|
|
3234
|
+
}
|
|
3235
|
+
function openBrowser(url) {
|
|
3236
|
+
const platform = process.platform;
|
|
3237
|
+
const cmd = platform === "darwin" ? "open" : platform === "win32" ? "start" : "xdg-open";
|
|
3238
|
+
(0, import_node_child_process.exec)(`${cmd} ${JSON.stringify(url)}`);
|
|
3239
|
+
}
|
|
3240
|
+
async function login(args2) {
|
|
3241
|
+
const { positional, flags } = parseArgs(args2);
|
|
3242
|
+
const domain = positional[0] || "https://reporting.bi";
|
|
3243
|
+
const accounting2 = flags.accounting ? parseInt(flags.accounting) : void 0;
|
|
3244
|
+
console.log(`Logging in to ${domain}...`);
|
|
3245
|
+
const code = await getAuthorizationCode(domain);
|
|
3246
|
+
if (!code) {
|
|
3247
|
+
console.error("Login cancelled or timed out.");
|
|
3248
|
+
process.exit(1);
|
|
3249
|
+
}
|
|
3250
|
+
const client = createAuthClient(domain);
|
|
3251
|
+
await client.authorize(code);
|
|
3252
|
+
const credentials = await client.readCredentials();
|
|
3253
|
+
if (!credentials?.access_token) {
|
|
3254
|
+
console.error("Failed to obtain tokens.");
|
|
3255
|
+
process.exit(1);
|
|
3256
|
+
}
|
|
3257
|
+
const expiresAt = credentials.expires_in ? Math.floor(Date.now() / 1e3) + credentials.expires_in : 0;
|
|
3258
|
+
storeTokens(domain, {
|
|
3259
|
+
access_token: credentials.access_token,
|
|
3260
|
+
refresh_token: credentials.refresh_token || "",
|
|
3261
|
+
expires_at: expiresAt,
|
|
3262
|
+
accounting: accounting2
|
|
3263
|
+
});
|
|
3264
|
+
console.log(`Logged in to ${domain} successfully.`);
|
|
3265
|
+
if (accounting2) {
|
|
3266
|
+
try {
|
|
3267
|
+
const name = await fetchAccountingName(accounting2);
|
|
3268
|
+
console.log(`Accounting: ${accounting2}${name ? ` (${name})` : ""}`);
|
|
3269
|
+
} catch {
|
|
3270
|
+
console.log(`Accounting: ${accounting2}`);
|
|
3271
|
+
}
|
|
3272
|
+
} else {
|
|
3273
|
+
console.log('No accounting set. Use "rp use <domain> --accounting <id>" to set one.');
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
function getAuthorizationCode(domain) {
|
|
3277
|
+
return new Promise((resolve) => {
|
|
3278
|
+
let timeout;
|
|
3279
|
+
const done = (result) => {
|
|
3280
|
+
clearTimeout(timeout);
|
|
3281
|
+
server.close();
|
|
3282
|
+
resolve(result);
|
|
3283
|
+
};
|
|
3284
|
+
const server = http.createServer((req, res) => {
|
|
3285
|
+
const url = new URL(req.url || "", "http://localhost");
|
|
3286
|
+
const code = url.searchParams.get("code");
|
|
3287
|
+
const error = url.searchParams.get("error");
|
|
3288
|
+
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
|
|
3289
|
+
if (code) {
|
|
3290
|
+
res.end(renderCallback("success", "Login successful", "You can close this window and return to the terminal."));
|
|
3291
|
+
done(code);
|
|
3292
|
+
} else if (error) {
|
|
3293
|
+
res.end(renderCallback("error", "Login failed", error));
|
|
3294
|
+
done(null);
|
|
3295
|
+
} else {
|
|
3296
|
+
res.end("Waiting for authentication...");
|
|
3297
|
+
}
|
|
3298
|
+
});
|
|
3299
|
+
server.listen(0, "localhost", () => {
|
|
3300
|
+
const address = server.address();
|
|
3301
|
+
if (!address || typeof address === "string") {
|
|
3302
|
+
done(null);
|
|
3303
|
+
return;
|
|
3304
|
+
}
|
|
3305
|
+
const port = address.port;
|
|
3306
|
+
const redirectUri = `http://localhost:${port}`;
|
|
3307
|
+
const authUrl = `${domain}/auth?client_id=${CLIENT_ID}&redirect_uri=${encodeURIComponent(redirectUri)}`;
|
|
3308
|
+
console.log(`Opening browser for authentication...`);
|
|
3309
|
+
openBrowser(authUrl);
|
|
3310
|
+
});
|
|
3311
|
+
timeout = setTimeout(() => done(null), 5 * 60 * 1e3);
|
|
3312
|
+
});
|
|
3313
|
+
}
|
|
3314
|
+
|
|
3315
|
+
// src/commands/logout.ts
|
|
3316
|
+
async function logout(domain) {
|
|
3317
|
+
if (!domain) {
|
|
3318
|
+
const active = getActiveConnection();
|
|
3319
|
+
if (!active) {
|
|
3320
|
+
console.log("Not logged in.");
|
|
3321
|
+
return;
|
|
3322
|
+
}
|
|
3323
|
+
domain = active.domain;
|
|
3324
|
+
}
|
|
3325
|
+
const creds = loadCredentials();
|
|
3326
|
+
const tokens = creds.connections[domain];
|
|
3327
|
+
if (!tokens) {
|
|
3328
|
+
console.log(`Not logged in to ${domain}.`);
|
|
3329
|
+
return;
|
|
3330
|
+
}
|
|
3331
|
+
try {
|
|
3332
|
+
const client = createAuthClient(domain, () => tokens.access_token);
|
|
3333
|
+
await client.revokeToken();
|
|
3334
|
+
} catch {
|
|
3335
|
+
}
|
|
3336
|
+
removeTokens(domain);
|
|
3337
|
+
console.log(`Logged out from ${domain}.`);
|
|
3338
|
+
}
|
|
3339
|
+
|
|
3340
|
+
// src/commands/status.ts
|
|
3341
|
+
function status() {
|
|
3342
|
+
const creds = loadCredentials();
|
|
3343
|
+
const domains = Object.keys(creds.connections);
|
|
3344
|
+
if (domains.length === 0) {
|
|
3345
|
+
console.log("Not logged in.");
|
|
3346
|
+
return;
|
|
3347
|
+
}
|
|
3348
|
+
for (const domain of domains) {
|
|
3349
|
+
const tokens = creds.connections[domain];
|
|
3350
|
+
const isActive = creds.active === domain;
|
|
3351
|
+
const now = Math.floor(Date.now() / 1e3);
|
|
3352
|
+
const expiresIn = tokens.expires_at - now;
|
|
3353
|
+
let expiry;
|
|
3354
|
+
if (tokens.expires_at === 0) {
|
|
3355
|
+
expiry = "unknown";
|
|
3356
|
+
} else if (expiresIn <= 0) {
|
|
3357
|
+
expiry = "expired";
|
|
3358
|
+
} else {
|
|
3359
|
+
const minutes = Math.floor(expiresIn / 60);
|
|
3360
|
+
const hours = Math.floor(minutes / 60);
|
|
3361
|
+
expiry = hours > 0 ? `${hours}h ${minutes % 60}m` : `${minutes}m`;
|
|
3362
|
+
}
|
|
3363
|
+
const marker = isActive ? " (active)" : "";
|
|
3364
|
+
console.log(`${domain}${marker}`);
|
|
3365
|
+
console.log(` accounting: ${tokens.accounting ?? "not set"}`);
|
|
3366
|
+
console.log(` token expires: ${expiry}`);
|
|
3367
|
+
console.log(` refresh token: ${tokens.refresh_token ? "yes" : "no"}`);
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
|
|
3371
|
+
// src/commands/use.ts
|
|
3372
|
+
async function use(args2) {
|
|
3373
|
+
const { positional, flags } = parseArgs(args2);
|
|
3374
|
+
const accounting2 = flags.accounting ? parseInt(flags.accounting) : void 0;
|
|
3375
|
+
let domain = positional[0];
|
|
3376
|
+
if (!domain && !accounting2) {
|
|
3377
|
+
console.log("Usage: rp use [domain] [--accounting <id>]");
|
|
3378
|
+
return;
|
|
3379
|
+
}
|
|
3380
|
+
if (!domain) {
|
|
3381
|
+
const active = getActiveConnection();
|
|
3382
|
+
if (!active) {
|
|
3383
|
+
console.log('Not logged in. Run "rp login" first.');
|
|
3384
|
+
return;
|
|
3385
|
+
}
|
|
3386
|
+
domain = active.domain;
|
|
3387
|
+
}
|
|
3388
|
+
const creds = loadCredentials();
|
|
3389
|
+
if (!creds.connections[domain]) {
|
|
3390
|
+
const domains = Object.keys(creds.connections);
|
|
3391
|
+
console.log(`Not logged in to ${domain}.`);
|
|
3392
|
+
if (domains.length > 0) console.log(`Available: ${domains.join(", ")}`);
|
|
3393
|
+
return;
|
|
3394
|
+
}
|
|
3395
|
+
setActive(domain, accounting2);
|
|
3396
|
+
const a = accounting2 ?? creds.connections[domain].accounting;
|
|
3397
|
+
if (a) {
|
|
3398
|
+
try {
|
|
3399
|
+
const name = await fetchAccountingName(a);
|
|
3400
|
+
console.log(`Active: ${domain} (accounting: ${a}${name ? ` \u2014 ${name}` : ""})`);
|
|
3401
|
+
} catch {
|
|
3402
|
+
console.log(`Active: ${domain} (accounting: ${a})`);
|
|
3403
|
+
}
|
|
3404
|
+
} else {
|
|
3405
|
+
console.log(`Active: ${domain} (accounting: not set)`);
|
|
3406
|
+
}
|
|
3407
|
+
}
|
|
3408
|
+
|
|
3409
|
+
// src/commands/wiki.ts
|
|
3410
|
+
var fs2 = __toESM(require("node:fs"));
|
|
3411
|
+
var DEFAULT_LANG = "cs";
|
|
3412
|
+
async function list2(flags) {
|
|
3413
|
+
const service = createService("wiki");
|
|
3414
|
+
const pages = await service.get("pages");
|
|
3415
|
+
output(pages || [], flags);
|
|
3416
|
+
}
|
|
3417
|
+
async function get(id, flags) {
|
|
3418
|
+
const lang = flags.lang || DEFAULT_LANG;
|
|
3419
|
+
const service = createService("wiki");
|
|
3420
|
+
const page = await service.get(`page/${lang}/${id}`);
|
|
3421
|
+
output(page, flags);
|
|
3422
|
+
}
|
|
3423
|
+
async function read(id, flags) {
|
|
3424
|
+
const lang = flags.lang || DEFAULT_LANG;
|
|
3425
|
+
const service = createService("wiki");
|
|
3426
|
+
const content = await service.get(`pageContent/${lang}/${id}`, void 0, { parseResponse: false });
|
|
3427
|
+
process.stdout.write(content || "");
|
|
3428
|
+
}
|
|
3429
|
+
async function search(query, flags) {
|
|
3430
|
+
const service = createService("wiki");
|
|
3431
|
+
const results = await service.get("search", { q: query });
|
|
3432
|
+
output(results || [], flags);
|
|
3433
|
+
}
|
|
3434
|
+
async function readContent(flags) {
|
|
3435
|
+
if (flags.file) {
|
|
3436
|
+
return fs2.readFileSync(flags.file, "utf-8");
|
|
3437
|
+
}
|
|
3438
|
+
if (flags.content) {
|
|
3439
|
+
return flags.content;
|
|
3440
|
+
}
|
|
3441
|
+
if (!process.stdin.isTTY) {
|
|
3442
|
+
return new Promise((resolve) => {
|
|
3443
|
+
let data = "";
|
|
3444
|
+
process.stdin.setEncoding("utf-8");
|
|
3445
|
+
process.stdin.on("data", (chunk) => data += chunk);
|
|
3446
|
+
process.stdin.on("end", () => resolve(data));
|
|
3447
|
+
});
|
|
3448
|
+
}
|
|
3449
|
+
console.error("No content provided. Use --file, --content, or pipe to stdin.");
|
|
3450
|
+
process.exit(1);
|
|
3451
|
+
}
|
|
3452
|
+
async function save(id, flags) {
|
|
3453
|
+
const lang = flags.lang || DEFAULT_LANG;
|
|
3454
|
+
const service = createService("wiki");
|
|
3455
|
+
const content = await readContent(flags);
|
|
3456
|
+
const page = {
|
|
3457
|
+
lang,
|
|
3458
|
+
content
|
|
3459
|
+
};
|
|
3460
|
+
if (id) page.id_wiki_page = parseInt(id);
|
|
3461
|
+
if (flags.name) page.name = flags.name;
|
|
3462
|
+
const result = await service.post("page", page);
|
|
3463
|
+
output(result, flags);
|
|
3464
|
+
}
|
|
3465
|
+
async function del(id, flags) {
|
|
3466
|
+
const lang = flags.lang || DEFAULT_LANG;
|
|
3467
|
+
const service = createService("wiki");
|
|
3468
|
+
await service.delete(`page/${lang}/${id}`);
|
|
3469
|
+
console.log(`Page ${id} deleted.`);
|
|
3470
|
+
}
|
|
3471
|
+
async function wiki(args2) {
|
|
3472
|
+
const { positional, flags } = parseArgs(args2);
|
|
3473
|
+
const [subcommand, ...rest] = positional;
|
|
3474
|
+
switch (subcommand) {
|
|
3475
|
+
case "list":
|
|
3476
|
+
return list2(flags);
|
|
3477
|
+
case "get":
|
|
3478
|
+
if (!rest[0]) {
|
|
3479
|
+
console.error("Usage: rp wiki get <id>");
|
|
3480
|
+
process.exit(1);
|
|
3481
|
+
}
|
|
3482
|
+
return get(rest[0], flags);
|
|
3483
|
+
case "read":
|
|
3484
|
+
if (!rest[0]) {
|
|
3485
|
+
console.error("Usage: rp wiki read <id>");
|
|
3486
|
+
process.exit(1);
|
|
3487
|
+
}
|
|
3488
|
+
return read(rest[0], flags);
|
|
3489
|
+
case "search":
|
|
3490
|
+
if (!rest[0]) {
|
|
3491
|
+
console.error("Usage: rp wiki search <query>");
|
|
3492
|
+
process.exit(1);
|
|
3493
|
+
}
|
|
3494
|
+
return search(rest[0], flags);
|
|
3495
|
+
case "save":
|
|
3496
|
+
return save(rest[0], flags);
|
|
3497
|
+
case "delete":
|
|
3498
|
+
if (!rest[0]) {
|
|
3499
|
+
console.error("Usage: rp wiki delete <id>");
|
|
3500
|
+
process.exit(1);
|
|
3501
|
+
}
|
|
3502
|
+
return del(rest[0], flags);
|
|
3503
|
+
default:
|
|
3504
|
+
console.log("Usage: rp wiki <list|get|read|search|save|delete> [options]");
|
|
3505
|
+
break;
|
|
3506
|
+
}
|
|
3507
|
+
}
|
|
3508
|
+
|
|
3509
|
+
// USAGE.md
|
|
3510
|
+
var USAGE_default = 'Reporting.bi CLI\n\nUsage: rp <command> [options]\n\nCommands:\n login [domain] [--accounting <id>] Login to a Reporting.bi instance (opens browser)\n logout [domain] Logout and revoke tokens (default: active connection)\n use <domain> [--accounting <id>] Switch active connection and/or set accounting\n status Show all connections and active status\n\nAccounting:\n accounting list List available accountings\n\nWiki:\n wiki list List all pages\n wiki get <id> [--lang cs] Get page metadata (JSON)\n wiki read <id> [--lang cs] Get page content (plain text)\n wiki search <query> Search pages\n wiki save [id] [--lang cs] [--name n] Save/create a page (content from --file, --content, or stdin)\n wiki delete <id> [--lang cs] Delete a page\n\nDefault domain: https://reporting.bi\nDefault language: cs\n\nExamples:\n rp login http://localhost:3011 --accounting 100000\n rp use https://reporting.bi --accounting 100000\n rp status\n\n rp wiki list\n rp wiki read 42\n rp wiki search "query"\n rp wiki save 42 --file ./page.md\n rp wiki save --name "New page" --content "Hello"\n cat doc.md | rp wiki save 42\n rp wiki delete 42\n';
|
|
3511
|
+
|
|
3512
|
+
// src/index.ts
|
|
3513
|
+
var [command, ...args] = process.argv.slice(2);
|
|
3514
|
+
switch (command) {
|
|
3515
|
+
case "login":
|
|
3516
|
+
login(args);
|
|
3517
|
+
break;
|
|
3518
|
+
case "logout":
|
|
3519
|
+
logout(args[0]);
|
|
3520
|
+
break;
|
|
3521
|
+
case "use":
|
|
3522
|
+
use(args);
|
|
3523
|
+
break;
|
|
3524
|
+
case "wiki":
|
|
3525
|
+
wiki(args);
|
|
3526
|
+
break;
|
|
3527
|
+
case "accounting":
|
|
3528
|
+
accounting(args);
|
|
3529
|
+
break;
|
|
3530
|
+
case "status":
|
|
3531
|
+
status();
|
|
3532
|
+
break;
|
|
3533
|
+
default:
|
|
3534
|
+
console.log(USAGE_default);
|
|
3535
|
+
break;
|
|
3536
|
+
}
|