@loaders.gl/draco 3.3.0-alpha.2 → 3.3.0-alpha.4

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,9 +92,9 @@ caused by: `+Mr.fullStack(r):e.stack};Mr.errorFromList=function(e){return Ra.arr
92
92
  `,t(o),t(n.body),t(`\r
93
93
  `)}),t("--"+a.boundary+"--"),a.request.postambleCRLF&&t(`\r
94
94
  `),i};Gu.prototype.onRequest=function(e){var r=this,a=r.isChunked(e),i=e.data||e;r.setHeaders(a),r.chunked=a,r.body=r.build(i,a)};kj.Multipart=Gu});var Sj=B(Ej=>{"use strict";var jj=require("url"),LD=/^https?:/;function Af(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}Af.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)};Af.prototype.redirectTo=function(e){var r=this,a=r.request,i=null;if(e.statusCode>=300&&e.statusCode<400&&e.caseless.has("location")){var t=e.caseless.get("location");if(a.debug("redirect",t),r.followAllRedirects)i=t;else if(r.followRedirects)switch(a.method){case"PATCH":case"PUT":case"POST":case"DELETE":break;default:i=t;break}}else if(e.statusCode===401){var n=a._auth.onResponse(e);n&&(a.setHeader("authorization",n),i=a.uri)}return i};Af.prototype.onResponse=function(e){var r=this,a=r.request,i=r.redirectTo(e);if(!i||!r.allowRedirect.call(a,e))return!1;if(a.debug("redirect to",i),e.resume&&e.resume(),r.redirectsFollowed>=r.maxRedirects)return a.emit("error",new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+a.uri.href)),!1;r.redirectsFollowed+=1,LD.test(i)||(i=jj.resolve(a.uri.href,i));var t=a.uri;return a.uri=jj.parse(i),a.uri.protocol!==t.protocol&&delete a.agent,r.redirects.push({statusCode:e.statusCode,redirectUri:i}),r.followAllRedirects&&a.method!=="HEAD"&&e.statusCode!==401&&e.statusCode!==307&&(a.method=r.followOriginalHttpMethod?a.method:"GET"),delete a.src,delete a.req,delete a._started,e.statusCode!==401&&e.statusCode!==307&&(delete a.body,delete a._form,a.headers&&(a.removeHeader("host"),a.removeHeader("content-type"),a.removeHeader("content-length"),a.uri.hostname!==a.originalHost.split(":")[0]&&a.removeHeader("authorization"))),r.removeRefererHeader||a.setHeader("referer",t.href),a.emit("redirect"),a.init(),!0};Ej.Redirect=Af});var Cj=B(Ss=>{"use strict";var L$=require("net"),ND=require("tls"),yv=require("http"),Aj=require("https"),MD=require("events"),UD=require("assert"),HD=require("util"),VD=Yo().Buffer;Ss.httpOverHttp=$D;Ss.httpsOverHttp=WD;Ss.httpOverHttps=GD;Ss.httpsOverHttps=KD;function $D(e){var r=new Ui(e);return r.request=yv.request,r}function WD(e){var r=new Ui(e);return r.request=yv.request,r.createSocket=Pj,r.defaultPort=443,r}function GD(e){var r=new Ui(e);return r.request=Aj.request,r}function KD(e){var r=new Ui(e);return r.request=Aj.request,r.createSocket=Pj,r.defaultPort=443,r}function Ui(e){var r=this;r.options=e||{},r.proxyOptions=r.options.proxy||{},r.maxSockets=r.options.maxSockets||yv.Agent.defaultMaxSockets,r.requests=[],r.sockets=[],r.on("free",function(i,t,n){for(var o=0,s=r.requests.length;o<s;++o){var u=r.requests[o];if(u.host===t&&u.port===n){r.requests.splice(o,1),u.request.onSocket(i);return}}i.destroy(),r.removeSocket(i)})}HD.inherits(Ui,MD.EventEmitter);Ui.prototype.addRequest=function(r,a){var i=this;if(typeof a=="string"&&(a={host:a,port:arguments[2],path:arguments[3]}),i.sockets.length>=this.maxSockets){i.requests.push({host:a.host,port:a.port,request:r});return}i.createConnection({host:a.host,port:a.port,request:r})};Ui.prototype.createConnection=function(r){var a=this;a.createSocket(r,function(i){i.on("free",t),i.on("close",n),i.on("agentRemove",n),r.request.onSocket(i);function t(){a.emit("free",i,r.host,r.port)}function n(o){a.removeSocket(i),i.removeListener("free",t),i.removeListener("close",n),i.removeListener("agentRemove",n)}})};Ui.prototype.createSocket=function(r,a){var i=this,t={};i.sockets.push(t);var n=Tj({},i.proxyOptions,{method:"CONNECT",path:r.host+":"+r.port,agent:!1});n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+VD.from(n.proxyAuth).toString("base64")),ko("making CONNECT request");var o=i.request(n);o.useChunkedEncodingByDefault=!1,o.once("response",s),o.once("upgrade",u),o.once("connect",f),o.once("error",p),o.end();function s(m){m.upgrade=!0}function u(m,d,v){process.nextTick(function(){f(m,d,v)})}function f(m,d,v){if(o.removeAllListeners(),d.removeAllListeners(),m.statusCode===200)UD.equal(v.length,0),ko("tunneling connection has established"),i.sockets[i.sockets.indexOf(t)]=d,a(d);else{ko("tunneling socket could not be established, statusCode=%d",m.statusCode);var x=new Error("tunneling socket could not be established, statusCode="+m.statusCode);x.code="ECONNRESET",r.request.emit("error",x),i.removeSocket(t)}}function p(m){o.removeAllListeners(),ko(`tunneling socket could not be established, cause=%s
95
- `,m.message,m.stack);var d=new Error("tunneling socket could not be established, cause="+m.message);d.code="ECONNRESET",r.request.emit("error",d),i.removeSocket(t)}};Ui.prototype.removeSocket=function(r){var a=this.sockets.indexOf(r);if(a!==-1){this.sockets.splice(a,1);var i=this.requests.shift();i&&this.createConnection(i)}};function Pj(e,r){var a=this;Ui.prototype.createSocket.call(a,e,function(i){var t=ND.connect(0,Tj({},a.options,{servername:e.host,socket:i}));a.sockets[a.sockets.indexOf(i)]=t,r(t)})}function Tj(e){for(var r=1,a=arguments.length;r<a;++r){var i=arguments[r];if(typeof i=="object")for(var t=Object.keys(i),n=0,o=t.length;n<o;++n){var s=t[n];i[s]!==void 0&&(e[s]=i[s])}}return e}var ko;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?ko=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)}:ko=function(){};Ss.debug=ko});var Oj=B(Ij=>{"use strict";var YD=require("url"),QD=Cj(),Fj=["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"],qj=["proxy-authorization"];function XD(e){var r=e.port,a=e.protocol,i=e.hostname+":";return r?i+=r:a==="https:"?i+="443":i+="80",i}function JD(e,r){var a=r.reduce(function(i,t){return i[t.toLowerCase()]=!0,i},{});return Object.keys(e).filter(function(i){return a[i.toLowerCase()]}).reduce(function(i,t){return i[t]=e[t],i},{})}function ZD(e,r){var a=e.proxy,i={proxy:{host:a.hostname,port:+a.port,proxyAuth:a.auth,headers:r},headers:e.headers,ca:e.ca,cert:e.cert,key:e.key,passphrase:e.passphrase,pfx:e.pfx,ciphers:e.ciphers,rejectUnauthorized:e.rejectUnauthorized,secureOptions:e.secureOptions,secureProtocol:e.secureProtocol};return i}function ez(e,r){var a=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[a,i].join("Over")}function rz(e){var r=e.uri,a=e.proxy,i=ez(r,a);return QD[i]}function Ku(e){this.request=e,this.proxyHeaderWhiteList=Fj,this.proxyHeaderExclusiveList=[],typeof e.tunnel!="undefined"&&(this.tunnelOverride=e.tunnel)}Ku.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride!="undefined"?e.tunnelOverride:r.uri.protocol==="https:"};Ku.prototype.setup=function(e){var r=this,a=r.request;if(e=e||{},typeof a.proxy=="string"&&(a.proxy=YD.parse(a.proxy)),!a.proxy||!a.tunnel)return!1;e.proxyHeaderWhiteList&&(r.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(r.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=r.proxyHeaderExclusiveList.concat(qj),t=r.proxyHeaderWhiteList.concat(i),n=JD(a.headers,t);n.host=XD(a.uri),i.forEach(a.removeHeader,a);var o=rz(a),s=ZD(a,n);return a.agent=o(s),!0};Ku.defaultProxyHeaderWhiteList=Fj;Ku.defaultProxyHeaderExclusiveList=qj;Ij.Tunnel=Ku});var Bj=B((Rj,Yu)=>{(function(){var e,r,a,i,t,n;typeof performance!="undefined"&&performance!==null&&performance.now?Yu.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(Yu.exports=function(){return(e()-t)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},i=e(),n=process.uptime()*1e9,t=i-n):Date.now?(Yu.exports=function(){return Date.now()-a},a=Date.now()):(Yu.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(Rj)});var Gj=B((U$,Wj)=>{"use strict";var az=require("http"),Dj=require("https"),Qu=require("url"),xv=require("util"),Pf=require("stream"),Tf=require("zlib"),wv=_2(),tz=I2(),iz=k_(),nz=ef(),zj=rf(),Lj=F_(),oz=n3(),sz=Zc(),Nj=zm(),uz=f3().strict,As=il(),cz=Yh(),lz=d3(),fz=S3().Querystring,pz=ej().Har,hz=cj().Auth,dz=xj().OAuth,mz=wj(),vz=_j().Multipart,gz=Sj().Redirect,kv=Oj().Tunnel,Ps=Bj(),Xu=Yo().Buffer,Mj=As.safeStringify,bz=As.isReadStream,yz=As.toBase64,xz=As.defer,Uj=As.copy,wz=As.version,Hj=cz.jar(),Vj={};function kz(e,r){var a={};for(var i in r){var t=e.indexOf(i)===-1;t&&(a[i]=r[i])}return a}function _z(e,r){var a={};for(var i in r){var t=e.indexOf(i)!==-1,n=typeof r[i]=="function";t&&n||(a[i]=r[i])}return a}function $j(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function jz(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:$j.call(e.request)}}function Ir(e){var r=this;e.har&&(r._har=new pz(r),e=r._har.options(e)),Pf.Stream.call(r);var a=Object.keys(Ir.prototype),i=kz(a,e);sz(r,i),e=_z(a,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new fz(r),r._auth=new hz(r),r._oauth=new dz(r),r._multipart=new vz(r),r._redirect=new gz(r),r._tunnel=new kv(r),r.init(e)}xv.inherits(Ir,Pf.Stream);Ir.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function rt(){Ir.debug&&console.error("REQUEST %s",xv.format.apply(xv,arguments))}Ir.prototype.debug=rt;Ir.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?Uj(r.headers):{};for(var a in r.headers)typeof r.headers[a]=="undefined"&&delete r.headers[a];if(zj.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),rt(e),!r.pool&&r.pool!==!1&&(r.pool=Vj),r.dests=r.dests||[],r.__isRequestRequest=!0,!r._callback&&r.callback&&(r._callback=r.callback,r.callback=function(){r._callbackCalled||(r._callbackCalled=!0,r._callback.apply(r,arguments))},r.on("error",r.callback.bind()),r.on("complete",r.callback.bind(r,null))),!r.uri&&r.url&&(r.uri=r.url,delete r.url),r.baseUrl){if(typeof r.baseUrl!="string")return r.emit("error",new Error("options.baseUrl must be a string"));if(typeof r.uri!="string")return r.emit("error",new Error("options.uri must be a string when using options.baseUrl"));if(r.uri.indexOf("//")===0||r.uri.indexOf("://")!==-1)return r.emit("error",new Error("options.uri must be a path when using options.baseUrl"));var i=r.baseUrl.lastIndexOf("/")===r.baseUrl.length-1,t=r.uri.indexOf("/")===0;i&&t?r.uri=r.baseUrl+r.uri.slice(1):i||t?r.uri=r.baseUrl+r.uri:r.uri===""?r.uri=r.baseUrl:r.uri=r.baseUrl+"/"+r.uri,delete r.baseUrl}if(!r.uri)return r.emit("error",new Error("options.uri is a required argument"));if(typeof r.uri=="string"&&(r.uri=Qu.parse(r.uri)),r.uri.href||(r.uri.href=Qu.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=Qu.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=lz(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 u=e.formData,f=r.form(),p=function(I,R){R&&R.hasOwnProperty("value")&&R.hasOwnProperty("options")?f.append(I,R.value,R.options):f.append(I,R)};for(var m in u)if(u.hasOwnProperty(m)){var d=u[m];if(d instanceof Array)for(var v=0;v<d.length;v++)p(m,d[v]);else p(m,d)}}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 x=r.uri.auth.split(":").map(function(I){return r._qs.unescape(I)});r.auth(x[0],x.slice(1).join(":"),!0)}if(!r.tunnel&&r.proxy&&r.proxy.auth&&!r.hasHeader("proxy-authorization")){var E=r.proxy.auth.split(":").map(function(I){return r._qs.unescape(I)}),b="Basic "+yz(E.join(":"));r.setHeader("proxy-authorization",b)}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 w(){if(uz(r.body)&&(r.body=Xu.from(r.body)),!r.hasHeader("content-length")){var I;typeof r.body=="string"?I=Xu.byteLength(r.body):Array.isArray(r.body)?I=r.body.reduce(function(R,$){return R+$.length},0):I=r.body.length,I?r.setHeader("content-length",I):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!Nj(r.body)&&w(),e.oauth?r.oauth(e.oauth):r._oauth.params&&r.hasHeader("authorization")&&r.oauth(r._oauth.params);var P=r.proxy&&!r.tunnel?r.proxy.protocol:r.uri.protocol,T={"http:":az,"https:":Dj},O=r.httpModules||{};if(r.httpModule=O[P]||T[P],!r.httpModule)return r.emit("error",new Error("Invalid protocol: "+P));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 D=wz();D.major===0&&D.minor<=10?r.agentClass=P==="http:"?Lj:Lj.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(I){if(r.ntick&&r._started&&r.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),r.src=I,bz(I))r.hasHeader("content-type")||r.setHeader("content-type",nz.lookup(I.path));else{if(I.headers)for(var R in I.headers)r.hasHeader(R)||r.setHeader(R,I.headers[R]);r._json&&!r.hasHeader("content-type")&&r.setHeader("content-type","application/json"),I.method&&!r.explicitMethod&&(r.method=I.method)}}),xz(function(){if(!r._aborted){var I=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)Nj(r.body)?r.body.pipe(r):(w(),Array.isArray(r.body)?r.body.forEach(function(R){r.write(R)}):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(R,$){!R&&!isNaN($)&&r.setHeader("content-length",$),I()})):I(),r.ntick=!0}})};Ir.prototype.getNewAgent=function(){var e=this,r=e.agentClass,a={};if(e.agentOptions)for(var i in e.agentOptions)a[i]=e.agentOptions[i];e.ca&&(a.ca=e.ca),e.ciphers&&(a.ciphers=e.ciphers),e.secureProtocol&&(a.secureProtocol=e.secureProtocol),e.secureOptions&&(a.secureOptions=e.secureOptions),typeof e.rejectUnauthorized!="undefined"&&(a.rejectUnauthorized=e.rejectUnauthorized),e.cert&&e.key&&(a.key=e.key,a.cert=e.cert),e.pfx&&(a.pfx=e.pfx),e.passphrase&&(a.passphrase=e.passphrase);var t="";r!==e.httpModule.Agent&&(t+=r.name);var n=e.proxy;typeof n=="string"&&(n=Qu.parse(n));var o=n&&n.protocol==="https:"||this.uri.protocol==="https:";return o&&(a.ca&&(t&&(t+=":"),t+=a.ca),typeof a.rejectUnauthorized!="undefined"&&(t&&(t+=":"),t+=a.rejectUnauthorized),a.cert&&(t&&(t+=":"),t+=a.cert.toString("ascii")+a.key.toString("ascii")),a.pfx&&(t&&(t+=":"),t+=a.pfx.toString("ascii")),a.ciphers&&(t&&(t+=":"),t+=a.ciphers),a.secureProtocol&&(t&&(t+=":"),t+=a.secureProtocol),a.secureOptions&&(t&&(t+=":"),t+=a.secureOptions)),e.pool===Vj&&!t&&Object.keys(a).length===0&&e.httpModule.globalAgent?e.httpModule.globalAgent:(t=e.uri.protocol+t,e.pool[t]||(e.pool[t]=new r(a),e.pool.maxSockets&&(e.pool[t].maxSockets=e.pool.maxSockets)),e.pool[t])};Ir.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),a=Ps();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=Uj(e);delete i.auth,rt("make request",e.uri.href),delete i.timeout;try{e.req=e.httpModule.request(i)}catch(n){e.emit("error",n);return}e.timing&&(e.startTime=r,e.startTimeNow=a,e.timings={});var t;e.timeout&&!e.timeoutTimer&&(e.timeout<0?t=0:typeof e.timeout=="number"&&isFinite(e.timeout)&&(t=e.timeout)),e.req.on("response",e.onRequestResponse.bind(e)),e.req.on("error",e.onRequestError.bind(e)),e.req.on("drain",function(){e.emit("drain")}),e.req.on("socket",function(n){var o=n._connecting||n.connecting;if(e.timing&&(e.timings.socket=Ps()-e.startTimeNow,o)){var s=function(){e.timings.lookup=Ps()-e.startTimeNow},u=function(){e.timings.connect=Ps()-e.startTimeNow};n.once("lookup",s),n.once("connect",u),e.req.once("error",function(){n.removeListener("lookup",s),n.removeListener("connect",u)})}var f=function(){e.req.setTimeout(t,function(){if(e.req){e.abort();var m=new Error("ESOCKETTIMEDOUT");m.code="ESOCKETTIMEDOUT",m.connect=!1,e.emit("error",m)}})};if(t!==void 0)if(o){var 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)},t)}else f();e.emit("socket",n)}),e.emit("request",e.req)}};Ir.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)}};Ir.prototype.onRequestResponse=function(e){var r=this;if(r.timing&&(r.timings.response=Ps()-r.startTimeNow),rt("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=Ps()-r.startTimeNow,e.timingStart=r.startTime,r.timings.socket||(r.timings.socket=0),r.timings.lookup||(r.timings.lookup=r.timings.socket),r.timings.connect||(r.timings.connect=r.timings.lookup),r.timings.response||(r.timings.response=r.timings.connect),rt("elapsed time",r.timings.end),r.elapsedTime+=Math.round(r.timings.end),e.elapsedTime=r.elapsedTime,e.timings=r.timings,e.timingPhases={wait:r.timings.socket,dns:r.timings.lookup-r.timings.socket,tcp:r.timings.connect-r.timings.lookup,firstByte:r.timings.response-r.timings.connect,download:r.timings.end-r.timings.response,total:r.timings.end}),rt("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){rt("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=jz,r.httpModule===Dj&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){rt("strict ssl error",r.uri.href);var a=e.hasOwnProperty("socket")?e.socket.authorizationError:r.uri.href+" does not support SSL";r.emit("error",new Error("SSL Error: "+a));return}r.originalHost=r.getHeader("host"),r.originalHostHeaderName||(r.originalHostHeaderName=r.hasHeader("host")),r.setHost&&r.removeHeader("host"),r.clearTimeout();var i=r._jar&&r._jar.setCookie?r._jar:Hj,t=function(p){try{i.setCookie(p,r.uri.href,{ignoreError:!0})}catch(m){r.emit("error",m)}};if(e.caseless=zj(e.headers),e.caseless.has("set-cookie")&&!r._disableCookies){var n=e.caseless.has("set-cookie");Array.isArray(e.headers[n])?e.headers[n].forEach(t):t(e.headers[n])}if(!r._redirect.onResponse(e)){{e.on("close",function(){r._ended||r.response.emit("end")}),e.once("end",function(){r._ended=!0});var o=function(p){return r.method==="HEAD"||p>=100&&p<200||p===204||p===304},s;if(r.gzip&&!o(e.statusCode)){var u=e.headers["content-encoding"]||"identity";u=u.trim().toLowerCase();var f={flush:Tf.Z_SYNC_FLUSH,finishFlush:Tf.Z_SYNC_FLUSH};u==="gzip"?(s=Tf.createGunzip(f),e.pipe(s)):u==="deflate"?(s=Tf.createInflate(f),e.pipe(s)):(u!=="identity"&&rt("ignoring unrecognized Content-Encoding "+u),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){rt("aborted",r.uri.href);return}r.emit("complete",e)})}rt("finish init function",r.uri.href)}};Ir.prototype.readResponseBody=function(e){var r=this;rt("reading response's body");var a=[],i=0,t=[];r.on("data",function(n){Xu.isBuffer(n)?n.length&&(i+=n.length,a.push(n)):t.push(n)}),r.on("end",function(){if(rt("end event",r.uri.href),r._aborted){rt("aborted",r.uri.href),a=[],i=0;return}if(i?(rt("has body",r.uri.href,i),e.body=Xu.concat(a,i),r.encoding!==null&&(e.body=e.body.toString(r.encoding)),a=[],i=0):t.length&&(r.encoding==="utf8"&&t[0].length>0&&t[0][0]==="\uFEFF"&&(t[0]=t[0].substring(1)),e.body=t.join("")),r._json)try{e.body=JSON.parse(e.body,r._jsonReviver)}catch{rt("invalid JSON received",r.uri.href)}rt("emitting complete",r.uri.href),typeof e.body=="undefined"&&!r._json&&(e.body=r.encoding===null?Xu.alloc(0):""),r.emit("complete",e,e.body)})};Ir.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.clearTimeout(),e.emit("abort")};Ir.prototype.pipeDest=function(e){var r=this,a=r.response;if(e.headers&&!e.headersSent){if(a.caseless.has("content-type")){var i=a.caseless.has("content-type");e.setHeader?e.setHeader(i,a.headers[i]):e.headers[i]=a.headers[i]}if(a.caseless.has("content-length")){var t=a.caseless.has("content-length");e.setHeader?e.setHeader(t,a.headers[t]):e.headers[t]=a.headers[t]}}if(e.setHeader&&!e.headersSent){for(var n in a.headers)(!r.gzip||n!=="content-encoding")&&e.setHeader(n,a.headers[n]);e.statusCode=a.statusCode}r.pipefilter&&r.pipefilter(a,e)};Ir.prototype.qs=function(e,r){var a=this,i;!r&&a.uri.query?i=a._qs.parse(a.uri.query):i={};for(var t in e)i[t]=e[t];var n=a._qs.stringify(i);return n===""||(a.uri=Qu.parse(a.uri.href.split("?")[0]+"?"+n),a.url=a.uri,a.path=a.uri.path,a.uri.host==="unix"&&a.enableUnixSocket()),a};Ir.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 oz,r._form.on("error",function(a){a.message="form-data: "+a.message,r.emit("error",a),r.abort()}),r._form)};Ir.prototype.multipart=function(e){var r=this;return r._multipart.onRequest(e),r._multipart.chunked||(r.body=r._multipart.body),r};Ir.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=Mj(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=Mj(e,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")),typeof r.jsonReviver=="function"&&(r._jsonReviver=r.jsonReviver),r};Ir.prototype.getHeader=function(e,r){var a=this,i,t,n;return r||(r=a.headers),Object.keys(r).forEach(function(o){o.length===e.length&&(t=new RegExp(e,"i"),n=o.match(t),n&&(i=r[o]))}),i};Ir.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),r=e[0],a=e[1];this.socketPath=r,this.uri.pathname=a,this.uri.path=a,this.uri.host=r,this.uri.hostname=r,this.uri.isUnix=!0};Ir.prototype.auth=function(e,r,a,i){var t=this;return t._auth.onRequest(e,r,a,i),t};Ir.prototype.aws=function(e,r){var a=this;if(!r)return a._aws=e,a;if(e.sign_version===4||e.sign_version==="4"){var i={host:a.uri.host,path:a.uri.path,method:a.method,headers:a.headers,body:a.body};e.service&&(i.service=e.service);var t=tz.sign(i,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});a.setHeader("authorization",t.headers.Authorization),a.setHeader("x-amz-date",t.headers["X-Amz-Date"]),t.headers["X-Amz-Security-Token"]&&a.setHeader("x-amz-security-token",t.headers["X-Amz-Security-Token"])}else{var n=new Date;a.setHeader("date",n.toUTCString());var o={key:e.key,secret:e.secret,verb:a.method.toUpperCase(),date:n,contentType:a.getHeader("content-type")||"",md5:a.getHeader("content-md5")||"",amazonHeaders:wv.canonicalizeHeaders(a.headers)},s=a.uri.path;e.bucket&&s?o.resource="/"+e.bucket+s:e.bucket&&!s?o.resource="/"+e.bucket:!e.bucket&&s?o.resource=s:!e.bucket&&!s&&(o.resource="/"),o.resource=wv.canonicalizeResource(o.resource),a.setHeader("authorization",wv.authorization(o))}return a};Ir.prototype.httpSignature=function(e){var r=this;return iz.signRequest({getHeader:function(a){return r.getHeader(a,r.headers)},setHeader:function(a,i){r.setHeader(a,i)},method:r.method,path:r.path},e),rt("httpSignature authorization",r.getHeader("authorization")),r};Ir.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",mz.header(r.uri,r.method,e))};Ir.prototype.oauth=function(e){var r=this;return r._oauth.onRequest(e),r};Ir.prototype.jar=function(e){var r=this,a;if(r._redirect.redirectsFollowed===0&&(r.originalCookieHeader=r.getHeader("cookie")),!e)a=!1,r._disableCookies=!0;else{var i=e.getCookieString?e:Hj,t=r.uri.href;i&&(a=i.getCookieString(t))}return a&&a.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+a):r.setHeader("cookie",a)),r._jar=e,r};Ir.prototype.pipe=function(e,r){var a=this;if(a.response)if(a._destdata)a.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(a._ended)a.emit("error",new Error("You cannot pipe after the response has been ended."));else return Pf.Stream.prototype.pipe.call(a,e,r),a.pipeDest(e),e;else return a.dests.push(e),Pf.Stream.prototype.pipe.call(a,e,r),e};Ir.prototype.write=function(){var e=this;if(!e._aborted&&(e._started||e.start(),e.req))return e.req.write.apply(e.req,arguments)};Ir.prototype.end=function(e){var r=this;r._aborted||(e&&r.write(e),r._started||r.start(),r.req&&r.req.end())};Ir.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0};Ir.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1};Ir.prototype.destroy=function(){var e=this;this.clearTimeout(),e._ended?e.response&&e.response.destroy():e.end()};Ir.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)};Ir.defaultProxyHeaderWhiteList=kv.defaultProxyHeaderWhiteList.slice();Ir.defaultProxyHeaderExclusiveList=kv.defaultProxyHeaderExclusiveList.slice();Ir.prototype.toJSON=$j;Wj.exports=Ir});var Qj=B((H$,Yj)=>{"use strict";var Ju=Zc(),Kj=Yh(),Ez=il(),Sz=Ez.paramsHaveRequestBody;function Cf(e,r,a){typeof r=="function"&&(a=r);var i={};return r!==null&&typeof r=="object"?Ju(i,r,{uri:e}):typeof e=="string"?Ju(i,{uri:e}):Ju(i,e),i.callback=a||i.callback,i}function Pa(e,r,a){if(typeof e=="undefined")throw new Error("undefined is not a valid uri or options object.");var i=Cf(e,r,a);if(i.method==="HEAD"&&Sz(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new Pa.Request(i)}function Vn(e){var r=e.toUpperCase();return function(a,i,t){var n=Cf(a,i,t);return n.method=r,Pa(n,n.callback)}}Pa.get=Vn("get");Pa.head=Vn("head");Pa.options=Vn("options");Pa.post=Vn("post");Pa.put=Vn("put");Pa.patch=Vn("patch");Pa.del=Vn("delete");Pa.delete=Vn("delete");Pa.jar=function(e){return Kj.jar(e)};Pa.cookie=function(e){return Kj.parse(e)};function _v(e,r,a,i){return function(t,n,o){var s=Cf(t,n,o),u={};return Ju(!0,u,r,s),u.pool=s.pool||r.pool,i&&(u.method=i.toUpperCase()),typeof a=="function"&&(e=a),e(u,u.callback)}}Pa.defaults=function(e,r){var a=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=_v(a,e,r),t=["get","head","post","put","patch","del","delete"];return t.forEach(function(n){i[n]=_v(a[n],e,r,n)}),i.cookie=_v(a.cookie,e,r),i.jar=a.jar,i.defaults=a.defaults,i};Pa.forever=function(e,r){var a={};return r&&Ju(a,r),e&&(a.agentOptions=e),a.forever=!0,Pa.defaults(a)};Yj.exports=Pa;Pa.Request=Gj();Pa.initParams=Cf;Object.defineProperty(Pa,"debug",{enumerable:!0,get:function(){return Pa.Request.debug},set:function(e){Pa.Request.debug=e}})});var Jj=B((V$,Xj)=>{Xj.exports=Az;function Az(e){if(!/^data\:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");var r=e.indexOf(",");if(r===-1||r<=4)throw new TypeError("malformed data: URI");for(var a=e.substring(5,r).split(";"),i=!1,t="US-ASCII",n=0;n<a.length;n++)a[n]=="base64"?i=!0:a[n].indexOf("charset=")==0&&(t=a[n].substring(8));var o=unescape(e.substring(r+1)),s=i?"base64":"ascii",u=new Buffer(o,s);return u.type=a[0]||"text/plain",u.charset=t,u}});var r8=B(($$,e8)=>{var Pz=Jj();function Tz(e){return{mimeType:Fz(Cz(e)),data:Pz(e)}}function Cz(e){return e.substring(5,e.indexOf(";"))}var Zj=/^(\w+\/)+/;function Fz(e){e=e.toLowerCase();var r=e.match(Zj);return!r||!(r=r[1])?e:e.replace(Zj,r)}e8.exports=Tz});var t8=B((G$,a8)=>{"use strict";var Zu=ou(),W$=require("path"),qz=mx().PNG,Iz=wx(),Oz=Sx(),Rz=Px().GifReader,Bz=Ix(),Dz=require("fs"),zz=Qj(),Lz=ef(),Nz=r8();function Mz(e,r){var a=new qz;a.parse(e,function(i,t){if(i){r(i);return}r(null,Zu(new Uint8Array(t.data),[t.width|0,t.height|0,4],[4,4*t.width|0,1],0))})}function Uz(e,r){var a;try{a=Iz.decode(e)}catch(n){r(n);return}if(!a){r(new Error("Error decoding jpeg"));return}var i=[a.height,a.width,4],t=Zu(a.data,i);r(null,t.transpose(1,0))}function Hz(e,r){var a;try{a=new Rz(e)}catch(s){r(s);return}if(a.numFrames()>0){var i=[a.numFrames(),a.height,a.width,4];try{var t=new Uint8Array(i[0]*i[1]*i[2]*i[3])}catch(s){r(s);return}var n=Zu(t,i);try{for(var o=0;o<a.numFrames();++o)a.decodeAndBlitFrameRGBA(o,t.subarray(n.index(o,0,0,0),n.index(o+1,0,0,0)))}catch(s){r(s);return}r(null,n.transpose(0,2,1))}else{var i=[a.height,a.width,4],t=new Uint8Array(i[0]*i[1]*i[2]),n=Zu(t,i);try{a.decodeAndBlitFrameRGBA(0,t)}catch(p){r(p);return}r(null,n.transpose(1,0))}}function Vz(e,r){var a=new Bz(e);try{a.init()}catch(s){r(s);return}var i=a.getData(),t=[i.getHeight(),i.getWidth(),4],n=new Uint8Array(t[0]*t[1]*t[2]),o=Zu(n,t);Oz(i,o),r(null,o.transpose(1,0))}function Ff(e,r,a){switch(e){case"image/png":Mz(r,a);break;case"image/jpg":case"image/jpeg":Uz(r,a);break;case"image/gif":Hz(r,a);break;case"image/bmp":Vz(r,a);break;default:a(new Error("Unsupported file type: "+e))}}a8.exports=function(r,a,i){if(i||(i=a,a=""),Buffer.isBuffer(r)){if(!a){i(new Error("Invalid file type"));return}Ff(a,r,i)}else if(r.indexOf("data:")===0)try{var t=Nz(r);t?process.nextTick(function(){Ff(a||t.mimeType,t.data,i)}):process.nextTick(function(){i(new Error("Error parsing data URI"))})}catch(n){process.nextTick(function(){i(n)})}else r.indexOf("http://")===0||r.indexOf("https://")===0?zz({url:r,encoding:null},function(n,o,s){if(n){i(n);return}if(a=a,a||(o.getHeader!==void 0?a=o.getHeader("content-type"):o.headers!==void 0&&(a=o.headers["content-type"])),!a){i(new Error("Invalid content-type"));return}Ff(a,s,i)}):Dz.readFile(r,function(n,o){if(n){i(n);return}if(a=a||Lz.lookup(r),!a){i(new Error("Invalid file type"));return}Ff(a,o,i)})}});var s8=B((qf,o8)=>{(function(e,r){typeof qf=="object"&&typeof o8!="undefined"?r(qf):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(qf,function(e){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(c){return"Symbol("+c+")"};function a(){}function i(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}var t=i();function n(c){return typeof c=="object"&&c!==null||typeof c=="function"}var o=a,s=Promise,u=Promise.prototype.then,f=Promise.resolve.bind(s),p=Promise.reject.bind(s);function m(c){return new s(c)}function d(c){return f(c)}function v(c){return p(c)}function x(c,h,A){return u.call(c,h,A)}function E(c,h,A){x(x(c,h,A),void 0,o)}function b(c,h){E(c,h)}function w(c,h){E(c,void 0,h)}function P(c,h,A){return x(c,h,A)}function T(c){x(c,void 0,o)}var O=function(){var c=t&&t.queueMicrotask;if(typeof c=="function")return c;var h=d(void 0);return function(A){return x(h,A)}}();function D(c,h,A){if(typeof c!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(c,h,A)}function I(c,h,A){try{return d(D(c,h,A))}catch(H){return v(H)}}var R=16384,$=function(){function c(){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(c.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),c.prototype.push=function(h){var A=this._back,H=A;A._elements.length===R-1&&(H={_elements:[],_next:void 0}),A._elements.push(h),H!==A&&(this._back=H,A._next=H),++this._size},c.prototype.shift=function(){var h=this._front,A=h,H=this._cursor,ae=H+1,Te=h._elements,Ke=Te[H];return ae===R&&(A=h._next,ae=0),--this._size,this._cursor=ae,h!==A&&(this._front=A),Te[H]=void 0,Ke},c.prototype.forEach=function(h){for(var A=this._cursor,H=this._front,ae=H._elements;(A!==ae.length||H._next!==void 0)&&!(A===ae.length&&(H=H._next,ae=H._elements,A=0,ae.length===0));)h(ae[A]),++A},c.prototype.peek=function(){var h=this._front,A=this._cursor;return h._elements[A]},c}();function z(c,h){c._ownerReadableStream=h,h._reader=c,h._state==="readable"?V(c):h._state==="closed"?Z(c):K(c,h._storedError)}function Y(c,h){var A=c._ownerReadableStream;return Xn(A,h)}function J(c){c._ownerReadableStream._state==="readable"?ue(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):re(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),c._ownerReadableStream._reader=void 0,c._ownerReadableStream=void 0}function G(c){return new TypeError("Cannot "+c+" a stream using a released reader")}function V(c){c._closedPromise=m(function(h,A){c._closedPromise_resolve=h,c._closedPromise_reject=A})}function K(c,h){V(c),ue(c,h)}function Z(c){V(c),_e(c)}function ue(c,h){c._closedPromise_reject!==void 0&&(T(c._closedPromise),c._closedPromise_reject(h),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}function re(c,h){K(c,h)}function _e(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}var ne=r("[[AbortSteps]]"),le=r("[[ErrorSteps]]"),Pe=r("[[CancelSteps]]"),Oe=r("[[PullSteps]]"),xe=Number.isFinite||function(c){return typeof c=="number"&&isFinite(c)},L=Math.trunc||function(c){return c<0?Math.ceil(c):Math.floor(c)};function te(c){return typeof c=="object"||typeof c=="function"}function De(c,h){if(c!==void 0&&!te(c))throw new TypeError(h+" is not an object.")}function me(c,h){if(typeof c!="function")throw new TypeError(h+" is not a function.")}function se(c){return typeof c=="object"&&c!==null||typeof c=="function"}function X(c,h){if(!se(c))throw new TypeError(h+" is not an object.")}function ze(c,h,A){if(c===void 0)throw new TypeError("Parameter "+h+" is required in '"+A+"'.")}function be(c,h,A){if(c===void 0)throw new TypeError(h+" is required in '"+A+"'.")}function Ce(c){return Number(c)}function sr(c){return c===0?0:c}function nr(c){return sr(L(c))}function Er(c,h){var A=0,H=Number.MAX_SAFE_INTEGER,ae=Number(c);if(ae=sr(ae),!xe(ae))throw new TypeError(h+" is not a finite number");if(ae=nr(ae),ae<A||ae>H)throw new TypeError(h+" is outside the accepted range of "+A+" to "+H+", inclusive");return!xe(ae)||ae===0?0:ae}function N(c,h){if(!dn(c))throw new TypeError(h+" is not a ReadableStream.")}function Ee(c){return new $e(c)}function Ae(c,h){c._reader._readRequests.push(h)}function we(c,h,A){var H=c._reader,ae=H._readRequests.shift();A?ae._closeSteps():ae._chunkSteps(h)}function je(c){return c._reader._readRequests.length}function Le(c){var h=c._reader;return!(h===void 0||!We(h))}var $e=function(){function c(h){if(ze(h,1,"ReadableStreamDefaultReader"),N(h,"First parameter"),mn(h))throw new TypeError("This stream has already been locked for exclusive reading by another reader");z(this,h),this._readRequests=new $}return Object.defineProperty(c.prototype,"closed",{get:function(){return We(this)?this._closedPromise:v(de("closed"))},enumerable:!1,configurable:!0}),c.prototype.cancel=function(h){return h===void 0&&(h=void 0),We(this)?this._ownerReadableStream===void 0?v(G("cancel")):Y(this,h):v(de("cancel"))},c.prototype.read=function(){if(!We(this))return v(de("read"));if(this._ownerReadableStream===void 0)return v(G("read from"));var h,A,H=m(function(Te,Ke){h=Te,A=Ke}),ae={_chunkSteps:function(Te){return h({value:Te,done:!1})},_closeSteps:function(){return h({value:void 0,done:!0})},_errorSteps:function(Te){return A(Te)}};return he(this,ae),H},c.prototype.releaseLock=function(){if(!We(this))throw de("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");J(this)}},c}();Object.defineProperties($e.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty($e.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function We(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readRequests"))}function he(c,h){var A=c._ownerReadableStream;A._disturbed=!0,A._state==="closed"?h._closeSteps():A._state==="errored"?h._errorSteps(A._storedError):A._readableStreamController[Oe](h)}function de(c){return new TypeError("ReadableStreamDefaultReader.prototype."+c+" can only be used on a ReadableStreamDefaultReader")}var Q,ke;typeof r.asyncIterator=="symbol"&&(ke=(Q={},Q[r.asyncIterator]=function(){return this},Q),Object.defineProperty(ke,r.asyncIterator,{enumerable:!1}));var Be=function(){function c(h,A){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=h,this._preventCancel=A}return c.prototype.next=function(){var h=this,A=function(){return h._nextSteps()};return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,A,A):A(),this._ongoingPromise},c.prototype.return=function(h){var A=this,H=function(){return A._returnSteps(h)};return this._ongoingPromise?P(this._ongoingPromise,H,H):H()},c.prototype._nextSteps=function(){var h=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var A=this._reader;if(A._ownerReadableStream===void 0)return v(G("iterate"));var H,ae,Te=m(function(fr,Fr){H=fr,ae=Fr}),Ke={_chunkSteps:function(fr){h._ongoingPromise=void 0,O(function(){return H({value:fr,done:!1})})},_closeSteps:function(){h._ongoingPromise=void 0,h._isFinished=!0,J(A),H({value:void 0,done:!0})},_errorSteps:function(fr){h._ongoingPromise=void 0,h._isFinished=!0,J(A),ae(fr)}};return he(A,Ke),Te},c.prototype._returnSteps=function(h){if(this._isFinished)return Promise.resolve({value:h,done:!0});this._isFinished=!0;var A=this._reader;if(A._ownerReadableStream===void 0)return v(G("finish iterating"));if(!this._preventCancel){var H=Y(A,h);return J(A),P(H,function(){return{value:h,done:!0}})}return J(A),d({value:h,done:!0})},c}(),Ye={next:function(){return Je(this)?this._asyncIteratorImpl.next():v(mr("next"))},return:function(c){return Je(this)?this._asyncIteratorImpl.return(c):v(mr("return"))}};ke!==void 0&&Object.setPrototypeOf(Ye,ke);function Ue(c,h){var A=Ee(c),H=new Be(A,h),ae=Object.create(Ye);return ae._asyncIteratorImpl=H,ae}function Je(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_asyncIteratorImpl"))}function mr(c){return new TypeError("ReadableStreamAsyncIterator."+c+" can only be used on a ReadableSteamAsyncIterator")}var Sr=Number.isNaN||function(c){return c!==c};function xr(c){return!(!Pr(c)||c===1/0)}function Pr(c){return!(typeof c!="number"||Sr(c)||c<0)}function br(c){var h=c._queue.shift();return c._queueTotalSize-=h.size,c._queueTotalSize<0&&(c._queueTotalSize=0),h.value}function Vr(c,h,A){if(A=Number(A),!xr(A))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");c._queue.push({value:h,size:A}),c._queueTotalSize+=A}function Lr(c){var h=c._queue.peek();return h.value}function Ur(c){c._queue=new $,c._queueTotalSize=0}function aa(c){return c.slice()}function Ta(c,h,A,H,ae){new Uint8Array(c).set(new Uint8Array(A,H,ae),h)}function ot(c){return c}function ta(c){return!1}var la=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"view",{get:function(){if(!Ba(this))throw He("view");return this._view},enumerable:!1,configurable:!0}),c.prototype.respond=function(h){if(!Ba(this))throw He("respond");if(ze(h,1,"respond"),h=Er(h,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");ta(this._view.buffer),er(this._associatedReadableByteStreamController,h)},c.prototype.respondWithNewView=function(h){if(!Ba(this))throw He("respondWithNewView");if(ze(h,1,"respondWithNewView"),!ArrayBuffer.isView(h))throw new TypeError("You can only respond with array buffer views");if(h.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(h.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");dr(this._associatedReadableByteStreamController,h)},c}();Object.defineProperties(la.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(la.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var fa=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"byobRequest",{get:function(){if(!Ca(this))throw Ge("byobRequest");if(this._byobRequest===null&&this._pendingPullIntos.length>0){var h=this._pendingPullIntos.peek(),A=new Uint8Array(h.buffer,h.byteOffset+h.bytesFilled,h.byteLength-h.bytesFilled),H=Object.create(la.prototype);Ve(H,this,A),this._byobRequest=H}return this._byobRequest},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!Ca(this))throw Ge("desiredSize");return Qe(this)},enumerable:!1,configurable:!0}),c.prototype.close=function(){if(!Ca(this))throw Ge("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var h=this._controlledReadableByteStream._state;if(h!=="readable")throw new TypeError("The stream (in "+h+" state) is not in the readable state and cannot be closed");tr(this)},c.prototype.enqueue=function(h){if(!Ca(this))throw Ge("enqueue");if(ze(h,1,"enqueue"),!ArrayBuffer.isView(h))throw new TypeError("chunk must be an array buffer view");if(h.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(h.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 A=this._controlledReadableByteStream._state;if(A!=="readable")throw new TypeError("The stream (in "+A+" state) is not in the readable state and cannot be enqueued to");Ze(this,h)},c.prototype.error=function(h){if(h===void 0&&(h=void 0),!Ca(this))throw Ge("error");Ne(this,h)},c.prototype[Pe]=function(h){if(this._pendingPullIntos.length>0){var A=this._pendingPullIntos.peek();A.bytesFilled=0}Ur(this);var H=this._cancelAlgorithm(h);return Ie(this),H},c.prototype[Oe]=function(h){var A=this._controlledReadableByteStream;if(this._queueTotalSize>0){var H=this._queue.shift();this._queueTotalSize-=H.byteLength,l(this);var ae=new Uint8Array(H.buffer,H.byteOffset,H.byteLength);h._chunkSteps(ae);return}var Te=this._autoAllocateChunkSize;if(Te!==void 0){var Ke=void 0;try{Ke=new ArrayBuffer(Te)}catch(Fr){h._errorSteps(Fr);return}var fr={buffer:Ke,byteOffset:0,byteLength:Te,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(fr)}Ae(A,h),_a(this)},c}();Object.defineProperties(fa.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(fa.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Ca(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableByteStream"))}function Ba(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_associatedReadableByteStreamController"))}function _a(c){var h=ar(c);if(!!h){if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;var A=c._pullAlgorithm();E(A,function(){c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,_a(c))},function(H){Ne(c,H)})}}function zt(c){_(c),c._pendingPullIntos=new $}function $r(c,h){var A=!1;c._state==="closed"&&(A=!0);var H=bt(h);h.readerType==="default"?we(c,H,A):ie(c,H,A)}function bt(c){var h=c.bytesFilled,A=c.elementSize;return new c.viewConstructor(c.buffer,c.byteOffset,h/A)}function k(c,h,A,H){c._queue.push({buffer:h,byteOffset:A,byteLength:H}),c._queueTotalSize+=H}function y(c,h){var A=h.elementSize,H=h.bytesFilled-h.bytesFilled%A,ae=Math.min(c._queueTotalSize,h.byteLength-h.bytesFilled),Te=h.bytesFilled+ae,Ke=Te-Te%A,fr=ae,Fr=!1;Ke>H&&(fr=Ke-h.bytesFilled,Fr=!0);for(var ua=c._queue;fr>0;){var ha=ua.peek(),Fa=Math.min(fr,ha.byteLength),tt=h.byteOffset+h.bytesFilled;Ta(h.buffer,tt,ha.buffer,ha.byteOffset,Fa),ha.byteLength===Fa?ua.shift():(ha.byteOffset+=Fa,ha.byteLength-=Fa),c._queueTotalSize-=Fa,g(c,Fa,h),fr-=Fa}return Fr}function g(c,h,A){_(c),A.bytesFilled+=h}function l(c){c._queueTotalSize===0&&c._closeRequested?(Ie(c),Is(c._controlledReadableByteStream)):_a(c)}function _(c){c._byobRequest!==null&&(c._byobRequest._associatedReadableByteStreamController=void 0,c._byobRequest._view=null,c._byobRequest=null)}function F(c){for(;c._pendingPullIntos.length>0;){if(c._queueTotalSize===0)return;var h=c._pendingPullIntos.peek();y(c,h)&&(qe(c),$r(c._controlledReadableByteStream,h))}}function M(c,h,A){var H=c._controlledReadableByteStream,ae=1;h.constructor!==DataView&&(ae=h.constructor.BYTES_PER_ELEMENT);var Te=h.constructor,Ke=ot(h.buffer),fr={buffer:Ke,byteOffset:h.byteOffset,byteLength:h.byteLength,bytesFilled:0,elementSize:ae,viewConstructor:Te,readerType:"byob"};if(c._pendingPullIntos.length>0){c._pendingPullIntos.push(fr),Re(H,A);return}if(H._state==="closed"){var Fr=new Te(fr.buffer,fr.byteOffset,0);A._closeSteps(Fr);return}if(c._queueTotalSize>0){if(y(c,fr)){var ua=bt(fr);l(c),A._chunkSteps(ua);return}if(c._closeRequested){var ha=new TypeError("Insufficient bytes to fill elements in the given buffer");Ne(c,ha),A._errorSteps(ha);return}}c._pendingPullIntos.push(fr),Re(H,A),_a(c)}function ee(c,h){h.buffer=ot(h.buffer);var A=c._controlledReadableByteStream;if(Se(A))for(;oe(A)>0;){var H=qe(c);$r(A,H)}}function ce(c,h,A){if(A.bytesFilled+h>A.byteLength)throw new RangeError("bytesWritten out of range");if(g(c,h,A),!(A.bytesFilled<A.elementSize)){qe(c);var H=A.bytesFilled%A.elementSize;if(H>0){var ae=A.byteOffset+A.bytesFilled,Te=A.buffer.slice(ae-H,ae);k(c,Te,0,Te.byteLength)}A.buffer=ot(A.buffer),A.bytesFilled-=H,$r(c._controlledReadableByteStream,A),F(c)}}function Fe(c,h){var A=c._pendingPullIntos.peek(),H=c._controlledReadableByteStream._state;if(H==="closed"){if(h!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");ee(c,A)}else ce(c,h,A);_a(c)}function qe(c){var h=c._pendingPullIntos.shift();return _(c),h}function ar(c){var h=c._controlledReadableByteStream;if(h._state!=="readable"||c._closeRequested||!c._started)return!1;if(Le(h)&&je(h)>0||Se(h)&&oe(h)>0)return!0;var A=Qe(c);return A>0}function Ie(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0}function tr(c){var h=c._controlledReadableByteStream;if(!(c._closeRequested||h._state!=="readable")){if(c._queueTotalSize>0){c._closeRequested=!0;return}if(c._pendingPullIntos.length>0){var A=c._pendingPullIntos.peek();if(A.bytesFilled>0){var H=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ne(c,H),H}}Ie(c),Is(h)}}function Ze(c,h){var A=c._controlledReadableByteStream;if(!(c._closeRequested||A._state!=="readable")){var H=h.buffer,ae=h.byteOffset,Te=h.byteLength,Ke=ot(H);if(Le(A))if(je(A)===0)k(c,Ke,ae,Te);else{var fr=new Uint8Array(Ke,ae,Te);we(A,fr,!1)}else Se(A)?(k(c,Ke,ae,Te),F(c)):k(c,Ke,ae,Te);_a(c)}}function Ne(c,h){var A=c._controlledReadableByteStream;A._state==="readable"&&(zt(c),Ur(c),Ie(c),Kv(A,h))}function Qe(c){var h=c._controlledReadableByteStream._state;return h==="errored"?null:h==="closed"?0:c._strategyHWM-c._queueTotalSize}function er(c,h){if(h=Number(h),!xr(h))throw new RangeError("bytesWritten must be a finite");Fe(c,h)}function dr(c,h){var A=c._pendingPullIntos.peek();if(A.byteOffset+A.bytesFilled!==h.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(A.byteLength!==h.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");A.buffer=h.buffer,Fe(c,h.byteLength)}function cr(c,h,A,H,ae,Te,Ke){h._controlledReadableByteStream=c,h._pullAgain=!1,h._pulling=!1,h._byobRequest=null,h._queue=h._queueTotalSize=void 0,Ur(h),h._closeRequested=!1,h._started=!1,h._strategyHWM=Te,h._pullAlgorithm=H,h._cancelAlgorithm=ae,h._autoAllocateChunkSize=Ke,h._pendingPullIntos=new $,c._readableStreamController=h;var fr=A();E(d(fr),function(){h._started=!0,_a(h)},function(Fr){Ne(h,Fr)})}function Xe(c,h,A){var H=Object.create(fa.prototype),ae=function(){},Te=function(){return d(void 0)},Ke=function(){return d(void 0)};h.start!==void 0&&(ae=function(){return h.start(H)}),h.pull!==void 0&&(Te=function(){return h.pull(H)}),h.cancel!==void 0&&(Ke=function(Fr){return h.cancel(Fr)});var fr=h.autoAllocateChunkSize;if(fr===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");cr(c,H,ae,Te,Ke,A,fr)}function Ve(c,h,A){c._associatedReadableByteStreamController=h,c._view=A}function He(c){return new TypeError("ReadableStreamBYOBRequest.prototype."+c+" can only be used on a ReadableStreamBYOBRequest")}function Ge(c){return new TypeError("ReadableByteStreamController.prototype."+c+" can only be used on a ReadableByteStreamController")}function ir(c){return new ve(c)}function Re(c,h){c._reader._readIntoRequests.push(h)}function ie(c,h,A){var H=c._reader,ae=H._readIntoRequests.shift();A?ae._closeSteps(h):ae._chunkSteps(h)}function oe(c){return c._reader._readIntoRequests.length}function Se(c){var h=c._reader;return!(h===void 0||!fe(h))}var ve=function(){function c(h){if(ze(h,1,"ReadableStreamBYOBReader"),N(h,"First parameter"),mn(h))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Ca(h._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");z(this,h),this._readIntoRequests=new $}return Object.defineProperty(c.prototype,"closed",{get:function(){return fe(this)?this._closedPromise:v(or("closed"))},enumerable:!1,configurable:!0}),c.prototype.cancel=function(h){return h===void 0&&(h=void 0),fe(this)?this._ownerReadableStream===void 0?v(G("cancel")):Y(this,h):v(or("cancel"))},c.prototype.read=function(h){if(!fe(this))return v(or("read"));if(!ArrayBuffer.isView(h))return v(new TypeError("view must be an array buffer view"));if(h.byteLength===0)return v(new TypeError("view must have non-zero byteLength"));if(h.buffer.byteLength===0)return v(new TypeError("view's buffer must have non-zero byteLength"));if(this._ownerReadableStream===void 0)return v(G("read from"));var A,H,ae=m(function(Ke,fr){A=Ke,H=fr}),Te={_chunkSteps:function(Ke){return A({value:Ke,done:!1})},_closeSteps:function(Ke){return A({value:Ke,done:!0})},_errorSteps:function(Ke){return H(Ke)}};return ye(this,h,Te),ae},c.prototype.releaseLock=function(){if(!fe(this))throw or("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");J(this)}},c}();Object.defineProperties(ve.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ve.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function fe(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readIntoRequests"))}function ye(c,h,A){var H=c._ownerReadableStream;H._disturbed=!0,H._state==="errored"?A._errorSteps(H._storedError):M(H._readableStreamController,h,A)}function or(c){return new TypeError("ReadableStreamBYOBReader.prototype."+c+" can only be used on a ReadableStreamBYOBReader")}function pr(c,h){var A=c.highWaterMark;if(A===void 0)return h;if(Sr(A)||A<0)throw new RangeError("Invalid highWaterMark");return A}function lr(c){var h=c.size;return h||function(){return 1}}function hr(c,h){De(c,h);var A=c==null?void 0:c.highWaterMark,H=c==null?void 0:c.size;return{highWaterMark:A===void 0?void 0:Ce(A),size:H===void 0?void 0:U(H,h+" has member 'size' that")}}function U(c,h){return me(c,h),function(A){return Ce(c(A))}}function wr(c,h){De(c,h);var A=c==null?void 0:c.abort,H=c==null?void 0:c.close,ae=c==null?void 0:c.start,Te=c==null?void 0:c.type,Ke=c==null?void 0:c.write;return{abort:A===void 0?void 0:Tr(A,c,h+" has member 'abort' that"),close:H===void 0?void 0:kr(H,c,h+" has member 'close' that"),start:ae===void 0?void 0:vr(ae,c,h+" has member 'start' that"),write:Ke===void 0?void 0:Ar(Ke,c,h+" has member 'write' that"),type:Te}}function Tr(c,h,A){return me(c,A),function(H){return I(c,h,[H])}}function kr(c,h,A){return me(c,A),function(){return I(c,h,[])}}function vr(c,h,A){return me(c,A),function(H){return D(c,h,[H])}}function Ar(c,h,A){return me(c,A),function(H,ae){return I(c,h,[H,ae])}}function _r(c,h){if(!C(c))throw new TypeError(h+" is not a WritableStream.")}var Hr=function(){function c(h,A){h===void 0&&(h={}),A===void 0&&(A={}),h===void 0?h=null:X(h,"First parameter");var H=hr(A,"Second parameter"),ae=wr(h,"First parameter");S(this);var Te=ae.type;if(Te!==void 0)throw new RangeError("Invalid type is specified");var Ke=lr(H),fr=pr(H,1);b8(this,ae,fr,Ke)}return Object.defineProperty(c.prototype,"locked",{get:function(){if(!C(this))throw nc("locked");return W(this)},enumerable:!1,configurable:!0}),c.prototype.abort=function(h){return h===void 0&&(h=void 0),C(this)?W(this)?v(new TypeError("Cannot abort a stream that already has a writer")):pe(this,h):v(nc("abort"))},c.prototype.close=function(){return C(this)?W(this)?v(new TypeError("Cannot close a stream that already has a writer")):pa(this)?v(new TypeError("Cannot close an already-closing stream")):ge(this):v(nc("close"))},c.prototype.getWriter=function(){if(!C(this))throw nc("getWriter");return Cr(this)},c}();Object.defineProperties(Hr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Hr.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function Cr(c){return new Ts(c)}function j(c,h,A,H,ae,Te){ae===void 0&&(ae=1),Te===void 0&&(Te=function(){return 1});var Ke=Object.create(Hr.prototype);S(Ke);var fr=Object.create(_o.prototype);return Rv(Ke,fr,c,h,A,H,ae,Te),Ke}function S(c){c._state="writable",c._storedError=void 0,c._writer=void 0,c._writableStreamController=void 0,c._writeRequests=new $,c._inFlightWriteRequest=void 0,c._closeRequest=void 0,c._inFlightCloseRequest=void 0,c._pendingAbortRequest=void 0,c._backpressure=!1}function C(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_writableStreamController"))}function W(c){return c._writer!==void 0}function pe(c,h){var A=c._state;if(A==="closed"||A==="errored")return d(void 0);if(c._pendingAbortRequest!==void 0)return c._pendingAbortRequest._promise;var H=!1;A==="erroring"&&(H=!0,h=void 0);var ae=m(function(Te,Ke){c._pendingAbortRequest={_promise:void 0,_resolve:Te,_reject:Ke,_reason:h,_wasAlreadyErroring:H}});return c._pendingAbortRequest._promise=ae,H||Or(c,h),ae}function ge(c){var h=c._state;if(h==="closed"||h==="errored")return v(new TypeError("The stream (in "+h+" state) is not in the writable state and cannot be closed"));var A=m(function(ae,Te){var Ke={_resolve:ae,_reject:Te};c._closeRequest=Ke}),H=c._writer;return H!==void 0&&c._backpressure&&h==="writable"&&Lf(H),y8(c._writableStreamController),A}function Me(c){var h=m(function(A,H){var ae={_resolve:A,_reject:H};c._writeRequests.push(ae)});return h}function rr(c,h){var A=c._state;if(A==="writable"){Or(c,h);return}sa(c)}function Or(c,h){var A=c._writableStreamController;c._state="erroring",c._storedError=h;var H=c._writer;H!==void 0&&Fv(H,h),!Et(c)&&A._started&&sa(c)}function sa(c){c._state="errored",c._writableStreamController[le]();var h=c._storedError;if(c._writeRequests.forEach(function(ae){ae._reject(h)}),c._writeRequests=new $,c._pendingAbortRequest===void 0){Hi(c);return}var A=c._pendingAbortRequest;if(c._pendingAbortRequest=void 0,A._wasAlreadyErroring){A._reject(h),Hi(c);return}var H=c._writableStreamController[ne](A._reason);E(H,function(){A._resolve(),Hi(c)},function(ae){A._reject(ae),Hi(c)})}function st(c){c._inFlightWriteRequest._resolve(void 0),c._inFlightWriteRequest=void 0}function at(c,h){c._inFlightWriteRequest._reject(h),c._inFlightWriteRequest=void 0,rr(c,h)}function Lt(c){c._inFlightCloseRequest._resolve(void 0),c._inFlightCloseRequest=void 0;var h=c._state;h==="erroring"&&(c._storedError=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._resolve(),c._pendingAbortRequest=void 0)),c._state="closed";var A=c._writer;A!==void 0&&Lv(A)}function Wn(c,h){c._inFlightCloseRequest._reject(h),c._inFlightCloseRequest=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._reject(h),c._pendingAbortRequest=void 0),rr(c,h)}function pa(c){return!(c._closeRequest===void 0&&c._inFlightCloseRequest===void 0)}function Et(c){return!(c._inFlightWriteRequest===void 0&&c._inFlightCloseRequest===void 0)}function Gn(c){c._inFlightCloseRequest=c._closeRequest,c._closeRequest=void 0}function ti(c){c._inFlightWriteRequest=c._writeRequests.shift()}function Hi(c){c._closeRequest!==void 0&&(c._closeRequest._reject(c._storedError),c._closeRequest=void 0);var h=c._writer;h!==void 0&&Df(h,c._storedError)}function ac(c,h){var A=c._writer;A!==void 0&&h!==c._backpressure&&(h?S8(A):Lf(A)),c._backpressure=h}var Ts=function(){function c(h){if(ze(h,1,"WritableStreamDefaultWriter"),_r(h,"First parameter"),W(h))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=h,h._writer=this;var A=h._state;if(A==="writable")!pa(h)&&h._backpressure?sc(this):Nv(this),oc(this);else if(A==="erroring")zf(this,h._storedError),oc(this);else if(A==="closed")Nv(this),j8(this);else{var H=h._storedError;zf(this,H),zv(this,H)}}return Object.defineProperty(c.prototype,"closed",{get:function(){return Kn(this)?this._closedPromise:v(Yn("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!Kn(this))throw Yn("desiredSize");if(this._ownerWritableStream===void 0)throw Cs("desiredSize");return v8(this)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ready",{get:function(){return Kn(this)?this._readyPromise:v(Yn("ready"))},enumerable:!1,configurable:!0}),c.prototype.abort=function(h){return h===void 0&&(h=void 0),Kn(this)?this._ownerWritableStream===void 0?v(Cs("abort")):h8(this,h):v(Yn("abort"))},c.prototype.close=function(){if(!Kn(this))return v(Yn("close"));var h=this._ownerWritableStream;return h===void 0?v(Cs("close")):pa(h)?v(new TypeError("Cannot close an already-closing stream")):Cv(this)},c.prototype.releaseLock=function(){if(!Kn(this))throw Yn("releaseLock");var h=this._ownerWritableStream;h!==void 0&&qv(this)},c.prototype.write=function(h){return h===void 0&&(h=void 0),Kn(this)?this._ownerWritableStream===void 0?v(Cs("write to")):Iv(this,h):v(Yn("write"))},c}();Object.defineProperties(Ts.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(Ts.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Kn(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_ownerWritableStream"))}function h8(c,h){var A=c._ownerWritableStream;return pe(A,h)}function Cv(c){var h=c._ownerWritableStream;return ge(h)}function d8(c){var h=c._ownerWritableStream,A=h._state;return pa(h)||A==="closed"?d(void 0):A==="errored"?v(h._storedError):Cv(c)}function m8(c,h){c._closedPromiseState==="pending"?Df(c,h):E8(c,h)}function Fv(c,h){c._readyPromiseState==="pending"?Mv(c,h):A8(c,h)}function v8(c){var h=c._ownerWritableStream,A=h._state;return A==="errored"||A==="erroring"?null:A==="closed"?0:Bv(h._writableStreamController)}function qv(c){var h=c._ownerWritableStream,A=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Fv(c,A),m8(c,A),h._writer=void 0,c._ownerWritableStream=void 0}function Iv(c,h){var A=c._ownerWritableStream,H=A._writableStreamController,ae=x8(H,h);if(A!==c._ownerWritableStream)return v(Cs("write to"));var Te=A._state;if(Te==="errored")return v(A._storedError);if(pa(A)||Te==="closed")return v(new TypeError("The stream is closing or closed and cannot be written to"));if(Te==="erroring")return v(A._storedError);var Ke=Me(A);return w8(H,h,ae),Ke}var Ov={},_o=function(){function c(){throw new TypeError("Illegal constructor")}return c.prototype.error=function(h){if(h===void 0&&(h=void 0),!g8(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");var A=this._controlledWritableStream._state;A==="writable"&&Dv(this,h)},c.prototype[ne]=function(h){var A=this._abortAlgorithm(h);return tc(this),A},c.prototype[le]=function(){Ur(this)},c}();Object.defineProperties(_o.prototype,{error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(_o.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function g8(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledWritableStream"))}function Rv(c,h,A,H,ae,Te,Ke,fr){h._controlledWritableStream=c,c._writableStreamController=h,h._queue=void 0,h._queueTotalSize=void 0,Ur(h),h._started=!1,h._strategySizeAlgorithm=fr,h._strategyHWM=Ke,h._writeAlgorithm=H,h._closeAlgorithm=ae,h._abortAlgorithm=Te;var Fr=Bf(h);ac(c,Fr);var ua=A(),ha=d(ua);E(ha,function(){h._started=!0,ic(h)},function(Fa){h._started=!0,rr(c,Fa)})}function b8(c,h,A,H){var ae=Object.create(_o.prototype),Te=function(){},Ke=function(){return d(void 0)},fr=function(){return d(void 0)},Fr=function(){return d(void 0)};h.start!==void 0&&(Te=function(){return h.start(ae)}),h.write!==void 0&&(Ke=function(ua){return h.write(ua,ae)}),h.close!==void 0&&(fr=function(){return h.close()}),h.abort!==void 0&&(Fr=function(ua){return h.abort(ua)}),Rv(c,ae,Te,Ke,fr,Fr,A,H)}function tc(c){c._writeAlgorithm=void 0,c._closeAlgorithm=void 0,c._abortAlgorithm=void 0,c._strategySizeAlgorithm=void 0}function y8(c){Vr(c,Ov,0),ic(c)}function x8(c,h){try{return c._strategySizeAlgorithm(h)}catch(A){return Rf(c,A),1}}function Bv(c){return c._strategyHWM-c._queueTotalSize}function w8(c,h,A){try{Vr(c,h,A)}catch(Te){Rf(c,Te);return}var H=c._controlledWritableStream;if(!pa(H)&&H._state==="writable"){var ae=Bf(c);ac(H,ae)}ic(c)}function ic(c){var h=c._controlledWritableStream;if(!!c._started&&h._inFlightWriteRequest===void 0){var A=h._state;if(A==="erroring"){sa(h);return}if(c._queue.length!==0){var H=Lr(c);H===Ov?k8(c):_8(c,H)}}}function Rf(c,h){c._controlledWritableStream._state==="writable"&&Dv(c,h)}function k8(c){var h=c._controlledWritableStream;Gn(h),br(c);var A=c._closeAlgorithm();tc(c),E(A,function(){Lt(h)},function(H){Wn(h,H)})}function _8(c,h){var A=c._controlledWritableStream;ti(A);var H=c._writeAlgorithm(h);E(H,function(){st(A);var ae=A._state;if(br(c),!pa(A)&&ae==="writable"){var Te=Bf(c);ac(A,Te)}ic(c)},function(ae){A._state==="writable"&&tc(c),at(A,ae)})}function Bf(c){var h=Bv(c);return h<=0}function Dv(c,h){var A=c._controlledWritableStream;tc(c),Or(A,h)}function nc(c){return new TypeError("WritableStream.prototype."+c+" can only be used on a WritableStream")}function Yn(c){return new TypeError("WritableStreamDefaultWriter.prototype."+c+" can only be used on a WritableStreamDefaultWriter")}function Cs(c){return new TypeError("Cannot "+c+" a stream using a released writer")}function oc(c){c._closedPromise=m(function(h,A){c._closedPromise_resolve=h,c._closedPromise_reject=A,c._closedPromiseState="pending"})}function zv(c,h){oc(c),Df(c,h)}function j8(c){oc(c),Lv(c)}function Df(c,h){c._closedPromise_reject!==void 0&&(T(c._closedPromise),c._closedPromise_reject(h),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="rejected")}function E8(c,h){zv(c,h)}function Lv(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="resolved")}function sc(c){c._readyPromise=m(function(h,A){c._readyPromise_resolve=h,c._readyPromise_reject=A}),c._readyPromiseState="pending"}function zf(c,h){sc(c),Mv(c,h)}function Nv(c){sc(c),Lf(c)}function Mv(c,h){c._readyPromise_reject!==void 0&&(T(c._readyPromise),c._readyPromise_reject(h),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="rejected")}function S8(c){sc(c)}function A8(c,h){zf(c,h)}function Lf(c){c._readyPromise_resolve!==void 0&&(c._readyPromise_resolve(void 0),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="fulfilled")}function P8(c){if(typeof c!="object"||c===null)return!1;try{return typeof c.aborted=="boolean"}catch{return!1}}var Uv=typeof DOMException!="undefined"?DOMException:void 0;function T8(c){if(!(typeof c=="function"||typeof c=="object"))return!1;try{return new c,!0}catch{return!1}}function C8(){var c=function(A,H){this.message=A||"",this.name=H||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return c.prototype=Object.create(Error.prototype),Object.defineProperty(c.prototype,"constructor",{value:c,writable:!0,configurable:!0}),c}var F8=T8(Uv)?Uv:C8();function Hv(c,h,A,H,ae,Te){var Ke=Ee(c),fr=Cr(h);c._disturbed=!0;var Fr=!1,ua=d(void 0);return m(function(ha,Fa){var tt;if(Te!==void 0){if(tt=function(){var Wr=new F8("Aborted","AbortError"),Wa=[];H||Wa.push(function(){return h._state==="writable"?pe(h,Wr):d(void 0)}),ae||Wa.push(function(){return c._state==="readable"?Xn(c,Wr):d(void 0)}),eo(function(){return Promise.all(Wa.map(function(At){return At()}))},!0,Wr)},Te.aborted){tt();return}Te.addEventListener("abort",tt)}function Rs(){return m(function(Wr,Wa){function At(kc){kc?Wr():x(Vf(),At,Wa)}At(!1)})}function Vf(){return Fr?d(!0):x(fr._readyPromise,function(){return m(function(Wr,Wa){he(Ke,{_chunkSteps:function(At){ua=x(Iv(fr,At),void 0,a),Wr(!1)},_closeSteps:function(){return Wr(!0)},_errorSteps:Wa})})})}if(Vi(c,Ke._closedPromise,function(Wr){H?xc(!0,Wr):eo(function(){return pe(h,Wr)},!0,Wr)}),Vi(h,fr._closedPromise,function(Wr){ae?xc(!0,Wr):eo(function(){return Xn(c,Wr)},!0,Wr)}),Zn(c,Ke._closedPromise,function(){A?xc():eo(function(){return d8(fr)})}),pa(h)||h._state==="closed"){var So=new TypeError("the destination writable stream closed before all data could be piped to it");ae?xc(!0,So):eo(function(){return Xn(c,So)},!0,So)}T(Rs());function St(){var Wr=ua;return x(ua,function(){return Wr!==ua?St():void 0})}function Vi(Wr,Wa,At){Wr._state==="errored"?At(Wr._storedError):w(Wa,At)}function Zn(Wr,Wa,At){Wr._state==="closed"?At():b(Wa,At)}function eo(Wr,Wa,At){if(Fr)return;Fr=!0,h._state==="writable"&&!pa(h)?b(St(),kc):kc();function kc(){E(Wr(),function(){return wc(Wa,At)},function(o4){return wc(!0,o4)})}}function xc(Wr,Wa){Fr||(Fr=!0,h._state==="writable"&&!pa(h)?b(St(),function(){return wc(Wr,Wa)}):wc(Wr,Wa))}function wc(Wr,Wa){qv(fr),J(Ke),Te!==void 0&&Te.removeEventListener("abort",tt),Wr?Fa(Wa):ha(void 0)}})}var jo=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!uc(this))throw fc("desiredSize");return Nf(this)},enumerable:!1,configurable:!0}),c.prototype.close=function(){if(!uc(this))throw fc("close");if(!Eo(this))throw new TypeError("The stream is not in a state that permits close");qs(this)},c.prototype.enqueue=function(h){if(h===void 0&&(h=void 0),!uc(this))throw fc("enqueue");if(!Eo(this))throw new TypeError("The stream is not in a state that permits enqueue");return lc(this,h)},c.prototype.error=function(h){if(h===void 0&&(h=void 0),!uc(this))throw fc("error");hn(this,h)},c.prototype[Pe]=function(h){Ur(this);var A=this._cancelAlgorithm(h);return cc(this),A},c.prototype[Oe]=function(h){var A=this._controlledReadableStream;if(this._queue.length>0){var H=br(this);this._closeRequested&&this._queue.length===0?(cc(this),Is(A)):Fs(this),h._chunkSteps(H)}else Ae(A,h),Fs(this)},c}();Object.defineProperties(jo.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(jo.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function uc(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableStream"))}function Fs(c){var h=Vv(c);if(!!h){if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;var A=c._pullAlgorithm();E(A,function(){c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,Fs(c))},function(H){hn(c,H)})}}function Vv(c){var h=c._controlledReadableStream;if(!Eo(c)||!c._started)return!1;if(mn(h)&&je(h)>0)return!0;var A=Nf(c);return A>0}function cc(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0,c._strategySizeAlgorithm=void 0}function qs(c){if(!!Eo(c)){var h=c._controlledReadableStream;c._closeRequested=!0,c._queue.length===0&&(cc(c),Is(h))}}function lc(c,h){if(!!Eo(c)){var A=c._controlledReadableStream;if(mn(A)&&je(A)>0)we(A,h,!1);else{var H=void 0;try{H=c._strategySizeAlgorithm(h)}catch(ae){throw hn(c,ae),ae}try{Vr(c,h,H)}catch(ae){throw hn(c,ae),ae}}Fs(c)}}function hn(c,h){var A=c._controlledReadableStream;A._state==="readable"&&(Ur(c),cc(c),Kv(A,h))}function Nf(c){var h=c._controlledReadableStream._state;return h==="errored"?null:h==="closed"?0:c._strategyHWM-c._queueTotalSize}function q8(c){return!Vv(c)}function Eo(c){var h=c._controlledReadableStream._state;return!c._closeRequested&&h==="readable"}function $v(c,h,A,H,ae,Te,Ke){h._controlledReadableStream=c,h._queue=void 0,h._queueTotalSize=void 0,Ur(h),h._started=!1,h._closeRequested=!1,h._pullAgain=!1,h._pulling=!1,h._strategySizeAlgorithm=Ke,h._strategyHWM=Te,h._pullAlgorithm=H,h._cancelAlgorithm=ae,c._readableStreamController=h;var fr=A();E(d(fr),function(){h._started=!0,Fs(h)},function(Fr){hn(h,Fr)})}function I8(c,h,A,H){var ae=Object.create(jo.prototype),Te=function(){},Ke=function(){return d(void 0)},fr=function(){return d(void 0)};h.start!==void 0&&(Te=function(){return h.start(ae)}),h.pull!==void 0&&(Ke=function(){return h.pull(ae)}),h.cancel!==void 0&&(fr=function(Fr){return h.cancel(Fr)}),$v(c,ae,Te,Ke,fr,A,H)}function fc(c){return new TypeError("ReadableStreamDefaultController.prototype."+c+" can only be used on a ReadableStreamDefaultController")}function O8(c,h){var A=Ee(c),H=!1,ae=!1,Te=!1,Ke,fr,Fr,ua,ha,Fa=m(function(St){ha=St});function tt(){if(H)return d(void 0);H=!0;var St={_chunkSteps:function(Vi){O(function(){H=!1;var Zn=Vi,eo=Vi;ae||lc(Fr._readableStreamController,Zn),Te||lc(ua._readableStreamController,eo)})},_closeSteps:function(){H=!1,ae||qs(Fr._readableStreamController),Te||qs(ua._readableStreamController),(!ae||!Te)&&ha(void 0)},_errorSteps:function(){H=!1}};return he(A,St),d(void 0)}function Rs(St){if(ae=!0,Ke=St,Te){var Vi=aa([Ke,fr]),Zn=Xn(c,Vi);ha(Zn)}return Fa}function Vf(St){if(Te=!0,fr=St,ae){var Vi=aa([Ke,fr]),Zn=Xn(c,Vi);ha(Zn)}return Fa}function So(){}return Fr=Mf(So,tt,Rs),ua=Mf(So,tt,Vf),w(A._closedPromise,function(St){hn(Fr._readableStreamController,St),hn(ua._readableStreamController,St),(!ae||!Te)&&ha(void 0)}),[Fr,ua]}function R8(c,h){De(c,h);var A=c,H=A==null?void 0:A.autoAllocateChunkSize,ae=A==null?void 0:A.cancel,Te=A==null?void 0:A.pull,Ke=A==null?void 0:A.start,fr=A==null?void 0:A.type;return{autoAllocateChunkSize:H===void 0?void 0:Er(H,h+" has member 'autoAllocateChunkSize' that"),cancel:ae===void 0?void 0:B8(ae,A,h+" has member 'cancel' that"),pull:Te===void 0?void 0:D8(Te,A,h+" has member 'pull' that"),start:Ke===void 0?void 0:z8(Ke,A,h+" has member 'start' that"),type:fr===void 0?void 0:L8(fr,h+" has member 'type' that")}}function B8(c,h,A){return me(c,A),function(H){return I(c,h,[H])}}function D8(c,h,A){return me(c,A),function(H){return I(c,h,[H])}}function z8(c,h,A){return me(c,A),function(H){return D(c,h,[H])}}function L8(c,h){if(c=""+c,c!=="bytes")throw new TypeError(h+" '"+c+"' is not a valid enumeration value for ReadableStreamType");return c}function N8(c,h){De(c,h);var A=c==null?void 0:c.mode;return{mode:A===void 0?void 0:M8(A,h+" has member 'mode' that")}}function M8(c,h){if(c=""+c,c!=="byob")throw new TypeError(h+" '"+c+"' is not a valid enumeration value for ReadableStreamReaderMode");return c}function U8(c,h){De(c,h);var A=c==null?void 0:c.preventCancel;return{preventCancel:Boolean(A)}}function Wv(c,h){De(c,h);var A=c==null?void 0:c.preventAbort,H=c==null?void 0:c.preventCancel,ae=c==null?void 0:c.preventClose,Te=c==null?void 0:c.signal;return Te!==void 0&&H8(Te,h+" has member 'signal' that"),{preventAbort:Boolean(A),preventCancel:Boolean(H),preventClose:Boolean(ae),signal:Te}}function H8(c,h){if(!P8(c))throw new TypeError(h+" is not an AbortSignal.")}function V8(c,h){De(c,h);var A=c==null?void 0:c.readable;be(A,"readable","ReadableWritablePair"),N(A,h+" has member 'readable' that");var H=c==null?void 0:c.writable;return be(H,"writable","ReadableWritablePair"),_r(H,h+" has member 'writable' that"),{readable:A,writable:H}}var Qn=function(){function c(h,A){h===void 0&&(h={}),A===void 0&&(A={}),h===void 0?h=null:X(h,"First parameter");var H=hr(A,"Second parameter"),ae=R8(h,"First parameter");if(Gv(this),ae.type==="bytes"){if(H.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var Te=pr(H,0);Xe(this,ae,Te)}else{var Ke=lr(H),Te=pr(H,1);I8(this,ae,Te,Ke)}}return Object.defineProperty(c.prototype,"locked",{get:function(){if(!dn(this))throw Jn("locked");return mn(this)},enumerable:!1,configurable:!0}),c.prototype.cancel=function(h){return h===void 0&&(h=void 0),dn(this)?mn(this)?v(new TypeError("Cannot cancel a stream that already has a reader")):Xn(this,h):v(Jn("cancel"))},c.prototype.getReader=function(h){if(h===void 0&&(h=void 0),!dn(this))throw Jn("getReader");var A=N8(h,"First parameter");return A.mode===void 0?Ee(this):ir(this)},c.prototype.pipeThrough=function(h,A){if(A===void 0&&(A={}),!dn(this))throw Jn("pipeThrough");ze(h,1,"pipeThrough");var H=V8(h,"First parameter"),ae=Wv(A,"Second parameter");if(mn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(W(H.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var Te=Hv(this,H.writable,ae.preventClose,ae.preventAbort,ae.preventCancel,ae.signal);return T(Te),H.readable},c.prototype.pipeTo=function(h,A){if(A===void 0&&(A={}),!dn(this))return v(Jn("pipeTo"));if(h===void 0)return v("Parameter 1 is required in 'pipeTo'.");if(!C(h))return v(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var H;try{H=Wv(A,"Second parameter")}catch(ae){return v(ae)}return mn(this)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):W(h)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Hv(this,h,H.preventClose,H.preventAbort,H.preventCancel,H.signal)},c.prototype.tee=function(){if(!dn(this))throw Jn("tee");var h=O8(this);return aa(h)},c.prototype.values=function(h){if(h===void 0&&(h=void 0),!dn(this))throw Jn("values");var A=U8(h,"First parameter");return Ue(this,A.preventCancel)},c}();Object.defineProperties(Qn.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(Qn.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(Qn.prototype,r.asyncIterator,{value:Qn.prototype.values,writable:!0,configurable:!0});function Mf(c,h,A,H,ae){H===void 0&&(H=1),ae===void 0&&(ae=function(){return 1});var Te=Object.create(Qn.prototype);Gv(Te);var Ke=Object.create(jo.prototype);return $v(Te,Ke,c,h,A,H,ae),Te}function Gv(c){c._state="readable",c._reader=void 0,c._storedError=void 0,c._disturbed=!1}function dn(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readableStreamController"))}function mn(c){return c._reader!==void 0}function Xn(c,h){if(c._disturbed=!0,c._state==="closed")return d(void 0);if(c._state==="errored")return v(c._storedError);Is(c);var A=c._readableStreamController[Pe](h);return P(A,a)}function Is(c){c._state="closed";var h=c._reader;h!==void 0&&(_e(h),We(h)&&(h._readRequests.forEach(function(A){A._closeSteps()}),h._readRequests=new $))}function Kv(c,h){c._state="errored",c._storedError=h;var A=c._reader;A!==void 0&&(ue(A,h),We(A)?(A._readRequests.forEach(function(H){H._errorSteps(h)}),A._readRequests=new $):(A._readIntoRequests.forEach(function(H){H._errorSteps(h)}),A._readIntoRequests=new $))}function Jn(c){return new TypeError("ReadableStream.prototype."+c+" can only be used on a ReadableStream")}function Yv(c,h){De(c,h);var A=c==null?void 0:c.highWaterMark;return be(A,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Ce(A)}}var $8=function(h){return h.byteLength},pc=function(){function c(h){ze(h,1,"ByteLengthQueuingStrategy"),h=Yv(h,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=h.highWaterMark}return Object.defineProperty(c.prototype,"highWaterMark",{get:function(){if(!Xv(this))throw Qv("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"size",{get:function(){if(!Xv(this))throw Qv("size");return $8},enumerable:!1,configurable:!0}),c}();Object.defineProperties(pc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(pc.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Qv(c){return new TypeError("ByteLengthQueuingStrategy.prototype."+c+" can only be used on a ByteLengthQueuingStrategy")}function Xv(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_byteLengthQueuingStrategyHighWaterMark"))}var W8=function(){return 1},hc=function(){function c(h){ze(h,1,"CountQueuingStrategy"),h=Yv(h,"First parameter"),this._countQueuingStrategyHighWaterMark=h.highWaterMark}return Object.defineProperty(c.prototype,"highWaterMark",{get:function(){if(!Zv(this))throw Jv("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"size",{get:function(){if(!Zv(this))throw Jv("size");return W8},enumerable:!1,configurable:!0}),c}();Object.defineProperties(hc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(hc.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Jv(c){return new TypeError("CountQueuingStrategy.prototype."+c+" can only be used on a CountQueuingStrategy")}function Zv(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_countQueuingStrategyHighWaterMark"))}function G8(c,h){De(c,h);var A=c==null?void 0:c.flush,H=c==null?void 0:c.readableType,ae=c==null?void 0:c.start,Te=c==null?void 0:c.transform,Ke=c==null?void 0:c.writableType;return{flush:A===void 0?void 0:K8(A,c,h+" has member 'flush' that"),readableType:H,start:ae===void 0?void 0:Y8(ae,c,h+" has member 'start' that"),transform:Te===void 0?void 0:Q8(Te,c,h+" has member 'transform' that"),writableType:Ke}}function K8(c,h,A){return me(c,A),function(H){return I(c,h,[H])}}function Y8(c,h,A){return me(c,A),function(H){return D(c,h,[H])}}function Q8(c,h,A){return me(c,A),function(H,ae){return I(c,h,[H,ae])}}var dc=function(){function c(h,A,H){h===void 0&&(h={}),A===void 0&&(A={}),H===void 0&&(H={}),h===void 0&&(h=null);var ae=hr(A,"Second parameter"),Te=hr(H,"Third parameter"),Ke=G8(h,"First parameter");if(Ke.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(Ke.writableType!==void 0)throw new RangeError("Invalid writableType specified");var fr=pr(Te,0),Fr=lr(Te),ua=pr(ae,1),ha=lr(ae),Fa,tt=m(function(Rs){Fa=Rs});X8(this,tt,ua,ha,fr,Fr),Z8(this,Ke),Ke.start!==void 0?Fa(Ke.start(this._transformStreamController)):Fa(void 0)}return Object.defineProperty(c.prototype,"readable",{get:function(){if(!e0(this))throw i0("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"writable",{get:function(){if(!e0(this))throw i0("writable");return this._writable},enumerable:!1,configurable:!0}),c}();Object.defineProperties(dc.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(dc.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function X8(c,h,A,H,ae,Te){function Ke(){return h}function fr(tt){return a4(c,tt)}function Fr(tt){return t4(c,tt)}function ua(){return i4(c)}c._writable=j(Ke,fr,ua,Fr,A,H);function ha(){return n4(c)}function Fa(tt){return vc(c,tt),d(void 0)}c._readable=Mf(Ke,ha,Fa,ae,Te),c._backpressure=void 0,c._backpressureChangePromise=void 0,c._backpressureChangePromise_resolve=void 0,gc(c,!0),c._transformStreamController=void 0}function e0(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_transformStreamController"))}function mc(c,h){hn(c._readable._readableStreamController,h),vc(c,h)}function vc(c,h){r0(c._transformStreamController),Rf(c._writable._writableStreamController,h),c._backpressure&&gc(c,!1)}function gc(c,h){c._backpressureChangePromise!==void 0&&c._backpressureChangePromise_resolve(),c._backpressureChangePromise=m(function(A){c._backpressureChangePromise_resolve=A}),c._backpressure=h}var Os=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!bc(this))throw yc("desiredSize");var h=this._controlledTransformStream._readable._readableStreamController;return Nf(h)},enumerable:!1,configurable:!0}),c.prototype.enqueue=function(h){if(h===void 0&&(h=void 0),!bc(this))throw yc("enqueue");a0(this,h)},c.prototype.error=function(h){if(h===void 0&&(h=void 0),!bc(this))throw yc("error");e4(this,h)},c.prototype.terminate=function(){if(!bc(this))throw yc("terminate");r4(this)},c}();Object.defineProperties(Os.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Os.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function bc(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledTransformStream"))}function J8(c,h,A,H){h._controlledTransformStream=c,c._transformStreamController=h,h._transformAlgorithm=A,h._flushAlgorithm=H}function Z8(c,h){var A=Object.create(Os.prototype),H=function(Te){try{return a0(A,Te),d(void 0)}catch(Ke){return v(Ke)}},ae=function(){return d(void 0)};h.transform!==void 0&&(H=function(Te){return h.transform(Te,A)}),h.flush!==void 0&&(ae=function(){return h.flush(A)}),J8(c,A,H,ae)}function r0(c){c._transformAlgorithm=void 0,c._flushAlgorithm=void 0}function a0(c,h){var A=c._controlledTransformStream,H=A._readable._readableStreamController;if(!Eo(H))throw new TypeError("Readable side is not in a state that permits enqueue");try{lc(H,h)}catch(Te){throw vc(A,Te),A._readable._storedError}var ae=q8(H);ae!==A._backpressure&&gc(A,!0)}function e4(c,h){mc(c._controlledTransformStream,h)}function t0(c,h){var A=c._transformAlgorithm(h);return P(A,void 0,function(H){throw mc(c._controlledTransformStream,H),H})}function r4(c){var h=c._controlledTransformStream,A=h._readable._readableStreamController;qs(A);var H=new TypeError("TransformStream terminated");vc(h,H)}function a4(c,h){var A=c._transformStreamController;if(c._backpressure){var H=c._backpressureChangePromise;return P(H,function(){var ae=c._writable,Te=ae._state;if(Te==="erroring")throw ae._storedError;return t0(A,h)})}return t0(A,h)}function t4(c,h){return mc(c,h),d(void 0)}function i4(c){var h=c._readable,A=c._transformStreamController,H=A._flushAlgorithm();return r0(A),P(H,function(){if(h._state==="errored")throw h._storedError;qs(h._readableStreamController)},function(ae){throw mc(c,ae),h._storedError})}function n4(c){return gc(c,!1),c._backpressureChangePromise}function yc(c){return new TypeError("TransformStreamDefaultController.prototype."+c+" can only be used on a TransformStreamDefaultController")}function i0(c){return new TypeError("TransformStream.prototype."+c+" can only be used on a TransformStream")}var Uf={ReadableStream:Qn,ReadableStreamDefaultController:jo,ReadableByteStreamController:fa,ReadableStreamBYOBRequest:la,ReadableStreamDefaultReader:$e,ReadableStreamBYOBReader:ve,WritableStream:Hr,WritableStreamDefaultController:_o,WritableStreamDefaultWriter:Ts,ByteLengthQueuingStrategy:pc,CountQueuingStrategy:hc,TransformStream:dc,TransformStreamDefaultController:Os};if(typeof t!="undefined")for(var Hf in Uf)Object.prototype.hasOwnProperty.call(Uf,Hf)&&Object.defineProperty(t,Hf,{value:Uf[Hf],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=pc,e.CountQueuingStrategy=hc,e.ReadableByteStreamController=fa,e.ReadableStream=Qn,e.ReadableStreamBYOBReader=ve,e.ReadableStreamBYOBRequest=la,e.ReadableStreamDefaultController=jo,e.ReadableStreamDefaultReader=$e,e.TransformStream=dc,e.TransformStreamDefaultController=Os,e.WritableStream=Hr,e.WritableStreamDefaultController=_o,e.WritableStreamDefaultWriter=Ts,Object.defineProperty(e,"__esModule",{value:!0})})});var Wf="3.3.0-alpha.2";function c0(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var _i={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},iL=_i.self||_i.window||_i.global||{},nL=_i.window||_i.self||_i.global||{},l0=_i.global||_i.self||_i.window||{},oL=_i.document||{};var _c=typeof process!="object"||String(process)!=="[object process]"||process.browser,jc=typeof importScripts=="function",sL=typeof window!="undefined"&&typeof window.orientation!="undefined",f0=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),uL=f0&&parseFloat(f0[1])||0;function Gf(e,r=!0,a){let i=a||new Set;if(e){if(p0(e))i.add(e);else if(p0(e.buffer))i.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let t in e)Gf(e[t],r,i)}}return a===void 0?Array.from(i):[]}function p0(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 ro(){let parentPort;try{eval("globalThis.parentPort = require('worker_threads').parentPort"),parentPort=globalThis.parentPort}catch{}return parentPort}var Kf=new Map,vn=class{static inWorkerThread(){return typeof self!="undefined"||Boolean(ro())}static set onmessage(r){function a(t){let n=ro(),{type:o,payload:s}=n?t:t.data;r(o,s)}let i=ro();i?(i.on("message",a),i.on("exit",()=>console.debug("Node worker closing"))):globalThis.onmessage=a}static addEventListener(r){let a=Kf.get(r);a||(a=t=>{if(!v4(t))return;let n=ro(),{type:o,payload:s}=n?t:t.data;r(o,s)}),ro()?console.error("not implemented"):globalThis.addEventListener("message",a)}static removeEventListener(r){let a=Kf.get(r);Kf.delete(r),ro()?console.error("not implemented"):globalThis.removeEventListener("message",a)}static postMessage(r,a){let i={source:"loaders.gl",type:r,payload:a},t=Gf(a),n=ro();n?n.postMessage(i,t):globalThis.postMessage(i,t)}};function v4(e){let{type:r,data:a}=e;return r==="message"&&a&&typeof a.source=="string"&&a.source.startsWith("loaders.gl")}var Xf={};d4(Xf,{requireFromFile:()=>Qf,requireFromString:()=>Ec});var Yf=Pt(require("module")),h0=Pt(require("path"));async function Qf(e){if(e.startsWith("http")){let a=await(await fetch(e)).text();return Ec(a)}return e.startsWith("/")||(e=`${process.cwd()}/${e}`),require(e)}function Ec(e,r="",a){if(typeof r=="object"&&(a=r,r=""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let i=Yf.default._nodeModulePaths(h0.default.dirname(r)),t=module.parent,n=new Yf.default(r,t);return n.filename=r,n.paths=[].concat((a==null?void 0:a.prependPaths)||[]).concat(i).concat((a==null?void 0:a.appendPaths)||[]),n._compile(e,r),t&&t.children&&t.children.splice(t.children.indexOf(n),1),n.exports}var g4="beta",b4=typeof Wf!="undefined"?Wf:g4,Jf={};async function Zf(e,r=null,a={}){return r&&(e=d0(e,r,a)),Jf[e]=Jf[e]||y4(e),await Jf[e]}function d0(e,r,a){if(e.startsWith("http"))return e;let i=a.modules||{};return i[e]?i[e]:_c?a.CDN?(c0(a.CDN.startsWith("http")),`${a.CDN}/${r}@${b4}/dist/libs/${e}`):jc?`../src/libs/${e}`:`modules/${r}/src/libs/${e}`:`modules/${r}/dist/libs/${e}`}async function y4(e){if(e.endsWith("wasm"))return await(await fetch(e)).arrayBuffer();if(!_c)try{return Xf&&Qf&&await Qf(e)}catch{return null}if(jc)return importScripts(e);let a=await(await fetch(e)).text();return x4(a,e)}function x4(e,r){if(!_c)return Ec&&Ec(e,r);if(jc)return eval.call(l0,e),null;let a=document.createElement("script");a.id=r;try{a.appendChild(document.createTextNode(e))}catch{a.text=e}return document.body.appendChild(a),null}var Pv=Pt(tg());var ni=typeof process!="object"||String(process)!=="[object process]"||process.browser,mp={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global},ja=mp.global||mp.self||mp.window;var ig={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"]=ig||{};function jr(e,r,a){return r<=e&&e<=a}function V4(e,r){return e.indexOf(r)!==-1}var Ki=Math.floor;function Rc(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function $4(e){for(var r=String(e),a=r.length,i=0,t=[];i<a;){var n=r.charCodeAt(i);if(n<55296||n>57343)t.push(n);else if(56320<=n&&n<=57343)t.push(65533);else if(55296<=n&&n<=56319)if(i===a-1)t.push(65533);else{var o=r.charCodeAt(i+1);if(56320<=o&&o<=57343){var s=n&1023,u=o&1023;t.push(65536+(s<<10)+u),i+=1}else t.push(65533)}i+=1}return t}function W4(e){for(var r="",a=0;a<e.length;++a){var i=e[a];i<=65535?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return r}function $t(e){return 0<=e&&e<=127}var Wt=$t,Rr=-1;function vp(e){this.tokens=[].slice.call(e),this.tokens.reverse()}vp.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():Rr},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 Jr=-1;function Br(e,r){if(e)throw TypeError("Decoder error");return r||65533}function oi(e){throw TypeError("The code point "+e+" could not be encoded.")}function G4(){}G4.prototype={handler:function(e,r){}};function K4(){}K4.prototype={handler:function(e,r){}};function gp(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(bp,e)?bp[e]:null}var ng=[{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"}],bp={};ng.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(a){bp[a]=r})})});var Ft={},qt={};function Ro(e,r){return r&&r[e]||null}function Bo(e,r){var a=r.indexOf(e);return a===-1?null:a}function yt(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 Y4(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,a=0,i=yt("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[0]<=e)r=n[0],a=n[1];else break}return a+e-r}function Q4(e){if(e===59335)return 7457;var r=0,a=0,i=yt("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[1]<=e)r=n[1],a=n[0];else break}return a+e-r}function X4(e){yp=yp||yt("jis0208").map(function(a,i){return jr(i,8272,8835)?null:a});var r=yp;return r.indexOf(e)}var yp;function J4(e){xp=xp||yt("big5").map(function(a,i){return i<(161-129)*157?null:a});var r=xp;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):Bo(e,r)}var xp,og="utf-8";function io(e,r){if(!(this instanceof io))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):og,r=Rc(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var a=gp(e);if(a===null||a.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!qt[a.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var i=this;return i._encoding=a,Boolean(r.fatal)&&(i._error_mode="fatal"),Boolean(r.ignoreBOM)&&(i._ignoreBOM=!0),Object.defineProperty||(this.encoding=i._encoding.name.toLowerCase(),this.fatal=i._error_mode==="fatal",this.ignoreBOM=i._ignoreBOM),i}Object.defineProperty&&(Object.defineProperty(io.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(io.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(io.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));io.prototype.decode=function(r,a){var i;typeof r=="object"&&r instanceof ArrayBuffer?i=new Uint8Array(r):typeof r=="object"&&"buffer"in r&&r.buffer instanceof ArrayBuffer?i=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):i=new Uint8Array(0),a=Rc(a),this._do_not_flush||(this._decoder=qt[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(a.stream);for(var t=new vp(i),n=[],o;;){var s=t.read();if(s===Rr||(o=this._decoder.handler(t,s),o===Jr))break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}if(!this._do_not_flush){do{if(o=this._decoder.handler(t,t.read()),o===Jr)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!t.endOfStream());this._decoder=null}function u(f){return V4(["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)),W4(f)}return u.call(this,n)};function Qs(e,r){if(!(this instanceof Qs))throw TypeError("Called as a function. Did you forget 'new'?");r=Rc(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var a=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):og;var i=gp(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Ft[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");a._encoding=i}else a._encoding=gp("utf-8"),e!==void 0&&"console"in global&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=a._encoding.name.toLowerCase()),a}Object.defineProperty&&Object.defineProperty(Qs.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});Qs.prototype.encode=function(r,a){r=r===void 0?"":String(r),a=Rc(a),this._do_not_flush||(this._encoder=Ft[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(a.stream);for(var i=new vp($4(r)),t=[],n;;){var o=i.read();if(o===Rr||(n=this._encoder.handler(i,o),n===Jr))break;Array.isArray(n)?t.push.apply(t,n):t.push(n)}if(!this._do_not_flush){for(;n=this._encoder.handler(i,i.read()),n!==Jr;)Array.isArray(n)?t.push.apply(t,n):t.push(n);this._encoder=null}return new Uint8Array(t)};function Z4(e){var r=e.fatal,a=0,i=0,t=0,n=128,o=191;this.handler=function(s,u){if(u===Rr&&t!==0)return t=0,Br(r);if(u===Rr)return Jr;if(t===0){if(jr(u,0,127))return u;if(jr(u,194,223))t=1,a=u&31;else if(jr(u,224,239))u===224&&(n=160),u===237&&(o=159),t=2,a=u&15;else if(jr(u,240,244))u===240&&(n=144),u===244&&(o=143),t=3,a=u&7;else return Br(r);return null}if(!jr(u,n,o))return a=t=i=0,n=128,o=191,s.prepend(u),Br(r);if(n=128,o=191,a=a<<6|u&63,i+=1,i!==t)return null;var f=a;return a=t=i=0,f}}function eE(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Jr;if(Wt(i))return i;var t,n;jr(i,128,2047)?(t=1,n=192):jr(i,2048,65535)?(t=2,n=224):jr(i,65536,1114111)&&(t=3,n=240);for(var o=[(i>>6*t)+n];t>0;){var s=i>>6*(t-1);o.push(128|s&63),t-=1}return o}}Ft["UTF-8"]=function(e){return new eE(e)};qt["UTF-8"]=function(e){return new Z4(e)};function rE(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Rr)return Jr;if($t(t))return t;var n=e[t-128];return n===null?Br(a):n}}function aE(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Rr)return Jr;if(Wt(t))return t;var n=Bo(t,e);return n===null&&oi(t),n+128}}(function(){"encoding-indexes"in global&&ng.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var a=r.name,i=yt(a.toLowerCase());qt[a]=function(t){return new rE(i,t)},Ft[a]=function(t){return new aE(i,t)}})})})();qt.GBK=function(e){return new sg(e)};Ft.GBK=function(e){return new ug(e,!0)};function sg(e){var r=e.fatal,a=0,i=0,t=0;this.handler=function(n,o){if(o===Rr&&a===0&&i===0&&t===0)return Jr;o===Rr&&(a!==0||i!==0||t!==0)&&(a=0,i=0,t=0,Br(r));var s;if(t!==0){s=null,jr(o,48,57)&&(s=Y4((((a-129)*10+i-48)*126+t-129)*10+o-48));var u=[i,t,o];return a=0,i=0,t=0,s===null?(n.prepend(u),Br(r)):s}if(i!==0)return jr(o,129,254)?(t=o,null):(n.prepend([i,o]),a=0,i=0,Br(r));if(a!==0){if(jr(o,48,57))return i=o,null;var f=a,p=null;a=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:Ro(p,yt("gb18030")),s===null&&$t(o)&&n.prepend(o),s===null?Br(r):s}return $t(o)?o:o===128?8364:jr(o,129,254)?(a=o,null):Br(r)}}function ug(e,r){var a=e.fatal;this.handler=function(i,t){if(t===Rr)return Jr;if(Wt(t))return t;if(t===58853)return oi(t);if(r&&t===8364)return 128;var n=Bo(t,yt("gb18030"));if(n!==null){var o=Ki(n/190)+129,s=n%190,u=s<63?64:65;return[o,s+u]}if(r)return oi(t);n=Q4(t);var f=Ki(n/10/126/10);n=n-f*10*126*10;var p=Ki(n/10/126);n=n-p*10*126;var m=Ki(n/10),d=n-m*10;return[f+129,p+48,m+129,d+48]}}Ft.gb18030=function(e){return new ug(e)};qt.gb18030=function(e){return new sg(e)};function tE(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Rr&&a!==0)return a=0,Br(r);if(t===Rr&&a===0)return Jr;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:98;switch((jr(t,64,126)||jr(t,161,254))&&(o=(n-129)*157+(t-s)),o){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var u=o===null?null:Ro(o,yt("big5"));return u===null&&$t(t)&&i.prepend(t),u===null?Br(r):u}return $t(t)?t:jr(t,129,254)?(a=t,null):Br(r)}}function iE(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Jr;if(Wt(i))return i;var t=J4(i);if(t===null)return oi(i);var n=Ki(t/157)+129;if(n<161)return oi(i);var o=t%157,s=o<63?64:98;return[n,o+s]}}Ft.Big5=function(e){return new iE(e)};qt.Big5=function(e){return new tE(e)};function nE(e){var r=e.fatal,a=!1,i=0;this.handler=function(t,n){if(n===Rr&&i!==0)return i=0,Br(r);if(n===Rr&&i===0)return Jr;if(i===142&&jr(n,161,223))return i=0,65377-161+n;if(i===143&&jr(n,161,254))return a=!0,i=n,null;if(i!==0){var o=i;i=0;var s=null;return jr(o,161,254)&&jr(n,161,254)&&(s=Ro((o-161)*94+(n-161),yt(a?"jis0212":"jis0208"))),a=!1,jr(n,161,254)||t.prepend(n),s===null?Br(r):s}return $t(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):Br(r)}}function oE(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Jr;if(Wt(i))return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return[142,i-65377+161];i===8722&&(i=65293);var t=Bo(i,yt("jis0208"));if(t===null)return oi(i);var n=Ki(t/94)+161,o=t%94+161;return[n,o]}}Ft["EUC-JP"]=function(e){return new oE(e)};qt["EUC-JP"]=function(e){return new nE(e)};function sE(e){var r=e.fatal,a={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=a.ASCII,t=a.ASCII,n=0,o=!1;this.handler=function(s,u){switch(i){default:case a.ASCII:return u===27?(i=a.EscapeStart,null):jr(u,0,127)&&u!==14&&u!==15&&u!==27?(o=!1,u):u===Rr?Jr:(o=!1,Br(r));case a.Roman:return u===27?(i=a.EscapeStart,null):u===92?(o=!1,165):u===126?(o=!1,8254):jr(u,0,127)&&u!==14&&u!==15&&u!==27&&u!==92&&u!==126?(o=!1,u):u===Rr?Jr:(o=!1,Br(r));case a.Katakana:return u===27?(i=a.EscapeStart,null):jr(u,33,95)?(o=!1,65377-33+u):u===Rr?Jr:(o=!1,Br(r));case a.LeadByte:return u===27?(i=a.EscapeStart,null):jr(u,33,126)?(o=!1,n=u,i=a.TrailByte,null):u===Rr?Jr:(o=!1,Br(r));case a.TrailByte:if(u===27)return i=a.EscapeStart,Br(r);if(jr(u,33,126)){i=a.LeadByte;var f=(n-33)*94+u-33,p=Ro(f,yt("jis0208"));return p===null?Br(r):p}return u===Rr?(i=a.LeadByte,s.prepend(u),Br(r)):(i=a.LeadByte,Br(r));case a.EscapeStart:return u===36||u===40?(n=u,i=a.Escape,null):(s.prepend(u),o=!1,i=t,Br(r));case a.Escape:var m=n;n=0;var d=null;if(m===40&&u===66&&(d=a.ASCII),m===40&&u===74&&(d=a.Roman),m===40&&u===73&&(d=a.Katakana),m===36&&(u===64||u===66)&&(d=a.LeadByte),d!==null){i=i=d;var v=o;return o=!0,v?Br(r):null}return s.prepend([m,u]),o=!1,i=t,Br(r)}}}function uE(e){var r=e.fatal,a={ASCII:0,Roman:1,jis0208:2},i=a.ASCII;this.handler=function(t,n){if(n===Rr&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if(n===Rr&&i===a.ASCII)return Jr;if((i===a.ASCII||i===a.Roman)&&(n===14||n===15||n===27))return oi(65533);if(i===a.ASCII&&Wt(n))return n;if(i===a.Roman&&(Wt(n)&&n!==92&&n!==126||n==165||n==8254)){if(Wt(n))return n;if(n===165)return 92;if(n===8254)return 126}if(Wt(n)&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if((n===165||n===8254)&&i!==a.Roman)return t.prepend(n),i=a.Roman,[27,40,74];n===8722&&(n=65293);var o=Bo(n,yt("jis0208"));if(o===null)return oi(n);if(i!==a.jis0208)return t.prepend(n),i=a.jis0208,[27,36,66];var s=Ki(o/94)+33,u=o%94+33;return[s,u]}}Ft["ISO-2022-JP"]=function(e){return new uE(e)};qt["ISO-2022-JP"]=function(e){return new sE(e)};function cE(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Rr&&a!==0)return a=0,Br(r);if(t===Rr&&a===0)return Jr;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:65,u=n<160?129:193;if((jr(t,64,126)||jr(t,128,252))&&(o=(n-u)*188+t-s),jr(o,8836,10715))return 57344-8836+o;var f=o===null?null:Ro(o,yt("jis0208"));return f===null&&$t(t)&&i.prepend(t),f===null?Br(r):f}return $t(t)||t===128?t:jr(t,161,223)?65377-161+t:jr(t,129,159)||jr(t,224,252)?(a=t,null):Br(r)}}function lE(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Jr;if(Wt(i)||i===128)return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return i-65377+161;i===8722&&(i=65293);var t=X4(i);if(t===null)return oi(i);var n=Ki(t/188),o=n<31?129:193,s=t%188,u=s<63?64:65;return[n+o,s+u]}}Ft.Shift_JIS=function(e){return new lE(e)};qt.Shift_JIS=function(e){return new cE(e)};function fE(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Rr&&a!==0)return a=0,Br(r);if(t===Rr&&a===0)return Jr;if(a!==0){var n=a,o=null;a=0,jr(t,65,254)&&(o=(n-129)*190+(t-65));var s=o===null?null:Ro(o,yt("euc-kr"));return o===null&&$t(t)&&i.prepend(t),s===null?Br(r):s}return $t(t)?t:jr(t,129,254)?(a=t,null):Br(r)}}function pE(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Jr;if(Wt(i))return i;var t=Bo(i,yt("euc-kr"));if(t===null)return oi(i);var n=Ki(t/190)+129,o=t%190+65;return[n,o]}}Ft["EUC-KR"]=function(e){return new pE(e)};qt["EUC-KR"]=function(e){return new fE(e)};function Bc(e,r){var a=e>>8,i=e&255;return r?[a,i]:[i,a]}function cg(e,r){var a=r.fatal,i=null,t=null;this.handler=function(n,o){if(o===Rr&&(i!==null||t!==null))return Br(a);if(o===Rr&&i===null&&t===null)return Jr;if(i===null)return i=o,null;var s;if(e?s=(i<<8)+o:s=(o<<8)+i,i=null,t!==null){var u=t;return t=null,jr(s,56320,57343)?65536+(u-55296)*1024+(s-56320):(n.prepend(Bc(s,e)),Br(a))}return jr(s,55296,56319)?(t=s,null):jr(s,56320,57343)?Br(a):s}}function lg(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Rr)return Jr;if(jr(t,0,65535))return Bc(t,e);var n=Bc((t-65536>>10)+55296,e),o=Bc((t-65536&1023)+56320,e);return n.concat(o)}}Ft["UTF-16BE"]=function(e){return new lg(!0,e)};qt["UTF-16BE"]=function(e){return new cg(!0,e)};Ft["UTF-16LE"]=function(e){return new lg(!1,e)};qt["UTF-16LE"]=function(e){return new cg(!1,e)};function hE(e){var r=e.fatal;this.handler=function(a,i){return i===Rr?Jr:$t(i)?i:63360+i-128}}function dE(e){var r=e.fatal;this.handler=function(a,i){return i===Rr?Jr:Wt(i)?i:jr(i,63360,63487)?i-63360+128:oi(i)}}Ft["x-user-defined"]=function(e){return new dE(e)};qt["x-user-defined"]=function(e){return new hE(e)};var mE="rejected",vE="fulfilled";function fg(e){let r=e.map(a=>a.then(i=>({status:vE,value:i})).catch(i=>({status:mE,reason:i})));return Promise.all(r)}function Dc(e){return Buffer.from(e).toString("base64")}function wp(e){return Buffer.from(e,"base64").toString("ascii")}var si=class{constructor(r){this.map={},r instanceof si?r.forEach((a,i)=>this.append(i,a)):Array.isArray(r)?r.forEach(a=>this.append(a[0],a[1])):r&&Object.getOwnPropertyNames(r).forEach(a=>this.append(a,r[a]))}append(r,a){r=Xs(r),a=pg(a);let i=this.map[r];this.map[r]=i?`${i}, ${a}`:a}delete(r){delete this.map[Xs(r)]}get(r){return r=Xs(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(Xs(r))}set(r,a){this.map[Xs(r)]=pg(a)}forEach(r,a=null){for(let i in this.map)this.map.hasOwnProperty(i)&&(a?r.call(a,this.map[i],i,this):r(this.map[i],i,this))}keys(){let r=[];return this.forEach(function(a,i){r.push(i)}),kp(r)}values(){let r=[];return this.forEach(function(a){r.push(a)}),kp(r)}entries(){let r=[];return this.forEach(function(a,i){r.push([i,a])}),kp(r)}*[Symbol.iterator](){yield*this.entries()}};function Xs(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 pg(e){return typeof e!="string"&&(e=String(e)),e}function kp(e){let r={next(){let a=e.shift();return{done:a===void 0,value:a}}};return r[Symbol.iterator]=function(){return r},r}function Js(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var dg=Pt(require("fs")),mg=Pt(require("http")),vg=Pt(require("https")),zc=Pt(require("zlib"));var gE=e=>e&&e instanceof ArrayBuffer,bE=e=>e&&e instanceof Buffer;function hg(e){let r=e.indexOf(","),a,i;return e.slice(r-7,r)===";base64"?(a=Buffer.from(e.slice(r+1),"base64"),i=e.slice(5,r-7).trim()):(a=Buffer.from(decodeURIComponent(e.slice(r+1))),i=e.slice(5,r).trim()),i?i.startsWith(";")&&(i=`text/plain${i}`):i="text/plain;charset=US-ASCII",{arrayBuffer:_p(a),mimeType:i}}function _p(e){if(gE(e))return e;if(bE(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 yE(e){return e.startsWith("http:")||e.startsWith("https:")}async function gg(e,r){if(!yE(e)){let a=e.split("?")[0];return await new Promise((i,t)=>{let n=dg.default.createReadStream(a,{encoding:null});n.once("readable",()=>i(n)),n.on("error",o=>t(o))})}return await new Promise((a,i)=>{let t=e.startsWith("https:")?vg.default.request:mg.default.request,n=xE(e,r),o=t(n,s=>a(s));o.on("error",s=>i(s)),o.end()})}function bg(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(zc.default.createBrotliDecompress());case"gzip":return e.pipe(zc.default.createGunzip());case"deflate":return e.pipe(zc.default.createDeflate());default:return e}}async function yg(e){let r=[];return await new Promise((a,i)=>{e.on("error",t=>i(t)),e.on("readable",()=>e.read()),e.on("data",t=>{typeof t=="string"&&i(new Error("Read stream not binary")),r.push(_p(t))}),e.on("end",()=>{let t=wE(r);a(t)})})}function xE(e,r){let a=(r==null?void 0:r.headers)||{},i={};for(let n of Object.keys(a))i[n.toLowerCase()]=a[n];i["accept-encoding"]=i["accept-encoding"]||"gzip,br,deflate";let t=new URL(e);return $f($i($i({hostname:t.hostname,path:t.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:i,port:t.port})}function wE(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),a=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(a),t=0;for(let n of r)i.set(n,t),t+=n.byteLength;return i.buffer}var Ep=Pt(require("stream")),kE=e=>typeof e=="boolean",xg=e=>typeof e=="function",_E=e=>e!==null&&typeof e=="object",jp=e=>_E(e)&&xg(e.read)&&xg(e.pipe)&&kE(e.readable),Yi=class{constructor(r,a){this.bodyUsed=!1;let{headers:i,status:t=200,statusText:n="OK",url:o}=a||{};this.url=o,this.ok=t===200,this.status=t,this.statusText=n,this.headers=new si((a==null?void 0:a.headers)||{}),jp(r)?this._body=bg(r,i):typeof r=="string"?this._body=Ep.Readable.from([new TextEncoder().encode(r)]):this._body=Ep.Readable.from([r||new ArrayBuffer(0)])}get body(){return Js(!this.bodyUsed),Js(jp(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return jp(this._body)?await yg(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 wg=Pt(require("fs"));var kg=e=>e.startsWith("data:"),jE=e=>e.startsWith("http:")||e.startsWith("https:");async function Do(e,r){try{if(kg(e)){let{arrayBuffer:f,mimeType:p}=hg(e);return new Yi(f,{headers:{"content-type":p},url:e})}let a={},i=e;e.endsWith(".gz")&&(e=e.slice(0,-3),a["content-encoding"]="gzip");let t=await gg(i,r),n=AE(e,t,a),{status:o,statusText:s}=SE(t),u=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&u){let f=EE(e,n.get("location"));return await Do(f,r)}return new Yi(t,{headers:n,status:o,statusText:s,url:e})}catch(a){return new Yi(null,{status:400,statusText:String(a),url:e})}}function EE(e,r){if(r.startsWith("http"))return r;let a=new URL(e);return a.pathname=r,a.href}function SE(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function AE(e,r,a={}){let i={};if(r&&r.headers){let t=r.headers;for(let n in t){let o=t[n];i[n.toLowerCase()]=String(o)}}if(!i["content-length"]){let t=PE(e);Number.isFinite(t)&&(i["content-length"]=t)}return Object.assign(i,a),new si(i)}function PE(e){if(jE(e))return null;if(kg(e))return e.length-"data:".length;try{let r=e.split("?")[0];return wg.default.statSync(r).size}catch{}return null}var yy=Pt(gy()),xy=Pt(ou());function by(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function $7(e,r){let a=r.type?r.type.replace("image/",""):"jpeg",i=(0,xy.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,yy.default)(i,a,r)}function xh(e,r){let a=$7(e,r);return new Promise(i=>{let t=[];a.on("data",n=>t.push(n)),a.on("end",()=>{let n=Buffer.concat(t);i(by(n))})})}var i8=Pt(t8());var n8=Pt(require("util"));async function jv(e,r){Js(r,"MIMEType is required to parse image under Node.js");let a=n8.default.promisify(i8.default),i=e instanceof Buffer?e:Buffer.from(e),t=await a(i,r),n=[...t.shape],o=t.shape.length===4?t.shape.shift():1;return{shape:n,data:t.data,width:t.shape[0],height:t.shape[1],components:t.shape[2],layers:o}}var u8=Pt(s8());delete global.ReadableStream;var ec=class extends u8.ReadableStream{};var Ev=class{constructor(r){this.isWorking=!1;this.isCancelled=!1;this.chunks=r}start(r){this.work(r)}async work(r){let{chunks:a}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let i;try{i=a.next()}catch(t){r.error(t);break}i&&(!i.done&&!this.isCancelled?r.enqueue(i.value):r.close())}this.isWorking=!1}pull(r){this.isWorking||this.work(r)}cancel(){this.isCancelled=!0}};var Sv=class extends ec{constructor(r){super(new Ev(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let a=this.getReader();yield*this._chunks,a.releaseLock()}};var $n=class{constructor(r=[],a={}){this.parts=[],this.size=0;for(let i of r)if(typeof i=="string"){let t=new TextEncoder().encode(i);this.parts.push(t),this.size+=t.byteLength}else if(i instanceof $n)this.size+=i.size,this.parts.push(...i.parts);else if(i instanceof ArrayBuffer)this.parts.push(new Uint8Array(i)),this.size+=i.byteLength;else if(i instanceof Uint8Array)this.parts.push(i),this.size+=i.byteLength;else if(ArrayBuffer.isView(i)){let{buffer:t,byteOffset:n,byteLength:o}=i;this.parts.push(new Uint8Array(t,n,o)),this.size+=o}else{let t=new TextEncoder().encode(String(i));this.parts.push(t),this.size+=t.byteLength}this.type=$z(a.type)}slice(r=0,a=this.size,i=""){let{size:t,parts:n}=this,o=r<0?Math.max(t+r,0):Math.min(r,t),s=a<0?Math.max(t+a,0):Math.min(a,t),u=Math.max(s-o,0),f=new $n([],{type:i});if(u===0)return f;let p=0,m=[];for(let d of n){let{byteLength:v}=d;if(o>0&&v<=o)o-=v,s-=v;else{let x=d.subarray(o,Math.min(v,s));if(m.push(x),p+=x.byteLength,o=0,p>=u)break}}return f.parts=m,f.size=p,f}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,a="";for(let i of this.parts)a+=r.decode(i);return a}stream(){return new Sv(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),a=new Uint8Array(r),i=0;for(let t of this.parts)a.set(t,i),i+=t.byteLength;return r}};function $z(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var Av=class extends $n{constructor(r,a,i={}){super(r,i);this.name="";this.webkitRelativePath="";this.name=String(a).replace(/\//g,":"),this.lastModified=(i==null?void 0:i.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};var Gz=!ni||!("TextEncoder"in ja);Gz&&(ja.TextEncoder=Qs);var Kz=!ni||!("TextDecoder"in ja);Kz&&(ja.TextDecoder=io);!ni&&!("atob"in ja)&&Dc&&(ja.atob=Dc);!ni&&!("btoa"in ja)&&wp&&(ja.btoa=wp);!ni&&!("Headers"in ja)&&si&&(ja.Headers=si);!ni&&!("Response"in ja)&&Yi&&(ja.Response=Yi);!ni&&!("fetch"in ja)&&Do&&(ja.fetch=Do);!ni&&!("DOMParser"in ja)&&Pv.DOMParser&&(ja.DOMParser=Pv.DOMParser);!ni&&!("_encodeImageNode"in ja)&&xh&&(ja._encodeImageNode=xh);!ni&&!("_parseImageNode"in ja)&&jv&&(ja._parseImageNode=jv);"allSettled"in Promise||(Promise.allSettled=fg);var c8={POSITION:"POSITION",NORMAL:"NORMAL",COLOR_0:"COLOR",TEXCOORD_0:"TEX_COORD"},Yz=()=>{},If=class{constructor(r){this.draco=r,this.dracoEncoder=new this.draco.Encoder,this.dracoMeshBuilder=new this.draco.MeshBuilder,this.dracoMetadataBuilder=new this.draco.MetadataBuilder}destroy(){this.destroyEncodedObject(this.dracoMeshBuilder),this.destroyEncodedObject(this.dracoEncoder),this.destroyEncodedObject(this.dracoMetadataBuilder),this.dracoMeshBuilder=null,this.dracoEncoder=null,this.draco=null}destroyEncodedObject(r){r&&this.draco.destroy(r)}encodeSync(r,a={}){return this.log=Yz,this._setOptions(a),a.pointcloud?this._encodePointCloud(r,a):this._encodeMesh(r,a)}_getAttributesFromMesh(r){let a=$i($i({},r),r.attributes);return r.indices&&(a.indices=r.indices),a}_encodePointCloud(r,a){let i=new this.draco.PointCloud;a.metadata&&this._addGeometryMetadata(i,a.metadata);let t=this._getAttributesFromMesh(r);this._createDracoPointCloud(i,t,a);let n=new this.draco.DracoInt8Array;try{let o=this.dracoEncoder.EncodePointCloudToDracoBuffer(i,!1,n);if(!(o>0))throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${i.num_points()} points
95
+ `,m.message,m.stack);var d=new Error("tunneling socket could not be established, cause="+m.message);d.code="ECONNRESET",r.request.emit("error",d),i.removeSocket(t)}};Ui.prototype.removeSocket=function(r){var a=this.sockets.indexOf(r);if(a!==-1){this.sockets.splice(a,1);var i=this.requests.shift();i&&this.createConnection(i)}};function Pj(e,r){var a=this;Ui.prototype.createSocket.call(a,e,function(i){var t=ND.connect(0,Tj({},a.options,{servername:e.host,socket:i}));a.sockets[a.sockets.indexOf(i)]=t,r(t)})}function Tj(e){for(var r=1,a=arguments.length;r<a;++r){var i=arguments[r];if(typeof i=="object")for(var t=Object.keys(i),n=0,o=t.length;n<o;++n){var s=t[n];i[s]!==void 0&&(e[s]=i[s])}}return e}var ko;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?ko=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)}:ko=function(){};Ss.debug=ko});var Oj=B(Ij=>{"use strict";var YD=require("url"),QD=Cj(),Fj=["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"],qj=["proxy-authorization"];function XD(e){var r=e.port,a=e.protocol,i=e.hostname+":";return r?i+=r:a==="https:"?i+="443":i+="80",i}function JD(e,r){var a=r.reduce(function(i,t){return i[t.toLowerCase()]=!0,i},{});return Object.keys(e).filter(function(i){return a[i.toLowerCase()]}).reduce(function(i,t){return i[t]=e[t],i},{})}function ZD(e,r){var a=e.proxy,i={proxy:{host:a.hostname,port:+a.port,proxyAuth:a.auth,headers:r},headers:e.headers,ca:e.ca,cert:e.cert,key:e.key,passphrase:e.passphrase,pfx:e.pfx,ciphers:e.ciphers,rejectUnauthorized:e.rejectUnauthorized,secureOptions:e.secureOptions,secureProtocol:e.secureProtocol};return i}function ez(e,r){var a=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[a,i].join("Over")}function rz(e){var r=e.uri,a=e.proxy,i=ez(r,a);return QD[i]}function Ku(e){this.request=e,this.proxyHeaderWhiteList=Fj,this.proxyHeaderExclusiveList=[],typeof e.tunnel!="undefined"&&(this.tunnelOverride=e.tunnel)}Ku.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride!="undefined"?e.tunnelOverride:r.uri.protocol==="https:"};Ku.prototype.setup=function(e){var r=this,a=r.request;if(e=e||{},typeof a.proxy=="string"&&(a.proxy=YD.parse(a.proxy)),!a.proxy||!a.tunnel)return!1;e.proxyHeaderWhiteList&&(r.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(r.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=r.proxyHeaderExclusiveList.concat(qj),t=r.proxyHeaderWhiteList.concat(i),n=JD(a.headers,t);n.host=XD(a.uri),i.forEach(a.removeHeader,a);var o=rz(a),s=ZD(a,n);return a.agent=o(s),!0};Ku.defaultProxyHeaderWhiteList=Fj;Ku.defaultProxyHeaderExclusiveList=qj;Ij.Tunnel=Ku});var Bj=B((Rj,Yu)=>{(function(){var e,r,a,i,t,n;typeof performance!="undefined"&&performance!==null&&performance.now?Yu.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(Yu.exports=function(){return(e()-t)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},i=e(),n=process.uptime()*1e9,t=i-n):Date.now?(Yu.exports=function(){return Date.now()-a},a=Date.now()):(Yu.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(Rj)});var Gj=B((U$,Wj)=>{"use strict";var az=require("http"),Dj=require("https"),Qu=require("url"),xv=require("util"),Pf=require("stream"),Tf=require("zlib"),wv=_2(),tz=I2(),iz=k_(),nz=ef(),zj=rf(),Lj=F_(),oz=n3(),sz=Zc(),Nj=zm(),uz=f3().strict,As=il(),cz=Yh(),lz=d3(),fz=S3().Querystring,pz=ej().Har,hz=cj().Auth,dz=xj().OAuth,mz=wj(),vz=_j().Multipart,gz=Sj().Redirect,kv=Oj().Tunnel,Ps=Bj(),Xu=Yo().Buffer,Mj=As.safeStringify,bz=As.isReadStream,yz=As.toBase64,xz=As.defer,Uj=As.copy,wz=As.version,Hj=cz.jar(),Vj={};function kz(e,r){var a={};for(var i in r){var t=e.indexOf(i)===-1;t&&(a[i]=r[i])}return a}function _z(e,r){var a={};for(var i in r){var t=e.indexOf(i)!==-1,n=typeof r[i]=="function";t&&n||(a[i]=r[i])}return a}function $j(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function jz(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:$j.call(e.request)}}function Ir(e){var r=this;e.har&&(r._har=new pz(r),e=r._har.options(e)),Pf.Stream.call(r);var a=Object.keys(Ir.prototype),i=kz(a,e);sz(r,i),e=_z(a,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new fz(r),r._auth=new hz(r),r._oauth=new dz(r),r._multipart=new vz(r),r._redirect=new gz(r),r._tunnel=new kv(r),r.init(e)}xv.inherits(Ir,Pf.Stream);Ir.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function rt(){Ir.debug&&console.error("REQUEST %s",xv.format.apply(xv,arguments))}Ir.prototype.debug=rt;Ir.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?Uj(r.headers):{};for(var a in r.headers)typeof r.headers[a]=="undefined"&&delete r.headers[a];if(zj.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),rt(e),!r.pool&&r.pool!==!1&&(r.pool=Vj),r.dests=r.dests||[],r.__isRequestRequest=!0,!r._callback&&r.callback&&(r._callback=r.callback,r.callback=function(){r._callbackCalled||(r._callbackCalled=!0,r._callback.apply(r,arguments))},r.on("error",r.callback.bind()),r.on("complete",r.callback.bind(r,null))),!r.uri&&r.url&&(r.uri=r.url,delete r.url),r.baseUrl){if(typeof r.baseUrl!="string")return r.emit("error",new Error("options.baseUrl must be a string"));if(typeof r.uri!="string")return r.emit("error",new Error("options.uri must be a string when using options.baseUrl"));if(r.uri.indexOf("//")===0||r.uri.indexOf("://")!==-1)return r.emit("error",new Error("options.uri must be a path when using options.baseUrl"));var i=r.baseUrl.lastIndexOf("/")===r.baseUrl.length-1,t=r.uri.indexOf("/")===0;i&&t?r.uri=r.baseUrl+r.uri.slice(1):i||t?r.uri=r.baseUrl+r.uri:r.uri===""?r.uri=r.baseUrl:r.uri=r.baseUrl+"/"+r.uri,delete r.baseUrl}if(!r.uri)return r.emit("error",new Error("options.uri is a required argument"));if(typeof r.uri=="string"&&(r.uri=Qu.parse(r.uri)),r.uri.href||(r.uri.href=Qu.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=Qu.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=lz(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 u=e.formData,f=r.form(),p=function(I,R){R&&R.hasOwnProperty("value")&&R.hasOwnProperty("options")?f.append(I,R.value,R.options):f.append(I,R)};for(var m in u)if(u.hasOwnProperty(m)){var d=u[m];if(d instanceof Array)for(var v=0;v<d.length;v++)p(m,d[v]);else p(m,d)}}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 x=r.uri.auth.split(":").map(function(I){return r._qs.unescape(I)});r.auth(x[0],x.slice(1).join(":"),!0)}if(!r.tunnel&&r.proxy&&r.proxy.auth&&!r.hasHeader("proxy-authorization")){var E=r.proxy.auth.split(":").map(function(I){return r._qs.unescape(I)}),b="Basic "+yz(E.join(":"));r.setHeader("proxy-authorization",b)}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 w(){if(uz(r.body)&&(r.body=Xu.from(r.body)),!r.hasHeader("content-length")){var I;typeof r.body=="string"?I=Xu.byteLength(r.body):Array.isArray(r.body)?I=r.body.reduce(function(R,$){return R+$.length},0):I=r.body.length,I?r.setHeader("content-length",I):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!Nj(r.body)&&w(),e.oauth?r.oauth(e.oauth):r._oauth.params&&r.hasHeader("authorization")&&r.oauth(r._oauth.params);var P=r.proxy&&!r.tunnel?r.proxy.protocol:r.uri.protocol,T={"http:":az,"https:":Dj},O=r.httpModules||{};if(r.httpModule=O[P]||T[P],!r.httpModule)return r.emit("error",new Error("Invalid protocol: "+P));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 D=wz();D.major===0&&D.minor<=10?r.agentClass=P==="http:"?Lj:Lj.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(I){if(r.ntick&&r._started&&r.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),r.src=I,bz(I))r.hasHeader("content-type")||r.setHeader("content-type",nz.lookup(I.path));else{if(I.headers)for(var R in I.headers)r.hasHeader(R)||r.setHeader(R,I.headers[R]);r._json&&!r.hasHeader("content-type")&&r.setHeader("content-type","application/json"),I.method&&!r.explicitMethod&&(r.method=I.method)}}),xz(function(){if(!r._aborted){var I=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)Nj(r.body)?r.body.pipe(r):(w(),Array.isArray(r.body)?r.body.forEach(function(R){r.write(R)}):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(R,$){!R&&!isNaN($)&&r.setHeader("content-length",$),I()})):I(),r.ntick=!0}})};Ir.prototype.getNewAgent=function(){var e=this,r=e.agentClass,a={};if(e.agentOptions)for(var i in e.agentOptions)a[i]=e.agentOptions[i];e.ca&&(a.ca=e.ca),e.ciphers&&(a.ciphers=e.ciphers),e.secureProtocol&&(a.secureProtocol=e.secureProtocol),e.secureOptions&&(a.secureOptions=e.secureOptions),typeof e.rejectUnauthorized!="undefined"&&(a.rejectUnauthorized=e.rejectUnauthorized),e.cert&&e.key&&(a.key=e.key,a.cert=e.cert),e.pfx&&(a.pfx=e.pfx),e.passphrase&&(a.passphrase=e.passphrase);var t="";r!==e.httpModule.Agent&&(t+=r.name);var n=e.proxy;typeof n=="string"&&(n=Qu.parse(n));var o=n&&n.protocol==="https:"||this.uri.protocol==="https:";return o&&(a.ca&&(t&&(t+=":"),t+=a.ca),typeof a.rejectUnauthorized!="undefined"&&(t&&(t+=":"),t+=a.rejectUnauthorized),a.cert&&(t&&(t+=":"),t+=a.cert.toString("ascii")+a.key.toString("ascii")),a.pfx&&(t&&(t+=":"),t+=a.pfx.toString("ascii")),a.ciphers&&(t&&(t+=":"),t+=a.ciphers),a.secureProtocol&&(t&&(t+=":"),t+=a.secureProtocol),a.secureOptions&&(t&&(t+=":"),t+=a.secureOptions)),e.pool===Vj&&!t&&Object.keys(a).length===0&&e.httpModule.globalAgent?e.httpModule.globalAgent:(t=e.uri.protocol+t,e.pool[t]||(e.pool[t]=new r(a),e.pool.maxSockets&&(e.pool[t].maxSockets=e.pool.maxSockets)),e.pool[t])};Ir.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),a=Ps();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=Uj(e);delete i.auth,rt("make request",e.uri.href),delete i.timeout;try{e.req=e.httpModule.request(i)}catch(n){e.emit("error",n);return}e.timing&&(e.startTime=r,e.startTimeNow=a,e.timings={});var t;e.timeout&&!e.timeoutTimer&&(e.timeout<0?t=0:typeof e.timeout=="number"&&isFinite(e.timeout)&&(t=e.timeout)),e.req.on("response",e.onRequestResponse.bind(e)),e.req.on("error",e.onRequestError.bind(e)),e.req.on("drain",function(){e.emit("drain")}),e.req.on("socket",function(n){var o=n._connecting||n.connecting;if(e.timing&&(e.timings.socket=Ps()-e.startTimeNow,o)){var s=function(){e.timings.lookup=Ps()-e.startTimeNow},u=function(){e.timings.connect=Ps()-e.startTimeNow};n.once("lookup",s),n.once("connect",u),e.req.once("error",function(){n.removeListener("lookup",s),n.removeListener("connect",u)})}var f=function(){e.req.setTimeout(t,function(){if(e.req){e.abort();var m=new Error("ESOCKETTIMEDOUT");m.code="ESOCKETTIMEDOUT",m.connect=!1,e.emit("error",m)}})};if(t!==void 0)if(o){var 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)},t)}else f();e.emit("socket",n)}),e.emit("request",e.req)}};Ir.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)}};Ir.prototype.onRequestResponse=function(e){var r=this;if(r.timing&&(r.timings.response=Ps()-r.startTimeNow),rt("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=Ps()-r.startTimeNow,e.timingStart=r.startTime,r.timings.socket||(r.timings.socket=0),r.timings.lookup||(r.timings.lookup=r.timings.socket),r.timings.connect||(r.timings.connect=r.timings.lookup),r.timings.response||(r.timings.response=r.timings.connect),rt("elapsed time",r.timings.end),r.elapsedTime+=Math.round(r.timings.end),e.elapsedTime=r.elapsedTime,e.timings=r.timings,e.timingPhases={wait:r.timings.socket,dns:r.timings.lookup-r.timings.socket,tcp:r.timings.connect-r.timings.lookup,firstByte:r.timings.response-r.timings.connect,download:r.timings.end-r.timings.response,total:r.timings.end}),rt("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){rt("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=jz,r.httpModule===Dj&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){rt("strict ssl error",r.uri.href);var a=e.hasOwnProperty("socket")?e.socket.authorizationError:r.uri.href+" does not support SSL";r.emit("error",new Error("SSL Error: "+a));return}r.originalHost=r.getHeader("host"),r.originalHostHeaderName||(r.originalHostHeaderName=r.hasHeader("host")),r.setHost&&r.removeHeader("host"),r.clearTimeout();var i=r._jar&&r._jar.setCookie?r._jar:Hj,t=function(p){try{i.setCookie(p,r.uri.href,{ignoreError:!0})}catch(m){r.emit("error",m)}};if(e.caseless=zj(e.headers),e.caseless.has("set-cookie")&&!r._disableCookies){var n=e.caseless.has("set-cookie");Array.isArray(e.headers[n])?e.headers[n].forEach(t):t(e.headers[n])}if(!r._redirect.onResponse(e)){{e.on("close",function(){r._ended||r.response.emit("end")}),e.once("end",function(){r._ended=!0});var o=function(p){return r.method==="HEAD"||p>=100&&p<200||p===204||p===304},s;if(r.gzip&&!o(e.statusCode)){var u=e.headers["content-encoding"]||"identity";u=u.trim().toLowerCase();var f={flush:Tf.Z_SYNC_FLUSH,finishFlush:Tf.Z_SYNC_FLUSH};u==="gzip"?(s=Tf.createGunzip(f),e.pipe(s)):u==="deflate"?(s=Tf.createInflate(f),e.pipe(s)):(u!=="identity"&&rt("ignoring unrecognized Content-Encoding "+u),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){rt("aborted",r.uri.href);return}r.emit("complete",e)})}rt("finish init function",r.uri.href)}};Ir.prototype.readResponseBody=function(e){var r=this;rt("reading response's body");var a=[],i=0,t=[];r.on("data",function(n){Xu.isBuffer(n)?n.length&&(i+=n.length,a.push(n)):t.push(n)}),r.on("end",function(){if(rt("end event",r.uri.href),r._aborted){rt("aborted",r.uri.href),a=[],i=0;return}if(i?(rt("has body",r.uri.href,i),e.body=Xu.concat(a,i),r.encoding!==null&&(e.body=e.body.toString(r.encoding)),a=[],i=0):t.length&&(r.encoding==="utf8"&&t[0].length>0&&t[0][0]==="\uFEFF"&&(t[0]=t[0].substring(1)),e.body=t.join("")),r._json)try{e.body=JSON.parse(e.body,r._jsonReviver)}catch{rt("invalid JSON received",r.uri.href)}rt("emitting complete",r.uri.href),typeof e.body=="undefined"&&!r._json&&(e.body=r.encoding===null?Xu.alloc(0):""),r.emit("complete",e,e.body)})};Ir.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.clearTimeout(),e.emit("abort")};Ir.prototype.pipeDest=function(e){var r=this,a=r.response;if(e.headers&&!e.headersSent){if(a.caseless.has("content-type")){var i=a.caseless.has("content-type");e.setHeader?e.setHeader(i,a.headers[i]):e.headers[i]=a.headers[i]}if(a.caseless.has("content-length")){var t=a.caseless.has("content-length");e.setHeader?e.setHeader(t,a.headers[t]):e.headers[t]=a.headers[t]}}if(e.setHeader&&!e.headersSent){for(var n in a.headers)(!r.gzip||n!=="content-encoding")&&e.setHeader(n,a.headers[n]);e.statusCode=a.statusCode}r.pipefilter&&r.pipefilter(a,e)};Ir.prototype.qs=function(e,r){var a=this,i;!r&&a.uri.query?i=a._qs.parse(a.uri.query):i={};for(var t in e)i[t]=e[t];var n=a._qs.stringify(i);return n===""||(a.uri=Qu.parse(a.uri.href.split("?")[0]+"?"+n),a.url=a.uri,a.path=a.uri.path,a.uri.host==="unix"&&a.enableUnixSocket()),a};Ir.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 oz,r._form.on("error",function(a){a.message="form-data: "+a.message,r.emit("error",a),r.abort()}),r._form)};Ir.prototype.multipart=function(e){var r=this;return r._multipart.onRequest(e),r._multipart.chunked||(r.body=r._multipart.body),r};Ir.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=Mj(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=Mj(e,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")),typeof r.jsonReviver=="function"&&(r._jsonReviver=r.jsonReviver),r};Ir.prototype.getHeader=function(e,r){var a=this,i,t,n;return r||(r=a.headers),Object.keys(r).forEach(function(o){o.length===e.length&&(t=new RegExp(e,"i"),n=o.match(t),n&&(i=r[o]))}),i};Ir.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),r=e[0],a=e[1];this.socketPath=r,this.uri.pathname=a,this.uri.path=a,this.uri.host=r,this.uri.hostname=r,this.uri.isUnix=!0};Ir.prototype.auth=function(e,r,a,i){var t=this;return t._auth.onRequest(e,r,a,i),t};Ir.prototype.aws=function(e,r){var a=this;if(!r)return a._aws=e,a;if(e.sign_version===4||e.sign_version==="4"){var i={host:a.uri.host,path:a.uri.path,method:a.method,headers:a.headers,body:a.body};e.service&&(i.service=e.service);var t=tz.sign(i,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});a.setHeader("authorization",t.headers.Authorization),a.setHeader("x-amz-date",t.headers["X-Amz-Date"]),t.headers["X-Amz-Security-Token"]&&a.setHeader("x-amz-security-token",t.headers["X-Amz-Security-Token"])}else{var n=new Date;a.setHeader("date",n.toUTCString());var o={key:e.key,secret:e.secret,verb:a.method.toUpperCase(),date:n,contentType:a.getHeader("content-type")||"",md5:a.getHeader("content-md5")||"",amazonHeaders:wv.canonicalizeHeaders(a.headers)},s=a.uri.path;e.bucket&&s?o.resource="/"+e.bucket+s:e.bucket&&!s?o.resource="/"+e.bucket:!e.bucket&&s?o.resource=s:!e.bucket&&!s&&(o.resource="/"),o.resource=wv.canonicalizeResource(o.resource),a.setHeader("authorization",wv.authorization(o))}return a};Ir.prototype.httpSignature=function(e){var r=this;return iz.signRequest({getHeader:function(a){return r.getHeader(a,r.headers)},setHeader:function(a,i){r.setHeader(a,i)},method:r.method,path:r.path},e),rt("httpSignature authorization",r.getHeader("authorization")),r};Ir.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",mz.header(r.uri,r.method,e))};Ir.prototype.oauth=function(e){var r=this;return r._oauth.onRequest(e),r};Ir.prototype.jar=function(e){var r=this,a;if(r._redirect.redirectsFollowed===0&&(r.originalCookieHeader=r.getHeader("cookie")),!e)a=!1,r._disableCookies=!0;else{var i=e.getCookieString?e:Hj,t=r.uri.href;i&&(a=i.getCookieString(t))}return a&&a.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+a):r.setHeader("cookie",a)),r._jar=e,r};Ir.prototype.pipe=function(e,r){var a=this;if(a.response)if(a._destdata)a.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(a._ended)a.emit("error",new Error("You cannot pipe after the response has been ended."));else return Pf.Stream.prototype.pipe.call(a,e,r),a.pipeDest(e),e;else return a.dests.push(e),Pf.Stream.prototype.pipe.call(a,e,r),e};Ir.prototype.write=function(){var e=this;if(!e._aborted&&(e._started||e.start(),e.req))return e.req.write.apply(e.req,arguments)};Ir.prototype.end=function(e){var r=this;r._aborted||(e&&r.write(e),r._started||r.start(),r.req&&r.req.end())};Ir.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0};Ir.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1};Ir.prototype.destroy=function(){var e=this;this.clearTimeout(),e._ended?e.response&&e.response.destroy():e.end()};Ir.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)};Ir.defaultProxyHeaderWhiteList=kv.defaultProxyHeaderWhiteList.slice();Ir.defaultProxyHeaderExclusiveList=kv.defaultProxyHeaderExclusiveList.slice();Ir.prototype.toJSON=$j;Wj.exports=Ir});var Qj=B((H$,Yj)=>{"use strict";var Ju=Zc(),Kj=Yh(),Ez=il(),Sz=Ez.paramsHaveRequestBody;function Cf(e,r,a){typeof r=="function"&&(a=r);var i={};return r!==null&&typeof r=="object"?Ju(i,r,{uri:e}):typeof e=="string"?Ju(i,{uri:e}):Ju(i,e),i.callback=a||i.callback,i}function Pa(e,r,a){if(typeof e=="undefined")throw new Error("undefined is not a valid uri or options object.");var i=Cf(e,r,a);if(i.method==="HEAD"&&Sz(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new Pa.Request(i)}function Vn(e){var r=e.toUpperCase();return function(a,i,t){var n=Cf(a,i,t);return n.method=r,Pa(n,n.callback)}}Pa.get=Vn("get");Pa.head=Vn("head");Pa.options=Vn("options");Pa.post=Vn("post");Pa.put=Vn("put");Pa.patch=Vn("patch");Pa.del=Vn("delete");Pa.delete=Vn("delete");Pa.jar=function(e){return Kj.jar(e)};Pa.cookie=function(e){return Kj.parse(e)};function _v(e,r,a,i){return function(t,n,o){var s=Cf(t,n,o),u={};return Ju(!0,u,r,s),u.pool=s.pool||r.pool,i&&(u.method=i.toUpperCase()),typeof a=="function"&&(e=a),e(u,u.callback)}}Pa.defaults=function(e,r){var a=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=_v(a,e,r),t=["get","head","post","put","patch","del","delete"];return t.forEach(function(n){i[n]=_v(a[n],e,r,n)}),i.cookie=_v(a.cookie,e,r),i.jar=a.jar,i.defaults=a.defaults,i};Pa.forever=function(e,r){var a={};return r&&Ju(a,r),e&&(a.agentOptions=e),a.forever=!0,Pa.defaults(a)};Yj.exports=Pa;Pa.Request=Gj();Pa.initParams=Cf;Object.defineProperty(Pa,"debug",{enumerable:!0,get:function(){return Pa.Request.debug},set:function(e){Pa.Request.debug=e}})});var Jj=B((V$,Xj)=>{Xj.exports=Az;function Az(e){if(!/^data\:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");var r=e.indexOf(",");if(r===-1||r<=4)throw new TypeError("malformed data: URI");for(var a=e.substring(5,r).split(";"),i=!1,t="US-ASCII",n=0;n<a.length;n++)a[n]=="base64"?i=!0:a[n].indexOf("charset=")==0&&(t=a[n].substring(8));var o=unescape(e.substring(r+1)),s=i?"base64":"ascii",u=new Buffer(o,s);return u.type=a[0]||"text/plain",u.charset=t,u}});var r8=B(($$,e8)=>{var Pz=Jj();function Tz(e){return{mimeType:Fz(Cz(e)),data:Pz(e)}}function Cz(e){return e.substring(5,e.indexOf(";"))}var Zj=/^(\w+\/)+/;function Fz(e){e=e.toLowerCase();var r=e.match(Zj);return!r||!(r=r[1])?e:e.replace(Zj,r)}e8.exports=Tz});var t8=B((G$,a8)=>{"use strict";var Zu=ou(),W$=require("path"),qz=mx().PNG,Iz=wx(),Oz=Sx(),Rz=Px().GifReader,Bz=Ix(),Dz=require("fs"),zz=Qj(),Lz=ef(),Nz=r8();function Mz(e,r){var a=new qz;a.parse(e,function(i,t){if(i){r(i);return}r(null,Zu(new Uint8Array(t.data),[t.width|0,t.height|0,4],[4,4*t.width|0,1],0))})}function Uz(e,r){var a;try{a=Iz.decode(e)}catch(n){r(n);return}if(!a){r(new Error("Error decoding jpeg"));return}var i=[a.height,a.width,4],t=Zu(a.data,i);r(null,t.transpose(1,0))}function Hz(e,r){var a;try{a=new Rz(e)}catch(s){r(s);return}if(a.numFrames()>0){var i=[a.numFrames(),a.height,a.width,4];try{var t=new Uint8Array(i[0]*i[1]*i[2]*i[3])}catch(s){r(s);return}var n=Zu(t,i);try{for(var o=0;o<a.numFrames();++o)a.decodeAndBlitFrameRGBA(o,t.subarray(n.index(o,0,0,0),n.index(o+1,0,0,0)))}catch(s){r(s);return}r(null,n.transpose(0,2,1))}else{var i=[a.height,a.width,4],t=new Uint8Array(i[0]*i[1]*i[2]),n=Zu(t,i);try{a.decodeAndBlitFrameRGBA(0,t)}catch(p){r(p);return}r(null,n.transpose(1,0))}}function Vz(e,r){var a=new Bz(e);try{a.init()}catch(s){r(s);return}var i=a.getData(),t=[i.getHeight(),i.getWidth(),4],n=new Uint8Array(t[0]*t[1]*t[2]),o=Zu(n,t);Oz(i,o),r(null,o.transpose(1,0))}function Ff(e,r,a){switch(e){case"image/png":Mz(r,a);break;case"image/jpg":case"image/jpeg":Uz(r,a);break;case"image/gif":Hz(r,a);break;case"image/bmp":Vz(r,a);break;default:a(new Error("Unsupported file type: "+e))}}a8.exports=function(r,a,i){if(i||(i=a,a=""),Buffer.isBuffer(r)){if(!a){i(new Error("Invalid file type"));return}Ff(a,r,i)}else if(r.indexOf("data:")===0)try{var t=Nz(r);t?process.nextTick(function(){Ff(a||t.mimeType,t.data,i)}):process.nextTick(function(){i(new Error("Error parsing data URI"))})}catch(n){process.nextTick(function(){i(n)})}else r.indexOf("http://")===0||r.indexOf("https://")===0?zz({url:r,encoding:null},function(n,o,s){if(n){i(n);return}if(a=a,a||(o.getHeader!==void 0?a=o.getHeader("content-type"):o.headers!==void 0&&(a=o.headers["content-type"])),!a){i(new Error("Invalid content-type"));return}Ff(a,s,i)}):Dz.readFile(r,function(n,o){if(n){i(n);return}if(a=a||Lz.lookup(r),!a){i(new Error("Invalid file type"));return}Ff(a,o,i)})}});var s8=B((qf,o8)=>{(function(e,r){typeof qf=="object"&&typeof o8!="undefined"?r(qf):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(qf,function(e){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(c){return"Symbol("+c+")"};function a(){}function i(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}var t=i();function n(c){return typeof c=="object"&&c!==null||typeof c=="function"}var o=a,s=Promise,u=Promise.prototype.then,f=Promise.resolve.bind(s),p=Promise.reject.bind(s);function m(c){return new s(c)}function d(c){return f(c)}function v(c){return p(c)}function x(c,h,A){return u.call(c,h,A)}function E(c,h,A){x(x(c,h,A),void 0,o)}function b(c,h){E(c,h)}function w(c,h){E(c,void 0,h)}function P(c,h,A){return x(c,h,A)}function T(c){x(c,void 0,o)}var O=function(){var c=t&&t.queueMicrotask;if(typeof c=="function")return c;var h=d(void 0);return function(A){return x(h,A)}}();function D(c,h,A){if(typeof c!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(c,h,A)}function I(c,h,A){try{return d(D(c,h,A))}catch(H){return v(H)}}var R=16384,$=function(){function c(){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(c.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),c.prototype.push=function(h){var A=this._back,H=A;A._elements.length===R-1&&(H={_elements:[],_next:void 0}),A._elements.push(h),H!==A&&(this._back=H,A._next=H),++this._size},c.prototype.shift=function(){var h=this._front,A=h,H=this._cursor,ae=H+1,Te=h._elements,Ke=Te[H];return ae===R&&(A=h._next,ae=0),--this._size,this._cursor=ae,h!==A&&(this._front=A),Te[H]=void 0,Ke},c.prototype.forEach=function(h){for(var A=this._cursor,H=this._front,ae=H._elements;(A!==ae.length||H._next!==void 0)&&!(A===ae.length&&(H=H._next,ae=H._elements,A=0,ae.length===0));)h(ae[A]),++A},c.prototype.peek=function(){var h=this._front,A=this._cursor;return h._elements[A]},c}();function z(c,h){c._ownerReadableStream=h,h._reader=c,h._state==="readable"?V(c):h._state==="closed"?Z(c):K(c,h._storedError)}function Y(c,h){var A=c._ownerReadableStream;return Xn(A,h)}function J(c){c._ownerReadableStream._state==="readable"?ue(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):re(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),c._ownerReadableStream._reader=void 0,c._ownerReadableStream=void 0}function G(c){return new TypeError("Cannot "+c+" a stream using a released reader")}function V(c){c._closedPromise=m(function(h,A){c._closedPromise_resolve=h,c._closedPromise_reject=A})}function K(c,h){V(c),ue(c,h)}function Z(c){V(c),_e(c)}function ue(c,h){c._closedPromise_reject!==void 0&&(T(c._closedPromise),c._closedPromise_reject(h),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}function re(c,h){K(c,h)}function _e(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}var ne=r("[[AbortSteps]]"),le=r("[[ErrorSteps]]"),Pe=r("[[CancelSteps]]"),Oe=r("[[PullSteps]]"),xe=Number.isFinite||function(c){return typeof c=="number"&&isFinite(c)},L=Math.trunc||function(c){return c<0?Math.ceil(c):Math.floor(c)};function te(c){return typeof c=="object"||typeof c=="function"}function De(c,h){if(c!==void 0&&!te(c))throw new TypeError(h+" is not an object.")}function me(c,h){if(typeof c!="function")throw new TypeError(h+" is not a function.")}function se(c){return typeof c=="object"&&c!==null||typeof c=="function"}function X(c,h){if(!se(c))throw new TypeError(h+" is not an object.")}function ze(c,h,A){if(c===void 0)throw new TypeError("Parameter "+h+" is required in '"+A+"'.")}function be(c,h,A){if(c===void 0)throw new TypeError(h+" is required in '"+A+"'.")}function Ce(c){return Number(c)}function sr(c){return c===0?0:c}function nr(c){return sr(L(c))}function Er(c,h){var A=0,H=Number.MAX_SAFE_INTEGER,ae=Number(c);if(ae=sr(ae),!xe(ae))throw new TypeError(h+" is not a finite number");if(ae=nr(ae),ae<A||ae>H)throw new TypeError(h+" is outside the accepted range of "+A+" to "+H+", inclusive");return!xe(ae)||ae===0?0:ae}function N(c,h){if(!dn(c))throw new TypeError(h+" is not a ReadableStream.")}function Ee(c){return new $e(c)}function Ae(c,h){c._reader._readRequests.push(h)}function we(c,h,A){var H=c._reader,ae=H._readRequests.shift();A?ae._closeSteps():ae._chunkSteps(h)}function je(c){return c._reader._readRequests.length}function Le(c){var h=c._reader;return!(h===void 0||!We(h))}var $e=function(){function c(h){if(ze(h,1,"ReadableStreamDefaultReader"),N(h,"First parameter"),mn(h))throw new TypeError("This stream has already been locked for exclusive reading by another reader");z(this,h),this._readRequests=new $}return Object.defineProperty(c.prototype,"closed",{get:function(){return We(this)?this._closedPromise:v(de("closed"))},enumerable:!1,configurable:!0}),c.prototype.cancel=function(h){return h===void 0&&(h=void 0),We(this)?this._ownerReadableStream===void 0?v(G("cancel")):Y(this,h):v(de("cancel"))},c.prototype.read=function(){if(!We(this))return v(de("read"));if(this._ownerReadableStream===void 0)return v(G("read from"));var h,A,H=m(function(Te,Ke){h=Te,A=Ke}),ae={_chunkSteps:function(Te){return h({value:Te,done:!1})},_closeSteps:function(){return h({value:void 0,done:!0})},_errorSteps:function(Te){return A(Te)}};return he(this,ae),H},c.prototype.releaseLock=function(){if(!We(this))throw de("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");J(this)}},c}();Object.defineProperties($e.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty($e.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function We(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readRequests"))}function he(c,h){var A=c._ownerReadableStream;A._disturbed=!0,A._state==="closed"?h._closeSteps():A._state==="errored"?h._errorSteps(A._storedError):A._readableStreamController[Oe](h)}function de(c){return new TypeError("ReadableStreamDefaultReader.prototype."+c+" can only be used on a ReadableStreamDefaultReader")}var Q,ke;typeof r.asyncIterator=="symbol"&&(ke=(Q={},Q[r.asyncIterator]=function(){return this},Q),Object.defineProperty(ke,r.asyncIterator,{enumerable:!1}));var Be=function(){function c(h,A){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=h,this._preventCancel=A}return c.prototype.next=function(){var h=this,A=function(){return h._nextSteps()};return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,A,A):A(),this._ongoingPromise},c.prototype.return=function(h){var A=this,H=function(){return A._returnSteps(h)};return this._ongoingPromise?P(this._ongoingPromise,H,H):H()},c.prototype._nextSteps=function(){var h=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var A=this._reader;if(A._ownerReadableStream===void 0)return v(G("iterate"));var H,ae,Te=m(function(fr,Fr){H=fr,ae=Fr}),Ke={_chunkSteps:function(fr){h._ongoingPromise=void 0,O(function(){return H({value:fr,done:!1})})},_closeSteps:function(){h._ongoingPromise=void 0,h._isFinished=!0,J(A),H({value:void 0,done:!0})},_errorSteps:function(fr){h._ongoingPromise=void 0,h._isFinished=!0,J(A),ae(fr)}};return he(A,Ke),Te},c.prototype._returnSteps=function(h){if(this._isFinished)return Promise.resolve({value:h,done:!0});this._isFinished=!0;var A=this._reader;if(A._ownerReadableStream===void 0)return v(G("finish iterating"));if(!this._preventCancel){var H=Y(A,h);return J(A),P(H,function(){return{value:h,done:!0}})}return J(A),d({value:h,done:!0})},c}(),Ye={next:function(){return Je(this)?this._asyncIteratorImpl.next():v(mr("next"))},return:function(c){return Je(this)?this._asyncIteratorImpl.return(c):v(mr("return"))}};ke!==void 0&&Object.setPrototypeOf(Ye,ke);function Ue(c,h){var A=Ee(c),H=new Be(A,h),ae=Object.create(Ye);return ae._asyncIteratorImpl=H,ae}function Je(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_asyncIteratorImpl"))}function mr(c){return new TypeError("ReadableStreamAsyncIterator."+c+" can only be used on a ReadableSteamAsyncIterator")}var Sr=Number.isNaN||function(c){return c!==c};function xr(c){return!(!Pr(c)||c===1/0)}function Pr(c){return!(typeof c!="number"||Sr(c)||c<0)}function br(c){var h=c._queue.shift();return c._queueTotalSize-=h.size,c._queueTotalSize<0&&(c._queueTotalSize=0),h.value}function Vr(c,h,A){if(A=Number(A),!xr(A))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");c._queue.push({value:h,size:A}),c._queueTotalSize+=A}function Lr(c){var h=c._queue.peek();return h.value}function Ur(c){c._queue=new $,c._queueTotalSize=0}function aa(c){return c.slice()}function Ta(c,h,A,H,ae){new Uint8Array(c).set(new Uint8Array(A,H,ae),h)}function ot(c){return c}function ta(c){return!1}var la=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"view",{get:function(){if(!Ba(this))throw He("view");return this._view},enumerable:!1,configurable:!0}),c.prototype.respond=function(h){if(!Ba(this))throw He("respond");if(ze(h,1,"respond"),h=Er(h,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");ta(this._view.buffer),er(this._associatedReadableByteStreamController,h)},c.prototype.respondWithNewView=function(h){if(!Ba(this))throw He("respondWithNewView");if(ze(h,1,"respondWithNewView"),!ArrayBuffer.isView(h))throw new TypeError("You can only respond with array buffer views");if(h.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(h.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");dr(this._associatedReadableByteStreamController,h)},c}();Object.defineProperties(la.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(la.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var fa=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"byobRequest",{get:function(){if(!Ca(this))throw Ge("byobRequest");if(this._byobRequest===null&&this._pendingPullIntos.length>0){var h=this._pendingPullIntos.peek(),A=new Uint8Array(h.buffer,h.byteOffset+h.bytesFilled,h.byteLength-h.bytesFilled),H=Object.create(la.prototype);Ve(H,this,A),this._byobRequest=H}return this._byobRequest},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!Ca(this))throw Ge("desiredSize");return Qe(this)},enumerable:!1,configurable:!0}),c.prototype.close=function(){if(!Ca(this))throw Ge("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var h=this._controlledReadableByteStream._state;if(h!=="readable")throw new TypeError("The stream (in "+h+" state) is not in the readable state and cannot be closed");tr(this)},c.prototype.enqueue=function(h){if(!Ca(this))throw Ge("enqueue");if(ze(h,1,"enqueue"),!ArrayBuffer.isView(h))throw new TypeError("chunk must be an array buffer view");if(h.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(h.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 A=this._controlledReadableByteStream._state;if(A!=="readable")throw new TypeError("The stream (in "+A+" state) is not in the readable state and cannot be enqueued to");Ze(this,h)},c.prototype.error=function(h){if(h===void 0&&(h=void 0),!Ca(this))throw Ge("error");Ne(this,h)},c.prototype[Pe]=function(h){if(this._pendingPullIntos.length>0){var A=this._pendingPullIntos.peek();A.bytesFilled=0}Ur(this);var H=this._cancelAlgorithm(h);return Ie(this),H},c.prototype[Oe]=function(h){var A=this._controlledReadableByteStream;if(this._queueTotalSize>0){var H=this._queue.shift();this._queueTotalSize-=H.byteLength,l(this);var ae=new Uint8Array(H.buffer,H.byteOffset,H.byteLength);h._chunkSteps(ae);return}var Te=this._autoAllocateChunkSize;if(Te!==void 0){var Ke=void 0;try{Ke=new ArrayBuffer(Te)}catch(Fr){h._errorSteps(Fr);return}var fr={buffer:Ke,byteOffset:0,byteLength:Te,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(fr)}Ae(A,h),_a(this)},c}();Object.defineProperties(fa.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(fa.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Ca(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableByteStream"))}function Ba(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_associatedReadableByteStreamController"))}function _a(c){var h=ar(c);if(!!h){if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;var A=c._pullAlgorithm();E(A,function(){c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,_a(c))},function(H){Ne(c,H)})}}function zt(c){_(c),c._pendingPullIntos=new $}function $r(c,h){var A=!1;c._state==="closed"&&(A=!0);var H=bt(h);h.readerType==="default"?we(c,H,A):ie(c,H,A)}function bt(c){var h=c.bytesFilled,A=c.elementSize;return new c.viewConstructor(c.buffer,c.byteOffset,h/A)}function k(c,h,A,H){c._queue.push({buffer:h,byteOffset:A,byteLength:H}),c._queueTotalSize+=H}function y(c,h){var A=h.elementSize,H=h.bytesFilled-h.bytesFilled%A,ae=Math.min(c._queueTotalSize,h.byteLength-h.bytesFilled),Te=h.bytesFilled+ae,Ke=Te-Te%A,fr=ae,Fr=!1;Ke>H&&(fr=Ke-h.bytesFilled,Fr=!0);for(var ua=c._queue;fr>0;){var ha=ua.peek(),Fa=Math.min(fr,ha.byteLength),tt=h.byteOffset+h.bytesFilled;Ta(h.buffer,tt,ha.buffer,ha.byteOffset,Fa),ha.byteLength===Fa?ua.shift():(ha.byteOffset+=Fa,ha.byteLength-=Fa),c._queueTotalSize-=Fa,g(c,Fa,h),fr-=Fa}return Fr}function g(c,h,A){_(c),A.bytesFilled+=h}function l(c){c._queueTotalSize===0&&c._closeRequested?(Ie(c),Is(c._controlledReadableByteStream)):_a(c)}function _(c){c._byobRequest!==null&&(c._byobRequest._associatedReadableByteStreamController=void 0,c._byobRequest._view=null,c._byobRequest=null)}function F(c){for(;c._pendingPullIntos.length>0;){if(c._queueTotalSize===0)return;var h=c._pendingPullIntos.peek();y(c,h)&&(qe(c),$r(c._controlledReadableByteStream,h))}}function M(c,h,A){var H=c._controlledReadableByteStream,ae=1;h.constructor!==DataView&&(ae=h.constructor.BYTES_PER_ELEMENT);var Te=h.constructor,Ke=ot(h.buffer),fr={buffer:Ke,byteOffset:h.byteOffset,byteLength:h.byteLength,bytesFilled:0,elementSize:ae,viewConstructor:Te,readerType:"byob"};if(c._pendingPullIntos.length>0){c._pendingPullIntos.push(fr),Re(H,A);return}if(H._state==="closed"){var Fr=new Te(fr.buffer,fr.byteOffset,0);A._closeSteps(Fr);return}if(c._queueTotalSize>0){if(y(c,fr)){var ua=bt(fr);l(c),A._chunkSteps(ua);return}if(c._closeRequested){var ha=new TypeError("Insufficient bytes to fill elements in the given buffer");Ne(c,ha),A._errorSteps(ha);return}}c._pendingPullIntos.push(fr),Re(H,A),_a(c)}function ee(c,h){h.buffer=ot(h.buffer);var A=c._controlledReadableByteStream;if(Se(A))for(;oe(A)>0;){var H=qe(c);$r(A,H)}}function ce(c,h,A){if(A.bytesFilled+h>A.byteLength)throw new RangeError("bytesWritten out of range");if(g(c,h,A),!(A.bytesFilled<A.elementSize)){qe(c);var H=A.bytesFilled%A.elementSize;if(H>0){var ae=A.byteOffset+A.bytesFilled,Te=A.buffer.slice(ae-H,ae);k(c,Te,0,Te.byteLength)}A.buffer=ot(A.buffer),A.bytesFilled-=H,$r(c._controlledReadableByteStream,A),F(c)}}function Fe(c,h){var A=c._pendingPullIntos.peek(),H=c._controlledReadableByteStream._state;if(H==="closed"){if(h!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");ee(c,A)}else ce(c,h,A);_a(c)}function qe(c){var h=c._pendingPullIntos.shift();return _(c),h}function ar(c){var h=c._controlledReadableByteStream;if(h._state!=="readable"||c._closeRequested||!c._started)return!1;if(Le(h)&&je(h)>0||Se(h)&&oe(h)>0)return!0;var A=Qe(c);return A>0}function Ie(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0}function tr(c){var h=c._controlledReadableByteStream;if(!(c._closeRequested||h._state!=="readable")){if(c._queueTotalSize>0){c._closeRequested=!0;return}if(c._pendingPullIntos.length>0){var A=c._pendingPullIntos.peek();if(A.bytesFilled>0){var H=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ne(c,H),H}}Ie(c),Is(h)}}function Ze(c,h){var A=c._controlledReadableByteStream;if(!(c._closeRequested||A._state!=="readable")){var H=h.buffer,ae=h.byteOffset,Te=h.byteLength,Ke=ot(H);if(Le(A))if(je(A)===0)k(c,Ke,ae,Te);else{var fr=new Uint8Array(Ke,ae,Te);we(A,fr,!1)}else Se(A)?(k(c,Ke,ae,Te),F(c)):k(c,Ke,ae,Te);_a(c)}}function Ne(c,h){var A=c._controlledReadableByteStream;A._state==="readable"&&(zt(c),Ur(c),Ie(c),Kv(A,h))}function Qe(c){var h=c._controlledReadableByteStream._state;return h==="errored"?null:h==="closed"?0:c._strategyHWM-c._queueTotalSize}function er(c,h){if(h=Number(h),!xr(h))throw new RangeError("bytesWritten must be a finite");Fe(c,h)}function dr(c,h){var A=c._pendingPullIntos.peek();if(A.byteOffset+A.bytesFilled!==h.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(A.byteLength!==h.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");A.buffer=h.buffer,Fe(c,h.byteLength)}function cr(c,h,A,H,ae,Te,Ke){h._controlledReadableByteStream=c,h._pullAgain=!1,h._pulling=!1,h._byobRequest=null,h._queue=h._queueTotalSize=void 0,Ur(h),h._closeRequested=!1,h._started=!1,h._strategyHWM=Te,h._pullAlgorithm=H,h._cancelAlgorithm=ae,h._autoAllocateChunkSize=Ke,h._pendingPullIntos=new $,c._readableStreamController=h;var fr=A();E(d(fr),function(){h._started=!0,_a(h)},function(Fr){Ne(h,Fr)})}function Xe(c,h,A){var H=Object.create(fa.prototype),ae=function(){},Te=function(){return d(void 0)},Ke=function(){return d(void 0)};h.start!==void 0&&(ae=function(){return h.start(H)}),h.pull!==void 0&&(Te=function(){return h.pull(H)}),h.cancel!==void 0&&(Ke=function(Fr){return h.cancel(Fr)});var fr=h.autoAllocateChunkSize;if(fr===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");cr(c,H,ae,Te,Ke,A,fr)}function Ve(c,h,A){c._associatedReadableByteStreamController=h,c._view=A}function He(c){return new TypeError("ReadableStreamBYOBRequest.prototype."+c+" can only be used on a ReadableStreamBYOBRequest")}function Ge(c){return new TypeError("ReadableByteStreamController.prototype."+c+" can only be used on a ReadableByteStreamController")}function ir(c){return new ve(c)}function Re(c,h){c._reader._readIntoRequests.push(h)}function ie(c,h,A){var H=c._reader,ae=H._readIntoRequests.shift();A?ae._closeSteps(h):ae._chunkSteps(h)}function oe(c){return c._reader._readIntoRequests.length}function Se(c){var h=c._reader;return!(h===void 0||!fe(h))}var ve=function(){function c(h){if(ze(h,1,"ReadableStreamBYOBReader"),N(h,"First parameter"),mn(h))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Ca(h._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");z(this,h),this._readIntoRequests=new $}return Object.defineProperty(c.prototype,"closed",{get:function(){return fe(this)?this._closedPromise:v(or("closed"))},enumerable:!1,configurable:!0}),c.prototype.cancel=function(h){return h===void 0&&(h=void 0),fe(this)?this._ownerReadableStream===void 0?v(G("cancel")):Y(this,h):v(or("cancel"))},c.prototype.read=function(h){if(!fe(this))return v(or("read"));if(!ArrayBuffer.isView(h))return v(new TypeError("view must be an array buffer view"));if(h.byteLength===0)return v(new TypeError("view must have non-zero byteLength"));if(h.buffer.byteLength===0)return v(new TypeError("view's buffer must have non-zero byteLength"));if(this._ownerReadableStream===void 0)return v(G("read from"));var A,H,ae=m(function(Ke,fr){A=Ke,H=fr}),Te={_chunkSteps:function(Ke){return A({value:Ke,done:!1})},_closeSteps:function(Ke){return A({value:Ke,done:!0})},_errorSteps:function(Ke){return H(Ke)}};return ye(this,h,Te),ae},c.prototype.releaseLock=function(){if(!fe(this))throw or("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");J(this)}},c}();Object.defineProperties(ve.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ve.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function fe(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readIntoRequests"))}function ye(c,h,A){var H=c._ownerReadableStream;H._disturbed=!0,H._state==="errored"?A._errorSteps(H._storedError):M(H._readableStreamController,h,A)}function or(c){return new TypeError("ReadableStreamBYOBReader.prototype."+c+" can only be used on a ReadableStreamBYOBReader")}function pr(c,h){var A=c.highWaterMark;if(A===void 0)return h;if(Sr(A)||A<0)throw new RangeError("Invalid highWaterMark");return A}function lr(c){var h=c.size;return h||function(){return 1}}function hr(c,h){De(c,h);var A=c==null?void 0:c.highWaterMark,H=c==null?void 0:c.size;return{highWaterMark:A===void 0?void 0:Ce(A),size:H===void 0?void 0:U(H,h+" has member 'size' that")}}function U(c,h){return me(c,h),function(A){return Ce(c(A))}}function wr(c,h){De(c,h);var A=c==null?void 0:c.abort,H=c==null?void 0:c.close,ae=c==null?void 0:c.start,Te=c==null?void 0:c.type,Ke=c==null?void 0:c.write;return{abort:A===void 0?void 0:Tr(A,c,h+" has member 'abort' that"),close:H===void 0?void 0:kr(H,c,h+" has member 'close' that"),start:ae===void 0?void 0:vr(ae,c,h+" has member 'start' that"),write:Ke===void 0?void 0:Ar(Ke,c,h+" has member 'write' that"),type:Te}}function Tr(c,h,A){return me(c,A),function(H){return I(c,h,[H])}}function kr(c,h,A){return me(c,A),function(){return I(c,h,[])}}function vr(c,h,A){return me(c,A),function(H){return D(c,h,[H])}}function Ar(c,h,A){return me(c,A),function(H,ae){return I(c,h,[H,ae])}}function _r(c,h){if(!C(c))throw new TypeError(h+" is not a WritableStream.")}var Hr=function(){function c(h,A){h===void 0&&(h={}),A===void 0&&(A={}),h===void 0?h=null:X(h,"First parameter");var H=hr(A,"Second parameter"),ae=wr(h,"First parameter");S(this);var Te=ae.type;if(Te!==void 0)throw new RangeError("Invalid type is specified");var Ke=lr(H),fr=pr(H,1);b8(this,ae,fr,Ke)}return Object.defineProperty(c.prototype,"locked",{get:function(){if(!C(this))throw nc("locked");return W(this)},enumerable:!1,configurable:!0}),c.prototype.abort=function(h){return h===void 0&&(h=void 0),C(this)?W(this)?v(new TypeError("Cannot abort a stream that already has a writer")):pe(this,h):v(nc("abort"))},c.prototype.close=function(){return C(this)?W(this)?v(new TypeError("Cannot close a stream that already has a writer")):pa(this)?v(new TypeError("Cannot close an already-closing stream")):ge(this):v(nc("close"))},c.prototype.getWriter=function(){if(!C(this))throw nc("getWriter");return Cr(this)},c}();Object.defineProperties(Hr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Hr.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function Cr(c){return new Ts(c)}function j(c,h,A,H,ae,Te){ae===void 0&&(ae=1),Te===void 0&&(Te=function(){return 1});var Ke=Object.create(Hr.prototype);S(Ke);var fr=Object.create(_o.prototype);return Rv(Ke,fr,c,h,A,H,ae,Te),Ke}function S(c){c._state="writable",c._storedError=void 0,c._writer=void 0,c._writableStreamController=void 0,c._writeRequests=new $,c._inFlightWriteRequest=void 0,c._closeRequest=void 0,c._inFlightCloseRequest=void 0,c._pendingAbortRequest=void 0,c._backpressure=!1}function C(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_writableStreamController"))}function W(c){return c._writer!==void 0}function pe(c,h){var A=c._state;if(A==="closed"||A==="errored")return d(void 0);if(c._pendingAbortRequest!==void 0)return c._pendingAbortRequest._promise;var H=!1;A==="erroring"&&(H=!0,h=void 0);var ae=m(function(Te,Ke){c._pendingAbortRequest={_promise:void 0,_resolve:Te,_reject:Ke,_reason:h,_wasAlreadyErroring:H}});return c._pendingAbortRequest._promise=ae,H||Or(c,h),ae}function ge(c){var h=c._state;if(h==="closed"||h==="errored")return v(new TypeError("The stream (in "+h+" state) is not in the writable state and cannot be closed"));var A=m(function(ae,Te){var Ke={_resolve:ae,_reject:Te};c._closeRequest=Ke}),H=c._writer;return H!==void 0&&c._backpressure&&h==="writable"&&Lf(H),y8(c._writableStreamController),A}function Me(c){var h=m(function(A,H){var ae={_resolve:A,_reject:H};c._writeRequests.push(ae)});return h}function rr(c,h){var A=c._state;if(A==="writable"){Or(c,h);return}sa(c)}function Or(c,h){var A=c._writableStreamController;c._state="erroring",c._storedError=h;var H=c._writer;H!==void 0&&Fv(H,h),!Et(c)&&A._started&&sa(c)}function sa(c){c._state="errored",c._writableStreamController[le]();var h=c._storedError;if(c._writeRequests.forEach(function(ae){ae._reject(h)}),c._writeRequests=new $,c._pendingAbortRequest===void 0){Hi(c);return}var A=c._pendingAbortRequest;if(c._pendingAbortRequest=void 0,A._wasAlreadyErroring){A._reject(h),Hi(c);return}var H=c._writableStreamController[ne](A._reason);E(H,function(){A._resolve(),Hi(c)},function(ae){A._reject(ae),Hi(c)})}function st(c){c._inFlightWriteRequest._resolve(void 0),c._inFlightWriteRequest=void 0}function at(c,h){c._inFlightWriteRequest._reject(h),c._inFlightWriteRequest=void 0,rr(c,h)}function Lt(c){c._inFlightCloseRequest._resolve(void 0),c._inFlightCloseRequest=void 0;var h=c._state;h==="erroring"&&(c._storedError=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._resolve(),c._pendingAbortRequest=void 0)),c._state="closed";var A=c._writer;A!==void 0&&Lv(A)}function Wn(c,h){c._inFlightCloseRequest._reject(h),c._inFlightCloseRequest=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._reject(h),c._pendingAbortRequest=void 0),rr(c,h)}function pa(c){return!(c._closeRequest===void 0&&c._inFlightCloseRequest===void 0)}function Et(c){return!(c._inFlightWriteRequest===void 0&&c._inFlightCloseRequest===void 0)}function Gn(c){c._inFlightCloseRequest=c._closeRequest,c._closeRequest=void 0}function ti(c){c._inFlightWriteRequest=c._writeRequests.shift()}function Hi(c){c._closeRequest!==void 0&&(c._closeRequest._reject(c._storedError),c._closeRequest=void 0);var h=c._writer;h!==void 0&&Df(h,c._storedError)}function ac(c,h){var A=c._writer;A!==void 0&&h!==c._backpressure&&(h?S8(A):Lf(A)),c._backpressure=h}var Ts=function(){function c(h){if(ze(h,1,"WritableStreamDefaultWriter"),_r(h,"First parameter"),W(h))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=h,h._writer=this;var A=h._state;if(A==="writable")!pa(h)&&h._backpressure?sc(this):Nv(this),oc(this);else if(A==="erroring")zf(this,h._storedError),oc(this);else if(A==="closed")Nv(this),j8(this);else{var H=h._storedError;zf(this,H),zv(this,H)}}return Object.defineProperty(c.prototype,"closed",{get:function(){return Kn(this)?this._closedPromise:v(Yn("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!Kn(this))throw Yn("desiredSize");if(this._ownerWritableStream===void 0)throw Cs("desiredSize");return v8(this)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ready",{get:function(){return Kn(this)?this._readyPromise:v(Yn("ready"))},enumerable:!1,configurable:!0}),c.prototype.abort=function(h){return h===void 0&&(h=void 0),Kn(this)?this._ownerWritableStream===void 0?v(Cs("abort")):h8(this,h):v(Yn("abort"))},c.prototype.close=function(){if(!Kn(this))return v(Yn("close"));var h=this._ownerWritableStream;return h===void 0?v(Cs("close")):pa(h)?v(new TypeError("Cannot close an already-closing stream")):Cv(this)},c.prototype.releaseLock=function(){if(!Kn(this))throw Yn("releaseLock");var h=this._ownerWritableStream;h!==void 0&&qv(this)},c.prototype.write=function(h){return h===void 0&&(h=void 0),Kn(this)?this._ownerWritableStream===void 0?v(Cs("write to")):Iv(this,h):v(Yn("write"))},c}();Object.defineProperties(Ts.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(Ts.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Kn(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_ownerWritableStream"))}function h8(c,h){var A=c._ownerWritableStream;return pe(A,h)}function Cv(c){var h=c._ownerWritableStream;return ge(h)}function d8(c){var h=c._ownerWritableStream,A=h._state;return pa(h)||A==="closed"?d(void 0):A==="errored"?v(h._storedError):Cv(c)}function m8(c,h){c._closedPromiseState==="pending"?Df(c,h):E8(c,h)}function Fv(c,h){c._readyPromiseState==="pending"?Mv(c,h):A8(c,h)}function v8(c){var h=c._ownerWritableStream,A=h._state;return A==="errored"||A==="erroring"?null:A==="closed"?0:Bv(h._writableStreamController)}function qv(c){var h=c._ownerWritableStream,A=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Fv(c,A),m8(c,A),h._writer=void 0,c._ownerWritableStream=void 0}function Iv(c,h){var A=c._ownerWritableStream,H=A._writableStreamController,ae=x8(H,h);if(A!==c._ownerWritableStream)return v(Cs("write to"));var Te=A._state;if(Te==="errored")return v(A._storedError);if(pa(A)||Te==="closed")return v(new TypeError("The stream is closing or closed and cannot be written to"));if(Te==="erroring")return v(A._storedError);var Ke=Me(A);return w8(H,h,ae),Ke}var Ov={},_o=function(){function c(){throw new TypeError("Illegal constructor")}return c.prototype.error=function(h){if(h===void 0&&(h=void 0),!g8(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");var A=this._controlledWritableStream._state;A==="writable"&&Dv(this,h)},c.prototype[ne]=function(h){var A=this._abortAlgorithm(h);return tc(this),A},c.prototype[le]=function(){Ur(this)},c}();Object.defineProperties(_o.prototype,{error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(_o.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function g8(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledWritableStream"))}function Rv(c,h,A,H,ae,Te,Ke,fr){h._controlledWritableStream=c,c._writableStreamController=h,h._queue=void 0,h._queueTotalSize=void 0,Ur(h),h._started=!1,h._strategySizeAlgorithm=fr,h._strategyHWM=Ke,h._writeAlgorithm=H,h._closeAlgorithm=ae,h._abortAlgorithm=Te;var Fr=Bf(h);ac(c,Fr);var ua=A(),ha=d(ua);E(ha,function(){h._started=!0,ic(h)},function(Fa){h._started=!0,rr(c,Fa)})}function b8(c,h,A,H){var ae=Object.create(_o.prototype),Te=function(){},Ke=function(){return d(void 0)},fr=function(){return d(void 0)},Fr=function(){return d(void 0)};h.start!==void 0&&(Te=function(){return h.start(ae)}),h.write!==void 0&&(Ke=function(ua){return h.write(ua,ae)}),h.close!==void 0&&(fr=function(){return h.close()}),h.abort!==void 0&&(Fr=function(ua){return h.abort(ua)}),Rv(c,ae,Te,Ke,fr,Fr,A,H)}function tc(c){c._writeAlgorithm=void 0,c._closeAlgorithm=void 0,c._abortAlgorithm=void 0,c._strategySizeAlgorithm=void 0}function y8(c){Vr(c,Ov,0),ic(c)}function x8(c,h){try{return c._strategySizeAlgorithm(h)}catch(A){return Rf(c,A),1}}function Bv(c){return c._strategyHWM-c._queueTotalSize}function w8(c,h,A){try{Vr(c,h,A)}catch(Te){Rf(c,Te);return}var H=c._controlledWritableStream;if(!pa(H)&&H._state==="writable"){var ae=Bf(c);ac(H,ae)}ic(c)}function ic(c){var h=c._controlledWritableStream;if(!!c._started&&h._inFlightWriteRequest===void 0){var A=h._state;if(A==="erroring"){sa(h);return}if(c._queue.length!==0){var H=Lr(c);H===Ov?k8(c):_8(c,H)}}}function Rf(c,h){c._controlledWritableStream._state==="writable"&&Dv(c,h)}function k8(c){var h=c._controlledWritableStream;Gn(h),br(c);var A=c._closeAlgorithm();tc(c),E(A,function(){Lt(h)},function(H){Wn(h,H)})}function _8(c,h){var A=c._controlledWritableStream;ti(A);var H=c._writeAlgorithm(h);E(H,function(){st(A);var ae=A._state;if(br(c),!pa(A)&&ae==="writable"){var Te=Bf(c);ac(A,Te)}ic(c)},function(ae){A._state==="writable"&&tc(c),at(A,ae)})}function Bf(c){var h=Bv(c);return h<=0}function Dv(c,h){var A=c._controlledWritableStream;tc(c),Or(A,h)}function nc(c){return new TypeError("WritableStream.prototype."+c+" can only be used on a WritableStream")}function Yn(c){return new TypeError("WritableStreamDefaultWriter.prototype."+c+" can only be used on a WritableStreamDefaultWriter")}function Cs(c){return new TypeError("Cannot "+c+" a stream using a released writer")}function oc(c){c._closedPromise=m(function(h,A){c._closedPromise_resolve=h,c._closedPromise_reject=A,c._closedPromiseState="pending"})}function zv(c,h){oc(c),Df(c,h)}function j8(c){oc(c),Lv(c)}function Df(c,h){c._closedPromise_reject!==void 0&&(T(c._closedPromise),c._closedPromise_reject(h),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="rejected")}function E8(c,h){zv(c,h)}function Lv(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="resolved")}function sc(c){c._readyPromise=m(function(h,A){c._readyPromise_resolve=h,c._readyPromise_reject=A}),c._readyPromiseState="pending"}function zf(c,h){sc(c),Mv(c,h)}function Nv(c){sc(c),Lf(c)}function Mv(c,h){c._readyPromise_reject!==void 0&&(T(c._readyPromise),c._readyPromise_reject(h),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="rejected")}function S8(c){sc(c)}function A8(c,h){zf(c,h)}function Lf(c){c._readyPromise_resolve!==void 0&&(c._readyPromise_resolve(void 0),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="fulfilled")}function P8(c){if(typeof c!="object"||c===null)return!1;try{return typeof c.aborted=="boolean"}catch{return!1}}var Uv=typeof DOMException!="undefined"?DOMException:void 0;function T8(c){if(!(typeof c=="function"||typeof c=="object"))return!1;try{return new c,!0}catch{return!1}}function C8(){var c=function(A,H){this.message=A||"",this.name=H||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return c.prototype=Object.create(Error.prototype),Object.defineProperty(c.prototype,"constructor",{value:c,writable:!0,configurable:!0}),c}var F8=T8(Uv)?Uv:C8();function Hv(c,h,A,H,ae,Te){var Ke=Ee(c),fr=Cr(h);c._disturbed=!0;var Fr=!1,ua=d(void 0);return m(function(ha,Fa){var tt;if(Te!==void 0){if(tt=function(){var Wr=new F8("Aborted","AbortError"),Wa=[];H||Wa.push(function(){return h._state==="writable"?pe(h,Wr):d(void 0)}),ae||Wa.push(function(){return c._state==="readable"?Xn(c,Wr):d(void 0)}),eo(function(){return Promise.all(Wa.map(function(At){return At()}))},!0,Wr)},Te.aborted){tt();return}Te.addEventListener("abort",tt)}function Rs(){return m(function(Wr,Wa){function At(kc){kc?Wr():x(Vf(),At,Wa)}At(!1)})}function Vf(){return Fr?d(!0):x(fr._readyPromise,function(){return m(function(Wr,Wa){he(Ke,{_chunkSteps:function(At){ua=x(Iv(fr,At),void 0,a),Wr(!1)},_closeSteps:function(){return Wr(!0)},_errorSteps:Wa})})})}if(Vi(c,Ke._closedPromise,function(Wr){H?xc(!0,Wr):eo(function(){return pe(h,Wr)},!0,Wr)}),Vi(h,fr._closedPromise,function(Wr){ae?xc(!0,Wr):eo(function(){return Xn(c,Wr)},!0,Wr)}),Zn(c,Ke._closedPromise,function(){A?xc():eo(function(){return d8(fr)})}),pa(h)||h._state==="closed"){var So=new TypeError("the destination writable stream closed before all data could be piped to it");ae?xc(!0,So):eo(function(){return Xn(c,So)},!0,So)}T(Rs());function St(){var Wr=ua;return x(ua,function(){return Wr!==ua?St():void 0})}function Vi(Wr,Wa,At){Wr._state==="errored"?At(Wr._storedError):w(Wa,At)}function Zn(Wr,Wa,At){Wr._state==="closed"?At():b(Wa,At)}function eo(Wr,Wa,At){if(Fr)return;Fr=!0,h._state==="writable"&&!pa(h)?b(St(),kc):kc();function kc(){E(Wr(),function(){return wc(Wa,At)},function(o4){return wc(!0,o4)})}}function xc(Wr,Wa){Fr||(Fr=!0,h._state==="writable"&&!pa(h)?b(St(),function(){return wc(Wr,Wa)}):wc(Wr,Wa))}function wc(Wr,Wa){qv(fr),J(Ke),Te!==void 0&&Te.removeEventListener("abort",tt),Wr?Fa(Wa):ha(void 0)}})}var jo=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!uc(this))throw fc("desiredSize");return Nf(this)},enumerable:!1,configurable:!0}),c.prototype.close=function(){if(!uc(this))throw fc("close");if(!Eo(this))throw new TypeError("The stream is not in a state that permits close");qs(this)},c.prototype.enqueue=function(h){if(h===void 0&&(h=void 0),!uc(this))throw fc("enqueue");if(!Eo(this))throw new TypeError("The stream is not in a state that permits enqueue");return lc(this,h)},c.prototype.error=function(h){if(h===void 0&&(h=void 0),!uc(this))throw fc("error");hn(this,h)},c.prototype[Pe]=function(h){Ur(this);var A=this._cancelAlgorithm(h);return cc(this),A},c.prototype[Oe]=function(h){var A=this._controlledReadableStream;if(this._queue.length>0){var H=br(this);this._closeRequested&&this._queue.length===0?(cc(this),Is(A)):Fs(this),h._chunkSteps(H)}else Ae(A,h),Fs(this)},c}();Object.defineProperties(jo.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(jo.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function uc(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableStream"))}function Fs(c){var h=Vv(c);if(!!h){if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;var A=c._pullAlgorithm();E(A,function(){c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,Fs(c))},function(H){hn(c,H)})}}function Vv(c){var h=c._controlledReadableStream;if(!Eo(c)||!c._started)return!1;if(mn(h)&&je(h)>0)return!0;var A=Nf(c);return A>0}function cc(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0,c._strategySizeAlgorithm=void 0}function qs(c){if(!!Eo(c)){var h=c._controlledReadableStream;c._closeRequested=!0,c._queue.length===0&&(cc(c),Is(h))}}function lc(c,h){if(!!Eo(c)){var A=c._controlledReadableStream;if(mn(A)&&je(A)>0)we(A,h,!1);else{var H=void 0;try{H=c._strategySizeAlgorithm(h)}catch(ae){throw hn(c,ae),ae}try{Vr(c,h,H)}catch(ae){throw hn(c,ae),ae}}Fs(c)}}function hn(c,h){var A=c._controlledReadableStream;A._state==="readable"&&(Ur(c),cc(c),Kv(A,h))}function Nf(c){var h=c._controlledReadableStream._state;return h==="errored"?null:h==="closed"?0:c._strategyHWM-c._queueTotalSize}function q8(c){return!Vv(c)}function Eo(c){var h=c._controlledReadableStream._state;return!c._closeRequested&&h==="readable"}function $v(c,h,A,H,ae,Te,Ke){h._controlledReadableStream=c,h._queue=void 0,h._queueTotalSize=void 0,Ur(h),h._started=!1,h._closeRequested=!1,h._pullAgain=!1,h._pulling=!1,h._strategySizeAlgorithm=Ke,h._strategyHWM=Te,h._pullAlgorithm=H,h._cancelAlgorithm=ae,c._readableStreamController=h;var fr=A();E(d(fr),function(){h._started=!0,Fs(h)},function(Fr){hn(h,Fr)})}function I8(c,h,A,H){var ae=Object.create(jo.prototype),Te=function(){},Ke=function(){return d(void 0)},fr=function(){return d(void 0)};h.start!==void 0&&(Te=function(){return h.start(ae)}),h.pull!==void 0&&(Ke=function(){return h.pull(ae)}),h.cancel!==void 0&&(fr=function(Fr){return h.cancel(Fr)}),$v(c,ae,Te,Ke,fr,A,H)}function fc(c){return new TypeError("ReadableStreamDefaultController.prototype."+c+" can only be used on a ReadableStreamDefaultController")}function O8(c,h){var A=Ee(c),H=!1,ae=!1,Te=!1,Ke,fr,Fr,ua,ha,Fa=m(function(St){ha=St});function tt(){if(H)return d(void 0);H=!0;var St={_chunkSteps:function(Vi){O(function(){H=!1;var Zn=Vi,eo=Vi;ae||lc(Fr._readableStreamController,Zn),Te||lc(ua._readableStreamController,eo)})},_closeSteps:function(){H=!1,ae||qs(Fr._readableStreamController),Te||qs(ua._readableStreamController),(!ae||!Te)&&ha(void 0)},_errorSteps:function(){H=!1}};return he(A,St),d(void 0)}function Rs(St){if(ae=!0,Ke=St,Te){var Vi=aa([Ke,fr]),Zn=Xn(c,Vi);ha(Zn)}return Fa}function Vf(St){if(Te=!0,fr=St,ae){var Vi=aa([Ke,fr]),Zn=Xn(c,Vi);ha(Zn)}return Fa}function So(){}return Fr=Mf(So,tt,Rs),ua=Mf(So,tt,Vf),w(A._closedPromise,function(St){hn(Fr._readableStreamController,St),hn(ua._readableStreamController,St),(!ae||!Te)&&ha(void 0)}),[Fr,ua]}function R8(c,h){De(c,h);var A=c,H=A==null?void 0:A.autoAllocateChunkSize,ae=A==null?void 0:A.cancel,Te=A==null?void 0:A.pull,Ke=A==null?void 0:A.start,fr=A==null?void 0:A.type;return{autoAllocateChunkSize:H===void 0?void 0:Er(H,h+" has member 'autoAllocateChunkSize' that"),cancel:ae===void 0?void 0:B8(ae,A,h+" has member 'cancel' that"),pull:Te===void 0?void 0:D8(Te,A,h+" has member 'pull' that"),start:Ke===void 0?void 0:z8(Ke,A,h+" has member 'start' that"),type:fr===void 0?void 0:L8(fr,h+" has member 'type' that")}}function B8(c,h,A){return me(c,A),function(H){return I(c,h,[H])}}function D8(c,h,A){return me(c,A),function(H){return I(c,h,[H])}}function z8(c,h,A){return me(c,A),function(H){return D(c,h,[H])}}function L8(c,h){if(c=""+c,c!=="bytes")throw new TypeError(h+" '"+c+"' is not a valid enumeration value for ReadableStreamType");return c}function N8(c,h){De(c,h);var A=c==null?void 0:c.mode;return{mode:A===void 0?void 0:M8(A,h+" has member 'mode' that")}}function M8(c,h){if(c=""+c,c!=="byob")throw new TypeError(h+" '"+c+"' is not a valid enumeration value for ReadableStreamReaderMode");return c}function U8(c,h){De(c,h);var A=c==null?void 0:c.preventCancel;return{preventCancel:Boolean(A)}}function Wv(c,h){De(c,h);var A=c==null?void 0:c.preventAbort,H=c==null?void 0:c.preventCancel,ae=c==null?void 0:c.preventClose,Te=c==null?void 0:c.signal;return Te!==void 0&&H8(Te,h+" has member 'signal' that"),{preventAbort:Boolean(A),preventCancel:Boolean(H),preventClose:Boolean(ae),signal:Te}}function H8(c,h){if(!P8(c))throw new TypeError(h+" is not an AbortSignal.")}function V8(c,h){De(c,h);var A=c==null?void 0:c.readable;be(A,"readable","ReadableWritablePair"),N(A,h+" has member 'readable' that");var H=c==null?void 0:c.writable;return be(H,"writable","ReadableWritablePair"),_r(H,h+" has member 'writable' that"),{readable:A,writable:H}}var Qn=function(){function c(h,A){h===void 0&&(h={}),A===void 0&&(A={}),h===void 0?h=null:X(h,"First parameter");var H=hr(A,"Second parameter"),ae=R8(h,"First parameter");if(Gv(this),ae.type==="bytes"){if(H.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var Te=pr(H,0);Xe(this,ae,Te)}else{var Ke=lr(H),Te=pr(H,1);I8(this,ae,Te,Ke)}}return Object.defineProperty(c.prototype,"locked",{get:function(){if(!dn(this))throw Jn("locked");return mn(this)},enumerable:!1,configurable:!0}),c.prototype.cancel=function(h){return h===void 0&&(h=void 0),dn(this)?mn(this)?v(new TypeError("Cannot cancel a stream that already has a reader")):Xn(this,h):v(Jn("cancel"))},c.prototype.getReader=function(h){if(h===void 0&&(h=void 0),!dn(this))throw Jn("getReader");var A=N8(h,"First parameter");return A.mode===void 0?Ee(this):ir(this)},c.prototype.pipeThrough=function(h,A){if(A===void 0&&(A={}),!dn(this))throw Jn("pipeThrough");ze(h,1,"pipeThrough");var H=V8(h,"First parameter"),ae=Wv(A,"Second parameter");if(mn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(W(H.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var Te=Hv(this,H.writable,ae.preventClose,ae.preventAbort,ae.preventCancel,ae.signal);return T(Te),H.readable},c.prototype.pipeTo=function(h,A){if(A===void 0&&(A={}),!dn(this))return v(Jn("pipeTo"));if(h===void 0)return v("Parameter 1 is required in 'pipeTo'.");if(!C(h))return v(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var H;try{H=Wv(A,"Second parameter")}catch(ae){return v(ae)}return mn(this)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):W(h)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Hv(this,h,H.preventClose,H.preventAbort,H.preventCancel,H.signal)},c.prototype.tee=function(){if(!dn(this))throw Jn("tee");var h=O8(this);return aa(h)},c.prototype.values=function(h){if(h===void 0&&(h=void 0),!dn(this))throw Jn("values");var A=U8(h,"First parameter");return Ue(this,A.preventCancel)},c}();Object.defineProperties(Qn.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(Qn.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(Qn.prototype,r.asyncIterator,{value:Qn.prototype.values,writable:!0,configurable:!0});function Mf(c,h,A,H,ae){H===void 0&&(H=1),ae===void 0&&(ae=function(){return 1});var Te=Object.create(Qn.prototype);Gv(Te);var Ke=Object.create(jo.prototype);return $v(Te,Ke,c,h,A,H,ae),Te}function Gv(c){c._state="readable",c._reader=void 0,c._storedError=void 0,c._disturbed=!1}function dn(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readableStreamController"))}function mn(c){return c._reader!==void 0}function Xn(c,h){if(c._disturbed=!0,c._state==="closed")return d(void 0);if(c._state==="errored")return v(c._storedError);Is(c);var A=c._readableStreamController[Pe](h);return P(A,a)}function Is(c){c._state="closed";var h=c._reader;h!==void 0&&(_e(h),We(h)&&(h._readRequests.forEach(function(A){A._closeSteps()}),h._readRequests=new $))}function Kv(c,h){c._state="errored",c._storedError=h;var A=c._reader;A!==void 0&&(ue(A,h),We(A)?(A._readRequests.forEach(function(H){H._errorSteps(h)}),A._readRequests=new $):(A._readIntoRequests.forEach(function(H){H._errorSteps(h)}),A._readIntoRequests=new $))}function Jn(c){return new TypeError("ReadableStream.prototype."+c+" can only be used on a ReadableStream")}function Yv(c,h){De(c,h);var A=c==null?void 0:c.highWaterMark;return be(A,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Ce(A)}}var $8=function(h){return h.byteLength},pc=function(){function c(h){ze(h,1,"ByteLengthQueuingStrategy"),h=Yv(h,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=h.highWaterMark}return Object.defineProperty(c.prototype,"highWaterMark",{get:function(){if(!Xv(this))throw Qv("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"size",{get:function(){if(!Xv(this))throw Qv("size");return $8},enumerable:!1,configurable:!0}),c}();Object.defineProperties(pc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(pc.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Qv(c){return new TypeError("ByteLengthQueuingStrategy.prototype."+c+" can only be used on a ByteLengthQueuingStrategy")}function Xv(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_byteLengthQueuingStrategyHighWaterMark"))}var W8=function(){return 1},hc=function(){function c(h){ze(h,1,"CountQueuingStrategy"),h=Yv(h,"First parameter"),this._countQueuingStrategyHighWaterMark=h.highWaterMark}return Object.defineProperty(c.prototype,"highWaterMark",{get:function(){if(!Zv(this))throw Jv("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"size",{get:function(){if(!Zv(this))throw Jv("size");return W8},enumerable:!1,configurable:!0}),c}();Object.defineProperties(hc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(hc.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Jv(c){return new TypeError("CountQueuingStrategy.prototype."+c+" can only be used on a CountQueuingStrategy")}function Zv(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_countQueuingStrategyHighWaterMark"))}function G8(c,h){De(c,h);var A=c==null?void 0:c.flush,H=c==null?void 0:c.readableType,ae=c==null?void 0:c.start,Te=c==null?void 0:c.transform,Ke=c==null?void 0:c.writableType;return{flush:A===void 0?void 0:K8(A,c,h+" has member 'flush' that"),readableType:H,start:ae===void 0?void 0:Y8(ae,c,h+" has member 'start' that"),transform:Te===void 0?void 0:Q8(Te,c,h+" has member 'transform' that"),writableType:Ke}}function K8(c,h,A){return me(c,A),function(H){return I(c,h,[H])}}function Y8(c,h,A){return me(c,A),function(H){return D(c,h,[H])}}function Q8(c,h,A){return me(c,A),function(H,ae){return I(c,h,[H,ae])}}var dc=function(){function c(h,A,H){h===void 0&&(h={}),A===void 0&&(A={}),H===void 0&&(H={}),h===void 0&&(h=null);var ae=hr(A,"Second parameter"),Te=hr(H,"Third parameter"),Ke=G8(h,"First parameter");if(Ke.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(Ke.writableType!==void 0)throw new RangeError("Invalid writableType specified");var fr=pr(Te,0),Fr=lr(Te),ua=pr(ae,1),ha=lr(ae),Fa,tt=m(function(Rs){Fa=Rs});X8(this,tt,ua,ha,fr,Fr),Z8(this,Ke),Ke.start!==void 0?Fa(Ke.start(this._transformStreamController)):Fa(void 0)}return Object.defineProperty(c.prototype,"readable",{get:function(){if(!e0(this))throw i0("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"writable",{get:function(){if(!e0(this))throw i0("writable");return this._writable},enumerable:!1,configurable:!0}),c}();Object.defineProperties(dc.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(dc.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function X8(c,h,A,H,ae,Te){function Ke(){return h}function fr(tt){return a4(c,tt)}function Fr(tt){return t4(c,tt)}function ua(){return i4(c)}c._writable=j(Ke,fr,ua,Fr,A,H);function ha(){return n4(c)}function Fa(tt){return vc(c,tt),d(void 0)}c._readable=Mf(Ke,ha,Fa,ae,Te),c._backpressure=void 0,c._backpressureChangePromise=void 0,c._backpressureChangePromise_resolve=void 0,gc(c,!0),c._transformStreamController=void 0}function e0(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_transformStreamController"))}function mc(c,h){hn(c._readable._readableStreamController,h),vc(c,h)}function vc(c,h){r0(c._transformStreamController),Rf(c._writable._writableStreamController,h),c._backpressure&&gc(c,!1)}function gc(c,h){c._backpressureChangePromise!==void 0&&c._backpressureChangePromise_resolve(),c._backpressureChangePromise=m(function(A){c._backpressureChangePromise_resolve=A}),c._backpressure=h}var Os=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!bc(this))throw yc("desiredSize");var h=this._controlledTransformStream._readable._readableStreamController;return Nf(h)},enumerable:!1,configurable:!0}),c.prototype.enqueue=function(h){if(h===void 0&&(h=void 0),!bc(this))throw yc("enqueue");a0(this,h)},c.prototype.error=function(h){if(h===void 0&&(h=void 0),!bc(this))throw yc("error");e4(this,h)},c.prototype.terminate=function(){if(!bc(this))throw yc("terminate");r4(this)},c}();Object.defineProperties(Os.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Os.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function bc(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledTransformStream"))}function J8(c,h,A,H){h._controlledTransformStream=c,c._transformStreamController=h,h._transformAlgorithm=A,h._flushAlgorithm=H}function Z8(c,h){var A=Object.create(Os.prototype),H=function(Te){try{return a0(A,Te),d(void 0)}catch(Ke){return v(Ke)}},ae=function(){return d(void 0)};h.transform!==void 0&&(H=function(Te){return h.transform(Te,A)}),h.flush!==void 0&&(ae=function(){return h.flush(A)}),J8(c,A,H,ae)}function r0(c){c._transformAlgorithm=void 0,c._flushAlgorithm=void 0}function a0(c,h){var A=c._controlledTransformStream,H=A._readable._readableStreamController;if(!Eo(H))throw new TypeError("Readable side is not in a state that permits enqueue");try{lc(H,h)}catch(Te){throw vc(A,Te),A._readable._storedError}var ae=q8(H);ae!==A._backpressure&&gc(A,!0)}function e4(c,h){mc(c._controlledTransformStream,h)}function t0(c,h){var A=c._transformAlgorithm(h);return P(A,void 0,function(H){throw mc(c._controlledTransformStream,H),H})}function r4(c){var h=c._controlledTransformStream,A=h._readable._readableStreamController;qs(A);var H=new TypeError("TransformStream terminated");vc(h,H)}function a4(c,h){var A=c._transformStreamController;if(c._backpressure){var H=c._backpressureChangePromise;return P(H,function(){var ae=c._writable,Te=ae._state;if(Te==="erroring")throw ae._storedError;return t0(A,h)})}return t0(A,h)}function t4(c,h){return mc(c,h),d(void 0)}function i4(c){var h=c._readable,A=c._transformStreamController,H=A._flushAlgorithm();return r0(A),P(H,function(){if(h._state==="errored")throw h._storedError;qs(h._readableStreamController)},function(ae){throw mc(c,ae),h._storedError})}function n4(c){return gc(c,!1),c._backpressureChangePromise}function yc(c){return new TypeError("TransformStreamDefaultController.prototype."+c+" can only be used on a TransformStreamDefaultController")}function i0(c){return new TypeError("TransformStream.prototype."+c+" can only be used on a TransformStream")}var Uf={ReadableStream:Qn,ReadableStreamDefaultController:jo,ReadableByteStreamController:fa,ReadableStreamBYOBRequest:la,ReadableStreamDefaultReader:$e,ReadableStreamBYOBReader:ve,WritableStream:Hr,WritableStreamDefaultController:_o,WritableStreamDefaultWriter:Ts,ByteLengthQueuingStrategy:pc,CountQueuingStrategy:hc,TransformStream:dc,TransformStreamDefaultController:Os};if(typeof t!="undefined")for(var Hf in Uf)Object.prototype.hasOwnProperty.call(Uf,Hf)&&Object.defineProperty(t,Hf,{value:Uf[Hf],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=pc,e.CountQueuingStrategy=hc,e.ReadableByteStreamController=fa,e.ReadableStream=Qn,e.ReadableStreamBYOBReader=ve,e.ReadableStreamBYOBRequest=la,e.ReadableStreamDefaultController=jo,e.ReadableStreamDefaultReader=$e,e.TransformStream=dc,e.TransformStreamDefaultController=Os,e.WritableStream=Hr,e.WritableStreamDefaultController=_o,e.WritableStreamDefaultWriter=Ts,Object.defineProperty(e,"__esModule",{value:!0})})});var Wf="3.3.0-alpha.4";function c0(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var _i={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},iL=_i.self||_i.window||_i.global||{},nL=_i.window||_i.self||_i.global||{},l0=_i.global||_i.self||_i.window||{},oL=_i.document||{};var _c=typeof process!="object"||String(process)!=="[object process]"||process.browser,jc=typeof importScripts=="function",sL=typeof window!="undefined"&&typeof window.orientation!="undefined",f0=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),uL=f0&&parseFloat(f0[1])||0;function Gf(e,r=!0,a){let i=a||new Set;if(e){if(p0(e))i.add(e);else if(p0(e.buffer))i.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let t in e)Gf(e[t],r,i)}}return a===void 0?Array.from(i):[]}function p0(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 ro(){let parentPort;try{eval("globalThis.parentPort = require('worker_threads').parentPort"),parentPort=globalThis.parentPort}catch{}return parentPort}var Kf=new Map,vn=class{static inWorkerThread(){return typeof self!="undefined"||Boolean(ro())}static set onmessage(r){function a(t){let n=ro(),{type:o,payload:s}=n?t:t.data;r(o,s)}let i=ro();i?(i.on("message",a),i.on("exit",()=>console.debug("Node worker closing"))):globalThis.onmessage=a}static addEventListener(r){let a=Kf.get(r);a||(a=t=>{if(!v4(t))return;let n=ro(),{type:o,payload:s}=n?t:t.data;r(o,s)}),ro()?console.error("not implemented"):globalThis.addEventListener("message",a)}static removeEventListener(r){let a=Kf.get(r);Kf.delete(r),ro()?console.error("not implemented"):globalThis.removeEventListener("message",a)}static postMessage(r,a){let i={source:"loaders.gl",type:r,payload:a},t=Gf(a),n=ro();n?n.postMessage(i,t):globalThis.postMessage(i,t)}};function v4(e){let{type:r,data:a}=e;return r==="message"&&a&&typeof a.source=="string"&&a.source.startsWith("loaders.gl")}var Xf={};d4(Xf,{requireFromFile:()=>Qf,requireFromString:()=>Ec});var Yf=Pt(require("module")),h0=Pt(require("path"));async function Qf(e){if(e.startsWith("http")){let a=await(await fetch(e)).text();return Ec(a)}return e.startsWith("/")||(e=`${process.cwd()}/${e}`),require(e)}function Ec(e,r="",a){if(typeof r=="object"&&(a=r,r=""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let i=Yf.default._nodeModulePaths(h0.default.dirname(r)),t=module.parent,n=new Yf.default(r,t);return n.filename=r,n.paths=[].concat((a==null?void 0:a.prependPaths)||[]).concat(i).concat((a==null?void 0:a.appendPaths)||[]),n._compile(e,r),t&&t.children&&t.children.splice(t.children.indexOf(n),1),n.exports}var g4="beta",b4=typeof Wf!="undefined"?Wf:g4,Jf={};async function Zf(e,r=null,a={}){return r&&(e=d0(e,r,a)),Jf[e]=Jf[e]||y4(e),await Jf[e]}function d0(e,r,a){if(e.startsWith("http"))return e;let i=a.modules||{};return i[e]?i[e]:_c?a.CDN?(c0(a.CDN.startsWith("http")),`${a.CDN}/${r}@${b4}/dist/libs/${e}`):jc?`../src/libs/${e}`:`modules/${r}/src/libs/${e}`:`modules/${r}/dist/libs/${e}`}async function y4(e){if(e.endsWith("wasm"))return await(await fetch(e)).arrayBuffer();if(!_c)try{return Xf&&Qf&&await Qf(e)}catch{return null}if(jc)return importScripts(e);let a=await(await fetch(e)).text();return x4(a,e)}function x4(e,r){if(!_c)return Ec&&Ec(e,r);if(jc)return eval.call(l0,e),null;let a=document.createElement("script");a.id=r;try{a.appendChild(document.createTextNode(e))}catch{a.text=e}return document.body.appendChild(a),null}var Pv=Pt(tg());var ni=typeof process!="object"||String(process)!=="[object process]"||process.browser,mp={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global},ja=mp.global||mp.self||mp.window;var ig={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"]=ig||{};function jr(e,r,a){return r<=e&&e<=a}function V4(e,r){return e.indexOf(r)!==-1}var Ki=Math.floor;function Rc(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function $4(e){for(var r=String(e),a=r.length,i=0,t=[];i<a;){var n=r.charCodeAt(i);if(n<55296||n>57343)t.push(n);else if(56320<=n&&n<=57343)t.push(65533);else if(55296<=n&&n<=56319)if(i===a-1)t.push(65533);else{var o=r.charCodeAt(i+1);if(56320<=o&&o<=57343){var s=n&1023,u=o&1023;t.push(65536+(s<<10)+u),i+=1}else t.push(65533)}i+=1}return t}function W4(e){for(var r="",a=0;a<e.length;++a){var i=e[a];i<=65535?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return r}function $t(e){return 0<=e&&e<=127}var Wt=$t,Rr=-1;function vp(e){this.tokens=[].slice.call(e),this.tokens.reverse()}vp.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():Rr},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 Jr=-1;function Br(e,r){if(e)throw TypeError("Decoder error");return r||65533}function oi(e){throw TypeError("The code point "+e+" could not be encoded.")}function G4(){}G4.prototype={handler:function(e,r){}};function K4(){}K4.prototype={handler:function(e,r){}};function gp(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(bp,e)?bp[e]:null}var ng=[{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"}],bp={};ng.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(a){bp[a]=r})})});var Ft={},qt={};function Ro(e,r){return r&&r[e]||null}function Bo(e,r){var a=r.indexOf(e);return a===-1?null:a}function yt(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 Y4(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,a=0,i=yt("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[0]<=e)r=n[0],a=n[1];else break}return a+e-r}function Q4(e){if(e===59335)return 7457;var r=0,a=0,i=yt("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[1]<=e)r=n[1],a=n[0];else break}return a+e-r}function X4(e){yp=yp||yt("jis0208").map(function(a,i){return jr(i,8272,8835)?null:a});var r=yp;return r.indexOf(e)}var yp;function J4(e){xp=xp||yt("big5").map(function(a,i){return i<(161-129)*157?null:a});var r=xp;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):Bo(e,r)}var xp,og="utf-8";function io(e,r){if(!(this instanceof io))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):og,r=Rc(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var a=gp(e);if(a===null||a.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!qt[a.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var i=this;return i._encoding=a,Boolean(r.fatal)&&(i._error_mode="fatal"),Boolean(r.ignoreBOM)&&(i._ignoreBOM=!0),Object.defineProperty||(this.encoding=i._encoding.name.toLowerCase(),this.fatal=i._error_mode==="fatal",this.ignoreBOM=i._ignoreBOM),i}Object.defineProperty&&(Object.defineProperty(io.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(io.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(io.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));io.prototype.decode=function(r,a){var i;typeof r=="object"&&r instanceof ArrayBuffer?i=new Uint8Array(r):typeof r=="object"&&"buffer"in r&&r.buffer instanceof ArrayBuffer?i=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):i=new Uint8Array(0),a=Rc(a),this._do_not_flush||(this._decoder=qt[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(a.stream);for(var t=new vp(i),n=[],o;;){var s=t.read();if(s===Rr||(o=this._decoder.handler(t,s),o===Jr))break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}if(!this._do_not_flush){do{if(o=this._decoder.handler(t,t.read()),o===Jr)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!t.endOfStream());this._decoder=null}function u(f){return V4(["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)),W4(f)}return u.call(this,n)};function Qs(e,r){if(!(this instanceof Qs))throw TypeError("Called as a function. Did you forget 'new'?");r=Rc(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var a=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):og;var i=gp(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Ft[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");a._encoding=i}else a._encoding=gp("utf-8"),e!==void 0&&"console"in global&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=a._encoding.name.toLowerCase()),a}Object.defineProperty&&Object.defineProperty(Qs.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});Qs.prototype.encode=function(r,a){r=r===void 0?"":String(r),a=Rc(a),this._do_not_flush||(this._encoder=Ft[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(a.stream);for(var i=new vp($4(r)),t=[],n;;){var o=i.read();if(o===Rr||(n=this._encoder.handler(i,o),n===Jr))break;Array.isArray(n)?t.push.apply(t,n):t.push(n)}if(!this._do_not_flush){for(;n=this._encoder.handler(i,i.read()),n!==Jr;)Array.isArray(n)?t.push.apply(t,n):t.push(n);this._encoder=null}return new Uint8Array(t)};function Z4(e){var r=e.fatal,a=0,i=0,t=0,n=128,o=191;this.handler=function(s,u){if(u===Rr&&t!==0)return t=0,Br(r);if(u===Rr)return Jr;if(t===0){if(jr(u,0,127))return u;if(jr(u,194,223))t=1,a=u&31;else if(jr(u,224,239))u===224&&(n=160),u===237&&(o=159),t=2,a=u&15;else if(jr(u,240,244))u===240&&(n=144),u===244&&(o=143),t=3,a=u&7;else return Br(r);return null}if(!jr(u,n,o))return a=t=i=0,n=128,o=191,s.prepend(u),Br(r);if(n=128,o=191,a=a<<6|u&63,i+=1,i!==t)return null;var f=a;return a=t=i=0,f}}function eE(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Jr;if(Wt(i))return i;var t,n;jr(i,128,2047)?(t=1,n=192):jr(i,2048,65535)?(t=2,n=224):jr(i,65536,1114111)&&(t=3,n=240);for(var o=[(i>>6*t)+n];t>0;){var s=i>>6*(t-1);o.push(128|s&63),t-=1}return o}}Ft["UTF-8"]=function(e){return new eE(e)};qt["UTF-8"]=function(e){return new Z4(e)};function rE(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Rr)return Jr;if($t(t))return t;var n=e[t-128];return n===null?Br(a):n}}function aE(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Rr)return Jr;if(Wt(t))return t;var n=Bo(t,e);return n===null&&oi(t),n+128}}(function(){"encoding-indexes"in global&&ng.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var a=r.name,i=yt(a.toLowerCase());qt[a]=function(t){return new rE(i,t)},Ft[a]=function(t){return new aE(i,t)}})})})();qt.GBK=function(e){return new sg(e)};Ft.GBK=function(e){return new ug(e,!0)};function sg(e){var r=e.fatal,a=0,i=0,t=0;this.handler=function(n,o){if(o===Rr&&a===0&&i===0&&t===0)return Jr;o===Rr&&(a!==0||i!==0||t!==0)&&(a=0,i=0,t=0,Br(r));var s;if(t!==0){s=null,jr(o,48,57)&&(s=Y4((((a-129)*10+i-48)*126+t-129)*10+o-48));var u=[i,t,o];return a=0,i=0,t=0,s===null?(n.prepend(u),Br(r)):s}if(i!==0)return jr(o,129,254)?(t=o,null):(n.prepend([i,o]),a=0,i=0,Br(r));if(a!==0){if(jr(o,48,57))return i=o,null;var f=a,p=null;a=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:Ro(p,yt("gb18030")),s===null&&$t(o)&&n.prepend(o),s===null?Br(r):s}return $t(o)?o:o===128?8364:jr(o,129,254)?(a=o,null):Br(r)}}function ug(e,r){var a=e.fatal;this.handler=function(i,t){if(t===Rr)return Jr;if(Wt(t))return t;if(t===58853)return oi(t);if(r&&t===8364)return 128;var n=Bo(t,yt("gb18030"));if(n!==null){var o=Ki(n/190)+129,s=n%190,u=s<63?64:65;return[o,s+u]}if(r)return oi(t);n=Q4(t);var f=Ki(n/10/126/10);n=n-f*10*126*10;var p=Ki(n/10/126);n=n-p*10*126;var m=Ki(n/10),d=n-m*10;return[f+129,p+48,m+129,d+48]}}Ft.gb18030=function(e){return new ug(e)};qt.gb18030=function(e){return new sg(e)};function tE(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Rr&&a!==0)return a=0,Br(r);if(t===Rr&&a===0)return Jr;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:98;switch((jr(t,64,126)||jr(t,161,254))&&(o=(n-129)*157+(t-s)),o){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var u=o===null?null:Ro(o,yt("big5"));return u===null&&$t(t)&&i.prepend(t),u===null?Br(r):u}return $t(t)?t:jr(t,129,254)?(a=t,null):Br(r)}}function iE(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Jr;if(Wt(i))return i;var t=J4(i);if(t===null)return oi(i);var n=Ki(t/157)+129;if(n<161)return oi(i);var o=t%157,s=o<63?64:98;return[n,o+s]}}Ft.Big5=function(e){return new iE(e)};qt.Big5=function(e){return new tE(e)};function nE(e){var r=e.fatal,a=!1,i=0;this.handler=function(t,n){if(n===Rr&&i!==0)return i=0,Br(r);if(n===Rr&&i===0)return Jr;if(i===142&&jr(n,161,223))return i=0,65377-161+n;if(i===143&&jr(n,161,254))return a=!0,i=n,null;if(i!==0){var o=i;i=0;var s=null;return jr(o,161,254)&&jr(n,161,254)&&(s=Ro((o-161)*94+(n-161),yt(a?"jis0212":"jis0208"))),a=!1,jr(n,161,254)||t.prepend(n),s===null?Br(r):s}return $t(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):Br(r)}}function oE(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Jr;if(Wt(i))return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return[142,i-65377+161];i===8722&&(i=65293);var t=Bo(i,yt("jis0208"));if(t===null)return oi(i);var n=Ki(t/94)+161,o=t%94+161;return[n,o]}}Ft["EUC-JP"]=function(e){return new oE(e)};qt["EUC-JP"]=function(e){return new nE(e)};function sE(e){var r=e.fatal,a={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=a.ASCII,t=a.ASCII,n=0,o=!1;this.handler=function(s,u){switch(i){default:case a.ASCII:return u===27?(i=a.EscapeStart,null):jr(u,0,127)&&u!==14&&u!==15&&u!==27?(o=!1,u):u===Rr?Jr:(o=!1,Br(r));case a.Roman:return u===27?(i=a.EscapeStart,null):u===92?(o=!1,165):u===126?(o=!1,8254):jr(u,0,127)&&u!==14&&u!==15&&u!==27&&u!==92&&u!==126?(o=!1,u):u===Rr?Jr:(o=!1,Br(r));case a.Katakana:return u===27?(i=a.EscapeStart,null):jr(u,33,95)?(o=!1,65377-33+u):u===Rr?Jr:(o=!1,Br(r));case a.LeadByte:return u===27?(i=a.EscapeStart,null):jr(u,33,126)?(o=!1,n=u,i=a.TrailByte,null):u===Rr?Jr:(o=!1,Br(r));case a.TrailByte:if(u===27)return i=a.EscapeStart,Br(r);if(jr(u,33,126)){i=a.LeadByte;var f=(n-33)*94+u-33,p=Ro(f,yt("jis0208"));return p===null?Br(r):p}return u===Rr?(i=a.LeadByte,s.prepend(u),Br(r)):(i=a.LeadByte,Br(r));case a.EscapeStart:return u===36||u===40?(n=u,i=a.Escape,null):(s.prepend(u),o=!1,i=t,Br(r));case a.Escape:var m=n;n=0;var d=null;if(m===40&&u===66&&(d=a.ASCII),m===40&&u===74&&(d=a.Roman),m===40&&u===73&&(d=a.Katakana),m===36&&(u===64||u===66)&&(d=a.LeadByte),d!==null){i=i=d;var v=o;return o=!0,v?Br(r):null}return s.prepend([m,u]),o=!1,i=t,Br(r)}}}function uE(e){var r=e.fatal,a={ASCII:0,Roman:1,jis0208:2},i=a.ASCII;this.handler=function(t,n){if(n===Rr&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if(n===Rr&&i===a.ASCII)return Jr;if((i===a.ASCII||i===a.Roman)&&(n===14||n===15||n===27))return oi(65533);if(i===a.ASCII&&Wt(n))return n;if(i===a.Roman&&(Wt(n)&&n!==92&&n!==126||n==165||n==8254)){if(Wt(n))return n;if(n===165)return 92;if(n===8254)return 126}if(Wt(n)&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if((n===165||n===8254)&&i!==a.Roman)return t.prepend(n),i=a.Roman,[27,40,74];n===8722&&(n=65293);var o=Bo(n,yt("jis0208"));if(o===null)return oi(n);if(i!==a.jis0208)return t.prepend(n),i=a.jis0208,[27,36,66];var s=Ki(o/94)+33,u=o%94+33;return[s,u]}}Ft["ISO-2022-JP"]=function(e){return new uE(e)};qt["ISO-2022-JP"]=function(e){return new sE(e)};function cE(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Rr&&a!==0)return a=0,Br(r);if(t===Rr&&a===0)return Jr;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:65,u=n<160?129:193;if((jr(t,64,126)||jr(t,128,252))&&(o=(n-u)*188+t-s),jr(o,8836,10715))return 57344-8836+o;var f=o===null?null:Ro(o,yt("jis0208"));return f===null&&$t(t)&&i.prepend(t),f===null?Br(r):f}return $t(t)||t===128?t:jr(t,161,223)?65377-161+t:jr(t,129,159)||jr(t,224,252)?(a=t,null):Br(r)}}function lE(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Jr;if(Wt(i)||i===128)return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return i-65377+161;i===8722&&(i=65293);var t=X4(i);if(t===null)return oi(i);var n=Ki(t/188),o=n<31?129:193,s=t%188,u=s<63?64:65;return[n+o,s+u]}}Ft.Shift_JIS=function(e){return new lE(e)};qt.Shift_JIS=function(e){return new cE(e)};function fE(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Rr&&a!==0)return a=0,Br(r);if(t===Rr&&a===0)return Jr;if(a!==0){var n=a,o=null;a=0,jr(t,65,254)&&(o=(n-129)*190+(t-65));var s=o===null?null:Ro(o,yt("euc-kr"));return o===null&&$t(t)&&i.prepend(t),s===null?Br(r):s}return $t(t)?t:jr(t,129,254)?(a=t,null):Br(r)}}function pE(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Jr;if(Wt(i))return i;var t=Bo(i,yt("euc-kr"));if(t===null)return oi(i);var n=Ki(t/190)+129,o=t%190+65;return[n,o]}}Ft["EUC-KR"]=function(e){return new pE(e)};qt["EUC-KR"]=function(e){return new fE(e)};function Bc(e,r){var a=e>>8,i=e&255;return r?[a,i]:[i,a]}function cg(e,r){var a=r.fatal,i=null,t=null;this.handler=function(n,o){if(o===Rr&&(i!==null||t!==null))return Br(a);if(o===Rr&&i===null&&t===null)return Jr;if(i===null)return i=o,null;var s;if(e?s=(i<<8)+o:s=(o<<8)+i,i=null,t!==null){var u=t;return t=null,jr(s,56320,57343)?65536+(u-55296)*1024+(s-56320):(n.prepend(Bc(s,e)),Br(a))}return jr(s,55296,56319)?(t=s,null):jr(s,56320,57343)?Br(a):s}}function lg(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Rr)return Jr;if(jr(t,0,65535))return Bc(t,e);var n=Bc((t-65536>>10)+55296,e),o=Bc((t-65536&1023)+56320,e);return n.concat(o)}}Ft["UTF-16BE"]=function(e){return new lg(!0,e)};qt["UTF-16BE"]=function(e){return new cg(!0,e)};Ft["UTF-16LE"]=function(e){return new lg(!1,e)};qt["UTF-16LE"]=function(e){return new cg(!1,e)};function hE(e){var r=e.fatal;this.handler=function(a,i){return i===Rr?Jr:$t(i)?i:63360+i-128}}function dE(e){var r=e.fatal;this.handler=function(a,i){return i===Rr?Jr:Wt(i)?i:jr(i,63360,63487)?i-63360+128:oi(i)}}Ft["x-user-defined"]=function(e){return new dE(e)};qt["x-user-defined"]=function(e){return new hE(e)};var mE="rejected",vE="fulfilled";function fg(e){let r=e.map(a=>a.then(i=>({status:vE,value:i})).catch(i=>({status:mE,reason:i})));return Promise.all(r)}function Dc(e){return Buffer.from(e).toString("base64")}function wp(e){return Buffer.from(e,"base64").toString("ascii")}var si=class{constructor(r){this.map={},r instanceof si?r.forEach((a,i)=>this.append(i,a)):Array.isArray(r)?r.forEach(a=>this.append(a[0],a[1])):r&&Object.getOwnPropertyNames(r).forEach(a=>this.append(a,r[a]))}append(r,a){r=Xs(r),a=pg(a);let i=this.map[r];this.map[r]=i?`${i}, ${a}`:a}delete(r){delete this.map[Xs(r)]}get(r){return r=Xs(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(Xs(r))}set(r,a){this.map[Xs(r)]=pg(a)}forEach(r,a=null){for(let i in this.map)this.map.hasOwnProperty(i)&&(a?r.call(a,this.map[i],i,this):r(this.map[i],i,this))}keys(){let r=[];return this.forEach(function(a,i){r.push(i)}),kp(r)}values(){let r=[];return this.forEach(function(a){r.push(a)}),kp(r)}entries(){let r=[];return this.forEach(function(a,i){r.push([i,a])}),kp(r)}*[Symbol.iterator](){yield*this.entries()}};function Xs(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 pg(e){return typeof e!="string"&&(e=String(e)),e}function kp(e){let r={next(){let a=e.shift();return{done:a===void 0,value:a}}};return r[Symbol.iterator]=function(){return r},r}function Js(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var dg=Pt(require("fs")),mg=Pt(require("http")),vg=Pt(require("https")),zc=Pt(require("zlib"));var gE=e=>e&&e instanceof ArrayBuffer,bE=e=>e&&e instanceof Buffer;function hg(e){let r=e.indexOf(","),a,i;return e.slice(r-7,r)===";base64"?(a=Buffer.from(e.slice(r+1),"base64"),i=e.slice(5,r-7).trim()):(a=Buffer.from(decodeURIComponent(e.slice(r+1))),i=e.slice(5,r).trim()),i?i.startsWith(";")&&(i=`text/plain${i}`):i="text/plain;charset=US-ASCII",{arrayBuffer:_p(a),mimeType:i}}function _p(e){if(gE(e))return e;if(bE(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 yE(e){return e.startsWith("http:")||e.startsWith("https:")}async function gg(e,r){if(!yE(e)){let a=e.split("?")[0];return await new Promise((i,t)=>{let n=dg.default.createReadStream(a,{encoding:null});n.once("readable",()=>i(n)),n.on("error",o=>t(o))})}return await new Promise((a,i)=>{let t=e.startsWith("https:")?vg.default.request:mg.default.request,n=xE(e,r),o=t(n,s=>a(s));o.on("error",s=>i(s)),o.end()})}function bg(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(zc.default.createBrotliDecompress());case"gzip":return e.pipe(zc.default.createGunzip());case"deflate":return e.pipe(zc.default.createDeflate());default:return e}}async function yg(e){let r=[];return await new Promise((a,i)=>{e.on("error",t=>i(t)),e.on("readable",()=>e.read()),e.on("data",t=>{typeof t=="string"&&i(new Error("Read stream not binary")),r.push(_p(t))}),e.on("end",()=>{let t=wE(r);a(t)})})}function xE(e,r){let a=(r==null?void 0:r.headers)||{},i={};for(let n of Object.keys(a))i[n.toLowerCase()]=a[n];i["accept-encoding"]=i["accept-encoding"]||"gzip,br,deflate";let t=new URL(e);return $f($i($i({hostname:t.hostname,path:t.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:i,port:t.port})}function wE(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),a=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(a),t=0;for(let n of r)i.set(n,t),t+=n.byteLength;return i.buffer}var Ep=Pt(require("stream")),kE=e=>typeof e=="boolean",xg=e=>typeof e=="function",_E=e=>e!==null&&typeof e=="object",jp=e=>_E(e)&&xg(e.read)&&xg(e.pipe)&&kE(e.readable),Yi=class{constructor(r,a){this.bodyUsed=!1;let{headers:i,status:t=200,statusText:n="OK",url:o}=a||{};this.url=o,this.ok=t===200,this.status=t,this.statusText=n,this.headers=new si((a==null?void 0:a.headers)||{}),jp(r)?this._body=bg(r,i):typeof r=="string"?this._body=Ep.Readable.from([new TextEncoder().encode(r)]):this._body=Ep.Readable.from([r||new ArrayBuffer(0)])}get body(){return Js(!this.bodyUsed),Js(jp(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return jp(this._body)?await yg(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 wg=Pt(require("fs"));var kg=e=>e.startsWith("data:"),jE=e=>e.startsWith("http:")||e.startsWith("https:");async function Do(e,r){try{if(kg(e)){let{arrayBuffer:f,mimeType:p}=hg(e);return new Yi(f,{headers:{"content-type":p},url:e})}let a={},i=e;e.endsWith(".gz")&&(e=e.slice(0,-3),a["content-encoding"]="gzip");let t=await gg(i,r),n=AE(e,t,a),{status:o,statusText:s}=SE(t),u=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&u){let f=EE(e,n.get("location"));return await Do(f,r)}return new Yi(t,{headers:n,status:o,statusText:s,url:e})}catch(a){return new Yi(null,{status:400,statusText:String(a),url:e})}}function EE(e,r){if(r.startsWith("http"))return r;let a=new URL(e);return a.pathname=r,a.href}function SE(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function AE(e,r,a={}){let i={};if(r&&r.headers){let t=r.headers;for(let n in t){let o=t[n];i[n.toLowerCase()]=String(o)}}if(!i["content-length"]){let t=PE(e);Number.isFinite(t)&&(i["content-length"]=t)}return Object.assign(i,a),new si(i)}function PE(e){if(jE(e))return null;if(kg(e))return e.length-"data:".length;try{let r=e.split("?")[0];return wg.default.statSync(r).size}catch{}return null}var yy=Pt(gy()),xy=Pt(ou());function by(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function $7(e,r){let a=r.type?r.type.replace("image/",""):"jpeg",i=(0,xy.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,yy.default)(i,a,r)}function xh(e,r){let a=$7(e,r);return new Promise(i=>{let t=[];a.on("data",n=>t.push(n)),a.on("end",()=>{let n=Buffer.concat(t);i(by(n))})})}var i8=Pt(t8());var n8=Pt(require("util"));async function jv(e,r){Js(r,"MIMEType is required to parse image under Node.js");let a=n8.default.promisify(i8.default),i=e instanceof Buffer?e:Buffer.from(e),t=await a(i,r),n=[...t.shape],o=t.shape.length===4?t.shape.shift():1,s=t.data instanceof Buffer?new Uint8Array(t.data):t.data;return{shape:n,data:s,width:t.shape[0],height:t.shape[1],components:t.shape[2],layers:o}}var u8=Pt(s8());delete global.ReadableStream;var ec=class extends u8.ReadableStream{};var Ev=class{constructor(r){this.isWorking=!1;this.isCancelled=!1;this.chunks=r}start(r){this.work(r)}async work(r){let{chunks:a}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let i;try{i=a.next()}catch(t){r.error(t);break}i&&(!i.done&&!this.isCancelled?r.enqueue(i.value):r.close())}this.isWorking=!1}pull(r){this.isWorking||this.work(r)}cancel(){this.isCancelled=!0}};var Sv=class extends ec{constructor(r){super(new Ev(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let a=this.getReader();yield*this._chunks,a.releaseLock()}};var $n=class{constructor(r=[],a={}){this.parts=[],this.size=0;for(let i of r)if(typeof i=="string"){let t=new TextEncoder().encode(i);this.parts.push(t),this.size+=t.byteLength}else if(i instanceof $n)this.size+=i.size,this.parts.push(...i.parts);else if(i instanceof ArrayBuffer)this.parts.push(new Uint8Array(i)),this.size+=i.byteLength;else if(i instanceof Uint8Array)this.parts.push(i),this.size+=i.byteLength;else if(ArrayBuffer.isView(i)){let{buffer:t,byteOffset:n,byteLength:o}=i;this.parts.push(new Uint8Array(t,n,o)),this.size+=o}else{let t=new TextEncoder().encode(String(i));this.parts.push(t),this.size+=t.byteLength}this.type=$z(a.type)}slice(r=0,a=this.size,i=""){let{size:t,parts:n}=this,o=r<0?Math.max(t+r,0):Math.min(r,t),s=a<0?Math.max(t+a,0):Math.min(a,t),u=Math.max(s-o,0),f=new $n([],{type:i});if(u===0)return f;let p=0,m=[];for(let d of n){let{byteLength:v}=d;if(o>0&&v<=o)o-=v,s-=v;else{let x=d.subarray(o,Math.min(v,s));if(m.push(x),p+=x.byteLength,o=0,p>=u)break}}return f.parts=m,f.size=p,f}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,a="";for(let i of this.parts)a+=r.decode(i);return a}stream(){return new Sv(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),a=new Uint8Array(r),i=0;for(let t of this.parts)a.set(t,i),i+=t.byteLength;return r}};function $z(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var Av=class extends $n{constructor(r,a,i={}){super(r,i);this.name="";this.webkitRelativePath="";this.name=String(a).replace(/\//g,":"),this.lastModified=(i==null?void 0:i.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};var Gz=!ni||!("TextEncoder"in ja);Gz&&(ja.TextEncoder=Qs);var Kz=!ni||!("TextDecoder"in ja);Kz&&(ja.TextDecoder=io);!ni&&!("atob"in ja)&&Dc&&(ja.atob=Dc);!ni&&!("btoa"in ja)&&wp&&(ja.btoa=wp);!ni&&!("Headers"in ja)&&si&&(ja.Headers=si);!ni&&!("Response"in ja)&&Yi&&(ja.Response=Yi);!ni&&!("fetch"in ja)&&Do&&(ja.fetch=Do);!ni&&!("DOMParser"in ja)&&Pv.DOMParser&&(ja.DOMParser=Pv.DOMParser);!ni&&!("_encodeImageNode"in ja)&&xh&&(ja._encodeImageNode=xh);!ni&&!("_parseImageNode"in ja)&&jv&&(ja._parseImageNode=jv);"allSettled"in Promise||(Promise.allSettled=fg);var c8={POSITION:"POSITION",NORMAL:"NORMAL",COLOR_0:"COLOR",TEXCOORD_0:"TEX_COORD"},Yz=()=>{},If=class{constructor(r){this.draco=r,this.dracoEncoder=new this.draco.Encoder,this.dracoMeshBuilder=new this.draco.MeshBuilder,this.dracoMetadataBuilder=new this.draco.MetadataBuilder}destroy(){this.destroyEncodedObject(this.dracoMeshBuilder),this.destroyEncodedObject(this.dracoEncoder),this.destroyEncodedObject(this.dracoMetadataBuilder),this.dracoMeshBuilder=null,this.dracoEncoder=null,this.draco=null}destroyEncodedObject(r){r&&this.draco.destroy(r)}encodeSync(r,a={}){return this.log=Yz,this._setOptions(a),a.pointcloud?this._encodePointCloud(r,a):this._encodeMesh(r,a)}_getAttributesFromMesh(r){let a=$i($i({},r),r.attributes);return r.indices&&(a.indices=r.indices),a}_encodePointCloud(r,a){let i=new this.draco.PointCloud;a.metadata&&this._addGeometryMetadata(i,a.metadata);let t=this._getAttributesFromMesh(r);this._createDracoPointCloud(i,t,a);let n=new this.draco.DracoInt8Array;try{let o=this.dracoEncoder.EncodePointCloudToDracoBuffer(i,!1,n);if(!(o>0))throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${i.num_points()} points
96
96
  with ${i.num_attributes()} attributes into ${o} bytes`),l8(n)}finally{this.destroyEncodedObject(n),this.destroyEncodedObject(i)}}_encodeMesh(r,a){let i=new this.draco.Mesh;a.metadata&&this._addGeometryMetadata(i,a.metadata);let t=this._getAttributesFromMesh(r);this._createDracoMesh(i,t,a);let n=new this.draco.DracoInt8Array;try{let o=this.dracoEncoder.EncodeMeshToDracoBuffer(i,n);if(o<=0)throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${i.num_points()} points
97
- with ${i.num_attributes()} attributes into ${o} bytes`),l8(n)}finally{this.destroyEncodedObject(n),this.destroyEncodedObject(i)}}_setOptions(r){if("speed"in r&&this.dracoEncoder.SetSpeedOptions(...r.speed),"method"in r){let a=this.draco[r.method||"MESH_SEQUENTIAL_ENCODING"];this.dracoEncoder.SetEncodingMethod(a)}if("quantization"in r)for(let a in r.quantization){let i=r.quantization[a],t=this.draco[a];this.dracoEncoder.SetAttributeQuantization(t,i)}}_createDracoMesh(r,a,i){let t=i.attributesMetadata||{};try{let n=this._getPositionAttribute(a);if(!n)throw new Error("positions");let o=n.length/3;for(let s in a){let u=a[s];s=c8[s]||s;let f=this._addAttributeToMesh(r,s,u,o);f!==-1&&this._addAttributeMetadata(r,f,$i({name:s},t[s]||{}))}}catch(n){throw this.destroyEncodedObject(r),n}return r}_createDracoPointCloud(r,a,i){let t=i.attributesMetadata||{};try{let n=this._getPositionAttribute(a);if(!n)throw new Error("positions");let o=n.length/3;for(let s in a){let u=a[s];s=c8[s]||s;let f=this._addAttributeToMesh(r,s,u,o);f!==-1&&this._addAttributeMetadata(r,f,$i({name:s},t[s]||{}))}}catch(n){throw this.destroyEncodedObject(r),n}return r}_addAttributeToMesh(r,a,i,t){if(!ArrayBuffer.isView(i))return-1;let n=this._getDracoAttributeType(a),o=i.length/t;if(n==="indices"){let f=i.length/3;return this.log(`Adding attribute ${a}, size ${f}`),this.dracoMeshBuilder.AddFacesToMesh(r,f,i),-1}this.log(`Adding attribute ${a}, size ${o}`);let s=this.dracoMeshBuilder,{buffer:u}=i;switch(i.constructor){case Int8Array:return s.AddInt8Attribute(r,n,t,o,new Int8Array(u));case Int16Array:return s.AddInt16Attribute(r,n,t,o,new Int16Array(u));case Int32Array:return s.AddInt32Attribute(r,n,t,o,new Int32Array(u));case Uint8Array:case Uint8ClampedArray:return s.AddUInt8Attribute(r,n,t,o,new Uint8Array(u));case Uint16Array:return s.AddUInt16Attribute(r,n,t,o,new Uint16Array(u));case Uint32Array:return s.AddUInt32Attribute(r,n,t,o,new Uint32Array(u));case Float32Array:default:return s.AddFloatAttribute(r,n,t,o,new Float32Array(u))}}_getDracoAttributeType(r){switch(r.toLowerCase()){case"indices":return"indices";case"position":case"positions":case"vertices":return this.draco.POSITION;case"normal":case"normals":return this.draco.NORMAL;case"color":case"colors":return this.draco.COLOR;case"texcoord":case"texcoords":return this.draco.TEX_COORD;default:return this.draco.GENERIC}}_getPositionAttribute(r){for(let a in r){let i=r[a];if(this._getDracoAttributeType(a)===this.draco.POSITION)return i}return null}_addGeometryMetadata(r,a){let i=new this.draco.Metadata;this._populateDracoMetadata(i,a),this.dracoMeshBuilder.AddMetadata(r,i)}_addAttributeMetadata(r,a,i){let t=new this.draco.Metadata;this._populateDracoMetadata(t,i),this.dracoMeshBuilder.SetMetadataForAttribute(r,a,t)}_populateDracoMetadata(r,a){for(let[i,t]of Qz(a))switch(typeof t){case"number":Math.trunc(t)===t?this.dracoMetadataBuilder.AddIntEntry(r,i,t):this.dracoMetadataBuilder.AddDoubleEntry(r,i,t);break;case"object":t instanceof Int32Array&&this.dracoMetadataBuilder.AddIntEntryArray(r,i,t,t.length);break;case"string":default:this.dracoMetadataBuilder.AddStringEntry(r,i,t)}}};function l8(e){let r=e.size(),a=new ArrayBuffer(r),i=new Int8Array(a);for(let t=0;t<r;++t)i[t]=e.GetValue(t);return a}function Qz(e){return e.entries&&!e.hasOwnProperty("entries")?e.entries():Object.entries(e)}var Of="1.4.1",FW=`https://www.gstatic.com/draco/versioned/decoders/${Of}/draco_decoder.js`,qW=`https://www.gstatic.com/draco/versioned/decoders/${Of}/draco_wasm_wrapper.js`,IW=`https://www.gstatic.com/draco/versioned/decoders/${Of}/draco_decoder.wasm`,Xz=`https://raw.githubusercontent.com/google/draco/${Of}/javascript/draco_encoder.js`;var rc;async function f8(e){let r=e.modules||{};return r.draco3d?rc=rc||r.draco3d.createEncoderModule({}).then(a=>({draco:a})):rc=rc||Jz(e),await rc}async function Jz(e){let r=await Zf(Xz,"draco",e);return r=r||globalThis.DracoEncoderModule,new Promise(a=>{r({onModuleLoaded:i=>a({draco:i})})})}var p8="3.3.0-alpha.2";var Zz={pointcloud:!1,attributeNameEntry:"name"},Tv={name:"DRACO",id:"draco",module:"draco",version:p8,extensions:["drc"],encode:eL,options:{draco:Zz}};async function eL(e,r={}){let{draco:a}=await f8(r),i=new If(a);try{return i.encodeSync(e,r.draco)}finally{i.destroy()}}(()=>{!vn.inWorkerThread()||(vn.onmessage=async(e,r)=>{switch(e){case"process":try{let{input:a,options:i}=r,t=await Tv.encode(a,i);vn.postMessage("done",{result:t})}catch(a){let i=a instanceof Error?a.message:"";vn.postMessage("error",{error:i})}break;default:}})})();
97
+ with ${i.num_attributes()} attributes into ${o} bytes`),l8(n)}finally{this.destroyEncodedObject(n),this.destroyEncodedObject(i)}}_setOptions(r){if("speed"in r&&this.dracoEncoder.SetSpeedOptions(...r.speed),"method"in r){let a=this.draco[r.method||"MESH_SEQUENTIAL_ENCODING"];this.dracoEncoder.SetEncodingMethod(a)}if("quantization"in r)for(let a in r.quantization){let i=r.quantization[a],t=this.draco[a];this.dracoEncoder.SetAttributeQuantization(t,i)}}_createDracoMesh(r,a,i){let t=i.attributesMetadata||{};try{let n=this._getPositionAttribute(a);if(!n)throw new Error("positions");let o=n.length/3;for(let s in a){let u=a[s];s=c8[s]||s;let f=this._addAttributeToMesh(r,s,u,o);f!==-1&&this._addAttributeMetadata(r,f,$i({name:s},t[s]||{}))}}catch(n){throw this.destroyEncodedObject(r),n}return r}_createDracoPointCloud(r,a,i){let t=i.attributesMetadata||{};try{let n=this._getPositionAttribute(a);if(!n)throw new Error("positions");let o=n.length/3;for(let s in a){let u=a[s];s=c8[s]||s;let f=this._addAttributeToMesh(r,s,u,o);f!==-1&&this._addAttributeMetadata(r,f,$i({name:s},t[s]||{}))}}catch(n){throw this.destroyEncodedObject(r),n}return r}_addAttributeToMesh(r,a,i,t){if(!ArrayBuffer.isView(i))return-1;let n=this._getDracoAttributeType(a),o=i.length/t;if(n==="indices"){let f=i.length/3;return this.log(`Adding attribute ${a}, size ${f}`),this.dracoMeshBuilder.AddFacesToMesh(r,f,i),-1}this.log(`Adding attribute ${a}, size ${o}`);let s=this.dracoMeshBuilder,{buffer:u}=i;switch(i.constructor){case Int8Array:return s.AddInt8Attribute(r,n,t,o,new Int8Array(u));case Int16Array:return s.AddInt16Attribute(r,n,t,o,new Int16Array(u));case Int32Array:return s.AddInt32Attribute(r,n,t,o,new Int32Array(u));case Uint8Array:case Uint8ClampedArray:return s.AddUInt8Attribute(r,n,t,o,new Uint8Array(u));case Uint16Array:return s.AddUInt16Attribute(r,n,t,o,new Uint16Array(u));case Uint32Array:return s.AddUInt32Attribute(r,n,t,o,new Uint32Array(u));case Float32Array:default:return s.AddFloatAttribute(r,n,t,o,new Float32Array(u))}}_getDracoAttributeType(r){switch(r.toLowerCase()){case"indices":return"indices";case"position":case"positions":case"vertices":return this.draco.POSITION;case"normal":case"normals":return this.draco.NORMAL;case"color":case"colors":return this.draco.COLOR;case"texcoord":case"texcoords":return this.draco.TEX_COORD;default:return this.draco.GENERIC}}_getPositionAttribute(r){for(let a in r){let i=r[a];if(this._getDracoAttributeType(a)===this.draco.POSITION)return i}return null}_addGeometryMetadata(r,a){let i=new this.draco.Metadata;this._populateDracoMetadata(i,a),this.dracoMeshBuilder.AddMetadata(r,i)}_addAttributeMetadata(r,a,i){let t=new this.draco.Metadata;this._populateDracoMetadata(t,i),this.dracoMeshBuilder.SetMetadataForAttribute(r,a,t)}_populateDracoMetadata(r,a){for(let[i,t]of Qz(a))switch(typeof t){case"number":Math.trunc(t)===t?this.dracoMetadataBuilder.AddIntEntry(r,i,t):this.dracoMetadataBuilder.AddDoubleEntry(r,i,t);break;case"object":t instanceof Int32Array&&this.dracoMetadataBuilder.AddIntEntryArray(r,i,t,t.length);break;case"string":default:this.dracoMetadataBuilder.AddStringEntry(r,i,t)}}};function l8(e){let r=e.size(),a=new ArrayBuffer(r),i=new Int8Array(a);for(let t=0;t<r;++t)i[t]=e.GetValue(t);return a}function Qz(e){return e.entries&&!e.hasOwnProperty("entries")?e.entries():Object.entries(e)}var Of="1.4.1",FW=`https://www.gstatic.com/draco/versioned/decoders/${Of}/draco_decoder.js`,qW=`https://www.gstatic.com/draco/versioned/decoders/${Of}/draco_wasm_wrapper.js`,IW=`https://www.gstatic.com/draco/versioned/decoders/${Of}/draco_decoder.wasm`,Xz=`https://raw.githubusercontent.com/google/draco/${Of}/javascript/draco_encoder.js`;var rc;async function f8(e){let r=e.modules||{};return r.draco3d?rc=rc||r.draco3d.createEncoderModule({}).then(a=>({draco:a})):rc=rc||Jz(e),await rc}async function Jz(e){let r=await Zf(Xz,"draco",e);return r=r||globalThis.DracoEncoderModule,new Promise(a=>{r({onModuleLoaded:i=>a({draco:i})})})}var p8="3.3.0-alpha.4";var Zz={pointcloud:!1,attributeNameEntry:"name"},Tv={name:"DRACO",id:"draco",module:"draco",version:p8,extensions:["drc"],encode:eL,options:{draco:Zz}};async function eL(e,r={}){let{draco:a}=await f8(r),i=new If(a);try{return i.encodeSync(e,r.draco)}finally{i.destroy()}}(()=>{!vn.inWorkerThread()||(vn.onmessage=async(e,r)=>{switch(e){case"process":try{let{input:a,options:i}=r,t=await Tv.encode(a,i);vn.postMessage("done",{result:t})}catch(a){let i=a instanceof Error?a.message:"";vn.postMessage("error",{error:i})}break;default:}})})();
98
98
  /*!
99
99
  * Copyright 2010 LearnBoost <dev@learnboost.com>
100
100
  *