diff --git "a/assets/zstd-u5eweWyS.js" "b/assets/zstd-u5eweWyS.js" new file mode 100644--- /dev/null +++ "b/assets/zstd-u5eweWyS.js" @@ -0,0 +1,15 @@ +import{_ as SI}from"./chunk-INHXZS53-D3tQiqtZ.js";var aI=(typeof document<"u"&&document.currentScript?.src,function(OA={}){var N,C=OA,L,Y,d=new Promise((A,I)=>{L=A,Y=I}),EA=Object.assign({},C),T=C.printErr||console.error.bind(console);Object.assign(C,EA),EA=null;var x;C.wasmBinary&&(x=C.wasmBinary);var P,iA=!1,X,w,Z,O,p,S,DA,oA;function GA(){var A=P.buffer;C.HEAP8=X=new Int8Array(A),C.HEAP16=Z=new Int16Array(A),C.HEAPU8=w=new Uint8Array(A),C.HEAPU16=O=new Uint16Array(A),C.HEAP32=p=new Int32Array(A),C.HEAPU32=S=new Uint32Array(A),C.HEAPF32=DA=new Float32Array(A),C.HEAPF64=oA=new Float64Array(A)}var yA=[],FA=[],hA=[],wA=!1;function mA(){var A=C.preRun.shift();yA.unshift(A)}var c=0,n=null;function RA(A){throw C.onAbort?.(A),A="Aborted("+A+")",T(A),iA=!0,A+=". Build with -sASSERTIONS for more info.",wA&&cA(),A=new WebAssembly.RuntimeError(A),Y(A),A}var SA=A=>A.startsWith("data:application/octet-stream;base64,"),VA=A=>A.startsWith("file://"),l;function aA(A){if(A==l&&x)return new Uint8Array(x);throw"both async and sync fetching of the wasm failed"}function bA(A){return x?Promise.resolve().then(()=>aA(A)):(void 0)(A).then(I=>new Uint8Array(I),()=>aA(A))}function NA(A,I,g){return bA(A).then(B=>WebAssembly.instantiate(B,I)).then(g,B=>{T(`failed to asynchronously prepare wasm: ${B}`),RA(B)})}function XA(A,I){var g=l;return x||typeof WebAssembly.instantiateStreaming!="function"||SA(g)||VA(g)||typeof fetch!="function"?NA(g,A,I):fetch(g,{credentials:"same-origin"}).then(B=>WebAssembly.instantiateStreaming(B,A).then(I,function(Q){return T(`wasm streaming compile failed: ${Q}`),T("falling back to ArrayBuffer instantiation"),NA(g,A,I)}))}var j=A=>{for(;0{for(var I="";w[A];)I+=sA[w[A++]];return I},r={},q={},m={},R,lA=A=>{throw new R(A)},e,jA=(A,I)=>{function g(D){if(D=I(D),D.length!==B.length)throw new e("Mismatched type converter count");for(var E=0;E{q.hasOwnProperty(D)?Q[E]=q[D]:(i.push(D),r.hasOwnProperty(D)||(r[D]=[]),r[D].push(()=>{Q[E]=q[D],++o,o===i.length&&g(Q)}))}),i.length===0&&g(Q)};function eA(A,I,g={}){var B=I.name;if(!A)throw new R(`type "${B}" must have a positive integer typeid pointer`);if(q.hasOwnProperty(A)){if(g.H)return;throw new R(`Cannot register type '${B}' twice`)}q[A]=I,delete m[A],r.hasOwnProperty(A)&&(I=r[A],delete r[A],I.forEach(Q=>Q()))}function K(A,I,g={}){if(!("argPackAdvance"in I))throw new TypeError("registerType registeredInstance requires argPackAdvance");return eA(A,I,g)}var z=[],M=[],UA=A=>{switch(A){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:const I=z.pop()||M.length;return M[I]=A,M[I+1]=1,I}};function v(A){return this.fromWireType(S[A>>2])}var zA={name:"emscripten::val",fromWireType:A=>{if(!A)throw new R("Cannot use deleted val. handle = "+A);var I=M[A];return 9UA(I),argPackAdvance:8,readValueFromPointer:v,F:null},vA=(A,I)=>{switch(I){case 4:return function(g){return this.fromWireType(DA[g>>2])};case 8:return function(g){return this.fromWireType(oA[g>>3])};default:throw new TypeError(`invalid float width (${I}): ${A}`)}},u=(A,I)=>Object.defineProperty(I,"name",{value:A}),uA=A=>{for(;A.length;){var I=A.pop();A.pop()(I)}};function kA(A){for(var I=1;I{if(C[A].D===void 0){var g=C[A];C[A]=function(...B){if(!C[A].D.hasOwnProperty(B.length))throw new R(`Function '${I}' called with an invalid number of arguments (${B.length}) - expects one of (${C[A].D})!`);return C[A].D[B.length].apply(this,B)},C[A].D=[],C[A].D[g.G]=g}},AI=(A,I,g)=>{if(C.hasOwnProperty(A)){if(g===void 0||C[A].D!==void 0&&C[A].D[g]!==void 0)throw new R(`Cannot register public name '${A}' twice`);if(_A(A,A),C.hasOwnProperty(g))throw new R(`Cannot register multiple overloads of a function with the same number of arguments (${g})!`);C[A].D[g]=I}else C[A]=I,g!==void 0&&(C[A].J=g)},II=(A,I)=>{for(var g=[],B=0;B>2]);return g},$,gI=(A,I,g=[])=>(A.includes("j")?(A=A.replace(/p/g,"i"),I=(0,C["dynCall_"+A])(I,...g)):I=$.get(I)(...g),I),BI=(A,I)=>(...g)=>gI(A,I,g),QI=(A,I)=>{A=J(A);var g=A.includes("j")?BI(A,I):$.get(I);if(typeof g!="function")throw new R(`unknown function pointer with signature ${A}: ${I}`);return g},YA,JA=A=>{A=HA(A);var I=J(A);return U(A),I},CI=(A,I)=>{function g(i){Q[i]||q[i]||(m[i]?m[i].forEach(g):(B.push(i),Q[i]=!0))}var B=[],Q={};throw I.forEach(g),new YA(`${A}: `+B.map(JA).join([", "]))},EI=A=>{A=A.trim();const I=A.indexOf("(");return I!==-1?A.substr(0,I):A},iI=(A,I,g)=>{switch(I){case 1:return g?B=>X[B]:B=>w[B];case 2:return g?B=>Z[B>>1]:B=>O[B>>1];case 4:return g?B=>p[B>>2]:B=>S[B>>2];default:throw new TypeError(`invalid integer width (${I}): ${A}`)}},LA=typeof TextDecoder<"u"?new TextDecoder:void 0,_=(A,I)=>{var g=w,B=A+I;for(I=A;g[I]&&!(I>=B);)++I;if(16Q?B+=String.fromCharCode(Q):(Q-=65536,B+=String.fromCharCode(55296|Q>>10,56320|Q&1023))}}else B+=String.fromCharCode(Q)}return B},KA=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,DI=(A,I)=>{for(var g=A>>1,B=g+I/2;!(g>=B)&&O[g];)++g;if(g<<=1,32=I/2);++B){var Q=Z[A+2*B>>1];if(Q==0)break;g+=String.fromCharCode(Q)}return g},oI=(A,I,g)=>{if(g??=2147483647,2>g)return 0;g-=2;var B=I;g=g<2*A.length?g/2:A.length;for(var Q=0;Q>1]=A.charCodeAt(Q),I+=2;return Z[I>>1]=0,I-B},GI=A=>2*A.length,yI=(A,I)=>{for(var g=0,B="";!(g>=I/4);){var Q=p[A+4*g>>2];if(Q==0)break;++g,65536<=Q?(Q-=65536,B+=String.fromCharCode(55296|Q>>10,56320|Q&1023)):B+=String.fromCharCode(Q)}return B},FI=(A,I,g)=>{if(g??=2147483647,4>g)return 0;var B=I;g=B+g-4;for(var Q=0;Q=i){var o=A.charCodeAt(++Q);i=65536+((i&1023)<<10)|o&1023}if(p[I>>2]=i,I+=4,I+4>g)break}return p[I>>2]=0,I-B},hI=A=>{for(var I=0,g=0;g=B&&++g,I+=4}return I},AA=A=>(A=A.getArg(h.C,0),WA(A));C.incrementExceptionRefcount=A=>{A=AA(A),tA(A)},C.decrementExceptionRefcount=A=>{A=AA(A),rA(A)},C.getExceptionMessage=A=>{var I=AA(A);A=dA();var g=gA(4),B=gA(4);if(TA(I,g,B),I=S[g>>2],B=S[B>>2],g=I?_(I):"",U(I),B){var Q=B?_(B):"";U(B)}return qA(A),[g,Q]};for(var MA=Array(256),V=0;256>V;++V)MA[V]=String.fromCharCode(V);sA=MA,R=C.BindingError=class extends Error{constructor(A){super(A),this.name="BindingError"}},e=C.InternalError=class extends Error{constructor(A){super(A),this.name="InternalError"}},M.push(0,1,void 0,1,null,1,!0,1,!1,1),C.count_emval_handles=()=>M.length/2-5-z.length,YA=C.UnboundTypeError=((A,I)=>{var g=u(I,function(B){this.name=I,this.message=B,B=Error(B).stack,B!==void 0&&(this.stack=this.toString()+` +`+B.replace(/^Error(:[^\n]*)?\n/,""))});return g.prototype=Object.create(A.prototype),g.prototype.constructor=g,g.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},g})(Error,"UnboundTypeError");var wI={l:()=>{RA("")},k:()=>{},i:(A,I,g,B)=>{I=J(I),K(A,{name:I,fromWireType:function(Q){return!!Q},toWireType:function(Q,i){return i?g:B},argPackAdvance:8,readValueFromPointer:function(Q){return this.fromWireType(w[Q])},F:null})},h:A=>K(A,zA),e:(A,I,g)=>{I=J(I),K(A,{name:I,fromWireType:B=>B,toWireType:(B,Q)=>Q,argPackAdvance:8,readValueFromPointer:vA(I,g),F:null})},d:(A,I,g,B,Q,i,o)=>{var D=II(I,g);A=J(A),A=EI(A),Q=QI(B,Q),AI(A,function(){CI(`Cannot call ${A} due to unbound types`,D)},I-1),jA(D,E=>{var G=A,y=A;E=[E[0],null].concat(E.slice(1));var s=Q,F=E.length;if(2>F)throw new R("argTypes array size mismatch! Must at least get return value and 'this' types!");var H=E[1]!==null&&!1,f=kA(E),ZA=E[0].name!=="void";s=[y,lA,s,i,uA,E[0],E[1]];for(var a=0;a{if(I=J(I),Q===-1&&(Q=4294967295),Q=D=>D,B===0){var i=32-8*g;Q=D=>D<>>i}var o=I.includes("unsigned")?function(D,E){return E>>>0}:function(D,E){return E};K(A,{name:I,fromWireType:Q,toWireType:o,argPackAdvance:8,readValueFromPointer:iI(I,g,B!==0),F:null})},a:(A,I,g)=>{function B(i){return new Q(X.buffer,S[i+4>>2],S[i>>2])}var Q=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][I];g=J(g),K(A,{name:g,fromWireType:B,argPackAdvance:8,readValueFromPointer:B},{H:!0})},f:(A,I)=>{I=J(I);var g=I==="std::string";K(A,{name:I,fromWireType:function(B){var Q=S[B>>2],i=B+4;if(g)for(var o=i,D=0;D<=Q;++D){var E=i+D;if(D==Q||w[E]==0){if(o=o?_(o,E-o):"",G===void 0)var G=o;else G+="\0",G+=o;o=E+1}}else{for(G=Array(Q),D=0;D=E?D++:2047>=E?D+=2:55296<=E&&57343>=E?(D+=4,++i):D+=3}else D=Q.length;if(i=D,D=IA(4+i+1),E=D+4,S[D>>2]=i,g&&o){if(o=E,E=i+1,i=w,0=y){var s=Q.charCodeAt(++G);y=65536+((y&1023)<<10)|s&1023}if(127>=y){if(o>=E)break;i[o++]=y}else{if(2047>=y){if(o+1>=E)break;i[o++]=192|y>>6}else{if(65535>=y){if(o+2>=E)break;i[o++]=224|y>>12}else{if(o+3>=E)break;i[o++]=240|y>>18,i[o++]=128|y>>12&63}i[o++]=128|y>>6&63}i[o++]=128|y&63}}i[o]=0}}else if(o)for(o=0;o{if(g=J(g),I===2)var B=DI,Q=oI,i=GI,o=D=>O[D>>1];else I===4&&(B=yI,Q=FI,i=hI,o=D=>S[D>>2]);K(A,{name:g,fromWireType:D=>{for(var E=S[D>>2],G,y=D+4,s=0;s<=E;++s){var F=D+4+s*I;(s==E||o(F)==0)&&(y=B(y,F-y),G===void 0?G=y:(G+="\0",G+=y),y=F+I)}return U(D),G},toWireType:(D,E)=>{if(typeof E!="string")throw new R(`Cannot pass non-string to C++ string type ${g}`);var G=i(E),y=IA(4+G+I);return S[y>>2]=G/I,Q(E,y+4,G+I),D!==null&&D.push(U,y),y},argPackAdvance:8,readValueFromPointer:v,F(D){U(D)}})},j:(A,I)=>{I=J(I),K(A,{I:!0,name:I,argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},n:(A,I,g)=>w.copyWithin(A,I,I+g),g:(A,I)=>{var g=q[A];if(g===void 0)throw A=`_emval_take_value has unknown type ${JA(A)}`,new R(A);return A=g,A=A.readValueFromPointer(I),UA(A)},m:A=>{var I=w.length;if(A>>>=0,2147483648=g;g*=2){var B=I*(1+.2/g);B=Math.min(B,A+100663296);var Q=Math;B=Math.max(A,B);A:{Q=(Q.min.call(Q,2147483648,B+(65536-B%65536)%65536)-P.buffer.byteLength+65535)/65536;try{P.grow(Q),GA();var i=1;break A}catch{}i=void 0}if(i)return!0}return!1}},h=(function(){function A(g){return h=g.exports,P=h.o,GA(),$=h.t,FA.unshift(h.p),c--,C.monitorRunDependencies?.(c),c==0&&n&&(g=n,n=null,g()),h}var I={a:wI};if(c++,C.monitorRunDependencies?.(c),C.instantiateWasm)try{return C.instantiateWasm(I,A)}catch(g){T(`Module.instantiateWasm callback failed with error: ${g}`),Y(g)}return l||=SA("zstd_codec.wasm")?"zstd_codec.wasm":C.locateFile?C.locateFile("zstd_codec.wasm",""):"zstd_codec.wasm",XA(I,function(g){A(g.instance)}).catch(Y),{}})(),IA=A=>(IA=h.q)(A),U=A=>(U=h.r)(A),HA=A=>(HA=h.s)(A),cA=()=>(cA=h.u)(),qA=A=>(qA=h.v)(A),gA=A=>(gA=h.w)(A),dA=()=>(dA=h.x)(),rA=A=>(rA=h.y)(A),tA=A=>(tA=h.z)(A),WA=A=>(WA=h.A)(A),TA=(A,I,g)=>(TA=h.B)(A,I,g),b;n=function A(){b||xA(),b||(n=A)};function xA(){function A(){if(!b&&(b=!0,C.calledRun=!0,!iA)){if(wA=!0,j(FA),L(C),C.onRuntimeInitialized?.(),C.postRun)for(typeof C.postRun=="function"&&(C.postRun=[C.postRun]);C.postRun.length;){var I=C.postRun.shift();hA.unshift(I)}j(hA)}}if(!(0NI({noInitialRun:!0,wasmBinary:sI}),UI=class PA{static codecId="zstd";static DEFAULT_CLEVEL=QA;static MAX_CLEVEL=CA;level;constructor(N=QA){if(!Number.isInteger(N))throw Error(`Invalid acceleration "${N}". Must be a positive integer.`);this.level=N}static fromConfig({level:N}){return new PA(N)}async encode(N){W||(W=fA());let C=this.level;C<=0&&(C=QA),C>CA&&(C=CA);const L=await W,Y=L.compress(N,C),d=new Uint8Array(Y);return L.free_result(),d}async decode(N,C){W||(W=fA());const L=await W;try{const Y=L.decompress(N),d=new Uint8Array(Y);return L.free_result(),C!==void 0?(C.set(d),C):d}catch(Y){throw new Error(L.getExceptionMessage(Y).toString())}}},YI=UI;export{YI as default};