nana800-code-action 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2561 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all3) => {
3
+ for (var name in all3)
4
+ __defProp(target, name, { get: all3[name], enumerable: true });
5
+ };
6
+
7
+ // node_modules/axios/lib/helpers/bind.js
8
+ function bind(fn, thisArg) {
9
+ return function wrap() {
10
+ return fn.apply(thisArg, arguments);
11
+ };
12
+ }
13
+
14
+ // node_modules/axios/lib/utils.js
15
+ var { toString } = Object.prototype;
16
+ var { getPrototypeOf } = Object;
17
+ var kindOf = ((cache) => (thing) => {
18
+ const str = toString.call(thing);
19
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
20
+ })(/* @__PURE__ */ Object.create(null));
21
+ var kindOfTest = (type) => {
22
+ type = type.toLowerCase();
23
+ return (thing) => kindOf(thing) === type;
24
+ };
25
+ var typeOfTest = (type) => (thing) => typeof thing === type;
26
+ var { isArray } = Array;
27
+ var isUndefined = typeOfTest("undefined");
28
+ function isBuffer(val) {
29
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
30
+ }
31
+ var isArrayBuffer = kindOfTest("ArrayBuffer");
32
+ function isArrayBufferView(val) {
33
+ let result;
34
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
35
+ result = ArrayBuffer.isView(val);
36
+ } else {
37
+ result = val && val.buffer && isArrayBuffer(val.buffer);
38
+ }
39
+ return result;
40
+ }
41
+ var isString = typeOfTest("string");
42
+ var isFunction = typeOfTest("function");
43
+ var isNumber = typeOfTest("number");
44
+ var isObject = (thing) => thing !== null && typeof thing === "object";
45
+ var isBoolean = (thing) => thing === true || thing === false;
46
+ var isPlainObject = (val) => {
47
+ if (kindOf(val) !== "object") {
48
+ return false;
49
+ }
50
+ const prototype3 = getPrototypeOf(val);
51
+ return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
52
+ };
53
+ var isDate = kindOfTest("Date");
54
+ var isFile = kindOfTest("File");
55
+ var isBlob = kindOfTest("Blob");
56
+ var isFileList = kindOfTest("FileList");
57
+ var isStream = (val) => isObject(val) && isFunction(val.pipe);
58
+ var isFormData = (thing) => {
59
+ let kind;
60
+ return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
61
+ kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
62
+ };
63
+ var isURLSearchParams = kindOfTest("URLSearchParams");
64
+ var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
65
+ var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
66
+ function forEach(obj, fn, { allOwnKeys = false } = {}) {
67
+ if (obj === null || typeof obj === "undefined") {
68
+ return;
69
+ }
70
+ let i;
71
+ let l;
72
+ if (typeof obj !== "object") {
73
+ obj = [obj];
74
+ }
75
+ if (isArray(obj)) {
76
+ for (i = 0, l = obj.length; i < l; i++) {
77
+ fn.call(null, obj[i], i, obj);
78
+ }
79
+ } else {
80
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
81
+ const len = keys.length;
82
+ let key;
83
+ for (i = 0; i < len; i++) {
84
+ key = keys[i];
85
+ fn.call(null, obj[key], key, obj);
86
+ }
87
+ }
88
+ }
89
+ function findKey(obj, key) {
90
+ key = key.toLowerCase();
91
+ const keys = Object.keys(obj);
92
+ let i = keys.length;
93
+ let _key;
94
+ while (i-- > 0) {
95
+ _key = keys[i];
96
+ if (key === _key.toLowerCase()) {
97
+ return _key;
98
+ }
99
+ }
100
+ return null;
101
+ }
102
+ var _global = (() => {
103
+ if (typeof globalThis !== "undefined")
104
+ return globalThis;
105
+ return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
106
+ })();
107
+ var isContextDefined = (context) => !isUndefined(context) && context !== _global;
108
+ function merge() {
109
+ const { caseless } = isContextDefined(this) && this || {};
110
+ const result = {};
111
+ const assignValue = (val, key) => {
112
+ const targetKey = caseless && findKey(result, key) || key;
113
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
114
+ result[targetKey] = merge(result[targetKey], val);
115
+ } else if (isPlainObject(val)) {
116
+ result[targetKey] = merge({}, val);
117
+ } else if (isArray(val)) {
118
+ result[targetKey] = val.slice();
119
+ } else {
120
+ result[targetKey] = val;
121
+ }
122
+ };
123
+ for (let i = 0, l = arguments.length; i < l; i++) {
124
+ arguments[i] && forEach(arguments[i], assignValue);
125
+ }
126
+ return result;
127
+ }
128
+ var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
129
+ forEach(b, (val, key) => {
130
+ if (thisArg && isFunction(val)) {
131
+ a[key] = bind(val, thisArg);
132
+ } else {
133
+ a[key] = val;
134
+ }
135
+ }, { allOwnKeys });
136
+ return a;
137
+ };
138
+ var stripBOM = (content) => {
139
+ if (content.charCodeAt(0) === 65279) {
140
+ content = content.slice(1);
141
+ }
142
+ return content;
143
+ };
144
+ var inherits = (constructor, superConstructor, props, descriptors2) => {
145
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
146
+ constructor.prototype.constructor = constructor;
147
+ Object.defineProperty(constructor, "super", {
148
+ value: superConstructor.prototype
149
+ });
150
+ props && Object.assign(constructor.prototype, props);
151
+ };
152
+ var toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
153
+ let props;
154
+ let i;
155
+ let prop;
156
+ const merged = {};
157
+ destObj = destObj || {};
158
+ if (sourceObj == null)
159
+ return destObj;
160
+ do {
161
+ props = Object.getOwnPropertyNames(sourceObj);
162
+ i = props.length;
163
+ while (i-- > 0) {
164
+ prop = props[i];
165
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
166
+ destObj[prop] = sourceObj[prop];
167
+ merged[prop] = true;
168
+ }
169
+ }
170
+ sourceObj = filter2 !== false && getPrototypeOf(sourceObj);
171
+ } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype);
172
+ return destObj;
173
+ };
174
+ var endsWith = (str, searchString, position) => {
175
+ str = String(str);
176
+ if (position === void 0 || position > str.length) {
177
+ position = str.length;
178
+ }
179
+ position -= searchString.length;
180
+ const lastIndex = str.indexOf(searchString, position);
181
+ return lastIndex !== -1 && lastIndex === position;
182
+ };
183
+ var toArray = (thing) => {
184
+ if (!thing)
185
+ return null;
186
+ if (isArray(thing))
187
+ return thing;
188
+ let i = thing.length;
189
+ if (!isNumber(i))
190
+ return null;
191
+ const arr = new Array(i);
192
+ while (i-- > 0) {
193
+ arr[i] = thing[i];
194
+ }
195
+ return arr;
196
+ };
197
+ var isTypedArray = ((TypedArray) => {
198
+ return (thing) => {
199
+ return TypedArray && thing instanceof TypedArray;
200
+ };
201
+ })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
202
+ var forEachEntry = (obj, fn) => {
203
+ const generator = obj && obj[Symbol.iterator];
204
+ const iterator = generator.call(obj);
205
+ let result;
206
+ while ((result = iterator.next()) && !result.done) {
207
+ const pair = result.value;
208
+ fn.call(obj, pair[0], pair[1]);
209
+ }
210
+ };
211
+ var matchAll = (regExp, str) => {
212
+ let matches;
213
+ const arr = [];
214
+ while ((matches = regExp.exec(str)) !== null) {
215
+ arr.push(matches);
216
+ }
217
+ return arr;
218
+ };
219
+ var isHTMLForm = kindOfTest("HTMLFormElement");
220
+ var toCamelCase = (str) => {
221
+ return str.toLowerCase().replace(
222
+ /[-_\s]([a-z\d])(\w*)/g,
223
+ function replacer(m, p1, p2) {
224
+ return p1.toUpperCase() + p2;
225
+ }
226
+ );
227
+ };
228
+ var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
229
+ var isRegExp = kindOfTest("RegExp");
230
+ var reduceDescriptors = (obj, reducer) => {
231
+ const descriptors2 = Object.getOwnPropertyDescriptors(obj);
232
+ const reducedDescriptors = {};
233
+ forEach(descriptors2, (descriptor, name) => {
234
+ let ret;
235
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
236
+ reducedDescriptors[name] = ret || descriptor;
237
+ }
238
+ });
239
+ Object.defineProperties(obj, reducedDescriptors);
240
+ };
241
+ var freezeMethods = (obj) => {
242
+ reduceDescriptors(obj, (descriptor, name) => {
243
+ if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
244
+ return false;
245
+ }
246
+ const value = obj[name];
247
+ if (!isFunction(value))
248
+ return;
249
+ descriptor.enumerable = false;
250
+ if ("writable" in descriptor) {
251
+ descriptor.writable = false;
252
+ return;
253
+ }
254
+ if (!descriptor.set) {
255
+ descriptor.set = () => {
256
+ throw Error("Can not rewrite read-only method '" + name + "'");
257
+ };
258
+ }
259
+ });
260
+ };
261
+ var toObjectSet = (arrayOrString, delimiter) => {
262
+ const obj = {};
263
+ const define = (arr) => {
264
+ arr.forEach((value) => {
265
+ obj[value] = true;
266
+ });
267
+ };
268
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
269
+ return obj;
270
+ };
271
+ var noop = () => {
272
+ };
273
+ var toFiniteNumber = (value, defaultValue) => {
274
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
275
+ };
276
+ var ALPHA = "abcdefghijklmnopqrstuvwxyz";
277
+ var DIGIT = "0123456789";
278
+ var ALPHABET = {
279
+ DIGIT,
280
+ ALPHA,
281
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
282
+ };
283
+ var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
284
+ let str = "";
285
+ const { length } = alphabet;
286
+ while (size--) {
287
+ str += alphabet[Math.random() * length | 0];
288
+ }
289
+ return str;
290
+ };
291
+ function isSpecCompliantForm(thing) {
292
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
293
+ }
294
+ var toJSONObject = (obj) => {
295
+ const stack = new Array(10);
296
+ const visit = (source, i) => {
297
+ if (isObject(source)) {
298
+ if (stack.indexOf(source) >= 0) {
299
+ return;
300
+ }
301
+ if (!("toJSON" in source)) {
302
+ stack[i] = source;
303
+ const target = isArray(source) ? [] : {};
304
+ forEach(source, (value, key) => {
305
+ const reducedValue = visit(value, i + 1);
306
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
307
+ });
308
+ stack[i] = void 0;
309
+ return target;
310
+ }
311
+ }
312
+ return source;
313
+ };
314
+ return visit(obj, 0);
315
+ };
316
+ var isAsyncFn = kindOfTest("AsyncFunction");
317
+ var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
318
+ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
319
+ if (setImmediateSupported) {
320
+ return setImmediate;
321
+ }
322
+ return postMessageSupported ? ((token, callbacks) => {
323
+ _global.addEventListener("message", ({ source, data }) => {
324
+ if (source === _global && data === token) {
325
+ callbacks.length && callbacks.shift()();
326
+ }
327
+ }, false);
328
+ return (cb) => {
329
+ callbacks.push(cb);
330
+ _global.postMessage(token, "*");
331
+ };
332
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
333
+ })(
334
+ typeof setImmediate === "function",
335
+ isFunction(_global.postMessage)
336
+ );
337
+ var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
338
+ var utils_default = {
339
+ isArray,
340
+ isArrayBuffer,
341
+ isBuffer,
342
+ isFormData,
343
+ isArrayBufferView,
344
+ isString,
345
+ isNumber,
346
+ isBoolean,
347
+ isObject,
348
+ isPlainObject,
349
+ isReadableStream,
350
+ isRequest,
351
+ isResponse,
352
+ isHeaders,
353
+ isUndefined,
354
+ isDate,
355
+ isFile,
356
+ isBlob,
357
+ isRegExp,
358
+ isFunction,
359
+ isStream,
360
+ isURLSearchParams,
361
+ isTypedArray,
362
+ isFileList,
363
+ forEach,
364
+ merge,
365
+ extend,
366
+ trim,
367
+ stripBOM,
368
+ inherits,
369
+ toFlatObject,
370
+ kindOf,
371
+ kindOfTest,
372
+ endsWith,
373
+ toArray,
374
+ forEachEntry,
375
+ matchAll,
376
+ isHTMLForm,
377
+ hasOwnProperty,
378
+ hasOwnProp: hasOwnProperty,
379
+ // an alias to avoid ESLint no-prototype-builtins detection
380
+ reduceDescriptors,
381
+ freezeMethods,
382
+ toObjectSet,
383
+ toCamelCase,
384
+ noop,
385
+ toFiniteNumber,
386
+ findKey,
387
+ global: _global,
388
+ isContextDefined,
389
+ ALPHABET,
390
+ generateString,
391
+ isSpecCompliantForm,
392
+ toJSONObject,
393
+ isAsyncFn,
394
+ isThenable,
395
+ setImmediate: _setImmediate,
396
+ asap
397
+ };
398
+
399
+ // node_modules/axios/lib/core/AxiosError.js
400
+ function AxiosError(message, code, config, request, response) {
401
+ Error.call(this);
402
+ if (Error.captureStackTrace) {
403
+ Error.captureStackTrace(this, this.constructor);
404
+ } else {
405
+ this.stack = new Error().stack;
406
+ }
407
+ this.message = message;
408
+ this.name = "AxiosError";
409
+ code && (this.code = code);
410
+ config && (this.config = config);
411
+ request && (this.request = request);
412
+ if (response) {
413
+ this.response = response;
414
+ this.status = response.status ? response.status : null;
415
+ }
416
+ }
417
+ utils_default.inherits(AxiosError, Error, {
418
+ toJSON: function toJSON() {
419
+ return {
420
+ // Standard
421
+ message: this.message,
422
+ name: this.name,
423
+ // Microsoft
424
+ description: this.description,
425
+ number: this.number,
426
+ // Mozilla
427
+ fileName: this.fileName,
428
+ lineNumber: this.lineNumber,
429
+ columnNumber: this.columnNumber,
430
+ stack: this.stack,
431
+ // Axios
432
+ config: utils_default.toJSONObject(this.config),
433
+ code: this.code,
434
+ status: this.status
435
+ };
436
+ }
437
+ });
438
+ var prototype = AxiosError.prototype;
439
+ var descriptors = {};
440
+ [
441
+ "ERR_BAD_OPTION_VALUE",
442
+ "ERR_BAD_OPTION",
443
+ "ECONNABORTED",
444
+ "ETIMEDOUT",
445
+ "ERR_NETWORK",
446
+ "ERR_FR_TOO_MANY_REDIRECTS",
447
+ "ERR_DEPRECATED",
448
+ "ERR_BAD_RESPONSE",
449
+ "ERR_BAD_REQUEST",
450
+ "ERR_CANCELED",
451
+ "ERR_NOT_SUPPORT",
452
+ "ERR_INVALID_URL"
453
+ // eslint-disable-next-line func-names
454
+ ].forEach((code) => {
455
+ descriptors[code] = { value: code };
456
+ });
457
+ Object.defineProperties(AxiosError, descriptors);
458
+ Object.defineProperty(prototype, "isAxiosError", { value: true });
459
+ AxiosError.from = (error, code, config, request, response, customProps) => {
460
+ const axiosError = Object.create(prototype);
461
+ utils_default.toFlatObject(error, axiosError, function filter2(obj) {
462
+ return obj !== Error.prototype;
463
+ }, (prop) => {
464
+ return prop !== "isAxiosError";
465
+ });
466
+ AxiosError.call(axiosError, error.message, code, config, request, response);
467
+ axiosError.cause = error;
468
+ axiosError.name = error.name;
469
+ customProps && Object.assign(axiosError, customProps);
470
+ return axiosError;
471
+ };
472
+ var AxiosError_default = AxiosError;
473
+
474
+ // node_modules/axios/lib/helpers/null.js
475
+ var null_default = null;
476
+
477
+ // node_modules/axios/lib/helpers/toFormData.js
478
+ function isVisitable(thing) {
479
+ return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
480
+ }
481
+ function removeBrackets(key) {
482
+ return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
483
+ }
484
+ function renderKey(path, key, dots) {
485
+ if (!path)
486
+ return key;
487
+ return path.concat(key).map(function each(token, i) {
488
+ token = removeBrackets(token);
489
+ return !dots && i ? "[" + token + "]" : token;
490
+ }).join(dots ? "." : "");
491
+ }
492
+ function isFlatArray(arr) {
493
+ return utils_default.isArray(arr) && !arr.some(isVisitable);
494
+ }
495
+ var predicates = utils_default.toFlatObject(utils_default, {}, null, function filter(prop) {
496
+ return /^is[A-Z]/.test(prop);
497
+ });
498
+ function toFormData(obj, formData, options) {
499
+ if (!utils_default.isObject(obj)) {
500
+ throw new TypeError("target must be an object");
501
+ }
502
+ formData = formData || new (null_default || FormData)();
503
+ options = utils_default.toFlatObject(options, {
504
+ metaTokens: true,
505
+ dots: false,
506
+ indexes: false
507
+ }, false, function defined(option, source) {
508
+ return !utils_default.isUndefined(source[option]);
509
+ });
510
+ const metaTokens = options.metaTokens;
511
+ const visitor = options.visitor || defaultVisitor;
512
+ const dots = options.dots;
513
+ const indexes = options.indexes;
514
+ const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
515
+ const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
516
+ if (!utils_default.isFunction(visitor)) {
517
+ throw new TypeError("visitor must be a function");
518
+ }
519
+ function convertValue(value) {
520
+ if (value === null)
521
+ return "";
522
+ if (utils_default.isDate(value)) {
523
+ return value.toISOString();
524
+ }
525
+ if (!useBlob && utils_default.isBlob(value)) {
526
+ throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
527
+ }
528
+ if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
529
+ return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
530
+ }
531
+ return value;
532
+ }
533
+ function defaultVisitor(value, key, path) {
534
+ let arr = value;
535
+ if (value && !path && typeof value === "object") {
536
+ if (utils_default.endsWith(key, "{}")) {
537
+ key = metaTokens ? key : key.slice(0, -2);
538
+ value = JSON.stringify(value);
539
+ } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
540
+ key = removeBrackets(key);
541
+ arr.forEach(function each(el, index) {
542
+ !(utils_default.isUndefined(el) || el === null) && formData.append(
543
+ // eslint-disable-next-line no-nested-ternary
544
+ indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
545
+ convertValue(el)
546
+ );
547
+ });
548
+ return false;
549
+ }
550
+ }
551
+ if (isVisitable(value)) {
552
+ return true;
553
+ }
554
+ formData.append(renderKey(path, key, dots), convertValue(value));
555
+ return false;
556
+ }
557
+ const stack = [];
558
+ const exposedHelpers = Object.assign(predicates, {
559
+ defaultVisitor,
560
+ convertValue,
561
+ isVisitable
562
+ });
563
+ function build(value, path) {
564
+ if (utils_default.isUndefined(value))
565
+ return;
566
+ if (stack.indexOf(value) !== -1) {
567
+ throw Error("Circular reference detected in " + path.join("."));
568
+ }
569
+ stack.push(value);
570
+ utils_default.forEach(value, function each(el, key) {
571
+ const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(
572
+ formData,
573
+ el,
574
+ utils_default.isString(key) ? key.trim() : key,
575
+ path,
576
+ exposedHelpers
577
+ );
578
+ if (result === true) {
579
+ build(el, path ? path.concat(key) : [key]);
580
+ }
581
+ });
582
+ stack.pop();
583
+ }
584
+ if (!utils_default.isObject(obj)) {
585
+ throw new TypeError("data must be an object");
586
+ }
587
+ build(obj);
588
+ return formData;
589
+ }
590
+ var toFormData_default = toFormData;
591
+
592
+ // node_modules/axios/lib/helpers/AxiosURLSearchParams.js
593
+ function encode(str) {
594
+ const charMap = {
595
+ "!": "%21",
596
+ "'": "%27",
597
+ "(": "%28",
598
+ ")": "%29",
599
+ "~": "%7E",
600
+ "%20": "+",
601
+ "%00": "\0"
602
+ };
603
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
604
+ return charMap[match];
605
+ });
606
+ }
607
+ function AxiosURLSearchParams(params, options) {
608
+ this._pairs = [];
609
+ params && toFormData_default(params, this, options);
610
+ }
611
+ var prototype2 = AxiosURLSearchParams.prototype;
612
+ prototype2.append = function append(name, value) {
613
+ this._pairs.push([name, value]);
614
+ };
615
+ prototype2.toString = function toString2(encoder) {
616
+ const _encode = encoder ? function(value) {
617
+ return encoder.call(this, value, encode);
618
+ } : encode;
619
+ return this._pairs.map(function each(pair) {
620
+ return _encode(pair[0]) + "=" + _encode(pair[1]);
621
+ }, "").join("&");
622
+ };
623
+ var AxiosURLSearchParams_default = AxiosURLSearchParams;
624
+
625
+ // node_modules/axios/lib/helpers/buildURL.js
626
+ function encode2(val) {
627
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
628
+ }
629
+ function buildURL(url, params, options) {
630
+ if (!params) {
631
+ return url;
632
+ }
633
+ const _encode = options && options.encode || encode2;
634
+ const serializeFn = options && options.serialize;
635
+ let serializedParams;
636
+ if (serializeFn) {
637
+ serializedParams = serializeFn(params, options);
638
+ } else {
639
+ serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, options).toString(_encode);
640
+ }
641
+ if (serializedParams) {
642
+ const hashmarkIndex = url.indexOf("#");
643
+ if (hashmarkIndex !== -1) {
644
+ url = url.slice(0, hashmarkIndex);
645
+ }
646
+ url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
647
+ }
648
+ return url;
649
+ }
650
+
651
+ // node_modules/axios/lib/core/InterceptorManager.js
652
+ var InterceptorManager = class {
653
+ constructor() {
654
+ this.handlers = [];
655
+ }
656
+ /**
657
+ * Add a new interceptor to the stack
658
+ *
659
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
660
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
661
+ *
662
+ * @return {Number} An ID used to remove interceptor later
663
+ */
664
+ use(fulfilled, rejected, options) {
665
+ this.handlers.push({
666
+ fulfilled,
667
+ rejected,
668
+ synchronous: options ? options.synchronous : false,
669
+ runWhen: options ? options.runWhen : null
670
+ });
671
+ return this.handlers.length - 1;
672
+ }
673
+ /**
674
+ * Remove an interceptor from the stack
675
+ *
676
+ * @param {Number} id The ID that was returned by `use`
677
+ *
678
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
679
+ */
680
+ eject(id) {
681
+ if (this.handlers[id]) {
682
+ this.handlers[id] = null;
683
+ }
684
+ }
685
+ /**
686
+ * Clear all interceptors from the stack
687
+ *
688
+ * @returns {void}
689
+ */
690
+ clear() {
691
+ if (this.handlers) {
692
+ this.handlers = [];
693
+ }
694
+ }
695
+ /**
696
+ * Iterate over all the registered interceptors
697
+ *
698
+ * This method is particularly useful for skipping over any
699
+ * interceptors that may have become `null` calling `eject`.
700
+ *
701
+ * @param {Function} fn The function to call for each interceptor
702
+ *
703
+ * @returns {void}
704
+ */
705
+ forEach(fn) {
706
+ utils_default.forEach(this.handlers, function forEachHandler(h) {
707
+ if (h !== null) {
708
+ fn(h);
709
+ }
710
+ });
711
+ }
712
+ };
713
+ var InterceptorManager_default = InterceptorManager;
714
+
715
+ // node_modules/axios/lib/defaults/transitional.js
716
+ var transitional_default = {
717
+ silentJSONParsing: true,
718
+ forcedJSONParsing: true,
719
+ clarifyTimeoutError: false
720
+ };
721
+
722
+ // node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
723
+ var URLSearchParams_default = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams_default;
724
+
725
+ // node_modules/axios/lib/platform/browser/classes/FormData.js
726
+ var FormData_default = typeof FormData !== "undefined" ? FormData : null;
727
+
728
+ // node_modules/axios/lib/platform/browser/classes/Blob.js
729
+ var Blob_default = typeof Blob !== "undefined" ? Blob : null;
730
+
731
+ // node_modules/axios/lib/platform/browser/index.js
732
+ var browser_default = {
733
+ isBrowser: true,
734
+ classes: {
735
+ URLSearchParams: URLSearchParams_default,
736
+ FormData: FormData_default,
737
+ Blob: Blob_default
738
+ },
739
+ protocols: ["http", "https", "file", "blob", "url", "data"]
740
+ };
741
+
742
+ // node_modules/axios/lib/platform/common/utils.js
743
+ var utils_exports = {};
744
+ __export(utils_exports, {
745
+ hasBrowserEnv: () => hasBrowserEnv,
746
+ hasStandardBrowserEnv: () => hasStandardBrowserEnv,
747
+ hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
748
+ navigator: () => _navigator,
749
+ origin: () => origin
750
+ });
751
+ var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
752
+ var _navigator = typeof navigator === "object" && navigator || void 0;
753
+ var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
754
+ var hasStandardBrowserWebWorkerEnv = (() => {
755
+ return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
756
+ self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
757
+ })();
758
+ var origin = hasBrowserEnv && window.location.href || "http://localhost";
759
+
760
+ // node_modules/axios/lib/platform/index.js
761
+ var platform_default = {
762
+ ...utils_exports,
763
+ ...browser_default
764
+ };
765
+
766
+ // node_modules/axios/lib/helpers/toURLEncodedForm.js
767
+ function toURLEncodedForm(data, options) {
768
+ return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({
769
+ visitor: function(value, key, path, helpers) {
770
+ if (platform_default.isNode && utils_default.isBuffer(value)) {
771
+ this.append(key, value.toString("base64"));
772
+ return false;
773
+ }
774
+ return helpers.defaultVisitor.apply(this, arguments);
775
+ }
776
+ }, options));
777
+ }
778
+
779
+ // node_modules/axios/lib/helpers/formDataToJSON.js
780
+ function parsePropPath(name) {
781
+ return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
782
+ return match[0] === "[]" ? "" : match[1] || match[0];
783
+ });
784
+ }
785
+ function arrayToObject(arr) {
786
+ const obj = {};
787
+ const keys = Object.keys(arr);
788
+ let i;
789
+ const len = keys.length;
790
+ let key;
791
+ for (i = 0; i < len; i++) {
792
+ key = keys[i];
793
+ obj[key] = arr[key];
794
+ }
795
+ return obj;
796
+ }
797
+ function formDataToJSON(formData) {
798
+ function buildPath(path, value, target, index) {
799
+ let name = path[index++];
800
+ if (name === "__proto__")
801
+ return true;
802
+ const isNumericKey = Number.isFinite(+name);
803
+ const isLast = index >= path.length;
804
+ name = !name && utils_default.isArray(target) ? target.length : name;
805
+ if (isLast) {
806
+ if (utils_default.hasOwnProp(target, name)) {
807
+ target[name] = [target[name], value];
808
+ } else {
809
+ target[name] = value;
810
+ }
811
+ return !isNumericKey;
812
+ }
813
+ if (!target[name] || !utils_default.isObject(target[name])) {
814
+ target[name] = [];
815
+ }
816
+ const result = buildPath(path, value, target[name], index);
817
+ if (result && utils_default.isArray(target[name])) {
818
+ target[name] = arrayToObject(target[name]);
819
+ }
820
+ return !isNumericKey;
821
+ }
822
+ if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) {
823
+ const obj = {};
824
+ utils_default.forEachEntry(formData, (name, value) => {
825
+ buildPath(parsePropPath(name), value, obj, 0);
826
+ });
827
+ return obj;
828
+ }
829
+ return null;
830
+ }
831
+ var formDataToJSON_default = formDataToJSON;
832
+
833
+ // node_modules/axios/lib/defaults/index.js
834
+ function stringifySafely(rawValue, parser, encoder) {
835
+ if (utils_default.isString(rawValue)) {
836
+ try {
837
+ (parser || JSON.parse)(rawValue);
838
+ return utils_default.trim(rawValue);
839
+ } catch (e) {
840
+ if (e.name !== "SyntaxError") {
841
+ throw e;
842
+ }
843
+ }
844
+ }
845
+ return (encoder || JSON.stringify)(rawValue);
846
+ }
847
+ var defaults = {
848
+ transitional: transitional_default,
849
+ adapter: ["xhr", "http", "fetch"],
850
+ transformRequest: [function transformRequest(data, headers) {
851
+ const contentType = headers.getContentType() || "";
852
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
853
+ const isObjectPayload = utils_default.isObject(data);
854
+ if (isObjectPayload && utils_default.isHTMLForm(data)) {
855
+ data = new FormData(data);
856
+ }
857
+ const isFormData2 = utils_default.isFormData(data);
858
+ if (isFormData2) {
859
+ return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
860
+ }
861
+ if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
862
+ return data;
863
+ }
864
+ if (utils_default.isArrayBufferView(data)) {
865
+ return data.buffer;
866
+ }
867
+ if (utils_default.isURLSearchParams(data)) {
868
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
869
+ return data.toString();
870
+ }
871
+ let isFileList2;
872
+ if (isObjectPayload) {
873
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
874
+ return toURLEncodedForm(data, this.formSerializer).toString();
875
+ }
876
+ if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
877
+ const _FormData = this.env && this.env.FormData;
878
+ return toFormData_default(
879
+ isFileList2 ? { "files[]": data } : data,
880
+ _FormData && new _FormData(),
881
+ this.formSerializer
882
+ );
883
+ }
884
+ }
885
+ if (isObjectPayload || hasJSONContentType) {
886
+ headers.setContentType("application/json", false);
887
+ return stringifySafely(data);
888
+ }
889
+ return data;
890
+ }],
891
+ transformResponse: [function transformResponse(data) {
892
+ const transitional2 = this.transitional || defaults.transitional;
893
+ const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
894
+ const JSONRequested = this.responseType === "json";
895
+ if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
896
+ return data;
897
+ }
898
+ if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
899
+ const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
900
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
901
+ try {
902
+ return JSON.parse(data);
903
+ } catch (e) {
904
+ if (strictJSONParsing) {
905
+ if (e.name === "SyntaxError") {
906
+ throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
907
+ }
908
+ throw e;
909
+ }
910
+ }
911
+ }
912
+ return data;
913
+ }],
914
+ /**
915
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
916
+ * timeout is not created.
917
+ */
918
+ timeout: 0,
919
+ xsrfCookieName: "XSRF-TOKEN",
920
+ xsrfHeaderName: "X-XSRF-TOKEN",
921
+ maxContentLength: -1,
922
+ maxBodyLength: -1,
923
+ env: {
924
+ FormData: platform_default.classes.FormData,
925
+ Blob: platform_default.classes.Blob
926
+ },
927
+ validateStatus: function validateStatus(status) {
928
+ return status >= 200 && status < 300;
929
+ },
930
+ headers: {
931
+ common: {
932
+ "Accept": "application/json, text/plain, */*",
933
+ "Content-Type": void 0
934
+ }
935
+ }
936
+ };
937
+ utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
938
+ defaults.headers[method] = {};
939
+ });
940
+ var defaults_default = defaults;
941
+
942
+ // node_modules/axios/lib/helpers/parseHeaders.js
943
+ var ignoreDuplicateOf = utils_default.toObjectSet([
944
+ "age",
945
+ "authorization",
946
+ "content-length",
947
+ "content-type",
948
+ "etag",
949
+ "expires",
950
+ "from",
951
+ "host",
952
+ "if-modified-since",
953
+ "if-unmodified-since",
954
+ "last-modified",
955
+ "location",
956
+ "max-forwards",
957
+ "proxy-authorization",
958
+ "referer",
959
+ "retry-after",
960
+ "user-agent"
961
+ ]);
962
+ var parseHeaders_default = (rawHeaders) => {
963
+ const parsed = {};
964
+ let key;
965
+ let val;
966
+ let i;
967
+ rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
968
+ i = line.indexOf(":");
969
+ key = line.substring(0, i).trim().toLowerCase();
970
+ val = line.substring(i + 1).trim();
971
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
972
+ return;
973
+ }
974
+ if (key === "set-cookie") {
975
+ if (parsed[key]) {
976
+ parsed[key].push(val);
977
+ } else {
978
+ parsed[key] = [val];
979
+ }
980
+ } else {
981
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
982
+ }
983
+ });
984
+ return parsed;
985
+ };
986
+
987
+ // node_modules/axios/lib/core/AxiosHeaders.js
988
+ var $internals = Symbol("internals");
989
+ function normalizeHeader(header) {
990
+ return header && String(header).trim().toLowerCase();
991
+ }
992
+ function normalizeValue(value) {
993
+ if (value === false || value == null) {
994
+ return value;
995
+ }
996
+ return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);
997
+ }
998
+ function parseTokens(str) {
999
+ const tokens = /* @__PURE__ */ Object.create(null);
1000
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1001
+ let match;
1002
+ while (match = tokensRE.exec(str)) {
1003
+ tokens[match[1]] = match[2];
1004
+ }
1005
+ return tokens;
1006
+ }
1007
+ var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1008
+ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
1009
+ if (utils_default.isFunction(filter2)) {
1010
+ return filter2.call(this, value, header);
1011
+ }
1012
+ if (isHeaderNameFilter) {
1013
+ value = header;
1014
+ }
1015
+ if (!utils_default.isString(value))
1016
+ return;
1017
+ if (utils_default.isString(filter2)) {
1018
+ return value.indexOf(filter2) !== -1;
1019
+ }
1020
+ if (utils_default.isRegExp(filter2)) {
1021
+ return filter2.test(value);
1022
+ }
1023
+ }
1024
+ function formatHeader(header) {
1025
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
1026
+ return char.toUpperCase() + str;
1027
+ });
1028
+ }
1029
+ function buildAccessors(obj, header) {
1030
+ const accessorName = utils_default.toCamelCase(" " + header);
1031
+ ["get", "set", "has"].forEach((methodName) => {
1032
+ Object.defineProperty(obj, methodName + accessorName, {
1033
+ value: function(arg1, arg2, arg3) {
1034
+ return this[methodName].call(this, header, arg1, arg2, arg3);
1035
+ },
1036
+ configurable: true
1037
+ });
1038
+ });
1039
+ }
1040
+ var AxiosHeaders = class {
1041
+ constructor(headers) {
1042
+ headers && this.set(headers);
1043
+ }
1044
+ set(header, valueOrRewrite, rewrite) {
1045
+ const self2 = this;
1046
+ function setHeader(_value, _header, _rewrite) {
1047
+ const lHeader = normalizeHeader(_header);
1048
+ if (!lHeader) {
1049
+ throw new Error("header name must be a non-empty string");
1050
+ }
1051
+ const key = utils_default.findKey(self2, lHeader);
1052
+ if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
1053
+ self2[key || _header] = normalizeValue(_value);
1054
+ }
1055
+ }
1056
+ const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
1057
+ if (utils_default.isPlainObject(header) || header instanceof this.constructor) {
1058
+ setHeaders(header, valueOrRewrite);
1059
+ } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1060
+ setHeaders(parseHeaders_default(header), valueOrRewrite);
1061
+ } else if (utils_default.isHeaders(header)) {
1062
+ for (const [key, value] of header.entries()) {
1063
+ setHeader(value, key, rewrite);
1064
+ }
1065
+ } else {
1066
+ header != null && setHeader(valueOrRewrite, header, rewrite);
1067
+ }
1068
+ return this;
1069
+ }
1070
+ get(header, parser) {
1071
+ header = normalizeHeader(header);
1072
+ if (header) {
1073
+ const key = utils_default.findKey(this, header);
1074
+ if (key) {
1075
+ const value = this[key];
1076
+ if (!parser) {
1077
+ return value;
1078
+ }
1079
+ if (parser === true) {
1080
+ return parseTokens(value);
1081
+ }
1082
+ if (utils_default.isFunction(parser)) {
1083
+ return parser.call(this, value, key);
1084
+ }
1085
+ if (utils_default.isRegExp(parser)) {
1086
+ return parser.exec(value);
1087
+ }
1088
+ throw new TypeError("parser must be boolean|regexp|function");
1089
+ }
1090
+ }
1091
+ }
1092
+ has(header, matcher) {
1093
+ header = normalizeHeader(header);
1094
+ if (header) {
1095
+ const key = utils_default.findKey(this, header);
1096
+ return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
1097
+ }
1098
+ return false;
1099
+ }
1100
+ delete(header, matcher) {
1101
+ const self2 = this;
1102
+ let deleted = false;
1103
+ function deleteHeader(_header) {
1104
+ _header = normalizeHeader(_header);
1105
+ if (_header) {
1106
+ const key = utils_default.findKey(self2, _header);
1107
+ if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
1108
+ delete self2[key];
1109
+ deleted = true;
1110
+ }
1111
+ }
1112
+ }
1113
+ if (utils_default.isArray(header)) {
1114
+ header.forEach(deleteHeader);
1115
+ } else {
1116
+ deleteHeader(header);
1117
+ }
1118
+ return deleted;
1119
+ }
1120
+ clear(matcher) {
1121
+ const keys = Object.keys(this);
1122
+ let i = keys.length;
1123
+ let deleted = false;
1124
+ while (i--) {
1125
+ const key = keys[i];
1126
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
1127
+ delete this[key];
1128
+ deleted = true;
1129
+ }
1130
+ }
1131
+ return deleted;
1132
+ }
1133
+ normalize(format) {
1134
+ const self2 = this;
1135
+ const headers = {};
1136
+ utils_default.forEach(this, (value, header) => {
1137
+ const key = utils_default.findKey(headers, header);
1138
+ if (key) {
1139
+ self2[key] = normalizeValue(value);
1140
+ delete self2[header];
1141
+ return;
1142
+ }
1143
+ const normalized = format ? formatHeader(header) : String(header).trim();
1144
+ if (normalized !== header) {
1145
+ delete self2[header];
1146
+ }
1147
+ self2[normalized] = normalizeValue(value);
1148
+ headers[normalized] = true;
1149
+ });
1150
+ return this;
1151
+ }
1152
+ concat(...targets) {
1153
+ return this.constructor.concat(this, ...targets);
1154
+ }
1155
+ toJSON(asStrings) {
1156
+ const obj = /* @__PURE__ */ Object.create(null);
1157
+ utils_default.forEach(this, (value, header) => {
1158
+ value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value);
1159
+ });
1160
+ return obj;
1161
+ }
1162
+ [Symbol.iterator]() {
1163
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1164
+ }
1165
+ toString() {
1166
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
1167
+ }
1168
+ get [Symbol.toStringTag]() {
1169
+ return "AxiosHeaders";
1170
+ }
1171
+ static from(thing) {
1172
+ return thing instanceof this ? thing : new this(thing);
1173
+ }
1174
+ static concat(first, ...targets) {
1175
+ const computed = new this(first);
1176
+ targets.forEach((target) => computed.set(target));
1177
+ return computed;
1178
+ }
1179
+ static accessor(header) {
1180
+ const internals = this[$internals] = this[$internals] = {
1181
+ accessors: {}
1182
+ };
1183
+ const accessors = internals.accessors;
1184
+ const prototype3 = this.prototype;
1185
+ function defineAccessor(_header) {
1186
+ const lHeader = normalizeHeader(_header);
1187
+ if (!accessors[lHeader]) {
1188
+ buildAccessors(prototype3, _header);
1189
+ accessors[lHeader] = true;
1190
+ }
1191
+ }
1192
+ utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
1193
+ return this;
1194
+ }
1195
+ };
1196
+ AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1197
+ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
1198
+ let mapped = key[0].toUpperCase() + key.slice(1);
1199
+ return {
1200
+ get: () => value,
1201
+ set(headerValue) {
1202
+ this[mapped] = headerValue;
1203
+ }
1204
+ };
1205
+ });
1206
+ utils_default.freezeMethods(AxiosHeaders);
1207
+ var AxiosHeaders_default = AxiosHeaders;
1208
+
1209
+ // node_modules/axios/lib/core/transformData.js
1210
+ function transformData(fns, response) {
1211
+ const config = this || defaults_default;
1212
+ const context = response || config;
1213
+ const headers = AxiosHeaders_default.from(context.headers);
1214
+ let data = context.data;
1215
+ utils_default.forEach(fns, function transform(fn) {
1216
+ data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
1217
+ });
1218
+ headers.normalize();
1219
+ return data;
1220
+ }
1221
+
1222
+ // node_modules/axios/lib/cancel/isCancel.js
1223
+ function isCancel(value) {
1224
+ return !!(value && value.__CANCEL__);
1225
+ }
1226
+
1227
+ // node_modules/axios/lib/cancel/CanceledError.js
1228
+ function CanceledError(message, config, request) {
1229
+ AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
1230
+ this.name = "CanceledError";
1231
+ }
1232
+ utils_default.inherits(CanceledError, AxiosError_default, {
1233
+ __CANCEL__: true
1234
+ });
1235
+ var CanceledError_default = CanceledError;
1236
+
1237
+ // node_modules/axios/lib/core/settle.js
1238
+ function settle(resolve, reject, response) {
1239
+ const validateStatus2 = response.config.validateStatus;
1240
+ if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
1241
+ resolve(response);
1242
+ } else {
1243
+ reject(new AxiosError_default(
1244
+ "Request failed with status code " + response.status,
1245
+ [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
1246
+ response.config,
1247
+ response.request,
1248
+ response
1249
+ ));
1250
+ }
1251
+ }
1252
+
1253
+ // node_modules/axios/lib/helpers/parseProtocol.js
1254
+ function parseProtocol(url) {
1255
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
1256
+ return match && match[1] || "";
1257
+ }
1258
+
1259
+ // node_modules/axios/lib/helpers/speedometer.js
1260
+ function speedometer(samplesCount, min) {
1261
+ samplesCount = samplesCount || 10;
1262
+ const bytes = new Array(samplesCount);
1263
+ const timestamps = new Array(samplesCount);
1264
+ let head = 0;
1265
+ let tail = 0;
1266
+ let firstSampleTS;
1267
+ min = min !== void 0 ? min : 1e3;
1268
+ return function push(chunkLength) {
1269
+ const now = Date.now();
1270
+ const startedAt = timestamps[tail];
1271
+ if (!firstSampleTS) {
1272
+ firstSampleTS = now;
1273
+ }
1274
+ bytes[head] = chunkLength;
1275
+ timestamps[head] = now;
1276
+ let i = tail;
1277
+ let bytesCount = 0;
1278
+ while (i !== head) {
1279
+ bytesCount += bytes[i++];
1280
+ i = i % samplesCount;
1281
+ }
1282
+ head = (head + 1) % samplesCount;
1283
+ if (head === tail) {
1284
+ tail = (tail + 1) % samplesCount;
1285
+ }
1286
+ if (now - firstSampleTS < min) {
1287
+ return;
1288
+ }
1289
+ const passed = startedAt && now - startedAt;
1290
+ return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
1291
+ };
1292
+ }
1293
+ var speedometer_default = speedometer;
1294
+
1295
+ // node_modules/axios/lib/helpers/throttle.js
1296
+ function throttle(fn, freq) {
1297
+ let timestamp = 0;
1298
+ let threshold = 1e3 / freq;
1299
+ let lastArgs;
1300
+ let timer;
1301
+ const invoke = (args, now = Date.now()) => {
1302
+ timestamp = now;
1303
+ lastArgs = null;
1304
+ if (timer) {
1305
+ clearTimeout(timer);
1306
+ timer = null;
1307
+ }
1308
+ fn.apply(null, args);
1309
+ };
1310
+ const throttled = (...args) => {
1311
+ const now = Date.now();
1312
+ const passed = now - timestamp;
1313
+ if (passed >= threshold) {
1314
+ invoke(args, now);
1315
+ } else {
1316
+ lastArgs = args;
1317
+ if (!timer) {
1318
+ timer = setTimeout(() => {
1319
+ timer = null;
1320
+ invoke(lastArgs);
1321
+ }, threshold - passed);
1322
+ }
1323
+ }
1324
+ };
1325
+ const flush = () => lastArgs && invoke(lastArgs);
1326
+ return [throttled, flush];
1327
+ }
1328
+ var throttle_default = throttle;
1329
+
1330
+ // node_modules/axios/lib/helpers/progressEventReducer.js
1331
+ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
1332
+ let bytesNotified = 0;
1333
+ const _speedometer = speedometer_default(50, 250);
1334
+ return throttle_default((e) => {
1335
+ const loaded = e.loaded;
1336
+ const total = e.lengthComputable ? e.total : void 0;
1337
+ const progressBytes = loaded - bytesNotified;
1338
+ const rate = _speedometer(progressBytes);
1339
+ const inRange = loaded <= total;
1340
+ bytesNotified = loaded;
1341
+ const data = {
1342
+ loaded,
1343
+ total,
1344
+ progress: total ? loaded / total : void 0,
1345
+ bytes: progressBytes,
1346
+ rate: rate ? rate : void 0,
1347
+ estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
1348
+ event: e,
1349
+ lengthComputable: total != null,
1350
+ [isDownloadStream ? "download" : "upload"]: true
1351
+ };
1352
+ listener(data);
1353
+ }, freq);
1354
+ };
1355
+ var progressEventDecorator = (total, throttled) => {
1356
+ const lengthComputable = total != null;
1357
+ return [(loaded) => throttled[0]({
1358
+ lengthComputable,
1359
+ total,
1360
+ loaded
1361
+ }), throttled[1]];
1362
+ };
1363
+ var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
1364
+
1365
+ // node_modules/axios/lib/helpers/isURLSameOrigin.js
1366
+ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? (
1367
+ // Standard browser envs have full support of the APIs needed to test
1368
+ // whether the request URL is of the same origin as current location.
1369
+ function standardBrowserEnv() {
1370
+ const msie = platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent);
1371
+ const urlParsingNode = document.createElement("a");
1372
+ let originURL;
1373
+ function resolveURL(url) {
1374
+ let href = url;
1375
+ if (msie) {
1376
+ urlParsingNode.setAttribute("href", href);
1377
+ href = urlParsingNode.href;
1378
+ }
1379
+ urlParsingNode.setAttribute("href", href);
1380
+ return {
1381
+ href: urlParsingNode.href,
1382
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
1383
+ host: urlParsingNode.host,
1384
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
1385
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
1386
+ hostname: urlParsingNode.hostname,
1387
+ port: urlParsingNode.port,
1388
+ pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
1389
+ };
1390
+ }
1391
+ originURL = resolveURL(window.location.href);
1392
+ return function isURLSameOrigin(requestURL) {
1393
+ const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL;
1394
+ return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
1395
+ };
1396
+ }()
1397
+ ) : (
1398
+ // Non standard browser envs (web workers, react-native) lack needed support.
1399
+ function nonStandardBrowserEnv() {
1400
+ return function isURLSameOrigin() {
1401
+ return true;
1402
+ };
1403
+ }()
1404
+ );
1405
+
1406
+ // node_modules/axios/lib/helpers/cookies.js
1407
+ var cookies_default = platform_default.hasStandardBrowserEnv ? (
1408
+ // Standard browser envs support document.cookie
1409
+ {
1410
+ write(name, value, expires, path, domain, secure) {
1411
+ const cookie = [name + "=" + encodeURIComponent(value)];
1412
+ utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
1413
+ utils_default.isString(path) && cookie.push("path=" + path);
1414
+ utils_default.isString(domain) && cookie.push("domain=" + domain);
1415
+ secure === true && cookie.push("secure");
1416
+ document.cookie = cookie.join("; ");
1417
+ },
1418
+ read(name) {
1419
+ const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
1420
+ return match ? decodeURIComponent(match[3]) : null;
1421
+ },
1422
+ remove(name) {
1423
+ this.write(name, "", Date.now() - 864e5);
1424
+ }
1425
+ }
1426
+ ) : (
1427
+ // Non-standard browser env (web workers, react-native) lack needed support.
1428
+ {
1429
+ write() {
1430
+ },
1431
+ read() {
1432
+ return null;
1433
+ },
1434
+ remove() {
1435
+ }
1436
+ }
1437
+ );
1438
+
1439
+ // node_modules/axios/lib/helpers/isAbsoluteURL.js
1440
+ function isAbsoluteURL(url) {
1441
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
1442
+ }
1443
+
1444
+ // node_modules/axios/lib/helpers/combineURLs.js
1445
+ function combineURLs(baseURL, relativeURL) {
1446
+ return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
1447
+ }
1448
+
1449
+ // node_modules/axios/lib/core/buildFullPath.js
1450
+ function buildFullPath(baseURL, requestedURL) {
1451
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
1452
+ return combineURLs(baseURL, requestedURL);
1453
+ }
1454
+ return requestedURL;
1455
+ }
1456
+
1457
+ // node_modules/axios/lib/core/mergeConfig.js
1458
+ var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
1459
+ function mergeConfig(config1, config2) {
1460
+ config2 = config2 || {};
1461
+ const config = {};
1462
+ function getMergedValue(target, source, caseless) {
1463
+ if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
1464
+ return utils_default.merge.call({ caseless }, target, source);
1465
+ } else if (utils_default.isPlainObject(source)) {
1466
+ return utils_default.merge({}, source);
1467
+ } else if (utils_default.isArray(source)) {
1468
+ return source.slice();
1469
+ }
1470
+ return source;
1471
+ }
1472
+ function mergeDeepProperties(a, b, caseless) {
1473
+ if (!utils_default.isUndefined(b)) {
1474
+ return getMergedValue(a, b, caseless);
1475
+ } else if (!utils_default.isUndefined(a)) {
1476
+ return getMergedValue(void 0, a, caseless);
1477
+ }
1478
+ }
1479
+ function valueFromConfig2(a, b) {
1480
+ if (!utils_default.isUndefined(b)) {
1481
+ return getMergedValue(void 0, b);
1482
+ }
1483
+ }
1484
+ function defaultToConfig2(a, b) {
1485
+ if (!utils_default.isUndefined(b)) {
1486
+ return getMergedValue(void 0, b);
1487
+ } else if (!utils_default.isUndefined(a)) {
1488
+ return getMergedValue(void 0, a);
1489
+ }
1490
+ }
1491
+ function mergeDirectKeys(a, b, prop) {
1492
+ if (prop in config2) {
1493
+ return getMergedValue(a, b);
1494
+ } else if (prop in config1) {
1495
+ return getMergedValue(void 0, a);
1496
+ }
1497
+ }
1498
+ const mergeMap = {
1499
+ url: valueFromConfig2,
1500
+ method: valueFromConfig2,
1501
+ data: valueFromConfig2,
1502
+ baseURL: defaultToConfig2,
1503
+ transformRequest: defaultToConfig2,
1504
+ transformResponse: defaultToConfig2,
1505
+ paramsSerializer: defaultToConfig2,
1506
+ timeout: defaultToConfig2,
1507
+ timeoutMessage: defaultToConfig2,
1508
+ withCredentials: defaultToConfig2,
1509
+ withXSRFToken: defaultToConfig2,
1510
+ adapter: defaultToConfig2,
1511
+ responseType: defaultToConfig2,
1512
+ xsrfCookieName: defaultToConfig2,
1513
+ xsrfHeaderName: defaultToConfig2,
1514
+ onUploadProgress: defaultToConfig2,
1515
+ onDownloadProgress: defaultToConfig2,
1516
+ decompress: defaultToConfig2,
1517
+ maxContentLength: defaultToConfig2,
1518
+ maxBodyLength: defaultToConfig2,
1519
+ beforeRedirect: defaultToConfig2,
1520
+ transport: defaultToConfig2,
1521
+ httpAgent: defaultToConfig2,
1522
+ httpsAgent: defaultToConfig2,
1523
+ cancelToken: defaultToConfig2,
1524
+ socketPath: defaultToConfig2,
1525
+ responseEncoding: defaultToConfig2,
1526
+ validateStatus: mergeDirectKeys,
1527
+ headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
1528
+ };
1529
+ utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
1530
+ const merge2 = mergeMap[prop] || mergeDeepProperties;
1531
+ const configValue = merge2(config1[prop], config2[prop], prop);
1532
+ utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
1533
+ });
1534
+ return config;
1535
+ }
1536
+
1537
+ // node_modules/axios/lib/helpers/resolveConfig.js
1538
+ var resolveConfig_default = (config) => {
1539
+ const newConfig = mergeConfig({}, config);
1540
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
1541
+ newConfig.headers = headers = AxiosHeaders_default.from(headers);
1542
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
1543
+ if (auth) {
1544
+ headers.set(
1545
+ "Authorization",
1546
+ "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
1547
+ );
1548
+ }
1549
+ let contentType;
1550
+ if (utils_default.isFormData(data)) {
1551
+ if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
1552
+ headers.setContentType(void 0);
1553
+ } else if ((contentType = headers.getContentType()) !== false) {
1554
+ const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
1555
+ headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
1556
+ }
1557
+ }
1558
+ if (platform_default.hasStandardBrowserEnv) {
1559
+ withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
1560
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
1561
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
1562
+ if (xsrfValue) {
1563
+ headers.set(xsrfHeaderName, xsrfValue);
1564
+ }
1565
+ }
1566
+ }
1567
+ return newConfig;
1568
+ };
1569
+
1570
+ // node_modules/axios/lib/adapters/xhr.js
1571
+ var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
1572
+ var xhr_default = isXHRAdapterSupported && function(config) {
1573
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
1574
+ const _config = resolveConfig_default(config);
1575
+ let requestData = _config.data;
1576
+ const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
1577
+ let { responseType, onUploadProgress, onDownloadProgress } = _config;
1578
+ let onCanceled;
1579
+ let uploadThrottled, downloadThrottled;
1580
+ let flushUpload, flushDownload;
1581
+ function done() {
1582
+ flushUpload && flushUpload();
1583
+ flushDownload && flushDownload();
1584
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
1585
+ _config.signal && _config.signal.removeEventListener("abort", onCanceled);
1586
+ }
1587
+ let request = new XMLHttpRequest();
1588
+ request.open(_config.method.toUpperCase(), _config.url, true);
1589
+ request.timeout = _config.timeout;
1590
+ function onloadend() {
1591
+ if (!request) {
1592
+ return;
1593
+ }
1594
+ const responseHeaders = AxiosHeaders_default.from(
1595
+ "getAllResponseHeaders" in request && request.getAllResponseHeaders()
1596
+ );
1597
+ const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
1598
+ const response = {
1599
+ data: responseData,
1600
+ status: request.status,
1601
+ statusText: request.statusText,
1602
+ headers: responseHeaders,
1603
+ config,
1604
+ request
1605
+ };
1606
+ settle(function _resolve(value) {
1607
+ resolve(value);
1608
+ done();
1609
+ }, function _reject(err) {
1610
+ reject(err);
1611
+ done();
1612
+ }, response);
1613
+ request = null;
1614
+ }
1615
+ if ("onloadend" in request) {
1616
+ request.onloadend = onloadend;
1617
+ } else {
1618
+ request.onreadystatechange = function handleLoad() {
1619
+ if (!request || request.readyState !== 4) {
1620
+ return;
1621
+ }
1622
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
1623
+ return;
1624
+ }
1625
+ setTimeout(onloadend);
1626
+ };
1627
+ }
1628
+ request.onabort = function handleAbort() {
1629
+ if (!request) {
1630
+ return;
1631
+ }
1632
+ reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
1633
+ request = null;
1634
+ };
1635
+ request.onerror = function handleError() {
1636
+ reject(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request));
1637
+ request = null;
1638
+ };
1639
+ request.ontimeout = function handleTimeout() {
1640
+ let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
1641
+ const transitional2 = _config.transitional || transitional_default;
1642
+ if (_config.timeoutErrorMessage) {
1643
+ timeoutErrorMessage = _config.timeoutErrorMessage;
1644
+ }
1645
+ reject(new AxiosError_default(
1646
+ timeoutErrorMessage,
1647
+ transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
1648
+ config,
1649
+ request
1650
+ ));
1651
+ request = null;
1652
+ };
1653
+ requestData === void 0 && requestHeaders.setContentType(null);
1654
+ if ("setRequestHeader" in request) {
1655
+ utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
1656
+ request.setRequestHeader(key, val);
1657
+ });
1658
+ }
1659
+ if (!utils_default.isUndefined(_config.withCredentials)) {
1660
+ request.withCredentials = !!_config.withCredentials;
1661
+ }
1662
+ if (responseType && responseType !== "json") {
1663
+ request.responseType = _config.responseType;
1664
+ }
1665
+ if (onDownloadProgress) {
1666
+ [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
1667
+ request.addEventListener("progress", downloadThrottled);
1668
+ }
1669
+ if (onUploadProgress && request.upload) {
1670
+ [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
1671
+ request.upload.addEventListener("progress", uploadThrottled);
1672
+ request.upload.addEventListener("loadend", flushUpload);
1673
+ }
1674
+ if (_config.cancelToken || _config.signal) {
1675
+ onCanceled = (cancel) => {
1676
+ if (!request) {
1677
+ return;
1678
+ }
1679
+ reject(!cancel || cancel.type ? new CanceledError_default(null, config, request) : cancel);
1680
+ request.abort();
1681
+ request = null;
1682
+ };
1683
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
1684
+ if (_config.signal) {
1685
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
1686
+ }
1687
+ }
1688
+ const protocol = parseProtocol(_config.url);
1689
+ if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
1690
+ reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
1691
+ return;
1692
+ }
1693
+ request.send(requestData || null);
1694
+ });
1695
+ };
1696
+
1697
+ // node_modules/axios/lib/helpers/composeSignals.js
1698
+ var composeSignals = (signals, timeout) => {
1699
+ const { length } = signals = signals ? signals.filter(Boolean) : [];
1700
+ if (timeout || length) {
1701
+ let controller = new AbortController();
1702
+ let aborted;
1703
+ const onabort = function(reason) {
1704
+ if (!aborted) {
1705
+ aborted = true;
1706
+ unsubscribe();
1707
+ const err = reason instanceof Error ? reason : this.reason;
1708
+ controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
1709
+ }
1710
+ };
1711
+ let timer = timeout && setTimeout(() => {
1712
+ timer = null;
1713
+ onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
1714
+ }, timeout);
1715
+ const unsubscribe = () => {
1716
+ if (signals) {
1717
+ timer && clearTimeout(timer);
1718
+ timer = null;
1719
+ signals.forEach((signal2) => {
1720
+ signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
1721
+ });
1722
+ signals = null;
1723
+ }
1724
+ };
1725
+ signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
1726
+ const { signal } = controller;
1727
+ signal.unsubscribe = () => utils_default.asap(unsubscribe);
1728
+ return signal;
1729
+ }
1730
+ };
1731
+ var composeSignals_default = composeSignals;
1732
+
1733
+ // node_modules/axios/lib/helpers/trackStream.js
1734
+ var streamChunk = function* (chunk, chunkSize) {
1735
+ let len = chunk.byteLength;
1736
+ if (!chunkSize || len < chunkSize) {
1737
+ yield chunk;
1738
+ return;
1739
+ }
1740
+ let pos = 0;
1741
+ let end;
1742
+ while (pos < len) {
1743
+ end = pos + chunkSize;
1744
+ yield chunk.slice(pos, end);
1745
+ pos = end;
1746
+ }
1747
+ };
1748
+ var readBytes = async function* (iterable, chunkSize) {
1749
+ for await (const chunk of readStream(iterable)) {
1750
+ yield* streamChunk(chunk, chunkSize);
1751
+ }
1752
+ };
1753
+ var readStream = async function* (stream) {
1754
+ if (stream[Symbol.asyncIterator]) {
1755
+ yield* stream;
1756
+ return;
1757
+ }
1758
+ const reader = stream.getReader();
1759
+ try {
1760
+ for (; ; ) {
1761
+ const { done, value } = await reader.read();
1762
+ if (done) {
1763
+ break;
1764
+ }
1765
+ yield value;
1766
+ }
1767
+ } finally {
1768
+ await reader.cancel();
1769
+ }
1770
+ };
1771
+ var trackStream = (stream, chunkSize, onProgress, onFinish) => {
1772
+ const iterator = readBytes(stream, chunkSize);
1773
+ let bytes = 0;
1774
+ let done;
1775
+ let _onFinish = (e) => {
1776
+ if (!done) {
1777
+ done = true;
1778
+ onFinish && onFinish(e);
1779
+ }
1780
+ };
1781
+ return new ReadableStream({
1782
+ async pull(controller) {
1783
+ try {
1784
+ const { done: done2, value } = await iterator.next();
1785
+ if (done2) {
1786
+ _onFinish();
1787
+ controller.close();
1788
+ return;
1789
+ }
1790
+ let len = value.byteLength;
1791
+ if (onProgress) {
1792
+ let loadedBytes = bytes += len;
1793
+ onProgress(loadedBytes);
1794
+ }
1795
+ controller.enqueue(new Uint8Array(value));
1796
+ } catch (err) {
1797
+ _onFinish(err);
1798
+ throw err;
1799
+ }
1800
+ },
1801
+ cancel(reason) {
1802
+ _onFinish(reason);
1803
+ return iterator.return();
1804
+ }
1805
+ }, {
1806
+ highWaterMark: 2
1807
+ });
1808
+ };
1809
+
1810
+ // node_modules/axios/lib/adapters/fetch.js
1811
+ var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
1812
+ var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
1813
+ var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
1814
+ var test = (fn, ...args) => {
1815
+ try {
1816
+ return !!fn(...args);
1817
+ } catch (e) {
1818
+ return false;
1819
+ }
1820
+ };
1821
+ var supportsRequestStream = isReadableStreamSupported && test(() => {
1822
+ let duplexAccessed = false;
1823
+ const hasContentType = new Request(platform_default.origin, {
1824
+ body: new ReadableStream(),
1825
+ method: "POST",
1826
+ get duplex() {
1827
+ duplexAccessed = true;
1828
+ return "half";
1829
+ }
1830
+ }).headers.has("Content-Type");
1831
+ return duplexAccessed && !hasContentType;
1832
+ });
1833
+ var DEFAULT_CHUNK_SIZE = 64 * 1024;
1834
+ var supportsResponseStream = isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
1835
+ var resolvers = {
1836
+ stream: supportsResponseStream && ((res) => res.body)
1837
+ };
1838
+ isFetchSupported && ((res) => {
1839
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
1840
+ !resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
1841
+ throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
1842
+ });
1843
+ });
1844
+ })(new Response());
1845
+ var getBodyLength = async (body) => {
1846
+ if (body == null) {
1847
+ return 0;
1848
+ }
1849
+ if (utils_default.isBlob(body)) {
1850
+ return body.size;
1851
+ }
1852
+ if (utils_default.isSpecCompliantForm(body)) {
1853
+ const _request = new Request(platform_default.origin, {
1854
+ method: "POST",
1855
+ body
1856
+ });
1857
+ return (await _request.arrayBuffer()).byteLength;
1858
+ }
1859
+ if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
1860
+ return body.byteLength;
1861
+ }
1862
+ if (utils_default.isURLSearchParams(body)) {
1863
+ body = body + "";
1864
+ }
1865
+ if (utils_default.isString(body)) {
1866
+ return (await encodeText(body)).byteLength;
1867
+ }
1868
+ };
1869
+ var resolveBodyLength = async (headers, body) => {
1870
+ const length = utils_default.toFiniteNumber(headers.getContentLength());
1871
+ return length == null ? getBodyLength(body) : length;
1872
+ };
1873
+ var fetch_default = isFetchSupported && (async (config) => {
1874
+ let {
1875
+ url,
1876
+ method,
1877
+ data,
1878
+ signal,
1879
+ cancelToken,
1880
+ timeout,
1881
+ onDownloadProgress,
1882
+ onUploadProgress,
1883
+ responseType,
1884
+ headers,
1885
+ withCredentials = "same-origin",
1886
+ fetchOptions
1887
+ } = resolveConfig_default(config);
1888
+ responseType = responseType ? (responseType + "").toLowerCase() : "text";
1889
+ let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
1890
+ let request;
1891
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
1892
+ composedSignal.unsubscribe();
1893
+ });
1894
+ let requestContentLength;
1895
+ try {
1896
+ if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
1897
+ let _request = new Request(url, {
1898
+ method: "POST",
1899
+ body: data,
1900
+ duplex: "half"
1901
+ });
1902
+ let contentTypeHeader;
1903
+ if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
1904
+ headers.setContentType(contentTypeHeader);
1905
+ }
1906
+ if (_request.body) {
1907
+ const [onProgress, flush] = progressEventDecorator(
1908
+ requestContentLength,
1909
+ progressEventReducer(asyncDecorator(onUploadProgress))
1910
+ );
1911
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
1912
+ }
1913
+ }
1914
+ if (!utils_default.isString(withCredentials)) {
1915
+ withCredentials = withCredentials ? "include" : "omit";
1916
+ }
1917
+ const isCredentialsSupported = "credentials" in Request.prototype;
1918
+ request = new Request(url, {
1919
+ ...fetchOptions,
1920
+ signal: composedSignal,
1921
+ method: method.toUpperCase(),
1922
+ headers: headers.normalize().toJSON(),
1923
+ body: data,
1924
+ duplex: "half",
1925
+ credentials: isCredentialsSupported ? withCredentials : void 0
1926
+ });
1927
+ let response = await fetch(request);
1928
+ const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
1929
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
1930
+ const options = {};
1931
+ ["status", "statusText", "headers"].forEach((prop) => {
1932
+ options[prop] = response[prop];
1933
+ });
1934
+ const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
1935
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
1936
+ responseContentLength,
1937
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
1938
+ ) || [];
1939
+ response = new Response(
1940
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
1941
+ flush && flush();
1942
+ unsubscribe && unsubscribe();
1943
+ }),
1944
+ options
1945
+ );
1946
+ }
1947
+ responseType = responseType || "text";
1948
+ let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
1949
+ !isStreamResponse && unsubscribe && unsubscribe();
1950
+ return await new Promise((resolve, reject) => {
1951
+ settle(resolve, reject, {
1952
+ data: responseData,
1953
+ headers: AxiosHeaders_default.from(response.headers),
1954
+ status: response.status,
1955
+ statusText: response.statusText,
1956
+ config,
1957
+ request
1958
+ });
1959
+ });
1960
+ } catch (err) {
1961
+ unsubscribe && unsubscribe();
1962
+ if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
1963
+ throw Object.assign(
1964
+ new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request),
1965
+ {
1966
+ cause: err.cause || err
1967
+ }
1968
+ );
1969
+ }
1970
+ throw AxiosError_default.from(err, err && err.code, config, request);
1971
+ }
1972
+ });
1973
+
1974
+ // node_modules/axios/lib/adapters/adapters.js
1975
+ var knownAdapters = {
1976
+ http: null_default,
1977
+ xhr: xhr_default,
1978
+ fetch: fetch_default
1979
+ };
1980
+ utils_default.forEach(knownAdapters, (fn, value) => {
1981
+ if (fn) {
1982
+ try {
1983
+ Object.defineProperty(fn, "name", { value });
1984
+ } catch (e) {
1985
+ }
1986
+ Object.defineProperty(fn, "adapterName", { value });
1987
+ }
1988
+ });
1989
+ var renderReason = (reason) => `- ${reason}`;
1990
+ var isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false;
1991
+ var adapters_default = {
1992
+ getAdapter: (adapters) => {
1993
+ adapters = utils_default.isArray(adapters) ? adapters : [adapters];
1994
+ const { length } = adapters;
1995
+ let nameOrAdapter;
1996
+ let adapter;
1997
+ const rejectedReasons = {};
1998
+ for (let i = 0; i < length; i++) {
1999
+ nameOrAdapter = adapters[i];
2000
+ let id;
2001
+ adapter = nameOrAdapter;
2002
+ if (!isResolvedHandle(nameOrAdapter)) {
2003
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
2004
+ if (adapter === void 0) {
2005
+ throw new AxiosError_default(`Unknown adapter '${id}'`);
2006
+ }
2007
+ }
2008
+ if (adapter) {
2009
+ break;
2010
+ }
2011
+ rejectedReasons[id || "#" + i] = adapter;
2012
+ }
2013
+ if (!adapter) {
2014
+ const reasons = Object.entries(rejectedReasons).map(
2015
+ ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
2016
+ );
2017
+ let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
2018
+ throw new AxiosError_default(
2019
+ `There is no suitable adapter to dispatch the request ` + s,
2020
+ "ERR_NOT_SUPPORT"
2021
+ );
2022
+ }
2023
+ return adapter;
2024
+ },
2025
+ adapters: knownAdapters
2026
+ };
2027
+
2028
+ // node_modules/axios/lib/core/dispatchRequest.js
2029
+ function throwIfCancellationRequested(config) {
2030
+ if (config.cancelToken) {
2031
+ config.cancelToken.throwIfRequested();
2032
+ }
2033
+ if (config.signal && config.signal.aborted) {
2034
+ throw new CanceledError_default(null, config);
2035
+ }
2036
+ }
2037
+ function dispatchRequest(config) {
2038
+ throwIfCancellationRequested(config);
2039
+ config.headers = AxiosHeaders_default.from(config.headers);
2040
+ config.data = transformData.call(
2041
+ config,
2042
+ config.transformRequest
2043
+ );
2044
+ if (["post", "put", "patch"].indexOf(config.method) !== -1) {
2045
+ config.headers.setContentType("application/x-www-form-urlencoded", false);
2046
+ }
2047
+ const adapter = adapters_default.getAdapter(config.adapter || defaults_default.adapter);
2048
+ return adapter(config).then(function onAdapterResolution(response) {
2049
+ throwIfCancellationRequested(config);
2050
+ response.data = transformData.call(
2051
+ config,
2052
+ config.transformResponse,
2053
+ response
2054
+ );
2055
+ response.headers = AxiosHeaders_default.from(response.headers);
2056
+ return response;
2057
+ }, function onAdapterRejection(reason) {
2058
+ if (!isCancel(reason)) {
2059
+ throwIfCancellationRequested(config);
2060
+ if (reason && reason.response) {
2061
+ reason.response.data = transformData.call(
2062
+ config,
2063
+ config.transformResponse,
2064
+ reason.response
2065
+ );
2066
+ reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
2067
+ }
2068
+ }
2069
+ return Promise.reject(reason);
2070
+ });
2071
+ }
2072
+
2073
+ // node_modules/axios/lib/env/data.js
2074
+ var VERSION = "1.7.7";
2075
+
2076
+ // node_modules/axios/lib/helpers/validator.js
2077
+ var validators = {};
2078
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
2079
+ validators[type] = function validator(thing) {
2080
+ return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
2081
+ };
2082
+ });
2083
+ var deprecatedWarnings = {};
2084
+ validators.transitional = function transitional(validator, version, message) {
2085
+ function formatMessage(opt, desc) {
2086
+ return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
2087
+ }
2088
+ return (value, opt, opts) => {
2089
+ if (validator === false) {
2090
+ throw new AxiosError_default(
2091
+ formatMessage(opt, " has been removed" + (version ? " in " + version : "")),
2092
+ AxiosError_default.ERR_DEPRECATED
2093
+ );
2094
+ }
2095
+ if (version && !deprecatedWarnings[opt]) {
2096
+ deprecatedWarnings[opt] = true;
2097
+ console.warn(
2098
+ formatMessage(
2099
+ opt,
2100
+ " has been deprecated since v" + version + " and will be removed in the near future"
2101
+ )
2102
+ );
2103
+ }
2104
+ return validator ? validator(value, opt, opts) : true;
2105
+ };
2106
+ };
2107
+ function assertOptions(options, schema, allowUnknown) {
2108
+ if (typeof options !== "object") {
2109
+ throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
2110
+ }
2111
+ const keys = Object.keys(options);
2112
+ let i = keys.length;
2113
+ while (i-- > 0) {
2114
+ const opt = keys[i];
2115
+ const validator = schema[opt];
2116
+ if (validator) {
2117
+ const value = options[opt];
2118
+ const result = value === void 0 || validator(value, opt, options);
2119
+ if (result !== true) {
2120
+ throw new AxiosError_default("option " + opt + " must be " + result, AxiosError_default.ERR_BAD_OPTION_VALUE);
2121
+ }
2122
+ continue;
2123
+ }
2124
+ if (allowUnknown !== true) {
2125
+ throw new AxiosError_default("Unknown option " + opt, AxiosError_default.ERR_BAD_OPTION);
2126
+ }
2127
+ }
2128
+ }
2129
+ var validator_default = {
2130
+ assertOptions,
2131
+ validators
2132
+ };
2133
+
2134
+ // node_modules/axios/lib/core/Axios.js
2135
+ var validators2 = validator_default.validators;
2136
+ var Axios = class {
2137
+ constructor(instanceConfig) {
2138
+ this.defaults = instanceConfig;
2139
+ this.interceptors = {
2140
+ request: new InterceptorManager_default(),
2141
+ response: new InterceptorManager_default()
2142
+ };
2143
+ }
2144
+ /**
2145
+ * Dispatch a request
2146
+ *
2147
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
2148
+ * @param {?Object} config
2149
+ *
2150
+ * @returns {Promise} The Promise to be fulfilled
2151
+ */
2152
+ async request(configOrUrl, config) {
2153
+ try {
2154
+ return await this._request(configOrUrl, config);
2155
+ } catch (err) {
2156
+ if (err instanceof Error) {
2157
+ let dummy;
2158
+ Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
2159
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
2160
+ try {
2161
+ if (!err.stack) {
2162
+ err.stack = stack;
2163
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
2164
+ err.stack += "\n" + stack;
2165
+ }
2166
+ } catch (e) {
2167
+ }
2168
+ }
2169
+ throw err;
2170
+ }
2171
+ }
2172
+ _request(configOrUrl, config) {
2173
+ if (typeof configOrUrl === "string") {
2174
+ config = config || {};
2175
+ config.url = configOrUrl;
2176
+ } else {
2177
+ config = configOrUrl || {};
2178
+ }
2179
+ config = mergeConfig(this.defaults, config);
2180
+ const { transitional: transitional2, paramsSerializer, headers } = config;
2181
+ if (transitional2 !== void 0) {
2182
+ validator_default.assertOptions(transitional2, {
2183
+ silentJSONParsing: validators2.transitional(validators2.boolean),
2184
+ forcedJSONParsing: validators2.transitional(validators2.boolean),
2185
+ clarifyTimeoutError: validators2.transitional(validators2.boolean)
2186
+ }, false);
2187
+ }
2188
+ if (paramsSerializer != null) {
2189
+ if (utils_default.isFunction(paramsSerializer)) {
2190
+ config.paramsSerializer = {
2191
+ serialize: paramsSerializer
2192
+ };
2193
+ } else {
2194
+ validator_default.assertOptions(paramsSerializer, {
2195
+ encode: validators2.function,
2196
+ serialize: validators2.function
2197
+ }, true);
2198
+ }
2199
+ }
2200
+ config.method = (config.method || this.defaults.method || "get").toLowerCase();
2201
+ let contextHeaders = headers && utils_default.merge(
2202
+ headers.common,
2203
+ headers[config.method]
2204
+ );
2205
+ headers && utils_default.forEach(
2206
+ ["delete", "get", "head", "post", "put", "patch", "common"],
2207
+ (method) => {
2208
+ delete headers[method];
2209
+ }
2210
+ );
2211
+ config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
2212
+ const requestInterceptorChain = [];
2213
+ let synchronousRequestInterceptors = true;
2214
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
2215
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
2216
+ return;
2217
+ }
2218
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
2219
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
2220
+ });
2221
+ const responseInterceptorChain = [];
2222
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
2223
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
2224
+ });
2225
+ let promise;
2226
+ let i = 0;
2227
+ let len;
2228
+ if (!synchronousRequestInterceptors) {
2229
+ const chain = [dispatchRequest.bind(this), void 0];
2230
+ chain.unshift.apply(chain, requestInterceptorChain);
2231
+ chain.push.apply(chain, responseInterceptorChain);
2232
+ len = chain.length;
2233
+ promise = Promise.resolve(config);
2234
+ while (i < len) {
2235
+ promise = promise.then(chain[i++], chain[i++]);
2236
+ }
2237
+ return promise;
2238
+ }
2239
+ len = requestInterceptorChain.length;
2240
+ let newConfig = config;
2241
+ i = 0;
2242
+ while (i < len) {
2243
+ const onFulfilled = requestInterceptorChain[i++];
2244
+ const onRejected = requestInterceptorChain[i++];
2245
+ try {
2246
+ newConfig = onFulfilled(newConfig);
2247
+ } catch (error) {
2248
+ onRejected.call(this, error);
2249
+ break;
2250
+ }
2251
+ }
2252
+ try {
2253
+ promise = dispatchRequest.call(this, newConfig);
2254
+ } catch (error) {
2255
+ return Promise.reject(error);
2256
+ }
2257
+ i = 0;
2258
+ len = responseInterceptorChain.length;
2259
+ while (i < len) {
2260
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
2261
+ }
2262
+ return promise;
2263
+ }
2264
+ getUri(config) {
2265
+ config = mergeConfig(this.defaults, config);
2266
+ const fullPath = buildFullPath(config.baseURL, config.url);
2267
+ return buildURL(fullPath, config.params, config.paramsSerializer);
2268
+ }
2269
+ };
2270
+ utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
2271
+ Axios.prototype[method] = function(url, config) {
2272
+ return this.request(mergeConfig(config || {}, {
2273
+ method,
2274
+ url,
2275
+ data: (config || {}).data
2276
+ }));
2277
+ };
2278
+ });
2279
+ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
2280
+ function generateHTTPMethod(isForm) {
2281
+ return function httpMethod(url, data, config) {
2282
+ return this.request(mergeConfig(config || {}, {
2283
+ method,
2284
+ headers: isForm ? {
2285
+ "Content-Type": "multipart/form-data"
2286
+ } : {},
2287
+ url,
2288
+ data
2289
+ }));
2290
+ };
2291
+ }
2292
+ Axios.prototype[method] = generateHTTPMethod();
2293
+ Axios.prototype[method + "Form"] = generateHTTPMethod(true);
2294
+ });
2295
+ var Axios_default = Axios;
2296
+
2297
+ // node_modules/axios/lib/cancel/CancelToken.js
2298
+ var CancelToken = class _CancelToken {
2299
+ constructor(executor) {
2300
+ if (typeof executor !== "function") {
2301
+ throw new TypeError("executor must be a function.");
2302
+ }
2303
+ let resolvePromise;
2304
+ this.promise = new Promise(function promiseExecutor(resolve) {
2305
+ resolvePromise = resolve;
2306
+ });
2307
+ const token = this;
2308
+ this.promise.then((cancel) => {
2309
+ if (!token._listeners)
2310
+ return;
2311
+ let i = token._listeners.length;
2312
+ while (i-- > 0) {
2313
+ token._listeners[i](cancel);
2314
+ }
2315
+ token._listeners = null;
2316
+ });
2317
+ this.promise.then = (onfulfilled) => {
2318
+ let _resolve;
2319
+ const promise = new Promise((resolve) => {
2320
+ token.subscribe(resolve);
2321
+ _resolve = resolve;
2322
+ }).then(onfulfilled);
2323
+ promise.cancel = function reject() {
2324
+ token.unsubscribe(_resolve);
2325
+ };
2326
+ return promise;
2327
+ };
2328
+ executor(function cancel(message, config, request) {
2329
+ if (token.reason) {
2330
+ return;
2331
+ }
2332
+ token.reason = new CanceledError_default(message, config, request);
2333
+ resolvePromise(token.reason);
2334
+ });
2335
+ }
2336
+ /**
2337
+ * Throws a `CanceledError` if cancellation has been requested.
2338
+ */
2339
+ throwIfRequested() {
2340
+ if (this.reason) {
2341
+ throw this.reason;
2342
+ }
2343
+ }
2344
+ /**
2345
+ * Subscribe to the cancel signal
2346
+ */
2347
+ subscribe(listener) {
2348
+ if (this.reason) {
2349
+ listener(this.reason);
2350
+ return;
2351
+ }
2352
+ if (this._listeners) {
2353
+ this._listeners.push(listener);
2354
+ } else {
2355
+ this._listeners = [listener];
2356
+ }
2357
+ }
2358
+ /**
2359
+ * Unsubscribe from the cancel signal
2360
+ */
2361
+ unsubscribe(listener) {
2362
+ if (!this._listeners) {
2363
+ return;
2364
+ }
2365
+ const index = this._listeners.indexOf(listener);
2366
+ if (index !== -1) {
2367
+ this._listeners.splice(index, 1);
2368
+ }
2369
+ }
2370
+ toAbortSignal() {
2371
+ const controller = new AbortController();
2372
+ const abort = (err) => {
2373
+ controller.abort(err);
2374
+ };
2375
+ this.subscribe(abort);
2376
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
2377
+ return controller.signal;
2378
+ }
2379
+ /**
2380
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
2381
+ * cancels the `CancelToken`.
2382
+ */
2383
+ static source() {
2384
+ let cancel;
2385
+ const token = new _CancelToken(function executor(c) {
2386
+ cancel = c;
2387
+ });
2388
+ return {
2389
+ token,
2390
+ cancel
2391
+ };
2392
+ }
2393
+ };
2394
+ var CancelToken_default = CancelToken;
2395
+
2396
+ // node_modules/axios/lib/helpers/spread.js
2397
+ function spread(callback) {
2398
+ return function wrap(arr) {
2399
+ return callback.apply(null, arr);
2400
+ };
2401
+ }
2402
+
2403
+ // node_modules/axios/lib/helpers/isAxiosError.js
2404
+ function isAxiosError(payload) {
2405
+ return utils_default.isObject(payload) && payload.isAxiosError === true;
2406
+ }
2407
+
2408
+ // node_modules/axios/lib/helpers/HttpStatusCode.js
2409
+ var HttpStatusCode = {
2410
+ Continue: 100,
2411
+ SwitchingProtocols: 101,
2412
+ Processing: 102,
2413
+ EarlyHints: 103,
2414
+ Ok: 200,
2415
+ Created: 201,
2416
+ Accepted: 202,
2417
+ NonAuthoritativeInformation: 203,
2418
+ NoContent: 204,
2419
+ ResetContent: 205,
2420
+ PartialContent: 206,
2421
+ MultiStatus: 207,
2422
+ AlreadyReported: 208,
2423
+ ImUsed: 226,
2424
+ MultipleChoices: 300,
2425
+ MovedPermanently: 301,
2426
+ Found: 302,
2427
+ SeeOther: 303,
2428
+ NotModified: 304,
2429
+ UseProxy: 305,
2430
+ Unused: 306,
2431
+ TemporaryRedirect: 307,
2432
+ PermanentRedirect: 308,
2433
+ BadRequest: 400,
2434
+ Unauthorized: 401,
2435
+ PaymentRequired: 402,
2436
+ Forbidden: 403,
2437
+ NotFound: 404,
2438
+ MethodNotAllowed: 405,
2439
+ NotAcceptable: 406,
2440
+ ProxyAuthenticationRequired: 407,
2441
+ RequestTimeout: 408,
2442
+ Conflict: 409,
2443
+ Gone: 410,
2444
+ LengthRequired: 411,
2445
+ PreconditionFailed: 412,
2446
+ PayloadTooLarge: 413,
2447
+ UriTooLong: 414,
2448
+ UnsupportedMediaType: 415,
2449
+ RangeNotSatisfiable: 416,
2450
+ ExpectationFailed: 417,
2451
+ ImATeapot: 418,
2452
+ MisdirectedRequest: 421,
2453
+ UnprocessableEntity: 422,
2454
+ Locked: 423,
2455
+ FailedDependency: 424,
2456
+ TooEarly: 425,
2457
+ UpgradeRequired: 426,
2458
+ PreconditionRequired: 428,
2459
+ TooManyRequests: 429,
2460
+ RequestHeaderFieldsTooLarge: 431,
2461
+ UnavailableForLegalReasons: 451,
2462
+ InternalServerError: 500,
2463
+ NotImplemented: 501,
2464
+ BadGateway: 502,
2465
+ ServiceUnavailable: 503,
2466
+ GatewayTimeout: 504,
2467
+ HttpVersionNotSupported: 505,
2468
+ VariantAlsoNegotiates: 506,
2469
+ InsufficientStorage: 507,
2470
+ LoopDetected: 508,
2471
+ NotExtended: 510,
2472
+ NetworkAuthenticationRequired: 511
2473
+ };
2474
+ Object.entries(HttpStatusCode).forEach(([key, value]) => {
2475
+ HttpStatusCode[value] = key;
2476
+ });
2477
+ var HttpStatusCode_default = HttpStatusCode;
2478
+
2479
+ // node_modules/axios/lib/axios.js
2480
+ function createInstance(defaultConfig) {
2481
+ const context = new Axios_default(defaultConfig);
2482
+ const instance = bind(Axios_default.prototype.request, context);
2483
+ utils_default.extend(instance, Axios_default.prototype, context, { allOwnKeys: true });
2484
+ utils_default.extend(instance, context, null, { allOwnKeys: true });
2485
+ instance.create = function create(instanceConfig) {
2486
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
2487
+ };
2488
+ return instance;
2489
+ }
2490
+ var axios = createInstance(defaults_default);
2491
+ axios.Axios = Axios_default;
2492
+ axios.CanceledError = CanceledError_default;
2493
+ axios.CancelToken = CancelToken_default;
2494
+ axios.isCancel = isCancel;
2495
+ axios.VERSION = VERSION;
2496
+ axios.toFormData = toFormData_default;
2497
+ axios.AxiosError = AxiosError_default;
2498
+ axios.Cancel = axios.CanceledError;
2499
+ axios.all = function all(promises) {
2500
+ return Promise.all(promises);
2501
+ };
2502
+ axios.spread = spread;
2503
+ axios.isAxiosError = isAxiosError;
2504
+ axios.mergeConfig = mergeConfig;
2505
+ axios.AxiosHeaders = AxiosHeaders_default;
2506
+ axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);
2507
+ axios.getAdapter = adapters_default.getAdapter;
2508
+ axios.HttpStatusCode = HttpStatusCode_default;
2509
+ axios.default = axios;
2510
+ var axios_default = axios;
2511
+
2512
+ // node_modules/axios/index.js
2513
+ var {
2514
+ Axios: Axios2,
2515
+ AxiosError: AxiosError2,
2516
+ CanceledError: CanceledError2,
2517
+ isCancel: isCancel2,
2518
+ CancelToken: CancelToken2,
2519
+ VERSION: VERSION2,
2520
+ all: all2,
2521
+ Cancel,
2522
+ isAxiosError: isAxiosError2,
2523
+ spread: spread2,
2524
+ toFormData: toFormData2,
2525
+ AxiosHeaders: AxiosHeaders2,
2526
+ HttpStatusCode: HttpStatusCode2,
2527
+ formToJSON,
2528
+ getAdapter,
2529
+ mergeConfig: mergeConfig2
2530
+ } = axios_default;
2531
+
2532
+ // src/main.ts
2533
+ var headerParamKey = "x-nana800-api-key";
2534
+ var Nana800CodeAction = class {
2535
+ nana800Api = axios_default.create({
2536
+ baseURL: "https://api.nana800.io/runner"
2537
+ });
2538
+ startTriggerAction = async (config_input) => {
2539
+ try {
2540
+ const actionResponse = await this.nana800Api.post(
2541
+ `/run_code_action_trigger/${config_input.api_key}/${config_input.scheme_id}/${config_input.code_action_slug}`,
2542
+ config_input.payload || {},
2543
+ {
2544
+ headers: { [headerParamKey]: config_input?.api_key || "" }
2545
+ }
2546
+ ).then(getThenData);
2547
+ return actionResponse;
2548
+ } catch (e) {
2549
+ console.log("warning: nana800-code-action trigger running error:", e?.response);
2550
+ return {};
2551
+ }
2552
+ };
2553
+ };
2554
+ var getThenData = (resp) => resp?.data;
2555
+ var nana800CodeAction = new Nana800CodeAction();
2556
+ if (typeof window !== "undefined") {
2557
+ window.nana800RemoteConfig = nana800CodeAction;
2558
+ }
2559
+ export {
2560
+ nana800CodeAction
2561
+ };