ipfs-unixfs-importer 9.0.7 → 9.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/src/dag-builder/file/index.js +1 -1
- package/dist/src/dag-builder/file/buffer-importer.d.ts +1 -1
- package/dist/src/dag-builder/file/buffer-importer.d.ts.map +1 -1
- package/dist/src/dag-builder/file/index.d.ts +1 -1
- package/dist/src/dag-builder/file/index.d.ts.map +1 -1
- package/dist/src/dag-builder/index.d.ts +1 -1
- package/dist/src/dag-builder/index.d.ts.map +1 -1
- package/dist/src/dir.d.ts +2 -2
- package/dist/src/dir.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/tree-builder.d.ts +1 -1
- package/dist/src/tree-builder.d.ts.map +1 -1
- package/dist/test/helpers/block.d.ts +1 -1
- package/dist/test/helpers/block.d.ts.map +1 -1
- package/esm/src/dag-builder/file/index.js +1 -1
- package/index.min.js +2 -2
- package/package.json +5 -19
- package/types/src/dag-builder/file/buffer-importer.d.ts +1 -1
- package/types/src/dag-builder/file/buffer-importer.d.ts.map +1 -1
- package/types/src/dag-builder/file/index.d.ts +1 -1
- package/types/src/dag-builder/file/index.d.ts.map +1 -1
- package/types/src/dag-builder/index.d.ts +1 -1
- package/types/src/dag-builder/index.d.ts.map +1 -1
- package/types/src/dir.d.ts +2 -2
- package/types/src/dir.d.ts.map +1 -1
- package/types/src/index.d.ts +1 -1
- package/types/src/tree-builder.d.ts +1 -1
- package/types/src/tree-builder.d.ts.map +1 -1
- package/types/test/helpers/block.d.ts +1 -1
- package/types/test/helpers/block.d.ts.map +1 -1
|
@@ -70,7 +70,7 @@ const reduce = (file, blockstore, options) => {
|
|
|
70
70
|
async function reducer(leaves) {
|
|
71
71
|
if (leaves.length === 1 && leaves[0].single && options.reduceSingleLeafToSelf) {
|
|
72
72
|
const leaf = leaves[0];
|
|
73
|
-
if (
|
|
73
|
+
if (file.mtime !== undefined || file.mode !== undefined) {
|
|
74
74
|
let buffer = await blockstore.get(leaf.cid);
|
|
75
75
|
leaf.unixfs = new ipfsUnixfs.UnixFS({
|
|
76
76
|
type: 'file',
|
|
@@ -6,5 +6,5 @@ export type BufferImporter = import('../../types').BufferImporter;
|
|
|
6
6
|
/**
|
|
7
7
|
* @type {BufferImporter}
|
|
8
8
|
*/
|
|
9
|
-
declare function bufferImporter(file: import("../../types").File, block: import("interface-blockstore
|
|
9
|
+
declare function bufferImporter(file: import("../../types").File, block: import("interface-blockstore").Blockstore, options: import("../../types").ImporterOptions): AsyncIterable<() => Promise<import("../../types").InProgressImportResult>>;
|
|
10
10
|
//# sourceMappingURL=buffer-importer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer-importer.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/buffer-importer.js"],"names":[],"mappings":";6BAMa,OAAO,aAAa,EAAE,cAAc;AADjD;;GAEG;AAEH;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"buffer-importer.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/buffer-importer.js"],"names":[],"mappings":";6BAMa,OAAO,aAAa,EAAE,cAAc;AADjD;;GAEG;AAEH;;GAEG;AACH,gPAoCC"}
|
|
@@ -8,5 +8,5 @@ export type FileDAGBuilder = import('../../types').FileDAGBuilder;
|
|
|
8
8
|
/**
|
|
9
9
|
* @type {import('../../types').UnixFSV1DagBuilder<File>}
|
|
10
10
|
*/
|
|
11
|
-
declare function fileBuilder(file: import("../../types").File, block: import("interface-blockstore
|
|
11
|
+
declare function fileBuilder(file: import("../../types").File, block: import("interface-blockstore").Blockstore, options: import("../../types").ImporterOptions): Promise<import("../../types").InProgressImportResult>;
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/index.js"],"names":[],"mappings":";yBAca,OAAO,sBAAsB,EAAE,UAAU;mBACzC,OAAO,aAAa,EAAE,IAAI;8BAC1B,OAAO,aAAa,EAAE,eAAe;sBACrC,OAAO,aAAa,EAAE,OAAO;yBAC7B,OAAO,aAAa,EAAE,UAAU;6BAChC,OAAO,aAAa,EAAE,cAAc;AA+KjD;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/index.js"],"names":[],"mappings":";yBAca,OAAO,sBAAsB,EAAE,UAAU;mBACzC,OAAO,aAAa,EAAE,IAAI;8BAC1B,OAAO,aAAa,EAAE,eAAe;sBACrC,OAAO,aAAa,EAAE,OAAO;yBAC7B,OAAO,aAAa,EAAE,UAAU;6BAChC,OAAO,aAAa,EAAE,cAAc;AA+KjD;;GAEG;AACH,wNAQC"}
|
|
@@ -7,5 +7,5 @@ export type ChunkValidator = import('../types').ChunkValidator;
|
|
|
7
7
|
/**
|
|
8
8
|
* @type {DAGBuilder}
|
|
9
9
|
*/
|
|
10
|
-
declare function dagBuilder(source: AsyncIterable<import("../types").ImportCandidate> | Iterable<import("../types").ImportCandidate>, blockstore: import("interface-blockstore
|
|
10
|
+
declare function dagBuilder(source: AsyncIterable<import("../types").ImportCandidate> | Iterable<import("../types").ImportCandidate>, blockstore: import("interface-blockstore").Blockstore, options: import("../types").ImporterOptions): AsyncIterable<() => Promise<import("../types").InProgressImportResult>>;
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/index.js"],"names":[],"mappings":";mBAQa,OAAO,UAAU,EAAE,IAAI;wBACvB,OAAO,UAAU,EAAE,SAAS;yBAC5B,OAAO,UAAU,EAAE,UAAU;sBAC7B,OAAO,UAAU,EAAE,OAAO;6BAC1B,OAAO,UAAU,EAAE,cAAc;AA2C9C;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/index.js"],"names":[],"mappings":";mBAQa,OAAO,UAAU,EAAE,IAAI;wBACvB,OAAO,UAAU,EAAE,SAAS;yBAC5B,OAAO,UAAU,EAAE,UAAU;sBAC7B,OAAO,UAAU,EAAE,OAAO;6BAC1B,OAAO,UAAU,EAAE,cAAc;AA2C9C;;GAEG;AACH,mTA4DC"}
|
package/dist/src/dir.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type DirProps = {
|
|
|
14
14
|
parentKey?: string | undefined;
|
|
15
15
|
unixfs?: import("ipfs-unixfs").UnixFS | undefined;
|
|
16
16
|
mode?: number | undefined;
|
|
17
|
-
mtime?: import("ipfs-unixfs/src/types").Mtime | undefined;
|
|
17
|
+
mtime?: import("ipfs-unixfs/types/src/types").Mtime | undefined;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* @typedef {import('./types').ImporterOptions} ImporterOptions
|
|
@@ -51,7 +51,7 @@ declare class Dir {
|
|
|
51
51
|
parentKey: string | undefined;
|
|
52
52
|
unixfs: import("ipfs-unixfs").UnixFS | undefined;
|
|
53
53
|
mode: number | undefined;
|
|
54
|
-
mtime: import("ipfs-unixfs/src/types").Mtime | undefined;
|
|
54
|
+
mtime: import("ipfs-unixfs/types/src/types").Mtime | undefined;
|
|
55
55
|
/** @type {CID | undefined} */
|
|
56
56
|
cid: CID | undefined;
|
|
57
57
|
/** @type {number | undefined} */
|
package/dist/src/dir.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../src/dir.js"],"names":[],"mappings":";8BACa,OAAO,SAAS,EAAE,eAAe;2BACjC,OAAO,SAAS,EAAE,YAAY;qCAC9B,OAAO,SAAS,EAAE,sBAAsB;yBACxC,OAAO,sBAAsB,EAAE,UAAU;kBACzC,OAAO,kBAAkB,EAAE,GAAG;;UAG7B,OAAO;SACP,OAAO;UACP,MAAM;WACN,OAAO;UACP,OAAO;;;;;;;AAZrB;;;;;;;;;;;;;;;;;;GAkBG;AACH;IACE;;;OAGG;IACH,mBAHW,QAAQ,WACR,eAAe,EAoBzB;IAjBC,2CAA4B;IAE5B,cAAsB;IACtB,aAAoB;IACpB,aAAsB;IACtB,eAAwB;IACxB,cAAsB;IACtB,wBAA0B;IAC1B,8BAAgC;IAChC,iDAA0B;IAC1B,yBAAsB;IACtB
|
|
1
|
+
{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../src/dir.js"],"names":[],"mappings":";8BACa,OAAO,SAAS,EAAE,eAAe;2BACjC,OAAO,SAAS,EAAE,YAAY;qCAC9B,OAAO,SAAS,EAAE,sBAAsB;yBACxC,OAAO,sBAAsB,EAAE,UAAU;kBACzC,OAAO,kBAAkB,EAAE,GAAG;;UAG7B,OAAO;SACP,OAAO;UACP,MAAM;WACN,OAAO;UACP,OAAO;;;;;;;AAZrB;;;;;;;;;;;;;;;;;;GAkBG;AACH;IACE;;;OAGG;IACH,mBAHW,QAAQ,WACR,eAAe,EAoBzB;IAjBC,2CAA4B;IAE5B,cAAsB;IACtB,aAAoB;IACpB,aAAsB;IACtB,eAAwB;IACxB,cAAsB;IACtB,wBAA0B;IAC1B,8BAAgC;IAChC,iDAA0B;IAC1B,yBAAsB;IACtB,+DAAwB;IAExB,8BAA8B;IAC9B,KADW,GAAG,GAAG,SAAS,CACN;IACpB,iCAAiC;IACjC,MADW,MAAM,GAAG,SAAS,CACR;IAGvB;;;OAGG;IACH,UAHW,MAAM,SACN,sBAAsB,GAAG,GAAG,iBAEZ;IAE3B;;;OAGG;IACH,UAHW,MAAM,GACJ,QAAQ,sBAAsB,GAAG,GAAG,GAAG,SAAS,CAAC,CAI7D;IAED;;OAEG;IACH,mBAFa,cAAc;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAA;KAAC,CAAC,CAEjD;IAE9B;;;OAGG;IACH,kBAHW,UAAU,GACR,cAAc,YAAY,CAAC,CAEV;CAC/B"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
export function importer(source: AsyncIterable<ImportCandidate> | Iterable<ImportCandidate> | ImportCandidate, blockstore: Blockstore, options?: UserImporterOptions): AsyncGenerator<{
|
|
24
24
|
cid: import("multiformats").CID;
|
|
25
25
|
path: string | undefined;
|
|
26
|
-
unixfs: import("ipfs-unixfs
|
|
26
|
+
unixfs: import("ipfs-unixfs").UnixFS | undefined;
|
|
27
27
|
size: number;
|
|
28
28
|
}, void, unknown>;
|
|
29
29
|
export type Blockstore = import('interface-blockstore').Blockstore;
|
|
@@ -7,5 +7,5 @@ export type TreeBuilder = (source: AsyncIterable<InProgressImportResult>, blocks
|
|
|
7
7
|
/**
|
|
8
8
|
* @type {TreeBuilder}
|
|
9
9
|
*/
|
|
10
|
-
declare function treeBuilder(source: AsyncIterable<import("./types").InProgressImportResult>, block: import("interface-blockstore
|
|
10
|
+
declare function treeBuilder(source: AsyncIterable<import("./types").InProgressImportResult>, block: import("interface-blockstore").Blockstore, options: import("./types").ImporterOptions): AsyncIterable<import("./types").ImportResult>;
|
|
11
11
|
//# sourceMappingURL=tree-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-builder.d.ts","sourceRoot":"","sources":["../../src/tree-builder.js"],"names":[],"mappings":";2BAMa,OAAO,SAAS,EAAE,YAAY;qCAC9B,OAAO,SAAS,EAAE,sBAAsB;8BACxC,OAAO,SAAS,EAAE,eAAe;yBACjC,OAAO,sBAAsB,EAAE,UAAU;mCAChC,cAAc,sBAAsB,CAAC,cAAc,UAAU,WAAW,eAAe,KAAK,cAAc,YAAY,CAAC;AAqE7I;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"tree-builder.d.ts","sourceRoot":"","sources":["../../src/tree-builder.js"],"names":[],"mappings":";2BAMa,OAAO,SAAS,EAAE,YAAY;qCAC9B,OAAO,SAAS,EAAE,sBAAsB;8BACxC,OAAO,SAAS,EAAE,eAAe;yBACjC,OAAO,sBAAsB,EAAE,UAAU;mCAChC,cAAc,sBAAsB,CAAC,cAAc,UAAU,WAAW,eAAe,KAAK,cAAc,YAAY,CAAC;AAqE7I;;GAEG;AACH,2OAiCC"}
|
|
@@ -3,5 +3,5 @@ export type CID = import('multiformats/cid').CID;
|
|
|
3
3
|
/**
|
|
4
4
|
* @typedef {import('multiformats/cid').CID} CID
|
|
5
5
|
*/
|
|
6
|
-
declare function createBlockApi(): import("interface-blockstore
|
|
6
|
+
declare function createBlockApi(): import("interface-blockstore").Blockstore;
|
|
7
7
|
//# sourceMappingURL=block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../test/helpers/block.js"],"names":[],"mappings":";kBAKa,OAAO,kBAAkB,EAAE,GAAG;AAD3C;;GAEG;AAEH,
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../test/helpers/block.js"],"names":[],"mappings":";kBAKa,OAAO,kBAAkB,EAAE,GAAG;AAD3C;;GAEG;AAEH,6EAqCC"}
|
|
@@ -46,7 +46,7 @@ const reduce = (file, blockstore, options) => {
|
|
|
46
46
|
async function reducer(leaves) {
|
|
47
47
|
if (leaves.length === 1 && leaves[0].single && options.reduceSingleLeafToSelf) {
|
|
48
48
|
const leaf = leaves[0];
|
|
49
|
-
if (
|
|
49
|
+
if (file.mtime !== undefined || file.mode !== undefined) {
|
|
50
50
|
let buffer = await blockstore.get(leaf.cid);
|
|
51
51
|
leaf.unixfs = new UnixFS({
|
|
52
52
|
type: 'file',
|
package/index.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.IpfsUnixfsImporter = factory()}(typeof self !== 'undefined' ? self : this, function () {
|
|
2
|
-
var IpfsUnixfsImporter=(()=>{var Ys=Object.create;var se=Object.defineProperty;var Ks=Object.getOwnPropertyDescriptor;var Js=Object.getOwnPropertyNames;var Zs=Object.getPrototypeOf,Xs=Object.prototype.hasOwnProperty;var $r=r=>se(r,"__esModule",{value:!0});var U=(r,t)=>()=>(r&&(t=r(r=0)),t);var k=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),M=(r,t)=>{$r(r);for(var e in t)se(r,e,{get:t[e],enumerable:!0})},Qs=(r,t,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Js(t))!Xs.call(r,n)&&n!=="default"&&se(r,n,{get:()=>t[n],enumerable:!(e=Ks(t,n))||e.enumerable});return r},H=r=>Qs($r(se(r!=null?Ys(Zs(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var ae=k((Ec,Gr)=>{"use strict";async function*t1(r,t=1){let e=[];t<1&&(t=1);for await(let n of r)for(e.push(n);e.length>=t;)yield e.slice(0,t),e=e.slice(t);for(;e.length;)yield e.slice(0,t),e=e.slice(t)}Gr.exports=t1});var Ue=k((Sc,Wr)=>{"use strict";var e1=ae();async function*r1(r,t=1){for await(let e of e1(r,t)){let n=e.map(i=>i().then(o=>({ok:!0,value:o}),o=>({ok:!1,err:o})));for(let i=0;i<n.length;i++){let o=await n[i];if(o.ok)yield o.value;else throw o.err}}}Wr.exports=r1});var Kr=k((Ic,Yr)=>{"use strict";Yr.exports=r=>{if(Object.prototype.toString.call(r)!=="[object Object]")return!1;let t=Object.getPrototypeOf(r);return t===null||t===Object.prototype}});var en=k((Qr,tn)=>{"use strict";var ce=Kr(),{hasOwnProperty:Jr}=Object.prototype,{propertyIsEnumerable:n1}=Object,It=(r,t,e)=>Object.defineProperty(r,t,{value:e,writable:!0,enumerable:!0,configurable:!0}),i1=Qr,Zr={concatArrays:!1,ignoreUndefined:!1},fe=r=>{let t=[];for(let e in r)Jr.call(r,e)&&t.push(e);if(Object.getOwnPropertySymbols){let e=Object.getOwnPropertySymbols(r);for(let n of e)n1.call(r,n)&&t.push(n)}return t};function Tt(r){return Array.isArray(r)?o1(r):ce(r)?s1(r):r}function o1(r){let t=r.slice(0,0);return fe(r).forEach(e=>{It(t,e,Tt(r[e]))}),t}function s1(r){let t=Object.getPrototypeOf(r)===null?Object.create(null):{};return fe(r).forEach(e=>{It(t,e,Tt(r[e]))}),t}var Xr=(r,t,e,n)=>(e.forEach(i=>{typeof t[i]=="undefined"&&n.ignoreUndefined||(i in r&&r[i]!==Object.getPrototypeOf(r)?It(r,i,ve(r[i],t[i],n)):It(r,i,Tt(t[i])))}),r),a1=(r,t,e)=>{let n=r.slice(0,0),i=0;return[r,t].forEach(o=>{let s=[];for(let c=0;c<o.length;c++)!Jr.call(o,c)||(s.push(String(c)),o===r?It(n,i++,o[c]):It(n,i++,Tt(o[c])));n=Xr(n,o,fe(o).filter(c=>!s.includes(c)),e)}),n};function ve(r,t,e){return e.concatArrays&&Array.isArray(r)&&Array.isArray(t)?a1(r,t,e):!ce(t)||!ce(r)?Tt(t):Xr(r,t,fe(t),e)}tn.exports=function(...r){let t=ve(Tt(Zr),this!==i1&&this||{},Zr),e={_:{}};for(let n of r)if(n!==void 0){if(!ce(n))throw new TypeError("`"+n+"` is not an Option Object");e=ve(e,{_:n},t)}return e._}});var Rt={};M(Rt,{coerce:()=>Y,empty:()=>on,equals:()=>Oe,fromHex:()=>f1,fromString:()=>ze,isBinary:()=>u1,toHex:()=>c1,toString:()=>Pe});var on,c1,f1,Oe,Y,u1,ze,Pe,pt=U(()=>{on=new Uint8Array(0),c1=r=>r.reduce((t,e)=>t+e.toString(16).padStart(2,"0"),""),f1=r=>{let t=r.match(/../g);return t?new Uint8Array(t.map(e=>parseInt(e,16))):on},Oe=(r,t)=>{if(r===t)return!0;if(r.byteLength!==t.byteLength)return!1;for(let e=0;e<r.byteLength;e++)if(r[e]!==t[e])return!1;return!0},Y=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},u1=r=>r instanceof ArrayBuffer||ArrayBuffer.isView(r),ze=r=>new TextEncoder().encode(r),Pe=r=>new TextDecoder().decode(r)});function an(r,t,e){t=t||[],e=e||0;for(var n=e;r>=d1;)t[e++]=r&255|sn,r/=128;for(;r&p1;)t[e++]=r&255|sn,r>>>=7;return t[e]=r|0,an.bytes=e-n+1,t}function je(r,t){var e=0,t=t||0,n=0,i=t,o,s=r.length;do{if(i>=s)throw je.bytes=0,new RangeError("Could not decode varint");o=r[i++],e+=n<28?(o&cn)<<n:(o&cn)*Math.pow(2,n),n+=7}while(o>=m1);return je.bytes=i-t,e}var h1,sn,l1,p1,d1,y1,m1,cn,g1,w1,b1,x1,_1,B1,A1,E1,S1,I1,T1,k1,Mt,fn=U(()=>{h1=an,sn=128,l1=127,p1=~l1,d1=Math.pow(2,31);y1=je,m1=128,cn=127;g1=Math.pow(2,7),w1=Math.pow(2,14),b1=Math.pow(2,21),x1=Math.pow(2,28),_1=Math.pow(2,35),B1=Math.pow(2,42),A1=Math.pow(2,49),E1=Math.pow(2,56),S1=Math.pow(2,63),I1=function(r){return r<g1?1:r<w1?2:r<b1?3:r<x1?4:r<_1?5:r<B1?6:r<A1?7:r<E1?8:r<S1?9:10},T1={encode:h1,decode:y1,encodingLength:I1},k1=T1,Mt=k1});var Ht,kt,Ft,ue=U(()=>{fn();Ht=r=>[Mt.decode(r),Mt.decode.bytes],kt=(r,t,e=0)=>(Mt.encode(r,t,e),t),Ft=r=>Mt.encodingLength(r)});var _t,hn,ln,Vt,qt=U(()=>{pt();ue();_t=(r,t)=>{let e=t.byteLength,n=Ft(r),i=n+Ft(e),o=new Uint8Array(i+e);return kt(r,o,0),kt(e,o,n),o.set(t,i),new Vt(r,e,t,o)},hn=r=>{let t=Y(r),[e,n]=Ht(t),[i,o]=Ht(t.subarray(n)),s=t.subarray(n+o);if(s.byteLength!==i)throw new Error("Incorrect length");return new Vt(e,i,s,t)},ln=(r,t)=>r===t?!0:r.code===t.code&&r.size===t.size&&Oe(r.bytes,t.bytes),Vt=class{constructor(t,e,n,i){this.code=t,this.size=e,this.digest=n,this.bytes=i}}});var Dt,dn,he=U(()=>{qt();Dt=({name:r,code:t,encode:e})=>new dn(r,t,e),dn=class{constructor(t,e,n){this.name=t,this.code=e,this.encode=n}digest(t){if(t instanceof Uint8Array){let e=this.encode(t);return e instanceof Uint8Array?_t(this.code,e):e.then(n=>_t(this.code,n))}else throw Error("Unknown type, must be binary type")}}});var Re={};M(Re,{sha256:()=>Ct,sha512:()=>F1});var mn,Ct,F1,le=U(()=>{he();mn=r=>async t=>new Uint8Array(await crypto.subtle.digest(r,t)),Ct=Dt({name:"sha2-256",code:18,encode:mn("SHA-256")}),F1=Dt({name:"sha2-512",code:19,encode:mn("SHA-512")})});function D1(r,t){if(r.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),n=0;n<e.length;n++)e[n]=255;for(var i=0;i<r.length;i++){var o=r.charAt(i),s=o.charCodeAt(0);if(e[s]!==255)throw new TypeError(o+" is ambiguous");e[s]=i}var c=r.length,a=r.charAt(0),h=Math.log(c)/Math.log(256),u=Math.log(256)/Math.log(c);function d(p){if(p instanceof Uint8Array||(ArrayBuffer.isView(p)?p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength):Array.isArray(p)&&(p=Uint8Array.from(p))),!(p instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(p.length===0)return"";for(var g=0,C=0,m=0,w=p.length;m!==w&&p[m]===0;)m++,g++;for(var x=(w-m)*u+1>>>0,_=new Uint8Array(x);m!==w;){for(var I=p[m],b=0,y=x-1;(I!==0||b<C)&&y!==-1;y--,b++)I+=256*_[y]>>>0,_[y]=I%c>>>0,I=I/c>>>0;if(I!==0)throw new Error("Non-zero carry");C=b,m++}for(var B=x-C;B!==x&&_[B]===0;)B++;for(var T=a.repeat(g);B<x;++B)T+=r.charAt(_[B]);return T}function E(p){if(typeof p!="string")throw new TypeError("Expected String");if(p.length===0)return new Uint8Array;var g=0;if(p[g]!==" "){for(var C=0,m=0;p[g]===a;)C++,g++;for(var w=(p.length-g)*h+1>>>0,x=new Uint8Array(w);p[g];){var _=e[p.charCodeAt(g)];if(_===255)return;for(var I=0,b=w-1;(_!==0||I<m)&&b!==-1;b--,I++)_+=c*x[b]>>>0,x[b]=_%256>>>0,_=_/256>>>0;if(_!==0)throw new Error("Non-zero carry");m=I,g++}if(p[g]!==" "){for(var y=w-m;y!==w&&x[y]===0;)y++;for(var B=new Uint8Array(C+(w-y)),T=C;y!==w;)B[T++]=x[y++];return B}}}function f(p){var g=E(p);if(g)return g;throw new Error(`Non-${t} character`)}return{encode:d,decodeUnsafe:E,decode:f}}var C1,L1,gn,wn=U(()=>{C1=D1,L1=C1,gn=L1});var bn,xn,_n,Bn,An,pe,dt,N1,U1,O,it=U(()=>{wn();pt();bn=class{constructor(t,e,n){this.name=t,this.prefix=e,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}},xn=class{constructor(t,e,n){this.name=t,this.prefix=e,this.baseDecode=n}decode(t){if(typeof t=="string")switch(t[0]){case this.prefix:return this.baseDecode(t.slice(1));default:throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`)}else throw Error("Can only multibase decode strings")}or(t){return Bn(this,t)}},_n=class{constructor(t){this.decoders=t}or(t){return Bn(this,t)}decode(t){let e=t[0],n=this.decoders[e];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},Bn=(r,t)=>new _n({...r.decoders||{[r.prefix]:r},...t.decoders||{[t.prefix]:t}}),An=class{constructor(t,e,n,i){this.name=t,this.prefix=e,this.baseEncode=n,this.baseDecode=i,this.encoder=new bn(t,e,n),this.decoder=new xn(t,e,i)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}},pe=({name:r,prefix:t,encode:e,decode:n})=>new An(r,t,e,n),dt=({prefix:r,name:t,alphabet:e})=>{let{encode:n,decode:i}=gn(e,t);return pe({prefix:r,name:t,encode:n,decode:o=>Y(i(o))})},N1=(r,t,e,n)=>{let i={};for(let u=0;u<t.length;++u)i[t[u]]=u;let o=r.length;for(;r[o-1]==="=";)--o;let s=new Uint8Array(o*e/8|0),c=0,a=0,h=0;for(let u=0;u<o;++u){let d=i[r[u]];if(d===void 0)throw new SyntaxError(`Non-${n} character`);a=a<<e|d,c+=e,c>=8&&(c-=8,s[h++]=255&a>>c)}if(c>=e||255&a<<8-c)throw new SyntaxError("Unexpected end of data");return s},U1=(r,t,e)=>{let n=t[t.length-1]==="=",i=(1<<e)-1,o="",s=0,c=0;for(let a=0;a<r.length;++a)for(c=c<<8|r[a],s+=8;s>e;)s-=e,o+=t[i&c>>s];if(s&&(o+=t[i&c<<e-s]),n)for(;o.length*e&7;)o+="=";return o},O=({name:r,prefix:t,bitsPerChar:e,alphabet:n})=>pe({prefix:t,name:r,encode(i){return U1(i,n,e)},decode(i){return N1(i,n,e,r)}})});var Me={};M(Me,{base58btc:()=>ot,base58flickr:()=>v1});var ot,v1,He=U(()=>{it();ot=dt({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),v1=dt({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});var Ve={};M(Ve,{base32:()=>Lt,base32hex:()=>j1,base32hexpad:()=>M1,base32hexpadupper:()=>H1,base32hexupper:()=>R1,base32pad:()=>z1,base32padupper:()=>P1,base32upper:()=>O1,base32z:()=>V1});var Lt,O1,z1,P1,j1,R1,M1,H1,V1,qe=U(()=>{it();Lt=O({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),O1=O({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),z1=O({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),P1=O({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),j1=O({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),R1=O({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),M1=O({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),H1=O({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),V1=O({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})});var L,q1,$1,G1,$t,W1,En,Sn,de,ye,Y1,K1,J1,Gt=U(()=>{ue();qt();He();qe();pt();L=class{constructor(t,e,n,i){this.code=e,this.version=t,this.multihash=n,this.bytes=i,this.byteOffset=i.byteOffset,this.byteLength=i.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:ye,byteLength:ye,code:de,version:de,multihash:de,bytes:de,_baseCache:ye,asCID:ye})}toV0(){switch(this.version){case 0:return this;default:{let{code:t,multihash:e}=this;if(t!==$t)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==W1)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return L.createV0(e)}}}toV1(){switch(this.version){case 0:{let{code:t,digest:e}=this.multihash,n=_t(t,e);return L.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(t){return t&&this.code===t.code&&this.version===t.version&&ln(this.multihash,t.multihash)}toString(t){let{bytes:e,version:n,_baseCache:i}=this;switch(n){case 0:return $1(e,i,t||ot.encoder);default:return G1(e,i,t||Lt.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(t){return K1(/^0\.0/,J1),!!(t&&(t[Sn]||t.asCID===t))}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(t){if(t instanceof L)return t;if(t!=null&&t.asCID===t){let{version:e,code:n,multihash:i,bytes:o}=t;return new L(e,n,i,o||En(e,n,i.bytes))}else if(t!=null&&t[Sn]===!0){let{version:e,multihash:n,code:i}=t,o=hn(n);return L.create(e,i,o)}else return null}static create(t,e,n){if(typeof e!="number")throw new Error("String codecs are no longer supported");switch(t){case 0:{if(e!==$t)throw new Error(`Version 0 CID must use dag-pb (code: ${$t}) block encoding`);return new L(t,e,n,n.bytes)}case 1:{let i=En(t,e,n.bytes);return new L(t,e,n,i)}default:throw new Error("Invalid version")}}static createV0(t){return L.create(0,$t,t)}static createV1(t,e){return L.create(1,t,e)}static decode(t){let[e,n]=L.decodeFirst(t);if(n.length)throw new Error("Incorrect length");return e}static decodeFirst(t){let e=L.inspectBytes(t),n=e.size-e.multihashSize,i=Y(t.subarray(n,n+e.multihashSize));if(i.byteLength!==e.multihashSize)throw new Error("Incorrect length");let o=i.subarray(e.multihashSize-e.digestSize),s=new Vt(e.multihashCode,e.digestSize,o,i);return[e.version===0?L.createV0(s):L.createV1(e.codec,s),t.subarray(e.size)]}static inspectBytes(t){let e=0,n=()=>{let[d,E]=Ht(t.subarray(e));return e+=E,d},i=n(),o=$t;if(i===18?(i=0,e=0):i===1&&(o=n()),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);let s=e,c=n(),a=n(),h=e+a,u=h-s;return{version:i,codec:o,multihashCode:c,digestSize:a,multihashSize:u,size:h}}static parse(t,e){let[n,i]=q1(t,e),o=L.decode(i);return o._baseCache.set(n,t),o}},q1=(r,t)=>{switch(r[0]){case"Q":{let e=t||ot;return[ot.prefix,e.decode(`${ot.prefix}${r}`)]}case ot.prefix:{let e=t||ot;return[ot.prefix,e.decode(r)]}case Lt.prefix:{let e=t||Lt;return[Lt.prefix,e.decode(r)]}default:{if(t==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[r[0],t.decode(r)]}}},$1=(r,t,e)=>{let{prefix:n}=e;if(n!==ot.prefix)throw Error(`Cannot string encode V0 in ${e.name} encoding`);let i=t.get(n);if(i==null){let o=e.encode(r).slice(1);return t.set(n,o),o}else return i},G1=(r,t,e)=>{let{prefix:n}=e,i=t.get(n);if(i==null){let o=e.encode(r);return t.set(n,o),o}else return i},$t=112,W1=18,En=(r,t,e)=>{let n=Ft(r),i=n+Ft(t),o=new Uint8Array(i+e.byteLength);return kt(r,o,0),kt(t,o,n),o.set(e,i),o},Sn=Symbol.for("@ipld/js-cid/CID"),de={writable:!1,configurable:!1,enumerable:!0},ye={writable:!1,enumerable:!1,configurable:!1},Y1="0.0.0-dev",K1=(r,t)=>{if(r.test(Y1))console.warn(t);else throw new Error(t)},J1=`CID.isCID(v) is deprecated and will be removed in the next major release.
|
|
2
|
+
var IpfsUnixfsImporter=(()=>{var Ys=Object.create;var oe=Object.defineProperty;var Ks=Object.getOwnPropertyDescriptor;var Js=Object.getOwnPropertyNames;var Zs=Object.getPrototypeOf,Xs=Object.prototype.hasOwnProperty;var $r=r=>oe(r,"__esModule",{value:!0});var U=(r,t)=>()=>(r&&(t=r(r=0)),t);var k=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),M=(r,t)=>{$r(r);for(var e in t)oe(r,e,{get:t[e],enumerable:!0})},Qs=(r,t,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Js(t))!Xs.call(r,n)&&n!=="default"&&oe(r,n,{get:()=>t[n],enumerable:!(e=Ks(t,n))||e.enumerable});return r},H=r=>Qs($r(oe(r!=null?Ys(Zs(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var se=k((Ec,Gr)=>{"use strict";async function*t1(r,t=1){let e=[];t<1&&(t=1);for await(let n of r)for(e.push(n);e.length>=t;)yield e.slice(0,t),e=e.slice(t);for(;e.length;)yield e.slice(0,t),e=e.slice(t)}Gr.exports=t1});var Ue=k((Sc,Wr)=>{"use strict";var e1=se();async function*r1(r,t=1){for await(let e of e1(r,t)){let n=e.map(i=>i().then(o=>({ok:!0,value:o}),o=>({ok:!1,err:o})));for(let i=0;i<n.length;i++){let o=await n[i];if(o.ok)yield o.value;else throw o.err}}}Wr.exports=r1});var Kr=k((Ic,Yr)=>{"use strict";Yr.exports=r=>{if(Object.prototype.toString.call(r)!=="[object Object]")return!1;let t=Object.getPrototypeOf(r);return t===null||t===Object.prototype}});var en=k((Qr,tn)=>{"use strict";var ae=Kr(),{hasOwnProperty:Jr}=Object.prototype,{propertyIsEnumerable:n1}=Object,It=(r,t,e)=>Object.defineProperty(r,t,{value:e,writable:!0,enumerable:!0,configurable:!0}),i1=Qr,Zr={concatArrays:!1,ignoreUndefined:!1},ce=r=>{let t=[];for(let e in r)Jr.call(r,e)&&t.push(e);if(Object.getOwnPropertySymbols){let e=Object.getOwnPropertySymbols(r);for(let n of e)n1.call(r,n)&&t.push(n)}return t};function Tt(r){return Array.isArray(r)?o1(r):ae(r)?s1(r):r}function o1(r){let t=r.slice(0,0);return ce(r).forEach(e=>{It(t,e,Tt(r[e]))}),t}function s1(r){let t=Object.getPrototypeOf(r)===null?Object.create(null):{};return ce(r).forEach(e=>{It(t,e,Tt(r[e]))}),t}var Xr=(r,t,e,n)=>(e.forEach(i=>{typeof t[i]=="undefined"&&n.ignoreUndefined||(i in r&&r[i]!==Object.getPrototypeOf(r)?It(r,i,ve(r[i],t[i],n)):It(r,i,Tt(t[i])))}),r),a1=(r,t,e)=>{let n=r.slice(0,0),i=0;return[r,t].forEach(o=>{let s=[];for(let c=0;c<o.length;c++)!Jr.call(o,c)||(s.push(String(c)),o===r?It(n,i++,o[c]):It(n,i++,Tt(o[c])));n=Xr(n,o,ce(o).filter(c=>!s.includes(c)),e)}),n};function ve(r,t,e){return e.concatArrays&&Array.isArray(r)&&Array.isArray(t)?a1(r,t,e):!ae(t)||!ae(r)?Tt(t):Xr(r,t,ce(t),e)}tn.exports=function(...r){let t=ve(Tt(Zr),this!==i1&&this||{},Zr),e={_:{}};for(let n of r)if(n!==void 0){if(!ae(n))throw new TypeError("`"+n+"` is not an Option Object");e=ve(e,{_:n},t)}return e._}});var Rt={};M(Rt,{coerce:()=>Y,empty:()=>on,equals:()=>Oe,fromHex:()=>f1,fromString:()=>ze,isBinary:()=>u1,toHex:()=>c1,toString:()=>Pe});var on,c1,f1,Oe,Y,u1,ze,Pe,pt=U(()=>{on=new Uint8Array(0),c1=r=>r.reduce((t,e)=>t+e.toString(16).padStart(2,"0"),""),f1=r=>{let t=r.match(/../g);return t?new Uint8Array(t.map(e=>parseInt(e,16))):on},Oe=(r,t)=>{if(r===t)return!0;if(r.byteLength!==t.byteLength)return!1;for(let e=0;e<r.byteLength;e++)if(r[e]!==t[e])return!1;return!0},Y=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},u1=r=>r instanceof ArrayBuffer||ArrayBuffer.isView(r),ze=r=>new TextEncoder().encode(r),Pe=r=>new TextDecoder().decode(r)});function an(r,t,e){t=t||[],e=e||0;for(var n=e;r>=d1;)t[e++]=r&255|sn,r/=128;for(;r&p1;)t[e++]=r&255|sn,r>>>=7;return t[e]=r|0,an.bytes=e-n+1,t}function je(r,t){var e=0,t=t||0,n=0,i=t,o,s=r.length;do{if(i>=s)throw je.bytes=0,new RangeError("Could not decode varint");o=r[i++],e+=n<28?(o&cn)<<n:(o&cn)*Math.pow(2,n),n+=7}while(o>=m1);return je.bytes=i-t,e}var h1,sn,l1,p1,d1,y1,m1,cn,g1,w1,b1,x1,_1,B1,A1,E1,S1,I1,T1,k1,Mt,fn=U(()=>{h1=an,sn=128,l1=127,p1=~l1,d1=Math.pow(2,31);y1=je,m1=128,cn=127;g1=Math.pow(2,7),w1=Math.pow(2,14),b1=Math.pow(2,21),x1=Math.pow(2,28),_1=Math.pow(2,35),B1=Math.pow(2,42),A1=Math.pow(2,49),E1=Math.pow(2,56),S1=Math.pow(2,63),I1=function(r){return r<g1?1:r<w1?2:r<b1?3:r<x1?4:r<_1?5:r<B1?6:r<A1?7:r<E1?8:r<S1?9:10},T1={encode:h1,decode:y1,encodingLength:I1},k1=T1,Mt=k1});var Ht,kt,Ft,fe=U(()=>{fn();Ht=r=>[Mt.decode(r),Mt.decode.bytes],kt=(r,t,e=0)=>(Mt.encode(r,t,e),t),Ft=r=>Mt.encodingLength(r)});var _t,hn,ln,Vt,qt=U(()=>{pt();fe();_t=(r,t)=>{let e=t.byteLength,n=Ft(r),i=n+Ft(e),o=new Uint8Array(i+e);return kt(r,o,0),kt(e,o,n),o.set(t,i),new Vt(r,e,t,o)},hn=r=>{let t=Y(r),[e,n]=Ht(t),[i,o]=Ht(t.subarray(n)),s=t.subarray(n+o);if(s.byteLength!==i)throw new Error("Incorrect length");return new Vt(e,i,s,t)},ln=(r,t)=>r===t?!0:r.code===t.code&&r.size===t.size&&Oe(r.bytes,t.bytes),Vt=class{constructor(t,e,n,i){this.code=t,this.size=e,this.digest=n,this.bytes=i}}});var Dt,dn,ue=U(()=>{qt();Dt=({name:r,code:t,encode:e})=>new dn(r,t,e),dn=class{constructor(t,e,n){this.name=t,this.code=e,this.encode=n}digest(t){if(t instanceof Uint8Array){let e=this.encode(t);return e instanceof Uint8Array?_t(this.code,e):e.then(n=>_t(this.code,n))}else throw Error("Unknown type, must be binary type")}}});var Re={};M(Re,{sha256:()=>Ct,sha512:()=>F1});var mn,Ct,F1,he=U(()=>{ue();mn=r=>async t=>new Uint8Array(await crypto.subtle.digest(r,t)),Ct=Dt({name:"sha2-256",code:18,encode:mn("SHA-256")}),F1=Dt({name:"sha2-512",code:19,encode:mn("SHA-512")})});function D1(r,t){if(r.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),n=0;n<e.length;n++)e[n]=255;for(var i=0;i<r.length;i++){var o=r.charAt(i),s=o.charCodeAt(0);if(e[s]!==255)throw new TypeError(o+" is ambiguous");e[s]=i}var c=r.length,a=r.charAt(0),h=Math.log(c)/Math.log(256),u=Math.log(256)/Math.log(c);function d(p){if(p instanceof Uint8Array||(ArrayBuffer.isView(p)?p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength):Array.isArray(p)&&(p=Uint8Array.from(p))),!(p instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(p.length===0)return"";for(var g=0,C=0,m=0,w=p.length;m!==w&&p[m]===0;)m++,g++;for(var x=(w-m)*u+1>>>0,_=new Uint8Array(x);m!==w;){for(var I=p[m],b=0,y=x-1;(I!==0||b<C)&&y!==-1;y--,b++)I+=256*_[y]>>>0,_[y]=I%c>>>0,I=I/c>>>0;if(I!==0)throw new Error("Non-zero carry");C=b,m++}for(var B=x-C;B!==x&&_[B]===0;)B++;for(var T=a.repeat(g);B<x;++B)T+=r.charAt(_[B]);return T}function E(p){if(typeof p!="string")throw new TypeError("Expected String");if(p.length===0)return new Uint8Array;var g=0;if(p[g]!==" "){for(var C=0,m=0;p[g]===a;)C++,g++;for(var w=(p.length-g)*h+1>>>0,x=new Uint8Array(w);p[g];){var _=e[p.charCodeAt(g)];if(_===255)return;for(var I=0,b=w-1;(_!==0||I<m)&&b!==-1;b--,I++)_+=c*x[b]>>>0,x[b]=_%256>>>0,_=_/256>>>0;if(_!==0)throw new Error("Non-zero carry");m=I,g++}if(p[g]!==" "){for(var y=w-m;y!==w&&x[y]===0;)y++;for(var B=new Uint8Array(C+(w-y)),T=C;y!==w;)B[T++]=x[y++];return B}}}function f(p){var g=E(p);if(g)return g;throw new Error(`Non-${t} character`)}return{encode:d,decodeUnsafe:E,decode:f}}var C1,L1,gn,wn=U(()=>{C1=D1,L1=C1,gn=L1});var bn,xn,_n,Bn,An,le,dt,N1,U1,O,it=U(()=>{wn();pt();bn=class{constructor(t,e,n){this.name=t,this.prefix=e,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}},xn=class{constructor(t,e,n){this.name=t,this.prefix=e,this.baseDecode=n}decode(t){if(typeof t=="string")switch(t[0]){case this.prefix:return this.baseDecode(t.slice(1));default:throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`)}else throw Error("Can only multibase decode strings")}or(t){return Bn(this,t)}},_n=class{constructor(t){this.decoders=t}or(t){return Bn(this,t)}decode(t){let e=t[0],n=this.decoders[e];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},Bn=(r,t)=>new _n({...r.decoders||{[r.prefix]:r},...t.decoders||{[t.prefix]:t}}),An=class{constructor(t,e,n,i){this.name=t,this.prefix=e,this.baseEncode=n,this.baseDecode=i,this.encoder=new bn(t,e,n),this.decoder=new xn(t,e,i)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}},le=({name:r,prefix:t,encode:e,decode:n})=>new An(r,t,e,n),dt=({prefix:r,name:t,alphabet:e})=>{let{encode:n,decode:i}=gn(e,t);return le({prefix:r,name:t,encode:n,decode:o=>Y(i(o))})},N1=(r,t,e,n)=>{let i={};for(let u=0;u<t.length;++u)i[t[u]]=u;let o=r.length;for(;r[o-1]==="=";)--o;let s=new Uint8Array(o*e/8|0),c=0,a=0,h=0;for(let u=0;u<o;++u){let d=i[r[u]];if(d===void 0)throw new SyntaxError(`Non-${n} character`);a=a<<e|d,c+=e,c>=8&&(c-=8,s[h++]=255&a>>c)}if(c>=e||255&a<<8-c)throw new SyntaxError("Unexpected end of data");return s},U1=(r,t,e)=>{let n=t[t.length-1]==="=",i=(1<<e)-1,o="",s=0,c=0;for(let a=0;a<r.length;++a)for(c=c<<8|r[a],s+=8;s>e;)s-=e,o+=t[i&c>>s];if(s&&(o+=t[i&c<<e-s]),n)for(;o.length*e&7;)o+="=";return o},O=({name:r,prefix:t,bitsPerChar:e,alphabet:n})=>le({prefix:t,name:r,encode(i){return U1(i,n,e)},decode(i){return N1(i,n,e,r)}})});var Me={};M(Me,{base58btc:()=>ot,base58flickr:()=>v1});var ot,v1,He=U(()=>{it();ot=dt({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),v1=dt({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});var Ve={};M(Ve,{base32:()=>Lt,base32hex:()=>j1,base32hexpad:()=>M1,base32hexpadupper:()=>H1,base32hexupper:()=>R1,base32pad:()=>z1,base32padupper:()=>P1,base32upper:()=>O1,base32z:()=>V1});var Lt,O1,z1,P1,j1,R1,M1,H1,V1,qe=U(()=>{it();Lt=O({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),O1=O({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),z1=O({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),P1=O({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),j1=O({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),R1=O({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),M1=O({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),H1=O({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),V1=O({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})});var L,q1,$1,G1,$t,W1,En,Sn,pe,de,Y1,K1,J1,Gt=U(()=>{fe();qt();He();qe();pt();L=class{constructor(t,e,n,i){this.code=e,this.version=t,this.multihash=n,this.bytes=i,this.byteOffset=i.byteOffset,this.byteLength=i.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:de,byteLength:de,code:pe,version:pe,multihash:pe,bytes:pe,_baseCache:de,asCID:de})}toV0(){switch(this.version){case 0:return this;default:{let{code:t,multihash:e}=this;if(t!==$t)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==W1)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return L.createV0(e)}}}toV1(){switch(this.version){case 0:{let{code:t,digest:e}=this.multihash,n=_t(t,e);return L.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(t){return t&&this.code===t.code&&this.version===t.version&&ln(this.multihash,t.multihash)}toString(t){let{bytes:e,version:n,_baseCache:i}=this;switch(n){case 0:return $1(e,i,t||ot.encoder);default:return G1(e,i,t||Lt.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(t){return K1(/^0\.0/,J1),!!(t&&(t[Sn]||t.asCID===t))}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(t){if(t instanceof L)return t;if(t!=null&&t.asCID===t){let{version:e,code:n,multihash:i,bytes:o}=t;return new L(e,n,i,o||En(e,n,i.bytes))}else if(t!=null&&t[Sn]===!0){let{version:e,multihash:n,code:i}=t,o=hn(n);return L.create(e,i,o)}else return null}static create(t,e,n){if(typeof e!="number")throw new Error("String codecs are no longer supported");switch(t){case 0:{if(e!==$t)throw new Error(`Version 0 CID must use dag-pb (code: ${$t}) block encoding`);return new L(t,e,n,n.bytes)}case 1:{let i=En(t,e,n.bytes);return new L(t,e,n,i)}default:throw new Error("Invalid version")}}static createV0(t){return L.create(0,$t,t)}static createV1(t,e){return L.create(1,t,e)}static decode(t){let[e,n]=L.decodeFirst(t);if(n.length)throw new Error("Incorrect length");return e}static decodeFirst(t){let e=L.inspectBytes(t),n=e.size-e.multihashSize,i=Y(t.subarray(n,n+e.multihashSize));if(i.byteLength!==e.multihashSize)throw new Error("Incorrect length");let o=i.subarray(e.multihashSize-e.digestSize),s=new Vt(e.multihashCode,e.digestSize,o,i);return[e.version===0?L.createV0(s):L.createV1(e.codec,s),t.subarray(e.size)]}static inspectBytes(t){let e=0,n=()=>{let[d,E]=Ht(t.subarray(e));return e+=E,d},i=n(),o=$t;if(i===18?(i=0,e=0):i===1&&(o=n()),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);let s=e,c=n(),a=n(),h=e+a,u=h-s;return{version:i,codec:o,multihashCode:c,digestSize:a,multihashSize:u,size:h}}static parse(t,e){let[n,i]=q1(t,e),o=L.decode(i);return o._baseCache.set(n,t),o}},q1=(r,t)=>{switch(r[0]){case"Q":{let e=t||ot;return[ot.prefix,e.decode(`${ot.prefix}${r}`)]}case ot.prefix:{let e=t||ot;return[ot.prefix,e.decode(r)]}case Lt.prefix:{let e=t||Lt;return[Lt.prefix,e.decode(r)]}default:{if(t==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[r[0],t.decode(r)]}}},$1=(r,t,e)=>{let{prefix:n}=e;if(n!==ot.prefix)throw Error(`Cannot string encode V0 in ${e.name} encoding`);let i=t.get(n);if(i==null){let o=e.encode(r).slice(1);return t.set(n,o),o}else return i},G1=(r,t,e)=>{let{prefix:n}=e,i=t.get(n);if(i==null){let o=e.encode(r);return t.set(n,o),o}else return i},$t=112,W1=18,En=(r,t,e)=>{let n=Ft(r),i=n+Ft(t),o=new Uint8Array(i+e.byteLength);return kt(r,o,0),kt(t,o,n),o.set(e,i),o},Sn=Symbol.for("@ipld/js-cid/CID"),pe={writable:!1,configurable:!1,enumerable:!0},de={writable:!1,enumerable:!1,configurable:!1},Y1="0.0.0-dev",K1=(r,t)=>{if(r.test(Y1))console.warn(t);else throw new Error(t)},J1=`CID.isCID(v) is deprecated and will be removed in the next major release.
|
|
3
3
|
Following code pattern:
|
|
4
4
|
|
|
5
5
|
if (CID.isCID(value)) {
|
|
@@ -13,7 +13,7 @@ if (cid) {
|
|
|
13
13
|
// Make sure to use cid instead of value
|
|
14
14
|
doSomethingWithCID(cid)
|
|
15
15
|
}
|
|
16
|
-
`});var $e=U(()=>{Gt();ue();pt();he();qt()});var In=k((Wt,me)=>{(function(r,t){"use strict";var e={version:"3.0.0",x86:{},x64:{},inputValidation:!0};function n(f){if(!Array.isArray(f)&&!ArrayBuffer.isView(f))return!1;for(var p=0;p<f.length;p++)if(!Number.isInteger(f[p])||f[p]<0||f[p]>255)return!1;return!0}function i(f,p){return(f&65535)*p+(((f>>>16)*p&65535)<<16)}function o(f,p){return f<<p|f>>>32-p}function s(f){return f^=f>>>16,f=i(f,2246822507),f^=f>>>13,f=i(f,3266489909),f^=f>>>16,f}function c(f,p){f=[f[0]>>>16,f[0]&65535,f[1]>>>16,f[1]&65535],p=[p[0]>>>16,p[0]&65535,p[1]>>>16,p[1]&65535];var g=[0,0,0,0];return g[3]+=f[3]+p[3],g[2]+=g[3]>>>16,g[3]&=65535,g[2]+=f[2]+p[2],g[1]+=g[2]>>>16,g[2]&=65535,g[1]+=f[1]+p[1],g[0]+=g[1]>>>16,g[1]&=65535,g[0]+=f[0]+p[0],g[0]&=65535,[g[0]<<16|g[1],g[2]<<16|g[3]]}function a(f,p){f=[f[0]>>>16,f[0]&65535,f[1]>>>16,f[1]&65535],p=[p[0]>>>16,p[0]&65535,p[1]>>>16,p[1]&65535];var g=[0,0,0,0];return g[3]+=f[3]*p[3],g[2]+=g[3]>>>16,g[3]&=65535,g[2]+=f[2]*p[3],g[1]+=g[2]>>>16,g[2]&=65535,g[2]+=f[3]*p[2],g[1]+=g[2]>>>16,g[2]&=65535,g[1]+=f[1]*p[3],g[0]+=g[1]>>>16,g[1]&=65535,g[1]+=f[2]*p[2],g[0]+=g[1]>>>16,g[1]&=65535,g[1]+=f[3]*p[1],g[0]+=g[1]>>>16,g[1]&=65535,g[0]+=f[0]*p[3]+f[1]*p[2]+f[2]*p[1]+f[3]*p[0],g[0]&=65535,[g[0]<<16|g[1],g[2]<<16|g[3]]}function h(f,p){return p%=64,p===32?[f[1],f[0]]:p<32?[f[0]<<p|f[1]>>>32-p,f[1]<<p|f[0]>>>32-p]:(p-=32,[f[1]<<p|f[0]>>>32-p,f[0]<<p|f[1]>>>32-p])}function u(f,p){return p%=64,p===0?f:p<32?[f[0]<<p|f[1]>>>32-p,f[1]<<p]:[f[1]<<p-32,0]}function d(f,p){return[f[0]^p[0],f[1]^p[1]]}function E(f){return f=d(f,[0,f[0]>>>1]),f=a(f,[4283543511,3981806797]),f=d(f,[0,f[0]>>>1]),f=a(f,[3301882366,444984403]),f=d(f,[0,f[0]>>>1]),f}e.x86.hash32=function(f,p){if(e.inputValidation&&!n(f))return t;p=p||0;for(var g=f.length%4,C=f.length-g,m=p,w=0,x=3432918353,_=461845907,I=0;I<C;I=I+4)w=f[I]|f[I+1]<<8|f[I+2]<<16|f[I+3]<<24,w=i(w,x),w=o(w,15),w=i(w,_),m^=w,m=o(m,13),m=i(m,5)+3864292196;switch(w=0,g){case 3:w^=f[I+2]<<16;case 2:w^=f[I+1]<<8;case 1:w^=f[I],w=i(w,x),w=o(w,15),w=i(w,_),m^=w}return m^=f.length,m=s(m),m>>>0},e.x86.hash128=function(f,p){if(e.inputValidation&&!n(f))return t;p=p||0;for(var g=f.length%16,C=f.length-g,m=p,w=p,x=p,_=p,I=0,b=0,y=0,B=0,T=597399067,N=2869860233,P=951274213,W=2716044179,F=0;F<C;F=F+16)I=f[F]|f[F+1]<<8|f[F+2]<<16|f[F+3]<<24,b=f[F+4]|f[F+5]<<8|f[F+6]<<16|f[F+7]<<24,y=f[F+8]|f[F+9]<<8|f[F+10]<<16|f[F+11]<<24,B=f[F+12]|f[F+13]<<8|f[F+14]<<16|f[F+15]<<24,I=i(I,T),I=o(I,15),I=i(I,N),m^=I,m=o(m,19),m+=w,m=i(m,5)+1444728091,b=i(b,N),b=o(b,16),b=i(b,P),w^=b,w=o(w,17),w+=x,w=i(w,5)+197830471,y=i(y,P),y=o(y,17),y=i(y,W),x^=y,x=o(x,15),x+=_,x=i(x,5)+2530024501,B=i(B,W),B=o(B,18),B=i(B,T),_^=B,_=o(_,13),_+=m,_=i(_,5)+850148119;switch(I=0,b=0,y=0,B=0,g){case 15:B^=f[F+14]<<16;case 14:B^=f[F+13]<<8;case 13:B^=f[F+12],B=i(B,W),B=o(B,18),B=i(B,T),_^=B;case 12:y^=f[F+11]<<24;case 11:y^=f[F+10]<<16;case 10:y^=f[F+9]<<8;case 9:y^=f[F+8],y=i(y,P),y=o(y,17),y=i(y,W),x^=y;case 8:b^=f[F+7]<<24;case 7:b^=f[F+6]<<16;case 6:b^=f[F+5]<<8;case 5:b^=f[F+4],b=i(b,N),b=o(b,16),b=i(b,P),w^=b;case 4:I^=f[F+3]<<24;case 3:I^=f[F+2]<<16;case 2:I^=f[F+1]<<8;case 1:I^=f[F],I=i(I,T),I=o(I,15),I=i(I,N),m^=I}return m^=f.length,w^=f.length,x^=f.length,_^=f.length,m+=w,m+=x,m+=_,w+=m,x+=m,_+=m,m=s(m),w=s(w),x=s(x),_=s(_),m+=w,m+=x,m+=_,w+=m,x+=m,_+=m,("00000000"+(m>>>0).toString(16)).slice(-8)+("00000000"+(w>>>0).toString(16)).slice(-8)+("00000000"+(x>>>0).toString(16)).slice(-8)+("00000000"+(_>>>0).toString(16)).slice(-8)},e.x64.hash128=function(f,p){if(e.inputValidation&&!n(f))return t;p=p||0;for(var g=f.length%16,C=f.length-g,m=[0,p],w=[0,p],x=[0,0],_=[0,0],I=[2277735313,289559509],b=[1291169091,658871167],y=0;y<C;y=y+16)x=[f[y+4]|f[y+5]<<8|f[y+6]<<16|f[y+7]<<24,f[y]|f[y+1]<<8|f[y+2]<<16|f[y+3]<<24],_=[f[y+12]|f[y+13]<<8|f[y+14]<<16|f[y+15]<<24,f[y+8]|f[y+9]<<8|f[y+10]<<16|f[y+11]<<24],x=a(x,I),x=h(x,31),x=a(x,b),m=d(m,x),m=h(m,27),m=c(m,w),m=c(a(m,[0,5]),[0,1390208809]),_=a(_,b),_=h(_,33),_=a(_,I),w=d(w,_),w=h(w,31),w=c(w,m),w=c(a(w,[0,5]),[0,944331445]);switch(x=[0,0],_=[0,0],g){case 15:_=d(_,u([0,f[y+14]],48));case 14:_=d(_,u([0,f[y+13]],40));case 13:_=d(_,u([0,f[y+12]],32));case 12:_=d(_,u([0,f[y+11]],24));case 11:_=d(_,u([0,f[y+10]],16));case 10:_=d(_,u([0,f[y+9]],8));case 9:_=d(_,[0,f[y+8]]),_=a(_,b),_=h(_,33),_=a(_,I),w=d(w,_);case 8:x=d(x,u([0,f[y+7]],56));case 7:x=d(x,u([0,f[y+6]],48));case 6:x=d(x,u([0,f[y+5]],40));case 5:x=d(x,u([0,f[y+4]],32));case 4:x=d(x,u([0,f[y+3]],24));case 3:x=d(x,u([0,f[y+2]],16));case 2:x=d(x,u([0,f[y+1]],8));case 1:x=d(x,[0,f[y]]),x=a(x,I),x=h(x,31),x=a(x,b),m=d(m,x)}return m=d(m,[0,f.length]),w=d(w,[0,f.length]),m=c(m,w),w=c(w,m),m=E(m),w=E(w),m=c(m,w),w=c(w,m),("00000000"+(m[0]>>>0).toString(16)).slice(-8)+("00000000"+(m[1]>>>0).toString(16)).slice(-8)+("00000000"+(w[0]>>>0).toString(16)).slice(-8)+("00000000"+(w[1]>>>0).toString(16)).slice(-8)},typeof Wt!="undefined"?(typeof me!="undefined"&&me.exports&&(Wt=me.exports=e),Wt.murmurHash3=e):typeof define=="function"&&define.amd?define([],function(){return e}):(e._murmurHash3=r.murmurHash3,e.noConflict=function(){return r.murmurHash3=e._murmurHash3,e._murmurHash3=t,e.noConflict=t,e},r.murmurHash3=e)})(Wt)});var kn=k((Yc,Tn)=>{Tn.exports=In()});var Nn=k((nf,Ln)=>{"use strict";function Cn(r,t){for(let e in t)Object.defineProperty(r,e,{value:t[e],enumerable:!0,configurable:!0});return r}function ta(r,t,e){if(!r||typeof r=="string")throw new TypeError("Please pass an Error to err-code");e||(e={}),typeof t=="object"&&(e=t,t=""),t&&(e.code=t);try{return Cn(r,e)}catch(n){e.message=r.message,e.stack=r.stack;let i=function(){};return i.prototype=Object.create(Object.getPrototypeOf(r)),Cn(new i,e)}}Ln.exports=ta});var vn=k((of,Un)=>{"use strict";Un.exports=ea;function ea(r,t){for(var e=new Array(arguments.length-1),n=0,i=2,o=!0;i<arguments.length;)e[n++]=arguments[i++];return new Promise(function(c,a){e[n]=function(u){if(o)if(o=!1,u)a(u);else{for(var d=new Array(arguments.length-1),E=0;E<d.length;)d[E++]=arguments[E];c.apply(null,d)}};try{r.apply(t||null,e)}catch(h){o&&(o=!1,a(h))}})}});var jn=k(Pn=>{"use strict";var ge=Pn;ge.length=function(t){var e=t.length;if(!e)return 0;for(var n=0;--e%4>1&&t.charAt(e)==="=";)++n;return Math.ceil(t.length*3)/4-n};var Nt=new Array(64),On=new Array(123);for(X=0;X<64;)On[Nt[X]=X<26?X+65:X<52?X+71:X<62?X-4:X-59|43]=X++;var X;ge.encode=function(t,e,n){for(var i=null,o=[],s=0,c=0,a;e<n;){var h=t[e++];switch(c){case 0:o[s++]=Nt[h>>2],a=(h&3)<<4,c=1;break;case 1:o[s++]=Nt[a|h>>4],a=(h&15)<<2,c=2;break;case 2:o[s++]=Nt[a|h>>6],o[s++]=Nt[h&63],c=0;break}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),s=0)}return c&&(o[s++]=Nt[a],o[s++]=61,c===1&&(o[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,o.slice(0,s))),i.join("")):String.fromCharCode.apply(String,o.slice(0,s))};var zn="invalid encoding";ge.decode=function(t,e,n){for(var i=n,o=0,s,c=0;c<t.length;){var a=t.charCodeAt(c++);if(a===61&&o>1)break;if((a=On[a])===void 0)throw Error(zn);switch(o){case 0:s=a,o=1;break;case 1:e[n++]=s<<2|(a&48)>>4,s=a,o=2;break;case 2:e[n++]=(s&15)<<4|(a&60)>>2,s=a,o=3;break;case 3:e[n++]=(s&3)<<6|a,o=0;break}}if(o===1)throw Error(zn);return n-i};ge.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var Mn=k((af,Rn)=>{"use strict";Rn.exports=we;function we(){this._listeners={}}we.prototype.on=function(t,e,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:n||this}),this};we.prototype.off=function(t,e){if(t===void 0)this._listeners={};else if(e===void 0)this._listeners[t]=[];else for(var n=this._listeners[t],i=0;i<n.length;)n[i].fn===e?n.splice(i,1):++i;return this};we.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var n=[],i=1;i<arguments.length;)n.push(arguments[i++]);for(i=0;i<e.length;)e[i].fn.apply(e[i++].ctx,n)}return this}});var Yn=k((cf,Wn)=>{"use strict";Wn.exports=Hn(Hn);function Hn(r){return typeof Float32Array!="undefined"?function(){var t=new Float32Array([-0]),e=new Uint8Array(t.buffer),n=e[3]===128;function i(a,h,u){t[0]=a,h[u]=e[0],h[u+1]=e[1],h[u+2]=e[2],h[u+3]=e[3]}function o(a,h,u){t[0]=a,h[u]=e[3],h[u+1]=e[2],h[u+2]=e[1],h[u+3]=e[0]}r.writeFloatLE=n?i:o,r.writeFloatBE=n?o:i;function s(a,h){return e[0]=a[h],e[1]=a[h+1],e[2]=a[h+2],e[3]=a[h+3],t[0]}function c(a,h){return e[3]=a[h],e[2]=a[h+1],e[1]=a[h+2],e[0]=a[h+3],t[0]}r.readFloatLE=n?s:c,r.readFloatBE=n?c:s}():function(){function t(n,i,o,s){var c=i<0?1:0;if(c&&(i=-i),i===0)n(1/i>0?0:2147483648,o,s);else if(isNaN(i))n(2143289344,o,s);else if(i>34028234663852886e22)n((c<<31|2139095040)>>>0,o,s);else if(i<11754943508222875e-54)n((c<<31|Math.round(i/1401298464324817e-60))>>>0,o,s);else{var a=Math.floor(Math.log(i)/Math.LN2),h=Math.round(i*Math.pow(2,-a)*8388608)&8388607;n((c<<31|a+127<<23|h)>>>0,o,s)}}r.writeFloatLE=t.bind(null,Vn),r.writeFloatBE=t.bind(null,qn);function e(n,i,o){var s=n(i,o),c=(s>>31)*2+1,a=s>>>23&255,h=s&8388607;return a===255?h?NaN:c*(1/0):a===0?c*1401298464324817e-60*h:c*Math.pow(2,a-150)*(h+8388608)}r.readFloatLE=e.bind(null,$n),r.readFloatBE=e.bind(null,Gn)}(),typeof Float64Array!="undefined"?function(){var t=new Float64Array([-0]),e=new Uint8Array(t.buffer),n=e[7]===128;function i(a,h,u){t[0]=a,h[u]=e[0],h[u+1]=e[1],h[u+2]=e[2],h[u+3]=e[3],h[u+4]=e[4],h[u+5]=e[5],h[u+6]=e[6],h[u+7]=e[7]}function o(a,h,u){t[0]=a,h[u]=e[7],h[u+1]=e[6],h[u+2]=e[5],h[u+3]=e[4],h[u+4]=e[3],h[u+5]=e[2],h[u+6]=e[1],h[u+7]=e[0]}r.writeDoubleLE=n?i:o,r.writeDoubleBE=n?o:i;function s(a,h){return e[0]=a[h],e[1]=a[h+1],e[2]=a[h+2],e[3]=a[h+3],e[4]=a[h+4],e[5]=a[h+5],e[6]=a[h+6],e[7]=a[h+7],t[0]}function c(a,h){return e[7]=a[h],e[6]=a[h+1],e[5]=a[h+2],e[4]=a[h+3],e[3]=a[h+4],e[2]=a[h+5],e[1]=a[h+6],e[0]=a[h+7],t[0]}r.readDoubleLE=n?s:c,r.readDoubleBE=n?c:s}():function(){function t(n,i,o,s,c,a){var h=s<0?1:0;if(h&&(s=-s),s===0)n(0,c,a+i),n(1/s>0?0:2147483648,c,a+o);else if(isNaN(s))n(0,c,a+i),n(2146959360,c,a+o);else if(s>17976931348623157e292)n(0,c,a+i),n((h<<31|2146435072)>>>0,c,a+o);else{var u;if(s<22250738585072014e-324)u=s/5e-324,n(u>>>0,c,a+i),n((h<<31|u/4294967296)>>>0,c,a+o);else{var d=Math.floor(Math.log(s)/Math.LN2);d===1024&&(d=1023),u=s*Math.pow(2,-d),n(u*4503599627370496>>>0,c,a+i),n((h<<31|d+1023<<20|u*1048576&1048575)>>>0,c,a+o)}}}r.writeDoubleLE=t.bind(null,Vn,0,4),r.writeDoubleBE=t.bind(null,qn,4,0);function e(n,i,o,s,c){var a=n(s,c+i),h=n(s,c+o),u=(h>>31)*2+1,d=h>>>20&2047,E=4294967296*(h&1048575)+a;return d===2047?E?NaN:u*(1/0):d===0?u*5e-324*E:u*Math.pow(2,d-1075)*(E+4503599627370496)}r.readDoubleLE=e.bind(null,$n,0,4),r.readDoubleBE=e.bind(null,Gn,4,0)}(),r}function Vn(r,t,e){t[e]=r&255,t[e+1]=r>>>8&255,t[e+2]=r>>>16&255,t[e+3]=r>>>24}function qn(r,t,e){t[e]=r>>>24,t[e+1]=r>>>16&255,t[e+2]=r>>>8&255,t[e+3]=r&255}function $n(r,t){return(r[t]|r[t+1]<<8|r[t+2]<<16|r[t+3]<<24)>>>0}function Gn(r,t){return(r[t]<<24|r[t+1]<<16|r[t+2]<<8|r[t+3])>>>0}});var Kn=k((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(r){}return null}});var Zn=k(Jn=>{"use strict";var We=Jn;We.length=function(t){for(var e=0,n=0,i=0;i<t.length;++i)n=t.charCodeAt(i),n<128?e+=1:n<2048?e+=2:(n&64512)==55296&&(t.charCodeAt(i+1)&64512)==56320?(++i,e+=4):e+=3;return e};We.read=function(t,e,n){var i=n-e;if(i<1)return"";for(var o=null,s=[],c=0,a;e<n;)a=t[e++],a<128?s[c++]=a:a>191&&a<224?s[c++]=(a&31)<<6|t[e++]&63:a>239&&a<365?(a=((a&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,s[c++]=55296+(a>>10),s[c++]=56320+(a&1023)):s[c++]=(a&15)<<12|(t[e++]&63)<<6|t[e++]&63,c>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),c=0);return o?(c&&o.push(String.fromCharCode.apply(String,s.slice(0,c))),o.join("")):String.fromCharCode.apply(String,s.slice(0,c))};We.write=function(t,e,n){for(var i=n,o,s,c=0;c<t.length;++c)o=t.charCodeAt(c),o<128?e[n++]=o:o<2048?(e[n++]=o>>6|192,e[n++]=o&63|128):(o&64512)==55296&&((s=t.charCodeAt(c+1))&64512)==56320?(o=65536+((o&1023)<<10)+(s&1023),++c,e[n++]=o>>18|240,e[n++]=o>>12&63|128,e[n++]=o>>6&63|128,e[n++]=o&63|128):(e[n++]=o>>12|224,e[n++]=o>>6&63|128,e[n++]=o&63|128);return n-i}});var Qn=k((uf,Xn)=>{"use strict";Xn.exports=ra;function ra(r,t,e){var n=e||8192,i=n>>>1,o=null,s=n;return function(a){if(a<1||a>i)return r(a);s+a>n&&(o=r(n),s=0);var h=t.call(o,s,s+=a);return s&7&&(s=(s|7)+1),h}}});var ei=k((hf,ti)=>{"use strict";ti.exports=j;var Yt=mt();function j(r,t){this.lo=r>>>0,this.hi=t>>>0}var Bt=j.zero=new j(0,0);Bt.toNumber=function(){return 0};Bt.zzEncode=Bt.zzDecode=function(){return this};Bt.length=function(){return 1};var na=j.zeroHash="\0\0\0\0\0\0\0\0";j.fromNumber=function(t){if(t===0)return Bt;var e=t<0;e&&(t=-t);var n=t>>>0,i=(t-n)/4294967296>>>0;return e&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new j(n,i)};j.from=function(t){if(typeof t=="number")return j.fromNumber(t);if(Yt.isString(t))if(Yt.Long)t=Yt.Long.fromString(t);else return j.fromNumber(parseInt(t,10));return t.low||t.high?new j(t.low>>>0,t.high>>>0):Bt};j.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,n=~this.hi>>>0;return e||(n=n+1>>>0),-(e+n*4294967296)}return this.lo+this.hi*4294967296};j.prototype.toLong=function(t){return Yt.Long?new Yt.Long(this.lo|0,this.hi|0,Boolean(t)):{low:this.lo|0,high:this.hi|0,unsigned:Boolean(t)}};var yt=String.prototype.charCodeAt;j.fromHash=function(t){return t===na?Bt:new j((yt.call(t,0)|yt.call(t,1)<<8|yt.call(t,2)<<16|yt.call(t,3)<<24)>>>0,(yt.call(t,4)|yt.call(t,5)<<8|yt.call(t,6)<<16|yt.call(t,7)<<24)>>>0)};j.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};j.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};j.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};j.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?e===0?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}});var mt=k(Ye=>{"use strict";var A=Ye;A.asPromise=vn();A.base64=jn();A.EventEmitter=Mn();A.float=Yn();A.inquire=Kn();A.utf8=Zn();A.pool=Qn();A.LongBits=ei();A.isNode=Boolean(typeof globalThis!="undefined"&&globalThis&&globalThis.process&&globalThis.process.versions&&globalThis.process.versions.node);A.global=A.isNode&&globalThis||typeof window!="undefined"&&window||typeof self!="undefined"&&self||Ye;A.emptyArray=Object.freeze?Object.freeze([]):[];A.emptyObject=Object.freeze?Object.freeze({}):{};A.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};A.isString=function(t){return typeof t=="string"||t instanceof String};A.isObject=function(t){return t&&typeof t=="object"};A.isset=A.isSet=function(t,e){var n=t[e];return n!=null&&t.hasOwnProperty(e)?typeof n!="object"||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1};A.Buffer=function(){try{var r=A.inquire("buffer").Buffer;return r.prototype.utf8Write?r:null}catch(t){return null}}();A._Buffer_from=null;A._Buffer_allocUnsafe=null;A.newBuffer=function(t){return typeof t=="number"?A.Buffer?A._Buffer_allocUnsafe(t):new A.Array(t):A.Buffer?A._Buffer_from(t):typeof Uint8Array=="undefined"?t:new Uint8Array(t)};A.Array=typeof Uint8Array!="undefined"?Uint8Array:Array;A.Long=A.global.dcodeIO&&A.global.dcodeIO.Long||A.global.Long||A.inquire("long");A.key2Re=/^true|false|0|1$/;A.key32Re=/^-?(?:0|[1-9][0-9]*)$/;A.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;A.longToHash=function(t){return t?A.LongBits.from(t).toHash():A.LongBits.zeroHash};A.longFromHash=function(t,e){var n=A.LongBits.fromHash(t);return A.Long?A.Long.fromBits(n.lo,n.hi,e):n.toNumber(Boolean(e))};function ri(r,t,e){for(var n=Object.keys(t),i=0;i<n.length;++i)(r[n[i]]===void 0||!e)&&(r[n[i]]=t[n[i]]);return r}A.merge=ri;A.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)};function ni(r){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:new Error().stack||""}),n&&ri(this,n)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return r}}),t.prototype.toString=function(){return this.name+": "+this.message},t}A.newError=ni;A.ProtocolError=ni("ProtocolError");A.oneOfGetter=function(t){for(var e={},n=0;n<t.length;++n)e[t[n]]=1;return function(){for(var i=Object.keys(this),o=i.length-1;o>-1;--o)if(e[i[o]]===1&&this[i[o]]!==void 0&&this[i[o]]!==null)return i[o]}};A.oneOfSetter=function(t){return function(e){for(var n=0;n<t.length;++n)t[n]!==e&&delete this[t[n]]}};A.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};A._configure=function(){var r=A.Buffer;if(!r){A._Buffer_from=A._Buffer_allocUnsafe=null;return}A._Buffer_from=r.from!==Uint8Array.from&&r.from||function(e,n){return new r(e,n)},A._Buffer_allocUnsafe=r.allocUnsafe||function(e){return new r(e)}}});var er=k((pf,ai)=>{"use strict";ai.exports=D;var K=mt(),Ke,be=K.LongBits,ii=K.base64,oi=K.utf8;function Kt(r,t,e){this.fn=r,this.len=t,this.next=void 0,this.val=e}function Je(){}function ia(r){this.head=r.head,this.tail=r.tail,this.len=r.len,this.next=r.states}function D(){this.len=0,this.head=new Kt(Je,0,0),this.tail=this.head,this.states=null}var si=function(){return K.Buffer?function(){return(D.create=function(){return new Ke})()}:function(){return new D}};D.create=si();D.alloc=function(t){return new K.Array(t)};K.Array!==Array&&(D.alloc=K.pool(D.alloc,K.Array.prototype.subarray));D.prototype._push=function(t,e,n){return this.tail=this.tail.next=new Kt(t,e,n),this.len+=e,this};function Ze(r,t,e){t[e]=r&255}function oa(r,t,e){for(;r>127;)t[e++]=r&127|128,r>>>=7;t[e]=r}function Xe(r,t){this.len=r,this.next=void 0,this.val=t}Xe.prototype=Object.create(Kt.prototype);Xe.prototype.fn=oa;D.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new Xe((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};D.prototype.int32=function(t){return t<0?this._push(Qe,10,be.fromNumber(t)):this.uint32(t)};D.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function Qe(r,t,e){for(;r.hi;)t[e++]=r.lo&127|128,r.lo=(r.lo>>>7|r.hi<<25)>>>0,r.hi>>>=7;for(;r.lo>127;)t[e++]=r.lo&127|128,r.lo=r.lo>>>7;t[e++]=r.lo}D.prototype.uint64=function(t){var e=be.from(t);return this._push(Qe,e.length(),e)};D.prototype.int64=D.prototype.uint64;D.prototype.sint64=function(t){var e=be.from(t).zzEncode();return this._push(Qe,e.length(),e)};D.prototype.bool=function(t){return this._push(Ze,1,t?1:0)};function tr(r,t,e){t[e]=r&255,t[e+1]=r>>>8&255,t[e+2]=r>>>16&255,t[e+3]=r>>>24}D.prototype.fixed32=function(t){return this._push(tr,4,t>>>0)};D.prototype.sfixed32=D.prototype.fixed32;D.prototype.fixed64=function(t){var e=be.from(t);return this._push(tr,4,e.lo)._push(tr,4,e.hi)};D.prototype.sfixed64=D.prototype.fixed64;D.prototype.float=function(t){return this._push(K.float.writeFloatLE,4,t)};D.prototype.double=function(t){return this._push(K.float.writeDoubleLE,8,t)};var sa=K.Array.prototype.set?function(t,e,n){e.set(t,n)}:function(t,e,n){for(var i=0;i<t.length;++i)e[n+i]=t[i]};D.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(Ze,1,0);if(K.isString(t)){var n=D.alloc(e=ii.length(t));ii.decode(t,n,0),t=n}return this.uint32(e)._push(sa,e,t)};D.prototype.string=function(t){var e=oi.length(t);return e?this.uint32(e)._push(oi.write,e,t):this._push(Ze,1,0)};D.prototype.fork=function(){return this.states=new ia(this),this.head=this.tail=new Kt(Je,0,0),this.len=0,this};D.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Kt(Je,0,0),this.len=0),this};D.prototype.ldelim=function(){var t=this.head,e=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=e,this.len+=n),this};D.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,e,n),n+=t.len,t=t.next;return e};D._configure=function(r){Ke=r,D.create=si(),Ke._configure()}});var ui=k((df,fi)=>{"use strict";fi.exports=st;var ci=er();(st.prototype=Object.create(ci.prototype)).constructor=st;var gt=mt();function st(){ci.call(this)}st._configure=function(){st.alloc=gt._Buffer_allocUnsafe,st.writeBytesBuffer=gt.Buffer&>.Buffer.prototype instanceof Uint8Array&>.Buffer.prototype.set.name==="set"?function(t,e,n){e.set(t,n)}:function(t,e,n){if(t.copy)t.copy(e,n,0,t.length);else for(var i=0;i<t.length;)e[n++]=t[i++]}};st.prototype.bytes=function(t){gt.isString(t)&&(t=gt._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(st.writeBytesBuffer,e,t),this};function aa(r,t,e){r.length<40?gt.utf8.write(r,t,e):t.utf8Write?t.utf8Write(r,e):t.write(r,e)}st.prototype.string=function(t){var e=gt.Buffer.byteLength(t);return this.uint32(e),e&&this._push(aa,e,t),this};st._configure()});var ir=k((yf,yi)=>{"use strict";yi.exports=z;var at=mt(),rr,hi=at.LongBits,ca=at.utf8;function Q(r,t){return RangeError("index out of range: "+r.pos+" + "+(t||1)+" > "+r.len)}function z(r){this.buf=r,this.pos=0,this.len=r.length}var li=typeof Uint8Array!="undefined"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new z(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new z(t);throw Error("illegal buffer")},pi=function(){return at.Buffer?function(e){return(z.create=function(i){return at.Buffer.isBuffer(i)?new rr(i):li(i)})(e)}:li};z.create=pi();z.prototype._slice=at.Array.prototype.subarray||at.Array.prototype.slice;z.prototype.uint32=function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,Q(this,10);return t}}();z.prototype.int32=function(){return this.uint32()|0};z.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function nr(){var r=new hi(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(r.lo=(r.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return r;if(r.lo=(r.lo|(this.buf[this.pos]&127)<<28)>>>0,r.hi=(r.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return r;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw Q(this);if(r.lo=(r.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return r}return r.lo=(r.lo|(this.buf[this.pos++]&127)<<t*7)>>>0,r}if(this.len-this.pos>4){for(;t<5;++t)if(r.hi=(r.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return r}else for(;t<5;++t){if(this.pos>=this.len)throw Q(this);if(r.hi=(r.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return r}throw Error("invalid varint encoding")}z.prototype.bool=function(){return this.uint32()!==0};function xe(r,t){return(r[t-4]|r[t-3]<<8|r[t-2]<<16|r[t-1]<<24)>>>0}z.prototype.fixed32=function(){if(this.pos+4>this.len)throw Q(this,4);return xe(this.buf,this.pos+=4)};z.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Q(this,4);return xe(this.buf,this.pos+=4)|0};function di(){if(this.pos+8>this.len)throw Q(this,8);return new hi(xe(this.buf,this.pos+=4),xe(this.buf,this.pos+=4))}z.prototype.float=function(){if(this.pos+4>this.len)throw Q(this,4);var t=at.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};z.prototype.double=function(){if(this.pos+8>this.len)throw Q(this,4);var t=at.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};z.prototype.bytes=function(){var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw Q(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,n):e===n?new this.buf.constructor(0):this._slice.call(this.buf,e,n)};z.prototype.string=function(){var t=this.bytes();return ca.read(t,0,t.length)};z.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw Q(this,t);this.pos+=t}else do if(this.pos>=this.len)throw Q(this);while(this.buf[this.pos++]&128);return this};z.prototype.skipType=function(r){switch(r){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(r=this.uint32()&7)!=4;)this.skipType(r);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+r+" at offset "+this.pos)}return this};z._configure=function(r){rr=r,z.create=pi(),rr._configure();var t=at.Long?"toLong":"toNumber";at.merge(z.prototype,{int64:function(){return nr.call(this)[t](!1)},uint64:function(){return nr.call(this)[t](!0)},sint64:function(){return nr.call(this).zzDecode()[t](!1)},fixed64:function(){return di.call(this)[t](!0)},sfixed64:function(){return di.call(this)[t](!1)}})}});var bi=k((mf,wi)=>{"use strict";wi.exports=At;var mi=ir();(At.prototype=Object.create(mi.prototype)).constructor=At;var gi=mt();function At(r){mi.call(this,r)}At._configure=function(){gi.Buffer&&(At.prototype._slice=gi.Buffer.prototype.slice)};At.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};At._configure()});var _i=k((gf,xi)=>{"use strict";xi.exports=Jt;var or=mt();(Jt.prototype=Object.create(or.EventEmitter.prototype)).constructor=Jt;function Jt(r,t,e){if(typeof r!="function")throw TypeError("rpcImpl must be a function");or.EventEmitter.call(this),this.rpcImpl=r,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(e)}Jt.prototype.rpcCall=function r(t,e,n,i,o){if(!i)throw TypeError("request must be specified");var s=this;if(!o)return or.asPromise(r,s,t,e,n,i);if(!s.rpcImpl){setTimeout(function(){o(Error("already ended"))},0);return}try{return s.rpcImpl(t,e[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(a,h){if(a)return s.emit("error",a,t),o(a);if(h===null){s.end(!0);return}if(!(h instanceof n))try{h=n[s.responseDelimited?"decodeDelimited":"decode"](h)}catch(u){return s.emit("error",u,t),o(u)}return s.emit("data",h,t),o(null,h)})}catch(c){s.emit("error",c,t),setTimeout(function(){o(c)},0);return}};Jt.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var Ai=k(Bi=>{"use strict";var fa=Bi;fa.Service=_i()});var Si=k((bf,Ei)=>{"use strict";Ei.exports={}});var ki=k(Ti=>{"use strict";var q=Ti;q.build="minimal";q.Writer=er();q.BufferWriter=ui();q.Reader=ir();q.BufferReader=bi();q.util=mt();q.rpc=Ai();q.roots=Si();q.configure=Ii;function Ii(){q.util._configure(),q.Writer._configure(q.BufferWriter),q.Reader._configure(q.BufferReader)}Ii()});var Di=k((_f,Fi)=>{"use strict";Fi.exports=ki()});var Xt=k((Hf,Yi)=>{"use strict";function Wi(r,t){for(let e in t)Object.defineProperty(r,e,{value:t[e],enumerable:!0,configurable:!0});return r}function Ia(r,t,e){if(!r||typeof r=="string")throw new TypeError("Please pass an Error to err-code");e||(e={}),typeof t=="object"&&(e=t,t=""),t&&(e.code=t);try{return Wi(r,e)}catch(n){e.message=r.message,e.stack=r.stack;let i=function(){};return i.prototype=Object.create(Object.getPrototypeOf(r)),Wi(new i,e)}}Yi.exports=Ia});var Ae={};M(Ae,{code:()=>Qt,decode:()=>Fa,encode:()=>ka,name:()=>Ta});var Ta,Qt,ka,Fa,Ee=U(()=>{pt();Ta="raw",Qt=85,ka=r=>Y(r),Fa=r=>Y(r)});var Ji=k((qf,Ki)=>{"use strict";var Da=async r=>{let t=[];for await(let e of r)t.push(e);return t};Ki.exports=Da});var ho=k(Se=>{"use strict";Se.byteLength=Ra;Se.toByteArray=Ha;Se.fromByteArray=$a;var ct=[],Z=[],ja=typeof Uint8Array!="undefined"?Uint8Array:Array,lr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Et=0,fo=lr.length;Et<fo;++Et)ct[Et]=lr[Et],Z[lr.charCodeAt(Et)]=Et;var Et,fo;Z["-".charCodeAt(0)]=62;Z["_".charCodeAt(0)]=63;function uo(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");e===-1&&(e=t);var n=e===t?0:4-e%4;return[e,n]}function Ra(r){var t=uo(r),e=t[0],n=t[1];return(e+n)*3/4-n}function Ma(r,t,e){return(t+e)*3/4-e}function Ha(r){var t,e=uo(r),n=e[0],i=e[1],o=new ja(Ma(r,n,i)),s=0,c=i>0?n-4:n,a;for(a=0;a<c;a+=4)t=Z[r.charCodeAt(a)]<<18|Z[r.charCodeAt(a+1)]<<12|Z[r.charCodeAt(a+2)]<<6|Z[r.charCodeAt(a+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return i===2&&(t=Z[r.charCodeAt(a)]<<2|Z[r.charCodeAt(a+1)]>>4,o[s++]=t&255),i===1&&(t=Z[r.charCodeAt(a)]<<10|Z[r.charCodeAt(a+1)]<<4|Z[r.charCodeAt(a+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function Va(r){return ct[r>>18&63]+ct[r>>12&63]+ct[r>>6&63]+ct[r&63]}function qa(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16&16711680)+(r[o+1]<<8&65280)+(r[o+2]&255),i.push(Va(n));return i.join("")}function $a(r){for(var t,e=r.length,n=e%3,i=[],o=16383,s=0,c=e-n;s<c;s+=o)i.push(qa(r,s,s+o>c?c:s+o));return n===1?(t=r[e-1],i.push(ct[t>>2]+ct[t<<4&63]+"==")):n===2&&(t=(r[e-2]<<8)+r[e-1],i.push(ct[t>>10]+ct[t>>4&63]+ct[t<<2&63]+"=")),i.join("")}});var lo=k(pr=>{pr.read=function(r,t,e,n,i){var o,s,c=i*8-n-1,a=(1<<c)-1,h=a>>1,u=-7,d=e?i-1:0,E=e?-1:1,f=r[t+d];for(d+=E,o=f&(1<<-u)-1,f>>=-u,u+=c;u>0;o=o*256+r[t+d],d+=E,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=s*256+r[t+d],d+=E,u-=8);if(o===0)o=1-h;else{if(o===a)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-h}return(f?-1:1)*s*Math.pow(2,o-n)};pr.write=function(r,t,e,n,i,o){var s,c,a,h=o*8-i-1,u=(1<<h)-1,d=u>>1,E=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-s))<1&&(s--,a*=2),s+d>=1?t+=E/a:t+=E*Math.pow(2,1-d),t*a>=2&&(s++,a/=2),s+d>=u?(c=0,s=u):s+d>=1?(c=(t*a-1)*Math.pow(2,i),s=s+d):(c=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;r[e+f]=c&255,f+=p,c/=256,i-=8);for(s=s<<i|c,h+=i;h>0;r[e+f]=s&255,f+=p,s/=256,h-=8);r[e+f-p]|=g*128}});var Do=k(jt=>{"use strict";var dr=ho(),Ot=lo(),po=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;jt.Buffer=l;jt.SlowBuffer=Za;jt.INSPECT_MAX_BYTES=50;var Ie=2147483647;jt.kMaxLength=Ie;l.TYPED_ARRAY_SUPPORT=Ga();!l.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&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.");function Ga(){try{let r=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(r,t),r.foo()===42}catch(r){return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(!!l.isBuffer(this))return this.buffer}});Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(!!l.isBuffer(this))return this.byteOffset}});function lt(r){if(r>Ie)throw new RangeError('The value "'+r+'" is invalid for option "size"');let t=new Uint8Array(r);return Object.setPrototypeOf(t,l.prototype),t}function l(r,t,e){if(typeof r=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return yr(r)}return yo(r,t,e)}l.poolSize=8192;function yo(r,t,e){if(typeof r=="string")return Ya(r,t);if(ArrayBuffer.isView(r))return Ka(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(ft(r,ArrayBuffer)||r&&ft(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ft(r,SharedArrayBuffer)||r&&ft(r.buffer,SharedArrayBuffer)))return gr(r,t,e);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=r.valueOf&&r.valueOf();if(n!=null&&n!==r)return l.from(n,t,e);let i=Ja(r);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return l.from(r[Symbol.toPrimitive]("string"),t,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}l.from=function(r,t,e){return yo(r,t,e)};Object.setPrototypeOf(l.prototype,Uint8Array.prototype);Object.setPrototypeOf(l,Uint8Array);function mo(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function Wa(r,t,e){return mo(r),r<=0?lt(r):t!==void 0?typeof e=="string"?lt(r).fill(t,e):lt(r).fill(t):lt(r)}l.alloc=function(r,t,e){return Wa(r,t,e)};function yr(r){return mo(r),lt(r<0?0:wr(r)|0)}l.allocUnsafe=function(r){return yr(r)};l.allocUnsafeSlow=function(r){return yr(r)};function Ya(r,t){if((typeof t!="string"||t==="")&&(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let e=go(r,t)|0,n=lt(e),i=n.write(r,t);return i!==e&&(n=n.slice(0,i)),n}function mr(r){let t=r.length<0?0:wr(r.length)|0,e=lt(t);for(let n=0;n<t;n+=1)e[n]=r[n]&255;return e}function Ka(r){if(ft(r,Uint8Array)){let t=new Uint8Array(r);return gr(t.buffer,t.byteOffset,t.byteLength)}return mr(r)}function gr(r,t,e){if(t<0||r.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<t+(e||0))throw new RangeError('"length" is outside of buffer bounds');let n;return t===void 0&&e===void 0?n=new Uint8Array(r):e===void 0?n=new Uint8Array(r,t):n=new Uint8Array(r,t,e),Object.setPrototypeOf(n,l.prototype),n}function Ja(r){if(l.isBuffer(r)){let t=wr(r.length)|0,e=lt(t);return e.length===0||r.copy(e,0,0,t),e}if(r.length!==void 0)return typeof r.length!="number"||_r(r.length)?lt(0):mr(r);if(r.type==="Buffer"&&Array.isArray(r.data))return mr(r.data)}function wr(r){if(r>=Ie)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ie.toString(16)+" bytes");return r|0}function Za(r){return+r!=r&&(r=0),l.alloc(+r)}l.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==l.prototype};l.compare=function(t,e){if(ft(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),ft(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,i=e.length;for(let o=0,s=Math.min(n,i);o<s;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};l.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return l.alloc(0);let n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;let i=l.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){let s=t[n];if(ft(s,Uint8Array))o+s.length>i.length?(l.isBuffer(s)||(s=l.from(s)),s.copy(i,o)):Uint8Array.prototype.set.call(i,s,o);else if(l.isBuffer(s))s.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=s.length}return i};function go(r,t){if(l.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||ft(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let e=r.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&e===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return xr(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Fo(r).length;default:if(i)return n?-1:xr(r).length;t=(""+t).toLowerCase(),i=!0}}l.byteLength=go;function Xa(r,t,e){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return c0(this,t,e);case"utf8":case"utf-8":return xo(this,t,e);case"ascii":return s0(this,t,e);case"latin1":case"binary":return a0(this,t,e);case"base64":return i0(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f0(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}l.prototype._isBuffer=!0;function St(r,t,e){let n=r[t];r[t]=r[e],r[e]=n}l.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)St(this,e,e+1);return this};l.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)St(this,e,e+3),St(this,e+1,e+2);return this};l.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)St(this,e,e+7),St(this,e+1,e+6),St(this,e+2,e+5),St(this,e+3,e+4);return this};l.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?xo(this,0,t):Xa.apply(this,arguments)};l.prototype.toLocaleString=l.prototype.toString;l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:l.compare(this,t)===0};l.prototype.inspect=function(){let t="",e=jt.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"};po&&(l.prototype[po]=l.prototype.inspect);l.prototype.compare=function(t,e,n,i,o){if(ft(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;let s=o-i,c=n-e,a=Math.min(s,c),h=this.slice(i,o),u=t.slice(e,n);for(let d=0;d<a;++d)if(h[d]!==u[d]){s=h[d],c=u[d];break}return s<c?-1:c<s?1:0};function wo(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,_r(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=l.from(t,n)),l.isBuffer(t))return t.length===0?-1:bo(r,t,e,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):bo(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function bo(r,t,e,n,i){let o=1,s=r.length,c=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,s/=2,c/=2,e/=2}function a(u,d){return o===1?u[d]:u.readUInt16BE(d*o)}let h;if(i){let u=-1;for(h=e;h<s;h++)if(a(r,h)===a(t,u===-1?0:h-u)){if(u===-1&&(u=h),h-u+1===c)return u*o}else u!==-1&&(h-=h-u),u=-1}else for(e+c>s&&(e=s-c),h=e;h>=0;h--){let u=!0;for(let d=0;d<c;d++)if(a(r,h+d)!==a(t,d)){u=!1;break}if(u)return h}return-1}l.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};l.prototype.indexOf=function(t,e,n){return wo(this,t,e,n,!0)};l.prototype.lastIndexOf=function(t,e,n){return wo(this,t,e,n,!1)};function Qa(r,t,e,n){e=Number(e)||0;let i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s<n;++s){let c=parseInt(t.substr(s*2,2),16);if(_r(c))return s;r[e+s]=c}return s}function t0(r,t,e,n){return Te(xr(t,r.length-e),r,e,n)}function e0(r,t,e,n){return Te(p0(t),r,e,n)}function r0(r,t,e,n){return Te(Fo(t),r,e,n)}function n0(r,t,e,n){return Te(d0(t,r.length-e),r,e,n)}l.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return Qa(this,t,e,n);case"utf8":case"utf-8":return t0(this,t,e,n);case"ascii":case"latin1":case"binary":return e0(this,t,e,n);case"base64":return r0(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n0(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function i0(r,t,e){return t===0&&e===r.length?dr.fromByteArray(r):dr.fromByteArray(r.slice(t,e))}function xo(r,t,e){e=Math.min(r.length,e);let n=[],i=t;for(;i<e;){let o=r[i],s=null,c=o>239?4:o>223?3:o>191?2:1;if(i+c<=e){let a,h,u,d;switch(c){case 1:o<128&&(s=o);break;case 2:a=r[i+1],(a&192)==128&&(d=(o&31)<<6|a&63,d>127&&(s=d));break;case 3:a=r[i+1],h=r[i+2],(a&192)==128&&(h&192)==128&&(d=(o&15)<<12|(a&63)<<6|h&63,d>2047&&(d<55296||d>57343)&&(s=d));break;case 4:a=r[i+1],h=r[i+2],u=r[i+3],(a&192)==128&&(h&192)==128&&(u&192)==128&&(d=(o&15)<<18|(a&63)<<12|(h&63)<<6|u&63,d>65535&&d<1114112&&(s=d))}}s===null?(s=65533,c=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=c}return o0(n)}var _o=4096;function o0(r){let t=r.length;if(t<=_o)return String.fromCharCode.apply(String,r);let e="",n=0;for(;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=_o));return e}function s0(r,t,e){let n="";e=Math.min(r.length,e);for(let i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function a0(r,t,e){let n="";e=Math.min(r.length,e);for(let i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function c0(r,t,e){let n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);let i="";for(let o=t;o<e;++o)i+=y0[r[o]];return i}function f0(r,t,e){let n=r.slice(t,e),i="";for(let o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}l.prototype.slice=function(t,e){let n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);let i=this.subarray(t,e);return Object.setPrototypeOf(i,l.prototype),i};function R(r,t,e){if(r%1!=0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let i=this[t],o=1,s=0;for(;++s<e&&(o*=256);)i+=this[t+s]*o;return i};l.prototype.readUintBE=l.prototype.readUIntBE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let i=this[t+--e],o=1;for(;e>0&&(o*=256);)i+=this[t+--e]*o;return i};l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t=t>>>0,e||R(t,1,this.length),this[t]};l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t=t>>>0,e||R(t,2,this.length),this[t]|this[t+1]<<8};l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t=t>>>0,e||R(t,2,this.length),this[t]<<8|this[t+1]};l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t=t>>>0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};l.prototype.readBigUInt64LE=bt(function(t){t=t>>>0,Pt(t,"offset");let e=this[t],n=this[t+7];(e===void 0||n===void 0)&&te(t,this.length-8);let i=e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,o=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(o)<<BigInt(32))});l.prototype.readBigUInt64BE=bt(function(t){t=t>>>0,Pt(t,"offset");let e=this[t],n=this[t+7];(e===void 0||n===void 0)&&te(t,this.length-8);let i=e*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],o=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(o)});l.prototype.readIntLE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let i=this[t],o=1,s=0;for(;++s<e&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};l.prototype.readIntBE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let i=e,o=1,s=this[t+--i];for(;i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};l.prototype.readInt8=function(t,e){return t=t>>>0,e||R(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};l.prototype.readInt16LE=function(t,e){t=t>>>0,e||R(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};l.prototype.readInt16BE=function(t,e){t=t>>>0,e||R(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};l.prototype.readInt32LE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};l.prototype.readInt32BE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};l.prototype.readBigInt64LE=bt(function(t){t=t>>>0,Pt(t,"offset");let e=this[t],n=this[t+7];(e===void 0||n===void 0)&&te(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});l.prototype.readBigInt64BE=bt(function(t){t=t>>>0,Pt(t,"offset");let e=this[t],n=this[t+7];(e===void 0||n===void 0)&&te(t,this.length-8);let i=(e<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n)});l.prototype.readFloatLE=function(t,e){return t=t>>>0,e||R(t,4,this.length),Ot.read(this,t,!0,23,4)};l.prototype.readFloatBE=function(t,e){return t=t>>>0,e||R(t,4,this.length),Ot.read(this,t,!1,23,4)};l.prototype.readDoubleLE=function(t,e){return t=t>>>0,e||R(t,8,this.length),Ot.read(this,t,!0,52,8)};l.prototype.readDoubleBE=function(t,e){return t=t>>>0,e||R(t,8,this.length),Ot.read(this,t,!1,52,8)};function G(r,t,e,n,i,o){if(!l.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e>>>0,n=n>>>0,!i){let c=Math.pow(2,8*n)-1;G(this,t,e,n,c,0)}let o=1,s=0;for(this[e]=t&255;++s<n&&(o*=256);)this[e+s]=t/o&255;return e+n};l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e>>>0,n=n>>>0,!i){let c=Math.pow(2,8*n)-1;G(this,t,e,n,c,0)}let o=n-1,s=1;for(this[e+o]=t&255;--o>=0&&(s*=256);)this[e+o]=t/s&255;return e+n};l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,1,255,0),this[e]=t&255,e+1};l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,2,65535,0),this[e]=t&255,this[e+1]=t>>>8,e+2};l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=t&255,e+2};l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255,e+4};l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};function Bo(r,t,e,n,i){ko(t,n,i,r,e,7);let o=Number(t&BigInt(4294967295));r[e++]=o,o=o>>8,r[e++]=o,o=o>>8,r[e++]=o,o=o>>8,r[e++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return r[e++]=s,s=s>>8,r[e++]=s,s=s>>8,r[e++]=s,s=s>>8,r[e++]=s,e}function Ao(r,t,e,n,i){ko(t,n,i,r,e,7);let o=Number(t&BigInt(4294967295));r[e+7]=o,o=o>>8,r[e+6]=o,o=o>>8,r[e+5]=o,o=o>>8,r[e+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return r[e+3]=s,s=s>>8,r[e+2]=s,s=s>>8,r[e+1]=s,s=s>>8,r[e]=s,e+8}l.prototype.writeBigUInt64LE=bt(function(t,e=0){return Bo(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))});l.prototype.writeBigUInt64BE=bt(function(t,e=0){return Ao(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))});l.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e>>>0,!i){let a=Math.pow(2,8*n-1);G(this,t,e,n,a-1,-a)}let o=0,s=1,c=0;for(this[e]=t&255;++o<n&&(s*=256);)t<0&&c===0&&this[e+o-1]!==0&&(c=1),this[e+o]=(t/s>>0)-c&255;return e+n};l.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e>>>0,!i){let a=Math.pow(2,8*n-1);G(this,t,e,n,a-1,-a)}let o=n-1,s=1,c=0;for(this[e+o]=t&255;--o>=0&&(s*=256);)t<0&&c===0&&this[e+o+1]!==0&&(c=1),this[e+o]=(t/s>>0)-c&255;return e+n};l.prototype.writeInt8=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=t&255,e+1};l.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,2,32767,-32768),this[e]=t&255,this[e+1]=t>>>8,e+2};l.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=t&255,e+2};l.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,4,2147483647,-2147483648),this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4};l.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};l.prototype.writeBigInt64LE=bt(function(t,e=0){return Bo(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});l.prototype.writeBigInt64BE=bt(function(t,e=0){return Ao(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Eo(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function So(r,t,e,n,i){return t=+t,e=e>>>0,i||Eo(r,t,e,4,34028234663852886e22,-34028234663852886e22),Ot.write(r,t,e,n,23,4),e+4}l.prototype.writeFloatLE=function(t,e,n){return So(this,t,e,!0,n)};l.prototype.writeFloatBE=function(t,e,n){return So(this,t,e,!1,n)};function Io(r,t,e,n,i){return t=+t,e=e>>>0,i||Eo(r,t,e,8,17976931348623157e292,-17976931348623157e292),Ot.write(r,t,e,n,52,8),e+8}l.prototype.writeDoubleLE=function(t,e,n){return Io(this,t,e,!0,n)};l.prototype.writeDoubleBE=function(t,e,n){return Io(this,t,e,!1,n)};l.prototype.copy=function(t,e,n,i){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);let o=i-n;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(e,n,i):Uint8Array.prototype.set.call(t,this.subarray(n,i),e),o};l.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(t.length===1){let s=t.charCodeAt(0);(i==="utf8"&&s<128||i==="latin1")&&(t=s)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let o;if(typeof t=="number")for(o=e;o<n;++o)this[o]=t;else{let s=l.isBuffer(t)?t:l.from(t,i),c=s.length;if(c===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-e;++o)this[o+e]=s[o%c]}return this};var zt={};function br(r,t,e){zt[r]=class extends e{constructor(){super();Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}br("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);br("ERR_INVALID_ARG_TYPE",function(r,t){return`The "${r}" argument must be of type number. Received type ${typeof t}`},TypeError);br("ERR_OUT_OF_RANGE",function(r,t,e){let n=`The value of "${r}" is out of range.`,i=e;return Number.isInteger(e)&&Math.abs(e)>2**32?i=To(String(e)):typeof e=="bigint"&&(i=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(i=To(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function To(r){let t="",e=r.length,n=r[0]==="-"?1:0;for(;e>=n+4;e-=3)t=`_${r.slice(e-3,e)}${t}`;return`${r.slice(0,e)}${t}`}function u0(r,t,e){Pt(t,"offset"),(r[t]===void 0||r[t+e]===void 0)&&te(t,r.length-(e+1))}function ko(r,t,e,n,i,o){if(r>e||r<t){let s=typeof t=="bigint"?"n":"",c;throw o>3?t===0||t===BigInt(0)?c=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:c=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:c=`>= ${t}${s} and <= ${e}${s}`,new zt.ERR_OUT_OF_RANGE("value",c,r)}u0(n,i,o)}function Pt(r,t){if(typeof r!="number")throw new zt.ERR_INVALID_ARG_TYPE(t,"number",r)}function te(r,t,e){throw Math.floor(r)!==r?(Pt(r,e),new zt.ERR_OUT_OF_RANGE(e||"offset","an integer",r)):t<0?new zt.ERR_BUFFER_OUT_OF_BOUNDS:new zt.ERR_OUT_OF_RANGE(e||"offset",`>= ${e?1:0} and <= ${t}`,r)}var h0=/[^+/0-9A-Za-z-_]/g;function l0(r){if(r=r.split("=")[0],r=r.trim().replace(h0,""),r.length<2)return"";for(;r.length%4!=0;)r=r+"=";return r}function xr(r,t){t=t||1/0;let e,n=r.length,i=null,o=[];for(let s=0;s<n;++s){if(e=r.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function p0(r){let t=[];for(let e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function d0(r,t){let e,n,i,o=[];for(let s=0;s<r.length&&!((t-=2)<0);++s)e=r.charCodeAt(s),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function Fo(r){return dr.toByteArray(l0(r))}function Te(r,t,e,n){let i;for(i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function ft(r,t){return r instanceof t||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===t.name}function _r(r){return r!==r}var y0=function(){let r="0123456789abcdef",t=new Array(256);for(let e=0;e<16;++e){let n=e*16;for(let i=0;i<16;++i)t[n+i]=r[e]+r[i]}return t}();function bt(r){return typeof BigInt=="undefined"?m0:r}function m0(){throw new Error("BigInt not supported")}});var Br=k((uu,Lo)=>{"use strict";var{Buffer:rt}=Do(),Co=Symbol.for("BufferList");function v(r){if(!(this instanceof v))return new v(r);v._init.call(this,r)}v._init=function(t){Object.defineProperty(this,Co,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)};v.prototype._new=function(t){return new v(t)};v.prototype._offset=function(t){if(t===0)return[0,0];let e=0;for(let n=0;n<this._bufs.length;n++){let i=e+this._bufs[n].length;if(t<i||n===this._bufs.length-1)return[n,t-e];e=i}};v.prototype._reverseOffset=function(r){let t=r[0],e=r[1];for(let n=0;n<t;n++)e+=this._bufs[n].length;return e};v.prototype.get=function(t){if(t>this.length||t<0)return;let e=this._offset(t);return this._bufs[e[0]][e[1]]};v.prototype.slice=function(t,e){return typeof t=="number"&&t<0&&(t+=this.length),typeof e=="number"&&e<0&&(e+=this.length),this.copy(null,0,t,e)};v.prototype.copy=function(t,e,n,i){if((typeof n!="number"||n<0)&&(n=0),(typeof i!="number"||i>this.length)&&(i=this.length),n>=this.length||i<=0)return t||rt.alloc(0);let o=!!t,s=this._offset(n),c=i-n,a=c,h=o&&e||0,u=s[1];if(n===0&&i===this.length){if(!o)return this._bufs.length===1?this._bufs[0]:rt.concat(this._bufs,this.length);for(let d=0;d<this._bufs.length;d++)this._bufs[d].copy(t,h),h+=this._bufs[d].length;return t}if(a<=this._bufs[s[0]].length-u)return o?this._bufs[s[0]].copy(t,e,u,u+a):this._bufs[s[0]].slice(u,u+a);o||(t=rt.allocUnsafe(c));for(let d=s[0];d<this._bufs.length;d++){let E=this._bufs[d].length-u;if(a>E)this._bufs[d].copy(t,h,u),h+=E;else{this._bufs[d].copy(t,h,u,u+a),h+=E;break}a-=E,u&&(u=0)}return t.length>h?t.slice(0,h):t};v.prototype.shallowSlice=function(t,e){if(t=t||0,e=typeof e!="number"?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();let n=this._offset(t),i=this._offset(e),o=this._bufs.slice(n[0],i[0]+1);return i[1]===0?o.pop():o[o.length-1]=o[o.length-1].slice(0,i[1]),n[1]!==0&&(o[0]=o[0].slice(n[1])),this._new(o)};v.prototype.toString=function(t,e,n){return this.slice(e,n).toString(t)};v.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};v.prototype.duplicate=function(){let t=this._new();for(let e=0;e<this._bufs.length;e++)t.append(this._bufs[e]);return t};v.prototype.append=function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(rt.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let e=0;e<t.length;e++)this.append(t[e]);else if(this._isBufferList(t))for(let e=0;e<t._bufs.length;e++)this.append(t._bufs[e]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(rt.from(t));return this};v.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};v.prototype.indexOf=function(r,t,e){if(e===void 0&&typeof t=="string"&&(e=t,t=void 0),typeof r=="function"||Array.isArray(r))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof r=="number"?r=rt.from([r]):typeof r=="string"?r=rt.from(r,e):this._isBufferList(r)?r=r.slice():Array.isArray(r.buffer)?r=rt.from(r.buffer,r.byteOffset,r.byteLength):rt.isBuffer(r)||(r=rt.from(r)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),r.length===0)return t>this.length?this.length:t;let n=this._offset(t),i=n[0],o=n[1];for(;i<this._bufs.length;i++){let s=this._bufs[i];for(;o<s.length;)if(s.length-o>=r.length){let a=s.indexOf(r,o);if(a!==-1)return this._reverseOffset([i,a]);o=s.length-r.length+1}else{let a=this._reverseOffset([i,o]);if(this._match(a,r))return a;o++}o=0}return-1};v.prototype._match=function(r,t){if(this.length-r<t.length)return!1;for(let e=0;e<t.length;e++)if(this.get(r+e)!==t[e])return!1;return!0};(function(){let r={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let t in r)(function(e){r[e]===null?v.prototype[e]=function(n,i){return this.slice(n,n+i)[e](0,i)}:v.prototype[e]=function(n=0){return this.slice(n,n+r[e])[e](0)}})(t)})();v.prototype._isBufferList=function(t){return t instanceof v||v.isBufferList(t)};v.isBufferList=function(t){return t!=null&&t[Co]};Lo.exports=v});var vo=k((hu,Uo)=>{var No=class{constructor(t,e=12,n=8*1024,i=32*1024,o=64,s){this.bits=e,this.min=n,this.max=i,this.asModule=t,this.rabin=new t.Rabin(e,n,i,o,s),this.polynomial=s}fingerprint(t){let{__retain:e,__release:n,__allocArray:i,__getInt32Array:o,Int32Array_ID:s,Uint8Array_ID:c}=this.asModule,a=new Int32Array(Math.ceil(t.length/this.min)),h=e(i(s,a)),u=e(i(c,t)),d=this.rabin.fingerprint(u,h),E=o(d);n(u),n(h);let f=E.indexOf(0);return f>=0?E.subarray(0,f):E}};Uo.exports=No});var Yo=k(ne=>{"use strict";var Ar=-8,ke=-4,g0=0,Oo=1,zo=1<<0,Fe=1<<1,lu=1<<2,pu=1<<3,Po=5,du=1<<Po,jo=1<<10,Ro=1<<11,yu=1<<12,w0=1<<13,Mo=14,mu=1<<Mo,gu=1<<19,wu=1<<20,bu=1<<21,xu=1<<22,b0=0,Er=4,x0=8,_0=12,Ho=12,B0=16,A0=typeof BigUint64Array!="undefined",ee=Symbol(),re=1024;function Vo(r,t){let e=new Uint32Array(r),n=new Uint16Array(r);var i=e[t+ke>>>2]>>>1,o=t>>>1;if(i<=re)return String.fromCharCode.apply(String,n.subarray(o,o+i));let s=[];do{let c=n[o+re-1],a=c>=55296&&c<56320?re-1:re;s.push(String.fromCharCode.apply(String,n.subarray(o,o+=a))),i-=a}while(i>re);return s.join("")+String.fromCharCode.apply(String,n.subarray(o,o+i))}function Sr(r){let t={};function e(i,o){return i?Vo(i.buffer,o):"<yet unknown>"}let n=r.env=r.env||{};return n.abort=n.abort||function(o,s,c,a){let h=t.memory||n.memory;throw Error("abort: "+e(h,o)+" at "+e(h,s)+":"+c+":"+a)},n.trace=n.trace||function(o,s){let c=t.memory||n.memory;console.log("trace: "+e(c,o)+(s?" ":"")+Array.prototype.slice.call(arguments,2,2+s).join(", "))},r.Math=r.Math||Math,r.Date=r.Date||Date,t}function Ir(r,t){let e=t.exports,n=e.memory,i=e.table,o=e.__alloc,s=e.__retain,c=e.__rtti_base||~0;function a(b){let y=new Uint32Array(n.buffer),B=y[c>>>2];if((b>>>=0)>=B)throw Error("invalid id: "+b);return y[(c+4>>>2)+b*2]}function h(b){let y=new Uint32Array(n.buffer),B=y[c>>>2];if((b>>>=0)>=B)throw Error("invalid id: "+b);return y[(c+4>>>2)+b*2+1]}function u(b){return 31-Math.clz32(b>>>Po&31)}function d(b){return 31-Math.clz32(b>>>Mo&31)}function E(b){let y=b.length,B=o(y<<1,Oo),T=new Uint16Array(n.buffer);for(var N=0,P=B>>>1;N<y;++N)T[P+N]=b.charCodeAt(N);return B}r.__allocString=E;function f(b){let y=n.buffer;if(new Uint32Array(y)[b+Ar>>>2]!==Oo)throw Error("not a string: "+b);return Vo(y,b)}r.__getString=f;function p(b,y,B){let T=n.buffer;if(B)switch(b){case 2:return new Float32Array(T);case 3:return new Float64Array(T)}else switch(b){case 0:return new(y?Int8Array:Uint8Array)(T);case 1:return new(y?Int16Array:Uint16Array)(T);case 2:return new(y?Int32Array:Uint32Array)(T);case 3:return new(y?BigInt64Array:BigUint64Array)(T)}throw Error("unsupported align: "+b)}function g(b,y){let B=a(b);if(!(B&(zo|Fe)))throw Error("not an array: "+b+" @ "+B);let T=u(B),N=y.length,P=o(N<<T,g0),W=o(B&Fe?B0:_0,b),F=new Uint32Array(n.buffer);F[W+b0>>>2]=s(P),F[W+Er>>>2]=P,F[W+x0>>>2]=N<<T,B&Fe&&(F[W+Ho>>>2]=N);let qr=p(T,B&jo,B&Ro);if(B&w0)for(let oe=0;oe<N;++oe)qr[(P>>>T)+oe]=s(y[oe]);else qr.set(y,P>>>T);return W}r.__allocArray=g;function C(b){let y=new Uint32Array(n.buffer),B=y[b+Ar>>>2],T=a(B);if(!(T&zo))throw Error("not an array: "+B);let N=u(T);var P=y[b+Er>>>2];let W=T&Fe?y[b+Ho>>>2]:y[P+ke>>>2]>>>N;return p(N,T&jo,T&Ro).subarray(P>>>=N,P+W)}r.__getArrayView=C;function m(b){let y=C(b),B=y.length,T=new Array(B);for(let N=0;N<B;N++)T[N]=y[N];return T}r.__getArray=m;function w(b){let y=n.buffer,B=new Uint32Array(y)[b+ke>>>2];return y.slice(b,b+B)}r.__getArrayBuffer=w;function x(b,y,B){return new b(_(b,y,B))}function _(b,y,B){let T=n.buffer,N=new Uint32Array(T),P=N[B+Er>>>2];return new b(T,P,N[P+ke>>>2]>>>y)}r.__getInt8Array=x.bind(null,Int8Array,0),r.__getInt8ArrayView=_.bind(null,Int8Array,0),r.__getUint8Array=x.bind(null,Uint8Array,0),r.__getUint8ArrayView=_.bind(null,Uint8Array,0),r.__getUint8ClampedArray=x.bind(null,Uint8ClampedArray,0),r.__getUint8ClampedArrayView=_.bind(null,Uint8ClampedArray,0),r.__getInt16Array=x.bind(null,Int16Array,1),r.__getInt16ArrayView=_.bind(null,Int16Array,1),r.__getUint16Array=x.bind(null,Uint16Array,1),r.__getUint16ArrayView=_.bind(null,Uint16Array,1),r.__getInt32Array=x.bind(null,Int32Array,2),r.__getInt32ArrayView=_.bind(null,Int32Array,2),r.__getUint32Array=x.bind(null,Uint32Array,2),r.__getUint32ArrayView=_.bind(null,Uint32Array,2),A0&&(r.__getInt64Array=x.bind(null,BigInt64Array,3),r.__getInt64ArrayView=_.bind(null,BigInt64Array,3),r.__getUint64Array=x.bind(null,BigUint64Array,3),r.__getUint64ArrayView=_.bind(null,BigUint64Array,3)),r.__getFloat32Array=x.bind(null,Float32Array,2),r.__getFloat32ArrayView=_.bind(null,Float32Array,2),r.__getFloat64Array=x.bind(null,Float64Array,3),r.__getFloat64ArrayView=_.bind(null,Float64Array,3);function I(b,y){let B=new Uint32Array(n.buffer);var T=B[b+Ar>>>2];if(T<=B[c>>>2])do if(T==y)return!0;while(T=h(T));return!1}return r.__instanceof=I,r.memory=r.memory||n,r.table=r.table||i,Wo(e,r)}function qo(r){return typeof Response!="undefined"&&r instanceof Response}async function $o(r,t){return qo(r=await r)?Go(r,t):Ir(Sr(t||(t={})),await WebAssembly.instantiate(r instanceof WebAssembly.Module?r:await WebAssembly.compile(r),t))}ne.instantiate=$o;function E0(r,t){return Ir(Sr(t||(t={})),new WebAssembly.Instance(r instanceof WebAssembly.Module?r:new WebAssembly.Module(r),t))}ne.instantiateSync=E0;async function Go(r,t){return WebAssembly.instantiateStreaming?Ir(Sr(t||(t={})),(await WebAssembly.instantiateStreaming(r,t)).instance):$o(qo(r=await r)?r.arrayBuffer():r,t)}ne.instantiateStreaming=Go;function Wo(r,t){var e=t?Object.create(t):{},n=r.__argumentsLength?function(i){r.__argumentsLength.value=i}:r.__setArgumentsLength||r.__setargc||function(){};for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;let o=r[i],s=i.split("."),c=e;for(;s.length>1;){let u=s.shift();Object.prototype.hasOwnProperty.call(c,u)||(c[u]={}),c=c[u]}let a=s[0],h=a.indexOf("#");if(h>=0){let u=a.substring(0,h),d=c[u];if(typeof d=="undefined"||!d.prototype){let E=function(...f){return E.wrap(E.prototype.constructor(0,...f))};E.prototype={valueOf:function(){return this[ee]}},E.wrap=function(f){return Object.create(E.prototype,{[ee]:{value:f,writable:!1}})},d&&Object.getOwnPropertyNames(d).forEach(f=>Object.defineProperty(E,f,Object.getOwnPropertyDescriptor(d,f))),c[u]=E}if(a=a.substring(h+1),c=c[u].prototype,/^(get|set):/.test(a)){if(!Object.prototype.hasOwnProperty.call(c,a=a.substring(4))){let E=r[i.replace("set:","get:")],f=r[i.replace("get:","set:")];Object.defineProperty(c,a,{get:function(){return E(this[ee])},set:function(p){f(this[ee],p)},enumerable:!0})}}else a==="constructor"?(c[a]=(...E)=>(n(E.length),o(...E))).original=o:(c[a]=function(...E){return n(E.length),o(this[ee],...E)}).original=o}else/^(get|set):/.test(a)?Object.prototype.hasOwnProperty.call(c,a=a.substring(4))||Object.defineProperty(c,a,{get:r[i.replace("set:","get:")],set:r[i.replace("get:","set:")],enumerable:!0}):typeof o=="function"&&o!==n?(c[a]=(...u)=>(n(u.length),o(...u))).original=o:c[a]=o}return e}ne.demangle=Wo});var Jo=k((Bu,Ko)=>{var{instantiate:S0}=Yo();Tr.supported=typeof WebAssembly!="undefined";function Tr(r={}){if(!Tr.supported)return null;var t=new Uint8Array([0,97,115,109,1,0,0,0,1,78,14,96,2,127,126,0,96,1,127,1,126,96,2,127,127,0,96,1,127,1,127,96,1,127,0,96,2,127,127,1,127,96,3,127,127,127,1,127,96,0,0,96,3,127,127,127,0,96,0,1,127,96,4,127,127,127,127,0,96,5,127,127,127,127,127,1,127,96,1,126,1,127,96,2,126,126,1,126,2,13,1,3,101,110,118,5,97,98,111,114,116,0,10,3,54,53,2,2,8,9,3,5,2,8,6,5,3,4,2,6,9,12,13,2,5,11,3,2,3,2,3,2,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,6,7,7,4,4,5,3,1,0,1,6,47,9,127,1,65,0,11,127,1,65,0,11,127,0,65,3,11,127,0,65,4,11,127,1,65,0,11,127,1,65,0,11,127,1,65,0,11,127,0,65,240,2,11,127,0,65,6,11,7,240,5,41,6,109,101,109,111,114,121,2,0,7,95,95,97,108,108,111,99,0,10,8,95,95,114,101,116,97,105,110,0,11,9,95,95,114,101,108,101,97,115,101,0,12,9,95,95,99,111,108,108,101,99,116,0,51,11,95,95,114,116,116,105,95,98,97,115,101,3,7,13,73,110,116,51,50,65,114,114,97,121,95,73,68,3,2,13,85,105,110,116,56,65,114,114,97,121,95,73,68,3,3,6,100,101,103,114,101,101,0,16,3,109,111,100,0,17,5,82,97,98,105,110,3,8,16,82,97,98,105,110,35,103,101,116,58,119,105,110,100,111,119,0,21,16,82,97,98,105,110,35,115,101,116,58,119,105,110,100,111,119,0,22,21,82,97,98,105,110,35,103,101,116,58,119,105,110,100,111,119,95,115,105,122,101,0,23,21,82,97,98,105,110,35,115,101,116,58,119,105,110,100,111,119,95,115,105,122,101,0,24,14,82,97,98,105,110,35,103,101,116,58,119,112,111,115,0,25,14,82,97,98,105,110,35,115,101,116,58,119,112,111,115,0,26,15,82,97,98,105,110,35,103,101,116,58,99,111,117,110,116,0,27,15,82,97,98,105,110,35,115,101,116,58,99,111,117,110,116,0,28,13,82,97,98,105,110,35,103,101,116,58,112,111,115,0,29,13,82,97,98,105,110,35,115,101,116,58,112,111,115,0,30,15,82,97,98,105,110,35,103,101,116,58,115,116,97,114,116,0,31,15,82,97,98,105,110,35,115,101,116,58,115,116,97,114,116,0,32,16,82,97,98,105,110,35,103,101,116,58,100,105,103,101,115,116,0,33,16,82,97,98,105,110,35,115,101,116,58,100,105,103,101,115,116,0,34,21,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,35,21,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,36,22,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,37,22,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,38,31,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,39,31,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,40,20,82,97,98,105,110,35,103,101,116,58,112,111,108,121,110,111,109,105,97,108,0,41,20,82,97,98,105,110,35,115,101,116,58,112,111,108,121,110,111,109,105,97,108,0,42,17,82,97,98,105,110,35,103,101,116,58,109,105,110,115,105,122,101,0,43,17,82,97,98,105,110,35,115,101,116,58,109,105,110,115,105,122,101,0,44,17,82,97,98,105,110,35,103,101,116,58,109,97,120,115,105,122,101,0,45,17,82,97,98,105,110,35,115,101,116,58,109,97,120,115,105,122,101,0,46,14,82,97,98,105,110,35,103,101,116,58,109,97,115,107,0,47,14,82,97,98,105,110,35,115,101,116,58,109,97,115,107,0,48,17,82,97,98,105,110,35,99,111,110,115,116,114,117,99,116,111,114,0,20,17,82,97,98,105,110,35,102,105,110,103,101,114,112,114,105,110,116,0,49,8,1,50,10,165,31,53,199,1,1,4,127,32,1,40,2,0,65,124,113,34,2,65,128,2,73,4,127,32,2,65,4,118,33,4,65,0,5,32,2,65,31,32,2,103,107,34,3,65,4,107,118,65,16,115,33,4,32,3,65,7,107,11,33,3,32,1,40,2,20,33,2,32,1,40,2,16,34,5,4,64,32,5,32,2,54,2,20,11,32,2,4,64,32,2,32,5,54,2,16,11,32,1,32,0,32,4,32,3,65,4,116,106,65,2,116,106,40,2,96,70,4,64,32,0,32,4,32,3,65,4,116,106,65,2,116,106,32,2,54,2,96,32,2,69,4,64,32,0,32,3,65,2,116,106,32,0,32,3,65,2,116,106,40,2,4,65,1,32,4,116,65,127,115,113,34,1,54,2,4,32,1,69,4,64,32,0,32,0,40,2,0,65,1,32,3,116,65,127,115,113,54,2,0,11,11,11,11,226,2,1,6,127,32,1,40,2,0,33,3,32,1,65,16,106,32,1,40,2,0,65,124,113,106,34,4,40,2,0,34,5,65,1,113,4,64,32,3,65,124,113,65,16,106,32,5,65,124,113,106,34,2,65,240,255,255,255,3,73,4,64,32,0,32,4,16,1,32,1,32,2,32,3,65,3,113,114,34,3,54,2,0,32,1,65,16,106,32,1,40,2,0,65,124,113,106,34,4,40,2,0,33,5,11,11,32,3,65,2,113,4,64,32,1,65,4,107,40,2,0,34,2,40,2,0,34,6,65,124,113,65,16,106,32,3,65,124,113,106,34,7,65,240,255,255,255,3,73,4,64,32,0,32,2,16,1,32,2,32,7,32,6,65,3,113,114,34,3,54,2,0,32,2,33,1,11,11,32,4,32,5,65,2,114,54,2,0,32,4,65,4,107,32,1,54,2,0,32,0,32,3,65,124,113,34,2,65,128,2,73,4,127,32,2,65,4,118,33,4,65,0,5,32,2,65,31,32,2,103,107,34,2,65,4,107,118,65,16,115,33,4,32,2,65,7,107,11,34,3,65,4,116,32,4,106,65,2,116,106,40,2,96,33,2,32,1,65,0,54,2,16,32,1,32,2,54,2,20,32,2,4,64,32,2,32,1,54,2,16,11,32,0,32,4,32,3,65,4,116,106,65,2,116,106,32,1,54,2,96,32,0,32,0,40,2,0,65,1,32,3,116,114,54,2,0,32,0,32,3,65,2,116,106,32,0,32,3,65,2,116,106,40,2,4,65,1,32,4,116,114,54,2,4,11,119,1,1,127,32,2,2,127,32,0,40,2,160,12,34,2,4,64,32,2,32,1,65,16,107,70,4,64,32,2,40,2,0,33,3,32,1,65,16,107,33,1,11,11,32,1,11,107,34,2,65,48,73,4,64,15,11,32,1,32,3,65,2,113,32,2,65,32,107,65,1,114,114,54,2,0,32,1,65,0,54,2,16,32,1,65,0,54,2,20,32,1,32,2,106,65,16,107,34,2,65,2,54,2,0,32,0,32,2,54,2,160,12,32,0,32,1,16,2,11,155,1,1,3,127,35,0,34,0,69,4,64,65,1,63,0,34,0,74,4,127,65,1,32,0,107,64,0,65,0,72,5,65,0,11,4,64,0,11,65,176,3,34,0,65,0,54,2,0,65,208,15,65,0,54,2,0,3,64,32,1,65,23,73,4,64,32,1,65,2,116,65,176,3,106,65,0,54,2,4,65,0,33,2,3,64,32,2,65,16,73,4,64,32,1,65,4,116,32,2,106,65,2,116,65,176,3,106,65,0,54,2,96,32,2,65,1,106,33,2,12,1,11,11,32,1,65,1,106,33,1,12,1,11,11,65,176,3,65,224,15,63,0,65,16,116,16,3,65,176,3,36,0,11,32,0,11,45,0,32,0,65,240,255,255,255,3,79,4,64,65,32,65,224,0,65,201,3,65,29,16,0,0,11,32,0,65,15,106,65,112,113,34,0,65,16,32,0,65,16,75,27,11,169,1,1,1,127,32,0,32,1,65,128,2,73,4,127,32,1,65,4,118,33,1,65,0,5,32,1,65,248,255,255,255,1,73,4,64,32,1,65,1,65,27,32,1,103,107,116,106,65,1,107,33,1,11,32,1,65,31,32,1,103,107,34,2,65,4,107,118,65,16,115,33,1,32,2,65,7,107,11,34,2,65,2,116,106,40,2,4,65,127,32,1,116,113,34,1,4,127,32,0,32,1,104,32,2,65,4,116,106,65,2,116,106,40,2,96,5,32,0,40,2,0,65,127,32,2,65,1,106,116,113,34,1,4,127,32,0,32,0,32,1,104,34,0,65,2,116,106,40,2,4,104,32,0,65,4,116,106,65,2,116,106,40,2,96,5,65,0,11,11,11,111,1,1,127,63,0,34,2,32,1,65,248,255,255,255,1,73,4,127,32,1,65,1,65,27,32,1,103,107,116,65,1,107,106,5,32,1,11,65,16,32,0,40,2,160,12,32,2,65,16,116,65,16,107,71,116,106,65,255,255,3,106,65,128,128,124,113,65,16,118,34,1,32,2,32,1,74,27,64,0,65,0,72,4,64,32,1,64,0,65,0,72,4,64,0,11,11,32,0,32,2,65,16,116,63,0,65,16,116,16,3,11,113,1,2,127,32,1,40,2,0,34,3,65,124,113,32,2,107,34,4,65,32,79,4,64,32,1,32,2,32,3,65,2,113,114,54,2,0,32,2,32,1,65,16,106,106,34,1,32,4,65,16,107,65,1,114,54,2,0,32,0,32,1,16,2,5,32,1,32,3,65,126,113,54,2,0,32,1,65,16,106,32,1,40,2,0,65,124,113,106,32,1,65,16,106,32,1,40,2,0,65,124,113,106,40,2,0,65,125,113,54,2,0,11,11,91,1,2,127,32,0,32,1,16,5,34,4,16,6,34,3,69,4,64,65,1,36,1,65,0,36,1,32,0,32,4,16,6,34,3,69,4,64,32,0,32,4,16,7,32,0,32,4,16,6,33,3,11,11,32,3,65,0,54,2,4,32,3,32,2,54,2,8,32,3,32,1,54,2,12,32,0,32,3,16,1,32,0,32,3,32,4,16,8,32,3,11,13,0,16,4,32,0,32,1,16,9,65,16,106,11,33,1,1,127,32,0,65,172,3,75,4,64,32,0,65,16,107,34,1,32,1,40,2,4,65,1,106,54,2,4,11,32,0,11,18,0,32,0,65,172,3,75,4,64,32,0,65,16,107,16,52,11,11,140,3,1,1,127,2,64,32,1,69,13,0,32,0,65,0,58,0,0,32,0,32,1,106,65,1,107,65,0,58,0,0,32,1,65,2,77,13,0,32,0,65,1,106,65,0,58,0,0,32,0,65,2,106,65,0,58,0,0,32,0,32,1,106,34,2,65,2,107,65,0,58,0,0,32,2,65,3,107,65,0,58,0,0,32,1,65,6,77,13,0,32,0,65,3,106,65,0,58,0,0,32,0,32,1,106,65,4,107,65,0,58,0,0,32,1,65,8,77,13,0,32,1,65,0,32,0,107,65,3,113,34,1,107,33,2,32,0,32,1,106,34,0,65,0,54,2,0,32,0,32,2,65,124,113,34,1,106,65,4,107,65,0,54,2,0,32,1,65,8,77,13,0,32,0,65,4,106,65,0,54,2,0,32,0,65,8,106,65,0,54,2,0,32,0,32,1,106,34,2,65,12,107,65,0,54,2,0,32,2,65,8,107,65,0,54,2,0,32,1,65,24,77,13,0,32,0,65,12,106,65,0,54,2,0,32,0,65,16,106,65,0,54,2,0,32,0,65,20,106,65,0,54,2,0,32,0,65,24,106,65,0,54,2,0,32,0,32,1,106,34,2,65,28,107,65,0,54,2,0,32,2,65,24,107,65,0,54,2,0,32,2,65,20,107,65,0,54,2,0,32,2,65,16,107,65,0,54,2,0,32,0,32,0,65,4,113,65,24,106,34,2,106,33,0,32,1,32,2,107,33,1,3,64,32,1,65,32,79,4,64,32,0,66,0,55,3,0,32,0,65,8,106,66,0,55,3,0,32,0,65,16,106,66,0,55,3,0,32,0,65,24,106,66,0,55,3,0,32,1,65,32,107,33,1,32,0,65,32,106,33,0,12,1,11,11,11,11,178,1,1,3,127,32,1,65,240,255,255,255,3,32,2,118,75,4,64,65,144,1,65,192,1,65,23,65,56,16,0,0,11,32,1,32,2,116,34,3,65,0,16,10,34,2,32,3,16,13,32,0,69,4,64,65,12,65,2,16,10,34,0,65,172,3,75,4,64,32,0,65,16,107,34,1,32,1,40,2,4,65,1,106,54,2,4,11,11,32,0,65,0,54,2,0,32,0,65,0,54,2,4,32,0,65,0,54,2,8,32,2,34,1,32,0,40,2,0,34,4,71,4,64,32,1,65,172,3,75,4,64,32,1,65,16,107,34,5,32,5,40,2,4,65,1,106,54,2,4,11,32,4,16,12,11,32,0,32,1,54,2,0,32,0,32,2,54,2,4,32,0,32,3,54,2,8,32,0,11,46,1,2,127,65,12,65,5,16,10,34,0,65,172,3,75,4,64,32,0,65,16,107,34,1,32,1,40,2,4,65,1,106,54,2,4,11,32,0,65,128,2,65,3,16,14,11,9,0,65,63,32,0,121,167,107,11,49,1,2,127,65,63,32,1,121,167,107,33,2,3,64,65,63,32,0,121,167,107,32,2,107,34,3,65,0,78,4,64,32,0,32,1,32,3,172,134,133,33,0,12,1,11,11,32,0,11,40,0,32,1,32,0,40,2,8,79,4,64,65,128,2,65,192,2,65,163,1,65,44,16,0,0,11,32,1,32,0,40,2,4,106,65,0,58,0,0,11,38,0,32,1,32,0,40,2,8,79,4,64,65,128,2,65,192,2,65,152,1,65,44,16,0,0,11,32,1,32,0,40,2,4,106,45,0,0,11,254,5,2,1,127,4,126,32,0,69,4,64,65,232,0,65,6,16,10,34,0,65,172,3,75,4,64,32,0,65,16,107,34,5,32,5,40,2,4,65,1,106,54,2,4,11,11,32,0,65,0,54,2,0,32,0,65,0,54,2,4,32,0,65,0,54,2,8,32,0,66,0,55,3,16,32,0,66,0,55,3,24,32,0,66,0,55,3,32,32,0,66,0,55,3,40,32,0,66,0,55,3,48,32,0,66,0,55,3,56,32,0,66,0,55,3,64,32,0,66,0,55,3,72,32,0,66,0,55,3,80,32,0,66,0,55,3,88,32,0,66,0,55,3,96,32,0,32,2,173,55,3,80,32,0,32,3,173,55,3,88,65,12,65,4,16,10,34,2,65,172,3,75,4,64,32,2,65,16,107,34,3,32,3,40,2,4,65,1,106,54,2,4,11,32,2,32,4,65,0,16,14,33,2,32,0,40,2,0,16,12,32,0,32,2,54,2,0,32,0,32,4,54,2,4,32,0,66,1,32,1,173,134,66,1,125,55,3,96,32,0,66,243,130,183,218,216,230,232,30,55,3,72,35,4,69,4,64,65,0,33,2,3,64,32,2,65,128,2,72,4,64,32,2,65,255,1,113,173,33,6,32,0,41,3,72,34,7,33,8,65,63,32,7,121,167,107,33,1,3,64,65,63,32,6,121,167,107,32,1,107,34,3,65,0,78,4,64,32,6,32,8,32,3,172,134,133,33,6,12,1,11,11,65,0,33,4,3,64,32,4,32,0,40,2,4,65,1,107,72,4,64,32,6,66,8,134,33,6,32,0,41,3,72,34,7,33,8,65,63,32,7,121,167,107,33,1,3,64,65,63,32,6,121,167,107,32,1,107,34,3,65,0,78,4,64,32,6,32,8,32,3,172,134,133,33,6,12,1,11,11,32,4,65,1,106,33,4,12,1,11,11,35,6,40,2,4,32,2,65,3,116,106,32,6,55,3,0,32,2,65,1,106,33,2,12,1,11,11,65,63,32,0,41,3,72,121,167,107,172,33,7,65,0,33,2,3,64,32,2,65,128,2,72,4,64,35,5,33,1,32,2,172,32,7,134,34,8,33,6,65,63,32,0,41,3,72,34,9,121,167,107,33,3,3,64,65,63,32,6,121,167,107,32,3,107,34,4,65,0,78,4,64,32,6,32,9,32,4,172,134,133,33,6,12,1,11,11,32,1,40,2,4,32,2,65,3,116,106,32,6,32,8,132,55,3,0,32,2,65,1,106,33,2,12,1,11,11,65,1,36,4,11,32,0,66,0,55,3,24,32,0,66,0,55,3,32,65,0,33,2,3,64,32,2,32,0,40,2,4,72,4,64,32,0,40,2,0,32,2,16,18,32,2,65,1,106,33,2,12,1,11,11,32,0,66,0,55,3,40,32,0,65,0,54,2,8,32,0,66,0,55,3,16,32,0,66,0,55,3,40,32,0,40,2,0,32,0,40,2,8,16,19,33,1,32,0,40,2,8,32,0,40,2,0,40,2,4,106,65,1,58,0,0,32,0,32,0,41,3,40,35,6,40,2,4,32,1,65,3,116,106,41,3,0,133,55,3,40,32,0,32,0,40,2,8,65,1,106,32,0,40,2,4,111,54,2,8,32,0,35,5,40,2,4,32,0,41,3,40,34,6,66,45,136,167,65,3,116,106,41,3,0,32,6,66,8,134,66,1,132,133,55,3,40,32,0,11,38,1,1,127,32,0,40,2,0,34,0,65,172,3,75,4,64,32,0,65,16,107,34,1,32,1,40,2,4,65,1,106,54,2,4,11,32,0,11,55,1,2,127,32,1,32,0,40,2,0,34,2,71,4,64,32,1,65,172,3,75,4,64,32,1,65,16,107,34,3,32,3,40,2,4,65,1,106,54,2,4,11,32,2,16,12,11,32,0,32,1,54,2,0,11,7,0,32,0,40,2,4,11,9,0,32,0,32,1,54,2,4,11,7,0,32,0,40,2,8,11,9,0,32,0,32,1,54,2,8,11,7,0,32,0,41,3,16,11,9,0,32,0,32,1,55,3,16,11,7,0,32,0,41,3,24,11,9,0,32,0,32,1,55,3,24,11,7,0,32,0,41,3,32,11,9,0,32,0,32,1,55,3,32,11,7,0,32,0,41,3,40,11,9,0,32,0,32,1,55,3,40,11,7,0,32,0,41,3,48,11,9,0,32,0,32,1,55,3,48,11,7,0,32,0,41,3,56,11,9,0,32,0,32,1,55,3,56,11,7,0,32,0,41,3,64,11,9,0,32,0,32,1,55,3,64,11,7,0,32,0,41,3,72,11,9,0,32,0,32,1,55,3,72,11,7,0,32,0,41,3,80,11,9,0,32,0,32,1,55,3,80,11,7,0,32,0,41,3,88,11,9,0,32,0,32,1,55,3,88,11,7,0,32,0,41,3,96,11,9,0,32,0,32,1,55,3,96,11,172,4,2,5,127,1,126,32,2,65,172,3,75,4,64,32,2,65,16,107,34,4,32,4,40,2,4,65,1,106,54,2,4,11,32,2,33,4,65,0,33,2,32,1,40,2,8,33,5,32,1,40,2,4,33,6,3,64,2,127,65,0,33,3,3,64,32,3,32,5,72,4,64,32,3,32,6,106,45,0,0,33,1,32,0,40,2,0,32,0,40,2,8,16,19,33,7,32,0,40,2,8,32,0,40,2,0,40,2,4,106,32,1,58,0,0,32,0,32,0,41,3,40,35,6,40,2,4,32,7,65,3,116,106,41,3,0,133,55,3,40,32,0,32,0,40,2,8,65,1,106,32,0,40,2,4,111,54,2,8,32,0,35,5,40,2,4,32,0,41,3,40,34,8,66,45,136,167,65,3,116,106,41,3,0,32,1,173,32,8,66,8,134,132,133,55,3,40,32,0,32,0,41,3,16,66,1,124,55,3,16,32,0,32,0,41,3,24,66,1,124,55,3,24,32,0,41,3,16,32,0,41,3,80,90,4,127,32,0,41,3,40,32,0,41,3,96,131,80,5,65,0,11,4,127,65,1,5,32,0,41,3,16,32,0,41,3,88,90,11,4,64,32,0,32,0,41,3,32,55,3,48,32,0,32,0,41,3,16,55,3,56,32,0,32,0,41,3,40,55,3,64,65,0,33,1,3,64,32,1,32,0,40,2,4,72,4,64,32,0,40,2,0,32,1,16,18,32,1,65,1,106,33,1,12,1,11,11,32,0,66,0,55,3,40,32,0,65,0,54,2,8,32,0,66,0,55,3,16,32,0,66,0,55,3,40,32,0,40,2,0,32,0,40,2,8,16,19,33,1,32,0,40,2,8,32,0,40,2,0,40,2,4,106,65,1,58,0,0,32,0,32,0,41,3,40,35,6,40,2,4,32,1,65,3,116,106,41,3,0,133,55,3,40,32,0,32,0,40,2,8,65,1,106,32,0,40,2,4,111,54,2,8,32,0,35,5,40,2,4,32,0,41,3,40,34,8,66,45,136,167,65,3,116,106,41,3,0,32,8,66,8,134,66,1,132,133,55,3,40,32,3,65,1,106,12,3,11,32,3,65,1,106,33,3,12,1,11,11,65,127,11,34,1,65,0,78,4,64,32,5,32,1,107,33,5,32,1,32,6,106,33,6,32,2,34,1,65,1,106,33,2,32,4,40,2,4,32,1,65,2,116,106,32,0,41,3,56,62,2,0,12,1,11,11,32,4,11,10,0,16,15,36,5,16,15,36,6,11,3,0,1,11,73,1,2,127,32,0,40,2,4,34,1,65,255,255,255,255,0,113,34,2,65,1,70,4,64,32,0,65,16,106,16,53,32,0,32,0,40,2,0,65,1,114,54,2,0,35,0,32,0,16,2,5,32,0,32,2,65,1,107,32,1,65,128,128,128,128,127,113,114,54,2,4,11,11,58,0,2,64,2,64,2,64,32,0,65,8,107,40,2,0,14,7,0,0,1,1,1,1,1,2,11,15,11,32,0,40,2,0,34,0,4,64,32,0,65,172,3,79,4,64,32,0,65,16,107,16,52,11,11,15,11,0,11,11,137,3,7,0,65,16,11,55,40,0,0,0,1,0,0,0,1,0,0,0,40,0,0,0,97,0,108,0,108,0,111,0,99,0,97,0,116,0,105,0,111,0,110,0,32,0,116,0,111,0,111,0,32,0,108,0,97,0,114,0,103,0,101,0,65,208,0,11,45,30,0,0,0,1,0,0,0,1,0,0,0,30,0,0,0,126,0,108,0,105,0,98,0,47,0,114,0,116,0,47,0,116,0,108,0,115,0,102,0,46,0,116,0,115,0,65,128,1,11,43,28,0,0,0,1,0,0,0,1,0,0,0,28,0,0,0,73,0,110,0,118,0,97,0,108,0,105,0,100,0,32,0,108,0,101,0,110,0,103,0,116,0,104,0,65,176,1,11,53,38,0,0,0,1,0,0,0,1,0,0,0,38,0,0,0,126,0,108,0,105,0,98,0,47,0,97,0,114,0,114,0,97,0,121,0,98,0,117,0,102,0,102,0,101,0,114,0,46,0,116,0,115,0,65,240,1,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,73,0,110,0,100,0,101,0,120,0,32,0,111,0,117,0,116,0,32,0,111,0,102,0,32,0,114,0,97,0,110,0,103,0,101,0,65,176,2,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,126,0,108,0,105,0,98,0,47,0,116,0,121,0,112,0,101,0,100,0,97,0,114,0,114,0,97,0,121,0,46,0,116,0,115,0,65,240,2,11,53,7,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,145,4,0,0,2,0,0,0,49,0,0,0,2,0,0,0,17,1,0,0,2,0,0,0,16,0,34,16,115,111,117,114,99,101,77,97,112,112,105,110,103,85,82,76,16,46,47,114,97,98,105,110,46,119,97,115,109,46,109,97,112]);return S0(new Response(new Blob([t],{type:"application/wasm"})),r)}Ko.exports=Tr});var Qo=k((Au,Xo)=>{var Zo=vo(),I0=Jo(),T0=async(r,t,e,n,i)=>{let o=await I0();return new Zo(o,r,t,e,n,i)};Xo.exports={Rabin:Zo,create:T0}});var Fr={};M(Fr,{identity:()=>C0});var C0,is=U(()=>{it();pt();C0=pe({prefix:"\0",name:"identity",encode:r=>Pe(r),decode:r=>ze(r)})});var Dr={};M(Dr,{base2:()=>L0});var L0,os=U(()=>{it();L0=O({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})});var Cr={};M(Cr,{base8:()=>N0});var N0,ss=U(()=>{it();N0=O({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})});var Lr={};M(Lr,{base10:()=>U0});var U0,as=U(()=>{it();U0=dt({prefix:"9",name:"base10",alphabet:"0123456789"})});var Nr={};M(Nr,{base16:()=>v0,base16upper:()=>O0});var v0,O0,cs=U(()=>{it();v0=O({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),O0=O({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});var Ur={};M(Ur,{base36:()=>z0,base36upper:()=>P0});var z0,P0,fs=U(()=>{it();z0=dt({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),P0=dt({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})});var vr={};M(vr,{base64:()=>j0,base64pad:()=>R0,base64url:()=>M0,base64urlpad:()=>H0});var j0,R0,M0,H0,us=U(()=>{it();j0=O({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),R0=O({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),M0=O({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),H0=O({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});var Or={};M(Or,{identity:()=>$0});var hs,V0,ls,q0,$0,ps=U(()=>{pt();qt();hs=0,V0="identity",ls=Y,q0=r=>_t(hs,ls(r)),$0={code:hs,name:V0,encode:ls,digest:q0}});var Ou,zu,ds=U(()=>{Ou=new TextEncoder,zu=new TextDecoder});var zr,ju,ys=U(()=>{is();os();ss();as();cs();qe();fs();He();us();le();ps();Ee();ds();$e();zr={...Fr,...Dr,...Cr,...Lr,...Nr,...Ve,...Ur,...Me,...vr},ju={...Re,...Or}});function ms(r,t,e,n){return{name:r,prefix:t,encoder:{name:r,prefix:t,encode:e},decoder:{decode:n}}}var gs,Pr,W0,ws,bs=U(()=>{ys();gs=ms("utf8","u",r=>{let t=new TextDecoder("utf8");return"u"+t.decode(r)},r=>new TextEncoder().encode(r.substring(1))),Pr=ms("ascii","a",r=>{let t="a";for(let e=0;e<r.length;e++)t+=String.fromCharCode(r[e]);return t},r=>{r=r.substring(1);let t=new Uint8Array(r.length);for(let e=0;e<r.length;e++)t[e]=r.charCodeAt(e);return t}),W0={utf8:gs,"utf-8":gs,hex:zr.base16,latin1:Pr,ascii:Pr,binary:Pr,...zr},ws=W0});var xs={};M(xs,{fromString:()=>jr});function jr(r,t="utf8"){let e=ws[t];if(!e)throw new Error(`Unsupported encoding "${t}"`);return e.decoder.decode(`${e.prefix}${r}`)}var Rr=U(()=>{bs()});var Ts=k((oh,Is)=>{"use strict";var Ce=7;Is.exports=class{constructor(){this._bitArrays=[],this._data=[],this._length=0,this._changedLength=!1,this._changedData=!1}set(t,e){let n=this._internalPositionFor(t,!1);if(e===void 0)n!==-1&&(this._unsetInternalPos(n),this._unsetBit(t),this._changedLength=!0,this._changedData=!0);else{let i=!1;n===-1?(n=this._data.length,this._setBit(t),this._changedData=!0):i=!0,this._setInternalPos(n,t,e,i),this._changedLength=!0}}unset(t){this.set(t,void 0)}get(t){this._sortData();let e=this._internalPositionFor(t,!0);if(e!==-1)return this._data[e][1]}push(t){return this.set(this.length,t),this.length}get length(){if(this._sortData(),this._changedLength){let t=this._data[this._data.length-1];this._length=t?t[0]+1:0,this._changedLength=!1}return this._length}forEach(t){let e=0;for(;e<this.length;)t(this.get(e),e,this),e++}map(t){let e=0,n=new Array(this.length);for(;e<this.length;)n[e]=t(this.get(e),e,this),e++;return n}reduce(t,e){let n=0,i=e;for(;n<this.length;){let o=this.get(n);i=t(i,o,n),n++}return i}find(t){let e=0,n,i;for(;e<this.length&&!n;)i=this.get(e),n=t(i),e++;return n?i:void 0}_internalPositionFor(t,e){let n=this._bytePosFor(t,e);if(n>=this._bitArrays.length)return-1;let i=this._bitArrays[n],o=t-n*Ce;if(!((i&1<<o)>0))return-1;let c=this._bitArrays.slice(0,n).reduce(Q0,0),a=~(4294967295<<o+1),h=Ss(i&a);return c+h-1}_bytePosFor(t,e){let n=Math.floor(t/Ce),i=n+1;for(;!e&&this._bitArrays.length<i;)this._bitArrays.push(0);return n}_setBit(t){let e=this._bytePosFor(t,!1);this._bitArrays[e]|=1<<t-e*Ce}_unsetBit(t){let e=this._bytePosFor(t,!1);this._bitArrays[e]&=~(1<<t-e*Ce)}_setInternalPos(t,e,n,i){let o=this._data,s=[e,n];if(i)this._sortData(),o[t]=s;else{if(o.length)if(o[o.length-1][0]>=e)o.push(s);else if(o[0][0]<=e)o.unshift(s);else{let c=Math.round(o.length/2);this._data=o.slice(0,c).concat(s).concat(o.slice(c))}else this._data.push(s);this._changedData=!0,this._changedLength=!0}}_unsetInternalPos(t){this._data.splice(t,1)}_sortData(){this._changedData&&this._data.sort(tc),this._changedData=!1}bitField(){let t=[],e=8,n=0,i=0,o,s=this._bitArrays.slice();for(;s.length||n;){n===0&&(o=s.shift(),n=7);let a=Math.min(n,e),h=~(255<<a);i|=(o&h)<<8-e,o=o>>>a,n-=a,e-=a,(!e||!n&&!s.length)&&(t.push(i),i=0,e=8)}for(var c=t.length-1;c>0&&t[c]===0;c--)t.pop();return t}compactArray(){return this._sortData(),this._data.map(ec)}};function Q0(r,t){return r+Ss(t)}function Ss(r){let t=r;return t=t-(t>>1&1431655765),t=(t&858993459)+(t>>2&858993459),(t+(t>>4)&252645135)*16843009>>24}function tc(r,t){return r[0]-t[0]}function ec(r){return r[1]}});var Ds=k((sh,Fs)=>{"use strict";var rc=Ts(),{fromString:nc}=(Rr(),xs),nt=class{constructor(t,e,n=0){this._options=t,this._popCount=0,this._parent=e,this._posAtParent=n,this._children=new rc,this.key=null}async put(t,e){let n=await this._findNewBucketAndPos(t);await n.bucket._putAt(n,t,e)}async get(t){let e=await this._findChild(t);if(e)return e.value}async del(t){let e=await this._findPlace(t),n=e.bucket._at(e.pos);n&&n.key===t&&e.bucket._delAt(e.pos)}leafCount(){return this._children.compactArray().reduce((e,n)=>n instanceof nt?e+n.leafCount():e+1,0)}childrenCount(){return this._children.length}onlyChild(){return this._children.get(0)}*eachLeafSeries(){let t=this._children.compactArray();for(let e of t)e instanceof nt?yield*e.eachLeafSeries():yield e;return[]}serialize(t,e){let n=[];return e(this._children.reduce((i,o,s)=>(o&&(o instanceof nt?i.push(o.serialize(t,e)):i.push(t(o,s))),i),n))}asyncTransform(t,e){return ks(this,t,e)}toJSON(){return this.serialize(oc,sc)}prettyPrint(){return JSON.stringify(this.toJSON(),null," ")}tableSize(){return Math.pow(2,this._options.bits)}async _findChild(t){let e=await this._findPlace(t),n=e.bucket._at(e.pos);if(!(n instanceof nt)&&n&&n.key===t)return n}async _findPlace(t){let e=this._options.hash(typeof t=="string"?nc(t):t),n=await e.take(this._options.bits),i=this._children.get(n);return i instanceof nt?i._findPlace(e):{bucket:this,pos:n,hash:e,existingChild:i}}async _findNewBucketAndPos(t){let e=await this._findPlace(t);if(e.existingChild&&e.existingChild.key!==t){let n=new nt(this._options,e.bucket,e.pos);e.bucket._putObjectAt(e.pos,n);let i=await n._findPlace(e.existingChild.hash);return i.bucket._putAt(i,e.existingChild.key,e.existingChild.value),n._findNewBucketAndPos(e.hash)}return e}_putAt(t,e,n){this._putObjectAt(t.pos,{key:e,value:n,hash:t.hash})}_putObjectAt(t,e){this._children.get(t)||this._popCount++,this._children.set(t,e)}_delAt(t){if(t===-1)throw new Error("Invalid position");this._children.get(t)&&this._popCount--,this._children.unset(t),this._level()}_level(){if(this._parent&&this._popCount<=1)if(this._popCount===1){let t=this._children.find(ic);if(t&&!(t instanceof nt)){let e=t.hash;e.untake(this._options.bits);let n={pos:this._posAtParent,hash:e,bucket:this._parent};this._parent._putAt(n,t.key,t.value)}}else this._parent._delAt(this._posAtParent)}_at(t){return this._children.get(t)}};function ic(r){return Boolean(r)}function oc(r,t){return r.key}function sc(r){return r}async function ks(r,t,e){let n=[];for(let i of r._children.compactArray())if(i instanceof nt)await ks(i,t,e);else{let o=await t(i);n.push({bitField:r._children.bitField(),children:o})}return e(n)}Fs.exports=nt});var Ls=k((ch,Cs)=>{"use strict";var ac=[255,254,252,248,240,224,192,128],cc=[1,3,7,15,31,63,127,255];Cs.exports=class{constructor(t){this._value=t,this._currentBytePos=t.length-1,this._currentBitPos=7}availableBits(){return this._currentBitPos+1+this._currentBytePos*8}totalBits(){return this._value.length*8}take(t){let e=t,n=0;for(;e&&this._haveBits();){let i=this._value[this._currentBytePos],o=this._currentBitPos+1,s=Math.min(o,e),c=fc(i,o-s,s);n=(n<<s)+c,e-=s,this._currentBitPos-=s,this._currentBitPos<0&&(this._currentBitPos=7,this._currentBytePos--)}return n}untake(t){for(this._currentBitPos+=t;this._currentBitPos>7;)this._currentBitPos-=8,this._currentBytePos+=1}_haveBits(){return this._currentBytePos>=0}};function fc(r,t,e){let n=uc(t,e);return(r&n)>>>t}function uc(r,t){return ac[r]&cc[Math.min(t+r-1,7)]}});var Ns={};M(Ns,{concat:()=>hc});function hc(r,t){t||(t=r.reduce((i,o)=>i+o.length,0));let e=new Uint8Array(t),n=0;for(let i of r)e.set(i,n),n+=i.length;return e}var Us=U(()=>{});var vs=k((fh,Vr)=>{"use strict";var lc=Ls(),{concat:pc}=(Us(),Ns);function dc(r){function t(e){return e instanceof Le?e:new Le(e,r)}return t}var Le=class{constructor(t,e){if(!(t instanceof Uint8Array))throw new Error("can only hash Uint8Arrays");this._value=t,this._hashFn=e,this._depth=-1,this._availableBits=0,this._currentBufferIndex=0,this._buffers=[]}async take(t){let e=t;for(;this._availableBits<e;)await this._produceMoreBits();let n=0;for(;e>0;){let i=this._buffers[this._currentBufferIndex],o=Math.min(i.availableBits(),e),s=i.take(o);n=(n<<o)+s,e-=o,this._availableBits-=o,i.availableBits()===0&&this._currentBufferIndex++}return n}untake(t){let e=t;for(;e>0;){let n=this._buffers[this._currentBufferIndex],i=Math.min(n.totalBits()-n.availableBits(),e);n.untake(i),e-=i,this._availableBits+=i,this._currentBufferIndex>0&&n.totalBits()===n.availableBits()&&(this._depth--,this._currentBufferIndex--)}}async _produceMoreBits(){this._depth++;let t=this._depth?pc([this._value,Uint8Array.from([this._depth])]):this._value,e=await this._hashFn(t),n=new lc(e);this._buffers.push(n),this._availableBits+=n.availableBits()}};Vr.exports=dc;Vr.exports.InfiniteHash=Le});var Ps=k((uh,zs)=>{"use strict";var Os=Ds(),yc=vs();function mc(r){if(!r||!r.hashFn)throw new Error("please define an options.hashFn");let t={bits:r.bits||8,hash:yc(r.hashFn)};return new Os(t)}zs.exports={createHAMT:mc,Bucket:Os}});var Bc={};M(Bc,{importer:()=>_c});var Ws=H(Ue());var rn=H(en()),nn=rn.default;le();he();$e();var Ge=H(kn());function Z1(r){let t=new Array(4);for(let e=0;e<4;e++)t[e]=r&255,r=r>>8;return new Uint8Array(t)}var Zc=Dt({name:"murmur3-32",code:35,encode:r=>Z1(Ge.default.x86.hash32(r))}),Fn=Dt({name:"murmur3-128",code:34,encode:r=>Rt.fromHex(Ge.default.x64.hash128(r))});async function X1(r){return(await Fn.encode(r)).slice(0,8).reverse()}var Q1={chunker:"fixed",strategy:"balanced",rawLeaves:!1,onlyHash:!1,reduceSingleLeafToSelf:!0,hasher:Ct,leafType:"file",cidVersion:0,progress:()=>()=>{},shardSplitThreshold:1e3,fileImportConcurrency:50,blockWriteConcurrency:10,minChunkSize:262144,maxChunkSize:262144,avgChunkSize:262144,window:16,polynomial:17437180132763652,maxChildrenPerNode:174,layerRepeat:4,wrapWithDirectory:!1,recursive:!1,hidden:!1,timeout:void 0,hamtHashFn:X1,hamtHashCode:34,hamtBucketBits:8},Dn=(r={})=>nn.bind({ignoreUndefined:!0})(Q1,r);var _e=H(Nn());var ut=H(Di()),Ut=ut.default.Reader,sr=ut.default.Writer,S=ut.default.util,V=ut.default.roots["ipfs-unixfs"]||(ut.default.roots["ipfs-unixfs"]={}),Ci=V.Data=(()=>{function r(t){if(this.blocksizes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return r.prototype.Type=0,r.prototype.Data=S.newBuffer([]),r.prototype.filesize=S.Long?S.Long.fromBits(0,0,!0):0,r.prototype.blocksizes=S.emptyArray,r.prototype.hashType=S.Long?S.Long.fromBits(0,0,!0):0,r.prototype.fanout=S.Long?S.Long.fromBits(0,0,!0):0,r.prototype.mode=0,r.prototype.mtime=null,r.encode=function(e,n){if(n||(n=sr.create()),n.uint32(8).int32(e.Type),e.Data!=null&&Object.hasOwnProperty.call(e,"Data")&&n.uint32(18).bytes(e.Data),e.filesize!=null&&Object.hasOwnProperty.call(e,"filesize")&&n.uint32(24).uint64(e.filesize),e.blocksizes!=null&&e.blocksizes.length)for(var i=0;i<e.blocksizes.length;++i)n.uint32(32).uint64(e.blocksizes[i]);return e.hashType!=null&&Object.hasOwnProperty.call(e,"hashType")&&n.uint32(40).uint64(e.hashType),e.fanout!=null&&Object.hasOwnProperty.call(e,"fanout")&&n.uint32(48).uint64(e.fanout),e.mode!=null&&Object.hasOwnProperty.call(e,"mode")&&n.uint32(56).uint32(e.mode),e.mtime!=null&&Object.hasOwnProperty.call(e,"mtime")&&V.UnixTime.encode(e.mtime,n.uint32(66).fork()).ldelim(),n},r.decode=function(e,n){e instanceof Ut||(e=Ut.create(e));for(var i=n===void 0?e.len:e.pos+n,o=new V.Data;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:o.Type=e.int32();break;case 2:o.Data=e.bytes();break;case 3:o.filesize=e.uint64();break;case 4:if(o.blocksizes&&o.blocksizes.length||(o.blocksizes=[]),(s&7)==2)for(var c=e.uint32()+e.pos;e.pos<c;)o.blocksizes.push(e.uint64());else o.blocksizes.push(e.uint64());break;case 5:o.hashType=e.uint64();break;case 6:o.fanout=e.uint64();break;case 7:o.mode=e.uint32();break;case 8:o.mtime=V.UnixTime.decode(e,e.uint32());break;default:e.skipType(s&7);break}}if(!o.hasOwnProperty("Type"))throw S.ProtocolError("missing required 'Type'",{instance:o});return o},r.fromObject=function(e){if(e instanceof V.Data)return e;var n=new V.Data;switch(e.Type){case"Raw":case 0:n.Type=0;break;case"Directory":case 1:n.Type=1;break;case"File":case 2:n.Type=2;break;case"Metadata":case 3:n.Type=3;break;case"Symlink":case 4:n.Type=4;break;case"HAMTShard":case 5:n.Type=5;break}if(e.Data!=null&&(typeof e.Data=="string"?S.base64.decode(e.Data,n.Data=S.newBuffer(S.base64.length(e.Data)),0):e.Data.length&&(n.Data=e.Data)),e.filesize!=null&&(S.Long?(n.filesize=S.Long.fromValue(e.filesize)).unsigned=!0:typeof e.filesize=="string"?n.filesize=parseInt(e.filesize,10):typeof e.filesize=="number"?n.filesize=e.filesize:typeof e.filesize=="object"&&(n.filesize=new S.LongBits(e.filesize.low>>>0,e.filesize.high>>>0).toNumber(!0))),e.blocksizes){if(!Array.isArray(e.blocksizes))throw TypeError(".Data.blocksizes: array expected");n.blocksizes=[];for(var i=0;i<e.blocksizes.length;++i)S.Long?(n.blocksizes[i]=S.Long.fromValue(e.blocksizes[i])).unsigned=!0:typeof e.blocksizes[i]=="string"?n.blocksizes[i]=parseInt(e.blocksizes[i],10):typeof e.blocksizes[i]=="number"?n.blocksizes[i]=e.blocksizes[i]:typeof e.blocksizes[i]=="object"&&(n.blocksizes[i]=new S.LongBits(e.blocksizes[i].low>>>0,e.blocksizes[i].high>>>0).toNumber(!0))}if(e.hashType!=null&&(S.Long?(n.hashType=S.Long.fromValue(e.hashType)).unsigned=!0:typeof e.hashType=="string"?n.hashType=parseInt(e.hashType,10):typeof e.hashType=="number"?n.hashType=e.hashType:typeof e.hashType=="object"&&(n.hashType=new S.LongBits(e.hashType.low>>>0,e.hashType.high>>>0).toNumber(!0))),e.fanout!=null&&(S.Long?(n.fanout=S.Long.fromValue(e.fanout)).unsigned=!0:typeof e.fanout=="string"?n.fanout=parseInt(e.fanout,10):typeof e.fanout=="number"?n.fanout=e.fanout:typeof e.fanout=="object"&&(n.fanout=new S.LongBits(e.fanout.low>>>0,e.fanout.high>>>0).toNumber(!0))),e.mode!=null&&(n.mode=e.mode>>>0),e.mtime!=null){if(typeof e.mtime!="object")throw TypeError(".Data.mtime: object expected");n.mtime=V.UnixTime.fromObject(e.mtime)}return n},r.toObject=function(e,n){n||(n={});var i={};if((n.arrays||n.defaults)&&(i.blocksizes=[]),n.defaults){if(i.Type=n.enums===String?"Raw":0,n.bytes===String?i.Data="":(i.Data=[],n.bytes!==Array&&(i.Data=S.newBuffer(i.Data))),S.Long){var o=new S.Long(0,0,!0);i.filesize=n.longs===String?o.toString():n.longs===Number?o.toNumber():o}else i.filesize=n.longs===String?"0":0;if(S.Long){var o=new S.Long(0,0,!0);i.hashType=n.longs===String?o.toString():n.longs===Number?o.toNumber():o}else i.hashType=n.longs===String?"0":0;if(S.Long){var o=new S.Long(0,0,!0);i.fanout=n.longs===String?o.toString():n.longs===Number?o.toNumber():o}else i.fanout=n.longs===String?"0":0;i.mode=0,i.mtime=null}if(e.Type!=null&&e.hasOwnProperty("Type")&&(i.Type=n.enums===String?V.Data.DataType[e.Type]:e.Type),e.Data!=null&&e.hasOwnProperty("Data")&&(i.Data=n.bytes===String?S.base64.encode(e.Data,0,e.Data.length):n.bytes===Array?Array.prototype.slice.call(e.Data):e.Data),e.filesize!=null&&e.hasOwnProperty("filesize")&&(typeof e.filesize=="number"?i.filesize=n.longs===String?String(e.filesize):e.filesize:i.filesize=n.longs===String?S.Long.prototype.toString.call(e.filesize):n.longs===Number?new S.LongBits(e.filesize.low>>>0,e.filesize.high>>>0).toNumber(!0):e.filesize),e.blocksizes&&e.blocksizes.length){i.blocksizes=[];for(var s=0;s<e.blocksizes.length;++s)typeof e.blocksizes[s]=="number"?i.blocksizes[s]=n.longs===String?String(e.blocksizes[s]):e.blocksizes[s]:i.blocksizes[s]=n.longs===String?S.Long.prototype.toString.call(e.blocksizes[s]):n.longs===Number?new S.LongBits(e.blocksizes[s].low>>>0,e.blocksizes[s].high>>>0).toNumber(!0):e.blocksizes[s]}return e.hashType!=null&&e.hasOwnProperty("hashType")&&(typeof e.hashType=="number"?i.hashType=n.longs===String?String(e.hashType):e.hashType:i.hashType=n.longs===String?S.Long.prototype.toString.call(e.hashType):n.longs===Number?new S.LongBits(e.hashType.low>>>0,e.hashType.high>>>0).toNumber(!0):e.hashType),e.fanout!=null&&e.hasOwnProperty("fanout")&&(typeof e.fanout=="number"?i.fanout=n.longs===String?String(e.fanout):e.fanout:i.fanout=n.longs===String?S.Long.prototype.toString.call(e.fanout):n.longs===Number?new S.LongBits(e.fanout.low>>>0,e.fanout.high>>>0).toNumber(!0):e.fanout),e.mode!=null&&e.hasOwnProperty("mode")&&(i.mode=e.mode),e.mtime!=null&&e.hasOwnProperty("mtime")&&(i.mtime=V.UnixTime.toObject(e.mtime,n)),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,ut.default.util.toJSONOptions)},r.DataType=function(){let t={},e=Object.create(t);return e[t[0]="Raw"]=0,e[t[1]="Directory"]=1,e[t[2]="File"]=2,e[t[3]="Metadata"]=3,e[t[4]="Symlink"]=4,e[t[5]="HAMTShard"]=5,e}(),r})(),Bf=V.UnixTime=(()=>{function r(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return r.prototype.Seconds=S.Long?S.Long.fromBits(0,0,!1):0,r.prototype.FractionalNanoseconds=0,r.encode=function(e,n){return n||(n=sr.create()),n.uint32(8).int64(e.Seconds),e.FractionalNanoseconds!=null&&Object.hasOwnProperty.call(e,"FractionalNanoseconds")&&n.uint32(21).fixed32(e.FractionalNanoseconds),n},r.decode=function(e,n){e instanceof Ut||(e=Ut.create(e));for(var i=n===void 0?e.len:e.pos+n,o=new V.UnixTime;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:o.Seconds=e.int64();break;case 2:o.FractionalNanoseconds=e.fixed32();break;default:e.skipType(s&7);break}}if(!o.hasOwnProperty("Seconds"))throw S.ProtocolError("missing required 'Seconds'",{instance:o});return o},r.fromObject=function(e){if(e instanceof V.UnixTime)return e;var n=new V.UnixTime;return e.Seconds!=null&&(S.Long?(n.Seconds=S.Long.fromValue(e.Seconds)).unsigned=!1:typeof e.Seconds=="string"?n.Seconds=parseInt(e.Seconds,10):typeof e.Seconds=="number"?n.Seconds=e.Seconds:typeof e.Seconds=="object"&&(n.Seconds=new S.LongBits(e.Seconds.low>>>0,e.Seconds.high>>>0).toNumber())),e.FractionalNanoseconds!=null&&(n.FractionalNanoseconds=e.FractionalNanoseconds>>>0),n},r.toObject=function(e,n){n||(n={});var i={};if(n.defaults){if(S.Long){var o=new S.Long(0,0,!1);i.Seconds=n.longs===String?o.toString():n.longs===Number?o.toNumber():o}else i.Seconds=n.longs===String?"0":0;i.FractionalNanoseconds=0}return e.Seconds!=null&&e.hasOwnProperty("Seconds")&&(typeof e.Seconds=="number"?i.Seconds=n.longs===String?String(e.Seconds):e.Seconds:i.Seconds=n.longs===String?S.Long.prototype.toString.call(e.Seconds):n.longs===Number?new S.LongBits(e.Seconds.low>>>0,e.Seconds.high>>>0).toNumber():e.Seconds),e.FractionalNanoseconds!=null&&e.hasOwnProperty("FractionalNanoseconds")&&(i.FractionalNanoseconds=e.FractionalNanoseconds),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,ut.default.util.toJSONOptions)},r})(),Af=V.Metadata=(()=>{function r(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return r.prototype.MimeType="",r.encode=function(e,n){return n||(n=sr.create()),e.MimeType!=null&&Object.hasOwnProperty.call(e,"MimeType")&&n.uint32(10).string(e.MimeType),n},r.decode=function(e,n){e instanceof Ut||(e=Ut.create(e));for(var i=n===void 0?e.len:e.pos+n,o=new V.Metadata;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:o.MimeType=e.string();break;default:e.skipType(s&7);break}}return o},r.fromObject=function(e){if(e instanceof V.Metadata)return e;var n=new V.Metadata;return e.MimeType!=null&&(n.MimeType=String(e.MimeType)),n},r.toObject=function(e,n){n||(n={});var i={};return n.defaults&&(i.MimeType=""),e.MimeType!=null&&e.hasOwnProperty("MimeType")&&(i.MimeType=e.MimeType),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,ut.default.util.toJSONOptions)},r})();var ht=Ci,Li=["raw","directory","file","metadata","symlink","hamt-sharded-directory"],ua=["directory","hamt-sharded-directory"],Ni=parseInt("0644",8),Ui=parseInt("0755",8);function ar(r){if(r!=null)return typeof r=="number"?r&4095:(r=r.toString(),r.substring(0,1)==="0"?parseInt(r,8)&4095:parseInt(r,10)&4095)}function vi(r){if(r==null)return;let t;if(r.secs!=null&&(t={secs:r.secs,nsecs:r.nsecs}),r.Seconds!=null&&(t={secs:r.Seconds,nsecs:r.FractionalNanoseconds}),Array.isArray(r)&&(t={secs:r[0],nsecs:r[1]}),r instanceof Date){let e=r.getTime(),n=Math.floor(e/1e3);t={secs:n,nsecs:(e-n*1e3)*1e3}}if(!!Object.prototype.hasOwnProperty.call(t,"secs")){if(t!=null&&t.nsecs!=null&&(t.nsecs<0||t.nsecs>999999999))throw(0,_e.default)(new Error("mtime-nsecs must be within the range [0,999999999]"),"ERR_INVALID_MTIME_NSECS");return t}}var $=class{static unmarshal(t){let e=ht.decode(t),n=ht.toObject(e,{defaults:!1,arrays:!0,longs:Number,objects:!1}),i=new $({type:Li[n.Type],data:n.Data,blockSizes:n.blocksizes,mode:n.mode,mtime:n.mtime?{secs:n.mtime.Seconds,nsecs:n.mtime.FractionalNanoseconds}:void 0});return i._originalMode=n.mode||0,i}constructor(t={type:"file"}){let{type:e,data:n,blockSizes:i,hashType:o,fanout:s,mtime:c,mode:a}=t;if(e&&!Li.includes(e))throw(0,_e.default)(new Error("Type: "+e+" is not valid"),"ERR_INVALID_TYPE");this.type=e||"file",this.data=n,this.hashType=o,this.fanout=s,this.blockSizes=i||[],this._originalMode=0,this.mode=ar(a),c&&(this.mtime=vi(c),this.mtime&&!this.mtime.nsecs&&(this.mtime.nsecs=0))}set mode(t){this._mode=this.isDirectory()?Ui:Ni;let e=ar(t);e!==void 0&&(this._mode=e)}get mode(){return this._mode}isDirectory(){return Boolean(this.type&&ua.includes(this.type))}addBlockSize(t){this.blockSizes.push(t)}removeBlockSize(t){this.blockSizes.splice(t,1)}fileSize(){if(this.isDirectory())return 0;let t=0;return this.blockSizes.forEach(e=>{t+=e}),this.data&&(t+=this.data.length),t}marshal(){let t;switch(this.type){case"raw":t=ht.DataType.Raw;break;case"directory":t=ht.DataType.Directory;break;case"file":t=ht.DataType.File;break;case"metadata":t=ht.DataType.Metadata;break;case"symlink":t=ht.DataType.Symlink;break;case"hamt-sharded-directory":t=ht.DataType.HAMTShard;break;default:throw(0,_e.default)(new Error("Type: "+t+" is not valid"),"ERR_INVALID_TYPE")}let e=this.data;(!this.data||!this.data.length)&&(e=void 0);let n;this.mode!=null&&(n=this._originalMode&4294963200|(ar(this.mode)||0),n===Ni&&!this.isDirectory()&&(n=void 0),n===Ui&&this.isDirectory()&&(n=void 0));let i;if(this.mtime!=null){let s=vi(this.mtime);s&&(i={Seconds:s.secs,FractionalNanoseconds:s.nsecs},i.FractionalNanoseconds===0&&delete i.FractionalNanoseconds)}let o={Type:t,Data:e,filesize:this.isDirectory()?void 0:this.fileSize(),blocksizes:this.blockSizes,hashType:this.hashType,fanout:this.fanout,mode:n,mtime:i};return ht.encode(o).finish()}};Gt();var wt={};M(wt,{code:()=>Ba,createLink:()=>$i,createNode:()=>qi,decode:()=>Aa,encode:()=>tt,name:()=>_a,prepare:()=>J,validate:()=>ur});Gt();var ha=new TextDecoder;function cr(r,t){let e=0;for(let n=0;;n+=7){if(n>=64)throw new Error("protobuf: varint overflow");if(t>=r.length)throw new Error("protobuf: unexpected end of data");let i=r[t++];if(e+=n<28?(i&127)<<n:(i&127)*2**n,i<128)break}return[e,t]}function Be(r,t){let e;[e,t]=cr(r,t);let n=t+e;if(e<0||n<0)throw new Error("protobuf: invalid length");if(n>r.length)throw new Error("protobuf: unexpected end of data");return[r.subarray(t,n),n]}function Oi(r,t){let e;return[e,t]=cr(r,t),[e&7,e>>3,t]}function la(r){let t={},e=r.length,n=0;for(;n<e;){let i,o;if([i,o,n]=Oi(r,n),o===1){if(t.Hash)throw new Error("protobuf: (PBLink) duplicate Hash section");if(i!==2)throw new Error(`protobuf: (PBLink) wrong wireType (${i}) for Hash`);if(t.Name!==void 0)throw new Error("protobuf: (PBLink) invalid order, found Name before Hash");if(t.Tsize!==void 0)throw new Error("protobuf: (PBLink) invalid order, found Tsize before Hash");[t.Hash,n]=Be(r,n)}else if(o===2){if(t.Name!==void 0)throw new Error("protobuf: (PBLink) duplicate Name section");if(i!==2)throw new Error(`protobuf: (PBLink) wrong wireType (${i}) for Name`);if(t.Tsize!==void 0)throw new Error("protobuf: (PBLink) invalid order, found Tsize before Name");let s;[s,n]=Be(r,n),t.Name=ha.decode(s)}else if(o===3){if(t.Tsize!==void 0)throw new Error("protobuf: (PBLink) duplicate Tsize section");if(i!==0)throw new Error(`protobuf: (PBLink) wrong wireType (${i}) for Tsize`);[t.Tsize,n]=cr(r,n)}else throw new Error(`protobuf: (PBLink) invalid fieldNumber, expected 1, 2 or 3, got ${o}`)}if(n>e)throw new Error("protobuf: (PBLink) unexpected end of data");return t}function zi(r){let t=r.length,e=0,n,i=!1,o;for(;e<t;){let c,a;if([c,a,e]=Oi(r,e),c!==2)throw new Error(`protobuf: (PBNode) invalid wireType, expected 2, got ${c}`);if(a===1){if(o)throw new Error("protobuf: (PBNode) duplicate Data section");[o,e]=Be(r,e),n&&(i=!0)}else if(a===2){if(i)throw new Error("protobuf: (PBNode) duplicate Links section");n||(n=[]);let h;[h,e]=Be(r,e),n.push(la(h))}else throw new Error(`protobuf: (PBNode) invalid fieldNumber, expected 1 or 2, got ${a}`)}if(e>t)throw new Error("protobuf: (PBNode) unexpected end of data");let s={};return o&&(s.Data=o),s.Links=n||[],s}var Pi=new TextEncoder,ji=2**32,pa=2**31;function da(r,t){let e=t.length;if(typeof r.Tsize=="number"){if(r.Tsize<0)throw new Error("Tsize cannot be negative");if(!Number.isSafeInteger(r.Tsize))throw new Error("Tsize too large for encoding");e=Zt(t,e,r.Tsize)-1,t[e]=24}if(typeof r.Name=="string"){let n=Pi.encode(r.Name);e-=n.length,t.set(n,e),e=Zt(t,e,n.length)-1,t[e]=18}return r.Hash&&(e-=r.Hash.length,t.set(r.Hash,e),e=Zt(t,e,r.Hash.length)-1,t[e]=10),t.length-e}function Ri(r){let t=ma(r),e=new Uint8Array(t),n=t;if(r.Data&&(n-=r.Data.length,e.set(r.Data,n),n=Zt(e,n,r.Data.length)-1,e[n]=10),r.Links)for(let i=r.Links.length-1;i>=0;i--){let o=da(r.Links[i],e.subarray(0,n));n-=o,n=Zt(e,n,o)-1,e[n]=18}return e}function ya(r){let t=0;if(r.Hash){let e=r.Hash.length;t+=1+e+vt(e)}if(typeof r.Name=="string"){let e=Pi.encode(r.Name).length;t+=1+e+vt(e)}return typeof r.Tsize=="number"&&(t+=1+vt(r.Tsize)),t}function ma(r){let t=0;if(r.Data){let e=r.Data.length;t+=1+e+vt(e)}if(r.Links)for(let e of r.Links){let n=ya(e);t+=1+n+vt(n)}return t}function Zt(r,t,e){t-=vt(e);let n=t;for(;e>=pa;)r[t++]=e&127|128,e/=128;for(;e>=128;)r[t++]=e&127|128,e>>>=7;return r[t]=e,n}function vt(r){return r%2==0&&r++,Math.floor((ga(r)+6)/7)}function ga(r){let t=0;return r>=ji&&(r=Math.floor(r/ji),t=32),r>=1<<16&&(r>>>=16,t+=16),r>=1<<8&&(r>>>=8,t+=8),t+wa[r]}var wa=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8];Gt();var ba=["Data","Links"],xa=["Hash","Name","Tsize"],fr=new TextEncoder;function Mi(r,t){if(r===t)return 0;let e=r.Name?fr.encode(r.Name):[],n=t.Name?fr.encode(t.Name):[],i=e.length,o=n.length;for(let s=0,c=Math.min(i,o);s<c;++s)if(e[s]!==n[s]){i=e[s],o=n[s];break}return i<o?-1:o<i?1:0}function Hi(r,t){return!Object.keys(r).some(e=>!t.includes(e))}function Vi(r){if(typeof r.asCID=="object"){let e=L.asCID(r);if(!e)throw new TypeError("Invalid DAG-PB form");return{Hash:e}}if(typeof r!="object"||Array.isArray(r))throw new TypeError("Invalid DAG-PB form");let t={};if(r.Hash){let e=L.asCID(r.Hash);try{e||(typeof r.Hash=="string"?e=L.parse(r.Hash):r.Hash instanceof Uint8Array&&(e=L.decode(r.Hash)))}catch(n){throw new TypeError(`Invalid DAG-PB form: ${n.message}`)}e&&(t.Hash=e)}if(!t.Hash)throw new TypeError("Invalid DAG-PB form");return typeof r.Name=="string"&&(t.Name=r.Name),typeof r.Tsize=="number"&&(t.Tsize=r.Tsize),t}function J(r){if((r instanceof Uint8Array||typeof r=="string")&&(r={Data:r}),typeof r!="object"||Array.isArray(r))throw new TypeError("Invalid DAG-PB form");let t={};if(r.Data!==void 0)if(typeof r.Data=="string")t.Data=fr.encode(r.Data);else if(r.Data instanceof Uint8Array)t.Data=r.Data;else throw new TypeError("Invalid DAG-PB form");if(r.Links!==void 0)if(Array.isArray(r.Links))t.Links=r.Links.map(Vi),t.Links.sort(Mi);else throw new TypeError("Invalid DAG-PB form");else t.Links=[];return t}function ur(r){if(!r||typeof r!="object"||Array.isArray(r))throw new TypeError("Invalid DAG-PB form");if(!Hi(r,ba))throw new TypeError("Invalid DAG-PB form (extraneous properties)");if(r.Data!==void 0&&!(r.Data instanceof Uint8Array))throw new TypeError("Invalid DAG-PB form (Data must be a Uint8Array)");if(!Array.isArray(r.Links))throw new TypeError("Invalid DAG-PB form (Links must be an array)");for(let t=0;t<r.Links.length;t++){let e=r.Links[t];if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError("Invalid DAG-PB form (bad link object)");if(!Hi(e,xa))throw new TypeError("Invalid DAG-PB form (extraneous properties on link object)");if(!e.Hash)throw new TypeError("Invalid DAG-PB form (link must have a Hash)");if(e.Hash.asCID!==e.Hash)throw new TypeError("Invalid DAG-PB form (link Hash must be a CID)");if(e.Name!==void 0&&typeof e.Name!="string")throw new TypeError("Invalid DAG-PB form (link Name must be a string)");if(e.Tsize!==void 0&&(typeof e.Tsize!="number"||e.Tsize%1!=0))throw new TypeError("Invalid DAG-PB form (link Tsize must be an integer)");if(t>0&&Mi(e,r.Links[t-1])===-1)throw new TypeError("Invalid DAG-PB form (links must be sorted by Name bytes)")}}function qi(r,t=[]){return J({Data:r,Links:t})}function $i(r,t,e){return Vi({Hash:e,Name:r,Tsize:t})}var _a="dag-pb",Ba=112;function tt(r){ur(r);let t={};return r.Links&&(t.Links=r.Links.map(e=>{let n={};return e.Hash&&(n.Hash=e.Hash.bytes),e.Name!==void 0&&(n.Name=e.Name),e.Tsize!==void 0&&(n.Tsize=e.Tsize),n})),r.Data&&(t.Data=r.Data),Ri(t)}function Aa(r){let t=zi(r),e={};return t.Data&&(e.Data=t.Data),t.Links&&(e.Links=t.Links.map(n=>{let i={};try{i.Hash=L.decode(n.Hash)}catch(o){}if(!i.Hash)throw new Error("Invalid Hash field found in link, expected CID");return n.Name!==void 0&&(i.Name=n.Name),n.Tsize!==void 0&&(i.Tsize=n.Tsize),i})),e}le();var Ea=async(r,t,e)=>{e.codec||(e.codec=wt),e.hasher||(e.hasher=Ct),e.cidVersion===void 0&&(e.cidVersion=1),e.codec===wt&&e.hasher!==Ct&&(e.cidVersion=1);let n=await e.hasher.digest(r),i=L.create(e.cidVersion,e.codec.code,n);return e.onlyHash||await t.put(i,r,{signal:e.signal}),i},et=Ea;var Sa=async(r,t,e)=>{let n=new $({type:"directory",mtime:r.mtime,mode:r.mode}),i=tt(J({Data:n.marshal()})),o=await et(i,t,e),s=r.path;return{cid:o,path:s,unixfs:n,size:i.length}},Gi=Sa;var so=H(Xt());var ao=H(Ue());Ee();var Zi=H(Ji());async function Ca(r,t){return t(await(0,Zi.default)(r))}var Xi=Ca;var Qi=H(ae());function La(r,t,e){return to(r,t,e)}async function to(r,t,e){let n=[];for await(let i of(0,Qi.default)(r,e.maxChildrenPerNode))n.push(await t(i));return n.length>1?to(n,t,e):n[0]}var eo=La;var ro=H(ae());async function Na(r,t,e){let n=new io(e.layerRepeat),i=0,o=1,s=n;for await(let c of(0,ro.default)(r,e.maxChildrenPerNode))s.isFull()&&(s!==n&&n.addChild(await s.reduce(t)),i&&i%e.layerRepeat==0&&o++,s=new hr(o,e.layerRepeat,i),i++),s.append(c);return s&&s!==n&&n.addChild(await s.reduce(t)),n.reduce(t)}var no=Na,hr=class{constructor(t,e,n=0){this.maxDepth=t,this.layerRepeat=e,this.currentDepth=1,this.iteration=n,this.root=this.node=this.parent={children:[],depth:this.currentDepth,maxDepth:t,maxChildren:(this.maxDepth-this.currentDepth)*this.layerRepeat}}isFull(){if(!this.root.data)return!1;if(this.currentDepth<this.maxDepth&&this.node.maxChildren)return this._addNextNodeToParent(this.node),!1;let t=this._findParent(this.node,this.currentDepth);return t?(this._addNextNodeToParent(t),!1):!0}_addNextNodeToParent(t){this.parent=t;let e={children:[],depth:t.depth+1,parent:t,maxDepth:this.maxDepth,maxChildren:Math.floor(t.children.length/this.layerRepeat)*this.layerRepeat};t.children.push(e),this.currentDepth=e.depth,this.node=e}append(t){this.node.data=t}reduce(t){return this._reduce(this.root,t)}async _reduce(t,e){let n=[];return t.children.length&&(n=await Promise.all(t.children.filter(i=>i.data).map(i=>this._reduce(i,e)))),e((t.data||[]).concat(n))}_findParent(t,e){let n=t.parent;if(!(!n||n.depth===0))return n.children.length===n.maxChildren||!n.maxChildren?this._findParent(n,e):n}},io=class extends hr{constructor(t){super(0,t);this.root.depth=0,this.currentDepth=1}addChild(t){this.root.children.push(t)}reduce(t){return t((this.root.data||[]).concat(this.root.children))}};Ee();async function*Ua(r,t,e){for await(let n of r.content)yield async()=>{e.progress(n.length,r.path);let i,o={codec:wt,cidVersion:e.cidVersion,hasher:e.hasher,onlyHash:e.onlyHash};return e.rawLeaves?(o.codec=Ae,o.cidVersion=1):(i=new $({type:e.leafType,data:n}),n=tt({Data:i.marshal(),Links:[]})),{cid:await et(n,t,o),unixfs:i,size:n.length}}}var oo=Ua;var va={flat:Xi,balanced:eo,trickle:no};async function*Oa(r,t,e){let n=-1,i,o;typeof e.bufferImporter=="function"?o=e.bufferImporter:o=oo;for await(let s of(0,ao.default)(o(r,t,e),e.blockWriteConcurrency)){if(n++,n===0){i=s;continue}else n===1&&i&&(yield i,i=null);yield s}i&&(i.single=!0,yield i)}var za=(r,t,e)=>{async function n(i){if(i.length===1&&i[0].single&&e.reduceSingleLeafToSelf){let u=i[0];if(u.cid.code===Qt&&(r.mtime!==void 0||r.mode!==void 0)){let d=await t.get(u.cid);u.unixfs=new $({type:"file",mtime:r.mtime,mode:r.mode,data:d}),d=tt(J({Data:u.unixfs.marshal()})),u.cid=await et(d,t,{...e,codec:wt,hasher:e.hasher,cidVersion:e.cidVersion}),u.size=d.length}return{cid:u.cid,path:r.path,unixfs:u.unixfs,size:u.size}}let o=new $({type:"file",mtime:r.mtime,mode:r.mode}),s=i.filter(u=>u.cid.code===Qt&&u.size||u.unixfs&&!u.unixfs.data&&u.unixfs.fileSize()?!0:Boolean(u.unixfs&&u.unixfs.data&&u.unixfs.data.length)).map(u=>u.cid.code===Qt?(o.addBlockSize(u.size),{Name:"",Tsize:u.size,Hash:u.cid}):(!u.unixfs||!u.unixfs.data?o.addBlockSize(u.unixfs&&u.unixfs.fileSize()||0):o.addBlockSize(u.unixfs.data.length),{Name:"",Tsize:u.size,Hash:u.cid})),c={Data:o.marshal(),Links:s},a=tt(J(c));return{cid:await et(a,t,e),path:r.path,unixfs:o,size:a.length+c.Links.reduce((u,d)=>u+d.Tsize,0)}}return n};function Pa(r,t,e){let n=va[e.strategy];if(!n)throw(0,so.default)(new Error(`Unknown importer build strategy name: ${e.strategy}`),"ERR_BAD_STRATEGY");return n(Oa(r,t,e),za(r,t,e),e)}var co=Pa;var Hr=H(Xt());var ts=H(Br()),es=H(Qo()),kr=H(Xt());async function*k0(r,t){let e,n,i;if(t.minChunkSize&&t.maxChunkSize&&t.avgChunkSize)i=t.avgChunkSize,e=t.minChunkSize,n=t.maxChunkSize;else if(t.avgChunkSize)i=t.avgChunkSize,e=i/3,n=i+i/2;else throw(0,kr.default)(new Error("please specify an average chunk size"),"ERR_INVALID_AVG_CHUNK_SIZE");if(e<16)throw(0,kr.default)(new Error("rabin min must be greater than 16"),"ERR_INVALID_MIN_CHUNK_SIZE");n<e&&(n=e),i<e&&(i=e);let o=Math.floor(Math.log2(i));for await(let s of F0(r,{min:e,max:n,bits:o,window:t.window,polynomial:t.polynomial}))yield s}var rs=k0;async function*F0(r,t){let e=await(0,es.create)(t.bits,t.min,t.max,t.window),n=new ts.default;for await(let i of r){n.append(i);let o=e.fingerprint(i);for(let s=0;s<o.length;s++){let c=o[s],a=n.slice(0,c);n.consume(c),yield a}}n.length&&(yield n.slice(0))}var De=H(Br());async function*D0(r,t){let e=new De.default,n=0,i=!1,o=t.maxChunkSize;for await(let s of r)for(e.append(s),n+=s.length;n>=o;)if(yield e.slice(0,o),i=!0,o===e.length)e=new De.default,n=0;else{let c=new De.default;c.append(e.shallowSlice(o)),e=c,n-=o}(!i||n)&&(yield e.slice(0,n))}var ns=D0;var Mr=H(Xt());Rr();async function*Y0(r){for await(let t of r){if(t.length===void 0)throw(0,Mr.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT");if(typeof t=="string"||t instanceof String)yield jr(t.toString());else if(Array.isArray(t))yield Uint8Array.from(t);else if(t instanceof Uint8Array)yield t;else throw(0,Mr.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT")}}var _s=Y0;function K0(r){return Symbol.iterator in r}function J0(r){return Symbol.asyncIterator in r}function Z0(r){try{if(r instanceof Uint8Array)return async function*(){yield r}();if(K0(r))return async function*(){yield*r}();if(J0(r))return r}catch{throw(0,Hr.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT")}throw(0,Hr.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT")}async function*X0(r,t,e){for await(let n of r)if(n.path&&(n.path.substring(0,2)==="./"&&(e.wrapWithDirectory=!0),n.path=n.path.split("/").filter(i=>i&&i!==".").join("/")),n.content){let i;typeof e.chunker=="function"?i=e.chunker:e.chunker==="rabin"?i=rs:i=ns;let o;typeof e.chunkValidator=="function"?o=e.chunkValidator:o=_s;let s={path:n.path,mtime:n.mtime,mode:n.mode,content:i(o(Z0(n.content),e),e)};yield()=>co(s,t,e)}else if(n.path){let i={path:n.path,mtime:n.mtime,mode:n.mode};yield()=>Gi(i,t,e)}else throw new Error("Import candidate must have content or path or both")}var Bs=X0;var As=class{constructor(t,e){this.options=e||{},this.root=t.root,this.dir=t.dir,this.path=t.path,this.dirty=t.dirty,this.flat=t.flat,this.parent=t.parent,this.parentKey=t.parentKey,this.unixfs=t.unixfs,this.mode=t.mode,this.mtime=t.mtime,this.cid=void 0,this.size=void 0}async put(t,e){}get(t){return Promise.resolve(this)}async*eachChildSeries(){}async*flush(t){}},xt=As;var Es=class extends xt{constructor(t,e){super(t,e);this._children={}}async put(t,e){this.cid=void 0,this.size=void 0,this._children[t]=e}get(t){return Promise.resolve(this._children[t])}childCount(){return Object.keys(this._children).length}directChildrenCount(){return this.childCount()}onlyChild(){return this._children[Object.keys(this._children)[0]]}async*eachChildSeries(){let t=Object.keys(this._children);for(let e=0;e<t.length;e++){let n=t[e];yield{key:n,child:this._children[n]}}}async*flush(t){let e=Object.keys(this._children),n=[];for(let h=0;h<e.length;h++){let u=this._children[e[h]];if(u instanceof xt)for await(let d of u.flush(t))u=d,yield u;u.size!=null&&u.cid&&n.push({Name:e[h],Tsize:u.size,Hash:u.cid})}let i=new $({type:"directory",mtime:this.mtime,mode:this.mode}),o={Data:i.marshal(),Links:n},s=tt(J(o)),c=await et(s,t,this.options),a=s.length+o.Links.reduce((h,u)=>h+(u.Tsize==null?0:u.Tsize),0);this.cid=c,this.size=a,yield{cid:c,unixfs:i,path:this.path,size:a}}},ie=Es;var Ne=H(Ps()),js=class extends xt{constructor(t,e){super(t,e);this._bucket=(0,Ne.createHAMT)({hashFn:e.hamtHashFn,bits:e.hamtBucketBits})}async put(t,e){await this._bucket.put(t,e)}get(t){return this._bucket.get(t)}childCount(){return this._bucket.leafCount()}directChildrenCount(){return this._bucket.childrenCount()}onlyChild(){return this._bucket.onlyChild()}async*eachChildSeries(){for await(let{key:t,value:e}of this._bucket.eachLeafSeries())yield{key:t,child:e}}async*flush(t){for await(let e of Ms(this._bucket,t,this,this.options))yield{...e,path:this.path}}},Rs=js;async function*Ms(r,t,e,n){let i=r._children,o=[],s=0;for(let f=0;f<i.length;f++){let p=i.get(f);if(!p)continue;let g=f.toString(16).toUpperCase().padStart(2,"0");if(p instanceof Ne.Bucket){let C;for await(let m of await Ms(p,t,null,n))C=m;if(!C)throw new Error("Could not flush sharded directory, no subshard found");o.push({Name:g,Tsize:C.size,Hash:C.cid}),s+=C.size}else if(typeof p.value.flush=="function"){let C=p.value,m;for await(let x of C.flush(t))m=x,yield m;let w=g+p.key;o.push({Name:w,Tsize:m.size,Hash:m.cid}),s+=m.size}else{let C=p.value;if(!C.cid)continue;let m=g+p.key,w=C.size;o.push({Name:m,Tsize:w,Hash:C.cid}),s+=w}}let c=Uint8Array.from(i.bitField().reverse()),a=new $({type:"hamt-sharded-directory",data:c,fanout:r.tableSize(),hashType:n.hamtHashCode,mtime:e&&e.mtime,mode:e&&e.mode}),h={Data:a.marshal(),Links:o},u=tt(J(h)),d=await et(u,t,n),E=u.length+s;yield{cid:d,unixfs:a,size:E}}async function Hs(r,t,e,n){let i=t;t instanceof ie&&t.directChildrenCount()>=e&&(i=await gc(t,n));let o=i.parent;if(o){if(i!==t){if(r&&(r.parent=i),!i.parentKey)throw new Error("No parent key found");await o.put(i.parentKey,i)}return Hs(i,o,e,n)}return i}async function gc(r,t){let e=new Rs({root:r.root,dir:!0,parent:r.parent,parentKey:r.parentKey,path:r.path,dirty:r.dirty,flat:!1,mtime:r.mtime,mode:r.mode},t);for await(let{key:n,child:i}of r.eachChildSeries())await e.put(n,i);return e}var Vs=Hs;var wc=(r="")=>(r.trim().match(/([^\\/]|\\\/)+/g)||[]).filter(Boolean),qs=wc;async function bc(r,t,e){let n=qs(r.path||""),i=n.length-1,o=t,s="";for(let c=0;c<n.length;c++){let a=n[c];s+=`${s?"/":""}${a}`;let h=c===i;if(o.dirty=!0,o.cid=void 0,o.size=void 0,h)await o.put(a,r),t=await Vs(null,o,e.shardSplitThreshold,e);else{let u=await o.get(a);(!u||!(u instanceof xt))&&(u=new ie({root:!1,dir:!0,parent:o,parentKey:a,path:s,dirty:!0,flat:!0,mtime:u&&u.unixfs&&u.unixfs.mtime,mode:u&&u.unixfs&&u.unixfs.mode},e)),await o.put(a,u),o=u}}return t}async function*$s(r,t){if(!(r instanceof xt)){r&&r.unixfs&&r.unixfs.isDirectory()&&(yield r);return}yield*r.flush(t)}async function*xc(r,t,e){let n=new ie({root:!0,dir:!0,path:"",dirty:!0,flat:!0},e);for await(let i of r)!i||(n=await bc(i,n,e),(!i.unixfs||!i.unixfs.isDirectory())&&(yield i));if(e.wrapWithDirectory)yield*$s(n,t);else for await(let i of n.eachChildSeries())!i||(yield*$s(i.child,t))}var Gs=xc;async function*_c(r,t,e={}){let n=Dn(e),i;typeof e.dagBuilder=="function"?i=e.dagBuilder:i=Bs;let o;typeof e.treeBuilder=="function"?o=e.treeBuilder:o=Gs;let s;Symbol.asyncIterator in r||Symbol.iterator in r?s=r:s=[r];for await(let c of o((0,Ws.default)(i(s,t,n),n.fileImportConcurrency),t,n))yield{cid:c.cid,path:c.path,unixfs:c.unixfs,size:c.size}}return Bc;})();
|
|
16
|
+
`});var $e=U(()=>{Gt();fe();pt();ue();qt()});var In=k((Wt,ye)=>{(function(r,t){"use strict";var e={version:"3.0.0",x86:{},x64:{},inputValidation:!0};function n(f){if(!Array.isArray(f)&&!ArrayBuffer.isView(f))return!1;for(var p=0;p<f.length;p++)if(!Number.isInteger(f[p])||f[p]<0||f[p]>255)return!1;return!0}function i(f,p){return(f&65535)*p+(((f>>>16)*p&65535)<<16)}function o(f,p){return f<<p|f>>>32-p}function s(f){return f^=f>>>16,f=i(f,2246822507),f^=f>>>13,f=i(f,3266489909),f^=f>>>16,f}function c(f,p){f=[f[0]>>>16,f[0]&65535,f[1]>>>16,f[1]&65535],p=[p[0]>>>16,p[0]&65535,p[1]>>>16,p[1]&65535];var g=[0,0,0,0];return g[3]+=f[3]+p[3],g[2]+=g[3]>>>16,g[3]&=65535,g[2]+=f[2]+p[2],g[1]+=g[2]>>>16,g[2]&=65535,g[1]+=f[1]+p[1],g[0]+=g[1]>>>16,g[1]&=65535,g[0]+=f[0]+p[0],g[0]&=65535,[g[0]<<16|g[1],g[2]<<16|g[3]]}function a(f,p){f=[f[0]>>>16,f[0]&65535,f[1]>>>16,f[1]&65535],p=[p[0]>>>16,p[0]&65535,p[1]>>>16,p[1]&65535];var g=[0,0,0,0];return g[3]+=f[3]*p[3],g[2]+=g[3]>>>16,g[3]&=65535,g[2]+=f[2]*p[3],g[1]+=g[2]>>>16,g[2]&=65535,g[2]+=f[3]*p[2],g[1]+=g[2]>>>16,g[2]&=65535,g[1]+=f[1]*p[3],g[0]+=g[1]>>>16,g[1]&=65535,g[1]+=f[2]*p[2],g[0]+=g[1]>>>16,g[1]&=65535,g[1]+=f[3]*p[1],g[0]+=g[1]>>>16,g[1]&=65535,g[0]+=f[0]*p[3]+f[1]*p[2]+f[2]*p[1]+f[3]*p[0],g[0]&=65535,[g[0]<<16|g[1],g[2]<<16|g[3]]}function h(f,p){return p%=64,p===32?[f[1],f[0]]:p<32?[f[0]<<p|f[1]>>>32-p,f[1]<<p|f[0]>>>32-p]:(p-=32,[f[1]<<p|f[0]>>>32-p,f[0]<<p|f[1]>>>32-p])}function u(f,p){return p%=64,p===0?f:p<32?[f[0]<<p|f[1]>>>32-p,f[1]<<p]:[f[1]<<p-32,0]}function d(f,p){return[f[0]^p[0],f[1]^p[1]]}function E(f){return f=d(f,[0,f[0]>>>1]),f=a(f,[4283543511,3981806797]),f=d(f,[0,f[0]>>>1]),f=a(f,[3301882366,444984403]),f=d(f,[0,f[0]>>>1]),f}e.x86.hash32=function(f,p){if(e.inputValidation&&!n(f))return t;p=p||0;for(var g=f.length%4,C=f.length-g,m=p,w=0,x=3432918353,_=461845907,I=0;I<C;I=I+4)w=f[I]|f[I+1]<<8|f[I+2]<<16|f[I+3]<<24,w=i(w,x),w=o(w,15),w=i(w,_),m^=w,m=o(m,13),m=i(m,5)+3864292196;switch(w=0,g){case 3:w^=f[I+2]<<16;case 2:w^=f[I+1]<<8;case 1:w^=f[I],w=i(w,x),w=o(w,15),w=i(w,_),m^=w}return m^=f.length,m=s(m),m>>>0},e.x86.hash128=function(f,p){if(e.inputValidation&&!n(f))return t;p=p||0;for(var g=f.length%16,C=f.length-g,m=p,w=p,x=p,_=p,I=0,b=0,y=0,B=0,T=597399067,N=2869860233,P=951274213,W=2716044179,F=0;F<C;F=F+16)I=f[F]|f[F+1]<<8|f[F+2]<<16|f[F+3]<<24,b=f[F+4]|f[F+5]<<8|f[F+6]<<16|f[F+7]<<24,y=f[F+8]|f[F+9]<<8|f[F+10]<<16|f[F+11]<<24,B=f[F+12]|f[F+13]<<8|f[F+14]<<16|f[F+15]<<24,I=i(I,T),I=o(I,15),I=i(I,N),m^=I,m=o(m,19),m+=w,m=i(m,5)+1444728091,b=i(b,N),b=o(b,16),b=i(b,P),w^=b,w=o(w,17),w+=x,w=i(w,5)+197830471,y=i(y,P),y=o(y,17),y=i(y,W),x^=y,x=o(x,15),x+=_,x=i(x,5)+2530024501,B=i(B,W),B=o(B,18),B=i(B,T),_^=B,_=o(_,13),_+=m,_=i(_,5)+850148119;switch(I=0,b=0,y=0,B=0,g){case 15:B^=f[F+14]<<16;case 14:B^=f[F+13]<<8;case 13:B^=f[F+12],B=i(B,W),B=o(B,18),B=i(B,T),_^=B;case 12:y^=f[F+11]<<24;case 11:y^=f[F+10]<<16;case 10:y^=f[F+9]<<8;case 9:y^=f[F+8],y=i(y,P),y=o(y,17),y=i(y,W),x^=y;case 8:b^=f[F+7]<<24;case 7:b^=f[F+6]<<16;case 6:b^=f[F+5]<<8;case 5:b^=f[F+4],b=i(b,N),b=o(b,16),b=i(b,P),w^=b;case 4:I^=f[F+3]<<24;case 3:I^=f[F+2]<<16;case 2:I^=f[F+1]<<8;case 1:I^=f[F],I=i(I,T),I=o(I,15),I=i(I,N),m^=I}return m^=f.length,w^=f.length,x^=f.length,_^=f.length,m+=w,m+=x,m+=_,w+=m,x+=m,_+=m,m=s(m),w=s(w),x=s(x),_=s(_),m+=w,m+=x,m+=_,w+=m,x+=m,_+=m,("00000000"+(m>>>0).toString(16)).slice(-8)+("00000000"+(w>>>0).toString(16)).slice(-8)+("00000000"+(x>>>0).toString(16)).slice(-8)+("00000000"+(_>>>0).toString(16)).slice(-8)},e.x64.hash128=function(f,p){if(e.inputValidation&&!n(f))return t;p=p||0;for(var g=f.length%16,C=f.length-g,m=[0,p],w=[0,p],x=[0,0],_=[0,0],I=[2277735313,289559509],b=[1291169091,658871167],y=0;y<C;y=y+16)x=[f[y+4]|f[y+5]<<8|f[y+6]<<16|f[y+7]<<24,f[y]|f[y+1]<<8|f[y+2]<<16|f[y+3]<<24],_=[f[y+12]|f[y+13]<<8|f[y+14]<<16|f[y+15]<<24,f[y+8]|f[y+9]<<8|f[y+10]<<16|f[y+11]<<24],x=a(x,I),x=h(x,31),x=a(x,b),m=d(m,x),m=h(m,27),m=c(m,w),m=c(a(m,[0,5]),[0,1390208809]),_=a(_,b),_=h(_,33),_=a(_,I),w=d(w,_),w=h(w,31),w=c(w,m),w=c(a(w,[0,5]),[0,944331445]);switch(x=[0,0],_=[0,0],g){case 15:_=d(_,u([0,f[y+14]],48));case 14:_=d(_,u([0,f[y+13]],40));case 13:_=d(_,u([0,f[y+12]],32));case 12:_=d(_,u([0,f[y+11]],24));case 11:_=d(_,u([0,f[y+10]],16));case 10:_=d(_,u([0,f[y+9]],8));case 9:_=d(_,[0,f[y+8]]),_=a(_,b),_=h(_,33),_=a(_,I),w=d(w,_);case 8:x=d(x,u([0,f[y+7]],56));case 7:x=d(x,u([0,f[y+6]],48));case 6:x=d(x,u([0,f[y+5]],40));case 5:x=d(x,u([0,f[y+4]],32));case 4:x=d(x,u([0,f[y+3]],24));case 3:x=d(x,u([0,f[y+2]],16));case 2:x=d(x,u([0,f[y+1]],8));case 1:x=d(x,[0,f[y]]),x=a(x,I),x=h(x,31),x=a(x,b),m=d(m,x)}return m=d(m,[0,f.length]),w=d(w,[0,f.length]),m=c(m,w),w=c(w,m),m=E(m),w=E(w),m=c(m,w),w=c(w,m),("00000000"+(m[0]>>>0).toString(16)).slice(-8)+("00000000"+(m[1]>>>0).toString(16)).slice(-8)+("00000000"+(w[0]>>>0).toString(16)).slice(-8)+("00000000"+(w[1]>>>0).toString(16)).slice(-8)},typeof Wt!="undefined"?(typeof ye!="undefined"&&ye.exports&&(Wt=ye.exports=e),Wt.murmurHash3=e):typeof define=="function"&&define.amd?define([],function(){return e}):(e._murmurHash3=r.murmurHash3,e.noConflict=function(){return r.murmurHash3=e._murmurHash3,e._murmurHash3=t,e.noConflict=t,e},r.murmurHash3=e)})(Wt)});var kn=k((Yc,Tn)=>{Tn.exports=In()});var Nn=k((nf,Ln)=>{"use strict";function Cn(r,t){for(let e in t)Object.defineProperty(r,e,{value:t[e],enumerable:!0,configurable:!0});return r}function ta(r,t,e){if(!r||typeof r=="string")throw new TypeError("Please pass an Error to err-code");e||(e={}),typeof t=="object"&&(e=t,t=""),t&&(e.code=t);try{return Cn(r,e)}catch(n){e.message=r.message,e.stack=r.stack;let i=function(){};return i.prototype=Object.create(Object.getPrototypeOf(r)),Cn(new i,e)}}Ln.exports=ta});var vn=k((of,Un)=>{"use strict";Un.exports=ea;function ea(r,t){for(var e=new Array(arguments.length-1),n=0,i=2,o=!0;i<arguments.length;)e[n++]=arguments[i++];return new Promise(function(c,a){e[n]=function(u){if(o)if(o=!1,u)a(u);else{for(var d=new Array(arguments.length-1),E=0;E<d.length;)d[E++]=arguments[E];c.apply(null,d)}};try{r.apply(t||null,e)}catch(h){o&&(o=!1,a(h))}})}});var jn=k(Pn=>{"use strict";var me=Pn;me.length=function(t){var e=t.length;if(!e)return 0;for(var n=0;--e%4>1&&t.charAt(e)==="=";)++n;return Math.ceil(t.length*3)/4-n};var Nt=new Array(64),On=new Array(123);for(X=0;X<64;)On[Nt[X]=X<26?X+65:X<52?X+71:X<62?X-4:X-59|43]=X++;var X;me.encode=function(t,e,n){for(var i=null,o=[],s=0,c=0,a;e<n;){var h=t[e++];switch(c){case 0:o[s++]=Nt[h>>2],a=(h&3)<<4,c=1;break;case 1:o[s++]=Nt[a|h>>4],a=(h&15)<<2,c=2;break;case 2:o[s++]=Nt[a|h>>6],o[s++]=Nt[h&63],c=0;break}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),s=0)}return c&&(o[s++]=Nt[a],o[s++]=61,c===1&&(o[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,o.slice(0,s))),i.join("")):String.fromCharCode.apply(String,o.slice(0,s))};var zn="invalid encoding";me.decode=function(t,e,n){for(var i=n,o=0,s,c=0;c<t.length;){var a=t.charCodeAt(c++);if(a===61&&o>1)break;if((a=On[a])===void 0)throw Error(zn);switch(o){case 0:s=a,o=1;break;case 1:e[n++]=s<<2|(a&48)>>4,s=a,o=2;break;case 2:e[n++]=(s&15)<<4|(a&60)>>2,s=a,o=3;break;case 3:e[n++]=(s&3)<<6|a,o=0;break}}if(o===1)throw Error(zn);return n-i};me.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var Mn=k((af,Rn)=>{"use strict";Rn.exports=ge;function ge(){this._listeners={}}ge.prototype.on=function(t,e,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:n||this}),this};ge.prototype.off=function(t,e){if(t===void 0)this._listeners={};else if(e===void 0)this._listeners[t]=[];else for(var n=this._listeners[t],i=0;i<n.length;)n[i].fn===e?n.splice(i,1):++i;return this};ge.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var n=[],i=1;i<arguments.length;)n.push(arguments[i++]);for(i=0;i<e.length;)e[i].fn.apply(e[i++].ctx,n)}return this}});var Yn=k((cf,Wn)=>{"use strict";Wn.exports=Hn(Hn);function Hn(r){return typeof Float32Array!="undefined"?function(){var t=new Float32Array([-0]),e=new Uint8Array(t.buffer),n=e[3]===128;function i(a,h,u){t[0]=a,h[u]=e[0],h[u+1]=e[1],h[u+2]=e[2],h[u+3]=e[3]}function o(a,h,u){t[0]=a,h[u]=e[3],h[u+1]=e[2],h[u+2]=e[1],h[u+3]=e[0]}r.writeFloatLE=n?i:o,r.writeFloatBE=n?o:i;function s(a,h){return e[0]=a[h],e[1]=a[h+1],e[2]=a[h+2],e[3]=a[h+3],t[0]}function c(a,h){return e[3]=a[h],e[2]=a[h+1],e[1]=a[h+2],e[0]=a[h+3],t[0]}r.readFloatLE=n?s:c,r.readFloatBE=n?c:s}():function(){function t(n,i,o,s){var c=i<0?1:0;if(c&&(i=-i),i===0)n(1/i>0?0:2147483648,o,s);else if(isNaN(i))n(2143289344,o,s);else if(i>34028234663852886e22)n((c<<31|2139095040)>>>0,o,s);else if(i<11754943508222875e-54)n((c<<31|Math.round(i/1401298464324817e-60))>>>0,o,s);else{var a=Math.floor(Math.log(i)/Math.LN2),h=Math.round(i*Math.pow(2,-a)*8388608)&8388607;n((c<<31|a+127<<23|h)>>>0,o,s)}}r.writeFloatLE=t.bind(null,Vn),r.writeFloatBE=t.bind(null,qn);function e(n,i,o){var s=n(i,o),c=(s>>31)*2+1,a=s>>>23&255,h=s&8388607;return a===255?h?NaN:c*(1/0):a===0?c*1401298464324817e-60*h:c*Math.pow(2,a-150)*(h+8388608)}r.readFloatLE=e.bind(null,$n),r.readFloatBE=e.bind(null,Gn)}(),typeof Float64Array!="undefined"?function(){var t=new Float64Array([-0]),e=new Uint8Array(t.buffer),n=e[7]===128;function i(a,h,u){t[0]=a,h[u]=e[0],h[u+1]=e[1],h[u+2]=e[2],h[u+3]=e[3],h[u+4]=e[4],h[u+5]=e[5],h[u+6]=e[6],h[u+7]=e[7]}function o(a,h,u){t[0]=a,h[u]=e[7],h[u+1]=e[6],h[u+2]=e[5],h[u+3]=e[4],h[u+4]=e[3],h[u+5]=e[2],h[u+6]=e[1],h[u+7]=e[0]}r.writeDoubleLE=n?i:o,r.writeDoubleBE=n?o:i;function s(a,h){return e[0]=a[h],e[1]=a[h+1],e[2]=a[h+2],e[3]=a[h+3],e[4]=a[h+4],e[5]=a[h+5],e[6]=a[h+6],e[7]=a[h+7],t[0]}function c(a,h){return e[7]=a[h],e[6]=a[h+1],e[5]=a[h+2],e[4]=a[h+3],e[3]=a[h+4],e[2]=a[h+5],e[1]=a[h+6],e[0]=a[h+7],t[0]}r.readDoubleLE=n?s:c,r.readDoubleBE=n?c:s}():function(){function t(n,i,o,s,c,a){var h=s<0?1:0;if(h&&(s=-s),s===0)n(0,c,a+i),n(1/s>0?0:2147483648,c,a+o);else if(isNaN(s))n(0,c,a+i),n(2146959360,c,a+o);else if(s>17976931348623157e292)n(0,c,a+i),n((h<<31|2146435072)>>>0,c,a+o);else{var u;if(s<22250738585072014e-324)u=s/5e-324,n(u>>>0,c,a+i),n((h<<31|u/4294967296)>>>0,c,a+o);else{var d=Math.floor(Math.log(s)/Math.LN2);d===1024&&(d=1023),u=s*Math.pow(2,-d),n(u*4503599627370496>>>0,c,a+i),n((h<<31|d+1023<<20|u*1048576&1048575)>>>0,c,a+o)}}}r.writeDoubleLE=t.bind(null,Vn,0,4),r.writeDoubleBE=t.bind(null,qn,4,0);function e(n,i,o,s,c){var a=n(s,c+i),h=n(s,c+o),u=(h>>31)*2+1,d=h>>>20&2047,E=4294967296*(h&1048575)+a;return d===2047?E?NaN:u*(1/0):d===0?u*5e-324*E:u*Math.pow(2,d-1075)*(E+4503599627370496)}r.readDoubleLE=e.bind(null,$n,0,4),r.readDoubleBE=e.bind(null,Gn,4,0)}(),r}function Vn(r,t,e){t[e]=r&255,t[e+1]=r>>>8&255,t[e+2]=r>>>16&255,t[e+3]=r>>>24}function qn(r,t,e){t[e]=r>>>24,t[e+1]=r>>>16&255,t[e+2]=r>>>8&255,t[e+3]=r&255}function $n(r,t){return(r[t]|r[t+1]<<8|r[t+2]<<16|r[t+3]<<24)>>>0}function Gn(r,t){return(r[t]<<24|r[t+1]<<16|r[t+2]<<8|r[t+3])>>>0}});var Kn=k((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(r){}return null}});var Zn=k(Jn=>{"use strict";var We=Jn;We.length=function(t){for(var e=0,n=0,i=0;i<t.length;++i)n=t.charCodeAt(i),n<128?e+=1:n<2048?e+=2:(n&64512)==55296&&(t.charCodeAt(i+1)&64512)==56320?(++i,e+=4):e+=3;return e};We.read=function(t,e,n){var i=n-e;if(i<1)return"";for(var o=null,s=[],c=0,a;e<n;)a=t[e++],a<128?s[c++]=a:a>191&&a<224?s[c++]=(a&31)<<6|t[e++]&63:a>239&&a<365?(a=((a&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,s[c++]=55296+(a>>10),s[c++]=56320+(a&1023)):s[c++]=(a&15)<<12|(t[e++]&63)<<6|t[e++]&63,c>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),c=0);return o?(c&&o.push(String.fromCharCode.apply(String,s.slice(0,c))),o.join("")):String.fromCharCode.apply(String,s.slice(0,c))};We.write=function(t,e,n){for(var i=n,o,s,c=0;c<t.length;++c)o=t.charCodeAt(c),o<128?e[n++]=o:o<2048?(e[n++]=o>>6|192,e[n++]=o&63|128):(o&64512)==55296&&((s=t.charCodeAt(c+1))&64512)==56320?(o=65536+((o&1023)<<10)+(s&1023),++c,e[n++]=o>>18|240,e[n++]=o>>12&63|128,e[n++]=o>>6&63|128,e[n++]=o&63|128):(e[n++]=o>>12|224,e[n++]=o>>6&63|128,e[n++]=o&63|128);return n-i}});var Qn=k((uf,Xn)=>{"use strict";Xn.exports=ra;function ra(r,t,e){var n=e||8192,i=n>>>1,o=null,s=n;return function(a){if(a<1||a>i)return r(a);s+a>n&&(o=r(n),s=0);var h=t.call(o,s,s+=a);return s&7&&(s=(s|7)+1),h}}});var ei=k((hf,ti)=>{"use strict";ti.exports=j;var Yt=mt();function j(r,t){this.lo=r>>>0,this.hi=t>>>0}var Bt=j.zero=new j(0,0);Bt.toNumber=function(){return 0};Bt.zzEncode=Bt.zzDecode=function(){return this};Bt.length=function(){return 1};var na=j.zeroHash="\0\0\0\0\0\0\0\0";j.fromNumber=function(t){if(t===0)return Bt;var e=t<0;e&&(t=-t);var n=t>>>0,i=(t-n)/4294967296>>>0;return e&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new j(n,i)};j.from=function(t){if(typeof t=="number")return j.fromNumber(t);if(Yt.isString(t))if(Yt.Long)t=Yt.Long.fromString(t);else return j.fromNumber(parseInt(t,10));return t.low||t.high?new j(t.low>>>0,t.high>>>0):Bt};j.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,n=~this.hi>>>0;return e||(n=n+1>>>0),-(e+n*4294967296)}return this.lo+this.hi*4294967296};j.prototype.toLong=function(t){return Yt.Long?new Yt.Long(this.lo|0,this.hi|0,Boolean(t)):{low:this.lo|0,high:this.hi|0,unsigned:Boolean(t)}};var yt=String.prototype.charCodeAt;j.fromHash=function(t){return t===na?Bt:new j((yt.call(t,0)|yt.call(t,1)<<8|yt.call(t,2)<<16|yt.call(t,3)<<24)>>>0,(yt.call(t,4)|yt.call(t,5)<<8|yt.call(t,6)<<16|yt.call(t,7)<<24)>>>0)};j.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};j.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};j.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};j.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?e===0?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}});var mt=k(Ye=>{"use strict";var A=Ye;A.asPromise=vn();A.base64=jn();A.EventEmitter=Mn();A.float=Yn();A.inquire=Kn();A.utf8=Zn();A.pool=Qn();A.LongBits=ei();A.isNode=Boolean(typeof globalThis!="undefined"&&globalThis&&globalThis.process&&globalThis.process.versions&&globalThis.process.versions.node);A.global=A.isNode&&globalThis||typeof window!="undefined"&&window||typeof self!="undefined"&&self||Ye;A.emptyArray=Object.freeze?Object.freeze([]):[];A.emptyObject=Object.freeze?Object.freeze({}):{};A.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};A.isString=function(t){return typeof t=="string"||t instanceof String};A.isObject=function(t){return t&&typeof t=="object"};A.isset=A.isSet=function(t,e){var n=t[e];return n!=null&&t.hasOwnProperty(e)?typeof n!="object"||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1};A.Buffer=function(){try{var r=A.inquire("buffer").Buffer;return r.prototype.utf8Write?r:null}catch(t){return null}}();A._Buffer_from=null;A._Buffer_allocUnsafe=null;A.newBuffer=function(t){return typeof t=="number"?A.Buffer?A._Buffer_allocUnsafe(t):new A.Array(t):A.Buffer?A._Buffer_from(t):typeof Uint8Array=="undefined"?t:new Uint8Array(t)};A.Array=typeof Uint8Array!="undefined"?Uint8Array:Array;A.Long=A.global.dcodeIO&&A.global.dcodeIO.Long||A.global.Long||A.inquire("long");A.key2Re=/^true|false|0|1$/;A.key32Re=/^-?(?:0|[1-9][0-9]*)$/;A.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;A.longToHash=function(t){return t?A.LongBits.from(t).toHash():A.LongBits.zeroHash};A.longFromHash=function(t,e){var n=A.LongBits.fromHash(t);return A.Long?A.Long.fromBits(n.lo,n.hi,e):n.toNumber(Boolean(e))};function ri(r,t,e){for(var n=Object.keys(t),i=0;i<n.length;++i)(r[n[i]]===void 0||!e)&&(r[n[i]]=t[n[i]]);return r}A.merge=ri;A.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)};function ni(r){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:new Error().stack||""}),n&&ri(this,n)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return r}}),t.prototype.toString=function(){return this.name+": "+this.message},t}A.newError=ni;A.ProtocolError=ni("ProtocolError");A.oneOfGetter=function(t){for(var e={},n=0;n<t.length;++n)e[t[n]]=1;return function(){for(var i=Object.keys(this),o=i.length-1;o>-1;--o)if(e[i[o]]===1&&this[i[o]]!==void 0&&this[i[o]]!==null)return i[o]}};A.oneOfSetter=function(t){return function(e){for(var n=0;n<t.length;++n)t[n]!==e&&delete this[t[n]]}};A.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};A._configure=function(){var r=A.Buffer;if(!r){A._Buffer_from=A._Buffer_allocUnsafe=null;return}A._Buffer_from=r.from!==Uint8Array.from&&r.from||function(e,n){return new r(e,n)},A._Buffer_allocUnsafe=r.allocUnsafe||function(e){return new r(e)}}});var er=k((pf,ai)=>{"use strict";ai.exports=D;var K=mt(),Ke,we=K.LongBits,ii=K.base64,oi=K.utf8;function Kt(r,t,e){this.fn=r,this.len=t,this.next=void 0,this.val=e}function Je(){}function ia(r){this.head=r.head,this.tail=r.tail,this.len=r.len,this.next=r.states}function D(){this.len=0,this.head=new Kt(Je,0,0),this.tail=this.head,this.states=null}var si=function(){return K.Buffer?function(){return(D.create=function(){return new Ke})()}:function(){return new D}};D.create=si();D.alloc=function(t){return new K.Array(t)};K.Array!==Array&&(D.alloc=K.pool(D.alloc,K.Array.prototype.subarray));D.prototype._push=function(t,e,n){return this.tail=this.tail.next=new Kt(t,e,n),this.len+=e,this};function Ze(r,t,e){t[e]=r&255}function oa(r,t,e){for(;r>127;)t[e++]=r&127|128,r>>>=7;t[e]=r}function Xe(r,t){this.len=r,this.next=void 0,this.val=t}Xe.prototype=Object.create(Kt.prototype);Xe.prototype.fn=oa;D.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new Xe((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};D.prototype.int32=function(t){return t<0?this._push(Qe,10,we.fromNumber(t)):this.uint32(t)};D.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function Qe(r,t,e){for(;r.hi;)t[e++]=r.lo&127|128,r.lo=(r.lo>>>7|r.hi<<25)>>>0,r.hi>>>=7;for(;r.lo>127;)t[e++]=r.lo&127|128,r.lo=r.lo>>>7;t[e++]=r.lo}D.prototype.uint64=function(t){var e=we.from(t);return this._push(Qe,e.length(),e)};D.prototype.int64=D.prototype.uint64;D.prototype.sint64=function(t){var e=we.from(t).zzEncode();return this._push(Qe,e.length(),e)};D.prototype.bool=function(t){return this._push(Ze,1,t?1:0)};function tr(r,t,e){t[e]=r&255,t[e+1]=r>>>8&255,t[e+2]=r>>>16&255,t[e+3]=r>>>24}D.prototype.fixed32=function(t){return this._push(tr,4,t>>>0)};D.prototype.sfixed32=D.prototype.fixed32;D.prototype.fixed64=function(t){var e=we.from(t);return this._push(tr,4,e.lo)._push(tr,4,e.hi)};D.prototype.sfixed64=D.prototype.fixed64;D.prototype.float=function(t){return this._push(K.float.writeFloatLE,4,t)};D.prototype.double=function(t){return this._push(K.float.writeDoubleLE,8,t)};var sa=K.Array.prototype.set?function(t,e,n){e.set(t,n)}:function(t,e,n){for(var i=0;i<t.length;++i)e[n+i]=t[i]};D.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(Ze,1,0);if(K.isString(t)){var n=D.alloc(e=ii.length(t));ii.decode(t,n,0),t=n}return this.uint32(e)._push(sa,e,t)};D.prototype.string=function(t){var e=oi.length(t);return e?this.uint32(e)._push(oi.write,e,t):this._push(Ze,1,0)};D.prototype.fork=function(){return this.states=new ia(this),this.head=this.tail=new Kt(Je,0,0),this.len=0,this};D.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Kt(Je,0,0),this.len=0),this};D.prototype.ldelim=function(){var t=this.head,e=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=e,this.len+=n),this};D.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,e,n),n+=t.len,t=t.next;return e};D._configure=function(r){Ke=r,D.create=si(),Ke._configure()}});var ui=k((df,fi)=>{"use strict";fi.exports=st;var ci=er();(st.prototype=Object.create(ci.prototype)).constructor=st;var gt=mt();function st(){ci.call(this)}st._configure=function(){st.alloc=gt._Buffer_allocUnsafe,st.writeBytesBuffer=gt.Buffer&>.Buffer.prototype instanceof Uint8Array&>.Buffer.prototype.set.name==="set"?function(t,e,n){e.set(t,n)}:function(t,e,n){if(t.copy)t.copy(e,n,0,t.length);else for(var i=0;i<t.length;)e[n++]=t[i++]}};st.prototype.bytes=function(t){gt.isString(t)&&(t=gt._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(st.writeBytesBuffer,e,t),this};function aa(r,t,e){r.length<40?gt.utf8.write(r,t,e):t.utf8Write?t.utf8Write(r,e):t.write(r,e)}st.prototype.string=function(t){var e=gt.Buffer.byteLength(t);return this.uint32(e),e&&this._push(aa,e,t),this};st._configure()});var ir=k((yf,yi)=>{"use strict";yi.exports=z;var at=mt(),rr,hi=at.LongBits,ca=at.utf8;function Q(r,t){return RangeError("index out of range: "+r.pos+" + "+(t||1)+" > "+r.len)}function z(r){this.buf=r,this.pos=0,this.len=r.length}var li=typeof Uint8Array!="undefined"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new z(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new z(t);throw Error("illegal buffer")},pi=function(){return at.Buffer?function(e){return(z.create=function(i){return at.Buffer.isBuffer(i)?new rr(i):li(i)})(e)}:li};z.create=pi();z.prototype._slice=at.Array.prototype.subarray||at.Array.prototype.slice;z.prototype.uint32=function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,Q(this,10);return t}}();z.prototype.int32=function(){return this.uint32()|0};z.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function nr(){var r=new hi(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(r.lo=(r.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return r;if(r.lo=(r.lo|(this.buf[this.pos]&127)<<28)>>>0,r.hi=(r.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return r;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw Q(this);if(r.lo=(r.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return r}return r.lo=(r.lo|(this.buf[this.pos++]&127)<<t*7)>>>0,r}if(this.len-this.pos>4){for(;t<5;++t)if(r.hi=(r.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return r}else for(;t<5;++t){if(this.pos>=this.len)throw Q(this);if(r.hi=(r.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return r}throw Error("invalid varint encoding")}z.prototype.bool=function(){return this.uint32()!==0};function be(r,t){return(r[t-4]|r[t-3]<<8|r[t-2]<<16|r[t-1]<<24)>>>0}z.prototype.fixed32=function(){if(this.pos+4>this.len)throw Q(this,4);return be(this.buf,this.pos+=4)};z.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Q(this,4);return be(this.buf,this.pos+=4)|0};function di(){if(this.pos+8>this.len)throw Q(this,8);return new hi(be(this.buf,this.pos+=4),be(this.buf,this.pos+=4))}z.prototype.float=function(){if(this.pos+4>this.len)throw Q(this,4);var t=at.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};z.prototype.double=function(){if(this.pos+8>this.len)throw Q(this,4);var t=at.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};z.prototype.bytes=function(){var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw Q(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,n):e===n?new this.buf.constructor(0):this._slice.call(this.buf,e,n)};z.prototype.string=function(){var t=this.bytes();return ca.read(t,0,t.length)};z.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw Q(this,t);this.pos+=t}else do if(this.pos>=this.len)throw Q(this);while(this.buf[this.pos++]&128);return this};z.prototype.skipType=function(r){switch(r){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(r=this.uint32()&7)!=4;)this.skipType(r);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+r+" at offset "+this.pos)}return this};z._configure=function(r){rr=r,z.create=pi(),rr._configure();var t=at.Long?"toLong":"toNumber";at.merge(z.prototype,{int64:function(){return nr.call(this)[t](!1)},uint64:function(){return nr.call(this)[t](!0)},sint64:function(){return nr.call(this).zzDecode()[t](!1)},fixed64:function(){return di.call(this)[t](!0)},sfixed64:function(){return di.call(this)[t](!1)}})}});var bi=k((mf,wi)=>{"use strict";wi.exports=At;var mi=ir();(At.prototype=Object.create(mi.prototype)).constructor=At;var gi=mt();function At(r){mi.call(this,r)}At._configure=function(){gi.Buffer&&(At.prototype._slice=gi.Buffer.prototype.slice)};At.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};At._configure()});var _i=k((gf,xi)=>{"use strict";xi.exports=Jt;var or=mt();(Jt.prototype=Object.create(or.EventEmitter.prototype)).constructor=Jt;function Jt(r,t,e){if(typeof r!="function")throw TypeError("rpcImpl must be a function");or.EventEmitter.call(this),this.rpcImpl=r,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(e)}Jt.prototype.rpcCall=function r(t,e,n,i,o){if(!i)throw TypeError("request must be specified");var s=this;if(!o)return or.asPromise(r,s,t,e,n,i);if(!s.rpcImpl){setTimeout(function(){o(Error("already ended"))},0);return}try{return s.rpcImpl(t,e[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(a,h){if(a)return s.emit("error",a,t),o(a);if(h===null){s.end(!0);return}if(!(h instanceof n))try{h=n[s.responseDelimited?"decodeDelimited":"decode"](h)}catch(u){return s.emit("error",u,t),o(u)}return s.emit("data",h,t),o(null,h)})}catch(c){s.emit("error",c,t),setTimeout(function(){o(c)},0);return}};Jt.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var Ai=k(Bi=>{"use strict";var fa=Bi;fa.Service=_i()});var Si=k((bf,Ei)=>{"use strict";Ei.exports={}});var ki=k(Ti=>{"use strict";var q=Ti;q.build="minimal";q.Writer=er();q.BufferWriter=ui();q.Reader=ir();q.BufferReader=bi();q.util=mt();q.rpc=Ai();q.roots=Si();q.configure=Ii;function Ii(){q.util._configure(),q.Writer._configure(q.BufferWriter),q.Reader._configure(q.BufferReader)}Ii()});var Di=k((_f,Fi)=>{"use strict";Fi.exports=ki()});var Xt=k((Hf,Yi)=>{"use strict";function Wi(r,t){for(let e in t)Object.defineProperty(r,e,{value:t[e],enumerable:!0,configurable:!0});return r}function Ia(r,t,e){if(!r||typeof r=="string")throw new TypeError("Please pass an Error to err-code");e||(e={}),typeof t=="object"&&(e=t,t=""),t&&(e.code=t);try{return Wi(r,e)}catch(n){e.message=r.message,e.stack=r.stack;let i=function(){};return i.prototype=Object.create(Object.getPrototypeOf(r)),Wi(new i,e)}}Yi.exports=Ia});var Ae={};M(Ae,{code:()=>Be,decode:()=>Fa,encode:()=>ka,name:()=>Ta});var Ta,Be,ka,Fa,Ee=U(()=>{pt();Ta="raw",Be=85,ka=r=>Y(r),Fa=r=>Y(r)});var Ji=k((qf,Ki)=>{"use strict";var Da=async r=>{let t=[];for await(let e of r)t.push(e);return t};Ki.exports=Da});var ho=k(Se=>{"use strict";Se.byteLength=Ra;Se.toByteArray=Ha;Se.fromByteArray=$a;var ct=[],Z=[],ja=typeof Uint8Array!="undefined"?Uint8Array:Array,lr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Et=0,fo=lr.length;Et<fo;++Et)ct[Et]=lr[Et],Z[lr.charCodeAt(Et)]=Et;var Et,fo;Z["-".charCodeAt(0)]=62;Z["_".charCodeAt(0)]=63;function uo(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");e===-1&&(e=t);var n=e===t?0:4-e%4;return[e,n]}function Ra(r){var t=uo(r),e=t[0],n=t[1];return(e+n)*3/4-n}function Ma(r,t,e){return(t+e)*3/4-e}function Ha(r){var t,e=uo(r),n=e[0],i=e[1],o=new ja(Ma(r,n,i)),s=0,c=i>0?n-4:n,a;for(a=0;a<c;a+=4)t=Z[r.charCodeAt(a)]<<18|Z[r.charCodeAt(a+1)]<<12|Z[r.charCodeAt(a+2)]<<6|Z[r.charCodeAt(a+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return i===2&&(t=Z[r.charCodeAt(a)]<<2|Z[r.charCodeAt(a+1)]>>4,o[s++]=t&255),i===1&&(t=Z[r.charCodeAt(a)]<<10|Z[r.charCodeAt(a+1)]<<4|Z[r.charCodeAt(a+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function Va(r){return ct[r>>18&63]+ct[r>>12&63]+ct[r>>6&63]+ct[r&63]}function qa(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16&16711680)+(r[o+1]<<8&65280)+(r[o+2]&255),i.push(Va(n));return i.join("")}function $a(r){for(var t,e=r.length,n=e%3,i=[],o=16383,s=0,c=e-n;s<c;s+=o)i.push(qa(r,s,s+o>c?c:s+o));return n===1?(t=r[e-1],i.push(ct[t>>2]+ct[t<<4&63]+"==")):n===2&&(t=(r[e-2]<<8)+r[e-1],i.push(ct[t>>10]+ct[t>>4&63]+ct[t<<2&63]+"=")),i.join("")}});var lo=k(pr=>{pr.read=function(r,t,e,n,i){var o,s,c=i*8-n-1,a=(1<<c)-1,h=a>>1,u=-7,d=e?i-1:0,E=e?-1:1,f=r[t+d];for(d+=E,o=f&(1<<-u)-1,f>>=-u,u+=c;u>0;o=o*256+r[t+d],d+=E,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=s*256+r[t+d],d+=E,u-=8);if(o===0)o=1-h;else{if(o===a)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-h}return(f?-1:1)*s*Math.pow(2,o-n)};pr.write=function(r,t,e,n,i,o){var s,c,a,h=o*8-i-1,u=(1<<h)-1,d=u>>1,E=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-s))<1&&(s--,a*=2),s+d>=1?t+=E/a:t+=E*Math.pow(2,1-d),t*a>=2&&(s++,a/=2),s+d>=u?(c=0,s=u):s+d>=1?(c=(t*a-1)*Math.pow(2,i),s=s+d):(c=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;r[e+f]=c&255,f+=p,c/=256,i-=8);for(s=s<<i|c,h+=i;h>0;r[e+f]=s&255,f+=p,s/=256,h-=8);r[e+f-p]|=g*128}});var Do=k(jt=>{"use strict";var dr=ho(),Ot=lo(),po=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;jt.Buffer=l;jt.SlowBuffer=Za;jt.INSPECT_MAX_BYTES=50;var Ie=2147483647;jt.kMaxLength=Ie;l.TYPED_ARRAY_SUPPORT=Ga();!l.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&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.");function Ga(){try{let r=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(r,t),r.foo()===42}catch(r){return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(!!l.isBuffer(this))return this.buffer}});Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(!!l.isBuffer(this))return this.byteOffset}});function lt(r){if(r>Ie)throw new RangeError('The value "'+r+'" is invalid for option "size"');let t=new Uint8Array(r);return Object.setPrototypeOf(t,l.prototype),t}function l(r,t,e){if(typeof r=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return yr(r)}return yo(r,t,e)}l.poolSize=8192;function yo(r,t,e){if(typeof r=="string")return Ya(r,t);if(ArrayBuffer.isView(r))return Ka(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(ft(r,ArrayBuffer)||r&&ft(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ft(r,SharedArrayBuffer)||r&&ft(r.buffer,SharedArrayBuffer)))return gr(r,t,e);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=r.valueOf&&r.valueOf();if(n!=null&&n!==r)return l.from(n,t,e);let i=Ja(r);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return l.from(r[Symbol.toPrimitive]("string"),t,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}l.from=function(r,t,e){return yo(r,t,e)};Object.setPrototypeOf(l.prototype,Uint8Array.prototype);Object.setPrototypeOf(l,Uint8Array);function mo(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function Wa(r,t,e){return mo(r),r<=0?lt(r):t!==void 0?typeof e=="string"?lt(r).fill(t,e):lt(r).fill(t):lt(r)}l.alloc=function(r,t,e){return Wa(r,t,e)};function yr(r){return mo(r),lt(r<0?0:wr(r)|0)}l.allocUnsafe=function(r){return yr(r)};l.allocUnsafeSlow=function(r){return yr(r)};function Ya(r,t){if((typeof t!="string"||t==="")&&(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let e=go(r,t)|0,n=lt(e),i=n.write(r,t);return i!==e&&(n=n.slice(0,i)),n}function mr(r){let t=r.length<0?0:wr(r.length)|0,e=lt(t);for(let n=0;n<t;n+=1)e[n]=r[n]&255;return e}function Ka(r){if(ft(r,Uint8Array)){let t=new Uint8Array(r);return gr(t.buffer,t.byteOffset,t.byteLength)}return mr(r)}function gr(r,t,e){if(t<0||r.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<t+(e||0))throw new RangeError('"length" is outside of buffer bounds');let n;return t===void 0&&e===void 0?n=new Uint8Array(r):e===void 0?n=new Uint8Array(r,t):n=new Uint8Array(r,t,e),Object.setPrototypeOf(n,l.prototype),n}function Ja(r){if(l.isBuffer(r)){let t=wr(r.length)|0,e=lt(t);return e.length===0||r.copy(e,0,0,t),e}if(r.length!==void 0)return typeof r.length!="number"||_r(r.length)?lt(0):mr(r);if(r.type==="Buffer"&&Array.isArray(r.data))return mr(r.data)}function wr(r){if(r>=Ie)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ie.toString(16)+" bytes");return r|0}function Za(r){return+r!=r&&(r=0),l.alloc(+r)}l.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==l.prototype};l.compare=function(t,e){if(ft(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),ft(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,i=e.length;for(let o=0,s=Math.min(n,i);o<s;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};l.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return l.alloc(0);let n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;let i=l.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){let s=t[n];if(ft(s,Uint8Array))o+s.length>i.length?(l.isBuffer(s)||(s=l.from(s)),s.copy(i,o)):Uint8Array.prototype.set.call(i,s,o);else if(l.isBuffer(s))s.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=s.length}return i};function go(r,t){if(l.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||ft(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let e=r.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&e===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return xr(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Fo(r).length;default:if(i)return n?-1:xr(r).length;t=(""+t).toLowerCase(),i=!0}}l.byteLength=go;function Xa(r,t,e){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return c0(this,t,e);case"utf8":case"utf-8":return xo(this,t,e);case"ascii":return s0(this,t,e);case"latin1":case"binary":return a0(this,t,e);case"base64":return i0(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f0(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}l.prototype._isBuffer=!0;function St(r,t,e){let n=r[t];r[t]=r[e],r[e]=n}l.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)St(this,e,e+1);return this};l.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)St(this,e,e+3),St(this,e+1,e+2);return this};l.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)St(this,e,e+7),St(this,e+1,e+6),St(this,e+2,e+5),St(this,e+3,e+4);return this};l.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?xo(this,0,t):Xa.apply(this,arguments)};l.prototype.toLocaleString=l.prototype.toString;l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:l.compare(this,t)===0};l.prototype.inspect=function(){let t="",e=jt.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"};po&&(l.prototype[po]=l.prototype.inspect);l.prototype.compare=function(t,e,n,i,o){if(ft(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;let s=o-i,c=n-e,a=Math.min(s,c),h=this.slice(i,o),u=t.slice(e,n);for(let d=0;d<a;++d)if(h[d]!==u[d]){s=h[d],c=u[d];break}return s<c?-1:c<s?1:0};function wo(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,_r(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=l.from(t,n)),l.isBuffer(t))return t.length===0?-1:bo(r,t,e,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):bo(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function bo(r,t,e,n,i){let o=1,s=r.length,c=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,s/=2,c/=2,e/=2}function a(u,d){return o===1?u[d]:u.readUInt16BE(d*o)}let h;if(i){let u=-1;for(h=e;h<s;h++)if(a(r,h)===a(t,u===-1?0:h-u)){if(u===-1&&(u=h),h-u+1===c)return u*o}else u!==-1&&(h-=h-u),u=-1}else for(e+c>s&&(e=s-c),h=e;h>=0;h--){let u=!0;for(let d=0;d<c;d++)if(a(r,h+d)!==a(t,d)){u=!1;break}if(u)return h}return-1}l.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};l.prototype.indexOf=function(t,e,n){return wo(this,t,e,n,!0)};l.prototype.lastIndexOf=function(t,e,n){return wo(this,t,e,n,!1)};function Qa(r,t,e,n){e=Number(e)||0;let i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s<n;++s){let c=parseInt(t.substr(s*2,2),16);if(_r(c))return s;r[e+s]=c}return s}function t0(r,t,e,n){return Te(xr(t,r.length-e),r,e,n)}function e0(r,t,e,n){return Te(p0(t),r,e,n)}function r0(r,t,e,n){return Te(Fo(t),r,e,n)}function n0(r,t,e,n){return Te(d0(t,r.length-e),r,e,n)}l.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return Qa(this,t,e,n);case"utf8":case"utf-8":return t0(this,t,e,n);case"ascii":case"latin1":case"binary":return e0(this,t,e,n);case"base64":return r0(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n0(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function i0(r,t,e){return t===0&&e===r.length?dr.fromByteArray(r):dr.fromByteArray(r.slice(t,e))}function xo(r,t,e){e=Math.min(r.length,e);let n=[],i=t;for(;i<e;){let o=r[i],s=null,c=o>239?4:o>223?3:o>191?2:1;if(i+c<=e){let a,h,u,d;switch(c){case 1:o<128&&(s=o);break;case 2:a=r[i+1],(a&192)==128&&(d=(o&31)<<6|a&63,d>127&&(s=d));break;case 3:a=r[i+1],h=r[i+2],(a&192)==128&&(h&192)==128&&(d=(o&15)<<12|(a&63)<<6|h&63,d>2047&&(d<55296||d>57343)&&(s=d));break;case 4:a=r[i+1],h=r[i+2],u=r[i+3],(a&192)==128&&(h&192)==128&&(u&192)==128&&(d=(o&15)<<18|(a&63)<<12|(h&63)<<6|u&63,d>65535&&d<1114112&&(s=d))}}s===null?(s=65533,c=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=c}return o0(n)}var _o=4096;function o0(r){let t=r.length;if(t<=_o)return String.fromCharCode.apply(String,r);let e="",n=0;for(;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=_o));return e}function s0(r,t,e){let n="";e=Math.min(r.length,e);for(let i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function a0(r,t,e){let n="";e=Math.min(r.length,e);for(let i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function c0(r,t,e){let n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);let i="";for(let o=t;o<e;++o)i+=y0[r[o]];return i}function f0(r,t,e){let n=r.slice(t,e),i="";for(let o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}l.prototype.slice=function(t,e){let n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);let i=this.subarray(t,e);return Object.setPrototypeOf(i,l.prototype),i};function R(r,t,e){if(r%1!=0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let i=this[t],o=1,s=0;for(;++s<e&&(o*=256);)i+=this[t+s]*o;return i};l.prototype.readUintBE=l.prototype.readUIntBE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let i=this[t+--e],o=1;for(;e>0&&(o*=256);)i+=this[t+--e]*o;return i};l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t=t>>>0,e||R(t,1,this.length),this[t]};l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t=t>>>0,e||R(t,2,this.length),this[t]|this[t+1]<<8};l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t=t>>>0,e||R(t,2,this.length),this[t]<<8|this[t+1]};l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t=t>>>0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};l.prototype.readBigUInt64LE=bt(function(t){t=t>>>0,Pt(t,"offset");let e=this[t],n=this[t+7];(e===void 0||n===void 0)&&Qt(t,this.length-8);let i=e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,o=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(o)<<BigInt(32))});l.prototype.readBigUInt64BE=bt(function(t){t=t>>>0,Pt(t,"offset");let e=this[t],n=this[t+7];(e===void 0||n===void 0)&&Qt(t,this.length-8);let i=e*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],o=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(o)});l.prototype.readIntLE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let i=this[t],o=1,s=0;for(;++s<e&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};l.prototype.readIntBE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let i=e,o=1,s=this[t+--i];for(;i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};l.prototype.readInt8=function(t,e){return t=t>>>0,e||R(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};l.prototype.readInt16LE=function(t,e){t=t>>>0,e||R(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};l.prototype.readInt16BE=function(t,e){t=t>>>0,e||R(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};l.prototype.readInt32LE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};l.prototype.readInt32BE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};l.prototype.readBigInt64LE=bt(function(t){t=t>>>0,Pt(t,"offset");let e=this[t],n=this[t+7];(e===void 0||n===void 0)&&Qt(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});l.prototype.readBigInt64BE=bt(function(t){t=t>>>0,Pt(t,"offset");let e=this[t],n=this[t+7];(e===void 0||n===void 0)&&Qt(t,this.length-8);let i=(e<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n)});l.prototype.readFloatLE=function(t,e){return t=t>>>0,e||R(t,4,this.length),Ot.read(this,t,!0,23,4)};l.prototype.readFloatBE=function(t,e){return t=t>>>0,e||R(t,4,this.length),Ot.read(this,t,!1,23,4)};l.prototype.readDoubleLE=function(t,e){return t=t>>>0,e||R(t,8,this.length),Ot.read(this,t,!0,52,8)};l.prototype.readDoubleBE=function(t,e){return t=t>>>0,e||R(t,8,this.length),Ot.read(this,t,!1,52,8)};function G(r,t,e,n,i,o){if(!l.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e>>>0,n=n>>>0,!i){let c=Math.pow(2,8*n)-1;G(this,t,e,n,c,0)}let o=1,s=0;for(this[e]=t&255;++s<n&&(o*=256);)this[e+s]=t/o&255;return e+n};l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e>>>0,n=n>>>0,!i){let c=Math.pow(2,8*n)-1;G(this,t,e,n,c,0)}let o=n-1,s=1;for(this[e+o]=t&255;--o>=0&&(s*=256);)this[e+o]=t/s&255;return e+n};l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,1,255,0),this[e]=t&255,e+1};l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,2,65535,0),this[e]=t&255,this[e+1]=t>>>8,e+2};l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=t&255,e+2};l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255,e+4};l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};function Bo(r,t,e,n,i){ko(t,n,i,r,e,7);let o=Number(t&BigInt(4294967295));r[e++]=o,o=o>>8,r[e++]=o,o=o>>8,r[e++]=o,o=o>>8,r[e++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return r[e++]=s,s=s>>8,r[e++]=s,s=s>>8,r[e++]=s,s=s>>8,r[e++]=s,e}function Ao(r,t,e,n,i){ko(t,n,i,r,e,7);let o=Number(t&BigInt(4294967295));r[e+7]=o,o=o>>8,r[e+6]=o,o=o>>8,r[e+5]=o,o=o>>8,r[e+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return r[e+3]=s,s=s>>8,r[e+2]=s,s=s>>8,r[e+1]=s,s=s>>8,r[e]=s,e+8}l.prototype.writeBigUInt64LE=bt(function(t,e=0){return Bo(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))});l.prototype.writeBigUInt64BE=bt(function(t,e=0){return Ao(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))});l.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e>>>0,!i){let a=Math.pow(2,8*n-1);G(this,t,e,n,a-1,-a)}let o=0,s=1,c=0;for(this[e]=t&255;++o<n&&(s*=256);)t<0&&c===0&&this[e+o-1]!==0&&(c=1),this[e+o]=(t/s>>0)-c&255;return e+n};l.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e>>>0,!i){let a=Math.pow(2,8*n-1);G(this,t,e,n,a-1,-a)}let o=n-1,s=1,c=0;for(this[e+o]=t&255;--o>=0&&(s*=256);)t<0&&c===0&&this[e+o+1]!==0&&(c=1),this[e+o]=(t/s>>0)-c&255;return e+n};l.prototype.writeInt8=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=t&255,e+1};l.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,2,32767,-32768),this[e]=t&255,this[e+1]=t>>>8,e+2};l.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=t&255,e+2};l.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,4,2147483647,-2147483648),this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4};l.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||G(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};l.prototype.writeBigInt64LE=bt(function(t,e=0){return Bo(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});l.prototype.writeBigInt64BE=bt(function(t,e=0){return Ao(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Eo(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function So(r,t,e,n,i){return t=+t,e=e>>>0,i||Eo(r,t,e,4,34028234663852886e22,-34028234663852886e22),Ot.write(r,t,e,n,23,4),e+4}l.prototype.writeFloatLE=function(t,e,n){return So(this,t,e,!0,n)};l.prototype.writeFloatBE=function(t,e,n){return So(this,t,e,!1,n)};function Io(r,t,e,n,i){return t=+t,e=e>>>0,i||Eo(r,t,e,8,17976931348623157e292,-17976931348623157e292),Ot.write(r,t,e,n,52,8),e+8}l.prototype.writeDoubleLE=function(t,e,n){return Io(this,t,e,!0,n)};l.prototype.writeDoubleBE=function(t,e,n){return Io(this,t,e,!1,n)};l.prototype.copy=function(t,e,n,i){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);let o=i-n;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(e,n,i):Uint8Array.prototype.set.call(t,this.subarray(n,i),e),o};l.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(t.length===1){let s=t.charCodeAt(0);(i==="utf8"&&s<128||i==="latin1")&&(t=s)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let o;if(typeof t=="number")for(o=e;o<n;++o)this[o]=t;else{let s=l.isBuffer(t)?t:l.from(t,i),c=s.length;if(c===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-e;++o)this[o+e]=s[o%c]}return this};var zt={};function br(r,t,e){zt[r]=class extends e{constructor(){super();Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}br("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);br("ERR_INVALID_ARG_TYPE",function(r,t){return`The "${r}" argument must be of type number. Received type ${typeof t}`},TypeError);br("ERR_OUT_OF_RANGE",function(r,t,e){let n=`The value of "${r}" is out of range.`,i=e;return Number.isInteger(e)&&Math.abs(e)>2**32?i=To(String(e)):typeof e=="bigint"&&(i=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(i=To(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function To(r){let t="",e=r.length,n=r[0]==="-"?1:0;for(;e>=n+4;e-=3)t=`_${r.slice(e-3,e)}${t}`;return`${r.slice(0,e)}${t}`}function u0(r,t,e){Pt(t,"offset"),(r[t]===void 0||r[t+e]===void 0)&&Qt(t,r.length-(e+1))}function ko(r,t,e,n,i,o){if(r>e||r<t){let s=typeof t=="bigint"?"n":"",c;throw o>3?t===0||t===BigInt(0)?c=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:c=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:c=`>= ${t}${s} and <= ${e}${s}`,new zt.ERR_OUT_OF_RANGE("value",c,r)}u0(n,i,o)}function Pt(r,t){if(typeof r!="number")throw new zt.ERR_INVALID_ARG_TYPE(t,"number",r)}function Qt(r,t,e){throw Math.floor(r)!==r?(Pt(r,e),new zt.ERR_OUT_OF_RANGE(e||"offset","an integer",r)):t<0?new zt.ERR_BUFFER_OUT_OF_BOUNDS:new zt.ERR_OUT_OF_RANGE(e||"offset",`>= ${e?1:0} and <= ${t}`,r)}var h0=/[^+/0-9A-Za-z-_]/g;function l0(r){if(r=r.split("=")[0],r=r.trim().replace(h0,""),r.length<2)return"";for(;r.length%4!=0;)r=r+"=";return r}function xr(r,t){t=t||1/0;let e,n=r.length,i=null,o=[];for(let s=0;s<n;++s){if(e=r.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function p0(r){let t=[];for(let e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function d0(r,t){let e,n,i,o=[];for(let s=0;s<r.length&&!((t-=2)<0);++s)e=r.charCodeAt(s),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function Fo(r){return dr.toByteArray(l0(r))}function Te(r,t,e,n){let i;for(i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function ft(r,t){return r instanceof t||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===t.name}function _r(r){return r!==r}var y0=function(){let r="0123456789abcdef",t=new Array(256);for(let e=0;e<16;++e){let n=e*16;for(let i=0;i<16;++i)t[n+i]=r[e]+r[i]}return t}();function bt(r){return typeof BigInt=="undefined"?m0:r}function m0(){throw new Error("BigInt not supported")}});var Br=k((uu,Lo)=>{"use strict";var{Buffer:rt}=Do(),Co=Symbol.for("BufferList");function v(r){if(!(this instanceof v))return new v(r);v._init.call(this,r)}v._init=function(t){Object.defineProperty(this,Co,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)};v.prototype._new=function(t){return new v(t)};v.prototype._offset=function(t){if(t===0)return[0,0];let e=0;for(let n=0;n<this._bufs.length;n++){let i=e+this._bufs[n].length;if(t<i||n===this._bufs.length-1)return[n,t-e];e=i}};v.prototype._reverseOffset=function(r){let t=r[0],e=r[1];for(let n=0;n<t;n++)e+=this._bufs[n].length;return e};v.prototype.get=function(t){if(t>this.length||t<0)return;let e=this._offset(t);return this._bufs[e[0]][e[1]]};v.prototype.slice=function(t,e){return typeof t=="number"&&t<0&&(t+=this.length),typeof e=="number"&&e<0&&(e+=this.length),this.copy(null,0,t,e)};v.prototype.copy=function(t,e,n,i){if((typeof n!="number"||n<0)&&(n=0),(typeof i!="number"||i>this.length)&&(i=this.length),n>=this.length||i<=0)return t||rt.alloc(0);let o=!!t,s=this._offset(n),c=i-n,a=c,h=o&&e||0,u=s[1];if(n===0&&i===this.length){if(!o)return this._bufs.length===1?this._bufs[0]:rt.concat(this._bufs,this.length);for(let d=0;d<this._bufs.length;d++)this._bufs[d].copy(t,h),h+=this._bufs[d].length;return t}if(a<=this._bufs[s[0]].length-u)return o?this._bufs[s[0]].copy(t,e,u,u+a):this._bufs[s[0]].slice(u,u+a);o||(t=rt.allocUnsafe(c));for(let d=s[0];d<this._bufs.length;d++){let E=this._bufs[d].length-u;if(a>E)this._bufs[d].copy(t,h,u),h+=E;else{this._bufs[d].copy(t,h,u,u+a),h+=E;break}a-=E,u&&(u=0)}return t.length>h?t.slice(0,h):t};v.prototype.shallowSlice=function(t,e){if(t=t||0,e=typeof e!="number"?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();let n=this._offset(t),i=this._offset(e),o=this._bufs.slice(n[0],i[0]+1);return i[1]===0?o.pop():o[o.length-1]=o[o.length-1].slice(0,i[1]),n[1]!==0&&(o[0]=o[0].slice(n[1])),this._new(o)};v.prototype.toString=function(t,e,n){return this.slice(e,n).toString(t)};v.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};v.prototype.duplicate=function(){let t=this._new();for(let e=0;e<this._bufs.length;e++)t.append(this._bufs[e]);return t};v.prototype.append=function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(rt.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let e=0;e<t.length;e++)this.append(t[e]);else if(this._isBufferList(t))for(let e=0;e<t._bufs.length;e++)this.append(t._bufs[e]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(rt.from(t));return this};v.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};v.prototype.indexOf=function(r,t,e){if(e===void 0&&typeof t=="string"&&(e=t,t=void 0),typeof r=="function"||Array.isArray(r))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof r=="number"?r=rt.from([r]):typeof r=="string"?r=rt.from(r,e):this._isBufferList(r)?r=r.slice():Array.isArray(r.buffer)?r=rt.from(r.buffer,r.byteOffset,r.byteLength):rt.isBuffer(r)||(r=rt.from(r)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),r.length===0)return t>this.length?this.length:t;let n=this._offset(t),i=n[0],o=n[1];for(;i<this._bufs.length;i++){let s=this._bufs[i];for(;o<s.length;)if(s.length-o>=r.length){let a=s.indexOf(r,o);if(a!==-1)return this._reverseOffset([i,a]);o=s.length-r.length+1}else{let a=this._reverseOffset([i,o]);if(this._match(a,r))return a;o++}o=0}return-1};v.prototype._match=function(r,t){if(this.length-r<t.length)return!1;for(let e=0;e<t.length;e++)if(this.get(r+e)!==t[e])return!1;return!0};(function(){let r={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let t in r)(function(e){r[e]===null?v.prototype[e]=function(n,i){return this.slice(n,n+i)[e](0,i)}:v.prototype[e]=function(n=0){return this.slice(n,n+r[e])[e](0)}})(t)})();v.prototype._isBufferList=function(t){return t instanceof v||v.isBufferList(t)};v.isBufferList=function(t){return t!=null&&t[Co]};Lo.exports=v});var vo=k((hu,Uo)=>{var No=class{constructor(t,e=12,n=8*1024,i=32*1024,o=64,s){this.bits=e,this.min=n,this.max=i,this.asModule=t,this.rabin=new t.Rabin(e,n,i,o,s),this.polynomial=s}fingerprint(t){let{__retain:e,__release:n,__allocArray:i,__getInt32Array:o,Int32Array_ID:s,Uint8Array_ID:c}=this.asModule,a=new Int32Array(Math.ceil(t.length/this.min)),h=e(i(s,a)),u=e(i(c,t)),d=this.rabin.fingerprint(u,h),E=o(d);n(u),n(h);let f=E.indexOf(0);return f>=0?E.subarray(0,f):E}};Uo.exports=No});var Yo=k(re=>{"use strict";var Ar=-8,ke=-4,g0=0,Oo=1,zo=1<<0,Fe=1<<1,lu=1<<2,pu=1<<3,Po=5,du=1<<Po,jo=1<<10,Ro=1<<11,yu=1<<12,w0=1<<13,Mo=14,mu=1<<Mo,gu=1<<19,wu=1<<20,bu=1<<21,xu=1<<22,b0=0,Er=4,x0=8,_0=12,Ho=12,B0=16,A0=typeof BigUint64Array!="undefined",te=Symbol(),ee=1024;function Vo(r,t){let e=new Uint32Array(r),n=new Uint16Array(r);var i=e[t+ke>>>2]>>>1,o=t>>>1;if(i<=ee)return String.fromCharCode.apply(String,n.subarray(o,o+i));let s=[];do{let c=n[o+ee-1],a=c>=55296&&c<56320?ee-1:ee;s.push(String.fromCharCode.apply(String,n.subarray(o,o+=a))),i-=a}while(i>ee);return s.join("")+String.fromCharCode.apply(String,n.subarray(o,o+i))}function Sr(r){let t={};function e(i,o){return i?Vo(i.buffer,o):"<yet unknown>"}let n=r.env=r.env||{};return n.abort=n.abort||function(o,s,c,a){let h=t.memory||n.memory;throw Error("abort: "+e(h,o)+" at "+e(h,s)+":"+c+":"+a)},n.trace=n.trace||function(o,s){let c=t.memory||n.memory;console.log("trace: "+e(c,o)+(s?" ":"")+Array.prototype.slice.call(arguments,2,2+s).join(", "))},r.Math=r.Math||Math,r.Date=r.Date||Date,t}function Ir(r,t){let e=t.exports,n=e.memory,i=e.table,o=e.__alloc,s=e.__retain,c=e.__rtti_base||~0;function a(b){let y=new Uint32Array(n.buffer),B=y[c>>>2];if((b>>>=0)>=B)throw Error("invalid id: "+b);return y[(c+4>>>2)+b*2]}function h(b){let y=new Uint32Array(n.buffer),B=y[c>>>2];if((b>>>=0)>=B)throw Error("invalid id: "+b);return y[(c+4>>>2)+b*2+1]}function u(b){return 31-Math.clz32(b>>>Po&31)}function d(b){return 31-Math.clz32(b>>>Mo&31)}function E(b){let y=b.length,B=o(y<<1,Oo),T=new Uint16Array(n.buffer);for(var N=0,P=B>>>1;N<y;++N)T[P+N]=b.charCodeAt(N);return B}r.__allocString=E;function f(b){let y=n.buffer;if(new Uint32Array(y)[b+Ar>>>2]!==Oo)throw Error("not a string: "+b);return Vo(y,b)}r.__getString=f;function p(b,y,B){let T=n.buffer;if(B)switch(b){case 2:return new Float32Array(T);case 3:return new Float64Array(T)}else switch(b){case 0:return new(y?Int8Array:Uint8Array)(T);case 1:return new(y?Int16Array:Uint16Array)(T);case 2:return new(y?Int32Array:Uint32Array)(T);case 3:return new(y?BigInt64Array:BigUint64Array)(T)}throw Error("unsupported align: "+b)}function g(b,y){let B=a(b);if(!(B&(zo|Fe)))throw Error("not an array: "+b+" @ "+B);let T=u(B),N=y.length,P=o(N<<T,g0),W=o(B&Fe?B0:_0,b),F=new Uint32Array(n.buffer);F[W+b0>>>2]=s(P),F[W+Er>>>2]=P,F[W+x0>>>2]=N<<T,B&Fe&&(F[W+Ho>>>2]=N);let qr=p(T,B&jo,B&Ro);if(B&w0)for(let ie=0;ie<N;++ie)qr[(P>>>T)+ie]=s(y[ie]);else qr.set(y,P>>>T);return W}r.__allocArray=g;function C(b){let y=new Uint32Array(n.buffer),B=y[b+Ar>>>2],T=a(B);if(!(T&zo))throw Error("not an array: "+B);let N=u(T);var P=y[b+Er>>>2];let W=T&Fe?y[b+Ho>>>2]:y[P+ke>>>2]>>>N;return p(N,T&jo,T&Ro).subarray(P>>>=N,P+W)}r.__getArrayView=C;function m(b){let y=C(b),B=y.length,T=new Array(B);for(let N=0;N<B;N++)T[N]=y[N];return T}r.__getArray=m;function w(b){let y=n.buffer,B=new Uint32Array(y)[b+ke>>>2];return y.slice(b,b+B)}r.__getArrayBuffer=w;function x(b,y,B){return new b(_(b,y,B))}function _(b,y,B){let T=n.buffer,N=new Uint32Array(T),P=N[B+Er>>>2];return new b(T,P,N[P+ke>>>2]>>>y)}r.__getInt8Array=x.bind(null,Int8Array,0),r.__getInt8ArrayView=_.bind(null,Int8Array,0),r.__getUint8Array=x.bind(null,Uint8Array,0),r.__getUint8ArrayView=_.bind(null,Uint8Array,0),r.__getUint8ClampedArray=x.bind(null,Uint8ClampedArray,0),r.__getUint8ClampedArrayView=_.bind(null,Uint8ClampedArray,0),r.__getInt16Array=x.bind(null,Int16Array,1),r.__getInt16ArrayView=_.bind(null,Int16Array,1),r.__getUint16Array=x.bind(null,Uint16Array,1),r.__getUint16ArrayView=_.bind(null,Uint16Array,1),r.__getInt32Array=x.bind(null,Int32Array,2),r.__getInt32ArrayView=_.bind(null,Int32Array,2),r.__getUint32Array=x.bind(null,Uint32Array,2),r.__getUint32ArrayView=_.bind(null,Uint32Array,2),A0&&(r.__getInt64Array=x.bind(null,BigInt64Array,3),r.__getInt64ArrayView=_.bind(null,BigInt64Array,3),r.__getUint64Array=x.bind(null,BigUint64Array,3),r.__getUint64ArrayView=_.bind(null,BigUint64Array,3)),r.__getFloat32Array=x.bind(null,Float32Array,2),r.__getFloat32ArrayView=_.bind(null,Float32Array,2),r.__getFloat64Array=x.bind(null,Float64Array,3),r.__getFloat64ArrayView=_.bind(null,Float64Array,3);function I(b,y){let B=new Uint32Array(n.buffer);var T=B[b+Ar>>>2];if(T<=B[c>>>2])do if(T==y)return!0;while(T=h(T));return!1}return r.__instanceof=I,r.memory=r.memory||n,r.table=r.table||i,Wo(e,r)}function qo(r){return typeof Response!="undefined"&&r instanceof Response}async function $o(r,t){return qo(r=await r)?Go(r,t):Ir(Sr(t||(t={})),await WebAssembly.instantiate(r instanceof WebAssembly.Module?r:await WebAssembly.compile(r),t))}re.instantiate=$o;function E0(r,t){return Ir(Sr(t||(t={})),new WebAssembly.Instance(r instanceof WebAssembly.Module?r:new WebAssembly.Module(r),t))}re.instantiateSync=E0;async function Go(r,t){return WebAssembly.instantiateStreaming?Ir(Sr(t||(t={})),(await WebAssembly.instantiateStreaming(r,t)).instance):$o(qo(r=await r)?r.arrayBuffer():r,t)}re.instantiateStreaming=Go;function Wo(r,t){var e=t?Object.create(t):{},n=r.__argumentsLength?function(i){r.__argumentsLength.value=i}:r.__setArgumentsLength||r.__setargc||function(){};for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;let o=r[i],s=i.split("."),c=e;for(;s.length>1;){let u=s.shift();Object.prototype.hasOwnProperty.call(c,u)||(c[u]={}),c=c[u]}let a=s[0],h=a.indexOf("#");if(h>=0){let u=a.substring(0,h),d=c[u];if(typeof d=="undefined"||!d.prototype){let E=function(...f){return E.wrap(E.prototype.constructor(0,...f))};E.prototype={valueOf:function(){return this[te]}},E.wrap=function(f){return Object.create(E.prototype,{[te]:{value:f,writable:!1}})},d&&Object.getOwnPropertyNames(d).forEach(f=>Object.defineProperty(E,f,Object.getOwnPropertyDescriptor(d,f))),c[u]=E}if(a=a.substring(h+1),c=c[u].prototype,/^(get|set):/.test(a)){if(!Object.prototype.hasOwnProperty.call(c,a=a.substring(4))){let E=r[i.replace("set:","get:")],f=r[i.replace("get:","set:")];Object.defineProperty(c,a,{get:function(){return E(this[te])},set:function(p){f(this[te],p)},enumerable:!0})}}else a==="constructor"?(c[a]=(...E)=>(n(E.length),o(...E))).original=o:(c[a]=function(...E){return n(E.length),o(this[te],...E)}).original=o}else/^(get|set):/.test(a)?Object.prototype.hasOwnProperty.call(c,a=a.substring(4))||Object.defineProperty(c,a,{get:r[i.replace("set:","get:")],set:r[i.replace("get:","set:")],enumerable:!0}):typeof o=="function"&&o!==n?(c[a]=(...u)=>(n(u.length),o(...u))).original=o:c[a]=o}return e}re.demangle=Wo});var Jo=k((Bu,Ko)=>{var{instantiate:S0}=Yo();Tr.supported=typeof WebAssembly!="undefined";function Tr(r={}){if(!Tr.supported)return null;var t=new Uint8Array([0,97,115,109,1,0,0,0,1,78,14,96,2,127,126,0,96,1,127,1,126,96,2,127,127,0,96,1,127,1,127,96,1,127,0,96,2,127,127,1,127,96,3,127,127,127,1,127,96,0,0,96,3,127,127,127,0,96,0,1,127,96,4,127,127,127,127,0,96,5,127,127,127,127,127,1,127,96,1,126,1,127,96,2,126,126,1,126,2,13,1,3,101,110,118,5,97,98,111,114,116,0,10,3,54,53,2,2,8,9,3,5,2,8,6,5,3,4,2,6,9,12,13,2,5,11,3,2,3,2,3,2,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,6,7,7,4,4,5,3,1,0,1,6,47,9,127,1,65,0,11,127,1,65,0,11,127,0,65,3,11,127,0,65,4,11,127,1,65,0,11,127,1,65,0,11,127,1,65,0,11,127,0,65,240,2,11,127,0,65,6,11,7,240,5,41,6,109,101,109,111,114,121,2,0,7,95,95,97,108,108,111,99,0,10,8,95,95,114,101,116,97,105,110,0,11,9,95,95,114,101,108,101,97,115,101,0,12,9,95,95,99,111,108,108,101,99,116,0,51,11,95,95,114,116,116,105,95,98,97,115,101,3,7,13,73,110,116,51,50,65,114,114,97,121,95,73,68,3,2,13,85,105,110,116,56,65,114,114,97,121,95,73,68,3,3,6,100,101,103,114,101,101,0,16,3,109,111,100,0,17,5,82,97,98,105,110,3,8,16,82,97,98,105,110,35,103,101,116,58,119,105,110,100,111,119,0,21,16,82,97,98,105,110,35,115,101,116,58,119,105,110,100,111,119,0,22,21,82,97,98,105,110,35,103,101,116,58,119,105,110,100,111,119,95,115,105,122,101,0,23,21,82,97,98,105,110,35,115,101,116,58,119,105,110,100,111,119,95,115,105,122,101,0,24,14,82,97,98,105,110,35,103,101,116,58,119,112,111,115,0,25,14,82,97,98,105,110,35,115,101,116,58,119,112,111,115,0,26,15,82,97,98,105,110,35,103,101,116,58,99,111,117,110,116,0,27,15,82,97,98,105,110,35,115,101,116,58,99,111,117,110,116,0,28,13,82,97,98,105,110,35,103,101,116,58,112,111,115,0,29,13,82,97,98,105,110,35,115,101,116,58,112,111,115,0,30,15,82,97,98,105,110,35,103,101,116,58,115,116,97,114,116,0,31,15,82,97,98,105,110,35,115,101,116,58,115,116,97,114,116,0,32,16,82,97,98,105,110,35,103,101,116,58,100,105,103,101,115,116,0,33,16,82,97,98,105,110,35,115,101,116,58,100,105,103,101,115,116,0,34,21,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,35,21,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,36,22,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,37,22,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,38,31,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,39,31,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,40,20,82,97,98,105,110,35,103,101,116,58,112,111,108,121,110,111,109,105,97,108,0,41,20,82,97,98,105,110,35,115,101,116,58,112,111,108,121,110,111,109,105,97,108,0,42,17,82,97,98,105,110,35,103,101,116,58,109,105,110,115,105,122,101,0,43,17,82,97,98,105,110,35,115,101,116,58,109,105,110,115,105,122,101,0,44,17,82,97,98,105,110,35,103,101,116,58,109,97,120,115,105,122,101,0,45,17,82,97,98,105,110,35,115,101,116,58,109,97,120,115,105,122,101,0,46,14,82,97,98,105,110,35,103,101,116,58,109,97,115,107,0,47,14,82,97,98,105,110,35,115,101,116,58,109,97,115,107,0,48,17,82,97,98,105,110,35,99,111,110,115,116,114,117,99,116,111,114,0,20,17,82,97,98,105,110,35,102,105,110,103,101,114,112,114,105,110,116,0,49,8,1,50,10,165,31,53,199,1,1,4,127,32,1,40,2,0,65,124,113,34,2,65,128,2,73,4,127,32,2,65,4,118,33,4,65,0,5,32,2,65,31,32,2,103,107,34,3,65,4,107,118,65,16,115,33,4,32,3,65,7,107,11,33,3,32,1,40,2,20,33,2,32,1,40,2,16,34,5,4,64,32,5,32,2,54,2,20,11,32,2,4,64,32,2,32,5,54,2,16,11,32,1,32,0,32,4,32,3,65,4,116,106,65,2,116,106,40,2,96,70,4,64,32,0,32,4,32,3,65,4,116,106,65,2,116,106,32,2,54,2,96,32,2,69,4,64,32,0,32,3,65,2,116,106,32,0,32,3,65,2,116,106,40,2,4,65,1,32,4,116,65,127,115,113,34,1,54,2,4,32,1,69,4,64,32,0,32,0,40,2,0,65,1,32,3,116,65,127,115,113,54,2,0,11,11,11,11,226,2,1,6,127,32,1,40,2,0,33,3,32,1,65,16,106,32,1,40,2,0,65,124,113,106,34,4,40,2,0,34,5,65,1,113,4,64,32,3,65,124,113,65,16,106,32,5,65,124,113,106,34,2,65,240,255,255,255,3,73,4,64,32,0,32,4,16,1,32,1,32,2,32,3,65,3,113,114,34,3,54,2,0,32,1,65,16,106,32,1,40,2,0,65,124,113,106,34,4,40,2,0,33,5,11,11,32,3,65,2,113,4,64,32,1,65,4,107,40,2,0,34,2,40,2,0,34,6,65,124,113,65,16,106,32,3,65,124,113,106,34,7,65,240,255,255,255,3,73,4,64,32,0,32,2,16,1,32,2,32,7,32,6,65,3,113,114,34,3,54,2,0,32,2,33,1,11,11,32,4,32,5,65,2,114,54,2,0,32,4,65,4,107,32,1,54,2,0,32,0,32,3,65,124,113,34,2,65,128,2,73,4,127,32,2,65,4,118,33,4,65,0,5,32,2,65,31,32,2,103,107,34,2,65,4,107,118,65,16,115,33,4,32,2,65,7,107,11,34,3,65,4,116,32,4,106,65,2,116,106,40,2,96,33,2,32,1,65,0,54,2,16,32,1,32,2,54,2,20,32,2,4,64,32,2,32,1,54,2,16,11,32,0,32,4,32,3,65,4,116,106,65,2,116,106,32,1,54,2,96,32,0,32,0,40,2,0,65,1,32,3,116,114,54,2,0,32,0,32,3,65,2,116,106,32,0,32,3,65,2,116,106,40,2,4,65,1,32,4,116,114,54,2,4,11,119,1,1,127,32,2,2,127,32,0,40,2,160,12,34,2,4,64,32,2,32,1,65,16,107,70,4,64,32,2,40,2,0,33,3,32,1,65,16,107,33,1,11,11,32,1,11,107,34,2,65,48,73,4,64,15,11,32,1,32,3,65,2,113,32,2,65,32,107,65,1,114,114,54,2,0,32,1,65,0,54,2,16,32,1,65,0,54,2,20,32,1,32,2,106,65,16,107,34,2,65,2,54,2,0,32,0,32,2,54,2,160,12,32,0,32,1,16,2,11,155,1,1,3,127,35,0,34,0,69,4,64,65,1,63,0,34,0,74,4,127,65,1,32,0,107,64,0,65,0,72,5,65,0,11,4,64,0,11,65,176,3,34,0,65,0,54,2,0,65,208,15,65,0,54,2,0,3,64,32,1,65,23,73,4,64,32,1,65,2,116,65,176,3,106,65,0,54,2,4,65,0,33,2,3,64,32,2,65,16,73,4,64,32,1,65,4,116,32,2,106,65,2,116,65,176,3,106,65,0,54,2,96,32,2,65,1,106,33,2,12,1,11,11,32,1,65,1,106,33,1,12,1,11,11,65,176,3,65,224,15,63,0,65,16,116,16,3,65,176,3,36,0,11,32,0,11,45,0,32,0,65,240,255,255,255,3,79,4,64,65,32,65,224,0,65,201,3,65,29,16,0,0,11,32,0,65,15,106,65,112,113,34,0,65,16,32,0,65,16,75,27,11,169,1,1,1,127,32,0,32,1,65,128,2,73,4,127,32,1,65,4,118,33,1,65,0,5,32,1,65,248,255,255,255,1,73,4,64,32,1,65,1,65,27,32,1,103,107,116,106,65,1,107,33,1,11,32,1,65,31,32,1,103,107,34,2,65,4,107,118,65,16,115,33,1,32,2,65,7,107,11,34,2,65,2,116,106,40,2,4,65,127,32,1,116,113,34,1,4,127,32,0,32,1,104,32,2,65,4,116,106,65,2,116,106,40,2,96,5,32,0,40,2,0,65,127,32,2,65,1,106,116,113,34,1,4,127,32,0,32,0,32,1,104,34,0,65,2,116,106,40,2,4,104,32,0,65,4,116,106,65,2,116,106,40,2,96,5,65,0,11,11,11,111,1,1,127,63,0,34,2,32,1,65,248,255,255,255,1,73,4,127,32,1,65,1,65,27,32,1,103,107,116,65,1,107,106,5,32,1,11,65,16,32,0,40,2,160,12,32,2,65,16,116,65,16,107,71,116,106,65,255,255,3,106,65,128,128,124,113,65,16,118,34,1,32,2,32,1,74,27,64,0,65,0,72,4,64,32,1,64,0,65,0,72,4,64,0,11,11,32,0,32,2,65,16,116,63,0,65,16,116,16,3,11,113,1,2,127,32,1,40,2,0,34,3,65,124,113,32,2,107,34,4,65,32,79,4,64,32,1,32,2,32,3,65,2,113,114,54,2,0,32,2,32,1,65,16,106,106,34,1,32,4,65,16,107,65,1,114,54,2,0,32,0,32,1,16,2,5,32,1,32,3,65,126,113,54,2,0,32,1,65,16,106,32,1,40,2,0,65,124,113,106,32,1,65,16,106,32,1,40,2,0,65,124,113,106,40,2,0,65,125,113,54,2,0,11,11,91,1,2,127,32,0,32,1,16,5,34,4,16,6,34,3,69,4,64,65,1,36,1,65,0,36,1,32,0,32,4,16,6,34,3,69,4,64,32,0,32,4,16,7,32,0,32,4,16,6,33,3,11,11,32,3,65,0,54,2,4,32,3,32,2,54,2,8,32,3,32,1,54,2,12,32,0,32,3,16,1,32,0,32,3,32,4,16,8,32,3,11,13,0,16,4,32,0,32,1,16,9,65,16,106,11,33,1,1,127,32,0,65,172,3,75,4,64,32,0,65,16,107,34,1,32,1,40,2,4,65,1,106,54,2,4,11,32,0,11,18,0,32,0,65,172,3,75,4,64,32,0,65,16,107,16,52,11,11,140,3,1,1,127,2,64,32,1,69,13,0,32,0,65,0,58,0,0,32,0,32,1,106,65,1,107,65,0,58,0,0,32,1,65,2,77,13,0,32,0,65,1,106,65,0,58,0,0,32,0,65,2,106,65,0,58,0,0,32,0,32,1,106,34,2,65,2,107,65,0,58,0,0,32,2,65,3,107,65,0,58,0,0,32,1,65,6,77,13,0,32,0,65,3,106,65,0,58,0,0,32,0,32,1,106,65,4,107,65,0,58,0,0,32,1,65,8,77,13,0,32,1,65,0,32,0,107,65,3,113,34,1,107,33,2,32,0,32,1,106,34,0,65,0,54,2,0,32,0,32,2,65,124,113,34,1,106,65,4,107,65,0,54,2,0,32,1,65,8,77,13,0,32,0,65,4,106,65,0,54,2,0,32,0,65,8,106,65,0,54,2,0,32,0,32,1,106,34,2,65,12,107,65,0,54,2,0,32,2,65,8,107,65,0,54,2,0,32,1,65,24,77,13,0,32,0,65,12,106,65,0,54,2,0,32,0,65,16,106,65,0,54,2,0,32,0,65,20,106,65,0,54,2,0,32,0,65,24,106,65,0,54,2,0,32,0,32,1,106,34,2,65,28,107,65,0,54,2,0,32,2,65,24,107,65,0,54,2,0,32,2,65,20,107,65,0,54,2,0,32,2,65,16,107,65,0,54,2,0,32,0,32,0,65,4,113,65,24,106,34,2,106,33,0,32,1,32,2,107,33,1,3,64,32,1,65,32,79,4,64,32,0,66,0,55,3,0,32,0,65,8,106,66,0,55,3,0,32,0,65,16,106,66,0,55,3,0,32,0,65,24,106,66,0,55,3,0,32,1,65,32,107,33,1,32,0,65,32,106,33,0,12,1,11,11,11,11,178,1,1,3,127,32,1,65,240,255,255,255,3,32,2,118,75,4,64,65,144,1,65,192,1,65,23,65,56,16,0,0,11,32,1,32,2,116,34,3,65,0,16,10,34,2,32,3,16,13,32,0,69,4,64,65,12,65,2,16,10,34,0,65,172,3,75,4,64,32,0,65,16,107,34,1,32,1,40,2,4,65,1,106,54,2,4,11,11,32,0,65,0,54,2,0,32,0,65,0,54,2,4,32,0,65,0,54,2,8,32,2,34,1,32,0,40,2,0,34,4,71,4,64,32,1,65,172,3,75,4,64,32,1,65,16,107,34,5,32,5,40,2,4,65,1,106,54,2,4,11,32,4,16,12,11,32,0,32,1,54,2,0,32,0,32,2,54,2,4,32,0,32,3,54,2,8,32,0,11,46,1,2,127,65,12,65,5,16,10,34,0,65,172,3,75,4,64,32,0,65,16,107,34,1,32,1,40,2,4,65,1,106,54,2,4,11,32,0,65,128,2,65,3,16,14,11,9,0,65,63,32,0,121,167,107,11,49,1,2,127,65,63,32,1,121,167,107,33,2,3,64,65,63,32,0,121,167,107,32,2,107,34,3,65,0,78,4,64,32,0,32,1,32,3,172,134,133,33,0,12,1,11,11,32,0,11,40,0,32,1,32,0,40,2,8,79,4,64,65,128,2,65,192,2,65,163,1,65,44,16,0,0,11,32,1,32,0,40,2,4,106,65,0,58,0,0,11,38,0,32,1,32,0,40,2,8,79,4,64,65,128,2,65,192,2,65,152,1,65,44,16,0,0,11,32,1,32,0,40,2,4,106,45,0,0,11,254,5,2,1,127,4,126,32,0,69,4,64,65,232,0,65,6,16,10,34,0,65,172,3,75,4,64,32,0,65,16,107,34,5,32,5,40,2,4,65,1,106,54,2,4,11,11,32,0,65,0,54,2,0,32,0,65,0,54,2,4,32,0,65,0,54,2,8,32,0,66,0,55,3,16,32,0,66,0,55,3,24,32,0,66,0,55,3,32,32,0,66,0,55,3,40,32,0,66,0,55,3,48,32,0,66,0,55,3,56,32,0,66,0,55,3,64,32,0,66,0,55,3,72,32,0,66,0,55,3,80,32,0,66,0,55,3,88,32,0,66,0,55,3,96,32,0,32,2,173,55,3,80,32,0,32,3,173,55,3,88,65,12,65,4,16,10,34,2,65,172,3,75,4,64,32,2,65,16,107,34,3,32,3,40,2,4,65,1,106,54,2,4,11,32,2,32,4,65,0,16,14,33,2,32,0,40,2,0,16,12,32,0,32,2,54,2,0,32,0,32,4,54,2,4,32,0,66,1,32,1,173,134,66,1,125,55,3,96,32,0,66,243,130,183,218,216,230,232,30,55,3,72,35,4,69,4,64,65,0,33,2,3,64,32,2,65,128,2,72,4,64,32,2,65,255,1,113,173,33,6,32,0,41,3,72,34,7,33,8,65,63,32,7,121,167,107,33,1,3,64,65,63,32,6,121,167,107,32,1,107,34,3,65,0,78,4,64,32,6,32,8,32,3,172,134,133,33,6,12,1,11,11,65,0,33,4,3,64,32,4,32,0,40,2,4,65,1,107,72,4,64,32,6,66,8,134,33,6,32,0,41,3,72,34,7,33,8,65,63,32,7,121,167,107,33,1,3,64,65,63,32,6,121,167,107,32,1,107,34,3,65,0,78,4,64,32,6,32,8,32,3,172,134,133,33,6,12,1,11,11,32,4,65,1,106,33,4,12,1,11,11,35,6,40,2,4,32,2,65,3,116,106,32,6,55,3,0,32,2,65,1,106,33,2,12,1,11,11,65,63,32,0,41,3,72,121,167,107,172,33,7,65,0,33,2,3,64,32,2,65,128,2,72,4,64,35,5,33,1,32,2,172,32,7,134,34,8,33,6,65,63,32,0,41,3,72,34,9,121,167,107,33,3,3,64,65,63,32,6,121,167,107,32,3,107,34,4,65,0,78,4,64,32,6,32,9,32,4,172,134,133,33,6,12,1,11,11,32,1,40,2,4,32,2,65,3,116,106,32,6,32,8,132,55,3,0,32,2,65,1,106,33,2,12,1,11,11,65,1,36,4,11,32,0,66,0,55,3,24,32,0,66,0,55,3,32,65,0,33,2,3,64,32,2,32,0,40,2,4,72,4,64,32,0,40,2,0,32,2,16,18,32,2,65,1,106,33,2,12,1,11,11,32,0,66,0,55,3,40,32,0,65,0,54,2,8,32,0,66,0,55,3,16,32,0,66,0,55,3,40,32,0,40,2,0,32,0,40,2,8,16,19,33,1,32,0,40,2,8,32,0,40,2,0,40,2,4,106,65,1,58,0,0,32,0,32,0,41,3,40,35,6,40,2,4,32,1,65,3,116,106,41,3,0,133,55,3,40,32,0,32,0,40,2,8,65,1,106,32,0,40,2,4,111,54,2,8,32,0,35,5,40,2,4,32,0,41,3,40,34,6,66,45,136,167,65,3,116,106,41,3,0,32,6,66,8,134,66,1,132,133,55,3,40,32,0,11,38,1,1,127,32,0,40,2,0,34,0,65,172,3,75,4,64,32,0,65,16,107,34,1,32,1,40,2,4,65,1,106,54,2,4,11,32,0,11,55,1,2,127,32,1,32,0,40,2,0,34,2,71,4,64,32,1,65,172,3,75,4,64,32,1,65,16,107,34,3,32,3,40,2,4,65,1,106,54,2,4,11,32,2,16,12,11,32,0,32,1,54,2,0,11,7,0,32,0,40,2,4,11,9,0,32,0,32,1,54,2,4,11,7,0,32,0,40,2,8,11,9,0,32,0,32,1,54,2,8,11,7,0,32,0,41,3,16,11,9,0,32,0,32,1,55,3,16,11,7,0,32,0,41,3,24,11,9,0,32,0,32,1,55,3,24,11,7,0,32,0,41,3,32,11,9,0,32,0,32,1,55,3,32,11,7,0,32,0,41,3,40,11,9,0,32,0,32,1,55,3,40,11,7,0,32,0,41,3,48,11,9,0,32,0,32,1,55,3,48,11,7,0,32,0,41,3,56,11,9,0,32,0,32,1,55,3,56,11,7,0,32,0,41,3,64,11,9,0,32,0,32,1,55,3,64,11,7,0,32,0,41,3,72,11,9,0,32,0,32,1,55,3,72,11,7,0,32,0,41,3,80,11,9,0,32,0,32,1,55,3,80,11,7,0,32,0,41,3,88,11,9,0,32,0,32,1,55,3,88,11,7,0,32,0,41,3,96,11,9,0,32,0,32,1,55,3,96,11,172,4,2,5,127,1,126,32,2,65,172,3,75,4,64,32,2,65,16,107,34,4,32,4,40,2,4,65,1,106,54,2,4,11,32,2,33,4,65,0,33,2,32,1,40,2,8,33,5,32,1,40,2,4,33,6,3,64,2,127,65,0,33,3,3,64,32,3,32,5,72,4,64,32,3,32,6,106,45,0,0,33,1,32,0,40,2,0,32,0,40,2,8,16,19,33,7,32,0,40,2,8,32,0,40,2,0,40,2,4,106,32,1,58,0,0,32,0,32,0,41,3,40,35,6,40,2,4,32,7,65,3,116,106,41,3,0,133,55,3,40,32,0,32,0,40,2,8,65,1,106,32,0,40,2,4,111,54,2,8,32,0,35,5,40,2,4,32,0,41,3,40,34,8,66,45,136,167,65,3,116,106,41,3,0,32,1,173,32,8,66,8,134,132,133,55,3,40,32,0,32,0,41,3,16,66,1,124,55,3,16,32,0,32,0,41,3,24,66,1,124,55,3,24,32,0,41,3,16,32,0,41,3,80,90,4,127,32,0,41,3,40,32,0,41,3,96,131,80,5,65,0,11,4,127,65,1,5,32,0,41,3,16,32,0,41,3,88,90,11,4,64,32,0,32,0,41,3,32,55,3,48,32,0,32,0,41,3,16,55,3,56,32,0,32,0,41,3,40,55,3,64,65,0,33,1,3,64,32,1,32,0,40,2,4,72,4,64,32,0,40,2,0,32,1,16,18,32,1,65,1,106,33,1,12,1,11,11,32,0,66,0,55,3,40,32,0,65,0,54,2,8,32,0,66,0,55,3,16,32,0,66,0,55,3,40,32,0,40,2,0,32,0,40,2,8,16,19,33,1,32,0,40,2,8,32,0,40,2,0,40,2,4,106,65,1,58,0,0,32,0,32,0,41,3,40,35,6,40,2,4,32,1,65,3,116,106,41,3,0,133,55,3,40,32,0,32,0,40,2,8,65,1,106,32,0,40,2,4,111,54,2,8,32,0,35,5,40,2,4,32,0,41,3,40,34,8,66,45,136,167,65,3,116,106,41,3,0,32,8,66,8,134,66,1,132,133,55,3,40,32,3,65,1,106,12,3,11,32,3,65,1,106,33,3,12,1,11,11,65,127,11,34,1,65,0,78,4,64,32,5,32,1,107,33,5,32,1,32,6,106,33,6,32,2,34,1,65,1,106,33,2,32,4,40,2,4,32,1,65,2,116,106,32,0,41,3,56,62,2,0,12,1,11,11,32,4,11,10,0,16,15,36,5,16,15,36,6,11,3,0,1,11,73,1,2,127,32,0,40,2,4,34,1,65,255,255,255,255,0,113,34,2,65,1,70,4,64,32,0,65,16,106,16,53,32,0,32,0,40,2,0,65,1,114,54,2,0,35,0,32,0,16,2,5,32,0,32,2,65,1,107,32,1,65,128,128,128,128,127,113,114,54,2,4,11,11,58,0,2,64,2,64,2,64,32,0,65,8,107,40,2,0,14,7,0,0,1,1,1,1,1,2,11,15,11,32,0,40,2,0,34,0,4,64,32,0,65,172,3,79,4,64,32,0,65,16,107,16,52,11,11,15,11,0,11,11,137,3,7,0,65,16,11,55,40,0,0,0,1,0,0,0,1,0,0,0,40,0,0,0,97,0,108,0,108,0,111,0,99,0,97,0,116,0,105,0,111,0,110,0,32,0,116,0,111,0,111,0,32,0,108,0,97,0,114,0,103,0,101,0,65,208,0,11,45,30,0,0,0,1,0,0,0,1,0,0,0,30,0,0,0,126,0,108,0,105,0,98,0,47,0,114,0,116,0,47,0,116,0,108,0,115,0,102,0,46,0,116,0,115,0,65,128,1,11,43,28,0,0,0,1,0,0,0,1,0,0,0,28,0,0,0,73,0,110,0,118,0,97,0,108,0,105,0,100,0,32,0,108,0,101,0,110,0,103,0,116,0,104,0,65,176,1,11,53,38,0,0,0,1,0,0,0,1,0,0,0,38,0,0,0,126,0,108,0,105,0,98,0,47,0,97,0,114,0,114,0,97,0,121,0,98,0,117,0,102,0,102,0,101,0,114,0,46,0,116,0,115,0,65,240,1,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,73,0,110,0,100,0,101,0,120,0,32,0,111,0,117,0,116,0,32,0,111,0,102,0,32,0,114,0,97,0,110,0,103,0,101,0,65,176,2,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,126,0,108,0,105,0,98,0,47,0,116,0,121,0,112,0,101,0,100,0,97,0,114,0,114,0,97,0,121,0,46,0,116,0,115,0,65,240,2,11,53,7,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,145,4,0,0,2,0,0,0,49,0,0,0,2,0,0,0,17,1,0,0,2,0,0,0,16,0,34,16,115,111,117,114,99,101,77,97,112,112,105,110,103,85,82,76,16,46,47,114,97,98,105,110,46,119,97,115,109,46,109,97,112]);return S0(new Response(new Blob([t],{type:"application/wasm"})),r)}Ko.exports=Tr});var Qo=k((Au,Xo)=>{var Zo=vo(),I0=Jo(),T0=async(r,t,e,n,i)=>{let o=await I0();return new Zo(o,r,t,e,n,i)};Xo.exports={Rabin:Zo,create:T0}});var Fr={};M(Fr,{identity:()=>C0});var C0,is=U(()=>{it();pt();C0=le({prefix:"\0",name:"identity",encode:r=>Pe(r),decode:r=>ze(r)})});var Dr={};M(Dr,{base2:()=>L0});var L0,os=U(()=>{it();L0=O({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})});var Cr={};M(Cr,{base8:()=>N0});var N0,ss=U(()=>{it();N0=O({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})});var Lr={};M(Lr,{base10:()=>U0});var U0,as=U(()=>{it();U0=dt({prefix:"9",name:"base10",alphabet:"0123456789"})});var Nr={};M(Nr,{base16:()=>v0,base16upper:()=>O0});var v0,O0,cs=U(()=>{it();v0=O({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),O0=O({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});var Ur={};M(Ur,{base36:()=>z0,base36upper:()=>P0});var z0,P0,fs=U(()=>{it();z0=dt({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),P0=dt({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})});var vr={};M(vr,{base64:()=>j0,base64pad:()=>R0,base64url:()=>M0,base64urlpad:()=>H0});var j0,R0,M0,H0,us=U(()=>{it();j0=O({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),R0=O({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),M0=O({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),H0=O({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});var Or={};M(Or,{identity:()=>$0});var hs,V0,ls,q0,$0,ps=U(()=>{pt();qt();hs=0,V0="identity",ls=Y,q0=r=>_t(hs,ls(r)),$0={code:hs,name:V0,encode:ls,digest:q0}});var Ou,zu,ds=U(()=>{Ou=new TextEncoder,zu=new TextDecoder});var zr,ju,ys=U(()=>{is();os();ss();as();cs();qe();fs();He();us();he();ps();Ee();ds();$e();zr={...Fr,...Dr,...Cr,...Lr,...Nr,...Ve,...Ur,...Me,...vr},ju={...Re,...Or}});function ms(r,t,e,n){return{name:r,prefix:t,encoder:{name:r,prefix:t,encode:e},decoder:{decode:n}}}var gs,Pr,W0,ws,bs=U(()=>{ys();gs=ms("utf8","u",r=>{let t=new TextDecoder("utf8");return"u"+t.decode(r)},r=>new TextEncoder().encode(r.substring(1))),Pr=ms("ascii","a",r=>{let t="a";for(let e=0;e<r.length;e++)t+=String.fromCharCode(r[e]);return t},r=>{r=r.substring(1);let t=new Uint8Array(r.length);for(let e=0;e<r.length;e++)t[e]=r.charCodeAt(e);return t}),W0={utf8:gs,"utf-8":gs,hex:zr.base16,latin1:Pr,ascii:Pr,binary:Pr,...zr},ws=W0});var xs={};M(xs,{fromString:()=>jr});function jr(r,t="utf8"){let e=ws[t];if(!e)throw new Error(`Unsupported encoding "${t}"`);return e.decoder.decode(`${e.prefix}${r}`)}var Rr=U(()=>{bs()});var Ts=k((oh,Is)=>{"use strict";var Ce=7;Is.exports=class{constructor(){this._bitArrays=[],this._data=[],this._length=0,this._changedLength=!1,this._changedData=!1}set(t,e){let n=this._internalPositionFor(t,!1);if(e===void 0)n!==-1&&(this._unsetInternalPos(n),this._unsetBit(t),this._changedLength=!0,this._changedData=!0);else{let i=!1;n===-1?(n=this._data.length,this._setBit(t),this._changedData=!0):i=!0,this._setInternalPos(n,t,e,i),this._changedLength=!0}}unset(t){this.set(t,void 0)}get(t){this._sortData();let e=this._internalPositionFor(t,!0);if(e!==-1)return this._data[e][1]}push(t){return this.set(this.length,t),this.length}get length(){if(this._sortData(),this._changedLength){let t=this._data[this._data.length-1];this._length=t?t[0]+1:0,this._changedLength=!1}return this._length}forEach(t){let e=0;for(;e<this.length;)t(this.get(e),e,this),e++}map(t){let e=0,n=new Array(this.length);for(;e<this.length;)n[e]=t(this.get(e),e,this),e++;return n}reduce(t,e){let n=0,i=e;for(;n<this.length;){let o=this.get(n);i=t(i,o,n),n++}return i}find(t){let e=0,n,i;for(;e<this.length&&!n;)i=this.get(e),n=t(i),e++;return n?i:void 0}_internalPositionFor(t,e){let n=this._bytePosFor(t,e);if(n>=this._bitArrays.length)return-1;let i=this._bitArrays[n],o=t-n*Ce;if(!((i&1<<o)>0))return-1;let c=this._bitArrays.slice(0,n).reduce(Q0,0),a=~(4294967295<<o+1),h=Ss(i&a);return c+h-1}_bytePosFor(t,e){let n=Math.floor(t/Ce),i=n+1;for(;!e&&this._bitArrays.length<i;)this._bitArrays.push(0);return n}_setBit(t){let e=this._bytePosFor(t,!1);this._bitArrays[e]|=1<<t-e*Ce}_unsetBit(t){let e=this._bytePosFor(t,!1);this._bitArrays[e]&=~(1<<t-e*Ce)}_setInternalPos(t,e,n,i){let o=this._data,s=[e,n];if(i)this._sortData(),o[t]=s;else{if(o.length)if(o[o.length-1][0]>=e)o.push(s);else if(o[0][0]<=e)o.unshift(s);else{let c=Math.round(o.length/2);this._data=o.slice(0,c).concat(s).concat(o.slice(c))}else this._data.push(s);this._changedData=!0,this._changedLength=!0}}_unsetInternalPos(t){this._data.splice(t,1)}_sortData(){this._changedData&&this._data.sort(tc),this._changedData=!1}bitField(){let t=[],e=8,n=0,i=0,o,s=this._bitArrays.slice();for(;s.length||n;){n===0&&(o=s.shift(),n=7);let a=Math.min(n,e),h=~(255<<a);i|=(o&h)<<8-e,o=o>>>a,n-=a,e-=a,(!e||!n&&!s.length)&&(t.push(i),i=0,e=8)}for(var c=t.length-1;c>0&&t[c]===0;c--)t.pop();return t}compactArray(){return this._sortData(),this._data.map(ec)}};function Q0(r,t){return r+Ss(t)}function Ss(r){let t=r;return t=t-(t>>1&1431655765),t=(t&858993459)+(t>>2&858993459),(t+(t>>4)&252645135)*16843009>>24}function tc(r,t){return r[0]-t[0]}function ec(r){return r[1]}});var Ds=k((sh,Fs)=>{"use strict";var rc=Ts(),{fromString:nc}=(Rr(),xs),nt=class{constructor(t,e,n=0){this._options=t,this._popCount=0,this._parent=e,this._posAtParent=n,this._children=new rc,this.key=null}async put(t,e){let n=await this._findNewBucketAndPos(t);await n.bucket._putAt(n,t,e)}async get(t){let e=await this._findChild(t);if(e)return e.value}async del(t){let e=await this._findPlace(t),n=e.bucket._at(e.pos);n&&n.key===t&&e.bucket._delAt(e.pos)}leafCount(){return this._children.compactArray().reduce((e,n)=>n instanceof nt?e+n.leafCount():e+1,0)}childrenCount(){return this._children.length}onlyChild(){return this._children.get(0)}*eachLeafSeries(){let t=this._children.compactArray();for(let e of t)e instanceof nt?yield*e.eachLeafSeries():yield e;return[]}serialize(t,e){let n=[];return e(this._children.reduce((i,o,s)=>(o&&(o instanceof nt?i.push(o.serialize(t,e)):i.push(t(o,s))),i),n))}asyncTransform(t,e){return ks(this,t,e)}toJSON(){return this.serialize(oc,sc)}prettyPrint(){return JSON.stringify(this.toJSON(),null," ")}tableSize(){return Math.pow(2,this._options.bits)}async _findChild(t){let e=await this._findPlace(t),n=e.bucket._at(e.pos);if(!(n instanceof nt)&&n&&n.key===t)return n}async _findPlace(t){let e=this._options.hash(typeof t=="string"?nc(t):t),n=await e.take(this._options.bits),i=this._children.get(n);return i instanceof nt?i._findPlace(e):{bucket:this,pos:n,hash:e,existingChild:i}}async _findNewBucketAndPos(t){let e=await this._findPlace(t);if(e.existingChild&&e.existingChild.key!==t){let n=new nt(this._options,e.bucket,e.pos);e.bucket._putObjectAt(e.pos,n);let i=await n._findPlace(e.existingChild.hash);return i.bucket._putAt(i,e.existingChild.key,e.existingChild.value),n._findNewBucketAndPos(e.hash)}return e}_putAt(t,e,n){this._putObjectAt(t.pos,{key:e,value:n,hash:t.hash})}_putObjectAt(t,e){this._children.get(t)||this._popCount++,this._children.set(t,e)}_delAt(t){if(t===-1)throw new Error("Invalid position");this._children.get(t)&&this._popCount--,this._children.unset(t),this._level()}_level(){if(this._parent&&this._popCount<=1)if(this._popCount===1){let t=this._children.find(ic);if(t&&!(t instanceof nt)){let e=t.hash;e.untake(this._options.bits);let n={pos:this._posAtParent,hash:e,bucket:this._parent};this._parent._putAt(n,t.key,t.value)}}else this._parent._delAt(this._posAtParent)}_at(t){return this._children.get(t)}};function ic(r){return Boolean(r)}function oc(r,t){return r.key}function sc(r){return r}async function ks(r,t,e){let n=[];for(let i of r._children.compactArray())if(i instanceof nt)await ks(i,t,e);else{let o=await t(i);n.push({bitField:r._children.bitField(),children:o})}return e(n)}Fs.exports=nt});var Ls=k((ch,Cs)=>{"use strict";var ac=[255,254,252,248,240,224,192,128],cc=[1,3,7,15,31,63,127,255];Cs.exports=class{constructor(t){this._value=t,this._currentBytePos=t.length-1,this._currentBitPos=7}availableBits(){return this._currentBitPos+1+this._currentBytePos*8}totalBits(){return this._value.length*8}take(t){let e=t,n=0;for(;e&&this._haveBits();){let i=this._value[this._currentBytePos],o=this._currentBitPos+1,s=Math.min(o,e),c=fc(i,o-s,s);n=(n<<s)+c,e-=s,this._currentBitPos-=s,this._currentBitPos<0&&(this._currentBitPos=7,this._currentBytePos--)}return n}untake(t){for(this._currentBitPos+=t;this._currentBitPos>7;)this._currentBitPos-=8,this._currentBytePos+=1}_haveBits(){return this._currentBytePos>=0}};function fc(r,t,e){let n=uc(t,e);return(r&n)>>>t}function uc(r,t){return ac[r]&cc[Math.min(t+r-1,7)]}});var Ns={};M(Ns,{concat:()=>hc});function hc(r,t){t||(t=r.reduce((i,o)=>i+o.length,0));let e=new Uint8Array(t),n=0;for(let i of r)e.set(i,n),n+=i.length;return e}var Us=U(()=>{});var vs=k((fh,Vr)=>{"use strict";var lc=Ls(),{concat:pc}=(Us(),Ns);function dc(r){function t(e){return e instanceof Le?e:new Le(e,r)}return t}var Le=class{constructor(t,e){if(!(t instanceof Uint8Array))throw new Error("can only hash Uint8Arrays");this._value=t,this._hashFn=e,this._depth=-1,this._availableBits=0,this._currentBufferIndex=0,this._buffers=[]}async take(t){let e=t;for(;this._availableBits<e;)await this._produceMoreBits();let n=0;for(;e>0;){let i=this._buffers[this._currentBufferIndex],o=Math.min(i.availableBits(),e),s=i.take(o);n=(n<<o)+s,e-=o,this._availableBits-=o,i.availableBits()===0&&this._currentBufferIndex++}return n}untake(t){let e=t;for(;e>0;){let n=this._buffers[this._currentBufferIndex],i=Math.min(n.totalBits()-n.availableBits(),e);n.untake(i),e-=i,this._availableBits+=i,this._currentBufferIndex>0&&n.totalBits()===n.availableBits()&&(this._depth--,this._currentBufferIndex--)}}async _produceMoreBits(){this._depth++;let t=this._depth?pc([this._value,Uint8Array.from([this._depth])]):this._value,e=await this._hashFn(t),n=new lc(e);this._buffers.push(n),this._availableBits+=n.availableBits()}};Vr.exports=dc;Vr.exports.InfiniteHash=Le});var Ps=k((uh,zs)=>{"use strict";var Os=Ds(),yc=vs();function mc(r){if(!r||!r.hashFn)throw new Error("please define an options.hashFn");let t={bits:r.bits||8,hash:yc(r.hashFn)};return new Os(t)}zs.exports={createHAMT:mc,Bucket:Os}});var Bc={};M(Bc,{importer:()=>_c});var Ws=H(Ue());var rn=H(en()),nn=rn.default;he();ue();$e();var Ge=H(kn());function Z1(r){let t=new Array(4);for(let e=0;e<4;e++)t[e]=r&255,r=r>>8;return new Uint8Array(t)}var Zc=Dt({name:"murmur3-32",code:35,encode:r=>Z1(Ge.default.x86.hash32(r))}),Fn=Dt({name:"murmur3-128",code:34,encode:r=>Rt.fromHex(Ge.default.x64.hash128(r))});async function X1(r){return(await Fn.encode(r)).slice(0,8).reverse()}var Q1={chunker:"fixed",strategy:"balanced",rawLeaves:!1,onlyHash:!1,reduceSingleLeafToSelf:!0,hasher:Ct,leafType:"file",cidVersion:0,progress:()=>()=>{},shardSplitThreshold:1e3,fileImportConcurrency:50,blockWriteConcurrency:10,minChunkSize:262144,maxChunkSize:262144,avgChunkSize:262144,window:16,polynomial:17437180132763652,maxChildrenPerNode:174,layerRepeat:4,wrapWithDirectory:!1,recursive:!1,hidden:!1,timeout:void 0,hamtHashFn:X1,hamtHashCode:34,hamtBucketBits:8},Dn=(r={})=>nn.bind({ignoreUndefined:!0})(Q1,r);var xe=H(Nn());var ut=H(Di()),Ut=ut.default.Reader,sr=ut.default.Writer,S=ut.default.util,V=ut.default.roots["ipfs-unixfs"]||(ut.default.roots["ipfs-unixfs"]={}),Ci=V.Data=(()=>{function r(t){if(this.blocksizes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return r.prototype.Type=0,r.prototype.Data=S.newBuffer([]),r.prototype.filesize=S.Long?S.Long.fromBits(0,0,!0):0,r.prototype.blocksizes=S.emptyArray,r.prototype.hashType=S.Long?S.Long.fromBits(0,0,!0):0,r.prototype.fanout=S.Long?S.Long.fromBits(0,0,!0):0,r.prototype.mode=0,r.prototype.mtime=null,r.encode=function(e,n){if(n||(n=sr.create()),n.uint32(8).int32(e.Type),e.Data!=null&&Object.hasOwnProperty.call(e,"Data")&&n.uint32(18).bytes(e.Data),e.filesize!=null&&Object.hasOwnProperty.call(e,"filesize")&&n.uint32(24).uint64(e.filesize),e.blocksizes!=null&&e.blocksizes.length)for(var i=0;i<e.blocksizes.length;++i)n.uint32(32).uint64(e.blocksizes[i]);return e.hashType!=null&&Object.hasOwnProperty.call(e,"hashType")&&n.uint32(40).uint64(e.hashType),e.fanout!=null&&Object.hasOwnProperty.call(e,"fanout")&&n.uint32(48).uint64(e.fanout),e.mode!=null&&Object.hasOwnProperty.call(e,"mode")&&n.uint32(56).uint32(e.mode),e.mtime!=null&&Object.hasOwnProperty.call(e,"mtime")&&V.UnixTime.encode(e.mtime,n.uint32(66).fork()).ldelim(),n},r.decode=function(e,n){e instanceof Ut||(e=Ut.create(e));for(var i=n===void 0?e.len:e.pos+n,o=new V.Data;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:o.Type=e.int32();break;case 2:o.Data=e.bytes();break;case 3:o.filesize=e.uint64();break;case 4:if(o.blocksizes&&o.blocksizes.length||(o.blocksizes=[]),(s&7)==2)for(var c=e.uint32()+e.pos;e.pos<c;)o.blocksizes.push(e.uint64());else o.blocksizes.push(e.uint64());break;case 5:o.hashType=e.uint64();break;case 6:o.fanout=e.uint64();break;case 7:o.mode=e.uint32();break;case 8:o.mtime=V.UnixTime.decode(e,e.uint32());break;default:e.skipType(s&7);break}}if(!o.hasOwnProperty("Type"))throw S.ProtocolError("missing required 'Type'",{instance:o});return o},r.fromObject=function(e){if(e instanceof V.Data)return e;var n=new V.Data;switch(e.Type){case"Raw":case 0:n.Type=0;break;case"Directory":case 1:n.Type=1;break;case"File":case 2:n.Type=2;break;case"Metadata":case 3:n.Type=3;break;case"Symlink":case 4:n.Type=4;break;case"HAMTShard":case 5:n.Type=5;break}if(e.Data!=null&&(typeof e.Data=="string"?S.base64.decode(e.Data,n.Data=S.newBuffer(S.base64.length(e.Data)),0):e.Data.length&&(n.Data=e.Data)),e.filesize!=null&&(S.Long?(n.filesize=S.Long.fromValue(e.filesize)).unsigned=!0:typeof e.filesize=="string"?n.filesize=parseInt(e.filesize,10):typeof e.filesize=="number"?n.filesize=e.filesize:typeof e.filesize=="object"&&(n.filesize=new S.LongBits(e.filesize.low>>>0,e.filesize.high>>>0).toNumber(!0))),e.blocksizes){if(!Array.isArray(e.blocksizes))throw TypeError(".Data.blocksizes: array expected");n.blocksizes=[];for(var i=0;i<e.blocksizes.length;++i)S.Long?(n.blocksizes[i]=S.Long.fromValue(e.blocksizes[i])).unsigned=!0:typeof e.blocksizes[i]=="string"?n.blocksizes[i]=parseInt(e.blocksizes[i],10):typeof e.blocksizes[i]=="number"?n.blocksizes[i]=e.blocksizes[i]:typeof e.blocksizes[i]=="object"&&(n.blocksizes[i]=new S.LongBits(e.blocksizes[i].low>>>0,e.blocksizes[i].high>>>0).toNumber(!0))}if(e.hashType!=null&&(S.Long?(n.hashType=S.Long.fromValue(e.hashType)).unsigned=!0:typeof e.hashType=="string"?n.hashType=parseInt(e.hashType,10):typeof e.hashType=="number"?n.hashType=e.hashType:typeof e.hashType=="object"&&(n.hashType=new S.LongBits(e.hashType.low>>>0,e.hashType.high>>>0).toNumber(!0))),e.fanout!=null&&(S.Long?(n.fanout=S.Long.fromValue(e.fanout)).unsigned=!0:typeof e.fanout=="string"?n.fanout=parseInt(e.fanout,10):typeof e.fanout=="number"?n.fanout=e.fanout:typeof e.fanout=="object"&&(n.fanout=new S.LongBits(e.fanout.low>>>0,e.fanout.high>>>0).toNumber(!0))),e.mode!=null&&(n.mode=e.mode>>>0),e.mtime!=null){if(typeof e.mtime!="object")throw TypeError(".Data.mtime: object expected");n.mtime=V.UnixTime.fromObject(e.mtime)}return n},r.toObject=function(e,n){n||(n={});var i={};if((n.arrays||n.defaults)&&(i.blocksizes=[]),n.defaults){if(i.Type=n.enums===String?"Raw":0,n.bytes===String?i.Data="":(i.Data=[],n.bytes!==Array&&(i.Data=S.newBuffer(i.Data))),S.Long){var o=new S.Long(0,0,!0);i.filesize=n.longs===String?o.toString():n.longs===Number?o.toNumber():o}else i.filesize=n.longs===String?"0":0;if(S.Long){var o=new S.Long(0,0,!0);i.hashType=n.longs===String?o.toString():n.longs===Number?o.toNumber():o}else i.hashType=n.longs===String?"0":0;if(S.Long){var o=new S.Long(0,0,!0);i.fanout=n.longs===String?o.toString():n.longs===Number?o.toNumber():o}else i.fanout=n.longs===String?"0":0;i.mode=0,i.mtime=null}if(e.Type!=null&&e.hasOwnProperty("Type")&&(i.Type=n.enums===String?V.Data.DataType[e.Type]:e.Type),e.Data!=null&&e.hasOwnProperty("Data")&&(i.Data=n.bytes===String?S.base64.encode(e.Data,0,e.Data.length):n.bytes===Array?Array.prototype.slice.call(e.Data):e.Data),e.filesize!=null&&e.hasOwnProperty("filesize")&&(typeof e.filesize=="number"?i.filesize=n.longs===String?String(e.filesize):e.filesize:i.filesize=n.longs===String?S.Long.prototype.toString.call(e.filesize):n.longs===Number?new S.LongBits(e.filesize.low>>>0,e.filesize.high>>>0).toNumber(!0):e.filesize),e.blocksizes&&e.blocksizes.length){i.blocksizes=[];for(var s=0;s<e.blocksizes.length;++s)typeof e.blocksizes[s]=="number"?i.blocksizes[s]=n.longs===String?String(e.blocksizes[s]):e.blocksizes[s]:i.blocksizes[s]=n.longs===String?S.Long.prototype.toString.call(e.blocksizes[s]):n.longs===Number?new S.LongBits(e.blocksizes[s].low>>>0,e.blocksizes[s].high>>>0).toNumber(!0):e.blocksizes[s]}return e.hashType!=null&&e.hasOwnProperty("hashType")&&(typeof e.hashType=="number"?i.hashType=n.longs===String?String(e.hashType):e.hashType:i.hashType=n.longs===String?S.Long.prototype.toString.call(e.hashType):n.longs===Number?new S.LongBits(e.hashType.low>>>0,e.hashType.high>>>0).toNumber(!0):e.hashType),e.fanout!=null&&e.hasOwnProperty("fanout")&&(typeof e.fanout=="number"?i.fanout=n.longs===String?String(e.fanout):e.fanout:i.fanout=n.longs===String?S.Long.prototype.toString.call(e.fanout):n.longs===Number?new S.LongBits(e.fanout.low>>>0,e.fanout.high>>>0).toNumber(!0):e.fanout),e.mode!=null&&e.hasOwnProperty("mode")&&(i.mode=e.mode),e.mtime!=null&&e.hasOwnProperty("mtime")&&(i.mtime=V.UnixTime.toObject(e.mtime,n)),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,ut.default.util.toJSONOptions)},r.DataType=function(){let t={},e=Object.create(t);return e[t[0]="Raw"]=0,e[t[1]="Directory"]=1,e[t[2]="File"]=2,e[t[3]="Metadata"]=3,e[t[4]="Symlink"]=4,e[t[5]="HAMTShard"]=5,e}(),r})(),Bf=V.UnixTime=(()=>{function r(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return r.prototype.Seconds=S.Long?S.Long.fromBits(0,0,!1):0,r.prototype.FractionalNanoseconds=0,r.encode=function(e,n){return n||(n=sr.create()),n.uint32(8).int64(e.Seconds),e.FractionalNanoseconds!=null&&Object.hasOwnProperty.call(e,"FractionalNanoseconds")&&n.uint32(21).fixed32(e.FractionalNanoseconds),n},r.decode=function(e,n){e instanceof Ut||(e=Ut.create(e));for(var i=n===void 0?e.len:e.pos+n,o=new V.UnixTime;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:o.Seconds=e.int64();break;case 2:o.FractionalNanoseconds=e.fixed32();break;default:e.skipType(s&7);break}}if(!o.hasOwnProperty("Seconds"))throw S.ProtocolError("missing required 'Seconds'",{instance:o});return o},r.fromObject=function(e){if(e instanceof V.UnixTime)return e;var n=new V.UnixTime;return e.Seconds!=null&&(S.Long?(n.Seconds=S.Long.fromValue(e.Seconds)).unsigned=!1:typeof e.Seconds=="string"?n.Seconds=parseInt(e.Seconds,10):typeof e.Seconds=="number"?n.Seconds=e.Seconds:typeof e.Seconds=="object"&&(n.Seconds=new S.LongBits(e.Seconds.low>>>0,e.Seconds.high>>>0).toNumber())),e.FractionalNanoseconds!=null&&(n.FractionalNanoseconds=e.FractionalNanoseconds>>>0),n},r.toObject=function(e,n){n||(n={});var i={};if(n.defaults){if(S.Long){var o=new S.Long(0,0,!1);i.Seconds=n.longs===String?o.toString():n.longs===Number?o.toNumber():o}else i.Seconds=n.longs===String?"0":0;i.FractionalNanoseconds=0}return e.Seconds!=null&&e.hasOwnProperty("Seconds")&&(typeof e.Seconds=="number"?i.Seconds=n.longs===String?String(e.Seconds):e.Seconds:i.Seconds=n.longs===String?S.Long.prototype.toString.call(e.Seconds):n.longs===Number?new S.LongBits(e.Seconds.low>>>0,e.Seconds.high>>>0).toNumber():e.Seconds),e.FractionalNanoseconds!=null&&e.hasOwnProperty("FractionalNanoseconds")&&(i.FractionalNanoseconds=e.FractionalNanoseconds),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,ut.default.util.toJSONOptions)},r})(),Af=V.Metadata=(()=>{function r(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return r.prototype.MimeType="",r.encode=function(e,n){return n||(n=sr.create()),e.MimeType!=null&&Object.hasOwnProperty.call(e,"MimeType")&&n.uint32(10).string(e.MimeType),n},r.decode=function(e,n){e instanceof Ut||(e=Ut.create(e));for(var i=n===void 0?e.len:e.pos+n,o=new V.Metadata;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:o.MimeType=e.string();break;default:e.skipType(s&7);break}}return o},r.fromObject=function(e){if(e instanceof V.Metadata)return e;var n=new V.Metadata;return e.MimeType!=null&&(n.MimeType=String(e.MimeType)),n},r.toObject=function(e,n){n||(n={});var i={};return n.defaults&&(i.MimeType=""),e.MimeType!=null&&e.hasOwnProperty("MimeType")&&(i.MimeType=e.MimeType),i},r.prototype.toJSON=function(){return this.constructor.toObject(this,ut.default.util.toJSONOptions)},r})();var ht=Ci,Li=["raw","directory","file","metadata","symlink","hamt-sharded-directory"],ua=["directory","hamt-sharded-directory"],Ni=parseInt("0644",8),Ui=parseInt("0755",8);function ar(r){if(r!=null)return typeof r=="number"?r&4095:(r=r.toString(),r.substring(0,1)==="0"?parseInt(r,8)&4095:parseInt(r,10)&4095)}function vi(r){if(r==null)return;let t;if(r.secs!=null&&(t={secs:r.secs,nsecs:r.nsecs}),r.Seconds!=null&&(t={secs:r.Seconds,nsecs:r.FractionalNanoseconds}),Array.isArray(r)&&(t={secs:r[0],nsecs:r[1]}),r instanceof Date){let e=r.getTime(),n=Math.floor(e/1e3);t={secs:n,nsecs:(e-n*1e3)*1e3}}if(!!Object.prototype.hasOwnProperty.call(t,"secs")){if(t!=null&&t.nsecs!=null&&(t.nsecs<0||t.nsecs>999999999))throw(0,xe.default)(new Error("mtime-nsecs must be within the range [0,999999999]"),"ERR_INVALID_MTIME_NSECS");return t}}var $=class{static unmarshal(t){let e=ht.decode(t),n=ht.toObject(e,{defaults:!1,arrays:!0,longs:Number,objects:!1}),i=new $({type:Li[n.Type],data:n.Data,blockSizes:n.blocksizes,mode:n.mode,mtime:n.mtime?{secs:n.mtime.Seconds,nsecs:n.mtime.FractionalNanoseconds}:void 0});return i._originalMode=n.mode||0,i}constructor(t={type:"file"}){let{type:e,data:n,blockSizes:i,hashType:o,fanout:s,mtime:c,mode:a}=t;if(e&&!Li.includes(e))throw(0,xe.default)(new Error("Type: "+e+" is not valid"),"ERR_INVALID_TYPE");this.type=e||"file",this.data=n,this.hashType=o,this.fanout=s,this.blockSizes=i||[],this._originalMode=0,this.mode=ar(a),c&&(this.mtime=vi(c),this.mtime&&!this.mtime.nsecs&&(this.mtime.nsecs=0))}set mode(t){this._mode=this.isDirectory()?Ui:Ni;let e=ar(t);e!==void 0&&(this._mode=e)}get mode(){return this._mode}isDirectory(){return Boolean(this.type&&ua.includes(this.type))}addBlockSize(t){this.blockSizes.push(t)}removeBlockSize(t){this.blockSizes.splice(t,1)}fileSize(){if(this.isDirectory())return 0;let t=0;return this.blockSizes.forEach(e=>{t+=e}),this.data&&(t+=this.data.length),t}marshal(){let t;switch(this.type){case"raw":t=ht.DataType.Raw;break;case"directory":t=ht.DataType.Directory;break;case"file":t=ht.DataType.File;break;case"metadata":t=ht.DataType.Metadata;break;case"symlink":t=ht.DataType.Symlink;break;case"hamt-sharded-directory":t=ht.DataType.HAMTShard;break;default:throw(0,xe.default)(new Error("Type: "+t+" is not valid"),"ERR_INVALID_TYPE")}let e=this.data;(!this.data||!this.data.length)&&(e=void 0);let n;this.mode!=null&&(n=this._originalMode&4294963200|(ar(this.mode)||0),n===Ni&&!this.isDirectory()&&(n=void 0),n===Ui&&this.isDirectory()&&(n=void 0));let i;if(this.mtime!=null){let s=vi(this.mtime);s&&(i={Seconds:s.secs,FractionalNanoseconds:s.nsecs},i.FractionalNanoseconds===0&&delete i.FractionalNanoseconds)}let o={Type:t,Data:e,filesize:this.isDirectory()?void 0:this.fileSize(),blocksizes:this.blockSizes,hashType:this.hashType,fanout:this.fanout,mode:n,mtime:i};return ht.encode(o).finish()}};Gt();var wt={};M(wt,{code:()=>Ba,createLink:()=>$i,createNode:()=>qi,decode:()=>Aa,encode:()=>tt,name:()=>_a,prepare:()=>J,validate:()=>ur});Gt();var ha=new TextDecoder;function cr(r,t){let e=0;for(let n=0;;n+=7){if(n>=64)throw new Error("protobuf: varint overflow");if(t>=r.length)throw new Error("protobuf: unexpected end of data");let i=r[t++];if(e+=n<28?(i&127)<<n:(i&127)*2**n,i<128)break}return[e,t]}function _e(r,t){let e;[e,t]=cr(r,t);let n=t+e;if(e<0||n<0)throw new Error("protobuf: invalid length");if(n>r.length)throw new Error("protobuf: unexpected end of data");return[r.subarray(t,n),n]}function Oi(r,t){let e;return[e,t]=cr(r,t),[e&7,e>>3,t]}function la(r){let t={},e=r.length,n=0;for(;n<e;){let i,o;if([i,o,n]=Oi(r,n),o===1){if(t.Hash)throw new Error("protobuf: (PBLink) duplicate Hash section");if(i!==2)throw new Error(`protobuf: (PBLink) wrong wireType (${i}) for Hash`);if(t.Name!==void 0)throw new Error("protobuf: (PBLink) invalid order, found Name before Hash");if(t.Tsize!==void 0)throw new Error("protobuf: (PBLink) invalid order, found Tsize before Hash");[t.Hash,n]=_e(r,n)}else if(o===2){if(t.Name!==void 0)throw new Error("protobuf: (PBLink) duplicate Name section");if(i!==2)throw new Error(`protobuf: (PBLink) wrong wireType (${i}) for Name`);if(t.Tsize!==void 0)throw new Error("protobuf: (PBLink) invalid order, found Tsize before Name");let s;[s,n]=_e(r,n),t.Name=ha.decode(s)}else if(o===3){if(t.Tsize!==void 0)throw new Error("protobuf: (PBLink) duplicate Tsize section");if(i!==0)throw new Error(`protobuf: (PBLink) wrong wireType (${i}) for Tsize`);[t.Tsize,n]=cr(r,n)}else throw new Error(`protobuf: (PBLink) invalid fieldNumber, expected 1, 2 or 3, got ${o}`)}if(n>e)throw new Error("protobuf: (PBLink) unexpected end of data");return t}function zi(r){let t=r.length,e=0,n,i=!1,o;for(;e<t;){let c,a;if([c,a,e]=Oi(r,e),c!==2)throw new Error(`protobuf: (PBNode) invalid wireType, expected 2, got ${c}`);if(a===1){if(o)throw new Error("protobuf: (PBNode) duplicate Data section");[o,e]=_e(r,e),n&&(i=!0)}else if(a===2){if(i)throw new Error("protobuf: (PBNode) duplicate Links section");n||(n=[]);let h;[h,e]=_e(r,e),n.push(la(h))}else throw new Error(`protobuf: (PBNode) invalid fieldNumber, expected 1 or 2, got ${a}`)}if(e>t)throw new Error("protobuf: (PBNode) unexpected end of data");let s={};return o&&(s.Data=o),s.Links=n||[],s}var Pi=new TextEncoder,ji=2**32,pa=2**31;function da(r,t){let e=t.length;if(typeof r.Tsize=="number"){if(r.Tsize<0)throw new Error("Tsize cannot be negative");if(!Number.isSafeInteger(r.Tsize))throw new Error("Tsize too large for encoding");e=Zt(t,e,r.Tsize)-1,t[e]=24}if(typeof r.Name=="string"){let n=Pi.encode(r.Name);e-=n.length,t.set(n,e),e=Zt(t,e,n.length)-1,t[e]=18}return r.Hash&&(e-=r.Hash.length,t.set(r.Hash,e),e=Zt(t,e,r.Hash.length)-1,t[e]=10),t.length-e}function Ri(r){let t=ma(r),e=new Uint8Array(t),n=t;if(r.Data&&(n-=r.Data.length,e.set(r.Data,n),n=Zt(e,n,r.Data.length)-1,e[n]=10),r.Links)for(let i=r.Links.length-1;i>=0;i--){let o=da(r.Links[i],e.subarray(0,n));n-=o,n=Zt(e,n,o)-1,e[n]=18}return e}function ya(r){let t=0;if(r.Hash){let e=r.Hash.length;t+=1+e+vt(e)}if(typeof r.Name=="string"){let e=Pi.encode(r.Name).length;t+=1+e+vt(e)}return typeof r.Tsize=="number"&&(t+=1+vt(r.Tsize)),t}function ma(r){let t=0;if(r.Data){let e=r.Data.length;t+=1+e+vt(e)}if(r.Links)for(let e of r.Links){let n=ya(e);t+=1+n+vt(n)}return t}function Zt(r,t,e){t-=vt(e);let n=t;for(;e>=pa;)r[t++]=e&127|128,e/=128;for(;e>=128;)r[t++]=e&127|128,e>>>=7;return r[t]=e,n}function vt(r){return r%2==0&&r++,Math.floor((ga(r)+6)/7)}function ga(r){let t=0;return r>=ji&&(r=Math.floor(r/ji),t=32),r>=1<<16&&(r>>>=16,t+=16),r>=1<<8&&(r>>>=8,t+=8),t+wa[r]}var wa=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8];Gt();var ba=["Data","Links"],xa=["Hash","Name","Tsize"],fr=new TextEncoder;function Mi(r,t){if(r===t)return 0;let e=r.Name?fr.encode(r.Name):[],n=t.Name?fr.encode(t.Name):[],i=e.length,o=n.length;for(let s=0,c=Math.min(i,o);s<c;++s)if(e[s]!==n[s]){i=e[s],o=n[s];break}return i<o?-1:o<i?1:0}function Hi(r,t){return!Object.keys(r).some(e=>!t.includes(e))}function Vi(r){if(typeof r.asCID=="object"){let e=L.asCID(r);if(!e)throw new TypeError("Invalid DAG-PB form");return{Hash:e}}if(typeof r!="object"||Array.isArray(r))throw new TypeError("Invalid DAG-PB form");let t={};if(r.Hash){let e=L.asCID(r.Hash);try{e||(typeof r.Hash=="string"?e=L.parse(r.Hash):r.Hash instanceof Uint8Array&&(e=L.decode(r.Hash)))}catch(n){throw new TypeError(`Invalid DAG-PB form: ${n.message}`)}e&&(t.Hash=e)}if(!t.Hash)throw new TypeError("Invalid DAG-PB form");return typeof r.Name=="string"&&(t.Name=r.Name),typeof r.Tsize=="number"&&(t.Tsize=r.Tsize),t}function J(r){if((r instanceof Uint8Array||typeof r=="string")&&(r={Data:r}),typeof r!="object"||Array.isArray(r))throw new TypeError("Invalid DAG-PB form");let t={};if(r.Data!==void 0)if(typeof r.Data=="string")t.Data=fr.encode(r.Data);else if(r.Data instanceof Uint8Array)t.Data=r.Data;else throw new TypeError("Invalid DAG-PB form");if(r.Links!==void 0)if(Array.isArray(r.Links))t.Links=r.Links.map(Vi),t.Links.sort(Mi);else throw new TypeError("Invalid DAG-PB form");else t.Links=[];return t}function ur(r){if(!r||typeof r!="object"||Array.isArray(r))throw new TypeError("Invalid DAG-PB form");if(!Hi(r,ba))throw new TypeError("Invalid DAG-PB form (extraneous properties)");if(r.Data!==void 0&&!(r.Data instanceof Uint8Array))throw new TypeError("Invalid DAG-PB form (Data must be a Uint8Array)");if(!Array.isArray(r.Links))throw new TypeError("Invalid DAG-PB form (Links must be an array)");for(let t=0;t<r.Links.length;t++){let e=r.Links[t];if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError("Invalid DAG-PB form (bad link object)");if(!Hi(e,xa))throw new TypeError("Invalid DAG-PB form (extraneous properties on link object)");if(!e.Hash)throw new TypeError("Invalid DAG-PB form (link must have a Hash)");if(e.Hash.asCID!==e.Hash)throw new TypeError("Invalid DAG-PB form (link Hash must be a CID)");if(e.Name!==void 0&&typeof e.Name!="string")throw new TypeError("Invalid DAG-PB form (link Name must be a string)");if(e.Tsize!==void 0&&(typeof e.Tsize!="number"||e.Tsize%1!=0))throw new TypeError("Invalid DAG-PB form (link Tsize must be an integer)");if(t>0&&Mi(e,r.Links[t-1])===-1)throw new TypeError("Invalid DAG-PB form (links must be sorted by Name bytes)")}}function qi(r,t=[]){return J({Data:r,Links:t})}function $i(r,t,e){return Vi({Hash:e,Name:r,Tsize:t})}var _a="dag-pb",Ba=112;function tt(r){ur(r);let t={};return r.Links&&(t.Links=r.Links.map(e=>{let n={};return e.Hash&&(n.Hash=e.Hash.bytes),e.Name!==void 0&&(n.Name=e.Name),e.Tsize!==void 0&&(n.Tsize=e.Tsize),n})),r.Data&&(t.Data=r.Data),Ri(t)}function Aa(r){let t=zi(r),e={};return t.Data&&(e.Data=t.Data),t.Links&&(e.Links=t.Links.map(n=>{let i={};try{i.Hash=L.decode(n.Hash)}catch(o){}if(!i.Hash)throw new Error("Invalid Hash field found in link, expected CID");return n.Name!==void 0&&(i.Name=n.Name),n.Tsize!==void 0&&(i.Tsize=n.Tsize),i})),e}he();var Ea=async(r,t,e)=>{e.codec||(e.codec=wt),e.hasher||(e.hasher=Ct),e.cidVersion===void 0&&(e.cidVersion=1),e.codec===wt&&e.hasher!==Ct&&(e.cidVersion=1);let n=await e.hasher.digest(r),i=L.create(e.cidVersion,e.codec.code,n);return e.onlyHash||await t.put(i,r,{signal:e.signal}),i},et=Ea;var Sa=async(r,t,e)=>{let n=new $({type:"directory",mtime:r.mtime,mode:r.mode}),i=tt(J({Data:n.marshal()})),o=await et(i,t,e),s=r.path;return{cid:o,path:s,unixfs:n,size:i.length}},Gi=Sa;var so=H(Xt());var ao=H(Ue());Ee();var Zi=H(Ji());async function Ca(r,t){return t(await(0,Zi.default)(r))}var Xi=Ca;var Qi=H(se());function La(r,t,e){return to(r,t,e)}async function to(r,t,e){let n=[];for await(let i of(0,Qi.default)(r,e.maxChildrenPerNode))n.push(await t(i));return n.length>1?to(n,t,e):n[0]}var eo=La;var ro=H(se());async function Na(r,t,e){let n=new io(e.layerRepeat),i=0,o=1,s=n;for await(let c of(0,ro.default)(r,e.maxChildrenPerNode))s.isFull()&&(s!==n&&n.addChild(await s.reduce(t)),i&&i%e.layerRepeat==0&&o++,s=new hr(o,e.layerRepeat,i),i++),s.append(c);return s&&s!==n&&n.addChild(await s.reduce(t)),n.reduce(t)}var no=Na,hr=class{constructor(t,e,n=0){this.maxDepth=t,this.layerRepeat=e,this.currentDepth=1,this.iteration=n,this.root=this.node=this.parent={children:[],depth:this.currentDepth,maxDepth:t,maxChildren:(this.maxDepth-this.currentDepth)*this.layerRepeat}}isFull(){if(!this.root.data)return!1;if(this.currentDepth<this.maxDepth&&this.node.maxChildren)return this._addNextNodeToParent(this.node),!1;let t=this._findParent(this.node,this.currentDepth);return t?(this._addNextNodeToParent(t),!1):!0}_addNextNodeToParent(t){this.parent=t;let e={children:[],depth:t.depth+1,parent:t,maxDepth:this.maxDepth,maxChildren:Math.floor(t.children.length/this.layerRepeat)*this.layerRepeat};t.children.push(e),this.currentDepth=e.depth,this.node=e}append(t){this.node.data=t}reduce(t){return this._reduce(this.root,t)}async _reduce(t,e){let n=[];return t.children.length&&(n=await Promise.all(t.children.filter(i=>i.data).map(i=>this._reduce(i,e)))),e((t.data||[]).concat(n))}_findParent(t,e){let n=t.parent;if(!(!n||n.depth===0))return n.children.length===n.maxChildren||!n.maxChildren?this._findParent(n,e):n}},io=class extends hr{constructor(t){super(0,t);this.root.depth=0,this.currentDepth=1}addChild(t){this.root.children.push(t)}reduce(t){return t((this.root.data||[]).concat(this.root.children))}};Ee();async function*Ua(r,t,e){for await(let n of r.content)yield async()=>{e.progress(n.length,r.path);let i,o={codec:wt,cidVersion:e.cidVersion,hasher:e.hasher,onlyHash:e.onlyHash};return e.rawLeaves?(o.codec=Ae,o.cidVersion=1):(i=new $({type:e.leafType,data:n}),n=tt({Data:i.marshal(),Links:[]})),{cid:await et(n,t,o),unixfs:i,size:n.length}}}var oo=Ua;var va={flat:Xi,balanced:eo,trickle:no};async function*Oa(r,t,e){let n=-1,i,o;typeof e.bufferImporter=="function"?o=e.bufferImporter:o=oo;for await(let s of(0,ao.default)(o(r,t,e),e.blockWriteConcurrency)){if(n++,n===0){i=s;continue}else n===1&&i&&(yield i,i=null);yield s}i&&(i.single=!0,yield i)}var za=(r,t,e)=>{async function n(i){if(i.length===1&&i[0].single&&e.reduceSingleLeafToSelf){let u=i[0];if(r.mtime!==void 0||r.mode!==void 0){let d=await t.get(u.cid);u.unixfs=new $({type:"file",mtime:r.mtime,mode:r.mode,data:d}),d=tt(J({Data:u.unixfs.marshal()})),u.cid=await et(d,t,{...e,codec:wt,hasher:e.hasher,cidVersion:e.cidVersion}),u.size=d.length}return{cid:u.cid,path:r.path,unixfs:u.unixfs,size:u.size}}let o=new $({type:"file",mtime:r.mtime,mode:r.mode}),s=i.filter(u=>u.cid.code===Be&&u.size||u.unixfs&&!u.unixfs.data&&u.unixfs.fileSize()?!0:Boolean(u.unixfs&&u.unixfs.data&&u.unixfs.data.length)).map(u=>u.cid.code===Be?(o.addBlockSize(u.size),{Name:"",Tsize:u.size,Hash:u.cid}):(!u.unixfs||!u.unixfs.data?o.addBlockSize(u.unixfs&&u.unixfs.fileSize()||0):o.addBlockSize(u.unixfs.data.length),{Name:"",Tsize:u.size,Hash:u.cid})),c={Data:o.marshal(),Links:s},a=tt(J(c));return{cid:await et(a,t,e),path:r.path,unixfs:o,size:a.length+c.Links.reduce((u,d)=>u+d.Tsize,0)}}return n};function Pa(r,t,e){let n=va[e.strategy];if(!n)throw(0,so.default)(new Error(`Unknown importer build strategy name: ${e.strategy}`),"ERR_BAD_STRATEGY");return n(Oa(r,t,e),za(r,t,e),e)}var co=Pa;var Hr=H(Xt());var ts=H(Br()),es=H(Qo()),kr=H(Xt());async function*k0(r,t){let e,n,i;if(t.minChunkSize&&t.maxChunkSize&&t.avgChunkSize)i=t.avgChunkSize,e=t.minChunkSize,n=t.maxChunkSize;else if(t.avgChunkSize)i=t.avgChunkSize,e=i/3,n=i+i/2;else throw(0,kr.default)(new Error("please specify an average chunk size"),"ERR_INVALID_AVG_CHUNK_SIZE");if(e<16)throw(0,kr.default)(new Error("rabin min must be greater than 16"),"ERR_INVALID_MIN_CHUNK_SIZE");n<e&&(n=e),i<e&&(i=e);let o=Math.floor(Math.log2(i));for await(let s of F0(r,{min:e,max:n,bits:o,window:t.window,polynomial:t.polynomial}))yield s}var rs=k0;async function*F0(r,t){let e=await(0,es.create)(t.bits,t.min,t.max,t.window),n=new ts.default;for await(let i of r){n.append(i);let o=e.fingerprint(i);for(let s=0;s<o.length;s++){let c=o[s],a=n.slice(0,c);n.consume(c),yield a}}n.length&&(yield n.slice(0))}var De=H(Br());async function*D0(r,t){let e=new De.default,n=0,i=!1,o=t.maxChunkSize;for await(let s of r)for(e.append(s),n+=s.length;n>=o;)if(yield e.slice(0,o),i=!0,o===e.length)e=new De.default,n=0;else{let c=new De.default;c.append(e.shallowSlice(o)),e=c,n-=o}(!i||n)&&(yield e.slice(0,n))}var ns=D0;var Mr=H(Xt());Rr();async function*Y0(r){for await(let t of r){if(t.length===void 0)throw(0,Mr.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT");if(typeof t=="string"||t instanceof String)yield jr(t.toString());else if(Array.isArray(t))yield Uint8Array.from(t);else if(t instanceof Uint8Array)yield t;else throw(0,Mr.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT")}}var _s=Y0;function K0(r){return Symbol.iterator in r}function J0(r){return Symbol.asyncIterator in r}function Z0(r){try{if(r instanceof Uint8Array)return async function*(){yield r}();if(K0(r))return async function*(){yield*r}();if(J0(r))return r}catch{throw(0,Hr.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT")}throw(0,Hr.default)(new Error("Content was invalid"),"ERR_INVALID_CONTENT")}async function*X0(r,t,e){for await(let n of r)if(n.path&&(n.path.substring(0,2)==="./"&&(e.wrapWithDirectory=!0),n.path=n.path.split("/").filter(i=>i&&i!==".").join("/")),n.content){let i;typeof e.chunker=="function"?i=e.chunker:e.chunker==="rabin"?i=rs:i=ns;let o;typeof e.chunkValidator=="function"?o=e.chunkValidator:o=_s;let s={path:n.path,mtime:n.mtime,mode:n.mode,content:i(o(Z0(n.content),e),e)};yield()=>co(s,t,e)}else if(n.path){let i={path:n.path,mtime:n.mtime,mode:n.mode};yield()=>Gi(i,t,e)}else throw new Error("Import candidate must have content or path or both")}var Bs=X0;var As=class{constructor(t,e){this.options=e||{},this.root=t.root,this.dir=t.dir,this.path=t.path,this.dirty=t.dirty,this.flat=t.flat,this.parent=t.parent,this.parentKey=t.parentKey,this.unixfs=t.unixfs,this.mode=t.mode,this.mtime=t.mtime,this.cid=void 0,this.size=void 0}async put(t,e){}get(t){return Promise.resolve(this)}async*eachChildSeries(){}async*flush(t){}},xt=As;var Es=class extends xt{constructor(t,e){super(t,e);this._children={}}async put(t,e){this.cid=void 0,this.size=void 0,this._children[t]=e}get(t){return Promise.resolve(this._children[t])}childCount(){return Object.keys(this._children).length}directChildrenCount(){return this.childCount()}onlyChild(){return this._children[Object.keys(this._children)[0]]}async*eachChildSeries(){let t=Object.keys(this._children);for(let e=0;e<t.length;e++){let n=t[e];yield{key:n,child:this._children[n]}}}async*flush(t){let e=Object.keys(this._children),n=[];for(let h=0;h<e.length;h++){let u=this._children[e[h]];if(u instanceof xt)for await(let d of u.flush(t))u=d,yield u;u.size!=null&&u.cid&&n.push({Name:e[h],Tsize:u.size,Hash:u.cid})}let i=new $({type:"directory",mtime:this.mtime,mode:this.mode}),o={Data:i.marshal(),Links:n},s=tt(J(o)),c=await et(s,t,this.options),a=s.length+o.Links.reduce((h,u)=>h+(u.Tsize==null?0:u.Tsize),0);this.cid=c,this.size=a,yield{cid:c,unixfs:i,path:this.path,size:a}}},ne=Es;var Ne=H(Ps()),js=class extends xt{constructor(t,e){super(t,e);this._bucket=(0,Ne.createHAMT)({hashFn:e.hamtHashFn,bits:e.hamtBucketBits})}async put(t,e){await this._bucket.put(t,e)}get(t){return this._bucket.get(t)}childCount(){return this._bucket.leafCount()}directChildrenCount(){return this._bucket.childrenCount()}onlyChild(){return this._bucket.onlyChild()}async*eachChildSeries(){for await(let{key:t,value:e}of this._bucket.eachLeafSeries())yield{key:t,child:e}}async*flush(t){for await(let e of Ms(this._bucket,t,this,this.options))yield{...e,path:this.path}}},Rs=js;async function*Ms(r,t,e,n){let i=r._children,o=[],s=0;for(let f=0;f<i.length;f++){let p=i.get(f);if(!p)continue;let g=f.toString(16).toUpperCase().padStart(2,"0");if(p instanceof Ne.Bucket){let C;for await(let m of await Ms(p,t,null,n))C=m;if(!C)throw new Error("Could not flush sharded directory, no subshard found");o.push({Name:g,Tsize:C.size,Hash:C.cid}),s+=C.size}else if(typeof p.value.flush=="function"){let C=p.value,m;for await(let x of C.flush(t))m=x,yield m;let w=g+p.key;o.push({Name:w,Tsize:m.size,Hash:m.cid}),s+=m.size}else{let C=p.value;if(!C.cid)continue;let m=g+p.key,w=C.size;o.push({Name:m,Tsize:w,Hash:C.cid}),s+=w}}let c=Uint8Array.from(i.bitField().reverse()),a=new $({type:"hamt-sharded-directory",data:c,fanout:r.tableSize(),hashType:n.hamtHashCode,mtime:e&&e.mtime,mode:e&&e.mode}),h={Data:a.marshal(),Links:o},u=tt(J(h)),d=await et(u,t,n),E=u.length+s;yield{cid:d,unixfs:a,size:E}}async function Hs(r,t,e,n){let i=t;t instanceof ne&&t.directChildrenCount()>=e&&(i=await gc(t,n));let o=i.parent;if(o){if(i!==t){if(r&&(r.parent=i),!i.parentKey)throw new Error("No parent key found");await o.put(i.parentKey,i)}return Hs(i,o,e,n)}return i}async function gc(r,t){let e=new Rs({root:r.root,dir:!0,parent:r.parent,parentKey:r.parentKey,path:r.path,dirty:r.dirty,flat:!1,mtime:r.mtime,mode:r.mode},t);for await(let{key:n,child:i}of r.eachChildSeries())await e.put(n,i);return e}var Vs=Hs;var wc=(r="")=>(r.trim().match(/([^\\/]|\\\/)+/g)||[]).filter(Boolean),qs=wc;async function bc(r,t,e){let n=qs(r.path||""),i=n.length-1,o=t,s="";for(let c=0;c<n.length;c++){let a=n[c];s+=`${s?"/":""}${a}`;let h=c===i;if(o.dirty=!0,o.cid=void 0,o.size=void 0,h)await o.put(a,r),t=await Vs(null,o,e.shardSplitThreshold,e);else{let u=await o.get(a);(!u||!(u instanceof xt))&&(u=new ne({root:!1,dir:!0,parent:o,parentKey:a,path:s,dirty:!0,flat:!0,mtime:u&&u.unixfs&&u.unixfs.mtime,mode:u&&u.unixfs&&u.unixfs.mode},e)),await o.put(a,u),o=u}}return t}async function*$s(r,t){if(!(r instanceof xt)){r&&r.unixfs&&r.unixfs.isDirectory()&&(yield r);return}yield*r.flush(t)}async function*xc(r,t,e){let n=new ne({root:!0,dir:!0,path:"",dirty:!0,flat:!0},e);for await(let i of r)!i||(n=await bc(i,n,e),(!i.unixfs||!i.unixfs.isDirectory())&&(yield i));if(e.wrapWithDirectory)yield*$s(n,t);else for await(let i of n.eachChildSeries())!i||(yield*$s(i.child,t))}var Gs=xc;async function*_c(r,t,e={}){let n=Dn(e),i;typeof e.dagBuilder=="function"?i=e.dagBuilder:i=Bs;let o;typeof e.treeBuilder=="function"?o=e.treeBuilder:o=Gs;let s;Symbol.asyncIterator in r||Symbol.iterator in r?s=r:s=[r];for await(let c of o((0,Ws.default)(i(s,t,n),n.fileImportConcurrency),t,n))yield{cid:c.cid,path:c.path,unixfs:c.unixfs,size:c.size}}return Bc;})();
|
|
17
17
|
/*!
|
|
18
18
|
* The buffer module from node.js, for the browser.
|
|
19
19
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ipfs-unixfs-importer",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.10",
|
|
4
4
|
"description": "JavaScript implementation of the UnixFs importer used by IPFS",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/ipfs/js-ipfs-unixfs/tree/master/packages/ipfs-unixfs-importer#readme",
|
|
@@ -19,18 +19,6 @@
|
|
|
19
19
|
"npm": ">=7.0.0"
|
|
20
20
|
},
|
|
21
21
|
"types": "types/src/index.d.ts",
|
|
22
|
-
"typesVersions": {
|
|
23
|
-
"*": {
|
|
24
|
-
"*": [
|
|
25
|
-
"types/*",
|
|
26
|
-
"types/src/*"
|
|
27
|
-
],
|
|
28
|
-
"types/*": [
|
|
29
|
-
"types/*",
|
|
30
|
-
"types/src/*"
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
22
|
"files": [
|
|
35
23
|
"*",
|
|
36
24
|
"!**/*.tsbuildinfo",
|
|
@@ -145,10 +133,9 @@
|
|
|
145
133
|
"test:firefox": "aegir test -t browser -- --browser firefox",
|
|
146
134
|
"build": "aegir build && cp -R types dist",
|
|
147
135
|
"preleaseOnly": "npx json -I -f dist/package.json -e this.types='\"src/index.d.ts\"'",
|
|
148
|
-
"clean": "rimraf ./dist",
|
|
136
|
+
"clean": "rimraf ./dist ./types",
|
|
149
137
|
"lint": "aegir ts -p check && aegir lint",
|
|
150
|
-
"
|
|
151
|
-
"de-pcheck": "aegir dep-check -i @types/mocha -i nyc -i rimraf -i copy -i util -i crypto-browserify -i events -i readable-stream -i assert",
|
|
138
|
+
"dep-check": "aegir dep-check -i rimraf -i copy -i util -i crypto-browserify -i events -i readable-stream -i assert -i interface-blockstore",
|
|
152
139
|
"release": "semantic-release"
|
|
153
140
|
},
|
|
154
141
|
"dependencies": {
|
|
@@ -157,7 +144,7 @@
|
|
|
157
144
|
"bl": "^5.0.0",
|
|
158
145
|
"err-code": "^3.0.1",
|
|
159
146
|
"hamt-sharding": "^2.0.0",
|
|
160
|
-
"interface-blockstore": "^
|
|
147
|
+
"interface-blockstore": "^2.0.3",
|
|
161
148
|
"ipfs-unixfs": "^6.0.0",
|
|
162
149
|
"it-all": "^1.0.5",
|
|
163
150
|
"it-batch": "^1.0.8",
|
|
@@ -169,14 +156,13 @@
|
|
|
169
156
|
"uint8arrays": "^3.0.0"
|
|
170
157
|
},
|
|
171
158
|
"devDependencies": {
|
|
172
|
-
"@types/mocha": "^8.2.1",
|
|
173
159
|
"aegir": "^36.2.3",
|
|
174
160
|
"assert": "^2.0.0",
|
|
161
|
+
"blockstore-core": "^1.0.5",
|
|
175
162
|
"copy": "^0.3.2",
|
|
176
163
|
"crypto-browserify": "^3.12.0",
|
|
177
164
|
"events": "^3.3.0",
|
|
178
165
|
"it-buffer-stream": "^2.0.0",
|
|
179
|
-
"nyc": "^15.0.0",
|
|
180
166
|
"readable-stream": "^3.6.0",
|
|
181
167
|
"rimraf": "^3.0.2",
|
|
182
168
|
"util": "^0.12.3",
|
|
@@ -6,5 +6,5 @@ export type BufferImporter = import('../../types').BufferImporter;
|
|
|
6
6
|
/**
|
|
7
7
|
* @type {BufferImporter}
|
|
8
8
|
*/
|
|
9
|
-
declare function bufferImporter(file: import("../../types").File, block: import("interface-blockstore
|
|
9
|
+
declare function bufferImporter(file: import("../../types").File, block: import("interface-blockstore").Blockstore, options: import("../../types").ImporterOptions): AsyncIterable<() => Promise<import("../../types").InProgressImportResult>>;
|
|
10
10
|
//# sourceMappingURL=buffer-importer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer-importer.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/buffer-importer.js"],"names":[],"mappings":";6BAMa,OAAO,aAAa,EAAE,cAAc;AADjD;;GAEG;AAEH;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"buffer-importer.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/buffer-importer.js"],"names":[],"mappings":";6BAMa,OAAO,aAAa,EAAE,cAAc;AADjD;;GAEG;AAEH;;GAEG;AACH,gPAoCC"}
|
|
@@ -8,5 +8,5 @@ export type FileDAGBuilder = import('../../types').FileDAGBuilder;
|
|
|
8
8
|
/**
|
|
9
9
|
* @type {import('../../types').UnixFSV1DagBuilder<File>}
|
|
10
10
|
*/
|
|
11
|
-
declare function fileBuilder(file: import("../../types").File, block: import("interface-blockstore
|
|
11
|
+
declare function fileBuilder(file: import("../../types").File, block: import("interface-blockstore").Blockstore, options: import("../../types").ImporterOptions): Promise<import("../../types").InProgressImportResult>;
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/index.js"],"names":[],"mappings":";yBAca,OAAO,sBAAsB,EAAE,UAAU;mBACzC,OAAO,aAAa,EAAE,IAAI;8BAC1B,OAAO,aAAa,EAAE,eAAe;sBACrC,OAAO,aAAa,EAAE,OAAO;yBAC7B,OAAO,aAAa,EAAE,UAAU;6BAChC,OAAO,aAAa,EAAE,cAAc;AA+KjD;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dag-builder/file/index.js"],"names":[],"mappings":";yBAca,OAAO,sBAAsB,EAAE,UAAU;mBACzC,OAAO,aAAa,EAAE,IAAI;8BAC1B,OAAO,aAAa,EAAE,eAAe;sBACrC,OAAO,aAAa,EAAE,OAAO;yBAC7B,OAAO,aAAa,EAAE,UAAU;6BAChC,OAAO,aAAa,EAAE,cAAc;AA+KjD;;GAEG;AACH,wNAQC"}
|
|
@@ -7,5 +7,5 @@ export type ChunkValidator = import('../types').ChunkValidator;
|
|
|
7
7
|
/**
|
|
8
8
|
* @type {DAGBuilder}
|
|
9
9
|
*/
|
|
10
|
-
declare function dagBuilder(source: AsyncIterable<import("../types").ImportCandidate> | Iterable<import("../types").ImportCandidate>, blockstore: import("interface-blockstore
|
|
10
|
+
declare function dagBuilder(source: AsyncIterable<import("../types").ImportCandidate> | Iterable<import("../types").ImportCandidate>, blockstore: import("interface-blockstore").Blockstore, options: import("../types").ImporterOptions): AsyncIterable<() => Promise<import("../types").InProgressImportResult>>;
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/index.js"],"names":[],"mappings":";mBAQa,OAAO,UAAU,EAAE,IAAI;wBACvB,OAAO,UAAU,EAAE,SAAS;yBAC5B,OAAO,UAAU,EAAE,UAAU;sBAC7B,OAAO,UAAU,EAAE,OAAO;6BAC1B,OAAO,UAAU,EAAE,cAAc;AA2C9C;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dag-builder/index.js"],"names":[],"mappings":";mBAQa,OAAO,UAAU,EAAE,IAAI;wBACvB,OAAO,UAAU,EAAE,SAAS;yBAC5B,OAAO,UAAU,EAAE,UAAU;sBAC7B,OAAO,UAAU,EAAE,OAAO;6BAC1B,OAAO,UAAU,EAAE,cAAc;AA2C9C;;GAEG;AACH,mTA4DC"}
|
package/types/src/dir.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type DirProps = {
|
|
|
14
14
|
parentKey?: string | undefined;
|
|
15
15
|
unixfs?: import("ipfs-unixfs").UnixFS | undefined;
|
|
16
16
|
mode?: number | undefined;
|
|
17
|
-
mtime?: import("ipfs-unixfs/src/types").Mtime | undefined;
|
|
17
|
+
mtime?: import("ipfs-unixfs/types/src/types").Mtime | undefined;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* @typedef {import('./types').ImporterOptions} ImporterOptions
|
|
@@ -51,7 +51,7 @@ declare class Dir {
|
|
|
51
51
|
parentKey: string | undefined;
|
|
52
52
|
unixfs: import("ipfs-unixfs").UnixFS | undefined;
|
|
53
53
|
mode: number | undefined;
|
|
54
|
-
mtime: import("ipfs-unixfs/src/types").Mtime | undefined;
|
|
54
|
+
mtime: import("ipfs-unixfs/types/src/types").Mtime | undefined;
|
|
55
55
|
/** @type {CID | undefined} */
|
|
56
56
|
cid: CID | undefined;
|
|
57
57
|
/** @type {number | undefined} */
|
package/types/src/dir.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../src/dir.js"],"names":[],"mappings":";8BACa,OAAO,SAAS,EAAE,eAAe;2BACjC,OAAO,SAAS,EAAE,YAAY;qCAC9B,OAAO,SAAS,EAAE,sBAAsB;yBACxC,OAAO,sBAAsB,EAAE,UAAU;kBACzC,OAAO,kBAAkB,EAAE,GAAG;;UAG7B,OAAO;SACP,OAAO;UACP,MAAM;WACN,OAAO;UACP,OAAO;;;;;;;AAZrB;;;;;;;;;;;;;;;;;;GAkBG;AACH;IACE;;;OAGG;IACH,mBAHW,QAAQ,WACR,eAAe,EAoBzB;IAjBC,2CAA4B;IAE5B,cAAsB;IACtB,aAAoB;IACpB,aAAsB;IACtB,eAAwB;IACxB,cAAsB;IACtB,wBAA0B;IAC1B,8BAAgC;IAChC,iDAA0B;IAC1B,yBAAsB;IACtB
|
|
1
|
+
{"version":3,"file":"dir.d.ts","sourceRoot":"","sources":["../../src/dir.js"],"names":[],"mappings":";8BACa,OAAO,SAAS,EAAE,eAAe;2BACjC,OAAO,SAAS,EAAE,YAAY;qCAC9B,OAAO,SAAS,EAAE,sBAAsB;yBACxC,OAAO,sBAAsB,EAAE,UAAU;kBACzC,OAAO,kBAAkB,EAAE,GAAG;;UAG7B,OAAO;SACP,OAAO;UACP,MAAM;WACN,OAAO;UACP,OAAO;;;;;;;AAZrB;;;;;;;;;;;;;;;;;;GAkBG;AACH;IACE;;;OAGG;IACH,mBAHW,QAAQ,WACR,eAAe,EAoBzB;IAjBC,2CAA4B;IAE5B,cAAsB;IACtB,aAAoB;IACpB,aAAsB;IACtB,eAAwB;IACxB,cAAsB;IACtB,wBAA0B;IAC1B,8BAAgC;IAChC,iDAA0B;IAC1B,yBAAsB;IACtB,+DAAwB;IAExB,8BAA8B;IAC9B,KADW,GAAG,GAAG,SAAS,CACN;IACpB,iCAAiC;IACjC,MADW,MAAM,GAAG,SAAS,CACR;IAGvB;;;OAGG;IACH,UAHW,MAAM,SACN,sBAAsB,GAAG,GAAG,iBAEZ;IAE3B;;;OAGG;IACH,UAHW,MAAM,GACJ,QAAQ,sBAAsB,GAAG,GAAG,GAAG,SAAS,CAAC,CAI7D;IAED;;OAEG;IACH,mBAFa,cAAc;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAA;KAAC,CAAC,CAEjD;IAE9B;;;OAGG;IACH,kBAHW,UAAU,GACR,cAAc,YAAY,CAAC,CAEV;CAC/B"}
|
package/types/src/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
export function importer(source: AsyncIterable<ImportCandidate> | Iterable<ImportCandidate> | ImportCandidate, blockstore: Blockstore, options?: UserImporterOptions): AsyncGenerator<{
|
|
24
24
|
cid: import("multiformats").CID;
|
|
25
25
|
path: string | undefined;
|
|
26
|
-
unixfs: import("ipfs-unixfs
|
|
26
|
+
unixfs: import("ipfs-unixfs").UnixFS | undefined;
|
|
27
27
|
size: number;
|
|
28
28
|
}, void, unknown>;
|
|
29
29
|
export type Blockstore = import('interface-blockstore').Blockstore;
|
|
@@ -7,5 +7,5 @@ export type TreeBuilder = (source: AsyncIterable<InProgressImportResult>, blocks
|
|
|
7
7
|
/**
|
|
8
8
|
* @type {TreeBuilder}
|
|
9
9
|
*/
|
|
10
|
-
declare function treeBuilder(source: AsyncIterable<import("./types").InProgressImportResult>, block: import("interface-blockstore
|
|
10
|
+
declare function treeBuilder(source: AsyncIterable<import("./types").InProgressImportResult>, block: import("interface-blockstore").Blockstore, options: import("./types").ImporterOptions): AsyncIterable<import("./types").ImportResult>;
|
|
11
11
|
//# sourceMappingURL=tree-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-builder.d.ts","sourceRoot":"","sources":["../../src/tree-builder.js"],"names":[],"mappings":";2BAMa,OAAO,SAAS,EAAE,YAAY;qCAC9B,OAAO,SAAS,EAAE,sBAAsB;8BACxC,OAAO,SAAS,EAAE,eAAe;yBACjC,OAAO,sBAAsB,EAAE,UAAU;mCAChC,cAAc,sBAAsB,CAAC,cAAc,UAAU,WAAW,eAAe,KAAK,cAAc,YAAY,CAAC;AAqE7I;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"tree-builder.d.ts","sourceRoot":"","sources":["../../src/tree-builder.js"],"names":[],"mappings":";2BAMa,OAAO,SAAS,EAAE,YAAY;qCAC9B,OAAO,SAAS,EAAE,sBAAsB;8BACxC,OAAO,SAAS,EAAE,eAAe;yBACjC,OAAO,sBAAsB,EAAE,UAAU;mCAChC,cAAc,sBAAsB,CAAC,cAAc,UAAU,WAAW,eAAe,KAAK,cAAc,YAAY,CAAC;AAqE7I;;GAEG;AACH,2OAiCC"}
|
|
@@ -3,5 +3,5 @@ export type CID = import('multiformats/cid').CID;
|
|
|
3
3
|
/**
|
|
4
4
|
* @typedef {import('multiformats/cid').CID} CID
|
|
5
5
|
*/
|
|
6
|
-
declare function createBlockApi(): import("interface-blockstore
|
|
6
|
+
declare function createBlockApi(): import("interface-blockstore").Blockstore;
|
|
7
7
|
//# sourceMappingURL=block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../test/helpers/block.js"],"names":[],"mappings":";kBAKa,OAAO,kBAAkB,EAAE,GAAG;AAD3C;;GAEG;AAEH,
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../test/helpers/block.js"],"names":[],"mappings":";kBAKa,OAAO,kBAAkB,EAAE,GAAG;AAD3C;;GAEG;AAEH,6EAqCC"}
|