@hashgraphonline/standards-sdk 0.0.100 → 0.0.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/standards-sdk.es100.js +63 -14
- package/dist/es/standards-sdk.es100.js.map +1 -1
- package/dist/es/standards-sdk.es101.js +6 -5
- package/dist/es/standards-sdk.es101.js.map +1 -1
- package/dist/es/standards-sdk.es102.js +15 -39
- package/dist/es/standards-sdk.es102.js.map +1 -1
- package/dist/es/standards-sdk.es103.js +6 -39
- package/dist/es/standards-sdk.es103.js.map +1 -1
- package/dist/es/standards-sdk.es104.js +43 -35
- package/dist/es/standards-sdk.es104.js.map +1 -1
- package/dist/es/standards-sdk.es105.js +2 -78
- package/dist/es/standards-sdk.es105.js.map +1 -1
- package/dist/es/standards-sdk.es106.js +136 -3
- package/dist/es/standards-sdk.es106.js.map +1 -1
- package/dist/es/standards-sdk.es107.js +172 -2
- package/dist/es/standards-sdk.es107.js.map +1 -1
- package/dist/es/standards-sdk.es108.js +13 -2
- package/dist/es/standards-sdk.es108.js.map +1 -1
- package/dist/es/standards-sdk.es109.js +13 -21
- package/dist/es/standards-sdk.es109.js.map +1 -1
- package/dist/es/standards-sdk.es110.js +30 -25
- package/dist/es/standards-sdk.es110.js.map +1 -1
- package/dist/es/standards-sdk.es111.js +14 -25
- package/dist/es/standards-sdk.es111.js.map +1 -1
- package/dist/es/standards-sdk.es112.js +3 -37
- package/dist/es/standards-sdk.es112.js.map +1 -1
- package/dist/es/standards-sdk.es113.js +3 -33
- package/dist/es/standards-sdk.es113.js.map +1 -1
- package/dist/es/standards-sdk.es114.js +15 -32
- package/dist/es/standards-sdk.es114.js.map +1 -1
- package/dist/es/standards-sdk.es115.js +5 -9
- package/dist/es/standards-sdk.es115.js.map +1 -1
- package/dist/es/standards-sdk.es116.js +39 -34
- package/dist/es/standards-sdk.es116.js.map +1 -1
- package/dist/es/standards-sdk.es117.js +37 -98
- package/dist/es/standards-sdk.es117.js.map +1 -1
- package/dist/es/standards-sdk.es118.js +37 -2
- package/dist/es/standards-sdk.es118.js.map +1 -1
- package/dist/es/standards-sdk.es119.js +78 -16
- package/dist/es/standards-sdk.es119.js.map +1 -1
- package/dist/es/standards-sdk.es120.js +3 -409
- package/dist/es/standards-sdk.es120.js.map +1 -1
- package/dist/es/standards-sdk.es121.js +2 -2282
- package/dist/es/standards-sdk.es121.js.map +1 -1
- package/dist/es/standards-sdk.es122.js +2 -10
- package/dist/es/standards-sdk.es122.js.map +1 -1
- package/dist/es/standards-sdk.es123.js +33 -10
- package/dist/es/standards-sdk.es123.js.map +1 -1
- package/dist/es/standards-sdk.es124.js +31 -16
- package/dist/es/standards-sdk.es124.js.map +1 -1
- package/dist/es/standards-sdk.es125.js +9 -6
- package/dist/es/standards-sdk.es125.js.map +1 -1
- package/dist/es/standards-sdk.es126.js +34 -9
- package/dist/es/standards-sdk.es126.js.map +1 -1
- package/dist/es/standards-sdk.es13.js +3 -3
- package/dist/es/standards-sdk.es15.js +1 -1
- package/dist/es/standards-sdk.es18.js +2 -2
- package/dist/es/standards-sdk.es19.js +83 -18
- package/dist/es/standards-sdk.es19.js.map +1 -1
- package/dist/es/standards-sdk.es20.js +2 -2
- package/dist/es/standards-sdk.es21.js +3 -3
- package/dist/es/standards-sdk.es24.js +10 -10
- package/dist/es/standards-sdk.es25.js +1769 -5
- package/dist/es/standards-sdk.es25.js.map +1 -1
- package/dist/es/standards-sdk.es26.js +3 -36
- package/dist/es/standards-sdk.es26.js.map +1 -1
- package/dist/es/standards-sdk.es27.js +4168 -48
- package/dist/es/standards-sdk.es27.js.map +1 -1
- package/dist/es/standards-sdk.es28.js +5543 -122
- package/dist/es/standards-sdk.es28.js.map +1 -1
- package/dist/es/standards-sdk.es29.js +8 -9
- package/dist/es/standards-sdk.es29.js.map +1 -1
- package/dist/es/standards-sdk.es30.js +2 -7190
- package/dist/es/standards-sdk.es30.js.map +1 -1
- package/dist/es/standards-sdk.es31.js +36 -3
- package/dist/es/standards-sdk.es31.js.map +1 -1
- package/dist/es/standards-sdk.es32.js +47 -8
- package/dist/es/standards-sdk.es32.js.map +1 -1
- package/dist/es/standards-sdk.es33.js +5 -2
- package/dist/es/standards-sdk.es33.js.map +1 -1
- package/dist/es/standards-sdk.es34.js +8 -4166
- package/dist/es/standards-sdk.es34.js.map +1 -1
- package/dist/es/standards-sdk.es35.js +87 -405
- package/dist/es/standards-sdk.es35.js.map +1 -1
- package/dist/es/standards-sdk.es36.js +2 -2
- package/dist/es/standards-sdk.es37.js +15 -119
- package/dist/es/standards-sdk.es37.js.map +1 -1
- package/dist/es/standards-sdk.es38.js +398 -353
- package/dist/es/standards-sdk.es38.js.map +1 -1
- package/dist/es/standards-sdk.es39.js +2 -6
- package/dist/es/standards-sdk.es39.js.map +1 -1
- package/dist/es/standards-sdk.es40.js +2282 -179
- package/dist/es/standards-sdk.es40.js.map +1 -1
- package/dist/es/standards-sdk.es41.js +153 -70
- package/dist/es/standards-sdk.es41.js.map +1 -1
- package/dist/es/standards-sdk.es42.js +78 -108
- package/dist/es/standards-sdk.es42.js.map +1 -1
- package/dist/es/standards-sdk.es43.js +21 -50
- package/dist/es/standards-sdk.es43.js.map +1 -1
- package/dist/es/standards-sdk.es44.js +148 -10
- package/dist/es/standards-sdk.es44.js.map +1 -1
- package/dist/es/standards-sdk.es45.js +81 -87
- package/dist/es/standards-sdk.es45.js.map +1 -1
- package/dist/es/standards-sdk.es46.js +194 -3
- package/dist/es/standards-sdk.es46.js.map +1 -1
- package/dist/es/standards-sdk.es47.js +438 -2
- package/dist/es/standards-sdk.es47.js.map +1 -1
- package/dist/es/standards-sdk.es48.js +19 -107
- package/dist/es/standards-sdk.es48.js.map +1 -1
- package/dist/es/standards-sdk.es49.js +135 -70
- package/dist/es/standards-sdk.es49.js.map +1 -1
- package/dist/es/standards-sdk.es5.js +1 -1
- package/dist/es/standards-sdk.es50.js +17 -5
- package/dist/es/standards-sdk.es50.js.map +1 -1
- package/dist/es/standards-sdk.es51.js +28 -4
- package/dist/es/standards-sdk.es51.js.map +1 -1
- package/dist/es/standards-sdk.es52.js +27 -219
- package/dist/es/standards-sdk.es52.js.map +1 -1
- package/dist/es/standards-sdk.es53.js +19 -56
- package/dist/es/standards-sdk.es53.js.map +1 -1
- package/dist/es/standards-sdk.es54.js +44 -69
- package/dist/es/standards-sdk.es54.js.map +1 -1
- package/dist/es/standards-sdk.es55.js +18 -2
- package/dist/es/standards-sdk.es55.js.map +1 -1
- package/dist/es/standards-sdk.es56.js +61 -3
- package/dist/es/standards-sdk.es56.js.map +1 -1
- package/dist/es/standards-sdk.es57.js +1260 -135
- package/dist/es/standards-sdk.es57.js.map +1 -1
- package/dist/es/standards-sdk.es58.js +28 -28
- package/dist/es/standards-sdk.es58.js.map +1 -1
- package/dist/es/standards-sdk.es59.js +5 -62
- package/dist/es/standards-sdk.es59.js.map +1 -1
- package/dist/es/standards-sdk.es60.js +156 -47
- package/dist/es/standards-sdk.es60.js.map +1 -1
- package/dist/es/standards-sdk.es61.js +792 -9
- package/dist/es/standards-sdk.es61.js.map +1 -1
- package/dist/es/standards-sdk.es62.js +166 -57
- package/dist/es/standards-sdk.es62.js.map +1 -1
- package/dist/es/standards-sdk.es63.js +143 -6
- package/dist/es/standards-sdk.es63.js.map +1 -1
- package/dist/es/standards-sdk.es64.js +20 -14
- package/dist/es/standards-sdk.es64.js.map +1 -1
- package/dist/es/standards-sdk.es65.js +27 -7
- package/dist/es/standards-sdk.es65.js.map +1 -1
- package/dist/es/standards-sdk.es66.js +26 -45
- package/dist/es/standards-sdk.es66.js.map +1 -1
- package/dist/es/standards-sdk.es67.js +38 -2
- package/dist/es/standards-sdk.es67.js.map +1 -1
- package/dist/es/standards-sdk.es68.js +3 -136
- package/dist/es/standards-sdk.es68.js.map +1 -1
- package/dist/es/standards-sdk.es69.js +4 -172
- package/dist/es/standards-sdk.es69.js.map +1 -1
- package/dist/es/standards-sdk.es7.js +4 -4
- package/dist/es/standards-sdk.es70.js +7133 -1
- package/dist/es/standards-sdk.es70.js.map +1 -1
- package/dist/es/standards-sdk.es71.js +10 -13
- package/dist/es/standards-sdk.es71.js.map +1 -1
- package/dist/es/standards-sdk.es72.js +11 -13
- package/dist/es/standards-sdk.es72.js.map +1 -1
- package/dist/es/standards-sdk.es73.js +14 -7132
- package/dist/es/standards-sdk.es73.js.map +1 -1
- package/dist/es/standards-sdk.es74.js +4 -193
- package/dist/es/standards-sdk.es74.js.map +1 -1
- package/dist/es/standards-sdk.es75.js +8 -437
- package/dist/es/standards-sdk.es75.js.map +1 -1
- package/dist/es/standards-sdk.es76.js +415 -21
- package/dist/es/standards-sdk.es76.js.map +1 -1
- package/dist/es/standards-sdk.es77.js +2 -139
- package/dist/es/standards-sdk.es77.js.map +1 -1
- package/dist/es/standards-sdk.es78.js +117 -15
- package/dist/es/standards-sdk.es78.js.map +1 -1
- package/dist/es/standards-sdk.es79.js +356 -21
- package/dist/es/standards-sdk.es79.js.map +1 -1
- package/dist/es/standards-sdk.es8.js +3 -3
- package/dist/es/standards-sdk.es80.js +5 -28
- package/dist/es/standards-sdk.es80.js.map +1 -1
- package/dist/es/standards-sdk.es81.js +173 -15
- package/dist/es/standards-sdk.es81.js.map +1 -1
- package/dist/es/standards-sdk.es82.js +74 -37
- package/dist/es/standards-sdk.es82.js.map +1 -1
- package/dist/es/standards-sdk.es83.js +112 -16
- package/dist/es/standards-sdk.es83.js.map +1 -1
- package/dist/es/standards-sdk.es84.js +47 -56
- package/dist/es/standards-sdk.es84.js.map +1 -1
- package/dist/es/standards-sdk.es85.js +9 -1288
- package/dist/es/standards-sdk.es85.js.map +1 -1
- package/dist/es/standards-sdk.es86.js +83 -134
- package/dist/es/standards-sdk.es86.js.map +1 -1
- package/dist/es/standards-sdk.es87.js +3 -90
- package/dist/es/standards-sdk.es87.js.map +1 -1
- package/dist/es/standards-sdk.es88.js +2 -84
- package/dist/es/standards-sdk.es88.js.map +1 -1
- package/dist/es/standards-sdk.es89.js +108 -27
- package/dist/es/standards-sdk.es89.js.map +1 -1
- package/dist/es/standards-sdk.es9.js +1 -1
- package/dist/es/standards-sdk.es90.js +73 -5
- package/dist/es/standards-sdk.es90.js.map +1 -1
- package/dist/es/standards-sdk.es91.js +5 -158
- package/dist/es/standards-sdk.es91.js.map +1 -1
- package/dist/es/standards-sdk.es92.js +4 -22
- package/dist/es/standards-sdk.es92.js.map +1 -1
- package/dist/es/standards-sdk.es93.js +206 -778
- package/dist/es/standards-sdk.es93.js.map +1 -1
- package/dist/es/standards-sdk.es94.js +55 -171
- package/dist/es/standards-sdk.es94.js.map +1 -1
- package/dist/es/standards-sdk.es95.js +68 -142
- package/dist/es/standards-sdk.es95.js.map +1 -1
- package/dist/es/standards-sdk.es96.js +30 -30
- package/dist/es/standards-sdk.es96.js.map +1 -1
- package/dist/es/standards-sdk.es97.js +62 -14
- package/dist/es/standards-sdk.es97.js.map +1 -1
- package/dist/es/standards-sdk.es98.js +49 -3
- package/dist/es/standards-sdk.es98.js.map +1 -1
- package/dist/es/standards-sdk.es99.js +9 -3
- package/dist/es/standards-sdk.es99.js.map +1 -1
- package/dist/es/utils/transaction-parser.d.ts +27 -0
- package/dist/es/utils/transaction-parser.d.ts.map +1 -1
- package/dist/umd/standards-sdk.umd.js +12 -12
- package/dist/umd/standards-sdk.umd.js.map +1 -1
- package/dist/umd/utils/transaction-parser.d.ts +27 -0
- package/dist/umd/utils/transaction-parser.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,175 @@
|
|
|
1
|
-
|
|
1
|
+
import platform from "./standards-sdk.es103.js";
|
|
2
|
+
import utils from "./standards-sdk.es79.js";
|
|
3
|
+
import AxiosError from "./standards-sdk.es90.js";
|
|
4
|
+
import composeSignals from "./standards-sdk.es118.js";
|
|
5
|
+
import { trackStream } from "./standards-sdk.es119.js";
|
|
6
|
+
import AxiosHeaders from "./standards-sdk.es93.js";
|
|
7
|
+
import { progressEventDecorator, progressEventReducer, asyncDecorator } from "./standards-sdk.es116.js";
|
|
8
|
+
import resolveConfig from "./standards-sdk.es117.js";
|
|
9
|
+
import settle from "./standards-sdk.es114.js";
|
|
10
|
+
const isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
|
|
11
|
+
const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
|
|
12
|
+
const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
|
|
13
|
+
const test = (fn, ...args) => {
|
|
14
|
+
try {
|
|
15
|
+
return !!fn(...args);
|
|
16
|
+
} catch (e) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const supportsRequestStream = isReadableStreamSupported && test(() => {
|
|
21
|
+
let duplexAccessed = false;
|
|
22
|
+
const hasContentType = new Request(platform.origin, {
|
|
23
|
+
body: new ReadableStream(),
|
|
24
|
+
method: "POST",
|
|
25
|
+
get duplex() {
|
|
26
|
+
duplexAccessed = true;
|
|
27
|
+
return "half";
|
|
28
|
+
}
|
|
29
|
+
}).headers.has("Content-Type");
|
|
30
|
+
return duplexAccessed && !hasContentType;
|
|
31
|
+
});
|
|
32
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
33
|
+
const supportsResponseStream = isReadableStreamSupported && test(() => utils.isReadableStream(new Response("").body));
|
|
34
|
+
const resolvers = {
|
|
35
|
+
stream: supportsResponseStream && ((res) => res.body)
|
|
36
|
+
};
|
|
37
|
+
isFetchSupported && ((res) => {
|
|
38
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
|
|
39
|
+
!resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
|
|
40
|
+
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
})(new Response());
|
|
44
|
+
const getBodyLength = async (body) => {
|
|
45
|
+
if (body == null) {
|
|
46
|
+
return 0;
|
|
47
|
+
}
|
|
48
|
+
if (utils.isBlob(body)) {
|
|
49
|
+
return body.size;
|
|
50
|
+
}
|
|
51
|
+
if (utils.isSpecCompliantForm(body)) {
|
|
52
|
+
const _request = new Request(platform.origin, {
|
|
53
|
+
method: "POST",
|
|
54
|
+
body
|
|
55
|
+
});
|
|
56
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
57
|
+
}
|
|
58
|
+
if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {
|
|
59
|
+
return body.byteLength;
|
|
60
|
+
}
|
|
61
|
+
if (utils.isURLSearchParams(body)) {
|
|
62
|
+
body = body + "";
|
|
63
|
+
}
|
|
64
|
+
if (utils.isString(body)) {
|
|
65
|
+
return (await encodeText(body)).byteLength;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const resolveBodyLength = async (headers, body) => {
|
|
69
|
+
const length = utils.toFiniteNumber(headers.getContentLength());
|
|
70
|
+
return length == null ? getBodyLength(body) : length;
|
|
71
|
+
};
|
|
72
|
+
const fetchAdapter = isFetchSupported && (async (config) => {
|
|
73
|
+
let {
|
|
74
|
+
url,
|
|
75
|
+
method,
|
|
76
|
+
data,
|
|
77
|
+
signal,
|
|
78
|
+
cancelToken,
|
|
79
|
+
timeout,
|
|
80
|
+
onDownloadProgress,
|
|
81
|
+
onUploadProgress,
|
|
82
|
+
responseType,
|
|
83
|
+
headers,
|
|
84
|
+
withCredentials = "same-origin",
|
|
85
|
+
fetchOptions
|
|
86
|
+
} = resolveConfig(config);
|
|
87
|
+
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
88
|
+
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
89
|
+
let request;
|
|
90
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
91
|
+
composedSignal.unsubscribe();
|
|
92
|
+
});
|
|
93
|
+
let requestContentLength;
|
|
94
|
+
try {
|
|
95
|
+
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
96
|
+
let _request = new Request(url, {
|
|
97
|
+
method: "POST",
|
|
98
|
+
body: data,
|
|
99
|
+
duplex: "half"
|
|
100
|
+
});
|
|
101
|
+
let contentTypeHeader;
|
|
102
|
+
if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
103
|
+
headers.setContentType(contentTypeHeader);
|
|
104
|
+
}
|
|
105
|
+
if (_request.body) {
|
|
106
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
107
|
+
requestContentLength,
|
|
108
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
109
|
+
);
|
|
110
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (!utils.isString(withCredentials)) {
|
|
114
|
+
withCredentials = withCredentials ? "include" : "omit";
|
|
115
|
+
}
|
|
116
|
+
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
117
|
+
request = new Request(url, {
|
|
118
|
+
...fetchOptions,
|
|
119
|
+
signal: composedSignal,
|
|
120
|
+
method: method.toUpperCase(),
|
|
121
|
+
headers: headers.normalize().toJSON(),
|
|
122
|
+
body: data,
|
|
123
|
+
duplex: "half",
|
|
124
|
+
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
125
|
+
});
|
|
126
|
+
let response = await fetch(request);
|
|
127
|
+
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
128
|
+
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
129
|
+
const options = {};
|
|
130
|
+
["status", "statusText", "headers"].forEach((prop) => {
|
|
131
|
+
options[prop] = response[prop];
|
|
132
|
+
});
|
|
133
|
+
const responseContentLength = utils.toFiniteNumber(response.headers.get("content-length"));
|
|
134
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
135
|
+
responseContentLength,
|
|
136
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
137
|
+
) || [];
|
|
138
|
+
response = new Response(
|
|
139
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
140
|
+
flush && flush();
|
|
141
|
+
unsubscribe && unsubscribe();
|
|
142
|
+
}),
|
|
143
|
+
options
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
responseType = responseType || "text";
|
|
147
|
+
let responseData = await resolvers[utils.findKey(resolvers, responseType) || "text"](response, config);
|
|
148
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
149
|
+
return await new Promise((resolve, reject) => {
|
|
150
|
+
settle(resolve, reject, {
|
|
151
|
+
data: responseData,
|
|
152
|
+
headers: AxiosHeaders.from(response.headers),
|
|
153
|
+
status: response.status,
|
|
154
|
+
statusText: response.statusText,
|
|
155
|
+
config,
|
|
156
|
+
request
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
} catch (err) {
|
|
160
|
+
unsubscribe && unsubscribe();
|
|
161
|
+
if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
|
|
162
|
+
throw Object.assign(
|
|
163
|
+
new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request),
|
|
164
|
+
{
|
|
165
|
+
cause: err.cause || err
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
throw AxiosError.from(err, err && err.code, config, request);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
2
172
|
export {
|
|
3
|
-
|
|
173
|
+
fetchAdapter as default
|
|
4
174
|
};
|
|
5
175
|
//# sourceMappingURL=standards-sdk.es107.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es107.js","sources":["../../node_modules/axios/lib/platform/browser/classes/FormData.js"],"sourcesContent":["'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n"],"names":[],"mappings":"AAEA,MAAA,aAAe,OAAO,aAAa,cAAc,WAAW;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"standards-sdk.es107.js","sources":["../../node_modules/axios/lib/adapters/fetch.js"],"sourcesContent":["import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n })\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils.isBlob(body)) {\n return body.size;\n }\n\n if(utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader)\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n })\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\n\n"],"names":["res"],"mappings":";;;;;;;;;AAUA,MAAM,mBAAmB,OAAO,UAAU,cAAc,OAAO,YAAY,cAAc,OAAO,aAAa;AAC7G,MAAM,4BAA4B,oBAAoB,OAAO,mBAAmB;AAGhF,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AAI;AAAA,QACb,YAAY,SAAS,MAAM,oBAAoB,YAAY,MAAM;AAC/D,mBAAS,MAAO;AAChB,yBAAe,YAAa;AAAA,QACtC,CAAS;AAAA,QACD;AAAA,MACD;AAAA,IACP;AAEI,mBAAe,gBAAgB;AAE/B,QAAI,eAAe,MAAM,UAAU,MAAM,QAAQ,WAAW,YAAY,KAAK,MAAM,EAAE,UAAU,MAAM;AAErG,KAAC,oBAAoB,eAAe,YAAa;AAEjD,WAAO,MAAM,IAAI,QAAQ,CAAC,SAAS,WAAW;AAC5C,aAAO,SAAS,QAAQ;AAAA,QACtB,MAAM;AAAA,QACN,SAAS,aAAa,KAAK,SAAS,OAAO;AAAA,QAC3C,QAAQ,SAAS;AAAA,QACjB,YAAY,SAAS;AAAA,QACrB;AAAA,QACA;AAAA,MACD,CAAA;AAAA,IACF,CAAA;AAAA,EACF,SAAQ,KAAK;AACZ,mBAAe,YAAa;AAE5B,QAAI,OAAO,IAAI,SAAS,eAAe,SAAS,KAAK,IAAI,OAAO,GAAG;AACjE,YAAM,OAAO;AAAA,QACX,IAAI,WAAW,iBAAiB,WAAW,aAAa,QAAQ,OAAO;AAAA,QACvE;AAAA,UACE,OAAO,IAAI,SAAS;AAAA,QAC9B;AAAA,MACA;AAAA,IACA;AAEI,UAAM,WAAW,KAAK,KAAK,OAAO,IAAI,MAAM,QAAQ,OAAO;AAAA,EAC/D;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import URLSearchParams from "./standards-sdk.es120.js";
|
|
2
|
+
import FormData from "./standards-sdk.es121.js";
|
|
3
|
+
import Blob from "./standards-sdk.es122.js";
|
|
4
|
+
const platform = {
|
|
5
|
+
isBrowser: true,
|
|
6
|
+
classes: {
|
|
7
|
+
URLSearchParams,
|
|
8
|
+
FormData,
|
|
9
|
+
Blob
|
|
10
|
+
},
|
|
11
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
12
|
+
};
|
|
2
13
|
export {
|
|
3
|
-
|
|
14
|
+
platform as default
|
|
4
15
|
};
|
|
5
16
|
//# sourceMappingURL=standards-sdk.es108.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es108.js","sources":["../../node_modules/axios/lib/platform/browser/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es108.js","sources":["../../node_modules/axios/lib/platform/browser/index.js"],"sourcesContent":["import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n"],"names":[],"mappings":";;;AAIA,MAAe,WAAA;AAAA,EACb,WAAW;AAAA,EACX,SAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACD,WAAW,CAAC,QAAQ,SAAS,QAAQ,QAAQ,OAAO,MAAM;AAC5D;","x_google_ignoreList":[0]}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
this.coder = coder;
|
|
10
|
-
}
|
|
11
|
-
defaultValue() {
|
|
12
|
-
return this.coder.defaultValue();
|
|
13
|
-
}
|
|
14
|
-
encode(writer, value) {
|
|
15
|
-
return this.coder.encode(writer, value);
|
|
16
|
-
}
|
|
17
|
-
decode(reader) {
|
|
18
|
-
return this.coder.decode(reader);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
2
|
+
const _navigator = typeof navigator === "object" && navigator || void 0;
|
|
3
|
+
const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
|
|
4
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
5
|
+
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
|
6
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
7
|
+
})();
|
|
8
|
+
const origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
21
9
|
export {
|
|
22
|
-
|
|
10
|
+
hasBrowserEnv,
|
|
11
|
+
hasStandardBrowserEnv,
|
|
12
|
+
hasStandardBrowserWebWorkerEnv,
|
|
13
|
+
_navigator as navigator,
|
|
14
|
+
origin
|
|
23
15
|
};
|
|
24
16
|
//# sourceMappingURL=standards-sdk.es109.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es109.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es109.js","sources":["../../node_modules/axios/lib/platform/common/utils.js"],"sourcesContent":["const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin\n}\n"],"names":[],"mappings":"AAAK,MAAC,gBAAgB,OAAO,WAAW,eAAe,OAAO,aAAa;AAEtE,MAAC,aAAa,OAAO,cAAc,YAAY,aAAa;AAmB5D,MAAC,wBAAwB,kBAC3B,CAAC,cAAc,CAAC,eAAe,gBAAgB,IAAI,EAAE,QAAQ,WAAW,OAAO,IAAI;AAWjF,MAAC,kCAAkC,MAAM;AAC5C,SACE,OAAO,sBAAsB;AAAA,EAE7B,gBAAgB,qBAChB,OAAO,KAAK,kBAAkB;AAElC,GAAC;AAEI,MAAC,SAAS,iBAAiB,OAAO,SAAS,QAAQ;","x_google_ignoreList":[0]}
|
|
@@ -1,30 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import toFormData from "./standards-sdk.es89.js";
|
|
2
|
+
function encode(str) {
|
|
3
|
+
const charMap = {
|
|
4
|
+
"!": "%21",
|
|
5
|
+
"'": "%27",
|
|
6
|
+
"(": "%28",
|
|
7
|
+
")": "%29",
|
|
8
|
+
"~": "%7E",
|
|
9
|
+
"%20": "+",
|
|
10
|
+
"%00": "\0"
|
|
11
|
+
};
|
|
12
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
13
|
+
return charMap[match];
|
|
14
|
+
});
|
|
4
15
|
}
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (lengths.length > 0 && !lengths.includes(b.length))
|
|
9
|
-
throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);
|
|
10
|
-
}
|
|
11
|
-
function exists(instance, checkFinished = true) {
|
|
12
|
-
if (instance.destroyed)
|
|
13
|
-
throw new Error("Hash instance has been destroyed");
|
|
14
|
-
if (checkFinished && instance.finished)
|
|
15
|
-
throw new Error("Hash#digest() has already been called");
|
|
16
|
-
}
|
|
17
|
-
function output(out, instance) {
|
|
18
|
-
bytes(out);
|
|
19
|
-
const min = instance.outputLen;
|
|
20
|
-
if (out.length < min) {
|
|
21
|
-
throw new Error(`digestInto() expects output buffer of length at least ${min}`);
|
|
22
|
-
}
|
|
16
|
+
function AxiosURLSearchParams(params, options) {
|
|
17
|
+
this._pairs = [];
|
|
18
|
+
params && toFormData(params, this, options);
|
|
23
19
|
}
|
|
20
|
+
const prototype = AxiosURLSearchParams.prototype;
|
|
21
|
+
prototype.append = function append(name, value) {
|
|
22
|
+
this._pairs.push([name, value]);
|
|
23
|
+
};
|
|
24
|
+
prototype.toString = function toString(encoder) {
|
|
25
|
+
const _encode = encoder ? function(value) {
|
|
26
|
+
return encoder.call(this, value, encode);
|
|
27
|
+
} : encode;
|
|
28
|
+
return this._pairs.map(function each(pair) {
|
|
29
|
+
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
30
|
+
}, "").join("&");
|
|
31
|
+
};
|
|
24
32
|
export {
|
|
25
|
-
|
|
26
|
-
exists,
|
|
27
|
-
number,
|
|
28
|
-
output
|
|
33
|
+
AxiosURLSearchParams as default
|
|
29
34
|
};
|
|
30
35
|
//# sourceMappingURL=standards-sdk.es110.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es110.js","sources":["../../node_modules
|
|
1
|
+
{"version":3,"file":"standards-sdk.es110.js","sources":["../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js"],"sourcesContent":["'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n"],"names":[],"mappings":";AAYA,SAAS,OAAO,KAAK;AACnB,QAAM,UAAU;AAAA,IACd,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,EACR;AACD,SAAO,mBAAmB,GAAG,EAAE,QAAQ,oBAAoB,SAAS,SAAS,OAAO;AAClF,WAAO,QAAQ,KAAK;AAAA,EACxB,CAAG;AACH;AAUA,SAAS,qBAAqB,QAAQ,SAAS;AAC7C,OAAK,SAAS,CAAE;AAEhB,YAAU,WAAW,QAAQ,MAAM,OAAO;AAC5C;AAEA,MAAM,YAAY,qBAAqB;AAEvC,UAAU,SAAS,SAAS,OAAO,MAAM,OAAO;AAC9C,OAAK,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAChC;AAEA,UAAU,WAAW,SAAS,SAAS,SAAS;AAC9C,QAAM,UAAU,UAAU,SAAS,OAAO;AACxC,WAAO,QAAQ,KAAK,MAAM,OAAO,MAAM;AAAA,EAC3C,IAAM;AAEJ,SAAO,KAAK,OAAO,IAAI,SAAS,KAAK,MAAM;AACzC,WAAO,QAAQ,KAAK,CAAC,CAAC,IAAI,MAAM,QAAQ,KAAK,CAAC,CAAC;AAAA,EACnD,GAAK,EAAE,EAAE,KAAK,GAAG;AACjB;","x_google_ignoreList":[0]}
|
|
@@ -1,29 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import utils from "./standards-sdk.es79.js";
|
|
2
|
+
import defaults from "./standards-sdk.es83.js";
|
|
3
|
+
import AxiosHeaders from "./standards-sdk.es93.js";
|
|
4
|
+
function transformData(fns, response) {
|
|
5
|
+
const config = this || defaults;
|
|
6
|
+
const context = response || config;
|
|
7
|
+
const headers = AxiosHeaders.from(context.headers);
|
|
8
|
+
let data = context.data;
|
|
9
|
+
utils.forEach(fns, function transform(fn) {
|
|
10
|
+
data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
|
|
11
|
+
});
|
|
12
|
+
headers.normalize();
|
|
13
|
+
return data;
|
|
7
14
|
}
|
|
8
|
-
function split(lst, le = false) {
|
|
9
|
-
let Ah = new Uint32Array(lst.length);
|
|
10
|
-
let Al = new Uint32Array(lst.length);
|
|
11
|
-
for (let i = 0; i < lst.length; i++) {
|
|
12
|
-
const { h, l } = fromBig(lst[i], le);
|
|
13
|
-
[Ah[i], Al[i]] = [h, l];
|
|
14
|
-
}
|
|
15
|
-
return [Ah, Al];
|
|
16
|
-
}
|
|
17
|
-
const rotlSH = (h, l, s) => h << s | l >>> 32 - s;
|
|
18
|
-
const rotlSL = (h, l, s) => l << s | h >>> 32 - s;
|
|
19
|
-
const rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
|
|
20
|
-
const rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
|
|
21
15
|
export {
|
|
22
|
-
|
|
23
|
-
rotlBH,
|
|
24
|
-
rotlBL,
|
|
25
|
-
rotlSH,
|
|
26
|
-
rotlSL,
|
|
27
|
-
split
|
|
16
|
+
transformData as default
|
|
28
17
|
};
|
|
29
18
|
//# sourceMappingURL=standards-sdk.es111.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es111.js","sources":["../../node_modules
|
|
1
|
+
{"version":3,"file":"standards-sdk.es111.js","sources":["../../node_modules/axios/lib/core/transformData.js"],"sourcesContent":["'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n"],"names":[],"mappings":";;;AAce,SAAS,cAAc,KAAK,UAAU;AACnD,QAAM,SAAS,QAAQ;AACvB,QAAM,UAAU,YAAY;AAC5B,QAAM,UAAU,aAAa,KAAK,QAAQ,OAAO;AACjD,MAAI,OAAO,QAAQ;AAEnB,QAAM,QAAQ,KAAK,SAAS,UAAU,IAAI;AACxC,WAAO,GAAG,KAAK,QAAQ,MAAM,QAAQ,UAAS,GAAI,WAAW,SAAS,SAAS,MAAS;AAAA,EAC5F,CAAG;AAED,UAAQ,UAAW;AAEnB,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1,41 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
|
4
|
-
const isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
5
|
-
if (!isLE)
|
|
6
|
-
throw new Error("Non little-endian hardware is not supported");
|
|
7
|
-
function utf8ToBytes(str) {
|
|
8
|
-
if (typeof str !== "string")
|
|
9
|
-
throw new Error(`utf8ToBytes expected string, got ${typeof str}`);
|
|
10
|
-
return new Uint8Array(new TextEncoder().encode(str));
|
|
11
|
-
}
|
|
12
|
-
function toBytes(data) {
|
|
13
|
-
if (typeof data === "string")
|
|
14
|
-
data = utf8ToBytes(data);
|
|
15
|
-
if (!u8a(data))
|
|
16
|
-
throw new Error(`expected Uint8Array, got ${typeof data}`);
|
|
17
|
-
return data;
|
|
18
|
-
}
|
|
19
|
-
class Hash {
|
|
20
|
-
// Safe version that clones internal state
|
|
21
|
-
clone() {
|
|
22
|
-
return this._cloneInto();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function wrapConstructor(hashCons) {
|
|
26
|
-
const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
|
|
27
|
-
const tmp = hashCons();
|
|
28
|
-
hashC.outputLen = tmp.outputLen;
|
|
29
|
-
hashC.blockLen = tmp.blockLen;
|
|
30
|
-
hashC.create = () => hashCons();
|
|
31
|
-
return hashC;
|
|
1
|
+
function isAbsoluteURL(url) {
|
|
2
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
32
3
|
}
|
|
33
4
|
export {
|
|
34
|
-
|
|
35
|
-
isLE,
|
|
36
|
-
toBytes,
|
|
37
|
-
u32,
|
|
38
|
-
utf8ToBytes,
|
|
39
|
-
wrapConstructor
|
|
5
|
+
isAbsoluteURL as default
|
|
40
6
|
};
|
|
41
7
|
//# sourceMappingURL=standards-sdk.es112.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es112.js","sources":["../../node_modules
|
|
1
|
+
{"version":3,"file":"standards-sdk.es112.js","sources":["../../node_modules/axios/lib/helpers/isAbsoluteURL.js"],"sourcesContent":["'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n"],"names":[],"mappings":"AASe,SAAS,cAAc,KAAK;AAIzC,SAAO,8BAA8B,KAAK,GAAG;AAC/C;","x_google_ignoreList":[0]}
|
|
@@ -1,37 +1,7 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
const bytes = new Array(samplesCount);
|
|
4
|
-
const timestamps = new Array(samplesCount);
|
|
5
|
-
let head = 0;
|
|
6
|
-
let tail = 0;
|
|
7
|
-
let firstSampleTS;
|
|
8
|
-
min = min !== void 0 ? min : 1e3;
|
|
9
|
-
return function push(chunkLength) {
|
|
10
|
-
const now = Date.now();
|
|
11
|
-
const startedAt = timestamps[tail];
|
|
12
|
-
if (!firstSampleTS) {
|
|
13
|
-
firstSampleTS = now;
|
|
14
|
-
}
|
|
15
|
-
bytes[head] = chunkLength;
|
|
16
|
-
timestamps[head] = now;
|
|
17
|
-
let i = tail;
|
|
18
|
-
let bytesCount = 0;
|
|
19
|
-
while (i !== head) {
|
|
20
|
-
bytesCount += bytes[i++];
|
|
21
|
-
i = i % samplesCount;
|
|
22
|
-
}
|
|
23
|
-
head = (head + 1) % samplesCount;
|
|
24
|
-
if (head === tail) {
|
|
25
|
-
tail = (tail + 1) % samplesCount;
|
|
26
|
-
}
|
|
27
|
-
if (now - firstSampleTS < min) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const passed = startedAt && now - startedAt;
|
|
31
|
-
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
32
|
-
};
|
|
1
|
+
function combineURLs(baseURL, relativeURL) {
|
|
2
|
+
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
33
3
|
}
|
|
34
4
|
export {
|
|
35
|
-
|
|
5
|
+
combineURLs as default
|
|
36
6
|
};
|
|
37
7
|
//# sourceMappingURL=standards-sdk.es113.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es113.js","sources":["../../node_modules/axios/lib/helpers/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es113.js","sources":["../../node_modules/axios/lib/helpers/combineURLs.js"],"sourcesContent":["'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n"],"names":[],"mappings":"AAUe,SAAS,YAAY,SAAS,aAAa;AACxD,SAAO,cACH,QAAQ,QAAQ,UAAU,EAAE,IAAI,MAAM,YAAY,QAAQ,QAAQ,EAAE,IACpE;AACN;","x_google_ignoreList":[0]}
|
|
@@ -1,36 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
const throttled = (...args) => {
|
|
16
|
-
const now = Date.now();
|
|
17
|
-
const passed = now - timestamp;
|
|
18
|
-
if (passed >= threshold) {
|
|
19
|
-
invoke(args, now);
|
|
20
|
-
} else {
|
|
21
|
-
lastArgs = args;
|
|
22
|
-
if (!timer) {
|
|
23
|
-
timer = setTimeout(() => {
|
|
24
|
-
timer = null;
|
|
25
|
-
invoke(lastArgs);
|
|
26
|
-
}, threshold - passed);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const flush = () => lastArgs && invoke(lastArgs);
|
|
31
|
-
return [throttled, flush];
|
|
1
|
+
import AxiosError from "./standards-sdk.es90.js";
|
|
2
|
+
function settle(resolve, reject, response) {
|
|
3
|
+
const validateStatus = response.config.validateStatus;
|
|
4
|
+
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
5
|
+
resolve(response);
|
|
6
|
+
} else {
|
|
7
|
+
reject(new AxiosError(
|
|
8
|
+
"Request failed with status code " + response.status,
|
|
9
|
+
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
10
|
+
response.config,
|
|
11
|
+
response.request,
|
|
12
|
+
response
|
|
13
|
+
));
|
|
14
|
+
}
|
|
32
15
|
}
|
|
33
16
|
export {
|
|
34
|
-
|
|
17
|
+
settle as default
|
|
35
18
|
};
|
|
36
19
|
//# sourceMappingURL=standards-sdk.es114.js.map
|