@hashgraphonline/standards-sdk 0.0.88 → 0.0.89
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/hcs-10/connections-manager.d.ts.map +1 -1
- package/dist/es/standards-sdk.es10.js +2 -2
- package/dist/es/standards-sdk.es10.js.map +1 -1
- package/dist/es/standards-sdk.es104.js +15 -3
- package/dist/es/standards-sdk.es104.js.map +1 -1
- package/dist/es/standards-sdk.es105.js +4 -15
- package/dist/es/standards-sdk.es105.js.map +1 -1
- package/dist/es/standards-sdk.es106.js +39 -5
- package/dist/es/standards-sdk.es106.js.map +1 -1
- package/dist/es/standards-sdk.es107.js +38 -37
- package/dist/es/standards-sdk.es107.js.map +1 -1
- package/dist/es/standards-sdk.es108.js +33 -36
- package/dist/es/standards-sdk.es108.js.map +1 -1
- package/dist/es/standards-sdk.es109.js +75 -34
- package/dist/es/standards-sdk.es109.js.map +1 -1
- package/dist/es/standards-sdk.es110.js +4 -78
- package/dist/es/standards-sdk.es110.js.map +1 -1
- package/dist/es/standards-sdk.es111.js +34 -3
- package/dist/es/standards-sdk.es111.js.map +1 -1
- package/dist/es/standards-sdk.es112.js +33 -2
- package/dist/es/standards-sdk.es112.js.map +1 -1
- package/dist/es/standards-sdk.es113.js +9 -2
- package/dist/es/standards-sdk.es113.js.map +1 -1
- package/dist/es/standards-sdk.es114.js +32 -32
- package/dist/es/standards-sdk.es114.js.map +1 -1
- package/dist/es/standards-sdk.es115.js +3 -33
- package/dist/es/standards-sdk.es115.js.map +1 -1
- package/dist/es/standards-sdk.es116.js +2 -9
- package/dist/es/standards-sdk.es116.js.map +1 -1
- package/dist/es/standards-sdk.es117.js +2 -34
- package/dist/es/standards-sdk.es117.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 +3 -3
- package/dist/es/standards-sdk.es22.js +1692 -966
- package/dist/es/standards-sdk.es22.js.map +1 -1
- package/dist/es/standards-sdk.es23.js +5544 -121
- package/dist/es/standards-sdk.es23.js.map +1 -1
- package/dist/es/standards-sdk.es24.js +1041 -3
- package/dist/es/standards-sdk.es24.js.map +1 -1
- package/dist/es/standards-sdk.es25.js +36 -4167
- package/dist/es/standards-sdk.es25.js.map +1 -1
- package/dist/es/standards-sdk.es26.js +48 -36
- package/dist/es/standards-sdk.es26.js.map +1 -1
- package/dist/es/standards-sdk.es27.js +3 -48
- package/dist/es/standards-sdk.es27.js.map +1 -1
- package/dist/es/standards-sdk.es28.js +2 -7190
- package/dist/es/standards-sdk.es28.js.map +1 -1
- package/dist/es/standards-sdk.es29.js +5 -2
- package/dist/es/standards-sdk.es29.js.map +1 -1
- package/dist/es/standards-sdk.es30.js +4167 -5
- package/dist/es/standards-sdk.es30.js.map +1 -1
- package/dist/es/standards-sdk.es31.js +7109 -74
- package/dist/es/standards-sdk.es31.js.map +1 -1
- package/dist/es/standards-sdk.es32.js +3 -2
- package/dist/es/standards-sdk.es32.js.map +1 -1
- package/dist/es/standards-sdk.es33.js +96 -11
- package/dist/es/standards-sdk.es33.js.map +1 -1
- package/dist/es/standards-sdk.es34.js +2 -409
- package/dist/es/standards-sdk.es34.js.map +1 -1
- package/dist/es/standards-sdk.es35.js +16 -2282
- package/dist/es/standards-sdk.es35.js.map +1 -1
- package/dist/es/standards-sdk.es36.js +400 -155
- package/dist/es/standards-sdk.es36.js.map +1 -1
- package/dist/es/standards-sdk.es38.js +2 -2
- package/dist/es/standards-sdk.es4.js +1 -1
- package/dist/es/standards-sdk.es40.js +5 -5
- package/dist/es/standards-sdk.es42.js +3 -3
- package/dist/es/standards-sdk.es48.js +1 -1
- package/dist/es/standards-sdk.es5.js +3 -3
- package/dist/es/standards-sdk.es52.js +1 -1
- package/dist/es/standards-sdk.es53.js +3 -3
- package/dist/es/standards-sdk.es55.js +2281 -194
- package/dist/es/standards-sdk.es55.js.map +1 -1
- package/dist/es/standards-sdk.es56.js +138 -412
- package/dist/es/standards-sdk.es56.js.map +1 -1
- package/dist/es/standards-sdk.es57.js +80 -21
- package/dist/es/standards-sdk.es57.js.map +1 -1
- package/dist/es/standards-sdk.es58.js +21 -137
- package/dist/es/standards-sdk.es58.js.map +1 -1
- package/dist/es/standards-sdk.es59.js +143 -13
- package/dist/es/standards-sdk.es59.js.map +1 -1
- package/dist/es/standards-sdk.es60.js +83 -21
- package/dist/es/standards-sdk.es60.js.map +1 -1
- package/dist/es/standards-sdk.es61.js +191 -25
- package/dist/es/standards-sdk.es61.js.map +1 -1
- package/dist/es/standards-sdk.es62.js +432 -15
- package/dist/es/standards-sdk.es62.js.map +1 -1
- package/dist/es/standards-sdk.es63.js +15 -34
- package/dist/es/standards-sdk.es63.js.map +1 -1
- package/dist/es/standards-sdk.es64.js +131 -10
- package/dist/es/standards-sdk.es64.js.map +1 -1
- package/dist/es/standards-sdk.es65.js +10 -53
- package/dist/es/standards-sdk.es65.js.map +1 -1
- package/dist/es/standards-sdk.es66.js +21 -1281
- package/dist/es/standards-sdk.es66.js.map +1 -1
- package/dist/es/standards-sdk.es67.js +25 -144
- package/dist/es/standards-sdk.es67.js.map +1 -1
- package/dist/es/standards-sdk.es68.js +17 -87
- package/dist/es/standards-sdk.es68.js.map +1 -1
- package/dist/es/standards-sdk.es69.js +38 -78
- package/dist/es/standards-sdk.es69.js.map +1 -1
- package/dist/es/standards-sdk.es7.js +3 -3
- package/dist/es/standards-sdk.es70.js +15 -29
- package/dist/es/standards-sdk.es70.js.map +1 -1
- package/dist/es/standards-sdk.es71.js +60 -5
- package/dist/es/standards-sdk.es71.js.map +1 -1
- package/dist/es/standards-sdk.es72.js +1269 -139
- package/dist/es/standards-sdk.es72.js.map +1 -1
- package/dist/es/standards-sdk.es73.js +30 -21
- package/dist/es/standards-sdk.es73.js.map +1 -1
- package/dist/es/standards-sdk.es74.js +5 -792
- package/dist/es/standards-sdk.es74.js.map +1 -1
- package/dist/es/standards-sdk.es75.js +145 -160
- package/dist/es/standards-sdk.es75.js.map +1 -1
- package/dist/es/standards-sdk.es76.js +780 -130
- package/dist/es/standards-sdk.es76.js.map +1 -1
- package/dist/es/standards-sdk.es77.js +174 -3
- package/dist/es/standards-sdk.es77.js.map +1 -1
- package/dist/es/standards-sdk.es78.js +136 -25
- package/dist/es/standards-sdk.es78.js.map +1 -1
- package/dist/es/standards-sdk.es79.js +25 -56
- 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 +58 -45
- package/dist/es/standards-sdk.es80.js.map +1 -1
- package/dist/es/standards-sdk.es81.js +48 -8
- package/dist/es/standards-sdk.es81.js.map +1 -1
- package/dist/es/standards-sdk.es82.js +8 -63
- package/dist/es/standards-sdk.es82.js.map +1 -1
- package/dist/es/standards-sdk.es83.js +64 -5
- package/dist/es/standards-sdk.es83.js.map +1 -1
- package/dist/es/standards-sdk.es84.js +6 -15
- package/dist/es/standards-sdk.es84.js.map +1 -1
- package/dist/es/standards-sdk.es85.js +15 -7
- package/dist/es/standards-sdk.es85.js.map +1 -1
- package/dist/es/standards-sdk.es86.js +6 -44
- package/dist/es/standards-sdk.es86.js.map +1 -1
- package/dist/es/standards-sdk.es87.js +45 -2
- package/dist/es/standards-sdk.es87.js.map +1 -1
- package/dist/es/standards-sdk.es88.js +2 -136
- package/dist/es/standards-sdk.es88.js.map +1 -1
- package/dist/es/standards-sdk.es89.js +124 -160
- 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 +172 -21
- package/dist/es/standards-sdk.es90.js.map +1 -1
- package/dist/es/standards-sdk.es91.js +19 -25
- package/dist/es/standards-sdk.es91.js.map +1 -1
- package/dist/es/standards-sdk.es92.js +24 -23
- package/dist/es/standards-sdk.es92.js.map +1 -1
- package/dist/es/standards-sdk.es93.js +23 -35
- package/dist/es/standards-sdk.es93.js.map +1 -1
- package/dist/es/standards-sdk.es94.js +36 -417
- package/dist/es/standards-sdk.es94.js.map +1 -1
- package/dist/es/standards-sdk.es95.js +419 -2
- package/dist/es/standards-sdk.es95.js.map +1 -1
- package/dist/es/standards-sdk.es96.js +2 -120
- package/dist/es/standards-sdk.es96.js.map +1 -1
- package/dist/es/standards-sdk.es97.js +120 -13
- package/dist/es/standards-sdk.es97.js.map +1 -1
- package/dist/es/standards-sdk.es98.js +13 -13
- package/dist/es/standards-sdk.es98.js.map +1 -1
- package/dist/es/standards-sdk.es99.js +13 -7136
- package/dist/es/standards-sdk.es99.js.map +1 -1
- package/dist/umd/hcs-10/connections-manager.d.ts.map +1 -1
- package/dist/umd/standards-sdk.umd.js +1 -1
- package/dist/umd/standards-sdk.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,175 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import platform from "./standards-sdk.es86.js";
|
|
2
|
+
import utils from "./standards-sdk.es38.js";
|
|
3
|
+
import AxiosError from "./standards-sdk.es49.js";
|
|
4
|
+
import composeSignals from "./standards-sdk.es108.js";
|
|
5
|
+
import { trackStream } from "./standards-sdk.es109.js";
|
|
6
|
+
import AxiosHeaders from "./standards-sdk.es52.js";
|
|
7
|
+
import { progressEventDecorator, progressEventReducer, asyncDecorator } from "./standards-sdk.es106.js";
|
|
8
|
+
import resolveConfig from "./standards-sdk.es107.js";
|
|
9
|
+
import settle from "./standards-sdk.es104.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
|
+
});
|
|
21
172
|
export {
|
|
22
|
-
|
|
173
|
+
fetchAdapter as default
|
|
23
174
|
};
|
|
24
175
|
//# sourceMappingURL=standards-sdk.es90.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es90.js","sources":["../../node_modules/ethers/lib.esm/abi/coders/anonymous.js"],"sourcesContent":["import { Coder } from \"./abstract-coder.js\";\n/**\n * Clones the functionality of an existing Coder, but without a localName\n *\n * @_ignore\n */\nexport class AnonymousCoder extends Coder {\n coder;\n constructor(coder) {\n super(coder.name, coder.type, \"_\", coder.dynamic);\n this.coder = coder;\n }\n defaultValue() {\n return this.coder.defaultValue();\n }\n encode(writer, value) {\n return this.coder.encode(writer, value);\n }\n decode(reader) {\n return this.coder.decode(reader);\n }\n}\n//# sourceMappingURL=anonymous.js.map"],"names":[],"mappings":";;;;AAMO,MAAM,uBAAuB,MAAM;AAAA,EAEtC,YAAY,OAAO;AACf,UAAM,MAAM,MAAM,MAAM,MAAM,KAAK,MAAM,OAAO;AAFpD;AAGI,SAAK,QAAQ;AAAA,EACrB;AAAA,EACI,eAAe;AACX,WAAO,KAAK,MAAM,aAAc;AAAA,EACxC;AAAA,EACI,OAAO,QAAQ,OAAO;AAClB,WAAO,KAAK,MAAM,OAAO,QAAQ,KAAK;AAAA,EAC9C;AAAA,EACI,OAAO,QAAQ;AACX,WAAO,KAAK,MAAM,OAAO,MAAM;AAAA,EACvC;AACA;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"standards-sdk.es90.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,MAAM,aAAa,qBAAqB,OAAO,gBAAgB,aAC1D,kBAAC,YAAY,CAAC,QAAQ,QAAQ,OAAO,GAAG,GAAG,IAAI,aAAa,IAC7D,OAAO,QAAQ,IAAI,WAAW,MAAM,IAAI,SAAS,GAAG,EAAE,YAAa,CAAA;AAGvE,MAAM,OAAO,CAAC,OAAO,SAAS;AAC5B,MAAI;AACF,WAAO,CAAC,CAAC,GAAG,GAAG,IAAI;AAAA,EACpB,SAAQ,GAAG;AACV,WAAO;AAAA,EACX;AACA;AAEA,MAAM,wBAAwB,6BAA6B,KAAK,MAAM;AACpE,MAAI,iBAAiB;AAErB,QAAM,iBAAiB,IAAI,QAAQ,SAAS,QAAQ;AAAA,IAClD,MAAM,IAAI,eAAgB;AAAA,IAC1B,QAAQ;AAAA,IACR,IAAI,SAAS;AACX,uBAAiB;AACjB,aAAO;AAAA,IACR;AAAA,EACL,CAAG,EAAE,QAAQ,IAAI,cAAc;AAE7B,SAAO,kBAAkB,CAAC;AAC5B,CAAC;AAED,MAAM,qBAAqB,KAAK;AAEhC,MAAM,yBAAyB,6BAC7B,KAAK,MAAM,MAAM,iBAAiB,IAAI,SAAS,EAAE,EAAE,IAAI,CAAC;AAG1D,MAAM,YAAY;AAAA,EAChB,QAAQ,2BAA2B,CAAC,QAAQ,IAAI;AAClD;AAEA,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AO,IAAI,MAAM,QAAQ,OAAO;AAAA,EAC/D;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const min = instance.outputLen;
|
|
20
|
-
if (out.length < min) {
|
|
21
|
-
throw new Error(`digestInto() expects output buffer of length at least ${min}`);
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { Coder } from "./standards-sdk.es62.js";
|
|
5
|
+
class AnonymousCoder extends Coder {
|
|
6
|
+
constructor(coder) {
|
|
7
|
+
super(coder.name, coder.type, "_", coder.dynamic);
|
|
8
|
+
__publicField(this, "coder");
|
|
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);
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
21
|
export {
|
|
25
|
-
|
|
26
|
-
exists,
|
|
27
|
-
number,
|
|
28
|
-
output
|
|
22
|
+
AnonymousCoder
|
|
29
23
|
};
|
|
30
24
|
//# sourceMappingURL=standards-sdk.es91.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es91.js","sources":["../../node_modules
|
|
1
|
+
{"version":3,"file":"standards-sdk.es91.js","sources":["../../node_modules/ethers/lib.esm/abi/coders/anonymous.js"],"sourcesContent":["import { Coder } from \"./abstract-coder.js\";\n/**\n * Clones the functionality of an existing Coder, but without a localName\n *\n * @_ignore\n */\nexport class AnonymousCoder extends Coder {\n coder;\n constructor(coder) {\n super(coder.name, coder.type, \"_\", coder.dynamic);\n this.coder = coder;\n }\n defaultValue() {\n return this.coder.defaultValue();\n }\n encode(writer, value) {\n return this.coder.encode(writer, value);\n }\n decode(reader) {\n return this.coder.decode(reader);\n }\n}\n//# sourceMappingURL=anonymous.js.map"],"names":[],"mappings":";;;;AAMO,MAAM,uBAAuB,MAAM;AAAA,EAEtC,YAAY,OAAO;AACf,UAAM,MAAM,MAAM,MAAM,MAAM,KAAK,MAAM,OAAO;AAFpD;AAGI,SAAK,QAAQ;AAAA,EACrB;AAAA,EACI,eAAe;AACX,WAAO,KAAK,MAAM,aAAc;AAAA,EACxC;AAAA,EACI,OAAO,QAAQ,OAAO;AAClB,WAAO,KAAK,MAAM,OAAO,QAAQ,KAAK;AAAA,EAC9C;AAAA,EACI,OAAO,QAAQ;AACX,WAAO,KAAK,MAAM,OAAO,MAAM;AAAA,EACvC;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (le)
|
|
5
|
-
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
6
|
-
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
1
|
+
function number(n) {
|
|
2
|
+
if (!Number.isSafeInteger(n) || n < 0)
|
|
3
|
+
throw new Error(`Wrong positive integer: ${n}`);
|
|
7
4
|
}
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
function bytes(b, ...lengths) {
|
|
6
|
+
if (!(b instanceof Uint8Array))
|
|
7
|
+
throw new Error("Expected Uint8Array");
|
|
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}`);
|
|
14
22
|
}
|
|
15
|
-
return [Ah, Al];
|
|
16
23
|
}
|
|
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
24
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
rotlSL,
|
|
27
|
-
split
|
|
25
|
+
bytes,
|
|
26
|
+
exists,
|
|
27
|
+
number,
|
|
28
|
+
output
|
|
28
29
|
};
|
|
29
30
|
//# sourceMappingURL=standards-sdk.es92.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es92.js","sources":["../../node_modules/@noble/hashes/esm/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es92.js","sources":["../../node_modules/@noble/hashes/esm/_assert.js"],"sourcesContent":["function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nfunction bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nexport { number, bool, bytes, hash, exists, output };\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n//# sourceMappingURL=_assert.js.map"],"names":[],"mappings":"AAAA,SAAS,OAAO,GAAG;AACf,MAAI,CAAC,OAAO,cAAc,CAAC,KAAK,IAAI;AAChC,UAAM,IAAI,MAAM,2BAA2B,CAAC,EAAE;AACtD;AAKA,SAAS,MAAM,MAAM,SAAS;AAC1B,MAAI,EAAE,aAAa;AACf,UAAM,IAAI,MAAM,qBAAqB;AACzC,MAAI,QAAQ,SAAS,KAAK,CAAC,QAAQ,SAAS,EAAE,MAAM;AAChD,UAAM,IAAI,MAAM,iCAAiC,OAAO,mBAAmB,EAAE,MAAM,EAAE;AAC7F;AAOA,SAAS,OAAO,UAAU,gBAAgB,MAAM;AAC5C,MAAI,SAAS;AACT,UAAM,IAAI,MAAM,kCAAkC;AACtD,MAAI,iBAAiB,SAAS;AAC1B,UAAM,IAAI,MAAM,uCAAuC;AAC/D;AACA,SAAS,OAAO,KAAK,UAAU;AAC3B,QAAM,GAAG;AACT,QAAM,MAAM,SAAS;AACrB,MAAI,IAAI,SAAS,KAAK;AAClB,UAAM,IAAI,MAAM,yDAAyD,GAAG,EAAE;AAAA,EACtF;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,41 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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));
|
|
1
|
+
const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
2
|
+
const _32n = /* @__PURE__ */ BigInt(32);
|
|
3
|
+
function fromBig(n, le = false) {
|
|
4
|
+
if (le)
|
|
5
|
+
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
6
|
+
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
11
7
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
class Hash {
|
|
20
|
-
// Safe version that clones internal state
|
|
21
|
-
clone() {
|
|
22
|
-
return this._cloneInto();
|
|
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];
|
|
23
14
|
}
|
|
15
|
+
return [Ah, Al];
|
|
24
16
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
hashC.blockLen = tmp.blockLen;
|
|
30
|
-
hashC.create = () => hashCons();
|
|
31
|
-
return hashC;
|
|
32
|
-
}
|
|
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;
|
|
33
21
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
22
|
+
fromBig,
|
|
23
|
+
rotlBH,
|
|
24
|
+
rotlBL,
|
|
25
|
+
rotlSH,
|
|
26
|
+
rotlSL,
|
|
27
|
+
split
|
|
40
28
|
};
|
|
41
29
|
//# sourceMappingURL=standards-sdk.es93.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es93.js","sources":["../../node_modules/@noble/hashes/esm/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es93.js","sources":["../../node_modules/@noble/hashes/esm/_u64.js"],"sourcesContent":["const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map"],"names":[],"mappings":"AAAA,MAAM,aAA6B,uBAAO,KAAK,KAAK,CAAC;AACrD,MAAM,OAAuB,uBAAO,EAAE;AAEtC,SAAS,QAAQ,GAAG,KAAK,OAAO;AAC5B,MAAI;AACA,WAAO,EAAE,GAAG,OAAO,IAAI,UAAU,GAAG,GAAG,OAAQ,KAAK,OAAQ,UAAU,EAAG;AAC7E,SAAO,EAAE,GAAG,OAAQ,KAAK,OAAQ,UAAU,IAAI,GAAG,GAAG,OAAO,IAAI,UAAU,IAAI,EAAG;AACrF;AACA,SAAS,MAAM,KAAK,KAAK,OAAO;AAC5B,MAAI,KAAK,IAAI,YAAY,IAAI,MAAM;AACnC,MAAI,KAAK,IAAI,YAAY,IAAI,MAAM;AACnC,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACjC,UAAM,EAAE,GAAG,EAAG,IAAG,QAAQ,IAAI,CAAC,GAAG,EAAE;AACnC,KAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAAA,EAC9B;AACI,SAAO,CAAC,IAAI,EAAE;AAClB;AAeK,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAK,IAAM,MAAO,KAAK;AAC/C,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAK,IAAM,MAAO,KAAK;AAE/C,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAM,IAAI,KAAQ,MAAO,KAAK;AACtD,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAM,IAAI,KAAQ,MAAO,KAAK;","x_google_ignoreList":[0]}
|