constversion="6.0.0-beta-exports.3";asyncfunctionresolveProperties(value){constkeys=Object.keys(value);constresults=awaitPromise.all(keys.map(k=>Promise.resolve(value[k])));returnresults.reduce((accum,v,index)=>{accum[keys[index]]=v;returnaccum},{})}functiondefineReadOnly(object,name,value){Object.defineProperty(object,name,{enumerable:true,value:value,writable:false})}functioncheckType(value,type){consttypes=type.split("|").map(t=>t.trim());for(leti=0;i<types.length;i++){switch(type){case"any":return;case"boolean":case"number":case"string":if(typeofvalue===type){return}}}thrownewError("invalid value for type")}functiondefineProperties(target,values,types,defaults){for(letkeyinvalues){letvalue=values[key];constfallback=defaults?defaults[key]:undefined;if(fallback!==undefined){value=fallback}else{consttype=types?types[key]:null;if(type){checkType(value,type)}}Object.defineProperty(target,key,{enumerable:true,value:value,writable:false})}}constErrorConstructors={};ErrorConstructors.INVALID_ARGUMENT=TypeError;ErrorConstructors.NUMERIC_FAULT=RangeError;ErrorConstructors.BUFFER_OVERRUN=RangeError;functionisError(error,code){returnerror&&error.code===code}functionisCallException(error){returnisError(error,"CALL_EXCEPTION")}functionmakeError(message,code,info){{constdetails=[];if(info){if("message"ininfo||"code"ininfo||"name"ininfo){thrownewError(`value will overwrite populated values: ${JSON.stringify(info)}`)}for(constkeyininfo){constvalue=info[key];try{details.push(key+"="+JSON.stringify(value))}catch(error){details.push(key+"=[could not serialize object]")}}}details.push(`code=${code}`);details.push(`version=${version}`);if(details.length){message+=" ("+details.join(", ")+")"}}constcreate=ErrorConstructors[code]||Error;consterror=newcreate(message);defineReadOnly(error,"code",code);if(info){for(constkeyininfo){defineReadOnly(error,key,info[key])}}returnerror}functionthrowError(message,code,info){throwmakeError(message,code,info)}functionthrowArgumentError(message,name,value){returnthrowError(message,"INVALID_ARGUMENT",{argument:name,value:value})}functionassertArgument(check,message,name,value){if(!check){throwArgumentError(message,name,value)}}functionassertArgumentCount(count,expectedCount,message=""){if(message){message=": "+message}if(count<expectedCount){throwError("missing arguemnt"+message,"MISSING_ARGUMENT",{count:count,expectedCount:expectedCount})}if(count>expectedCount){throwError("too many arguemnts"+message,"UNEXPECTED_ARGUMENT",{count:count,expectedCount:expectedCount})}}const_normalizeForms=["NFD","NFC","NFKD","NFKC"].reduce((accum,form)=>{try{if("test".normalize(form)!=="test"){thrownewError("bad")}if(form==="NFD"){constcheck=String.fromCharCode(233).normalize("NFD");constexpected=String.fromCharCode(101,769);if(check!==expected){thrownewError("broken")}}accum.push(form)}catch(error){}returnaccum},[]);functionassertNormalize(form){if(_normalizeForms.indexOf(form)===-1){throwError("platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:form}})}}functionassertPrivate(givenGuard,guard,className=""){if(givenGuard!==guard){letmethod=className,operation="new";if(className){method+=".";operation+=" "+className}throwError(`private constructor; use ${method}from* methods`,"UNSUPPORTED_OPERATION",{operation:operation})}}function_getBytes(value,name,copy){if(valueinstanceofUint8Array){if(copy){returnnewUint8Array(value)}returnvalue}if(typeofvalue==="string"&&value.match(/^0x([0-9a-f][0-9a-f])*$/i)){constresult=newUint8Array((value.length-2)/2);letoffset=2;for(leti=0;i<result.length;i++){result[i]=parseInt(value.substring(offset,offset+2),16);offset+=2}returnresult}returnthrowArgumentError("invalid BytesLike value",name||"value",value)}functiongetBytes(value,name){return_getBytes(value,name,false)}functiongetBytesCopy(value,name){return_getBytes(value,name,true)}functionisHexString(value,length){if(typeofvalue!=="string"||!value.match(/^0x[0-9A-Fa-f]*$/)){returnfalse}if(type