@loaders.gl/draco 3.3.0-alpha.6 → 3.3.0-alpha.7
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.
|
@@ -92,7 +92,7 @@ caused by: `+Vr.fullStack(r):e.stack};Vr.errorFromList=function(e){return zt.arr
|
|
|
92
92
|
`,a(o),a(n.body),a(`\r
|
|
93
93
|
`)}),a("--"+t.boundary+"--"),t.request.postambleCRLF&&a(`\r
|
|
94
94
|
`),i};gc.prototype.onRequest=function(e){var r=this,t=r.isChunked(e),i=e.data||e;r.setHeaders(t),r.chunked=t,r.body=r.build(i,t)};cS.Multipart=gc});var dS=R(pS=>{"use strict";var fS=require("url"),Kz=/^https?:/;function rp(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}rp.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)};rp.prototype.redirectTo=function(e){var r=this,t=r.request,i=null;if(e.statusCode>=300&&e.statusCode<400&&e.caseless.has("location")){var a=e.caseless.get("location");if(t.debug("redirect",a),r.followAllRedirects)i=a;else if(r.followRedirects)switch(t.method){case"PATCH":case"PUT":case"POST":case"DELETE":break;default:i=a;break}}else if(e.statusCode===401){var n=t._auth.onResponse(e);n&&(t.setHeader("authorization",n),i=t.uri)}return i};rp.prototype.onResponse=function(e){var r=this,t=r.request,i=r.redirectTo(e);if(!i||!r.allowRedirect.call(t,e))return!1;if(t.debug("redirect to",i),e.resume&&e.resume(),r.redirectsFollowed>=r.maxRedirects)return t.emit("error",new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+t.uri.href)),!1;r.redirectsFollowed+=1,Kz.test(i)||(i=fS.resolve(t.uri.href,i));var a=t.uri;return t.uri=fS.parse(i),t.uri.protocol!==a.protocol&&delete t.agent,r.redirects.push({statusCode:e.statusCode,redirectUri:i}),r.followAllRedirects&&t.method!=="HEAD"&&e.statusCode!==401&&e.statusCode!==307&&(t.method=r.followOriginalHttpMethod?t.method:"GET"),delete t.src,delete t.req,delete t._started,e.statusCode!==401&&e.statusCode!==307&&(delete t.body,delete t._form,t.headers&&(t.removeHeader("host"),t.removeHeader("content-type"),t.removeHeader("content-length"),t.uri.hostname!==t.originalHost.split(":")[0]&&t.removeHeader("authorization"))),r.removeRefererHeader||t.setHeader("referer",a.href),t.emit("redirect"),t.init(),!0};pS.Redirect=rp});var gS=R($s=>{"use strict";var yG=require("net"),Yz=require("tls"),Zv=require("http"),hS=require("https"),Qz=require("events"),Xz=require("assert"),Jz=require("util"),Zz=ms().Buffer;$s.httpOverHttp=eL;$s.httpsOverHttp=rL;$s.httpOverHttps=tL;$s.httpsOverHttps=aL;function eL(e){var r=new nn(e);return r.request=Zv.request,r}function rL(e){var r=new nn(e);return r.request=Zv.request,r.createSocket=mS,r.defaultPort=443,r}function tL(e){var r=new nn(e);return r.request=hS.request,r}function aL(e){var r=new nn(e);return r.request=hS.request,r.createSocket=mS,r.defaultPort=443,r}function nn(e){var r=this;r.options=e||{},r.proxyOptions=r.options.proxy||{},r.maxSockets=r.options.maxSockets||Zv.Agent.defaultMaxSockets,r.requests=[],r.sockets=[],r.on("free",function(i,a,n){for(var o=0,s=r.requests.length;o<s;++o){var c=r.requests[o];if(c.host===a&&c.port===n){r.requests.splice(o,1),c.request.onSocket(i);return}}i.destroy(),r.removeSocket(i)})}Jz.inherits(nn,Qz.EventEmitter);nn.prototype.addRequest=function(r,t){var i=this;if(typeof t=="string"&&(t={host:t,port:arguments[2],path:arguments[3]}),i.sockets.length>=this.maxSockets){i.requests.push({host:t.host,port:t.port,request:r});return}i.createConnection({host:t.host,port:t.port,request:r})};nn.prototype.createConnection=function(r){var t=this;t.createSocket(r,function(i){i.on("free",a),i.on("close",n),i.on("agentRemove",n),r.request.onSocket(i);function a(){t.emit("free",i,r.host,r.port)}function n(o){t.removeSocket(i),i.removeListener("free",a),i.removeListener("close",n),i.removeListener("agentRemove",n)}})};nn.prototype.createSocket=function(r,t){var i=this,a={};i.sockets.push(a);var n=vS({},i.proxyOptions,{method:"CONNECT",path:r.host+":"+r.port,agent:!1});n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+Zz.from(n.proxyAuth).toString("base64")),No("making CONNECT request");var o=i.request(n);o.useChunkedEncodingByDefault=!1,o.once("response",s),o.once("upgrade",c),o.once("connect",f),o.once("error",p),o.end();function s(m){m.upgrade=!0}function c(m,h,v){process.nextTick(function(){f(m,h,v)})}function f(m,h,v){if(o.removeAllListeners(),h.removeAllListeners(),m.statusCode===200)Xz.equal(v.length,0),No("tunneling connection has established"),i.sockets[i.sockets.indexOf(a)]=h,t(h);else{No("tunneling socket could not be established, statusCode=%d",m.statusCode);var y=new Error("tunneling socket could not be established, statusCode="+m.statusCode);y.code="ECONNRESET",r.request.emit("error",y),i.removeSocket(a)}}function p(m){o.removeAllListeners(),No(`tunneling socket could not be established, cause=%s
|
|
95
|
-
`,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(a)}};nn.prototype.removeSocket=function(r){var t=this.sockets.indexOf(r);if(t!==-1){this.sockets.splice(t,1);var i=this.requests.shift();i&&this.createConnection(i)}};function mS(e,r){var t=this;nn.prototype.createSocket.call(t,e,function(i){var a=Yz.connect(0,vS({},t.options,{servername:e.host,socket:i}));t.sockets[t.sockets.indexOf(i)]=a,r(a)})}function vS(e){for(var r=1,t=arguments.length;r<t;++r){var i=arguments[r];if(typeof i=="object")for(var a=Object.keys(i),n=0,o=a.length;n<o;++n){var s=a[n];i[s]!==void 0&&(e[s]=i[s])}}return e}var No;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?No=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)}:No=function(){};$s.debug=No});var wS=R(xS=>{"use strict";var iL=require("url"),nL=gS(),bS=["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"],yS=["proxy-authorization"];function oL(e){var r=e.port,t=e.protocol,i=e.hostname+":";return r?i+=r:t==="https:"?i+="443":i+="80",i}function sL(e,r){var t=r.reduce(function(i,a){return i[a.toLowerCase()]=!0,i},{});return Object.keys(e).filter(function(i){return t[i.toLowerCase()]}).reduce(function(i,a){return i[a]=e[a],i},{})}function uL(e,r){var t=e.proxy,i={proxy:{host:t.hostname,port:+t.port,proxyAuth:t.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 cL(e,r){var t=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[t,i].join("Over")}function lL(e){var r=e.uri,t=e.proxy,i=cL(r,t);return nL[i]}function bc(e){this.request=e,this.proxyHeaderWhiteList=bS,this.proxyHeaderExclusiveList=[],typeof e.tunnel!="undefined"&&(this.tunnelOverride=e.tunnel)}bc.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride!="undefined"?e.tunnelOverride:r.uri.protocol==="https:"};bc.prototype.setup=function(e){var r=this,t=r.request;if(e=e||{},typeof t.proxy=="string"&&(t.proxy=iL.parse(t.proxy)),!t.proxy||!t.tunnel)return!1;e.proxyHeaderWhiteList&&(r.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(r.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=r.proxyHeaderExclusiveList.concat(yS),a=r.proxyHeaderWhiteList.concat(i),n=sL(t.headers,a);n.host=oL(t.uri),i.forEach(t.removeHeader,t);var o=lL(t),s=uL(t,n);return t.agent=o(s),!0};bc.defaultProxyHeaderWhiteList=bS;bc.defaultProxyHeaderExclusiveList=yS;xS.Tunnel=bc});var _S=R((kS,yc)=>{(function(){var e,r,t,i,a,n;typeof performance!="undefined"&&performance!==null&&performance.now?yc.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(yc.exports=function(){return(e()-a)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},i=e(),n=process.uptime()*1e9,a=i-n):Date.now?(yc.exports=function(){return Date.now()-t},t=Date.now()):(yc.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(kS)});var OS=R((kG,qS)=>{"use strict";var fL=require("http"),jS=require("https"),xc=require("url"),e0=require("util"),tp=require("stream"),ap=require("zlib"),r0=c2(),pL=y2(),dL=c3(),hL=Pf(),SS=Tf(),ES=b3(),mL=W3(),vL=El(),AS=gv(),gL=J3().strict,Ws=Il(),bL=Ph(),yL=rj(),xL=dj().Querystring,wL=M5().Har,kL=Q5().Auth,_L=sS().OAuth,jL=uS(),SL=lS().Multipart,EL=dS().Redirect,t0=wS().Tunnel,Gs=_S(),wc=ms().Buffer,PS=Ws.safeStringify,AL=Ws.isReadStream,PL=Ws.toBase64,TL=Ws.defer,TS=Ws.copy,CL=Ws.version,CS=bL.jar(),IS={};function IL(e,r){var t={};for(var i in r){var a=e.indexOf(i)===-1;a&&(t[i]=r[i])}return t}function FL(e,r){var t={};for(var i in r){var a=e.indexOf(i)!==-1,n=typeof r[i]=="function";a&&n||(t[i]=r[i])}return t}function FS(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function qL(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:FS.call(e.request)}}function Rr(e){var r=this;e.har&&(r._har=new wL(r),e=r._har.options(e)),tp.Stream.call(r);var t=Object.keys(Rr.prototype),i=IL(t,e);vL(r,i),e=FL(t,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new xL(r),r._auth=new kL(r),r._oauth=new _L(r),r._multipart=new SL(r),r._redirect=new EL(r),r._tunnel=new t0(r),r.init(e)}e0.inherits(Rr,tp.Stream);Rr.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function aa(){Rr.debug&&console.error("REQUEST %s",e0.format.apply(e0,arguments))}Rr.prototype.debug=aa;Rr.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?TS(r.headers):{};for(var t in r.headers)typeof r.headers[t]=="undefined"&&delete r.headers[t];if(SS.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),aa(e),!r.pool&&r.pool!==!1&&(r.pool=IS),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,a=r.uri.indexOf("/")===0;i&&a?r.uri=r.baseUrl+r.uri.slice(1):i||a?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=xc.parse(r.uri)),r.uri.href||(r.uri.href=xc.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=xc.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=yL(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,f=r.form(),p=function(B,L){L&&L.hasOwnProperty("value")&&L.hasOwnProperty("options")?f.append(B,L.value,L.options):f.append(B,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++)p(m,h[v]);else p(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 y=r.uri.auth.split(":").map(function(B){return r._qs.unescape(B)});r.auth(y[0],y.slice(1).join(":"),!0)}if(!r.tunnel&&r.proxy&&r.proxy.auth&&!r.hasHeader("proxy-authorization")){var E=r.proxy.auth.split(":").map(function(B){return r._qs.unescape(B)}),w="Basic "+PL(E.join(":"));r.setHeader("proxy-authorization",w)}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(gL(r.body)&&(r.body=wc.from(r.body)),!r.hasHeader("content-length")){var B;typeof r.body=="string"?B=wc.byteLength(r.body):Array.isArray(r.body)?B=r.body.reduce(function(L,V){return L+V.length},0):B=r.body.length,B?r.setHeader("content-length",B):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!AS(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:":fL,"https:":jS},O=r.httpModules||{};if(r.httpModule=O[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 F=CL();F.major===0&&F.minor<=10?r.agentClass=C==="http:"?ES:ES.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(B){if(r.ntick&&r._started&&r.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),r.src=B,AL(B))r.hasHeader("content-type")||r.setHeader("content-type",hL.lookup(B.path));else{if(B.headers)for(var L in B.headers)r.hasHeader(L)||r.setHeader(L,B.headers[L]);r._json&&!r.hasHeader("content-type")&&r.setHeader("content-type","application/json"),B.method&&!r.explicitMethod&&(r.method=B.method)}}),TL(function(){if(!r._aborted){var B=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)AS(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!="undefined"&&r.setHeader("content-length",0),r.end()}};r._form&&!r.hasHeader("content-length")?(r.setHeader(r._form.getHeaders(),!0),r._form.getLength(function(L,V){!L&&!isNaN(V)&&r.setHeader("content-length",V),B()})):B(),r.ntick=!0}})};Rr.prototype.getNewAgent=function(){var e=this,r=e.agentClass,t={};if(e.agentOptions)for(var i in e.agentOptions)t[i]=e.agentOptions[i];e.ca&&(t.ca=e.ca),e.ciphers&&(t.ciphers=e.ciphers),e.secureProtocol&&(t.secureProtocol=e.secureProtocol),e.secureOptions&&(t.secureOptions=e.secureOptions),typeof e.rejectUnauthorized!="undefined"&&(t.rejectUnauthorized=e.rejectUnauthorized),e.cert&&e.key&&(t.key=e.key,t.cert=e.cert),e.pfx&&(t.pfx=e.pfx),e.passphrase&&(t.passphrase=e.passphrase);var a="";r!==e.httpModule.Agent&&(a+=r.name);var n=e.proxy;typeof n=="string"&&(n=xc.parse(n));var o=n&&n.protocol==="https:"||this.uri.protocol==="https:";return o&&(t.ca&&(a&&(a+=":"),a+=t.ca),typeof t.rejectUnauthorized!="undefined"&&(a&&(a+=":"),a+=t.rejectUnauthorized),t.cert&&(a&&(a+=":"),a+=t.cert.toString("ascii")+t.key.toString("ascii")),t.pfx&&(a&&(a+=":"),a+=t.pfx.toString("ascii")),t.ciphers&&(a&&(a+=":"),a+=t.ciphers),t.secureProtocol&&(a&&(a+=":"),a+=t.secureProtocol),t.secureOptions&&(a&&(a+=":"),a+=t.secureOptions)),e.pool===IS&&!a&&Object.keys(t).length===0&&e.httpModule.globalAgent?e.httpModule.globalAgent:(a=e.uri.protocol+a,e.pool[a]||(e.pool[a]=new r(t),e.pool.maxSockets&&(e.pool[a].maxSockets=e.pool.maxSockets)),e.pool[a])};Rr.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),t=Gs();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=TS(e);delete i.auth,aa("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=t,e.timings={});var a;e.timeout&&!e.timeoutTimer&&(e.timeout<0?a=0:typeof e.timeout=="number"&&isFinite(e.timeout)&&(a=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=Gs()-e.startTimeNow,o)){var s=function(){e.timings.lookup=Gs()-e.startTimeNow},c=function(){e.timings.connect=Gs()-e.startTimeNow};n.once("lookup",s),n.once("connect",c),e.req.once("error",function(){n.removeListener("lookup",s),n.removeListener("connect",c)})}var f=function(){e.req.setTimeout(a,function(){if(e.req){e.abort();var m=new Error("ESOCKETTIMEDOUT");m.code="ESOCKETTIMEDOUT",m.connect=!1,e.emit("error",m)}})};if(a!==void 0)if(o){var p=function(){n.removeListener("connect",p),e.clearTimeout(),f()};n.on("connect",p),e.req.on("error",function(m){n.removeListener("connect",p)}),e.timeoutTimer=setTimeout(function(){n.removeListener("connect",p),e.abort();var m=new Error("ETIMEDOUT");m.code="ETIMEDOUT",m.connect=!0,e.emit("error",m)},a)}else f();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=Gs()-r.startTimeNow),aa("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=Gs()-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),aa("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}),aa("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){aa("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=qL,r.httpModule===jS&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){aa("strict ssl error",r.uri.href);var t=e.hasOwnProperty("socket")?e.socket.authorizationError:r.uri.href+" does not support SSL";r.emit("error",new Error("SSL Error: "+t));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:CS,a=function(p){try{i.setCookie(p,r.uri.href,{ignoreError:!0})}catch(m){r.emit("error",m)}};if(e.caseless=SS(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(a):a(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(p){return r.method==="HEAD"||p>=100&&p<200||p===204||p===304},s;if(r.gzip&&!o(e.statusCode)){var c=e.headers["content-encoding"]||"identity";c=c.trim().toLowerCase();var f={flush:ap.Z_SYNC_FLUSH,finishFlush:ap.Z_SYNC_FLUSH};c==="gzip"?(s=ap.createGunzip(f),e.pipe(s)):c==="deflate"?(s=ap.createInflate(f),e.pipe(s)):(c!=="identity"&&aa("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(p){r.pipeDest(p)}),s.on("data",function(p){r.timing&&!r.responseStarted&&(r.responseStartTime=new Date().getTime(),e.responseStartTime=r.responseStartTime),r._destdata=!0,r.emit("data",p)}),s.once("end",function(p){r.emit("end",p)}),s.on("error",function(p){r.emit("error",p)}),s.on("close",function(){r.emit("close")}),r.callback?r.readResponseBody(e):r.on("end",function(){if(r._aborted){aa("aborted",r.uri.href);return}r.emit("complete",e)})}aa("finish init function",r.uri.href)}};Rr.prototype.readResponseBody=function(e){var r=this;aa("reading response's body");var t=[],i=0,a=[];r.on("data",function(n){wc.isBuffer(n)?n.length&&(i+=n.length,t.push(n)):a.push(n)}),r.on("end",function(){if(aa("end event",r.uri.href),r._aborted){aa("aborted",r.uri.href),t=[],i=0;return}if(i?(aa("has body",r.uri.href,i),e.body=wc.concat(t,i),r.encoding!==null&&(e.body=e.body.toString(r.encoding)),t=[],i=0):a.length&&(r.encoding==="utf8"&&a[0].length>0&&a[0][0]==="\uFEFF"&&(a[0]=a[0].substring(1)),e.body=a.join("")),r._json)try{e.body=JSON.parse(e.body,r._jsonReviver)}catch{aa("invalid JSON received",r.uri.href)}aa("emitting complete",r.uri.href),typeof e.body=="undefined"&&!r._json&&(e.body=r.encoding===null?wc.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,t=r.response;if(e.headers&&!e.headersSent){if(t.caseless.has("content-type")){var i=t.caseless.has("content-type");e.setHeader?e.setHeader(i,t.headers[i]):e.headers[i]=t.headers[i]}if(t.caseless.has("content-length")){var a=t.caseless.has("content-length");e.setHeader?e.setHeader(a,t.headers[a]):e.headers[a]=t.headers[a]}}if(e.setHeader&&!e.headersSent){for(var n in t.headers)(!r.gzip||n!=="content-encoding")&&e.setHeader(n,t.headers[n]);e.statusCode=t.statusCode}r.pipefilter&&r.pipefilter(t,e)};Rr.prototype.qs=function(e,r){var t=this,i;!r&&t.uri.query?i=t._qs.parse(t.uri.query):i={};for(var a in e)i[a]=e[a];var n=t._qs.stringify(i);return n===""||(t.uri=xc.parse(t.uri.href.split("?")[0]+"?"+n),t.url=t.uri,t.path=t.uri.path,t.uri.host==="unix"&&t.enableUnixSocket()),t};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 mL,r._form.on("error",function(t){t.message="form-data: "+t.message,r.emit("error",t),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=PS(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=PS(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 t=this,i,a,n;return r||(r=t.headers),Object.keys(r).forEach(function(o){o.length===e.length&&(a=new RegExp(e,"i"),n=o.match(a),n&&(i=r[o]))}),i};Rr.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),r=e[0],t=e[1];this.socketPath=r,this.uri.pathname=t,this.uri.path=t,this.uri.host=r,this.uri.hostname=r,this.uri.isUnix=!0};Rr.prototype.auth=function(e,r,t,i){var a=this;return a._auth.onRequest(e,r,t,i),a};Rr.prototype.aws=function(e,r){var t=this;if(!r)return t._aws=e,t;if(e.sign_version===4||e.sign_version==="4"){var i={host:t.uri.host,path:t.uri.path,method:t.method,headers:t.headers,body:t.body};e.service&&(i.service=e.service);var a=pL.sign(i,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});t.setHeader("authorization",a.headers.Authorization),t.setHeader("x-amz-date",a.headers["X-Amz-Date"]),a.headers["X-Amz-Security-Token"]&&t.setHeader("x-amz-security-token",a.headers["X-Amz-Security-Token"])}else{var n=new Date;t.setHeader("date",n.toUTCString());var o={key:e.key,secret:e.secret,verb:t.method.toUpperCase(),date:n,contentType:t.getHeader("content-type")||"",md5:t.getHeader("content-md5")||"",amazonHeaders:r0.canonicalizeHeaders(t.headers)},s=t.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=r0.canonicalizeResource(o.resource),t.setHeader("authorization",r0.authorization(o))}return t};Rr.prototype.httpSignature=function(e){var r=this;return dL.signRequest({getHeader:function(t){return r.getHeader(t,r.headers)},setHeader:function(t,i){r.setHeader(t,i)},method:r.method,path:r.path},e),aa("httpSignature authorization",r.getHeader("authorization")),r};Rr.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",jL.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,t;if(r._redirect.redirectsFollowed===0&&(r.originalCookieHeader=r.getHeader("cookie")),!e)t=!1,r._disableCookies=!0;else{var i=e.getCookieString?e:CS,a=r.uri.href;i&&(t=i.getCookieString(a))}return t&&t.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+t):r.setHeader("cookie",t)),r._jar=e,r};Rr.prototype.pipe=function(e,r){var t=this;if(t.response)if(t._destdata)t.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(t._ended)t.emit("error",new Error("You cannot pipe after the response has been ended."));else return tp.Stream.prototype.pipe.call(t,e,r),t.pipeDest(e),e;else return t.dests.push(e),tp.Stream.prototype.pipe.call(t,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=t0.defaultProxyHeaderWhiteList.slice();Rr.defaultProxyHeaderExclusiveList=t0.defaultProxyHeaderExclusiveList.slice();Rr.prototype.toJSON=FS;qS.exports=Rr});var DS=R((_G,BS)=>{"use strict";var kc=El(),RS=Ph(),OL=Il(),RL=OL.paramsHaveRequestBody;function ip(e,r,t){typeof r=="function"&&(t=r);var i={};return r!==null&&typeof r=="object"?kc(i,r,{uri:e}):typeof e=="string"?kc(i,{uri:e}):kc(i,e),i.callback=t||i.callback,i}function It(e,r,t){if(typeof e=="undefined")throw new Error("undefined is not a valid uri or options object.");var i=ip(e,r,t);if(i.method==="HEAD"&&RL(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new It.Request(i)}function co(e){var r=e.toUpperCase();return function(t,i,a){var n=ip(t,i,a);return n.method=r,It(n,n.callback)}}It.get=co("get");It.head=co("head");It.options=co("options");It.post=co("post");It.put=co("put");It.patch=co("patch");It.del=co("delete");It.delete=co("delete");It.jar=function(e){return RS.jar(e)};It.cookie=function(e){return RS.parse(e)};function a0(e,r,t,i){return function(a,n,o){var s=ip(a,n,o),c={};return kc(!0,c,r,s),c.pool=s.pool||r.pool,i&&(c.method=i.toUpperCase()),typeof t=="function"&&(e=t),e(c,c.callback)}}It.defaults=function(e,r){var t=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=a0(t,e,r),a=["get","head","post","put","patch","del","delete"];return a.forEach(function(n){i[n]=a0(t[n],e,r,n)}),i.cookie=a0(t.cookie,e,r),i.jar=t.jar,i.defaults=t.defaults,i};It.forever=function(e,r){var t={};return r&&kc(t,r),e&&(t.agentOptions=e),t.forever=!0,It.defaults(t)};BS.exports=It;It.Request=OS();It.initParams=ip;Object.defineProperty(It,"debug",{enumerable:!0,get:function(){return It.Request.debug},set:function(e){It.Request.debug=e}})});var LS=R((jG,zS)=>{zS.exports=BL;function BL(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 t=e.substring(5,r).split(";"),i=!1,a="US-ASCII",n=0;n<t.length;n++)t[n]=="base64"?i=!0:t[n].indexOf("charset=")==0&&(a=t[n].substring(8));var o=unescape(e.substring(r+1)),s=i?"base64":"ascii",c=new Buffer(o,s);return c.type=t[0]||"text/plain",c.charset=a,c}});var US=R((SG,MS)=>{var DL=LS();function zL(e){return{mimeType:NL(LL(e)),data:DL(e)}}function LL(e){return e.substring(5,e.indexOf(";"))}var NS=/^(\w+\/)+/;function NL(e){e=e.toLowerCase();var r=e.match(NS);return!r||!(r=r[1])?e:e.replace(NS,r)}MS.exports=zL});var VS=R((AG,HS)=>{"use strict";var _c=Pu(),EG=require("path"),ML=sw().PNG,UL=Od(),HL=pw(),VL=hw().GifReader,$L=yw(),WL=require("fs"),GL=DS(),KL=Pf(),YL=US();function QL(e,r){var t=new ML;t.parse(e,function(i,a){if(i){r(i);return}r(null,_c(new Uint8Array(a.data),[a.width|0,a.height|0,4],[4,4*a.width|0,1],0))})}function XL(e,r){var t;try{t=UL.decode(e)}catch(n){r(n);return}if(!t){r(new Error("Error decoding jpeg"));return}var i=[t.height,t.width,4],a=_c(t.data,i);r(null,a.transpose(1,0))}function JL(e,r){var t;try{t=new VL(e)}catch(s){r(s);return}if(t.numFrames()>0){var i=[t.numFrames(),t.height,t.width,4];try{var a=new Uint8Array(i[0]*i[1]*i[2]*i[3])}catch(s){r(s);return}var n=_c(a,i);try{for(var o=0;o<t.numFrames();++o)t.decodeAndBlitFrameRGBA(o,a.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=[t.height,t.width,4],a=new Uint8Array(i[0]*i[1]*i[2]),n=_c(a,i);try{t.decodeAndBlitFrameRGBA(0,a)}catch(p){r(p);return}r(null,n.transpose(1,0))}}function ZL(e,r){var t=new $L(e);try{t.init()}catch(s){r(s);return}var i=t.getData(),a=[i.getHeight(),i.getWidth(),4],n=new Uint8Array(a[0]*a[1]*a[2]),o=_c(n,a);HL(i,o),r(null,o.transpose(1,0))}function np(e,r,t){switch(e){case"image/png":QL(r,t);break;case"image/jpg":case"image/jpeg":XL(r,t);break;case"image/gif":JL(r,t);break;case"image/bmp":ZL(r,t);break;default:t(new Error("Unsupported file type: "+e))}}HS.exports=function(r,t,i){if(i||(i=t,t=""),Buffer.isBuffer(r)){if(!t){i(new Error("Invalid file type"));return}np(t,r,i)}else if(r.indexOf("data:")===0)try{var a=YL(r);a?process.nextTick(function(){np(t||a.mimeType,a.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?GL({url:r,encoding:null},function(n,o,s){if(n){i(n);return}if(t=t,t||(o.getHeader!==void 0?t=o.getHeader("content-type"):o.headers!==void 0&&(t=o.headers["content-type"])),!t){i(new Error("Invalid content-type"));return}np(t,s,i)}):WL.readFile(r,function(n,o){if(n){i(n);return}if(t=t||KL.lookup(r),!t){i(new Error("Invalid file type"));return}np(t,o,i)})}});var KS=R((op,GS)=>{(function(e,r){typeof op=="object"&&typeof GS!="undefined"?r(op):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(op,function(e){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(u){return"Symbol("+u+")"};function t(){}function i(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}var a=i();function n(u){return typeof u=="object"&&u!==null||typeof u=="function"}var o=t,s=Promise,c=Promise.prototype.then,f=Promise.resolve.bind(s),p=Promise.reject.bind(s);function m(u){return new s(u)}function h(u){return f(u)}function v(u){return p(u)}function y(u,d,j){return c.call(u,d,j)}function E(u,d,j){y(y(u,d,j),void 0,o)}function w(u,d){E(u,d)}function A(u,d){E(u,void 0,d)}function C(u,d,j){return y(u,d,j)}function T(u){y(u,void 0,o)}var O=function(){var u=a&&a.queueMicrotask;if(typeof u=="function")return u;var d=h(void 0);return function(j){return y(d,j)}}();function F(u,d,j){if(typeof u!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(u,d,j)}function B(u,d,j){try{return h(F(u,d,j))}catch(D){return v(D)}}var L=16384,V=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,D=j;j._elements.length===L-1&&(D={_elements:[],_next:void 0}),j._elements.push(d),D!==j&&(this._back=D,j._next=D),++this._size},u.prototype.shift=function(){var d=this._front,j=d,D=this._cursor,G=D+1,ue=d._elements,ye=ue[D];return G===L&&(j=d._next,G=0),--this._size,this._cursor=G,d!==j&&(this._front=j),ue[D]=void 0,ye},u.prototype.forEach=function(d){for(var j=this._cursor,D=this._front,G=D._elements;(j!==G.length||D._next!==void 0)&&!(j===G.length&&(D=D._next,G=D._elements,j=0,G.length===0));)d(G[j]),++j},u.prototype.peek=function(){var d=this._front,j=this._cursor;return d._elements[j]},u}();function $(u,d){u._ownerReadableStream=d,d._reader=u,d._state==="readable"?H(u):d._state==="closed"?te(u):J(u,d._storedError)}function K(u,d){var j=u._ownerReadableStream;return di(j,d)}function W(u){u._ownerReadableStream._state==="readable"?le(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):pe(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 Z(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 J(u,d){H(u),le(u,d)}function te(u){H(u),de(u)}function le(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 pe(u,d){J(u,d)}function de(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}var Se=r("[[AbortSteps]]"),xe=r("[[ErrorSteps]]"),Ne=r("[[CancelSteps]]"),He=r("[[PullSteps]]"),De=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 ke(u){return typeof u=="object"||typeof u=="function"}function Qe(u,d){if(u!==void 0&&!ke(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 Q(u){return typeof u=="object"&&u!==null||typeof u=="function"}function rr(u,d){if(!Q(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 he(u,d,j){if(u===void 0)throw new TypeError(d+" is required in '"+j+"'.")}function _e(u){return Number(u)}function ir(u){return u===0?0:u}function Te(u){return ir(U(u))}function ur(u,d){var j=0,D=Number.MAX_SAFE_INTEGER,G=Number(u);if(G=ir(G),!De(G))throw new TypeError(d+" is not a finite number");if(G=Te(G),G<j||G>D)throw new TypeError(d+" is outside the accepted range of "+j+" to "+D+", inclusive");return!De(G)||G===0?0:G}function Br(u,d){if(!Fn(u))throw new TypeError(d+" is not a ReadableStream.")}function Gr(u){return new Ye(u)}function ee(u,d){u._reader._readRequests.push(d)}function Oe(u,d,j){var D=u._reader,G=D._readRequests.shift();j?G._closeSteps():G._chunkSteps(d)}function Ge(u){return u._reader._readRequests.length}function Ve(u){var d=u._reader;return!(d===void 0||!Ze(d))}var Ye=function(){function u(d){if(qe(d,1,"ReadableStreamDefaultReader"),Br(d,"First parameter"),qn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");$(this,d),this._readRequests=new V}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(Z("cancel")):K(this,d):v(mr("cancel"))},u.prototype.read=function(){if(!Ze(this))return v(mr("read"));if(this._ownerReadableStream===void 0)return v(Z("read from"));var d,j,D=m(function(ue,ye){d=ue,j=ye}),G={_chunkSteps:function(ue){return d({value:ue,done:!1})},_closeSteps:function(){return d({value:void 0,done:!0})},_errorSteps:function(ue){return j(ue)}};return nr(this,G),D},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");W(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[He](d)}function mr(u){return new TypeError("ReadableStreamDefaultReader.prototype."+u+" can only be used on a ReadableStreamDefaultReader")}var Or,vr;typeof r.asyncIterator=="symbol"&&(vr=(Or={},Or[r.asyncIterator]=function(){return this},Or),Object.defineProperty(vr,r.asyncIterator,{enumerable:!1}));var be=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,D=function(){return j._returnSteps(d)};return this._ongoingPromise?C(this._ongoingPromise,D,D):D()},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(Z("iterate"));var D,G,ue=m(function(Je,Er){D=Je,G=Er}),ye={_chunkSteps:function(Je){d._ongoingPromise=void 0,O(function(){return D({value:Je,done:!1})})},_closeSteps:function(){d._ongoingPromise=void 0,d._isFinished=!0,W(j),D({value:void 0,done:!0})},_errorSteps:function(Je){d._ongoingPromise=void 0,d._isFinished=!0,W(j),G(Je)}};return nr(j,ye),ue},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(Z("finish iterating"));if(!this._preventCancel){var D=K(j,d);return W(j),C(D,function(){return{value:d,done:!0}})}return W(j),h({value:d,done:!0})},u}(),Ke={next:function(){return Pr(this)?this._asyncIteratorImpl.next():v(lr("next"))},return:function(u){return Pr(this)?this._asyncIteratorImpl.return(u):v(lr("return"))}};vr!==void 0&&Object.setPrototypeOf(Ke,vr);function pr(u,d){var j=Gr(u),D=new be(j,d),G=Object.create(Ke);return G._asyncIteratorImpl=D,G}function Pr(u){if(!n(u)||!Object.prototype.hasOwnProperty.call(u,"_asyncIteratorImpl"))return!1;try{return u._asyncIteratorImpl instanceof be}catch{return!1}}function lr(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,D,G){new Uint8Array(u).set(new Uint8Array(j,D,G),d)}function cr(u){return u}function $r(u){return!1}function Cr(u,d,j){if(u.slice)return u.slice(d,j);var D=j-d,G=new ArrayBuffer(D);return or(G,0,u,d,D),G}function _t(u){return!(typeof u!="number"||gr(u)||u<0)}function Ft(u){var d=Cr(u.buffer,u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(d)}function ia(u){var d=u._queue.shift();return u._queueTotalSize-=d.size,u._queueTotalSize<0&&(u._queueTotalSize=0),d.value}function pa(u,d,j){if(!_t(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 et(u){var d=u._queue.peek();return d.value}function st(u){u._queue=new V,u._queueTotalSize=0}var dt=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"view",{get:function(){if(!na(this))throw Le("view");return this._view},enumerable:!1,configurable:!0}),u.prototype.respond=function(d){if(!na(this))throw Le("respond");if(qe(d,1,"respond"),d=ur(d,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");$r(this._view.buffer),Xe(this._associatedReadableByteStreamController,d)},u.prototype.respondWithNewView=function(d){if(!na(this))throw Le("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");$r(d.buffer),Ce(this._associatedReadableByteStreamController,d)},u}();Object.defineProperties(dt.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(dt.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var qt=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"byobRequest",{get:function(){if(!ht(this))throw ge("byobRequest");return Fe(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!ht(this))throw ge("desiredSize");return tr(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!ht(this))throw ge("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");Re(this)},u.prototype.enqueue=function(d){if(!ht(this))throw ge("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");Ee(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!ht(this))throw ge("error");Ie(this,d)},u.prototype[Ne]=function(d){rt(this),st(this);var j=this._cancelAlgorithm(d);return Ue(this),j},u.prototype[He]=function(d){var j=this._controlledReadableByteStream;if(this._queueTotalSize>0){var D=this._queue.shift();this._queueTotalSize-=D.byteLength,k(this);var G=new Uint8Array(D.buffer,D.byteOffset,D.byteLength);d._chunkSteps(G);return}var ue=this._autoAllocateChunkSize;if(ue!==void 0){var ye=void 0;try{ye=new ArrayBuffer(ue)}catch(Er){d._errorSteps(Er);return}var Je={buffer:ye,bufferByteLength:ue,byteOffset:0,byteLength:ue,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Je)}ee(j,d),Lt(this)},u}();Object.defineProperties(qt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(qt.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ht(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableByteStream")?!1:u instanceof qt}function na(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_associatedReadableByteStreamController")?!1:u instanceof dt}function Lt(u){var d=we(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,Lt(u))},function(D){Ie(u,D)})}}function rt(u){I(u),u._pendingPullIntos=new V}function Va(u,d){var j=!1;u._state==="closed"&&(j=!0);var D=x(d);d.readerType==="default"?Oe(u,D,j):fe(u,D,j)}function x(u){var d=u.bytesFilled,j=u.elementSize;return new u.viewConstructor(u.buffer,u.byteOffset,d/j)}function b(u,d,j,D){u._queue.push({buffer:d,byteOffset:j,byteLength:D}),u._queueTotalSize+=D}function g(u,d){var j=d.elementSize,D=d.bytesFilled-d.bytesFilled%j,G=Math.min(u._queueTotalSize,d.byteLength-d.bytesFilled),ue=d.bytesFilled+G,ye=ue-ue%j,Je=G,Er=!1;ye>D&&(Je=ye-d.bytesFilled,Er=!0);for(var Fr=u._queue;Je>0;){var Dr=Fr.peek(),Wr=Math.min(Je,Dr.byteLength),Ot=d.byteOffset+d.bytesFilled;or(d.buffer,Ot,Dr.buffer,Dr.byteOffset,Wr),Dr.byteLength===Wr?Fr.shift():(Dr.byteOffset+=Wr,Dr.byteLength-=Wr),u._queueTotalSize-=Wr,l(u,Wr,d),Je-=Wr}return Er}function l(u,d,j){j.bytesFilled+=d}function k(u){u._queueTotalSize===0&&u._closeRequested?(Ue(u),Xs(u._controlledReadableByteStream)):Lt(u)}function I(u){u._byobRequest!==null&&(u._byobRequest._associatedReadableByteStreamController=void 0,u._byobRequest._view=null,u._byobRequest=null)}function N(u){for(;u._pendingPullIntos.length>0;){if(u._queueTotalSize===0)return;var d=u._pendingPullIntos.peek();g(u,d)&&(Me(u),Va(u._controlledReadableByteStream,d))}}function Y(u,d,j){var D=u._controlledReadableByteStream,G=1;d.constructor!==DataView&&(G=d.constructor.BYTES_PER_ELEMENT);var ue=d.constructor,ye=cr(d.buffer),Je={buffer:ye,bufferByteLength:ye.byteLength,byteOffset:d.byteOffset,byteLength:d.byteLength,bytesFilled:0,elementSize:G,viewConstructor:ue,readerType:"byob"};if(u._pendingPullIntos.length>0){u._pendingPullIntos.push(Je),re(D,j);return}if(D._state==="closed"){var Er=new ue(Je.buffer,Je.byteOffset,0);j._closeSteps(Er);return}if(u._queueTotalSize>0){if(g(u,Je)){var Fr=x(Je);k(u),j._chunkSteps(Fr);return}if(u._closeRequested){var Dr=new TypeError("Insufficient bytes to fill elements in the given buffer");Ie(u,Dr),j._errorSteps(Dr);return}}u._pendingPullIntos.push(Je),re(D,j),Lt(u)}function ie(u,d){var j=u._controlledReadableByteStream;if(ae(j))for(;se(j)>0;){var D=Me(u);Va(j,D)}}function me(u,d,j){if(l(u,d,j),!(j.bytesFilled<j.elementSize)){Me(u);var D=j.bytesFilled%j.elementSize;if(D>0){var G=j.byteOffset+j.bytesFilled,ue=Cr(j.buffer,G-D,G);b(u,ue,0,ue.byteLength)}j.bytesFilled-=D,Va(u._controlledReadableByteStream,j),N(u)}}function ve(u,d){var j=u._pendingPullIntos.peek();I(u);var D=u._controlledReadableByteStream._state;D==="closed"?ie(u):me(u,d,j),Lt(u)}function Me(u){var d=u._pendingPullIntos.shift();return d}function we(u){var d=u._controlledReadableByteStream;if(d._state!=="readable"||u._closeRequested||!u._started)return!1;if(Ve(d)&&Ge(d)>0||ae(d)&&se(d)>0)return!0;var j=tr(u);return j>0}function Ue(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0}function Re(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 D=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ie(u,D),D}}Ue(u),Xs(d)}}function Ee(u,d){var j=u._controlledReadableByteStream;if(!(u._closeRequested||j._state!=="readable")){var D=d.buffer,G=d.byteOffset,ue=d.byteLength,ye=cr(D);if(u._pendingPullIntos.length>0){var Je=u._pendingPullIntos.peek();$r(Je.buffer),Je.buffer=cr(Je.buffer)}if(I(u),Ve(j))if(Ge(j)===0)b(u,ye,G,ue);else{u._pendingPullIntos.length>0&&Me(u);var Er=new Uint8Array(ye,G,ue);Oe(j,Er,!1)}else ae(j)?(b(u,ye,G,ue),N(u)):b(u,ye,G,ue);Lt(u)}}function Ie(u,d){var j=u._controlledReadableByteStream;j._state==="readable"&&(rt(u),st(u),Ue(u),z0(j,d))}function Fe(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),D=Object.create(dt.prototype);ze(D,u,j),u._byobRequest=D}return u._byobRequest}function tr(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(),D=u._controlledReadableByteStream._state;if(D==="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=cr(j.buffer),ve(u,d)}function Ce(u,d){var j=u._pendingPullIntos.peek(),D=u._controlledReadableByteStream._state;if(D==="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 G=d.byteLength;j.buffer=cr(d.buffer),ve(u,G)}function Ae(u,d,j,D,G,ue,ye){d._controlledReadableByteStream=u,d._pullAgain=!1,d._pulling=!1,d._byobRequest=null,d._queue=d._queueTotalSize=void 0,st(d),d._closeRequested=!1,d._started=!1,d._strategyHWM=ue,d._pullAlgorithm=D,d._cancelAlgorithm=G,d._autoAllocateChunkSize=ye,d._pendingPullIntos=new V,u._readableStreamController=d;var Je=j();E(h(Je),function(){d._started=!0,Lt(d)},function(Er){Ie(d,Er)})}function Pe(u,d,j){var D=Object.create(qt.prototype),G=function(){},ue=function(){return h(void 0)},ye=function(){return h(void 0)};d.start!==void 0&&(G=function(){return d.start(D)}),d.pull!==void 0&&(ue=function(){return d.pull(D)}),d.cancel!==void 0&&(ye=function(Er){return d.cancel(Er)});var Je=d.autoAllocateChunkSize;if(Je===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ae(u,D,G,ue,ye,j,Je)}function ze(u,d,j){u._associatedReadableByteStreamController=d,u._view=j}function Le(u){return new TypeError("ReadableStreamBYOBRequest.prototype."+u+" can only be used on a ReadableStreamBYOBRequest")}function ge(u){return new TypeError("ReadableByteStreamController.prototype."+u+" can only be used on a ReadableByteStreamController")}function X(u){return new oe(u)}function re(u,d){u._reader._readIntoRequests.push(d)}function fe(u,d,j){var D=u._reader,G=D._readIntoRequests.shift();j?G._closeSteps(d):G._chunkSteps(d)}function se(u){return u._reader._readIntoRequests.length}function ae(u){var d=u._reader;return!(d===void 0||!$e(d))}var oe=function(){function u(d){if(qe(d,1,"ReadableStreamBYOBReader"),Br(d,"First parameter"),qn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ht(d._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");$(this,d),this._readIntoRequests=new V}return Object.defineProperty(u.prototype,"closed",{get:function(){return $e(this)?this._closedPromise:v(ar("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),$e(this)?this._ownerReadableStream===void 0?v(Z("cancel")):K(this,d):v(ar("cancel"))},u.prototype.read=function(d){if(!$e(this))return v(ar("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($r(d.buffer),this._ownerReadableStream===void 0)return v(Z("read from"));var j,D,G=m(function(ye,Je){j=ye,D=Je}),ue={_chunkSteps:function(ye){return j({value:ye,done:!1})},_closeSteps:function(ye){return j({value:ye,done:!0})},_errorSteps:function(ye){return D(ye)}};return fr(this,d,ue),G},u.prototype.releaseLock=function(){if(!$e(this))throw ar("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");W(this)}},u}();Object.defineProperties(oe.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(oe.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function $e(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readIntoRequests")?!1:u instanceof oe}function fr(u,d,j){var D=u._ownerReadableStream;D._disturbed=!0,D._state==="errored"?j._errorSteps(D._storedError):Y(D._readableStreamController,d,j)}function ar(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,D=u==null?void 0:u.size;return{highWaterMark:j===void 0?void 0:_e(j),size:D===void 0?void 0:Ar(D,d+" has member 'size' that")}}function Ar(u,d){return We(u,d),function(j){return _e(u(j))}}function kr(u,d){Qe(u,d);var j=u==null?void 0:u.abort,D=u==null?void 0:u.close,G=u==null?void 0:u.start,ue=u==null?void 0:u.type,ye=u==null?void 0:u.write;return{abort:j===void 0?void 0:dr(j,u,d+" has member 'abort' that"),close:D===void 0?void 0:Sr(D,u,d+" has member 'close' that"),start:G===void 0?void 0:_r(G,u,d+" has member 'start' that"),write:ye===void 0?void 0:tt(ye,u,d+" has member 'write' that"),type:ue}}function dr(u,d,j){return We(u,j),function(D){return B(u,d,[D])}}function Sr(u,d,j){return We(u,j),function(){return B(u,d,[])}}function _r(u,d,j){return We(u,j),function(D){return F(u,d,[D])}}function tt(u,d,j){return We(u,j),function(D,G){return B(u,d,[D,G])}}function Tr(u,d){if(!Be(u))throw new TypeError(d+" is not a WritableStream.")}function _(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 M=function(){function u(d,j){d===void 0&&(d={}),j===void 0&&(j={}),d===void 0?d=null:rr(d,"First parameter");var D=yr(j,"Second parameter"),G=kr(d,"First parameter");je(this);var ue=G.type;if(ue!==void 0)throw new RangeError("Invalid type is specified");var ye=z(D),Je=sr(D,1);g8(this,G,Je,ye)}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Be(this))throw Lc("locked");return Ir(this)},enumerable:!1,configurable:!0}),u.prototype.abort=function(d){return d===void 0&&(d=void 0),Be(this)?Ir(this)?v(new TypeError("Cannot abort a stream that already has a writer")):ut(this,d):v(Lc("abort"))},u.prototype.close=function(){return Be(this)?Ir(this)?v(new TypeError("Cannot close a stream that already has a writer")):pi(this)?v(new TypeError("Cannot close an already-closing stream")):oa(this):v(Lc("close"))},u.prototype.getWriter=function(){if(!Be(this))throw Lc("getWriter");return ne(this)},u}();Object.defineProperties(M.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(M.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function ne(u){return new Uo(u)}function ce(u,d,j,D,G,ue){G===void 0&&(G=1),ue===void 0&&(ue=function(){return 1});var ye=Object.create(M.prototype);je(ye);var Je=Object.create(ho.prototype);return S0(ye,Je,u,d,j,D,G,ue),ye}function je(u){u._state="writable",u._storedError=void 0,u._writer=void 0,u._writableStreamController=void 0,u._writeRequests=new V,u._inFlightWriteRequest=void 0,u._closeRequest=void 0,u._inFlightCloseRequest=void 0,u._pendingAbortRequest=void 0,u._backpressure=!1}function Be(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_writableStreamController")?!1:u instanceof M}function Ir(u){return u._writer!==void 0}function ut(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 D=u._state;if(D==="closed"||D==="errored")return h(void 0);if(u._pendingAbortRequest!==void 0)return u._pendingAbortRequest._promise;var G=!1;D==="erroring"&&(G=!0,d=void 0);var ue=m(function(ye,Je){u._pendingAbortRequest={_promise:void 0,_resolve:ye,_reject:Je,_reason:d,_wasAlreadyErroring:G}});return u._pendingAbortRequest._promise=ue,G||on(u,d),ue}function oa(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(G,ue){var ye={_resolve:G,_reject:ue};u._closeRequest=ye}),D=u._writer;return D!==void 0&&u._backpressure&&d==="writable"&&vp(D),b8(u._writableStreamController),j}function sa(u){var d=m(function(j,D){var G={_resolve:j,_reject:D};u._writeRequests.push(G)});return d}function Sa(u,d){var j=u._state;if(j==="writable"){on(u,d);return}da(u)}function on(u,d){var j=u._writableStreamController;u._state="erroring",u._storedError=d;var D=u._writer;D!==void 0&&w0(D,d),!l8(u)&&j._started&&da(u)}function da(u){u._state="errored",u._writableStreamController[xe]();var d=u._storedError;if(u._writeRequests.forEach(function(G){G._reject(d)}),u._writeRequests=new V,u._pendingAbortRequest===void 0){Bc(u);return}var j=u._pendingAbortRequest;if(u._pendingAbortRequest=void 0,j._wasAlreadyErroring){j._reject(d),Bc(u);return}var D=u._writableStreamController[Se](j._reason);E(D,function(){j._resolve(),Bc(u)},function(G){j._reject(G),Bc(u)})}function qa(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0}function fo(u,d){u._inFlightWriteRequest._reject(d),u._inFlightWriteRequest=void 0,Sa(u,d)}function fi(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&&T0(j)}function Mo(u,d){u._inFlightCloseRequest._reject(d),u._inFlightCloseRequest=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._reject(d),u._pendingAbortRequest=void 0),Sa(u,d)}function pi(u){return!(u._closeRequest===void 0&&u._inFlightCloseRequest===void 0)}function l8(u){return!(u._inFlightWriteRequest===void 0&&u._inFlightCloseRequest===void 0)}function f8(u){u._inFlightCloseRequest=u._closeRequest,u._closeRequest=void 0}function p8(u){u._inFlightWriteRequest=u._writeRequests.shift()}function Bc(u){u._closeRequest!==void 0&&(u._closeRequest._reject(u._storedError),u._closeRequest=void 0);var d=u._writer;d!==void 0&&hp(d,u._storedError)}function cp(u,d){var j=u._writer;j!==void 0&&d!==u._backpressure&&(d?S8(j):vp(j)),u._backpressure=d}var Uo=function(){function u(d){if(qe(d,1,"WritableStreamDefaultWriter"),Tr(d,"First parameter"),Ir(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")!pi(d)&&d._backpressure?Mc(this):C0(this),Nc(this);else if(j==="erroring")mp(this,d._storedError),Nc(this);else if(j==="closed")C0(this),_8(this);else{var D=d._storedError;mp(this,D),P0(this,D)}}return Object.defineProperty(u.prototype,"closed",{get:function(){return po(this)?this._closedPromise:v(mo("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!po(this))throw mo("desiredSize");if(this._ownerWritableStream===void 0)throw Ks("desiredSize");return v8(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ready",{get:function(){return po(this)?this._readyPromise:v(mo("ready"))},enumerable:!1,configurable:!0}),u.prototype.abort=function(d){return d===void 0&&(d=void 0),po(this)?this._ownerWritableStream===void 0?v(Ks("abort")):d8(this,d):v(mo("abort"))},u.prototype.close=function(){if(!po(this))return v(mo("close"));var d=this._ownerWritableStream;return d===void 0?v(Ks("close")):pi(d)?v(new TypeError("Cannot close an already-closing stream")):x0(this)},u.prototype.releaseLock=function(){if(!po(this))throw mo("releaseLock");var d=this._ownerWritableStream;d!==void 0&&k0(this)},u.prototype.write=function(d){return d===void 0&&(d=void 0),po(this)?this._ownerWritableStream===void 0?v(Ks("write to")):_0(this,d):v(mo("write"))},u}();Object.defineProperties(Uo.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(Uo.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function po(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_ownerWritableStream")?!1:u instanceof Uo}function d8(u,d){var j=u._ownerWritableStream;return ut(j,d)}function x0(u){var d=u._ownerWritableStream;return oa(d)}function h8(u){var d=u._ownerWritableStream,j=d._state;return pi(d)||j==="closed"?h(void 0):j==="errored"?v(d._storedError):x0(u)}function m8(u,d){u._closedPromiseState==="pending"?hp(u,d):j8(u,d)}function w0(u,d){u._readyPromiseState==="pending"?I0(u,d):E8(u,d)}function v8(u){var d=u._ownerWritableStream,j=d._state;return j==="errored"||j==="erroring"?null:j==="closed"?0:E0(d._writableStreamController)}function k0(u){var d=u._ownerWritableStream,j=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");w0(u,j),m8(u,j),d._writer=void 0,u._ownerWritableStream=void 0}function _0(u,d){var j=u._ownerWritableStream,D=j._writableStreamController,G=y8(D,d);if(j!==u._ownerWritableStream)return v(Ks("write to"));var ue=j._state;if(ue==="errored")return v(j._storedError);if(pi(j)||ue==="closed")return v(new TypeError("The stream is closing or closed and cannot be written to"));if(ue==="erroring")return v(j._storedError);var ye=sa(j);return x8(D,d,G),ye}var j0={},ho=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"abortReason",{get:function(){if(!lp(this))throw dp("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"signal",{get:function(){if(!lp(this))throw dp("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),!lp(this))throw dp("error");var j=this._controlledWritableStream._state;j==="writable"&&A0(this,d)},u.prototype[Se]=function(d){var j=this._abortAlgorithm(d);return Dc(this),j},u.prototype[xe]=function(){st(this)},u}();Object.defineProperties(ho.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ho.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function lp(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledWritableStream")?!1:u instanceof ho}function S0(u,d,j,D,G,ue,ye,Je){d._controlledWritableStream=u,u._writableStreamController=d,d._queue=void 0,d._queueTotalSize=void 0,st(d),d._abortReason=void 0,d._abortController=P(),d._started=!1,d._strategySizeAlgorithm=Je,d._strategyHWM=ye,d._writeAlgorithm=D,d._closeAlgorithm=G,d._abortAlgorithm=ue;var Er=pp(d);cp(u,Er);var Fr=j(),Dr=h(Fr);E(Dr,function(){d._started=!0,zc(d)},function(Wr){d._started=!0,Sa(u,Wr)})}function g8(u,d,j,D){var G=Object.create(ho.prototype),ue=function(){},ye=function(){return h(void 0)},Je=function(){return h(void 0)},Er=function(){return h(void 0)};d.start!==void 0&&(ue=function(){return d.start(G)}),d.write!==void 0&&(ye=function(Fr){return d.write(Fr,G)}),d.close!==void 0&&(Je=function(){return d.close()}),d.abort!==void 0&&(Er=function(Fr){return d.abort(Fr)}),S0(u,G,ue,ye,Je,Er,j,D)}function Dc(u){u._writeAlgorithm=void 0,u._closeAlgorithm=void 0,u._abortAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function b8(u){pa(u,j0,0),zc(u)}function y8(u,d){try{return u._strategySizeAlgorithm(d)}catch(j){return fp(u,j),1}}function E0(u){return u._strategyHWM-u._queueTotalSize}function x8(u,d,j){try{pa(u,d,j)}catch(ue){fp(u,ue);return}var D=u._controlledWritableStream;if(!pi(D)&&D._state==="writable"){var G=pp(u);cp(D,G)}zc(u)}function zc(u){var d=u._controlledWritableStream;if(!!u._started&&d._inFlightWriteRequest===void 0){var j=d._state;if(j==="erroring"){da(d);return}if(u._queue.length!==0){var D=et(u);D===j0?w8(u):k8(u,D)}}}function fp(u,d){u._controlledWritableStream._state==="writable"&&A0(u,d)}function w8(u){var d=u._controlledWritableStream;f8(d),ia(u);var j=u._closeAlgorithm();Dc(u),E(j,function(){fi(d)},function(D){Mo(d,D)})}function k8(u,d){var j=u._controlledWritableStream;p8(j);var D=u._writeAlgorithm(d);E(D,function(){qa(j);var G=j._state;if(ia(u),!pi(j)&&G==="writable"){var ue=pp(u);cp(j,ue)}zc(u)},function(G){j._state==="writable"&&Dc(u),fo(j,G)})}function pp(u){var d=E0(u);return d<=0}function A0(u,d){var j=u._controlledWritableStream;Dc(u),on(j,d)}function Lc(u){return new TypeError("WritableStream.prototype."+u+" can only be used on a WritableStream")}function dp(u){return new TypeError("WritableStreamDefaultController.prototype."+u+" can only be used on a WritableStreamDefaultController")}function mo(u){return new TypeError("WritableStreamDefaultWriter.prototype."+u+" can only be used on a WritableStreamDefaultWriter")}function Ks(u){return new TypeError("Cannot "+u+" a stream using a released writer")}function Nc(u){u._closedPromise=m(function(d,j){u._closedPromise_resolve=d,u._closedPromise_reject=j,u._closedPromiseState="pending"})}function P0(u,d){Nc(u),hp(u,d)}function _8(u){Nc(u),T0(u)}function hp(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 j8(u,d){P0(u,d)}function T0(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 Mc(u){u._readyPromise=m(function(d,j){u._readyPromise_resolve=d,u._readyPromise_reject=j}),u._readyPromiseState="pending"}function mp(u,d){Mc(u),I0(u,d)}function C0(u){Mc(u),vp(u)}function I0(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 S8(u){Mc(u)}function E8(u,d){mp(u,d)}function vp(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 F0=typeof DOMException!="undefined"?DOMException:void 0;function A8(u){if(!(typeof u=="function"||typeof u=="object"))return!1;try{return new u,!0}catch{return!1}}function P8(){var u=function(j,D){this.message=j||"",this.name=D||"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 T8=A8(F0)?F0:P8();function q0(u,d,j,D,G,ue){var ye=Gr(u),Je=ne(d);u._disturbed=!0;var Er=!1,Fr=h(void 0);return m(function(Dr,Wr){var Ot;if(ue!==void 0){if(Ot=function(){var xr=new T8("Aborted","AbortError"),Kr=[];D||Kr.push(function(){return d._state==="writable"?ut(d,xr):h(void 0)}),G||Kr.push(function(){return u._state==="readable"?di(u,xr):h(void 0)}),$a(function(){return Promise.all(Kr.map(function(vt){return vt()}))},!0,xr)},ue.aborted){Ot();return}ue.addEventListener("abort",Ot)}function hi(){return m(function(xr,Kr){function vt(zi){zi?xr():y($o(),vt,Kr)}vt(!1)})}function $o(){return Er?h(!0):y(Je._readyPromise,function(){return m(function(xr,Kr){nr(ye,{_chunkSteps:function(vt){Fr=y(_0(Je,vt),void 0,t),xr(!1)},_closeSteps:function(){return xr(!0)},_errorSteps:Kr})})})}if(ua(u,ye._closedPromise,function(xr){D?un(!0,xr):$a(function(){return ut(d,xr)},!0,xr)}),ua(d,Je._closedPromise,function(xr){G?un(!0,xr):$a(function(){return di(u,xr)},!0,xr)}),Di(u,ye._closedPromise,function(){j?un():$a(function(){return h8(Je)})}),pi(d)||d._state==="closed"){var On=new TypeError("the destination writable stream closed before all data could be piped to it");G?un(!0,On):$a(function(){return di(u,On)},!0,On)}T(hi());function Bi(){var xr=Fr;return y(Fr,function(){return xr!==Fr?Bi():void 0})}function ua(xr,Kr,vt){xr._state==="errored"?vt(xr._storedError):A(Kr,vt)}function Di(xr,Kr,vt){xr._state==="closed"?vt():w(Kr,vt)}function $a(xr,Kr,vt){if(Er)return;Er=!0,d._state==="writable"&&!pi(d)?w(Bi(),zi):zi();function zi(){E(xr(),function(){return mt(Kr,vt)},function(Rn){return mt(!0,Rn)})}}function un(xr,Kr){Er||(Er=!0,d._state==="writable"&&!pi(d)?w(Bi(),function(){return mt(xr,Kr)}):mt(xr,Kr))}function mt(xr,Kr){k0(Je),W(ye),ue!==void 0&&ue.removeEventListener("abort",Ot),xr?Wr(Kr):Dr(void 0)}})}var vo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Uc(this))throw $c("desiredSize");return gp(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!Uc(this))throw $c("close");if(!Ho(this))throw new TypeError("The stream is not in a state that permits close");Qs(this)},u.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Uc(this))throw $c("enqueue");if(!Ho(this))throw new TypeError("The stream is not in a state that permits enqueue");return Vc(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!Uc(this))throw $c("error");In(this,d)},u.prototype[Ne]=function(d){st(this);var j=this._cancelAlgorithm(d);return Hc(this),j},u.prototype[He]=function(d){var j=this._controlledReadableStream;if(this._queue.length>0){var D=ia(this);this._closeRequested&&this._queue.length===0?(Hc(this),Xs(j)):Ys(this),d._chunkSteps(D)}else ee(j,d),Ys(this)},u}();Object.defineProperties(vo.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(vo.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Uc(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableStream")?!1:u instanceof vo}function Ys(u){var d=O0(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,Ys(u))},function(D){In(u,D)})}}function O0(u){var d=u._controlledReadableStream;if(!Ho(u)||!u._started)return!1;if(qn(d)&&Ge(d)>0)return!0;var j=gp(u);return j>0}function Hc(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function Qs(u){if(!!Ho(u)){var d=u._controlledReadableStream;u._closeRequested=!0,u._queue.length===0&&(Hc(u),Xs(d))}}function Vc(u,d){if(!!Ho(u)){var j=u._controlledReadableStream;if(qn(j)&&Ge(j)>0)Oe(j,d,!1);else{var D=void 0;try{D=u._strategySizeAlgorithm(d)}catch(G){throw In(u,G),G}try{pa(u,d,D)}catch(G){throw In(u,G),G}}Ys(u)}}function In(u,d){var j=u._controlledReadableStream;j._state==="readable"&&(st(u),Hc(u),z0(j,d))}function gp(u){var d=u._controlledReadableStream._state;return d==="errored"?null:d==="closed"?0:u._strategyHWM-u._queueTotalSize}function C8(u){return!O0(u)}function Ho(u){var d=u._controlledReadableStream._state;return!u._closeRequested&&d==="readable"}function R0(u,d,j,D,G,ue,ye){d._controlledReadableStream=u,d._queue=void 0,d._queueTotalSize=void 0,st(d),d._started=!1,d._closeRequested=!1,d._pullAgain=!1,d._pulling=!1,d._strategySizeAlgorithm=ye,d._strategyHWM=ue,d._pullAlgorithm=D,d._cancelAlgorithm=G,u._readableStreamController=d;var Je=j();E(h(Je),function(){d._started=!0,Ys(d)},function(Er){In(d,Er)})}function I8(u,d,j,D){var G=Object.create(vo.prototype),ue=function(){},ye=function(){return h(void 0)},Je=function(){return h(void 0)};d.start!==void 0&&(ue=function(){return d.start(G)}),d.pull!==void 0&&(ye=function(){return d.pull(G)}),d.cancel!==void 0&&(Je=function(Er){return d.cancel(Er)}),R0(u,G,ue,ye,Je,j,D)}function $c(u){return new TypeError("ReadableStreamDefaultController.prototype."+u+" can only be used on a ReadableStreamDefaultController")}function F8(u,d){return ht(u._readableStreamController)?O8(u):q8(u)}function q8(u,d){var j=Gr(u),D=!1,G=!1,ue=!1,ye=!1,Je,Er,Fr,Dr,Wr,Ot=m(function(ua){Wr=ua});function hi(){if(D)return G=!0,h(void 0);D=!0;var ua={_chunkSteps:function(Di){O(function(){G=!1;var $a=Di,un=Di;ue||Vc(Fr._readableStreamController,$a),ye||Vc(Dr._readableStreamController,un),D=!1,G&&hi()})},_closeSteps:function(){D=!1,ue||Qs(Fr._readableStreamController),ye||Qs(Dr._readableStreamController),(!ue||!ye)&&Wr(void 0)},_errorSteps:function(){D=!1}};return nr(j,ua),h(void 0)}function $o(ua){if(ue=!0,Je=ua,ye){var Di=wr([Je,Er]),$a=di(u,Di);Wr($a)}return Ot}function On(ua){if(ye=!0,Er=ua,ue){var Di=wr([Je,Er]),$a=di(u,Di);Wr($a)}return Ot}function Bi(){}return Fr=bp(Bi,hi,$o),Dr=bp(Bi,hi,On),A(j._closedPromise,function(ua){In(Fr._readableStreamController,ua),In(Dr._readableStreamController,ua),(!ue||!ye)&&Wr(void 0)}),[Fr,Dr]}function O8(u){var d=Gr(u),j=!1,D=!1,G=!1,ue=!1,ye=!1,Je,Er,Fr,Dr,Wr,Ot=m(function(mt){Wr=mt});function hi(mt){A(mt._closedPromise,function(xr){mt===d&&(Ie(Fr._readableStreamController,xr),Ie(Dr._readableStreamController,xr),(!ue||!ye)&&Wr(void 0))})}function $o(){$e(d)&&(W(d),d=Gr(u),hi(d));var mt={_chunkSteps:function(xr){O(function(){D=!1,G=!1;var Kr=xr,vt=xr;if(!ue&&!ye)try{vt=Ft(xr)}catch(zi){Ie(Fr._readableStreamController,zi),Ie(Dr._readableStreamController,zi),Wr(di(u,zi));return}ue||Ee(Fr._readableStreamController,Kr),ye||Ee(Dr._readableStreamController,vt),j=!1,D?Bi():G&&ua()})},_closeSteps:function(){j=!1,ue||Re(Fr._readableStreamController),ye||Re(Dr._readableStreamController),Fr._readableStreamController._pendingPullIntos.length>0&&Xe(Fr._readableStreamController,0),Dr._readableStreamController._pendingPullIntos.length>0&&Xe(Dr._readableStreamController,0),(!ue||!ye)&&Wr(void 0)},_errorSteps:function(){j=!1}};nr(d,mt)}function On(mt,xr){Ze(d)&&(W(d),d=X(u),hi(d));var Kr=xr?Dr:Fr,vt=xr?Fr:Dr,zi={_chunkSteps:function(Rn){O(function(){D=!1,G=!1;var Wo=xr?ye:ue,ru=xr?ue:ye;if(ru)Wo||Ce(Kr._readableStreamController,Rn);else{var X0=void 0;try{X0=Ft(Rn)}catch(kp){Ie(Kr._readableStreamController,kp),Ie(vt._readableStreamController,kp),Wr(di(u,kp));return}Wo||Ce(Kr._readableStreamController,Rn),Ee(vt._readableStreamController,X0)}j=!1,D?Bi():G&&ua()})},_closeSteps:function(Rn){j=!1;var Wo=xr?ye:ue,ru=xr?ue:ye;Wo||Re(Kr._readableStreamController),ru||Re(vt._readableStreamController),Rn!==void 0&&(Wo||Ce(Kr._readableStreamController,Rn),!ru&&vt._readableStreamController._pendingPullIntos.length>0&&Xe(vt._readableStreamController,0)),(!Wo||!ru)&&Wr(void 0)},_errorSteps:function(){j=!1}};fr(d,mt,zi)}function Bi(){if(j)return D=!0,h(void 0);j=!0;var mt=Fe(Fr._readableStreamController);return mt===null?$o():On(mt._view,!1),h(void 0)}function ua(){if(j)return G=!0,h(void 0);j=!0;var mt=Fe(Dr._readableStreamController);return mt===null?$o():On(mt._view,!0),h(void 0)}function Di(mt){if(ue=!0,Je=mt,ye){var xr=wr([Je,Er]),Kr=di(u,xr);Wr(Kr)}return Ot}function $a(mt){if(ye=!0,Er=mt,ue){var xr=wr([Je,Er]),Kr=di(u,xr);Wr(Kr)}return Ot}function un(){}return Fr=D0(un,Bi,Di),Dr=D0(un,ua,$a),hi(d),[Fr,Dr]}function R8(u,d){Qe(u,d);var j=u,D=j==null?void 0:j.autoAllocateChunkSize,G=j==null?void 0:j.cancel,ue=j==null?void 0:j.pull,ye=j==null?void 0:j.start,Je=j==null?void 0:j.type;return{autoAllocateChunkSize:D===void 0?void 0:ur(D,d+" has member 'autoAllocateChunkSize' that"),cancel:G===void 0?void 0:B8(G,j,d+" has member 'cancel' that"),pull:ue===void 0?void 0:D8(ue,j,d+" has member 'pull' that"),start:ye===void 0?void 0:z8(ye,j,d+" has member 'start' that"),type:Je===void 0?void 0:L8(Je,d+" has member 'type' that")}}function B8(u,d,j){return We(u,j),function(D){return B(u,d,[D])}}function D8(u,d,j){return We(u,j),function(D){return B(u,d,[D])}}function z8(u,d,j){return We(u,j),function(D){return F(u,d,[D])}}function L8(u,d){if(u=""+u,u!=="bytes")throw new TypeError(d+" '"+u+"' is not a valid enumeration value for ReadableStreamType");return u}function N8(u,d){Qe(u,d);var j=u==null?void 0:u.mode;return{mode:j===void 0?void 0:M8(j,d+" has member 'mode' that")}}function M8(u,d){if(u=""+u,u!=="byob")throw new TypeError(d+" '"+u+"' is not a valid enumeration value for ReadableStreamReaderMode");return u}function U8(u,d){Qe(u,d);var j=u==null?void 0:u.preventCancel;return{preventCancel:Boolean(j)}}function B0(u,d){Qe(u,d);var j=u==null?void 0:u.preventAbort,D=u==null?void 0:u.preventCancel,G=u==null?void 0:u.preventClose,ue=u==null?void 0:u.signal;return ue!==void 0&&H8(ue,d+" has member 'signal' that"),{preventAbort:Boolean(j),preventCancel:Boolean(D),preventClose:Boolean(G),signal:ue}}function H8(u,d){if(!_(u))throw new TypeError(d+" is not an AbortSignal.")}function V8(u,d){Qe(u,d);var j=u==null?void 0:u.readable;he(j,"readable","ReadableWritablePair"),Br(j,d+" has member 'readable' that");var D=u==null?void 0:u.writable;return he(D,"writable","ReadableWritablePair"),Tr(D,d+" has member 'writable' that"),{readable:j,writable:D}}var sn=function(){function u(d,j){d===void 0&&(d={}),j===void 0&&(j={}),d===void 0?d=null:rr(d,"First parameter");var D=yr(j,"Second parameter"),G=R8(d,"First parameter");if(yp(this),G.type==="bytes"){if(D.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var ue=sr(D,0);Pe(this,G,ue)}else{var ye=z(D),ue=sr(D,1);I8(this,G,ue,ye)}}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Fn(this))throw go("locked");return qn(this)},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),Fn(this)?qn(this)?v(new TypeError("Cannot cancel a stream that already has a reader")):di(this,d):v(go("cancel"))},u.prototype.getReader=function(d){if(d===void 0&&(d=void 0),!Fn(this))throw go("getReader");var j=N8(d,"First parameter");return j.mode===void 0?Gr(this):X(this)},u.prototype.pipeThrough=function(d,j){if(j===void 0&&(j={}),!Fn(this))throw go("pipeThrough");qe(d,1,"pipeThrough");var D=V8(d,"First parameter"),G=B0(j,"Second parameter");if(qn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Ir(D.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var ue=q0(this,D.writable,G.preventClose,G.preventAbort,G.preventCancel,G.signal);return T(ue),D.readable},u.prototype.pipeTo=function(d,j){if(j===void 0&&(j={}),!Fn(this))return v(go("pipeTo"));if(d===void 0)return v("Parameter 1 is required in 'pipeTo'.");if(!Be(d))return v(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var D;try{D=B0(j,"Second parameter")}catch(G){return v(G)}return qn(this)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Ir(d)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):q0(this,d,D.preventClose,D.preventAbort,D.preventCancel,D.signal)},u.prototype.tee=function(){if(!Fn(this))throw go("tee");var d=F8(this);return wr(d)},u.prototype.values=function(d){if(d===void 0&&(d=void 0),!Fn(this))throw go("values");var j=U8(d,"First parameter");return pr(this,j.preventCancel)},u}();Object.defineProperties(sn.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(sn.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(sn.prototype,r.asyncIterator,{value:sn.prototype.values,writable:!0,configurable:!0});function bp(u,d,j,D,G){D===void 0&&(D=1),G===void 0&&(G=function(){return 1});var ue=Object.create(sn.prototype);yp(ue);var ye=Object.create(vo.prototype);return R0(ue,ye,u,d,j,D,G),ue}function D0(u,d,j){var D=Object.create(sn.prototype);yp(D);var G=Object.create(qt.prototype);return Ae(D,G,u,d,j,0,void 0),D}function yp(u){u._state="readable",u._reader=void 0,u._storedError=void 0,u._disturbed=!1}function Fn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readableStreamController")?!1:u instanceof sn}function qn(u){return u._reader!==void 0}function di(u,d){if(u._disturbed=!0,u._state==="closed")return h(void 0);if(u._state==="errored")return v(u._storedError);Xs(u);var j=u._reader;j!==void 0&&$e(j)&&(j._readIntoRequests.forEach(function(G){G._closeSteps(void 0)}),j._readIntoRequests=new V);var D=u._readableStreamController[Ne](d);return C(D,t)}function Xs(u){u._state="closed";var d=u._reader;d!==void 0&&(de(d),Ze(d)&&(d._readRequests.forEach(function(j){j._closeSteps()}),d._readRequests=new V))}function z0(u,d){u._state="errored",u._storedError=d;var j=u._reader;j!==void 0&&(le(j,d),Ze(j)?(j._readRequests.forEach(function(D){D._errorSteps(d)}),j._readRequests=new V):(j._readIntoRequests.forEach(function(D){D._errorSteps(d)}),j._readIntoRequests=new V))}function go(u){return new TypeError("ReadableStream.prototype."+u+" can only be used on a ReadableStream")}function L0(u,d){Qe(u,d);var j=u==null?void 0:u.highWaterMark;return he(j,"highWaterMark","QueuingStrategyInit"),{highWaterMark:_e(j)}}var N0=function(u){return u.byteLength};try{Object.defineProperty(N0,"name",{value:"size",configurable:!0})}catch{}var Js=function(){function u(d){qe(d,1,"ByteLengthQueuingStrategy"),d=L0(d,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!U0(this))throw M0("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!U0(this))throw M0("size");return N0},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Js.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Js.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function M0(u){return new TypeError("ByteLengthQueuingStrategy.prototype."+u+" can only be used on a ByteLengthQueuingStrategy")}function U0(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_byteLengthQueuingStrategyHighWaterMark")?!1:u instanceof Js}var H0=function(){return 1};try{Object.defineProperty(H0,"name",{value:"size",configurable:!0})}catch{}var Zs=function(){function u(d){qe(d,1,"CountQueuingStrategy"),d=L0(d,"First parameter"),this._countQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!$0(this))throw V0("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!$0(this))throw V0("size");return H0},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Zs.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Zs.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function V0(u){return new TypeError("CountQueuingStrategy.prototype."+u+" can only be used on a CountQueuingStrategy")}function $0(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_countQueuingStrategyHighWaterMark")?!1:u instanceof Zs}function $8(u,d){Qe(u,d);var j=u==null?void 0:u.flush,D=u==null?void 0:u.readableType,G=u==null?void 0:u.start,ue=u==null?void 0:u.transform,ye=u==null?void 0:u.writableType;return{flush:j===void 0?void 0:W8(j,u,d+" has member 'flush' that"),readableType:D,start:G===void 0?void 0:G8(G,u,d+" has member 'start' that"),transform:ue===void 0?void 0:K8(ue,u,d+" has member 'transform' that"),writableType:ye}}function W8(u,d,j){return We(u,j),function(D){return B(u,d,[D])}}function G8(u,d,j){return We(u,j),function(D){return F(u,d,[D])}}function K8(u,d,j){return We(u,j),function(D,G){return B(u,d,[D,G])}}var eu=function(){function u(d,j,D){d===void 0&&(d={}),j===void 0&&(j={}),D===void 0&&(D={}),d===void 0&&(d=null);var G=yr(j,"Second parameter"),ue=yr(D,"Third parameter"),ye=$8(d,"First parameter");if(ye.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(ye.writableType!==void 0)throw new RangeError("Invalid writableType specified");var Je=sr(ue,0),Er=z(ue),Fr=sr(G,1),Dr=z(G),Wr,Ot=m(function(hi){Wr=hi});Y8(this,Ot,Fr,Dr,Je,Er),X8(this,ye),ye.start!==void 0?Wr(ye.start(this._transformStreamController)):Wr(void 0)}return Object.defineProperty(u.prototype,"readable",{get:function(){if(!W0(this))throw Q0("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"writable",{get:function(){if(!W0(this))throw Q0("writable");return this._writable},enumerable:!1,configurable:!0}),u}();Object.defineProperties(eu.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(eu.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function Y8(u,d,j,D,G,ue){function ye(){return d}function Je(Ot){return eE(u,Ot)}function Er(Ot){return rE(u,Ot)}function Fr(){return tE(u)}u._writable=ce(ye,Je,Fr,Er,j,D);function Dr(){return aE(u)}function Wr(Ot){return Gc(u,Ot),h(void 0)}u._readable=bp(ye,Dr,Wr,G,ue),u._backpressure=void 0,u._backpressureChangePromise=void 0,u._backpressureChangePromise_resolve=void 0,Kc(u,!0),u._transformStreamController=void 0}function W0(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_transformStreamController")?!1:u instanceof eu}function Wc(u,d){In(u._readable._readableStreamController,d),Gc(u,d)}function Gc(u,d){G0(u._transformStreamController),fp(u._writable._writableStreamController,d),u._backpressure&&Kc(u,!1)}function Kc(u,d){u._backpressureChangePromise!==void 0&&u._backpressureChangePromise_resolve(),u._backpressureChangePromise=m(function(j){u._backpressureChangePromise_resolve=j}),u._backpressure=d}var Vo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Yc(this))throw Qc("desiredSize");var d=this._controlledTransformStream._readable._readableStreamController;return gp(d)},enumerable:!1,configurable:!0}),u.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Yc(this))throw Qc("enqueue");K0(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!Yc(this))throw Qc("error");J8(this,d)},u.prototype.terminate=function(){if(!Yc(this))throw Qc("terminate");Z8(this)},u}();Object.defineProperties(Vo.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Vo.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Yc(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledTransformStream")?!1:u instanceof Vo}function Q8(u,d,j,D){d._controlledTransformStream=u,u._transformStreamController=d,d._transformAlgorithm=j,d._flushAlgorithm=D}function X8(u,d){var j=Object.create(Vo.prototype),D=function(ue){try{return K0(j,ue),h(void 0)}catch(ye){return v(ye)}},G=function(){return h(void 0)};d.transform!==void 0&&(D=function(ue){return d.transform(ue,j)}),d.flush!==void 0&&(G=function(){return d.flush(j)}),Q8(u,j,D,G)}function G0(u){u._transformAlgorithm=void 0,u._flushAlgorithm=void 0}function K0(u,d){var j=u._controlledTransformStream,D=j._readable._readableStreamController;if(!Ho(D))throw new TypeError("Readable side is not in a state that permits enqueue");try{Vc(D,d)}catch(ue){throw Gc(j,ue),j._readable._storedError}var G=C8(D);G!==j._backpressure&&Kc(j,!0)}function J8(u,d){Wc(u._controlledTransformStream,d)}function Y0(u,d){var j=u._transformAlgorithm(d);return C(j,void 0,function(D){throw Wc(u._controlledTransformStream,D),D})}function Z8(u){var d=u._controlledTransformStream,j=d._readable._readableStreamController;Qs(j);var D=new TypeError("TransformStream terminated");Gc(d,D)}function eE(u,d){var j=u._transformStreamController;if(u._backpressure){var D=u._backpressureChangePromise;return C(D,function(){var G=u._writable,ue=G._state;if(ue==="erroring")throw G._storedError;return Y0(j,d)})}return Y0(j,d)}function rE(u,d){return Wc(u,d),h(void 0)}function tE(u){var d=u._readable,j=u._transformStreamController,D=j._flushAlgorithm();return G0(j),C(D,function(){if(d._state==="errored")throw d._storedError;Qs(d._readableStreamController)},function(G){throw Wc(u,G),d._storedError})}function aE(u){return Kc(u,!1),u._backpressureChangePromise}function Qc(u){return new TypeError("TransformStreamDefaultController.prototype."+u+" can only be used on a TransformStreamDefaultController")}function Q0(u){return new TypeError("TransformStream.prototype."+u+" can only be used on a TransformStream")}var xp={ReadableStream:sn,ReadableStreamDefaultController:vo,ReadableByteStreamController:qt,ReadableStreamBYOBRequest:dt,ReadableStreamDefaultReader:Ye,ReadableStreamBYOBReader:oe,WritableStream:M,WritableStreamDefaultController:ho,WritableStreamDefaultWriter:Uo,ByteLengthQueuingStrategy:Js,CountQueuingStrategy:Zs,TransformStream:eu,TransformStreamDefaultController:Vo};if(typeof a!="undefined")for(var wp in xp)Object.prototype.hasOwnProperty.call(xp,wp)&&Object.defineProperty(a,wp,{value:xp[wp],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=Js,e.CountQueuingStrategy=Zs,e.ReadableByteStreamController=qt,e.ReadableStream=sn,e.ReadableStreamBYOBReader=oe,e.ReadableStreamBYOBRequest=dt,e.ReadableStreamDefaultController=vo,e.ReadableStreamDefaultReader=Ye,e.TransformStream=eu,e.TransformStreamDefaultController=Vo,e.WritableStream=M,e.WritableStreamDefaultController=ho,e.WritableStreamDefaultWriter=Uo,Object.defineProperty(e,"__esModule",{value:!0})})});var _p="3.3.0-alpha.6";function tg(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var Li={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},BN=Li.self||Li.window||Li.global||{},DN=Li.window||Li.self||Li.global||{},ag=Li.global||Li.self||Li.window||{},zN=Li.document||{};var bo=typeof process!="object"||String(process)!=="[object process]"||process.browser,au=typeof importScripts=="function",LN=typeof window!="undefined"&&typeof window.orientation!="undefined",ig=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),NN=ig&&parseFloat(ig[1])||0;function jp(e,r=!0,t){let i=t||new Set;if(e){if(ng(e))i.add(e);else if(ng(e.buffer))i.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let a in e)jp(e[a],r,i)}}return t===void 0?Array.from(i):[]}function ng(e){return e?e instanceof ArrayBuffer||typeof MessagePort!="undefined"&&e instanceof MessagePort||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas:!1}function yo(){let parentPort;try{eval("globalThis.parentPort = require('worker_threads').parentPort"),parentPort=globalThis.parentPort}catch{}return parentPort}var Sp=new Map,Xa=class{static inWorkerThread(){return typeof self!="undefined"||Boolean(yo())}static set onmessage(r){function t(a){let n=yo(),{type:o,payload:s}=n?a:a.data;r(o,s)}let i=yo();i?(i.on("message",t),i.on("exit",()=>console.debug("Node worker closing"))):globalThis.onmessage=t}static addEventListener(r){let t=Sp.get(r);t||(t=a=>{if(!dE(a))return;let n=yo(),{type:o,payload:s}=n?a:a.data;r(o,s)}),yo()?console.error("not implemented"):globalThis.addEventListener("message",t)}static removeEventListener(r){let t=Sp.get(r);Sp.delete(r),yo()?console.error("not implemented"):globalThis.removeEventListener("message",t)}static postMessage(r,t){let i={source:"loaders.gl",type:r,payload:t},a=jp(t),n=yo();n?n.postMessage(i,a):globalThis.postMessage(i,a)}};function dE(e){let{type:r,data:t}=e;return r==="message"&&t&&typeof t.source=="string"&&t.source.startsWith("loaders.gl")}var Pp={};fE(Pp,{requireFromFile:()=>Ap,requireFromString:()=>Xc});var Ep=Oa(require("module")),og=Oa(require("path"));async function Ap(e){if(e.startsWith("http")){let t=await(await fetch(e)).text();return Xc(t)}return e.startsWith("/")||(e=`${process.cwd()}/${e}`),require(e)}function Xc(e,r="",t){if(typeof r=="object"&&(t=r,r=""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let i=Ep.default._nodeModulePaths(og.default.dirname(r)),a=module.parent,n=new Ep.default(r,a);return n.filename=r,n.paths=[].concat((t==null?void 0:t.prependPaths)||[]).concat(i).concat((t==null?void 0:t.appendPaths)||[]),n._compile(e,r),a&&a.children&&a.children.splice(a.children.indexOf(n),1),n.exports}var hE="beta",mE=typeof _p!="undefined"?_p:hE,Tp={};async function iu(e,r=null,t={}){return r&&(e=sg(e,r,t)),Tp[e]=Tp[e]||vE(e),await Tp[e]}function sg(e,r,t){if(e.startsWith("http"))return e;let i=t.modules||{};return i[e]?i[e]:bo?t.CDN?(tg(t.CDN.startsWith("http")),`${t.CDN}/${r}@${mE}/dist/libs/${e}`):au?`../src/libs/${e}`:`modules/${r}/src/libs/${e}`:`modules/${r}/dist/libs/${e}`}async function vE(e){if(e.endsWith("wasm"))return await(await fetch(e)).arrayBuffer();if(!bo)try{return Pp&&Ap&&await Ap(e)}catch{return null}if(au)return importScripts(e);let t=await(await fetch(e)).text();return gE(t,e)}function gE(e,r){if(!bo)return Xc&&Xc(e,r);if(au)return eval.call(ag,e),null;let t=document.createElement("script");t.id=r;try{t.appendChild(document.createTextNode(e))}catch{t.text=e}return document.body.appendChild(t),null}var bE=0;function Cp(e){!Xa.inWorkerThread()||(Xa.onmessage=async(r,t)=>{switch(r){case"process":try{let{input:i,options:a={},context:n={}}=t,o=await xE({loader:e,arrayBuffer:i,options:a,context:mi(ha({},n),{parse:yE})});Xa.postMessage("done",{result:o})}catch(i){let a=i instanceof Error?i.message:"";Xa.postMessage("error",{error:a})}break;default:}})}function yE(e,r){return new Promise((t,i)=>{let a=bE++,n=(s,c)=>{if(c.id===a)switch(s){case"done":Xa.removeEventListener(n),t(c.result);break;case"error":Xa.removeEventListener(n),i(c.error);break;default:}};Xa.addEventListener(n);let o={id:a,input:e,options:r};Xa.postMessage("process",o)})}async function xE({loader:e,arrayBuffer:r,options:t,context:i}){let a,n;if(e.parseSync||e.parse)a=r,n=e.parseSync||e.parse;else if(e.parseTextSync)a=new TextDecoder().decode(r),n=e.parseTextSync;else throw new Error(`Could not load data with ${e.name} loader`);return t=mi(ha({},t),{modules:e&&e.options&&e.options.modules||{},worker:!1}),await n(a,ha({},t),i,e)}var u0=Oa(Qg());var gi=typeof process!="object"||String(process)!=="[object process]"||process.browser,Wp={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global},At=Wp.global||Wp.self||Wp.window;var Xg={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]};global["encoding-indexes"]=Xg||{};function jr(e,r,t){return r<=e&&e<=t}function VE(e,r){return e.indexOf(r)!==-1}var fn=Math.floor;function sl(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function $E(e){for(var r=String(e),t=r.length,i=0,a=[];i<t;){var n=r.charCodeAt(i);if(n<55296||n>57343)a.push(n);else if(56320<=n&&n<=57343)a.push(65533);else if(55296<=n&&n<=56319)if(i===t-1)a.push(65533);else{var o=r.charCodeAt(i+1);if(56320<=o&&o<=57343){var s=n&1023,c=o&1023;a.push(65536+(s<<10)+c),i+=1}else a.push(65533)}i+=1}return a}function WE(e){for(var r="",t=0;t<e.length;++t){var i=e[t];i<=65535?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return r}function Ja(e){return 0<=e&&e<=127}var Za=Ja,zr=-1;function Gp(e){this.tokens=[].slice.call(e),this.tokens.reverse()}Gp.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():zr},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 at=-1;function Lr(e,r){if(e)throw TypeError("Decoder error");return r||65533}function bi(e){throw TypeError("The code point "+e+" could not be encoded.")}function GE(){}GE.prototype={handler:function(e,r){}};function KE(){}KE.prototype={handler:function(e,r){}};function Kp(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(Yp,e)?Yp[e]:null}var Jg=[{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"}],Yp={};Jg.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(t){Yp[t]=r})})});var Da={},za={};function rs(e,r){return r&&r[e]||null}function ts(e,r){var t=r.indexOf(e);return t===-1?null:t}function Ea(e){if(!("encoding-indexes"in global))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return global["encoding-indexes"][e]}function YE(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,t=0,i=Ea("gb18030-ranges"),a;for(a=0;a<i.length;++a){var n=i[a];if(n[0]<=e)r=n[0],t=n[1];else break}return t+e-r}function QE(e){if(e===59335)return 7457;var r=0,t=0,i=Ea("gb18030-ranges"),a;for(a=0;a<i.length;++a){var n=i[a];if(n[1]<=e)r=n[1],t=n[0];else break}return t+e-r}function XE(e){Qp=Qp||Ea("jis0208").map(function(t,i){return jr(i,8272,8835)?null:t});var r=Qp;return r.indexOf(e)}var Qp;function JE(e){Xp=Xp||Ea("big5").map(function(t,i){return i<(161-129)*157?null:t});var r=Xp;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):ts(e,r)}var Xp,Zg="utf-8";function ko(e,r){if(!(this instanceof ko))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):Zg,r=sl(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var t=Kp(e);if(t===null||t.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!za[t.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var i=this;return i._encoding=t,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(ko.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(ko.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(ko.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));ko.prototype.decode=function(r,t){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),t=sl(t),this._do_not_flush||(this._decoder=za[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(t.stream);for(var a=new Gp(i),n=[],o;;){var s=a.read();if(s===zr||(o=this._decoder.handler(a,s),o===at))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(a,a.read()),o===at)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!a.endOfStream());this._decoder=null}function c(f){return VE(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)&&!this._ignoreBOM&&!this._BOMseen&&(f.length>0&&f[0]===65279?(this._BOMseen=!0,f.shift()):f.length>0&&(this._BOMseen=!0)),WE(f)}return c.call(this,n)};function bu(e,r){if(!(this instanceof bu))throw TypeError("Called as a function. Did you forget 'new'?");r=sl(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var t=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):Zg;var i=Kp(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Da[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");t._encoding=i}else t._encoding=Kp("utf-8"),e!==void 0&&"console"in global&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=t._encoding.name.toLowerCase()),t}Object.defineProperty&&Object.defineProperty(bu.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});bu.prototype.encode=function(r,t){r=r===void 0?"":String(r),t=sl(t),this._do_not_flush||(this._encoder=Da[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(t.stream);for(var i=new Gp($E(r)),a=[],n;;){var o=i.read();if(o===zr||(n=this._encoder.handler(i,o),n===at))break;Array.isArray(n)?a.push.apply(a,n):a.push(n)}if(!this._do_not_flush){for(;n=this._encoder.handler(i,i.read()),n!==at;)Array.isArray(n)?a.push.apply(a,n):a.push(n);this._encoder=null}return new Uint8Array(a)};function ZE(e){var r=e.fatal,t=0,i=0,a=0,n=128,o=191;this.handler=function(s,c){if(c===zr&&a!==0)return a=0,Lr(r);if(c===zr)return at;if(a===0){if(jr(c,0,127))return c;if(jr(c,194,223))a=1,t=c&31;else if(jr(c,224,239))c===224&&(n=160),c===237&&(o=159),a=2,t=c&15;else if(jr(c,240,244))c===240&&(n=144),c===244&&(o=143),a=3,t=c&7;else return Lr(r);return null}if(!jr(c,n,o))return t=a=i=0,n=128,o=191,s.prepend(c),Lr(r);if(n=128,o=191,t=t<<6|c&63,i+=1,i!==a)return null;var f=t;return t=a=i=0,f}}function e4(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return at;if(Za(i))return i;var a,n;jr(i,128,2047)?(a=1,n=192):jr(i,2048,65535)?(a=2,n=224):jr(i,65536,1114111)&&(a=3,n=240);for(var o=[(i>>6*a)+n];a>0;){var s=i>>6*(a-1);o.push(128|s&63),a-=1}return o}}Da["UTF-8"]=function(e){return new e4(e)};za["UTF-8"]=function(e){return new ZE(e)};function r4(e,r){var t=r.fatal;this.handler=function(i,a){if(a===zr)return at;if(Ja(a))return a;var n=e[a-128];return n===null?Lr(t):n}}function t4(e,r){var t=r.fatal;this.handler=function(i,a){if(a===zr)return at;if(Za(a))return a;var n=ts(a,e);return n===null&&bi(a),n+128}}(function(){"encoding-indexes"in global&&Jg.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var t=r.name,i=Ea(t.toLowerCase());za[t]=function(a){return new r4(i,a)},Da[t]=function(a){return new t4(i,a)}})})})();za.GBK=function(e){return new eb(e)};Da.GBK=function(e){return new rb(e,!0)};function eb(e){var r=e.fatal,t=0,i=0,a=0;this.handler=function(n,o){if(o===zr&&t===0&&i===0&&a===0)return at;o===zr&&(t!==0||i!==0||a!==0)&&(t=0,i=0,a=0,Lr(r));var s;if(a!==0){s=null,jr(o,48,57)&&(s=YE((((t-129)*10+i-48)*126+a-129)*10+o-48));var c=[i,a,o];return t=0,i=0,a=0,s===null?(n.prepend(c),Lr(r)):s}if(i!==0)return jr(o,129,254)?(a=o,null):(n.prepend([i,o]),t=0,i=0,Lr(r));if(t!==0){if(jr(o,48,57))return i=o,null;var f=t,p=null;t=0;var m=o<127?64:65;return(jr(o,64,126)||jr(o,128,254))&&(p=(f-129)*190+(o-m)),s=p===null?null:rs(p,Ea("gb18030")),s===null&&Ja(o)&&n.prepend(o),s===null?Lr(r):s}return Ja(o)?o:o===128?8364:jr(o,129,254)?(t=o,null):Lr(r)}}function rb(e,r){var t=e.fatal;this.handler=function(i,a){if(a===zr)return at;if(Za(a))return a;if(a===58853)return bi(a);if(r&&a===8364)return 128;var n=ts(a,Ea("gb18030"));if(n!==null){var o=fn(n/190)+129,s=n%190,c=s<63?64:65;return[o,s+c]}if(r)return bi(a);n=QE(a);var f=fn(n/10/126/10);n=n-f*10*126*10;var p=fn(n/10/126);n=n-p*10*126;var m=fn(n/10),h=n-m*10;return[f+129,p+48,m+129,h+48]}}Da.gb18030=function(e){return new rb(e)};za.gb18030=function(e){return new eb(e)};function a4(e){var r=e.fatal,t=0;this.handler=function(i,a){if(a===zr&&t!==0)return t=0,Lr(r);if(a===zr&&t===0)return at;if(t!==0){var n=t,o=null;t=0;var s=a<127?64:98;switch((jr(a,64,126)||jr(a,161,254))&&(o=(n-129)*157+(a-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:rs(o,Ea("big5"));return c===null&&Ja(a)&&i.prepend(a),c===null?Lr(r):c}return Ja(a)?a:jr(a,129,254)?(t=a,null):Lr(r)}}function i4(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return at;if(Za(i))return i;var a=JE(i);if(a===null)return bi(i);var n=fn(a/157)+129;if(n<161)return bi(i);var o=a%157,s=o<63?64:98;return[n,o+s]}}Da.Big5=function(e){return new i4(e)};za.Big5=function(e){return new a4(e)};function n4(e){var r=e.fatal,t=!1,i=0;this.handler=function(a,n){if(n===zr&&i!==0)return i=0,Lr(r);if(n===zr&&i===0)return at;if(i===142&&jr(n,161,223))return i=0,65377-161+n;if(i===143&&jr(n,161,254))return t=!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=rs((o-161)*94+(n-161),Ea(t?"jis0212":"jis0208"))),t=!1,jr(n,161,254)||a.prepend(n),s===null?Lr(r):s}return Ja(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):Lr(r)}}function o4(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return at;if(Za(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 a=ts(i,Ea("jis0208"));if(a===null)return bi(i);var n=fn(a/94)+161,o=a%94+161;return[n,o]}}Da["EUC-JP"]=function(e){return new o4(e)};za["EUC-JP"]=function(e){return new n4(e)};function s4(e){var r=e.fatal,t={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=t.ASCII,a=t.ASCII,n=0,o=!1;this.handler=function(s,c){switch(i){default:case t.ASCII:return c===27?(i=t.EscapeStart,null):jr(c,0,127)&&c!==14&&c!==15&&c!==27?(o=!1,c):c===zr?at:(o=!1,Lr(r));case t.Roman:return c===27?(i=t.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===zr?at:(o=!1,Lr(r));case t.Katakana:return c===27?(i=t.EscapeStart,null):jr(c,33,95)?(o=!1,65377-33+c):c===zr?at:(o=!1,Lr(r));case t.LeadByte:return c===27?(i=t.EscapeStart,null):jr(c,33,126)?(o=!1,n=c,i=t.TrailByte,null):c===zr?at:(o=!1,Lr(r));case t.TrailByte:if(c===27)return i=t.EscapeStart,Lr(r);if(jr(c,33,126)){i=t.LeadByte;var f=(n-33)*94+c-33,p=rs(f,Ea("jis0208"));return p===null?Lr(r):p}return c===zr?(i=t.LeadByte,s.prepend(c),Lr(r)):(i=t.LeadByte,Lr(r));case t.EscapeStart:return c===36||c===40?(n=c,i=t.Escape,null):(s.prepend(c),o=!1,i=a,Lr(r));case t.Escape:var m=n;n=0;var h=null;if(m===40&&c===66&&(h=t.ASCII),m===40&&c===74&&(h=t.Roman),m===40&&c===73&&(h=t.Katakana),m===36&&(c===64||c===66)&&(h=t.LeadByte),h!==null){i=i=h;var v=o;return o=!0,v?Lr(r):null}return s.prepend([m,c]),o=!1,i=a,Lr(r)}}}function u4(e){var r=e.fatal,t={ASCII:0,Roman:1,jis0208:2},i=t.ASCII;this.handler=function(a,n){if(n===zr&&i!==t.ASCII)return a.prepend(n),i=t.ASCII,[27,40,66];if(n===zr&&i===t.ASCII)return at;if((i===t.ASCII||i===t.Roman)&&(n===14||n===15||n===27))return bi(65533);if(i===t.ASCII&&Za(n))return n;if(i===t.Roman&&(Za(n)&&n!==92&&n!==126||n==165||n==8254)){if(Za(n))return n;if(n===165)return 92;if(n===8254)return 126}if(Za(n)&&i!==t.ASCII)return a.prepend(n),i=t.ASCII,[27,40,66];if((n===165||n===8254)&&i!==t.Roman)return a.prepend(n),i=t.Roman,[27,40,74];n===8722&&(n=65293);var o=ts(n,Ea("jis0208"));if(o===null)return bi(n);if(i!==t.jis0208)return a.prepend(n),i=t.jis0208,[27,36,66];var s=fn(o/94)+33,c=o%94+33;return[s,c]}}Da["ISO-2022-JP"]=function(e){return new u4(e)};za["ISO-2022-JP"]=function(e){return new s4(e)};function c4(e){var r=e.fatal,t=0;this.handler=function(i,a){if(a===zr&&t!==0)return t=0,Lr(r);if(a===zr&&t===0)return at;if(t!==0){var n=t,o=null;t=0;var s=a<127?64:65,c=n<160?129:193;if((jr(a,64,126)||jr(a,128,252))&&(o=(n-c)*188+a-s),jr(o,8836,10715))return 57344-8836+o;var f=o===null?null:rs(o,Ea("jis0208"));return f===null&&Ja(a)&&i.prepend(a),f===null?Lr(r):f}return Ja(a)||a===128?a:jr(a,161,223)?65377-161+a:jr(a,129,159)||jr(a,224,252)?(t=a,null):Lr(r)}}function l4(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return at;if(Za(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 a=XE(i);if(a===null)return bi(i);var n=fn(a/188),o=n<31?129:193,s=a%188,c=s<63?64:65;return[n+o,s+c]}}Da.Shift_JIS=function(e){return new l4(e)};za.Shift_JIS=function(e){return new c4(e)};function f4(e){var r=e.fatal,t=0;this.handler=function(i,a){if(a===zr&&t!==0)return t=0,Lr(r);if(a===zr&&t===0)return at;if(t!==0){var n=t,o=null;t=0,jr(a,65,254)&&(o=(n-129)*190+(a-65));var s=o===null?null:rs(o,Ea("euc-kr"));return o===null&&Ja(a)&&i.prepend(a),s===null?Lr(r):s}return Ja(a)?a:jr(a,129,254)?(t=a,null):Lr(r)}}function p4(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return at;if(Za(i))return i;var a=ts(i,Ea("euc-kr"));if(a===null)return bi(i);var n=fn(a/190)+129,o=a%190+65;return[n,o]}}Da["EUC-KR"]=function(e){return new p4(e)};za["EUC-KR"]=function(e){return new f4(e)};function ul(e,r){var t=e>>8,i=e&255;return r?[t,i]:[i,t]}function tb(e,r){var t=r.fatal,i=null,a=null;this.handler=function(n,o){if(o===zr&&(i!==null||a!==null))return Lr(t);if(o===zr&&i===null&&a===null)return at;if(i===null)return i=o,null;var s;if(e?s=(i<<8)+o:s=(o<<8)+i,i=null,a!==null){var c=a;return a=null,jr(s,56320,57343)?65536+(c-55296)*1024+(s-56320):(n.prepend(ul(s,e)),Lr(t))}return jr(s,55296,56319)?(a=s,null):jr(s,56320,57343)?Lr(t):s}}function ab(e,r){var t=r.fatal;this.handler=function(i,a){if(a===zr)return at;if(jr(a,0,65535))return ul(a,e);var n=ul((a-65536>>10)+55296,e),o=ul((a-65536&1023)+56320,e);return n.concat(o)}}Da["UTF-16BE"]=function(e){return new ab(!0,e)};za["UTF-16BE"]=function(e){return new tb(!0,e)};Da["UTF-16LE"]=function(e){return new ab(!1,e)};za["UTF-16LE"]=function(e){return new tb(!1,e)};function d4(e){var r=e.fatal;this.handler=function(t,i){return i===zr?at:Ja(i)?i:63360+i-128}}function h4(e){var r=e.fatal;this.handler=function(t,i){return i===zr?at:Za(i)?i:jr(i,63360,63487)?i-63360+128:bi(i)}}Da["x-user-defined"]=function(e){return new h4(e)};za["x-user-defined"]=function(e){return new d4(e)};var m4="rejected",v4="fulfilled";function ib(e){let r=e.map(t=>t.then(i=>({status:v4,value:i})).catch(i=>({status:m4,reason:i})));return Promise.all(r)}function cl(e){return Buffer.from(e).toString("base64")}function Jp(e){return Buffer.from(e,"base64").toString("ascii")}var yi=class{constructor(r){this.map={},r instanceof yi?r.forEach((t,i)=>this.append(i,t)):Array.isArray(r)?r.forEach(t=>this.append(t[0],t[1])):r&&Object.getOwnPropertyNames(r).forEach(t=>this.append(t,r[t]))}append(r,t){r=yu(r),t=nb(t);let i=this.map[r];this.map[r]=i?`${i}, ${t}`:t}delete(r){delete this.map[yu(r)]}get(r){return r=yu(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(yu(r))}set(r,t){this.map[yu(r)]=nb(t)}forEach(r,t=null){for(let i in this.map)this.map.hasOwnProperty(i)&&(t?r.call(t,this.map[i],i,this):r(this.map[i],i,this))}keys(){let r=[];return this.forEach(function(t,i){r.push(i)}),Zp(r)}values(){let r=[];return this.forEach(function(t){r.push(t)}),Zp(r)}entries(){let r=[];return this.forEach(function(t,i){r.push([i,t])}),Zp(r)}*[Symbol.iterator](){yield*this.entries()}};function yu(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 nb(e){return typeof e!="string"&&(e=String(e)),e}function Zp(e){let r={next(){let t=e.shift();return{done:t===void 0,value:t}}};return r[Symbol.iterator]=function(){return r},r}function xu(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var sb=Oa(require("fs")),ub=Oa(require("http")),cb=Oa(require("https")),ll=Oa(require("zlib"));var g4=e=>e&&e instanceof ArrayBuffer,b4=e=>e&&e instanceof Buffer;function ob(e){let r=e.indexOf(","),t,i;return e.slice(r-7,r)===";base64"?(t=Buffer.from(e.slice(r+1),"base64"),i=e.slice(5,r-7).trim()):(t=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:ed(t),mimeType:i}}function ed(e){if(g4(e))return e;if(b4(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)})`)}function y4(e){return e.startsWith("http:")||e.startsWith("https:")}async function lb(e,r){if(!y4(e)){let t=e.split("?")[0];return await new Promise((i,a)=>{let n=sb.default.createReadStream(t,{encoding:null});n.once("readable",()=>i(n)),n.on("error",o=>a(o))})}return await new Promise((t,i)=>{let a=e.startsWith("https:")?cb.default.request:ub.default.request,n=x4(e,r),o=a(n,s=>t(s));o.on("error",s=>i(s)),o.end()})}function fb(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(ll.default.createBrotliDecompress());case"gzip":return e.pipe(ll.default.createGunzip());case"deflate":return e.pipe(ll.default.createDeflate());default:return e}}async function pb(e){let r=[];return await new Promise((t,i)=>{e.on("error",a=>i(a)),e.on("readable",()=>e.read()),e.on("data",a=>{typeof a=="string"&&i(new Error("Read stream not binary")),r.push(ed(a))}),e.on("end",()=>{let a=w4(r);t(a)})})}function x4(e,r){let t=(r==null?void 0:r.headers)||{},i={};for(let n of Object.keys(t))i[n.toLowerCase()]=t[n];i["accept-encoding"]=i["accept-encoding"]||"gzip,br,deflate";let a=new URL(e);return mi(ha(ha({hostname:a.hostname,path:a.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:i,port:a.port})}function w4(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),t=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(t),a=0;for(let n of r)i.set(n,a),a+=n.byteLength;return i.buffer}var td=Oa(require("stream")),k4=e=>typeof e=="boolean",db=e=>typeof e=="function",_4=e=>e!==null&&typeof e=="object",rd=e=>_4(e)&&db(e.read)&&db(e.pipe)&&k4(e.readable),pn=class{constructor(r,t){this.bodyUsed=!1;let{headers:i,status:a=200,statusText:n="OK",url:o}=t||{};this.url=o,this.ok=a===200,this.status=a,this.statusText=n,this.headers=new yi((t==null?void 0:t.headers)||{}),rd(r)?this._body=fb(r,i):typeof r=="string"?this._body=td.Readable.from([new TextEncoder().encode(r)]):this._body=td.Readable.from([r||new ArrayBuffer(0)])}get body(){return xu(!this.bodyUsed),xu(rd(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return rd(this._body)?await pb(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=="undefined")throw new Error("Blob polyfill not installed");return new Blob([await this.arrayBuffer()])}};var hb=Oa(require("fs"));var mb=e=>e.startsWith("data:"),j4=e=>e.startsWith("http:")||e.startsWith("https:");async function as(e,r){try{if(mb(e)){let{arrayBuffer:f,mimeType:p}=ob(e);return new pn(f,{headers:{"content-type":p},url:e})}let t={},i=e;e.endsWith(".gz")&&(e=e.slice(0,-3),t["content-encoding"]="gzip");let a=await lb(i,r),n=A4(e,a,t),{status:o,statusText:s}=E4(a),c=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&c){let f=S4(e,n.get("location"));return await as(f,r)}return new pn(a,{headers:n,status:o,statusText:s,url:e})}catch(t){return new pn(null,{status:400,statusText:String(t),url:e})}}function S4(e,r){if(r.startsWith("http"))return r;let t=new URL(e);return t.pathname=r,t.href}function E4(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function A4(e,r,t={}){let i={};if(r&&r.headers){let a=r.headers;for(let n in a){let o=a[n];i[n.toLowerCase()]=String(o)}}if(!i["content-length"]){let a=P4(e);Number.isFinite(a)&&(i["content-length"]=a)}return Object.assign(i,t),new yi(i)}function P4(e){if(j4(e))return null;if(mb(e))return e.length-"data:".length;try{let r=e.split("?")[0];return hb.default.statSync(r).size}catch{}return null}var fx=Oa(cx()),px=Oa(Pu());function lx(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function UP(e,r){let t=r.type?r.type.replace("image/",""):"jpeg",i=(0,px.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,fx.default)(i,t,r)}function eh(e,r){let t=UP(e,r);return new Promise(i=>{let a=[];t.on("data",n=>a.push(n)),t.on("end",()=>{let n=Buffer.concat(a);i(lx(n))})})}var $S=Oa(VS());var WS=Oa(require("util"));async function i0(e,r){xu(r,"MIMEType is required to parse image under Node.js");let t=WS.default.promisify($S.default),i=e instanceof Buffer?e:Buffer.from(e),a=await t(i,r),n=[...a.shape],o=a.shape.length===4?a.shape.shift():1,s=a.data instanceof Buffer?new Uint8Array(a.data):a.data;return{shape:n,data:s,width:a.shape[0],height:a.shape[1],components:a.shape[2],layers:o}}var YS=Oa(KS());delete global.ReadableStream;var jc=class extends YS.ReadableStream{};var n0=class{constructor(r){this.isWorking=!1;this.isCancelled=!1;this.chunks=r}start(r){this.work(r)}async work(r){let{chunks:t}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let i;try{i=t.next()}catch(a){r.error(a);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 o0=class extends jc{constructor(r){super(new n0(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let t=this.getReader();yield*this._chunks,t.releaseLock()}};var lo=class{constructor(r=[],t={}){this.parts=[],this.size=0;for(let i of r)if(typeof i=="string"){let a=new TextEncoder().encode(i);this.parts.push(a),this.size+=a.byteLength}else if(i instanceof lo)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:a,byteOffset:n,byteLength:o}=i;this.parts.push(new Uint8Array(a,n,o)),this.size+=o}else{let a=new TextEncoder().encode(String(i));this.parts.push(a),this.size+=a.byteLength}this.type=eN(t.type)}slice(r=0,t=this.size,i=""){let{size:a,parts:n}=this,o=r<0?Math.max(a+r,0):Math.min(r,a),s=t<0?Math.max(a+t,0):Math.min(t,a),c=Math.max(s-o,0),f=new lo([],{type:i});if(c===0)return f;let p=0,m=[];for(let h of n){let{byteLength:v}=h;if(o>0&&v<=o)o-=v,s-=v;else{let y=h.subarray(o,Math.min(v,s));if(m.push(y),p+=y.byteLength,o=0,p>=c)break}}return f.parts=m,f.size=p,f}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,t="";for(let i of this.parts)t+=r.decode(i);return t}stream(){return new o0(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),t=new Uint8Array(r),i=0;for(let a of this.parts)t.set(a,i),i+=a.byteLength;return r}};function eN(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var s0=class extends lo{constructor(r,t,i={}){super(r,i);this.name="";this.webkitRelativePath="";this.name=String(t).replace(/\//g,":"),this.lastModified=(i==null?void 0:i.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};var tN=!gi||!("TextEncoder"in At);tN&&(At.TextEncoder=bu);var aN=!gi||!("TextDecoder"in At);aN&&(At.TextDecoder=ko);!gi&&!("atob"in At)&&cl&&(At.atob=cl);!gi&&!("btoa"in At)&&Jp&&(At.btoa=Jp);!gi&&!("Headers"in At)&&yi&&(At.Headers=yi);!gi&&!("Response"in At)&&pn&&(At.Response=pn);!gi&&!("fetch"in At)&&as&&(At.fetch=as);!gi&&!("DOMParser"in At)&&u0.DOMParser&&(At.DOMParser=u0.DOMParser);!gi&&!("_encodeImageNode"in At)&&eh&&(At._encodeImageNode=eh);!gi&&!("_parseImageNode"in At)&&i0&&(At._parseImageNode=i0);"allSettled"in Promise||(Promise.allSettled=ib);var QS="3.3.0-alpha.6";var iN={draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},XS={name:"Draco",id:bo?"draco":"draco-nodejs",module:"draco",shapes:["mesh"],version:QS,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:iN};function c0(e){let r=1/0,t=1/0,i=1/0,a=-1/0,n=-1/0,o=-1/0,s=e.POSITION?e.POSITION.value:[],c=s&&s.length;for(let f=0;f<c;f+=3){let p=s[f],m=s[f+1],h=s[f+2];r=p<r?p:r,t=m<t?m:t,i=h<i?h:i,a=p>a?p:a,n=m>n?m:n,o=h>o?h:o}return[[r,t,i],[a,n,o]]}function JS(e,r){if(!e)throw new Error(r||"loader assertion failed.")}var li=class{constructor(r,t){JS(Array.isArray(r)),nN(r),this.fields=r,this.metadata=t||new Map}compareTo(r){if(this.metadata!==r.metadata||this.fields.length!==r.fields.length)return!1;for(let t=0;t<this.fields.length;++t)if(!this.fields[t].compareTo(r.fields[t]))return!1;return!0}select(...r){let t=Object.create(null);for(let a of r)t[a]=!0;let i=this.fields.filter(a=>t[a.name]);return new li(i,this.metadata)}selectAt(...r){let t=r.map(i=>this.fields[i]).filter(Boolean);return new li(t,this.metadata)}assign(r){let t,i=this.metadata;if(r instanceof li){let o=r;t=o.fields,i=ZS(ZS(new Map,this.metadata),o.metadata)}else t=r;let a=Object.create(null);for(let o of this.fields)a[o.name]=o;for(let o of t)a[o.name]=o;let n=Object.values(a);return new li(n,i)}};function nN(e){let r={};for(let t of e)r[t.name]&&console.warn("Schema: duplicated field name",t.name,t),r[t.name]=!0}function ZS(e,r){return new Map([...e||new Map,...r||new Map])}var Tn=class{constructor(r,t,i=!1,a=new Map){this.name=r,this.type=t,this.nullable=i,this.metadata=a}get typeId(){return this.type&&this.type.typeId}clone(){return new Tn(this.name,this.type,this.nullable,this.metadata)}compareTo(r){return this.name===r.name&&this.type===r.type&&this.nullable===r.nullable&&this.metadata===r.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?`, metadata: ${this.metadata}`:""}`}};var Ur;(function(Q){Q[Q.NONE=0]="NONE",Q[Q.Null=1]="Null",Q[Q.Int=2]="Int",Q[Q.Float=3]="Float",Q[Q.Binary=4]="Binary",Q[Q.Utf8=5]="Utf8",Q[Q.Bool=6]="Bool",Q[Q.Decimal=7]="Decimal",Q[Q.Date=8]="Date",Q[Q.Time=9]="Time",Q[Q.Timestamp=10]="Timestamp",Q[Q.Interval=11]="Interval",Q[Q.List=12]="List",Q[Q.Struct=13]="Struct",Q[Q.Union=14]="Union",Q[Q.FixedSizeBinary=15]="FixedSizeBinary",Q[Q.FixedSizeList=16]="FixedSizeList",Q[Q.Map=17]="Map",Q[Q.Dictionary=-1]="Dictionary",Q[Q.Int8=-2]="Int8",Q[Q.Int16=-3]="Int16",Q[Q.Int32=-4]="Int32",Q[Q.Int64=-5]="Int64",Q[Q.Uint8=-6]="Uint8",Q[Q.Uint16=-7]="Uint16",Q[Q.Uint32=-8]="Uint32",Q[Q.Uint64=-9]="Uint64",Q[Q.Float16=-10]="Float16",Q[Q.Float32=-11]="Float32",Q[Q.Float64=-12]="Float64",Q[Q.DateDay=-13]="DateDay",Q[Q.DateMillisecond=-14]="DateMillisecond",Q[Q.TimestampSecond=-15]="TimestampSecond",Q[Q.TimestampMillisecond=-16]="TimestampMillisecond",Q[Q.TimestampMicrosecond=-17]="TimestampMicrosecond",Q[Q.TimestampNanosecond=-18]="TimestampNanosecond",Q[Q.TimeSecond=-19]="TimeSecond",Q[Q.TimeMillisecond=-20]="TimeMillisecond",Q[Q.TimeMicrosecond=-21]="TimeMicrosecond",Q[Q.TimeNanosecond=-22]="TimeNanosecond",Q[Q.DenseUnion=-23]="DenseUnion",Q[Q.SparseUnion=-24]="SparseUnion",Q[Q.IntervalDayTime=-25]="IntervalDayTime",Q[Q.IntervalYearMonth=-26]="IntervalYearMonth"})(Ur||(Ur={}));var Fa=class{static isNull(r){return r&&r.typeId===Ur.Null}static isInt(r){return r&&r.typeId===Ur.Int}static isFloat(r){return r&&r.typeId===Ur.Float}static isBinary(r){return r&&r.typeId===Ur.Binary}static isUtf8(r){return r&&r.typeId===Ur.Utf8}static isBool(r){return r&&r.typeId===Ur.Bool}static isDecimal(r){return r&&r.typeId===Ur.Decimal}static isDate(r){return r&&r.typeId===Ur.Date}static isTime(r){return r&&r.typeId===Ur.Time}static isTimestamp(r){return r&&r.typeId===Ur.Timestamp}static isInterval(r){return r&&r.typeId===Ur.Interval}static isList(r){return r&&r.typeId===Ur.List}static isStruct(r){return r&&r.typeId===Ur.Struct}static isUnion(r){return r&&r.typeId===Ur.Union}static isFixedSizeBinary(r){return r&&r.typeId===Ur.FixedSizeBinary}static isFixedSizeList(r){return r&&r.typeId===Ur.FixedSizeList}static isMap(r){return r&&r.typeId===Ur.Map}static isDictionary(r){return r&&r.typeId===Ur.Dictionary}get typeId(){return Ur.NONE}compareTo(r){return this===r}},l0=class extends Fa{get typeId(){return Ur.Null}get[Symbol.toStringTag](){return"Null"}toString(){return"Null"}},f0=class extends Fa{get typeId(){return Ur.Bool}get[Symbol.toStringTag](){return"Bool"}toString(){return"Bool"}},Cn=class extends Fa{constructor(r,t){super();this.isSigned=r,this.bitWidth=t}get typeId(){return Ur.Int}get[Symbol.toStringTag](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}},Sc=class extends Cn{constructor(){super(!0,8)}},Ec=class extends Cn{constructor(){super(!0,16)}},Ac=class extends Cn{constructor(){super(!0,32)}};var Pc=class extends Cn{constructor(){super(!1,8)}},Tc=class extends Cn{constructor(){super(!1,16)}},Cc=class extends Cn{constructor(){super(!1,32)}};var e8={HALF:16,SINGLE:32,DOUBLE:64},Ic=class extends Fa{constructor(r){super();this.precision=r}get typeId(){return Ur.Float}get[Symbol.toStringTag](){return"Float"}toString(){return`Float${this.precision}`}};var Fc=class extends Ic{constructor(){super(e8.SINGLE)}},qc=class extends Ic{constructor(){super(e8.DOUBLE)}},p0=class extends Fa{constructor(){super()}get typeId(){return Ur.Binary}toString(){return"Binary"}get[Symbol.toStringTag](){return"Binary"}},d0=class extends Fa{get typeId(){return Ur.Utf8}get[Symbol.toStringTag](){return"Utf8"}toString(){return"Utf8"}},oN={DAY:0,MILLISECOND:1},h0=class extends Fa{constructor(r){super();this.unit=r}get typeId(){return Ur.Date}get[Symbol.toStringTag](){return"Date"}toString(){return`Date${(this.unit+1)*32}<${oN[this.unit]}>`}};var r8={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9},m0=class extends Fa{constructor(r,t){super();this.unit=r,this.bitWidth=t}get typeId(){return Ur.Time}toString(){return`Time${this.bitWidth}<${r8[this.unit]}>`}get[Symbol.toStringTag](){return"Time"}};var v0=class extends Fa{constructor(r,t=null){super();this.unit=r,this.timezone=t}get typeId(){return Ur.Timestamp}get[Symbol.toStringTag](){return"Timestamp"}toString(){return`Timestamp<${r8[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};var sN={DAY_TIME:0,YEAR_MONTH:1},g0=class extends Fa{constructor(r){super();this.unit=r}get typeId(){return Ur.Interval}get[Symbol.toStringTag](){return"Interval"}toString(){return`Interval<${sN[this.unit]}>`}};var Oc=class extends Fa{constructor(r,t){super();this.listSize=r,this.children=[t]}get typeId(){return Ur.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[Symbol.toStringTag](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}},b0=class extends Fa{constructor(r){super();this.children=r}get typeId(){return Ur.Struct}toString(){return`Struct<{${this.children.map(r=>`${r.name}:${r.type}`).join(", ")}}>`}get[Symbol.toStringTag](){return"Struct"}};function t8(e){switch(e.constructor){case Int8Array:return new Sc;case Uint8Array:return new Pc;case Int16Array:return new Ec;case Uint16Array:return new Tc;case Int32Array:return new Ac;case Uint32Array:return new Cc;case Float32Array:return new Fc;case Float64Array:return new qc;default:throw new Error("array type not supported")}}function y0(e,r,t){let i=t8(r.value),a=t||a8(r);return new Tn(e,new Oc(r.size,new Tn("value",i)),!1,a)}function a8(e){let r=new Map;return"byteOffset"in e&&r.set("byteOffset",e.byteOffset.toString(10)),"byteStride"in e&&r.set("byteStride",e.byteStride.toString(10)),"normalized"in e&&r.set("normalized",e.normalized.toString()),r}function i8(e,r,t){let i=o8(r.metadata),a=[],n=wN(r.attributes);for(let o in e){let s=e[o],c=n8(o,s,n[o]);a.push(c)}if(t){let o=n8("indices",t);a.push(o)}return new li(a,i)}function wN(e){let r={};for(let t in e){let i=e[t];r[i.name||"undefined"]=i}return r}function n8(e,r,t){let i=t?o8(t.metadata):void 0;return y0(e,r,i)}function o8(e){let r=new Map;for(let t in e)r.set(`${t}.string`,JSON.stringify(e[t]));return r}var s8={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},kN={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},_N=4,sp=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,t={}){let i=new this.draco.DecoderBuffer;i.Init(new Int8Array(r),r.byteLength),this._disableAttributeTransforms(t);let a=this.decoder.GetEncodedGeometryType(i),n=a===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let o;switch(a){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,a,t),c=this._getMeshData(n,s,t),f=c0(c.attributes),p=i8(c.attributes,s,c.indices);return mi(ha({loader:"draco",loaderData:s,header:{vertexCount:n.num_points(),boundingBox:f}},c),{schema:p})}finally{this.draco.destroy(i),n&&this.draco.destroy(n)}}_getDracoLoaderData(r,t,i){let a=this._getTopLevelMetadata(r),n=this._getDracoAttributes(r,i);return{geometry_type:t,num_attributes:r.num_attributes(),num_points:r.num_points(),num_faces:r instanceof this.draco.Mesh?r.num_faces():0,metadata:a,attributes:n}}_getDracoAttributes(r,t){let i={};for(let a=0;a<r.num_attributes();a++){let n=this.decoder.GetAttribute(r,a),o=this._getAttributeMetadata(r,a);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:a,metadata:o};let s=this._getQuantizationTransform(n,t);s&&(i[n.unique_id()].quantization_transform=s);let c=this._getOctahedronTransform(n,t);c&&(i[n.unique_id()].octahedron_transform=c)}return i}_getMeshData(r,t,i){let a=this._getMeshAttributes(t,r,i);if(!a.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:a,indices:{value:this._getTriangleStripIndices(r),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:a,indices:{value:this._getTriangleListIndices(r),size:1}}}return{topology:"point-list",mode:0,attributes:a}}_getMeshAttributes(r,t,i){let a={};for(let n of Object.values(r.attributes)){let o=this._deduceAttributeName(n,i);n.name=o;let{value:s,size:c}=this._getAttributeValues(t,n);a[o]={value:s,size:c,byteOffset:n.byte_offset,byteStride:n.byte_stride,normalized:n.normalized}}return a}_getTriangleListIndices(r){let i=r.num_faces()*3,a=i*_N,n=this.draco._malloc(a);try{return this.decoder.GetTrianglesUInt32Array(r,a,n),new Uint32Array(this.draco.HEAPF32.buffer,n,i).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(r){let t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(r,t),EN(t)}finally{this.draco.destroy(t)}}_getAttributeValues(r,t){let i=kN[t.data_type],a=t.num_components,o=r.num_points()*a,s=o*i.BYTES_PER_ELEMENT,c=jN(this.draco,i),f,p=this.draco._malloc(s);try{let m=this.decoder.GetAttribute(r,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(r,m,c,s,p),f=new i(this.draco.HEAPF32.buffer,p,o).slice()}finally{this.draco._free(p)}return{value:f,size:a}}_deduceAttributeName(r,t){let i=r.unique_id;for(let[o,s]of Object.entries(t.extraAttributes||{}))if(s===i)return o;let a=r.attribute_type;for(let o in s8)if(this.draco[o]===a)return s8[o];let n=t.attributeNameEntry||"name";return r.metadata[n]?r.metadata[n].string:`CUSTOM_ATTRIBUTE_${i}`}_getTopLevelMetadata(r){let t=this.decoder.GetMetadata(r);return this._getDracoMetadata(t)}_getAttributeMetadata(r,t){let i=this.decoder.GetAttributeMetadata(r,t);return this._getDracoMetadata(i)}_getDracoMetadata(r){if(!r||!r.ptr)return{};let t={},i=this.metadataQuerier.NumEntries(r);for(let a=0;a<i;a++){let n=this.metadataQuerier.GetEntryName(r,a);t[n]=this._getDracoMetadataField(r,n)}return t}_getDracoMetadataField(r,t){let i=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(r,t,i);let a=SN(i);return{int:this.metadataQuerier.GetIntEntry(r,t),string:this.metadataQuerier.GetStringEntry(r,t),double:this.metadataQuerier.GetDoubleEntry(r,t),intArray:a}}finally{this.draco.destroy(i)}}_disableAttributeTransforms(r){let{quantizedAttributes:t=[],octahedronAttributes:i=[]}=r,a=[...t,...i];for(let n of a)this.decoder.SkipAttributeTransform(this.draco[n])}_getQuantizationTransform(r,t){let{quantizedAttributes:i=[]}=t,a=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(a)){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,t){let{octahedronAttributes:i=[]}=t,a=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(a)){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 jN(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 SN(e){let r=e.size(),t=new Int32Array(r);for(let i=0;i<r;i++)t[i]=e.GetValue(i);return t}function EN(e){let r=e.size(),t=new Int32Array(r);for(let i=0;i<r;i++)t[i]=e.GetValue(i);return t}var up="1.4.1",AN=`https://www.gstatic.com/draco/versioned/decoders/${up}/draco_decoder.js`,PN=`https://www.gstatic.com/draco/versioned/decoders/${up}/draco_wasm_wrapper.js`,TN=`https://www.gstatic.com/draco/versioned/decoders/${up}/draco_decoder.wasm`,WK=`https://raw.githubusercontent.com/google/draco/${up}/javascript/draco_encoder.js`,Rc;async function u8(e){let r=e.modules||{};return r.draco3d?Rc=Rc||r.draco3d.createDecoderModule({}).then(t=>({draco:t})):Rc=Rc||CN(e),await Rc}async function CN(e){let r,t;switch(e.draco&&e.draco.decoderType){case"js":r=await iu(AN,"draco",e);break;case"wasm":default:[r,t]=await Promise.all([await iu(PN,"draco",e),await iu(TN,"draco",e)])}return r=r||globalThis.DracoDecoderModule,await IN(r,t)}function IN(e,r){let t={};return r&&(t.wasmBinary=r),new Promise(i=>{e(mi(ha({},t),{onModuleLoaded:a=>i({draco:a})}))})}var c8=mi(ha({},XS),{parse:FN});async function FN(e,r){let{draco:t}=await u8(r),i=new sp(t);try{return i.parseSync(e,r==null?void 0:r.draco)}finally{i.destroy()}}Cp(c8);
|
|
95
|
+
`,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(a)}};nn.prototype.removeSocket=function(r){var t=this.sockets.indexOf(r);if(t!==-1){this.sockets.splice(t,1);var i=this.requests.shift();i&&this.createConnection(i)}};function mS(e,r){var t=this;nn.prototype.createSocket.call(t,e,function(i){var a=Yz.connect(0,vS({},t.options,{servername:e.host,socket:i}));t.sockets[t.sockets.indexOf(i)]=a,r(a)})}function vS(e){for(var r=1,t=arguments.length;r<t;++r){var i=arguments[r];if(typeof i=="object")for(var a=Object.keys(i),n=0,o=a.length;n<o;++n){var s=a[n];i[s]!==void 0&&(e[s]=i[s])}}return e}var No;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?No=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)}:No=function(){};$s.debug=No});var wS=R(xS=>{"use strict";var iL=require("url"),nL=gS(),bS=["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"],yS=["proxy-authorization"];function oL(e){var r=e.port,t=e.protocol,i=e.hostname+":";return r?i+=r:t==="https:"?i+="443":i+="80",i}function sL(e,r){var t=r.reduce(function(i,a){return i[a.toLowerCase()]=!0,i},{});return Object.keys(e).filter(function(i){return t[i.toLowerCase()]}).reduce(function(i,a){return i[a]=e[a],i},{})}function uL(e,r){var t=e.proxy,i={proxy:{host:t.hostname,port:+t.port,proxyAuth:t.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 cL(e,r){var t=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[t,i].join("Over")}function lL(e){var r=e.uri,t=e.proxy,i=cL(r,t);return nL[i]}function bc(e){this.request=e,this.proxyHeaderWhiteList=bS,this.proxyHeaderExclusiveList=[],typeof e.tunnel!="undefined"&&(this.tunnelOverride=e.tunnel)}bc.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride!="undefined"?e.tunnelOverride:r.uri.protocol==="https:"};bc.prototype.setup=function(e){var r=this,t=r.request;if(e=e||{},typeof t.proxy=="string"&&(t.proxy=iL.parse(t.proxy)),!t.proxy||!t.tunnel)return!1;e.proxyHeaderWhiteList&&(r.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(r.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=r.proxyHeaderExclusiveList.concat(yS),a=r.proxyHeaderWhiteList.concat(i),n=sL(t.headers,a);n.host=oL(t.uri),i.forEach(t.removeHeader,t);var o=lL(t),s=uL(t,n);return t.agent=o(s),!0};bc.defaultProxyHeaderWhiteList=bS;bc.defaultProxyHeaderExclusiveList=yS;xS.Tunnel=bc});var _S=R((kS,yc)=>{(function(){var e,r,t,i,a,n;typeof performance!="undefined"&&performance!==null&&performance.now?yc.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(yc.exports=function(){return(e()-a)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},i=e(),n=process.uptime()*1e9,a=i-n):Date.now?(yc.exports=function(){return Date.now()-t},t=Date.now()):(yc.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(kS)});var OS=R((kG,qS)=>{"use strict";var fL=require("http"),jS=require("https"),xc=require("url"),e0=require("util"),tp=require("stream"),ap=require("zlib"),r0=c2(),pL=y2(),dL=c3(),hL=Pf(),SS=Tf(),ES=b3(),mL=W3(),vL=El(),AS=gv(),gL=J3().strict,Ws=Il(),bL=Ph(),yL=rj(),xL=dj().Querystring,wL=M5().Har,kL=Q5().Auth,_L=sS().OAuth,jL=uS(),SL=lS().Multipart,EL=dS().Redirect,t0=wS().Tunnel,Gs=_S(),wc=ms().Buffer,PS=Ws.safeStringify,AL=Ws.isReadStream,PL=Ws.toBase64,TL=Ws.defer,TS=Ws.copy,CL=Ws.version,CS=bL.jar(),IS={};function IL(e,r){var t={};for(var i in r){var a=e.indexOf(i)===-1;a&&(t[i]=r[i])}return t}function FL(e,r){var t={};for(var i in r){var a=e.indexOf(i)!==-1,n=typeof r[i]=="function";a&&n||(t[i]=r[i])}return t}function FS(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function qL(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:FS.call(e.request)}}function Rr(e){var r=this;e.har&&(r._har=new wL(r),e=r._har.options(e)),tp.Stream.call(r);var t=Object.keys(Rr.prototype),i=IL(t,e);vL(r,i),e=FL(t,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new xL(r),r._auth=new kL(r),r._oauth=new _L(r),r._multipart=new SL(r),r._redirect=new EL(r),r._tunnel=new t0(r),r.init(e)}e0.inherits(Rr,tp.Stream);Rr.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function aa(){Rr.debug&&console.error("REQUEST %s",e0.format.apply(e0,arguments))}Rr.prototype.debug=aa;Rr.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?TS(r.headers):{};for(var t in r.headers)typeof r.headers[t]=="undefined"&&delete r.headers[t];if(SS.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),aa(e),!r.pool&&r.pool!==!1&&(r.pool=IS),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,a=r.uri.indexOf("/")===0;i&&a?r.uri=r.baseUrl+r.uri.slice(1):i||a?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=xc.parse(r.uri)),r.uri.href||(r.uri.href=xc.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=xc.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=yL(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,f=r.form(),p=function(B,L){L&&L.hasOwnProperty("value")&&L.hasOwnProperty("options")?f.append(B,L.value,L.options):f.append(B,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++)p(m,h[v]);else p(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 y=r.uri.auth.split(":").map(function(B){return r._qs.unescape(B)});r.auth(y[0],y.slice(1).join(":"),!0)}if(!r.tunnel&&r.proxy&&r.proxy.auth&&!r.hasHeader("proxy-authorization")){var E=r.proxy.auth.split(":").map(function(B){return r._qs.unescape(B)}),w="Basic "+PL(E.join(":"));r.setHeader("proxy-authorization",w)}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(gL(r.body)&&(r.body=wc.from(r.body)),!r.hasHeader("content-length")){var B;typeof r.body=="string"?B=wc.byteLength(r.body):Array.isArray(r.body)?B=r.body.reduce(function(L,V){return L+V.length},0):B=r.body.length,B?r.setHeader("content-length",B):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!AS(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:":fL,"https:":jS},O=r.httpModules||{};if(r.httpModule=O[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 F=CL();F.major===0&&F.minor<=10?r.agentClass=C==="http:"?ES:ES.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(B){if(r.ntick&&r._started&&r.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),r.src=B,AL(B))r.hasHeader("content-type")||r.setHeader("content-type",hL.lookup(B.path));else{if(B.headers)for(var L in B.headers)r.hasHeader(L)||r.setHeader(L,B.headers[L]);r._json&&!r.hasHeader("content-type")&&r.setHeader("content-type","application/json"),B.method&&!r.explicitMethod&&(r.method=B.method)}}),TL(function(){if(!r._aborted){var B=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)AS(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!="undefined"&&r.setHeader("content-length",0),r.end()}};r._form&&!r.hasHeader("content-length")?(r.setHeader(r._form.getHeaders(),!0),r._form.getLength(function(L,V){!L&&!isNaN(V)&&r.setHeader("content-length",V),B()})):B(),r.ntick=!0}})};Rr.prototype.getNewAgent=function(){var e=this,r=e.agentClass,t={};if(e.agentOptions)for(var i in e.agentOptions)t[i]=e.agentOptions[i];e.ca&&(t.ca=e.ca),e.ciphers&&(t.ciphers=e.ciphers),e.secureProtocol&&(t.secureProtocol=e.secureProtocol),e.secureOptions&&(t.secureOptions=e.secureOptions),typeof e.rejectUnauthorized!="undefined"&&(t.rejectUnauthorized=e.rejectUnauthorized),e.cert&&e.key&&(t.key=e.key,t.cert=e.cert),e.pfx&&(t.pfx=e.pfx),e.passphrase&&(t.passphrase=e.passphrase);var a="";r!==e.httpModule.Agent&&(a+=r.name);var n=e.proxy;typeof n=="string"&&(n=xc.parse(n));var o=n&&n.protocol==="https:"||this.uri.protocol==="https:";return o&&(t.ca&&(a&&(a+=":"),a+=t.ca),typeof t.rejectUnauthorized!="undefined"&&(a&&(a+=":"),a+=t.rejectUnauthorized),t.cert&&(a&&(a+=":"),a+=t.cert.toString("ascii")+t.key.toString("ascii")),t.pfx&&(a&&(a+=":"),a+=t.pfx.toString("ascii")),t.ciphers&&(a&&(a+=":"),a+=t.ciphers),t.secureProtocol&&(a&&(a+=":"),a+=t.secureProtocol),t.secureOptions&&(a&&(a+=":"),a+=t.secureOptions)),e.pool===IS&&!a&&Object.keys(t).length===0&&e.httpModule.globalAgent?e.httpModule.globalAgent:(a=e.uri.protocol+a,e.pool[a]||(e.pool[a]=new r(t),e.pool.maxSockets&&(e.pool[a].maxSockets=e.pool.maxSockets)),e.pool[a])};Rr.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),t=Gs();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=TS(e);delete i.auth,aa("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=t,e.timings={});var a;e.timeout&&!e.timeoutTimer&&(e.timeout<0?a=0:typeof e.timeout=="number"&&isFinite(e.timeout)&&(a=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=Gs()-e.startTimeNow,o)){var s=function(){e.timings.lookup=Gs()-e.startTimeNow},c=function(){e.timings.connect=Gs()-e.startTimeNow};n.once("lookup",s),n.once("connect",c),e.req.once("error",function(){n.removeListener("lookup",s),n.removeListener("connect",c)})}var f=function(){e.req.setTimeout(a,function(){if(e.req){e.abort();var m=new Error("ESOCKETTIMEDOUT");m.code="ESOCKETTIMEDOUT",m.connect=!1,e.emit("error",m)}})};if(a!==void 0)if(o){var p=function(){n.removeListener("connect",p),e.clearTimeout(),f()};n.on("connect",p),e.req.on("error",function(m){n.removeListener("connect",p)}),e.timeoutTimer=setTimeout(function(){n.removeListener("connect",p),e.abort();var m=new Error("ETIMEDOUT");m.code="ETIMEDOUT",m.connect=!0,e.emit("error",m)},a)}else f();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=Gs()-r.startTimeNow),aa("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=Gs()-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),aa("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}),aa("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){aa("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=qL,r.httpModule===jS&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){aa("strict ssl error",r.uri.href);var t=e.hasOwnProperty("socket")?e.socket.authorizationError:r.uri.href+" does not support SSL";r.emit("error",new Error("SSL Error: "+t));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:CS,a=function(p){try{i.setCookie(p,r.uri.href,{ignoreError:!0})}catch(m){r.emit("error",m)}};if(e.caseless=SS(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(a):a(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(p){return r.method==="HEAD"||p>=100&&p<200||p===204||p===304},s;if(r.gzip&&!o(e.statusCode)){var c=e.headers["content-encoding"]||"identity";c=c.trim().toLowerCase();var f={flush:ap.Z_SYNC_FLUSH,finishFlush:ap.Z_SYNC_FLUSH};c==="gzip"?(s=ap.createGunzip(f),e.pipe(s)):c==="deflate"?(s=ap.createInflate(f),e.pipe(s)):(c!=="identity"&&aa("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(p){r.pipeDest(p)}),s.on("data",function(p){r.timing&&!r.responseStarted&&(r.responseStartTime=new Date().getTime(),e.responseStartTime=r.responseStartTime),r._destdata=!0,r.emit("data",p)}),s.once("end",function(p){r.emit("end",p)}),s.on("error",function(p){r.emit("error",p)}),s.on("close",function(){r.emit("close")}),r.callback?r.readResponseBody(e):r.on("end",function(){if(r._aborted){aa("aborted",r.uri.href);return}r.emit("complete",e)})}aa("finish init function",r.uri.href)}};Rr.prototype.readResponseBody=function(e){var r=this;aa("reading response's body");var t=[],i=0,a=[];r.on("data",function(n){wc.isBuffer(n)?n.length&&(i+=n.length,t.push(n)):a.push(n)}),r.on("end",function(){if(aa("end event",r.uri.href),r._aborted){aa("aborted",r.uri.href),t=[],i=0;return}if(i?(aa("has body",r.uri.href,i),e.body=wc.concat(t,i),r.encoding!==null&&(e.body=e.body.toString(r.encoding)),t=[],i=0):a.length&&(r.encoding==="utf8"&&a[0].length>0&&a[0][0]==="\uFEFF"&&(a[0]=a[0].substring(1)),e.body=a.join("")),r._json)try{e.body=JSON.parse(e.body,r._jsonReviver)}catch{aa("invalid JSON received",r.uri.href)}aa("emitting complete",r.uri.href),typeof e.body=="undefined"&&!r._json&&(e.body=r.encoding===null?wc.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,t=r.response;if(e.headers&&!e.headersSent){if(t.caseless.has("content-type")){var i=t.caseless.has("content-type");e.setHeader?e.setHeader(i,t.headers[i]):e.headers[i]=t.headers[i]}if(t.caseless.has("content-length")){var a=t.caseless.has("content-length");e.setHeader?e.setHeader(a,t.headers[a]):e.headers[a]=t.headers[a]}}if(e.setHeader&&!e.headersSent){for(var n in t.headers)(!r.gzip||n!=="content-encoding")&&e.setHeader(n,t.headers[n]);e.statusCode=t.statusCode}r.pipefilter&&r.pipefilter(t,e)};Rr.prototype.qs=function(e,r){var t=this,i;!r&&t.uri.query?i=t._qs.parse(t.uri.query):i={};for(var a in e)i[a]=e[a];var n=t._qs.stringify(i);return n===""||(t.uri=xc.parse(t.uri.href.split("?")[0]+"?"+n),t.url=t.uri,t.path=t.uri.path,t.uri.host==="unix"&&t.enableUnixSocket()),t};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 mL,r._form.on("error",function(t){t.message="form-data: "+t.message,r.emit("error",t),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=PS(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=PS(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 t=this,i,a,n;return r||(r=t.headers),Object.keys(r).forEach(function(o){o.length===e.length&&(a=new RegExp(e,"i"),n=o.match(a),n&&(i=r[o]))}),i};Rr.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),r=e[0],t=e[1];this.socketPath=r,this.uri.pathname=t,this.uri.path=t,this.uri.host=r,this.uri.hostname=r,this.uri.isUnix=!0};Rr.prototype.auth=function(e,r,t,i){var a=this;return a._auth.onRequest(e,r,t,i),a};Rr.prototype.aws=function(e,r){var t=this;if(!r)return t._aws=e,t;if(e.sign_version===4||e.sign_version==="4"){var i={host:t.uri.host,path:t.uri.path,method:t.method,headers:t.headers,body:t.body};e.service&&(i.service=e.service);var a=pL.sign(i,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});t.setHeader("authorization",a.headers.Authorization),t.setHeader("x-amz-date",a.headers["X-Amz-Date"]),a.headers["X-Amz-Security-Token"]&&t.setHeader("x-amz-security-token",a.headers["X-Amz-Security-Token"])}else{var n=new Date;t.setHeader("date",n.toUTCString());var o={key:e.key,secret:e.secret,verb:t.method.toUpperCase(),date:n,contentType:t.getHeader("content-type")||"",md5:t.getHeader("content-md5")||"",amazonHeaders:r0.canonicalizeHeaders(t.headers)},s=t.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=r0.canonicalizeResource(o.resource),t.setHeader("authorization",r0.authorization(o))}return t};Rr.prototype.httpSignature=function(e){var r=this;return dL.signRequest({getHeader:function(t){return r.getHeader(t,r.headers)},setHeader:function(t,i){r.setHeader(t,i)},method:r.method,path:r.path},e),aa("httpSignature authorization",r.getHeader("authorization")),r};Rr.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",jL.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,t;if(r._redirect.redirectsFollowed===0&&(r.originalCookieHeader=r.getHeader("cookie")),!e)t=!1,r._disableCookies=!0;else{var i=e.getCookieString?e:CS,a=r.uri.href;i&&(t=i.getCookieString(a))}return t&&t.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+t):r.setHeader("cookie",t)),r._jar=e,r};Rr.prototype.pipe=function(e,r){var t=this;if(t.response)if(t._destdata)t.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(t._ended)t.emit("error",new Error("You cannot pipe after the response has been ended."));else return tp.Stream.prototype.pipe.call(t,e,r),t.pipeDest(e),e;else return t.dests.push(e),tp.Stream.prototype.pipe.call(t,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=t0.defaultProxyHeaderWhiteList.slice();Rr.defaultProxyHeaderExclusiveList=t0.defaultProxyHeaderExclusiveList.slice();Rr.prototype.toJSON=FS;qS.exports=Rr});var DS=R((_G,BS)=>{"use strict";var kc=El(),RS=Ph(),OL=Il(),RL=OL.paramsHaveRequestBody;function ip(e,r,t){typeof r=="function"&&(t=r);var i={};return r!==null&&typeof r=="object"?kc(i,r,{uri:e}):typeof e=="string"?kc(i,{uri:e}):kc(i,e),i.callback=t||i.callback,i}function It(e,r,t){if(typeof e=="undefined")throw new Error("undefined is not a valid uri or options object.");var i=ip(e,r,t);if(i.method==="HEAD"&&RL(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new It.Request(i)}function co(e){var r=e.toUpperCase();return function(t,i,a){var n=ip(t,i,a);return n.method=r,It(n,n.callback)}}It.get=co("get");It.head=co("head");It.options=co("options");It.post=co("post");It.put=co("put");It.patch=co("patch");It.del=co("delete");It.delete=co("delete");It.jar=function(e){return RS.jar(e)};It.cookie=function(e){return RS.parse(e)};function a0(e,r,t,i){return function(a,n,o){var s=ip(a,n,o),c={};return kc(!0,c,r,s),c.pool=s.pool||r.pool,i&&(c.method=i.toUpperCase()),typeof t=="function"&&(e=t),e(c,c.callback)}}It.defaults=function(e,r){var t=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=a0(t,e,r),a=["get","head","post","put","patch","del","delete"];return a.forEach(function(n){i[n]=a0(t[n],e,r,n)}),i.cookie=a0(t.cookie,e,r),i.jar=t.jar,i.defaults=t.defaults,i};It.forever=function(e,r){var t={};return r&&kc(t,r),e&&(t.agentOptions=e),t.forever=!0,It.defaults(t)};BS.exports=It;It.Request=OS();It.initParams=ip;Object.defineProperty(It,"debug",{enumerable:!0,get:function(){return It.Request.debug},set:function(e){It.Request.debug=e}})});var LS=R((jG,zS)=>{zS.exports=BL;function BL(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 t=e.substring(5,r).split(";"),i=!1,a="US-ASCII",n=0;n<t.length;n++)t[n]=="base64"?i=!0:t[n].indexOf("charset=")==0&&(a=t[n].substring(8));var o=unescape(e.substring(r+1)),s=i?"base64":"ascii",c=new Buffer(o,s);return c.type=t[0]||"text/plain",c.charset=a,c}});var US=R((SG,MS)=>{var DL=LS();function zL(e){return{mimeType:NL(LL(e)),data:DL(e)}}function LL(e){return e.substring(5,e.indexOf(";"))}var NS=/^(\w+\/)+/;function NL(e){e=e.toLowerCase();var r=e.match(NS);return!r||!(r=r[1])?e:e.replace(NS,r)}MS.exports=zL});var VS=R((AG,HS)=>{"use strict";var _c=Pu(),EG=require("path"),ML=sw().PNG,UL=Od(),HL=pw(),VL=hw().GifReader,$L=yw(),WL=require("fs"),GL=DS(),KL=Pf(),YL=US();function QL(e,r){var t=new ML;t.parse(e,function(i,a){if(i){r(i);return}r(null,_c(new Uint8Array(a.data),[a.width|0,a.height|0,4],[4,4*a.width|0,1],0))})}function XL(e,r){var t;try{t=UL.decode(e)}catch(n){r(n);return}if(!t){r(new Error("Error decoding jpeg"));return}var i=[t.height,t.width,4],a=_c(t.data,i);r(null,a.transpose(1,0))}function JL(e,r){var t;try{t=new VL(e)}catch(s){r(s);return}if(t.numFrames()>0){var i=[t.numFrames(),t.height,t.width,4];try{var a=new Uint8Array(i[0]*i[1]*i[2]*i[3])}catch(s){r(s);return}var n=_c(a,i);try{for(var o=0;o<t.numFrames();++o)t.decodeAndBlitFrameRGBA(o,a.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=[t.height,t.width,4],a=new Uint8Array(i[0]*i[1]*i[2]),n=_c(a,i);try{t.decodeAndBlitFrameRGBA(0,a)}catch(p){r(p);return}r(null,n.transpose(1,0))}}function ZL(e,r){var t=new $L(e);try{t.init()}catch(s){r(s);return}var i=t.getData(),a=[i.getHeight(),i.getWidth(),4],n=new Uint8Array(a[0]*a[1]*a[2]),o=_c(n,a);HL(i,o),r(null,o.transpose(1,0))}function np(e,r,t){switch(e){case"image/png":QL(r,t);break;case"image/jpg":case"image/jpeg":XL(r,t);break;case"image/gif":JL(r,t);break;case"image/bmp":ZL(r,t);break;default:t(new Error("Unsupported file type: "+e))}}HS.exports=function(r,t,i){if(i||(i=t,t=""),Buffer.isBuffer(r)){if(!t){i(new Error("Invalid file type"));return}np(t,r,i)}else if(r.indexOf("data:")===0)try{var a=YL(r);a?process.nextTick(function(){np(t||a.mimeType,a.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?GL({url:r,encoding:null},function(n,o,s){if(n){i(n);return}if(t=t,t||(o.getHeader!==void 0?t=o.getHeader("content-type"):o.headers!==void 0&&(t=o.headers["content-type"])),!t){i(new Error("Invalid content-type"));return}np(t,s,i)}):WL.readFile(r,function(n,o){if(n){i(n);return}if(t=t||KL.lookup(r),!t){i(new Error("Invalid file type"));return}np(t,o,i)})}});var KS=R((op,GS)=>{(function(e,r){typeof op=="object"&&typeof GS!="undefined"?r(op):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(op,function(e){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(u){return"Symbol("+u+")"};function t(){}function i(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}var a=i();function n(u){return typeof u=="object"&&u!==null||typeof u=="function"}var o=t,s=Promise,c=Promise.prototype.then,f=Promise.resolve.bind(s),p=Promise.reject.bind(s);function m(u){return new s(u)}function h(u){return f(u)}function v(u){return p(u)}function y(u,d,j){return c.call(u,d,j)}function E(u,d,j){y(y(u,d,j),void 0,o)}function w(u,d){E(u,d)}function A(u,d){E(u,void 0,d)}function C(u,d,j){return y(u,d,j)}function T(u){y(u,void 0,o)}var O=function(){var u=a&&a.queueMicrotask;if(typeof u=="function")return u;var d=h(void 0);return function(j){return y(d,j)}}();function F(u,d,j){if(typeof u!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(u,d,j)}function B(u,d,j){try{return h(F(u,d,j))}catch(D){return v(D)}}var L=16384,V=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,D=j;j._elements.length===L-1&&(D={_elements:[],_next:void 0}),j._elements.push(d),D!==j&&(this._back=D,j._next=D),++this._size},u.prototype.shift=function(){var d=this._front,j=d,D=this._cursor,G=D+1,ue=d._elements,ye=ue[D];return G===L&&(j=d._next,G=0),--this._size,this._cursor=G,d!==j&&(this._front=j),ue[D]=void 0,ye},u.prototype.forEach=function(d){for(var j=this._cursor,D=this._front,G=D._elements;(j!==G.length||D._next!==void 0)&&!(j===G.length&&(D=D._next,G=D._elements,j=0,G.length===0));)d(G[j]),++j},u.prototype.peek=function(){var d=this._front,j=this._cursor;return d._elements[j]},u}();function $(u,d){u._ownerReadableStream=d,d._reader=u,d._state==="readable"?H(u):d._state==="closed"?te(u):J(u,d._storedError)}function K(u,d){var j=u._ownerReadableStream;return di(j,d)}function W(u){u._ownerReadableStream._state==="readable"?le(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):pe(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 Z(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 J(u,d){H(u),le(u,d)}function te(u){H(u),de(u)}function le(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 pe(u,d){J(u,d)}function de(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}var Se=r("[[AbortSteps]]"),xe=r("[[ErrorSteps]]"),Ne=r("[[CancelSteps]]"),He=r("[[PullSteps]]"),De=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 ke(u){return typeof u=="object"||typeof u=="function"}function Qe(u,d){if(u!==void 0&&!ke(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 Q(u){return typeof u=="object"&&u!==null||typeof u=="function"}function rr(u,d){if(!Q(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 he(u,d,j){if(u===void 0)throw new TypeError(d+" is required in '"+j+"'.")}function _e(u){return Number(u)}function ir(u){return u===0?0:u}function Te(u){return ir(U(u))}function ur(u,d){var j=0,D=Number.MAX_SAFE_INTEGER,G=Number(u);if(G=ir(G),!De(G))throw new TypeError(d+" is not a finite number");if(G=Te(G),G<j||G>D)throw new TypeError(d+" is outside the accepted range of "+j+" to "+D+", inclusive");return!De(G)||G===0?0:G}function Br(u,d){if(!Fn(u))throw new TypeError(d+" is not a ReadableStream.")}function Gr(u){return new Ye(u)}function ee(u,d){u._reader._readRequests.push(d)}function Oe(u,d,j){var D=u._reader,G=D._readRequests.shift();j?G._closeSteps():G._chunkSteps(d)}function Ge(u){return u._reader._readRequests.length}function Ve(u){var d=u._reader;return!(d===void 0||!Ze(d))}var Ye=function(){function u(d){if(qe(d,1,"ReadableStreamDefaultReader"),Br(d,"First parameter"),qn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");$(this,d),this._readRequests=new V}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(Z("cancel")):K(this,d):v(mr("cancel"))},u.prototype.read=function(){if(!Ze(this))return v(mr("read"));if(this._ownerReadableStream===void 0)return v(Z("read from"));var d,j,D=m(function(ue,ye){d=ue,j=ye}),G={_chunkSteps:function(ue){return d({value:ue,done:!1})},_closeSteps:function(){return d({value:void 0,done:!0})},_errorSteps:function(ue){return j(ue)}};return nr(this,G),D},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");W(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[He](d)}function mr(u){return new TypeError("ReadableStreamDefaultReader.prototype."+u+" can only be used on a ReadableStreamDefaultReader")}var Or,vr;typeof r.asyncIterator=="symbol"&&(vr=(Or={},Or[r.asyncIterator]=function(){return this},Or),Object.defineProperty(vr,r.asyncIterator,{enumerable:!1}));var be=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,D=function(){return j._returnSteps(d)};return this._ongoingPromise?C(this._ongoingPromise,D,D):D()},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(Z("iterate"));var D,G,ue=m(function(Je,Er){D=Je,G=Er}),ye={_chunkSteps:function(Je){d._ongoingPromise=void 0,O(function(){return D({value:Je,done:!1})})},_closeSteps:function(){d._ongoingPromise=void 0,d._isFinished=!0,W(j),D({value:void 0,done:!0})},_errorSteps:function(Je){d._ongoingPromise=void 0,d._isFinished=!0,W(j),G(Je)}};return nr(j,ye),ue},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(Z("finish iterating"));if(!this._preventCancel){var D=K(j,d);return W(j),C(D,function(){return{value:d,done:!0}})}return W(j),h({value:d,done:!0})},u}(),Ke={next:function(){return Pr(this)?this._asyncIteratorImpl.next():v(lr("next"))},return:function(u){return Pr(this)?this._asyncIteratorImpl.return(u):v(lr("return"))}};vr!==void 0&&Object.setPrototypeOf(Ke,vr);function pr(u,d){var j=Gr(u),D=new be(j,d),G=Object.create(Ke);return G._asyncIteratorImpl=D,G}function Pr(u){if(!n(u)||!Object.prototype.hasOwnProperty.call(u,"_asyncIteratorImpl"))return!1;try{return u._asyncIteratorImpl instanceof be}catch{return!1}}function lr(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,D,G){new Uint8Array(u).set(new Uint8Array(j,D,G),d)}function cr(u){return u}function $r(u){return!1}function Cr(u,d,j){if(u.slice)return u.slice(d,j);var D=j-d,G=new ArrayBuffer(D);return or(G,0,u,d,D),G}function _t(u){return!(typeof u!="number"||gr(u)||u<0)}function Ft(u){var d=Cr(u.buffer,u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(d)}function ia(u){var d=u._queue.shift();return u._queueTotalSize-=d.size,u._queueTotalSize<0&&(u._queueTotalSize=0),d.value}function pa(u,d,j){if(!_t(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 et(u){var d=u._queue.peek();return d.value}function st(u){u._queue=new V,u._queueTotalSize=0}var dt=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"view",{get:function(){if(!na(this))throw Le("view");return this._view},enumerable:!1,configurable:!0}),u.prototype.respond=function(d){if(!na(this))throw Le("respond");if(qe(d,1,"respond"),d=ur(d,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");$r(this._view.buffer),Xe(this._associatedReadableByteStreamController,d)},u.prototype.respondWithNewView=function(d){if(!na(this))throw Le("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");$r(d.buffer),Ce(this._associatedReadableByteStreamController,d)},u}();Object.defineProperties(dt.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(dt.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var qt=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"byobRequest",{get:function(){if(!ht(this))throw ge("byobRequest");return Fe(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!ht(this))throw ge("desiredSize");return tr(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!ht(this))throw ge("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");Re(this)},u.prototype.enqueue=function(d){if(!ht(this))throw ge("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");Ee(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!ht(this))throw ge("error");Ie(this,d)},u.prototype[Ne]=function(d){rt(this),st(this);var j=this._cancelAlgorithm(d);return Ue(this),j},u.prototype[He]=function(d){var j=this._controlledReadableByteStream;if(this._queueTotalSize>0){var D=this._queue.shift();this._queueTotalSize-=D.byteLength,k(this);var G=new Uint8Array(D.buffer,D.byteOffset,D.byteLength);d._chunkSteps(G);return}var ue=this._autoAllocateChunkSize;if(ue!==void 0){var ye=void 0;try{ye=new ArrayBuffer(ue)}catch(Er){d._errorSteps(Er);return}var Je={buffer:ye,bufferByteLength:ue,byteOffset:0,byteLength:ue,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Je)}ee(j,d),Lt(this)},u}();Object.defineProperties(qt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(qt.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function ht(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableByteStream")?!1:u instanceof qt}function na(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_associatedReadableByteStreamController")?!1:u instanceof dt}function Lt(u){var d=we(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,Lt(u))},function(D){Ie(u,D)})}}function rt(u){I(u),u._pendingPullIntos=new V}function Va(u,d){var j=!1;u._state==="closed"&&(j=!0);var D=x(d);d.readerType==="default"?Oe(u,D,j):fe(u,D,j)}function x(u){var d=u.bytesFilled,j=u.elementSize;return new u.viewConstructor(u.buffer,u.byteOffset,d/j)}function b(u,d,j,D){u._queue.push({buffer:d,byteOffset:j,byteLength:D}),u._queueTotalSize+=D}function g(u,d){var j=d.elementSize,D=d.bytesFilled-d.bytesFilled%j,G=Math.min(u._queueTotalSize,d.byteLength-d.bytesFilled),ue=d.bytesFilled+G,ye=ue-ue%j,Je=G,Er=!1;ye>D&&(Je=ye-d.bytesFilled,Er=!0);for(var Fr=u._queue;Je>0;){var Dr=Fr.peek(),Wr=Math.min(Je,Dr.byteLength),Ot=d.byteOffset+d.bytesFilled;or(d.buffer,Ot,Dr.buffer,Dr.byteOffset,Wr),Dr.byteLength===Wr?Fr.shift():(Dr.byteOffset+=Wr,Dr.byteLength-=Wr),u._queueTotalSize-=Wr,l(u,Wr,d),Je-=Wr}return Er}function l(u,d,j){j.bytesFilled+=d}function k(u){u._queueTotalSize===0&&u._closeRequested?(Ue(u),Xs(u._controlledReadableByteStream)):Lt(u)}function I(u){u._byobRequest!==null&&(u._byobRequest._associatedReadableByteStreamController=void 0,u._byobRequest._view=null,u._byobRequest=null)}function N(u){for(;u._pendingPullIntos.length>0;){if(u._queueTotalSize===0)return;var d=u._pendingPullIntos.peek();g(u,d)&&(Me(u),Va(u._controlledReadableByteStream,d))}}function Y(u,d,j){var D=u._controlledReadableByteStream,G=1;d.constructor!==DataView&&(G=d.constructor.BYTES_PER_ELEMENT);var ue=d.constructor,ye=cr(d.buffer),Je={buffer:ye,bufferByteLength:ye.byteLength,byteOffset:d.byteOffset,byteLength:d.byteLength,bytesFilled:0,elementSize:G,viewConstructor:ue,readerType:"byob"};if(u._pendingPullIntos.length>0){u._pendingPullIntos.push(Je),re(D,j);return}if(D._state==="closed"){var Er=new ue(Je.buffer,Je.byteOffset,0);j._closeSteps(Er);return}if(u._queueTotalSize>0){if(g(u,Je)){var Fr=x(Je);k(u),j._chunkSteps(Fr);return}if(u._closeRequested){var Dr=new TypeError("Insufficient bytes to fill elements in the given buffer");Ie(u,Dr),j._errorSteps(Dr);return}}u._pendingPullIntos.push(Je),re(D,j),Lt(u)}function ie(u,d){var j=u._controlledReadableByteStream;if(ae(j))for(;se(j)>0;){var D=Me(u);Va(j,D)}}function me(u,d,j){if(l(u,d,j),!(j.bytesFilled<j.elementSize)){Me(u);var D=j.bytesFilled%j.elementSize;if(D>0){var G=j.byteOffset+j.bytesFilled,ue=Cr(j.buffer,G-D,G);b(u,ue,0,ue.byteLength)}j.bytesFilled-=D,Va(u._controlledReadableByteStream,j),N(u)}}function ve(u,d){var j=u._pendingPullIntos.peek();I(u);var D=u._controlledReadableByteStream._state;D==="closed"?ie(u):me(u,d,j),Lt(u)}function Me(u){var d=u._pendingPullIntos.shift();return d}function we(u){var d=u._controlledReadableByteStream;if(d._state!=="readable"||u._closeRequested||!u._started)return!1;if(Ve(d)&&Ge(d)>0||ae(d)&&se(d)>0)return!0;var j=tr(u);return j>0}function Ue(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0}function Re(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 D=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ie(u,D),D}}Ue(u),Xs(d)}}function Ee(u,d){var j=u._controlledReadableByteStream;if(!(u._closeRequested||j._state!=="readable")){var D=d.buffer,G=d.byteOffset,ue=d.byteLength,ye=cr(D);if(u._pendingPullIntos.length>0){var Je=u._pendingPullIntos.peek();$r(Je.buffer),Je.buffer=cr(Je.buffer)}if(I(u),Ve(j))if(Ge(j)===0)b(u,ye,G,ue);else{u._pendingPullIntos.length>0&&Me(u);var Er=new Uint8Array(ye,G,ue);Oe(j,Er,!1)}else ae(j)?(b(u,ye,G,ue),N(u)):b(u,ye,G,ue);Lt(u)}}function Ie(u,d){var j=u._controlledReadableByteStream;j._state==="readable"&&(rt(u),st(u),Ue(u),z0(j,d))}function Fe(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),D=Object.create(dt.prototype);ze(D,u,j),u._byobRequest=D}return u._byobRequest}function tr(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(),D=u._controlledReadableByteStream._state;if(D==="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=cr(j.buffer),ve(u,d)}function Ce(u,d){var j=u._pendingPullIntos.peek(),D=u._controlledReadableByteStream._state;if(D==="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 G=d.byteLength;j.buffer=cr(d.buffer),ve(u,G)}function Ae(u,d,j,D,G,ue,ye){d._controlledReadableByteStream=u,d._pullAgain=!1,d._pulling=!1,d._byobRequest=null,d._queue=d._queueTotalSize=void 0,st(d),d._closeRequested=!1,d._started=!1,d._strategyHWM=ue,d._pullAlgorithm=D,d._cancelAlgorithm=G,d._autoAllocateChunkSize=ye,d._pendingPullIntos=new V,u._readableStreamController=d;var Je=j();E(h(Je),function(){d._started=!0,Lt(d)},function(Er){Ie(d,Er)})}function Pe(u,d,j){var D=Object.create(qt.prototype),G=function(){},ue=function(){return h(void 0)},ye=function(){return h(void 0)};d.start!==void 0&&(G=function(){return d.start(D)}),d.pull!==void 0&&(ue=function(){return d.pull(D)}),d.cancel!==void 0&&(ye=function(Er){return d.cancel(Er)});var Je=d.autoAllocateChunkSize;if(Je===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ae(u,D,G,ue,ye,j,Je)}function ze(u,d,j){u._associatedReadableByteStreamController=d,u._view=j}function Le(u){return new TypeError("ReadableStreamBYOBRequest.prototype."+u+" can only be used on a ReadableStreamBYOBRequest")}function ge(u){return new TypeError("ReadableByteStreamController.prototype."+u+" can only be used on a ReadableByteStreamController")}function X(u){return new oe(u)}function re(u,d){u._reader._readIntoRequests.push(d)}function fe(u,d,j){var D=u._reader,G=D._readIntoRequests.shift();j?G._closeSteps(d):G._chunkSteps(d)}function se(u){return u._reader._readIntoRequests.length}function ae(u){var d=u._reader;return!(d===void 0||!$e(d))}var oe=function(){function u(d){if(qe(d,1,"ReadableStreamBYOBReader"),Br(d,"First parameter"),qn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!ht(d._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");$(this,d),this._readIntoRequests=new V}return Object.defineProperty(u.prototype,"closed",{get:function(){return $e(this)?this._closedPromise:v(ar("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),$e(this)?this._ownerReadableStream===void 0?v(Z("cancel")):K(this,d):v(ar("cancel"))},u.prototype.read=function(d){if(!$e(this))return v(ar("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($r(d.buffer),this._ownerReadableStream===void 0)return v(Z("read from"));var j,D,G=m(function(ye,Je){j=ye,D=Je}),ue={_chunkSteps:function(ye){return j({value:ye,done:!1})},_closeSteps:function(ye){return j({value:ye,done:!0})},_errorSteps:function(ye){return D(ye)}};return fr(this,d,ue),G},u.prototype.releaseLock=function(){if(!$e(this))throw ar("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");W(this)}},u}();Object.defineProperties(oe.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(oe.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function $e(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readIntoRequests")?!1:u instanceof oe}function fr(u,d,j){var D=u._ownerReadableStream;D._disturbed=!0,D._state==="errored"?j._errorSteps(D._storedError):Y(D._readableStreamController,d,j)}function ar(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,D=u==null?void 0:u.size;return{highWaterMark:j===void 0?void 0:_e(j),size:D===void 0?void 0:Ar(D,d+" has member 'size' that")}}function Ar(u,d){return We(u,d),function(j){return _e(u(j))}}function kr(u,d){Qe(u,d);var j=u==null?void 0:u.abort,D=u==null?void 0:u.close,G=u==null?void 0:u.start,ue=u==null?void 0:u.type,ye=u==null?void 0:u.write;return{abort:j===void 0?void 0:dr(j,u,d+" has member 'abort' that"),close:D===void 0?void 0:Sr(D,u,d+" has member 'close' that"),start:G===void 0?void 0:_r(G,u,d+" has member 'start' that"),write:ye===void 0?void 0:tt(ye,u,d+" has member 'write' that"),type:ue}}function dr(u,d,j){return We(u,j),function(D){return B(u,d,[D])}}function Sr(u,d,j){return We(u,j),function(){return B(u,d,[])}}function _r(u,d,j){return We(u,j),function(D){return F(u,d,[D])}}function tt(u,d,j){return We(u,j),function(D,G){return B(u,d,[D,G])}}function Tr(u,d){if(!Be(u))throw new TypeError(d+" is not a WritableStream.")}function _(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 M=function(){function u(d,j){d===void 0&&(d={}),j===void 0&&(j={}),d===void 0?d=null:rr(d,"First parameter");var D=yr(j,"Second parameter"),G=kr(d,"First parameter");je(this);var ue=G.type;if(ue!==void 0)throw new RangeError("Invalid type is specified");var ye=z(D),Je=sr(D,1);g8(this,G,Je,ye)}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Be(this))throw Lc("locked");return Ir(this)},enumerable:!1,configurable:!0}),u.prototype.abort=function(d){return d===void 0&&(d=void 0),Be(this)?Ir(this)?v(new TypeError("Cannot abort a stream that already has a writer")):ut(this,d):v(Lc("abort"))},u.prototype.close=function(){return Be(this)?Ir(this)?v(new TypeError("Cannot close a stream that already has a writer")):pi(this)?v(new TypeError("Cannot close an already-closing stream")):oa(this):v(Lc("close"))},u.prototype.getWriter=function(){if(!Be(this))throw Lc("getWriter");return ne(this)},u}();Object.defineProperties(M.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(M.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function ne(u){return new Uo(u)}function ce(u,d,j,D,G,ue){G===void 0&&(G=1),ue===void 0&&(ue=function(){return 1});var ye=Object.create(M.prototype);je(ye);var Je=Object.create(ho.prototype);return S0(ye,Je,u,d,j,D,G,ue),ye}function je(u){u._state="writable",u._storedError=void 0,u._writer=void 0,u._writableStreamController=void 0,u._writeRequests=new V,u._inFlightWriteRequest=void 0,u._closeRequest=void 0,u._inFlightCloseRequest=void 0,u._pendingAbortRequest=void 0,u._backpressure=!1}function Be(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_writableStreamController")?!1:u instanceof M}function Ir(u){return u._writer!==void 0}function ut(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 D=u._state;if(D==="closed"||D==="errored")return h(void 0);if(u._pendingAbortRequest!==void 0)return u._pendingAbortRequest._promise;var G=!1;D==="erroring"&&(G=!0,d=void 0);var ue=m(function(ye,Je){u._pendingAbortRequest={_promise:void 0,_resolve:ye,_reject:Je,_reason:d,_wasAlreadyErroring:G}});return u._pendingAbortRequest._promise=ue,G||on(u,d),ue}function oa(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(G,ue){var ye={_resolve:G,_reject:ue};u._closeRequest=ye}),D=u._writer;return D!==void 0&&u._backpressure&&d==="writable"&&vp(D),b8(u._writableStreamController),j}function sa(u){var d=m(function(j,D){var G={_resolve:j,_reject:D};u._writeRequests.push(G)});return d}function Sa(u,d){var j=u._state;if(j==="writable"){on(u,d);return}da(u)}function on(u,d){var j=u._writableStreamController;u._state="erroring",u._storedError=d;var D=u._writer;D!==void 0&&w0(D,d),!l8(u)&&j._started&&da(u)}function da(u){u._state="errored",u._writableStreamController[xe]();var d=u._storedError;if(u._writeRequests.forEach(function(G){G._reject(d)}),u._writeRequests=new V,u._pendingAbortRequest===void 0){Bc(u);return}var j=u._pendingAbortRequest;if(u._pendingAbortRequest=void 0,j._wasAlreadyErroring){j._reject(d),Bc(u);return}var D=u._writableStreamController[Se](j._reason);E(D,function(){j._resolve(),Bc(u)},function(G){j._reject(G),Bc(u)})}function qa(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0}function fo(u,d){u._inFlightWriteRequest._reject(d),u._inFlightWriteRequest=void 0,Sa(u,d)}function fi(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&&T0(j)}function Mo(u,d){u._inFlightCloseRequest._reject(d),u._inFlightCloseRequest=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._reject(d),u._pendingAbortRequest=void 0),Sa(u,d)}function pi(u){return!(u._closeRequest===void 0&&u._inFlightCloseRequest===void 0)}function l8(u){return!(u._inFlightWriteRequest===void 0&&u._inFlightCloseRequest===void 0)}function f8(u){u._inFlightCloseRequest=u._closeRequest,u._closeRequest=void 0}function p8(u){u._inFlightWriteRequest=u._writeRequests.shift()}function Bc(u){u._closeRequest!==void 0&&(u._closeRequest._reject(u._storedError),u._closeRequest=void 0);var d=u._writer;d!==void 0&&hp(d,u._storedError)}function cp(u,d){var j=u._writer;j!==void 0&&d!==u._backpressure&&(d?S8(j):vp(j)),u._backpressure=d}var Uo=function(){function u(d){if(qe(d,1,"WritableStreamDefaultWriter"),Tr(d,"First parameter"),Ir(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")!pi(d)&&d._backpressure?Mc(this):C0(this),Nc(this);else if(j==="erroring")mp(this,d._storedError),Nc(this);else if(j==="closed")C0(this),_8(this);else{var D=d._storedError;mp(this,D),P0(this,D)}}return Object.defineProperty(u.prototype,"closed",{get:function(){return po(this)?this._closedPromise:v(mo("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!po(this))throw mo("desiredSize");if(this._ownerWritableStream===void 0)throw Ks("desiredSize");return v8(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ready",{get:function(){return po(this)?this._readyPromise:v(mo("ready"))},enumerable:!1,configurable:!0}),u.prototype.abort=function(d){return d===void 0&&(d=void 0),po(this)?this._ownerWritableStream===void 0?v(Ks("abort")):d8(this,d):v(mo("abort"))},u.prototype.close=function(){if(!po(this))return v(mo("close"));var d=this._ownerWritableStream;return d===void 0?v(Ks("close")):pi(d)?v(new TypeError("Cannot close an already-closing stream")):x0(this)},u.prototype.releaseLock=function(){if(!po(this))throw mo("releaseLock");var d=this._ownerWritableStream;d!==void 0&&k0(this)},u.prototype.write=function(d){return d===void 0&&(d=void 0),po(this)?this._ownerWritableStream===void 0?v(Ks("write to")):_0(this,d):v(mo("write"))},u}();Object.defineProperties(Uo.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(Uo.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function po(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_ownerWritableStream")?!1:u instanceof Uo}function d8(u,d){var j=u._ownerWritableStream;return ut(j,d)}function x0(u){var d=u._ownerWritableStream;return oa(d)}function h8(u){var d=u._ownerWritableStream,j=d._state;return pi(d)||j==="closed"?h(void 0):j==="errored"?v(d._storedError):x0(u)}function m8(u,d){u._closedPromiseState==="pending"?hp(u,d):j8(u,d)}function w0(u,d){u._readyPromiseState==="pending"?I0(u,d):E8(u,d)}function v8(u){var d=u._ownerWritableStream,j=d._state;return j==="errored"||j==="erroring"?null:j==="closed"?0:E0(d._writableStreamController)}function k0(u){var d=u._ownerWritableStream,j=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");w0(u,j),m8(u,j),d._writer=void 0,u._ownerWritableStream=void 0}function _0(u,d){var j=u._ownerWritableStream,D=j._writableStreamController,G=y8(D,d);if(j!==u._ownerWritableStream)return v(Ks("write to"));var ue=j._state;if(ue==="errored")return v(j._storedError);if(pi(j)||ue==="closed")return v(new TypeError("The stream is closing or closed and cannot be written to"));if(ue==="erroring")return v(j._storedError);var ye=sa(j);return x8(D,d,G),ye}var j0={},ho=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"abortReason",{get:function(){if(!lp(this))throw dp("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"signal",{get:function(){if(!lp(this))throw dp("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),!lp(this))throw dp("error");var j=this._controlledWritableStream._state;j==="writable"&&A0(this,d)},u.prototype[Se]=function(d){var j=this._abortAlgorithm(d);return Dc(this),j},u.prototype[xe]=function(){st(this)},u}();Object.defineProperties(ho.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ho.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function lp(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledWritableStream")?!1:u instanceof ho}function S0(u,d,j,D,G,ue,ye,Je){d._controlledWritableStream=u,u._writableStreamController=d,d._queue=void 0,d._queueTotalSize=void 0,st(d),d._abortReason=void 0,d._abortController=P(),d._started=!1,d._strategySizeAlgorithm=Je,d._strategyHWM=ye,d._writeAlgorithm=D,d._closeAlgorithm=G,d._abortAlgorithm=ue;var Er=pp(d);cp(u,Er);var Fr=j(),Dr=h(Fr);E(Dr,function(){d._started=!0,zc(d)},function(Wr){d._started=!0,Sa(u,Wr)})}function g8(u,d,j,D){var G=Object.create(ho.prototype),ue=function(){},ye=function(){return h(void 0)},Je=function(){return h(void 0)},Er=function(){return h(void 0)};d.start!==void 0&&(ue=function(){return d.start(G)}),d.write!==void 0&&(ye=function(Fr){return d.write(Fr,G)}),d.close!==void 0&&(Je=function(){return d.close()}),d.abort!==void 0&&(Er=function(Fr){return d.abort(Fr)}),S0(u,G,ue,ye,Je,Er,j,D)}function Dc(u){u._writeAlgorithm=void 0,u._closeAlgorithm=void 0,u._abortAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function b8(u){pa(u,j0,0),zc(u)}function y8(u,d){try{return u._strategySizeAlgorithm(d)}catch(j){return fp(u,j),1}}function E0(u){return u._strategyHWM-u._queueTotalSize}function x8(u,d,j){try{pa(u,d,j)}catch(ue){fp(u,ue);return}var D=u._controlledWritableStream;if(!pi(D)&&D._state==="writable"){var G=pp(u);cp(D,G)}zc(u)}function zc(u){var d=u._controlledWritableStream;if(!!u._started&&d._inFlightWriteRequest===void 0){var j=d._state;if(j==="erroring"){da(d);return}if(u._queue.length!==0){var D=et(u);D===j0?w8(u):k8(u,D)}}}function fp(u,d){u._controlledWritableStream._state==="writable"&&A0(u,d)}function w8(u){var d=u._controlledWritableStream;f8(d),ia(u);var j=u._closeAlgorithm();Dc(u),E(j,function(){fi(d)},function(D){Mo(d,D)})}function k8(u,d){var j=u._controlledWritableStream;p8(j);var D=u._writeAlgorithm(d);E(D,function(){qa(j);var G=j._state;if(ia(u),!pi(j)&&G==="writable"){var ue=pp(u);cp(j,ue)}zc(u)},function(G){j._state==="writable"&&Dc(u),fo(j,G)})}function pp(u){var d=E0(u);return d<=0}function A0(u,d){var j=u._controlledWritableStream;Dc(u),on(j,d)}function Lc(u){return new TypeError("WritableStream.prototype."+u+" can only be used on a WritableStream")}function dp(u){return new TypeError("WritableStreamDefaultController.prototype."+u+" can only be used on a WritableStreamDefaultController")}function mo(u){return new TypeError("WritableStreamDefaultWriter.prototype."+u+" can only be used on a WritableStreamDefaultWriter")}function Ks(u){return new TypeError("Cannot "+u+" a stream using a released writer")}function Nc(u){u._closedPromise=m(function(d,j){u._closedPromise_resolve=d,u._closedPromise_reject=j,u._closedPromiseState="pending"})}function P0(u,d){Nc(u),hp(u,d)}function _8(u){Nc(u),T0(u)}function hp(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 j8(u,d){P0(u,d)}function T0(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 Mc(u){u._readyPromise=m(function(d,j){u._readyPromise_resolve=d,u._readyPromise_reject=j}),u._readyPromiseState="pending"}function mp(u,d){Mc(u),I0(u,d)}function C0(u){Mc(u),vp(u)}function I0(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 S8(u){Mc(u)}function E8(u,d){mp(u,d)}function vp(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 F0=typeof DOMException!="undefined"?DOMException:void 0;function A8(u){if(!(typeof u=="function"||typeof u=="object"))return!1;try{return new u,!0}catch{return!1}}function P8(){var u=function(j,D){this.message=j||"",this.name=D||"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 T8=A8(F0)?F0:P8();function q0(u,d,j,D,G,ue){var ye=Gr(u),Je=ne(d);u._disturbed=!0;var Er=!1,Fr=h(void 0);return m(function(Dr,Wr){var Ot;if(ue!==void 0){if(Ot=function(){var xr=new T8("Aborted","AbortError"),Kr=[];D||Kr.push(function(){return d._state==="writable"?ut(d,xr):h(void 0)}),G||Kr.push(function(){return u._state==="readable"?di(u,xr):h(void 0)}),$a(function(){return Promise.all(Kr.map(function(vt){return vt()}))},!0,xr)},ue.aborted){Ot();return}ue.addEventListener("abort",Ot)}function hi(){return m(function(xr,Kr){function vt(zi){zi?xr():y($o(),vt,Kr)}vt(!1)})}function $o(){return Er?h(!0):y(Je._readyPromise,function(){return m(function(xr,Kr){nr(ye,{_chunkSteps:function(vt){Fr=y(_0(Je,vt),void 0,t),xr(!1)},_closeSteps:function(){return xr(!0)},_errorSteps:Kr})})})}if(ua(u,ye._closedPromise,function(xr){D?un(!0,xr):$a(function(){return ut(d,xr)},!0,xr)}),ua(d,Je._closedPromise,function(xr){G?un(!0,xr):$a(function(){return di(u,xr)},!0,xr)}),Di(u,ye._closedPromise,function(){j?un():$a(function(){return h8(Je)})}),pi(d)||d._state==="closed"){var On=new TypeError("the destination writable stream closed before all data could be piped to it");G?un(!0,On):$a(function(){return di(u,On)},!0,On)}T(hi());function Bi(){var xr=Fr;return y(Fr,function(){return xr!==Fr?Bi():void 0})}function ua(xr,Kr,vt){xr._state==="errored"?vt(xr._storedError):A(Kr,vt)}function Di(xr,Kr,vt){xr._state==="closed"?vt():w(Kr,vt)}function $a(xr,Kr,vt){if(Er)return;Er=!0,d._state==="writable"&&!pi(d)?w(Bi(),zi):zi();function zi(){E(xr(),function(){return mt(Kr,vt)},function(Rn){return mt(!0,Rn)})}}function un(xr,Kr){Er||(Er=!0,d._state==="writable"&&!pi(d)?w(Bi(),function(){return mt(xr,Kr)}):mt(xr,Kr))}function mt(xr,Kr){k0(Je),W(ye),ue!==void 0&&ue.removeEventListener("abort",Ot),xr?Wr(Kr):Dr(void 0)}})}var vo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Uc(this))throw $c("desiredSize");return gp(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!Uc(this))throw $c("close");if(!Ho(this))throw new TypeError("The stream is not in a state that permits close");Qs(this)},u.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Uc(this))throw $c("enqueue");if(!Ho(this))throw new TypeError("The stream is not in a state that permits enqueue");return Vc(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!Uc(this))throw $c("error");In(this,d)},u.prototype[Ne]=function(d){st(this);var j=this._cancelAlgorithm(d);return Hc(this),j},u.prototype[He]=function(d){var j=this._controlledReadableStream;if(this._queue.length>0){var D=ia(this);this._closeRequested&&this._queue.length===0?(Hc(this),Xs(j)):Ys(this),d._chunkSteps(D)}else ee(j,d),Ys(this)},u}();Object.defineProperties(vo.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(vo.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Uc(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableStream")?!1:u instanceof vo}function Ys(u){var d=O0(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,Ys(u))},function(D){In(u,D)})}}function O0(u){var d=u._controlledReadableStream;if(!Ho(u)||!u._started)return!1;if(qn(d)&&Ge(d)>0)return!0;var j=gp(u);return j>0}function Hc(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function Qs(u){if(!!Ho(u)){var d=u._controlledReadableStream;u._closeRequested=!0,u._queue.length===0&&(Hc(u),Xs(d))}}function Vc(u,d){if(!!Ho(u)){var j=u._controlledReadableStream;if(qn(j)&&Ge(j)>0)Oe(j,d,!1);else{var D=void 0;try{D=u._strategySizeAlgorithm(d)}catch(G){throw In(u,G),G}try{pa(u,d,D)}catch(G){throw In(u,G),G}}Ys(u)}}function In(u,d){var j=u._controlledReadableStream;j._state==="readable"&&(st(u),Hc(u),z0(j,d))}function gp(u){var d=u._controlledReadableStream._state;return d==="errored"?null:d==="closed"?0:u._strategyHWM-u._queueTotalSize}function C8(u){return!O0(u)}function Ho(u){var d=u._controlledReadableStream._state;return!u._closeRequested&&d==="readable"}function R0(u,d,j,D,G,ue,ye){d._controlledReadableStream=u,d._queue=void 0,d._queueTotalSize=void 0,st(d),d._started=!1,d._closeRequested=!1,d._pullAgain=!1,d._pulling=!1,d._strategySizeAlgorithm=ye,d._strategyHWM=ue,d._pullAlgorithm=D,d._cancelAlgorithm=G,u._readableStreamController=d;var Je=j();E(h(Je),function(){d._started=!0,Ys(d)},function(Er){In(d,Er)})}function I8(u,d,j,D){var G=Object.create(vo.prototype),ue=function(){},ye=function(){return h(void 0)},Je=function(){return h(void 0)};d.start!==void 0&&(ue=function(){return d.start(G)}),d.pull!==void 0&&(ye=function(){return d.pull(G)}),d.cancel!==void 0&&(Je=function(Er){return d.cancel(Er)}),R0(u,G,ue,ye,Je,j,D)}function $c(u){return new TypeError("ReadableStreamDefaultController.prototype."+u+" can only be used on a ReadableStreamDefaultController")}function F8(u,d){return ht(u._readableStreamController)?O8(u):q8(u)}function q8(u,d){var j=Gr(u),D=!1,G=!1,ue=!1,ye=!1,Je,Er,Fr,Dr,Wr,Ot=m(function(ua){Wr=ua});function hi(){if(D)return G=!0,h(void 0);D=!0;var ua={_chunkSteps:function(Di){O(function(){G=!1;var $a=Di,un=Di;ue||Vc(Fr._readableStreamController,$a),ye||Vc(Dr._readableStreamController,un),D=!1,G&&hi()})},_closeSteps:function(){D=!1,ue||Qs(Fr._readableStreamController),ye||Qs(Dr._readableStreamController),(!ue||!ye)&&Wr(void 0)},_errorSteps:function(){D=!1}};return nr(j,ua),h(void 0)}function $o(ua){if(ue=!0,Je=ua,ye){var Di=wr([Je,Er]),$a=di(u,Di);Wr($a)}return Ot}function On(ua){if(ye=!0,Er=ua,ue){var Di=wr([Je,Er]),$a=di(u,Di);Wr($a)}return Ot}function Bi(){}return Fr=bp(Bi,hi,$o),Dr=bp(Bi,hi,On),A(j._closedPromise,function(ua){In(Fr._readableStreamController,ua),In(Dr._readableStreamController,ua),(!ue||!ye)&&Wr(void 0)}),[Fr,Dr]}function O8(u){var d=Gr(u),j=!1,D=!1,G=!1,ue=!1,ye=!1,Je,Er,Fr,Dr,Wr,Ot=m(function(mt){Wr=mt});function hi(mt){A(mt._closedPromise,function(xr){mt===d&&(Ie(Fr._readableStreamController,xr),Ie(Dr._readableStreamController,xr),(!ue||!ye)&&Wr(void 0))})}function $o(){$e(d)&&(W(d),d=Gr(u),hi(d));var mt={_chunkSteps:function(xr){O(function(){D=!1,G=!1;var Kr=xr,vt=xr;if(!ue&&!ye)try{vt=Ft(xr)}catch(zi){Ie(Fr._readableStreamController,zi),Ie(Dr._readableStreamController,zi),Wr(di(u,zi));return}ue||Ee(Fr._readableStreamController,Kr),ye||Ee(Dr._readableStreamController,vt),j=!1,D?Bi():G&&ua()})},_closeSteps:function(){j=!1,ue||Re(Fr._readableStreamController),ye||Re(Dr._readableStreamController),Fr._readableStreamController._pendingPullIntos.length>0&&Xe(Fr._readableStreamController,0),Dr._readableStreamController._pendingPullIntos.length>0&&Xe(Dr._readableStreamController,0),(!ue||!ye)&&Wr(void 0)},_errorSteps:function(){j=!1}};nr(d,mt)}function On(mt,xr){Ze(d)&&(W(d),d=X(u),hi(d));var Kr=xr?Dr:Fr,vt=xr?Fr:Dr,zi={_chunkSteps:function(Rn){O(function(){D=!1,G=!1;var Wo=xr?ye:ue,ru=xr?ue:ye;if(ru)Wo||Ce(Kr._readableStreamController,Rn);else{var X0=void 0;try{X0=Ft(Rn)}catch(kp){Ie(Kr._readableStreamController,kp),Ie(vt._readableStreamController,kp),Wr(di(u,kp));return}Wo||Ce(Kr._readableStreamController,Rn),Ee(vt._readableStreamController,X0)}j=!1,D?Bi():G&&ua()})},_closeSteps:function(Rn){j=!1;var Wo=xr?ye:ue,ru=xr?ue:ye;Wo||Re(Kr._readableStreamController),ru||Re(vt._readableStreamController),Rn!==void 0&&(Wo||Ce(Kr._readableStreamController,Rn),!ru&&vt._readableStreamController._pendingPullIntos.length>0&&Xe(vt._readableStreamController,0)),(!Wo||!ru)&&Wr(void 0)},_errorSteps:function(){j=!1}};fr(d,mt,zi)}function Bi(){if(j)return D=!0,h(void 0);j=!0;var mt=Fe(Fr._readableStreamController);return mt===null?$o():On(mt._view,!1),h(void 0)}function ua(){if(j)return G=!0,h(void 0);j=!0;var mt=Fe(Dr._readableStreamController);return mt===null?$o():On(mt._view,!0),h(void 0)}function Di(mt){if(ue=!0,Je=mt,ye){var xr=wr([Je,Er]),Kr=di(u,xr);Wr(Kr)}return Ot}function $a(mt){if(ye=!0,Er=mt,ue){var xr=wr([Je,Er]),Kr=di(u,xr);Wr(Kr)}return Ot}function un(){}return Fr=D0(un,Bi,Di),Dr=D0(un,ua,$a),hi(d),[Fr,Dr]}function R8(u,d){Qe(u,d);var j=u,D=j==null?void 0:j.autoAllocateChunkSize,G=j==null?void 0:j.cancel,ue=j==null?void 0:j.pull,ye=j==null?void 0:j.start,Je=j==null?void 0:j.type;return{autoAllocateChunkSize:D===void 0?void 0:ur(D,d+" has member 'autoAllocateChunkSize' that"),cancel:G===void 0?void 0:B8(G,j,d+" has member 'cancel' that"),pull:ue===void 0?void 0:D8(ue,j,d+" has member 'pull' that"),start:ye===void 0?void 0:z8(ye,j,d+" has member 'start' that"),type:Je===void 0?void 0:L8(Je,d+" has member 'type' that")}}function B8(u,d,j){return We(u,j),function(D){return B(u,d,[D])}}function D8(u,d,j){return We(u,j),function(D){return B(u,d,[D])}}function z8(u,d,j){return We(u,j),function(D){return F(u,d,[D])}}function L8(u,d){if(u=""+u,u!=="bytes")throw new TypeError(d+" '"+u+"' is not a valid enumeration value for ReadableStreamType");return u}function N8(u,d){Qe(u,d);var j=u==null?void 0:u.mode;return{mode:j===void 0?void 0:M8(j,d+" has member 'mode' that")}}function M8(u,d){if(u=""+u,u!=="byob")throw new TypeError(d+" '"+u+"' is not a valid enumeration value for ReadableStreamReaderMode");return u}function U8(u,d){Qe(u,d);var j=u==null?void 0:u.preventCancel;return{preventCancel:Boolean(j)}}function B0(u,d){Qe(u,d);var j=u==null?void 0:u.preventAbort,D=u==null?void 0:u.preventCancel,G=u==null?void 0:u.preventClose,ue=u==null?void 0:u.signal;return ue!==void 0&&H8(ue,d+" has member 'signal' that"),{preventAbort:Boolean(j),preventCancel:Boolean(D),preventClose:Boolean(G),signal:ue}}function H8(u,d){if(!_(u))throw new TypeError(d+" is not an AbortSignal.")}function V8(u,d){Qe(u,d);var j=u==null?void 0:u.readable;he(j,"readable","ReadableWritablePair"),Br(j,d+" has member 'readable' that");var D=u==null?void 0:u.writable;return he(D,"writable","ReadableWritablePair"),Tr(D,d+" has member 'writable' that"),{readable:j,writable:D}}var sn=function(){function u(d,j){d===void 0&&(d={}),j===void 0&&(j={}),d===void 0?d=null:rr(d,"First parameter");var D=yr(j,"Second parameter"),G=R8(d,"First parameter");if(yp(this),G.type==="bytes"){if(D.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var ue=sr(D,0);Pe(this,G,ue)}else{var ye=z(D),ue=sr(D,1);I8(this,G,ue,ye)}}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Fn(this))throw go("locked");return qn(this)},enumerable:!1,configurable:!0}),u.prototype.cancel=function(d){return d===void 0&&(d=void 0),Fn(this)?qn(this)?v(new TypeError("Cannot cancel a stream that already has a reader")):di(this,d):v(go("cancel"))},u.prototype.getReader=function(d){if(d===void 0&&(d=void 0),!Fn(this))throw go("getReader");var j=N8(d,"First parameter");return j.mode===void 0?Gr(this):X(this)},u.prototype.pipeThrough=function(d,j){if(j===void 0&&(j={}),!Fn(this))throw go("pipeThrough");qe(d,1,"pipeThrough");var D=V8(d,"First parameter"),G=B0(j,"Second parameter");if(qn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Ir(D.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var ue=q0(this,D.writable,G.preventClose,G.preventAbort,G.preventCancel,G.signal);return T(ue),D.readable},u.prototype.pipeTo=function(d,j){if(j===void 0&&(j={}),!Fn(this))return v(go("pipeTo"));if(d===void 0)return v("Parameter 1 is required in 'pipeTo'.");if(!Be(d))return v(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var D;try{D=B0(j,"Second parameter")}catch(G){return v(G)}return qn(this)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Ir(d)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):q0(this,d,D.preventClose,D.preventAbort,D.preventCancel,D.signal)},u.prototype.tee=function(){if(!Fn(this))throw go("tee");var d=F8(this);return wr(d)},u.prototype.values=function(d){if(d===void 0&&(d=void 0),!Fn(this))throw go("values");var j=U8(d,"First parameter");return pr(this,j.preventCancel)},u}();Object.defineProperties(sn.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(sn.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(sn.prototype,r.asyncIterator,{value:sn.prototype.values,writable:!0,configurable:!0});function bp(u,d,j,D,G){D===void 0&&(D=1),G===void 0&&(G=function(){return 1});var ue=Object.create(sn.prototype);yp(ue);var ye=Object.create(vo.prototype);return R0(ue,ye,u,d,j,D,G),ue}function D0(u,d,j){var D=Object.create(sn.prototype);yp(D);var G=Object.create(qt.prototype);return Ae(D,G,u,d,j,0,void 0),D}function yp(u){u._state="readable",u._reader=void 0,u._storedError=void 0,u._disturbed=!1}function Fn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readableStreamController")?!1:u instanceof sn}function qn(u){return u._reader!==void 0}function di(u,d){if(u._disturbed=!0,u._state==="closed")return h(void 0);if(u._state==="errored")return v(u._storedError);Xs(u);var j=u._reader;j!==void 0&&$e(j)&&(j._readIntoRequests.forEach(function(G){G._closeSteps(void 0)}),j._readIntoRequests=new V);var D=u._readableStreamController[Ne](d);return C(D,t)}function Xs(u){u._state="closed";var d=u._reader;d!==void 0&&(de(d),Ze(d)&&(d._readRequests.forEach(function(j){j._closeSteps()}),d._readRequests=new V))}function z0(u,d){u._state="errored",u._storedError=d;var j=u._reader;j!==void 0&&(le(j,d),Ze(j)?(j._readRequests.forEach(function(D){D._errorSteps(d)}),j._readRequests=new V):(j._readIntoRequests.forEach(function(D){D._errorSteps(d)}),j._readIntoRequests=new V))}function go(u){return new TypeError("ReadableStream.prototype."+u+" can only be used on a ReadableStream")}function L0(u,d){Qe(u,d);var j=u==null?void 0:u.highWaterMark;return he(j,"highWaterMark","QueuingStrategyInit"),{highWaterMark:_e(j)}}var N0=function(u){return u.byteLength};try{Object.defineProperty(N0,"name",{value:"size",configurable:!0})}catch{}var Js=function(){function u(d){qe(d,1,"ByteLengthQueuingStrategy"),d=L0(d,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!U0(this))throw M0("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!U0(this))throw M0("size");return N0},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Js.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Js.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function M0(u){return new TypeError("ByteLengthQueuingStrategy.prototype."+u+" can only be used on a ByteLengthQueuingStrategy")}function U0(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_byteLengthQueuingStrategyHighWaterMark")?!1:u instanceof Js}var H0=function(){return 1};try{Object.defineProperty(H0,"name",{value:"size",configurable:!0})}catch{}var Zs=function(){function u(d){qe(d,1,"CountQueuingStrategy"),d=L0(d,"First parameter"),this._countQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!$0(this))throw V0("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!$0(this))throw V0("size");return H0},enumerable:!1,configurable:!0}),u}();Object.defineProperties(Zs.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Zs.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function V0(u){return new TypeError("CountQueuingStrategy.prototype."+u+" can only be used on a CountQueuingStrategy")}function $0(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_countQueuingStrategyHighWaterMark")?!1:u instanceof Zs}function $8(u,d){Qe(u,d);var j=u==null?void 0:u.flush,D=u==null?void 0:u.readableType,G=u==null?void 0:u.start,ue=u==null?void 0:u.transform,ye=u==null?void 0:u.writableType;return{flush:j===void 0?void 0:W8(j,u,d+" has member 'flush' that"),readableType:D,start:G===void 0?void 0:G8(G,u,d+" has member 'start' that"),transform:ue===void 0?void 0:K8(ue,u,d+" has member 'transform' that"),writableType:ye}}function W8(u,d,j){return We(u,j),function(D){return B(u,d,[D])}}function G8(u,d,j){return We(u,j),function(D){return F(u,d,[D])}}function K8(u,d,j){return We(u,j),function(D,G){return B(u,d,[D,G])}}var eu=function(){function u(d,j,D){d===void 0&&(d={}),j===void 0&&(j={}),D===void 0&&(D={}),d===void 0&&(d=null);var G=yr(j,"Second parameter"),ue=yr(D,"Third parameter"),ye=$8(d,"First parameter");if(ye.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(ye.writableType!==void 0)throw new RangeError("Invalid writableType specified");var Je=sr(ue,0),Er=z(ue),Fr=sr(G,1),Dr=z(G),Wr,Ot=m(function(hi){Wr=hi});Y8(this,Ot,Fr,Dr,Je,Er),X8(this,ye),ye.start!==void 0?Wr(ye.start(this._transformStreamController)):Wr(void 0)}return Object.defineProperty(u.prototype,"readable",{get:function(){if(!W0(this))throw Q0("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"writable",{get:function(){if(!W0(this))throw Q0("writable");return this._writable},enumerable:!1,configurable:!0}),u}();Object.defineProperties(eu.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(eu.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function Y8(u,d,j,D,G,ue){function ye(){return d}function Je(Ot){return eE(u,Ot)}function Er(Ot){return rE(u,Ot)}function Fr(){return tE(u)}u._writable=ce(ye,Je,Fr,Er,j,D);function Dr(){return aE(u)}function Wr(Ot){return Gc(u,Ot),h(void 0)}u._readable=bp(ye,Dr,Wr,G,ue),u._backpressure=void 0,u._backpressureChangePromise=void 0,u._backpressureChangePromise_resolve=void 0,Kc(u,!0),u._transformStreamController=void 0}function W0(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_transformStreamController")?!1:u instanceof eu}function Wc(u,d){In(u._readable._readableStreamController,d),Gc(u,d)}function Gc(u,d){G0(u._transformStreamController),fp(u._writable._writableStreamController,d),u._backpressure&&Kc(u,!1)}function Kc(u,d){u._backpressureChangePromise!==void 0&&u._backpressureChangePromise_resolve(),u._backpressureChangePromise=m(function(j){u._backpressureChangePromise_resolve=j}),u._backpressure=d}var Vo=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Yc(this))throw Qc("desiredSize");var d=this._controlledTransformStream._readable._readableStreamController;return gp(d)},enumerable:!1,configurable:!0}),u.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Yc(this))throw Qc("enqueue");K0(this,d)},u.prototype.error=function(d){if(d===void 0&&(d=void 0),!Yc(this))throw Qc("error");J8(this,d)},u.prototype.terminate=function(){if(!Yc(this))throw Qc("terminate");Z8(this)},u}();Object.defineProperties(Vo.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Vo.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Yc(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledTransformStream")?!1:u instanceof Vo}function Q8(u,d,j,D){d._controlledTransformStream=u,u._transformStreamController=d,d._transformAlgorithm=j,d._flushAlgorithm=D}function X8(u,d){var j=Object.create(Vo.prototype),D=function(ue){try{return K0(j,ue),h(void 0)}catch(ye){return v(ye)}},G=function(){return h(void 0)};d.transform!==void 0&&(D=function(ue){return d.transform(ue,j)}),d.flush!==void 0&&(G=function(){return d.flush(j)}),Q8(u,j,D,G)}function G0(u){u._transformAlgorithm=void 0,u._flushAlgorithm=void 0}function K0(u,d){var j=u._controlledTransformStream,D=j._readable._readableStreamController;if(!Ho(D))throw new TypeError("Readable side is not in a state that permits enqueue");try{Vc(D,d)}catch(ue){throw Gc(j,ue),j._readable._storedError}var G=C8(D);G!==j._backpressure&&Kc(j,!0)}function J8(u,d){Wc(u._controlledTransformStream,d)}function Y0(u,d){var j=u._transformAlgorithm(d);return C(j,void 0,function(D){throw Wc(u._controlledTransformStream,D),D})}function Z8(u){var d=u._controlledTransformStream,j=d._readable._readableStreamController;Qs(j);var D=new TypeError("TransformStream terminated");Gc(d,D)}function eE(u,d){var j=u._transformStreamController;if(u._backpressure){var D=u._backpressureChangePromise;return C(D,function(){var G=u._writable,ue=G._state;if(ue==="erroring")throw G._storedError;return Y0(j,d)})}return Y0(j,d)}function rE(u,d){return Wc(u,d),h(void 0)}function tE(u){var d=u._readable,j=u._transformStreamController,D=j._flushAlgorithm();return G0(j),C(D,function(){if(d._state==="errored")throw d._storedError;Qs(d._readableStreamController)},function(G){throw Wc(u,G),d._storedError})}function aE(u){return Kc(u,!1),u._backpressureChangePromise}function Qc(u){return new TypeError("TransformStreamDefaultController.prototype."+u+" can only be used on a TransformStreamDefaultController")}function Q0(u){return new TypeError("TransformStream.prototype."+u+" can only be used on a TransformStream")}var xp={ReadableStream:sn,ReadableStreamDefaultController:vo,ReadableByteStreamController:qt,ReadableStreamBYOBRequest:dt,ReadableStreamDefaultReader:Ye,ReadableStreamBYOBReader:oe,WritableStream:M,WritableStreamDefaultController:ho,WritableStreamDefaultWriter:Uo,ByteLengthQueuingStrategy:Js,CountQueuingStrategy:Zs,TransformStream:eu,TransformStreamDefaultController:Vo};if(typeof a!="undefined")for(var wp in xp)Object.prototype.hasOwnProperty.call(xp,wp)&&Object.defineProperty(a,wp,{value:xp[wp],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=Js,e.CountQueuingStrategy=Zs,e.ReadableByteStreamController=qt,e.ReadableStream=sn,e.ReadableStreamBYOBReader=oe,e.ReadableStreamBYOBRequest=dt,e.ReadableStreamDefaultController=vo,e.ReadableStreamDefaultReader=Ye,e.TransformStream=eu,e.TransformStreamDefaultController=Vo,e.WritableStream=M,e.WritableStreamDefaultController=ho,e.WritableStreamDefaultWriter=Uo,Object.defineProperty(e,"__esModule",{value:!0})})});var _p="3.3.0-alpha.7";function tg(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var Li={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},BN=Li.self||Li.window||Li.global||{},DN=Li.window||Li.self||Li.global||{},ag=Li.global||Li.self||Li.window||{},zN=Li.document||{};var bo=typeof process!="object"||String(process)!=="[object process]"||process.browser,au=typeof importScripts=="function",LN=typeof window!="undefined"&&typeof window.orientation!="undefined",ig=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),NN=ig&&parseFloat(ig[1])||0;function jp(e,r=!0,t){let i=t||new Set;if(e){if(ng(e))i.add(e);else if(ng(e.buffer))i.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let a in e)jp(e[a],r,i)}}return t===void 0?Array.from(i):[]}function ng(e){return e?e instanceof ArrayBuffer||typeof MessagePort!="undefined"&&e instanceof MessagePort||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas:!1}function yo(){let parentPort;try{eval("globalThis.parentPort = require('worker_threads').parentPort"),parentPort=globalThis.parentPort}catch{}return parentPort}var Sp=new Map,Xa=class{static inWorkerThread(){return typeof self!="undefined"||Boolean(yo())}static set onmessage(r){function t(a){let n=yo(),{type:o,payload:s}=n?a:a.data;r(o,s)}let i=yo();i?(i.on("message",t),i.on("exit",()=>console.debug("Node worker closing"))):globalThis.onmessage=t}static addEventListener(r){let t=Sp.get(r);t||(t=a=>{if(!dE(a))return;let n=yo(),{type:o,payload:s}=n?a:a.data;r(o,s)}),yo()?console.error("not implemented"):globalThis.addEventListener("message",t)}static removeEventListener(r){let t=Sp.get(r);Sp.delete(r),yo()?console.error("not implemented"):globalThis.removeEventListener("message",t)}static postMessage(r,t){let i={source:"loaders.gl",type:r,payload:t},a=jp(t),n=yo();n?n.postMessage(i,a):globalThis.postMessage(i,a)}};function dE(e){let{type:r,data:t}=e;return r==="message"&&t&&typeof t.source=="string"&&t.source.startsWith("loaders.gl")}var Pp={};fE(Pp,{requireFromFile:()=>Ap,requireFromString:()=>Xc});var Ep=Oa(require("module")),og=Oa(require("path"));async function Ap(e){if(e.startsWith("http")){let t=await(await fetch(e)).text();return Xc(t)}return e.startsWith("/")||(e=`${process.cwd()}/${e}`),require(e)}function Xc(e,r="",t){if(typeof r=="object"&&(t=r,r=""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let i=Ep.default._nodeModulePaths(og.default.dirname(r)),a=module.parent,n=new Ep.default(r,a);return n.filename=r,n.paths=[].concat((t==null?void 0:t.prependPaths)||[]).concat(i).concat((t==null?void 0:t.appendPaths)||[]),n._compile(e,r),a&&a.children&&a.children.splice(a.children.indexOf(n),1),n.exports}var hE="beta",mE=typeof _p!="undefined"?_p:hE,Tp={};async function iu(e,r=null,t={}){return r&&(e=sg(e,r,t)),Tp[e]=Tp[e]||vE(e),await Tp[e]}function sg(e,r,t){if(e.startsWith("http"))return e;let i=t.modules||{};return i[e]?i[e]:bo?t.CDN?(tg(t.CDN.startsWith("http")),`${t.CDN}/${r}@${mE}/dist/libs/${e}`):au?`../src/libs/${e}`:`modules/${r}/src/libs/${e}`:`modules/${r}/dist/libs/${e}`}async function vE(e){if(e.endsWith("wasm"))return await(await fetch(e)).arrayBuffer();if(!bo)try{return Pp&&Ap&&await Ap(e)}catch{return null}if(au)return importScripts(e);let t=await(await fetch(e)).text();return gE(t,e)}function gE(e,r){if(!bo)return Xc&&Xc(e,r);if(au)return eval.call(ag,e),null;let t=document.createElement("script");t.id=r;try{t.appendChild(document.createTextNode(e))}catch{t.text=e}return document.body.appendChild(t),null}var bE=0;function Cp(e){!Xa.inWorkerThread()||(Xa.onmessage=async(r,t)=>{switch(r){case"process":try{let{input:i,options:a={},context:n={}}=t,o=await xE({loader:e,arrayBuffer:i,options:a,context:mi(ha({},n),{parse:yE})});Xa.postMessage("done",{result:o})}catch(i){let a=i instanceof Error?i.message:"";Xa.postMessage("error",{error:a})}break;default:}})}function yE(e,r){return new Promise((t,i)=>{let a=bE++,n=(s,c)=>{if(c.id===a)switch(s){case"done":Xa.removeEventListener(n),t(c.result);break;case"error":Xa.removeEventListener(n),i(c.error);break;default:}};Xa.addEventListener(n);let o={id:a,input:e,options:r};Xa.postMessage("process",o)})}async function xE({loader:e,arrayBuffer:r,options:t,context:i}){let a,n;if(e.parseSync||e.parse)a=r,n=e.parseSync||e.parse;else if(e.parseTextSync)a=new TextDecoder().decode(r),n=e.parseTextSync;else throw new Error(`Could not load data with ${e.name} loader`);return t=mi(ha({},t),{modules:e&&e.options&&e.options.modules||{},worker:!1}),await n(a,ha({},t),i,e)}var u0=Oa(Qg());var gi=typeof process!="object"||String(process)!=="[object process]"||process.browser,Wp={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global},At=Wp.global||Wp.self||Wp.window;var Xg={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]};global["encoding-indexes"]=Xg||{};function jr(e,r,t){return r<=e&&e<=t}function VE(e,r){return e.indexOf(r)!==-1}var fn=Math.floor;function sl(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function $E(e){for(var r=String(e),t=r.length,i=0,a=[];i<t;){var n=r.charCodeAt(i);if(n<55296||n>57343)a.push(n);else if(56320<=n&&n<=57343)a.push(65533);else if(55296<=n&&n<=56319)if(i===t-1)a.push(65533);else{var o=r.charCodeAt(i+1);if(56320<=o&&o<=57343){var s=n&1023,c=o&1023;a.push(65536+(s<<10)+c),i+=1}else a.push(65533)}i+=1}return a}function WE(e){for(var r="",t=0;t<e.length;++t){var i=e[t];i<=65535?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return r}function Ja(e){return 0<=e&&e<=127}var Za=Ja,zr=-1;function Gp(e){this.tokens=[].slice.call(e),this.tokens.reverse()}Gp.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():zr},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 at=-1;function Lr(e,r){if(e)throw TypeError("Decoder error");return r||65533}function bi(e){throw TypeError("The code point "+e+" could not be encoded.")}function GE(){}GE.prototype={handler:function(e,r){}};function KE(){}KE.prototype={handler:function(e,r){}};function Kp(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(Yp,e)?Yp[e]:null}var Jg=[{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"}],Yp={};Jg.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(t){Yp[t]=r})})});var Da={},za={};function rs(e,r){return r&&r[e]||null}function ts(e,r){var t=r.indexOf(e);return t===-1?null:t}function Ea(e){if(!("encoding-indexes"in global))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return global["encoding-indexes"][e]}function YE(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,t=0,i=Ea("gb18030-ranges"),a;for(a=0;a<i.length;++a){var n=i[a];if(n[0]<=e)r=n[0],t=n[1];else break}return t+e-r}function QE(e){if(e===59335)return 7457;var r=0,t=0,i=Ea("gb18030-ranges"),a;for(a=0;a<i.length;++a){var n=i[a];if(n[1]<=e)r=n[1],t=n[0];else break}return t+e-r}function XE(e){Qp=Qp||Ea("jis0208").map(function(t,i){return jr(i,8272,8835)?null:t});var r=Qp;return r.indexOf(e)}var Qp;function JE(e){Xp=Xp||Ea("big5").map(function(t,i){return i<(161-129)*157?null:t});var r=Xp;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):ts(e,r)}var Xp,Zg="utf-8";function ko(e,r){if(!(this instanceof ko))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):Zg,r=sl(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var t=Kp(e);if(t===null||t.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!za[t.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var i=this;return i._encoding=t,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(ko.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(ko.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(ko.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));ko.prototype.decode=function(r,t){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),t=sl(t),this._do_not_flush||(this._decoder=za[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(t.stream);for(var a=new Gp(i),n=[],o;;){var s=a.read();if(s===zr||(o=this._decoder.handler(a,s),o===at))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(a,a.read()),o===at)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!a.endOfStream());this._decoder=null}function c(f){return VE(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)&&!this._ignoreBOM&&!this._BOMseen&&(f.length>0&&f[0]===65279?(this._BOMseen=!0,f.shift()):f.length>0&&(this._BOMseen=!0)),WE(f)}return c.call(this,n)};function bu(e,r){if(!(this instanceof bu))throw TypeError("Called as a function. Did you forget 'new'?");r=sl(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var t=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):Zg;var i=Kp(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Da[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");t._encoding=i}else t._encoding=Kp("utf-8"),e!==void 0&&"console"in global&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=t._encoding.name.toLowerCase()),t}Object.defineProperty&&Object.defineProperty(bu.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});bu.prototype.encode=function(r,t){r=r===void 0?"":String(r),t=sl(t),this._do_not_flush||(this._encoder=Da[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(t.stream);for(var i=new Gp($E(r)),a=[],n;;){var o=i.read();if(o===zr||(n=this._encoder.handler(i,o),n===at))break;Array.isArray(n)?a.push.apply(a,n):a.push(n)}if(!this._do_not_flush){for(;n=this._encoder.handler(i,i.read()),n!==at;)Array.isArray(n)?a.push.apply(a,n):a.push(n);this._encoder=null}return new Uint8Array(a)};function ZE(e){var r=e.fatal,t=0,i=0,a=0,n=128,o=191;this.handler=function(s,c){if(c===zr&&a!==0)return a=0,Lr(r);if(c===zr)return at;if(a===0){if(jr(c,0,127))return c;if(jr(c,194,223))a=1,t=c&31;else if(jr(c,224,239))c===224&&(n=160),c===237&&(o=159),a=2,t=c&15;else if(jr(c,240,244))c===240&&(n=144),c===244&&(o=143),a=3,t=c&7;else return Lr(r);return null}if(!jr(c,n,o))return t=a=i=0,n=128,o=191,s.prepend(c),Lr(r);if(n=128,o=191,t=t<<6|c&63,i+=1,i!==a)return null;var f=t;return t=a=i=0,f}}function e4(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return at;if(Za(i))return i;var a,n;jr(i,128,2047)?(a=1,n=192):jr(i,2048,65535)?(a=2,n=224):jr(i,65536,1114111)&&(a=3,n=240);for(var o=[(i>>6*a)+n];a>0;){var s=i>>6*(a-1);o.push(128|s&63),a-=1}return o}}Da["UTF-8"]=function(e){return new e4(e)};za["UTF-8"]=function(e){return new ZE(e)};function r4(e,r){var t=r.fatal;this.handler=function(i,a){if(a===zr)return at;if(Ja(a))return a;var n=e[a-128];return n===null?Lr(t):n}}function t4(e,r){var t=r.fatal;this.handler=function(i,a){if(a===zr)return at;if(Za(a))return a;var n=ts(a,e);return n===null&&bi(a),n+128}}(function(){"encoding-indexes"in global&&Jg.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var t=r.name,i=Ea(t.toLowerCase());za[t]=function(a){return new r4(i,a)},Da[t]=function(a){return new t4(i,a)}})})})();za.GBK=function(e){return new eb(e)};Da.GBK=function(e){return new rb(e,!0)};function eb(e){var r=e.fatal,t=0,i=0,a=0;this.handler=function(n,o){if(o===zr&&t===0&&i===0&&a===0)return at;o===zr&&(t!==0||i!==0||a!==0)&&(t=0,i=0,a=0,Lr(r));var s;if(a!==0){s=null,jr(o,48,57)&&(s=YE((((t-129)*10+i-48)*126+a-129)*10+o-48));var c=[i,a,o];return t=0,i=0,a=0,s===null?(n.prepend(c),Lr(r)):s}if(i!==0)return jr(o,129,254)?(a=o,null):(n.prepend([i,o]),t=0,i=0,Lr(r));if(t!==0){if(jr(o,48,57))return i=o,null;var f=t,p=null;t=0;var m=o<127?64:65;return(jr(o,64,126)||jr(o,128,254))&&(p=(f-129)*190+(o-m)),s=p===null?null:rs(p,Ea("gb18030")),s===null&&Ja(o)&&n.prepend(o),s===null?Lr(r):s}return Ja(o)?o:o===128?8364:jr(o,129,254)?(t=o,null):Lr(r)}}function rb(e,r){var t=e.fatal;this.handler=function(i,a){if(a===zr)return at;if(Za(a))return a;if(a===58853)return bi(a);if(r&&a===8364)return 128;var n=ts(a,Ea("gb18030"));if(n!==null){var o=fn(n/190)+129,s=n%190,c=s<63?64:65;return[o,s+c]}if(r)return bi(a);n=QE(a);var f=fn(n/10/126/10);n=n-f*10*126*10;var p=fn(n/10/126);n=n-p*10*126;var m=fn(n/10),h=n-m*10;return[f+129,p+48,m+129,h+48]}}Da.gb18030=function(e){return new rb(e)};za.gb18030=function(e){return new eb(e)};function a4(e){var r=e.fatal,t=0;this.handler=function(i,a){if(a===zr&&t!==0)return t=0,Lr(r);if(a===zr&&t===0)return at;if(t!==0){var n=t,o=null;t=0;var s=a<127?64:98;switch((jr(a,64,126)||jr(a,161,254))&&(o=(n-129)*157+(a-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:rs(o,Ea("big5"));return c===null&&Ja(a)&&i.prepend(a),c===null?Lr(r):c}return Ja(a)?a:jr(a,129,254)?(t=a,null):Lr(r)}}function i4(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return at;if(Za(i))return i;var a=JE(i);if(a===null)return bi(i);var n=fn(a/157)+129;if(n<161)return bi(i);var o=a%157,s=o<63?64:98;return[n,o+s]}}Da.Big5=function(e){return new i4(e)};za.Big5=function(e){return new a4(e)};function n4(e){var r=e.fatal,t=!1,i=0;this.handler=function(a,n){if(n===zr&&i!==0)return i=0,Lr(r);if(n===zr&&i===0)return at;if(i===142&&jr(n,161,223))return i=0,65377-161+n;if(i===143&&jr(n,161,254))return t=!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=rs((o-161)*94+(n-161),Ea(t?"jis0212":"jis0208"))),t=!1,jr(n,161,254)||a.prepend(n),s===null?Lr(r):s}return Ja(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):Lr(r)}}function o4(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return at;if(Za(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 a=ts(i,Ea("jis0208"));if(a===null)return bi(i);var n=fn(a/94)+161,o=a%94+161;return[n,o]}}Da["EUC-JP"]=function(e){return new o4(e)};za["EUC-JP"]=function(e){return new n4(e)};function s4(e){var r=e.fatal,t={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=t.ASCII,a=t.ASCII,n=0,o=!1;this.handler=function(s,c){switch(i){default:case t.ASCII:return c===27?(i=t.EscapeStart,null):jr(c,0,127)&&c!==14&&c!==15&&c!==27?(o=!1,c):c===zr?at:(o=!1,Lr(r));case t.Roman:return c===27?(i=t.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===zr?at:(o=!1,Lr(r));case t.Katakana:return c===27?(i=t.EscapeStart,null):jr(c,33,95)?(o=!1,65377-33+c):c===zr?at:(o=!1,Lr(r));case t.LeadByte:return c===27?(i=t.EscapeStart,null):jr(c,33,126)?(o=!1,n=c,i=t.TrailByte,null):c===zr?at:(o=!1,Lr(r));case t.TrailByte:if(c===27)return i=t.EscapeStart,Lr(r);if(jr(c,33,126)){i=t.LeadByte;var f=(n-33)*94+c-33,p=rs(f,Ea("jis0208"));return p===null?Lr(r):p}return c===zr?(i=t.LeadByte,s.prepend(c),Lr(r)):(i=t.LeadByte,Lr(r));case t.EscapeStart:return c===36||c===40?(n=c,i=t.Escape,null):(s.prepend(c),o=!1,i=a,Lr(r));case t.Escape:var m=n;n=0;var h=null;if(m===40&&c===66&&(h=t.ASCII),m===40&&c===74&&(h=t.Roman),m===40&&c===73&&(h=t.Katakana),m===36&&(c===64||c===66)&&(h=t.LeadByte),h!==null){i=i=h;var v=o;return o=!0,v?Lr(r):null}return s.prepend([m,c]),o=!1,i=a,Lr(r)}}}function u4(e){var r=e.fatal,t={ASCII:0,Roman:1,jis0208:2},i=t.ASCII;this.handler=function(a,n){if(n===zr&&i!==t.ASCII)return a.prepend(n),i=t.ASCII,[27,40,66];if(n===zr&&i===t.ASCII)return at;if((i===t.ASCII||i===t.Roman)&&(n===14||n===15||n===27))return bi(65533);if(i===t.ASCII&&Za(n))return n;if(i===t.Roman&&(Za(n)&&n!==92&&n!==126||n==165||n==8254)){if(Za(n))return n;if(n===165)return 92;if(n===8254)return 126}if(Za(n)&&i!==t.ASCII)return a.prepend(n),i=t.ASCII,[27,40,66];if((n===165||n===8254)&&i!==t.Roman)return a.prepend(n),i=t.Roman,[27,40,74];n===8722&&(n=65293);var o=ts(n,Ea("jis0208"));if(o===null)return bi(n);if(i!==t.jis0208)return a.prepend(n),i=t.jis0208,[27,36,66];var s=fn(o/94)+33,c=o%94+33;return[s,c]}}Da["ISO-2022-JP"]=function(e){return new u4(e)};za["ISO-2022-JP"]=function(e){return new s4(e)};function c4(e){var r=e.fatal,t=0;this.handler=function(i,a){if(a===zr&&t!==0)return t=0,Lr(r);if(a===zr&&t===0)return at;if(t!==0){var n=t,o=null;t=0;var s=a<127?64:65,c=n<160?129:193;if((jr(a,64,126)||jr(a,128,252))&&(o=(n-c)*188+a-s),jr(o,8836,10715))return 57344-8836+o;var f=o===null?null:rs(o,Ea("jis0208"));return f===null&&Ja(a)&&i.prepend(a),f===null?Lr(r):f}return Ja(a)||a===128?a:jr(a,161,223)?65377-161+a:jr(a,129,159)||jr(a,224,252)?(t=a,null):Lr(r)}}function l4(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return at;if(Za(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 a=XE(i);if(a===null)return bi(i);var n=fn(a/188),o=n<31?129:193,s=a%188,c=s<63?64:65;return[n+o,s+c]}}Da.Shift_JIS=function(e){return new l4(e)};za.Shift_JIS=function(e){return new c4(e)};function f4(e){var r=e.fatal,t=0;this.handler=function(i,a){if(a===zr&&t!==0)return t=0,Lr(r);if(a===zr&&t===0)return at;if(t!==0){var n=t,o=null;t=0,jr(a,65,254)&&(o=(n-129)*190+(a-65));var s=o===null?null:rs(o,Ea("euc-kr"));return o===null&&Ja(a)&&i.prepend(a),s===null?Lr(r):s}return Ja(a)?a:jr(a,129,254)?(t=a,null):Lr(r)}}function p4(e){var r=e.fatal;this.handler=function(t,i){if(i===zr)return at;if(Za(i))return i;var a=ts(i,Ea("euc-kr"));if(a===null)return bi(i);var n=fn(a/190)+129,o=a%190+65;return[n,o]}}Da["EUC-KR"]=function(e){return new p4(e)};za["EUC-KR"]=function(e){return new f4(e)};function ul(e,r){var t=e>>8,i=e&255;return r?[t,i]:[i,t]}function tb(e,r){var t=r.fatal,i=null,a=null;this.handler=function(n,o){if(o===zr&&(i!==null||a!==null))return Lr(t);if(o===zr&&i===null&&a===null)return at;if(i===null)return i=o,null;var s;if(e?s=(i<<8)+o:s=(o<<8)+i,i=null,a!==null){var c=a;return a=null,jr(s,56320,57343)?65536+(c-55296)*1024+(s-56320):(n.prepend(ul(s,e)),Lr(t))}return jr(s,55296,56319)?(a=s,null):jr(s,56320,57343)?Lr(t):s}}function ab(e,r){var t=r.fatal;this.handler=function(i,a){if(a===zr)return at;if(jr(a,0,65535))return ul(a,e);var n=ul((a-65536>>10)+55296,e),o=ul((a-65536&1023)+56320,e);return n.concat(o)}}Da["UTF-16BE"]=function(e){return new ab(!0,e)};za["UTF-16BE"]=function(e){return new tb(!0,e)};Da["UTF-16LE"]=function(e){return new ab(!1,e)};za["UTF-16LE"]=function(e){return new tb(!1,e)};function d4(e){var r=e.fatal;this.handler=function(t,i){return i===zr?at:Ja(i)?i:63360+i-128}}function h4(e){var r=e.fatal;this.handler=function(t,i){return i===zr?at:Za(i)?i:jr(i,63360,63487)?i-63360+128:bi(i)}}Da["x-user-defined"]=function(e){return new h4(e)};za["x-user-defined"]=function(e){return new d4(e)};var m4="rejected",v4="fulfilled";function ib(e){let r=e.map(t=>t.then(i=>({status:v4,value:i})).catch(i=>({status:m4,reason:i})));return Promise.all(r)}function cl(e){return Buffer.from(e).toString("base64")}function Jp(e){return Buffer.from(e,"base64").toString("ascii")}var yi=class{constructor(r){this.map={},r instanceof yi?r.forEach((t,i)=>this.append(i,t)):Array.isArray(r)?r.forEach(t=>this.append(t[0],t[1])):r&&Object.getOwnPropertyNames(r).forEach(t=>this.append(t,r[t]))}append(r,t){r=yu(r),t=nb(t);let i=this.map[r];this.map[r]=i?`${i}, ${t}`:t}delete(r){delete this.map[yu(r)]}get(r){return r=yu(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(yu(r))}set(r,t){this.map[yu(r)]=nb(t)}forEach(r,t=null){for(let i in this.map)this.map.hasOwnProperty(i)&&(t?r.call(t,this.map[i],i,this):r(this.map[i],i,this))}keys(){let r=[];return this.forEach(function(t,i){r.push(i)}),Zp(r)}values(){let r=[];return this.forEach(function(t){r.push(t)}),Zp(r)}entries(){let r=[];return this.forEach(function(t,i){r.push([i,t])}),Zp(r)}*[Symbol.iterator](){yield*this.entries()}};function yu(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 nb(e){return typeof e!="string"&&(e=String(e)),e}function Zp(e){let r={next(){let t=e.shift();return{done:t===void 0,value:t}}};return r[Symbol.iterator]=function(){return r},r}function xu(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var sb=Oa(require("fs")),ub=Oa(require("http")),cb=Oa(require("https")),ll=Oa(require("zlib"));var g4=e=>e&&e instanceof ArrayBuffer,b4=e=>e&&e instanceof Buffer;function ob(e){let r=e.indexOf(","),t,i;return e.slice(r-7,r)===";base64"?(t=Buffer.from(e.slice(r+1),"base64"),i=e.slice(5,r-7).trim()):(t=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:ed(t),mimeType:i}}function ed(e){if(g4(e))return e;if(b4(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)})`)}function y4(e){return e.startsWith("http:")||e.startsWith("https:")}async function lb(e,r){if(!y4(e)){let t=e.split("?")[0];return await new Promise((i,a)=>{let n=sb.default.createReadStream(t,{encoding:null});n.once("readable",()=>i(n)),n.on("error",o=>a(o))})}return await new Promise((t,i)=>{let a=e.startsWith("https:")?cb.default.request:ub.default.request,n=x4(e,r),o=a(n,s=>t(s));o.on("error",s=>i(s)),o.end()})}function fb(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(ll.default.createBrotliDecompress());case"gzip":return e.pipe(ll.default.createGunzip());case"deflate":return e.pipe(ll.default.createDeflate());default:return e}}async function pb(e){let r=[];return await new Promise((t,i)=>{e.on("error",a=>i(a)),e.on("readable",()=>e.read()),e.on("data",a=>{typeof a=="string"&&i(new Error("Read stream not binary")),r.push(ed(a))}),e.on("end",()=>{let a=w4(r);t(a)})})}function x4(e,r){let t=(r==null?void 0:r.headers)||{},i={};for(let n of Object.keys(t))i[n.toLowerCase()]=t[n];i["accept-encoding"]=i["accept-encoding"]||"gzip,br,deflate";let a=new URL(e);return mi(ha(ha({hostname:a.hostname,path:a.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:i,port:a.port})}function w4(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),t=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(t),a=0;for(let n of r)i.set(n,a),a+=n.byteLength;return i.buffer}var td=Oa(require("stream")),k4=e=>typeof e=="boolean",db=e=>typeof e=="function",_4=e=>e!==null&&typeof e=="object",rd=e=>_4(e)&&db(e.read)&&db(e.pipe)&&k4(e.readable),pn=class{constructor(r,t){this.bodyUsed=!1;let{headers:i,status:a=200,statusText:n="OK",url:o}=t||{};this.url=o,this.ok=a===200,this.status=a,this.statusText=n,this.headers=new yi((t==null?void 0:t.headers)||{}),rd(r)?this._body=fb(r,i):typeof r=="string"?this._body=td.Readable.from([new TextEncoder().encode(r)]):this._body=td.Readable.from([r||new ArrayBuffer(0)])}get body(){return xu(!this.bodyUsed),xu(rd(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return rd(this._body)?await pb(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=="undefined")throw new Error("Blob polyfill not installed");return new Blob([await this.arrayBuffer()])}};var hb=Oa(require("fs"));var mb=e=>e.startsWith("data:"),j4=e=>e.startsWith("http:")||e.startsWith("https:");async function as(e,r){try{if(mb(e)){let{arrayBuffer:f,mimeType:p}=ob(e);return new pn(f,{headers:{"content-type":p},url:e})}let t={},i=e;e.endsWith(".gz")&&(e=e.slice(0,-3),t["content-encoding"]="gzip");let a=await lb(i,r),n=A4(e,a,t),{status:o,statusText:s}=E4(a),c=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&c){let f=S4(e,n.get("location"));return await as(f,r)}return new pn(a,{headers:n,status:o,statusText:s,url:e})}catch(t){return new pn(null,{status:400,statusText:String(t),url:e})}}function S4(e,r){if(r.startsWith("http"))return r;let t=new URL(e);return t.pathname=r,t.href}function E4(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function A4(e,r,t={}){let i={};if(r&&r.headers){let a=r.headers;for(let n in a){let o=a[n];i[n.toLowerCase()]=String(o)}}if(!i["content-length"]){let a=P4(e);Number.isFinite(a)&&(i["content-length"]=a)}return Object.assign(i,t),new yi(i)}function P4(e){if(j4(e))return null;if(mb(e))return e.length-"data:".length;try{let r=e.split("?")[0];return hb.default.statSync(r).size}catch{}return null}var fx=Oa(cx()),px=Oa(Pu());function lx(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function UP(e,r){let t=r.type?r.type.replace("image/",""):"jpeg",i=(0,px.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,fx.default)(i,t,r)}function eh(e,r){let t=UP(e,r);return new Promise(i=>{let a=[];t.on("data",n=>a.push(n)),t.on("end",()=>{let n=Buffer.concat(a);i(lx(n))})})}var $S=Oa(VS());var WS=Oa(require("util"));async function i0(e,r){xu(r,"MIMEType is required to parse image under Node.js");let t=WS.default.promisify($S.default),i=e instanceof Buffer?e:Buffer.from(e),a=await t(i,r),n=[...a.shape],o=a.shape.length===4?a.shape.shift():1,s=a.data instanceof Buffer?new Uint8Array(a.data):a.data;return{shape:n,data:s,width:a.shape[0],height:a.shape[1],components:a.shape[2],layers:o}}var YS=Oa(KS());delete global.ReadableStream;var jc=class extends YS.ReadableStream{};var n0=class{constructor(r){this.isWorking=!1;this.isCancelled=!1;this.chunks=r}start(r){this.work(r)}async work(r){let{chunks:t}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let i;try{i=t.next()}catch(a){r.error(a);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 o0=class extends jc{constructor(r){super(new n0(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let t=this.getReader();yield*this._chunks,t.releaseLock()}};var lo=class{constructor(r=[],t={}){this.parts=[],this.size=0;for(let i of r)if(typeof i=="string"){let a=new TextEncoder().encode(i);this.parts.push(a),this.size+=a.byteLength}else if(i instanceof lo)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:a,byteOffset:n,byteLength:o}=i;this.parts.push(new Uint8Array(a,n,o)),this.size+=o}else{let a=new TextEncoder().encode(String(i));this.parts.push(a),this.size+=a.byteLength}this.type=eN(t.type)}slice(r=0,t=this.size,i=""){let{size:a,parts:n}=this,o=r<0?Math.max(a+r,0):Math.min(r,a),s=t<0?Math.max(a+t,0):Math.min(t,a),c=Math.max(s-o,0),f=new lo([],{type:i});if(c===0)return f;let p=0,m=[];for(let h of n){let{byteLength:v}=h;if(o>0&&v<=o)o-=v,s-=v;else{let y=h.subarray(o,Math.min(v,s));if(m.push(y),p+=y.byteLength,o=0,p>=c)break}}return f.parts=m,f.size=p,f}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,t="";for(let i of this.parts)t+=r.decode(i);return t}stream(){return new o0(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),t=new Uint8Array(r),i=0;for(let a of this.parts)t.set(a,i),i+=a.byteLength;return r}};function eN(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var s0=class extends lo{constructor(r,t,i={}){super(r,i);this.name="";this.webkitRelativePath="";this.name=String(t).replace(/\//g,":"),this.lastModified=(i==null?void 0:i.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};var tN=!gi||!("TextEncoder"in At);tN&&(At.TextEncoder=bu);var aN=!gi||!("TextDecoder"in At);aN&&(At.TextDecoder=ko);!gi&&!("atob"in At)&&cl&&(At.atob=cl);!gi&&!("btoa"in At)&&Jp&&(At.btoa=Jp);!gi&&!("Headers"in At)&&yi&&(At.Headers=yi);!gi&&!("Response"in At)&&pn&&(At.Response=pn);!gi&&!("fetch"in At)&&as&&(At.fetch=as);!gi&&!("DOMParser"in At)&&u0.DOMParser&&(At.DOMParser=u0.DOMParser);!gi&&!("_encodeImageNode"in At)&&eh&&(At._encodeImageNode=eh);!gi&&!("_parseImageNode"in At)&&i0&&(At._parseImageNode=i0);"allSettled"in Promise||(Promise.allSettled=ib);var QS="3.3.0-alpha.7";var iN={draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},XS={name:"Draco",id:bo?"draco":"draco-nodejs",module:"draco",shapes:["mesh"],version:QS,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:iN};function c0(e){let r=1/0,t=1/0,i=1/0,a=-1/0,n=-1/0,o=-1/0,s=e.POSITION?e.POSITION.value:[],c=s&&s.length;for(let f=0;f<c;f+=3){let p=s[f],m=s[f+1],h=s[f+2];r=p<r?p:r,t=m<t?m:t,i=h<i?h:i,a=p>a?p:a,n=m>n?m:n,o=h>o?h:o}return[[r,t,i],[a,n,o]]}function JS(e,r){if(!e)throw new Error(r||"loader assertion failed.")}var li=class{constructor(r,t){JS(Array.isArray(r)),nN(r),this.fields=r,this.metadata=t||new Map}compareTo(r){if(this.metadata!==r.metadata||this.fields.length!==r.fields.length)return!1;for(let t=0;t<this.fields.length;++t)if(!this.fields[t].compareTo(r.fields[t]))return!1;return!0}select(...r){let t=Object.create(null);for(let a of r)t[a]=!0;let i=this.fields.filter(a=>t[a.name]);return new li(i,this.metadata)}selectAt(...r){let t=r.map(i=>this.fields[i]).filter(Boolean);return new li(t,this.metadata)}assign(r){let t,i=this.metadata;if(r instanceof li){let o=r;t=o.fields,i=ZS(ZS(new Map,this.metadata),o.metadata)}else t=r;let a=Object.create(null);for(let o of this.fields)a[o.name]=o;for(let o of t)a[o.name]=o;let n=Object.values(a);return new li(n,i)}};function nN(e){let r={};for(let t of e)r[t.name]&&console.warn("Schema: duplicated field name",t.name,t),r[t.name]=!0}function ZS(e,r){return new Map([...e||new Map,...r||new Map])}var Tn=class{constructor(r,t,i=!1,a=new Map){this.name=r,this.type=t,this.nullable=i,this.metadata=a}get typeId(){return this.type&&this.type.typeId}clone(){return new Tn(this.name,this.type,this.nullable,this.metadata)}compareTo(r){return this.name===r.name&&this.type===r.type&&this.nullable===r.nullable&&this.metadata===r.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?`, metadata: ${this.metadata}`:""}`}};var Ur;(function(Q){Q[Q.NONE=0]="NONE",Q[Q.Null=1]="Null",Q[Q.Int=2]="Int",Q[Q.Float=3]="Float",Q[Q.Binary=4]="Binary",Q[Q.Utf8=5]="Utf8",Q[Q.Bool=6]="Bool",Q[Q.Decimal=7]="Decimal",Q[Q.Date=8]="Date",Q[Q.Time=9]="Time",Q[Q.Timestamp=10]="Timestamp",Q[Q.Interval=11]="Interval",Q[Q.List=12]="List",Q[Q.Struct=13]="Struct",Q[Q.Union=14]="Union",Q[Q.FixedSizeBinary=15]="FixedSizeBinary",Q[Q.FixedSizeList=16]="FixedSizeList",Q[Q.Map=17]="Map",Q[Q.Dictionary=-1]="Dictionary",Q[Q.Int8=-2]="Int8",Q[Q.Int16=-3]="Int16",Q[Q.Int32=-4]="Int32",Q[Q.Int64=-5]="Int64",Q[Q.Uint8=-6]="Uint8",Q[Q.Uint16=-7]="Uint16",Q[Q.Uint32=-8]="Uint32",Q[Q.Uint64=-9]="Uint64",Q[Q.Float16=-10]="Float16",Q[Q.Float32=-11]="Float32",Q[Q.Float64=-12]="Float64",Q[Q.DateDay=-13]="DateDay",Q[Q.DateMillisecond=-14]="DateMillisecond",Q[Q.TimestampSecond=-15]="TimestampSecond",Q[Q.TimestampMillisecond=-16]="TimestampMillisecond",Q[Q.TimestampMicrosecond=-17]="TimestampMicrosecond",Q[Q.TimestampNanosecond=-18]="TimestampNanosecond",Q[Q.TimeSecond=-19]="TimeSecond",Q[Q.TimeMillisecond=-20]="TimeMillisecond",Q[Q.TimeMicrosecond=-21]="TimeMicrosecond",Q[Q.TimeNanosecond=-22]="TimeNanosecond",Q[Q.DenseUnion=-23]="DenseUnion",Q[Q.SparseUnion=-24]="SparseUnion",Q[Q.IntervalDayTime=-25]="IntervalDayTime",Q[Q.IntervalYearMonth=-26]="IntervalYearMonth"})(Ur||(Ur={}));var Fa=class{static isNull(r){return r&&r.typeId===Ur.Null}static isInt(r){return r&&r.typeId===Ur.Int}static isFloat(r){return r&&r.typeId===Ur.Float}static isBinary(r){return r&&r.typeId===Ur.Binary}static isUtf8(r){return r&&r.typeId===Ur.Utf8}static isBool(r){return r&&r.typeId===Ur.Bool}static isDecimal(r){return r&&r.typeId===Ur.Decimal}static isDate(r){return r&&r.typeId===Ur.Date}static isTime(r){return r&&r.typeId===Ur.Time}static isTimestamp(r){return r&&r.typeId===Ur.Timestamp}static isInterval(r){return r&&r.typeId===Ur.Interval}static isList(r){return r&&r.typeId===Ur.List}static isStruct(r){return r&&r.typeId===Ur.Struct}static isUnion(r){return r&&r.typeId===Ur.Union}static isFixedSizeBinary(r){return r&&r.typeId===Ur.FixedSizeBinary}static isFixedSizeList(r){return r&&r.typeId===Ur.FixedSizeList}static isMap(r){return r&&r.typeId===Ur.Map}static isDictionary(r){return r&&r.typeId===Ur.Dictionary}get typeId(){return Ur.NONE}compareTo(r){return this===r}},l0=class extends Fa{get typeId(){return Ur.Null}get[Symbol.toStringTag](){return"Null"}toString(){return"Null"}},f0=class extends Fa{get typeId(){return Ur.Bool}get[Symbol.toStringTag](){return"Bool"}toString(){return"Bool"}},Cn=class extends Fa{constructor(r,t){super();this.isSigned=r,this.bitWidth=t}get typeId(){return Ur.Int}get[Symbol.toStringTag](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}},Sc=class extends Cn{constructor(){super(!0,8)}},Ec=class extends Cn{constructor(){super(!0,16)}},Ac=class extends Cn{constructor(){super(!0,32)}};var Pc=class extends Cn{constructor(){super(!1,8)}},Tc=class extends Cn{constructor(){super(!1,16)}},Cc=class extends Cn{constructor(){super(!1,32)}};var e8={HALF:16,SINGLE:32,DOUBLE:64},Ic=class extends Fa{constructor(r){super();this.precision=r}get typeId(){return Ur.Float}get[Symbol.toStringTag](){return"Float"}toString(){return`Float${this.precision}`}};var Fc=class extends Ic{constructor(){super(e8.SINGLE)}},qc=class extends Ic{constructor(){super(e8.DOUBLE)}},p0=class extends Fa{constructor(){super()}get typeId(){return Ur.Binary}toString(){return"Binary"}get[Symbol.toStringTag](){return"Binary"}},d0=class extends Fa{get typeId(){return Ur.Utf8}get[Symbol.toStringTag](){return"Utf8"}toString(){return"Utf8"}},oN={DAY:0,MILLISECOND:1},h0=class extends Fa{constructor(r){super();this.unit=r}get typeId(){return Ur.Date}get[Symbol.toStringTag](){return"Date"}toString(){return`Date${(this.unit+1)*32}<${oN[this.unit]}>`}};var r8={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9},m0=class extends Fa{constructor(r,t){super();this.unit=r,this.bitWidth=t}get typeId(){return Ur.Time}toString(){return`Time${this.bitWidth}<${r8[this.unit]}>`}get[Symbol.toStringTag](){return"Time"}};var v0=class extends Fa{constructor(r,t=null){super();this.unit=r,this.timezone=t}get typeId(){return Ur.Timestamp}get[Symbol.toStringTag](){return"Timestamp"}toString(){return`Timestamp<${r8[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};var sN={DAY_TIME:0,YEAR_MONTH:1},g0=class extends Fa{constructor(r){super();this.unit=r}get typeId(){return Ur.Interval}get[Symbol.toStringTag](){return"Interval"}toString(){return`Interval<${sN[this.unit]}>`}};var Oc=class extends Fa{constructor(r,t){super();this.listSize=r,this.children=[t]}get typeId(){return Ur.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[Symbol.toStringTag](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}},b0=class extends Fa{constructor(r){super();this.children=r}get typeId(){return Ur.Struct}toString(){return`Struct<{${this.children.map(r=>`${r.name}:${r.type}`).join(", ")}}>`}get[Symbol.toStringTag](){return"Struct"}};function t8(e){switch(e.constructor){case Int8Array:return new Sc;case Uint8Array:return new Pc;case Int16Array:return new Ec;case Uint16Array:return new Tc;case Int32Array:return new Ac;case Uint32Array:return new Cc;case Float32Array:return new Fc;case Float64Array:return new qc;default:throw new Error("array type not supported")}}function y0(e,r,t){let i=t8(r.value),a=t||a8(r);return new Tn(e,new Oc(r.size,new Tn("value",i)),!1,a)}function a8(e){let r=new Map;return"byteOffset"in e&&r.set("byteOffset",e.byteOffset.toString(10)),"byteStride"in e&&r.set("byteStride",e.byteStride.toString(10)),"normalized"in e&&r.set("normalized",e.normalized.toString()),r}function i8(e,r,t){let i=o8(r.metadata),a=[],n=wN(r.attributes);for(let o in e){let s=e[o],c=n8(o,s,n[o]);a.push(c)}if(t){let o=n8("indices",t);a.push(o)}return new li(a,i)}function wN(e){let r={};for(let t in e){let i=e[t];r[i.name||"undefined"]=i}return r}function n8(e,r,t){let i=t?o8(t.metadata):void 0;return y0(e,r,i)}function o8(e){let r=new Map;for(let t in e)r.set(`${t}.string`,JSON.stringify(e[t]));return r}var s8={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},kN={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},_N=4,sp=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,t={}){let i=new this.draco.DecoderBuffer;i.Init(new Int8Array(r),r.byteLength),this._disableAttributeTransforms(t);let a=this.decoder.GetEncodedGeometryType(i),n=a===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let o;switch(a){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,a,t),c=this._getMeshData(n,s,t),f=c0(c.attributes),p=i8(c.attributes,s,c.indices);return mi(ha({loader:"draco",loaderData:s,header:{vertexCount:n.num_points(),boundingBox:f}},c),{schema:p})}finally{this.draco.destroy(i),n&&this.draco.destroy(n)}}_getDracoLoaderData(r,t,i){let a=this._getTopLevelMetadata(r),n=this._getDracoAttributes(r,i);return{geometry_type:t,num_attributes:r.num_attributes(),num_points:r.num_points(),num_faces:r instanceof this.draco.Mesh?r.num_faces():0,metadata:a,attributes:n}}_getDracoAttributes(r,t){let i={};for(let a=0;a<r.num_attributes();a++){let n=this.decoder.GetAttribute(r,a),o=this._getAttributeMetadata(r,a);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:a,metadata:o};let s=this._getQuantizationTransform(n,t);s&&(i[n.unique_id()].quantization_transform=s);let c=this._getOctahedronTransform(n,t);c&&(i[n.unique_id()].octahedron_transform=c)}return i}_getMeshData(r,t,i){let a=this._getMeshAttributes(t,r,i);if(!a.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:a,indices:{value:this._getTriangleStripIndices(r),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:a,indices:{value:this._getTriangleListIndices(r),size:1}}}return{topology:"point-list",mode:0,attributes:a}}_getMeshAttributes(r,t,i){let a={};for(let n of Object.values(r.attributes)){let o=this._deduceAttributeName(n,i);n.name=o;let{value:s,size:c}=this._getAttributeValues(t,n);a[o]={value:s,size:c,byteOffset:n.byte_offset,byteStride:n.byte_stride,normalized:n.normalized}}return a}_getTriangleListIndices(r){let i=r.num_faces()*3,a=i*_N,n=this.draco._malloc(a);try{return this.decoder.GetTrianglesUInt32Array(r,a,n),new Uint32Array(this.draco.HEAPF32.buffer,n,i).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(r){let t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(r,t),EN(t)}finally{this.draco.destroy(t)}}_getAttributeValues(r,t){let i=kN[t.data_type],a=t.num_components,o=r.num_points()*a,s=o*i.BYTES_PER_ELEMENT,c=jN(this.draco,i),f,p=this.draco._malloc(s);try{let m=this.decoder.GetAttribute(r,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(r,m,c,s,p),f=new i(this.draco.HEAPF32.buffer,p,o).slice()}finally{this.draco._free(p)}return{value:f,size:a}}_deduceAttributeName(r,t){let i=r.unique_id;for(let[o,s]of Object.entries(t.extraAttributes||{}))if(s===i)return o;let a=r.attribute_type;for(let o in s8)if(this.draco[o]===a)return s8[o];let n=t.attributeNameEntry||"name";return r.metadata[n]?r.metadata[n].string:`CUSTOM_ATTRIBUTE_${i}`}_getTopLevelMetadata(r){let t=this.decoder.GetMetadata(r);return this._getDracoMetadata(t)}_getAttributeMetadata(r,t){let i=this.decoder.GetAttributeMetadata(r,t);return this._getDracoMetadata(i)}_getDracoMetadata(r){if(!r||!r.ptr)return{};let t={},i=this.metadataQuerier.NumEntries(r);for(let a=0;a<i;a++){let n=this.metadataQuerier.GetEntryName(r,a);t[n]=this._getDracoMetadataField(r,n)}return t}_getDracoMetadataField(r,t){let i=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(r,t,i);let a=SN(i);return{int:this.metadataQuerier.GetIntEntry(r,t),string:this.metadataQuerier.GetStringEntry(r,t),double:this.metadataQuerier.GetDoubleEntry(r,t),intArray:a}}finally{this.draco.destroy(i)}}_disableAttributeTransforms(r){let{quantizedAttributes:t=[],octahedronAttributes:i=[]}=r,a=[...t,...i];for(let n of a)this.decoder.SkipAttributeTransform(this.draco[n])}_getQuantizationTransform(r,t){let{quantizedAttributes:i=[]}=t,a=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(a)){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,t){let{octahedronAttributes:i=[]}=t,a=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(a)){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 jN(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 SN(e){let r=e.size(),t=new Int32Array(r);for(let i=0;i<r;i++)t[i]=e.GetValue(i);return t}function EN(e){let r=e.size(),t=new Int32Array(r);for(let i=0;i<r;i++)t[i]=e.GetValue(i);return t}var up="1.4.1",AN=`https://www.gstatic.com/draco/versioned/decoders/${up}/draco_decoder.js`,PN=`https://www.gstatic.com/draco/versioned/decoders/${up}/draco_wasm_wrapper.js`,TN=`https://www.gstatic.com/draco/versioned/decoders/${up}/draco_decoder.wasm`,WK=`https://raw.githubusercontent.com/google/draco/${up}/javascript/draco_encoder.js`,Rc;async function u8(e){let r=e.modules||{};return r.draco3d?Rc=Rc||r.draco3d.createDecoderModule({}).then(t=>({draco:t})):Rc=Rc||CN(e),await Rc}async function CN(e){let r,t;switch(e.draco&&e.draco.decoderType){case"js":r=await iu(AN,"draco",e);break;case"wasm":default:[r,t]=await Promise.all([await iu(PN,"draco",e),await iu(TN,"draco",e)])}return r=r||globalThis.DracoDecoderModule,await IN(r,t)}function IN(e,r){let t={};return r&&(t.wasmBinary=r),new Promise(i=>{e(mi(ha({},t),{onModuleLoaded:a=>i({draco:a})}))})}var c8=mi(ha({},XS),{parse:FN});async function FN(e,r){let{draco:t}=await u8(r),i=new sp(t);try{return i.parseSync(e,r==null?void 0:r.draco)}finally{i.destroy()}}Cp(c8);
|
|
96
96
|
/*!
|
|
97
97
|
* Copyright 2010 LearnBoost <dev@learnboost.com>
|
|
98
98
|
*
|