@openuverse/uvapi 0.0.0-stage → 1.1.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.
Files changed (137) hide show
  1. package/README.md +3871 -3
  2. package/dist/_virtual/_commonjsHelpers.js +6 -0
  3. package/dist/_virtual/index.js +4 -0
  4. package/dist/api/RestAPIClient.d.ts +191 -0
  5. package/dist/api/RestAPIClient.js +328 -0
  6. package/dist/api/WebSocketClient.d.ts +174 -0
  7. package/dist/api/WebSocketClient.js +277 -0
  8. package/dist/api/index.d.ts +6 -0
  9. package/dist/api/modules/index.d.ts +2 -0
  10. package/dist/api/modules/task.d.ts +124 -0
  11. package/dist/api/modules/task.js +121 -0
  12. package/dist/api/modules/user.d.ts +114 -0
  13. package/dist/api/modules/user.js +113 -0
  14. package/dist/config/index.d.ts +120 -0
  15. package/dist/config/index.js +112 -0
  16. package/dist/hooks/index.d.ts +1 -0
  17. package/dist/hooks/useAttributeMonitor.d.ts +45 -0
  18. package/dist/hooks/useAttributeMonitor.js +115 -0
  19. package/dist/index.d.ts +20 -0
  20. package/dist/index.js +93 -0
  21. package/dist/locale/de-DE.d.ts +18 -0
  22. package/dist/locale/de-DE.js +20 -0
  23. package/dist/locale/en-US.d.ts +18 -0
  24. package/dist/locale/en-US.js +20 -0
  25. package/dist/locale/es-ES.d.ts +18 -0
  26. package/dist/locale/es-ES.js +20 -0
  27. package/dist/locale/fr-FR.d.ts +18 -0
  28. package/dist/locale/fr-FR.js +20 -0
  29. package/dist/locale/id-ID.d.ts +18 -0
  30. package/dist/locale/id-ID.js +20 -0
  31. package/dist/locale/index.d.ts +19 -0
  32. package/dist/locale/index.js +70 -0
  33. package/dist/locale/ja-JP.d.ts +18 -0
  34. package/dist/locale/ja-JP.js +20 -0
  35. package/dist/locale/ko-KR.d.ts +18 -0
  36. package/dist/locale/ko-KR.js +20 -0
  37. package/dist/locale/pl-PL.d.ts +18 -0
  38. package/dist/locale/pl-PL.js +20 -0
  39. package/dist/locale/pt-BR.d.ts +18 -0
  40. package/dist/locale/pt-BR.js +20 -0
  41. package/dist/locale/ru-RU.d.ts +18 -0
  42. package/dist/locale/ru-RU.js +20 -0
  43. package/dist/locale/th-TH.d.ts +18 -0
  44. package/dist/locale/th-TH.js +20 -0
  45. package/dist/locale/zh-CN.d.ts +18 -0
  46. package/dist/locale/zh-CN.js +20 -0
  47. package/dist/locale/zh-TW.d.ts +18 -0
  48. package/dist/locale/zh-TW.js +20 -0
  49. package/dist/node_modules/@msgpack/msgpack/dist.esm/CachedKeyDecoder.js +38 -0
  50. package/dist/node_modules/@msgpack/msgpack/dist.esm/DecodeError.js +14 -0
  51. package/dist/node_modules/@msgpack/msgpack/dist.esm/Decoder.js +474 -0
  52. package/dist/node_modules/@msgpack/msgpack/dist.esm/Encoder.js +232 -0
  53. package/dist/node_modules/@msgpack/msgpack/dist.esm/ExtData.js +8 -0
  54. package/dist/node_modules/@msgpack/msgpack/dist.esm/ExtensionCodec.js +46 -0
  55. package/dist/node_modules/@msgpack/msgpack/dist.esm/decode.js +7 -0
  56. package/dist/node_modules/@msgpack/msgpack/dist.esm/encode.js +7 -0
  57. package/dist/node_modules/@msgpack/msgpack/dist.esm/timestamp.js +66 -0
  58. package/dist/node_modules/@msgpack/msgpack/dist.esm/utils/int.js +24 -0
  59. package/dist/node_modules/@msgpack/msgpack/dist.esm/utils/prettyByte.js +6 -0
  60. package/dist/node_modules/@msgpack/msgpack/dist.esm/utils/typedArrays.js +9 -0
  61. package/dist/node_modules/@msgpack/msgpack/dist.esm/utils/utf8.js +93 -0
  62. package/dist/node_modules/axios/index.js +38 -0
  63. package/dist/node_modules/axios/lib/adapters/adapters.js +55 -0
  64. package/dist/node_modules/axios/lib/adapters/fetch.js +169 -0
  65. package/dist/node_modules/axios/lib/adapters/xhr.js +72 -0
  66. package/dist/node_modules/axios/lib/axios.js +46 -0
  67. package/dist/node_modules/axios/lib/cancel/CancelToken.js +77 -0
  68. package/dist/node_modules/axios/lib/cancel/CanceledError.js +11 -0
  69. package/dist/node_modules/axios/lib/cancel/isCancel.js +6 -0
  70. package/dist/node_modules/axios/lib/core/Axios.js +136 -0
  71. package/dist/node_modules/axios/lib/core/AxiosError.js +56 -0
  72. package/dist/node_modules/axios/lib/core/AxiosHeaders.js +181 -0
  73. package/dist/node_modules/axios/lib/core/InterceptorManager.js +58 -0
  74. package/dist/node_modules/axios/lib/core/buildFullPath.js +9 -0
  75. package/dist/node_modules/axios/lib/core/dispatchRequest.js +31 -0
  76. package/dist/node_modules/axios/lib/core/mergeConfig.js +70 -0
  77. package/dist/node_modules/axios/lib/core/settle.js +14 -0
  78. package/dist/node_modules/axios/lib/core/transformData.js +13 -0
  79. package/dist/node_modules/axios/lib/defaults/index.js +89 -0
  80. package/dist/node_modules/axios/lib/defaults/transitional.js +8 -0
  81. package/dist/node_modules/axios/lib/env/data.js +4 -0
  82. package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +33 -0
  83. package/dist/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
  84. package/dist/node_modules/axios/lib/helpers/bind.js +8 -0
  85. package/dist/node_modules/axios/lib/helpers/buildURL.js +23 -0
  86. package/dist/node_modules/axios/lib/helpers/combineURLs.js +6 -0
  87. package/dist/node_modules/axios/lib/helpers/composeSignals.js +30 -0
  88. package/dist/node_modules/axios/lib/helpers/cookies.js +32 -0
  89. package/dist/node_modules/axios/lib/helpers/formDataToJSON.js +31 -0
  90. package/dist/node_modules/axios/lib/helpers/isAbsoluteURL.js +6 -0
  91. package/dist/node_modules/axios/lib/helpers/isAxiosError.js +7 -0
  92. package/dist/node_modules/axios/lib/helpers/isURLSameOrigin.js +8 -0
  93. package/dist/node_modules/axios/lib/helpers/null.js +4 -0
  94. package/dist/node_modules/axios/lib/helpers/parseHeaders.js +30 -0
  95. package/dist/node_modules/axios/lib/helpers/parseProtocol.js +7 -0
  96. package/dist/node_modules/axios/lib/helpers/progressEventReducer.js +35 -0
  97. package/dist/node_modules/axios/lib/helpers/resolveConfig.js +33 -0
  98. package/dist/node_modules/axios/lib/helpers/speedometer.js +19 -0
  99. package/dist/node_modules/axios/lib/helpers/spread.js +8 -0
  100. package/dist/node_modules/axios/lib/helpers/throttle.js +15 -0
  101. package/dist/node_modules/axios/lib/helpers/toFormData.js +85 -0
  102. package/dist/node_modules/axios/lib/helpers/toURLEncodedForm.js +14 -0
  103. package/dist/node_modules/axios/lib/helpers/trackStream.js +63 -0
  104. package/dist/node_modules/axios/lib/helpers/validator.js +54 -0
  105. package/dist/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
  106. package/dist/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
  107. package/dist/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
  108. package/dist/node_modules/axios/lib/platform/browser/index.js +15 -0
  109. package/dist/node_modules/axios/lib/platform/common/utils.js +9 -0
  110. package/dist/node_modules/axios/lib/platform/index.js +9 -0
  111. package/dist/node_modules/axios/lib/utils.js +237 -0
  112. package/dist/node_modules/postcss-pxtorem/index.js +109 -0
  113. package/dist/node_modules/postcss-pxtorem/lib/filter-prop-list.js +13 -0
  114. package/dist/node_modules/postcss-pxtorem/lib/pixel-unit-regex.js +7 -0
  115. package/dist/node_modules/postcss-pxtorem/lib/type.js +14 -0
  116. package/dist/preload/index.d.ts +125 -0
  117. package/dist/preload/index.js +79 -0
  118. package/dist/store/index.d.ts +1 -0
  119. package/dist/store/storeFactory.d.ts +584 -0
  120. package/dist/store/storeFactory.js +216 -0
  121. package/dist/theme/index.d.ts +1 -0
  122. package/dist/theme/index.js +14 -0
  123. package/dist/types/index.d.ts +57 -0
  124. package/dist/types/uVerseAPI.d.ts +67 -0
  125. package/dist/utils/_internal.d.ts +14 -0
  126. package/dist/utils/_internal.js +72 -0
  127. package/dist/utils/constance.d.ts +16 -0
  128. package/dist/utils/constance.js +7 -0
  129. package/dist/utils/index.d.ts +79 -0
  130. package/dist/utils/index.js +96 -0
  131. package/dist/utils/logger.d.ts +118 -0
  132. package/dist/utils/logger.js +170 -0
  133. package/dist/utils/px2rem/remAdapter.d.ts +17 -0
  134. package/dist/utils/px2rem/remAdapter.js +62 -0
  135. package/dist/utils/px2rem/vite.d.ts +14 -0
  136. package/dist/utils/px2rem/vite.js +33 -0
  137. package/package.json +102 -4
@@ -0,0 +1,89 @@
1
+ import t from "../utils.js";
2
+ import c from "../core/AxiosError.js";
3
+ import u from "./transitional.js";
4
+ import S from "../helpers/toFormData.js";
5
+ import h from "../helpers/toURLEncodedForm.js";
6
+ import a from "../platform/index.js";
7
+ import O from "../helpers/formDataToJSON.js";
8
+ function y(i, r, e) {
9
+ if (t.isString(i))
10
+ try {
11
+ return (r || JSON.parse)(i), t.trim(i);
12
+ } catch (n) {
13
+ if (n.name !== "SyntaxError")
14
+ throw n;
15
+ }
16
+ return (e || JSON.stringify)(i);
17
+ }
18
+ const l = {
19
+ transitional: u,
20
+ adapter: ["xhr", "http", "fetch"],
21
+ transformRequest: [function(r, e) {
22
+ const n = e.getContentType() || "", s = n.indexOf("application/json") > -1, f = t.isObject(r);
23
+ if (f && t.isHTMLForm(r) && (r = new FormData(r)), t.isFormData(r))
24
+ return s ? JSON.stringify(O(r)) : r;
25
+ if (t.isArrayBuffer(r) || t.isBuffer(r) || t.isStream(r) || t.isFile(r) || t.isBlob(r) || t.isReadableStream(r))
26
+ return r;
27
+ if (t.isArrayBufferView(r))
28
+ return r.buffer;
29
+ if (t.isURLSearchParams(r))
30
+ return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), r.toString();
31
+ let o;
32
+ if (f) {
33
+ if (n.indexOf("application/x-www-form-urlencoded") > -1)
34
+ return h(r, this.formSerializer).toString();
35
+ if ((o = t.isFileList(r)) || n.indexOf("multipart/form-data") > -1) {
36
+ const p = this.env && this.env.FormData;
37
+ return S(
38
+ o ? { "files[]": r } : r,
39
+ p && new p(),
40
+ this.formSerializer
41
+ );
42
+ }
43
+ }
44
+ return f || s ? (e.setContentType("application/json", !1), y(r)) : r;
45
+ }],
46
+ transformResponse: [function(r) {
47
+ const e = this.transitional || l.transitional, n = e && e.forcedJSONParsing, s = this.responseType === "json";
48
+ if (t.isResponse(r) || t.isReadableStream(r))
49
+ return r;
50
+ if (r && t.isString(r) && (n && !this.responseType || s)) {
51
+ const m = !(e && e.silentJSONParsing) && s;
52
+ try {
53
+ return JSON.parse(r, this.parseReviver);
54
+ } catch (o) {
55
+ if (m)
56
+ throw o.name === "SyntaxError" ? c.from(o, c.ERR_BAD_RESPONSE, this, null, this.response) : o;
57
+ }
58
+ }
59
+ return r;
60
+ }],
61
+ /**
62
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
63
+ * timeout is not created.
64
+ */
65
+ timeout: 0,
66
+ xsrfCookieName: "XSRF-TOKEN",
67
+ xsrfHeaderName: "X-XSRF-TOKEN",
68
+ maxContentLength: -1,
69
+ maxBodyLength: -1,
70
+ env: {
71
+ FormData: a.classes.FormData,
72
+ Blob: a.classes.Blob
73
+ },
74
+ validateStatus: function(r) {
75
+ return r >= 200 && r < 300;
76
+ },
77
+ headers: {
78
+ common: {
79
+ Accept: "application/json, text/plain, */*",
80
+ "Content-Type": void 0
81
+ }
82
+ }
83
+ };
84
+ t.forEach(["delete", "get", "head", "post", "put", "patch"], (i) => {
85
+ l.headers[i] = {};
86
+ });
87
+ export {
88
+ l as default
89
+ };
@@ -0,0 +1,8 @@
1
+ const r = {
2
+ silentJSONParsing: !0,
3
+ forcedJSONParsing: !0,
4
+ clarifyTimeoutError: !1
5
+ };
6
+ export {
7
+ r as default
8
+ };
@@ -0,0 +1,4 @@
1
+ const o = "1.12.2";
2
+ export {
3
+ o as VERSION
4
+ };
@@ -0,0 +1,33 @@
1
+ import p from "./toFormData.js";
2
+ function i(n) {
3
+ const t = {
4
+ "!": "%21",
5
+ "'": "%27",
6
+ "(": "%28",
7
+ ")": "%29",
8
+ "~": "%7E",
9
+ "%20": "+",
10
+ "%00": "\0"
11
+ };
12
+ return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g, function(r) {
13
+ return t[r];
14
+ });
15
+ }
16
+ function a(n, t) {
17
+ this._pairs = [], n && p(n, this, t);
18
+ }
19
+ const c = a.prototype;
20
+ c.append = function(t, o) {
21
+ this._pairs.push([t, o]);
22
+ };
23
+ c.toString = function(t) {
24
+ const o = t ? function(r) {
25
+ return t.call(this, r, i);
26
+ } : i;
27
+ return this._pairs.map(function(e) {
28
+ return o(e[0]) + "=" + o(e[1]);
29
+ }, "").join("&");
30
+ };
31
+ export {
32
+ a as default
33
+ };
@@ -0,0 +1,71 @@
1
+ const e = {
2
+ Continue: 100,
3
+ SwitchingProtocols: 101,
4
+ Processing: 102,
5
+ EarlyHints: 103,
6
+ Ok: 200,
7
+ Created: 201,
8
+ Accepted: 202,
9
+ NonAuthoritativeInformation: 203,
10
+ NoContent: 204,
11
+ ResetContent: 205,
12
+ PartialContent: 206,
13
+ MultiStatus: 207,
14
+ AlreadyReported: 208,
15
+ ImUsed: 226,
16
+ MultipleChoices: 300,
17
+ MovedPermanently: 301,
18
+ Found: 302,
19
+ SeeOther: 303,
20
+ NotModified: 304,
21
+ UseProxy: 305,
22
+ Unused: 306,
23
+ TemporaryRedirect: 307,
24
+ PermanentRedirect: 308,
25
+ BadRequest: 400,
26
+ Unauthorized: 401,
27
+ PaymentRequired: 402,
28
+ Forbidden: 403,
29
+ NotFound: 404,
30
+ MethodNotAllowed: 405,
31
+ NotAcceptable: 406,
32
+ ProxyAuthenticationRequired: 407,
33
+ RequestTimeout: 408,
34
+ Conflict: 409,
35
+ Gone: 410,
36
+ LengthRequired: 411,
37
+ PreconditionFailed: 412,
38
+ PayloadTooLarge: 413,
39
+ UriTooLong: 414,
40
+ UnsupportedMediaType: 415,
41
+ RangeNotSatisfiable: 416,
42
+ ExpectationFailed: 417,
43
+ ImATeapot: 418,
44
+ MisdirectedRequest: 421,
45
+ UnprocessableEntity: 422,
46
+ Locked: 423,
47
+ FailedDependency: 424,
48
+ TooEarly: 425,
49
+ UpgradeRequired: 426,
50
+ PreconditionRequired: 428,
51
+ TooManyRequests: 429,
52
+ RequestHeaderFieldsTooLarge: 431,
53
+ UnavailableForLegalReasons: 451,
54
+ InternalServerError: 500,
55
+ NotImplemented: 501,
56
+ BadGateway: 502,
57
+ ServiceUnavailable: 503,
58
+ GatewayTimeout: 504,
59
+ HttpVersionNotSupported: 505,
60
+ VariantAlsoNegotiates: 506,
61
+ InsufficientStorage: 507,
62
+ LoopDetected: 508,
63
+ NotExtended: 510,
64
+ NetworkAuthenticationRequired: 511
65
+ };
66
+ Object.entries(e).forEach(([t, o]) => {
67
+ e[o] = t;
68
+ });
69
+ export {
70
+ e as default
71
+ };
@@ -0,0 +1,8 @@
1
+ function u(n, r) {
2
+ return function() {
3
+ return n.apply(r, arguments);
4
+ };
5
+ }
6
+ export {
7
+ u as default
8
+ };
@@ -0,0 +1,23 @@
1
+ import f from "../utils.js";
2
+ import d from "./AxiosURLSearchParams.js";
3
+ function l(e) {
4
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
5
+ }
6
+ function m(e, c, i) {
7
+ if (!c)
8
+ return e;
9
+ const t = i && i.encode || l;
10
+ f.isFunction(i) && (i = {
11
+ serialize: i
12
+ });
13
+ const r = i && i.serialize;
14
+ let n;
15
+ if (r ? n = r(c, i) : n = f.isURLSearchParams(c) ? c.toString() : new d(c, i).toString(t), n) {
16
+ const a = e.indexOf("#");
17
+ a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + n;
18
+ }
19
+ return e;
20
+ }
21
+ export {
22
+ m as default
23
+ };
@@ -0,0 +1,6 @@
1
+ function n(e, c) {
2
+ return c ? e.replace(/\/?\/$/, "") + "/" + c.replace(/^\/+/, "") : e;
3
+ }
4
+ export {
5
+ n as default
6
+ };
@@ -0,0 +1,30 @@
1
+ import a from "../cancel/CanceledError.js";
2
+ import s from "../core/AxiosError.js";
3
+ import m from "../utils.js";
4
+ const h = (e, t) => {
5
+ const { length: l } = e = e ? e.filter(Boolean) : [];
6
+ if (t || l) {
7
+ let u = new AbortController(), f;
8
+ const n = function(r) {
9
+ if (!f) {
10
+ f = !0, i();
11
+ const o = r instanceof Error ? r : this.reason;
12
+ u.abort(o instanceof s ? o : new a(o instanceof Error ? o.message : o));
13
+ }
14
+ };
15
+ let c = t && setTimeout(() => {
16
+ c = null, n(new s(`timeout ${t} of ms exceeded`, s.ETIMEDOUT));
17
+ }, t);
18
+ const i = () => {
19
+ e && (c && clearTimeout(c), c = null, e.forEach((r) => {
20
+ r.unsubscribe ? r.unsubscribe(n) : r.removeEventListener("abort", n);
21
+ }), e = null);
22
+ };
23
+ e.forEach((r) => r.addEventListener("abort", n));
24
+ const { signal: b } = u;
25
+ return b.unsubscribe = () => m.asap(i), b;
26
+ }
27
+ };
28
+ export {
29
+ h as default
30
+ };
@@ -0,0 +1,32 @@
1
+ import r from "../utils.js";
2
+ import c from "../platform/index.js";
3
+ const p = c.hasStandardBrowserEnv ? (
4
+ // Standard browser envs support document.cookie
5
+ {
6
+ write(e, t, n, i, s, u) {
7
+ const o = [e + "=" + encodeURIComponent(t)];
8
+ r.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), r.isString(i) && o.push("path=" + i), r.isString(s) && o.push("domain=" + s), u === !0 && o.push("secure"), document.cookie = o.join("; ");
9
+ },
10
+ read(e) {
11
+ const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
12
+ return t ? decodeURIComponent(t[3]) : null;
13
+ },
14
+ remove(e) {
15
+ this.write(e, "", Date.now() - 864e5);
16
+ }
17
+ }
18
+ ) : (
19
+ // Non-standard browser env (web workers, react-native) lack needed support.
20
+ {
21
+ write() {
22
+ },
23
+ read() {
24
+ return null;
25
+ },
26
+ remove() {
27
+ }
28
+ }
29
+ );
30
+ export {
31
+ p as default
32
+ };
@@ -0,0 +1,31 @@
1
+ import u from "../utils.js";
2
+ function f(e) {
3
+ return u.matchAll(/\w+|\[(\w*)]/g, e).map((o) => o[0] === "[]" ? "" : o[1] || o[0]);
4
+ }
5
+ function y(e) {
6
+ const o = {}, r = Object.keys(e);
7
+ let i;
8
+ const n = r.length;
9
+ let c;
10
+ for (i = 0; i < n; i++)
11
+ c = r[i], o[c] = e[c];
12
+ return o;
13
+ }
14
+ function m(e) {
15
+ function o(r, i, n, c) {
16
+ let s = r[c++];
17
+ if (s === "__proto__") return !0;
18
+ const t = Number.isFinite(+s), l = c >= r.length;
19
+ return s = !s && u.isArray(n) ? n.length : s, l ? (u.hasOwnProp(n, s) ? n[s] = [n[s], i] : n[s] = i, !t) : ((!n[s] || !u.isObject(n[s])) && (n[s] = []), o(r, i, n[s], c) && u.isArray(n[s]) && (n[s] = y(n[s])), !t);
20
+ }
21
+ if (u.isFormData(e) && u.isFunction(e.entries)) {
22
+ const r = {};
23
+ return u.forEachEntry(e, (i, n) => {
24
+ o(f(i), n, r, 0);
25
+ }), r;
26
+ }
27
+ return null;
28
+ }
29
+ export {
30
+ m as default
31
+ };
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
3
+ }
4
+ export {
5
+ e as default
6
+ };
@@ -0,0 +1,7 @@
1
+ import i from "../utils.js";
2
+ function o(r) {
3
+ return i.isObject(r) && r.isAxiosError === !0;
4
+ }
5
+ export {
6
+ o as default
7
+ };
@@ -0,0 +1,8 @@
1
+ import o from "../platform/index.js";
2
+ const n = o.hasStandardBrowserEnv ? /* @__PURE__ */ ((r, e) => (t) => (t = new URL(t, o.origin), r.protocol === t.protocol && r.host === t.host && (e || r.port === t.port)))(
3
+ new URL(o.origin),
4
+ o.navigator && /(msie|trident)/i.test(o.navigator.userAgent)
5
+ ) : () => !0;
6
+ export {
7
+ n as default
8
+ };
@@ -0,0 +1,4 @@
1
+ const t = null;
2
+ export {
3
+ t as default
4
+ };
@@ -0,0 +1,30 @@
1
+ import n from "../utils.js";
2
+ const a = n.toObjectSet([
3
+ "age",
4
+ "authorization",
5
+ "content-length",
6
+ "content-type",
7
+ "etag",
8
+ "expires",
9
+ "from",
10
+ "host",
11
+ "if-modified-since",
12
+ "if-unmodified-since",
13
+ "last-modified",
14
+ "location",
15
+ "max-forwards",
16
+ "proxy-authorization",
17
+ "referer",
18
+ "retry-after",
19
+ "user-agent"
20
+ ]), u = (s) => {
21
+ const t = {};
22
+ let e, r, i;
23
+ return s && s.split(`
24
+ `).forEach(function(o) {
25
+ i = o.indexOf(":"), e = o.substring(0, i).trim().toLowerCase(), r = o.substring(i + 1).trim(), !(!e || t[e] && a[e]) && (e === "set-cookie" ? t[e] ? t[e].push(r) : t[e] = [r] : t[e] = t[e] ? t[e] + ", " + r : r);
26
+ }), t;
27
+ };
28
+ export {
29
+ u as default
30
+ };
@@ -0,0 +1,7 @@
1
+ function o(e) {
2
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
3
+ return t && t[1] || "";
4
+ }
5
+ export {
6
+ o as default
7
+ };
@@ -0,0 +1,35 @@
1
+ import i from "./speedometer.js";
2
+ import m from "./throttle.js";
3
+ import f from "../utils.js";
4
+ const h = (t, o, a = 3) => {
5
+ let r = 0;
6
+ const c = i(50, 250);
7
+ return m((s) => {
8
+ const n = s.loaded, e = s.lengthComputable ? s.total : void 0, l = n - r, d = c(l), p = n <= e;
9
+ r = n;
10
+ const u = {
11
+ loaded: n,
12
+ total: e,
13
+ progress: e ? n / e : void 0,
14
+ bytes: l,
15
+ rate: d || void 0,
16
+ estimated: d && e && p ? (e - n) / d : void 0,
17
+ event: s,
18
+ lengthComputable: e != null,
19
+ [o ? "download" : "upload"]: !0
20
+ };
21
+ t(u);
22
+ }, a);
23
+ }, v = (t, o) => {
24
+ const a = t != null;
25
+ return [(r) => o[0]({
26
+ lengthComputable: a,
27
+ total: t,
28
+ loaded: r
29
+ }), o[1]];
30
+ }, C = (t) => (...o) => f.asap(() => t(...o));
31
+ export {
32
+ C as asyncDecorator,
33
+ v as progressEventDecorator,
34
+ h as progressEventReducer
35
+ };
@@ -0,0 +1,33 @@
1
+ import n from "../platform/index.js";
2
+ import m from "../utils.js";
3
+ import c from "./isURLSameOrigin.js";
4
+ import h from "./cookies.js";
5
+ import w from "../core/buildFullPath.js";
6
+ import b from "../core/mergeConfig.js";
7
+ import C from "../core/AxiosHeaders.js";
8
+ import g from "./buildURL.js";
9
+ const E = (a) => {
10
+ const e = b({}, a);
11
+ let { data: i, withXSRFToken: r, xsrfHeaderName: f, xsrfCookieName: d, headers: o, auth: s } = e;
12
+ if (e.headers = o = C.from(o), e.url = g(w(e.baseURL, e.url, e.allowAbsoluteUrls), a.params, a.paramsSerializer), s && o.set(
13
+ "Authorization",
14
+ "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
15
+ ), m.isFormData(i)) {
16
+ if (n.hasStandardBrowserEnv || n.hasStandardBrowserWebWorkerEnv)
17
+ o.setContentType(void 0);
18
+ else if (m.isFunction(i.getHeaders)) {
19
+ const t = i.getHeaders(), u = ["content-type", "content-length"];
20
+ Object.entries(t).forEach(([l, p]) => {
21
+ u.includes(l.toLowerCase()) && o.set(l, p);
22
+ });
23
+ }
24
+ }
25
+ if (n.hasStandardBrowserEnv && (r && m.isFunction(r) && (r = r(e)), r || r !== !1 && c(e.url))) {
26
+ const t = f && d && h.read(d);
27
+ t && o.set(f, t);
28
+ }
29
+ return e;
30
+ };
31
+ export {
32
+ E as default
33
+ };
@@ -0,0 +1,19 @@
1
+ function y(t, n) {
2
+ t = t || 10;
3
+ const c = new Array(t), o = new Array(t);
4
+ let e = 0, r = 0, i;
5
+ return n = n !== void 0 ? n : 1e3, function(h) {
6
+ const d = Date.now(), a = o[r];
7
+ i || (i = d), c[e] = h, o[e] = d;
8
+ let f = r, u = 0;
9
+ for (; f !== e; )
10
+ u += c[f++], f = f % t;
11
+ if (e = (e + 1) % t, e === r && (r = (r + 1) % t), d - i < n)
12
+ return;
13
+ const w = a && d - a;
14
+ return w ? Math.round(u * 1e3 / w) : void 0;
15
+ };
16
+ }
17
+ export {
18
+ y as default
19
+ };
@@ -0,0 +1,8 @@
1
+ function u(n) {
2
+ return function(r) {
3
+ return n.apply(null, r);
4
+ };
5
+ }
6
+ export {
7
+ u as default
8
+ };
@@ -0,0 +1,15 @@
1
+ function h(r, a) {
2
+ let s = 0, u = 1e3 / a, e, t;
3
+ const n = (l, o = Date.now()) => {
4
+ s = o, e = null, t && (clearTimeout(t), t = null), r(...l);
5
+ };
6
+ return [(...l) => {
7
+ const o = Date.now(), i = o - s;
8
+ i >= u ? n(l, o) : (e = l, t || (t = setTimeout(() => {
9
+ t = null, n(e);
10
+ }, u - i)));
11
+ }, () => e && n(e)];
12
+ }
13
+ export {
14
+ h as default
15
+ };
@@ -0,0 +1,85 @@
1
+ import t from "../utils.js";
2
+ import E from "../core/AxiosError.js";
3
+ function B(i) {
4
+ return t.isPlainObject(i) || t.isArray(i);
5
+ }
6
+ function h(i) {
7
+ return t.endsWith(i, "[]") ? i.slice(0, -2) : i;
8
+ }
9
+ function O(i, e, s) {
10
+ return i ? i.concat(e).map(function(o, d) {
11
+ return o = h(o), !s && d ? "[" + o + "]" : o;
12
+ }).join(s ? "." : "") : e;
13
+ }
14
+ function T(i) {
15
+ return t.isArray(i) && !i.some(B);
16
+ }
17
+ const S = t.toFlatObject(t, {}, null, function(e) {
18
+ return /^is[A-Z]/.test(e);
19
+ });
20
+ function W(i, e, s) {
21
+ if (!t.isObject(i))
22
+ throw new TypeError("target must be an object");
23
+ e = e || new FormData(), s = t.toFlatObject(s, {
24
+ metaTokens: !0,
25
+ dots: !1,
26
+ indexes: !1
27
+ }, !1, function(n, u) {
28
+ return !t.isUndefined(u[n]);
29
+ });
30
+ const p = s.metaTokens, o = s.visitor || j, d = s.dots, m = s.indexes, w = (s.Blob || typeof Blob < "u" && Blob) && t.isSpecCompliantForm(e);
31
+ if (!t.isFunction(o))
32
+ throw new TypeError("visitor must be a function");
33
+ function l(r) {
34
+ if (r === null) return "";
35
+ if (t.isDate(r))
36
+ return r.toISOString();
37
+ if (t.isBoolean(r))
38
+ return r.toString();
39
+ if (!w && t.isBlob(r))
40
+ throw new E("Blob is not supported. Use a Buffer instead.");
41
+ return t.isArrayBuffer(r) || t.isTypedArray(r) ? w && typeof Blob == "function" ? new Blob([r]) : Buffer.from(r) : r;
42
+ }
43
+ function j(r, n, u) {
44
+ let f = r;
45
+ if (r && !u && typeof r == "object") {
46
+ if (t.endsWith(n, "{}"))
47
+ n = p ? n : n.slice(0, -2), r = JSON.stringify(r);
48
+ else if (t.isArray(r) && T(r) || (t.isFileList(r) || t.endsWith(n, "[]")) && (f = t.toArray(r)))
49
+ return n = h(n), f.forEach(function(b, x) {
50
+ !(t.isUndefined(b) || b === null) && e.append(
51
+ // eslint-disable-next-line no-nested-ternary
52
+ m === !0 ? O([n], x, d) : m === null ? n : n + "[]",
53
+ l(b)
54
+ );
55
+ }), !1;
56
+ }
57
+ return B(r) ? !0 : (e.append(O(u, n, d), l(r)), !1);
58
+ }
59
+ const a = [], F = Object.assign(S, {
60
+ defaultVisitor: j,
61
+ convertValue: l,
62
+ isVisitable: B
63
+ });
64
+ function A(r, n) {
65
+ if (!t.isUndefined(r)) {
66
+ if (a.indexOf(r) !== -1)
67
+ throw Error("Circular reference detected in " + n.join("."));
68
+ a.push(r), t.forEach(r, function(f, c) {
69
+ (!(t.isUndefined(f) || f === null) && o.call(
70
+ e,
71
+ f,
72
+ t.isString(c) ? c.trim() : c,
73
+ n,
74
+ F
75
+ )) === !0 && A(f, n ? n.concat(c) : [c]);
76
+ }), a.pop();
77
+ }
78
+ }
79
+ if (!t.isObject(i))
80
+ throw new TypeError("data must be an object");
81
+ return A(i), e;
82
+ }
83
+ export {
84
+ W as default
85
+ };
@@ -0,0 +1,14 @@
1
+ import s from "../utils.js";
2
+ import f from "./toFormData.js";
3
+ import r from "../platform/index.js";
4
+ function d(o, i) {
5
+ return f(o, new r.classes.URLSearchParams(), {
6
+ visitor: function(t, a, n, e) {
7
+ return r.isNode && s.isBuffer(t) ? (this.append(a, t.toString("base64")), !1) : e.defaultVisitor.apply(this, arguments);
8
+ },
9
+ ...i
10
+ });
11
+ }
12
+ export {
13
+ d as default
14
+ };