@lucid-evolution/uplc 0.2.4 → 0.2.6

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.
@@ -1,3607 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __esm = (fn, res) => function __init() {
8
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
- };
10
- var __commonJS = (cb, mod) => function __require() {
11
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
- };
13
- var __export = (target, all) => {
14
- for (var name in all)
15
- __defProp(target, name, { get: all[name], enumerable: true });
16
- };
17
- var __copyProps = (to, from, except, desc) => {
18
- if (from && typeof from === "object" || typeof from === "function") {
19
- for (let key of __getOwnPropNames(from))
20
- if (!__hasOwnProp.call(to, key) && key !== except)
21
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
- }
23
- return to;
24
- };
25
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
- // If the importer is in node compatibility mode or this is not an ESM
27
- // file that has been converted to a CommonJS file using a Babel-
28
- // compatible transform (i.e. "__esModule" has not been set), then set
29
- // "default" to the CommonJS "module.exports" for node compatibility.
30
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
- mod
32
- ));
33
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
-
35
- // ../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.12.29/node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js
36
- var __dirname;
37
- var init_dirname = __esm({
38
- "../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.12.29/node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js"() {
39
- "use strict";
40
- __dirname = "/";
41
- }
42
- });
43
-
44
- // ../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/process.js
45
- function Item(fun, array) {
46
- this.fun = fun;
47
- this.array = array;
48
- }
49
- function hrtime(previousTimestamp) {
50
- var baseNow = Math.floor((Date.now() - _performance.now()) * 1e-3);
51
- var clocktime = _performance.now() * 1e-3;
52
- var seconds = Math.floor(clocktime) + baseNow;
53
- var nanoseconds = Math.floor(clocktime % 1 * 1e9);
54
- if (previousTimestamp) {
55
- seconds = seconds - previousTimestamp[0];
56
- nanoseconds = nanoseconds - previousTimestamp[1];
57
- if (nanoseconds < 0) {
58
- seconds--;
59
- nanoseconds += nanoPerSec;
60
- }
61
- }
62
- return [seconds, nanoseconds];
63
- }
64
- var env, _performance, nowOffset, nanoPerSec;
65
- var init_process = __esm({
66
- "../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/process.js"() {
67
- "use strict";
68
- init_dirname();
69
- init_buffer2();
70
- init_process2();
71
- Item.prototype.run = function() {
72
- this.fun.apply(null, this.array);
73
- };
74
- env = {
75
- PATH: "/usr/bin",
76
- LANG: navigator.language + ".UTF-8",
77
- PWD: "/",
78
- HOME: "/home",
79
- TMP: "/tmp"
80
- };
81
- _performance = {
82
- now: typeof performance !== "undefined" ? performance.now.bind(performance) : void 0,
83
- timing: typeof performance !== "undefined" ? performance.timing : void 0
84
- };
85
- if (_performance.now === void 0) {
86
- nowOffset = Date.now();
87
- if (_performance.timing && _performance.timing.navigationStart) {
88
- nowOffset = _performance.timing.navigationStart;
89
- }
90
- _performance.now = () => Date.now() - nowOffset;
91
- }
92
- nanoPerSec = 1e9;
93
- hrtime.bigint = function(time) {
94
- var diff = hrtime(time);
95
- if (typeof BigInt === "undefined") {
96
- return diff[0] * nanoPerSec + diff[1];
97
- }
98
- return BigInt(diff[0] * nanoPerSec) + BigInt(diff[1]);
99
- };
100
- }
101
- });
102
-
103
- // ../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.12.29/node_modules/esbuild-plugin-polyfill-node/polyfills/process.js
104
- var init_process2 = __esm({
105
- "../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.12.29/node_modules/esbuild-plugin-polyfill-node/polyfills/process.js"() {
106
- "use strict";
107
- init_process();
108
- }
109
- });
110
-
111
- // ../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/buffer.js
112
- function dew$2() {
113
- if (_dewExec$2)
114
- return exports$3;
115
- _dewExec$2 = true;
116
- exports$3.byteLength = byteLength;
117
- exports$3.toByteArray = toByteArray;
118
- exports$3.fromByteArray = fromByteArray;
119
- var lookup = [];
120
- var revLookup = [];
121
- var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
122
- var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
123
- for (var i3 = 0, len = code.length; i3 < len; ++i3) {
124
- lookup[i3] = code[i3];
125
- revLookup[code.charCodeAt(i3)] = i3;
126
- }
127
- revLookup["-".charCodeAt(0)] = 62;
128
- revLookup["_".charCodeAt(0)] = 63;
129
- function getLens(b64) {
130
- var len2 = b64.length;
131
- if (len2 % 4 > 0) {
132
- throw new Error("Invalid string. Length must be a multiple of 4");
133
- }
134
- var validLen = b64.indexOf("=");
135
- if (validLen === -1)
136
- validLen = len2;
137
- var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
138
- return [validLen, placeHoldersLen];
139
- }
140
- function byteLength(b64) {
141
- var lens = getLens(b64);
142
- var validLen = lens[0];
143
- var placeHoldersLen = lens[1];
144
- return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
145
- }
146
- function _byteLength(b64, validLen, placeHoldersLen) {
147
- return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
148
- }
149
- function toByteArray(b64) {
150
- var tmp;
151
- var lens = getLens(b64);
152
- var validLen = lens[0];
153
- var placeHoldersLen = lens[1];
154
- var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
155
- var curByte = 0;
156
- var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
157
- var i4;
158
- for (i4 = 0; i4 < len2; i4 += 4) {
159
- tmp = revLookup[b64.charCodeAt(i4)] << 18 | revLookup[b64.charCodeAt(i4 + 1)] << 12 | revLookup[b64.charCodeAt(i4 + 2)] << 6 | revLookup[b64.charCodeAt(i4 + 3)];
160
- arr[curByte++] = tmp >> 16 & 255;
161
- arr[curByte++] = tmp >> 8 & 255;
162
- arr[curByte++] = tmp & 255;
163
- }
164
- if (placeHoldersLen === 2) {
165
- tmp = revLookup[b64.charCodeAt(i4)] << 2 | revLookup[b64.charCodeAt(i4 + 1)] >> 4;
166
- arr[curByte++] = tmp & 255;
167
- }
168
- if (placeHoldersLen === 1) {
169
- tmp = revLookup[b64.charCodeAt(i4)] << 10 | revLookup[b64.charCodeAt(i4 + 1)] << 4 | revLookup[b64.charCodeAt(i4 + 2)] >> 2;
170
- arr[curByte++] = tmp >> 8 & 255;
171
- arr[curByte++] = tmp & 255;
172
- }
173
- return arr;
174
- }
175
- function tripletToBase64(num) {
176
- return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
177
- }
178
- function encodeChunk(uint8, start, end) {
179
- var tmp;
180
- var output = [];
181
- for (var i4 = start; i4 < end; i4 += 3) {
182
- tmp = (uint8[i4] << 16 & 16711680) + (uint8[i4 + 1] << 8 & 65280) + (uint8[i4 + 2] & 255);
183
- output.push(tripletToBase64(tmp));
184
- }
185
- return output.join("");
186
- }
187
- function fromByteArray(uint8) {
188
- var tmp;
189
- var len2 = uint8.length;
190
- var extraBytes = len2 % 3;
191
- var parts = [];
192
- var maxChunkLength = 16383;
193
- for (var i4 = 0, len22 = len2 - extraBytes; i4 < len22; i4 += maxChunkLength) {
194
- parts.push(encodeChunk(uint8, i4, i4 + maxChunkLength > len22 ? len22 : i4 + maxChunkLength));
195
- }
196
- if (extraBytes === 1) {
197
- tmp = uint8[len2 - 1];
198
- parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "==");
199
- } else if (extraBytes === 2) {
200
- tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
201
- parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "=");
202
- }
203
- return parts.join("");
204
- }
205
- return exports$3;
206
- }
207
- function dew$1() {
208
- if (_dewExec$1)
209
- return exports$2;
210
- _dewExec$1 = true;
211
- exports$2.read = function(buffer, offset, isLE, mLen, nBytes) {
212
- var e3, m3;
213
- var eLen = nBytes * 8 - mLen - 1;
214
- var eMax = (1 << eLen) - 1;
215
- var eBias = eMax >> 1;
216
- var nBits = -7;
217
- var i3 = isLE ? nBytes - 1 : 0;
218
- var d3 = isLE ? -1 : 1;
219
- var s3 = buffer[offset + i3];
220
- i3 += d3;
221
- e3 = s3 & (1 << -nBits) - 1;
222
- s3 >>= -nBits;
223
- nBits += eLen;
224
- for (; nBits > 0; e3 = e3 * 256 + buffer[offset + i3], i3 += d3, nBits -= 8) {
225
- }
226
- m3 = e3 & (1 << -nBits) - 1;
227
- e3 >>= -nBits;
228
- nBits += mLen;
229
- for (; nBits > 0; m3 = m3 * 256 + buffer[offset + i3], i3 += d3, nBits -= 8) {
230
- }
231
- if (e3 === 0) {
232
- e3 = 1 - eBias;
233
- } else if (e3 === eMax) {
234
- return m3 ? NaN : (s3 ? -1 : 1) * Infinity;
235
- } else {
236
- m3 = m3 + Math.pow(2, mLen);
237
- e3 = e3 - eBias;
238
- }
239
- return (s3 ? -1 : 1) * m3 * Math.pow(2, e3 - mLen);
240
- };
241
- exports$2.write = function(buffer, value, offset, isLE, mLen, nBytes) {
242
- var e3, m3, c3;
243
- var eLen = nBytes * 8 - mLen - 1;
244
- var eMax = (1 << eLen) - 1;
245
- var eBias = eMax >> 1;
246
- var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
247
- var i3 = isLE ? 0 : nBytes - 1;
248
- var d3 = isLE ? 1 : -1;
249
- var s3 = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
250
- value = Math.abs(value);
251
- if (isNaN(value) || value === Infinity) {
252
- m3 = isNaN(value) ? 1 : 0;
253
- e3 = eMax;
254
- } else {
255
- e3 = Math.floor(Math.log(value) / Math.LN2);
256
- if (value * (c3 = Math.pow(2, -e3)) < 1) {
257
- e3--;
258
- c3 *= 2;
259
- }
260
- if (e3 + eBias >= 1) {
261
- value += rt / c3;
262
- } else {
263
- value += rt * Math.pow(2, 1 - eBias);
264
- }
265
- if (value * c3 >= 2) {
266
- e3++;
267
- c3 /= 2;
268
- }
269
- if (e3 + eBias >= eMax) {
270
- m3 = 0;
271
- e3 = eMax;
272
- } else if (e3 + eBias >= 1) {
273
- m3 = (value * c3 - 1) * Math.pow(2, mLen);
274
- e3 = e3 + eBias;
275
- } else {
276
- m3 = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
277
- e3 = 0;
278
- }
279
- }
280
- for (; mLen >= 8; buffer[offset + i3] = m3 & 255, i3 += d3, m3 /= 256, mLen -= 8) {
281
- }
282
- e3 = e3 << mLen | m3;
283
- eLen += mLen;
284
- for (; eLen > 0; buffer[offset + i3] = e3 & 255, i3 += d3, e3 /= 256, eLen -= 8) {
285
- }
286
- buffer[offset + i3 - d3] |= s3 * 128;
287
- };
288
- return exports$2;
289
- }
290
- function dew() {
291
- if (_dewExec)
292
- return exports$1;
293
- _dewExec = true;
294
- const base64 = dew$2();
295
- const ieee754 = dew$1();
296
- const customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
297
- exports$1.Buffer = Buffer3;
298
- exports$1.SlowBuffer = SlowBuffer;
299
- exports$1.INSPECT_MAX_BYTES = 50;
300
- const K_MAX_LENGTH = 2147483647;
301
- exports$1.kMaxLength = K_MAX_LENGTH;
302
- Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport();
303
- if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
304
- console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
305
- }
306
- function typedArraySupport() {
307
- try {
308
- const arr = new Uint8Array(1);
309
- const proto = {
310
- foo: function() {
311
- return 42;
312
- }
313
- };
314
- Object.setPrototypeOf(proto, Uint8Array.prototype);
315
- Object.setPrototypeOf(arr, proto);
316
- return arr.foo() === 42;
317
- } catch (e3) {
318
- return false;
319
- }
320
- }
321
- Object.defineProperty(Buffer3.prototype, "parent", {
322
- enumerable: true,
323
- get: function() {
324
- if (!Buffer3.isBuffer(this))
325
- return void 0;
326
- return this.buffer;
327
- }
328
- });
329
- Object.defineProperty(Buffer3.prototype, "offset", {
330
- enumerable: true,
331
- get: function() {
332
- if (!Buffer3.isBuffer(this))
333
- return void 0;
334
- return this.byteOffset;
335
- }
336
- });
337
- function createBuffer(length) {
338
- if (length > K_MAX_LENGTH) {
339
- throw new RangeError('The value "' + length + '" is invalid for option "size"');
340
- }
341
- const buf = new Uint8Array(length);
342
- Object.setPrototypeOf(buf, Buffer3.prototype);
343
- return buf;
344
- }
345
- function Buffer3(arg, encodingOrOffset, length) {
346
- if (typeof arg === "number") {
347
- if (typeof encodingOrOffset === "string") {
348
- throw new TypeError('The "string" argument must be of type string. Received type number');
349
- }
350
- return allocUnsafe(arg);
351
- }
352
- return from(arg, encodingOrOffset, length);
353
- }
354
- Buffer3.poolSize = 8192;
355
- function from(value, encodingOrOffset, length) {
356
- if (typeof value === "string") {
357
- return fromString(value, encodingOrOffset);
358
- }
359
- if (ArrayBuffer.isView(value)) {
360
- return fromArrayView(value);
361
- }
362
- if (value == null) {
363
- throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
364
- }
365
- if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
366
- return fromArrayBuffer(value, encodingOrOffset, length);
367
- }
368
- if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
369
- return fromArrayBuffer(value, encodingOrOffset, length);
370
- }
371
- if (typeof value === "number") {
372
- throw new TypeError('The "value" argument must not be of type number. Received type number');
373
- }
374
- const valueOf = value.valueOf && value.valueOf();
375
- if (valueOf != null && valueOf !== value) {
376
- return Buffer3.from(valueOf, encodingOrOffset, length);
377
- }
378
- const b2 = fromObject(value);
379
- if (b2)
380
- return b2;
381
- if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
382
- return Buffer3.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
383
- }
384
- throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
385
- }
386
- Buffer3.from = function(value, encodingOrOffset, length) {
387
- return from(value, encodingOrOffset, length);
388
- };
389
- Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);
390
- Object.setPrototypeOf(Buffer3, Uint8Array);
391
- function assertSize(size) {
392
- if (typeof size !== "number") {
393
- throw new TypeError('"size" argument must be of type number');
394
- } else if (size < 0) {
395
- throw new RangeError('The value "' + size + '" is invalid for option "size"');
396
- }
397
- }
398
- function alloc(size, fill, encoding) {
399
- assertSize(size);
400
- if (size <= 0) {
401
- return createBuffer(size);
402
- }
403
- if (fill !== void 0) {
404
- return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
405
- }
406
- return createBuffer(size);
407
- }
408
- Buffer3.alloc = function(size, fill, encoding) {
409
- return alloc(size, fill, encoding);
410
- };
411
- function allocUnsafe(size) {
412
- assertSize(size);
413
- return createBuffer(size < 0 ? 0 : checked(size) | 0);
414
- }
415
- Buffer3.allocUnsafe = function(size) {
416
- return allocUnsafe(size);
417
- };
418
- Buffer3.allocUnsafeSlow = function(size) {
419
- return allocUnsafe(size);
420
- };
421
- function fromString(string, encoding) {
422
- if (typeof encoding !== "string" || encoding === "") {
423
- encoding = "utf8";
424
- }
425
- if (!Buffer3.isEncoding(encoding)) {
426
- throw new TypeError("Unknown encoding: " + encoding);
427
- }
428
- const length = byteLength(string, encoding) | 0;
429
- let buf = createBuffer(length);
430
- const actual = buf.write(string, encoding);
431
- if (actual !== length) {
432
- buf = buf.slice(0, actual);
433
- }
434
- return buf;
435
- }
436
- function fromArrayLike(array) {
437
- const length = array.length < 0 ? 0 : checked(array.length) | 0;
438
- const buf = createBuffer(length);
439
- for (let i3 = 0; i3 < length; i3 += 1) {
440
- buf[i3] = array[i3] & 255;
441
- }
442
- return buf;
443
- }
444
- function fromArrayView(arrayView) {
445
- if (isInstance(arrayView, Uint8Array)) {
446
- const copy = new Uint8Array(arrayView);
447
- return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
448
- }
449
- return fromArrayLike(arrayView);
450
- }
451
- function fromArrayBuffer(array, byteOffset, length) {
452
- if (byteOffset < 0 || array.byteLength < byteOffset) {
453
- throw new RangeError('"offset" is outside of buffer bounds');
454
- }
455
- if (array.byteLength < byteOffset + (length || 0)) {
456
- throw new RangeError('"length" is outside of buffer bounds');
457
- }
458
- let buf;
459
- if (byteOffset === void 0 && length === void 0) {
460
- buf = new Uint8Array(array);
461
- } else if (length === void 0) {
462
- buf = new Uint8Array(array, byteOffset);
463
- } else {
464
- buf = new Uint8Array(array, byteOffset, length);
465
- }
466
- Object.setPrototypeOf(buf, Buffer3.prototype);
467
- return buf;
468
- }
469
- function fromObject(obj) {
470
- if (Buffer3.isBuffer(obj)) {
471
- const len = checked(obj.length) | 0;
472
- const buf = createBuffer(len);
473
- if (buf.length === 0) {
474
- return buf;
475
- }
476
- obj.copy(buf, 0, 0, len);
477
- return buf;
478
- }
479
- if (obj.length !== void 0) {
480
- if (typeof obj.length !== "number" || numberIsNaN(obj.length)) {
481
- return createBuffer(0);
482
- }
483
- return fromArrayLike(obj);
484
- }
485
- if (obj.type === "Buffer" && Array.isArray(obj.data)) {
486
- return fromArrayLike(obj.data);
487
- }
488
- }
489
- function checked(length) {
490
- if (length >= K_MAX_LENGTH) {
491
- throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes");
492
- }
493
- return length | 0;
494
- }
495
- function SlowBuffer(length) {
496
- if (+length != length) {
497
- length = 0;
498
- }
499
- return Buffer3.alloc(+length);
500
- }
501
- Buffer3.isBuffer = function isBuffer3(b2) {
502
- return b2 != null && b2._isBuffer === true && b2 !== Buffer3.prototype;
503
- };
504
- Buffer3.compare = function compare(a3, b2) {
505
- if (isInstance(a3, Uint8Array))
506
- a3 = Buffer3.from(a3, a3.offset, a3.byteLength);
507
- if (isInstance(b2, Uint8Array))
508
- b2 = Buffer3.from(b2, b2.offset, b2.byteLength);
509
- if (!Buffer3.isBuffer(a3) || !Buffer3.isBuffer(b2)) {
510
- throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
511
- }
512
- if (a3 === b2)
513
- return 0;
514
- let x2 = a3.length;
515
- let y2 = b2.length;
516
- for (let i3 = 0, len = Math.min(x2, y2); i3 < len; ++i3) {
517
- if (a3[i3] !== b2[i3]) {
518
- x2 = a3[i3];
519
- y2 = b2[i3];
520
- break;
521
- }
522
- }
523
- if (x2 < y2)
524
- return -1;
525
- if (y2 < x2)
526
- return 1;
527
- return 0;
528
- };
529
- Buffer3.isEncoding = function isEncoding(encoding) {
530
- switch (String(encoding).toLowerCase()) {
531
- case "hex":
532
- case "utf8":
533
- case "utf-8":
534
- case "ascii":
535
- case "latin1":
536
- case "binary":
537
- case "base64":
538
- case "ucs2":
539
- case "ucs-2":
540
- case "utf16le":
541
- case "utf-16le":
542
- return true;
543
- default:
544
- return false;
545
- }
546
- };
547
- Buffer3.concat = function concat(list, length) {
548
- if (!Array.isArray(list)) {
549
- throw new TypeError('"list" argument must be an Array of Buffers');
550
- }
551
- if (list.length === 0) {
552
- return Buffer3.alloc(0);
553
- }
554
- let i3;
555
- if (length === void 0) {
556
- length = 0;
557
- for (i3 = 0; i3 < list.length; ++i3) {
558
- length += list[i3].length;
559
- }
560
- }
561
- const buffer = Buffer3.allocUnsafe(length);
562
- let pos = 0;
563
- for (i3 = 0; i3 < list.length; ++i3) {
564
- let buf = list[i3];
565
- if (isInstance(buf, Uint8Array)) {
566
- if (pos + buf.length > buffer.length) {
567
- if (!Buffer3.isBuffer(buf))
568
- buf = Buffer3.from(buf);
569
- buf.copy(buffer, pos);
570
- } else {
571
- Uint8Array.prototype.set.call(buffer, buf, pos);
572
- }
573
- } else if (!Buffer3.isBuffer(buf)) {
574
- throw new TypeError('"list" argument must be an Array of Buffers');
575
- } else {
576
- buf.copy(buffer, pos);
577
- }
578
- pos += buf.length;
579
- }
580
- return buffer;
581
- };
582
- function byteLength(string, encoding) {
583
- if (Buffer3.isBuffer(string)) {
584
- return string.length;
585
- }
586
- if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
587
- return string.byteLength;
588
- }
589
- if (typeof string !== "string") {
590
- throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);
591
- }
592
- const len = string.length;
593
- const mustMatch = arguments.length > 2 && arguments[2] === true;
594
- if (!mustMatch && len === 0)
595
- return 0;
596
- let loweredCase = false;
597
- for (; ; ) {
598
- switch (encoding) {
599
- case "ascii":
600
- case "latin1":
601
- case "binary":
602
- return len;
603
- case "utf8":
604
- case "utf-8":
605
- return utf8ToBytes(string).length;
606
- case "ucs2":
607
- case "ucs-2":
608
- case "utf16le":
609
- case "utf-16le":
610
- return len * 2;
611
- case "hex":
612
- return len >>> 1;
613
- case "base64":
614
- return base64ToBytes(string).length;
615
- default:
616
- if (loweredCase) {
617
- return mustMatch ? -1 : utf8ToBytes(string).length;
618
- }
619
- encoding = ("" + encoding).toLowerCase();
620
- loweredCase = true;
621
- }
622
- }
623
- }
624
- Buffer3.byteLength = byteLength;
625
- function slowToString(encoding, start, end) {
626
- let loweredCase = false;
627
- if (start === void 0 || start < 0) {
628
- start = 0;
629
- }
630
- if (start > this.length) {
631
- return "";
632
- }
633
- if (end === void 0 || end > this.length) {
634
- end = this.length;
635
- }
636
- if (end <= 0) {
637
- return "";
638
- }
639
- end >>>= 0;
640
- start >>>= 0;
641
- if (end <= start) {
642
- return "";
643
- }
644
- if (!encoding)
645
- encoding = "utf8";
646
- while (true) {
647
- switch (encoding) {
648
- case "hex":
649
- return hexSlice(this, start, end);
650
- case "utf8":
651
- case "utf-8":
652
- return utf8Slice(this, start, end);
653
- case "ascii":
654
- return asciiSlice(this, start, end);
655
- case "latin1":
656
- case "binary":
657
- return latin1Slice(this, start, end);
658
- case "base64":
659
- return base64Slice(this, start, end);
660
- case "ucs2":
661
- case "ucs-2":
662
- case "utf16le":
663
- case "utf-16le":
664
- return utf16leSlice(this, start, end);
665
- default:
666
- if (loweredCase)
667
- throw new TypeError("Unknown encoding: " + encoding);
668
- encoding = (encoding + "").toLowerCase();
669
- loweredCase = true;
670
- }
671
- }
672
- }
673
- Buffer3.prototype._isBuffer = true;
674
- function swap(b2, n3, m3) {
675
- const i3 = b2[n3];
676
- b2[n3] = b2[m3];
677
- b2[m3] = i3;
678
- }
679
- Buffer3.prototype.swap16 = function swap16() {
680
- const len = this.length;
681
- if (len % 2 !== 0) {
682
- throw new RangeError("Buffer size must be a multiple of 16-bits");
683
- }
684
- for (let i3 = 0; i3 < len; i3 += 2) {
685
- swap(this, i3, i3 + 1);
686
- }
687
- return this;
688
- };
689
- Buffer3.prototype.swap32 = function swap32() {
690
- const len = this.length;
691
- if (len % 4 !== 0) {
692
- throw new RangeError("Buffer size must be a multiple of 32-bits");
693
- }
694
- for (let i3 = 0; i3 < len; i3 += 4) {
695
- swap(this, i3, i3 + 3);
696
- swap(this, i3 + 1, i3 + 2);
697
- }
698
- return this;
699
- };
700
- Buffer3.prototype.swap64 = function swap64() {
701
- const len = this.length;
702
- if (len % 8 !== 0) {
703
- throw new RangeError("Buffer size must be a multiple of 64-bits");
704
- }
705
- for (let i3 = 0; i3 < len; i3 += 8) {
706
- swap(this, i3, i3 + 7);
707
- swap(this, i3 + 1, i3 + 6);
708
- swap(this, i3 + 2, i3 + 5);
709
- swap(this, i3 + 3, i3 + 4);
710
- }
711
- return this;
712
- };
713
- Buffer3.prototype.toString = function toString() {
714
- const length = this.length;
715
- if (length === 0)
716
- return "";
717
- if (arguments.length === 0)
718
- return utf8Slice(this, 0, length);
719
- return slowToString.apply(this, arguments);
720
- };
721
- Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;
722
- Buffer3.prototype.equals = function equals(b2) {
723
- if (!Buffer3.isBuffer(b2))
724
- throw new TypeError("Argument must be a Buffer");
725
- if (this === b2)
726
- return true;
727
- return Buffer3.compare(this, b2) === 0;
728
- };
729
- Buffer3.prototype.inspect = function inspect3() {
730
- let str = "";
731
- const max = exports$1.INSPECT_MAX_BYTES;
732
- str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
733
- if (this.length > max)
734
- str += " ... ";
735
- return "<Buffer " + str + ">";
736
- };
737
- if (customInspectSymbol) {
738
- Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;
739
- }
740
- Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
741
- if (isInstance(target, Uint8Array)) {
742
- target = Buffer3.from(target, target.offset, target.byteLength);
743
- }
744
- if (!Buffer3.isBuffer(target)) {
745
- throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);
746
- }
747
- if (start === void 0) {
748
- start = 0;
749
- }
750
- if (end === void 0) {
751
- end = target ? target.length : 0;
752
- }
753
- if (thisStart === void 0) {
754
- thisStart = 0;
755
- }
756
- if (thisEnd === void 0) {
757
- thisEnd = this.length;
758
- }
759
- if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
760
- throw new RangeError("out of range index");
761
- }
762
- if (thisStart >= thisEnd && start >= end) {
763
- return 0;
764
- }
765
- if (thisStart >= thisEnd) {
766
- return -1;
767
- }
768
- if (start >= end) {
769
- return 1;
770
- }
771
- start >>>= 0;
772
- end >>>= 0;
773
- thisStart >>>= 0;
774
- thisEnd >>>= 0;
775
- if (this === target)
776
- return 0;
777
- let x2 = thisEnd - thisStart;
778
- let y2 = end - start;
779
- const len = Math.min(x2, y2);
780
- const thisCopy = this.slice(thisStart, thisEnd);
781
- const targetCopy = target.slice(start, end);
782
- for (let i3 = 0; i3 < len; ++i3) {
783
- if (thisCopy[i3] !== targetCopy[i3]) {
784
- x2 = thisCopy[i3];
785
- y2 = targetCopy[i3];
786
- break;
787
- }
788
- }
789
- if (x2 < y2)
790
- return -1;
791
- if (y2 < x2)
792
- return 1;
793
- return 0;
794
- };
795
- function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
796
- if (buffer.length === 0)
797
- return -1;
798
- if (typeof byteOffset === "string") {
799
- encoding = byteOffset;
800
- byteOffset = 0;
801
- } else if (byteOffset > 2147483647) {
802
- byteOffset = 2147483647;
803
- } else if (byteOffset < -2147483648) {
804
- byteOffset = -2147483648;
805
- }
806
- byteOffset = +byteOffset;
807
- if (numberIsNaN(byteOffset)) {
808
- byteOffset = dir ? 0 : buffer.length - 1;
809
- }
810
- if (byteOffset < 0)
811
- byteOffset = buffer.length + byteOffset;
812
- if (byteOffset >= buffer.length) {
813
- if (dir)
814
- return -1;
815
- else
816
- byteOffset = buffer.length - 1;
817
- } else if (byteOffset < 0) {
818
- if (dir)
819
- byteOffset = 0;
820
- else
821
- return -1;
822
- }
823
- if (typeof val === "string") {
824
- val = Buffer3.from(val, encoding);
825
- }
826
- if (Buffer3.isBuffer(val)) {
827
- if (val.length === 0) {
828
- return -1;
829
- }
830
- return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
831
- } else if (typeof val === "number") {
832
- val = val & 255;
833
- if (typeof Uint8Array.prototype.indexOf === "function") {
834
- if (dir) {
835
- return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
836
- } else {
837
- return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
838
- }
839
- }
840
- return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
841
- }
842
- throw new TypeError("val must be string, number or Buffer");
843
- }
844
- function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
845
- let indexSize = 1;
846
- let arrLength = arr.length;
847
- let valLength = val.length;
848
- if (encoding !== void 0) {
849
- encoding = String(encoding).toLowerCase();
850
- if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") {
851
- if (arr.length < 2 || val.length < 2) {
852
- return -1;
853
- }
854
- indexSize = 2;
855
- arrLength /= 2;
856
- valLength /= 2;
857
- byteOffset /= 2;
858
- }
859
- }
860
- function read(buf, i4) {
861
- if (indexSize === 1) {
862
- return buf[i4];
863
- } else {
864
- return buf.readUInt16BE(i4 * indexSize);
865
- }
866
- }
867
- let i3;
868
- if (dir) {
869
- let foundIndex = -1;
870
- for (i3 = byteOffset; i3 < arrLength; i3++) {
871
- if (read(arr, i3) === read(val, foundIndex === -1 ? 0 : i3 - foundIndex)) {
872
- if (foundIndex === -1)
873
- foundIndex = i3;
874
- if (i3 - foundIndex + 1 === valLength)
875
- return foundIndex * indexSize;
876
- } else {
877
- if (foundIndex !== -1)
878
- i3 -= i3 - foundIndex;
879
- foundIndex = -1;
880
- }
881
- }
882
- } else {
883
- if (byteOffset + valLength > arrLength)
884
- byteOffset = arrLength - valLength;
885
- for (i3 = byteOffset; i3 >= 0; i3--) {
886
- let found = true;
887
- for (let j2 = 0; j2 < valLength; j2++) {
888
- if (read(arr, i3 + j2) !== read(val, j2)) {
889
- found = false;
890
- break;
891
- }
892
- }
893
- if (found)
894
- return i3;
895
- }
896
- }
897
- return -1;
898
- }
899
- Buffer3.prototype.includes = function includes(val, byteOffset, encoding) {
900
- return this.indexOf(val, byteOffset, encoding) !== -1;
901
- };
902
- Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
903
- return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
904
- };
905
- Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
906
- return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
907
- };
908
- function hexWrite(buf, string, offset, length) {
909
- offset = Number(offset) || 0;
910
- const remaining = buf.length - offset;
911
- if (!length) {
912
- length = remaining;
913
- } else {
914
- length = Number(length);
915
- if (length > remaining) {
916
- length = remaining;
917
- }
918
- }
919
- const strLen = string.length;
920
- if (length > strLen / 2) {
921
- length = strLen / 2;
922
- }
923
- let i3;
924
- for (i3 = 0; i3 < length; ++i3) {
925
- const parsed = parseInt(string.substr(i3 * 2, 2), 16);
926
- if (numberIsNaN(parsed))
927
- return i3;
928
- buf[offset + i3] = parsed;
929
- }
930
- return i3;
931
- }
932
- function utf8Write(buf, string, offset, length) {
933
- return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
934
- }
935
- function asciiWrite(buf, string, offset, length) {
936
- return blitBuffer(asciiToBytes(string), buf, offset, length);
937
- }
938
- function base64Write(buf, string, offset, length) {
939
- return blitBuffer(base64ToBytes(string), buf, offset, length);
940
- }
941
- function ucs2Write(buf, string, offset, length) {
942
- return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
943
- }
944
- Buffer3.prototype.write = function write(string, offset, length, encoding) {
945
- if (offset === void 0) {
946
- encoding = "utf8";
947
- length = this.length;
948
- offset = 0;
949
- } else if (length === void 0 && typeof offset === "string") {
950
- encoding = offset;
951
- length = this.length;
952
- offset = 0;
953
- } else if (isFinite(offset)) {
954
- offset = offset >>> 0;
955
- if (isFinite(length)) {
956
- length = length >>> 0;
957
- if (encoding === void 0)
958
- encoding = "utf8";
959
- } else {
960
- encoding = length;
961
- length = void 0;
962
- }
963
- } else {
964
- throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
965
- }
966
- const remaining = this.length - offset;
967
- if (length === void 0 || length > remaining)
968
- length = remaining;
969
- if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
970
- throw new RangeError("Attempt to write outside buffer bounds");
971
- }
972
- if (!encoding)
973
- encoding = "utf8";
974
- let loweredCase = false;
975
- for (; ; ) {
976
- switch (encoding) {
977
- case "hex":
978
- return hexWrite(this, string, offset, length);
979
- case "utf8":
980
- case "utf-8":
981
- return utf8Write(this, string, offset, length);
982
- case "ascii":
983
- case "latin1":
984
- case "binary":
985
- return asciiWrite(this, string, offset, length);
986
- case "base64":
987
- return base64Write(this, string, offset, length);
988
- case "ucs2":
989
- case "ucs-2":
990
- case "utf16le":
991
- case "utf-16le":
992
- return ucs2Write(this, string, offset, length);
993
- default:
994
- if (loweredCase)
995
- throw new TypeError("Unknown encoding: " + encoding);
996
- encoding = ("" + encoding).toLowerCase();
997
- loweredCase = true;
998
- }
999
- }
1000
- };
1001
- Buffer3.prototype.toJSON = function toJSON() {
1002
- return {
1003
- type: "Buffer",
1004
- data: Array.prototype.slice.call(this._arr || this, 0)
1005
- };
1006
- };
1007
- function base64Slice(buf, start, end) {
1008
- if (start === 0 && end === buf.length) {
1009
- return base64.fromByteArray(buf);
1010
- } else {
1011
- return base64.fromByteArray(buf.slice(start, end));
1012
- }
1013
- }
1014
- function utf8Slice(buf, start, end) {
1015
- end = Math.min(buf.length, end);
1016
- const res = [];
1017
- let i3 = start;
1018
- while (i3 < end) {
1019
- const firstByte = buf[i3];
1020
- let codePoint = null;
1021
- let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
1022
- if (i3 + bytesPerSequence <= end) {
1023
- let secondByte, thirdByte, fourthByte, tempCodePoint;
1024
- switch (bytesPerSequence) {
1025
- case 1:
1026
- if (firstByte < 128) {
1027
- codePoint = firstByte;
1028
- }
1029
- break;
1030
- case 2:
1031
- secondByte = buf[i3 + 1];
1032
- if ((secondByte & 192) === 128) {
1033
- tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
1034
- if (tempCodePoint > 127) {
1035
- codePoint = tempCodePoint;
1036
- }
1037
- }
1038
- break;
1039
- case 3:
1040
- secondByte = buf[i3 + 1];
1041
- thirdByte = buf[i3 + 2];
1042
- if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
1043
- tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
1044
- if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
1045
- codePoint = tempCodePoint;
1046
- }
1047
- }
1048
- break;
1049
- case 4:
1050
- secondByte = buf[i3 + 1];
1051
- thirdByte = buf[i3 + 2];
1052
- fourthByte = buf[i3 + 3];
1053
- if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
1054
- tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
1055
- if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
1056
- codePoint = tempCodePoint;
1057
- }
1058
- }
1059
- }
1060
- }
1061
- if (codePoint === null) {
1062
- codePoint = 65533;
1063
- bytesPerSequence = 1;
1064
- } else if (codePoint > 65535) {
1065
- codePoint -= 65536;
1066
- res.push(codePoint >>> 10 & 1023 | 55296);
1067
- codePoint = 56320 | codePoint & 1023;
1068
- }
1069
- res.push(codePoint);
1070
- i3 += bytesPerSequence;
1071
- }
1072
- return decodeCodePointsArray(res);
1073
- }
1074
- const MAX_ARGUMENTS_LENGTH = 4096;
1075
- function decodeCodePointsArray(codePoints) {
1076
- const len = codePoints.length;
1077
- if (len <= MAX_ARGUMENTS_LENGTH) {
1078
- return String.fromCharCode.apply(String, codePoints);
1079
- }
1080
- let res = "";
1081
- let i3 = 0;
1082
- while (i3 < len) {
1083
- res += String.fromCharCode.apply(String, codePoints.slice(i3, i3 += MAX_ARGUMENTS_LENGTH));
1084
- }
1085
- return res;
1086
- }
1087
- function asciiSlice(buf, start, end) {
1088
- let ret = "";
1089
- end = Math.min(buf.length, end);
1090
- for (let i3 = start; i3 < end; ++i3) {
1091
- ret += String.fromCharCode(buf[i3] & 127);
1092
- }
1093
- return ret;
1094
- }
1095
- function latin1Slice(buf, start, end) {
1096
- let ret = "";
1097
- end = Math.min(buf.length, end);
1098
- for (let i3 = start; i3 < end; ++i3) {
1099
- ret += String.fromCharCode(buf[i3]);
1100
- }
1101
- return ret;
1102
- }
1103
- function hexSlice(buf, start, end) {
1104
- const len = buf.length;
1105
- if (!start || start < 0)
1106
- start = 0;
1107
- if (!end || end < 0 || end > len)
1108
- end = len;
1109
- let out = "";
1110
- for (let i3 = start; i3 < end; ++i3) {
1111
- out += hexSliceLookupTable[buf[i3]];
1112
- }
1113
- return out;
1114
- }
1115
- function utf16leSlice(buf, start, end) {
1116
- const bytes = buf.slice(start, end);
1117
- let res = "";
1118
- for (let i3 = 0; i3 < bytes.length - 1; i3 += 2) {
1119
- res += String.fromCharCode(bytes[i3] + bytes[i3 + 1] * 256);
1120
- }
1121
- return res;
1122
- }
1123
- Buffer3.prototype.slice = function slice(start, end) {
1124
- const len = this.length;
1125
- start = ~~start;
1126
- end = end === void 0 ? len : ~~end;
1127
- if (start < 0) {
1128
- start += len;
1129
- if (start < 0)
1130
- start = 0;
1131
- } else if (start > len) {
1132
- start = len;
1133
- }
1134
- if (end < 0) {
1135
- end += len;
1136
- if (end < 0)
1137
- end = 0;
1138
- } else if (end > len) {
1139
- end = len;
1140
- }
1141
- if (end < start)
1142
- end = start;
1143
- const newBuf = this.subarray(start, end);
1144
- Object.setPrototypeOf(newBuf, Buffer3.prototype);
1145
- return newBuf;
1146
- };
1147
- function checkOffset(offset, ext, length) {
1148
- if (offset % 1 !== 0 || offset < 0)
1149
- throw new RangeError("offset is not uint");
1150
- if (offset + ext > length)
1151
- throw new RangeError("Trying to access beyond buffer length");
1152
- }
1153
- Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) {
1154
- offset = offset >>> 0;
1155
- byteLength2 = byteLength2 >>> 0;
1156
- if (!noAssert)
1157
- checkOffset(offset, byteLength2, this.length);
1158
- let val = this[offset];
1159
- let mul = 1;
1160
- let i3 = 0;
1161
- while (++i3 < byteLength2 && (mul *= 256)) {
1162
- val += this[offset + i3] * mul;
1163
- }
1164
- return val;
1165
- };
1166
- Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) {
1167
- offset = offset >>> 0;
1168
- byteLength2 = byteLength2 >>> 0;
1169
- if (!noAssert) {
1170
- checkOffset(offset, byteLength2, this.length);
1171
- }
1172
- let val = this[offset + --byteLength2];
1173
- let mul = 1;
1174
- while (byteLength2 > 0 && (mul *= 256)) {
1175
- val += this[offset + --byteLength2] * mul;
1176
- }
1177
- return val;
1178
- };
1179
- Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset, noAssert) {
1180
- offset = offset >>> 0;
1181
- if (!noAssert)
1182
- checkOffset(offset, 1, this.length);
1183
- return this[offset];
1184
- };
1185
- Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
1186
- offset = offset >>> 0;
1187
- if (!noAssert)
1188
- checkOffset(offset, 2, this.length);
1189
- return this[offset] | this[offset + 1] << 8;
1190
- };
1191
- Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
1192
- offset = offset >>> 0;
1193
- if (!noAssert)
1194
- checkOffset(offset, 2, this.length);
1195
- return this[offset] << 8 | this[offset + 1];
1196
- };
1197
- Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
1198
- offset = offset >>> 0;
1199
- if (!noAssert)
1200
- checkOffset(offset, 4, this.length);
1201
- return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
1202
- };
1203
- Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
1204
- offset = offset >>> 0;
1205
- if (!noAssert)
1206
- checkOffset(offset, 4, this.length);
1207
- return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
1208
- };
1209
- Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
1210
- offset = offset >>> 0;
1211
- validateNumber(offset, "offset");
1212
- const first = this[offset];
1213
- const last = this[offset + 7];
1214
- if (first === void 0 || last === void 0) {
1215
- boundsError(offset, this.length - 8);
1216
- }
1217
- const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;
1218
- const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;
1219
- return BigInt(lo) + (BigInt(hi) << BigInt(32));
1220
- });
1221
- Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {
1222
- offset = offset >>> 0;
1223
- validateNumber(offset, "offset");
1224
- const first = this[offset];
1225
- const last = this[offset + 7];
1226
- if (first === void 0 || last === void 0) {
1227
- boundsError(offset, this.length - 8);
1228
- }
1229
- const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
1230
- const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
1231
- return (BigInt(hi) << BigInt(32)) + BigInt(lo);
1232
- });
1233
- Buffer3.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) {
1234
- offset = offset >>> 0;
1235
- byteLength2 = byteLength2 >>> 0;
1236
- if (!noAssert)
1237
- checkOffset(offset, byteLength2, this.length);
1238
- let val = this[offset];
1239
- let mul = 1;
1240
- let i3 = 0;
1241
- while (++i3 < byteLength2 && (mul *= 256)) {
1242
- val += this[offset + i3] * mul;
1243
- }
1244
- mul *= 128;
1245
- if (val >= mul)
1246
- val -= Math.pow(2, 8 * byteLength2);
1247
- return val;
1248
- };
1249
- Buffer3.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) {
1250
- offset = offset >>> 0;
1251
- byteLength2 = byteLength2 >>> 0;
1252
- if (!noAssert)
1253
- checkOffset(offset, byteLength2, this.length);
1254
- let i3 = byteLength2;
1255
- let mul = 1;
1256
- let val = this[offset + --i3];
1257
- while (i3 > 0 && (mul *= 256)) {
1258
- val += this[offset + --i3] * mul;
1259
- }
1260
- mul *= 128;
1261
- if (val >= mul)
1262
- val -= Math.pow(2, 8 * byteLength2);
1263
- return val;
1264
- };
1265
- Buffer3.prototype.readInt8 = function readInt8(offset, noAssert) {
1266
- offset = offset >>> 0;
1267
- if (!noAssert)
1268
- checkOffset(offset, 1, this.length);
1269
- if (!(this[offset] & 128))
1270
- return this[offset];
1271
- return (255 - this[offset] + 1) * -1;
1272
- };
1273
- Buffer3.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
1274
- offset = offset >>> 0;
1275
- if (!noAssert)
1276
- checkOffset(offset, 2, this.length);
1277
- const val = this[offset] | this[offset + 1] << 8;
1278
- return val & 32768 ? val | 4294901760 : val;
1279
- };
1280
- Buffer3.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
1281
- offset = offset >>> 0;
1282
- if (!noAssert)
1283
- checkOffset(offset, 2, this.length);
1284
- const val = this[offset + 1] | this[offset] << 8;
1285
- return val & 32768 ? val | 4294901760 : val;
1286
- };
1287
- Buffer3.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
1288
- offset = offset >>> 0;
1289
- if (!noAssert)
1290
- checkOffset(offset, 4, this.length);
1291
- return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
1292
- };
1293
- Buffer3.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
1294
- offset = offset >>> 0;
1295
- if (!noAssert)
1296
- checkOffset(offset, 4, this.length);
1297
- return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
1298
- };
1299
- Buffer3.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
1300
- offset = offset >>> 0;
1301
- validateNumber(offset, "offset");
1302
- const first = this[offset];
1303
- const last = this[offset + 7];
1304
- if (first === void 0 || last === void 0) {
1305
- boundsError(offset, this.length - 8);
1306
- }
1307
- const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);
1308
- return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);
1309
- });
1310
- Buffer3.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {
1311
- offset = offset >>> 0;
1312
- validateNumber(offset, "offset");
1313
- const first = this[offset];
1314
- const last = this[offset + 7];
1315
- if (first === void 0 || last === void 0) {
1316
- boundsError(offset, this.length - 8);
1317
- }
1318
- const val = (first << 24) + // Overflow
1319
- this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
1320
- return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);
1321
- });
1322
- Buffer3.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
1323
- offset = offset >>> 0;
1324
- if (!noAssert)
1325
- checkOffset(offset, 4, this.length);
1326
- return ieee754.read(this, offset, true, 23, 4);
1327
- };
1328
- Buffer3.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
1329
- offset = offset >>> 0;
1330
- if (!noAssert)
1331
- checkOffset(offset, 4, this.length);
1332
- return ieee754.read(this, offset, false, 23, 4);
1333
- };
1334
- Buffer3.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
1335
- offset = offset >>> 0;
1336
- if (!noAssert)
1337
- checkOffset(offset, 8, this.length);
1338
- return ieee754.read(this, offset, true, 52, 8);
1339
- };
1340
- Buffer3.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
1341
- offset = offset >>> 0;
1342
- if (!noAssert)
1343
- checkOffset(offset, 8, this.length);
1344
- return ieee754.read(this, offset, false, 52, 8);
1345
- };
1346
- function checkInt(buf, value, offset, ext, max, min) {
1347
- if (!Buffer3.isBuffer(buf))
1348
- throw new TypeError('"buffer" argument must be a Buffer instance');
1349
- if (value > max || value < min)
1350
- throw new RangeError('"value" argument is out of bounds');
1351
- if (offset + ext > buf.length)
1352
- throw new RangeError("Index out of range");
1353
- }
1354
- Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) {
1355
- value = +value;
1356
- offset = offset >>> 0;
1357
- byteLength2 = byteLength2 >>> 0;
1358
- if (!noAssert) {
1359
- const maxBytes = Math.pow(2, 8 * byteLength2) - 1;
1360
- checkInt(this, value, offset, byteLength2, maxBytes, 0);
1361
- }
1362
- let mul = 1;
1363
- let i3 = 0;
1364
- this[offset] = value & 255;
1365
- while (++i3 < byteLength2 && (mul *= 256)) {
1366
- this[offset + i3] = value / mul & 255;
1367
- }
1368
- return offset + byteLength2;
1369
- };
1370
- Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) {
1371
- value = +value;
1372
- offset = offset >>> 0;
1373
- byteLength2 = byteLength2 >>> 0;
1374
- if (!noAssert) {
1375
- const maxBytes = Math.pow(2, 8 * byteLength2) - 1;
1376
- checkInt(this, value, offset, byteLength2, maxBytes, 0);
1377
- }
1378
- let i3 = byteLength2 - 1;
1379
- let mul = 1;
1380
- this[offset + i3] = value & 255;
1381
- while (--i3 >= 0 && (mul *= 256)) {
1382
- this[offset + i3] = value / mul & 255;
1383
- }
1384
- return offset + byteLength2;
1385
- };
1386
- Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
1387
- value = +value;
1388
- offset = offset >>> 0;
1389
- if (!noAssert)
1390
- checkInt(this, value, offset, 1, 255, 0);
1391
- this[offset] = value & 255;
1392
- return offset + 1;
1393
- };
1394
- Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
1395
- value = +value;
1396
- offset = offset >>> 0;
1397
- if (!noAssert)
1398
- checkInt(this, value, offset, 2, 65535, 0);
1399
- this[offset] = value & 255;
1400
- this[offset + 1] = value >>> 8;
1401
- return offset + 2;
1402
- };
1403
- Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
1404
- value = +value;
1405
- offset = offset >>> 0;
1406
- if (!noAssert)
1407
- checkInt(this, value, offset, 2, 65535, 0);
1408
- this[offset] = value >>> 8;
1409
- this[offset + 1] = value & 255;
1410
- return offset + 2;
1411
- };
1412
- Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
1413
- value = +value;
1414
- offset = offset >>> 0;
1415
- if (!noAssert)
1416
- checkInt(this, value, offset, 4, 4294967295, 0);
1417
- this[offset + 3] = value >>> 24;
1418
- this[offset + 2] = value >>> 16;
1419
- this[offset + 1] = value >>> 8;
1420
- this[offset] = value & 255;
1421
- return offset + 4;
1422
- };
1423
- Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
1424
- value = +value;
1425
- offset = offset >>> 0;
1426
- if (!noAssert)
1427
- checkInt(this, value, offset, 4, 4294967295, 0);
1428
- this[offset] = value >>> 24;
1429
- this[offset + 1] = value >>> 16;
1430
- this[offset + 2] = value >>> 8;
1431
- this[offset + 3] = value & 255;
1432
- return offset + 4;
1433
- };
1434
- function wrtBigUInt64LE(buf, value, offset, min, max) {
1435
- checkIntBI(value, min, max, buf, offset, 7);
1436
- let lo = Number(value & BigInt(4294967295));
1437
- buf[offset++] = lo;
1438
- lo = lo >> 8;
1439
- buf[offset++] = lo;
1440
- lo = lo >> 8;
1441
- buf[offset++] = lo;
1442
- lo = lo >> 8;
1443
- buf[offset++] = lo;
1444
- let hi = Number(value >> BigInt(32) & BigInt(4294967295));
1445
- buf[offset++] = hi;
1446
- hi = hi >> 8;
1447
- buf[offset++] = hi;
1448
- hi = hi >> 8;
1449
- buf[offset++] = hi;
1450
- hi = hi >> 8;
1451
- buf[offset++] = hi;
1452
- return offset;
1453
- }
1454
- function wrtBigUInt64BE(buf, value, offset, min, max) {
1455
- checkIntBI(value, min, max, buf, offset, 7);
1456
- let lo = Number(value & BigInt(4294967295));
1457
- buf[offset + 7] = lo;
1458
- lo = lo >> 8;
1459
- buf[offset + 6] = lo;
1460
- lo = lo >> 8;
1461
- buf[offset + 5] = lo;
1462
- lo = lo >> 8;
1463
- buf[offset + 4] = lo;
1464
- let hi = Number(value >> BigInt(32) & BigInt(4294967295));
1465
- buf[offset + 3] = hi;
1466
- hi = hi >> 8;
1467
- buf[offset + 2] = hi;
1468
- hi = hi >> 8;
1469
- buf[offset + 1] = hi;
1470
- hi = hi >> 8;
1471
- buf[offset] = hi;
1472
- return offset + 8;
1473
- }
1474
- Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {
1475
- return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
1476
- });
1477
- Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {
1478
- return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
1479
- });
1480
- Buffer3.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) {
1481
- value = +value;
1482
- offset = offset >>> 0;
1483
- if (!noAssert) {
1484
- const limit = Math.pow(2, 8 * byteLength2 - 1);
1485
- checkInt(this, value, offset, byteLength2, limit - 1, -limit);
1486
- }
1487
- let i3 = 0;
1488
- let mul = 1;
1489
- let sub = 0;
1490
- this[offset] = value & 255;
1491
- while (++i3 < byteLength2 && (mul *= 256)) {
1492
- if (value < 0 && sub === 0 && this[offset + i3 - 1] !== 0) {
1493
- sub = 1;
1494
- }
1495
- this[offset + i3] = (value / mul >> 0) - sub & 255;
1496
- }
1497
- return offset + byteLength2;
1498
- };
1499
- Buffer3.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) {
1500
- value = +value;
1501
- offset = offset >>> 0;
1502
- if (!noAssert) {
1503
- const limit = Math.pow(2, 8 * byteLength2 - 1);
1504
- checkInt(this, value, offset, byteLength2, limit - 1, -limit);
1505
- }
1506
- let i3 = byteLength2 - 1;
1507
- let mul = 1;
1508
- let sub = 0;
1509
- this[offset + i3] = value & 255;
1510
- while (--i3 >= 0 && (mul *= 256)) {
1511
- if (value < 0 && sub === 0 && this[offset + i3 + 1] !== 0) {
1512
- sub = 1;
1513
- }
1514
- this[offset + i3] = (value / mul >> 0) - sub & 255;
1515
- }
1516
- return offset + byteLength2;
1517
- };
1518
- Buffer3.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
1519
- value = +value;
1520
- offset = offset >>> 0;
1521
- if (!noAssert)
1522
- checkInt(this, value, offset, 1, 127, -128);
1523
- if (value < 0)
1524
- value = 255 + value + 1;
1525
- this[offset] = value & 255;
1526
- return offset + 1;
1527
- };
1528
- Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
1529
- value = +value;
1530
- offset = offset >>> 0;
1531
- if (!noAssert)
1532
- checkInt(this, value, offset, 2, 32767, -32768);
1533
- this[offset] = value & 255;
1534
- this[offset + 1] = value >>> 8;
1535
- return offset + 2;
1536
- };
1537
- Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
1538
- value = +value;
1539
- offset = offset >>> 0;
1540
- if (!noAssert)
1541
- checkInt(this, value, offset, 2, 32767, -32768);
1542
- this[offset] = value >>> 8;
1543
- this[offset + 1] = value & 255;
1544
- return offset + 2;
1545
- };
1546
- Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
1547
- value = +value;
1548
- offset = offset >>> 0;
1549
- if (!noAssert)
1550
- checkInt(this, value, offset, 4, 2147483647, -2147483648);
1551
- this[offset] = value & 255;
1552
- this[offset + 1] = value >>> 8;
1553
- this[offset + 2] = value >>> 16;
1554
- this[offset + 3] = value >>> 24;
1555
- return offset + 4;
1556
- };
1557
- Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
1558
- value = +value;
1559
- offset = offset >>> 0;
1560
- if (!noAssert)
1561
- checkInt(this, value, offset, 4, 2147483647, -2147483648);
1562
- if (value < 0)
1563
- value = 4294967295 + value + 1;
1564
- this[offset] = value >>> 24;
1565
- this[offset + 1] = value >>> 16;
1566
- this[offset + 2] = value >>> 8;
1567
- this[offset + 3] = value & 255;
1568
- return offset + 4;
1569
- };
1570
- Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {
1571
- return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1572
- });
1573
- Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {
1574
- return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1575
- });
1576
- function checkIEEE754(buf, value, offset, ext, max, min) {
1577
- if (offset + ext > buf.length)
1578
- throw new RangeError("Index out of range");
1579
- if (offset < 0)
1580
- throw new RangeError("Index out of range");
1581
- }
1582
- function writeFloat(buf, value, offset, littleEndian, noAssert) {
1583
- value = +value;
1584
- offset = offset >>> 0;
1585
- if (!noAssert) {
1586
- checkIEEE754(buf, value, offset, 4);
1587
- }
1588
- ieee754.write(buf, value, offset, littleEndian, 23, 4);
1589
- return offset + 4;
1590
- }
1591
- Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
1592
- return writeFloat(this, value, offset, true, noAssert);
1593
- };
1594
- Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
1595
- return writeFloat(this, value, offset, false, noAssert);
1596
- };
1597
- function writeDouble(buf, value, offset, littleEndian, noAssert) {
1598
- value = +value;
1599
- offset = offset >>> 0;
1600
- if (!noAssert) {
1601
- checkIEEE754(buf, value, offset, 8);
1602
- }
1603
- ieee754.write(buf, value, offset, littleEndian, 52, 8);
1604
- return offset + 8;
1605
- }
1606
- Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
1607
- return writeDouble(this, value, offset, true, noAssert);
1608
- };
1609
- Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
1610
- return writeDouble(this, value, offset, false, noAssert);
1611
- };
1612
- Buffer3.prototype.copy = function copy(target, targetStart, start, end) {
1613
- if (!Buffer3.isBuffer(target))
1614
- throw new TypeError("argument should be a Buffer");
1615
- if (!start)
1616
- start = 0;
1617
- if (!end && end !== 0)
1618
- end = this.length;
1619
- if (targetStart >= target.length)
1620
- targetStart = target.length;
1621
- if (!targetStart)
1622
- targetStart = 0;
1623
- if (end > 0 && end < start)
1624
- end = start;
1625
- if (end === start)
1626
- return 0;
1627
- if (target.length === 0 || this.length === 0)
1628
- return 0;
1629
- if (targetStart < 0) {
1630
- throw new RangeError("targetStart out of bounds");
1631
- }
1632
- if (start < 0 || start >= this.length)
1633
- throw new RangeError("Index out of range");
1634
- if (end < 0)
1635
- throw new RangeError("sourceEnd out of bounds");
1636
- if (end > this.length)
1637
- end = this.length;
1638
- if (target.length - targetStart < end - start) {
1639
- end = target.length - targetStart + start;
1640
- }
1641
- const len = end - start;
1642
- if (this === target && typeof Uint8Array.prototype.copyWithin === "function") {
1643
- this.copyWithin(targetStart, start, end);
1644
- } else {
1645
- Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
1646
- }
1647
- return len;
1648
- };
1649
- Buffer3.prototype.fill = function fill(val, start, end, encoding) {
1650
- if (typeof val === "string") {
1651
- if (typeof start === "string") {
1652
- encoding = start;
1653
- start = 0;
1654
- end = this.length;
1655
- } else if (typeof end === "string") {
1656
- encoding = end;
1657
- end = this.length;
1658
- }
1659
- if (encoding !== void 0 && typeof encoding !== "string") {
1660
- throw new TypeError("encoding must be a string");
1661
- }
1662
- if (typeof encoding === "string" && !Buffer3.isEncoding(encoding)) {
1663
- throw new TypeError("Unknown encoding: " + encoding);
1664
- }
1665
- if (val.length === 1) {
1666
- const code = val.charCodeAt(0);
1667
- if (encoding === "utf8" && code < 128 || encoding === "latin1") {
1668
- val = code;
1669
- }
1670
- }
1671
- } else if (typeof val === "number") {
1672
- val = val & 255;
1673
- } else if (typeof val === "boolean") {
1674
- val = Number(val);
1675
- }
1676
- if (start < 0 || this.length < start || this.length < end) {
1677
- throw new RangeError("Out of range index");
1678
- }
1679
- if (end <= start) {
1680
- return this;
1681
- }
1682
- start = start >>> 0;
1683
- end = end === void 0 ? this.length : end >>> 0;
1684
- if (!val)
1685
- val = 0;
1686
- let i3;
1687
- if (typeof val === "number") {
1688
- for (i3 = start; i3 < end; ++i3) {
1689
- this[i3] = val;
1690
- }
1691
- } else {
1692
- const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);
1693
- const len = bytes.length;
1694
- if (len === 0) {
1695
- throw new TypeError('The value "' + val + '" is invalid for argument "value"');
1696
- }
1697
- for (i3 = 0; i3 < end - start; ++i3) {
1698
- this[i3 + start] = bytes[i3 % len];
1699
- }
1700
- }
1701
- return this;
1702
- };
1703
- const errors = {};
1704
- function E2(sym, getMessage, Base) {
1705
- errors[sym] = class NodeError extends Base {
1706
- constructor() {
1707
- super();
1708
- Object.defineProperty(this, "message", {
1709
- value: getMessage.apply(this, arguments),
1710
- writable: true,
1711
- configurable: true
1712
- });
1713
- this.name = `${this.name} [${sym}]`;
1714
- this.stack;
1715
- delete this.name;
1716
- }
1717
- get code() {
1718
- return sym;
1719
- }
1720
- set code(value) {
1721
- Object.defineProperty(this, "code", {
1722
- configurable: true,
1723
- enumerable: true,
1724
- value,
1725
- writable: true
1726
- });
1727
- }
1728
- toString() {
1729
- return `${this.name} [${sym}]: ${this.message}`;
1730
- }
1731
- };
1732
- }
1733
- E2("ERR_BUFFER_OUT_OF_BOUNDS", function(name) {
1734
- if (name) {
1735
- return `${name} is outside of buffer bounds`;
1736
- }
1737
- return "Attempt to access memory outside buffer bounds";
1738
- }, RangeError);
1739
- E2("ERR_INVALID_ARG_TYPE", function(name, actual) {
1740
- return `The "${name}" argument must be of type number. Received type ${typeof actual}`;
1741
- }, TypeError);
1742
- E2("ERR_OUT_OF_RANGE", function(str, range, input) {
1743
- let msg = `The value of "${str}" is out of range.`;
1744
- let received = input;
1745
- if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
1746
- received = addNumericalSeparator(String(input));
1747
- } else if (typeof input === "bigint") {
1748
- received = String(input);
1749
- if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
1750
- received = addNumericalSeparator(received);
1751
- }
1752
- received += "n";
1753
- }
1754
- msg += ` It must be ${range}. Received ${received}`;
1755
- return msg;
1756
- }, RangeError);
1757
- function addNumericalSeparator(val) {
1758
- let res = "";
1759
- let i3 = val.length;
1760
- const start = val[0] === "-" ? 1 : 0;
1761
- for (; i3 >= start + 4; i3 -= 3) {
1762
- res = `_${val.slice(i3 - 3, i3)}${res}`;
1763
- }
1764
- return `${val.slice(0, i3)}${res}`;
1765
- }
1766
- function checkBounds(buf, offset, byteLength2) {
1767
- validateNumber(offset, "offset");
1768
- if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) {
1769
- boundsError(offset, buf.length - (byteLength2 + 1));
1770
- }
1771
- }
1772
- function checkIntBI(value, min, max, buf, offset, byteLength2) {
1773
- if (value > max || value < min) {
1774
- const n3 = typeof min === "bigint" ? "n" : "";
1775
- let range;
1776
- if (byteLength2 > 3) {
1777
- if (min === 0 || min === BigInt(0)) {
1778
- range = `>= 0${n3} and < 2${n3} ** ${(byteLength2 + 1) * 8}${n3}`;
1779
- } else {
1780
- range = `>= -(2${n3} ** ${(byteLength2 + 1) * 8 - 1}${n3}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n3}`;
1781
- }
1782
- } else {
1783
- range = `>= ${min}${n3} and <= ${max}${n3}`;
1784
- }
1785
- throw new errors.ERR_OUT_OF_RANGE("value", range, value);
1786
- }
1787
- checkBounds(buf, offset, byteLength2);
1788
- }
1789
- function validateNumber(value, name) {
1790
- if (typeof value !== "number") {
1791
- throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value);
1792
- }
1793
- }
1794
- function boundsError(value, length, type) {
1795
- if (Math.floor(value) !== value) {
1796
- validateNumber(value, type);
1797
- throw new errors.ERR_OUT_OF_RANGE(type || "offset", "an integer", value);
1798
- }
1799
- if (length < 0) {
1800
- throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
1801
- }
1802
- throw new errors.ERR_OUT_OF_RANGE(type || "offset", `>= ${type ? 1 : 0} and <= ${length}`, value);
1803
- }
1804
- const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
1805
- function base64clean(str) {
1806
- str = str.split("=")[0];
1807
- str = str.trim().replace(INVALID_BASE64_RE, "");
1808
- if (str.length < 2)
1809
- return "";
1810
- while (str.length % 4 !== 0) {
1811
- str = str + "=";
1812
- }
1813
- return str;
1814
- }
1815
- function utf8ToBytes(string, units) {
1816
- units = units || Infinity;
1817
- let codePoint;
1818
- const length = string.length;
1819
- let leadSurrogate = null;
1820
- const bytes = [];
1821
- for (let i3 = 0; i3 < length; ++i3) {
1822
- codePoint = string.charCodeAt(i3);
1823
- if (codePoint > 55295 && codePoint < 57344) {
1824
- if (!leadSurrogate) {
1825
- if (codePoint > 56319) {
1826
- if ((units -= 3) > -1)
1827
- bytes.push(239, 191, 189);
1828
- continue;
1829
- } else if (i3 + 1 === length) {
1830
- if ((units -= 3) > -1)
1831
- bytes.push(239, 191, 189);
1832
- continue;
1833
- }
1834
- leadSurrogate = codePoint;
1835
- continue;
1836
- }
1837
- if (codePoint < 56320) {
1838
- if ((units -= 3) > -1)
1839
- bytes.push(239, 191, 189);
1840
- leadSurrogate = codePoint;
1841
- continue;
1842
- }
1843
- codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
1844
- } else if (leadSurrogate) {
1845
- if ((units -= 3) > -1)
1846
- bytes.push(239, 191, 189);
1847
- }
1848
- leadSurrogate = null;
1849
- if (codePoint < 128) {
1850
- if ((units -= 1) < 0)
1851
- break;
1852
- bytes.push(codePoint);
1853
- } else if (codePoint < 2048) {
1854
- if ((units -= 2) < 0)
1855
- break;
1856
- bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);
1857
- } else if (codePoint < 65536) {
1858
- if ((units -= 3) < 0)
1859
- break;
1860
- bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
1861
- } else if (codePoint < 1114112) {
1862
- if ((units -= 4) < 0)
1863
- break;
1864
- bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
1865
- } else {
1866
- throw new Error("Invalid code point");
1867
- }
1868
- }
1869
- return bytes;
1870
- }
1871
- function asciiToBytes(str) {
1872
- const byteArray = [];
1873
- for (let i3 = 0; i3 < str.length; ++i3) {
1874
- byteArray.push(str.charCodeAt(i3) & 255);
1875
- }
1876
- return byteArray;
1877
- }
1878
- function utf16leToBytes(str, units) {
1879
- let c3, hi, lo;
1880
- const byteArray = [];
1881
- for (let i3 = 0; i3 < str.length; ++i3) {
1882
- if ((units -= 2) < 0)
1883
- break;
1884
- c3 = str.charCodeAt(i3);
1885
- hi = c3 >> 8;
1886
- lo = c3 % 256;
1887
- byteArray.push(lo);
1888
- byteArray.push(hi);
1889
- }
1890
- return byteArray;
1891
- }
1892
- function base64ToBytes(str) {
1893
- return base64.toByteArray(base64clean(str));
1894
- }
1895
- function blitBuffer(src, dst, offset, length) {
1896
- let i3;
1897
- for (i3 = 0; i3 < length; ++i3) {
1898
- if (i3 + offset >= dst.length || i3 >= src.length)
1899
- break;
1900
- dst[i3 + offset] = src[i3];
1901
- }
1902
- return i3;
1903
- }
1904
- function isInstance(obj, type) {
1905
- return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
1906
- }
1907
- function numberIsNaN(obj) {
1908
- return obj !== obj;
1909
- }
1910
- const hexSliceLookupTable = function() {
1911
- const alphabet = "0123456789abcdef";
1912
- const table = new Array(256);
1913
- for (let i3 = 0; i3 < 16; ++i3) {
1914
- const i16 = i3 * 16;
1915
- for (let j2 = 0; j2 < 16; ++j2) {
1916
- table[i16 + j2] = alphabet[i3] + alphabet[j2];
1917
- }
1918
- }
1919
- return table;
1920
- }();
1921
- function defineBigIntMethod(fn) {
1922
- return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
1923
- }
1924
- function BufferBigIntNotDefined() {
1925
- throw new Error("BigInt not supported");
1926
- }
1927
- return exports$1;
1928
- }
1929
- var exports$3, _dewExec$2, exports$2, _dewExec$1, exports$1, _dewExec, exports, Buffer2, INSPECT_MAX_BYTES, kMaxLength;
1930
- var init_buffer = __esm({
1931
- "../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/buffer.js"() {
1932
- "use strict";
1933
- init_dirname();
1934
- init_buffer2();
1935
- init_process2();
1936
- exports$3 = {};
1937
- _dewExec$2 = false;
1938
- exports$2 = {};
1939
- _dewExec$1 = false;
1940
- exports$1 = {};
1941
- _dewExec = false;
1942
- exports = dew();
1943
- exports["Buffer"];
1944
- exports["SlowBuffer"];
1945
- exports["INSPECT_MAX_BYTES"];
1946
- exports["kMaxLength"];
1947
- Buffer2 = exports.Buffer;
1948
- INSPECT_MAX_BYTES = exports.INSPECT_MAX_BYTES;
1949
- kMaxLength = exports.kMaxLength;
1950
- }
1951
- });
1952
-
1953
- // ../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.12.29/node_modules/esbuild-plugin-polyfill-node/polyfills/buffer.js
1954
- var init_buffer2 = __esm({
1955
- "../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.12.29/node_modules/esbuild-plugin-polyfill-node/polyfills/buffer.js"() {
1956
- "use strict";
1957
- init_buffer();
1958
- }
1959
- });
1960
-
1961
- // ../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/chunk-5decc758.js
1962
- function i() {
1963
- throw new Error("setTimeout has not been defined");
1964
- }
1965
- function u() {
1966
- throw new Error("clearTimeout has not been defined");
1967
- }
1968
- function c(e3) {
1969
- if (t === setTimeout)
1970
- return setTimeout(e3, 0);
1971
- if ((t === i || !t) && setTimeout)
1972
- return t = setTimeout, setTimeout(e3, 0);
1973
- try {
1974
- return t(e3, 0);
1975
- } catch (n3) {
1976
- try {
1977
- return t.call(null, e3, 0);
1978
- } catch (n4) {
1979
- return t.call(this || r, e3, 0);
1980
- }
1981
- }
1982
- }
1983
- function h() {
1984
- f && l && (f = false, l.length ? s = l.concat(s) : a = -1, s.length && d());
1985
- }
1986
- function d() {
1987
- if (!f) {
1988
- var e3 = c(h);
1989
- f = true;
1990
- for (var t3 = s.length; t3; ) {
1991
- for (l = s, s = []; ++a < t3; )
1992
- l && l[a].run();
1993
- a = -1, t3 = s.length;
1994
- }
1995
- l = null, f = false, function(e4) {
1996
- if (n === clearTimeout)
1997
- return clearTimeout(e4);
1998
- if ((n === u || !n) && clearTimeout)
1999
- return n = clearTimeout, clearTimeout(e4);
2000
- try {
2001
- n(e4);
2002
- } catch (t4) {
2003
- try {
2004
- return n.call(null, e4);
2005
- } catch (t5) {
2006
- return n.call(this || r, e4);
2007
- }
2008
- }
2009
- }(e3);
2010
- }
2011
- }
2012
- function m(e3, t3) {
2013
- (this || r).fun = e3, (this || r).array = t3;
2014
- }
2015
- function p() {
2016
- }
2017
- var e, t, n, r, o, l, s, f, a, T;
2018
- var init_chunk_5decc758 = __esm({
2019
- "../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/chunk-5decc758.js"() {
2020
- "use strict";
2021
- init_dirname();
2022
- init_buffer2();
2023
- init_process2();
2024
- r = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : global;
2025
- o = e = {};
2026
- !function() {
2027
- try {
2028
- t = "function" == typeof setTimeout ? setTimeout : i;
2029
- } catch (e3) {
2030
- t = i;
2031
- }
2032
- try {
2033
- n = "function" == typeof clearTimeout ? clearTimeout : u;
2034
- } catch (e3) {
2035
- n = u;
2036
- }
2037
- }();
2038
- s = [];
2039
- f = false;
2040
- a = -1;
2041
- o.nextTick = function(e3) {
2042
- var t3 = new Array(arguments.length - 1);
2043
- if (arguments.length > 1)
2044
- for (var n3 = 1; n3 < arguments.length; n3++)
2045
- t3[n3 - 1] = arguments[n3];
2046
- s.push(new m(e3, t3)), 1 !== s.length || f || c(d);
2047
- }, m.prototype.run = function() {
2048
- (this || r).fun.apply(null, (this || r).array);
2049
- }, o.title = "browser", o.browser = true, o.env = {}, o.argv = [], o.version = "", o.versions = {}, o.on = p, o.addListener = p, o.once = p, o.off = p, o.removeListener = p, o.removeAllListeners = p, o.emit = p, o.prependListener = p, o.prependOnceListener = p, o.listeners = function(e3) {
2050
- return [];
2051
- }, o.binding = function(e3) {
2052
- throw new Error("process.binding is not supported");
2053
- }, o.cwd = function() {
2054
- return "/";
2055
- }, o.chdir = function(e3) {
2056
- throw new Error("process.chdir is not supported");
2057
- }, o.umask = function() {
2058
- return 0;
2059
- };
2060
- T = e;
2061
- T.addListener;
2062
- T.argv;
2063
- T.binding;
2064
- T.browser;
2065
- T.chdir;
2066
- T.cwd;
2067
- T.emit;
2068
- T.env;
2069
- T.listeners;
2070
- T.nextTick;
2071
- T.off;
2072
- T.on;
2073
- T.once;
2074
- T.prependListener;
2075
- T.prependOnceListener;
2076
- T.removeAllListeners;
2077
- T.removeListener;
2078
- T.title;
2079
- T.umask;
2080
- T.version;
2081
- T.versions;
2082
- }
2083
- });
2084
-
2085
- // ../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/chunk-b4205b57.js
2086
- function c$1(e3) {
2087
- return e3.call.bind(e3);
2088
- }
2089
- function O(e3, t3) {
2090
- if ("object" != typeof e3)
2091
- return false;
2092
- try {
2093
- return t3(e3), true;
2094
- } catch (e4) {
2095
- return false;
2096
- }
2097
- }
2098
- function S(e3) {
2099
- return l$1 && y ? void 0 !== b(e3) : B(e3) || k(e3) || E(e3) || D(e3) || U(e3) || P(e3) || x(e3) || I(e3) || M(e3) || z(e3) || F(e3);
2100
- }
2101
- function B(e3) {
2102
- return l$1 && y ? "Uint8Array" === b(e3) : "[object Uint8Array]" === m2(e3) || u$1(e3) && void 0 !== e3.buffer;
2103
- }
2104
- function k(e3) {
2105
- return l$1 && y ? "Uint8ClampedArray" === b(e3) : "[object Uint8ClampedArray]" === m2(e3);
2106
- }
2107
- function E(e3) {
2108
- return l$1 && y ? "Uint16Array" === b(e3) : "[object Uint16Array]" === m2(e3);
2109
- }
2110
- function D(e3) {
2111
- return l$1 && y ? "Uint32Array" === b(e3) : "[object Uint32Array]" === m2(e3);
2112
- }
2113
- function U(e3) {
2114
- return l$1 && y ? "Int8Array" === b(e3) : "[object Int8Array]" === m2(e3);
2115
- }
2116
- function P(e3) {
2117
- return l$1 && y ? "Int16Array" === b(e3) : "[object Int16Array]" === m2(e3);
2118
- }
2119
- function x(e3) {
2120
- return l$1 && y ? "Int32Array" === b(e3) : "[object Int32Array]" === m2(e3);
2121
- }
2122
- function I(e3) {
2123
- return l$1 && y ? "Float32Array" === b(e3) : "[object Float32Array]" === m2(e3);
2124
- }
2125
- function M(e3) {
2126
- return l$1 && y ? "Float64Array" === b(e3) : "[object Float64Array]" === m2(e3);
2127
- }
2128
- function z(e3) {
2129
- return l$1 && y ? "BigInt64Array" === b(e3) : "[object BigInt64Array]" === m2(e3);
2130
- }
2131
- function F(e3) {
2132
- return l$1 && y ? "BigUint64Array" === b(e3) : "[object BigUint64Array]" === m2(e3);
2133
- }
2134
- function T2(e3) {
2135
- return "[object Map]" === m2(e3);
2136
- }
2137
- function N(e3) {
2138
- return "[object Set]" === m2(e3);
2139
- }
2140
- function W(e3) {
2141
- return "[object WeakMap]" === m2(e3);
2142
- }
2143
- function $(e3) {
2144
- return "[object WeakSet]" === m2(e3);
2145
- }
2146
- function C(e3) {
2147
- return "[object ArrayBuffer]" === m2(e3);
2148
- }
2149
- function V(e3) {
2150
- return "undefined" != typeof ArrayBuffer && (C.working ? C(e3) : e3 instanceof ArrayBuffer);
2151
- }
2152
- function G(e3) {
2153
- return "[object DataView]" === m2(e3);
2154
- }
2155
- function R(e3) {
2156
- return "undefined" != typeof DataView && (G.working ? G(e3) : e3 instanceof DataView);
2157
- }
2158
- function J(e3) {
2159
- return "[object SharedArrayBuffer]" === m2(e3);
2160
- }
2161
- function _(e3) {
2162
- return "undefined" != typeof SharedArrayBuffer && (J.working ? J(e3) : e3 instanceof SharedArrayBuffer);
2163
- }
2164
- function H(e3) {
2165
- return O(e3, h2);
2166
- }
2167
- function Z(e3) {
2168
- return O(e3, j);
2169
- }
2170
- function q(e3) {
2171
- return O(e3, A);
2172
- }
2173
- function K(e3) {
2174
- return s2 && O(e3, w);
2175
- }
2176
- function L(e3) {
2177
- return p2 && O(e3, v);
2178
- }
2179
- function oe(e3, t3) {
2180
- var r3 = { seen: [], stylize: fe };
2181
- return arguments.length >= 3 && (r3.depth = arguments[2]), arguments.length >= 4 && (r3.colors = arguments[3]), ye(t3) ? r3.showHidden = t3 : t3 && X._extend(r3, t3), be(r3.showHidden) && (r3.showHidden = false), be(r3.depth) && (r3.depth = 2), be(r3.colors) && (r3.colors = false), be(r3.customInspect) && (r3.customInspect = true), r3.colors && (r3.stylize = ue), ae(r3, e3, r3.depth);
2182
- }
2183
- function ue(e3, t3) {
2184
- var r3 = oe.styles[t3];
2185
- return r3 ? "\x1B[" + oe.colors[r3][0] + "m" + e3 + "\x1B[" + oe.colors[r3][1] + "m" : e3;
2186
- }
2187
- function fe(e3, t3) {
2188
- return e3;
2189
- }
2190
- function ae(e3, t3, r3) {
2191
- if (e3.customInspect && t3 && we(t3.inspect) && t3.inspect !== X.inspect && (!t3.constructor || t3.constructor.prototype !== t3)) {
2192
- var n3 = t3.inspect(r3, e3);
2193
- return ge(n3) || (n3 = ae(e3, n3, r3)), n3;
2194
- }
2195
- var i3 = function(e4, t4) {
2196
- if (be(t4))
2197
- return e4.stylize("undefined", "undefined");
2198
- if (ge(t4)) {
2199
- var r4 = "'" + JSON.stringify(t4).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
2200
- return e4.stylize(r4, "string");
2201
- }
2202
- if (de(t4))
2203
- return e4.stylize("" + t4, "number");
2204
- if (ye(t4))
2205
- return e4.stylize("" + t4, "boolean");
2206
- if (le(t4))
2207
- return e4.stylize("null", "null");
2208
- }(e3, t3);
2209
- if (i3)
2210
- return i3;
2211
- var o3 = Object.keys(t3), u3 = function(e4) {
2212
- var t4 = {};
2213
- return e4.forEach(function(e5, r4) {
2214
- t4[e5] = true;
2215
- }), t4;
2216
- }(o3);
2217
- if (e3.showHidden && (o3 = Object.getOwnPropertyNames(t3)), Ae(t3) && (o3.indexOf("message") >= 0 || o3.indexOf("description") >= 0))
2218
- return ce(t3);
2219
- if (0 === o3.length) {
2220
- if (we(t3)) {
2221
- var f3 = t3.name ? ": " + t3.name : "";
2222
- return e3.stylize("[Function" + f3 + "]", "special");
2223
- }
2224
- if (me(t3))
2225
- return e3.stylize(RegExp.prototype.toString.call(t3), "regexp");
2226
- if (je(t3))
2227
- return e3.stylize(Date.prototype.toString.call(t3), "date");
2228
- if (Ae(t3))
2229
- return ce(t3);
2230
- }
2231
- var a3, c3 = "", s3 = false, p3 = ["{", "}"];
2232
- (pe(t3) && (s3 = true, p3 = ["[", "]"]), we(t3)) && (c3 = " [Function" + (t3.name ? ": " + t3.name : "") + "]");
2233
- return me(t3) && (c3 = " " + RegExp.prototype.toString.call(t3)), je(t3) && (c3 = " " + Date.prototype.toUTCString.call(t3)), Ae(t3) && (c3 = " " + ce(t3)), 0 !== o3.length || s3 && 0 != t3.length ? r3 < 0 ? me(t3) ? e3.stylize(RegExp.prototype.toString.call(t3), "regexp") : e3.stylize("[Object]", "special") : (e3.seen.push(t3), a3 = s3 ? function(e4, t4, r4, n4, i4) {
2234
- for (var o4 = [], u4 = 0, f4 = t4.length; u4 < f4; ++u4)
2235
- ke(t4, String(u4)) ? o4.push(se(e4, t4, r4, n4, String(u4), true)) : o4.push("");
2236
- return i4.forEach(function(i5) {
2237
- i5.match(/^\d+$/) || o4.push(se(e4, t4, r4, n4, i5, true));
2238
- }), o4;
2239
- }(e3, t3, r3, u3, o3) : o3.map(function(n4) {
2240
- return se(e3, t3, r3, u3, n4, s3);
2241
- }), e3.seen.pop(), function(e4, t4, r4) {
2242
- var n4 = 0;
2243
- if (e4.reduce(function(e5, t5) {
2244
- return n4++, t5.indexOf("\n") >= 0 && n4++, e5 + t5.replace(/\u001b\[\d\d?m/g, "").length + 1;
2245
- }, 0) > 60)
2246
- return r4[0] + ("" === t4 ? "" : t4 + "\n ") + " " + e4.join(",\n ") + " " + r4[1];
2247
- return r4[0] + t4 + " " + e4.join(", ") + " " + r4[1];
2248
- }(a3, c3, p3)) : p3[0] + c3 + p3[1];
2249
- }
2250
- function ce(e3) {
2251
- return "[" + Error.prototype.toString.call(e3) + "]";
2252
- }
2253
- function se(e3, t3, r3, n3, i3, o3) {
2254
- var u3, f3, a3;
2255
- if ((a3 = Object.getOwnPropertyDescriptor(t3, i3) || { value: t3[i3] }).get ? f3 = a3.set ? e3.stylize("[Getter/Setter]", "special") : e3.stylize("[Getter]", "special") : a3.set && (f3 = e3.stylize("[Setter]", "special")), ke(n3, i3) || (u3 = "[" + i3 + "]"), f3 || (e3.seen.indexOf(a3.value) < 0 ? (f3 = le(r3) ? ae(e3, a3.value, null) : ae(e3, a3.value, r3 - 1)).indexOf("\n") > -1 && (f3 = o3 ? f3.split("\n").map(function(e4) {
2256
- return " " + e4;
2257
- }).join("\n").substr(2) : "\n" + f3.split("\n").map(function(e4) {
2258
- return " " + e4;
2259
- }).join("\n")) : f3 = e3.stylize("[Circular]", "special")), be(u3)) {
2260
- if (o3 && i3.match(/^\d+$/))
2261
- return f3;
2262
- (u3 = JSON.stringify("" + i3)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (u3 = u3.substr(1, u3.length - 2), u3 = e3.stylize(u3, "name")) : (u3 = u3.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), u3 = e3.stylize(u3, "string"));
2263
- }
2264
- return u3 + ": " + f3;
2265
- }
2266
- function pe(e3) {
2267
- return Array.isArray(e3);
2268
- }
2269
- function ye(e3) {
2270
- return "boolean" == typeof e3;
2271
- }
2272
- function le(e3) {
2273
- return null === e3;
2274
- }
2275
- function de(e3) {
2276
- return "number" == typeof e3;
2277
- }
2278
- function ge(e3) {
2279
- return "string" == typeof e3;
2280
- }
2281
- function be(e3) {
2282
- return void 0 === e3;
2283
- }
2284
- function me(e3) {
2285
- return he(e3) && "[object RegExp]" === ve(e3);
2286
- }
2287
- function he(e3) {
2288
- return "object" == typeof e3 && null !== e3;
2289
- }
2290
- function je(e3) {
2291
- return he(e3) && "[object Date]" === ve(e3);
2292
- }
2293
- function Ae(e3) {
2294
- return he(e3) && ("[object Error]" === ve(e3) || e3 instanceof Error);
2295
- }
2296
- function we(e3) {
2297
- return "function" == typeof e3;
2298
- }
2299
- function ve(e3) {
2300
- return Object.prototype.toString.call(e3);
2301
- }
2302
- function Oe(e3) {
2303
- return e3 < 10 ? "0" + e3.toString(10) : e3.toString(10);
2304
- }
2305
- function Be() {
2306
- var e3 = /* @__PURE__ */ new Date(), t3 = [Oe(e3.getHours()), Oe(e3.getMinutes()), Oe(e3.getSeconds())].join(":");
2307
- return [e3.getDate(), Se[e3.getMonth()], t3].join(" ");
2308
- }
2309
- function ke(e3, t3) {
2310
- return Object.prototype.hasOwnProperty.call(e3, t3);
2311
- }
2312
- function De(e3, t3) {
2313
- if (!e3) {
2314
- var r3 = new Error("Promise was rejected with a falsy value");
2315
- r3.reason = e3, e3 = r3;
2316
- }
2317
- return t3(e3);
2318
- }
2319
- var t2, e2, o2, n2, r2, l2, t$1, o$1, n$1, e$1, r$1, c2, u2, i2, t$2, i$1, o$2, u$1, f2, a2, s2, p2, y, l$1, d2, m2, h2, j, A, Q, X, Y, ee, te, re, ne, ie, Se, Ee;
2320
- var init_chunk_b4205b57 = __esm({
2321
- "../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/chunk-b4205b57.js"() {
2322
- "use strict";
2323
- init_dirname();
2324
- init_buffer2();
2325
- init_process2();
2326
- init_chunk_5decc758();
2327
- t2 = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag;
2328
- e2 = Object.prototype.toString;
2329
- o2 = function(o3) {
2330
- return !(t2 && o3 && "object" == typeof o3 && Symbol.toStringTag in o3) && "[object Arguments]" === e2.call(o3);
2331
- };
2332
- n2 = function(t3) {
2333
- return !!o2(t3) || null !== t3 && "object" == typeof t3 && "number" == typeof t3.length && t3.length >= 0 && "[object Array]" !== e2.call(t3) && "[object Function]" === e2.call(t3.callee);
2334
- };
2335
- r2 = function() {
2336
- return o2(arguments);
2337
- }();
2338
- o2.isLegacyArguments = n2;
2339
- l2 = r2 ? o2 : n2;
2340
- t$1 = Object.prototype.toString;
2341
- o$1 = Function.prototype.toString;
2342
- n$1 = /^\s*(?:function)?\*/;
2343
- e$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag;
2344
- r$1 = Object.getPrototypeOf;
2345
- c2 = function() {
2346
- if (!e$1)
2347
- return false;
2348
- try {
2349
- return Function("return function*() {}")();
2350
- } catch (t3) {
2351
- }
2352
- }();
2353
- u2 = c2 ? r$1(c2) : {};
2354
- i2 = function(c3) {
2355
- return "function" == typeof c3 && (!!n$1.test(o$1.call(c3)) || (e$1 ? r$1(c3) === u2 : "[object GeneratorFunction]" === t$1.call(c3)));
2356
- };
2357
- t$2 = "function" == typeof Object.create ? function(t3, e3) {
2358
- e3 && (t3.super_ = e3, t3.prototype = Object.create(e3.prototype, { constructor: { value: t3, enumerable: false, writable: true, configurable: true } }));
2359
- } : function(t3, e3) {
2360
- if (e3) {
2361
- t3.super_ = e3;
2362
- var o3 = function() {
2363
- };
2364
- o3.prototype = e3.prototype, t3.prototype = new o3(), t3.prototype.constructor = t3;
2365
- }
2366
- };
2367
- i$1 = function(e3) {
2368
- return e3 && "object" == typeof e3 && "function" == typeof e3.copy && "function" == typeof e3.fill && "function" == typeof e3.readUInt8;
2369
- };
2370
- o$2 = {};
2371
- u$1 = i$1;
2372
- f2 = l2;
2373
- a2 = i2;
2374
- s2 = "undefined" != typeof BigInt;
2375
- p2 = "undefined" != typeof Symbol;
2376
- y = p2 && void 0 !== Symbol.toStringTag;
2377
- l$1 = "undefined" != typeof Uint8Array;
2378
- d2 = "undefined" != typeof ArrayBuffer;
2379
- if (l$1 && y)
2380
- var g = Object.getPrototypeOf(Uint8Array.prototype), b = c$1(Object.getOwnPropertyDescriptor(g, Symbol.toStringTag).get);
2381
- m2 = c$1(Object.prototype.toString);
2382
- h2 = c$1(Number.prototype.valueOf);
2383
- j = c$1(String.prototype.valueOf);
2384
- A = c$1(Boolean.prototype.valueOf);
2385
- if (s2)
2386
- var w = c$1(BigInt.prototype.valueOf);
2387
- if (p2)
2388
- var v = c$1(Symbol.prototype.valueOf);
2389
- o$2.isArgumentsObject = f2, o$2.isGeneratorFunction = a2, o$2.isPromise = function(e3) {
2390
- return "undefined" != typeof Promise && e3 instanceof Promise || null !== e3 && "object" == typeof e3 && "function" == typeof e3.then && "function" == typeof e3.catch;
2391
- }, o$2.isArrayBufferView = function(e3) {
2392
- return d2 && ArrayBuffer.isView ? ArrayBuffer.isView(e3) : S(e3) || R(e3);
2393
- }, o$2.isTypedArray = S, o$2.isUint8Array = B, o$2.isUint8ClampedArray = k, o$2.isUint16Array = E, o$2.isUint32Array = D, o$2.isInt8Array = U, o$2.isInt16Array = P, o$2.isInt32Array = x, o$2.isFloat32Array = I, o$2.isFloat64Array = M, o$2.isBigInt64Array = z, o$2.isBigUint64Array = F, T2.working = "undefined" != typeof Map && T2(/* @__PURE__ */ new Map()), o$2.isMap = function(e3) {
2394
- return "undefined" != typeof Map && (T2.working ? T2(e3) : e3 instanceof Map);
2395
- }, N.working = "undefined" != typeof Set && N(/* @__PURE__ */ new Set()), o$2.isSet = function(e3) {
2396
- return "undefined" != typeof Set && (N.working ? N(e3) : e3 instanceof Set);
2397
- }, W.working = "undefined" != typeof WeakMap && W(/* @__PURE__ */ new WeakMap()), o$2.isWeakMap = function(e3) {
2398
- return "undefined" != typeof WeakMap && (W.working ? W(e3) : e3 instanceof WeakMap);
2399
- }, $.working = "undefined" != typeof WeakSet && $(/* @__PURE__ */ new WeakSet()), o$2.isWeakSet = function(e3) {
2400
- return $(e3);
2401
- }, C.working = "undefined" != typeof ArrayBuffer && C(new ArrayBuffer()), o$2.isArrayBuffer = V, G.working = "undefined" != typeof ArrayBuffer && "undefined" != typeof DataView && G(new DataView(new ArrayBuffer(1), 0, 1)), o$2.isDataView = R, J.working = "undefined" != typeof SharedArrayBuffer && J(new SharedArrayBuffer()), o$2.isSharedArrayBuffer = _, o$2.isAsyncFunction = function(e3) {
2402
- return "[object AsyncFunction]" === m2(e3);
2403
- }, o$2.isMapIterator = function(e3) {
2404
- return "[object Map Iterator]" === m2(e3);
2405
- }, o$2.isSetIterator = function(e3) {
2406
- return "[object Set Iterator]" === m2(e3);
2407
- }, o$2.isGeneratorObject = function(e3) {
2408
- return "[object Generator]" === m2(e3);
2409
- }, o$2.isWebAssemblyCompiledModule = function(e3) {
2410
- return "[object WebAssembly.Module]" === m2(e3);
2411
- }, o$2.isNumberObject = H, o$2.isStringObject = Z, o$2.isBooleanObject = q, o$2.isBigIntObject = K, o$2.isSymbolObject = L, o$2.isBoxedPrimitive = function(e3) {
2412
- return H(e3) || Z(e3) || q(e3) || K(e3) || L(e3);
2413
- }, o$2.isAnyArrayBuffer = function(e3) {
2414
- return l$1 && (V(e3) || _(e3));
2415
- }, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(e3) {
2416
- Object.defineProperty(o$2, e3, { enumerable: false, value: function() {
2417
- throw new Error(e3 + " is not supported in userland");
2418
- } });
2419
- });
2420
- Q = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : global;
2421
- X = {};
2422
- Y = T;
2423
- ee = Object.getOwnPropertyDescriptors || function(e3) {
2424
- for (var t3 = Object.keys(e3), r3 = {}, n3 = 0; n3 < t3.length; n3++)
2425
- r3[t3[n3]] = Object.getOwnPropertyDescriptor(e3, t3[n3]);
2426
- return r3;
2427
- };
2428
- te = /%[sdj%]/g;
2429
- X.format = function(e3) {
2430
- if (!ge(e3)) {
2431
- for (var t3 = [], r3 = 0; r3 < arguments.length; r3++)
2432
- t3.push(oe(arguments[r3]));
2433
- return t3.join(" ");
2434
- }
2435
- r3 = 1;
2436
- for (var n3 = arguments, i3 = n3.length, o3 = String(e3).replace(te, function(e4) {
2437
- if ("%%" === e4)
2438
- return "%";
2439
- if (r3 >= i3)
2440
- return e4;
2441
- switch (e4) {
2442
- case "%s":
2443
- return String(n3[r3++]);
2444
- case "%d":
2445
- return Number(n3[r3++]);
2446
- case "%j":
2447
- try {
2448
- return JSON.stringify(n3[r3++]);
2449
- } catch (e5) {
2450
- return "[Circular]";
2451
- }
2452
- default:
2453
- return e4;
2454
- }
2455
- }), u3 = n3[r3]; r3 < i3; u3 = n3[++r3])
2456
- le(u3) || !he(u3) ? o3 += " " + u3 : o3 += " " + oe(u3);
2457
- return o3;
2458
- }, X.deprecate = function(e3, t3) {
2459
- if (void 0 !== Y && true === Y.noDeprecation)
2460
- return e3;
2461
- if (void 0 === Y)
2462
- return function() {
2463
- return X.deprecate(e3, t3).apply(this || Q, arguments);
2464
- };
2465
- var r3 = false;
2466
- return function() {
2467
- if (!r3) {
2468
- if (Y.throwDeprecation)
2469
- throw new Error(t3);
2470
- Y.traceDeprecation ? console.trace(t3) : console.error(t3), r3 = true;
2471
- }
2472
- return e3.apply(this || Q, arguments);
2473
- };
2474
- };
2475
- re = {};
2476
- ne = /^$/;
2477
- if (Y.env.NODE_DEBUG) {
2478
- ie = Y.env.NODE_DEBUG;
2479
- ie = ie.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), ne = new RegExp("^" + ie + "$", "i");
2480
- }
2481
- X.debuglog = function(e3) {
2482
- if (e3 = e3.toUpperCase(), !re[e3])
2483
- if (ne.test(e3)) {
2484
- var t3 = Y.pid;
2485
- re[e3] = function() {
2486
- var r3 = X.format.apply(X, arguments);
2487
- console.error("%s %d: %s", e3, t3, r3);
2488
- };
2489
- } else
2490
- re[e3] = function() {
2491
- };
2492
- return re[e3];
2493
- }, X.inspect = oe, oe.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, oe.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red" }, X.types = o$2, X.isArray = pe, X.isBoolean = ye, X.isNull = le, X.isNullOrUndefined = function(e3) {
2494
- return null == e3;
2495
- }, X.isNumber = de, X.isString = ge, X.isSymbol = function(e3) {
2496
- return "symbol" == typeof e3;
2497
- }, X.isUndefined = be, X.isRegExp = me, X.types.isRegExp = me, X.isObject = he, X.isDate = je, X.types.isDate = je, X.isError = Ae, X.types.isNativeError = Ae, X.isFunction = we, X.isPrimitive = function(e3) {
2498
- return null === e3 || "boolean" == typeof e3 || "number" == typeof e3 || "string" == typeof e3 || "symbol" == typeof e3 || void 0 === e3;
2499
- }, X.isBuffer = i$1;
2500
- Se = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
2501
- X.log = function() {
2502
- console.log("%s - %s", Be(), X.format.apply(X, arguments));
2503
- }, X.inherits = t$2, X._extend = function(e3, t3) {
2504
- if (!t3 || !he(t3))
2505
- return e3;
2506
- for (var r3 = Object.keys(t3), n3 = r3.length; n3--; )
2507
- e3[r3[n3]] = t3[r3[n3]];
2508
- return e3;
2509
- };
2510
- Ee = "undefined" != typeof Symbol ? Symbol("util.promisify.custom") : void 0;
2511
- X.promisify = function(e3) {
2512
- if ("function" != typeof e3)
2513
- throw new TypeError('The "original" argument must be of type Function');
2514
- if (Ee && e3[Ee]) {
2515
- var t3;
2516
- if ("function" != typeof (t3 = e3[Ee]))
2517
- throw new TypeError('The "util.promisify.custom" argument must be of type Function');
2518
- return Object.defineProperty(t3, Ee, { value: t3, enumerable: false, writable: false, configurable: true }), t3;
2519
- }
2520
- function t3() {
2521
- for (var t4, r3, n3 = new Promise(function(e4, n4) {
2522
- t4 = e4, r3 = n4;
2523
- }), i3 = [], o3 = 0; o3 < arguments.length; o3++)
2524
- i3.push(arguments[o3]);
2525
- i3.push(function(e4, n4) {
2526
- e4 ? r3(e4) : t4(n4);
2527
- });
2528
- try {
2529
- e3.apply(this || Q, i3);
2530
- } catch (e4) {
2531
- r3(e4);
2532
- }
2533
- return n3;
2534
- }
2535
- return Object.setPrototypeOf(t3, Object.getPrototypeOf(e3)), Ee && Object.defineProperty(t3, Ee, { value: t3, enumerable: false, writable: false, configurable: true }), Object.defineProperties(t3, ee(e3));
2536
- }, X.promisify.custom = Ee, X.callbackify = function(e3) {
2537
- if ("function" != typeof e3)
2538
- throw new TypeError('The "original" argument must be of type Function');
2539
- function t3() {
2540
- for (var t4 = [], r3 = 0; r3 < arguments.length; r3++)
2541
- t4.push(arguments[r3]);
2542
- var n3 = t4.pop();
2543
- if ("function" != typeof n3)
2544
- throw new TypeError("The last argument must be of type Function");
2545
- var i3 = this || Q, o3 = function() {
2546
- return n3.apply(i3, arguments);
2547
- };
2548
- e3.apply(this || Q, t4).then(function(e4) {
2549
- Y.nextTick(o3.bind(null, null, e4));
2550
- }, function(e4) {
2551
- Y.nextTick(De.bind(null, e4, o3));
2552
- });
2553
- }
2554
- return Object.setPrototypeOf(t3, Object.getPrototypeOf(e3)), Object.defineProperties(t3, ee(e3)), t3;
2555
- };
2556
- }
2557
- });
2558
-
2559
- // ../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/chunk-ce0fbc82.js
2560
- var _extend, callbackify, debuglog, deprecate, format, inherits, inspect, isArray, isBoolean, isBuffer, isDate, isError, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, log, promisify, types, TextEncoder, TextDecoder;
2561
- var init_chunk_ce0fbc82 = __esm({
2562
- "../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/chunk-ce0fbc82.js"() {
2563
- "use strict";
2564
- init_dirname();
2565
- init_buffer2();
2566
- init_process2();
2567
- init_chunk_b4205b57();
2568
- init_chunk_5decc758();
2569
- X._extend;
2570
- X.callbackify;
2571
- X.debuglog;
2572
- X.deprecate;
2573
- X.format;
2574
- X.inherits;
2575
- X.inspect;
2576
- X.isArray;
2577
- X.isBoolean;
2578
- X.isBuffer;
2579
- X.isDate;
2580
- X.isError;
2581
- X.isFunction;
2582
- X.isNull;
2583
- X.isNullOrUndefined;
2584
- X.isNumber;
2585
- X.isObject;
2586
- X.isPrimitive;
2587
- X.isRegExp;
2588
- X.isString;
2589
- X.isSymbol;
2590
- X.isUndefined;
2591
- X.log;
2592
- X.promisify;
2593
- _extend = X._extend;
2594
- callbackify = X.callbackify;
2595
- debuglog = X.debuglog;
2596
- deprecate = X.deprecate;
2597
- format = X.format;
2598
- inherits = X.inherits;
2599
- inspect = X.inspect;
2600
- isArray = X.isArray;
2601
- isBoolean = X.isBoolean;
2602
- isBuffer = X.isBuffer;
2603
- isDate = X.isDate;
2604
- isError = X.isError;
2605
- isFunction = X.isFunction;
2606
- isNull = X.isNull;
2607
- isNullOrUndefined = X.isNullOrUndefined;
2608
- isNumber = X.isNumber;
2609
- isObject = X.isObject;
2610
- isPrimitive = X.isPrimitive;
2611
- isRegExp = X.isRegExp;
2612
- isString = X.isString;
2613
- isSymbol = X.isSymbol;
2614
- isUndefined = X.isUndefined;
2615
- log = X.log;
2616
- promisify = X.promisify;
2617
- types = X.types;
2618
- TextEncoder = self.TextEncoder;
2619
- TextDecoder = self.TextDecoder;
2620
- }
2621
- });
2622
-
2623
- // ../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/util.js
2624
- var util_exports = {};
2625
- __export(util_exports, {
2626
- TextDecoder: () => TextDecoder2,
2627
- TextEncoder: () => TextEncoder2,
2628
- _extend: () => _extend2,
2629
- callbackify: () => callbackify2,
2630
- debuglog: () => debuglog2,
2631
- default: () => X,
2632
- deprecate: () => deprecate2,
2633
- format: () => format2,
2634
- inherits: () => inherits2,
2635
- inspect: () => inspect2,
2636
- isArray: () => isArray2,
2637
- isBoolean: () => isBoolean2,
2638
- isBuffer: () => isBuffer2,
2639
- isDate: () => isDate2,
2640
- isError: () => isError2,
2641
- isFunction: () => isFunction2,
2642
- isNull: () => isNull2,
2643
- isNullOrUndefined: () => isNullOrUndefined2,
2644
- isNumber: () => isNumber2,
2645
- isObject: () => isObject2,
2646
- isPrimitive: () => isPrimitive2,
2647
- isRegExp: () => isRegExp2,
2648
- isString: () => isString2,
2649
- isSymbol: () => isSymbol2,
2650
- isUndefined: () => isUndefined2,
2651
- log: () => log2,
2652
- promisify: () => promisify2,
2653
- types: () => types2
2654
- });
2655
- var _extend2, callbackify2, debuglog2, deprecate2, format2, inherits2, inspect2, isArray2, isBoolean2, isBuffer2, isDate2, isError2, isFunction2, isNull2, isNullOrUndefined2, isNumber2, isObject2, isPrimitive2, isRegExp2, isString2, isSymbol2, isUndefined2, log2, promisify2, types2, TextEncoder2, TextDecoder2;
2656
- var init_util = __esm({
2657
- "../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/util.js"() {
2658
- "use strict";
2659
- init_dirname();
2660
- init_buffer2();
2661
- init_process2();
2662
- init_chunk_ce0fbc82();
2663
- init_chunk_b4205b57();
2664
- init_chunk_b4205b57();
2665
- init_chunk_5decc758();
2666
- _extend2 = X._extend;
2667
- callbackify2 = X.callbackify;
2668
- debuglog2 = X.debuglog;
2669
- deprecate2 = X.deprecate;
2670
- format2 = X.format;
2671
- inherits2 = X.inherits;
2672
- inspect2 = X.inspect;
2673
- isArray2 = X.isArray;
2674
- isBoolean2 = X.isBoolean;
2675
- isBuffer2 = X.isBuffer;
2676
- isDate2 = X.isDate;
2677
- isError2 = X.isError;
2678
- isFunction2 = X.isFunction;
2679
- isNull2 = X.isNull;
2680
- isNullOrUndefined2 = X.isNullOrUndefined;
2681
- isNumber2 = X.isNumber;
2682
- isObject2 = X.isObject;
2683
- isPrimitive2 = X.isPrimitive;
2684
- isRegExp2 = X.isRegExp;
2685
- isString2 = X.isString;
2686
- isSymbol2 = X.isSymbol;
2687
- isUndefined2 = X.isUndefined;
2688
- log2 = X.log;
2689
- promisify2 = X.promisify;
2690
- types2 = X.types;
2691
- TextEncoder2 = X.TextEncoder = globalThis.TextEncoder;
2692
- TextDecoder2 = X.TextDecoder = globalThis.TextDecoder;
2693
- }
2694
- });
2695
-
2696
- // ../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/chunk-2eac56ff.js
2697
- function dew2() {
2698
- if (_dewExec2)
2699
- return exports2;
2700
- _dewExec2 = true;
2701
- var process2 = exports2 = {};
2702
- var cachedSetTimeout;
2703
- var cachedClearTimeout;
2704
- function defaultSetTimout() {
2705
- throw new Error("setTimeout has not been defined");
2706
- }
2707
- function defaultClearTimeout() {
2708
- throw new Error("clearTimeout has not been defined");
2709
- }
2710
- (function() {
2711
- try {
2712
- if (typeof setTimeout === "function") {
2713
- cachedSetTimeout = setTimeout;
2714
- } else {
2715
- cachedSetTimeout = defaultSetTimout;
2716
- }
2717
- } catch (e3) {
2718
- cachedSetTimeout = defaultSetTimout;
2719
- }
2720
- try {
2721
- if (typeof clearTimeout === "function") {
2722
- cachedClearTimeout = clearTimeout;
2723
- } else {
2724
- cachedClearTimeout = defaultClearTimeout;
2725
- }
2726
- } catch (e3) {
2727
- cachedClearTimeout = defaultClearTimeout;
2728
- }
2729
- })();
2730
- function runTimeout(fun) {
2731
- if (cachedSetTimeout === setTimeout) {
2732
- return setTimeout(fun, 0);
2733
- }
2734
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
2735
- cachedSetTimeout = setTimeout;
2736
- return setTimeout(fun, 0);
2737
- }
2738
- try {
2739
- return cachedSetTimeout(fun, 0);
2740
- } catch (e3) {
2741
- try {
2742
- return cachedSetTimeout.call(null, fun, 0);
2743
- } catch (e4) {
2744
- return cachedSetTimeout.call(this || _global, fun, 0);
2745
- }
2746
- }
2747
- }
2748
- function runClearTimeout(marker) {
2749
- if (cachedClearTimeout === clearTimeout) {
2750
- return clearTimeout(marker);
2751
- }
2752
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
2753
- cachedClearTimeout = clearTimeout;
2754
- return clearTimeout(marker);
2755
- }
2756
- try {
2757
- return cachedClearTimeout(marker);
2758
- } catch (e3) {
2759
- try {
2760
- return cachedClearTimeout.call(null, marker);
2761
- } catch (e4) {
2762
- return cachedClearTimeout.call(this || _global, marker);
2763
- }
2764
- }
2765
- }
2766
- var queue = [];
2767
- var draining = false;
2768
- var currentQueue;
2769
- var queueIndex = -1;
2770
- function cleanUpNextTick() {
2771
- if (!draining || !currentQueue) {
2772
- return;
2773
- }
2774
- draining = false;
2775
- if (currentQueue.length) {
2776
- queue = currentQueue.concat(queue);
2777
- } else {
2778
- queueIndex = -1;
2779
- }
2780
- if (queue.length) {
2781
- drainQueue();
2782
- }
2783
- }
2784
- function drainQueue() {
2785
- if (draining) {
2786
- return;
2787
- }
2788
- var timeout = runTimeout(cleanUpNextTick);
2789
- draining = true;
2790
- var len = queue.length;
2791
- while (len) {
2792
- currentQueue = queue;
2793
- queue = [];
2794
- while (++queueIndex < len) {
2795
- if (currentQueue) {
2796
- currentQueue[queueIndex].run();
2797
- }
2798
- }
2799
- queueIndex = -1;
2800
- len = queue.length;
2801
- }
2802
- currentQueue = null;
2803
- draining = false;
2804
- runClearTimeout(timeout);
2805
- }
2806
- process2.nextTick = function(fun) {
2807
- var args = new Array(arguments.length - 1);
2808
- if (arguments.length > 1) {
2809
- for (var i3 = 1; i3 < arguments.length; i3++) {
2810
- args[i3 - 1] = arguments[i3];
2811
- }
2812
- }
2813
- queue.push(new Item2(fun, args));
2814
- if (queue.length === 1 && !draining) {
2815
- runTimeout(drainQueue);
2816
- }
2817
- };
2818
- function Item2(fun, array) {
2819
- (this || _global).fun = fun;
2820
- (this || _global).array = array;
2821
- }
2822
- Item2.prototype.run = function() {
2823
- (this || _global).fun.apply(null, (this || _global).array);
2824
- };
2825
- process2.title = "browser";
2826
- process2.browser = true;
2827
- process2.env = {};
2828
- process2.argv = [];
2829
- process2.version = "";
2830
- process2.versions = {};
2831
- function noop() {
2832
- }
2833
- process2.on = noop;
2834
- process2.addListener = noop;
2835
- process2.once = noop;
2836
- process2.off = noop;
2837
- process2.removeListener = noop;
2838
- process2.removeAllListeners = noop;
2839
- process2.emit = noop;
2840
- process2.prependListener = noop;
2841
- process2.prependOnceListener = noop;
2842
- process2.listeners = function(name) {
2843
- return [];
2844
- };
2845
- process2.binding = function(name) {
2846
- throw new Error("process.binding is not supported");
2847
- };
2848
- process2.cwd = function() {
2849
- return "/";
2850
- };
2851
- process2.chdir = function(dir) {
2852
- throw new Error("process.chdir is not supported");
2853
- };
2854
- process2.umask = function() {
2855
- return 0;
2856
- };
2857
- return exports2;
2858
- }
2859
- var exports2, _dewExec2, _global, process;
2860
- var init_chunk_2eac56ff = __esm({
2861
- "../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/chunk-2eac56ff.js"() {
2862
- "use strict";
2863
- init_dirname();
2864
- init_buffer2();
2865
- init_process2();
2866
- exports2 = {};
2867
- _dewExec2 = false;
2868
- _global = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : global;
2869
- process = dew2();
2870
- process.platform = "browser";
2871
- process.addListener;
2872
- process.argv;
2873
- process.binding;
2874
- process.browser;
2875
- process.chdir;
2876
- process.cwd;
2877
- process.emit;
2878
- process.env;
2879
- process.listeners;
2880
- process.nextTick;
2881
- process.off;
2882
- process.on;
2883
- process.once;
2884
- process.prependListener;
2885
- process.prependOnceListener;
2886
- process.removeAllListeners;
2887
- process.removeListener;
2888
- process.title;
2889
- process.umask;
2890
- process.version;
2891
- process.versions;
2892
- }
2893
- });
2894
-
2895
- // ../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/chunk-23dbec7b.js
2896
- function dew3() {
2897
- if (_dewExec3)
2898
- return exports$12;
2899
- _dewExec3 = true;
2900
- var process$1 = process;
2901
- function assertPath(path) {
2902
- if (typeof path !== "string") {
2903
- throw new TypeError("Path must be a string. Received " + JSON.stringify(path));
2904
- }
2905
- }
2906
- function normalizeStringPosix(path, allowAboveRoot) {
2907
- var res = "";
2908
- var lastSegmentLength = 0;
2909
- var lastSlash = -1;
2910
- var dots = 0;
2911
- var code;
2912
- for (var i3 = 0; i3 <= path.length; ++i3) {
2913
- if (i3 < path.length)
2914
- code = path.charCodeAt(i3);
2915
- else if (code === 47)
2916
- break;
2917
- else
2918
- code = 47;
2919
- if (code === 47) {
2920
- if (lastSlash === i3 - 1 || dots === 1)
2921
- ;
2922
- else if (lastSlash !== i3 - 1 && dots === 2) {
2923
- if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
2924
- if (res.length > 2) {
2925
- var lastSlashIndex = res.lastIndexOf("/");
2926
- if (lastSlashIndex !== res.length - 1) {
2927
- if (lastSlashIndex === -1) {
2928
- res = "";
2929
- lastSegmentLength = 0;
2930
- } else {
2931
- res = res.slice(0, lastSlashIndex);
2932
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
2933
- }
2934
- lastSlash = i3;
2935
- dots = 0;
2936
- continue;
2937
- }
2938
- } else if (res.length === 2 || res.length === 1) {
2939
- res = "";
2940
- lastSegmentLength = 0;
2941
- lastSlash = i3;
2942
- dots = 0;
2943
- continue;
2944
- }
2945
- }
2946
- if (allowAboveRoot) {
2947
- if (res.length > 0)
2948
- res += "/..";
2949
- else
2950
- res = "..";
2951
- lastSegmentLength = 2;
2952
- }
2953
- } else {
2954
- if (res.length > 0)
2955
- res += "/" + path.slice(lastSlash + 1, i3);
2956
- else
2957
- res = path.slice(lastSlash + 1, i3);
2958
- lastSegmentLength = i3 - lastSlash - 1;
2959
- }
2960
- lastSlash = i3;
2961
- dots = 0;
2962
- } else if (code === 46 && dots !== -1) {
2963
- ++dots;
2964
- } else {
2965
- dots = -1;
2966
- }
2967
- }
2968
- return res;
2969
- }
2970
- function _format(sep2, pathObject) {
2971
- var dir = pathObject.dir || pathObject.root;
2972
- var base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
2973
- if (!dir) {
2974
- return base;
2975
- }
2976
- if (dir === pathObject.root) {
2977
- return dir + base;
2978
- }
2979
- return dir + sep2 + base;
2980
- }
2981
- var posix2 = {
2982
- // path.resolve([from ...], to)
2983
- resolve: function resolve2() {
2984
- var resolvedPath = "";
2985
- var resolvedAbsolute = false;
2986
- var cwd;
2987
- for (var i3 = arguments.length - 1; i3 >= -1 && !resolvedAbsolute; i3--) {
2988
- var path;
2989
- if (i3 >= 0)
2990
- path = arguments[i3];
2991
- else {
2992
- if (cwd === void 0)
2993
- cwd = process$1.cwd();
2994
- path = cwd;
2995
- }
2996
- assertPath(path);
2997
- if (path.length === 0) {
2998
- continue;
2999
- }
3000
- resolvedPath = path + "/" + resolvedPath;
3001
- resolvedAbsolute = path.charCodeAt(0) === 47;
3002
- }
3003
- resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
3004
- if (resolvedAbsolute) {
3005
- if (resolvedPath.length > 0)
3006
- return "/" + resolvedPath;
3007
- else
3008
- return "/";
3009
- } else if (resolvedPath.length > 0) {
3010
- return resolvedPath;
3011
- } else {
3012
- return ".";
3013
- }
3014
- },
3015
- normalize: function normalize2(path) {
3016
- assertPath(path);
3017
- if (path.length === 0)
3018
- return ".";
3019
- var isAbsolute2 = path.charCodeAt(0) === 47;
3020
- var trailingSeparator = path.charCodeAt(path.length - 1) === 47;
3021
- path = normalizeStringPosix(path, !isAbsolute2);
3022
- if (path.length === 0 && !isAbsolute2)
3023
- path = ".";
3024
- if (path.length > 0 && trailingSeparator)
3025
- path += "/";
3026
- if (isAbsolute2)
3027
- return "/" + path;
3028
- return path;
3029
- },
3030
- isAbsolute: function isAbsolute2(path) {
3031
- assertPath(path);
3032
- return path.length > 0 && path.charCodeAt(0) === 47;
3033
- },
3034
- join: function join2() {
3035
- if (arguments.length === 0)
3036
- return ".";
3037
- var joined;
3038
- for (var i3 = 0; i3 < arguments.length; ++i3) {
3039
- var arg = arguments[i3];
3040
- assertPath(arg);
3041
- if (arg.length > 0) {
3042
- if (joined === void 0)
3043
- joined = arg;
3044
- else
3045
- joined += "/" + arg;
3046
- }
3047
- }
3048
- if (joined === void 0)
3049
- return ".";
3050
- return posix2.normalize(joined);
3051
- },
3052
- relative: function relative2(from, to) {
3053
- assertPath(from);
3054
- assertPath(to);
3055
- if (from === to)
3056
- return "";
3057
- from = posix2.resolve(from);
3058
- to = posix2.resolve(to);
3059
- if (from === to)
3060
- return "";
3061
- var fromStart = 1;
3062
- for (; fromStart < from.length; ++fromStart) {
3063
- if (from.charCodeAt(fromStart) !== 47)
3064
- break;
3065
- }
3066
- var fromEnd = from.length;
3067
- var fromLen = fromEnd - fromStart;
3068
- var toStart = 1;
3069
- for (; toStart < to.length; ++toStart) {
3070
- if (to.charCodeAt(toStart) !== 47)
3071
- break;
3072
- }
3073
- var toEnd = to.length;
3074
- var toLen = toEnd - toStart;
3075
- var length = fromLen < toLen ? fromLen : toLen;
3076
- var lastCommonSep = -1;
3077
- var i3 = 0;
3078
- for (; i3 <= length; ++i3) {
3079
- if (i3 === length) {
3080
- if (toLen > length) {
3081
- if (to.charCodeAt(toStart + i3) === 47) {
3082
- return to.slice(toStart + i3 + 1);
3083
- } else if (i3 === 0) {
3084
- return to.slice(toStart + i3);
3085
- }
3086
- } else if (fromLen > length) {
3087
- if (from.charCodeAt(fromStart + i3) === 47) {
3088
- lastCommonSep = i3;
3089
- } else if (i3 === 0) {
3090
- lastCommonSep = 0;
3091
- }
3092
- }
3093
- break;
3094
- }
3095
- var fromCode = from.charCodeAt(fromStart + i3);
3096
- var toCode = to.charCodeAt(toStart + i3);
3097
- if (fromCode !== toCode)
3098
- break;
3099
- else if (fromCode === 47)
3100
- lastCommonSep = i3;
3101
- }
3102
- var out = "";
3103
- for (i3 = fromStart + lastCommonSep + 1; i3 <= fromEnd; ++i3) {
3104
- if (i3 === fromEnd || from.charCodeAt(i3) === 47) {
3105
- if (out.length === 0)
3106
- out += "..";
3107
- else
3108
- out += "/..";
3109
- }
3110
- }
3111
- if (out.length > 0)
3112
- return out + to.slice(toStart + lastCommonSep);
3113
- else {
3114
- toStart += lastCommonSep;
3115
- if (to.charCodeAt(toStart) === 47)
3116
- ++toStart;
3117
- return to.slice(toStart);
3118
- }
3119
- },
3120
- _makeLong: function _makeLong2(path) {
3121
- return path;
3122
- },
3123
- dirname: function dirname2(path) {
3124
- assertPath(path);
3125
- if (path.length === 0)
3126
- return ".";
3127
- var code = path.charCodeAt(0);
3128
- var hasRoot = code === 47;
3129
- var end = -1;
3130
- var matchedSlash = true;
3131
- for (var i3 = path.length - 1; i3 >= 1; --i3) {
3132
- code = path.charCodeAt(i3);
3133
- if (code === 47) {
3134
- if (!matchedSlash) {
3135
- end = i3;
3136
- break;
3137
- }
3138
- } else {
3139
- matchedSlash = false;
3140
- }
3141
- }
3142
- if (end === -1)
3143
- return hasRoot ? "/" : ".";
3144
- if (hasRoot && end === 1)
3145
- return "//";
3146
- return path.slice(0, end);
3147
- },
3148
- basename: function basename2(path, ext) {
3149
- if (ext !== void 0 && typeof ext !== "string")
3150
- throw new TypeError('"ext" argument must be a string');
3151
- assertPath(path);
3152
- var start = 0;
3153
- var end = -1;
3154
- var matchedSlash = true;
3155
- var i3;
3156
- if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) {
3157
- if (ext.length === path.length && ext === path)
3158
- return "";
3159
- var extIdx = ext.length - 1;
3160
- var firstNonSlashEnd = -1;
3161
- for (i3 = path.length - 1; i3 >= 0; --i3) {
3162
- var code = path.charCodeAt(i3);
3163
- if (code === 47) {
3164
- if (!matchedSlash) {
3165
- start = i3 + 1;
3166
- break;
3167
- }
3168
- } else {
3169
- if (firstNonSlashEnd === -1) {
3170
- matchedSlash = false;
3171
- firstNonSlashEnd = i3 + 1;
3172
- }
3173
- if (extIdx >= 0) {
3174
- if (code === ext.charCodeAt(extIdx)) {
3175
- if (--extIdx === -1) {
3176
- end = i3;
3177
- }
3178
- } else {
3179
- extIdx = -1;
3180
- end = firstNonSlashEnd;
3181
- }
3182
- }
3183
- }
3184
- }
3185
- if (start === end)
3186
- end = firstNonSlashEnd;
3187
- else if (end === -1)
3188
- end = path.length;
3189
- return path.slice(start, end);
3190
- } else {
3191
- for (i3 = path.length - 1; i3 >= 0; --i3) {
3192
- if (path.charCodeAt(i3) === 47) {
3193
- if (!matchedSlash) {
3194
- start = i3 + 1;
3195
- break;
3196
- }
3197
- } else if (end === -1) {
3198
- matchedSlash = false;
3199
- end = i3 + 1;
3200
- }
3201
- }
3202
- if (end === -1)
3203
- return "";
3204
- return path.slice(start, end);
3205
- }
3206
- },
3207
- extname: function extname2(path) {
3208
- assertPath(path);
3209
- var startDot = -1;
3210
- var startPart = 0;
3211
- var end = -1;
3212
- var matchedSlash = true;
3213
- var preDotState = 0;
3214
- for (var i3 = path.length - 1; i3 >= 0; --i3) {
3215
- var code = path.charCodeAt(i3);
3216
- if (code === 47) {
3217
- if (!matchedSlash) {
3218
- startPart = i3 + 1;
3219
- break;
3220
- }
3221
- continue;
3222
- }
3223
- if (end === -1) {
3224
- matchedSlash = false;
3225
- end = i3 + 1;
3226
- }
3227
- if (code === 46) {
3228
- if (startDot === -1)
3229
- startDot = i3;
3230
- else if (preDotState !== 1)
3231
- preDotState = 1;
3232
- } else if (startDot !== -1) {
3233
- preDotState = -1;
3234
- }
3235
- }
3236
- if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot
3237
- preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
3238
- preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
3239
- return "";
3240
- }
3241
- return path.slice(startDot, end);
3242
- },
3243
- format: function format4(pathObject) {
3244
- if (pathObject === null || typeof pathObject !== "object") {
3245
- throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
3246
- }
3247
- return _format("/", pathObject);
3248
- },
3249
- parse: function parse2(path) {
3250
- assertPath(path);
3251
- var ret = {
3252
- root: "",
3253
- dir: "",
3254
- base: "",
3255
- ext: "",
3256
- name: ""
3257
- };
3258
- if (path.length === 0)
3259
- return ret;
3260
- var code = path.charCodeAt(0);
3261
- var isAbsolute2 = code === 47;
3262
- var start;
3263
- if (isAbsolute2) {
3264
- ret.root = "/";
3265
- start = 1;
3266
- } else {
3267
- start = 0;
3268
- }
3269
- var startDot = -1;
3270
- var startPart = 0;
3271
- var end = -1;
3272
- var matchedSlash = true;
3273
- var i3 = path.length - 1;
3274
- var preDotState = 0;
3275
- for (; i3 >= start; --i3) {
3276
- code = path.charCodeAt(i3);
3277
- if (code === 47) {
3278
- if (!matchedSlash) {
3279
- startPart = i3 + 1;
3280
- break;
3281
- }
3282
- continue;
3283
- }
3284
- if (end === -1) {
3285
- matchedSlash = false;
3286
- end = i3 + 1;
3287
- }
3288
- if (code === 46) {
3289
- if (startDot === -1)
3290
- startDot = i3;
3291
- else if (preDotState !== 1)
3292
- preDotState = 1;
3293
- } else if (startDot !== -1) {
3294
- preDotState = -1;
3295
- }
3296
- }
3297
- if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot
3298
- preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
3299
- preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
3300
- if (end !== -1) {
3301
- if (startPart === 0 && isAbsolute2)
3302
- ret.base = ret.name = path.slice(1, end);
3303
- else
3304
- ret.base = ret.name = path.slice(startPart, end);
3305
- }
3306
- } else {
3307
- if (startPart === 0 && isAbsolute2) {
3308
- ret.name = path.slice(1, startDot);
3309
- ret.base = path.slice(1, end);
3310
- } else {
3311
- ret.name = path.slice(startPart, startDot);
3312
- ret.base = path.slice(startPart, end);
3313
- }
3314
- ret.ext = path.slice(startDot, end);
3315
- }
3316
- if (startPart > 0)
3317
- ret.dir = path.slice(0, startPart - 1);
3318
- else if (isAbsolute2)
3319
- ret.dir = "/";
3320
- return ret;
3321
- },
3322
- sep: "/",
3323
- delimiter: ":",
3324
- win32: null,
3325
- posix: null
3326
- };
3327
- posix2.posix = posix2;
3328
- exports$12 = posix2;
3329
- return exports$12;
3330
- }
3331
- var exports$12, _dewExec3, exports3;
3332
- var init_chunk_23dbec7b = __esm({
3333
- "../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/chunk-23dbec7b.js"() {
3334
- "use strict";
3335
- init_dirname();
3336
- init_buffer2();
3337
- init_process2();
3338
- init_chunk_2eac56ff();
3339
- exports$12 = {};
3340
- _dewExec3 = false;
3341
- exports3 = dew3();
3342
- }
3343
- });
3344
-
3345
- // ../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/path.js
3346
- var path_exports = {};
3347
- __export(path_exports, {
3348
- _makeLong: () => _makeLong,
3349
- basename: () => basename,
3350
- default: () => exports3,
3351
- delimiter: () => delimiter,
3352
- dirname: () => dirname,
3353
- extname: () => extname,
3354
- format: () => format3,
3355
- isAbsolute: () => isAbsolute,
3356
- join: () => join,
3357
- normalize: () => normalize,
3358
- parse: () => parse,
3359
- posix: () => posix,
3360
- relative: () => relative,
3361
- resolve: () => resolve,
3362
- sep: () => sep,
3363
- win32: () => win32
3364
- });
3365
- var _makeLong, basename, delimiter, dirname, extname, format3, isAbsolute, join, normalize, parse, posix, relative, resolve, sep, win32;
3366
- var init_path = __esm({
3367
- "../../node_modules/.pnpm/@jspm+core@2.0.1/node_modules/@jspm/core/nodelibs/browser/path.js"() {
3368
- "use strict";
3369
- init_dirname();
3370
- init_buffer2();
3371
- init_process2();
3372
- init_chunk_23dbec7b();
3373
- init_chunk_23dbec7b();
3374
- init_chunk_2eac56ff();
3375
- _makeLong = exports3._makeLong;
3376
- basename = exports3.basename;
3377
- delimiter = exports3.delimiter;
3378
- dirname = exports3.dirname;
3379
- extname = exports3.extname;
3380
- format3 = exports3.format;
3381
- isAbsolute = exports3.isAbsolute;
3382
- join = exports3.join;
3383
- normalize = exports3.normalize;
3384
- parse = exports3.parse;
3385
- posix = exports3.posix;
3386
- relative = exports3.relative;
3387
- resolve = exports3.resolve;
3388
- sep = exports3.sep;
3389
- win32 = exports3.win32;
3390
- }
3391
- });
3392
-
3393
- // ../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.12.29/node_modules/esbuild-plugin-polyfill-node/polyfills/empty.js
3394
- var empty_exports = {};
3395
- __export(empty_exports, {
3396
- default: () => empty_default
3397
- });
3398
- var empty_default;
3399
- var init_empty = __esm({
3400
- "../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.12.29/node_modules/esbuild-plugin-polyfill-node/polyfills/empty.js"() {
3401
- "use strict";
3402
- init_dirname();
3403
- init_buffer2();
3404
- init_process2();
3405
- empty_default = {};
3406
- }
3407
- });
3408
-
3409
- // src/uplc_tx.js
3410
- var require_uplc_tx = __commonJS({
3411
- "src/uplc_tx.js"(exports4, module) {
3412
- "use strict";
3413
- init_dirname();
3414
- init_buffer2();
3415
- init_process2();
3416
- var imports = {};
3417
- imports["__wbindgen_placeholder__"] = module.exports;
3418
- var wasm;
3419
- var { TextDecoder: TextDecoder3 } = (init_util(), __toCommonJS(util_exports));
3420
- var heap = new Array(128).fill(void 0);
3421
- heap.push(void 0, null, true, false);
3422
- function getObject(idx) {
3423
- return heap[idx];
3424
- }
3425
- var heap_next = heap.length;
3426
- function dropObject(idx) {
3427
- if (idx < 132)
3428
- return;
3429
- heap[idx] = heap_next;
3430
- heap_next = idx;
3431
- }
3432
- function takeObject(idx) {
3433
- const ret = getObject(idx);
3434
- dropObject(idx);
3435
- return ret;
3436
- }
3437
- var cachedTextDecoder = new TextDecoder3("utf-8", { ignoreBOM: true, fatal: true });
3438
- cachedTextDecoder.decode();
3439
- var cachedUint8Memory0 = null;
3440
- function getUint8Memory0() {
3441
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
3442
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
3443
- }
3444
- return cachedUint8Memory0;
3445
- }
3446
- function getStringFromWasm0(ptr, len) {
3447
- ptr = ptr >>> 0;
3448
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
3449
- }
3450
- function addHeapObject(obj) {
3451
- if (heap_next === heap.length)
3452
- heap.push(heap.length + 1);
3453
- const idx = heap_next;
3454
- heap_next = heap[idx];
3455
- heap[idx] = obj;
3456
- return idx;
3457
- }
3458
- var WASM_VECTOR_LEN = 0;
3459
- function passArray8ToWasm0(arg, malloc) {
3460
- const ptr = malloc(arg.length * 1, 1) >>> 0;
3461
- getUint8Memory0().set(arg, ptr / 1);
3462
- WASM_VECTOR_LEN = arg.length;
3463
- return ptr;
3464
- }
3465
- var cachedUint32Memory0 = null;
3466
- function getUint32Memory0() {
3467
- if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
3468
- cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
3469
- }
3470
- return cachedUint32Memory0;
3471
- }
3472
- function passArrayJsValueToWasm0(array, malloc) {
3473
- const ptr = malloc(array.length * 4, 4) >>> 0;
3474
- const mem = getUint32Memory0();
3475
- for (let i3 = 0; i3 < array.length; i3++) {
3476
- mem[ptr / 4 + i3] = addHeapObject(array[i3]);
3477
- }
3478
- WASM_VECTOR_LEN = array.length;
3479
- return ptr;
3480
- }
3481
- var cachedInt32Memory0 = null;
3482
- function getInt32Memory0() {
3483
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
3484
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
3485
- }
3486
- return cachedInt32Memory0;
3487
- }
3488
- function getArrayJsValueFromWasm0(ptr, len) {
3489
- ptr = ptr >>> 0;
3490
- const mem = getUint32Memory0();
3491
- const slice = mem.subarray(ptr / 4, ptr / 4 + len);
3492
- const result = [];
3493
- for (let i3 = 0; i3 < slice.length; i3++) {
3494
- result.push(takeObject(slice[i3]));
3495
- }
3496
- return result;
3497
- }
3498
- module.exports.eval_phase_two_raw = function(tx_bytes, utxos_bytes_x, utxos_bytes_y, cost_mdls_bytes, initial_budget_n, initial_budget_d, slot_config_x, slot_config_y, slot_config_z) {
3499
- try {
3500
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3501
- const ptr0 = passArray8ToWasm0(tx_bytes, wasm.__wbindgen_malloc);
3502
- const len0 = WASM_VECTOR_LEN;
3503
- const ptr1 = passArrayJsValueToWasm0(utxos_bytes_x, wasm.__wbindgen_malloc);
3504
- const len1 = WASM_VECTOR_LEN;
3505
- const ptr2 = passArrayJsValueToWasm0(utxos_bytes_y, wasm.__wbindgen_malloc);
3506
- const len2 = WASM_VECTOR_LEN;
3507
- const ptr3 = passArray8ToWasm0(cost_mdls_bytes, wasm.__wbindgen_malloc);
3508
- const len3 = WASM_VECTOR_LEN;
3509
- wasm.eval_phase_two_raw(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, initial_budget_n, initial_budget_d, slot_config_x, slot_config_y, slot_config_z);
3510
- var r0 = getInt32Memory0()[retptr / 4 + 0];
3511
- var r1 = getInt32Memory0()[retptr / 4 + 1];
3512
- var r22 = getInt32Memory0()[retptr / 4 + 2];
3513
- var r3 = getInt32Memory0()[retptr / 4 + 3];
3514
- if (r3) {
3515
- throw takeObject(r22);
3516
- }
3517
- var v5 = getArrayJsValueFromWasm0(r0, r1).slice();
3518
- wasm.__wbindgen_free(r0, r1 * 4, 4);
3519
- return v5;
3520
- } finally {
3521
- wasm.__wbindgen_add_to_stack_pointer(16);
3522
- }
3523
- };
3524
- function getArrayU8FromWasm0(ptr, len) {
3525
- ptr = ptr >>> 0;
3526
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
3527
- }
3528
- module.exports.apply_params_to_script = function(params_bytes, plutus_script_bytes) {
3529
- try {
3530
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3531
- const ptr0 = passArray8ToWasm0(params_bytes, wasm.__wbindgen_malloc);
3532
- const len0 = WASM_VECTOR_LEN;
3533
- const ptr1 = passArray8ToWasm0(plutus_script_bytes, wasm.__wbindgen_malloc);
3534
- const len1 = WASM_VECTOR_LEN;
3535
- wasm.apply_params_to_script(retptr, ptr0, len0, ptr1, len1);
3536
- var r0 = getInt32Memory0()[retptr / 4 + 0];
3537
- var r1 = getInt32Memory0()[retptr / 4 + 1];
3538
- var r22 = getInt32Memory0()[retptr / 4 + 2];
3539
- var r3 = getInt32Memory0()[retptr / 4 + 3];
3540
- if (r3) {
3541
- throw takeObject(r22);
3542
- }
3543
- var v3 = getArrayU8FromWasm0(r0, r1).slice();
3544
- wasm.__wbindgen_free(r0, r1 * 1, 1);
3545
- return v3;
3546
- } finally {
3547
- wasm.__wbindgen_add_to_stack_pointer(16);
3548
- }
3549
- };
3550
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
3551
- takeObject(arg0);
3552
- };
3553
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
3554
- const ret = getStringFromWasm0(arg0, arg1);
3555
- return addHeapObject(ret);
3556
- };
3557
- module.exports.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
3558
- const ret = getObject(arg0).buffer;
3559
- return addHeapObject(ret);
3560
- };
3561
- module.exports.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
3562
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
3563
- return addHeapObject(ret);
3564
- };
3565
- module.exports.__wbg_new_63b92bc8671ed464 = function(arg0) {
3566
- const ret = new Uint8Array(getObject(arg0));
3567
- return addHeapObject(ret);
3568
- };
3569
- module.exports.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
3570
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3571
- };
3572
- module.exports.__wbg_length_c20a40f15020d68a = function(arg0) {
3573
- const ret = getObject(arg0).length;
3574
- return ret;
3575
- };
3576
- module.exports.__wbindgen_throw = function(arg0, arg1) {
3577
- throw new Error(getStringFromWasm0(arg0, arg1));
3578
- };
3579
- module.exports.__wbindgen_memory = function() {
3580
- const ret = wasm.memory;
3581
- return addHeapObject(ret);
3582
- };
3583
- var path = (init_path(), __toCommonJS(path_exports)).join(__dirname, "uplc_tx_bg.wasm");
3584
- var bytes = (init_empty(), __toCommonJS(empty_exports)).readFileSync(path);
3585
- var wasmModule = new WebAssembly.Module(bytes);
3586
- var wasmInstance = new WebAssembly.Instance(wasmModule, imports);
3587
- wasm = wasmInstance.exports;
3588
- module.exports.__wasm = wasm;
3589
- }
3590
- });
3591
-
3592
- // src/index.ts
3593
- init_dirname();
3594
- init_buffer2();
3595
- init_process2();
3596
- var import_uplc_tx = __toESM(require_uplc_tx());
3597
- var export_apply_params_to_script = import_uplc_tx.apply_params_to_script;
3598
- var export_eval_phase_two_raw = import_uplc_tx.eval_phase_two_raw;
3599
- export {
3600
- export_apply_params_to_script as apply_params_to_script,
3601
- export_eval_phase_two_raw as eval_phase_two_raw
3602
- };
3603
- /*! Bundled license information:
3604
-
3605
- @jspm/core/nodelibs/browser/buffer.js:
3606
- (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
3607
- */