@loaders.gl/draco 4.0.0-beta.5 → 4.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -91,7 +91,7 @@ caused by: `+Hr.fullStack(r):e.stack};Hr.errorFromList=function(e){return Oa.arr
|
|
|
91
91
|
`,t(o),t(n.body),t(`\r
|
|
92
92
|
`)}),t("--"+a.boundary+"--"),a.request.postambleCRLF&&t(`\r
|
|
93
93
|
`),i};Au.prototype.onRequest=function(e){var r=this,a=r.isChunked(e),i=e.data||e;r.setHeaders(a),r.chunked=a,r.body=r.build(i,a)};Nj.Multipart=Au});var $j=B(Vj=>{"use strict";var Hj=require("url"),KR=/^https?:/;function Wl(e){this.request=e,this.followRedirect=!0,this.followRedirects=!0,this.followAllRedirects=!1,this.followOriginalHttpMethod=!1,this.allowRedirect=function(){return!0},this.maxRedirects=10,this.redirects=[],this.redirectsFollowed=0,this.removeRefererHeader=!1}Wl.prototype.onRequest=function(e){var r=this;e.maxRedirects!==void 0&&(r.maxRedirects=e.maxRedirects),typeof e.followRedirect=="function"&&(r.allowRedirect=e.followRedirect),e.followRedirect!==void 0&&(r.followRedirects=!!e.followRedirect),e.followAllRedirects!==void 0&&(r.followAllRedirects=e.followAllRedirects),(r.followRedirects||r.followAllRedirects)&&(r.redirects=r.redirects||[]),e.removeRefererHeader!==void 0&&(r.removeRefererHeader=e.removeRefererHeader),e.followOriginalHttpMethod!==void 0&&(r.followOriginalHttpMethod=e.followOriginalHttpMethod)};Wl.prototype.redirectTo=function(e){var r=this,a=r.request,i=null;if(e.statusCode>=300&&e.statusCode<400&&e.caseless.has("location")){var t=e.caseless.get("location");if(a.debug("redirect",t),r.followAllRedirects)i=t;else if(r.followRedirects)switch(a.method){case"PATCH":case"PUT":case"POST":case"DELETE":break;default:i=t;break}}else if(e.statusCode===401){var n=a._auth.onResponse(e);n&&(a.setHeader("authorization",n),i=a.uri)}return i};Wl.prototype.onResponse=function(e){var r=this,a=r.request,i=r.redirectTo(e);if(!i||!r.allowRedirect.call(a,e))return!1;if(a.debug("redirect to",i),e.resume&&e.resume(),r.redirectsFollowed>=r.maxRedirects)return a.emit("error",new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+a.uri.href)),!1;r.redirectsFollowed+=1,KR.test(i)||(i=Hj.resolve(a.uri.href,i));var t=a.uri;return a.uri=Hj.parse(i),a.uri.protocol!==t.protocol&&delete a.agent,r.redirects.push({statusCode:e.statusCode,redirectUri:i}),r.followAllRedirects&&a.method!=="HEAD"&&e.statusCode!==401&&e.statusCode!==307&&(a.method=r.followOriginalHttpMethod?a.method:"GET"),delete a.src,delete a.req,delete a._started,e.statusCode!==401&&e.statusCode!==307&&(delete a.body,delete a._form,a.headers&&(a.removeHeader("host"),a.removeHeader("content-type"),a.removeHeader("content-length"),a.uri.hostname!==a.originalHost.split(":")[0]&&a.removeHeader("authorization"))),r.removeRefererHeader||a.setHeader("referer",t.href),a.emit("redirect"),a.init(),!0};Vj.Redirect=Wl});var Yj=B(gs=>{"use strict";var BH=require("net"),YR=require("tls"),Im=require("http"),Wj=require("https"),QR=require("events"),XR=require("assert"),JR=require("util"),ZR=No().Buffer;gs.httpOverHttp=eO;gs.httpsOverHttp=rO;gs.httpOverHttps=aO;gs.httpsOverHttps=tO;function eO(e){var r=new $i(e);return r.request=Im.request,r}function rO(e){var r=new $i(e);return r.request=Im.request,r.createSocket=Gj,r.defaultPort=443,r}function aO(e){var r=new $i(e);return r.request=Wj.request,r}function tO(e){var r=new $i(e);return r.request=Wj.request,r.createSocket=Gj,r.defaultPort=443,r}function $i(e){var r=this;r.options=e||{},r.proxyOptions=r.options.proxy||{},r.maxSockets=r.options.maxSockets||Im.Agent.defaultMaxSockets,r.requests=[],r.sockets=[],r.on("free",function(i,t,n){for(var o=0,s=r.requests.length;o<s;++o){var c=r.requests[o];if(c.host===t&&c.port===n){r.requests.splice(o,1),c.request.onSocket(i);return}}i.destroy(),r.removeSocket(i)})}JR.inherits($i,QR.EventEmitter);$i.prototype.addRequest=function(r,a){var i=this;if(typeof a=="string"&&(a={host:a,port:arguments[2],path:arguments[3]}),i.sockets.length>=this.maxSockets){i.requests.push({host:a.host,port:a.port,request:r});return}i.createConnection({host:a.host,port:a.port,request:r})};$i.prototype.createConnection=function(r){var a=this;a.createSocket(r,function(i){i.on("free",t),i.on("close",n),i.on("agentRemove",n),r.request.onSocket(i);function t(){a.emit("free",i,r.host,r.port)}function n(o){a.removeSocket(i),i.removeListener("free",t),i.removeListener("close",n),i.removeListener("agentRemove",n)}})};$i.prototype.createSocket=function(r,a){var i=this,t={};i.sockets.push(t);var n=Kj({},i.proxyOptions,{method:"CONNECT",path:r.host+":"+r.port,agent:!1});n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+ZR.from(n.proxyAuth).toString("base64")),go("making CONNECT request");var o=i.request(n);o.useChunkedEncodingByDefault=!1,o.once("response",s),o.once("upgrade",c),o.once("connect",p),o.once("error",f),o.end();function s(m){m.upgrade=!0}function c(m,h,v){process.nextTick(function(){p(m,h,v)})}function p(m,h,v){if(o.removeAllListeners(),h.removeAllListeners(),m.statusCode===200)XR.equal(v.length,0),go("tunneling connection has established"),i.sockets[i.sockets.indexOf(t)]=h,a(h);else{go("tunneling socket could not be established, statusCode=%d",m.statusCode);var w=new Error("tunneling socket could not be established, statusCode="+m.statusCode);w.code="ECONNRESET",r.request.emit("error",w),i.removeSocket(t)}}function f(m){o.removeAllListeners(),go(`tunneling socket could not be established, cause=%s
|
|
94
|
-
`,m.message,m.stack);var h=new Error("tunneling socket could not be established, cause="+m.message);h.code="ECONNRESET",r.request.emit("error",h),i.removeSocket(t)}};$i.prototype.removeSocket=function(r){var a=this.sockets.indexOf(r);if(a!==-1){this.sockets.splice(a,1);var i=this.requests.shift();i&&this.createConnection(i)}};function Gj(e,r){var a=this;$i.prototype.createSocket.call(a,e,function(i){var t=YR.connect(0,Kj({},a.options,{servername:e.host,socket:i}));a.sockets[a.sockets.indexOf(i)]=t,r(t)})}function Kj(e){for(var r=1,a=arguments.length;r<a;++r){var i=arguments[r];if(typeof i=="object")for(var t=Object.keys(i),n=0,o=t.length;n<o;++n){var s=t[n];i[s]!==void 0&&(e[s]=i[s])}}return e}var go;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?go=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:go=function(){};gs.debug=go});var Zj=B(Jj=>{"use strict";var iO=require("url"),nO=Yj(),Qj=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],Xj=["proxy-authorization"];function oO(e){var r=e.port,a=e.protocol,i=e.hostname+":";return r?i+=r:a==="https:"?i+="443":i+="80",i}function sO(e,r){var a=r.reduce(function(i,t){return i[t.toLowerCase()]=!0,i},{});return Object.keys(e).filter(function(i){return a[i.toLowerCase()]}).reduce(function(i,t){return i[t]=e[t],i},{})}function uO(e,r){var a=e.proxy,i={proxy:{host:a.hostname,port:+a.port,proxyAuth:a.auth,headers:r},headers:e.headers,ca:e.ca,cert:e.cert,key:e.key,passphrase:e.passphrase,pfx:e.pfx,ciphers:e.ciphers,rejectUnauthorized:e.rejectUnauthorized,secureOptions:e.secureOptions,secureProtocol:e.secureProtocol};return i}function cO(e,r){var a=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[a,i].join("Over")}function lO(e){var r=e.uri,a=e.proxy,i=cO(r,a);return nO[i]}function Pu(e){this.request=e,this.proxyHeaderWhiteList=Qj,this.proxyHeaderExclusiveList=[],typeof e.tunnel<"u"&&(this.tunnelOverride=e.tunnel)}Pu.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride<"u"?e.tunnelOverride:r.uri.protocol==="https:"};Pu.prototype.setup=function(e){var r=this,a=r.request;if(e=e||{},typeof a.proxy=="string"&&(a.proxy=iO.parse(a.proxy)),!a.proxy||!a.tunnel)return!1;e.proxyHeaderWhiteList&&(r.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(r.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=r.proxyHeaderExclusiveList.concat(Xj),t=r.proxyHeaderWhiteList.concat(i),n=sO(a.headers,t);n.host=oO(a.uri),i.forEach(a.removeHeader,a);var o=lO(a),s=uO(a,n);return a.agent=o(s),!0};Pu.defaultProxyHeaderWhiteList=Qj;Pu.defaultProxyHeaderExclusiveList=Xj;Jj.Tunnel=Pu});var r6=B((e6,Tu)=>{(function(){var e,r,a,i,t,n;typeof performance<"u"&&performance!==null&&performance.now?Tu.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Tu.exports=function(){return(e()-t)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},i=e(),n=process.uptime()*1e9,t=i-n):Date.now?(Tu.exports=function(){return Date.now()-a},a=Date.now()):(Tu.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(e6)});var p6=B((DH,f6)=>{"use strict";var fO=require("http"),n6=require("https"),Fu=require("url"),Rm=require("util"),Kl=require("stream"),Gl=require("zlib"),Bm=N1(),pO=X1(),dO=N2(),hO=yl(),o6=xl(),a6=Q2(),mO=jk(),vO=bc(),t6=Xh(),gO=Fk().strict,ys=_c(),bO=ud(),yO=Ik(),xO=$k().Querystring,wO=yj().Har,kO=Pj().Auth,_O=Lj().OAuth,jO=Mj(),SO=Uj().Multipart,EO=$j().Redirect,Om=Zj().Tunnel,bs=r6(),Cu=No().Buffer,i6=ys.safeStringify,AO=ys.isReadStream,PO=ys.toBase64,TO=ys.defer,s6=ys.copy,FO=ys.version,u6=bO.jar(),c6={};function CO(e,r){var a={};for(var i in r){var t=e.indexOf(i)===-1;t&&(a[i]=r[i])}return a}function qO(e,r){var a={};for(var i in r){var t=e.indexOf(i)!==-1,n=typeof r[i]=="function";t&&n||(a[i]=r[i])}return a}function l6(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function IO(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:l6.call(e.request)}}function Rr(e){var r=this;e.har&&(r._har=new wO(r),e=r._har.options(e)),Kl.Stream.call(r);var a=Object.keys(Rr.prototype),i=CO(a,e);vO(r,i),e=qO(a,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new xO(r),r._auth=new kO(r),r._oauth=new _O(r),r._multipart=new SO(r),r._redirect=new EO(r),r._tunnel=new Om(r),r.init(e)}Rm.inherits(Rr,Kl.Stream);Rr.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function rt(){Rr.debug&&console.error("REQUEST %s",Rm.format.apply(Rm,arguments))}Rr.prototype.debug=rt;Rr.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?s6(r.headers):{};for(var a in r.headers)typeof r.headers[a]>"u"&&delete r.headers[a];if(o6.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),rt(e),!r.pool&&r.pool!==!1&&(r.pool=c6),r.dests=r.dests||[],r.__isRequestRequest=!0,!r._callback&&r.callback&&(r._callback=r.callback,r.callback=function(){r._callbackCalled||(r._callbackCalled=!0,r._callback.apply(r,arguments))},r.on("error",r.callback.bind()),r.on("complete",r.callback.bind(r,null))),!r.uri&&r.url&&(r.uri=r.url,delete r.url),r.baseUrl){if(typeof r.baseUrl!="string")return r.emit("error",new Error("options.baseUrl must be a string"));if(typeof r.uri!="string")return r.emit("error",new Error("options.uri must be a string when using options.baseUrl"));if(r.uri.indexOf("//")===0||r.uri.indexOf("://")!==-1)return r.emit("error",new Error("options.uri must be a path when using options.baseUrl"));var i=r.baseUrl.lastIndexOf("/")===r.baseUrl.length-1,t=r.uri.indexOf("/")===0;i&&t?r.uri=r.baseUrl+r.uri.slice(1):i||t?r.uri=r.baseUrl+r.uri:r.uri===""?r.uri=r.baseUrl:r.uri=r.baseUrl+"/"+r.uri,delete r.baseUrl}if(!r.uri)return r.emit("error",new Error("options.uri is a required argument"));if(typeof r.uri=="string"&&(r.uri=Fu.parse(r.uri)),r.uri.href||(r.uri.href=Fu.format(r.uri)),r.uri.protocol==="unix:")return r.emit("error",new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`"));if(r.uri.host==="unix"&&r.enableUnixSocket(),r.strictSSL===!1&&(r.rejectUnauthorized=!1),r.uri.pathname||(r.uri.pathname="/"),!(r.uri.host||r.uri.hostname&&r.uri.port)&&!r.uri.isUnix){var n=Fu.format(r.uri),o='Invalid URI "'+n+'"';return Object.keys(e).length===0&&(o+=". This can be caused by a crappy redirection."),r.abort(),r.emit("error",new Error(o))}if(r.hasOwnProperty("proxy")||(r.proxy=yO(r.uri)),r.tunnel=r._tunnel.isEnabled(),r.proxy&&r._tunnel.setup(e),r._redirect.onRequest(e),r.setHost=!1,!r.hasHeader("host")){var s=r.originalHostHeaderName||"host";r.setHeader(s,r.uri.host),r.uri.port&&(r.uri.port==="80"&&r.uri.protocol==="http:"||r.uri.port==="443"&&r.uri.protocol==="https:")&&r.setHeader(s,r.uri.hostname),r.setHost=!0}if(r.jar(r._jar||e.jar),r.uri.port||(r.uri.protocol==="http:"?r.uri.port=80:r.uri.protocol==="https:"&&(r.uri.port=443)),r.proxy&&!r.tunnel?(r.port=r.proxy.port,r.host=r.proxy.hostname):(r.port=r.uri.port,r.host=r.uri.hostname),e.form&&r.form(e.form),e.formData){var c=e.formData,p=r.form(),f=function(R,L){L&&L.hasOwnProperty("value")&&L.hasOwnProperty("options")?p.append(R,L.value,L.options):p.append(R,L)};for(var m in c)if(c.hasOwnProperty(m)){var h=c[m];if(h instanceof Array)for(var v=0;v<h.length;v++)f(m,h[v]);else f(m,h)}}if(e.qs&&r.qs(e.qs),r.uri.path?r.path=r.uri.path:r.path=r.uri.pathname+(r.uri.search||""),r.path.length===0&&(r.path="/"),e.aws&&r.aws(e.aws),e.hawk&&r.hawk(e.hawk),e.httpSignature&&r.httpSignature(e.httpSignature),e.auth&&(Object.prototype.hasOwnProperty.call(e.auth,"username")&&(e.auth.user=e.auth.username),Object.prototype.hasOwnProperty.call(e.auth,"password")&&(e.auth.pass=e.auth.password),r.auth(e.auth.user,e.auth.pass,e.auth.sendImmediately,e.auth.bearer)),r.gzip&&!r.hasHeader("accept-encoding")&&r.setHeader("accept-encoding","gzip, deflate"),r.uri.auth&&!r.hasHeader("authorization")){var w=r.uri.auth.split(":").map(function(R){return r._qs.unescape(R)});r.auth(w[0],w.slice(1).join(":"),!0)}if(!r.tunnel&&r.proxy&&r.proxy.auth&&!r.hasHeader("proxy-authorization")){var E=r.proxy.auth.split(":").map(function(R){return r._qs.unescape(R)}),_="Basic "+PO(E.join(":"));r.setHeader("proxy-authorization",_)}r.proxy&&!r.tunnel&&(r.path=r.uri.protocol+"//"+r.uri.host+r.path),e.json&&r.json(e.json),e.multipart&&r.multipart(e.multipart),e.time&&(r.timing=!0,r.elapsedTime=r.elapsedTime||0);function A(){if(gO(r.body)&&(r.body=Cu.from(r.body)),!r.hasHeader("content-length")){var R;typeof r.body=="string"?R=Cu.byteLength(r.body):Array.isArray(r.body)?R=r.body.reduce(function(L,$){return L+$.length},0):R=r.body.length,R?r.setHeader("content-length",R):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!t6(r.body)&&A(),e.oauth?r.oauth(e.oauth):r._oauth.params&&r.hasHeader("authorization")&&r.oauth(r._oauth.params);var C=r.proxy&&!r.tunnel?r.proxy.protocol:r.uri.protocol,T={"http:":fO,"https:":n6},D=r.httpModules||{};if(r.httpModule=D[C]||T[C],!r.httpModule)return r.emit("error",new Error("Invalid protocol: "+C));if(e.ca&&(r.ca=e.ca),!r.agent)if(e.agentOptions&&(r.agentOptions=e.agentOptions),e.agentClass)r.agentClass=e.agentClass;else if(e.forever){var I=FO();I.major===0&&I.minor<=10?r.agentClass=C==="http:"?a6:a6.SSL:(r.agentClass=r.httpModule.Agent,r.agentOptions=r.agentOptions||{},r.agentOptions.keepAlive=!0)}else r.agentClass=r.httpModule.Agent;r.pool===!1?r.agent=!1:r.agent=r.agent||r.getNewAgent(),r.on("pipe",function(R){if(r.ntick&&r._started&&r.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),r.src=R,AO(R))r.hasHeader("content-type")||r.setHeader("content-type",hO.lookup(R.path));else{if(R.headers)for(var L in R.headers)r.hasHeader(L)||r.setHeader(L,R.headers[L]);r._json&&!r.hasHeader("content-type")&&r.setHeader("content-type","application/json"),R.method&&!r.explicitMethod&&(r.method=R.method)}}),TO(function(){if(!r._aborted){var R=function(){if(r._form&&(r._auth.hasAuth?r._auth.hasAuth&&r._auth.sentAuth&&r._form.pipe(r):r._form.pipe(r)),r._multipart&&r._multipart.chunked&&r._multipart.body.pipe(r),r.body)t6(r.body)?r.body.pipe(r):(A(),Array.isArray(r.body)?r.body.forEach(function(L){r.write(L)}):r.write(r.body),r.end());else if(r.requestBodyStream)console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe."),r.requestBodyStream.pipe(r);else if(!r.src){if(r._auth.hasAuth&&!r._auth.sentAuth){r.end();return}r.method!=="GET"&&typeof r.method<"u"&&r.setHeader("content-length",0),r.end()}};r._form&&!r.hasHeader("content-length")?(r.setHeader(r._form.getHeaders(),!0),r._form.getLength(function(L,$){!L&&!isNaN($)&&r.setHeader("content-length",$),R()})):R(),r.ntick=!0}})};Rr.prototype.getNewAgent=function(){var e=this,r=e.agentClass,a={};if(e.agentOptions)for(var i in e.agentOptions)a[i]=e.agentOptions[i];e.ca&&(a.ca=e.ca),e.ciphers&&(a.ciphers=e.ciphers),e.secureProtocol&&(a.secureProtocol=e.secureProtocol),e.secureOptions&&(a.secureOptions=e.secureOptions),typeof e.rejectUnauthorized<"u"&&(a.rejectUnauthorized=e.rejectUnauthorized),e.cert&&e.key&&(a.key=e.key,a.cert=e.cert),e.pfx&&(a.pfx=e.pfx),e.passphrase&&(a.passphrase=e.passphrase);var t="";r!==e.httpModule.Agent&&(t+=r.name);var n=e.proxy;typeof n=="string"&&(n=Fu.parse(n));var o=n&&n.protocol==="https:"||this.uri.protocol==="https:";return o&&(a.ca&&(t&&(t+=":"),t+=a.ca),typeof a.rejectUnauthorized<"u"&&(t&&(t+=":"),t+=a.rejectUnauthorized),a.cert&&(t&&(t+=":"),t+=a.cert.toString("ascii")+a.key.toString("ascii")),a.pfx&&(t&&(t+=":"),t+=a.pfx.toString("ascii")),a.ciphers&&(t&&(t+=":"),t+=a.ciphers),a.secureProtocol&&(t&&(t+=":"),t+=a.secureProtocol),a.secureOptions&&(t&&(t+=":"),t+=a.secureOptions)),e.pool===c6&&!t&&Object.keys(a).length===0&&e.httpModule.globalAgent?e.httpModule.globalAgent:(t=e.uri.protocol+t,e.pool[t]||(e.pool[t]=new r(a),e.pool.maxSockets&&(e.pool[t].maxSockets=e.pool.maxSockets)),e.pool[t])};Rr.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),a=bs();if(!e._aborted){e._started=!0,e.method=e.method||"GET",e.href=e.uri.href,e.src&&e.src.stat&&e.src.stat.size&&!e.hasHeader("content-length")&&e.setHeader("content-length",e.src.stat.size),e._aws&&e.aws(e._aws,!0);var i=s6(e);delete i.auth,rt("make request",e.uri.href),delete i.timeout;try{e.req=e.httpModule.request(i)}catch(n){e.emit("error",n);return}e.timing&&(e.startTime=r,e.startTimeNow=a,e.timings={});var t;e.timeout&&!e.timeoutTimer&&(e.timeout<0?t=0:typeof e.timeout=="number"&&isFinite(e.timeout)&&(t=e.timeout)),e.req.on("response",e.onRequestResponse.bind(e)),e.req.on("error",e.onRequestError.bind(e)),e.req.on("drain",function(){e.emit("drain")}),e.req.on("socket",function(n){var o=n._connecting||n.connecting;if(e.timing&&(e.timings.socket=bs()-e.startTimeNow,o)){var s=function(){e.timings.lookup=bs()-e.startTimeNow},c=function(){e.timings.connect=bs()-e.startTimeNow};n.once("lookup",s),n.once("connect",c),e.req.once("error",function(){n.removeListener("lookup",s),n.removeListener("connect",c)})}var p=function(){e.req.setTimeout(t,function(){if(e.req){e.abort();var m=new Error("ESOCKETTIMEDOUT");m.code="ESOCKETTIMEDOUT",m.connect=!1,e.emit("error",m)}})};if(t!==void 0)if(o){var f=function(){n.removeListener("connect",f),e.clearTimeout(),p()};n.on("connect",f),e.req.on("error",function(m){n.removeListener("connect",f)}),e.timeoutTimer=setTimeout(function(){n.removeListener("connect",f),e.abort();var m=new Error("ETIMEDOUT");m.code="ETIMEDOUT",m.connect=!0,e.emit("error",m)},t)}else p();e.emit("socket",n)}),e.emit("request",e.req)}};Rr.prototype.onRequestError=function(e){var r=this;if(!r._aborted){if(r.req&&r.req._reusedSocket&&e.code==="ECONNRESET"&&r.agent.addRequestNoreuse){r.agent={addRequest:r.agent.addRequestNoreuse.bind(r.agent)},r.start(),r.req.end();return}r.clearTimeout(),r.emit("error",e)}};Rr.prototype.onRequestResponse=function(e){var r=this;if(r.timing&&(r.timings.response=bs()-r.startTimeNow),rt("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=bs()-r.startTimeNow,e.timingStart=r.startTime,r.timings.socket||(r.timings.socket=0),r.timings.lookup||(r.timings.lookup=r.timings.socket),r.timings.connect||(r.timings.connect=r.timings.lookup),r.timings.response||(r.timings.response=r.timings.connect),rt("elapsed time",r.timings.end),r.elapsedTime+=Math.round(r.timings.end),e.elapsedTime=r.elapsedTime,e.timings=r.timings,e.timingPhases={wait:r.timings.socket,dns:r.timings.lookup-r.timings.socket,tcp:r.timings.connect-r.timings.lookup,firstByte:r.timings.response-r.timings.connect,download:r.timings.end-r.timings.response,total:r.timings.end}),rt("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){rt("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=IO,r.httpModule===n6&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){rt("strict ssl error",r.uri.href);var a=e.hasOwnProperty("socket")?e.socket.authorizationError:r.uri.href+" does not support SSL";r.emit("error",new Error("SSL Error: "+a));return}r.originalHost=r.getHeader("host"),r.originalHostHeaderName||(r.originalHostHeaderName=r.hasHeader("host")),r.setHost&&r.removeHeader("host"),r.clearTimeout();var i=r._jar&&r._jar.setCookie?r._jar:u6,t=function(f){try{i.setCookie(f,r.uri.href,{ignoreError:!0})}catch(m){r.emit("error",m)}};if(e.caseless=o6(e.headers),e.caseless.has("set-cookie")&&!r._disableCookies){var n=e.caseless.has("set-cookie");Array.isArray(e.headers[n])?e.headers[n].forEach(t):t(e.headers[n])}if(!r._redirect.onResponse(e)){{e.on("close",function(){r._ended||r.response.emit("end")}),e.once("end",function(){r._ended=!0});var o=function(f){return r.method==="HEAD"||f>=100&&f<200||f===204||f===304},s;if(r.gzip&&!o(e.statusCode)){var c=e.headers["content-encoding"]||"identity";c=c.trim().toLowerCase();var p={flush:Gl.Z_SYNC_FLUSH,finishFlush:Gl.Z_SYNC_FLUSH};c==="gzip"?(s=Gl.createGunzip(p),e.pipe(s)):c==="deflate"?(s=Gl.createInflate(p),e.pipe(s)):(c!=="identity"&&rt("ignoring unrecognized Content-Encoding "+c),s=e)}else s=e;r.encoding&&(r.dests.length!==0?console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid."):s.setEncoding(r.encoding)),r._paused&&s.pause(),r.responseContent=s,r.emit("response",e),r.dests.forEach(function(f){r.pipeDest(f)}),s.on("data",function(f){r.timing&&!r.responseStarted&&(r.responseStartTime=new Date().getTime(),e.responseStartTime=r.responseStartTime),r._destdata=!0,r.emit("data",f)}),s.once("end",function(f){r.emit("end",f)}),s.on("error",function(f){r.emit("error",f)}),s.on("close",function(){r.emit("close")}),r.callback?r.readResponseBody(e):r.on("end",function(){if(r._aborted){rt("aborted",r.uri.href);return}r.emit("complete",e)})}rt("finish init function",r.uri.href)}};Rr.prototype.readResponseBody=function(e){var r=this;rt("reading response's body");var a=[],i=0,t=[];r.on("data",function(n){Cu.isBuffer(n)?n.length&&(i+=n.length,a.push(n)):t.push(n)}),r.on("end",function(){if(rt("end event",r.uri.href),r._aborted){rt("aborted",r.uri.href),a=[],i=0;return}if(i?(rt("has body",r.uri.href,i),e.body=Cu.concat(a,i),r.encoding!==null&&(e.body=e.body.toString(r.encoding)),a=[],i=0):t.length&&(r.encoding==="utf8"&&t[0].length>0&&t[0][0]==="\uFEFF"&&(t[0]=t[0].substring(1)),e.body=t.join("")),r._json)try{e.body=JSON.parse(e.body,r._jsonReviver)}catch{rt("invalid JSON received",r.uri.href)}rt("emitting complete",r.uri.href),typeof e.body>"u"&&!r._json&&(e.body=r.encoding===null?Cu.alloc(0):""),r.emit("complete",e,e.body)})};Rr.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.clearTimeout(),e.emit("abort")};Rr.prototype.pipeDest=function(e){var r=this,a=r.response;if(e.headers&&!e.headersSent){if(a.caseless.has("content-type")){var i=a.caseless.has("content-type");e.setHeader?e.setHeader(i,a.headers[i]):e.headers[i]=a.headers[i]}if(a.caseless.has("content-length")){var t=a.caseless.has("content-length");e.setHeader?e.setHeader(t,a.headers[t]):e.headers[t]=a.headers[t]}}if(e.setHeader&&!e.headersSent){for(var n in a.headers)(!r.gzip||n!=="content-encoding")&&e.setHeader(n,a.headers[n]);e.statusCode=a.statusCode}r.pipefilter&&r.pipefilter(a,e)};Rr.prototype.qs=function(e,r){var a=this,i;!r&&a.uri.query?i=a._qs.parse(a.uri.query):i={};for(var t in e)i[t]=e[t];var n=a._qs.stringify(i);return n===""||(a.uri=Fu.parse(a.uri.href.split("?")[0]+"?"+n),a.url=a.uri,a.path=a.uri.path,a.uri.host==="unix"&&a.enableUnixSocket()),a};Rr.prototype.form=function(e){var r=this;return e?(/^application\/x-www-form-urlencoded\b/.test(r.getHeader("content-type"))||r.setHeader("content-type","application/x-www-form-urlencoded"),r.body=typeof e=="string"?r._qs.rfc3986(e.toString("utf8")):r._qs.stringify(e).toString("utf8"),r):(r._form=new mO,r._form.on("error",function(a){a.message="form-data: "+a.message,r.emit("error",a),r.abort()}),r._form)};Rr.prototype.multipart=function(e){var r=this;return r._multipart.onRequest(e),r._multipart.chunked||(r.body=r._multipart.body),r};Rr.prototype.json=function(e){var r=this;return r.hasHeader("accept")||r.setHeader("accept","application/json"),typeof r.jsonReplacer=="function"&&(r._jsonReplacer=r.jsonReplacer),r._json=!0,typeof e=="boolean"?r.body!==void 0&&(/^application\/x-www-form-urlencoded\b/.test(r.getHeader("content-type"))?r.body=r._qs.rfc3986(r.body):r.body=i6(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=i6(e,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")),typeof r.jsonReviver=="function"&&(r._jsonReviver=r.jsonReviver),r};Rr.prototype.getHeader=function(e,r){var a=this,i,t,n;return r||(r=a.headers),Object.keys(r).forEach(function(o){o.length===e.length&&(t=new RegExp(e,"i"),n=o.match(t),n&&(i=r[o]))}),i};Rr.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),r=e[0],a=e[1];this.socketPath=r,this.uri.pathname=a,this.uri.path=a,this.uri.host=r,this.uri.hostname=r,this.uri.isUnix=!0};Rr.prototype.auth=function(e,r,a,i){var t=this;return t._auth.onRequest(e,r,a,i),t};Rr.prototype.aws=function(e,r){var a=this;if(!r)return a._aws=e,a;if(e.sign_version===4||e.sign_version==="4"){var i={host:a.uri.host,path:a.uri.path,method:a.method,headers:a.headers,body:a.body};e.service&&(i.service=e.service);var t=pO.sign(i,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});a.setHeader("authorization",t.headers.Authorization),a.setHeader("x-amz-date",t.headers["X-Amz-Date"]),t.headers["X-Amz-Security-Token"]&&a.setHeader("x-amz-security-token",t.headers["X-Amz-Security-Token"])}else{var n=new Date;a.setHeader("date",n.toUTCString());var o={key:e.key,secret:e.secret,verb:a.method.toUpperCase(),date:n,contentType:a.getHeader("content-type")||"",md5:a.getHeader("content-md5")||"",amazonHeaders:Bm.canonicalizeHeaders(a.headers)},s=a.uri.path;e.bucket&&s?o.resource="/"+e.bucket+s:e.bucket&&!s?o.resource="/"+e.bucket:!e.bucket&&s?o.resource=s:!e.bucket&&!s&&(o.resource="/"),o.resource=Bm.canonicalizeResource(o.resource),a.setHeader("authorization",Bm.authorization(o))}return a};Rr.prototype.httpSignature=function(e){var r=this;return dO.signRequest({getHeader:function(a){return r.getHeader(a,r.headers)},setHeader:function(a,i){r.setHeader(a,i)},method:r.method,path:r.path},e),rt("httpSignature authorization",r.getHeader("authorization")),r};Rr.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",jO.header(r.uri,r.method,e))};Rr.prototype.oauth=function(e){var r=this;return r._oauth.onRequest(e),r};Rr.prototype.jar=function(e){var r=this,a;if(r._redirect.redirectsFollowed===0&&(r.originalCookieHeader=r.getHeader("cookie")),!e)a=!1,r._disableCookies=!0;else{var i=e.getCookieString?e:u6,t=r.uri.href;i&&(a=i.getCookieString(t))}return a&&a.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+a):r.setHeader("cookie",a)),r._jar=e,r};Rr.prototype.pipe=function(e,r){var a=this;if(a.response)if(a._destdata)a.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(a._ended)a.emit("error",new Error("You cannot pipe after the response has been ended."));else return Kl.Stream.prototype.pipe.call(a,e,r),a.pipeDest(e),e;else return a.dests.push(e),Kl.Stream.prototype.pipe.call(a,e,r),e};Rr.prototype.write=function(){var e=this;if(!e._aborted&&(e._started||e.start(),e.req))return e.req.write.apply(e.req,arguments)};Rr.prototype.end=function(e){var r=this;r._aborted||(e&&r.write(e),r._started||r.start(),r.req&&r.req.end())};Rr.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0};Rr.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1};Rr.prototype.destroy=function(){var e=this;this.clearTimeout(),e._ended?e.response&&e.response.destroy():e.end()};Rr.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)};Rr.defaultProxyHeaderWhiteList=Om.defaultProxyHeaderWhiteList.slice();Rr.defaultProxyHeaderExclusiveList=Om.defaultProxyHeaderExclusiveList.slice();Rr.prototype.toJSON=l6;f6.exports=Rr});var m6=B((zH,h6)=>{"use strict";var qu=bc(),d6=ud(),BO=_c(),RO=BO.paramsHaveRequestBody;function Yl(e,r,a){typeof r=="function"&&(a=r);var i={};return r!==null&&typeof r=="object"?qu(i,r,{uri:e}):typeof e=="string"?qu(i,{uri:e}):qu(i,e),i.callback=a||i.callback,i}function Ta(e,r,a){if(typeof e>"u")throw new Error("undefined is not a valid uri or options object.");var i=Yl(e,r,a);if(i.method==="HEAD"&&RO(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new Ta.Request(i)}function $n(e){var r=e.toUpperCase();return function(a,i,t){var n=Yl(a,i,t);return n.method=r,Ta(n,n.callback)}}Ta.get=$n("get");Ta.head=$n("head");Ta.options=$n("options");Ta.post=$n("post");Ta.put=$n("put");Ta.patch=$n("patch");Ta.del=$n("delete");Ta.delete=$n("delete");Ta.jar=function(e){return d6.jar(e)};Ta.cookie=function(e){return d6.parse(e)};function Dm(e,r,a,i){return function(t,n,o){var s=Yl(t,n,o),c={};return qu(!0,c,r,s),c.pool=s.pool||r.pool,i&&(c.method=i.toUpperCase()),typeof a=="function"&&(e=a),e(c,c.callback)}}Ta.defaults=function(e,r){var a=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=Dm(a,e,r),t=["get","head","post","put","patch","del","delete"];return t.forEach(function(n){i[n]=Dm(a[n],e,r,n)}),i.cookie=Dm(a.cookie,e,r),i.jar=a.jar,i.defaults=a.defaults,i};Ta.forever=function(e,r){var a={};return r&&qu(a,r),e&&(a.agentOptions=e),a.forever=!0,Ta.defaults(a)};h6.exports=Ta;Ta.Request=p6();Ta.initParams=Yl;Object.defineProperty(Ta,"debug",{enumerable:!0,get:function(){return Ta.Request.debug},set:function(e){Ta.Request.debug=e}})});var g6=B((LH,v6)=>{v6.exports=OO;function OO(e){if(!/^data\:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");var r=e.indexOf(",");if(r===-1||r<=4)throw new TypeError("malformed data: URI");for(var a=e.substring(5,r).split(";"),i=!1,t="US-ASCII",n=0;n<a.length;n++)a[n]=="base64"?i=!0:a[n].indexOf("charset=")==0&&(t=a[n].substring(8));var o=unescape(e.substring(r+1)),s=i?"base64":"ascii",c=new Buffer(o,s);return c.type=a[0]||"text/plain",c.charset=t,c}});var x6=B((MH,y6)=>{var DO=g6();function zO(e){return{mimeType:MO(LO(e)),data:DO(e)}}function LO(e){return e.substring(5,e.indexOf(";"))}var b6=/^(\w+\/)+/;function MO(e){e=e.toLowerCase();var r=e.match(b6);return!r||!(r=r[1])?e:e.replace(b6,r)}y6.exports=zO});var k6=B((UH,w6)=>{"use strict";var Iu=zs(),NH=require("path"),NO=Ly().PNG,UO=mp(),HO=Vy(),VO=Wy().GifReader,$O=Xy(),WO=require("fs"),GO=m6(),KO=yl(),YO=x6();function QO(e,r){var a=new NO;a.parse(e,function(i,t){if(i){r(i);return}r(null,Iu(new Uint8Array(t.data),[t.width|0,t.height|0,4],[4,4*t.width|0,1],0))})}function XO(e,r){var a;try{a=UO.decode(e)}catch(n){r(n);return}if(!a){r(new Error("Error decoding jpeg"));return}var i=[a.height,a.width,4],t=Iu(a.data,i);r(null,t.transpose(1,0))}function JO(e,r){var a;try{a=new VO(e)}catch(s){r(s);return}if(a.numFrames()>0){var i=[a.numFrames(),a.height,a.width,4];try{var t=new Uint8Array(i[0]*i[1]*i[2]*i[3])}catch(s){r(s);return}var n=Iu(t,i);try{for(var o=0;o<a.numFrames();++o)a.decodeAndBlitFrameRGBA(o,t.subarray(n.index(o,0,0,0),n.index(o+1,0,0,0)))}catch(s){r(s);return}r(null,n.transpose(0,2,1))}else{var i=[a.height,a.width,4],t=new Uint8Array(i[0]*i[1]*i[2]),n=Iu(t,i);try{a.decodeAndBlitFrameRGBA(0,t)}catch(f){r(f);return}r(null,n.transpose(1,0))}}function ZO(e,r){var a=new $O(e);try{a.init()}catch(s){r(s);return}var i=a.getData(),t=[i.getHeight(),i.getWidth(),4],n=new Uint8Array(t[0]*t[1]*t[2]),o=Iu(n,t);HO(i,o),r(null,o.transpose(1,0))}function Ql(e,r,a){switch(e){case"image/png":QO(r,a);break;case"image/jpg":case"image/jpeg":XO(r,a);break;case"image/gif":JO(r,a);break;case"image/bmp":ZO(r,a);break;default:a(new Error("Unsupported file type: "+e))}}w6.exports=function(r,a,i){if(i||(i=a,a=""),Buffer.isBuffer(r)){if(!a){i(new Error("Invalid file type"));return}Ql(a,r,i)}else if(r.indexOf("data:")===0)try{var t=YO(r);t?process.nextTick(function(){Ql(a||t.mimeType,t.data,i)}):process.nextTick(function(){i(new Error("Error parsing data URI"))})}catch(n){process.nextTick(function(){i(n)})}else r.indexOf("http://")===0||r.indexOf("https://")===0?GO({url:r,encoding:null},function(n,o,s){if(n){i(n);return}if(a=a,a||(o.getHeader!==void 0?a=o.getHeader("content-type"):o.headers!==void 0&&(a=o.headers["content-type"])),!a){i(new Error("Invalid content-type"));return}Ql(a,s,i)}):WO.readFile(r,function(n,o){if(n){i(n);return}if(a=a||KO.lookup(r),!a){i(new Error("Invalid file type"));return}Ql(a,o,i)})}});var R6=B((cf,B6)=>{(function(e,r){typeof cf=="object"&&typeof B6<"u"?r(cf):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis<"u"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(cf,function(e){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(u){return"Symbol("+u+")"};function a(){}function i(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}var t=i();function n(u){return typeof u=="object"&&u!==null||typeof u=="function"}var o=a,s=Promise,c=Promise.prototype.then,p=Promise.resolve.bind(s),f=Promise.reject.bind(s);function m(u){return new s(u)}function h(u){return p(u)}function v(u){return f(u)}function w(u,d,j){return c.call(u,d,j)}function E(u,d,j){w(w(u,d,j),void 0,o)}function _(u,d){E(u,d)}function A(u,d){E(u,void 0,d)}function C(u,d,j){return w(u,d,j)}function T(u){w(u,void 0,o)}var D=function(){var u=t&&t.queueMicrotask;if(typeof u=="function")return u;var d=h(void 0);return function(j){return w(d,j)}}();function I(u,d,j){if(typeof u!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(u,d,j)}function R(u,d,j){try{return h(I(u,d,j))}catch(O){return v(O)}}var L=16384,$=function(){function u(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(u.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),u.prototype.push=function(d){var j=this._back,O=j;j._elements.length===L-1&&(O={_elements:[],_next:void 0}),j._elements.push(d),O!==j&&(this._back=O,j._next=O),++this._size},u.prototype.shift=function(){var d=this._front,j=d,O=this._cursor,W=O+1,se=d._elements,ve=se[O];return W===L&&(j=d._next,W=0),--this._size,this._cursor=W,d!==j&&(this._front=j),se[O]=void 0,ve},u.prototype.forEach=function(d){for(var j=this._cursor,O=this._front,W=O._elements;(j!==W.length||O._next!==void 0)&&!(j===W.length&&(O=O._next,W=O._elements,j=0,W.length===0));)d(W[j]),++j},u.prototype.peek=function(){var d=this._front,j=this._cursor;return d._elements[j]},u}();function V(u,d){u._ownerReadableStream=d,d._reader=u,d._state==="readable"?H(u):d._state==="closed"?re(u):X(u,d._storedError)}function Q(u,d){var j=u._ownerReadableStream;return ii(j,d)}function G(u){u._ownerReadableStream._state==="readable"?_e(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):ye(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),u._ownerReadableStream._reader=void 0,u._ownerReadableStream=void 0}function ee(u){return new TypeError("Cannot "+u+" a stream using a released reader")}function H(u){u._closedPromise=m(function(d,j){u._closedPromise_resolve=d,u._closedPromise_reject=j})}function X(u,d){H(u),_e(u,d)}function re(u){H(u),le(u)}function _e(u,d){u._closedPromise_reject!==void 0&&(T(u._closedPromise),u._closedPromise_reject(d),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}function ye(u,d){X(u,d)}function le(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}var je=r("[[AbortSteps]]"),ge=r("[[ErrorSteps]]"),Le=r("[[CancelSteps]]"),Ue=r("[[PullSteps]]"),Oe=Number.isFinite||function(u){return typeof u=="number"&&isFinite(u)},U=Math.trunc||function(u){return u<0?Math.ceil(u):Math.floor(u)};function xe(u){return typeof u=="object"||typeof u=="function"}function Qe(u,d){if(u!==void 0&&!xe(u))throw new TypeError(d+" is not an object.")}function We(u,d){if(typeof u!="function")throw new TypeError(d+" is not a function.")}function $e(u){return typeof u=="object"&&u!==null||typeof u=="function"}function rr(u,d){if(!$e(u))throw new TypeError(d+" is not an object.")}function qe(u,d,j){if(u===void 0)throw new TypeError("Parameter "+d+" is required in '"+j+"'.")}function fe(u,d,j){if(u===void 0)throw new TypeError(d+" is required in '"+j+"'.")}function we(u){return Number(u)}function ir(u){return u===0?0:u}function Pe(u){return ir(U(u))}function ur(u,d){var j=0,O=Number.MAX_SAFE_INTEGER,W=Number(u);if(W=ir(W),!Oe(W))throw new TypeError(d+" is not a finite number");if(W=Pe(W),W<j||W>O)throw new TypeError(d+" is outside the accepted range of "+j+" to "+O+", inclusive");return!Oe(W)||W===0?0:W}function Or(u,d){if(!vn(u))throw new TypeError(d+" is not a ReadableStream.")}function Wr(u){return new Ye(u)}function J(u,d){u._reader._readRequests.push(d)}function Ie(u,d,j){var O=u._reader,W=O._readRequests.shift();j?W._closeSteps():W._chunkSteps(d)}function Ge(u){return u._reader._readRequests.length}function He(u){var d=u._reader;return!(d===void 0||!Ze(d))}var Ye=function(){function u(d){if(qe(d,1,"ReadableStreamDefaultReader"),Or(d,"First parameter"),gn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");V(this,d),this._readRequests=new $}return Object.defineProperty(u.prototype,"closed",{get:function(){return Ze(this)?this._closedPromise:v(mr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),Ze(this)?this._ownerReadableStream===void 0?v(ee("cancel")):Q(this,d):v(mr("cancel"))},u.prototype.read=function(){if(!Ze(this))return v(mr("read"));if(this._ownerReadableStream===void 0)return v(ee("read from"));var d,j,O=m(function(se,ve){d=se,j=ve}),W={_chunkSteps:function(se){return d({value:se,done:!1})},_closeSteps:function(){return d({value:void 0,done:!0})},_errorSteps:function(se){return j(se)}};return nr(this,W),O},u.prototype.releaseLock=function(){if(!Ze(this))throw mr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");G(this)}},u}();Object.defineProperties(Ye.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ye.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Ze(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readRequests")?!1:u instanceof Ye}function nr(u,d){var j=u._ownerReadableStream;j._disturbed=!0,j._state==="closed"?d._closeSteps():j._state==="errored"?d._errorSteps(j._storedError):j._readableStreamController[Ue](d)}function mr(u){return new TypeError("ReadableStreamDefaultReader.prototype."+u+" can only be used on a ReadableStreamDefaultReader")}var Br,vr;typeof r.asyncIterator=="symbol"&&(vr=(Br={},Br[r.asyncIterator]=function(){return this},Br),Object.defineProperty(vr,r.asyncIterator,{enumerable:!1}));var me=function(){function u(d,j){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=d,this._preventCancel=j}return u.prototype.next=function(){var d=this,j=function(){return d._nextSteps()};return this._ongoingPromise=this._ongoingPromise?C(this._ongoingPromise,j,j):j(),this._ongoingPromise},u.prototype.return=function(d){var j=this,O=function(){return j._returnSteps(d)};return this._ongoingPromise?C(this._ongoingPromise,O,O):O()},u.prototype._nextSteps=function(){var d=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var j=this._reader;if(j._ownerReadableStream===void 0)return v(ee("iterate"));var O,W,se=m(function(Je,Er){O=Je,W=Er}),ve={_chunkSteps:function(Je){d._ongoingPromise=void 0,D(function(){return O({value:Je,done:!1})})},_closeSteps:function(){d._ongoingPromise=void 0,d._isFinished=!0,G(j),O({value:void 0,done:!0})},_errorSteps:function(Je){d._ongoingPromise=void 0,d._isFinished=!0,G(j),W(Je)}};return nr(j,ve),se},u.prototype._returnSteps=function(d){if(this._isFinished)return Promise.resolve({value:d,done:!0});this._isFinished=!0;var j=this._reader;if(j._ownerReadableStream===void 0)return v(ee("finish iterating"));if(!this._preventCancel){var O=Q(j,d);return G(j),C(O,function(){return{value:d,done:!0}})}return G(j),h({value:d,done:!0})},u}(),Ke={next:function(){return Pr(this)?this._asyncIteratorImpl.next():v(cr("next"))},return:function(u){return Pr(this)?this._asyncIteratorImpl.return(u):v(cr("return"))}};vr!==void 0&&Object.setPrototypeOf(Ke,vr);function fr(u,d){var j=Wr(u),O=new me(j,d),W=Object.create(Ke);return W._asyncIteratorImpl=O,W}function Pr(u){if(!n(u)||!Object.prototype.hasOwnProperty.call(u,"_asyncIteratorImpl"))return!1;try{return u._asyncIteratorImpl instanceof me}catch{return!1}}function cr(u){return new TypeError("ReadableStreamAsyncIterator."+u+" can only be used on a ReadableSteamAsyncIterator")}var gr=Number.isNaN||function(u){return u!==u};function wr(u){return u.slice()}function or(u,d,j,O,W){new Uint8Array(u).set(new Uint8Array(j,O,W),d)}function dr(u){return u}function Vr(u){return!1}function Fr(u,d,j){if(u.slice)return u.slice(d,j);var O=j-d,W=new ArrayBuffer(O);return or(W,0,u,d,O),W}function ka(u){return!(typeof u!="number"||gr(u)||u<0)}function Fa(u){var d=Fr(u.buffer,u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(d)}function at(u){var d=u._queue.shift();return u._queueTotalSize-=d.size,u._queueTotalSize<0&&(u._queueTotalSize=0),d.value}function lt(u,d,j){if(!ka(j)||j===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");u._queue.push({value:d,size:j}),u._queueTotalSize+=j}function Zr(u){var d=u._queue.peek();return d.value}function oa(u){u._queue=new $,u._queueTotalSize=0}var pa=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"view",{get:function(){if(!tt(this))throw ze("view");return this._view},enumerable:!1,configurable:!0}),u.prototype.respond=function(d){if(!tt(this))throw ze("respond");if(qe(d,1,"respond"),d=ur(d,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Vr(this._view.buffer),Xe(this._associatedReadableByteStreamController,d)},u.prototype.respondWithNewView=function(d){if(!tt(this))throw ze("respondWithNewView");if(qe(d,1,"respondWithNewView"),!ArrayBuffer.isView(d))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Vr(d.buffer),Te(this._associatedReadableByteStreamController,d)},u}();Object.defineProperties(pa.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(pa.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Ca=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"byobRequest",{get:function(){if(!da(this))throw he("byobRequest");return Ce(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!da(this))throw he("desiredSize");return ar(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!da(this))throw he("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var d=this._controlledReadableByteStream._state;if(d!=="readable")throw new TypeError("The stream (in "+d+" state) is not in the readable state and cannot be closed");Be(this)},u.prototype.enqueue=function(d){if(!da(this))throw he("enqueue");if(qe(d,1,"enqueue"),!ArrayBuffer.isView(d))throw new TypeError("chunk must be an array buffer view");if(d.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(d.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var j=this._controlledReadableByteStream._state;if(j!=="readable")throw new TypeError("The stream (in "+j+" state) is not in the readable state and cannot be enqueued to");Se(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!da(this))throw he("error");Fe(this,d)},u.prototype[Le]=function(d){ea(this),oa(this);var j=this._cancelAlgorithm(d);return Ne(this),j},u.prototype[Ue]=function(d){var j=this._controlledReadableByteStream;if(this._queueTotalSize>0){var O=this._queue.shift();this._queueTotalSize-=O.byteLength,x(this);var W=new Uint8Array(O.buffer,O.byteOffset,O.byteLength);d._chunkSteps(W);return}var se=this._autoAllocateChunkSize;if(se!==void 0){var ve=void 0;try{ve=new ArrayBuffer(se)}catch(Er){d._errorSteps(Er);return}var Je={buffer:ve,bufferByteLength:se,byteOffset:0,byteLength:se,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Je)}J(j,d),Da(this)},u}();Object.defineProperties(Ca.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ca.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function da(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableByteStream")?!1:u instanceof Ca}function tt(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_associatedReadableByteStreamController")?!1:u instanceof pa}function Da(u){var d=be(u);if(d){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var j=u._pullAlgorithm();E(j,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,Da(u))},function(O){Fe(u,O)})}}function ea(u){F(u),u._pendingPullIntos=new $}function Ot(u,d){var j=!1;u._state==="closed"&&(j=!0);var O=y(d);d.readerType==="default"?Ie(u,O,j):ce(u,O,j)}function y(u){var d=u.bytesFilled,j=u.elementSize;return new u.viewConstructor(u.buffer,u.byteOffset,d/j)}function b(u,d,j,O){u._queue.push({buffer:d,byteOffset:j,byteLength:O}),u._queueTotalSize+=O}function g(u,d){var j=d.elementSize,O=d.bytesFilled-d.bytesFilled%j,W=Math.min(u._queueTotalSize,d.byteLength-d.bytesFilled),se=d.bytesFilled+W,ve=se-se%j,Je=W,Er=!1;ve>O&&(Je=ve-d.bytesFilled,Er=!0);for(var qr=u._queue;Je>0;){var Dr=qr.peek(),$r=Math.min(Je,Dr.byteLength),qa=d.byteOffset+d.bytesFilled;or(d.buffer,qa,Dr.buffer,Dr.byteOffset,$r),Dr.byteLength===$r?qr.shift():(Dr.byteOffset+=$r,Dr.byteLength-=$r),u._queueTotalSize-=$r,l(u,$r,d),Je-=$r}return Er}function l(u,d,j){j.bytesFilled+=d}function x(u){u._queueTotalSize===0&&u._closeRequested?(Ne(u),js(u._controlledReadableByteStream)):Da(u)}function F(u){u._byobRequest!==null&&(u._byobRequest._associatedReadableByteStreamController=void 0,u._byobRequest._view=null,u._byobRequest=null)}function M(u){for(;u._pendingPullIntos.length>0;){if(u._queueTotalSize===0)return;var d=u._pendingPullIntos.peek();g(u,d)&&(Me(u),Ot(u._controlledReadableByteStream,d))}}function K(u,d,j){var O=u._controlledReadableByteStream,W=1;d.constructor!==DataView&&(W=d.constructor.BYTES_PER_ELEMENT);var se=d.constructor,ve=d.buffer,Je={buffer:ve,bufferByteLength:ve.byteLength,byteOffset:d.byteOffset,byteLength:d.byteLength,bytesFilled:0,elementSize:W,viewConstructor:se,readerType:"byob"};if(u._pendingPullIntos.length>0){u._pendingPullIntos.push(Je),Z(O,j);return}if(O._state==="closed"){var Er=new se(Je.buffer,Je.byteOffset,0);j._closeSteps(Er);return}if(u._queueTotalSize>0){if(g(u,Je)){var qr=y(Je);x(u),j._chunkSteps(qr);return}if(u._closeRequested){var Dr=new TypeError("Insufficient bytes to fill elements in the given buffer");Fe(u,Dr),j._errorSteps(Dr);return}}u._pendingPullIntos.push(Je),Z(O,j),Da(u)}function te(u,d){var j=u._controlledReadableByteStream;if(ae(j))for(;oe(j)>0;){var O=Me(u);Ot(j,O)}}function pe(u,d,j){if(l(u,d,j),!(j.bytesFilled<j.elementSize)){Me(u);var O=j.bytesFilled%j.elementSize;if(O>0){var W=j.byteOffset+j.bytesFilled,se=Fr(j.buffer,W-O,W);b(u,se,0,se.byteLength)}j.bytesFilled-=O,Ot(u._controlledReadableByteStream,j),M(u)}}function de(u,d){var j=u._pendingPullIntos.peek();F(u);var O=u._controlledReadableByteStream._state;O==="closed"?te(u):pe(u,d,j),Da(u)}function Me(u){var d=u._pendingPullIntos.shift();return d}function be(u){var d=u._controlledReadableByteStream;if(d._state!=="readable"||u._closeRequested||!u._started)return!1;if(He(d)&&Ge(d)>0||ae(d)&&oe(d)>0)return!0;var j=ar(u);return j>0}function Ne(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0}function Be(u){var d=u._controlledReadableByteStream;if(!(u._closeRequested||d._state!=="readable")){if(u._queueTotalSize>0){u._closeRequested=!0;return}if(u._pendingPullIntos.length>0){var j=u._pendingPullIntos.peek();if(j.bytesFilled>0){var O=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Fe(u,O),O}}Ne(u),js(d)}}function Se(u,d){var j=u._controlledReadableByteStream;if(!(u._closeRequested||j._state!=="readable")){var O=d.buffer,W=d.byteOffset,se=d.byteLength,ve=O;if(u._pendingPullIntos.length>0){var Je=u._pendingPullIntos.peek();Vr(Je.buffer),Je.buffer=Je.buffer}if(F(u),He(j))if(Ge(j)===0)b(u,ve,W,se);else{u._pendingPullIntos.length>0&&Me(u);var Er=new Uint8Array(ve,W,se);Ie(j,Er,!1)}else ae(j)?(b(u,ve,W,se),M(u)):b(u,ve,W,se);Da(u)}}function Fe(u,d){var j=u._controlledReadableByteStream;j._state==="readable"&&(ea(u),oa(u),Ne(u),Sv(j,d))}function Ce(u){if(u._byobRequest===null&&u._pendingPullIntos.length>0){var d=u._pendingPullIntos.peek(),j=new Uint8Array(d.buffer,d.byteOffset+d.bytesFilled,d.byteLength-d.bytesFilled),O=Object.create(pa.prototype);De(O,u,j),u._byobRequest=O}return u._byobRequest}function ar(u){var d=u._controlledReadableByteStream._state;return d==="errored"?null:d==="closed"?0:u._strategyHWM-u._queueTotalSize}function Xe(u,d){var j=u._pendingPullIntos.peek(),O=u._controlledReadableByteStream._state;if(O==="closed"){if(d!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(d===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(j.bytesFilled+d>j.byteLength)throw new RangeError("bytesWritten out of range")}j.buffer=j.buffer,de(u,d)}function Te(u,d){var j=u._pendingPullIntos.peek(),O=u._controlledReadableByteStream._state;if(O==="closed"){if(d.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(d.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(j.byteOffset+j.bytesFilled!==d.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(j.bufferByteLength!==d.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(j.bytesFilled+d.byteLength>j.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var W=d.byteLength;j.buffer=d.buffer,de(u,W)}function Ee(u,d,j,O,W,se,ve){d._controlledReadableByteStream=u,d._pullAgain=!1,d._pulling=!1,d._byobRequest=null,d._queue=d._queueTotalSize=void 0,oa(d),d._closeRequested=!1,d._started=!1,d._strategyHWM=se,d._pullAlgorithm=O,d._cancelAlgorithm=W,d._autoAllocateChunkSize=ve,d._pendingPullIntos=new $,u._readableStreamController=d;var Je=j();E(h(Je),function(){d._started=!0,Da(d)},function(Er){Fe(d,Er)})}function Ae(u,d,j){var O=Object.create(Ca.prototype),W=function(){},se=function(){return h(void 0)},ve=function(){return h(void 0)};d.start!==void 0&&(W=function(){return d.start(O)}),d.pull!==void 0&&(se=function(){return d.pull(O)}),d.cancel!==void 0&&(ve=function(Er){return d.cancel(Er)});var Je=d.autoAllocateChunkSize;if(Je===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ee(u,O,W,se,ve,j,Je)}function De(u,d,j){u._associatedReadableByteStreamController=d,u._view=j}function ze(u){return new TypeError("ReadableStreamBYOBRequest.prototype."+u+" can only be used on a ReadableStreamBYOBRequest")}function he(u){return new TypeError("ReadableByteStreamController.prototype."+u+" can only be used on a ReadableByteStreamController")}function Y(u){return new ne(u)}function Z(u,d){u._reader._readIntoRequests.push(d)}function ce(u,d,j){var O=u._reader,W=O._readIntoRequests.shift();j?W._closeSteps(d):W._chunkSteps(d)}function oe(u){return u._reader._readIntoRequests.length}function ae(u){var d=u._reader;return!(d===void 0||!Ve(d))}var ne=function(){function u(d){if(qe(d,1,"ReadableStreamBYOBReader"),Or(d,"First parameter"),gn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!da(d._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");V(this,d),this._readIntoRequests=new $}return Object.defineProperty(u.prototype,"closed",{get:function(){return Ve(this)?this._closedPromise:v(tr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),Ve(this)?this._ownerReadableStream===void 0?v(ee("cancel")):Q(this,d):v(tr("cancel"))},u.prototype.read=function(d){if(!Ve(this))return v(tr("read"));if(!ArrayBuffer.isView(d))return v(new TypeError("view must be an array buffer view"));if(d.byteLength===0)return v(new TypeError("view must have non-zero byteLength"));if(d.buffer.byteLength===0)return v(new TypeError("view's buffer must have non-zero byteLength"));if(Vr(d.buffer),this._ownerReadableStream===void 0)return v(ee("read from"));var j,O,W=m(function(ve,Je){j=ve,O=Je}),se={_chunkSteps:function(ve){return j({value:ve,done:!1})},_closeSteps:function(ve){return j({value:ve,done:!0})},_errorSteps:function(ve){return O(ve)}};return lr(this,d,se),W},u.prototype.releaseLock=function(){if(!Ve(this))throw tr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");G(this)}},u}();Object.defineProperties(ne.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ne.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Ve(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readIntoRequests")?!1:u instanceof ne}function lr(u,d,j){var O=u._ownerReadableStream;O._disturbed=!0,O._state==="errored"?j._errorSteps(O._storedError):K(O._readableStreamController,d,j)}function tr(u){return new TypeError("ReadableStreamBYOBReader.prototype."+u+" can only be used on a ReadableStreamBYOBReader")}function sr(u,d){var j=u.highWaterMark;if(j===void 0)return d;if(gr(j)||j<0)throw new RangeError("Invalid highWaterMark");return j}function z(u){var d=u.size;return d||function(){return 1}}function yr(u,d){Qe(u,d);var j=u==null?void 0:u.highWaterMark,O=u==null?void 0:u.size;return{highWaterMark:j===void 0?void 0:we(j),size:O===void 0?void 0:Ar(O,d+" has member 'size' that")}}function Ar(u,d){return We(u,d),function(j){return we(u(j))}}function kr(u,d){Qe(u,d);var j=u==null?void 0:u.abort,O=u==null?void 0:u.close,W=u==null?void 0:u.start,se=u==null?void 0:u.type,ve=u==null?void 0:u.write;return{abort:j===void 0?void 0:pr(j,u,d+" has member 'abort' that"),close:O===void 0?void 0:Sr(O,u,d+" has member 'close' that"),start:W===void 0?void 0:_r(W,u,d+" has member 'start' that"),write:ve===void 0?void 0:ra(ve,u,d+" has member 'write' that"),type:se}}function pr(u,d,j){return We(u,j),function(O){return R(u,d,[O])}}function Sr(u,d,j){return We(u,j),function(){return R(u,d,[])}}function _r(u,d,j){return We(u,j),function(O){return I(u,d,[O])}}function ra(u,d,j){return We(u,j),function(O,W){return R(u,d,[O,W])}}function Tr(u,d){if(!Re(u))throw new TypeError(d+" is not a WritableStream.")}function k(u){if(typeof u!="object"||u===null)return!1;try{return typeof u.aborted=="boolean"}catch{return!1}}var S=typeof AbortController=="function";function P(){if(S)return new AbortController}var N=function(){function u(d,j){d===void 0&&(d={}),j===void 0&&(j={}),d===void 0?d=null:rr(d,"First parameter");var O=yr(j,"Second parameter"),W=kr(d,"First parameter");ke(this);var se=W.type;if(se!==void 0)throw new RangeError("Invalid type is specified");var ve=z(O),Je=sr(O,1);l5(this,W,Je,ve)}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Re(this))throw Hu("locked");return Cr(this)},enumerable:!1,configurable:!0}),u.prototype.abort=function(d){return d===void 0&&(d=void 0),Re(this)?Cr(this)?v(new TypeError("Cannot abort a stream that already has a writer")):sa(this,d):v(Hu("abort"))},u.prototype.close=function(){return Re(this)?Cr(this)?v(new TypeError("Cannot close a stream that already has a writer")):ti(this)?v(new TypeError("Cannot close an already-closing stream")):it(this):v(Hu("close"))},u.prototype.getWriter=function(){if(!Re(this))throw Hu("getWriter");return ie(this)},u}();Object.defineProperties(N.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(N.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function ie(u){return new _o(u)}function ue(u,d,j,O,W,se){W===void 0&&(W=1),se===void 0&&(se=function(){return 1});var ve=Object.create(N.prototype);ke(ve);var Je=Object.create(Kn.prototype);return pv(ve,Je,u,d,j,O,W,se),ve}function ke(u){u._state="writable",u._storedError=void 0,u._writer=void 0,u._writableStreamController=void 0,u._writeRequests=new $,u._inFlightWriteRequest=void 0,u._closeRequest=void 0,u._inFlightCloseRequest=void 0,u._pendingAbortRequest=void 0,u._backpressure=!1}function Re(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_writableStreamController")?!1:u instanceof N}function Cr(u){return u._writer!==void 0}function sa(u,d){var j;if(u._state==="closed"||u._state==="errored")return h(void 0);u._writableStreamController._abortReason=d,(j=u._writableStreamController._abortController)===null||j===void 0||j.abort();var O=u._state;if(O==="closed"||O==="errored")return h(void 0);if(u._pendingAbortRequest!==void 0)return u._pendingAbortRequest._promise;var W=!1;O==="erroring"&&(W=!0,d=void 0);var se=m(function(ve,Je){u._pendingAbortRequest={_promise:void 0,_resolve:ve,_reject:Je,_reason:d,_wasAlreadyErroring:W}});return u._pendingAbortRequest._promise=se,W||Gi(u,d),se}function it(u){var d=u._state;if(d==="closed"||d==="errored")return v(new TypeError("The stream (in "+d+" state) is not in the writable state and cannot be closed"));var j=m(function(W,se){var ve={_resolve:W,_reject:se};u._closeRequest=ve}),O=u._writer;return O!==void 0&&u._backpressure&&d==="writable"&&jf(O),f5(u._writableStreamController),j}function nt(u){var d=m(function(j,O){var W={_resolve:j,_reject:O};u._writeRequests.push(W)});return d}function xt(u,d){var j=u._state;if(j==="writable"){Gi(u,d);return}ft(u)}function Gi(u,d){var j=u._writableStreamController;u._state="erroring",u._storedError=d;var O=u._writer;O!==void 0&&uv(O,d),!t5(u)&&j._started&&ft(u)}function ft(u){u._state="errored",u._writableStreamController[ge]();var d=u._storedError;if(u._writeRequests.forEach(function(W){W._reject(d)}),u._writeRequests=new $,u._pendingAbortRequest===void 0){Mu(u);return}var j=u._pendingAbortRequest;if(u._pendingAbortRequest=void 0,j._wasAlreadyErroring){j._reject(d),Mu(u);return}var O=u._writableStreamController[je](j._reason);E(O,function(){j._resolve(),Mu(u)},function(W){j._reject(W),Mu(u)})}function At(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0}function Wn(u,d){u._inFlightWriteRequest._reject(d),u._inFlightWriteRequest=void 0,xt(u,d)}function ai(u){u._inFlightCloseRequest._resolve(void 0),u._inFlightCloseRequest=void 0;var d=u._state;d==="erroring"&&(u._storedError=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._resolve(),u._pendingAbortRequest=void 0)),u._state="closed";var j=u._writer;j!==void 0&&vv(j)}function ko(u,d){u._inFlightCloseRequest._reject(d),u._inFlightCloseRequest=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._reject(d),u._pendingAbortRequest=void 0),xt(u,d)}function ti(u){return!(u._closeRequest===void 0&&u._inFlightCloseRequest===void 0)}function t5(u){return!(u._inFlightWriteRequest===void 0&&u._inFlightCloseRequest===void 0)}function i5(u){u._inFlightCloseRequest=u._closeRequest,u._closeRequest=void 0}function n5(u){u._inFlightWriteRequest=u._writeRequests.shift()}function Mu(u){u._closeRequest!==void 0&&(u._closeRequest._reject(u._storedError),u._closeRequest=void 0);var d=u._writer;d!==void 0&&kf(d,u._storedError)}function gf(u,d){var j=u._writer;j!==void 0&&d!==u._backpressure&&(d?b5(j):jf(j)),u._backpressure=d}var _o=function(){function u(d){if(qe(d,1,"WritableStreamDefaultWriter"),Tr(d,"First parameter"),Cr(d))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=d,d._writer=this;var j=d._state;if(j==="writable")!ti(d)&&d._backpressure?$u(this):gv(this),Vu(this);else if(j==="erroring")_f(this,d._storedError),Vu(this);else if(j==="closed")gv(this),v5(this);else{var O=d._storedError;_f(this,O),mv(this,O)}}return Object.defineProperty(u.prototype,"closed",{get:function(){return Gn(this)?this._closedPromise:v(Yn("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Gn(this))throw Yn("desiredSize");if(this._ownerWritableStream===void 0)throw ws("desiredSize");return c5(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ready",{get:function(){return Gn(this)?this._readyPromise:v(Yn("ready"))},enumerable:!1,configurable:!0}),u.prototype.abort=function(d){return d===void 0&&(d=void 0),Gn(this)?this._ownerWritableStream===void 0?v(ws("abort")):o5(this,d):v(Yn("abort"))},u.prototype.close=function(){if(!Gn(this))return v(Yn("close"));var d=this._ownerWritableStream;return d===void 0?v(ws("close")):ti(d)?v(new TypeError("Cannot close an already-closing stream")):sv(this)},u.prototype.releaseLock=function(){if(!Gn(this))throw Yn("releaseLock");var d=this._ownerWritableStream;d!==void 0&&cv(this)},u.prototype.write=function(d){return d===void 0&&(d=void 0),Gn(this)?this._ownerWritableStream===void 0?v(ws("write to")):lv(this,d):v(Yn("write"))},u}();Object.defineProperties(_o.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(_o.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Gn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_ownerWritableStream")?!1:u instanceof _o}function o5(u,d){var j=u._ownerWritableStream;return sa(j,d)}function sv(u){var d=u._ownerWritableStream;return it(d)}function s5(u){var d=u._ownerWritableStream,j=d._state;return ti(d)||j==="closed"?h(void 0):j==="errored"?v(d._storedError):sv(u)}function u5(u,d){u._closedPromiseState==="pending"?kf(u,d):g5(u,d)}function uv(u,d){u._readyPromiseState==="pending"?bv(u,d):y5(u,d)}function c5(u){var d=u._ownerWritableStream,j=d._state;return j==="errored"||j==="erroring"?null:j==="closed"?0:dv(d._writableStreamController)}function cv(u){var d=u._ownerWritableStream,j=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");uv(u,j),u5(u,j),d._writer=void 0,u._ownerWritableStream=void 0}function lv(u,d){var j=u._ownerWritableStream,O=j._writableStreamController,W=p5(O,d);if(j!==u._ownerWritableStream)return v(ws("write to"));var se=j._state;if(se==="errored")return v(j._storedError);if(ti(j)||se==="closed")return v(new TypeError("The stream is closing or closed and cannot be written to"));if(se==="erroring")return v(j._storedError);var ve=nt(j);return d5(O,d,W),ve}var fv={},Kn=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"abortReason",{get:function(){if(!bf(this))throw wf("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"signal",{get:function(){if(!bf(this))throw wf("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),u.prototype.error=function(d){if(d===void 0&&(d=void 0),!bf(this))throw wf("error");var j=this._controlledWritableStream._state;j==="writable"&&hv(this,d)},u.prototype[je]=function(d){var j=this._abortAlgorithm(d);return Nu(this),j},u.prototype[ge]=function(){oa(this)},u}();Object.defineProperties(Kn.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Kn.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function bf(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledWritableStream")?!1:u instanceof Kn}function pv(u,d,j,O,W,se,ve,Je){d._controlledWritableStream=u,u._writableStreamController=d,d._queue=void 0,d._queueTotalSize=void 0,oa(d),d._abortReason=void 0,d._abortController=P(),d._started=!1,d._strategySizeAlgorithm=Je,d._strategyHWM=ve,d._writeAlgorithm=O,d._closeAlgorithm=W,d._abortAlgorithm=se;var Er=xf(d);gf(u,Er);var qr=j(),Dr=h(qr);E(Dr,function(){d._started=!0,Uu(d)},function($r){d._started=!0,xt(u,$r)})}function l5(u,d,j,O){var W=Object.create(Kn.prototype),se=function(){},ve=function(){return h(void 0)},Je=function(){return h(void 0)},Er=function(){return h(void 0)};d.start!==void 0&&(se=function(){return d.start(W)}),d.write!==void 0&&(ve=function(qr){return d.write(qr,W)}),d.close!==void 0&&(Je=function(){return d.close()}),d.abort!==void 0&&(Er=function(qr){return d.abort(qr)}),pv(u,W,se,ve,Je,Er,j,O)}function Nu(u){u._writeAlgorithm=void 0,u._closeAlgorithm=void 0,u._abortAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function f5(u){lt(u,fv,0),Uu(u)}function p5(u,d){try{return u._strategySizeAlgorithm(d)}catch(j){return yf(u,j),1}}function dv(u){return u._strategyHWM-u._queueTotalSize}function d5(u,d,j){try{lt(u,d,j)}catch(se){yf(u,se);return}var O=u._controlledWritableStream;if(!ti(O)&&O._state==="writable"){var W=xf(u);gf(O,W)}Uu(u)}function Uu(u){var d=u._controlledWritableStream;if(u._started&&d._inFlightWriteRequest===void 0){var j=d._state;if(j==="erroring"){ft(d);return}if(u._queue.length!==0){var O=Zr(u);O===fv?h5(u):m5(u,O)}}}function yf(u,d){u._controlledWritableStream._state==="writable"&&hv(u,d)}function h5(u){var d=u._controlledWritableStream;i5(d),at(u);var j=u._closeAlgorithm();Nu(u),E(j,function(){ai(d)},function(O){ko(d,O)})}function m5(u,d){var j=u._controlledWritableStream;n5(j);var O=u._writeAlgorithm(d);E(O,function(){At(j);var W=j._state;if(at(u),!ti(j)&&W==="writable"){var se=xf(u);gf(j,se)}Uu(u)},function(W){j._state==="writable"&&Nu(u),Wn(j,W)})}function xf(u){var d=dv(u);return d<=0}function hv(u,d){var j=u._controlledWritableStream;Nu(u),Gi(j,d)}function Hu(u){return new TypeError("WritableStream.prototype."+u+" can only be used on a WritableStream")}function wf(u){return new TypeError("WritableStreamDefaultController.prototype."+u+" can only be used on a WritableStreamDefaultController")}function Yn(u){return new TypeError("WritableStreamDefaultWriter.prototype."+u+" can only be used on a WritableStreamDefaultWriter")}function ws(u){return new TypeError("Cannot "+u+" a stream using a released writer")}function Vu(u){u._closedPromise=m(function(d,j){u._closedPromise_resolve=d,u._closedPromise_reject=j,u._closedPromiseState="pending"})}function mv(u,d){Vu(u),kf(u,d)}function v5(u){Vu(u),vv(u)}function kf(u,d){u._closedPromise_reject!==void 0&&(T(u._closedPromise),u._closedPromise_reject(d),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="rejected")}function g5(u,d){mv(u,d)}function vv(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="resolved")}function $u(u){u._readyPromise=m(function(d,j){u._readyPromise_resolve=d,u._readyPromise_reject=j}),u._readyPromiseState="pending"}function _f(u,d){$u(u),bv(u,d)}function gv(u){$u(u),jf(u)}function bv(u,d){u._readyPromise_reject!==void 0&&(T(u._readyPromise),u._readyPromise_reject(d),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="rejected")}function b5(u){$u(u)}function y5(u,d){_f(u,d)}function jf(u){u._readyPromise_resolve!==void 0&&(u._readyPromise_resolve(void 0),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="fulfilled")}var yv=typeof DOMException<"u"?DOMException:void 0;function x5(u){if(!(typeof u=="function"||typeof u=="object"))return!1;try{return new u,!0}catch{return!1}}function w5(){var u=function(j,O){this.message=j||"",this.name=O||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return u.prototype=Object.create(Error.prototype),Object.defineProperty(u.prototype,"constructor",{value:u,writable:!0,configurable:!0}),u}var k5=x5(yv)?yv:w5();function xv(u,d,j,O,W,se){var ve=Wr(u),Je=ie(d);u._disturbed=!0;var Er=!1,qr=h(void 0);return m(function(Dr,$r){var qa;if(se!==void 0){if(qa=function(){var xr=new k5("Aborted","AbortError"),Gr=[];O||Gr.push(function(){return d._state==="writable"?sa(d,xr):h(void 0)}),W||Gr.push(function(){return u._state==="readable"?ii(u,xr):h(void 0)}),Dt(function(){return Promise.all(Gr.map(function(ma){return ma()}))},!0,xr)},se.aborted){qa();return}se.addEventListener("abort",qa)}function ni(){return m(function(xr,Gr){function ma(Ei){Ei?xr():w(Eo(),ma,Gr)}ma(!1)})}function Eo(){return Er?h(!0):w(Je._readyPromise,function(){return m(function(xr,Gr){nr(ve,{_chunkSteps:function(ma){qr=w(lv(Je,ma),void 0,a),xr(!1)},_closeSteps:function(){return xr(!0)},_errorSteps:Gr})})})}if(ot(u,ve._closedPromise,function(xr){O?Yi(!0,xr):Dt(function(){return sa(d,xr)},!0,xr)}),ot(d,Je._closedPromise,function(xr){W?Yi(!0,xr):Dt(function(){return ii(u,xr)},!0,xr)}),Si(u,ve._closedPromise,function(){j?Yi():Dt(function(){return s5(Je)})}),ti(d)||d._state==="closed"){var bn=new TypeError("the destination writable stream closed before all data could be piped to it");W?Yi(!0,bn):Dt(function(){return ii(u,bn)},!0,bn)}T(ni());function ji(){var xr=qr;return w(qr,function(){return xr!==qr?ji():void 0})}function ot(xr,Gr,ma){xr._state==="errored"?ma(xr._storedError):A(Gr,ma)}function Si(xr,Gr,ma){xr._state==="closed"?ma():_(Gr,ma)}function Dt(xr,Gr,ma){if(Er)return;Er=!0,d._state==="writable"&&!ti(d)?_(ji(),Ei):Ei();function Ei(){E(xr(),function(){return ha(Gr,ma)},function(yn){return ha(!0,yn)})}}function Yi(xr,Gr){Er||(Er=!0,d._state==="writable"&&!ti(d)?_(ji(),function(){return ha(xr,Gr)}):ha(xr,Gr))}function ha(xr,Gr){cv(Je),G(ve),se!==void 0&&se.removeEventListener("abort",qa),xr?$r(Gr):Dr(void 0)}})}var Qn=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Wu(this))throw Yu("desiredSize");return Sf(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!Wu(this))throw Yu("close");if(!jo(this))throw new TypeError("The stream is not in a state that permits close");_s(this)},u.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Wu(this))throw Yu("enqueue");if(!jo(this))throw new TypeError("The stream is not in a state that permits enqueue");return Ku(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!Wu(this))throw Yu("error");mn(this,d)},u.prototype[Le]=function(d){oa(this);var j=this._cancelAlgorithm(d);return Gu(this),j},u.prototype[Ue]=function(d){var j=this._controlledReadableStream;if(this._queue.length>0){var O=at(this);this._closeRequested&&this._queue.length===0?(Gu(this),js(j)):ks(this),d._chunkSteps(O)}else J(j,d),ks(this)},u}();Object.defineProperties(Qn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Qn.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Wu(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableStream")?!1:u instanceof Qn}function ks(u){var d=wv(u);if(d){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var j=u._pullAlgorithm();E(j,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,ks(u))},function(O){mn(u,O)})}}function wv(u){var d=u._controlledReadableStream;if(!jo(u)||!u._started)return!1;if(gn(d)&&Ge(d)>0)return!0;var j=Sf(u);return j>0}function Gu(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function _s(u){if(jo(u)){var d=u._controlledReadableStream;u._closeRequested=!0,u._queue.length===0&&(Gu(u),js(d))}}function Ku(u,d){if(jo(u)){var j=u._controlledReadableStream;if(gn(j)&&Ge(j)>0)Ie(j,d,!1);else{var O=void 0;try{O=u._strategySizeAlgorithm(d)}catch(W){throw mn(u,W),W}try{lt(u,d,O)}catch(W){throw mn(u,W),W}}ks(u)}}function mn(u,d){var j=u._controlledReadableStream;j._state==="readable"&&(oa(u),Gu(u),Sv(j,d))}function Sf(u){var d=u._controlledReadableStream._state;return d==="errored"?null:d==="closed"?0:u._strategyHWM-u._queueTotalSize}function _5(u){return!wv(u)}function jo(u){var d=u._controlledReadableStream._state;return!u._closeRequested&&d==="readable"}function kv(u,d,j,O,W,se,ve){d._controlledReadableStream=u,d._queue=void 0,d._queueTotalSize=void 0,oa(d),d._started=!1,d._closeRequested=!1,d._pullAgain=!1,d._pulling=!1,d._strategySizeAlgorithm=ve,d._strategyHWM=se,d._pullAlgorithm=O,d._cancelAlgorithm=W,u._readableStreamController=d;var Je=j();E(h(Je),function(){d._started=!0,ks(d)},function(Er){mn(d,Er)})}function j5(u,d,j,O){var W=Object.create(Qn.prototype),se=function(){},ve=function(){return h(void 0)},Je=function(){return h(void 0)};d.start!==void 0&&(se=function(){return d.start(W)}),d.pull!==void 0&&(ve=function(){return d.pull(W)}),d.cancel!==void 0&&(Je=function(Er){return d.cancel(Er)}),kv(u,W,se,ve,Je,j,O)}function Yu(u){return new TypeError("ReadableStreamDefaultController.prototype."+u+" can only be used on a ReadableStreamDefaultController")}function S5(u,d){return da(u._readableStreamController)?A5(u):E5(u)}function E5(u,d){var j=Wr(u),O=!1,W=!1,se=!1,ve=!1,Je,Er,qr,Dr,$r,qa=m(function(ot){$r=ot});function ni(){if(O)return W=!0,h(void 0);O=!0;var ot={_chunkSteps:function(Si){D(function(){W=!1;var Dt=Si,Yi=Si;se||Ku(qr._readableStreamController,Dt),ve||Ku(Dr._readableStreamController,Yi),O=!1,W&&ni()})},_closeSteps:function(){O=!1,se||_s(qr._readableStreamController),ve||_s(Dr._readableStreamController),(!se||!ve)&&$r(void 0)},_errorSteps:function(){O=!1}};return nr(j,ot),h(void 0)}function Eo(ot){if(se=!0,Je=ot,ve){var Si=wr([Je,Er]),Dt=ii(u,Si);$r(Dt)}return qa}function bn(ot){if(ve=!0,Er=ot,se){var Si=wr([Je,Er]),Dt=ii(u,Si);$r(Dt)}return qa}function ji(){}return qr=Ef(ji,ni,Eo),Dr=Ef(ji,ni,bn),A(j._closedPromise,function(ot){mn(qr._readableStreamController,ot),mn(Dr._readableStreamController,ot),(!se||!ve)&&$r(void 0)}),[qr,Dr]}function A5(u){var d=Wr(u),j=!1,O=!1,W=!1,se=!1,ve=!1,Je,Er,qr,Dr,$r,qa=m(function(ha){$r=ha});function ni(ha){A(ha._closedPromise,function(xr){ha===d&&(Fe(qr._readableStreamController,xr),Fe(Dr._readableStreamController,xr),(!se||!ve)&&$r(void 0))})}function Eo(){Ve(d)&&(G(d),d=Wr(u),ni(d));var ha={_chunkSteps:function(xr){D(function(){O=!1,W=!1;var Gr=xr,ma=xr;if(!se&&!ve)try{ma=Fa(xr)}catch(Ei){Fe(qr._readableStreamController,Ei),Fe(Dr._readableStreamController,Ei),$r(ii(u,Ei));return}se||Se(qr._readableStreamController,Gr),ve||Se(Dr._readableStreamController,ma),j=!1,O?ji():W&&ot()})},_closeSteps:function(){j=!1,se||Be(qr._readableStreamController),ve||Be(Dr._readableStreamController),qr._readableStreamController._pendingPullIntos.length>0&&Xe(qr._readableStreamController,0),Dr._readableStreamController._pendingPullIntos.length>0&&Xe(Dr._readableStreamController,0),(!se||!ve)&&$r(void 0)},_errorSteps:function(){j=!1}};nr(d,ha)}function bn(ha,xr){Ze(d)&&(G(d),d=Y(u),ni(d));var Gr=xr?Dr:qr,ma=xr?qr:Dr,Ei={_chunkSteps:function(yn){D(function(){O=!1,W=!1;var Ao=xr?ve:se,Ps=xr?se:ve;if(Ps)Ao||Te(Gr._readableStreamController,yn);else{var zv=void 0;try{zv=Fa(yn)}catch(Ff){Fe(Gr._readableStreamController,Ff),Fe(ma._readableStreamController,Ff),$r(ii(u,Ff));return}Ao||Te(Gr._readableStreamController,yn),Se(ma._readableStreamController,zv)}j=!1,O?ji():W&&ot()})},_closeSteps:function(yn){j=!1;var Ao=xr?ve:se,Ps=xr?se:ve;Ao||Be(Gr._readableStreamController),Ps||Be(ma._readableStreamController),yn!==void 0&&(Ao||Te(Gr._readableStreamController,yn),!Ps&&ma._readableStreamController._pendingPullIntos.length>0&&Xe(ma._readableStreamController,0)),(!Ao||!Ps)&&$r(void 0)},_errorSteps:function(){j=!1}};lr(d,ha,Ei)}function ji(){if(j)return O=!0,h(void 0);j=!0;var ha=Ce(qr._readableStreamController);return ha===null?Eo():bn(ha._view,!1),h(void 0)}function ot(){if(j)return W=!0,h(void 0);j=!0;var ha=Ce(Dr._readableStreamController);return ha===null?Eo():bn(ha._view,!0),h(void 0)}function Si(ha){if(se=!0,Je=ha,ve){var xr=wr([Je,Er]),Gr=ii(u,xr);$r(Gr)}return qa}function Dt(ha){if(ve=!0,Er=ha,se){var xr=wr([Je,Er]),Gr=ii(u,xr);$r(Gr)}return qa}function Yi(){}return qr=jv(Yi,ji,Si),Dr=jv(Yi,ot,Dt),ni(d),[qr,Dr]}function P5(u,d){Qe(u,d);var j=u,O=j==null?void 0:j.autoAllocateChunkSize,W=j==null?void 0:j.cancel,se=j==null?void 0:j.pull,ve=j==null?void 0:j.start,Je=j==null?void 0:j.type;return{autoAllocateChunkSize:O===void 0?void 0:ur(O,d+" has member 'autoAllocateChunkSize' that"),cancel:W===void 0?void 0:T5(W,j,d+" has member 'cancel' that"),pull:se===void 0?void 0:F5(se,j,d+" has member 'pull' that"),start:ve===void 0?void 0:C5(ve,j,d+" has member 'start' that"),type:Je===void 0?void 0:q5(Je,d+" has member 'type' that")}}function T5(u,d,j){return We(u,j),function(O){return R(u,d,[O])}}function F5(u,d,j){return We(u,j),function(O){return R(u,d,[O])}}function C5(u,d,j){return We(u,j),function(O){return I(u,d,[O])}}function q5(u,d){if(u=""+u,u!=="bytes")throw new TypeError(d+" '"+u+"' is not a valid enumeration value for ReadableStreamType");return u}function I5(u,d){Qe(u,d);var j=u==null?void 0:u.mode;return{mode:j===void 0?void 0:B5(j,d+" has member 'mode' that")}}function B5(u,d){if(u=""+u,u!=="byob")throw new TypeError(d+" '"+u+"' is not a valid enumeration value for ReadableStreamReaderMode");return u}function R5(u,d){Qe(u,d);var j=u==null?void 0:u.preventCancel;return{preventCancel:Boolean(j)}}function _v(u,d){Qe(u,d);var j=u==null?void 0:u.preventAbort,O=u==null?void 0:u.preventCancel,W=u==null?void 0:u.preventClose,se=u==null?void 0:u.signal;return se!==void 0&&O5(se,d+" has member 'signal' that"),{preventAbort:Boolean(j),preventCancel:Boolean(O),preventClose:Boolean(W),signal:se}}function O5(u,d){if(!k(u))throw new TypeError(d+" is not an AbortSignal.")}function D5(u,d){Qe(u,d);var j=u==null?void 0:u.readable;fe(j,"readable","ReadableWritablePair"),Or(j,d+" has member 'readable' that");var O=u==null?void 0:u.writable;return fe(O,"writable","ReadableWritablePair"),Tr(O,d+" has member 'writable' that"),{readable:j,writable:O}}var Ki=function(){function u(d,j){d===void 0&&(d={}),j===void 0&&(j={}),d===void 0?d=null:rr(d,"First parameter");var O=yr(j,"Second parameter"),W=P5(d,"First parameter");if(Af(this),W.type==="bytes"){if(O.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var se=sr(O,0);Ae(this,W,se)}else{var ve=z(O),se=sr(O,1);j5(this,W,se,ve)}}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!vn(this))throw Xn("locked");return gn(this)},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),vn(this)?gn(this)?v(new TypeError("Cannot cancel a stream that already has a reader")):ii(this,d):v(Xn("cancel"))},u.prototype.getReader=function(d){if(d===void 0&&(d=void 0),!vn(this))throw Xn("getReader");var j=I5(d,"First parameter");return j.mode===void 0?Wr(this):Y(this)},u.prototype.pipeThrough=function(d,j){if(j===void 0&&(j={}),!vn(this))throw Xn("pipeThrough");qe(d,1,"pipeThrough");var O=D5(d,"First parameter"),W=_v(j,"Second parameter");if(gn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Cr(O.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var se=xv(this,O.writable,W.preventClose,W.preventAbort,W.preventCancel,W.signal);return T(se),O.readable},u.prototype.pipeTo=function(d,j){if(j===void 0&&(j={}),!vn(this))return v(Xn("pipeTo"));if(d===void 0)return v("Parameter 1 is required in 'pipeTo'.");if(!Re(d))return v(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var O;try{O=_v(j,"Second parameter")}catch(W){return v(W)}return gn(this)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Cr(d)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):xv(this,d,O.preventClose,O.preventAbort,O.preventCancel,O.signal)},u.prototype.tee=function(){if(!vn(this))throw Xn("tee");var d=S5(this);return wr(d)},u.prototype.values=function(d){if(d===void 0&&(d=void 0),!vn(this))throw Xn("values");var j=R5(d,"First parameter");return fr(this,j.preventCancel)},u}();Object.defineProperties(Ki.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ki.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(Ki.prototype,r.asyncIterator,{value:Ki.prototype.values,writable:!0,configurable:!0});function Ef(u,d,j,O,W){O===void 0&&(O=1),W===void 0&&(W=function(){return 1});var se=Object.create(Ki.prototype);Af(se);var ve=Object.create(Qn.prototype);return kv(se,ve,u,d,j,O,W),se}function jv(u,d,j){var O=Object.create(Ki.prototype);Af(O);var W=Object.create(Ca.prototype);return Ee(O,W,u,d,j,0,void 0),O}function Af(u){u._state="readable",u._reader=void 0,u._storedError=void 0,u._disturbed=!1}function vn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readableStreamController")?!1:u instanceof Ki}function gn(u){return u._reader!==void 0}function ii(u,d){if(u._disturbed=!0,u._state==="closed")return h(void 0);if(u._state==="errored")return v(u._storedError);js(u);var j=u._reader;j!==void 0&&Ve(j)&&(j._readIntoRequests.forEach(function(W){W._closeSteps(void 0)}),j._readIntoRequests=new $);var O=u._readableStreamController[Le](d);return C(O,a)}function js(u){u._state="closed";var d=u._reader;d!==void 0&&(le(d),Ze(d)&&(d._readRequests.forEach(function(j){j._closeSteps()}),d._readRequests=new $))}function Sv(u,d){u._state="errored",u._storedError=d;var j=u._reader;j!==void 0&&(_e(j,d),Ze(j)?(j._readRequests.forEach(function(O){O._errorSteps(d)}),j._readRequests=new $):(j._readIntoRequests.forEach(function(O){O._errorSteps(d)}),j._readIntoRequests=new $))}function Xn(u){return new TypeError("ReadableStream.prototype."+u+" can only be used on a ReadableStream")}function Ev(u,d){Qe(u,d);var j=u==null?void 0:u.highWaterMark;return fe(j,"highWaterMark","QueuingStrategyInit"),{highWaterMark:we(j)}}var Av=function(u){return u.byteLength};try{Object.defineProperty(Av,"name",{value:"size",configurable:!0})}catch{}var Ss=function(){function u(d){qe(d,1,"ByteLengthQueuingStrategy"),d=Ev(d,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Tv(this))throw Pv("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Tv(this))throw Pv("size");return Av},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Ss.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ss.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Pv(u){return new TypeError("ByteLengthQueuingStrategy.prototype."+u+" can only be used on a ByteLengthQueuingStrategy")}function Tv(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_byteLengthQueuingStrategyHighWaterMark")?!1:u instanceof Ss}var Fv=function(){return 1};try{Object.defineProperty(Fv,"name",{value:"size",configurable:!0})}catch{}var Es=function(){function u(d){qe(d,1,"CountQueuingStrategy"),d=Ev(d,"First parameter"),this._countQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!qv(this))throw Cv("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!qv(this))throw Cv("size");return Fv},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Es.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Es.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Cv(u){return new TypeError("CountQueuingStrategy.prototype."+u+" can only be used on a CountQueuingStrategy")}function qv(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_countQueuingStrategyHighWaterMark")?!1:u instanceof Es}function z5(u,d){Qe(u,d);var j=u==null?void 0:u.flush,O=u==null?void 0:u.readableType,W=u==null?void 0:u.start,se=u==null?void 0:u.transform,ve=u==null?void 0:u.writableType;return{flush:j===void 0?void 0:L5(j,u,d+" has member 'flush' that"),readableType:O,start:W===void 0?void 0:M5(W,u,d+" has member 'start' that"),transform:se===void 0?void 0:N5(se,u,d+" has member 'transform' that"),writableType:ve}}function L5(u,d,j){return We(u,j),function(O){return R(u,d,[O])}}function M5(u,d,j){return We(u,j),function(O){return I(u,d,[O])}}function N5(u,d,j){return We(u,j),function(O,W){return R(u,d,[O,W])}}var As=function(){function u(d,j,O){d===void 0&&(d={}),j===void 0&&(j={}),O===void 0&&(O={}),d===void 0&&(d=null);var W=yr(j,"Second parameter"),se=yr(O,"Third parameter"),ve=z5(d,"First parameter");if(ve.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(ve.writableType!==void 0)throw new RangeError("Invalid writableType specified");var Je=sr(se,0),Er=z(se),qr=sr(W,1),Dr=z(W),$r,qa=m(function(ni){$r=ni});U5(this,qa,qr,Dr,Je,Er),V5(this,ve),ve.start!==void 0?$r(ve.start(this._transformStreamController)):$r(void 0)}return Object.defineProperty(u.prototype,"readable",{get:function(){if(!Iv(this))throw Dv("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"writable",{get:function(){if(!Iv(this))throw Dv("writable");return this._writable},enumerable:!1,configurable:!0}),u}();Object.defineProperties(As.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(As.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function U5(u,d,j,O,W,se){function ve(){return d}function Je(qa){return G5(u,qa)}function Er(qa){return K5(u,qa)}function qr(){return Y5(u)}u._writable=ue(ve,Je,qr,Er,j,O);function Dr(){return Q5(u)}function $r(qa){return Xu(u,qa),h(void 0)}u._readable=Ef(ve,Dr,$r,W,se),u._backpressure=void 0,u._backpressureChangePromise=void 0,u._backpressureChangePromise_resolve=void 0,Ju(u,!0),u._transformStreamController=void 0}function Iv(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_transformStreamController")?!1:u instanceof As}function Qu(u,d){mn(u._readable._readableStreamController,d),Xu(u,d)}function Xu(u,d){Bv(u._transformStreamController),yf(u._writable._writableStreamController,d),u._backpressure&&Ju(u,!1)}function Ju(u,d){u._backpressureChangePromise!==void 0&&u._backpressureChangePromise_resolve(),u._backpressureChangePromise=m(function(j){u._backpressureChangePromise_resolve=j}),u._backpressure=d}var So=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Zu(this))throw ec("desiredSize");var d=this._controlledTransformStream._readable._readableStreamController;return Sf(d)},enumerable:!1,configurable:!0}),u.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Zu(this))throw ec("enqueue");Rv(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!Zu(this))throw ec("error");$5(this,d)},u.prototype.terminate=function(){if(!Zu(this))throw ec("terminate");W5(this)},u}();Object.defineProperties(So.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(So.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Zu(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledTransformStream")?!1:u instanceof So}function H5(u,d,j,O){d._controlledTransformStream=u,u._transformStreamController=d,d._transformAlgorithm=j,d._flushAlgorithm=O}function V5(u,d){var j=Object.create(So.prototype),O=function(se){try{return Rv(j,se),h(void 0)}catch(ve){return v(ve)}},W=function(){return h(void 0)};d.transform!==void 0&&(O=function(se){return d.transform(se,j)}),d.flush!==void 0&&(W=function(){return d.flush(j)}),H5(u,j,O,W)}function Bv(u){u._transformAlgorithm=void 0,u._flushAlgorithm=void 0}function Rv(u,d){var j=u._controlledTransformStream,O=j._readable._readableStreamController;if(!jo(O))throw new TypeError("Readable side is not in a state that permits enqueue");try{Ku(O,d)}catch(se){throw Xu(j,se),j._readable._storedError}var W=_5(O);W!==j._backpressure&&Ju(j,!0)}function $5(u,d){Qu(u._controlledTransformStream,d)}function Ov(u,d){var j=u._transformAlgorithm(d);return C(j,void 0,function(O){throw Qu(u._controlledTransformStream,O),O})}function W5(u){var d=u._controlledTransformStream,j=d._readable._readableStreamController;_s(j);var O=new TypeError("TransformStream terminated");Xu(d,O)}function G5(u,d){var j=u._transformStreamController;if(u._backpressure){var O=u._backpressureChangePromise;return C(O,function(){var W=u._writable,se=W._state;if(se==="erroring")throw W._storedError;return Ov(j,d)})}return Ov(j,d)}function K5(u,d){return Qu(u,d),h(void 0)}function Y5(u){var d=u._readable,j=u._transformStreamController,O=j._flushAlgorithm();return Bv(j),C(O,function(){if(d._state==="errored")throw d._storedError;_s(d._readableStreamController)},function(W){throw Qu(u,W),d._storedError})}function Q5(u){return Ju(u,!1),u._backpressureChangePromise}function ec(u){return new TypeError("TransformStreamDefaultController.prototype."+u+" can only be used on a TransformStreamDefaultController")}function Dv(u){return new TypeError("TransformStream.prototype."+u+" can only be used on a TransformStream")}var Pf={ReadableStream:Ki,ReadableStreamDefaultController:Qn,ReadableByteStreamController:Ca,ReadableStreamBYOBRequest:pa,ReadableStreamDefaultReader:Ye,ReadableStreamBYOBReader:ne,WritableStream:N,WritableStreamDefaultController:Kn,WritableStreamDefaultWriter:_o,ByteLengthQueuingStrategy:Ss,CountQueuingStrategy:Es,TransformStream:As,TransformStreamDefaultController:So};if(typeof t<"u")for(var Tf in Pf)Object.prototype.hasOwnProperty.call(Pf,Tf)&&Object.defineProperty(t,Tf,{value:Pf[Tf],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=Ss,e.CountQueuingStrategy=Es,e.ReadableByteStreamController=Ca,e.ReadableStream=Ki,e.ReadableStreamBYOBReader=ne,e.ReadableStreamBYOBRequest=pa,e.ReadableStreamDefaultController=Qn,e.ReadableStreamDefaultReader=Ye,e.TransformStream=As,e.TransformStreamDefaultController=So,e.WritableStream=N,e.WritableStreamDefaultController=Kn,e.WritableStreamDefaultWriter=_o,Object.defineProperty(e,"__esModule",{value:!0})})});var Lv=typeof process!="object"||String(process)!=="[object process]"||process.browser;var Mv={ibm866:[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1025,1105,1028,1108,1031,1111,1038,1118,176,8729,183,8730,8470,164,9632,160],"iso-8859-2":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,728,321,164,317,346,167,168,352,350,356,377,173,381,379,176,261,731,322,180,318,347,711,184,353,351,357,378,733,382,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"iso-8859-3":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,294,728,163,164,null,292,167,168,304,350,286,308,173,null,379,176,295,178,179,180,181,293,183,184,305,351,287,309,189,null,380,192,193,194,null,196,266,264,199,200,201,202,203,204,205,206,207,null,209,210,211,212,288,214,215,284,217,218,219,220,364,348,223,224,225,226,null,228,267,265,231,232,233,234,235,236,237,238,239,null,241,242,243,244,289,246,247,285,249,250,251,252,365,349,729],"iso-8859-4":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,312,342,164,296,315,167,168,352,274,290,358,173,381,175,176,261,731,343,180,297,316,711,184,353,275,291,359,330,382,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,298,272,325,332,310,212,213,214,215,216,370,218,219,220,360,362,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,299,273,326,333,311,244,245,246,247,248,371,250,251,252,361,363,729],"iso-8859-5":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,173,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8470,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,167,1118,1119],"iso-8859-6":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,null,null,164,null,null,null,null,null,null,null,1548,173,null,null,null,null,null,null,null,null,null,null,null,null,null,1563,null,null,null,1567,null,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,null,null,null,null,null,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,null,null,null,null,null,null,null,null,null,null,null,null,null],"iso-8859-7":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8216,8217,163,8364,8367,166,167,168,169,890,171,172,173,null,8213,176,177,178,179,900,901,902,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"iso-8859-8":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,162,163,164,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8215,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"iso-8859-10":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,274,290,298,296,310,167,315,272,352,358,381,173,362,330,176,261,275,291,299,297,311,183,316,273,353,359,382,8213,363,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,207,208,325,332,211,212,213,214,360,216,370,218,219,220,221,222,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,239,240,326,333,243,244,245,246,361,248,371,250,251,252,253,254,312],"iso-8859-13":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8221,162,163,164,8222,166,167,216,169,342,171,172,173,174,198,176,177,178,179,8220,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,8217],"iso-8859-14":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,7682,7683,163,266,267,7690,167,7808,169,7810,7691,7922,173,174,376,7710,7711,288,289,7744,7745,182,7766,7809,7767,7811,7776,7923,7812,7813,7777,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,372,209,210,211,212,213,214,7786,216,217,218,219,220,221,374,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,373,241,242,243,244,245,246,7787,248,249,250,251,252,253,375,255],"iso-8859-15":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,8364,165,352,167,353,169,170,171,172,173,174,175,176,177,178,179,381,181,182,183,382,185,186,187,338,339,376,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"iso-8859-16":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,261,321,8364,8222,352,167,353,169,536,171,377,173,378,379,176,177,268,322,381,8221,182,183,382,269,537,187,338,339,376,380,192,193,194,258,196,262,198,199,200,201,202,203,204,205,206,207,272,323,210,211,212,336,214,346,368,217,218,219,220,280,538,223,224,225,226,259,228,263,230,231,232,233,234,235,236,237,238,239,273,324,242,243,244,337,246,347,369,249,250,251,252,281,539,255],"koi8-r":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,1025,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],"koi8-u":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,1108,9556,1110,1111,9559,9560,9561,9562,9563,1169,1118,9566,9567,9568,9569,1025,1028,9571,1030,1031,9574,9575,9576,9577,9578,1168,1038,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],macintosh:[196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,732,175,728,729,730,184,733,731,711],"windows-874":[8364,129,130,131,132,8230,134,135,136,137,138,139,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,153,154,155,156,157,158,159,160,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,null,null,null,null,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,null,null,null,null],"windows-1250":[8364,129,8218,131,8222,8230,8224,8225,136,8240,352,8249,346,356,381,377,144,8216,8217,8220,8221,8226,8211,8212,152,8482,353,8250,347,357,382,378,160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379,176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"windows-1251":[1026,1027,8218,1107,8222,8230,8224,8225,8364,8240,1033,8249,1034,1036,1035,1039,1106,8216,8217,8220,8221,8226,8211,8212,152,8482,1113,8250,1114,1116,1115,1119,160,1038,1118,1032,164,1168,166,167,1025,169,1028,171,172,173,174,1031,176,177,1030,1110,1169,181,182,183,1105,8470,1108,187,1112,1029,1109,1111,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103],"windows-1252":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"windows-1253":[8364,129,8218,402,8222,8230,8224,8225,136,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,157,158,159,160,901,902,163,164,165,166,167,168,169,null,171,172,173,174,8213,176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"windows-1254":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,286,209,210,211,212,213,214,215,216,217,218,219,220,304,350,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,287,241,242,243,244,245,246,247,248,249,250,251,252,305,351,255],"windows-1255":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,156,157,158,159,160,161,162,163,8362,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,191,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1520,1521,1522,1523,1524,null,null,null,null,null,null,null,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"windows-1256":[8364,1662,8218,402,8222,8230,8224,8225,710,8240,1657,8249,338,1670,1688,1672,1711,8216,8217,8220,8221,8226,8211,8212,1705,8482,1681,8250,339,8204,8205,1722,160,1548,162,163,164,165,166,167,168,169,1726,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,1563,187,188,189,190,1567,1729,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,215,1591,1592,1593,1594,1600,1601,1602,1603,224,1604,226,1605,1606,1607,1608,231,232,233,234,235,1609,1610,238,239,1611,1612,1613,1614,244,1615,1616,247,1617,249,1618,251,252,8206,8207,1746],"windows-1257":[8364,129,8218,131,8222,8230,8224,8225,136,8240,138,8249,140,168,711,184,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,175,731,159,160,null,162,163,164,null,166,167,216,169,342,171,172,173,174,198,176,177,178,179,180,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,729],"windows-1258":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,258,196,197,198,199,200,201,202,203,768,205,206,207,272,209,777,211,212,416,214,215,216,217,218,219,220,431,771,223,224,225,226,259,228,229,230,231,232,233,234,235,769,237,238,239,273,241,803,243,244,417,246,247,248,249,250,251,252,432,8363,255],"x-mac-cyrillic":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,8224,176,1168,163,167,8226,182,1030,174,169,8482,1026,1106,8800,1027,1107,8734,177,8804,8805,1110,181,1169,1032,1028,1108,1031,1111,1033,1113,1034,1114,1112,1029,172,8730,402,8776,8710,171,187,8230,160,1035,1115,1036,1116,1109,8211,8212,8220,8221,8216,8217,247,8222,1038,1118,1039,1119,8470,1025,1105,1103,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,8364]};globalThis["encoding-indexes"]=Mv||{};function jr(e,r,a){return r<=e&&e<=a}function i8(e,r){return e.indexOf(r)!==-1}var Qi=Math.floor;function ac(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function n8(e){for(var r=String(e),a=r.length,i=0,t=[];i<a;){var n=r.charCodeAt(i);if(n<55296||n>57343)t.push(n);else if(56320<=n&&n<=57343)t.push(65533);else if(55296<=n&&n<=56319)if(i===a-1)t.push(65533);else{var o=r.charCodeAt(i+1);if(56320<=o&&o<=57343){var s=n&1023,c=o&1023;t.push(65536+(s<<10)+c),i+=1}else t.push(65533)}i+=1}return t}function o8(e){for(var r="",a=0;a<e.length;++a){var i=e[a];i<=65535?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return r}function $t(e){return 0<=e&&e<=127}var Vt=$t,Lr=-1;function Of(e){this.tokens=[].slice.call(e),this.tokens.reverse()}Of.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():Lr},prepend:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.push(r.pop());else this.tokens.push(e)},push:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.unshift(r.shift());else this.tokens.unshift(e)}};var aa=-1;function zr(e,r){if(e)throw TypeError("Decoder error");return r||65533}function oi(e){throw TypeError("The code point "+e+" could not be encoded.")}function s8(){}s8.prototype={handler:function(e,r){}};function u8(){}u8.prototype={handler:function(e,r){}};function Bf(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(Rf,e)?Rf[e]:null}var Nv=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],Rf={};Nv.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(a){Rf[a]=r})})});var Pt={},Tt={};function Po(e,r){return r&&r[e]||null}function To(e,r){var a=r.indexOf(e);return a===-1?null:a}function wt(e){if(!("encoding-indexes"in globalThis))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return globalThis["encoding-indexes"][e]}function c8(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,a=0,i=wt("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[0]<=e)r=n[0],a=n[1];else break}return a+e-r}function l8(e){if(e===59335)return 7457;var r=0,a=0,i=wt("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[1]<=e)r=n[1],a=n[0];else break}return a+e-r}function f8(e){qf=qf||wt("jis0208").map(function(a,i){return jr(i,8272,8835)?null:a});var r=qf;return r.indexOf(e)}var qf;function p8(e){If=If||wt("big5").map(function(a,i){return i<(161-129)*157?null:a});var r=If;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):To(e,r)}var If,Uv="utf-8";function Jn(e,r){if(!(this instanceof Jn))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):Uv,r=ac(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var a=Bf(e);if(a===null||a.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Tt[a.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var i=this;return i._encoding=a,Boolean(r.fatal)&&(i._error_mode="fatal"),Boolean(r.ignoreBOM)&&(i._ignoreBOM=!0),Object.defineProperty||(this.encoding=i._encoding.name.toLowerCase(),this.fatal=i._error_mode==="fatal",this.ignoreBOM=i._ignoreBOM),i}Object.defineProperty&&(Object.defineProperty(Jn.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(Jn.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(Jn.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));Jn.prototype.decode=function(r,a){var i;typeof r=="object"&&r instanceof ArrayBuffer?i=new Uint8Array(r):typeof r=="object"&&"buffer"in r&&r.buffer instanceof ArrayBuffer?i=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):i=new Uint8Array(0),a=ac(a),this._do_not_flush||(this._decoder=Tt[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(a.stream);for(var t=new Of(i),n=[],o;;){var s=t.read();if(s===Lr||(o=this._decoder.handler(t,s),o===aa))break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}if(!this._do_not_flush){do{if(o=this._decoder.handler(t,t.read()),o===aa)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!t.endOfStream());this._decoder=null}function c(p){return i8(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)&&!this._ignoreBOM&&!this._BOMseen&&(p.length>0&&p[0]===65279?(this._BOMseen=!0,p.shift()):p.length>0&&(this._BOMseen=!0)),o8(p)}return c.call(this,n)};function Ts(e,r){if(!(this instanceof Ts))throw TypeError("Called as a function. Did you forget 'new'?");r=ac(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var a=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):Uv;var i=Bf(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Pt[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");a._encoding=i}else a._encoding=Bf("utf-8"),e!==void 0&&"console"in globalThis&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=a._encoding.name.toLowerCase()),a}Object.defineProperty&&Object.defineProperty(Ts.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});Ts.prototype.encode=function(r,a){r=r===void 0?"":String(r),a=ac(a),this._do_not_flush||(this._encoder=Pt[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(a.stream);for(var i=new Of(n8(r)),t=[],n;;){var o=i.read();if(o===Lr||(n=this._encoder.handler(i,o),n===aa))break;Array.isArray(n)?t.push.apply(t,n):t.push(n)}if(!this._do_not_flush){for(;n=this._encoder.handler(i,i.read()),n!==aa;)Array.isArray(n)?t.push.apply(t,n):t.push(n);this._encoder=null}return new Uint8Array(t)};function d8(e){var r=e.fatal,a=0,i=0,t=0,n=128,o=191;this.handler=function(s,c){if(c===Lr&&t!==0)return t=0,zr(r);if(c===Lr)return aa;if(t===0){if(jr(c,0,127))return c;if(jr(c,194,223))t=1,a=c&31;else if(jr(c,224,239))c===224&&(n=160),c===237&&(o=159),t=2,a=c&15;else if(jr(c,240,244))c===240&&(n=144),c===244&&(o=143),t=3,a=c&7;else return zr(r);return null}if(!jr(c,n,o))return a=t=i=0,n=128,o=191,s.prepend(c),zr(r);if(n=128,o=191,a=a<<6|c&63,i+=1,i!==t)return null;var p=a;return a=t=i=0,p}}function h8(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return aa;if(Vt(i))return i;var t,n;jr(i,128,2047)?(t=1,n=192):jr(i,2048,65535)?(t=2,n=224):jr(i,65536,1114111)&&(t=3,n=240);for(var o=[(i>>6*t)+n];t>0;){var s=i>>6*(t-1);o.push(128|s&63),t-=1}return o}}Pt["UTF-8"]=function(e){return new h8(e)};Tt["UTF-8"]=function(e){return new d8(e)};function m8(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Lr)return aa;if($t(t))return t;var n=e[t-128];return n===null?zr(a):n}}function v8(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Lr)return aa;if(Vt(t))return t;var n=To(t,e);return n===null&&oi(t),n+128}}(function(){"encoding-indexes"in globalThis&&Nv.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var a=r.name,i=wt(a.toLowerCase());Tt[a]=function(t){return new m8(i,t)},Pt[a]=function(t){return new v8(i,t)}})})})();Tt.GBK=function(e){return new Hv(e)};Pt.GBK=function(e){return new Vv(e,!0)};function Hv(e){var r=e.fatal,a=0,i=0,t=0;this.handler=function(n,o){if(o===Lr&&a===0&&i===0&&t===0)return aa;o===Lr&&(a!==0||i!==0||t!==0)&&(a=0,i=0,t=0,zr(r));var s;if(t!==0){s=null,jr(o,48,57)&&(s=c8((((a-129)*10+i-48)*126+t-129)*10+o-48));var c=[i,t,o];return a=0,i=0,t=0,s===null?(n.prepend(c),zr(r)):s}if(i!==0)return jr(o,129,254)?(t=o,null):(n.prepend([i,o]),a=0,i=0,zr(r));if(a!==0){if(jr(o,48,57))return i=o,null;var p=a,f=null;a=0;var m=o<127?64:65;return(jr(o,64,126)||jr(o,128,254))&&(f=(p-129)*190+(o-m)),s=f===null?null:Po(f,wt("gb18030")),s===null&&$t(o)&&n.prepend(o),s===null?zr(r):s}return $t(o)?o:o===128?8364:jr(o,129,254)?(a=o,null):zr(r)}}function Vv(e,r){var a=e.fatal;this.handler=function(i,t){if(t===Lr)return aa;if(Vt(t))return t;if(t===58853)return oi(t);if(r&&t===8364)return 128;var n=To(t,wt("gb18030"));if(n!==null){var o=Qi(n/190)+129,s=n%190,c=s<63?64:65;return[o,s+c]}if(r)return oi(t);n=l8(t);var p=Qi(n/10/126/10);n=n-p*10*126*10;var f=Qi(n/10/126);n=n-f*10*126;var m=Qi(n/10),h=n-m*10;return[p+129,f+48,m+129,h+48]}}Pt.gb18030=function(e){return new Vv(e)};Tt.gb18030=function(e){return new Hv(e)};function g8(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Lr&&a!==0)return a=0,zr(r);if(t===Lr&&a===0)return aa;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:98;switch((jr(t,64,126)||jr(t,161,254))&&(o=(n-129)*157+(t-s)),o){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var c=o===null?null:Po(o,wt("big5"));return c===null&&$t(t)&&i.prepend(t),c===null?zr(r):c}return $t(t)?t:jr(t,129,254)?(a=t,null):zr(r)}}function b8(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return aa;if(Vt(i))return i;var t=p8(i);if(t===null)return oi(i);var n=Qi(t/157)+129;if(n<161)return oi(i);var o=t%157,s=o<63?64:98;return[n,o+s]}}Pt.Big5=function(e){return new b8(e)};Tt.Big5=function(e){return new g8(e)};function y8(e){var r=e.fatal,a=!1,i=0;this.handler=function(t,n){if(n===Lr&&i!==0)return i=0,zr(r);if(n===Lr&&i===0)return aa;if(i===142&&jr(n,161,223))return i=0,65377-161+n;if(i===143&&jr(n,161,254))return a=!0,i=n,null;if(i!==0){var o=i;i=0;var s=null;return jr(o,161,254)&&jr(n,161,254)&&(s=Po((o-161)*94+(n-161),wt(a?"jis0212":"jis0208"))),a=!1,jr(n,161,254)||t.prepend(n),s===null?zr(r):s}return $t(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):zr(r)}}function x8(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return aa;if(Vt(i))return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return[142,i-65377+161];i===8722&&(i=65293);var t=To(i,wt("jis0208"));if(t===null)return oi(i);var n=Qi(t/94)+161,o=t%94+161;return[n,o]}}Pt["EUC-JP"]=function(e){return new x8(e)};Tt["EUC-JP"]=function(e){return new y8(e)};function w8(e){var r=e.fatal,a={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=a.ASCII,t=a.ASCII,n=0,o=!1;this.handler=function(s,c){switch(i){default:case a.ASCII:return c===27?(i=a.EscapeStart,null):jr(c,0,127)&&c!==14&&c!==15&&c!==27?(o=!1,c):c===Lr?aa:(o=!1,zr(r));case a.Roman:return c===27?(i=a.EscapeStart,null):c===92?(o=!1,165):c===126?(o=!1,8254):jr(c,0,127)&&c!==14&&c!==15&&c!==27&&c!==92&&c!==126?(o=!1,c):c===Lr?aa:(o=!1,zr(r));case a.Katakana:return c===27?(i=a.EscapeStart,null):jr(c,33,95)?(o=!1,65377-33+c):c===Lr?aa:(o=!1,zr(r));case a.LeadByte:return c===27?(i=a.EscapeStart,null):jr(c,33,126)?(o=!1,n=c,i=a.TrailByte,null):c===Lr?aa:(o=!1,zr(r));case a.TrailByte:if(c===27)return i=a.EscapeStart,zr(r);if(jr(c,33,126)){i=a.LeadByte;var p=(n-33)*94+c-33,f=Po(p,wt("jis0208"));return f===null?zr(r):f}return c===Lr?(i=a.LeadByte,s.prepend(c),zr(r)):(i=a.LeadByte,zr(r));case a.EscapeStart:return c===36||c===40?(n=c,i=a.Escape,null):(s.prepend(c),o=!1,i=t,zr(r));case a.Escape:var m=n;n=0;var h=null;if(m===40&&c===66&&(h=a.ASCII),m===40&&c===74&&(h=a.Roman),m===40&&c===73&&(h=a.Katakana),m===36&&(c===64||c===66)&&(h=a.LeadByte),h!==null){i=i=h;var v=o;return o=!0,v?zr(r):null}return s.prepend([m,c]),o=!1,i=t,zr(r)}}}function k8(e){var r=e.fatal,a={ASCII:0,Roman:1,jis0208:2},i=a.ASCII;this.handler=function(t,n){if(n===Lr&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if(n===Lr&&i===a.ASCII)return aa;if((i===a.ASCII||i===a.Roman)&&(n===14||n===15||n===27))return oi(65533);if(i===a.ASCII&&Vt(n))return n;if(i===a.Roman&&(Vt(n)&&n!==92&&n!==126||n==165||n==8254)){if(Vt(n))return n;if(n===165)return 92;if(n===8254)return 126}if(Vt(n)&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if((n===165||n===8254)&&i!==a.Roman)return t.prepend(n),i=a.Roman,[27,40,74];n===8722&&(n=65293);var o=To(n,wt("jis0208"));if(o===null)return oi(n);if(i!==a.jis0208)return t.prepend(n),i=a.jis0208,[27,36,66];var s=Qi(o/94)+33,c=o%94+33;return[s,c]}}Pt["ISO-2022-JP"]=function(e){return new k8(e)};Tt["ISO-2022-JP"]=function(e){return new w8(e)};function _8(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Lr&&a!==0)return a=0,zr(r);if(t===Lr&&a===0)return aa;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:65,c=n<160?129:193;if((jr(t,64,126)||jr(t,128,252))&&(o=(n-c)*188+t-s),jr(o,8836,10715))return 57344-8836+o;var p=o===null?null:Po(o,wt("jis0208"));return p===null&&$t(t)&&i.prepend(t),p===null?zr(r):p}return $t(t)||t===128?t:jr(t,161,223)?65377-161+t:jr(t,129,159)||jr(t,224,252)?(a=t,null):zr(r)}}function j8(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return aa;if(Vt(i)||i===128)return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return i-65377+161;i===8722&&(i=65293);var t=f8(i);if(t===null)return oi(i);var n=Qi(t/188),o=n<31?129:193,s=t%188,c=s<63?64:65;return[n+o,s+c]}}Pt.Shift_JIS=function(e){return new j8(e)};Tt.Shift_JIS=function(e){return new _8(e)};function S8(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Lr&&a!==0)return a=0,zr(r);if(t===Lr&&a===0)return aa;if(a!==0){var n=a,o=null;a=0,jr(t,65,254)&&(o=(n-129)*190+(t-65));var s=o===null?null:Po(o,wt("euc-kr"));return o===null&&$t(t)&&i.prepend(t),s===null?zr(r):s}return $t(t)?t:jr(t,129,254)?(a=t,null):zr(r)}}function E8(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return aa;if(Vt(i))return i;var t=To(i,wt("euc-kr"));if(t===null)return oi(i);var n=Qi(t/190)+129,o=t%190+65;return[n,o]}}Pt["EUC-KR"]=function(e){return new E8(e)};Tt["EUC-KR"]=function(e){return new S8(e)};function rc(e,r){var a=e>>8,i=e&255;return r?[a,i]:[i,a]}function $v(e,r){var a=r.fatal,i=null,t=null;this.handler=function(n,o){if(o===Lr&&(i!==null||t!==null))return zr(a);if(o===Lr&&i===null&&t===null)return aa;if(i===null)return i=o,null;var s;if(e?s=(i<<8)+o:s=(o<<8)+i,i=null,t!==null){var c=t;return t=null,jr(s,56320,57343)?65536+(c-55296)*1024+(s-56320):(n.prepend(rc(s,e)),zr(a))}return jr(s,55296,56319)?(t=s,null):jr(s,56320,57343)?zr(a):s}}function Wv(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Lr)return aa;if(jr(t,0,65535))return rc(t,e);var n=rc((t-65536>>10)+55296,e),o=rc((t-65536&1023)+56320,e);return n.concat(o)}}Pt["UTF-16BE"]=function(e){return new Wv(!0,e)};Tt["UTF-16BE"]=function(e){return new $v(!0,e)};Pt["UTF-16LE"]=function(e){return new Wv(!1,e)};Tt["UTF-16LE"]=function(e){return new $v(!1,e)};function A8(e){var r=e.fatal;this.handler=function(a,i){return i===Lr?aa:$t(i)?i:63360+i-128}}function P8(e){var r=e.fatal;this.handler=function(a,i){return i===Lr?aa:Vt(i)?i:jr(i,63360,63487)?i-63360+128:oi(i)}}Pt["x-user-defined"]=function(e){return new P8(e)};Tt["x-user-defined"]=function(e){return new A8(e)};function Fs(e){return Buffer.from(e).toString("base64")}function Df(e){return Buffer.from(e,"base64").toString("ascii")}var Ub=Ka(Mb(),1),Hb=Ka(zs(),1);function Nb(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function UE(e,r){let a=r.type?r.type.replace("image/",""):"jpeg",i=(0,Hb.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,Ub.default)(i,a,r)}function Vb(e,r){let a=UE(e,r);return new Promise(i=>{let t=[];a.on("data",n=>t.push(n)),a.on("end",()=>{let n=Buffer.concat(t);i(Nb(n))})})}var _6=Ka(k6(),1),zm=["image/png","image/jpeg","image/gif"];async function Lm(e,r){if(!r)throw new Error("MIMEType is required to parse image under Node.js");let a=e instanceof Buffer?e:Buffer.from(e);return await eD(a,r)}function eD(e,r){return new Promise(a=>(0,_6.default)(e,r,(i,t)=>{if(i)throw i;let n=[...t.shape],o=t.shape.length===4?t.shape.shift():1,s=t.data instanceof Buffer?new Uint8Array(t.data):t.data;a({shape:n,data:s,width:t.shape[0],height:t.shape[1],components:t.shape[2],layers:o?[o]:[]})}))}function rD(){var e;return(e=globalThis._loadersgl_)!=null&&e.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.0.0-beta.5"),globalThis._loadersgl_.version}var j6=rD();function S6(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var Wi={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},WH=Wi.self||Wi.window||Wi.global||{},GH=Wi.window||Wi.self||Wi.global||{},KH=Wi.global||Wi.self||Wi.window||{},YH=Wi.document||{};var Xl=typeof process!="object"||String(process)!=="[object process]"||process.browser,Jl=typeof importScripts=="function",QH=typeof window<"u"&&typeof window.orientation<"u",E6=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),XH=E6&&parseFloat(E6[1])||0;function Mm(e,r=!0,a){let i=a||new Set;if(e){if(A6(e))i.add(e);else if(A6(e.buffer))i.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let t in e)Mm(e[t],r,i)}}return a===void 0?Array.from(i):[]}function A6(e){return e?e instanceof ArrayBuffer||typeof MessagePort<"u"&&e instanceof MessagePort||typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas:!1}function bo(){let parentPort;try{eval("globalThis.parentPort = require('worker_threads').parentPort"),parentPort=globalThis.parentPort}catch{}return parentPort}var Nm=new Map,Ht=class{static inWorkerThread(){return typeof self<"u"||Boolean(bo())}static set onmessage(r){function a(t){let n=bo(),{type:o,payload:s}=n?t:t.data;r(o,s)}let i=bo();i?(i.on("message",a),i.on("exit",()=>console.debug("Node worker closing"))):globalThis.onmessage=a}static addEventListener(r){let a=Nm.get(r);a||(a=t=>{if(!aD(t))return;let n=bo(),{type:o,payload:s}=n?t:t.data;r(o,s)}),bo()?console.error("not implemented"):globalThis.addEventListener("message",a)}static removeEventListener(r){let a=Nm.get(r);Nm.delete(r),bo()?console.error("not implemented"):globalThis.removeEventListener("message",a)}static postMessage(r,a){let i={source:"loaders.gl",type:r,payload:a},t=Mm(a),n=bo();n?n.postMessage(i,t):globalThis.postMessage(i,t)}};function aD(e){let{type:r,data:a}=e;return r==="message"&&a&&typeof a.source=="string"&&a.source.startsWith("loaders.gl")}var Hm={};a8(Hm,{readFileAsArrayBuffer:()=>ef,readFileAsText:()=>rf,requireFromFile:()=>af,requireFromString:()=>xs});var Um=Ka(require("module"),1),P6=Ka(require("path"),1),Zl=Ka(require("fs"),1);async function ef(e){return e.startsWith("http")?await(await fetch(e)).arrayBuffer():Zl.readFileSync(e).buffer}async function rf(e){return e.startsWith("http")?await(await fetch(e)).text():Zl.readFileSync(e,"utf8")}async function af(e){if(e.startsWith("http")){let i=await(await fetch(e)).text();return xs(i)}e.startsWith("/")||(e=`${process.cwd()}/${e}`);let r=await Zl.readFileSync(e,"utf8");return xs(r)}function xs(e,r="",a){if(typeof r=="object"&&(a=r,r=""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let i=Um.default._nodeModulePaths(P6.dirname(r)),t=typeof module<"u"&&(module==null?void 0:module.parent),n=new Um.default(r,t);return n.filename=r,n.paths=[].concat((a==null?void 0:a.prependPaths)||[]).concat(i).concat((a==null?void 0:a.appendPaths)||[]),n._compile(e,r),t&&t.children&&t.children.splice(t.children.indexOf(n),1),n.exports}var Vm={};async function Bu(e,r=null,a={},i=null){return r&&(e=T6(e,r,a,i)),Vm[e]=Vm[e]||tD(e),await Vm[e]}function T6(e,r,a={},i=null){if(!a.useLocalLibraries&&e.startsWith("http"))return e;i=i||e;let t=a.modules||{};return t[i]?t[i]:Xl?a.CDN?(S6(a.CDN.startsWith("http")),`${a.CDN}/${r}@${j6}/dist/libs/${i}`):Jl?`../src/libs/${i}`:`modules/${r}/src/libs/${i}`:`modules/${r}/dist/libs/${i}`}async function tD(e){if(e.endsWith("wasm"))return await nD(e);if(!Xl)try{return Hm&&af&&await af(e)}catch(a){return console.error(a),null}if(Jl)return importScripts(e);let r=await oD(e);return iD(r,e)}function iD(e,r){if(!Xl)return xs&&xs(e,r);if(Jl)return eval.call(globalThis,e),null;let a=document.createElement("script");a.id=r;try{a.appendChild(document.createTextNode(e))}catch{a.text=e}return document.body.appendChild(a),null}async function nD(e){return!ef||e.startsWith("http")?await(await fetch(e)).arrayBuffer():await ef(e)}async function oD(e){return!rf||e.startsWith("http")?await(await fetch(e)).text():await rf(e)}var sD=0;function $m(e){Ht.inWorkerThread()&&(Ht.onmessage=async(r,a)=>{switch(r){case"process":try{let{input:i,options:t={},context:n={}}=a,o=await cD({loader:e,arrayBuffer:i,options:t,context:{...n,_parse:uD}});Ht.postMessage("done",{result:o})}catch(i){let t=i instanceof Error?i.message:"";Ht.postMessage("error",{error:t})}break;default:}})}function uD(e,r,a,i){return new Promise((t,n)=>{let o=sD++,s=(p,f)=>{if(f.id===o)switch(p){case"done":Ht.removeEventListener(s),t(f.result);break;case"error":Ht.removeEventListener(s),n(f.error);break;default:}};Ht.addEventListener(s);let c={id:o,input:e,options:a};Ht.postMessage("process",c)})}async function cD({loader:e,arrayBuffer:r,options:a,context:i}){let t,n;if(e.parseSync||e.parse)t=r,n=e.parseSync||e.parse;else if(e.parseTextSync)t=new TextDecoder().decode(r),n=e.parseTextSync;else throw new Error(`Could not load data with ${e.name} loader`);return a={...a,modules:e&&e.options&&e.options.modules||{},worker:!1},await n(t,{...a},i,e)}var lD="",F6={};function Ru(e){for(let r in F6)if(e.startsWith(r)){let a=F6[r];e=e.replace(r,a)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${lD}${e}`),e}var yo=Ka(require("fs"),1),xo=class{constructor(r,a,i){r=Ru(r),this.handle=yo.default.openSync(r,a,i);let t=yo.default.fstatSync(this.handle,{bigint:!0});this.size=Number(t.size),this.bigsize=t.size,this.url=r}async close(){return new Promise((r,a)=>{yo.default.close(this.handle,i=>i?a(i):r())})}async stat(){return await new Promise((r,a)=>yo.default.fstat(this.handle,{bigint:!0},(i,t)=>{let n={size:Number(t.size),bigsize:t.size,isDirectory:t.isDirectory()};i?a(i):r(n)}))}async read(r,a){let i=new ArrayBuffer(a),t=BigInt(r),n=0,o=new Uint8Array(i),s;for(;a>0;){let c=await fD(this.handle,o,0,a,t);if(c===0)break;n+=c,t+=BigInt(c),a-=c,s!==void 0&&(s+=c)}return n<a?i.slice(0,n):i}async write(r,a=0,i=r.byteLength){return new Promise((t,n)=>{let o=Number(a),s=new Uint8Array(r,Number(a),i);yo.default.write(this.handle,s,0,i,o,(c,p)=>c?n(c):t(p))})}};async function fD(e,r,a,i,t){return await new Promise((n,o)=>yo.default.read(e,r,a,i,t,(s,c)=>s?o(s):n(c)))}var sf=Ka(require("fs/promises"),1);var Gm=Ka(require("fs"),1),Wm=require("stream");var tf=Ka(require("zlib"),1),pD=e=>e&&e instanceof ArrayBuffer,dD=e=>e&&e instanceof Buffer;function nf(e,r){switch(r==null?void 0:r.get("content-encoding")){case"br":return e.pipe(tf.default.createBrotliDecompress());case"gzip":return e.pipe(tf.default.createGunzip());case"deflate":return e.pipe(tf.default.createDeflate());default:return e}}async function C6(e){let r=[];return await new Promise((a,i)=>{e.on("error",t=>i(t)),e.on("readable",()=>e.read()),e.on("data",t=>{typeof t=="string"&&i(new Error("Read stream not binary")),r.push(mD(t))}),e.on("end",()=>{let t=hD(r);a(t)})})}function hD(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),a=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(a),t=0;for(let n of r)i.set(n,t),t+=n.byteLength;return i.buffer}function mD(e){if(pD(e))return e;if(dD(e))return new Uint8Array(e).buffer;if(ArrayBuffer.isView(e))return e.buffer;if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error(`toArrayBuffer(${JSON.stringify(e,null,2).slice(10)})`)}var vD=e=>typeof e=="boolean",q6=e=>typeof e=="function",gD=e=>e!==null&&typeof e=="object",bD=e=>gD(e)&&q6(e.read)&&q6(e.pipe)&&vD(e.readable);async function of(e,r){let a=/^file:\/\//;e.replace(a,"/");let i=e.split("?")[0];i=Ru(i);let t=new Headers;e.endsWith(".gz")&&(t["content-encoding"]="gzip"),e.endsWith(".br")&&(t["content-encoding"]="br");try{let n=await new Promise((m,h)=>{let v=Gm.default.createReadStream(i,{encoding:null});v.once("readable",()=>m(v)),v.on("error",w=>h(w))}),o=n;bD(n)?o=nf(n,t):typeof n=="string"?o=Wm.Readable.from([new TextEncoder().encode(n)]):o=Wm.Readable.from([n||new ArrayBuffer(0)]);let s=200,c="OK",p=yD(i),f=new Response(o,{headers:p,status:s,statusText:c});return Object.defineProperty(f,"url",{value:e}),f}catch(n){let o=n.message,s=400,c=o,p={},f=new Response(o,{headers:p,status:s,statusText:c});return Object.defineProperty(f,"url",{value:e}),f}}function yD(e){let r={};if(!r["content-length"]){let a=Gm.default.statSync(e);r["content-length"]=a.size}return e.endsWith(".gz")&&(e=e.slice(0,-3),r["content-encoding"]="gzip"),new Headers(r)}var uf=class{constructor(){this.readable=!0;this.writable=!0}async readdir(r=".",a){return await sf.default.readdir(r,a)}async stat(r){let a=await sf.default.stat(r,{bigint:!0});return{size:Number(a.size),bigsize:a.size,isDirectory:a.isDirectory()}}async unlink(r){return await sf.default.unlink(r)}async fetch(r,a){return await of(r,a)}async openReadableFile(r,a="r"){return new xo(r,a)}async openWritableFile(r,a="w",i){return new xo(r,a,i)}};var W6=require("node:process");var I6=Ka(require("stream"),1),Km=class{},xD=I6.Readable||Km;function Qm(e,r){let a=e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]();return new Ym(a,r)}var Ym=class extends xD{constructor(a,i){super(i);this._iterator=a,this._pulling=!1,this._bytesMode=!i||!i.objectMode}async _read(a){this._pulling||(this._pulling=!0,this._pulling=await this._pull(a,this._iterator))}async _destroy(a,i){var t,n,o,s;this._iterator&&(a?await((n=(t=this._iterator)==null?void 0:t.throw)==null?void 0:n.call(t,a)):await((s=(o=this._iterator)==null?void 0:o.return)==null?void 0:s.call(o,a)),i==null||i(null))}async _pull(a,i){var o;let t=this._bytesMode,n=null;for(;this.readable&&!(n=await i.next()).done&&(a!==null&&(a-=t&&ArrayBuffer.isView(n.value)?n.value.byteLength:1),!(!this.push(new Uint8Array(n.value))||a<=0)););return(n!=null&&n.done||!this.readable)&&(this.push(null)||!0)&&((o=i==null?void 0:i.return)==null||o.call(i)),!this.readable}};var O6=Ka(R6(),1);delete globalThis.ReadableStream;var lf=class extends O6.ReadableStream{};var ff=class{constructor(r){this.isWorking=!1;this.isCancelled=!1;this.chunks=r}start(r){this.work(r)}async work(r){let{chunks:a}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let i;try{i=a.next()}catch(t){r.error(t);break}i&&(!i.done&&!this.isCancelled?r.enqueue(i.value):r.close())}this.isWorking=!1}pull(r){this.isWorking||this.work(r)}cancel(){this.isCancelled=!0}};var pf=class extends lf{constructor(a){super(new ff(a.values()),{type:"bytes"});this._chunks=a}async*[Symbol.asyncIterator](a){let i=this.getReader();yield*this._chunks,i.releaseLock()}};var wo=class{constructor(r=[],a={}){this.parts=[],this.size=0;for(let i of r)if(typeof i=="string"){let t=new TextEncoder().encode(i);this.parts.push(t),this.size+=t.byteLength}else if(i instanceof wo)this.size+=i.size,this.parts.push(...i.parts);else if(i instanceof ArrayBuffer)this.parts.push(new Uint8Array(i)),this.size+=i.byteLength;else if(i instanceof Uint8Array)this.parts.push(i),this.size+=i.byteLength;else if(ArrayBuffer.isView(i)){let{buffer:t,byteOffset:n,byteLength:o}=i;this.parts.push(new Uint8Array(t,n,o)),this.size+=o}else{let t=new TextEncoder().encode(String(i));this.parts.push(t),this.size+=t.byteLength}this.type=wD(a.type)}slice(r=0,a=this.size,i=""){let{size:t,parts:n}=this,o=r<0?Math.max(t+r,0):Math.min(r,t),s=a<0?Math.max(t+a,0):Math.min(a,t),c=Math.max(s-o,0),p=new wo([],{type:i});if(c===0)return p;let f=0,m=[];for(let h of n){let{byteLength:v}=h;if(o>0&&v<=o)o-=v,s-=v;else{let w=h.subarray(o,Math.min(v,s));if(m.push(w),f+=w.byteLength,o=0,f>=c)break}}return p.parts=m,p.size=f,p}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,a="";for(let i of this.parts)a+=r.decode(i);return a}stream(){return new pf(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),a=new Uint8Array(r),i=0;for(let t of this.parts)a.set(t,i),i+=t.byteLength;return r}};function wD(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}function kD(){return typeof Blob>"u"&&!globalThis.Blob&&(globalThis.Blob=wo),globalThis.Blob}var _D=kD();var df=class{constructor(){this.onload=null}abort(){}async readAsArrayBuffer(r){let a=await r.arrayBuffer();this.onload&&this.onload({target:{result:a}})}async readAsBinaryString(r){throw Error("Not implemented")}async readAsDataURL(r){let a=await r.text(),i=`data://;base64,${Fs(a)}`;this.onload&&this.onload({target:{result:i}})}async readAsText(r){let a=await r.text();this.onload&&this.onload({target:{result:a}})}};var hf=class extends globalThis.Blob{constructor(a,i,t={}){super(a,t);this.name="";this.webkitRelativePath="";this.name=String(i).replace(/\//g,":"),this.lastModified=(t==null?void 0:t.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};function jD(){return typeof FileReader>"u"&&!globalThis.FileReader&&(globalThis.FileReader=df),typeof File>"u"&&!globalThis.File&&(globalThis.File=hf),global}var SD=jD();var Xm=Ka(require("module"),1),D6=Ka(require("path"),1),vf=Ka(require("fs"),1);async function z6(e){return e.startsWith("http")?await(await fetch(e)).arrayBuffer():vf.default.readFileSync(e).buffer}async function L6(e){return e.startsWith("http")?await(await fetch(e)).text():vf.default.readFileSync(e,"utf8")}async function M6(e){if(e.startsWith("http")){let i=await(await fetch(e)).text();return mf(i)}e.startsWith("/")||(e=`${process.cwd()}/${e}`);let r=await vf.default.readFileSync(e,"utf8");return mf(r)}function mf(e,r="",a){if(typeof r=="object"&&(a=r,r=""),r=r.replace("file://",""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let i=Xm.default._nodeModulePaths(D6.default.dirname(r)),t=typeof module<"u"&&(module==null?void 0:module.parent),n=new Xm.default(r,t);return n.filename=r,n.paths=[].concat((a==null?void 0:a.prependPaths)||[]).concat(i).concat((a==null?void 0:a.appendPaths)||[]),n._compile(e,r),t&&t.children&&t.children.splice(t.children.indexOf(n),1),n.exports}var _i=class{constructor(r){this.map={},r instanceof _i?r.forEach((a,i)=>this.append(i,a)):Array.isArray(r)?r.forEach(a=>this.append(a[0],a[1])):r&&Object.getOwnPropertyNames(r).forEach(a=>this.append(a,r[a]))}append(r,a){r=Ou(r),a=N6(a);let i=this.map[r];this.map[r]=i?`${i}, ${a}`:a}delete(r){delete this.map[Ou(r)]}get(r){return r=Ou(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(Ou(r))}set(r,a){this.map[Ou(r)]=N6(a)}forEach(r,a=null){for(let i in this.map)this.map.hasOwnProperty(i)&&(a?r.call(a,this.map[i],i,this):r(this.map[i],i,this))}keys(){let r=[];return this.forEach(function(a,i){r.push(i)}),Jm(r)}values(){let r=[];return this.forEach(function(a){r.push(a)}),Jm(r)}entries(){let r=[];return this.forEach(function(a,i){r.push([i,a])}),Jm(r)}*[Symbol.iterator](){yield*this.entries()}};function Ou(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e)||e==="")throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function N6(e){return typeof e!="string"&&(e=String(e)),e}function Jm(e){let r={next(){let a=e.shift();return{done:a===void 0,value:a}}};return r[Symbol.iterator]=function(){return r},r}function Zm(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var rv=Ka(require("stream"),1),ED=e=>typeof e=="boolean",U6=e=>typeof e=="function",AD=e=>e!==null&&typeof e=="object",ev=e=>AD(e)&&U6(e.read)&&U6(e.pipe)&&ED(e.readable),hn=class{constructor(r,a){this.bodyUsed=!1;let{headers:i,status:t=200,statusText:n="OK",url:o}=a||{};this.url=o,this.ok=t===200,this.status=t,this.statusText=n,this.headers=new _i((a==null?void 0:a.headers)||{}),ev(r)?this._body=nf(r,i):typeof r=="string"?this._body=rv.Readable.from([new TextEncoder().encode(r)]):this._body=rv.Readable.from([r||new ArrayBuffer(0)])}get body(){return Zm(!this.bodyUsed),Zm(ev(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return ev(this._body)?await C6(this._body):this._body||new ArrayBuffer(0)}async text(){let r=await this.arrayBuffer();return new TextDecoder().decode(r)}async json(){let r=await this.text();return JSON.parse(r)}async blob(){if(typeof Blob>"u")throw new Error("Blob polyfill not installed");return new Blob([await this.arrayBuffer()])}};var V6=Ka(require("http"),1),$6=Ka(require("https"),1);var PD=e=>e&&e instanceof ArrayBuffer,TD=e=>e&&e instanceof Buffer;function H6(e){let r=e.indexOf(","),a,i;return e.slice(r-7,r)===";base64"?(a=Buffer.from(e.slice(r+1),"base64"),i=e.slice(5,r-7).trim()):(a=Buffer.from(decodeURIComponent(e.slice(r+1))),i=e.slice(5,r).trim()),i?i.startsWith(";")&&(i=`text/plain${i}`):i="text/plain;charset=US-ASCII",{arrayBuffer:FD(a),mimeType:i}}function FD(e){if(PD(e))return e;if(TD(e))return new Uint8Array(e).buffer;if(ArrayBuffer.isView(e))return e.buffer;if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error(`toArrayBuffer(${JSON.stringify(e,null,2).slice(10)})`)}var av=e=>e.startsWith("data:"),CD=e=>e.startsWith("http:")||e.startsWith("https:");async function Du(e,r){try{if(globalThis.fetch!==Du&&(CD(e)||av(e)))return await fetch(e,r);if(av(e)){let{arrayBuffer:p,mimeType:f}=H6(e);return new hn(p,{headers:{"content-type":f},url:e})}let a={},i=e;e.endsWith(".gz")&&(e=e.slice(0,-3),a["content-encoding"]="gzip");let t=await qD(i,r),n=OD(e,t,a),{status:o,statusText:s}=RD(t),c=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&c){let p=ID(e,n.get("location"));return await Du(p,r)}return new hn(t,{headers:n,status:o,statusText:s,url:e})}catch(a){return new hn(null,{status:400,statusText:String(a),url:e})}}async function qD(e,r){return await new Promise((a,i)=>{let t=BD(e,r),n=e.startsWith("https:")?$6.default.request(t,o=>a(o)):V6.default.request(t,o=>a(o));n.on("error",o=>i(o)),n.end()})}function ID(e,r){if(r.startsWith("http"))return r;let a=new URL(e);return a.pathname=r,a.href}function BD(e,r){let a=(r==null?void 0:r.headers)||{},i={};for(let n of Object.keys(a))i[n.toLowerCase()]=a[n];i["accept-encoding"]=i["accept-encoding"]||"gzip,br,deflate";let t=new URL(e);return{hostname:t.hostname,path:t.pathname,method:"GET",...r,...r==null?void 0:r.fetch,headers:i,port:t.port}}function RD(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function OD(e,r,a={}){let i={};if(r&&r.headers){let t=r.headers;for(let n in t){let o=t[n];i[n.toLowerCase()]=String(o)}}if(!i["content-length"]){let t=DD(e);Number.isFinite(t)&&(i["content-length"]=t)}return Object.assign(i,a),new _i(i)}function DD(e){return av(e)?e.length-5:null}var zD=parseInt(W6.versions.node.split(".")[0]);Lv&&console.error("loaders.gl: The @loaders.gl/polyfills should only be used in Node.js environments");globalThis.loaders=globalThis.loaders||{};globalThis.loaders.makeNodeStream=Qm;globalThis.loaders.NodeFile=xo;globalThis.loaders.NodeFileSystem=uf;globalThis.loaders.fetchNode=of;globalThis.TextEncoder||(globalThis.TextEncoder=Ts);globalThis.TextDecoder||(globalThis.TextDecoder=Jn);!("atob"in globalThis)&&Fs&&(globalThis.atob=Fs);!("btoa"in globalThis)&&Df&&(globalThis.btoa=Df);globalThis.loaders.encodeImageNode=Vb;globalThis.loaders.parseImageNode=Lm;globalThis.loaders.imageFormatsNode=zm;globalThis._parseImageNode=Lm;globalThis._imageFormatsNode=zm;globalThis.loaders.readFileAsArrayBuffer=z6;globalThis.loaders.readFileAsText=L6;globalThis.loaders.requireFromFile=M6;globalThis.loaders.requireFromString=mf;zD<18&&(!("Headers"in globalThis)&&_i&&(globalThis.Headers=_i),!("Response"in globalThis)&&hn&&(globalThis.Response=hn),!("fetch"in globalThis)&&Du&&(globalThis.fetch=Du));var G6="4.0.0-beta.5";var LD={draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},K6={name:"Draco",id:"draco",module:"draco",version:G6,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:LD};function Y6(e){switch(e.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function tv(e){let r=1/0,a=1/0,i=1/0,t=-1/0,n=-1/0,o=-1/0,s=e.POSITION?e.POSITION.value:[],c=s&&s.length;for(let p=0;p<c;p+=3){let f=s[p],m=s[p+1],h=s[p+2];r=f<r?f:r,a=m<a?m:a,i=h<i?h:i,t=f>t?f:t,n=m>n?m:n,o=h>o?h:o}return[[r,a,i],[t,n,o]]}function iv(e,r,a){let i=Y6(r.value),t=a||Q6(r);return{name:e,type:{type:"fixed-size-list",listSize:r.size,children:[{name:"value",type:i}]},nullable:!1,metadata:t}}function Q6(e){let r={};return"byteOffset"in e&&(r.byteOffset=e.byteOffset.toString(10)),"byteStride"in e&&(r.byteStride=e.byteStride.toString(10)),"normalized"in e&&(r.normalized=e.normalized.toString()),r}function J6(e,r,a){let i=Z6(r.metadata),t=[],n=MD(r.attributes);for(let o in e){let s=e[o],c=X6(o,s,n[o]);t.push(c)}if(a){let o=X6("indices",a);t.push(o)}return{fields:t,metadata:i}}function MD(e){let r={};for(let a in e){let i=e[a];r[i.name||"undefined"]=i}return r}function X6(e,r,a){let i=a?Z6(a.metadata):void 0;return iv(e,r,i)}function Z6(e){Object.entries(e);let r={};for(let a in e)r[`${a}.string`]=JSON.stringify(e[a]);return r}var e5={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},ND={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},UD=4,zu=class{constructor(r){this.draco=r,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(r,a={}){let i=new this.draco.DecoderBuffer;i.Init(new Int8Array(r),r.byteLength),this._disableAttributeTransforms(a);let t=this.decoder.GetEncodedGeometryType(i),n=t===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let o;switch(t){case this.draco.TRIANGULAR_MESH:o=this.decoder.DecodeBufferToMesh(i,n);break;case this.draco.POINT_CLOUD:o=this.decoder.DecodeBufferToPointCloud(i,n);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!o.ok()||!n.ptr){let h=`DRACO decompression failed: ${o.error_msg()}`;throw new Error(h)}let s=this._getDracoLoaderData(n,t,a),c=this._getMeshData(n,s,a),p=tv(c.attributes),f=J6(c.attributes,s,c.indices);return{loader:"draco",loaderData:s,header:{vertexCount:n.num_points(),boundingBox:p},...c,schema:f}}finally{this.draco.destroy(i),n&&this.draco.destroy(n)}}_getDracoLoaderData(r,a,i){let t=this._getTopLevelMetadata(r),n=this._getDracoAttributes(r,i);return{geometry_type:a,num_attributes:r.num_attributes(),num_points:r.num_points(),num_faces:r instanceof this.draco.Mesh?r.num_faces():0,metadata:t,attributes:n}}_getDracoAttributes(r,a){let i={};for(let t=0;t<r.num_attributes();t++){let n=this.decoder.GetAttribute(r,t),o=this._getAttributeMetadata(r,t);i[n.unique_id()]={unique_id:n.unique_id(),attribute_type:n.attribute_type(),data_type:n.data_type(),num_components:n.num_components(),byte_offset:n.byte_offset(),byte_stride:n.byte_stride(),normalized:n.normalized(),attribute_index:t,metadata:o};let s=this._getQuantizationTransform(n,a);s&&(i[n.unique_id()].quantization_transform=s);let c=this._getOctahedronTransform(n,a);c&&(i[n.unique_id()].octahedron_transform=c)}return i}_getMeshData(r,a,i){let t=this._getMeshAttributes(a,r,i);if(!t.POSITION)throw new Error("DRACO: No position attribute found.");if(r instanceof this.draco.Mesh)switch(i.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:t,indices:{value:this._getTriangleStripIndices(r),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:t,indices:{value:this._getTriangleListIndices(r),size:1}}}return{topology:"point-list",mode:0,attributes:t}}_getMeshAttributes(r,a,i){let t={};for(let n of Object.values(r.attributes)){let o=this._deduceAttributeName(n,i);n.name=o;let{value:s,size:c}=this._getAttributeValues(a,n);t[o]={value:s,size:c,byteOffset:n.byte_offset,byteStride:n.byte_stride,normalized:n.normalized}}return t}_getTriangleListIndices(r){let i=r.num_faces()*3,t=i*UD,n=this.draco._malloc(t);try{return this.decoder.GetTrianglesUInt32Array(r,t,n),new Uint32Array(this.draco.HEAPF32.buffer,n,i).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(r){let a=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(r,a),$D(a)}finally{this.draco.destroy(a)}}_getAttributeValues(r,a){let i=ND[a.data_type],t=a.num_components,o=r.num_points()*t,s=o*i.BYTES_PER_ELEMENT,c=HD(this.draco,i),p,f=this.draco._malloc(s);try{let m=this.decoder.GetAttribute(r,a.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(r,m,c,s,f),p=new i(this.draco.HEAPF32.buffer,f,o).slice()}finally{this.draco._free(f)}return{value:p,size:t}}_deduceAttributeName(r,a){let i=r.unique_id;for(let[o,s]of Object.entries(a.extraAttributes||{}))if(s===i)return o;let t=r.attribute_type;for(let o in e5)if(this.draco[o]===t)return e5[o];let n=a.attributeNameEntry||"name";return r.metadata[n]?r.metadata[n].string:`CUSTOM_ATTRIBUTE_${i}`}_getTopLevelMetadata(r){let a=this.decoder.GetMetadata(r);return this._getDracoMetadata(a)}_getAttributeMetadata(r,a){let i=this.decoder.GetAttributeMetadata(r,a);return this._getDracoMetadata(i)}_getDracoMetadata(r){if(!r||!r.ptr)return{};let a={},i=this.metadataQuerier.NumEntries(r);for(let t=0;t<i;t++){let n=this.metadataQuerier.GetEntryName(r,t);a[n]=this._getDracoMetadataField(r,n)}return a}_getDracoMetadataField(r,a){let i=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(r,a,i);let t=VD(i);return{int:this.metadataQuerier.GetIntEntry(r,a),string:this.metadataQuerier.GetStringEntry(r,a),double:this.metadataQuerier.GetDoubleEntry(r,a),intArray:t}}finally{this.draco.destroy(i)}}_disableAttributeTransforms(r){let{quantizedAttributes:a=[],octahedronAttributes:i=[]}=r,t=[...a,...i];for(let n of t)this.decoder.SkipAttributeTransform(this.draco[n])}_getQuantizationTransform(r,a){let{quantizedAttributes:i=[]}=a,t=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(t)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits(),range:o.range(),min_values:new Float32Array([1,2,3]).map(s=>o.min_value(s))}}finally{this.draco.destroy(o)}}return null}_getOctahedronTransform(r,a){let{octahedronAttributes:i=[]}=a,t=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(t)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits()}}finally{this.draco.destroy(o)}}return null}};function HD(e,r){switch(r){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32;default:return e.DT_INVALID}}function VD(e){let r=e.size(),a=new Int32Array(r);for(let i=0;i<r;i++)a[i]=e.GetValue(i);return a}function $D(e){let r=e.size(),a=new Int32Array(r);for(let i=0;i<r;i++)a[i]=e.GetValue(i);return a}var WD="1.5.6",GD="1.4.1",nv=`https://www.gstatic.com/draco/versioned/decoders/${WD}`,Rt={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},ov={[Rt.DECODER]:`${nv}/${Rt.DECODER}`,[Rt.DECODER_WASM]:`${nv}/${Rt.DECODER_WASM}`,[Rt.FALLBACK_DECODER]:`${nv}/${Rt.FALLBACK_DECODER}`,[Rt.ENCODER]:`https://raw.githubusercontent.com/google/draco/${GD}/javascript/${Rt.ENCODER}`},Lu;async function r5(e){let r=e.modules||{};return r.draco3d?Lu=Lu||r.draco3d.createDecoderModule({}).then(a=>({draco:a})):Lu=Lu||KD(e),await Lu}async function KD(e){let r,a;switch(e.draco&&e.draco.decoderType){case"js":r=await Bu(ov[Rt.FALLBACK_DECODER],"draco",e,Rt.FALLBACK_DECODER);break;case"wasm":default:[r,a]=await Promise.all([await Bu(ov[Rt.DECODER],"draco",e,Rt.DECODER),await Bu(ov[Rt.DECODER_WASM],"draco",e,Rt.DECODER_WASM)])}return r=r||globalThis.DracoDecoderModule,await YD(r,a)}function YD(e,r){let a={};return r&&(a.wasmBinary=r),new Promise(i=>{e({...a,onModuleLoaded:t=>i({draco:t})})})}var a5={...K6,parse:QD};async function QD(e,r){let{draco:a}=await r5(r),i=new zu(a);try{return i.parseSync(e,r==null?void 0:r.draco)}finally{i.destroy()}}$m(a5);
|
|
94
|
+
`,m.message,m.stack);var h=new Error("tunneling socket could not be established, cause="+m.message);h.code="ECONNRESET",r.request.emit("error",h),i.removeSocket(t)}};$i.prototype.removeSocket=function(r){var a=this.sockets.indexOf(r);if(a!==-1){this.sockets.splice(a,1);var i=this.requests.shift();i&&this.createConnection(i)}};function Gj(e,r){var a=this;$i.prototype.createSocket.call(a,e,function(i){var t=YR.connect(0,Kj({},a.options,{servername:e.host,socket:i}));a.sockets[a.sockets.indexOf(i)]=t,r(t)})}function Kj(e){for(var r=1,a=arguments.length;r<a;++r){var i=arguments[r];if(typeof i=="object")for(var t=Object.keys(i),n=0,o=t.length;n<o;++n){var s=t[n];i[s]!==void 0&&(e[s]=i[s])}}return e}var go;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?go=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:go=function(){};gs.debug=go});var Zj=B(Jj=>{"use strict";var iO=require("url"),nO=Yj(),Qj=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],Xj=["proxy-authorization"];function oO(e){var r=e.port,a=e.protocol,i=e.hostname+":";return r?i+=r:a==="https:"?i+="443":i+="80",i}function sO(e,r){var a=r.reduce(function(i,t){return i[t.toLowerCase()]=!0,i},{});return Object.keys(e).filter(function(i){return a[i.toLowerCase()]}).reduce(function(i,t){return i[t]=e[t],i},{})}function uO(e,r){var a=e.proxy,i={proxy:{host:a.hostname,port:+a.port,proxyAuth:a.auth,headers:r},headers:e.headers,ca:e.ca,cert:e.cert,key:e.key,passphrase:e.passphrase,pfx:e.pfx,ciphers:e.ciphers,rejectUnauthorized:e.rejectUnauthorized,secureOptions:e.secureOptions,secureProtocol:e.secureProtocol};return i}function cO(e,r){var a=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[a,i].join("Over")}function lO(e){var r=e.uri,a=e.proxy,i=cO(r,a);return nO[i]}function Pu(e){this.request=e,this.proxyHeaderWhiteList=Qj,this.proxyHeaderExclusiveList=[],typeof e.tunnel<"u"&&(this.tunnelOverride=e.tunnel)}Pu.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride<"u"?e.tunnelOverride:r.uri.protocol==="https:"};Pu.prototype.setup=function(e){var r=this,a=r.request;if(e=e||{},typeof a.proxy=="string"&&(a.proxy=iO.parse(a.proxy)),!a.proxy||!a.tunnel)return!1;e.proxyHeaderWhiteList&&(r.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(r.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=r.proxyHeaderExclusiveList.concat(Xj),t=r.proxyHeaderWhiteList.concat(i),n=sO(a.headers,t);n.host=oO(a.uri),i.forEach(a.removeHeader,a);var o=lO(a),s=uO(a,n);return a.agent=o(s),!0};Pu.defaultProxyHeaderWhiteList=Qj;Pu.defaultProxyHeaderExclusiveList=Xj;Jj.Tunnel=Pu});var r6=B((e6,Tu)=>{(function(){var e,r,a,i,t,n;typeof performance<"u"&&performance!==null&&performance.now?Tu.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Tu.exports=function(){return(e()-t)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},i=e(),n=process.uptime()*1e9,t=i-n):Date.now?(Tu.exports=function(){return Date.now()-a},a=Date.now()):(Tu.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(e6)});var p6=B((DH,f6)=>{"use strict";var fO=require("http"),n6=require("https"),Fu=require("url"),Rm=require("util"),Kl=require("stream"),Gl=require("zlib"),Bm=N1(),pO=X1(),dO=N2(),hO=yl(),o6=xl(),a6=Q2(),mO=jk(),vO=bc(),t6=Xh(),gO=Fk().strict,ys=_c(),bO=ud(),yO=Ik(),xO=$k().Querystring,wO=yj().Har,kO=Pj().Auth,_O=Lj().OAuth,jO=Mj(),SO=Uj().Multipart,EO=$j().Redirect,Om=Zj().Tunnel,bs=r6(),Cu=No().Buffer,i6=ys.safeStringify,AO=ys.isReadStream,PO=ys.toBase64,TO=ys.defer,s6=ys.copy,FO=ys.version,u6=bO.jar(),c6={};function CO(e,r){var a={};for(var i in r){var t=e.indexOf(i)===-1;t&&(a[i]=r[i])}return a}function qO(e,r){var a={};for(var i in r){var t=e.indexOf(i)!==-1,n=typeof r[i]=="function";t&&n||(a[i]=r[i])}return a}function l6(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function IO(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:l6.call(e.request)}}function Rr(e){var r=this;e.har&&(r._har=new wO(r),e=r._har.options(e)),Kl.Stream.call(r);var a=Object.keys(Rr.prototype),i=CO(a,e);vO(r,i),e=qO(a,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new xO(r),r._auth=new kO(r),r._oauth=new _O(r),r._multipart=new SO(r),r._redirect=new EO(r),r._tunnel=new Om(r),r.init(e)}Rm.inherits(Rr,Kl.Stream);Rr.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function rt(){Rr.debug&&console.error("REQUEST %s",Rm.format.apply(Rm,arguments))}Rr.prototype.debug=rt;Rr.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?s6(r.headers):{};for(var a in r.headers)typeof r.headers[a]>"u"&&delete r.headers[a];if(o6.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),rt(e),!r.pool&&r.pool!==!1&&(r.pool=c6),r.dests=r.dests||[],r.__isRequestRequest=!0,!r._callback&&r.callback&&(r._callback=r.callback,r.callback=function(){r._callbackCalled||(r._callbackCalled=!0,r._callback.apply(r,arguments))},r.on("error",r.callback.bind()),r.on("complete",r.callback.bind(r,null))),!r.uri&&r.url&&(r.uri=r.url,delete r.url),r.baseUrl){if(typeof r.baseUrl!="string")return r.emit("error",new Error("options.baseUrl must be a string"));if(typeof r.uri!="string")return r.emit("error",new Error("options.uri must be a string when using options.baseUrl"));if(r.uri.indexOf("//")===0||r.uri.indexOf("://")!==-1)return r.emit("error",new Error("options.uri must be a path when using options.baseUrl"));var i=r.baseUrl.lastIndexOf("/")===r.baseUrl.length-1,t=r.uri.indexOf("/")===0;i&&t?r.uri=r.baseUrl+r.uri.slice(1):i||t?r.uri=r.baseUrl+r.uri:r.uri===""?r.uri=r.baseUrl:r.uri=r.baseUrl+"/"+r.uri,delete r.baseUrl}if(!r.uri)return r.emit("error",new Error("options.uri is a required argument"));if(typeof r.uri=="string"&&(r.uri=Fu.parse(r.uri)),r.uri.href||(r.uri.href=Fu.format(r.uri)),r.uri.protocol==="unix:")return r.emit("error",new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`"));if(r.uri.host==="unix"&&r.enableUnixSocket(),r.strictSSL===!1&&(r.rejectUnauthorized=!1),r.uri.pathname||(r.uri.pathname="/"),!(r.uri.host||r.uri.hostname&&r.uri.port)&&!r.uri.isUnix){var n=Fu.format(r.uri),o='Invalid URI "'+n+'"';return Object.keys(e).length===0&&(o+=". This can be caused by a crappy redirection."),r.abort(),r.emit("error",new Error(o))}if(r.hasOwnProperty("proxy")||(r.proxy=yO(r.uri)),r.tunnel=r._tunnel.isEnabled(),r.proxy&&r._tunnel.setup(e),r._redirect.onRequest(e),r.setHost=!1,!r.hasHeader("host")){var s=r.originalHostHeaderName||"host";r.setHeader(s,r.uri.host),r.uri.port&&(r.uri.port==="80"&&r.uri.protocol==="http:"||r.uri.port==="443"&&r.uri.protocol==="https:")&&r.setHeader(s,r.uri.hostname),r.setHost=!0}if(r.jar(r._jar||e.jar),r.uri.port||(r.uri.protocol==="http:"?r.uri.port=80:r.uri.protocol==="https:"&&(r.uri.port=443)),r.proxy&&!r.tunnel?(r.port=r.proxy.port,r.host=r.proxy.hostname):(r.port=r.uri.port,r.host=r.uri.hostname),e.form&&r.form(e.form),e.formData){var c=e.formData,p=r.form(),f=function(R,L){L&&L.hasOwnProperty("value")&&L.hasOwnProperty("options")?p.append(R,L.value,L.options):p.append(R,L)};for(var m in c)if(c.hasOwnProperty(m)){var h=c[m];if(h instanceof Array)for(var v=0;v<h.length;v++)f(m,h[v]);else f(m,h)}}if(e.qs&&r.qs(e.qs),r.uri.path?r.path=r.uri.path:r.path=r.uri.pathname+(r.uri.search||""),r.path.length===0&&(r.path="/"),e.aws&&r.aws(e.aws),e.hawk&&r.hawk(e.hawk),e.httpSignature&&r.httpSignature(e.httpSignature),e.auth&&(Object.prototype.hasOwnProperty.call(e.auth,"username")&&(e.auth.user=e.auth.username),Object.prototype.hasOwnProperty.call(e.auth,"password")&&(e.auth.pass=e.auth.password),r.auth(e.auth.user,e.auth.pass,e.auth.sendImmediately,e.auth.bearer)),r.gzip&&!r.hasHeader("accept-encoding")&&r.setHeader("accept-encoding","gzip, deflate"),r.uri.auth&&!r.hasHeader("authorization")){var w=r.uri.auth.split(":").map(function(R){return r._qs.unescape(R)});r.auth(w[0],w.slice(1).join(":"),!0)}if(!r.tunnel&&r.proxy&&r.proxy.auth&&!r.hasHeader("proxy-authorization")){var E=r.proxy.auth.split(":").map(function(R){return r._qs.unescape(R)}),_="Basic "+PO(E.join(":"));r.setHeader("proxy-authorization",_)}r.proxy&&!r.tunnel&&(r.path=r.uri.protocol+"//"+r.uri.host+r.path),e.json&&r.json(e.json),e.multipart&&r.multipart(e.multipart),e.time&&(r.timing=!0,r.elapsedTime=r.elapsedTime||0);function A(){if(gO(r.body)&&(r.body=Cu.from(r.body)),!r.hasHeader("content-length")){var R;typeof r.body=="string"?R=Cu.byteLength(r.body):Array.isArray(r.body)?R=r.body.reduce(function(L,$){return L+$.length},0):R=r.body.length,R?r.setHeader("content-length",R):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!t6(r.body)&&A(),e.oauth?r.oauth(e.oauth):r._oauth.params&&r.hasHeader("authorization")&&r.oauth(r._oauth.params);var C=r.proxy&&!r.tunnel?r.proxy.protocol:r.uri.protocol,T={"http:":fO,"https:":n6},D=r.httpModules||{};if(r.httpModule=D[C]||T[C],!r.httpModule)return r.emit("error",new Error("Invalid protocol: "+C));if(e.ca&&(r.ca=e.ca),!r.agent)if(e.agentOptions&&(r.agentOptions=e.agentOptions),e.agentClass)r.agentClass=e.agentClass;else if(e.forever){var I=FO();I.major===0&&I.minor<=10?r.agentClass=C==="http:"?a6:a6.SSL:(r.agentClass=r.httpModule.Agent,r.agentOptions=r.agentOptions||{},r.agentOptions.keepAlive=!0)}else r.agentClass=r.httpModule.Agent;r.pool===!1?r.agent=!1:r.agent=r.agent||r.getNewAgent(),r.on("pipe",function(R){if(r.ntick&&r._started&&r.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),r.src=R,AO(R))r.hasHeader("content-type")||r.setHeader("content-type",hO.lookup(R.path));else{if(R.headers)for(var L in R.headers)r.hasHeader(L)||r.setHeader(L,R.headers[L]);r._json&&!r.hasHeader("content-type")&&r.setHeader("content-type","application/json"),R.method&&!r.explicitMethod&&(r.method=R.method)}}),TO(function(){if(!r._aborted){var R=function(){if(r._form&&(r._auth.hasAuth?r._auth.hasAuth&&r._auth.sentAuth&&r._form.pipe(r):r._form.pipe(r)),r._multipart&&r._multipart.chunked&&r._multipart.body.pipe(r),r.body)t6(r.body)?r.body.pipe(r):(A(),Array.isArray(r.body)?r.body.forEach(function(L){r.write(L)}):r.write(r.body),r.end());else if(r.requestBodyStream)console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe."),r.requestBodyStream.pipe(r);else if(!r.src){if(r._auth.hasAuth&&!r._auth.sentAuth){r.end();return}r.method!=="GET"&&typeof r.method<"u"&&r.setHeader("content-length",0),r.end()}};r._form&&!r.hasHeader("content-length")?(r.setHeader(r._form.getHeaders(),!0),r._form.getLength(function(L,$){!L&&!isNaN($)&&r.setHeader("content-length",$),R()})):R(),r.ntick=!0}})};Rr.prototype.getNewAgent=function(){var e=this,r=e.agentClass,a={};if(e.agentOptions)for(var i in e.agentOptions)a[i]=e.agentOptions[i];e.ca&&(a.ca=e.ca),e.ciphers&&(a.ciphers=e.ciphers),e.secureProtocol&&(a.secureProtocol=e.secureProtocol),e.secureOptions&&(a.secureOptions=e.secureOptions),typeof e.rejectUnauthorized<"u"&&(a.rejectUnauthorized=e.rejectUnauthorized),e.cert&&e.key&&(a.key=e.key,a.cert=e.cert),e.pfx&&(a.pfx=e.pfx),e.passphrase&&(a.passphrase=e.passphrase);var t="";r!==e.httpModule.Agent&&(t+=r.name);var n=e.proxy;typeof n=="string"&&(n=Fu.parse(n));var o=n&&n.protocol==="https:"||this.uri.protocol==="https:";return o&&(a.ca&&(t&&(t+=":"),t+=a.ca),typeof a.rejectUnauthorized<"u"&&(t&&(t+=":"),t+=a.rejectUnauthorized),a.cert&&(t&&(t+=":"),t+=a.cert.toString("ascii")+a.key.toString("ascii")),a.pfx&&(t&&(t+=":"),t+=a.pfx.toString("ascii")),a.ciphers&&(t&&(t+=":"),t+=a.ciphers),a.secureProtocol&&(t&&(t+=":"),t+=a.secureProtocol),a.secureOptions&&(t&&(t+=":"),t+=a.secureOptions)),e.pool===c6&&!t&&Object.keys(a).length===0&&e.httpModule.globalAgent?e.httpModule.globalAgent:(t=e.uri.protocol+t,e.pool[t]||(e.pool[t]=new r(a),e.pool.maxSockets&&(e.pool[t].maxSockets=e.pool.maxSockets)),e.pool[t])};Rr.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),a=bs();if(!e._aborted){e._started=!0,e.method=e.method||"GET",e.href=e.uri.href,e.src&&e.src.stat&&e.src.stat.size&&!e.hasHeader("content-length")&&e.setHeader("content-length",e.src.stat.size),e._aws&&e.aws(e._aws,!0);var i=s6(e);delete i.auth,rt("make request",e.uri.href),delete i.timeout;try{e.req=e.httpModule.request(i)}catch(n){e.emit("error",n);return}e.timing&&(e.startTime=r,e.startTimeNow=a,e.timings={});var t;e.timeout&&!e.timeoutTimer&&(e.timeout<0?t=0:typeof e.timeout=="number"&&isFinite(e.timeout)&&(t=e.timeout)),e.req.on("response",e.onRequestResponse.bind(e)),e.req.on("error",e.onRequestError.bind(e)),e.req.on("drain",function(){e.emit("drain")}),e.req.on("socket",function(n){var o=n._connecting||n.connecting;if(e.timing&&(e.timings.socket=bs()-e.startTimeNow,o)){var s=function(){e.timings.lookup=bs()-e.startTimeNow},c=function(){e.timings.connect=bs()-e.startTimeNow};n.once("lookup",s),n.once("connect",c),e.req.once("error",function(){n.removeListener("lookup",s),n.removeListener("connect",c)})}var p=function(){e.req.setTimeout(t,function(){if(e.req){e.abort();var m=new Error("ESOCKETTIMEDOUT");m.code="ESOCKETTIMEDOUT",m.connect=!1,e.emit("error",m)}})};if(t!==void 0)if(o){var f=function(){n.removeListener("connect",f),e.clearTimeout(),p()};n.on("connect",f),e.req.on("error",function(m){n.removeListener("connect",f)}),e.timeoutTimer=setTimeout(function(){n.removeListener("connect",f),e.abort();var m=new Error("ETIMEDOUT");m.code="ETIMEDOUT",m.connect=!0,e.emit("error",m)},t)}else p();e.emit("socket",n)}),e.emit("request",e.req)}};Rr.prototype.onRequestError=function(e){var r=this;if(!r._aborted){if(r.req&&r.req._reusedSocket&&e.code==="ECONNRESET"&&r.agent.addRequestNoreuse){r.agent={addRequest:r.agent.addRequestNoreuse.bind(r.agent)},r.start(),r.req.end();return}r.clearTimeout(),r.emit("error",e)}};Rr.prototype.onRequestResponse=function(e){var r=this;if(r.timing&&(r.timings.response=bs()-r.startTimeNow),rt("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=bs()-r.startTimeNow,e.timingStart=r.startTime,r.timings.socket||(r.timings.socket=0),r.timings.lookup||(r.timings.lookup=r.timings.socket),r.timings.connect||(r.timings.connect=r.timings.lookup),r.timings.response||(r.timings.response=r.timings.connect),rt("elapsed time",r.timings.end),r.elapsedTime+=Math.round(r.timings.end),e.elapsedTime=r.elapsedTime,e.timings=r.timings,e.timingPhases={wait:r.timings.socket,dns:r.timings.lookup-r.timings.socket,tcp:r.timings.connect-r.timings.lookup,firstByte:r.timings.response-r.timings.connect,download:r.timings.end-r.timings.response,total:r.timings.end}),rt("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){rt("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=IO,r.httpModule===n6&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){rt("strict ssl error",r.uri.href);var a=e.hasOwnProperty("socket")?e.socket.authorizationError:r.uri.href+" does not support SSL";r.emit("error",new Error("SSL Error: "+a));return}r.originalHost=r.getHeader("host"),r.originalHostHeaderName||(r.originalHostHeaderName=r.hasHeader("host")),r.setHost&&r.removeHeader("host"),r.clearTimeout();var i=r._jar&&r._jar.setCookie?r._jar:u6,t=function(f){try{i.setCookie(f,r.uri.href,{ignoreError:!0})}catch(m){r.emit("error",m)}};if(e.caseless=o6(e.headers),e.caseless.has("set-cookie")&&!r._disableCookies){var n=e.caseless.has("set-cookie");Array.isArray(e.headers[n])?e.headers[n].forEach(t):t(e.headers[n])}if(!r._redirect.onResponse(e)){{e.on("close",function(){r._ended||r.response.emit("end")}),e.once("end",function(){r._ended=!0});var o=function(f){return r.method==="HEAD"||f>=100&&f<200||f===204||f===304},s;if(r.gzip&&!o(e.statusCode)){var c=e.headers["content-encoding"]||"identity";c=c.trim().toLowerCase();var p={flush:Gl.Z_SYNC_FLUSH,finishFlush:Gl.Z_SYNC_FLUSH};c==="gzip"?(s=Gl.createGunzip(p),e.pipe(s)):c==="deflate"?(s=Gl.createInflate(p),e.pipe(s)):(c!=="identity"&&rt("ignoring unrecognized Content-Encoding "+c),s=e)}else s=e;r.encoding&&(r.dests.length!==0?console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid."):s.setEncoding(r.encoding)),r._paused&&s.pause(),r.responseContent=s,r.emit("response",e),r.dests.forEach(function(f){r.pipeDest(f)}),s.on("data",function(f){r.timing&&!r.responseStarted&&(r.responseStartTime=new Date().getTime(),e.responseStartTime=r.responseStartTime),r._destdata=!0,r.emit("data",f)}),s.once("end",function(f){r.emit("end",f)}),s.on("error",function(f){r.emit("error",f)}),s.on("close",function(){r.emit("close")}),r.callback?r.readResponseBody(e):r.on("end",function(){if(r._aborted){rt("aborted",r.uri.href);return}r.emit("complete",e)})}rt("finish init function",r.uri.href)}};Rr.prototype.readResponseBody=function(e){var r=this;rt("reading response's body");var a=[],i=0,t=[];r.on("data",function(n){Cu.isBuffer(n)?n.length&&(i+=n.length,a.push(n)):t.push(n)}),r.on("end",function(){if(rt("end event",r.uri.href),r._aborted){rt("aborted",r.uri.href),a=[],i=0;return}if(i?(rt("has body",r.uri.href,i),e.body=Cu.concat(a,i),r.encoding!==null&&(e.body=e.body.toString(r.encoding)),a=[],i=0):t.length&&(r.encoding==="utf8"&&t[0].length>0&&t[0][0]==="\uFEFF"&&(t[0]=t[0].substring(1)),e.body=t.join("")),r._json)try{e.body=JSON.parse(e.body,r._jsonReviver)}catch{rt("invalid JSON received",r.uri.href)}rt("emitting complete",r.uri.href),typeof e.body>"u"&&!r._json&&(e.body=r.encoding===null?Cu.alloc(0):""),r.emit("complete",e,e.body)})};Rr.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.clearTimeout(),e.emit("abort")};Rr.prototype.pipeDest=function(e){var r=this,a=r.response;if(e.headers&&!e.headersSent){if(a.caseless.has("content-type")){var i=a.caseless.has("content-type");e.setHeader?e.setHeader(i,a.headers[i]):e.headers[i]=a.headers[i]}if(a.caseless.has("content-length")){var t=a.caseless.has("content-length");e.setHeader?e.setHeader(t,a.headers[t]):e.headers[t]=a.headers[t]}}if(e.setHeader&&!e.headersSent){for(var n in a.headers)(!r.gzip||n!=="content-encoding")&&e.setHeader(n,a.headers[n]);e.statusCode=a.statusCode}r.pipefilter&&r.pipefilter(a,e)};Rr.prototype.qs=function(e,r){var a=this,i;!r&&a.uri.query?i=a._qs.parse(a.uri.query):i={};for(var t in e)i[t]=e[t];var n=a._qs.stringify(i);return n===""||(a.uri=Fu.parse(a.uri.href.split("?")[0]+"?"+n),a.url=a.uri,a.path=a.uri.path,a.uri.host==="unix"&&a.enableUnixSocket()),a};Rr.prototype.form=function(e){var r=this;return e?(/^application\/x-www-form-urlencoded\b/.test(r.getHeader("content-type"))||r.setHeader("content-type","application/x-www-form-urlencoded"),r.body=typeof e=="string"?r._qs.rfc3986(e.toString("utf8")):r._qs.stringify(e).toString("utf8"),r):(r._form=new mO,r._form.on("error",function(a){a.message="form-data: "+a.message,r.emit("error",a),r.abort()}),r._form)};Rr.prototype.multipart=function(e){var r=this;return r._multipart.onRequest(e),r._multipart.chunked||(r.body=r._multipart.body),r};Rr.prototype.json=function(e){var r=this;return r.hasHeader("accept")||r.setHeader("accept","application/json"),typeof r.jsonReplacer=="function"&&(r._jsonReplacer=r.jsonReplacer),r._json=!0,typeof e=="boolean"?r.body!==void 0&&(/^application\/x-www-form-urlencoded\b/.test(r.getHeader("content-type"))?r.body=r._qs.rfc3986(r.body):r.body=i6(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=i6(e,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")),typeof r.jsonReviver=="function"&&(r._jsonReviver=r.jsonReviver),r};Rr.prototype.getHeader=function(e,r){var a=this,i,t,n;return r||(r=a.headers),Object.keys(r).forEach(function(o){o.length===e.length&&(t=new RegExp(e,"i"),n=o.match(t),n&&(i=r[o]))}),i};Rr.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),r=e[0],a=e[1];this.socketPath=r,this.uri.pathname=a,this.uri.path=a,this.uri.host=r,this.uri.hostname=r,this.uri.isUnix=!0};Rr.prototype.auth=function(e,r,a,i){var t=this;return t._auth.onRequest(e,r,a,i),t};Rr.prototype.aws=function(e,r){var a=this;if(!r)return a._aws=e,a;if(e.sign_version===4||e.sign_version==="4"){var i={host:a.uri.host,path:a.uri.path,method:a.method,headers:a.headers,body:a.body};e.service&&(i.service=e.service);var t=pO.sign(i,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});a.setHeader("authorization",t.headers.Authorization),a.setHeader("x-amz-date",t.headers["X-Amz-Date"]),t.headers["X-Amz-Security-Token"]&&a.setHeader("x-amz-security-token",t.headers["X-Amz-Security-Token"])}else{var n=new Date;a.setHeader("date",n.toUTCString());var o={key:e.key,secret:e.secret,verb:a.method.toUpperCase(),date:n,contentType:a.getHeader("content-type")||"",md5:a.getHeader("content-md5")||"",amazonHeaders:Bm.canonicalizeHeaders(a.headers)},s=a.uri.path;e.bucket&&s?o.resource="/"+e.bucket+s:e.bucket&&!s?o.resource="/"+e.bucket:!e.bucket&&s?o.resource=s:!e.bucket&&!s&&(o.resource="/"),o.resource=Bm.canonicalizeResource(o.resource),a.setHeader("authorization",Bm.authorization(o))}return a};Rr.prototype.httpSignature=function(e){var r=this;return dO.signRequest({getHeader:function(a){return r.getHeader(a,r.headers)},setHeader:function(a,i){r.setHeader(a,i)},method:r.method,path:r.path},e),rt("httpSignature authorization",r.getHeader("authorization")),r};Rr.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",jO.header(r.uri,r.method,e))};Rr.prototype.oauth=function(e){var r=this;return r._oauth.onRequest(e),r};Rr.prototype.jar=function(e){var r=this,a;if(r._redirect.redirectsFollowed===0&&(r.originalCookieHeader=r.getHeader("cookie")),!e)a=!1,r._disableCookies=!0;else{var i=e.getCookieString?e:u6,t=r.uri.href;i&&(a=i.getCookieString(t))}return a&&a.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+a):r.setHeader("cookie",a)),r._jar=e,r};Rr.prototype.pipe=function(e,r){var a=this;if(a.response)if(a._destdata)a.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(a._ended)a.emit("error",new Error("You cannot pipe after the response has been ended."));else return Kl.Stream.prototype.pipe.call(a,e,r),a.pipeDest(e),e;else return a.dests.push(e),Kl.Stream.prototype.pipe.call(a,e,r),e};Rr.prototype.write=function(){var e=this;if(!e._aborted&&(e._started||e.start(),e.req))return e.req.write.apply(e.req,arguments)};Rr.prototype.end=function(e){var r=this;r._aborted||(e&&r.write(e),r._started||r.start(),r.req&&r.req.end())};Rr.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0};Rr.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1};Rr.prototype.destroy=function(){var e=this;this.clearTimeout(),e._ended?e.response&&e.response.destroy():e.end()};Rr.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)};Rr.defaultProxyHeaderWhiteList=Om.defaultProxyHeaderWhiteList.slice();Rr.defaultProxyHeaderExclusiveList=Om.defaultProxyHeaderExclusiveList.slice();Rr.prototype.toJSON=l6;f6.exports=Rr});var m6=B((zH,h6)=>{"use strict";var qu=bc(),d6=ud(),BO=_c(),RO=BO.paramsHaveRequestBody;function Yl(e,r,a){typeof r=="function"&&(a=r);var i={};return r!==null&&typeof r=="object"?qu(i,r,{uri:e}):typeof e=="string"?qu(i,{uri:e}):qu(i,e),i.callback=a||i.callback,i}function Ta(e,r,a){if(typeof e>"u")throw new Error("undefined is not a valid uri or options object.");var i=Yl(e,r,a);if(i.method==="HEAD"&&RO(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new Ta.Request(i)}function $n(e){var r=e.toUpperCase();return function(a,i,t){var n=Yl(a,i,t);return n.method=r,Ta(n,n.callback)}}Ta.get=$n("get");Ta.head=$n("head");Ta.options=$n("options");Ta.post=$n("post");Ta.put=$n("put");Ta.patch=$n("patch");Ta.del=$n("delete");Ta.delete=$n("delete");Ta.jar=function(e){return d6.jar(e)};Ta.cookie=function(e){return d6.parse(e)};function Dm(e,r,a,i){return function(t,n,o){var s=Yl(t,n,o),c={};return qu(!0,c,r,s),c.pool=s.pool||r.pool,i&&(c.method=i.toUpperCase()),typeof a=="function"&&(e=a),e(c,c.callback)}}Ta.defaults=function(e,r){var a=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=Dm(a,e,r),t=["get","head","post","put","patch","del","delete"];return t.forEach(function(n){i[n]=Dm(a[n],e,r,n)}),i.cookie=Dm(a.cookie,e,r),i.jar=a.jar,i.defaults=a.defaults,i};Ta.forever=function(e,r){var a={};return r&&qu(a,r),e&&(a.agentOptions=e),a.forever=!0,Ta.defaults(a)};h6.exports=Ta;Ta.Request=p6();Ta.initParams=Yl;Object.defineProperty(Ta,"debug",{enumerable:!0,get:function(){return Ta.Request.debug},set:function(e){Ta.Request.debug=e}})});var g6=B((LH,v6)=>{v6.exports=OO;function OO(e){if(!/^data\:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");var r=e.indexOf(",");if(r===-1||r<=4)throw new TypeError("malformed data: URI");for(var a=e.substring(5,r).split(";"),i=!1,t="US-ASCII",n=0;n<a.length;n++)a[n]=="base64"?i=!0:a[n].indexOf("charset=")==0&&(t=a[n].substring(8));var o=unescape(e.substring(r+1)),s=i?"base64":"ascii",c=new Buffer(o,s);return c.type=a[0]||"text/plain",c.charset=t,c}});var x6=B((MH,y6)=>{var DO=g6();function zO(e){return{mimeType:MO(LO(e)),data:DO(e)}}function LO(e){return e.substring(5,e.indexOf(";"))}var b6=/^(\w+\/)+/;function MO(e){e=e.toLowerCase();var r=e.match(b6);return!r||!(r=r[1])?e:e.replace(b6,r)}y6.exports=zO});var k6=B((UH,w6)=>{"use strict";var Iu=zs(),NH=require("path"),NO=Ly().PNG,UO=mp(),HO=Vy(),VO=Wy().GifReader,$O=Xy(),WO=require("fs"),GO=m6(),KO=yl(),YO=x6();function QO(e,r){var a=new NO;a.parse(e,function(i,t){if(i){r(i);return}r(null,Iu(new Uint8Array(t.data),[t.width|0,t.height|0,4],[4,4*t.width|0,1],0))})}function XO(e,r){var a;try{a=UO.decode(e)}catch(n){r(n);return}if(!a){r(new Error("Error decoding jpeg"));return}var i=[a.height,a.width,4],t=Iu(a.data,i);r(null,t.transpose(1,0))}function JO(e,r){var a;try{a=new VO(e)}catch(s){r(s);return}if(a.numFrames()>0){var i=[a.numFrames(),a.height,a.width,4];try{var t=new Uint8Array(i[0]*i[1]*i[2]*i[3])}catch(s){r(s);return}var n=Iu(t,i);try{for(var o=0;o<a.numFrames();++o)a.decodeAndBlitFrameRGBA(o,t.subarray(n.index(o,0,0,0),n.index(o+1,0,0,0)))}catch(s){r(s);return}r(null,n.transpose(0,2,1))}else{var i=[a.height,a.width,4],t=new Uint8Array(i[0]*i[1]*i[2]),n=Iu(t,i);try{a.decodeAndBlitFrameRGBA(0,t)}catch(f){r(f);return}r(null,n.transpose(1,0))}}function ZO(e,r){var a=new $O(e);try{a.init()}catch(s){r(s);return}var i=a.getData(),t=[i.getHeight(),i.getWidth(),4],n=new Uint8Array(t[0]*t[1]*t[2]),o=Iu(n,t);HO(i,o),r(null,o.transpose(1,0))}function Ql(e,r,a){switch(e){case"image/png":QO(r,a);break;case"image/jpg":case"image/jpeg":XO(r,a);break;case"image/gif":JO(r,a);break;case"image/bmp":ZO(r,a);break;default:a(new Error("Unsupported file type: "+e))}}w6.exports=function(r,a,i){if(i||(i=a,a=""),Buffer.isBuffer(r)){if(!a){i(new Error("Invalid file type"));return}Ql(a,r,i)}else if(r.indexOf("data:")===0)try{var t=YO(r);t?process.nextTick(function(){Ql(a||t.mimeType,t.data,i)}):process.nextTick(function(){i(new Error("Error parsing data URI"))})}catch(n){process.nextTick(function(){i(n)})}else r.indexOf("http://")===0||r.indexOf("https://")===0?GO({url:r,encoding:null},function(n,o,s){if(n){i(n);return}if(a=a,a||(o.getHeader!==void 0?a=o.getHeader("content-type"):o.headers!==void 0&&(a=o.headers["content-type"])),!a){i(new Error("Invalid content-type"));return}Ql(a,s,i)}):WO.readFile(r,function(n,o){if(n){i(n);return}if(a=a||KO.lookup(r),!a){i(new Error("Invalid file type"));return}Ql(a,o,i)})}});var R6=B((cf,B6)=>{(function(e,r){typeof cf=="object"&&typeof B6<"u"?r(cf):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis<"u"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(cf,function(e){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(u){return"Symbol("+u+")"};function a(){}function i(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}var t=i();function n(u){return typeof u=="object"&&u!==null||typeof u=="function"}var o=a,s=Promise,c=Promise.prototype.then,p=Promise.resolve.bind(s),f=Promise.reject.bind(s);function m(u){return new s(u)}function h(u){return p(u)}function v(u){return f(u)}function w(u,d,j){return c.call(u,d,j)}function E(u,d,j){w(w(u,d,j),void 0,o)}function _(u,d){E(u,d)}function A(u,d){E(u,void 0,d)}function C(u,d,j){return w(u,d,j)}function T(u){w(u,void 0,o)}var D=function(){var u=t&&t.queueMicrotask;if(typeof u=="function")return u;var d=h(void 0);return function(j){return w(d,j)}}();function I(u,d,j){if(typeof u!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(u,d,j)}function R(u,d,j){try{return h(I(u,d,j))}catch(O){return v(O)}}var L=16384,$=function(){function u(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(u.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),u.prototype.push=function(d){var j=this._back,O=j;j._elements.length===L-1&&(O={_elements:[],_next:void 0}),j._elements.push(d),O!==j&&(this._back=O,j._next=O),++this._size},u.prototype.shift=function(){var d=this._front,j=d,O=this._cursor,W=O+1,se=d._elements,ve=se[O];return W===L&&(j=d._next,W=0),--this._size,this._cursor=W,d!==j&&(this._front=j),se[O]=void 0,ve},u.prototype.forEach=function(d){for(var j=this._cursor,O=this._front,W=O._elements;(j!==W.length||O._next!==void 0)&&!(j===W.length&&(O=O._next,W=O._elements,j=0,W.length===0));)d(W[j]),++j},u.prototype.peek=function(){var d=this._front,j=this._cursor;return d._elements[j]},u}();function V(u,d){u._ownerReadableStream=d,d._reader=u,d._state==="readable"?H(u):d._state==="closed"?re(u):X(u,d._storedError)}function Q(u,d){var j=u._ownerReadableStream;return ii(j,d)}function G(u){u._ownerReadableStream._state==="readable"?_e(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):ye(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),u._ownerReadableStream._reader=void 0,u._ownerReadableStream=void 0}function ee(u){return new TypeError("Cannot "+u+" a stream using a released reader")}function H(u){u._closedPromise=m(function(d,j){u._closedPromise_resolve=d,u._closedPromise_reject=j})}function X(u,d){H(u),_e(u,d)}function re(u){H(u),le(u)}function _e(u,d){u._closedPromise_reject!==void 0&&(T(u._closedPromise),u._closedPromise_reject(d),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}function ye(u,d){X(u,d)}function le(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}var je=r("[[AbortSteps]]"),ge=r("[[ErrorSteps]]"),Le=r("[[CancelSteps]]"),Ue=r("[[PullSteps]]"),Oe=Number.isFinite||function(u){return typeof u=="number"&&isFinite(u)},U=Math.trunc||function(u){return u<0?Math.ceil(u):Math.floor(u)};function xe(u){return typeof u=="object"||typeof u=="function"}function Qe(u,d){if(u!==void 0&&!xe(u))throw new TypeError(d+" is not an object.")}function We(u,d){if(typeof u!="function")throw new TypeError(d+" is not a function.")}function $e(u){return typeof u=="object"&&u!==null||typeof u=="function"}function rr(u,d){if(!$e(u))throw new TypeError(d+" is not an object.")}function qe(u,d,j){if(u===void 0)throw new TypeError("Parameter "+d+" is required in '"+j+"'.")}function fe(u,d,j){if(u===void 0)throw new TypeError(d+" is required in '"+j+"'.")}function we(u){return Number(u)}function ir(u){return u===0?0:u}function Pe(u){return ir(U(u))}function ur(u,d){var j=0,O=Number.MAX_SAFE_INTEGER,W=Number(u);if(W=ir(W),!Oe(W))throw new TypeError(d+" is not a finite number");if(W=Pe(W),W<j||W>O)throw new TypeError(d+" is outside the accepted range of "+j+" to "+O+", inclusive");return!Oe(W)||W===0?0:W}function Or(u,d){if(!vn(u))throw new TypeError(d+" is not a ReadableStream.")}function Wr(u){return new Ye(u)}function J(u,d){u._reader._readRequests.push(d)}function Ie(u,d,j){var O=u._reader,W=O._readRequests.shift();j?W._closeSteps():W._chunkSteps(d)}function Ge(u){return u._reader._readRequests.length}function He(u){var d=u._reader;return!(d===void 0||!Ze(d))}var Ye=function(){function u(d){if(qe(d,1,"ReadableStreamDefaultReader"),Or(d,"First parameter"),gn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");V(this,d),this._readRequests=new $}return Object.defineProperty(u.prototype,"closed",{get:function(){return Ze(this)?this._closedPromise:v(mr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),Ze(this)?this._ownerReadableStream===void 0?v(ee("cancel")):Q(this,d):v(mr("cancel"))},u.prototype.read=function(){if(!Ze(this))return v(mr("read"));if(this._ownerReadableStream===void 0)return v(ee("read from"));var d,j,O=m(function(se,ve){d=se,j=ve}),W={_chunkSteps:function(se){return d({value:se,done:!1})},_closeSteps:function(){return d({value:void 0,done:!0})},_errorSteps:function(se){return j(se)}};return nr(this,W),O},u.prototype.releaseLock=function(){if(!Ze(this))throw mr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");G(this)}},u}();Object.defineProperties(Ye.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ye.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Ze(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readRequests")?!1:u instanceof Ye}function nr(u,d){var j=u._ownerReadableStream;j._disturbed=!0,j._state==="closed"?d._closeSteps():j._state==="errored"?d._errorSteps(j._storedError):j._readableStreamController[Ue](d)}function mr(u){return new TypeError("ReadableStreamDefaultReader.prototype."+u+" can only be used on a ReadableStreamDefaultReader")}var Br,vr;typeof r.asyncIterator=="symbol"&&(vr=(Br={},Br[r.asyncIterator]=function(){return this},Br),Object.defineProperty(vr,r.asyncIterator,{enumerable:!1}));var me=function(){function u(d,j){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=d,this._preventCancel=j}return u.prototype.next=function(){var d=this,j=function(){return d._nextSteps()};return this._ongoingPromise=this._ongoingPromise?C(this._ongoingPromise,j,j):j(),this._ongoingPromise},u.prototype.return=function(d){var j=this,O=function(){return j._returnSteps(d)};return this._ongoingPromise?C(this._ongoingPromise,O,O):O()},u.prototype._nextSteps=function(){var d=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var j=this._reader;if(j._ownerReadableStream===void 0)return v(ee("iterate"));var O,W,se=m(function(Je,Er){O=Je,W=Er}),ve={_chunkSteps:function(Je){d._ongoingPromise=void 0,D(function(){return O({value:Je,done:!1})})},_closeSteps:function(){d._ongoingPromise=void 0,d._isFinished=!0,G(j),O({value:void 0,done:!0})},_errorSteps:function(Je){d._ongoingPromise=void 0,d._isFinished=!0,G(j),W(Je)}};return nr(j,ve),se},u.prototype._returnSteps=function(d){if(this._isFinished)return Promise.resolve({value:d,done:!0});this._isFinished=!0;var j=this._reader;if(j._ownerReadableStream===void 0)return v(ee("finish iterating"));if(!this._preventCancel){var O=Q(j,d);return G(j),C(O,function(){return{value:d,done:!0}})}return G(j),h({value:d,done:!0})},u}(),Ke={next:function(){return Pr(this)?this._asyncIteratorImpl.next():v(cr("next"))},return:function(u){return Pr(this)?this._asyncIteratorImpl.return(u):v(cr("return"))}};vr!==void 0&&Object.setPrototypeOf(Ke,vr);function fr(u,d){var j=Wr(u),O=new me(j,d),W=Object.create(Ke);return W._asyncIteratorImpl=O,W}function Pr(u){if(!n(u)||!Object.prototype.hasOwnProperty.call(u,"_asyncIteratorImpl"))return!1;try{return u._asyncIteratorImpl instanceof me}catch{return!1}}function cr(u){return new TypeError("ReadableStreamAsyncIterator."+u+" can only be used on a ReadableSteamAsyncIterator")}var gr=Number.isNaN||function(u){return u!==u};function wr(u){return u.slice()}function or(u,d,j,O,W){new Uint8Array(u).set(new Uint8Array(j,O,W),d)}function dr(u){return u}function Vr(u){return!1}function Fr(u,d,j){if(u.slice)return u.slice(d,j);var O=j-d,W=new ArrayBuffer(O);return or(W,0,u,d,O),W}function ka(u){return!(typeof u!="number"||gr(u)||u<0)}function Fa(u){var d=Fr(u.buffer,u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(d)}function at(u){var d=u._queue.shift();return u._queueTotalSize-=d.size,u._queueTotalSize<0&&(u._queueTotalSize=0),d.value}function lt(u,d,j){if(!ka(j)||j===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");u._queue.push({value:d,size:j}),u._queueTotalSize+=j}function Zr(u){var d=u._queue.peek();return d.value}function oa(u){u._queue=new $,u._queueTotalSize=0}var pa=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"view",{get:function(){if(!tt(this))throw ze("view");return this._view},enumerable:!1,configurable:!0}),u.prototype.respond=function(d){if(!tt(this))throw ze("respond");if(qe(d,1,"respond"),d=ur(d,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Vr(this._view.buffer),Xe(this._associatedReadableByteStreamController,d)},u.prototype.respondWithNewView=function(d){if(!tt(this))throw ze("respondWithNewView");if(qe(d,1,"respondWithNewView"),!ArrayBuffer.isView(d))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Vr(d.buffer),Te(this._associatedReadableByteStreamController,d)},u}();Object.defineProperties(pa.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(pa.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Ca=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"byobRequest",{get:function(){if(!da(this))throw he("byobRequest");return Ce(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!da(this))throw he("desiredSize");return ar(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!da(this))throw he("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var d=this._controlledReadableByteStream._state;if(d!=="readable")throw new TypeError("The stream (in "+d+" state) is not in the readable state and cannot be closed");Be(this)},u.prototype.enqueue=function(d){if(!da(this))throw he("enqueue");if(qe(d,1,"enqueue"),!ArrayBuffer.isView(d))throw new TypeError("chunk must be an array buffer view");if(d.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(d.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var j=this._controlledReadableByteStream._state;if(j!=="readable")throw new TypeError("The stream (in "+j+" state) is not in the readable state and cannot be enqueued to");Se(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!da(this))throw he("error");Fe(this,d)},u.prototype[Le]=function(d){ea(this),oa(this);var j=this._cancelAlgorithm(d);return Ne(this),j},u.prototype[Ue]=function(d){var j=this._controlledReadableByteStream;if(this._queueTotalSize>0){var O=this._queue.shift();this._queueTotalSize-=O.byteLength,x(this);var W=new Uint8Array(O.buffer,O.byteOffset,O.byteLength);d._chunkSteps(W);return}var se=this._autoAllocateChunkSize;if(se!==void 0){var ve=void 0;try{ve=new ArrayBuffer(se)}catch(Er){d._errorSteps(Er);return}var Je={buffer:ve,bufferByteLength:se,byteOffset:0,byteLength:se,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Je)}J(j,d),Da(this)},u}();Object.defineProperties(Ca.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ca.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function da(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableByteStream")?!1:u instanceof Ca}function tt(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_associatedReadableByteStreamController")?!1:u instanceof pa}function Da(u){var d=be(u);if(d){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var j=u._pullAlgorithm();E(j,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,Da(u))},function(O){Fe(u,O)})}}function ea(u){F(u),u._pendingPullIntos=new $}function Ot(u,d){var j=!1;u._state==="closed"&&(j=!0);var O=y(d);d.readerType==="default"?Ie(u,O,j):ce(u,O,j)}function y(u){var d=u.bytesFilled,j=u.elementSize;return new u.viewConstructor(u.buffer,u.byteOffset,d/j)}function b(u,d,j,O){u._queue.push({buffer:d,byteOffset:j,byteLength:O}),u._queueTotalSize+=O}function g(u,d){var j=d.elementSize,O=d.bytesFilled-d.bytesFilled%j,W=Math.min(u._queueTotalSize,d.byteLength-d.bytesFilled),se=d.bytesFilled+W,ve=se-se%j,Je=W,Er=!1;ve>O&&(Je=ve-d.bytesFilled,Er=!0);for(var qr=u._queue;Je>0;){var Dr=qr.peek(),$r=Math.min(Je,Dr.byteLength),qa=d.byteOffset+d.bytesFilled;or(d.buffer,qa,Dr.buffer,Dr.byteOffset,$r),Dr.byteLength===$r?qr.shift():(Dr.byteOffset+=$r,Dr.byteLength-=$r),u._queueTotalSize-=$r,l(u,$r,d),Je-=$r}return Er}function l(u,d,j){j.bytesFilled+=d}function x(u){u._queueTotalSize===0&&u._closeRequested?(Ne(u),js(u._controlledReadableByteStream)):Da(u)}function F(u){u._byobRequest!==null&&(u._byobRequest._associatedReadableByteStreamController=void 0,u._byobRequest._view=null,u._byobRequest=null)}function M(u){for(;u._pendingPullIntos.length>0;){if(u._queueTotalSize===0)return;var d=u._pendingPullIntos.peek();g(u,d)&&(Me(u),Ot(u._controlledReadableByteStream,d))}}function K(u,d,j){var O=u._controlledReadableByteStream,W=1;d.constructor!==DataView&&(W=d.constructor.BYTES_PER_ELEMENT);var se=d.constructor,ve=d.buffer,Je={buffer:ve,bufferByteLength:ve.byteLength,byteOffset:d.byteOffset,byteLength:d.byteLength,bytesFilled:0,elementSize:W,viewConstructor:se,readerType:"byob"};if(u._pendingPullIntos.length>0){u._pendingPullIntos.push(Je),Z(O,j);return}if(O._state==="closed"){var Er=new se(Je.buffer,Je.byteOffset,0);j._closeSteps(Er);return}if(u._queueTotalSize>0){if(g(u,Je)){var qr=y(Je);x(u),j._chunkSteps(qr);return}if(u._closeRequested){var Dr=new TypeError("Insufficient bytes to fill elements in the given buffer");Fe(u,Dr),j._errorSteps(Dr);return}}u._pendingPullIntos.push(Je),Z(O,j),Da(u)}function te(u,d){var j=u._controlledReadableByteStream;if(ae(j))for(;oe(j)>0;){var O=Me(u);Ot(j,O)}}function pe(u,d,j){if(l(u,d,j),!(j.bytesFilled<j.elementSize)){Me(u);var O=j.bytesFilled%j.elementSize;if(O>0){var W=j.byteOffset+j.bytesFilled,se=Fr(j.buffer,W-O,W);b(u,se,0,se.byteLength)}j.bytesFilled-=O,Ot(u._controlledReadableByteStream,j),M(u)}}function de(u,d){var j=u._pendingPullIntos.peek();F(u);var O=u._controlledReadableByteStream._state;O==="closed"?te(u):pe(u,d,j),Da(u)}function Me(u){var d=u._pendingPullIntos.shift();return d}function be(u){var d=u._controlledReadableByteStream;if(d._state!=="readable"||u._closeRequested||!u._started)return!1;if(He(d)&&Ge(d)>0||ae(d)&&oe(d)>0)return!0;var j=ar(u);return j>0}function Ne(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0}function Be(u){var d=u._controlledReadableByteStream;if(!(u._closeRequested||d._state!=="readable")){if(u._queueTotalSize>0){u._closeRequested=!0;return}if(u._pendingPullIntos.length>0){var j=u._pendingPullIntos.peek();if(j.bytesFilled>0){var O=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Fe(u,O),O}}Ne(u),js(d)}}function Se(u,d){var j=u._controlledReadableByteStream;if(!(u._closeRequested||j._state!=="readable")){var O=d.buffer,W=d.byteOffset,se=d.byteLength,ve=O;if(u._pendingPullIntos.length>0){var Je=u._pendingPullIntos.peek();Vr(Je.buffer),Je.buffer=Je.buffer}if(F(u),He(j))if(Ge(j)===0)b(u,ve,W,se);else{u._pendingPullIntos.length>0&&Me(u);var Er=new Uint8Array(ve,W,se);Ie(j,Er,!1)}else ae(j)?(b(u,ve,W,se),M(u)):b(u,ve,W,se);Da(u)}}function Fe(u,d){var j=u._controlledReadableByteStream;j._state==="readable"&&(ea(u),oa(u),Ne(u),Sv(j,d))}function Ce(u){if(u._byobRequest===null&&u._pendingPullIntos.length>0){var d=u._pendingPullIntos.peek(),j=new Uint8Array(d.buffer,d.byteOffset+d.bytesFilled,d.byteLength-d.bytesFilled),O=Object.create(pa.prototype);De(O,u,j),u._byobRequest=O}return u._byobRequest}function ar(u){var d=u._controlledReadableByteStream._state;return d==="errored"?null:d==="closed"?0:u._strategyHWM-u._queueTotalSize}function Xe(u,d){var j=u._pendingPullIntos.peek(),O=u._controlledReadableByteStream._state;if(O==="closed"){if(d!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(d===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(j.bytesFilled+d>j.byteLength)throw new RangeError("bytesWritten out of range")}j.buffer=j.buffer,de(u,d)}function Te(u,d){var j=u._pendingPullIntos.peek(),O=u._controlledReadableByteStream._state;if(O==="closed"){if(d.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(d.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(j.byteOffset+j.bytesFilled!==d.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(j.bufferByteLength!==d.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(j.bytesFilled+d.byteLength>j.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var W=d.byteLength;j.buffer=d.buffer,de(u,W)}function Ee(u,d,j,O,W,se,ve){d._controlledReadableByteStream=u,d._pullAgain=!1,d._pulling=!1,d._byobRequest=null,d._queue=d._queueTotalSize=void 0,oa(d),d._closeRequested=!1,d._started=!1,d._strategyHWM=se,d._pullAlgorithm=O,d._cancelAlgorithm=W,d._autoAllocateChunkSize=ve,d._pendingPullIntos=new $,u._readableStreamController=d;var Je=j();E(h(Je),function(){d._started=!0,Da(d)},function(Er){Fe(d,Er)})}function Ae(u,d,j){var O=Object.create(Ca.prototype),W=function(){},se=function(){return h(void 0)},ve=function(){return h(void 0)};d.start!==void 0&&(W=function(){return d.start(O)}),d.pull!==void 0&&(se=function(){return d.pull(O)}),d.cancel!==void 0&&(ve=function(Er){return d.cancel(Er)});var Je=d.autoAllocateChunkSize;if(Je===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ee(u,O,W,se,ve,j,Je)}function De(u,d,j){u._associatedReadableByteStreamController=d,u._view=j}function ze(u){return new TypeError("ReadableStreamBYOBRequest.prototype."+u+" can only be used on a ReadableStreamBYOBRequest")}function he(u){return new TypeError("ReadableByteStreamController.prototype."+u+" can only be used on a ReadableByteStreamController")}function Y(u){return new ne(u)}function Z(u,d){u._reader._readIntoRequests.push(d)}function ce(u,d,j){var O=u._reader,W=O._readIntoRequests.shift();j?W._closeSteps(d):W._chunkSteps(d)}function oe(u){return u._reader._readIntoRequests.length}function ae(u){var d=u._reader;return!(d===void 0||!Ve(d))}var ne=function(){function u(d){if(qe(d,1,"ReadableStreamBYOBReader"),Or(d,"First parameter"),gn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!da(d._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");V(this,d),this._readIntoRequests=new $}return Object.defineProperty(u.prototype,"closed",{get:function(){return Ve(this)?this._closedPromise:v(tr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),Ve(this)?this._ownerReadableStream===void 0?v(ee("cancel")):Q(this,d):v(tr("cancel"))},u.prototype.read=function(d){if(!Ve(this))return v(tr("read"));if(!ArrayBuffer.isView(d))return v(new TypeError("view must be an array buffer view"));if(d.byteLength===0)return v(new TypeError("view must have non-zero byteLength"));if(d.buffer.byteLength===0)return v(new TypeError("view's buffer must have non-zero byteLength"));if(Vr(d.buffer),this._ownerReadableStream===void 0)return v(ee("read from"));var j,O,W=m(function(ve,Je){j=ve,O=Je}),se={_chunkSteps:function(ve){return j({value:ve,done:!1})},_closeSteps:function(ve){return j({value:ve,done:!0})},_errorSteps:function(ve){return O(ve)}};return lr(this,d,se),W},u.prototype.releaseLock=function(){if(!Ve(this))throw tr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");G(this)}},u}();Object.defineProperties(ne.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ne.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Ve(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readIntoRequests")?!1:u instanceof ne}function lr(u,d,j){var O=u._ownerReadableStream;O._disturbed=!0,O._state==="errored"?j._errorSteps(O._storedError):K(O._readableStreamController,d,j)}function tr(u){return new TypeError("ReadableStreamBYOBReader.prototype."+u+" can only be used on a ReadableStreamBYOBReader")}function sr(u,d){var j=u.highWaterMark;if(j===void 0)return d;if(gr(j)||j<0)throw new RangeError("Invalid highWaterMark");return j}function z(u){var d=u.size;return d||function(){return 1}}function yr(u,d){Qe(u,d);var j=u==null?void 0:u.highWaterMark,O=u==null?void 0:u.size;return{highWaterMark:j===void 0?void 0:we(j),size:O===void 0?void 0:Ar(O,d+" has member 'size' that")}}function Ar(u,d){return We(u,d),function(j){return we(u(j))}}function kr(u,d){Qe(u,d);var j=u==null?void 0:u.abort,O=u==null?void 0:u.close,W=u==null?void 0:u.start,se=u==null?void 0:u.type,ve=u==null?void 0:u.write;return{abort:j===void 0?void 0:pr(j,u,d+" has member 'abort' that"),close:O===void 0?void 0:Sr(O,u,d+" has member 'close' that"),start:W===void 0?void 0:_r(W,u,d+" has member 'start' that"),write:ve===void 0?void 0:ra(ve,u,d+" has member 'write' that"),type:se}}function pr(u,d,j){return We(u,j),function(O){return R(u,d,[O])}}function Sr(u,d,j){return We(u,j),function(){return R(u,d,[])}}function _r(u,d,j){return We(u,j),function(O){return I(u,d,[O])}}function ra(u,d,j){return We(u,j),function(O,W){return R(u,d,[O,W])}}function Tr(u,d){if(!Re(u))throw new TypeError(d+" is not a WritableStream.")}function k(u){if(typeof u!="object"||u===null)return!1;try{return typeof u.aborted=="boolean"}catch{return!1}}var S=typeof AbortController=="function";function P(){if(S)return new AbortController}var N=function(){function u(d,j){d===void 0&&(d={}),j===void 0&&(j={}),d===void 0?d=null:rr(d,"First parameter");var O=yr(j,"Second parameter"),W=kr(d,"First parameter");ke(this);var se=W.type;if(se!==void 0)throw new RangeError("Invalid type is specified");var ve=z(O),Je=sr(O,1);l5(this,W,Je,ve)}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Re(this))throw Hu("locked");return Cr(this)},enumerable:!1,configurable:!0}),u.prototype.abort=function(d){return d===void 0&&(d=void 0),Re(this)?Cr(this)?v(new TypeError("Cannot abort a stream that already has a writer")):sa(this,d):v(Hu("abort"))},u.prototype.close=function(){return Re(this)?Cr(this)?v(new TypeError("Cannot close a stream that already has a writer")):ti(this)?v(new TypeError("Cannot close an already-closing stream")):it(this):v(Hu("close"))},u.prototype.getWriter=function(){if(!Re(this))throw Hu("getWriter");return ie(this)},u}();Object.defineProperties(N.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(N.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function ie(u){return new _o(u)}function ue(u,d,j,O,W,se){W===void 0&&(W=1),se===void 0&&(se=function(){return 1});var ve=Object.create(N.prototype);ke(ve);var Je=Object.create(Kn.prototype);return pv(ve,Je,u,d,j,O,W,se),ve}function ke(u){u._state="writable",u._storedError=void 0,u._writer=void 0,u._writableStreamController=void 0,u._writeRequests=new $,u._inFlightWriteRequest=void 0,u._closeRequest=void 0,u._inFlightCloseRequest=void 0,u._pendingAbortRequest=void 0,u._backpressure=!1}function Re(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_writableStreamController")?!1:u instanceof N}function Cr(u){return u._writer!==void 0}function sa(u,d){var j;if(u._state==="closed"||u._state==="errored")return h(void 0);u._writableStreamController._abortReason=d,(j=u._writableStreamController._abortController)===null||j===void 0||j.abort();var O=u._state;if(O==="closed"||O==="errored")return h(void 0);if(u._pendingAbortRequest!==void 0)return u._pendingAbortRequest._promise;var W=!1;O==="erroring"&&(W=!0,d=void 0);var se=m(function(ve,Je){u._pendingAbortRequest={_promise:void 0,_resolve:ve,_reject:Je,_reason:d,_wasAlreadyErroring:W}});return u._pendingAbortRequest._promise=se,W||Gi(u,d),se}function it(u){var d=u._state;if(d==="closed"||d==="errored")return v(new TypeError("The stream (in "+d+" state) is not in the writable state and cannot be closed"));var j=m(function(W,se){var ve={_resolve:W,_reject:se};u._closeRequest=ve}),O=u._writer;return O!==void 0&&u._backpressure&&d==="writable"&&jf(O),f5(u._writableStreamController),j}function nt(u){var d=m(function(j,O){var W={_resolve:j,_reject:O};u._writeRequests.push(W)});return d}function xt(u,d){var j=u._state;if(j==="writable"){Gi(u,d);return}ft(u)}function Gi(u,d){var j=u._writableStreamController;u._state="erroring",u._storedError=d;var O=u._writer;O!==void 0&&uv(O,d),!t5(u)&&j._started&&ft(u)}function ft(u){u._state="errored",u._writableStreamController[ge]();var d=u._storedError;if(u._writeRequests.forEach(function(W){W._reject(d)}),u._writeRequests=new $,u._pendingAbortRequest===void 0){Mu(u);return}var j=u._pendingAbortRequest;if(u._pendingAbortRequest=void 0,j._wasAlreadyErroring){j._reject(d),Mu(u);return}var O=u._writableStreamController[je](j._reason);E(O,function(){j._resolve(),Mu(u)},function(W){j._reject(W),Mu(u)})}function At(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0}function Wn(u,d){u._inFlightWriteRequest._reject(d),u._inFlightWriteRequest=void 0,xt(u,d)}function ai(u){u._inFlightCloseRequest._resolve(void 0),u._inFlightCloseRequest=void 0;var d=u._state;d==="erroring"&&(u._storedError=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._resolve(),u._pendingAbortRequest=void 0)),u._state="closed";var j=u._writer;j!==void 0&&vv(j)}function ko(u,d){u._inFlightCloseRequest._reject(d),u._inFlightCloseRequest=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._reject(d),u._pendingAbortRequest=void 0),xt(u,d)}function ti(u){return!(u._closeRequest===void 0&&u._inFlightCloseRequest===void 0)}function t5(u){return!(u._inFlightWriteRequest===void 0&&u._inFlightCloseRequest===void 0)}function i5(u){u._inFlightCloseRequest=u._closeRequest,u._closeRequest=void 0}function n5(u){u._inFlightWriteRequest=u._writeRequests.shift()}function Mu(u){u._closeRequest!==void 0&&(u._closeRequest._reject(u._storedError),u._closeRequest=void 0);var d=u._writer;d!==void 0&&kf(d,u._storedError)}function gf(u,d){var j=u._writer;j!==void 0&&d!==u._backpressure&&(d?b5(j):jf(j)),u._backpressure=d}var _o=function(){function u(d){if(qe(d,1,"WritableStreamDefaultWriter"),Tr(d,"First parameter"),Cr(d))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=d,d._writer=this;var j=d._state;if(j==="writable")!ti(d)&&d._backpressure?$u(this):gv(this),Vu(this);else if(j==="erroring")_f(this,d._storedError),Vu(this);else if(j==="closed")gv(this),v5(this);else{var O=d._storedError;_f(this,O),mv(this,O)}}return Object.defineProperty(u.prototype,"closed",{get:function(){return Gn(this)?this._closedPromise:v(Yn("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Gn(this))throw Yn("desiredSize");if(this._ownerWritableStream===void 0)throw ws("desiredSize");return c5(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ready",{get:function(){return Gn(this)?this._readyPromise:v(Yn("ready"))},enumerable:!1,configurable:!0}),u.prototype.abort=function(d){return d===void 0&&(d=void 0),Gn(this)?this._ownerWritableStream===void 0?v(ws("abort")):o5(this,d):v(Yn("abort"))},u.prototype.close=function(){if(!Gn(this))return v(Yn("close"));var d=this._ownerWritableStream;return d===void 0?v(ws("close")):ti(d)?v(new TypeError("Cannot close an already-closing stream")):sv(this)},u.prototype.releaseLock=function(){if(!Gn(this))throw Yn("releaseLock");var d=this._ownerWritableStream;d!==void 0&&cv(this)},u.prototype.write=function(d){return d===void 0&&(d=void 0),Gn(this)?this._ownerWritableStream===void 0?v(ws("write to")):lv(this,d):v(Yn("write"))},u}();Object.defineProperties(_o.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(_o.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Gn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_ownerWritableStream")?!1:u instanceof _o}function o5(u,d){var j=u._ownerWritableStream;return sa(j,d)}function sv(u){var d=u._ownerWritableStream;return it(d)}function s5(u){var d=u._ownerWritableStream,j=d._state;return ti(d)||j==="closed"?h(void 0):j==="errored"?v(d._storedError):sv(u)}function u5(u,d){u._closedPromiseState==="pending"?kf(u,d):g5(u,d)}function uv(u,d){u._readyPromiseState==="pending"?bv(u,d):y5(u,d)}function c5(u){var d=u._ownerWritableStream,j=d._state;return j==="errored"||j==="erroring"?null:j==="closed"?0:dv(d._writableStreamController)}function cv(u){var d=u._ownerWritableStream,j=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");uv(u,j),u5(u,j),d._writer=void 0,u._ownerWritableStream=void 0}function lv(u,d){var j=u._ownerWritableStream,O=j._writableStreamController,W=p5(O,d);if(j!==u._ownerWritableStream)return v(ws("write to"));var se=j._state;if(se==="errored")return v(j._storedError);if(ti(j)||se==="closed")return v(new TypeError("The stream is closing or closed and cannot be written to"));if(se==="erroring")return v(j._storedError);var ve=nt(j);return d5(O,d,W),ve}var fv={},Kn=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"abortReason",{get:function(){if(!bf(this))throw wf("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"signal",{get:function(){if(!bf(this))throw wf("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),u.prototype.error=function(d){if(d===void 0&&(d=void 0),!bf(this))throw wf("error");var j=this._controlledWritableStream._state;j==="writable"&&hv(this,d)},u.prototype[je]=function(d){var j=this._abortAlgorithm(d);return Nu(this),j},u.prototype[ge]=function(){oa(this)},u}();Object.defineProperties(Kn.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Kn.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function bf(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledWritableStream")?!1:u instanceof Kn}function pv(u,d,j,O,W,se,ve,Je){d._controlledWritableStream=u,u._writableStreamController=d,d._queue=void 0,d._queueTotalSize=void 0,oa(d),d._abortReason=void 0,d._abortController=P(),d._started=!1,d._strategySizeAlgorithm=Je,d._strategyHWM=ve,d._writeAlgorithm=O,d._closeAlgorithm=W,d._abortAlgorithm=se;var Er=xf(d);gf(u,Er);var qr=j(),Dr=h(qr);E(Dr,function(){d._started=!0,Uu(d)},function($r){d._started=!0,xt(u,$r)})}function l5(u,d,j,O){var W=Object.create(Kn.prototype),se=function(){},ve=function(){return h(void 0)},Je=function(){return h(void 0)},Er=function(){return h(void 0)};d.start!==void 0&&(se=function(){return d.start(W)}),d.write!==void 0&&(ve=function(qr){return d.write(qr,W)}),d.close!==void 0&&(Je=function(){return d.close()}),d.abort!==void 0&&(Er=function(qr){return d.abort(qr)}),pv(u,W,se,ve,Je,Er,j,O)}function Nu(u){u._writeAlgorithm=void 0,u._closeAlgorithm=void 0,u._abortAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function f5(u){lt(u,fv,0),Uu(u)}function p5(u,d){try{return u._strategySizeAlgorithm(d)}catch(j){return yf(u,j),1}}function dv(u){return u._strategyHWM-u._queueTotalSize}function d5(u,d,j){try{lt(u,d,j)}catch(se){yf(u,se);return}var O=u._controlledWritableStream;if(!ti(O)&&O._state==="writable"){var W=xf(u);gf(O,W)}Uu(u)}function Uu(u){var d=u._controlledWritableStream;if(u._started&&d._inFlightWriteRequest===void 0){var j=d._state;if(j==="erroring"){ft(d);return}if(u._queue.length!==0){var O=Zr(u);O===fv?h5(u):m5(u,O)}}}function yf(u,d){u._controlledWritableStream._state==="writable"&&hv(u,d)}function h5(u){var d=u._controlledWritableStream;i5(d),at(u);var j=u._closeAlgorithm();Nu(u),E(j,function(){ai(d)},function(O){ko(d,O)})}function m5(u,d){var j=u._controlledWritableStream;n5(j);var O=u._writeAlgorithm(d);E(O,function(){At(j);var W=j._state;if(at(u),!ti(j)&&W==="writable"){var se=xf(u);gf(j,se)}Uu(u)},function(W){j._state==="writable"&&Nu(u),Wn(j,W)})}function xf(u){var d=dv(u);return d<=0}function hv(u,d){var j=u._controlledWritableStream;Nu(u),Gi(j,d)}function Hu(u){return new TypeError("WritableStream.prototype."+u+" can only be used on a WritableStream")}function wf(u){return new TypeError("WritableStreamDefaultController.prototype."+u+" can only be used on a WritableStreamDefaultController")}function Yn(u){return new TypeError("WritableStreamDefaultWriter.prototype."+u+" can only be used on a WritableStreamDefaultWriter")}function ws(u){return new TypeError("Cannot "+u+" a stream using a released writer")}function Vu(u){u._closedPromise=m(function(d,j){u._closedPromise_resolve=d,u._closedPromise_reject=j,u._closedPromiseState="pending"})}function mv(u,d){Vu(u),kf(u,d)}function v5(u){Vu(u),vv(u)}function kf(u,d){u._closedPromise_reject!==void 0&&(T(u._closedPromise),u._closedPromise_reject(d),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="rejected")}function g5(u,d){mv(u,d)}function vv(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="resolved")}function $u(u){u._readyPromise=m(function(d,j){u._readyPromise_resolve=d,u._readyPromise_reject=j}),u._readyPromiseState="pending"}function _f(u,d){$u(u),bv(u,d)}function gv(u){$u(u),jf(u)}function bv(u,d){u._readyPromise_reject!==void 0&&(T(u._readyPromise),u._readyPromise_reject(d),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="rejected")}function b5(u){$u(u)}function y5(u,d){_f(u,d)}function jf(u){u._readyPromise_resolve!==void 0&&(u._readyPromise_resolve(void 0),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="fulfilled")}var yv=typeof DOMException<"u"?DOMException:void 0;function x5(u){if(!(typeof u=="function"||typeof u=="object"))return!1;try{return new u,!0}catch{return!1}}function w5(){var u=function(j,O){this.message=j||"",this.name=O||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return u.prototype=Object.create(Error.prototype),Object.defineProperty(u.prototype,"constructor",{value:u,writable:!0,configurable:!0}),u}var k5=x5(yv)?yv:w5();function xv(u,d,j,O,W,se){var ve=Wr(u),Je=ie(d);u._disturbed=!0;var Er=!1,qr=h(void 0);return m(function(Dr,$r){var qa;if(se!==void 0){if(qa=function(){var xr=new k5("Aborted","AbortError"),Gr=[];O||Gr.push(function(){return d._state==="writable"?sa(d,xr):h(void 0)}),W||Gr.push(function(){return u._state==="readable"?ii(u,xr):h(void 0)}),Dt(function(){return Promise.all(Gr.map(function(ma){return ma()}))},!0,xr)},se.aborted){qa();return}se.addEventListener("abort",qa)}function ni(){return m(function(xr,Gr){function ma(Ei){Ei?xr():w(Eo(),ma,Gr)}ma(!1)})}function Eo(){return Er?h(!0):w(Je._readyPromise,function(){return m(function(xr,Gr){nr(ve,{_chunkSteps:function(ma){qr=w(lv(Je,ma),void 0,a),xr(!1)},_closeSteps:function(){return xr(!0)},_errorSteps:Gr})})})}if(ot(u,ve._closedPromise,function(xr){O?Yi(!0,xr):Dt(function(){return sa(d,xr)},!0,xr)}),ot(d,Je._closedPromise,function(xr){W?Yi(!0,xr):Dt(function(){return ii(u,xr)},!0,xr)}),Si(u,ve._closedPromise,function(){j?Yi():Dt(function(){return s5(Je)})}),ti(d)||d._state==="closed"){var bn=new TypeError("the destination writable stream closed before all data could be piped to it");W?Yi(!0,bn):Dt(function(){return ii(u,bn)},!0,bn)}T(ni());function ji(){var xr=qr;return w(qr,function(){return xr!==qr?ji():void 0})}function ot(xr,Gr,ma){xr._state==="errored"?ma(xr._storedError):A(Gr,ma)}function Si(xr,Gr,ma){xr._state==="closed"?ma():_(Gr,ma)}function Dt(xr,Gr,ma){if(Er)return;Er=!0,d._state==="writable"&&!ti(d)?_(ji(),Ei):Ei();function Ei(){E(xr(),function(){return ha(Gr,ma)},function(yn){return ha(!0,yn)})}}function Yi(xr,Gr){Er||(Er=!0,d._state==="writable"&&!ti(d)?_(ji(),function(){return ha(xr,Gr)}):ha(xr,Gr))}function ha(xr,Gr){cv(Je),G(ve),se!==void 0&&se.removeEventListener("abort",qa),xr?$r(Gr):Dr(void 0)}})}var Qn=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Wu(this))throw Yu("desiredSize");return Sf(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!Wu(this))throw Yu("close");if(!jo(this))throw new TypeError("The stream is not in a state that permits close");_s(this)},u.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Wu(this))throw Yu("enqueue");if(!jo(this))throw new TypeError("The stream is not in a state that permits enqueue");return Ku(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!Wu(this))throw Yu("error");mn(this,d)},u.prototype[Le]=function(d){oa(this);var j=this._cancelAlgorithm(d);return Gu(this),j},u.prototype[Ue]=function(d){var j=this._controlledReadableStream;if(this._queue.length>0){var O=at(this);this._closeRequested&&this._queue.length===0?(Gu(this),js(j)):ks(this),d._chunkSteps(O)}else J(j,d),ks(this)},u}();Object.defineProperties(Qn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Qn.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Wu(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableStream")?!1:u instanceof Qn}function ks(u){var d=wv(u);if(d){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var j=u._pullAlgorithm();E(j,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,ks(u))},function(O){mn(u,O)})}}function wv(u){var d=u._controlledReadableStream;if(!jo(u)||!u._started)return!1;if(gn(d)&&Ge(d)>0)return!0;var j=Sf(u);return j>0}function Gu(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function _s(u){if(jo(u)){var d=u._controlledReadableStream;u._closeRequested=!0,u._queue.length===0&&(Gu(u),js(d))}}function Ku(u,d){if(jo(u)){var j=u._controlledReadableStream;if(gn(j)&&Ge(j)>0)Ie(j,d,!1);else{var O=void 0;try{O=u._strategySizeAlgorithm(d)}catch(W){throw mn(u,W),W}try{lt(u,d,O)}catch(W){throw mn(u,W),W}}ks(u)}}function mn(u,d){var j=u._controlledReadableStream;j._state==="readable"&&(oa(u),Gu(u),Sv(j,d))}function Sf(u){var d=u._controlledReadableStream._state;return d==="errored"?null:d==="closed"?0:u._strategyHWM-u._queueTotalSize}function _5(u){return!wv(u)}function jo(u){var d=u._controlledReadableStream._state;return!u._closeRequested&&d==="readable"}function kv(u,d,j,O,W,se,ve){d._controlledReadableStream=u,d._queue=void 0,d._queueTotalSize=void 0,oa(d),d._started=!1,d._closeRequested=!1,d._pullAgain=!1,d._pulling=!1,d._strategySizeAlgorithm=ve,d._strategyHWM=se,d._pullAlgorithm=O,d._cancelAlgorithm=W,u._readableStreamController=d;var Je=j();E(h(Je),function(){d._started=!0,ks(d)},function(Er){mn(d,Er)})}function j5(u,d,j,O){var W=Object.create(Qn.prototype),se=function(){},ve=function(){return h(void 0)},Je=function(){return h(void 0)};d.start!==void 0&&(se=function(){return d.start(W)}),d.pull!==void 0&&(ve=function(){return d.pull(W)}),d.cancel!==void 0&&(Je=function(Er){return d.cancel(Er)}),kv(u,W,se,ve,Je,j,O)}function Yu(u){return new TypeError("ReadableStreamDefaultController.prototype."+u+" can only be used on a ReadableStreamDefaultController")}function S5(u,d){return da(u._readableStreamController)?A5(u):E5(u)}function E5(u,d){var j=Wr(u),O=!1,W=!1,se=!1,ve=!1,Je,Er,qr,Dr,$r,qa=m(function(ot){$r=ot});function ni(){if(O)return W=!0,h(void 0);O=!0;var ot={_chunkSteps:function(Si){D(function(){W=!1;var Dt=Si,Yi=Si;se||Ku(qr._readableStreamController,Dt),ve||Ku(Dr._readableStreamController,Yi),O=!1,W&&ni()})},_closeSteps:function(){O=!1,se||_s(qr._readableStreamController),ve||_s(Dr._readableStreamController),(!se||!ve)&&$r(void 0)},_errorSteps:function(){O=!1}};return nr(j,ot),h(void 0)}function Eo(ot){if(se=!0,Je=ot,ve){var Si=wr([Je,Er]),Dt=ii(u,Si);$r(Dt)}return qa}function bn(ot){if(ve=!0,Er=ot,se){var Si=wr([Je,Er]),Dt=ii(u,Si);$r(Dt)}return qa}function ji(){}return qr=Ef(ji,ni,Eo),Dr=Ef(ji,ni,bn),A(j._closedPromise,function(ot){mn(qr._readableStreamController,ot),mn(Dr._readableStreamController,ot),(!se||!ve)&&$r(void 0)}),[qr,Dr]}function A5(u){var d=Wr(u),j=!1,O=!1,W=!1,se=!1,ve=!1,Je,Er,qr,Dr,$r,qa=m(function(ha){$r=ha});function ni(ha){A(ha._closedPromise,function(xr){ha===d&&(Fe(qr._readableStreamController,xr),Fe(Dr._readableStreamController,xr),(!se||!ve)&&$r(void 0))})}function Eo(){Ve(d)&&(G(d),d=Wr(u),ni(d));var ha={_chunkSteps:function(xr){D(function(){O=!1,W=!1;var Gr=xr,ma=xr;if(!se&&!ve)try{ma=Fa(xr)}catch(Ei){Fe(qr._readableStreamController,Ei),Fe(Dr._readableStreamController,Ei),$r(ii(u,Ei));return}se||Se(qr._readableStreamController,Gr),ve||Se(Dr._readableStreamController,ma),j=!1,O?ji():W&&ot()})},_closeSteps:function(){j=!1,se||Be(qr._readableStreamController),ve||Be(Dr._readableStreamController),qr._readableStreamController._pendingPullIntos.length>0&&Xe(qr._readableStreamController,0),Dr._readableStreamController._pendingPullIntos.length>0&&Xe(Dr._readableStreamController,0),(!se||!ve)&&$r(void 0)},_errorSteps:function(){j=!1}};nr(d,ha)}function bn(ha,xr){Ze(d)&&(G(d),d=Y(u),ni(d));var Gr=xr?Dr:qr,ma=xr?qr:Dr,Ei={_chunkSteps:function(yn){D(function(){O=!1,W=!1;var Ao=xr?ve:se,Ps=xr?se:ve;if(Ps)Ao||Te(Gr._readableStreamController,yn);else{var zv=void 0;try{zv=Fa(yn)}catch(Ff){Fe(Gr._readableStreamController,Ff),Fe(ma._readableStreamController,Ff),$r(ii(u,Ff));return}Ao||Te(Gr._readableStreamController,yn),Se(ma._readableStreamController,zv)}j=!1,O?ji():W&&ot()})},_closeSteps:function(yn){j=!1;var Ao=xr?ve:se,Ps=xr?se:ve;Ao||Be(Gr._readableStreamController),Ps||Be(ma._readableStreamController),yn!==void 0&&(Ao||Te(Gr._readableStreamController,yn),!Ps&&ma._readableStreamController._pendingPullIntos.length>0&&Xe(ma._readableStreamController,0)),(!Ao||!Ps)&&$r(void 0)},_errorSteps:function(){j=!1}};lr(d,ha,Ei)}function ji(){if(j)return O=!0,h(void 0);j=!0;var ha=Ce(qr._readableStreamController);return ha===null?Eo():bn(ha._view,!1),h(void 0)}function ot(){if(j)return W=!0,h(void 0);j=!0;var ha=Ce(Dr._readableStreamController);return ha===null?Eo():bn(ha._view,!0),h(void 0)}function Si(ha){if(se=!0,Je=ha,ve){var xr=wr([Je,Er]),Gr=ii(u,xr);$r(Gr)}return qa}function Dt(ha){if(ve=!0,Er=ha,se){var xr=wr([Je,Er]),Gr=ii(u,xr);$r(Gr)}return qa}function Yi(){}return qr=jv(Yi,ji,Si),Dr=jv(Yi,ot,Dt),ni(d),[qr,Dr]}function P5(u,d){Qe(u,d);var j=u,O=j==null?void 0:j.autoAllocateChunkSize,W=j==null?void 0:j.cancel,se=j==null?void 0:j.pull,ve=j==null?void 0:j.start,Je=j==null?void 0:j.type;return{autoAllocateChunkSize:O===void 0?void 0:ur(O,d+" has member 'autoAllocateChunkSize' that"),cancel:W===void 0?void 0:T5(W,j,d+" has member 'cancel' that"),pull:se===void 0?void 0:F5(se,j,d+" has member 'pull' that"),start:ve===void 0?void 0:C5(ve,j,d+" has member 'start' that"),type:Je===void 0?void 0:q5(Je,d+" has member 'type' that")}}function T5(u,d,j){return We(u,j),function(O){return R(u,d,[O])}}function F5(u,d,j){return We(u,j),function(O){return R(u,d,[O])}}function C5(u,d,j){return We(u,j),function(O){return I(u,d,[O])}}function q5(u,d){if(u=""+u,u!=="bytes")throw new TypeError(d+" '"+u+"' is not a valid enumeration value for ReadableStreamType");return u}function I5(u,d){Qe(u,d);var j=u==null?void 0:u.mode;return{mode:j===void 0?void 0:B5(j,d+" has member 'mode' that")}}function B5(u,d){if(u=""+u,u!=="byob")throw new TypeError(d+" '"+u+"' is not a valid enumeration value for ReadableStreamReaderMode");return u}function R5(u,d){Qe(u,d);var j=u==null?void 0:u.preventCancel;return{preventCancel:Boolean(j)}}function _v(u,d){Qe(u,d);var j=u==null?void 0:u.preventAbort,O=u==null?void 0:u.preventCancel,W=u==null?void 0:u.preventClose,se=u==null?void 0:u.signal;return se!==void 0&&O5(se,d+" has member 'signal' that"),{preventAbort:Boolean(j),preventCancel:Boolean(O),preventClose:Boolean(W),signal:se}}function O5(u,d){if(!k(u))throw new TypeError(d+" is not an AbortSignal.")}function D5(u,d){Qe(u,d);var j=u==null?void 0:u.readable;fe(j,"readable","ReadableWritablePair"),Or(j,d+" has member 'readable' that");var O=u==null?void 0:u.writable;return fe(O,"writable","ReadableWritablePair"),Tr(O,d+" has member 'writable' that"),{readable:j,writable:O}}var Ki=function(){function u(d,j){d===void 0&&(d={}),j===void 0&&(j={}),d===void 0?d=null:rr(d,"First parameter");var O=yr(j,"Second parameter"),W=P5(d,"First parameter");if(Af(this),W.type==="bytes"){if(O.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var se=sr(O,0);Ae(this,W,se)}else{var ve=z(O),se=sr(O,1);j5(this,W,se,ve)}}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!vn(this))throw Xn("locked");return gn(this)},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),vn(this)?gn(this)?v(new TypeError("Cannot cancel a stream that already has a reader")):ii(this,d):v(Xn("cancel"))},u.prototype.getReader=function(d){if(d===void 0&&(d=void 0),!vn(this))throw Xn("getReader");var j=I5(d,"First parameter");return j.mode===void 0?Wr(this):Y(this)},u.prototype.pipeThrough=function(d,j){if(j===void 0&&(j={}),!vn(this))throw Xn("pipeThrough");qe(d,1,"pipeThrough");var O=D5(d,"First parameter"),W=_v(j,"Second parameter");if(gn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Cr(O.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var se=xv(this,O.writable,W.preventClose,W.preventAbort,W.preventCancel,W.signal);return T(se),O.readable},u.prototype.pipeTo=function(d,j){if(j===void 0&&(j={}),!vn(this))return v(Xn("pipeTo"));if(d===void 0)return v("Parameter 1 is required in 'pipeTo'.");if(!Re(d))return v(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var O;try{O=_v(j,"Second parameter")}catch(W){return v(W)}return gn(this)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Cr(d)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):xv(this,d,O.preventClose,O.preventAbort,O.preventCancel,O.signal)},u.prototype.tee=function(){if(!vn(this))throw Xn("tee");var d=S5(this);return wr(d)},u.prototype.values=function(d){if(d===void 0&&(d=void 0),!vn(this))throw Xn("values");var j=R5(d,"First parameter");return fr(this,j.preventCancel)},u}();Object.defineProperties(Ki.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ki.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(Ki.prototype,r.asyncIterator,{value:Ki.prototype.values,writable:!0,configurable:!0});function Ef(u,d,j,O,W){O===void 0&&(O=1),W===void 0&&(W=function(){return 1});var se=Object.create(Ki.prototype);Af(se);var ve=Object.create(Qn.prototype);return kv(se,ve,u,d,j,O,W),se}function jv(u,d,j){var O=Object.create(Ki.prototype);Af(O);var W=Object.create(Ca.prototype);return Ee(O,W,u,d,j,0,void 0),O}function Af(u){u._state="readable",u._reader=void 0,u._storedError=void 0,u._disturbed=!1}function vn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readableStreamController")?!1:u instanceof Ki}function gn(u){return u._reader!==void 0}function ii(u,d){if(u._disturbed=!0,u._state==="closed")return h(void 0);if(u._state==="errored")return v(u._storedError);js(u);var j=u._reader;j!==void 0&&Ve(j)&&(j._readIntoRequests.forEach(function(W){W._closeSteps(void 0)}),j._readIntoRequests=new $);var O=u._readableStreamController[Le](d);return C(O,a)}function js(u){u._state="closed";var d=u._reader;d!==void 0&&(le(d),Ze(d)&&(d._readRequests.forEach(function(j){j._closeSteps()}),d._readRequests=new $))}function Sv(u,d){u._state="errored",u._storedError=d;var j=u._reader;j!==void 0&&(_e(j,d),Ze(j)?(j._readRequests.forEach(function(O){O._errorSteps(d)}),j._readRequests=new $):(j._readIntoRequests.forEach(function(O){O._errorSteps(d)}),j._readIntoRequests=new $))}function Xn(u){return new TypeError("ReadableStream.prototype."+u+" can only be used on a ReadableStream")}function Ev(u,d){Qe(u,d);var j=u==null?void 0:u.highWaterMark;return fe(j,"highWaterMark","QueuingStrategyInit"),{highWaterMark:we(j)}}var Av=function(u){return u.byteLength};try{Object.defineProperty(Av,"name",{value:"size",configurable:!0})}catch{}var Ss=function(){function u(d){qe(d,1,"ByteLengthQueuingStrategy"),d=Ev(d,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Tv(this))throw Pv("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Tv(this))throw Pv("size");return Av},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Ss.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ss.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Pv(u){return new TypeError("ByteLengthQueuingStrategy.prototype."+u+" can only be used on a ByteLengthQueuingStrategy")}function Tv(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_byteLengthQueuingStrategyHighWaterMark")?!1:u instanceof Ss}var Fv=function(){return 1};try{Object.defineProperty(Fv,"name",{value:"size",configurable:!0})}catch{}var Es=function(){function u(d){qe(d,1,"CountQueuingStrategy"),d=Ev(d,"First parameter"),this._countQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!qv(this))throw Cv("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!qv(this))throw Cv("size");return Fv},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Es.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Es.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Cv(u){return new TypeError("CountQueuingStrategy.prototype."+u+" can only be used on a CountQueuingStrategy")}function qv(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_countQueuingStrategyHighWaterMark")?!1:u instanceof Es}function z5(u,d){Qe(u,d);var j=u==null?void 0:u.flush,O=u==null?void 0:u.readableType,W=u==null?void 0:u.start,se=u==null?void 0:u.transform,ve=u==null?void 0:u.writableType;return{flush:j===void 0?void 0:L5(j,u,d+" has member 'flush' that"),readableType:O,start:W===void 0?void 0:M5(W,u,d+" has member 'start' that"),transform:se===void 0?void 0:N5(se,u,d+" has member 'transform' that"),writableType:ve}}function L5(u,d,j){return We(u,j),function(O){return R(u,d,[O])}}function M5(u,d,j){return We(u,j),function(O){return I(u,d,[O])}}function N5(u,d,j){return We(u,j),function(O,W){return R(u,d,[O,W])}}var As=function(){function u(d,j,O){d===void 0&&(d={}),j===void 0&&(j={}),O===void 0&&(O={}),d===void 0&&(d=null);var W=yr(j,"Second parameter"),se=yr(O,"Third parameter"),ve=z5(d,"First parameter");if(ve.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(ve.writableType!==void 0)throw new RangeError("Invalid writableType specified");var Je=sr(se,0),Er=z(se),qr=sr(W,1),Dr=z(W),$r,qa=m(function(ni){$r=ni});U5(this,qa,qr,Dr,Je,Er),V5(this,ve),ve.start!==void 0?$r(ve.start(this._transformStreamController)):$r(void 0)}return Object.defineProperty(u.prototype,"readable",{get:function(){if(!Iv(this))throw Dv("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"writable",{get:function(){if(!Iv(this))throw Dv("writable");return this._writable},enumerable:!1,configurable:!0}),u}();Object.defineProperties(As.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(As.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function U5(u,d,j,O,W,se){function ve(){return d}function Je(qa){return G5(u,qa)}function Er(qa){return K5(u,qa)}function qr(){return Y5(u)}u._writable=ue(ve,Je,qr,Er,j,O);function Dr(){return Q5(u)}function $r(qa){return Xu(u,qa),h(void 0)}u._readable=Ef(ve,Dr,$r,W,se),u._backpressure=void 0,u._backpressureChangePromise=void 0,u._backpressureChangePromise_resolve=void 0,Ju(u,!0),u._transformStreamController=void 0}function Iv(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_transformStreamController")?!1:u instanceof As}function Qu(u,d){mn(u._readable._readableStreamController,d),Xu(u,d)}function Xu(u,d){Bv(u._transformStreamController),yf(u._writable._writableStreamController,d),u._backpressure&&Ju(u,!1)}function Ju(u,d){u._backpressureChangePromise!==void 0&&u._backpressureChangePromise_resolve(),u._backpressureChangePromise=m(function(j){u._backpressureChangePromise_resolve=j}),u._backpressure=d}var So=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Zu(this))throw ec("desiredSize");var d=this._controlledTransformStream._readable._readableStreamController;return Sf(d)},enumerable:!1,configurable:!0}),u.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Zu(this))throw ec("enqueue");Rv(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!Zu(this))throw ec("error");$5(this,d)},u.prototype.terminate=function(){if(!Zu(this))throw ec("terminate");W5(this)},u}();Object.defineProperties(So.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(So.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Zu(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledTransformStream")?!1:u instanceof So}function H5(u,d,j,O){d._controlledTransformStream=u,u._transformStreamController=d,d._transformAlgorithm=j,d._flushAlgorithm=O}function V5(u,d){var j=Object.create(So.prototype),O=function(se){try{return Rv(j,se),h(void 0)}catch(ve){return v(ve)}},W=function(){return h(void 0)};d.transform!==void 0&&(O=function(se){return d.transform(se,j)}),d.flush!==void 0&&(W=function(){return d.flush(j)}),H5(u,j,O,W)}function Bv(u){u._transformAlgorithm=void 0,u._flushAlgorithm=void 0}function Rv(u,d){var j=u._controlledTransformStream,O=j._readable._readableStreamController;if(!jo(O))throw new TypeError("Readable side is not in a state that permits enqueue");try{Ku(O,d)}catch(se){throw Xu(j,se),j._readable._storedError}var W=_5(O);W!==j._backpressure&&Ju(j,!0)}function $5(u,d){Qu(u._controlledTransformStream,d)}function Ov(u,d){var j=u._transformAlgorithm(d);return C(j,void 0,function(O){throw Qu(u._controlledTransformStream,O),O})}function W5(u){var d=u._controlledTransformStream,j=d._readable._readableStreamController;_s(j);var O=new TypeError("TransformStream terminated");Xu(d,O)}function G5(u,d){var j=u._transformStreamController;if(u._backpressure){var O=u._backpressureChangePromise;return C(O,function(){var W=u._writable,se=W._state;if(se==="erroring")throw W._storedError;return Ov(j,d)})}return Ov(j,d)}function K5(u,d){return Qu(u,d),h(void 0)}function Y5(u){var d=u._readable,j=u._transformStreamController,O=j._flushAlgorithm();return Bv(j),C(O,function(){if(d._state==="errored")throw d._storedError;_s(d._readableStreamController)},function(W){throw Qu(u,W),d._storedError})}function Q5(u){return Ju(u,!1),u._backpressureChangePromise}function ec(u){return new TypeError("TransformStreamDefaultController.prototype."+u+" can only be used on a TransformStreamDefaultController")}function Dv(u){return new TypeError("TransformStream.prototype."+u+" can only be used on a TransformStream")}var Pf={ReadableStream:Ki,ReadableStreamDefaultController:Qn,ReadableByteStreamController:Ca,ReadableStreamBYOBRequest:pa,ReadableStreamDefaultReader:Ye,ReadableStreamBYOBReader:ne,WritableStream:N,WritableStreamDefaultController:Kn,WritableStreamDefaultWriter:_o,ByteLengthQueuingStrategy:Ss,CountQueuingStrategy:Es,TransformStream:As,TransformStreamDefaultController:So};if(typeof t<"u")for(var Tf in Pf)Object.prototype.hasOwnProperty.call(Pf,Tf)&&Object.defineProperty(t,Tf,{value:Pf[Tf],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=Ss,e.CountQueuingStrategy=Es,e.ReadableByteStreamController=Ca,e.ReadableStream=Ki,e.ReadableStreamBYOBReader=ne,e.ReadableStreamBYOBRequest=pa,e.ReadableStreamDefaultController=Qn,e.ReadableStreamDefaultReader=Ye,e.TransformStream=As,e.TransformStreamDefaultController=So,e.WritableStream=N,e.WritableStreamDefaultController=Kn,e.WritableStreamDefaultWriter=_o,Object.defineProperty(e,"__esModule",{value:!0})})});var Lv=typeof process!="object"||String(process)!=="[object process]"||process.browser;var Mv={ibm866:[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1025,1105,1028,1108,1031,1111,1038,1118,176,8729,183,8730,8470,164,9632,160],"iso-8859-2":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,728,321,164,317,346,167,168,352,350,356,377,173,381,379,176,261,731,322,180,318,347,711,184,353,351,357,378,733,382,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"iso-8859-3":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,294,728,163,164,null,292,167,168,304,350,286,308,173,null,379,176,295,178,179,180,181,293,183,184,305,351,287,309,189,null,380,192,193,194,null,196,266,264,199,200,201,202,203,204,205,206,207,null,209,210,211,212,288,214,215,284,217,218,219,220,364,348,223,224,225,226,null,228,267,265,231,232,233,234,235,236,237,238,239,null,241,242,243,244,289,246,247,285,249,250,251,252,365,349,729],"iso-8859-4":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,312,342,164,296,315,167,168,352,274,290,358,173,381,175,176,261,731,343,180,297,316,711,184,353,275,291,359,330,382,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,298,272,325,332,310,212,213,214,215,216,370,218,219,220,360,362,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,299,273,326,333,311,244,245,246,247,248,371,250,251,252,361,363,729],"iso-8859-5":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,173,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8470,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,167,1118,1119],"iso-8859-6":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,null,null,164,null,null,null,null,null,null,null,1548,173,null,null,null,null,null,null,null,null,null,null,null,null,null,1563,null,null,null,1567,null,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,null,null,null,null,null,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,null,null,null,null,null,null,null,null,null,null,null,null,null],"iso-8859-7":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8216,8217,163,8364,8367,166,167,168,169,890,171,172,173,null,8213,176,177,178,179,900,901,902,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"iso-8859-8":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,162,163,164,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8215,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"iso-8859-10":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,274,290,298,296,310,167,315,272,352,358,381,173,362,330,176,261,275,291,299,297,311,183,316,273,353,359,382,8213,363,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,207,208,325,332,211,212,213,214,360,216,370,218,219,220,221,222,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,239,240,326,333,243,244,245,246,361,248,371,250,251,252,253,254,312],"iso-8859-13":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8221,162,163,164,8222,166,167,216,169,342,171,172,173,174,198,176,177,178,179,8220,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,8217],"iso-8859-14":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,7682,7683,163,266,267,7690,167,7808,169,7810,7691,7922,173,174,376,7710,7711,288,289,7744,7745,182,7766,7809,7767,7811,7776,7923,7812,7813,7777,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,372,209,210,211,212,213,214,7786,216,217,218,219,220,221,374,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,373,241,242,243,244,245,246,7787,248,249,250,251,252,253,375,255],"iso-8859-15":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,8364,165,352,167,353,169,170,171,172,173,174,175,176,177,178,179,381,181,182,183,382,185,186,187,338,339,376,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"iso-8859-16":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,261,321,8364,8222,352,167,353,169,536,171,377,173,378,379,176,177,268,322,381,8221,182,183,382,269,537,187,338,339,376,380,192,193,194,258,196,262,198,199,200,201,202,203,204,205,206,207,272,323,210,211,212,336,214,346,368,217,218,219,220,280,538,223,224,225,226,259,228,263,230,231,232,233,234,235,236,237,238,239,273,324,242,243,244,337,246,347,369,249,250,251,252,281,539,255],"koi8-r":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,1025,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],"koi8-u":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,1108,9556,1110,1111,9559,9560,9561,9562,9563,1169,1118,9566,9567,9568,9569,1025,1028,9571,1030,1031,9574,9575,9576,9577,9578,1168,1038,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],macintosh:[196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,732,175,728,729,730,184,733,731,711],"windows-874":[8364,129,130,131,132,8230,134,135,136,137,138,139,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,153,154,155,156,157,158,159,160,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,null,null,null,null,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,null,null,null,null],"windows-1250":[8364,129,8218,131,8222,8230,8224,8225,136,8240,352,8249,346,356,381,377,144,8216,8217,8220,8221,8226,8211,8212,152,8482,353,8250,347,357,382,378,160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379,176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"windows-1251":[1026,1027,8218,1107,8222,8230,8224,8225,8364,8240,1033,8249,1034,1036,1035,1039,1106,8216,8217,8220,8221,8226,8211,8212,152,8482,1113,8250,1114,1116,1115,1119,160,1038,1118,1032,164,1168,166,167,1025,169,1028,171,172,173,174,1031,176,177,1030,1110,1169,181,182,183,1105,8470,1108,187,1112,1029,1109,1111,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103],"windows-1252":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"windows-1253":[8364,129,8218,402,8222,8230,8224,8225,136,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,157,158,159,160,901,902,163,164,165,166,167,168,169,null,171,172,173,174,8213,176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"windows-1254":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,286,209,210,211,212,213,214,215,216,217,218,219,220,304,350,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,287,241,242,243,244,245,246,247,248,249,250,251,252,305,351,255],"windows-1255":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,156,157,158,159,160,161,162,163,8362,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,191,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1520,1521,1522,1523,1524,null,null,null,null,null,null,null,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"windows-1256":[8364,1662,8218,402,8222,8230,8224,8225,710,8240,1657,8249,338,1670,1688,1672,1711,8216,8217,8220,8221,8226,8211,8212,1705,8482,1681,8250,339,8204,8205,1722,160,1548,162,163,164,165,166,167,168,169,1726,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,1563,187,188,189,190,1567,1729,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,215,1591,1592,1593,1594,1600,1601,1602,1603,224,1604,226,1605,1606,1607,1608,231,232,233,234,235,1609,1610,238,239,1611,1612,1613,1614,244,1615,1616,247,1617,249,1618,251,252,8206,8207,1746],"windows-1257":[8364,129,8218,131,8222,8230,8224,8225,136,8240,138,8249,140,168,711,184,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,175,731,159,160,null,162,163,164,null,166,167,216,169,342,171,172,173,174,198,176,177,178,179,180,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,729],"windows-1258":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,258,196,197,198,199,200,201,202,203,768,205,206,207,272,209,777,211,212,416,214,215,216,217,218,219,220,431,771,223,224,225,226,259,228,229,230,231,232,233,234,235,769,237,238,239,273,241,803,243,244,417,246,247,248,249,250,251,252,432,8363,255],"x-mac-cyrillic":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,8224,176,1168,163,167,8226,182,1030,174,169,8482,1026,1106,8800,1027,1107,8734,177,8804,8805,1110,181,1169,1032,1028,1108,1031,1111,1033,1113,1034,1114,1112,1029,172,8730,402,8776,8710,171,187,8230,160,1035,1115,1036,1116,1109,8211,8212,8220,8221,8216,8217,247,8222,1038,1118,1039,1119,8470,1025,1105,1103,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,8364]};globalThis["encoding-indexes"]=Mv||{};function jr(e,r,a){return r<=e&&e<=a}function i8(e,r){return e.indexOf(r)!==-1}var Qi=Math.floor;function ac(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function n8(e){for(var r=String(e),a=r.length,i=0,t=[];i<a;){var n=r.charCodeAt(i);if(n<55296||n>57343)t.push(n);else if(56320<=n&&n<=57343)t.push(65533);else if(55296<=n&&n<=56319)if(i===a-1)t.push(65533);else{var o=r.charCodeAt(i+1);if(56320<=o&&o<=57343){var s=n&1023,c=o&1023;t.push(65536+(s<<10)+c),i+=1}else t.push(65533)}i+=1}return t}function o8(e){for(var r="",a=0;a<e.length;++a){var i=e[a];i<=65535?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return r}function $t(e){return 0<=e&&e<=127}var Vt=$t,Lr=-1;function Of(e){this.tokens=[].slice.call(e),this.tokens.reverse()}Of.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():Lr},prepend:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.push(r.pop());else this.tokens.push(e)},push:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.unshift(r.shift());else this.tokens.unshift(e)}};var aa=-1;function zr(e,r){if(e)throw TypeError("Decoder error");return r||65533}function oi(e){throw TypeError("The code point "+e+" could not be encoded.")}function s8(){}s8.prototype={handler:function(e,r){}};function u8(){}u8.prototype={handler:function(e,r){}};function Bf(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(Rf,e)?Rf[e]:null}var Nv=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],Rf={};Nv.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(a){Rf[a]=r})})});var Pt={},Tt={};function Po(e,r){return r&&r[e]||null}function To(e,r){var a=r.indexOf(e);return a===-1?null:a}function wt(e){if(!("encoding-indexes"in globalThis))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return globalThis["encoding-indexes"][e]}function c8(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,a=0,i=wt("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[0]<=e)r=n[0],a=n[1];else break}return a+e-r}function l8(e){if(e===59335)return 7457;var r=0,a=0,i=wt("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[1]<=e)r=n[1],a=n[0];else break}return a+e-r}function f8(e){qf=qf||wt("jis0208").map(function(a,i){return jr(i,8272,8835)?null:a});var r=qf;return r.indexOf(e)}var qf;function p8(e){If=If||wt("big5").map(function(a,i){return i<(161-129)*157?null:a});var r=If;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):To(e,r)}var If,Uv="utf-8";function Jn(e,r){if(!(this instanceof Jn))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):Uv,r=ac(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var a=Bf(e);if(a===null||a.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Tt[a.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var i=this;return i._encoding=a,Boolean(r.fatal)&&(i._error_mode="fatal"),Boolean(r.ignoreBOM)&&(i._ignoreBOM=!0),Object.defineProperty||(this.encoding=i._encoding.name.toLowerCase(),this.fatal=i._error_mode==="fatal",this.ignoreBOM=i._ignoreBOM),i}Object.defineProperty&&(Object.defineProperty(Jn.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(Jn.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(Jn.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));Jn.prototype.decode=function(r,a){var i;typeof r=="object"&&r instanceof ArrayBuffer?i=new Uint8Array(r):typeof r=="object"&&"buffer"in r&&r.buffer instanceof ArrayBuffer?i=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):i=new Uint8Array(0),a=ac(a),this._do_not_flush||(this._decoder=Tt[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(a.stream);for(var t=new Of(i),n=[],o;;){var s=t.read();if(s===Lr||(o=this._decoder.handler(t,s),o===aa))break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}if(!this._do_not_flush){do{if(o=this._decoder.handler(t,t.read()),o===aa)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!t.endOfStream());this._decoder=null}function c(p){return i8(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)&&!this._ignoreBOM&&!this._BOMseen&&(p.length>0&&p[0]===65279?(this._BOMseen=!0,p.shift()):p.length>0&&(this._BOMseen=!0)),o8(p)}return c.call(this,n)};function Ts(e,r){if(!(this instanceof Ts))throw TypeError("Called as a function. Did you forget 'new'?");r=ac(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var a=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):Uv;var i=Bf(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Pt[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");a._encoding=i}else a._encoding=Bf("utf-8"),e!==void 0&&"console"in globalThis&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=a._encoding.name.toLowerCase()),a}Object.defineProperty&&Object.defineProperty(Ts.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});Ts.prototype.encode=function(r,a){r=r===void 0?"":String(r),a=ac(a),this._do_not_flush||(this._encoder=Pt[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(a.stream);for(var i=new Of(n8(r)),t=[],n;;){var o=i.read();if(o===Lr||(n=this._encoder.handler(i,o),n===aa))break;Array.isArray(n)?t.push.apply(t,n):t.push(n)}if(!this._do_not_flush){for(;n=this._encoder.handler(i,i.read()),n!==aa;)Array.isArray(n)?t.push.apply(t,n):t.push(n);this._encoder=null}return new Uint8Array(t)};function d8(e){var r=e.fatal,a=0,i=0,t=0,n=128,o=191;this.handler=function(s,c){if(c===Lr&&t!==0)return t=0,zr(r);if(c===Lr)return aa;if(t===0){if(jr(c,0,127))return c;if(jr(c,194,223))t=1,a=c&31;else if(jr(c,224,239))c===224&&(n=160),c===237&&(o=159),t=2,a=c&15;else if(jr(c,240,244))c===240&&(n=144),c===244&&(o=143),t=3,a=c&7;else return zr(r);return null}if(!jr(c,n,o))return a=t=i=0,n=128,o=191,s.prepend(c),zr(r);if(n=128,o=191,a=a<<6|c&63,i+=1,i!==t)return null;var p=a;return a=t=i=0,p}}function h8(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return aa;if(Vt(i))return i;var t,n;jr(i,128,2047)?(t=1,n=192):jr(i,2048,65535)?(t=2,n=224):jr(i,65536,1114111)&&(t=3,n=240);for(var o=[(i>>6*t)+n];t>0;){var s=i>>6*(t-1);o.push(128|s&63),t-=1}return o}}Pt["UTF-8"]=function(e){return new h8(e)};Tt["UTF-8"]=function(e){return new d8(e)};function m8(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Lr)return aa;if($t(t))return t;var n=e[t-128];return n===null?zr(a):n}}function v8(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Lr)return aa;if(Vt(t))return t;var n=To(t,e);return n===null&&oi(t),n+128}}(function(){"encoding-indexes"in globalThis&&Nv.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var a=r.name,i=wt(a.toLowerCase());Tt[a]=function(t){return new m8(i,t)},Pt[a]=function(t){return new v8(i,t)}})})})();Tt.GBK=function(e){return new Hv(e)};Pt.GBK=function(e){return new Vv(e,!0)};function Hv(e){var r=e.fatal,a=0,i=0,t=0;this.handler=function(n,o){if(o===Lr&&a===0&&i===0&&t===0)return aa;o===Lr&&(a!==0||i!==0||t!==0)&&(a=0,i=0,t=0,zr(r));var s;if(t!==0){s=null,jr(o,48,57)&&(s=c8((((a-129)*10+i-48)*126+t-129)*10+o-48));var c=[i,t,o];return a=0,i=0,t=0,s===null?(n.prepend(c),zr(r)):s}if(i!==0)return jr(o,129,254)?(t=o,null):(n.prepend([i,o]),a=0,i=0,zr(r));if(a!==0){if(jr(o,48,57))return i=o,null;var p=a,f=null;a=0;var m=o<127?64:65;return(jr(o,64,126)||jr(o,128,254))&&(f=(p-129)*190+(o-m)),s=f===null?null:Po(f,wt("gb18030")),s===null&&$t(o)&&n.prepend(o),s===null?zr(r):s}return $t(o)?o:o===128?8364:jr(o,129,254)?(a=o,null):zr(r)}}function Vv(e,r){var a=e.fatal;this.handler=function(i,t){if(t===Lr)return aa;if(Vt(t))return t;if(t===58853)return oi(t);if(r&&t===8364)return 128;var n=To(t,wt("gb18030"));if(n!==null){var o=Qi(n/190)+129,s=n%190,c=s<63?64:65;return[o,s+c]}if(r)return oi(t);n=l8(t);var p=Qi(n/10/126/10);n=n-p*10*126*10;var f=Qi(n/10/126);n=n-f*10*126;var m=Qi(n/10),h=n-m*10;return[p+129,f+48,m+129,h+48]}}Pt.gb18030=function(e){return new Vv(e)};Tt.gb18030=function(e){return new Hv(e)};function g8(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Lr&&a!==0)return a=0,zr(r);if(t===Lr&&a===0)return aa;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:98;switch((jr(t,64,126)||jr(t,161,254))&&(o=(n-129)*157+(t-s)),o){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var c=o===null?null:Po(o,wt("big5"));return c===null&&$t(t)&&i.prepend(t),c===null?zr(r):c}return $t(t)?t:jr(t,129,254)?(a=t,null):zr(r)}}function b8(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return aa;if(Vt(i))return i;var t=p8(i);if(t===null)return oi(i);var n=Qi(t/157)+129;if(n<161)return oi(i);var o=t%157,s=o<63?64:98;return[n,o+s]}}Pt.Big5=function(e){return new b8(e)};Tt.Big5=function(e){return new g8(e)};function y8(e){var r=e.fatal,a=!1,i=0;this.handler=function(t,n){if(n===Lr&&i!==0)return i=0,zr(r);if(n===Lr&&i===0)return aa;if(i===142&&jr(n,161,223))return i=0,65377-161+n;if(i===143&&jr(n,161,254))return a=!0,i=n,null;if(i!==0){var o=i;i=0;var s=null;return jr(o,161,254)&&jr(n,161,254)&&(s=Po((o-161)*94+(n-161),wt(a?"jis0212":"jis0208"))),a=!1,jr(n,161,254)||t.prepend(n),s===null?zr(r):s}return $t(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):zr(r)}}function x8(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return aa;if(Vt(i))return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return[142,i-65377+161];i===8722&&(i=65293);var t=To(i,wt("jis0208"));if(t===null)return oi(i);var n=Qi(t/94)+161,o=t%94+161;return[n,o]}}Pt["EUC-JP"]=function(e){return new x8(e)};Tt["EUC-JP"]=function(e){return new y8(e)};function w8(e){var r=e.fatal,a={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=a.ASCII,t=a.ASCII,n=0,o=!1;this.handler=function(s,c){switch(i){default:case a.ASCII:return c===27?(i=a.EscapeStart,null):jr(c,0,127)&&c!==14&&c!==15&&c!==27?(o=!1,c):c===Lr?aa:(o=!1,zr(r));case a.Roman:return c===27?(i=a.EscapeStart,null):c===92?(o=!1,165):c===126?(o=!1,8254):jr(c,0,127)&&c!==14&&c!==15&&c!==27&&c!==92&&c!==126?(o=!1,c):c===Lr?aa:(o=!1,zr(r));case a.Katakana:return c===27?(i=a.EscapeStart,null):jr(c,33,95)?(o=!1,65377-33+c):c===Lr?aa:(o=!1,zr(r));case a.LeadByte:return c===27?(i=a.EscapeStart,null):jr(c,33,126)?(o=!1,n=c,i=a.TrailByte,null):c===Lr?aa:(o=!1,zr(r));case a.TrailByte:if(c===27)return i=a.EscapeStart,zr(r);if(jr(c,33,126)){i=a.LeadByte;var p=(n-33)*94+c-33,f=Po(p,wt("jis0208"));return f===null?zr(r):f}return c===Lr?(i=a.LeadByte,s.prepend(c),zr(r)):(i=a.LeadByte,zr(r));case a.EscapeStart:return c===36||c===40?(n=c,i=a.Escape,null):(s.prepend(c),o=!1,i=t,zr(r));case a.Escape:var m=n;n=0;var h=null;if(m===40&&c===66&&(h=a.ASCII),m===40&&c===74&&(h=a.Roman),m===40&&c===73&&(h=a.Katakana),m===36&&(c===64||c===66)&&(h=a.LeadByte),h!==null){i=i=h;var v=o;return o=!0,v?zr(r):null}return s.prepend([m,c]),o=!1,i=t,zr(r)}}}function k8(e){var r=e.fatal,a={ASCII:0,Roman:1,jis0208:2},i=a.ASCII;this.handler=function(t,n){if(n===Lr&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if(n===Lr&&i===a.ASCII)return aa;if((i===a.ASCII||i===a.Roman)&&(n===14||n===15||n===27))return oi(65533);if(i===a.ASCII&&Vt(n))return n;if(i===a.Roman&&(Vt(n)&&n!==92&&n!==126||n==165||n==8254)){if(Vt(n))return n;if(n===165)return 92;if(n===8254)return 126}if(Vt(n)&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if((n===165||n===8254)&&i!==a.Roman)return t.prepend(n),i=a.Roman,[27,40,74];n===8722&&(n=65293);var o=To(n,wt("jis0208"));if(o===null)return oi(n);if(i!==a.jis0208)return t.prepend(n),i=a.jis0208,[27,36,66];var s=Qi(o/94)+33,c=o%94+33;return[s,c]}}Pt["ISO-2022-JP"]=function(e){return new k8(e)};Tt["ISO-2022-JP"]=function(e){return new w8(e)};function _8(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Lr&&a!==0)return a=0,zr(r);if(t===Lr&&a===0)return aa;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:65,c=n<160?129:193;if((jr(t,64,126)||jr(t,128,252))&&(o=(n-c)*188+t-s),jr(o,8836,10715))return 57344-8836+o;var p=o===null?null:Po(o,wt("jis0208"));return p===null&&$t(t)&&i.prepend(t),p===null?zr(r):p}return $t(t)||t===128?t:jr(t,161,223)?65377-161+t:jr(t,129,159)||jr(t,224,252)?(a=t,null):zr(r)}}function j8(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return aa;if(Vt(i)||i===128)return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return i-65377+161;i===8722&&(i=65293);var t=f8(i);if(t===null)return oi(i);var n=Qi(t/188),o=n<31?129:193,s=t%188,c=s<63?64:65;return[n+o,s+c]}}Pt.Shift_JIS=function(e){return new j8(e)};Tt.Shift_JIS=function(e){return new _8(e)};function S8(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Lr&&a!==0)return a=0,zr(r);if(t===Lr&&a===0)return aa;if(a!==0){var n=a,o=null;a=0,jr(t,65,254)&&(o=(n-129)*190+(t-65));var s=o===null?null:Po(o,wt("euc-kr"));return o===null&&$t(t)&&i.prepend(t),s===null?zr(r):s}return $t(t)?t:jr(t,129,254)?(a=t,null):zr(r)}}function E8(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return aa;if(Vt(i))return i;var t=To(i,wt("euc-kr"));if(t===null)return oi(i);var n=Qi(t/190)+129,o=t%190+65;return[n,o]}}Pt["EUC-KR"]=function(e){return new E8(e)};Tt["EUC-KR"]=function(e){return new S8(e)};function rc(e,r){var a=e>>8,i=e&255;return r?[a,i]:[i,a]}function $v(e,r){var a=r.fatal,i=null,t=null;this.handler=function(n,o){if(o===Lr&&(i!==null||t!==null))return zr(a);if(o===Lr&&i===null&&t===null)return aa;if(i===null)return i=o,null;var s;if(e?s=(i<<8)+o:s=(o<<8)+i,i=null,t!==null){var c=t;return t=null,jr(s,56320,57343)?65536+(c-55296)*1024+(s-56320):(n.prepend(rc(s,e)),zr(a))}return jr(s,55296,56319)?(t=s,null):jr(s,56320,57343)?zr(a):s}}function Wv(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Lr)return aa;if(jr(t,0,65535))return rc(t,e);var n=rc((t-65536>>10)+55296,e),o=rc((t-65536&1023)+56320,e);return n.concat(o)}}Pt["UTF-16BE"]=function(e){return new Wv(!0,e)};Tt["UTF-16BE"]=function(e){return new $v(!0,e)};Pt["UTF-16LE"]=function(e){return new Wv(!1,e)};Tt["UTF-16LE"]=function(e){return new $v(!1,e)};function A8(e){var r=e.fatal;this.handler=function(a,i){return i===Lr?aa:$t(i)?i:63360+i-128}}function P8(e){var r=e.fatal;this.handler=function(a,i){return i===Lr?aa:Vt(i)?i:jr(i,63360,63487)?i-63360+128:oi(i)}}Pt["x-user-defined"]=function(e){return new P8(e)};Tt["x-user-defined"]=function(e){return new A8(e)};function Fs(e){return Buffer.from(e).toString("base64")}function Df(e){return Buffer.from(e,"base64").toString("ascii")}var Ub=Ka(Mb(),1),Hb=Ka(zs(),1);function Nb(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function UE(e,r){let a=r.type?r.type.replace("image/",""):"jpeg",i=(0,Hb.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,Ub.default)(i,a,r)}function Vb(e,r){let a=UE(e,r);return new Promise(i=>{let t=[];a.on("data",n=>t.push(n)),a.on("end",()=>{let n=Buffer.concat(t);i(Nb(n))})})}var _6=Ka(k6(),1),zm=["image/png","image/jpeg","image/gif"];async function Lm(e,r){if(!r)throw new Error("MIMEType is required to parse image under Node.js");let a=e instanceof Buffer?e:Buffer.from(e);return await eD(a,r)}function eD(e,r){return new Promise(a=>(0,_6.default)(e,r,(i,t)=>{if(i)throw i;let n=[...t.shape],o=t.shape.length===4?t.shape.shift():1,s=t.data instanceof Buffer?new Uint8Array(t.data):t.data;a({shape:n,data:s,width:t.shape[0],height:t.shape[1],components:t.shape[2],layers:o?[o]:[]})}))}function rD(){var e;return(e=globalThis._loadersgl_)!=null&&e.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.0.0-beta.6"),globalThis._loadersgl_.version}var j6=rD();function S6(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var Wi={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},WH=Wi.self||Wi.window||Wi.global||{},GH=Wi.window||Wi.self||Wi.global||{},KH=Wi.global||Wi.self||Wi.window||{},YH=Wi.document||{};var Xl=typeof process!="object"||String(process)!=="[object process]"||process.browser,Jl=typeof importScripts=="function",QH=typeof window<"u"&&typeof window.orientation<"u",E6=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),XH=E6&&parseFloat(E6[1])||0;function Mm(e,r=!0,a){let i=a||new Set;if(e){if(A6(e))i.add(e);else if(A6(e.buffer))i.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let t in e)Mm(e[t],r,i)}}return a===void 0?Array.from(i):[]}function A6(e){return e?e instanceof ArrayBuffer||typeof MessagePort<"u"&&e instanceof MessagePort||typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas:!1}function bo(){let parentPort;try{eval("globalThis.parentPort = require('worker_threads').parentPort"),parentPort=globalThis.parentPort}catch{}return parentPort}var Nm=new Map,Ht=class{static inWorkerThread(){return typeof self<"u"||Boolean(bo())}static set onmessage(r){function a(t){let n=bo(),{type:o,payload:s}=n?t:t.data;r(o,s)}let i=bo();i?(i.on("message",a),i.on("exit",()=>console.debug("Node worker closing"))):globalThis.onmessage=a}static addEventListener(r){let a=Nm.get(r);a||(a=t=>{if(!aD(t))return;let n=bo(),{type:o,payload:s}=n?t:t.data;r(o,s)}),bo()?console.error("not implemented"):globalThis.addEventListener("message",a)}static removeEventListener(r){let a=Nm.get(r);Nm.delete(r),bo()?console.error("not implemented"):globalThis.removeEventListener("message",a)}static postMessage(r,a){let i={source:"loaders.gl",type:r,payload:a},t=Mm(a),n=bo();n?n.postMessage(i,t):globalThis.postMessage(i,t)}};function aD(e){let{type:r,data:a}=e;return r==="message"&&a&&typeof a.source=="string"&&a.source.startsWith("loaders.gl")}var Hm={};a8(Hm,{readFileAsArrayBuffer:()=>ef,readFileAsText:()=>rf,requireFromFile:()=>af,requireFromString:()=>xs});var Um=Ka(require("module"),1),P6=Ka(require("path"),1),Zl=Ka(require("fs"),1);async function ef(e){return e.startsWith("http")?await(await fetch(e)).arrayBuffer():Zl.readFileSync(e).buffer}async function rf(e){return e.startsWith("http")?await(await fetch(e)).text():Zl.readFileSync(e,"utf8")}async function af(e){if(e.startsWith("http")){let i=await(await fetch(e)).text();return xs(i)}e.startsWith("/")||(e=`${process.cwd()}/${e}`);let r=await Zl.readFileSync(e,"utf8");return xs(r)}function xs(e,r="",a){if(typeof r=="object"&&(a=r,r=""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let i=Um.default._nodeModulePaths(P6.dirname(r)),t=typeof module<"u"&&(module==null?void 0:module.parent),n=new Um.default(r,t);return n.filename=r,n.paths=[].concat((a==null?void 0:a.prependPaths)||[]).concat(i).concat((a==null?void 0:a.appendPaths)||[]),n._compile(e,r),t&&t.children&&t.children.splice(t.children.indexOf(n),1),n.exports}var Vm={};async function Bu(e,r=null,a={},i=null){return r&&(e=T6(e,r,a,i)),Vm[e]=Vm[e]||tD(e),await Vm[e]}function T6(e,r,a={},i=null){if(!a.useLocalLibraries&&e.startsWith("http"))return e;i=i||e;let t=a.modules||{};return t[i]?t[i]:Xl?a.CDN?(S6(a.CDN.startsWith("http")),`${a.CDN}/${r}@${j6}/dist/libs/${i}`):Jl?`../src/libs/${i}`:`modules/${r}/src/libs/${i}`:`modules/${r}/dist/libs/${i}`}async function tD(e){if(e.endsWith("wasm"))return await nD(e);if(!Xl)try{return Hm&&af&&await af(e)}catch(a){return console.error(a),null}if(Jl)return importScripts(e);let r=await oD(e);return iD(r,e)}function iD(e,r){if(!Xl)return xs&&xs(e,r);if(Jl)return eval.call(globalThis,e),null;let a=document.createElement("script");a.id=r;try{a.appendChild(document.createTextNode(e))}catch{a.text=e}return document.body.appendChild(a),null}async function nD(e){return!ef||e.startsWith("http")?await(await fetch(e)).arrayBuffer():await ef(e)}async function oD(e){return!rf||e.startsWith("http")?await(await fetch(e)).text():await rf(e)}var sD=0;function $m(e){Ht.inWorkerThread()&&(Ht.onmessage=async(r,a)=>{switch(r){case"process":try{let{input:i,options:t={},context:n={}}=a,o=await cD({loader:e,arrayBuffer:i,options:t,context:{...n,_parse:uD}});Ht.postMessage("done",{result:o})}catch(i){let t=i instanceof Error?i.message:"";Ht.postMessage("error",{error:t})}break;default:}})}function uD(e,r,a,i){return new Promise((t,n)=>{let o=sD++,s=(p,f)=>{if(f.id===o)switch(p){case"done":Ht.removeEventListener(s),t(f.result);break;case"error":Ht.removeEventListener(s),n(f.error);break;default:}};Ht.addEventListener(s);let c={id:o,input:e,options:a};Ht.postMessage("process",c)})}async function cD({loader:e,arrayBuffer:r,options:a,context:i}){let t,n;if(e.parseSync||e.parse)t=r,n=e.parseSync||e.parse;else if(e.parseTextSync)t=new TextDecoder().decode(r),n=e.parseTextSync;else throw new Error(`Could not load data with ${e.name} loader`);return a={...a,modules:e&&e.options&&e.options.modules||{},worker:!1},await n(t,{...a},i,e)}var lD="",F6={};function Ru(e){for(let r in F6)if(e.startsWith(r)){let a=F6[r];e=e.replace(r,a)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${lD}${e}`),e}var yo=Ka(require("fs"),1),xo=class{constructor(r,a,i){r=Ru(r),this.handle=yo.default.openSync(r,a,i);let t=yo.default.fstatSync(this.handle,{bigint:!0});this.size=Number(t.size),this.bigsize=t.size,this.url=r}async close(){return new Promise((r,a)=>{yo.default.close(this.handle,i=>i?a(i):r())})}async stat(){return await new Promise((r,a)=>yo.default.fstat(this.handle,{bigint:!0},(i,t)=>{let n={size:Number(t.size),bigsize:t.size,isDirectory:t.isDirectory()};i?a(i):r(n)}))}async read(r,a){let i=new ArrayBuffer(a),t=BigInt(r),n=0,o=new Uint8Array(i),s;for(;a>0;){let c=await fD(this.handle,o,0,a,t);if(c===0)break;n+=c,t+=BigInt(c),a-=c,s!==void 0&&(s+=c)}return n<a?i.slice(0,n):i}async write(r,a=0,i=r.byteLength){return new Promise((t,n)=>{let o=Number(a),s=new Uint8Array(r,Number(a),i);yo.default.write(this.handle,s,0,i,o,(c,p)=>c?n(c):t(p))})}};async function fD(e,r,a,i,t){return await new Promise((n,o)=>yo.default.read(e,r,a,i,t,(s,c)=>s?o(s):n(c)))}var sf=Ka(require("fs/promises"),1);var Gm=Ka(require("fs"),1),Wm=require("stream");var tf=Ka(require("zlib"),1),pD=e=>e&&e instanceof ArrayBuffer,dD=e=>e&&e instanceof Buffer;function nf(e,r){switch(r==null?void 0:r.get("content-encoding")){case"br":return e.pipe(tf.default.createBrotliDecompress());case"gzip":return e.pipe(tf.default.createGunzip());case"deflate":return e.pipe(tf.default.createDeflate());default:return e}}async function C6(e){let r=[];return await new Promise((a,i)=>{e.on("error",t=>i(t)),e.on("readable",()=>e.read()),e.on("data",t=>{typeof t=="string"&&i(new Error("Read stream not binary")),r.push(mD(t))}),e.on("end",()=>{let t=hD(r);a(t)})})}function hD(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),a=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(a),t=0;for(let n of r)i.set(n,t),t+=n.byteLength;return i.buffer}function mD(e){if(pD(e))return e;if(dD(e))return new Uint8Array(e).buffer;if(ArrayBuffer.isView(e))return e.buffer;if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error(`toArrayBuffer(${JSON.stringify(e,null,2).slice(10)})`)}var vD=e=>typeof e=="boolean",q6=e=>typeof e=="function",gD=e=>e!==null&&typeof e=="object",bD=e=>gD(e)&&q6(e.read)&&q6(e.pipe)&&vD(e.readable);async function of(e,r){let a=/^file:\/\//;e.replace(a,"/");let i=e.split("?")[0];i=Ru(i);let t=new Headers;e.endsWith(".gz")&&(t["content-encoding"]="gzip"),e.endsWith(".br")&&(t["content-encoding"]="br");try{let n=await new Promise((m,h)=>{let v=Gm.default.createReadStream(i,{encoding:null});v.once("readable",()=>m(v)),v.on("error",w=>h(w))}),o=n;bD(n)?o=nf(n,t):typeof n=="string"?o=Wm.Readable.from([new TextEncoder().encode(n)]):o=Wm.Readable.from([n||new ArrayBuffer(0)]);let s=200,c="OK",p=yD(i),f=new Response(o,{headers:p,status:s,statusText:c});return Object.defineProperty(f,"url",{value:e}),f}catch(n){let o=n.message,s=400,c=o,p={},f=new Response(o,{headers:p,status:s,statusText:c});return Object.defineProperty(f,"url",{value:e}),f}}function yD(e){let r={};if(!r["content-length"]){let a=Gm.default.statSync(e);r["content-length"]=a.size}return e.endsWith(".gz")&&(e=e.slice(0,-3),r["content-encoding"]="gzip"),new Headers(r)}var uf=class{constructor(){this.readable=!0;this.writable=!0}async readdir(r=".",a){return await sf.default.readdir(r,a)}async stat(r){let a=await sf.default.stat(r,{bigint:!0});return{size:Number(a.size),bigsize:a.size,isDirectory:a.isDirectory()}}async unlink(r){return await sf.default.unlink(r)}async fetch(r,a){return await of(r,a)}async openReadableFile(r,a="r"){return new xo(r,a)}async openWritableFile(r,a="w",i){return new xo(r,a,i)}};var W6=require("node:process");var I6=Ka(require("stream"),1),Km=class{},xD=I6.Readable||Km;function Qm(e,r){let a=e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]();return new Ym(a,r)}var Ym=class extends xD{constructor(a,i){super(i);this._iterator=a,this._pulling=!1,this._bytesMode=!i||!i.objectMode}async _read(a){this._pulling||(this._pulling=!0,this._pulling=await this._pull(a,this._iterator))}async _destroy(a,i){var t,n,o,s;this._iterator&&(a?await((n=(t=this._iterator)==null?void 0:t.throw)==null?void 0:n.call(t,a)):await((s=(o=this._iterator)==null?void 0:o.return)==null?void 0:s.call(o,a)),i==null||i(null))}async _pull(a,i){var o;let t=this._bytesMode,n=null;for(;this.readable&&!(n=await i.next()).done&&(a!==null&&(a-=t&&ArrayBuffer.isView(n.value)?n.value.byteLength:1),!(!this.push(new Uint8Array(n.value))||a<=0)););return(n!=null&&n.done||!this.readable)&&(this.push(null)||!0)&&((o=i==null?void 0:i.return)==null||o.call(i)),!this.readable}};var O6=Ka(R6(),1);delete globalThis.ReadableStream;var lf=class extends O6.ReadableStream{};var ff=class{constructor(r){this.isWorking=!1;this.isCancelled=!1;this.chunks=r}start(r){this.work(r)}async work(r){let{chunks:a}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let i;try{i=a.next()}catch(t){r.error(t);break}i&&(!i.done&&!this.isCancelled?r.enqueue(i.value):r.close())}this.isWorking=!1}pull(r){this.isWorking||this.work(r)}cancel(){this.isCancelled=!0}};var pf=class extends lf{constructor(a){super(new ff(a.values()),{type:"bytes"});this._chunks=a}async*[Symbol.asyncIterator](a){let i=this.getReader();yield*this._chunks,i.releaseLock()}};var wo=class{constructor(r=[],a={}){this.parts=[],this.size=0;for(let i of r)if(typeof i=="string"){let t=new TextEncoder().encode(i);this.parts.push(t),this.size+=t.byteLength}else if(i instanceof wo)this.size+=i.size,this.parts.push(...i.parts);else if(i instanceof ArrayBuffer)this.parts.push(new Uint8Array(i)),this.size+=i.byteLength;else if(i instanceof Uint8Array)this.parts.push(i),this.size+=i.byteLength;else if(ArrayBuffer.isView(i)){let{buffer:t,byteOffset:n,byteLength:o}=i;this.parts.push(new Uint8Array(t,n,o)),this.size+=o}else{let t=new TextEncoder().encode(String(i));this.parts.push(t),this.size+=t.byteLength}this.type=wD(a.type)}slice(r=0,a=this.size,i=""){let{size:t,parts:n}=this,o=r<0?Math.max(t+r,0):Math.min(r,t),s=a<0?Math.max(t+a,0):Math.min(a,t),c=Math.max(s-o,0),p=new wo([],{type:i});if(c===0)return p;let f=0,m=[];for(let h of n){let{byteLength:v}=h;if(o>0&&v<=o)o-=v,s-=v;else{let w=h.subarray(o,Math.min(v,s));if(m.push(w),f+=w.byteLength,o=0,f>=c)break}}return p.parts=m,p.size=f,p}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,a="";for(let i of this.parts)a+=r.decode(i);return a}stream(){return new pf(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),a=new Uint8Array(r),i=0;for(let t of this.parts)a.set(t,i),i+=t.byteLength;return r}};function wD(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}function kD(){return typeof Blob>"u"&&!globalThis.Blob&&(globalThis.Blob=wo),globalThis.Blob}var _D=kD();var df=class{constructor(){this.onload=null}abort(){}async readAsArrayBuffer(r){let a=await r.arrayBuffer();this.onload&&this.onload({target:{result:a}})}async readAsBinaryString(r){throw Error("Not implemented")}async readAsDataURL(r){let a=await r.text(),i=`data://;base64,${Fs(a)}`;this.onload&&this.onload({target:{result:i}})}async readAsText(r){let a=await r.text();this.onload&&this.onload({target:{result:a}})}};var hf=class extends globalThis.Blob{constructor(a,i,t={}){super(a,t);this.name="";this.webkitRelativePath="";this.name=String(i).replace(/\//g,":"),this.lastModified=(t==null?void 0:t.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};function jD(){return typeof FileReader>"u"&&!globalThis.FileReader&&(globalThis.FileReader=df),typeof File>"u"&&!globalThis.File&&(globalThis.File=hf),global}var SD=jD();var Xm=Ka(require("module"),1),D6=Ka(require("path"),1),vf=Ka(require("fs"),1);async function z6(e){return e.startsWith("http")?await(await fetch(e)).arrayBuffer():vf.default.readFileSync(e).buffer}async function L6(e){return e.startsWith("http")?await(await fetch(e)).text():vf.default.readFileSync(e,"utf8")}async function M6(e){if(e.startsWith("http")){let i=await(await fetch(e)).text();return mf(i)}e.startsWith("/")||(e=`${process.cwd()}/${e}`);let r=await vf.default.readFileSync(e,"utf8");return mf(r)}function mf(e,r="",a){if(typeof r=="object"&&(a=r,r=""),r=r.replace("file://",""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let i=Xm.default._nodeModulePaths(D6.default.dirname(r)),t=typeof module<"u"&&(module==null?void 0:module.parent),n=new Xm.default(r,t);return n.filename=r,n.paths=[].concat((a==null?void 0:a.prependPaths)||[]).concat(i).concat((a==null?void 0:a.appendPaths)||[]),n._compile(e,r),t&&t.children&&t.children.splice(t.children.indexOf(n),1),n.exports}var _i=class{constructor(r){this.map={},r instanceof _i?r.forEach((a,i)=>this.append(i,a)):Array.isArray(r)?r.forEach(a=>this.append(a[0],a[1])):r&&Object.getOwnPropertyNames(r).forEach(a=>this.append(a,r[a]))}append(r,a){r=Ou(r),a=N6(a);let i=this.map[r];this.map[r]=i?`${i}, ${a}`:a}delete(r){delete this.map[Ou(r)]}get(r){return r=Ou(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(Ou(r))}set(r,a){this.map[Ou(r)]=N6(a)}forEach(r,a=null){for(let i in this.map)this.map.hasOwnProperty(i)&&(a?r.call(a,this.map[i],i,this):r(this.map[i],i,this))}keys(){let r=[];return this.forEach(function(a,i){r.push(i)}),Jm(r)}values(){let r=[];return this.forEach(function(a){r.push(a)}),Jm(r)}entries(){let r=[];return this.forEach(function(a,i){r.push([i,a])}),Jm(r)}*[Symbol.iterator](){yield*this.entries()}};function Ou(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e)||e==="")throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function N6(e){return typeof e!="string"&&(e=String(e)),e}function Jm(e){let r={next(){let a=e.shift();return{done:a===void 0,value:a}}};return r[Symbol.iterator]=function(){return r},r}function Zm(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var rv=Ka(require("stream"),1),ED=e=>typeof e=="boolean",U6=e=>typeof e=="function",AD=e=>e!==null&&typeof e=="object",ev=e=>AD(e)&&U6(e.read)&&U6(e.pipe)&&ED(e.readable),hn=class{constructor(r,a){this.bodyUsed=!1;let{headers:i,status:t=200,statusText:n="OK",url:o}=a||{};this.url=o,this.ok=t===200,this.status=t,this.statusText=n,this.headers=new _i((a==null?void 0:a.headers)||{}),ev(r)?this._body=nf(r,i):typeof r=="string"?this._body=rv.Readable.from([new TextEncoder().encode(r)]):this._body=rv.Readable.from([r||new ArrayBuffer(0)])}get body(){return Zm(!this.bodyUsed),Zm(ev(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return ev(this._body)?await C6(this._body):this._body||new ArrayBuffer(0)}async text(){let r=await this.arrayBuffer();return new TextDecoder().decode(r)}async json(){let r=await this.text();return JSON.parse(r)}async blob(){if(typeof Blob>"u")throw new Error("Blob polyfill not installed");return new Blob([await this.arrayBuffer()])}};var V6=Ka(require("http"),1),$6=Ka(require("https"),1);var PD=e=>e&&e instanceof ArrayBuffer,TD=e=>e&&e instanceof Buffer;function H6(e){let r=e.indexOf(","),a,i;return e.slice(r-7,r)===";base64"?(a=Buffer.from(e.slice(r+1),"base64"),i=e.slice(5,r-7).trim()):(a=Buffer.from(decodeURIComponent(e.slice(r+1))),i=e.slice(5,r).trim()),i?i.startsWith(";")&&(i=`text/plain${i}`):i="text/plain;charset=US-ASCII",{arrayBuffer:FD(a),mimeType:i}}function FD(e){if(PD(e))return e;if(TD(e))return new Uint8Array(e).buffer;if(ArrayBuffer.isView(e))return e.buffer;if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error(`toArrayBuffer(${JSON.stringify(e,null,2).slice(10)})`)}var av=e=>e.startsWith("data:"),CD=e=>e.startsWith("http:")||e.startsWith("https:");async function Du(e,r){try{if(globalThis.fetch!==Du&&(CD(e)||av(e)))return await fetch(e,r);if(av(e)){let{arrayBuffer:p,mimeType:f}=H6(e);return new hn(p,{headers:{"content-type":f},url:e})}let a={},i=e;e.endsWith(".gz")&&(e=e.slice(0,-3),a["content-encoding"]="gzip");let t=await qD(i,r),n=OD(e,t,a),{status:o,statusText:s}=RD(t),c=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&c){let p=ID(e,n.get("location"));return await Du(p,r)}return new hn(t,{headers:n,status:o,statusText:s,url:e})}catch(a){return new hn(null,{status:400,statusText:String(a),url:e})}}async function qD(e,r){return await new Promise((a,i)=>{let t=BD(e,r),n=e.startsWith("https:")?$6.default.request(t,o=>a(o)):V6.default.request(t,o=>a(o));n.on("error",o=>i(o)),n.end()})}function ID(e,r){if(r.startsWith("http"))return r;let a=new URL(e);return a.pathname=r,a.href}function BD(e,r){let a=(r==null?void 0:r.headers)||{},i={};for(let n of Object.keys(a))i[n.toLowerCase()]=a[n];i["accept-encoding"]=i["accept-encoding"]||"gzip,br,deflate";let t=new URL(e);return{hostname:t.hostname,path:t.pathname,method:"GET",...r,...r==null?void 0:r.fetch,headers:i,port:t.port}}function RD(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function OD(e,r,a={}){let i={};if(r&&r.headers){let t=r.headers;for(let n in t){let o=t[n];i[n.toLowerCase()]=String(o)}}if(!i["content-length"]){let t=DD(e);Number.isFinite(t)&&(i["content-length"]=t)}return Object.assign(i,a),new _i(i)}function DD(e){return av(e)?e.length-5:null}var zD=parseInt(W6.versions.node.split(".")[0]);Lv&&console.error("loaders.gl: The @loaders.gl/polyfills should only be used in Node.js environments");globalThis.loaders=globalThis.loaders||{};globalThis.loaders.makeNodeStream=Qm;globalThis.loaders.NodeFile=xo;globalThis.loaders.NodeFileSystem=uf;globalThis.loaders.fetchNode=of;globalThis.TextEncoder||(globalThis.TextEncoder=Ts);globalThis.TextDecoder||(globalThis.TextDecoder=Jn);!("atob"in globalThis)&&Fs&&(globalThis.atob=Fs);!("btoa"in globalThis)&&Df&&(globalThis.btoa=Df);globalThis.loaders.encodeImageNode=Vb;globalThis.loaders.parseImageNode=Lm;globalThis.loaders.imageFormatsNode=zm;globalThis._parseImageNode=Lm;globalThis._imageFormatsNode=zm;globalThis.loaders.readFileAsArrayBuffer=z6;globalThis.loaders.readFileAsText=L6;globalThis.loaders.requireFromFile=M6;globalThis.loaders.requireFromString=mf;zD<18&&(!("Headers"in globalThis)&&_i&&(globalThis.Headers=_i),!("Response"in globalThis)&&hn&&(globalThis.Response=hn),!("fetch"in globalThis)&&Du&&(globalThis.fetch=Du));var G6="4.0.0-beta.6";var LD={draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},K6={name:"Draco",id:"draco",module:"draco",version:G6,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:LD};function Y6(e){switch(e.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function tv(e){let r=1/0,a=1/0,i=1/0,t=-1/0,n=-1/0,o=-1/0,s=e.POSITION?e.POSITION.value:[],c=s&&s.length;for(let p=0;p<c;p+=3){let f=s[p],m=s[p+1],h=s[p+2];r=f<r?f:r,a=m<a?m:a,i=h<i?h:i,t=f>t?f:t,n=m>n?m:n,o=h>o?h:o}return[[r,a,i],[t,n,o]]}function iv(e,r,a){let i=Y6(r.value),t=a||Q6(r);return{name:e,type:{type:"fixed-size-list",listSize:r.size,children:[{name:"value",type:i}]},nullable:!1,metadata:t}}function Q6(e){let r={};return"byteOffset"in e&&(r.byteOffset=e.byteOffset.toString(10)),"byteStride"in e&&(r.byteStride=e.byteStride.toString(10)),"normalized"in e&&(r.normalized=e.normalized.toString()),r}function J6(e,r,a){let i=Z6(r.metadata),t=[],n=MD(r.attributes);for(let o in e){let s=e[o],c=X6(o,s,n[o]);t.push(c)}if(a){let o=X6("indices",a);t.push(o)}return{fields:t,metadata:i}}function MD(e){let r={};for(let a in e){let i=e[a];r[i.name||"undefined"]=i}return r}function X6(e,r,a){let i=a?Z6(a.metadata):void 0;return iv(e,r,i)}function Z6(e){Object.entries(e);let r={};for(let a in e)r[`${a}.string`]=JSON.stringify(e[a]);return r}var e5={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},ND={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},UD=4,zu=class{constructor(r){this.draco=r,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(r,a={}){let i=new this.draco.DecoderBuffer;i.Init(new Int8Array(r),r.byteLength),this._disableAttributeTransforms(a);let t=this.decoder.GetEncodedGeometryType(i),n=t===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let o;switch(t){case this.draco.TRIANGULAR_MESH:o=this.decoder.DecodeBufferToMesh(i,n);break;case this.draco.POINT_CLOUD:o=this.decoder.DecodeBufferToPointCloud(i,n);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!o.ok()||!n.ptr){let h=`DRACO decompression failed: ${o.error_msg()}`;throw new Error(h)}let s=this._getDracoLoaderData(n,t,a),c=this._getMeshData(n,s,a),p=tv(c.attributes),f=J6(c.attributes,s,c.indices);return{loader:"draco",loaderData:s,header:{vertexCount:n.num_points(),boundingBox:p},...c,schema:f}}finally{this.draco.destroy(i),n&&this.draco.destroy(n)}}_getDracoLoaderData(r,a,i){let t=this._getTopLevelMetadata(r),n=this._getDracoAttributes(r,i);return{geometry_type:a,num_attributes:r.num_attributes(),num_points:r.num_points(),num_faces:r instanceof this.draco.Mesh?r.num_faces():0,metadata:t,attributes:n}}_getDracoAttributes(r,a){let i={};for(let t=0;t<r.num_attributes();t++){let n=this.decoder.GetAttribute(r,t),o=this._getAttributeMetadata(r,t);i[n.unique_id()]={unique_id:n.unique_id(),attribute_type:n.attribute_type(),data_type:n.data_type(),num_components:n.num_components(),byte_offset:n.byte_offset(),byte_stride:n.byte_stride(),normalized:n.normalized(),attribute_index:t,metadata:o};let s=this._getQuantizationTransform(n,a);s&&(i[n.unique_id()].quantization_transform=s);let c=this._getOctahedronTransform(n,a);c&&(i[n.unique_id()].octahedron_transform=c)}return i}_getMeshData(r,a,i){let t=this._getMeshAttributes(a,r,i);if(!t.POSITION)throw new Error("DRACO: No position attribute found.");if(r instanceof this.draco.Mesh)switch(i.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:t,indices:{value:this._getTriangleStripIndices(r),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:t,indices:{value:this._getTriangleListIndices(r),size:1}}}return{topology:"point-list",mode:0,attributes:t}}_getMeshAttributes(r,a,i){let t={};for(let n of Object.values(r.attributes)){let o=this._deduceAttributeName(n,i);n.name=o;let{value:s,size:c}=this._getAttributeValues(a,n);t[o]={value:s,size:c,byteOffset:n.byte_offset,byteStride:n.byte_stride,normalized:n.normalized}}return t}_getTriangleListIndices(r){let i=r.num_faces()*3,t=i*UD,n=this.draco._malloc(t);try{return this.decoder.GetTrianglesUInt32Array(r,t,n),new Uint32Array(this.draco.HEAPF32.buffer,n,i).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(r){let a=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(r,a),$D(a)}finally{this.draco.destroy(a)}}_getAttributeValues(r,a){let i=ND[a.data_type],t=a.num_components,o=r.num_points()*t,s=o*i.BYTES_PER_ELEMENT,c=HD(this.draco,i),p,f=this.draco._malloc(s);try{let m=this.decoder.GetAttribute(r,a.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(r,m,c,s,f),p=new i(this.draco.HEAPF32.buffer,f,o).slice()}finally{this.draco._free(f)}return{value:p,size:t}}_deduceAttributeName(r,a){let i=r.unique_id;for(let[o,s]of Object.entries(a.extraAttributes||{}))if(s===i)return o;let t=r.attribute_type;for(let o in e5)if(this.draco[o]===t)return e5[o];let n=a.attributeNameEntry||"name";return r.metadata[n]?r.metadata[n].string:`CUSTOM_ATTRIBUTE_${i}`}_getTopLevelMetadata(r){let a=this.decoder.GetMetadata(r);return this._getDracoMetadata(a)}_getAttributeMetadata(r,a){let i=this.decoder.GetAttributeMetadata(r,a);return this._getDracoMetadata(i)}_getDracoMetadata(r){if(!r||!r.ptr)return{};let a={},i=this.metadataQuerier.NumEntries(r);for(let t=0;t<i;t++){let n=this.metadataQuerier.GetEntryName(r,t);a[n]=this._getDracoMetadataField(r,n)}return a}_getDracoMetadataField(r,a){let i=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(r,a,i);let t=VD(i);return{int:this.metadataQuerier.GetIntEntry(r,a),string:this.metadataQuerier.GetStringEntry(r,a),double:this.metadataQuerier.GetDoubleEntry(r,a),intArray:t}}finally{this.draco.destroy(i)}}_disableAttributeTransforms(r){let{quantizedAttributes:a=[],octahedronAttributes:i=[]}=r,t=[...a,...i];for(let n of t)this.decoder.SkipAttributeTransform(this.draco[n])}_getQuantizationTransform(r,a){let{quantizedAttributes:i=[]}=a,t=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(t)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits(),range:o.range(),min_values:new Float32Array([1,2,3]).map(s=>o.min_value(s))}}finally{this.draco.destroy(o)}}return null}_getOctahedronTransform(r,a){let{octahedronAttributes:i=[]}=a,t=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(t)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits()}}finally{this.draco.destroy(o)}}return null}};function HD(e,r){switch(r){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32;default:return e.DT_INVALID}}function VD(e){let r=e.size(),a=new Int32Array(r);for(let i=0;i<r;i++)a[i]=e.GetValue(i);return a}function $D(e){let r=e.size(),a=new Int32Array(r);for(let i=0;i<r;i++)a[i]=e.GetValue(i);return a}var WD="1.5.6",GD="1.4.1",nv=`https://www.gstatic.com/draco/versioned/decoders/${WD}`,Rt={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},ov={[Rt.DECODER]:`${nv}/${Rt.DECODER}`,[Rt.DECODER_WASM]:`${nv}/${Rt.DECODER_WASM}`,[Rt.FALLBACK_DECODER]:`${nv}/${Rt.FALLBACK_DECODER}`,[Rt.ENCODER]:`https://raw.githubusercontent.com/google/draco/${GD}/javascript/${Rt.ENCODER}`},Lu;async function r5(e){let r=e.modules||{};return r.draco3d?Lu=Lu||r.draco3d.createDecoderModule({}).then(a=>({draco:a})):Lu=Lu||KD(e),await Lu}async function KD(e){let r,a;switch(e.draco&&e.draco.decoderType){case"js":r=await Bu(ov[Rt.FALLBACK_DECODER],"draco",e,Rt.FALLBACK_DECODER);break;case"wasm":default:[r,a]=await Promise.all([await Bu(ov[Rt.DECODER],"draco",e,Rt.DECODER),await Bu(ov[Rt.DECODER_WASM],"draco",e,Rt.DECODER_WASM)])}return r=r||globalThis.DracoDecoderModule,await YD(r,a)}function YD(e,r){let a={};return r&&(a.wasmBinary=r),new Promise(i=>{e({...a,onModuleLoaded:t=>i({draco:t})})})}var a5={...K6,parse:QD};async function QD(e,r){let{draco:a}=await r5(r),i=new zu(a);try{return i.parseSync(e,r==null?void 0:r.draco)}finally{i.destroy()}}$m(a5);
|
|
95
95
|
/*! Bundled license information:
|
|
96
96
|
|
|
97
97
|
is-buffer/index.js:
|