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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -92,7 +92,7 @@ caused by: `+Ur.fullStack(r):e.stack};Ur.errorFromList=function(e){return Ba.arr
92
92
  `,t(o),t(n.body),t(`\r
93
93
  `)}),t("--"+a.boundary+"--"),a.request.postambleCRLF&&t(`\r
94
94
  `),i};ac.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)};K8.Multipart=ac});var J8=B(X8=>{"use strict";var Q8=require("url"),jz=/^https?:/;function Vf(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}Vf.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)};Vf.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};Vf.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,jz.test(i)||(i=Q8.resolve(a.uri.href,i));var t=a.uri;return a.uri=Q8.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};X8.Redirect=Vf});var aj=B(qs=>{"use strict";var JW=require("net"),Sz=require("tls"),Rv=require("http"),Z8=require("https"),Ez=require("events"),Az=require("assert"),Pz=require("util"),Tz=as().Buffer;qs.httpOverHttp=Fz;qs.httpsOverHttp=Cz;qs.httpOverHttps=Iz;qs.httpsOverHttps=qz;function Fz(e){var r=new Ki(e);return r.request=Rv.request,r}function Cz(e){var r=new Ki(e);return r.request=Rv.request,r.createSocket=ej,r.defaultPort=443,r}function Iz(e){var r=new Ki(e);return r.request=Z8.request,r}function qz(e){var r=new Ki(e);return r.request=Z8.request,r.createSocket=ej,r.defaultPort=443,r}function Ki(e){var r=this;r.options=e||{},r.proxyOptions=r.options.proxy||{},r.maxSockets=r.options.maxSockets||Rv.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)})}Pz.inherits(Ki,Ez.EventEmitter);Ki.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})};Ki.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)}})};Ki.prototype.createSocket=function(r,a){var i=this,t={};i.sockets.push(t);var n=rj({},i.proxyOptions,{method:"CONNECT",path:r.host+":"+r.port,agent:!1});n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+Tz.from(n.proxyAuth).toString("base64")),To("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,h,v){process.nextTick(function(){f(m,h,v)})}function f(m,h,v){if(o.removeAllListeners(),h.removeAllListeners(),m.statusCode===200)Az.equal(v.length,0),To("tunneling connection has established"),i.sockets[i.sockets.indexOf(t)]=h,a(h);else{To("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(),To(`tunneling socket could not be established, cause=%s
95
- `,m.message,m.stack);var h=new Error("tunneling socket could not be established, cause="+m.message);h.code="ECONNRESET",r.request.emit("error",h),i.removeSocket(t)}};Ki.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 ej(e,r){var a=this;Ki.prototype.createSocket.call(a,e,function(i){var t=Sz.connect(0,rj({},a.options,{servername:e.host,socket:i}));a.sockets[a.sockets.indexOf(i)]=t,r(t)})}function rj(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 To;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?To=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)}:To=function(){};qs.debug=To});var oj=B(nj=>{"use strict";var Oz=require("url"),Rz=aj(),tj=["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"],ij=["proxy-authorization"];function Bz(e){var r=e.port,a=e.protocol,i=e.hostname+":";return r?i+=r:a==="https:"?i+="443":i+="80",i}function Dz(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 zz(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 Lz(e,r){var a=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[a,i].join("Over")}function Nz(e){var r=e.uri,a=e.proxy,i=Lz(r,a);return Rz[i]}function tc(e){this.request=e,this.proxyHeaderWhiteList=tj,this.proxyHeaderExclusiveList=[],typeof e.tunnel!="undefined"&&(this.tunnelOverride=e.tunnel)}tc.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride!="undefined"?e.tunnelOverride:r.uri.protocol==="https:"};tc.prototype.setup=function(e){var r=this,a=r.request;if(e=e||{},typeof a.proxy=="string"&&(a.proxy=Oz.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(ij),t=r.proxyHeaderWhiteList.concat(i),n=Dz(a.headers,t);n.host=Bz(a.uri),i.forEach(a.removeHeader,a);var o=Nz(a),s=zz(a,n);return a.agent=o(s),!0};tc.defaultProxyHeaderWhiteList=tj;tc.defaultProxyHeaderExclusiveList=ij;nj.Tunnel=tc});var uj=B((sj,ic)=>{(function(){var e,r,a,i,t,n;typeof performance!="undefined"&&performance!==null&&performance.now?ic.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(ic.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?(ic.exports=function(){return Date.now()-a},a=Date.now()):(ic.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(sj)});var yj=B((rG,bj)=>{"use strict";var Mz=require("http"),cj=require("https"),nc=require("url"),Bv=require("util"),$f=require("stream"),Wf=require("zlib"),Dv=Y2(),Uz=nw(),Hz=K_(),Vz=bf(),lj=yf(),fj=t3(),$z=C3(),Wz=vl(),pj=ev(),Gz=D3().strict,Os=wl(),Kz=fd(),Yz=N3(),Qz=J3().Querystring,Xz=E8().Har,Jz=R8().Auth,Zz=W8().OAuth,eL=G8(),rL=Y8().Multipart,aL=J8().Redirect,zv=oj().Tunnel,Rs=uj(),oc=as().Buffer,hj=Os.safeStringify,tL=Os.isReadStream,iL=Os.toBase64,nL=Os.defer,dj=Os.copy,oL=Os.version,mj=Kz.jar(),vj={};function sL(e,r){var a={};for(var i in r){var t=e.indexOf(i)===-1;t&&(a[i]=r[i])}return a}function uL(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 gj(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function cL(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:gj.call(e.request)}}function qr(e){var r=this;e.har&&(r._har=new Xz(r),e=r._har.options(e)),$f.Stream.call(r);var a=Object.keys(qr.prototype),i=sL(a,e);Wz(r,i),e=uL(a,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new Qz(r),r._auth=new Jz(r),r._oauth=new Zz(r),r._multipart=new rL(r),r._redirect=new aL(r),r._tunnel=new zv(r),r.init(e)}Bv.inherits(qr,$f.Stream);qr.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function at(){qr.debug&&console.error("REQUEST %s",Bv.format.apply(Bv,arguments))}qr.prototype.debug=at;qr.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?dj(r.headers):{};for(var a in r.headers)typeof r.headers[a]=="undefined"&&delete r.headers[a];if(lj.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),at(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=nc.parse(r.uri)),r.uri.href||(r.uri.href=nc.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=nc.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=Yz(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 h=u[m];if(h instanceof Array)for(var v=0;v<h.length;v++)p(m,h[v]);else p(m,h)}}if(e.qs&&r.qs(e.qs),r.uri.path?r.path=r.uri.path:r.path=r.uri.pathname+(r.uri.search||""),r.path.length===0&&(r.path="/"),e.aws&&r.aws(e.aws),e.hawk&&r.hawk(e.hawk),e.httpSignature&&r.httpSignature(e.httpSignature),e.auth&&(Object.prototype.hasOwnProperty.call(e.auth,"username")&&(e.auth.user=e.auth.username),Object.prototype.hasOwnProperty.call(e.auth,"password")&&(e.auth.pass=e.auth.password),r.auth(e.auth.user,e.auth.pass,e.auth.sendImmediately,e.auth.bearer)),r.gzip&&!r.hasHeader("accept-encoding")&&r.setHeader("accept-encoding","gzip, deflate"),r.uri.auth&&!r.hasHeader("authorization")){var 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 S=r.proxy.auth.split(":").map(function(I){return r._qs.unescape(I)}),b="Basic "+iL(S.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(Gz(r.body)&&(r.body=oc.from(r.body)),!r.hasHeader("content-length")){var I;typeof r.body=="string"?I=oc.byteLength(r.body):Array.isArray(r.body)?I=r.body.reduce(function(R,W){return R+W.length},0):I=r.body.length,I?r.setHeader("content-length",I):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!pj(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:":Mz,"https:":cj},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=oL();D.major===0&&D.minor<=10?r.agentClass=P==="http:"?fj:fj.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,tL(I))r.hasHeader("content-type")||r.setHeader("content-type",Vz.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)}}),nL(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)pj(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,W){!R&&!isNaN(W)&&r.setHeader("content-length",W),I()})):I(),r.ntick=!0}})};qr.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=nc.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])};qr.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),a=Rs();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=dj(e);delete i.auth,at("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=Rs()-e.startTimeNow,o)){var s=function(){e.timings.lookup=Rs()-e.startTimeNow},u=function(){e.timings.connect=Rs()-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)}};qr.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)}};qr.prototype.onRequestResponse=function(e){var r=this;if(r.timing&&(r.timings.response=Rs()-r.startTimeNow),at("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=Rs()-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),at("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}),at("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){at("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=cL,r.httpModule===cj&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){at("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:mj,t=function(p){try{i.setCookie(p,r.uri.href,{ignoreError:!0})}catch(m){r.emit("error",m)}};if(e.caseless=lj(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:Wf.Z_SYNC_FLUSH,finishFlush:Wf.Z_SYNC_FLUSH};u==="gzip"?(s=Wf.createGunzip(f),e.pipe(s)):u==="deflate"?(s=Wf.createInflate(f),e.pipe(s)):(u!=="identity"&&at("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){at("aborted",r.uri.href);return}r.emit("complete",e)})}at("finish init function",r.uri.href)}};qr.prototype.readResponseBody=function(e){var r=this;at("reading response's body");var a=[],i=0,t=[];r.on("data",function(n){oc.isBuffer(n)?n.length&&(i+=n.length,a.push(n)):t.push(n)}),r.on("end",function(){if(at("end event",r.uri.href),r._aborted){at("aborted",r.uri.href),a=[],i=0;return}if(i?(at("has body",r.uri.href,i),e.body=oc.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{at("invalid JSON received",r.uri.href)}at("emitting complete",r.uri.href),typeof e.body=="undefined"&&!r._json&&(e.body=r.encoding===null?oc.alloc(0):""),r.emit("complete",e,e.body)})};qr.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.clearTimeout(),e.emit("abort")};qr.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)};qr.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=nc.parse(a.uri.href.split("?")[0]+"?"+n),a.url=a.uri,a.path=a.uri.path,a.uri.host==="unix"&&a.enableUnixSocket()),a};qr.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 $z,r._form.on("error",function(a){a.message="form-data: "+a.message,r.emit("error",a),r.abort()}),r._form)};qr.prototype.multipart=function(e){var r=this;return r._multipart.onRequest(e),r._multipart.chunked||(r.body=r._multipart.body),r};qr.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=hj(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=hj(e,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")),typeof r.jsonReviver=="function"&&(r._jsonReviver=r.jsonReviver),r};qr.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};qr.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};qr.prototype.auth=function(e,r,a,i){var t=this;return t._auth.onRequest(e,r,a,i),t};qr.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=Uz.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:Dv.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=Dv.canonicalizeResource(o.resource),a.setHeader("authorization",Dv.authorization(o))}return a};qr.prototype.httpSignature=function(e){var r=this;return Hz.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),at("httpSignature authorization",r.getHeader("authorization")),r};qr.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",eL.header(r.uri,r.method,e))};qr.prototype.oauth=function(e){var r=this;return r._oauth.onRequest(e),r};qr.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:mj,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};qr.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 $f.Stream.prototype.pipe.call(a,e,r),a.pipeDest(e),e;else return a.dests.push(e),$f.Stream.prototype.pipe.call(a,e,r),e};qr.prototype.write=function(){var e=this;if(!e._aborted&&(e._started||e.start(),e.req))return e.req.write.apply(e.req,arguments)};qr.prototype.end=function(e){var r=this;r._aborted||(e&&r.write(e),r._started||r.start(),r.req&&r.req.end())};qr.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0};qr.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1};qr.prototype.destroy=function(){var e=this;this.clearTimeout(),e._ended?e.response&&e.response.destroy():e.end()};qr.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)};qr.defaultProxyHeaderWhiteList=zv.defaultProxyHeaderWhiteList.slice();qr.defaultProxyHeaderExclusiveList=zv.defaultProxyHeaderExclusiveList.slice();qr.prototype.toJSON=gj;bj.exports=qr});var kj=B((aG,wj)=>{"use strict";var sc=vl(),xj=fd(),lL=wl(),fL=lL.paramsHaveRequestBody;function Gf(e,r,a){typeof r=="function"&&(a=r);var i={};return r!==null&&typeof r=="object"?sc(i,r,{uri:e}):typeof e=="string"?sc(i,{uri:e}):sc(i,e),i.callback=a||i.callback,i}function Ta(e,r,a){if(typeof e=="undefined")throw new Error("undefined is not a valid uri or options object.");var i=Gf(e,r,a);if(i.method==="HEAD"&&fL(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new Ta.Request(i)}function Qn(e){var r=e.toUpperCase();return function(a,i,t){var n=Gf(a,i,t);return n.method=r,Ta(n,n.callback)}}Ta.get=Qn("get");Ta.head=Qn("head");Ta.options=Qn("options");Ta.post=Qn("post");Ta.put=Qn("put");Ta.patch=Qn("patch");Ta.del=Qn("delete");Ta.delete=Qn("delete");Ta.jar=function(e){return xj.jar(e)};Ta.cookie=function(e){return xj.parse(e)};function Lv(e,r,a,i){return function(t,n,o){var s=Gf(t,n,o),u={};return sc(!0,u,r,s),u.pool=s.pool||r.pool,i&&(u.method=i.toUpperCase()),typeof a=="function"&&(e=a),e(u,u.callback)}}Ta.defaults=function(e,r){var a=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=Lv(a,e,r),t=["get","head","post","put","patch","del","delete"];return t.forEach(function(n){i[n]=Lv(a[n],e,r,n)}),i.cookie=Lv(a.cookie,e,r),i.jar=a.jar,i.defaults=a.defaults,i};Ta.forever=function(e,r){var a={};return r&&sc(a,r),e&&(a.agentOptions=e),a.forever=!0,Ta.defaults(a)};wj.exports=Ta;Ta.Request=yj();Ta.initParams=Gf;Object.defineProperty(Ta,"debug",{enumerable:!0,get:function(){return Ta.Request.debug},set:function(e){Ta.Request.debug=e}})});var jj=B((tG,_j)=>{_j.exports=pL;function pL(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 Aj=B((iG,Ej)=>{var hL=jj();function dL(e){return{mimeType:vL(mL(e)),data:hL(e)}}function mL(e){return e.substring(5,e.indexOf(";"))}var Sj=/^(\w+\/)+/;function vL(e){e=e.toLowerCase();var r=e.match(Sj);return!r||!(r=r[1])?e:e.replace(Sj,r)}Ej.exports=dL});var Tj=B((oG,Pj)=>{"use strict";var uc=mu(),nG=require("path"),gL=Mx().PNG,bL=Gx(),yL=Jx(),xL=e2().GifReader,wL=n2(),kL=require("fs"),_L=kj(),jL=bf(),SL=Aj();function EL(e,r){var a=new gL;a.parse(e,function(i,t){if(i){r(i);return}r(null,uc(new Uint8Array(t.data),[t.width|0,t.height|0,4],[4,4*t.width|0,1],0))})}function AL(e,r){var a;try{a=bL.decode(e)}catch(n){r(n);return}if(!a){r(new Error("Error decoding jpeg"));return}var i=[a.height,a.width,4],t=uc(a.data,i);r(null,t.transpose(1,0))}function PL(e,r){var a;try{a=new xL(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=uc(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=uc(t,i);try{a.decodeAndBlitFrameRGBA(0,t)}catch(p){r(p);return}r(null,n.transpose(1,0))}}function TL(e,r){var a=new wL(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=uc(n,t);yL(i,o),r(null,o.transpose(1,0))}function Kf(e,r,a){switch(e){case"image/png":EL(r,a);break;case"image/jpg":case"image/jpeg":AL(r,a);break;case"image/gif":PL(r,a);break;case"image/bmp":TL(r,a);break;default:a(new Error("Unsupported file type: "+e))}}Pj.exports=function(r,a,i){if(i||(i=a,a=""),Buffer.isBuffer(r)){if(!a){i(new Error("Invalid file type"));return}Kf(a,r,i)}else if(r.indexOf("data:")===0)try{var t=SL(r);t?process.nextTick(function(){Kf(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?_L({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}Kf(a,s,i)}):kL.readFile(r,function(n,o){if(n){i(n);return}if(a=a||jL.lookup(r),!a){i(new Error("Invalid file type"));return}Kf(a,o,i)})}});var qj=B((Yf,Ij)=>{(function(e,r){typeof Yf=="object"&&typeof Ij!="undefined"?r(Yf):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(Yf,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 h(c){return f(c)}function v(c){return p(c)}function x(c,d,A){return u.call(c,d,A)}function S(c,d,A){x(x(c,d,A),void 0,o)}function b(c,d){S(c,d)}function w(c,d){S(c,void 0,d)}function P(c,d,A){return x(c,d,A)}function T(c){x(c,void 0,o)}var O=function(){var c=t&&t.queueMicrotask;if(typeof c=="function")return c;var d=h(void 0);return function(A){return x(d,A)}}();function D(c,d,A){if(typeof c!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(c,d,A)}function I(c,d,A){try{return h(D(c,d,A))}catch(V){return v(V)}}var R=16384,W=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(d){var A=this._back,V=A;A._elements.length===R-1&&(V={_elements:[],_next:void 0}),A._elements.push(d),V!==A&&(this._back=V,A._next=V),++this._size},c.prototype.shift=function(){var d=this._front,A=d,V=this._cursor,te=V+1,Te=d._elements,Ke=Te[V];return te===R&&(A=d._next,te=0),--this._size,this._cursor=te,d!==A&&(this._front=A),Te[V]=void 0,Ke},c.prototype.forEach=function(d){for(var A=this._cursor,V=this._front,te=V._elements;(A!==te.length||V._next!==void 0)&&!(A===te.length&&(V=V._next,te=V._elements,A=0,te.length===0));)d(te[A]),++A},c.prototype.peek=function(){var d=this._front,A=this._cursor;return d._elements[A]},c}();function z(c,d){c._ownerReadableStream=d,d._reader=c,d._state==="readable"?$(c):d._state==="closed"?ee(c):Y(c,d._storedError)}function Q(c,d){var A=c._ownerReadableStream;return to(A,d)}function Z(c){c._ownerReadableStream._state==="readable"?ue(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):ae(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 K(c){return new TypeError("Cannot "+c+" a stream using a released reader")}function $(c){c._closedPromise=m(function(d,A){c._closedPromise_resolve=d,c._closedPromise_reject=A})}function Y(c,d){$(c),ue(c,d)}function ee(c){$(c),_e(c)}function ue(c,d){c._closedPromise_reject!==void 0&&(T(c._closedPromise),c._closedPromise_reject(d),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}function ae(c,d){Y(c,d)}function _e(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}var oe=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 ie(c){return typeof c=="object"||typeof c=="function"}function De(c,d){if(c!==void 0&&!ie(c))throw new TypeError(d+" is not an object.")}function me(c,d){if(typeof c!="function")throw new TypeError(d+" is not a function.")}function H(c){return typeof c=="object"&&c!==null||typeof c=="function"}function J(c,d){if(!H(c))throw new TypeError(d+" is not an object.")}function ze(c,d,A){if(c===void 0)throw new TypeError("Parameter "+d+" is required in '"+A+"'.")}function be(c,d,A){if(c===void 0)throw new TypeError(d+" is required in '"+A+"'.")}function Fe(c){return Number(c)}function sr(c){return c===0?0:c}function nr(c){return sr(L(c))}function Sr(c,d){var A=0,V=Number.MAX_SAFE_INTEGER,te=Number(c);if(te=sr(te),!xe(te))throw new TypeError(d+" is not a finite number");if(te=nr(te),te<A||te>V)throw new TypeError(d+" is outside the accepted range of "+A+" to "+V+", inclusive");return!xe(te)||te===0?0:te}function N(c,d){if(!wn(c))throw new TypeError(d+" is not a ReadableStream.")}function Se(c){return new $e(c)}function Ae(c,d){c._reader._readRequests.push(d)}function we(c,d,A){var V=c._reader,te=V._readRequests.shift();A?te._closeSteps():te._chunkSteps(d)}function je(c){return c._reader._readRequests.length}function Le(c){var d=c._reader;return!(d===void 0||!We(d))}var $e=function(){function c(d){if(ze(d,1,"ReadableStreamDefaultReader"),N(d,"First parameter"),kn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");z(this,d),this._readRequests=new W}return Object.defineProperty(c.prototype,"closed",{get:function(){return We(this)?this._closedPromise:v(de("closed"))},enumerable:!1,configurable:!0}),c.prototype.cancel=function(d){return d===void 0&&(d=void 0),We(this)?this._ownerReadableStream===void 0?v(K("cancel")):Q(this,d):v(de("cancel"))},c.prototype.read=function(){if(!We(this))return v(de("read"));if(this._ownerReadableStream===void 0)return v(K("read from"));var d,A,V=m(function(Te,Ke){d=Te,A=Ke}),te={_chunkSteps:function(Te){return d({value:Te,done:!1})},_closeSteps:function(){return d({value:void 0,done:!0})},_errorSteps:function(Te){return A(Te)}};return he(this,te),V},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");Z(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,d){var A=c._ownerReadableStream;A._disturbed=!0,A._state==="closed"?d._closeSteps():A._state==="errored"?d._errorSteps(A._storedError):A._readableStreamController[Oe](d)}function de(c){return new TypeError("ReadableStreamDefaultReader.prototype."+c+" can only be used on a ReadableStreamDefaultReader")}var X,ke;typeof r.asyncIterator=="symbol"&&(ke=(X={},X[r.asyncIterator]=function(){return this},X),Object.defineProperty(ke,r.asyncIterator,{enumerable:!1}));var Be=function(){function c(d,A){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=d,this._preventCancel=A}return c.prototype.next=function(){var d=this,A=function(){return d._nextSteps()};return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,A,A):A(),this._ongoingPromise},c.prototype.return=function(d){var A=this,V=function(){return A._returnSteps(d)};return this._ongoingPromise?P(this._ongoingPromise,V,V):V()},c.prototype._nextSteps=function(){var d=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var A=this._reader;if(A._ownerReadableStream===void 0)return v(K("iterate"));var V,te,Te=m(function(fr,Cr){V=fr,te=Cr}),Ke={_chunkSteps:function(fr){d._ongoingPromise=void 0,O(function(){return V({value:fr,done:!1})})},_closeSteps:function(){d._ongoingPromise=void 0,d._isFinished=!0,Z(A),V({value:void 0,done:!0})},_errorSteps:function(fr){d._ongoingPromise=void 0,d._isFinished=!0,Z(A),te(fr)}};return he(A,Ke),Te},c.prototype._returnSteps=function(d){if(this._isFinished)return Promise.resolve({value:d,done:!0});this._isFinished=!0;var A=this._reader;if(A._ownerReadableStream===void 0)return v(K("finish iterating"));if(!this._preventCancel){var V=Q(A,d);return Z(A),P(V,function(){return{value:d,done:!0}})}return Z(A),h({value:d,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,d){var A=Se(c),V=new Be(A,d),te=Object.create(Ye);return te._asyncIteratorImpl=V,te}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 Er=Number.isNaN||function(c){return c!==c};function xr(c){return!(!Pr(c)||c===1/0)}function Pr(c){return!(typeof c!="number"||Er(c)||c<0)}function br(c){var d=c._queue.shift();return c._queueTotalSize-=d.size,c._queueTotalSize<0&&(c._queueTotalSize=0),d.value}function $r(c,d,A){if(A=Number(A),!xr(A))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");c._queue.push({value:d,size:A}),c._queueTotalSize+=A}function Nr(c){var d=c._queue.peek();return d.value}function Hr(c){c._queue=new W,c._queueTotalSize=0}function ta(c){return c.slice()}function Fa(c,d,A,V,te){new Uint8Array(c).set(new Uint8Array(A,V,te),d)}function st(c){return c}function ia(c){return!1}var fa=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"view",{get:function(){if(!Da(this))throw He("view");return this._view},enumerable:!1,configurable:!0}),c.prototype.respond=function(d){if(!Da(this))throw He("respond");if(ze(d,1,"respond"),d=Sr(d,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");ia(this._view.buffer),er(this._associatedReadableByteStreamController,d)},c.prototype.respondWithNewView=function(d){if(!Da(this))throw He("respondWithNewView");if(ze(d,1,"respondWithNewView"),!ArrayBuffer.isView(d))throw new TypeError("You can only respond with array buffer views");if(d.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(d.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");dr(this._associatedReadableByteStreamController,d)},c}();Object.defineProperties(fa.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(fa.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var pa=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 d=this._pendingPullIntos.peek(),A=new Uint8Array(d.buffer,d.byteOffset+d.bytesFilled,d.byteLength-d.bytesFilled),V=Object.create(fa.prototype);Ve(V,this,A),this._byobRequest=V}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 d=this._controlledReadableByteStream._state;if(d!=="readable")throw new TypeError("The stream (in "+d+" state) is not in the readable state and cannot be closed");tr(this)},c.prototype.enqueue=function(d){if(!Ca(this))throw Ge("enqueue");if(ze(d,1,"enqueue"),!ArrayBuffer.isView(d))throw new TypeError("chunk must be an array buffer view");if(d.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(d.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var 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,d)},c.prototype.error=function(d){if(d===void 0&&(d=void 0),!Ca(this))throw Ge("error");Ne(this,d)},c.prototype[Pe]=function(d){if(this._pendingPullIntos.length>0){var A=this._pendingPullIntos.peek();A.bytesFilled=0}Hr(this);var V=this._cancelAlgorithm(d);return qe(this),V},c.prototype[Oe]=function(d){var A=this._controlledReadableByteStream;if(this._queueTotalSize>0){var V=this._queue.shift();this._queueTotalSize-=V.byteLength,l(this);var te=new Uint8Array(V.buffer,V.byteOffset,V.byteLength);d._chunkSteps(te);return}var Te=this._autoAllocateChunkSize;if(Te!==void 0){var Ke=void 0;try{Ke=new ArrayBuffer(Te)}catch(Cr){d._errorSteps(Cr);return}var fr={buffer:Ke,byteOffset:0,byteLength:Te,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(fr)}Ae(A,d),ja(this)},c}();Object.defineProperties(pa.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(pa.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Ca(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableByteStream"))}function Da(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_associatedReadableByteStreamController"))}function ja(c){var d=ar(c);if(!!d){if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;var A=c._pullAlgorithm();S(A,function(){c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,ja(c))},function(V){Ne(c,V)})}}function Nt(c){_(c),c._pendingPullIntos=new W}function Wr(c,d){var A=!1;c._state==="closed"&&(A=!0);var V=yt(d);d.readerType==="default"?we(c,V,A):ne(c,V,A)}function yt(c){var d=c.bytesFilled,A=c.elementSize;return new c.viewConstructor(c.buffer,c.byteOffset,d/A)}function k(c,d,A,V){c._queue.push({buffer:d,byteOffset:A,byteLength:V}),c._queueTotalSize+=V}function y(c,d){var A=d.elementSize,V=d.bytesFilled-d.bytesFilled%A,te=Math.min(c._queueTotalSize,d.byteLength-d.bytesFilled),Te=d.bytesFilled+te,Ke=Te-Te%A,fr=te,Cr=!1;Ke>V&&(fr=Ke-d.bytesFilled,Cr=!0);for(var ca=c._queue;fr>0;){var da=ca.peek(),Ia=Math.min(fr,da.byteLength),it=d.byteOffset+d.bytesFilled;Fa(d.buffer,it,da.buffer,da.byteOffset,Ia),da.byteLength===Ia?ca.shift():(da.byteOffset+=Ia,da.byteLength-=Ia),c._queueTotalSize-=Ia,g(c,Ia,d),fr-=Ia}return Cr}function g(c,d,A){_(c),A.bytesFilled+=d}function l(c){c._queueTotalSize===0&&c._closeRequested?(qe(c),Ns(c._controlledReadableByteStream)):ja(c)}function _(c){c._byobRequest!==null&&(c._byobRequest._associatedReadableByteStreamController=void 0,c._byobRequest._view=null,c._byobRequest=null)}function C(c){for(;c._pendingPullIntos.length>0;){if(c._queueTotalSize===0)return;var d=c._pendingPullIntos.peek();y(c,d)&&(Ie(c),Wr(c._controlledReadableByteStream,d))}}function M(c,d,A){var V=c._controlledReadableByteStream,te=1;d.constructor!==DataView&&(te=d.constructor.BYTES_PER_ELEMENT);var Te=d.constructor,Ke=st(d.buffer),fr={buffer:Ke,byteOffset:d.byteOffset,byteLength:d.byteLength,bytesFilled:0,elementSize:te,viewConstructor:Te,readerType:"byob"};if(c._pendingPullIntos.length>0){c._pendingPullIntos.push(fr),Re(V,A);return}if(V._state==="closed"){var Cr=new Te(fr.buffer,fr.byteOffset,0);A._closeSteps(Cr);return}if(c._queueTotalSize>0){if(y(c,fr)){var ca=yt(fr);l(c),A._chunkSteps(ca);return}if(c._closeRequested){var da=new TypeError("Insufficient bytes to fill elements in the given buffer");Ne(c,da),A._errorSteps(da);return}}c._pendingPullIntos.push(fr),Re(V,A),ja(c)}function re(c,d){d.buffer=st(d.buffer);var A=c._controlledReadableByteStream;if(Ee(A))for(;se(A)>0;){var V=Ie(c);Wr(A,V)}}function ce(c,d,A){if(A.bytesFilled+d>A.byteLength)throw new RangeError("bytesWritten out of range");if(g(c,d,A),!(A.bytesFilled<A.elementSize)){Ie(c);var V=A.bytesFilled%A.elementSize;if(V>0){var te=A.byteOffset+A.bytesFilled,Te=A.buffer.slice(te-V,te);k(c,Te,0,Te.byteLength)}A.buffer=st(A.buffer),A.bytesFilled-=V,Wr(c._controlledReadableByteStream,A),C(c)}}function Ce(c,d){var A=c._pendingPullIntos.peek(),V=c._controlledReadableByteStream._state;if(V==="closed"){if(d!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");re(c,A)}else ce(c,d,A);ja(c)}function Ie(c){var d=c._pendingPullIntos.shift();return _(c),d}function ar(c){var d=c._controlledReadableByteStream;if(d._state!=="readable"||c._closeRequested||!c._started)return!1;if(Le(d)&&je(d)>0||Ee(d)&&se(d)>0)return!0;var A=Qe(c);return A>0}function qe(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0}function tr(c){var d=c._controlledReadableByteStream;if(!(c._closeRequested||d._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 V=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ne(c,V),V}}qe(c),Ns(d)}}function Ze(c,d){var A=c._controlledReadableByteStream;if(!(c._closeRequested||A._state!=="readable")){var V=d.buffer,te=d.byteOffset,Te=d.byteLength,Ke=st(V);if(Le(A))if(je(A)===0)k(c,Ke,te,Te);else{var fr=new Uint8Array(Ke,te,Te);we(A,fr,!1)}else Ee(A)?(k(c,Ke,te,Te),C(c)):k(c,Ke,te,Te);ja(c)}}function Ne(c,d){var A=c._controlledReadableByteStream;A._state==="readable"&&(Nt(c),Hr(c),qe(c),x0(A,d))}function Qe(c){var d=c._controlledReadableByteStream._state;return d==="errored"?null:d==="closed"?0:c._strategyHWM-c._queueTotalSize}function er(c,d){if(d=Number(d),!xr(d))throw new RangeError("bytesWritten must be a finite");Ce(c,d)}function dr(c,d){var A=c._pendingPullIntos.peek();if(A.byteOffset+A.bytesFilled!==d.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(A.byteLength!==d.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");A.buffer=d.buffer,Ce(c,d.byteLength)}function cr(c,d,A,V,te,Te,Ke){d._controlledReadableByteStream=c,d._pullAgain=!1,d._pulling=!1,d._byobRequest=null,d._queue=d._queueTotalSize=void 0,Hr(d),d._closeRequested=!1,d._started=!1,d._strategyHWM=Te,d._pullAlgorithm=V,d._cancelAlgorithm=te,d._autoAllocateChunkSize=Ke,d._pendingPullIntos=new W,c._readableStreamController=d;var fr=A();S(h(fr),function(){d._started=!0,ja(d)},function(Cr){Ne(d,Cr)})}function Xe(c,d,A){var V=Object.create(pa.prototype),te=function(){},Te=function(){return h(void 0)},Ke=function(){return h(void 0)};d.start!==void 0&&(te=function(){return d.start(V)}),d.pull!==void 0&&(Te=function(){return d.pull(V)}),d.cancel!==void 0&&(Ke=function(Cr){return d.cancel(Cr)});var fr=d.autoAllocateChunkSize;if(fr===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");cr(c,V,te,Te,Ke,A,fr)}function Ve(c,d,A){c._associatedReadableByteStreamController=d,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,d){c._reader._readIntoRequests.push(d)}function ne(c,d,A){var V=c._reader,te=V._readIntoRequests.shift();A?te._closeSteps(d):te._chunkSteps(d)}function se(c){return c._reader._readIntoRequests.length}function Ee(c){var d=c._reader;return!(d===void 0||!fe(d))}var ve=function(){function c(d){if(ze(d,1,"ReadableStreamBYOBReader"),N(d,"First parameter"),kn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Ca(d._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");z(this,d),this._readIntoRequests=new W}return Object.defineProperty(c.prototype,"closed",{get:function(){return fe(this)?this._closedPromise:v(or("closed"))},enumerable:!1,configurable:!0}),c.prototype.cancel=function(d){return d===void 0&&(d=void 0),fe(this)?this._ownerReadableStream===void 0?v(K("cancel")):Q(this,d):v(or("cancel"))},c.prototype.read=function(d){if(!fe(this))return v(or("read"));if(!ArrayBuffer.isView(d))return v(new TypeError("view must be an array buffer view"));if(d.byteLength===0)return v(new TypeError("view must have non-zero byteLength"));if(d.buffer.byteLength===0)return v(new TypeError("view's buffer must have non-zero byteLength"));if(this._ownerReadableStream===void 0)return v(K("read from"));var A,V,te=m(function(Ke,fr){A=Ke,V=fr}),Te={_chunkSteps:function(Ke){return A({value:Ke,done:!1})},_closeSteps:function(Ke){return A({value:Ke,done:!0})},_errorSteps:function(Ke){return V(Ke)}};return ye(this,d,Te),te},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");Z(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,d,A){var V=c._ownerReadableStream;V._disturbed=!0,V._state==="errored"?A._errorSteps(V._storedError):M(V._readableStreamController,d,A)}function or(c){return new TypeError("ReadableStreamBYOBReader.prototype."+c+" can only be used on a ReadableStreamBYOBReader")}function pr(c,d){var A=c.highWaterMark;if(A===void 0)return d;if(Er(A)||A<0)throw new RangeError("Invalid highWaterMark");return A}function lr(c){var d=c.size;return d||function(){return 1}}function hr(c,d){De(c,d);var A=c==null?void 0:c.highWaterMark,V=c==null?void 0:c.size;return{highWaterMark:A===void 0?void 0:Fe(A),size:V===void 0?void 0:U(V,d+" has member 'size' that")}}function U(c,d){return me(c,d),function(A){return Fe(c(A))}}function wr(c,d){De(c,d);var A=c==null?void 0:c.abort,V=c==null?void 0:c.close,te=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,d+" has member 'abort' that"),close:V===void 0?void 0:kr(V,c,d+" has member 'close' that"),start:te===void 0?void 0:vr(te,c,d+" has member 'start' that"),write:Ke===void 0?void 0:Ar(Ke,c,d+" has member 'write' that"),type:Te}}function Tr(c,d,A){return me(c,A),function(V){return I(c,d,[V])}}function kr(c,d,A){return me(c,A),function(){return I(c,d,[])}}function vr(c,d,A){return me(c,A),function(V){return D(c,d,[V])}}function Ar(c,d,A){return me(c,A),function(V,te){return I(c,d,[V,te])}}function _r(c,d){if(!F(c))throw new TypeError(d+" is not a WritableStream.")}var Vr=function(){function c(d,A){d===void 0&&(d={}),A===void 0&&(A={}),d===void 0?d=null:J(d,"First parameter");var V=hr(A,"Second parameter"),te=wr(d,"First parameter");E(this);var Te=te.type;if(Te!==void 0)throw new RangeError("Invalid type is specified");var Ke=lr(V),fr=pr(V,1);e4(this,te,fr,Ke)}return Object.defineProperty(c.prototype,"locked",{get:function(){if(!F(this))throw jc("locked");return G(this)},enumerable:!1,configurable:!0}),c.prototype.abort=function(d){return d===void 0&&(d=void 0),F(this)?G(this)?v(new TypeError("Cannot abort a stream that already has a writer")):pe(this,d):v(jc("abort"))},c.prototype.close=function(){return F(this)?G(this)?v(new TypeError("Cannot close a stream that already has a writer")):ha(this)?v(new TypeError("Cannot close an already-closing stream")):ge(this):v(jc("close"))},c.prototype.getWriter=function(){if(!F(this))throw jc("getWriter");return Fr(this)},c}();Object.defineProperties(Vr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Vr.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function Fr(c){return new Bs(c)}function j(c,d,A,V,te,Te){te===void 0&&(te=1),Te===void 0&&(Te=function(){return 1});var Ke=Object.create(Vr.prototype);E(Ke);var fr=Object.create(Fo.prototype);return s0(Ke,fr,c,d,A,V,te,Te),Ke}function E(c){c._state="writable",c._storedError=void 0,c._writer=void 0,c._writableStreamController=void 0,c._writeRequests=new W,c._inFlightWriteRequest=void 0,c._closeRequest=void 0,c._inFlightCloseRequest=void 0,c._pendingAbortRequest=void 0,c._backpressure=!1}function F(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_writableStreamController"))}function G(c){return c._writer!==void 0}function pe(c,d){var A=c._state;if(A==="closed"||A==="errored")return h(void 0);if(c._pendingAbortRequest!==void 0)return c._pendingAbortRequest._promise;var V=!1;A==="erroring"&&(V=!0,d=void 0);var te=m(function(Te,Ke){c._pendingAbortRequest={_promise:void 0,_resolve:Te,_reject:Ke,_reason:d,_wasAlreadyErroring:V}});return c._pendingAbortRequest._promise=te,V||Or(c,d),te}function ge(c){var d=c._state;if(d==="closed"||d==="errored")return v(new TypeError("The stream (in "+d+" state) is not in the writable state and cannot be closed"));var A=m(function(te,Te){var Ke={_resolve:te,_reject:Te};c._closeRequest=Ke}),V=c._writer;return V!==void 0&&c._backpressure&&d==="writable"&&ap(V),r4(c._writableStreamController),A}function Me(c){var d=m(function(A,V){var te={_resolve:A,_reject:V};c._writeRequests.push(te)});return d}function rr(c,d){var A=c._state;if(A==="writable"){Or(c,d);return}ua(c)}function Or(c,d){var A=c._writableStreamController;c._state="erroring",c._storedError=d;var V=c._writer;V!==void 0&&t0(V,d),!At(c)&&A._started&&ua(c)}function ua(c){c._state="errored",c._writableStreamController[le]();var d=c._storedError;if(c._writeRequests.forEach(function(te){te._reject(d)}),c._writeRequests=new W,c._pendingAbortRequest===void 0){Yi(c);return}var A=c._pendingAbortRequest;if(c._pendingAbortRequest=void 0,A._wasAlreadyErroring){A._reject(d),Yi(c);return}var V=c._writableStreamController[oe](A._reason);S(V,function(){A._resolve(),Yi(c)},function(te){A._reject(te),Yi(c)})}function ut(c){c._inFlightWriteRequest._resolve(void 0),c._inFlightWriteRequest=void 0}function tt(c,d){c._inFlightWriteRequest._reject(d),c._inFlightWriteRequest=void 0,rr(c,d)}function Mt(c){c._inFlightCloseRequest._resolve(void 0),c._inFlightCloseRequest=void 0;var d=c._state;d==="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&&f0(A)}function Jn(c,d){c._inFlightCloseRequest._reject(d),c._inFlightCloseRequest=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._reject(d),c._pendingAbortRequest=void 0),rr(c,d)}function ha(c){return!(c._closeRequest===void 0&&c._inFlightCloseRequest===void 0)}function At(c){return!(c._inFlightWriteRequest===void 0&&c._inFlightCloseRequest===void 0)}function Zn(c){c._inFlightCloseRequest=c._closeRequest,c._closeRequest=void 0}function ui(c){c._inFlightWriteRequest=c._writeRequests.shift()}function Yi(c){c._closeRequest!==void 0&&(c._closeRequest._reject(c._storedError),c._closeRequest=void 0);var d=c._writer;d!==void 0&&ep(d,c._storedError)}function wc(c,d){var A=c._writer;A!==void 0&&d!==c._backpressure&&(d?u4(A):ap(A)),c._backpressure=d}var Bs=function(){function c(d){if(ze(d,1,"WritableStreamDefaultWriter"),_r(d,"First parameter"),G(d))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=d,d._writer=this;var A=d._state;if(A==="writable")!ha(d)&&d._backpressure?Ec(this):p0(this),Sc(this);else if(A==="erroring")rp(this,d._storedError),Sc(this);else if(A==="closed")p0(this),o4(this);else{var V=d._storedError;rp(this,V),l0(this,V)}}return Object.defineProperty(c.prototype,"closed",{get:function(){return eo(this)?this._closedPromise:v(ro("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!eo(this))throw ro("desiredSize");if(this._ownerWritableStream===void 0)throw Ds("desiredSize");return Jj(this)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ready",{get:function(){return eo(this)?this._readyPromise:v(ro("ready"))},enumerable:!1,configurable:!0}),c.prototype.abort=function(d){return d===void 0&&(d=void 0),eo(this)?this._ownerWritableStream===void 0?v(Ds("abort")):Yj(this,d):v(ro("abort"))},c.prototype.close=function(){if(!eo(this))return v(ro("close"));var d=this._ownerWritableStream;return d===void 0?v(Ds("close")):ha(d)?v(new TypeError("Cannot close an already-closing stream")):a0(this)},c.prototype.releaseLock=function(){if(!eo(this))throw ro("releaseLock");var d=this._ownerWritableStream;d!==void 0&&i0(this)},c.prototype.write=function(d){return d===void 0&&(d=void 0),eo(this)?this._ownerWritableStream===void 0?v(Ds("write to")):n0(this,d):v(ro("write"))},c}();Object.defineProperties(Bs.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(Bs.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function eo(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_ownerWritableStream"))}function Yj(c,d){var A=c._ownerWritableStream;return pe(A,d)}function a0(c){var d=c._ownerWritableStream;return ge(d)}function Qj(c){var d=c._ownerWritableStream,A=d._state;return ha(d)||A==="closed"?h(void 0):A==="errored"?v(d._storedError):a0(c)}function Xj(c,d){c._closedPromiseState==="pending"?ep(c,d):s4(c,d)}function t0(c,d){c._readyPromiseState==="pending"?h0(c,d):c4(c,d)}function Jj(c){var d=c._ownerWritableStream,A=d._state;return A==="errored"||A==="erroring"?null:A==="closed"?0:u0(d._writableStreamController)}function i0(c){var d=c._ownerWritableStream,A=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");t0(c,A),Xj(c,A),d._writer=void 0,c._ownerWritableStream=void 0}function n0(c,d){var A=c._ownerWritableStream,V=A._writableStreamController,te=a4(V,d);if(A!==c._ownerWritableStream)return v(Ds("write to"));var Te=A._state;if(Te==="errored")return v(A._storedError);if(ha(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 t4(V,d,te),Ke}var o0={},Fo=function(){function c(){throw new TypeError("Illegal constructor")}return c.prototype.error=function(d){if(d===void 0&&(d=void 0),!Zj(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");var A=this._controlledWritableStream._state;A==="writable"&&c0(this,d)},c.prototype[oe]=function(d){var A=this._abortAlgorithm(d);return kc(this),A},c.prototype[le]=function(){Hr(this)},c}();Object.defineProperties(Fo.prototype,{error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Fo.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Zj(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledWritableStream"))}function s0(c,d,A,V,te,Te,Ke,fr){d._controlledWritableStream=c,c._writableStreamController=d,d._queue=void 0,d._queueTotalSize=void 0,Hr(d),d._started=!1,d._strategySizeAlgorithm=fr,d._strategyHWM=Ke,d._writeAlgorithm=V,d._closeAlgorithm=te,d._abortAlgorithm=Te;var Cr=Zf(d);wc(c,Cr);var ca=A(),da=h(ca);S(da,function(){d._started=!0,_c(d)},function(Ia){d._started=!0,rr(c,Ia)})}function e4(c,d,A,V){var te=Object.create(Fo.prototype),Te=function(){},Ke=function(){return h(void 0)},fr=function(){return h(void 0)},Cr=function(){return h(void 0)};d.start!==void 0&&(Te=function(){return d.start(te)}),d.write!==void 0&&(Ke=function(ca){return d.write(ca,te)}),d.close!==void 0&&(fr=function(){return d.close()}),d.abort!==void 0&&(Cr=function(ca){return d.abort(ca)}),s0(c,te,Te,Ke,fr,Cr,A,V)}function kc(c){c._writeAlgorithm=void 0,c._closeAlgorithm=void 0,c._abortAlgorithm=void 0,c._strategySizeAlgorithm=void 0}function r4(c){$r(c,o0,0),_c(c)}function a4(c,d){try{return c._strategySizeAlgorithm(d)}catch(A){return Jf(c,A),1}}function u0(c){return c._strategyHWM-c._queueTotalSize}function t4(c,d,A){try{$r(c,d,A)}catch(Te){Jf(c,Te);return}var V=c._controlledWritableStream;if(!ha(V)&&V._state==="writable"){var te=Zf(c);wc(V,te)}_c(c)}function _c(c){var d=c._controlledWritableStream;if(!!c._started&&d._inFlightWriteRequest===void 0){var A=d._state;if(A==="erroring"){ua(d);return}if(c._queue.length!==0){var V=Nr(c);V===o0?i4(c):n4(c,V)}}}function Jf(c,d){c._controlledWritableStream._state==="writable"&&c0(c,d)}function i4(c){var d=c._controlledWritableStream;Zn(d),br(c);var A=c._closeAlgorithm();kc(c),S(A,function(){Mt(d)},function(V){Jn(d,V)})}function n4(c,d){var A=c._controlledWritableStream;ui(A);var V=c._writeAlgorithm(d);S(V,function(){ut(A);var te=A._state;if(br(c),!ha(A)&&te==="writable"){var Te=Zf(c);wc(A,Te)}_c(c)},function(te){A._state==="writable"&&kc(c),tt(A,te)})}function Zf(c){var d=u0(c);return d<=0}function c0(c,d){var A=c._controlledWritableStream;kc(c),Or(A,d)}function jc(c){return new TypeError("WritableStream.prototype."+c+" can only be used on a WritableStream")}function ro(c){return new TypeError("WritableStreamDefaultWriter.prototype."+c+" can only be used on a WritableStreamDefaultWriter")}function Ds(c){return new TypeError("Cannot "+c+" a stream using a released writer")}function Sc(c){c._closedPromise=m(function(d,A){c._closedPromise_resolve=d,c._closedPromise_reject=A,c._closedPromiseState="pending"})}function l0(c,d){Sc(c),ep(c,d)}function o4(c){Sc(c),f0(c)}function ep(c,d){c._closedPromise_reject!==void 0&&(T(c._closedPromise),c._closedPromise_reject(d),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="rejected")}function s4(c,d){l0(c,d)}function f0(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 Ec(c){c._readyPromise=m(function(d,A){c._readyPromise_resolve=d,c._readyPromise_reject=A}),c._readyPromiseState="pending"}function rp(c,d){Ec(c),h0(c,d)}function p0(c){Ec(c),ap(c)}function h0(c,d){c._readyPromise_reject!==void 0&&(T(c._readyPromise),c._readyPromise_reject(d),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="rejected")}function u4(c){Ec(c)}function c4(c,d){rp(c,d)}function ap(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 l4(c){if(typeof c!="object"||c===null)return!1;try{return typeof c.aborted=="boolean"}catch{return!1}}var d0=typeof DOMException!="undefined"?DOMException:void 0;function f4(c){if(!(typeof c=="function"||typeof c=="object"))return!1;try{return new c,!0}catch{return!1}}function p4(){var c=function(A,V){this.message=A||"",this.name=V||"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 h4=f4(d0)?d0:p4();function m0(c,d,A,V,te,Te){var Ke=Se(c),fr=Fr(d);c._disturbed=!0;var Cr=!1,ca=h(void 0);return m(function(da,Ia){var it;if(Te!==void 0){if(it=function(){var Gr=new h4("Aborted","AbortError"),Ga=[];V||Ga.push(function(){return d._state==="writable"?pe(d,Gr):h(void 0)}),te||Ga.push(function(){return c._state==="readable"?to(c,Gr):h(void 0)}),oo(function(){return Promise.all(Ga.map(function(Tt){return Tt()}))},!0,Gr)},Te.aborted){it();return}Te.addEventListener("abort",it)}function Us(){return m(function(Gr,Ga){function Tt(Mc){Mc?Gr():x(sp(),Tt,Ga)}Tt(!1)})}function sp(){return Cr?h(!0):x(fr._readyPromise,function(){return m(function(Gr,Ga){he(Ke,{_chunkSteps:function(Tt){ca=x(n0(fr,Tt),void 0,a),Gr(!1)},_closeSteps:function(){return Gr(!0)},_errorSteps:Ga})})})}if(Qi(c,Ke._closedPromise,function(Gr){V?Lc(!0,Gr):oo(function(){return pe(d,Gr)},!0,Gr)}),Qi(d,fr._closedPromise,function(Gr){te?Lc(!0,Gr):oo(function(){return to(c,Gr)},!0,Gr)}),no(c,Ke._closedPromise,function(){A?Lc():oo(function(){return Qj(fr)})}),ha(d)||d._state==="closed"){var qo=new TypeError("the destination writable stream closed before all data could be piped to it");te?Lc(!0,qo):oo(function(){return to(c,qo)},!0,qo)}T(Us());function Pt(){var Gr=ca;return x(ca,function(){return Gr!==ca?Pt():void 0})}function Qi(Gr,Ga,Tt){Gr._state==="errored"?Tt(Gr._storedError):w(Ga,Tt)}function no(Gr,Ga,Tt){Gr._state==="closed"?Tt():b(Ga,Tt)}function oo(Gr,Ga,Tt){if(Cr)return;Cr=!0,d._state==="writable"&&!ha(d)?b(Pt(),Mc):Mc();function Mc(){S(Gr(),function(){return Nc(Ga,Tt)},function(U4){return Nc(!0,U4)})}}function Lc(Gr,Ga){Cr||(Cr=!0,d._state==="writable"&&!ha(d)?b(Pt(),function(){return Nc(Gr,Ga)}):Nc(Gr,Ga))}function Nc(Gr,Ga){i0(fr),Z(Ke),Te!==void 0&&Te.removeEventListener("abort",it),Gr?Ia(Ga):da(void 0)}})}var Co=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!Ac(this))throw Fc("desiredSize");return tp(this)},enumerable:!1,configurable:!0}),c.prototype.close=function(){if(!Ac(this))throw Fc("close");if(!Io(this))throw new TypeError("The stream is not in a state that permits close");Ls(this)},c.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Ac(this))throw Fc("enqueue");if(!Io(this))throw new TypeError("The stream is not in a state that permits enqueue");return Tc(this,d)},c.prototype.error=function(d){if(d===void 0&&(d=void 0),!Ac(this))throw Fc("error");xn(this,d)},c.prototype[Pe]=function(d){Hr(this);var A=this._cancelAlgorithm(d);return Pc(this),A},c.prototype[Oe]=function(d){var A=this._controlledReadableStream;if(this._queue.length>0){var V=br(this);this._closeRequested&&this._queue.length===0?(Pc(this),Ns(A)):zs(this),d._chunkSteps(V)}else Ae(A,d),zs(this)},c}();Object.defineProperties(Co.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Co.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Ac(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableStream"))}function zs(c){var d=v0(c);if(!!d){if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;var A=c._pullAlgorithm();S(A,function(){c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,zs(c))},function(V){xn(c,V)})}}function v0(c){var d=c._controlledReadableStream;if(!Io(c)||!c._started)return!1;if(kn(d)&&je(d)>0)return!0;var A=tp(c);return A>0}function Pc(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0,c._strategySizeAlgorithm=void 0}function Ls(c){if(!!Io(c)){var d=c._controlledReadableStream;c._closeRequested=!0,c._queue.length===0&&(Pc(c),Ns(d))}}function Tc(c,d){if(!!Io(c)){var A=c._controlledReadableStream;if(kn(A)&&je(A)>0)we(A,d,!1);else{var V=void 0;try{V=c._strategySizeAlgorithm(d)}catch(te){throw xn(c,te),te}try{$r(c,d,V)}catch(te){throw xn(c,te),te}}zs(c)}}function xn(c,d){var A=c._controlledReadableStream;A._state==="readable"&&(Hr(c),Pc(c),x0(A,d))}function tp(c){var d=c._controlledReadableStream._state;return d==="errored"?null:d==="closed"?0:c._strategyHWM-c._queueTotalSize}function d4(c){return!v0(c)}function Io(c){var d=c._controlledReadableStream._state;return!c._closeRequested&&d==="readable"}function g0(c,d,A,V,te,Te,Ke){d._controlledReadableStream=c,d._queue=void 0,d._queueTotalSize=void 0,Hr(d),d._started=!1,d._closeRequested=!1,d._pullAgain=!1,d._pulling=!1,d._strategySizeAlgorithm=Ke,d._strategyHWM=Te,d._pullAlgorithm=V,d._cancelAlgorithm=te,c._readableStreamController=d;var fr=A();S(h(fr),function(){d._started=!0,zs(d)},function(Cr){xn(d,Cr)})}function m4(c,d,A,V){var te=Object.create(Co.prototype),Te=function(){},Ke=function(){return h(void 0)},fr=function(){return h(void 0)};d.start!==void 0&&(Te=function(){return d.start(te)}),d.pull!==void 0&&(Ke=function(){return d.pull(te)}),d.cancel!==void 0&&(fr=function(Cr){return d.cancel(Cr)}),g0(c,te,Te,Ke,fr,A,V)}function Fc(c){return new TypeError("ReadableStreamDefaultController.prototype."+c+" can only be used on a ReadableStreamDefaultController")}function v4(c,d){var A=Se(c),V=!1,te=!1,Te=!1,Ke,fr,Cr,ca,da,Ia=m(function(Pt){da=Pt});function it(){if(V)return h(void 0);V=!0;var Pt={_chunkSteps:function(Qi){O(function(){V=!1;var no=Qi,oo=Qi;te||Tc(Cr._readableStreamController,no),Te||Tc(ca._readableStreamController,oo)})},_closeSteps:function(){V=!1,te||Ls(Cr._readableStreamController),Te||Ls(ca._readableStreamController),(!te||!Te)&&da(void 0)},_errorSteps:function(){V=!1}};return he(A,Pt),h(void 0)}function Us(Pt){if(te=!0,Ke=Pt,Te){var Qi=ta([Ke,fr]),no=to(c,Qi);da(no)}return Ia}function sp(Pt){if(Te=!0,fr=Pt,te){var Qi=ta([Ke,fr]),no=to(c,Qi);da(no)}return Ia}function qo(){}return Cr=ip(qo,it,Us),ca=ip(qo,it,sp),w(A._closedPromise,function(Pt){xn(Cr._readableStreamController,Pt),xn(ca._readableStreamController,Pt),(!te||!Te)&&da(void 0)}),[Cr,ca]}function g4(c,d){De(c,d);var A=c,V=A==null?void 0:A.autoAllocateChunkSize,te=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:V===void 0?void 0:Sr(V,d+" has member 'autoAllocateChunkSize' that"),cancel:te===void 0?void 0:b4(te,A,d+" has member 'cancel' that"),pull:Te===void 0?void 0:y4(Te,A,d+" has member 'pull' that"),start:Ke===void 0?void 0:x4(Ke,A,d+" has member 'start' that"),type:fr===void 0?void 0:w4(fr,d+" has member 'type' that")}}function b4(c,d,A){return me(c,A),function(V){return I(c,d,[V])}}function y4(c,d,A){return me(c,A),function(V){return I(c,d,[V])}}function x4(c,d,A){return me(c,A),function(V){return D(c,d,[V])}}function w4(c,d){if(c=""+c,c!=="bytes")throw new TypeError(d+" '"+c+"' is not a valid enumeration value for ReadableStreamType");return c}function k4(c,d){De(c,d);var A=c==null?void 0:c.mode;return{mode:A===void 0?void 0:_4(A,d+" has member 'mode' that")}}function _4(c,d){if(c=""+c,c!=="byob")throw new TypeError(d+" '"+c+"' is not a valid enumeration value for ReadableStreamReaderMode");return c}function j4(c,d){De(c,d);var A=c==null?void 0:c.preventCancel;return{preventCancel:Boolean(A)}}function b0(c,d){De(c,d);var A=c==null?void 0:c.preventAbort,V=c==null?void 0:c.preventCancel,te=c==null?void 0:c.preventClose,Te=c==null?void 0:c.signal;return Te!==void 0&&S4(Te,d+" has member 'signal' that"),{preventAbort:Boolean(A),preventCancel:Boolean(V),preventClose:Boolean(te),signal:Te}}function S4(c,d){if(!l4(c))throw new TypeError(d+" is not an AbortSignal.")}function E4(c,d){De(c,d);var A=c==null?void 0:c.readable;be(A,"readable","ReadableWritablePair"),N(A,d+" has member 'readable' that");var V=c==null?void 0:c.writable;return be(V,"writable","ReadableWritablePair"),_r(V,d+" has member 'writable' that"),{readable:A,writable:V}}var ao=function(){function c(d,A){d===void 0&&(d={}),A===void 0&&(A={}),d===void 0?d=null:J(d,"First parameter");var V=hr(A,"Second parameter"),te=g4(d,"First parameter");if(y0(this),te.type==="bytes"){if(V.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var Te=pr(V,0);Xe(this,te,Te)}else{var Ke=lr(V),Te=pr(V,1);m4(this,te,Te,Ke)}}return Object.defineProperty(c.prototype,"locked",{get:function(){if(!wn(this))throw io("locked");return kn(this)},enumerable:!1,configurable:!0}),c.prototype.cancel=function(d){return d===void 0&&(d=void 0),wn(this)?kn(this)?v(new TypeError("Cannot cancel a stream that already has a reader")):to(this,d):v(io("cancel"))},c.prototype.getReader=function(d){if(d===void 0&&(d=void 0),!wn(this))throw io("getReader");var A=k4(d,"First parameter");return A.mode===void 0?Se(this):ir(this)},c.prototype.pipeThrough=function(d,A){if(A===void 0&&(A={}),!wn(this))throw io("pipeThrough");ze(d,1,"pipeThrough");var V=E4(d,"First parameter"),te=b0(A,"Second parameter");if(kn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(G(V.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var Te=m0(this,V.writable,te.preventClose,te.preventAbort,te.preventCancel,te.signal);return T(Te),V.readable},c.prototype.pipeTo=function(d,A){if(A===void 0&&(A={}),!wn(this))return v(io("pipeTo"));if(d===void 0)return v("Parameter 1 is required in 'pipeTo'.");if(!F(d))return v(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var V;try{V=b0(A,"Second parameter")}catch(te){return v(te)}return kn(this)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):G(d)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):m0(this,d,V.preventClose,V.preventAbort,V.preventCancel,V.signal)},c.prototype.tee=function(){if(!wn(this))throw io("tee");var d=v4(this);return ta(d)},c.prototype.values=function(d){if(d===void 0&&(d=void 0),!wn(this))throw io("values");var A=j4(d,"First parameter");return Ue(this,A.preventCancel)},c}();Object.defineProperties(ao.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(ao.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(ao.prototype,r.asyncIterator,{value:ao.prototype.values,writable:!0,configurable:!0});function ip(c,d,A,V,te){V===void 0&&(V=1),te===void 0&&(te=function(){return 1});var Te=Object.create(ao.prototype);y0(Te);var Ke=Object.create(Co.prototype);return g0(Te,Ke,c,d,A,V,te),Te}function y0(c){c._state="readable",c._reader=void 0,c._storedError=void 0,c._disturbed=!1}function wn(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readableStreamController"))}function kn(c){return c._reader!==void 0}function to(c,d){if(c._disturbed=!0,c._state==="closed")return h(void 0);if(c._state==="errored")return v(c._storedError);Ns(c);var A=c._readableStreamController[Pe](d);return P(A,a)}function Ns(c){c._state="closed";var d=c._reader;d!==void 0&&(_e(d),We(d)&&(d._readRequests.forEach(function(A){A._closeSteps()}),d._readRequests=new W))}function x0(c,d){c._state="errored",c._storedError=d;var A=c._reader;A!==void 0&&(ue(A,d),We(A)?(A._readRequests.forEach(function(V){V._errorSteps(d)}),A._readRequests=new W):(A._readIntoRequests.forEach(function(V){V._errorSteps(d)}),A._readIntoRequests=new W))}function io(c){return new TypeError("ReadableStream.prototype."+c+" can only be used on a ReadableStream")}function w0(c,d){De(c,d);var A=c==null?void 0:c.highWaterMark;return be(A,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Fe(A)}}var A4=function(d){return d.byteLength},Cc=function(){function c(d){ze(d,1,"ByteLengthQueuingStrategy"),d=w0(d,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(c.prototype,"highWaterMark",{get:function(){if(!_0(this))throw k0("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"size",{get:function(){if(!_0(this))throw k0("size");return A4},enumerable:!1,configurable:!0}),c}();Object.defineProperties(Cc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Cc.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function k0(c){return new TypeError("ByteLengthQueuingStrategy.prototype."+c+" can only be used on a ByteLengthQueuingStrategy")}function _0(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_byteLengthQueuingStrategyHighWaterMark"))}var P4=function(){return 1},Ic=function(){function c(d){ze(d,1,"CountQueuingStrategy"),d=w0(d,"First parameter"),this._countQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(c.prototype,"highWaterMark",{get:function(){if(!S0(this))throw j0("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"size",{get:function(){if(!S0(this))throw j0("size");return P4},enumerable:!1,configurable:!0}),c}();Object.defineProperties(Ic.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ic.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function j0(c){return new TypeError("CountQueuingStrategy.prototype."+c+" can only be used on a CountQueuingStrategy")}function S0(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_countQueuingStrategyHighWaterMark"))}function T4(c,d){De(c,d);var A=c==null?void 0:c.flush,V=c==null?void 0:c.readableType,te=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:F4(A,c,d+" has member 'flush' that"),readableType:V,start:te===void 0?void 0:C4(te,c,d+" has member 'start' that"),transform:Te===void 0?void 0:I4(Te,c,d+" has member 'transform' that"),writableType:Ke}}function F4(c,d,A){return me(c,A),function(V){return I(c,d,[V])}}function C4(c,d,A){return me(c,A),function(V){return D(c,d,[V])}}function I4(c,d,A){return me(c,A),function(V,te){return I(c,d,[V,te])}}var qc=function(){function c(d,A,V){d===void 0&&(d={}),A===void 0&&(A={}),V===void 0&&(V={}),d===void 0&&(d=null);var te=hr(A,"Second parameter"),Te=hr(V,"Third parameter"),Ke=T4(d,"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),Cr=lr(Te),ca=pr(te,1),da=lr(te),Ia,it=m(function(Us){Ia=Us});q4(this,it,ca,da,fr,Cr),R4(this,Ke),Ke.start!==void 0?Ia(Ke.start(this._transformStreamController)):Ia(void 0)}return Object.defineProperty(c.prototype,"readable",{get:function(){if(!E0(this))throw F0("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"writable",{get:function(){if(!E0(this))throw F0("writable");return this._writable},enumerable:!1,configurable:!0}),c}();Object.defineProperties(qc.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(qc.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function q4(c,d,A,V,te,Te){function Ke(){return d}function fr(it){return z4(c,it)}function Cr(it){return L4(c,it)}function ca(){return N4(c)}c._writable=j(Ke,fr,ca,Cr,A,V);function da(){return M4(c)}function Ia(it){return Rc(c,it),h(void 0)}c._readable=ip(Ke,da,Ia,te,Te),c._backpressure=void 0,c._backpressureChangePromise=void 0,c._backpressureChangePromise_resolve=void 0,Bc(c,!0),c._transformStreamController=void 0}function E0(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_transformStreamController"))}function Oc(c,d){xn(c._readable._readableStreamController,d),Rc(c,d)}function Rc(c,d){A0(c._transformStreamController),Jf(c._writable._writableStreamController,d),c._backpressure&&Bc(c,!1)}function Bc(c,d){c._backpressureChangePromise!==void 0&&c._backpressureChangePromise_resolve(),c._backpressureChangePromise=m(function(A){c._backpressureChangePromise_resolve=A}),c._backpressure=d}var Ms=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!Dc(this))throw zc("desiredSize");var d=this._controlledTransformStream._readable._readableStreamController;return tp(d)},enumerable:!1,configurable:!0}),c.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Dc(this))throw zc("enqueue");P0(this,d)},c.prototype.error=function(d){if(d===void 0&&(d=void 0),!Dc(this))throw zc("error");B4(this,d)},c.prototype.terminate=function(){if(!Dc(this))throw zc("terminate");D4(this)},c}();Object.defineProperties(Ms.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ms.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Dc(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledTransformStream"))}function O4(c,d,A,V){d._controlledTransformStream=c,c._transformStreamController=d,d._transformAlgorithm=A,d._flushAlgorithm=V}function R4(c,d){var A=Object.create(Ms.prototype),V=function(Te){try{return P0(A,Te),h(void 0)}catch(Ke){return v(Ke)}},te=function(){return h(void 0)};d.transform!==void 0&&(V=function(Te){return d.transform(Te,A)}),d.flush!==void 0&&(te=function(){return d.flush(A)}),O4(c,A,V,te)}function A0(c){c._transformAlgorithm=void 0,c._flushAlgorithm=void 0}function P0(c,d){var A=c._controlledTransformStream,V=A._readable._readableStreamController;if(!Io(V))throw new TypeError("Readable side is not in a state that permits enqueue");try{Tc(V,d)}catch(Te){throw Rc(A,Te),A._readable._storedError}var te=d4(V);te!==A._backpressure&&Bc(A,!0)}function B4(c,d){Oc(c._controlledTransformStream,d)}function T0(c,d){var A=c._transformAlgorithm(d);return P(A,void 0,function(V){throw Oc(c._controlledTransformStream,V),V})}function D4(c){var d=c._controlledTransformStream,A=d._readable._readableStreamController;Ls(A);var V=new TypeError("TransformStream terminated");Rc(d,V)}function z4(c,d){var A=c._transformStreamController;if(c._backpressure){var V=c._backpressureChangePromise;return P(V,function(){var te=c._writable,Te=te._state;if(Te==="erroring")throw te._storedError;return T0(A,d)})}return T0(A,d)}function L4(c,d){return Oc(c,d),h(void 0)}function N4(c){var d=c._readable,A=c._transformStreamController,V=A._flushAlgorithm();return A0(A),P(V,function(){if(d._state==="errored")throw d._storedError;Ls(d._readableStreamController)},function(te){throw Oc(c,te),d._storedError})}function M4(c){return Bc(c,!1),c._backpressureChangePromise}function zc(c){return new TypeError("TransformStreamDefaultController.prototype."+c+" can only be used on a TransformStreamDefaultController")}function F0(c){return new TypeError("TransformStream.prototype."+c+" can only be used on a TransformStream")}var np={ReadableStream:ao,ReadableStreamDefaultController:Co,ReadableByteStreamController:pa,ReadableStreamBYOBRequest:fa,ReadableStreamDefaultReader:$e,ReadableStreamBYOBReader:ve,WritableStream:Vr,WritableStreamDefaultController:Fo,WritableStreamDefaultWriter:Bs,ByteLengthQueuingStrategy:Cc,CountQueuingStrategy:Ic,TransformStream:qc,TransformStreamDefaultController:Ms};if(typeof t!="undefined")for(var op in np)Object.prototype.hasOwnProperty.call(np,op)&&Object.defineProperty(t,op,{value:np[op],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=Cc,e.CountQueuingStrategy=Ic,e.ReadableByteStreamController=pa,e.ReadableStream=ao,e.ReadableStreamBYOBReader=ve,e.ReadableStreamBYOBRequest=fa,e.ReadableStreamDefaultController=Co,e.ReadableStreamDefaultReader=$e,e.TransformStream=qc,e.TransformStreamDefaultController=Ms,e.WritableStream=Vr,e.WritableStreamDefaultController=Fo,e.WritableStreamDefaultWriter=Bs,Object.defineProperty(e,"__esModule",{value:!0})})});var up="3.3.0-alpha.4";function R0(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var Ti={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},pN=Ti.self||Ti.window||Ti.global||{},hN=Ti.window||Ti.self||Ti.global||{},B0=Ti.global||Ti.self||Ti.window||{},dN=Ti.document||{};var so=typeof process!="object"||String(process)!=="[object process]"||process.browser,Vs=typeof importScripts=="function",mN=typeof window!="undefined"&&typeof window.orientation!="undefined",D0=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),vN=D0&&parseFloat(D0[1])||0;function cp(e,r=!0,a){let i=a||new Set;if(e){if(z0(e))i.add(e);else if(z0(e.buffer))i.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let t in e)cp(e[t],r,i)}}return a===void 0?Array.from(i):[]}function z0(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 uo(){let parentPort;try{eval("globalThis.parentPort = require('worker_threads').parentPort"),parentPort=globalThis.parentPort}catch{}return parentPort}var lp=new Map,Kt=class{static inWorkerThread(){return typeof self!="undefined"||Boolean(uo())}static set onmessage(r){function a(t){let n=uo(),{type:o,payload:s}=n?t:t.data;r(o,s)}let i=uo();i?(i.on("message",a),i.on("exit",()=>console.debug("Node worker closing"))):globalThis.onmessage=a}static addEventListener(r){let a=lp.get(r);a||(a=t=>{if(!J4(t))return;let n=uo(),{type:o,payload:s}=n?t:t.data;r(o,s)}),uo()?console.error("not implemented"):globalThis.addEventListener("message",a)}static removeEventListener(r){let a=lp.get(r);lp.delete(r),uo()?console.error("not implemented"):globalThis.removeEventListener("message",a)}static postMessage(r,a){let i={source:"loaders.gl",type:r,payload:a},t=cp(a),n=uo();n?n.postMessage(i,t):globalThis.postMessage(i,t)}};function J4(e){let{type:r,data:a}=e;return r==="message"&&a&&typeof a.source=="string"&&a.source.startsWith("loaders.gl")}var hp={};Q4(hp,{requireFromFile:()=>pp,requireFromString:()=>Uc});var fp=Ft(require("module")),L0=Ft(require("path"));async function pp(e){if(e.startsWith("http")){let a=await(await fetch(e)).text();return Uc(a)}return e.startsWith("/")||(e=`${process.cwd()}/${e}`),require(e)}function Uc(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=fp.default._nodeModulePaths(L0.default.dirname(r)),t=module.parent,n=new fp.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 Z4="beta",eS=typeof up!="undefined"?up:Z4,dp={};async function $s(e,r=null,a={}){return r&&(e=N0(e,r,a)),dp[e]=dp[e]||rS(e),await dp[e]}function N0(e,r,a){if(e.startsWith("http"))return e;let i=a.modules||{};return i[e]?i[e]:so?a.CDN?(R0(a.CDN.startsWith("http")),`${a.CDN}/${r}@${eS}/dist/libs/${e}`):Vs?`../src/libs/${e}`:`modules/${r}/src/libs/${e}`:`modules/${r}/dist/libs/${e}`}async function rS(e){if(e.endsWith("wasm"))return await(await fetch(e)).arrayBuffer();if(!so)try{return hp&&pp&&await pp(e)}catch{return null}if(Vs)return importScripts(e);let a=await(await fetch(e)).text();return aS(a,e)}function aS(e,r){if(!so)return Uc&&Uc(e,r);if(Vs)return eval.call(B0,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 tS=0;function mp(e){!Kt.inWorkerThread()||(Kt.onmessage=async(r,a)=>{switch(r){case"process":try{let{input:i,options:t={},context:n={}}=a,o=await nS({loader:e,arrayBuffer:i,options:t,context:ci(Ut({},n),{parse:iS})});Kt.postMessage("done",{result:o})}catch(i){let t=i instanceof Error?i.message:"";Kt.postMessage("error",{error:t})}break;default:}})}function iS(e,r){return new Promise((a,i)=>{let t=tS++,n=(s,u)=>{if(u.id===t)switch(s){case"done":Kt.removeEventListener(n),a(u.result);break;case"error":Kt.removeEventListener(n),i(u.error);break;default:}};Kt.addEventListener(n);let o={id:t,input:e,options:r};Kt.postMessage("process",o)})}async function nS({loader:e,arrayBuffer:r,options:a,context:i}){let t,n;if(e.parseSync||e.parse)t=r,n=e.parseSync||e.parse;else if(e.parseTextSync)t=new TextDecoder().decode(r),n=e.parseTextSync;else throw new Error(`Could not load data with ${e.name} loader`);return a=ci(Ut({},a),{modules:e&&e.options&&e.options.modules||{},worker:!1}),await n(t,Ut({},a),i,e)}var Vv=Ft(Tg());var fi=typeof process!="object"||String(process)!=="[object process]"||process.browser,Cp={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global},Sa=Cp.global||Cp.self||Cp.window;var Fg={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"]=Fg||{};function jr(e,r,a){return r<=e&&e<=a}function TS(e,r){return e.indexOf(r)!==-1}var Zi=Math.floor;function Jc(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function FS(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 CS(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 Yt(e){return 0<=e&&e<=127}var Qt=Yt,Rr=-1;function Ip(e){this.tokens=[].slice.call(e),this.tokens.reverse()}Ip.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 Zr=-1;function Br(e,r){if(e)throw TypeError("Decoder error");return r||65533}function pi(e){throw TypeError("The code point "+e+" could not be encoded.")}function IS(){}IS.prototype={handler:function(e,r){}};function qS(){}qS.prototype={handler:function(e,r){}};function qp(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(Op,e)?Op[e]:null}var Cg=[{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"}],Op={};Cg.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(a){Op[a]=r})})});var qt={},Ot={};function Uo(e,r){return r&&r[e]||null}function Ho(e,r){var a=r.indexOf(e);return a===-1?null:a}function xt(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 OS(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,a=0,i=xt("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 RS(e){if(e===59335)return 7457;var r=0,a=0,i=xt("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 BS(e){Rp=Rp||xt("jis0208").map(function(a,i){return jr(i,8272,8835)?null:a});var r=Rp;return r.indexOf(e)}var Rp;function DS(e){Bp=Bp||xt("big5").map(function(a,i){return i<(161-129)*157?null:a});var r=Bp;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):Ho(e,r)}var Bp,Ig="utf-8";function fo(e,r){if(!(this instanceof fo))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):Ig,r=Jc(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var a=qp(e);if(a===null||a.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Ot[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(fo.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(fo.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(fo.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));fo.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=Jc(a),this._do_not_flush||(this._decoder=Ot[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(a.stream);for(var t=new Ip(i),n=[],o;;){var s=t.read();if(s===Rr||(o=this._decoder.handler(t,s),o===Zr))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===Zr)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!t.endOfStream());this._decoder=null}function u(f){return TS(["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)),CS(f)}return u.call(this,n)};function nu(e,r){if(!(this instanceof nu))throw TypeError("Called as a function. Did you forget 'new'?");r=Jc(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):Ig;var i=qp(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!qt[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");a._encoding=i}else a._encoding=qp("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(nu.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});nu.prototype.encode=function(r,a){r=r===void 0?"":String(r),a=Jc(a),this._do_not_flush||(this._encoder=qt[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(a.stream);for(var i=new Ip(FS(r)),t=[],n;;){var o=i.read();if(o===Rr||(n=this._encoder.handler(i,o),n===Zr))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!==Zr;)Array.isArray(n)?t.push.apply(t,n):t.push(n);this._encoder=null}return new Uint8Array(t)};function zS(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 Zr;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 LS(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Zr;if(Qt(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}}qt["UTF-8"]=function(e){return new LS(e)};Ot["UTF-8"]=function(e){return new zS(e)};function NS(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Rr)return Zr;if(Yt(t))return t;var n=e[t-128];return n===null?Br(a):n}}function MS(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Rr)return Zr;if(Qt(t))return t;var n=Ho(t,e);return n===null&&pi(t),n+128}}(function(){"encoding-indexes"in global&&Cg.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var a=r.name,i=xt(a.toLowerCase());Ot[a]=function(t){return new NS(i,t)},qt[a]=function(t){return new MS(i,t)}})})})();Ot.GBK=function(e){return new qg(e)};qt.GBK=function(e){return new Og(e,!0)};function qg(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 Zr;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=OS((((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:Uo(p,xt("gb18030")),s===null&&Yt(o)&&n.prepend(o),s===null?Br(r):s}return Yt(o)?o:o===128?8364:jr(o,129,254)?(a=o,null):Br(r)}}function Og(e,r){var a=e.fatal;this.handler=function(i,t){if(t===Rr)return Zr;if(Qt(t))return t;if(t===58853)return pi(t);if(r&&t===8364)return 128;var n=Ho(t,xt("gb18030"));if(n!==null){var o=Zi(n/190)+129,s=n%190,u=s<63?64:65;return[o,s+u]}if(r)return pi(t);n=RS(t);var f=Zi(n/10/126/10);n=n-f*10*126*10;var p=Zi(n/10/126);n=n-p*10*126;var m=Zi(n/10),h=n-m*10;return[f+129,p+48,m+129,h+48]}}qt.gb18030=function(e){return new Og(e)};Ot.gb18030=function(e){return new qg(e)};function US(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 Zr;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:Uo(o,xt("big5"));return u===null&&Yt(t)&&i.prepend(t),u===null?Br(r):u}return Yt(t)?t:jr(t,129,254)?(a=t,null):Br(r)}}function HS(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Zr;if(Qt(i))return i;var t=DS(i);if(t===null)return pi(i);var n=Zi(t/157)+129;if(n<161)return pi(i);var o=t%157,s=o<63?64:98;return[n,o+s]}}qt.Big5=function(e){return new HS(e)};Ot.Big5=function(e){return new US(e)};function VS(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 Zr;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=Uo((o-161)*94+(n-161),xt(a?"jis0212":"jis0208"))),a=!1,jr(n,161,254)||t.prepend(n),s===null?Br(r):s}return Yt(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):Br(r)}}function $S(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Zr;if(Qt(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=Ho(i,xt("jis0208"));if(t===null)return pi(i);var n=Zi(t/94)+161,o=t%94+161;return[n,o]}}qt["EUC-JP"]=function(e){return new $S(e)};Ot["EUC-JP"]=function(e){return new VS(e)};function WS(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?Zr:(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?Zr:(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?Zr:(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?Zr:(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=Uo(f,xt("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 h=null;if(m===40&&u===66&&(h=a.ASCII),m===40&&u===74&&(h=a.Roman),m===40&&u===73&&(h=a.Katakana),m===36&&(u===64||u===66)&&(h=a.LeadByte),h!==null){i=i=h;var v=o;return o=!0,v?Br(r):null}return s.prepend([m,u]),o=!1,i=t,Br(r)}}}function GS(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 Zr;if((i===a.ASCII||i===a.Roman)&&(n===14||n===15||n===27))return pi(65533);if(i===a.ASCII&&Qt(n))return n;if(i===a.Roman&&(Qt(n)&&n!==92&&n!==126||n==165||n==8254)){if(Qt(n))return n;if(n===165)return 92;if(n===8254)return 126}if(Qt(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=Ho(n,xt("jis0208"));if(o===null)return pi(n);if(i!==a.jis0208)return t.prepend(n),i=a.jis0208,[27,36,66];var s=Zi(o/94)+33,u=o%94+33;return[s,u]}}qt["ISO-2022-JP"]=function(e){return new GS(e)};Ot["ISO-2022-JP"]=function(e){return new WS(e)};function KS(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 Zr;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:Uo(o,xt("jis0208"));return f===null&&Yt(t)&&i.prepend(t),f===null?Br(r):f}return Yt(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 YS(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Zr;if(Qt(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=BS(i);if(t===null)return pi(i);var n=Zi(t/188),o=n<31?129:193,s=t%188,u=s<63?64:65;return[n+o,s+u]}}qt.Shift_JIS=function(e){return new YS(e)};Ot.Shift_JIS=function(e){return new KS(e)};function QS(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 Zr;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:Uo(o,xt("euc-kr"));return o===null&&Yt(t)&&i.prepend(t),s===null?Br(r):s}return Yt(t)?t:jr(t,129,254)?(a=t,null):Br(r)}}function XS(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Zr;if(Qt(i))return i;var t=Ho(i,xt("euc-kr"));if(t===null)return pi(i);var n=Zi(t/190)+129,o=t%190+65;return[n,o]}}qt["EUC-KR"]=function(e){return new XS(e)};Ot["EUC-KR"]=function(e){return new QS(e)};function Zc(e,r){var a=e>>8,i=e&255;return r?[a,i]:[i,a]}function Rg(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 Zr;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(Zc(s,e)),Br(a))}return jr(s,55296,56319)?(t=s,null):jr(s,56320,57343)?Br(a):s}}function Bg(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Rr)return Zr;if(jr(t,0,65535))return Zc(t,e);var n=Zc((t-65536>>10)+55296,e),o=Zc((t-65536&1023)+56320,e);return n.concat(o)}}qt["UTF-16BE"]=function(e){return new Bg(!0,e)};Ot["UTF-16BE"]=function(e){return new Rg(!0,e)};qt["UTF-16LE"]=function(e){return new Bg(!1,e)};Ot["UTF-16LE"]=function(e){return new Rg(!1,e)};function JS(e){var r=e.fatal;this.handler=function(a,i){return i===Rr?Zr:Yt(i)?i:63360+i-128}}function ZS(e){var r=e.fatal;this.handler=function(a,i){return i===Rr?Zr:Qt(i)?i:jr(i,63360,63487)?i-63360+128:pi(i)}}qt["x-user-defined"]=function(e){return new ZS(e)};Ot["x-user-defined"]=function(e){return new JS(e)};var eE="rejected",rE="fulfilled";function Dg(e){let r=e.map(a=>a.then(i=>({status:rE,value:i})).catch(i=>({status:eE,reason:i})));return Promise.all(r)}function el(e){return Buffer.from(e).toString("base64")}function Dp(e){return Buffer.from(e,"base64").toString("ascii")}var hi=class{constructor(r){this.map={},r instanceof hi?r.forEach((a,i)=>this.append(i,a)):Array.isArray(r)?r.forEach(a=>this.append(a[0],a[1])):r&&Object.getOwnPropertyNames(r).forEach(a=>this.append(a,r[a]))}append(r,a){r=ou(r),a=zg(a);let i=this.map[r];this.map[r]=i?`${i}, ${a}`:a}delete(r){delete this.map[ou(r)]}get(r){return r=ou(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(ou(r))}set(r,a){this.map[ou(r)]=zg(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)}),zp(r)}values(){let r=[];return this.forEach(function(a){r.push(a)}),zp(r)}entries(){let r=[];return this.forEach(function(a,i){r.push([i,a])}),zp(r)}*[Symbol.iterator](){yield*this.entries()}};function ou(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e)||e==="")throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function zg(e){return typeof e!="string"&&(e=String(e)),e}function zp(e){let r={next(){let a=e.shift();return{done:a===void 0,value:a}}};return r[Symbol.iterator]=function(){return r},r}function su(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var Ng=Ft(require("fs")),Mg=Ft(require("http")),Ug=Ft(require("https")),rl=Ft(require("zlib"));var aE=e=>e&&e instanceof ArrayBuffer,tE=e=>e&&e instanceof Buffer;function Lg(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:Lp(a),mimeType:i}}function Lp(e){if(aE(e))return e;if(tE(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 iE(e){return e.startsWith("http:")||e.startsWith("https:")}async function Hg(e,r){if(!iE(e)){let a=e.split("?")[0];return await new Promise((i,t)=>{let n=Ng.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:")?Ug.default.request:Mg.default.request,n=nE(e,r),o=t(n,s=>a(s));o.on("error",s=>i(s)),o.end()})}function Vg(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(rl.default.createBrotliDecompress());case"gzip":return e.pipe(rl.default.createGunzip());case"deflate":return e.pipe(rl.default.createDeflate());default:return e}}async function $g(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(Lp(t))}),e.on("end",()=>{let t=oE(r);a(t)})})}function nE(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 ci(Ut(Ut({hostname:t.hostname,path:t.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:i,port:t.port})}function oE(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 Mp=Ft(require("stream")),sE=e=>typeof e=="boolean",Wg=e=>typeof e=="function",uE=e=>e!==null&&typeof e=="object",Np=e=>uE(e)&&Wg(e.read)&&Wg(e.pipe)&&sE(e.readable),en=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 hi((a==null?void 0:a.headers)||{}),Np(r)?this._body=Vg(r,i):typeof r=="string"?this._body=Mp.Readable.from([new TextEncoder().encode(r)]):this._body=Mp.Readable.from([r||new ArrayBuffer(0)])}get body(){return su(!this.bodyUsed),su(Np(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return Np(this._body)?await $g(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 Gg=Ft(require("fs"));var Kg=e=>e.startsWith("data:"),cE=e=>e.startsWith("http:")||e.startsWith("https:");async function Vo(e,r){try{if(Kg(e)){let{arrayBuffer:f,mimeType:p}=Lg(e);return new en(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 Hg(i,r),n=pE(e,t,a),{status:o,statusText:s}=fE(t),u=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&u){let f=lE(e,n.get("location"));return await Vo(f,r)}return new en(t,{headers:n,status:o,statusText:s,url:e})}catch(a){return new en(null,{status:400,statusText:String(a),url:e})}}function lE(e,r){if(r.startsWith("http"))return r;let a=new URL(e);return a.pathname=r,a.href}function fE(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function pE(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=hE(e);Number.isFinite(t)&&(i["content-length"]=t)}return Object.assign(i,a),new hi(i)}function hE(e){if(cE(e))return null;if(Kg(e))return e.length-"data:".length;try{let r=e.split("?")[0];return Gg.default.statSync(r).size}catch{}return null}var $y=Ft(Hy()),Wy=Ft(mu());function Vy(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function F7(e,r){let a=r.type?r.type.replace("image/",""):"jpeg",i=(0,Wy.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,$y.default)(i,a,r)}function Bh(e,r){let a=F7(e,r);return new Promise(i=>{let t=[];a.on("data",n=>t.push(n)),a.on("end",()=>{let n=Buffer.concat(t);i(Vy(n))})})}var Fj=Ft(Tj());var Cj=Ft(require("util"));async function Nv(e,r){su(r,"MIMEType is required to parse image under Node.js");let a=Cj.default.promisify(Fj.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 Oj=Ft(qj());delete global.ReadableStream;var cc=class extends Oj.ReadableStream{};var Mv=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 Uv=class extends cc{constructor(r){super(new Mv(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let a=this.getReader();yield*this._chunks,a.releaseLock()}};var Xn=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 Xn)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=FL(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 Xn([],{type:i});if(u===0)return f;let p=0,m=[];for(let h of n){let{byteLength:v}=h;if(o>0&&v<=o)o-=v,s-=v;else{let x=h.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 Uv(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 FL(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var Hv=class extends Xn{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 IL=!fi||!("TextEncoder"in Sa);IL&&(Sa.TextEncoder=nu);var qL=!fi||!("TextDecoder"in Sa);qL&&(Sa.TextDecoder=fo);!fi&&!("atob"in Sa)&&el&&(Sa.atob=el);!fi&&!("btoa"in Sa)&&Dp&&(Sa.btoa=Dp);!fi&&!("Headers"in Sa)&&hi&&(Sa.Headers=hi);!fi&&!("Response"in Sa)&&en&&(Sa.Response=en);!fi&&!("fetch"in Sa)&&Vo&&(Sa.fetch=Vo);!fi&&!("DOMParser"in Sa)&&Vv.DOMParser&&(Sa.DOMParser=Vv.DOMParser);!fi&&!("_encodeImageNode"in Sa)&&Bh&&(Sa._encodeImageNode=Bh);!fi&&!("_parseImageNode"in Sa)&&Nv&&(Sa._parseImageNode=Nv);"allSettled"in Promise||(Promise.allSettled=Dg);var Rj="3.3.0-alpha.4";var OL={draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},Bj={name:"Draco",id:so?"draco":"draco-nodejs",module:"draco",shapes:["mesh"],version:Rj,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:OL};function $v(e){let r=1/0,a=1/0,i=1/0,t=-1/0,n=-1/0,o=-1/0,s=e.POSITION?e.POSITION.value:[],u=s&&s.length;for(let f=0;f<u;f+=3){let p=s[f],m=s[f+1],h=s[f+2];r=p<r?p:r,a=m<a?m:a,i=h<i?h:i,t=p>t?p:t,n=m>n?m:n,o=h>o?h:o}return[[r,a,i],[t,n,o]]}function Dj(e,r){if(!e)throw new Error(r||"loader assertion failed.")}var si=class{constructor(r,a){Dj(Array.isArray(r)),RL(r),this.fields=r,this.metadata=a||new Map}compareTo(r){if(this.metadata!==r.metadata||this.fields.length!==r.fields.length)return!1;for(let a=0;a<this.fields.length;++a)if(!this.fields[a].compareTo(r.fields[a]))return!1;return!0}select(...r){let a=Object.create(null);for(let t of r)a[t]=!0;let i=this.fields.filter(t=>a[t.name]);return new si(i,this.metadata)}selectAt(...r){let a=r.map(i=>this.fields[i]).filter(Boolean);return new si(a,this.metadata)}assign(r){let a,i=this.metadata;if(r instanceof si){let o=r;a=o.fields,i=zj(zj(new Map,this.metadata),o.metadata)}else a=r;let t=Object.create(null);for(let o of this.fields)t[o.name]=o;for(let o of a)t[o.name]=o;let n=Object.values(t);return new si(n,i)}};function RL(e){let r={};for(let a of e)r[a.name]&&console.warn("Schema: duplicated field name",a.name,a),r[a.name]=!0}function zj(e,r){return new Map([...e||new Map,...r||new Map])}var bn=class{constructor(r,a,i=!1,t=new Map){this.name=r,this.type=a,this.nullable=i,this.metadata=t}get typeId(){return this.type&&this.type.typeId}clone(){return new bn(this.name,this.type,this.nullable,this.metadata)}compareTo(r){return this.name===r.name&&this.type===r.type&&this.nullable===r.nullable&&this.metadata===r.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?`, metadata: ${this.metadata}`:""}`}};var Lr;(function(H){H[H.NONE=0]="NONE",H[H.Null=1]="Null",H[H.Int=2]="Int",H[H.Float=3]="Float",H[H.Binary=4]="Binary",H[H.Utf8=5]="Utf8",H[H.Bool=6]="Bool",H[H.Decimal=7]="Decimal",H[H.Date=8]="Date",H[H.Time=9]="Time",H[H.Timestamp=10]="Timestamp",H[H.Interval=11]="Interval",H[H.List=12]="List",H[H.Struct=13]="Struct",H[H.Union=14]="Union",H[H.FixedSizeBinary=15]="FixedSizeBinary",H[H.FixedSizeList=16]="FixedSizeList",H[H.Map=17]="Map",H[H.Dictionary=-1]="Dictionary",H[H.Int8=-2]="Int8",H[H.Int16=-3]="Int16",H[H.Int32=-4]="Int32",H[H.Int64=-5]="Int64",H[H.Uint8=-6]="Uint8",H[H.Uint16=-7]="Uint16",H[H.Uint32=-8]="Uint32",H[H.Uint64=-9]="Uint64",H[H.Float16=-10]="Float16",H[H.Float32=-11]="Float32",H[H.Float64=-12]="Float64",H[H.DateDay=-13]="DateDay",H[H.DateMillisecond=-14]="DateMillisecond",H[H.TimestampSecond=-15]="TimestampSecond",H[H.TimestampMillisecond=-16]="TimestampMillisecond",H[H.TimestampMicrosecond=-17]="TimestampMicrosecond",H[H.TimestampNanosecond=-18]="TimestampNanosecond",H[H.TimeSecond=-19]="TimeSecond",H[H.TimeMillisecond=-20]="TimeMillisecond",H[H.TimeMicrosecond=-21]="TimeMicrosecond",H[H.TimeNanosecond=-22]="TimeNanosecond",H[H.DenseUnion=-23]="DenseUnion",H[H.SparseUnion=-24]="SparseUnion",H[H.IntervalDayTime=-25]="IntervalDayTime",H[H.IntervalYearMonth=-26]="IntervalYearMonth"})(Lr||(Lr={}));var Et=class{static isNull(r){return r&&r.typeId===Lr.Null}static isInt(r){return r&&r.typeId===Lr.Int}static isFloat(r){return r&&r.typeId===Lr.Float}static isBinary(r){return r&&r.typeId===Lr.Binary}static isUtf8(r){return r&&r.typeId===Lr.Utf8}static isBool(r){return r&&r.typeId===Lr.Bool}static isDecimal(r){return r&&r.typeId===Lr.Decimal}static isDate(r){return r&&r.typeId===Lr.Date}static isTime(r){return r&&r.typeId===Lr.Time}static isTimestamp(r){return r&&r.typeId===Lr.Timestamp}static isInterval(r){return r&&r.typeId===Lr.Interval}static isList(r){return r&&r.typeId===Lr.List}static isStruct(r){return r&&r.typeId===Lr.Struct}static isUnion(r){return r&&r.typeId===Lr.Union}static isFixedSizeBinary(r){return r&&r.typeId===Lr.FixedSizeBinary}static isFixedSizeList(r){return r&&r.typeId===Lr.FixedSizeList}static isMap(r){return r&&r.typeId===Lr.Map}static isDictionary(r){return r&&r.typeId===Lr.Dictionary}get typeId(){return Lr.NONE}compareTo(r){return this===r}},Wv=class extends Et{get typeId(){return Lr.Null}get[Symbol.toStringTag](){return"Null"}toString(){return"Null"}},Gv=class extends Et{get typeId(){return Lr.Bool}get[Symbol.toStringTag](){return"Bool"}toString(){return"Bool"}},yn=class extends Et{constructor(r,a){super();this.isSigned=r,this.bitWidth=a}get typeId(){return Lr.Int}get[Symbol.toStringTag](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}},lc=class extends yn{constructor(){super(!0,8)}},fc=class extends yn{constructor(){super(!0,16)}},pc=class extends yn{constructor(){super(!0,32)}};var hc=class extends yn{constructor(){super(!1,8)}},dc=class extends yn{constructor(){super(!1,16)}},mc=class extends yn{constructor(){super(!1,32)}};var Lj={HALF:16,SINGLE:32,DOUBLE:64},vc=class extends Et{constructor(r){super();this.precision=r}get typeId(){return Lr.Float}get[Symbol.toStringTag](){return"Float"}toString(){return`Float${this.precision}`}};var gc=class extends vc{constructor(){super(Lj.SINGLE)}},bc=class extends vc{constructor(){super(Lj.DOUBLE)}},Kv=class extends Et{constructor(){super()}get typeId(){return Lr.Binary}toString(){return"Binary"}get[Symbol.toStringTag](){return"Binary"}},Yv=class extends Et{get typeId(){return Lr.Utf8}get[Symbol.toStringTag](){return"Utf8"}toString(){return"Utf8"}},BL={DAY:0,MILLISECOND:1},Qv=class extends Et{constructor(r){super();this.unit=r}get typeId(){return Lr.Date}get[Symbol.toStringTag](){return"Date"}toString(){return`Date${(this.unit+1)*32}<${BL[this.unit]}>`}};var Nj={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9},Xv=class extends Et{constructor(r,a){super();this.unit=r,this.bitWidth=a}get typeId(){return Lr.Time}toString(){return`Time${this.bitWidth}<${Nj[this.unit]}>`}get[Symbol.toStringTag](){return"Time"}};var Jv=class extends Et{constructor(r,a=null){super();this.unit=r,this.timezone=a}get typeId(){return Lr.Timestamp}get[Symbol.toStringTag](){return"Timestamp"}toString(){return`Timestamp<${Nj[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};var DL={DAY_TIME:0,YEAR_MONTH:1},Zv=class extends Et{constructor(r){super();this.unit=r}get typeId(){return Lr.Interval}get[Symbol.toStringTag](){return"Interval"}toString(){return`Interval<${DL[this.unit]}>`}};var yc=class extends Et{constructor(r,a){super();this.listSize=r,this.children=[a]}get typeId(){return Lr.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[Symbol.toStringTag](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}},e0=class extends Et{constructor(r){super();this.children=r}get typeId(){return Lr.Struct}toString(){return`Struct<{${this.children.map(r=>`${r.name}:${r.type}`).join(", ")}}>`}get[Symbol.toStringTag](){return"Struct"}};function Mj(e){switch(e.constructor){case Int8Array:return new lc;case Uint8Array:return new hc;case Int16Array:return new fc;case Uint16Array:return new dc;case Int32Array:return new pc;case Uint32Array:return new mc;case Float32Array:return new gc;case Float64Array:return new bc;default:throw new Error("array type not supported")}}function r0(e,r,a){let i=Mj(r.value),t=a||Uj(r);return new bn(e,new yc(r.size,new bn("value",i)),!1,t)}function Uj(e){let r=new Map;return"byteOffset"in e&&r.set("byteOffset",e.byteOffset.toString(10)),"byteStride"in e&&r.set("byteStride",e.byteStride.toString(10)),"normalized"in e&&r.set("normalized",e.normalized.toString()),r}function Hj(e,r,a){let i=$j(r.metadata),t=[],n=XL(r.attributes);for(let o in e){let s=e[o],u=Vj(o,s,n[o]);t.push(u)}if(a){let o=Vj("indices",a);t.push(o)}return new si(t,i)}function XL(e){let r={};for(let a in e){let i=e[a];r[i.name||"undefined"]=i}return r}function Vj(e,r,a){let i=a?$j(a.metadata):void 0;return r0(e,r,i)}function $j(e){let r=new Map;for(let a in e)r.set(`${a}.string`,JSON.stringify(e[a]));return r}var Wj={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},JL={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},ZL=4,Qf=class{constructor(r){this.draco=r,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(r,a={}){let i=new this.draco.DecoderBuffer;i.Init(new Int8Array(r),r.byteLength),this._disableAttributeTransforms(a);let t=this.decoder.GetEncodedGeometryType(i),n=t===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let o;switch(t){case this.draco.TRIANGULAR_MESH:o=this.decoder.DecodeBufferToMesh(i,n);break;case this.draco.POINT_CLOUD:o=this.decoder.DecodeBufferToPointCloud(i,n);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!o.ok()||!n.ptr){let h=`DRACO decompression failed: ${o.error_msg()}`;throw new Error(h)}let s=this._getDracoLoaderData(n,t,a),u=this._getMeshData(n,s,a),f=$v(u.attributes),p=Hj(u.attributes,s,u.indices);return ci(Ut({loader:"draco",loaderData:s,header:{vertexCount:n.num_points(),boundingBox:f}},u),{schema:p})}finally{this.draco.destroy(i),n&&this.draco.destroy(n)}}_getDracoLoaderData(r,a,i){let t=this._getTopLevelMetadata(r),n=this._getDracoAttributes(r,i);return{geometry_type:a,num_attributes:r.num_attributes(),num_points:r.num_points(),num_faces:r instanceof this.draco.Mesh?r.num_faces():0,metadata:t,attributes:n}}_getDracoAttributes(r,a){let i={};for(let t=0;t<r.num_attributes();t++){let n=this.decoder.GetAttribute(r,t),o=this._getAttributeMetadata(r,t);i[n.unique_id()]={unique_id:n.unique_id(),attribute_type:n.attribute_type(),data_type:n.data_type(),num_components:n.num_components(),byte_offset:n.byte_offset(),byte_stride:n.byte_stride(),normalized:n.normalized(),attribute_index:t,metadata:o};let s=this._getQuantizationTransform(n,a);s&&(i[n.unique_id()].quantization_transform=s);let u=this._getOctahedronTransform(n,a);u&&(i[n.unique_id()].octahedron_transform=u)}return i}_getMeshData(r,a,i){let t=this._getMeshAttributes(a,r,i);if(!t.POSITION)throw new Error("DRACO: No position attribute found.");if(r instanceof this.draco.Mesh)switch(i.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:t,indices:{value:this._getTriangleStripIndices(r),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:t,indices:{value:this._getTriangleListIndices(r),size:1}}}return{topology:"point-list",mode:0,attributes:t}}_getMeshAttributes(r,a,i){let t={};for(let n of Object.values(r.attributes)){let o=this._deduceAttributeName(n,i);n.name=o;let{value:s,size:u}=this._getAttributeValues(a,n);t[o]={value:s,size:u,byteOffset:n.byte_offset,byteStride:n.byte_stride,normalized:n.normalized}}return t}_getTriangleListIndices(r){let i=r.num_faces()*3,t=i*ZL,n=this.draco._malloc(t);try{return this.decoder.GetTrianglesUInt32Array(r,t,n),new Uint32Array(this.draco.HEAPF32.buffer,n,i).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(r){let a=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(r,a),aN(a)}finally{this.draco.destroy(a)}}_getAttributeValues(r,a){let i=JL[a.data_type],t=a.num_components,o=r.num_points()*t,s=o*i.BYTES_PER_ELEMENT,u=eN(this.draco,i),f,p=this.draco._malloc(s);try{let m=this.decoder.GetAttribute(r,a.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(r,m,u,s,p),f=new i(this.draco.HEAPF32.buffer,p,o).slice()}finally{this.draco._free(p)}return{value:f,size:t}}_deduceAttributeName(r,a){let i=r.unique_id;for(let[o,s]of Object.entries(a.extraAttributes||{}))if(s===i)return o;let t=r.attribute_type;for(let o in Wj)if(this.draco[o]===t)return Wj[o];let n=a.attributeNameEntry||"name";return r.metadata[n]?r.metadata[n].string:`CUSTOM_ATTRIBUTE_${i}`}_getTopLevelMetadata(r){let a=this.decoder.GetMetadata(r);return this._getDracoMetadata(a)}_getAttributeMetadata(r,a){let i=this.decoder.GetAttributeMetadata(r,a);return this._getDracoMetadata(i)}_getDracoMetadata(r){if(!r||!r.ptr)return{};let a={},i=this.metadataQuerier.NumEntries(r);for(let t=0;t<i;t++){let n=this.metadataQuerier.GetEntryName(r,t);a[n]=this._getDracoMetadataField(r,n)}return a}_getDracoMetadataField(r,a){let i=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(r,a,i);let t=rN(i);return{int:this.metadataQuerier.GetIntEntry(r,a),string:this.metadataQuerier.GetStringEntry(r,a),double:this.metadataQuerier.GetDoubleEntry(r,a),intArray:t}}finally{this.draco.destroy(i)}}_disableAttributeTransforms(r){let{quantizedAttributes:a=[],octahedronAttributes:i=[]}=r,t=[...a,...i];for(let n of t)this.decoder.SkipAttributeTransform(this.draco[n])}_getQuantizationTransform(r,a){let{quantizedAttributes:i=[]}=a,t=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(t)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits(),range:o.range(),min_values:new Float32Array([1,2,3]).map(s=>o.min_value(s))}}finally{this.draco.destroy(o)}}return null}_getOctahedronTransform(r,a){let{octahedronAttributes:i=[]}=a,t=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(t)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits()}}finally{this.draco.destroy(o)}}return null}};function eN(e,r){switch(r){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32;default:return e.DT_INVALID}}function rN(e){let r=e.size(),a=new Int32Array(r);for(let i=0;i<r;i++)a[i]=e.GetValue(i);return a}function aN(e){let r=e.size(),a=new Int32Array(r);for(let i=0;i<r;i++)a[i]=e.GetValue(i);return a}var Xf="1.4.1",tN=`https://www.gstatic.com/draco/versioned/decoders/${Xf}/draco_decoder.js`,iN=`https://www.gstatic.com/draco/versioned/decoders/${Xf}/draco_wasm_wrapper.js`,nN=`https://www.gstatic.com/draco/versioned/decoders/${Xf}/draco_decoder.wasm`,SK=`https://raw.githubusercontent.com/google/draco/${Xf}/javascript/draco_encoder.js`,xc;async function Gj(e){let r=e.modules||{};return r.draco3d?xc=xc||r.draco3d.createDecoderModule({}).then(a=>({draco:a})):xc=xc||oN(e),await xc}async function oN(e){let r,a;switch(e.draco&&e.draco.decoderType){case"js":r=await $s(tN,"draco",e);break;case"wasm":default:[r,a]=await Promise.all([await $s(iN,"draco",e),await $s(nN,"draco",e)])}return r=r||globalThis.DracoDecoderModule,await sN(r,a)}function sN(e,r){let a={};return r&&(a.wasmBinary=r),new Promise(i=>{e(ci(Ut({},a),{onModuleLoaded:t=>i({draco:t})}))})}var Kj=ci(Ut({},Bj),{parse:uN});async function uN(e,r){let{draco:a}=await Gj(r),i=new Qf(a);try{return i.parseSync(e,r==null?void 0:r.draco)}finally{i.destroy()}}mp(Kj);
95
+ `,m.message,m.stack);var h=new Error("tunneling socket could not be established, cause="+m.message);h.code="ECONNRESET",r.request.emit("error",h),i.removeSocket(t)}};Ki.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 ej(e,r){var a=this;Ki.prototype.createSocket.call(a,e,function(i){var t=Sz.connect(0,rj({},a.options,{servername:e.host,socket:i}));a.sockets[a.sockets.indexOf(i)]=t,r(t)})}function rj(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 To;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?To=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)}:To=function(){};qs.debug=To});var oj=B(nj=>{"use strict";var Oz=require("url"),Rz=aj(),tj=["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"],ij=["proxy-authorization"];function Bz(e){var r=e.port,a=e.protocol,i=e.hostname+":";return r?i+=r:a==="https:"?i+="443":i+="80",i}function Dz(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 zz(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 Lz(e,r){var a=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[a,i].join("Over")}function Nz(e){var r=e.uri,a=e.proxy,i=Lz(r,a);return Rz[i]}function tc(e){this.request=e,this.proxyHeaderWhiteList=tj,this.proxyHeaderExclusiveList=[],typeof e.tunnel!="undefined"&&(this.tunnelOverride=e.tunnel)}tc.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride!="undefined"?e.tunnelOverride:r.uri.protocol==="https:"};tc.prototype.setup=function(e){var r=this,a=r.request;if(e=e||{},typeof a.proxy=="string"&&(a.proxy=Oz.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(ij),t=r.proxyHeaderWhiteList.concat(i),n=Dz(a.headers,t);n.host=Bz(a.uri),i.forEach(a.removeHeader,a);var o=Nz(a),s=zz(a,n);return a.agent=o(s),!0};tc.defaultProxyHeaderWhiteList=tj;tc.defaultProxyHeaderExclusiveList=ij;nj.Tunnel=tc});var uj=B((sj,ic)=>{(function(){var e,r,a,i,t,n;typeof performance!="undefined"&&performance!==null&&performance.now?ic.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(ic.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?(ic.exports=function(){return Date.now()-a},a=Date.now()):(ic.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(sj)});var yj=B((rG,bj)=>{"use strict";var Mz=require("http"),cj=require("https"),nc=require("url"),Bv=require("util"),$f=require("stream"),Wf=require("zlib"),Dv=Y2(),Uz=nw(),Hz=K_(),Vz=bf(),lj=yf(),fj=t3(),$z=C3(),Wz=vl(),pj=ev(),Gz=D3().strict,Os=wl(),Kz=fd(),Yz=N3(),Qz=J3().Querystring,Xz=E8().Har,Jz=R8().Auth,Zz=W8().OAuth,eL=G8(),rL=Y8().Multipart,aL=J8().Redirect,zv=oj().Tunnel,Rs=uj(),oc=as().Buffer,hj=Os.safeStringify,tL=Os.isReadStream,iL=Os.toBase64,nL=Os.defer,dj=Os.copy,oL=Os.version,mj=Kz.jar(),vj={};function sL(e,r){var a={};for(var i in r){var t=e.indexOf(i)===-1;t&&(a[i]=r[i])}return a}function uL(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 gj(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function cL(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:gj.call(e.request)}}function qr(e){var r=this;e.har&&(r._har=new Xz(r),e=r._har.options(e)),$f.Stream.call(r);var a=Object.keys(qr.prototype),i=sL(a,e);Wz(r,i),e=uL(a,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new Qz(r),r._auth=new Jz(r),r._oauth=new Zz(r),r._multipart=new rL(r),r._redirect=new aL(r),r._tunnel=new zv(r),r.init(e)}Bv.inherits(qr,$f.Stream);qr.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function at(){qr.debug&&console.error("REQUEST %s",Bv.format.apply(Bv,arguments))}qr.prototype.debug=at;qr.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?dj(r.headers):{};for(var a in r.headers)typeof r.headers[a]=="undefined"&&delete r.headers[a];if(lj.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),at(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=nc.parse(r.uri)),r.uri.href||(r.uri.href=nc.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=nc.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=Yz(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 h=u[m];if(h instanceof Array)for(var v=0;v<h.length;v++)p(m,h[v]);else p(m,h)}}if(e.qs&&r.qs(e.qs),r.uri.path?r.path=r.uri.path:r.path=r.uri.pathname+(r.uri.search||""),r.path.length===0&&(r.path="/"),e.aws&&r.aws(e.aws),e.hawk&&r.hawk(e.hawk),e.httpSignature&&r.httpSignature(e.httpSignature),e.auth&&(Object.prototype.hasOwnProperty.call(e.auth,"username")&&(e.auth.user=e.auth.username),Object.prototype.hasOwnProperty.call(e.auth,"password")&&(e.auth.pass=e.auth.password),r.auth(e.auth.user,e.auth.pass,e.auth.sendImmediately,e.auth.bearer)),r.gzip&&!r.hasHeader("accept-encoding")&&r.setHeader("accept-encoding","gzip, deflate"),r.uri.auth&&!r.hasHeader("authorization")){var 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 S=r.proxy.auth.split(":").map(function(I){return r._qs.unescape(I)}),b="Basic "+iL(S.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(Gz(r.body)&&(r.body=oc.from(r.body)),!r.hasHeader("content-length")){var I;typeof r.body=="string"?I=oc.byteLength(r.body):Array.isArray(r.body)?I=r.body.reduce(function(R,W){return R+W.length},0):I=r.body.length,I?r.setHeader("content-length",I):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!pj(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:":Mz,"https:":cj},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=oL();D.major===0&&D.minor<=10?r.agentClass=P==="http:"?fj:fj.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,tL(I))r.hasHeader("content-type")||r.setHeader("content-type",Vz.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)}}),nL(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)pj(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,W){!R&&!isNaN(W)&&r.setHeader("content-length",W),I()})):I(),r.ntick=!0}})};qr.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=nc.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])};qr.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),a=Rs();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=dj(e);delete i.auth,at("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=Rs()-e.startTimeNow,o)){var s=function(){e.timings.lookup=Rs()-e.startTimeNow},u=function(){e.timings.connect=Rs()-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)}};qr.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)}};qr.prototype.onRequestResponse=function(e){var r=this;if(r.timing&&(r.timings.response=Rs()-r.startTimeNow),at("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=Rs()-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),at("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}),at("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){at("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=cL,r.httpModule===cj&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){at("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:mj,t=function(p){try{i.setCookie(p,r.uri.href,{ignoreError:!0})}catch(m){r.emit("error",m)}};if(e.caseless=lj(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:Wf.Z_SYNC_FLUSH,finishFlush:Wf.Z_SYNC_FLUSH};u==="gzip"?(s=Wf.createGunzip(f),e.pipe(s)):u==="deflate"?(s=Wf.createInflate(f),e.pipe(s)):(u!=="identity"&&at("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){at("aborted",r.uri.href);return}r.emit("complete",e)})}at("finish init function",r.uri.href)}};qr.prototype.readResponseBody=function(e){var r=this;at("reading response's body");var a=[],i=0,t=[];r.on("data",function(n){oc.isBuffer(n)?n.length&&(i+=n.length,a.push(n)):t.push(n)}),r.on("end",function(){if(at("end event",r.uri.href),r._aborted){at("aborted",r.uri.href),a=[],i=0;return}if(i?(at("has body",r.uri.href,i),e.body=oc.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{at("invalid JSON received",r.uri.href)}at("emitting complete",r.uri.href),typeof e.body=="undefined"&&!r._json&&(e.body=r.encoding===null?oc.alloc(0):""),r.emit("complete",e,e.body)})};qr.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.clearTimeout(),e.emit("abort")};qr.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)};qr.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=nc.parse(a.uri.href.split("?")[0]+"?"+n),a.url=a.uri,a.path=a.uri.path,a.uri.host==="unix"&&a.enableUnixSocket()),a};qr.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 $z,r._form.on("error",function(a){a.message="form-data: "+a.message,r.emit("error",a),r.abort()}),r._form)};qr.prototype.multipart=function(e){var r=this;return r._multipart.onRequest(e),r._multipart.chunked||(r.body=r._multipart.body),r};qr.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=hj(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=hj(e,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")),typeof r.jsonReviver=="function"&&(r._jsonReviver=r.jsonReviver),r};qr.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};qr.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};qr.prototype.auth=function(e,r,a,i){var t=this;return t._auth.onRequest(e,r,a,i),t};qr.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=Uz.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:Dv.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=Dv.canonicalizeResource(o.resource),a.setHeader("authorization",Dv.authorization(o))}return a};qr.prototype.httpSignature=function(e){var r=this;return Hz.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),at("httpSignature authorization",r.getHeader("authorization")),r};qr.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",eL.header(r.uri,r.method,e))};qr.prototype.oauth=function(e){var r=this;return r._oauth.onRequest(e),r};qr.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:mj,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};qr.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 $f.Stream.prototype.pipe.call(a,e,r),a.pipeDest(e),e;else return a.dests.push(e),$f.Stream.prototype.pipe.call(a,e,r),e};qr.prototype.write=function(){var e=this;if(!e._aborted&&(e._started||e.start(),e.req))return e.req.write.apply(e.req,arguments)};qr.prototype.end=function(e){var r=this;r._aborted||(e&&r.write(e),r._started||r.start(),r.req&&r.req.end())};qr.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0};qr.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1};qr.prototype.destroy=function(){var e=this;this.clearTimeout(),e._ended?e.response&&e.response.destroy():e.end()};qr.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)};qr.defaultProxyHeaderWhiteList=zv.defaultProxyHeaderWhiteList.slice();qr.defaultProxyHeaderExclusiveList=zv.defaultProxyHeaderExclusiveList.slice();qr.prototype.toJSON=gj;bj.exports=qr});var kj=B((aG,wj)=>{"use strict";var sc=vl(),xj=fd(),lL=wl(),fL=lL.paramsHaveRequestBody;function Gf(e,r,a){typeof r=="function"&&(a=r);var i={};return r!==null&&typeof r=="object"?sc(i,r,{uri:e}):typeof e=="string"?sc(i,{uri:e}):sc(i,e),i.callback=a||i.callback,i}function Ta(e,r,a){if(typeof e=="undefined")throw new Error("undefined is not a valid uri or options object.");var i=Gf(e,r,a);if(i.method==="HEAD"&&fL(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new Ta.Request(i)}function Qn(e){var r=e.toUpperCase();return function(a,i,t){var n=Gf(a,i,t);return n.method=r,Ta(n,n.callback)}}Ta.get=Qn("get");Ta.head=Qn("head");Ta.options=Qn("options");Ta.post=Qn("post");Ta.put=Qn("put");Ta.patch=Qn("patch");Ta.del=Qn("delete");Ta.delete=Qn("delete");Ta.jar=function(e){return xj.jar(e)};Ta.cookie=function(e){return xj.parse(e)};function Lv(e,r,a,i){return function(t,n,o){var s=Gf(t,n,o),u={};return sc(!0,u,r,s),u.pool=s.pool||r.pool,i&&(u.method=i.toUpperCase()),typeof a=="function"&&(e=a),e(u,u.callback)}}Ta.defaults=function(e,r){var a=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=Lv(a,e,r),t=["get","head","post","put","patch","del","delete"];return t.forEach(function(n){i[n]=Lv(a[n],e,r,n)}),i.cookie=Lv(a.cookie,e,r),i.jar=a.jar,i.defaults=a.defaults,i};Ta.forever=function(e,r){var a={};return r&&sc(a,r),e&&(a.agentOptions=e),a.forever=!0,Ta.defaults(a)};wj.exports=Ta;Ta.Request=yj();Ta.initParams=Gf;Object.defineProperty(Ta,"debug",{enumerable:!0,get:function(){return Ta.Request.debug},set:function(e){Ta.Request.debug=e}})});var jj=B((tG,_j)=>{_j.exports=pL;function pL(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 Aj=B((iG,Ej)=>{var hL=jj();function dL(e){return{mimeType:vL(mL(e)),data:hL(e)}}function mL(e){return e.substring(5,e.indexOf(";"))}var Sj=/^(\w+\/)+/;function vL(e){e=e.toLowerCase();var r=e.match(Sj);return!r||!(r=r[1])?e:e.replace(Sj,r)}Ej.exports=dL});var Tj=B((oG,Pj)=>{"use strict";var uc=mu(),nG=require("path"),gL=Mx().PNG,bL=Gx(),yL=Jx(),xL=e2().GifReader,wL=n2(),kL=require("fs"),_L=kj(),jL=bf(),SL=Aj();function EL(e,r){var a=new gL;a.parse(e,function(i,t){if(i){r(i);return}r(null,uc(new Uint8Array(t.data),[t.width|0,t.height|0,4],[4,4*t.width|0,1],0))})}function AL(e,r){var a;try{a=bL.decode(e)}catch(n){r(n);return}if(!a){r(new Error("Error decoding jpeg"));return}var i=[a.height,a.width,4],t=uc(a.data,i);r(null,t.transpose(1,0))}function PL(e,r){var a;try{a=new xL(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=uc(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=uc(t,i);try{a.decodeAndBlitFrameRGBA(0,t)}catch(p){r(p);return}r(null,n.transpose(1,0))}}function TL(e,r){var a=new wL(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=uc(n,t);yL(i,o),r(null,o.transpose(1,0))}function Kf(e,r,a){switch(e){case"image/png":EL(r,a);break;case"image/jpg":case"image/jpeg":AL(r,a);break;case"image/gif":PL(r,a);break;case"image/bmp":TL(r,a);break;default:a(new Error("Unsupported file type: "+e))}}Pj.exports=function(r,a,i){if(i||(i=a,a=""),Buffer.isBuffer(r)){if(!a){i(new Error("Invalid file type"));return}Kf(a,r,i)}else if(r.indexOf("data:")===0)try{var t=SL(r);t?process.nextTick(function(){Kf(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?_L({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}Kf(a,s,i)}):kL.readFile(r,function(n,o){if(n){i(n);return}if(a=a||jL.lookup(r),!a){i(new Error("Invalid file type"));return}Kf(a,o,i)})}});var qj=B((Yf,Ij)=>{(function(e,r){typeof Yf=="object"&&typeof Ij!="undefined"?r(Yf):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(Yf,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 h(c){return f(c)}function v(c){return p(c)}function x(c,d,A){return u.call(c,d,A)}function S(c,d,A){x(x(c,d,A),void 0,o)}function b(c,d){S(c,d)}function w(c,d){S(c,void 0,d)}function P(c,d,A){return x(c,d,A)}function T(c){x(c,void 0,o)}var O=function(){var c=t&&t.queueMicrotask;if(typeof c=="function")return c;var d=h(void 0);return function(A){return x(d,A)}}();function D(c,d,A){if(typeof c!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(c,d,A)}function I(c,d,A){try{return h(D(c,d,A))}catch(V){return v(V)}}var R=16384,W=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(d){var A=this._back,V=A;A._elements.length===R-1&&(V={_elements:[],_next:void 0}),A._elements.push(d),V!==A&&(this._back=V,A._next=V),++this._size},c.prototype.shift=function(){var d=this._front,A=d,V=this._cursor,te=V+1,Te=d._elements,Ke=Te[V];return te===R&&(A=d._next,te=0),--this._size,this._cursor=te,d!==A&&(this._front=A),Te[V]=void 0,Ke},c.prototype.forEach=function(d){for(var A=this._cursor,V=this._front,te=V._elements;(A!==te.length||V._next!==void 0)&&!(A===te.length&&(V=V._next,te=V._elements,A=0,te.length===0));)d(te[A]),++A},c.prototype.peek=function(){var d=this._front,A=this._cursor;return d._elements[A]},c}();function z(c,d){c._ownerReadableStream=d,d._reader=c,d._state==="readable"?$(c):d._state==="closed"?ee(c):Y(c,d._storedError)}function Q(c,d){var A=c._ownerReadableStream;return to(A,d)}function Z(c){c._ownerReadableStream._state==="readable"?ue(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):ae(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 K(c){return new TypeError("Cannot "+c+" a stream using a released reader")}function $(c){c._closedPromise=m(function(d,A){c._closedPromise_resolve=d,c._closedPromise_reject=A})}function Y(c,d){$(c),ue(c,d)}function ee(c){$(c),_e(c)}function ue(c,d){c._closedPromise_reject!==void 0&&(T(c._closedPromise),c._closedPromise_reject(d),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}function ae(c,d){Y(c,d)}function _e(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}var oe=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 ie(c){return typeof c=="object"||typeof c=="function"}function De(c,d){if(c!==void 0&&!ie(c))throw new TypeError(d+" is not an object.")}function me(c,d){if(typeof c!="function")throw new TypeError(d+" is not a function.")}function H(c){return typeof c=="object"&&c!==null||typeof c=="function"}function J(c,d){if(!H(c))throw new TypeError(d+" is not an object.")}function ze(c,d,A){if(c===void 0)throw new TypeError("Parameter "+d+" is required in '"+A+"'.")}function be(c,d,A){if(c===void 0)throw new TypeError(d+" is required in '"+A+"'.")}function Fe(c){return Number(c)}function sr(c){return c===0?0:c}function nr(c){return sr(L(c))}function Sr(c,d){var A=0,V=Number.MAX_SAFE_INTEGER,te=Number(c);if(te=sr(te),!xe(te))throw new TypeError(d+" is not a finite number");if(te=nr(te),te<A||te>V)throw new TypeError(d+" is outside the accepted range of "+A+" to "+V+", inclusive");return!xe(te)||te===0?0:te}function N(c,d){if(!wn(c))throw new TypeError(d+" is not a ReadableStream.")}function Se(c){return new $e(c)}function Ae(c,d){c._reader._readRequests.push(d)}function we(c,d,A){var V=c._reader,te=V._readRequests.shift();A?te._closeSteps():te._chunkSteps(d)}function je(c){return c._reader._readRequests.length}function Le(c){var d=c._reader;return!(d===void 0||!We(d))}var $e=function(){function c(d){if(ze(d,1,"ReadableStreamDefaultReader"),N(d,"First parameter"),kn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");z(this,d),this._readRequests=new W}return Object.defineProperty(c.prototype,"closed",{get:function(){return We(this)?this._closedPromise:v(de("closed"))},enumerable:!1,configurable:!0}),c.prototype.cancel=function(d){return d===void 0&&(d=void 0),We(this)?this._ownerReadableStream===void 0?v(K("cancel")):Q(this,d):v(de("cancel"))},c.prototype.read=function(){if(!We(this))return v(de("read"));if(this._ownerReadableStream===void 0)return v(K("read from"));var d,A,V=m(function(Te,Ke){d=Te,A=Ke}),te={_chunkSteps:function(Te){return d({value:Te,done:!1})},_closeSteps:function(){return d({value:void 0,done:!0})},_errorSteps:function(Te){return A(Te)}};return he(this,te),V},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");Z(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,d){var A=c._ownerReadableStream;A._disturbed=!0,A._state==="closed"?d._closeSteps():A._state==="errored"?d._errorSteps(A._storedError):A._readableStreamController[Oe](d)}function de(c){return new TypeError("ReadableStreamDefaultReader.prototype."+c+" can only be used on a ReadableStreamDefaultReader")}var X,ke;typeof r.asyncIterator=="symbol"&&(ke=(X={},X[r.asyncIterator]=function(){return this},X),Object.defineProperty(ke,r.asyncIterator,{enumerable:!1}));var Be=function(){function c(d,A){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=d,this._preventCancel=A}return c.prototype.next=function(){var d=this,A=function(){return d._nextSteps()};return this._ongoingPromise=this._ongoingPromise?P(this._ongoingPromise,A,A):A(),this._ongoingPromise},c.prototype.return=function(d){var A=this,V=function(){return A._returnSteps(d)};return this._ongoingPromise?P(this._ongoingPromise,V,V):V()},c.prototype._nextSteps=function(){var d=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var A=this._reader;if(A._ownerReadableStream===void 0)return v(K("iterate"));var V,te,Te=m(function(fr,Cr){V=fr,te=Cr}),Ke={_chunkSteps:function(fr){d._ongoingPromise=void 0,O(function(){return V({value:fr,done:!1})})},_closeSteps:function(){d._ongoingPromise=void 0,d._isFinished=!0,Z(A),V({value:void 0,done:!0})},_errorSteps:function(fr){d._ongoingPromise=void 0,d._isFinished=!0,Z(A),te(fr)}};return he(A,Ke),Te},c.prototype._returnSteps=function(d){if(this._isFinished)return Promise.resolve({value:d,done:!0});this._isFinished=!0;var A=this._reader;if(A._ownerReadableStream===void 0)return v(K("finish iterating"));if(!this._preventCancel){var V=Q(A,d);return Z(A),P(V,function(){return{value:d,done:!0}})}return Z(A),h({value:d,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,d){var A=Se(c),V=new Be(A,d),te=Object.create(Ye);return te._asyncIteratorImpl=V,te}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 Er=Number.isNaN||function(c){return c!==c};function xr(c){return!(!Pr(c)||c===1/0)}function Pr(c){return!(typeof c!="number"||Er(c)||c<0)}function br(c){var d=c._queue.shift();return c._queueTotalSize-=d.size,c._queueTotalSize<0&&(c._queueTotalSize=0),d.value}function $r(c,d,A){if(A=Number(A),!xr(A))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");c._queue.push({value:d,size:A}),c._queueTotalSize+=A}function Nr(c){var d=c._queue.peek();return d.value}function Hr(c){c._queue=new W,c._queueTotalSize=0}function ta(c){return c.slice()}function Fa(c,d,A,V,te){new Uint8Array(c).set(new Uint8Array(A,V,te),d)}function st(c){return c}function ia(c){return!1}var fa=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"view",{get:function(){if(!Da(this))throw He("view");return this._view},enumerable:!1,configurable:!0}),c.prototype.respond=function(d){if(!Da(this))throw He("respond");if(ze(d,1,"respond"),d=Sr(d,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");ia(this._view.buffer),er(this._associatedReadableByteStreamController,d)},c.prototype.respondWithNewView=function(d){if(!Da(this))throw He("respondWithNewView");if(ze(d,1,"respondWithNewView"),!ArrayBuffer.isView(d))throw new TypeError("You can only respond with array buffer views");if(d.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(d.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");dr(this._associatedReadableByteStreamController,d)},c}();Object.defineProperties(fa.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(fa.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var pa=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 d=this._pendingPullIntos.peek(),A=new Uint8Array(d.buffer,d.byteOffset+d.bytesFilled,d.byteLength-d.bytesFilled),V=Object.create(fa.prototype);Ve(V,this,A),this._byobRequest=V}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 d=this._controlledReadableByteStream._state;if(d!=="readable")throw new TypeError("The stream (in "+d+" state) is not in the readable state and cannot be closed");tr(this)},c.prototype.enqueue=function(d){if(!Ca(this))throw Ge("enqueue");if(ze(d,1,"enqueue"),!ArrayBuffer.isView(d))throw new TypeError("chunk must be an array buffer view");if(d.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(d.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var 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,d)},c.prototype.error=function(d){if(d===void 0&&(d=void 0),!Ca(this))throw Ge("error");Ne(this,d)},c.prototype[Pe]=function(d){if(this._pendingPullIntos.length>0){var A=this._pendingPullIntos.peek();A.bytesFilled=0}Hr(this);var V=this._cancelAlgorithm(d);return qe(this),V},c.prototype[Oe]=function(d){var A=this._controlledReadableByteStream;if(this._queueTotalSize>0){var V=this._queue.shift();this._queueTotalSize-=V.byteLength,l(this);var te=new Uint8Array(V.buffer,V.byteOffset,V.byteLength);d._chunkSteps(te);return}var Te=this._autoAllocateChunkSize;if(Te!==void 0){var Ke=void 0;try{Ke=new ArrayBuffer(Te)}catch(Cr){d._errorSteps(Cr);return}var fr={buffer:Ke,byteOffset:0,byteLength:Te,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(fr)}Ae(A,d),ja(this)},c}();Object.defineProperties(pa.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(pa.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Ca(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableByteStream"))}function Da(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_associatedReadableByteStreamController"))}function ja(c){var d=ar(c);if(!!d){if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;var A=c._pullAlgorithm();S(A,function(){c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,ja(c))},function(V){Ne(c,V)})}}function Nt(c){_(c),c._pendingPullIntos=new W}function Wr(c,d){var A=!1;c._state==="closed"&&(A=!0);var V=yt(d);d.readerType==="default"?we(c,V,A):ne(c,V,A)}function yt(c){var d=c.bytesFilled,A=c.elementSize;return new c.viewConstructor(c.buffer,c.byteOffset,d/A)}function k(c,d,A,V){c._queue.push({buffer:d,byteOffset:A,byteLength:V}),c._queueTotalSize+=V}function y(c,d){var A=d.elementSize,V=d.bytesFilled-d.bytesFilled%A,te=Math.min(c._queueTotalSize,d.byteLength-d.bytesFilled),Te=d.bytesFilled+te,Ke=Te-Te%A,fr=te,Cr=!1;Ke>V&&(fr=Ke-d.bytesFilled,Cr=!0);for(var ca=c._queue;fr>0;){var da=ca.peek(),Ia=Math.min(fr,da.byteLength),it=d.byteOffset+d.bytesFilled;Fa(d.buffer,it,da.buffer,da.byteOffset,Ia),da.byteLength===Ia?ca.shift():(da.byteOffset+=Ia,da.byteLength-=Ia),c._queueTotalSize-=Ia,g(c,Ia,d),fr-=Ia}return Cr}function g(c,d,A){_(c),A.bytesFilled+=d}function l(c){c._queueTotalSize===0&&c._closeRequested?(qe(c),Ns(c._controlledReadableByteStream)):ja(c)}function _(c){c._byobRequest!==null&&(c._byobRequest._associatedReadableByteStreamController=void 0,c._byobRequest._view=null,c._byobRequest=null)}function C(c){for(;c._pendingPullIntos.length>0;){if(c._queueTotalSize===0)return;var d=c._pendingPullIntos.peek();y(c,d)&&(Ie(c),Wr(c._controlledReadableByteStream,d))}}function M(c,d,A){var V=c._controlledReadableByteStream,te=1;d.constructor!==DataView&&(te=d.constructor.BYTES_PER_ELEMENT);var Te=d.constructor,Ke=st(d.buffer),fr={buffer:Ke,byteOffset:d.byteOffset,byteLength:d.byteLength,bytesFilled:0,elementSize:te,viewConstructor:Te,readerType:"byob"};if(c._pendingPullIntos.length>0){c._pendingPullIntos.push(fr),Re(V,A);return}if(V._state==="closed"){var Cr=new Te(fr.buffer,fr.byteOffset,0);A._closeSteps(Cr);return}if(c._queueTotalSize>0){if(y(c,fr)){var ca=yt(fr);l(c),A._chunkSteps(ca);return}if(c._closeRequested){var da=new TypeError("Insufficient bytes to fill elements in the given buffer");Ne(c,da),A._errorSteps(da);return}}c._pendingPullIntos.push(fr),Re(V,A),ja(c)}function re(c,d){d.buffer=st(d.buffer);var A=c._controlledReadableByteStream;if(Ee(A))for(;se(A)>0;){var V=Ie(c);Wr(A,V)}}function ce(c,d,A){if(A.bytesFilled+d>A.byteLength)throw new RangeError("bytesWritten out of range");if(g(c,d,A),!(A.bytesFilled<A.elementSize)){Ie(c);var V=A.bytesFilled%A.elementSize;if(V>0){var te=A.byteOffset+A.bytesFilled,Te=A.buffer.slice(te-V,te);k(c,Te,0,Te.byteLength)}A.buffer=st(A.buffer),A.bytesFilled-=V,Wr(c._controlledReadableByteStream,A),C(c)}}function Ce(c,d){var A=c._pendingPullIntos.peek(),V=c._controlledReadableByteStream._state;if(V==="closed"){if(d!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");re(c,A)}else ce(c,d,A);ja(c)}function Ie(c){var d=c._pendingPullIntos.shift();return _(c),d}function ar(c){var d=c._controlledReadableByteStream;if(d._state!=="readable"||c._closeRequested||!c._started)return!1;if(Le(d)&&je(d)>0||Ee(d)&&se(d)>0)return!0;var A=Qe(c);return A>0}function qe(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0}function tr(c){var d=c._controlledReadableByteStream;if(!(c._closeRequested||d._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 V=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ne(c,V),V}}qe(c),Ns(d)}}function Ze(c,d){var A=c._controlledReadableByteStream;if(!(c._closeRequested||A._state!=="readable")){var V=d.buffer,te=d.byteOffset,Te=d.byteLength,Ke=st(V);if(Le(A))if(je(A)===0)k(c,Ke,te,Te);else{var fr=new Uint8Array(Ke,te,Te);we(A,fr,!1)}else Ee(A)?(k(c,Ke,te,Te),C(c)):k(c,Ke,te,Te);ja(c)}}function Ne(c,d){var A=c._controlledReadableByteStream;A._state==="readable"&&(Nt(c),Hr(c),qe(c),x0(A,d))}function Qe(c){var d=c._controlledReadableByteStream._state;return d==="errored"?null:d==="closed"?0:c._strategyHWM-c._queueTotalSize}function er(c,d){if(d=Number(d),!xr(d))throw new RangeError("bytesWritten must be a finite");Ce(c,d)}function dr(c,d){var A=c._pendingPullIntos.peek();if(A.byteOffset+A.bytesFilled!==d.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(A.byteLength!==d.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");A.buffer=d.buffer,Ce(c,d.byteLength)}function cr(c,d,A,V,te,Te,Ke){d._controlledReadableByteStream=c,d._pullAgain=!1,d._pulling=!1,d._byobRequest=null,d._queue=d._queueTotalSize=void 0,Hr(d),d._closeRequested=!1,d._started=!1,d._strategyHWM=Te,d._pullAlgorithm=V,d._cancelAlgorithm=te,d._autoAllocateChunkSize=Ke,d._pendingPullIntos=new W,c._readableStreamController=d;var fr=A();S(h(fr),function(){d._started=!0,ja(d)},function(Cr){Ne(d,Cr)})}function Xe(c,d,A){var V=Object.create(pa.prototype),te=function(){},Te=function(){return h(void 0)},Ke=function(){return h(void 0)};d.start!==void 0&&(te=function(){return d.start(V)}),d.pull!==void 0&&(Te=function(){return d.pull(V)}),d.cancel!==void 0&&(Ke=function(Cr){return d.cancel(Cr)});var fr=d.autoAllocateChunkSize;if(fr===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");cr(c,V,te,Te,Ke,A,fr)}function Ve(c,d,A){c._associatedReadableByteStreamController=d,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,d){c._reader._readIntoRequests.push(d)}function ne(c,d,A){var V=c._reader,te=V._readIntoRequests.shift();A?te._closeSteps(d):te._chunkSteps(d)}function se(c){return c._reader._readIntoRequests.length}function Ee(c){var d=c._reader;return!(d===void 0||!fe(d))}var ve=function(){function c(d){if(ze(d,1,"ReadableStreamBYOBReader"),N(d,"First parameter"),kn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Ca(d._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");z(this,d),this._readIntoRequests=new W}return Object.defineProperty(c.prototype,"closed",{get:function(){return fe(this)?this._closedPromise:v(or("closed"))},enumerable:!1,configurable:!0}),c.prototype.cancel=function(d){return d===void 0&&(d=void 0),fe(this)?this._ownerReadableStream===void 0?v(K("cancel")):Q(this,d):v(or("cancel"))},c.prototype.read=function(d){if(!fe(this))return v(or("read"));if(!ArrayBuffer.isView(d))return v(new TypeError("view must be an array buffer view"));if(d.byteLength===0)return v(new TypeError("view must have non-zero byteLength"));if(d.buffer.byteLength===0)return v(new TypeError("view's buffer must have non-zero byteLength"));if(this._ownerReadableStream===void 0)return v(K("read from"));var A,V,te=m(function(Ke,fr){A=Ke,V=fr}),Te={_chunkSteps:function(Ke){return A({value:Ke,done:!1})},_closeSteps:function(Ke){return A({value:Ke,done:!0})},_errorSteps:function(Ke){return V(Ke)}};return ye(this,d,Te),te},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");Z(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,d,A){var V=c._ownerReadableStream;V._disturbed=!0,V._state==="errored"?A._errorSteps(V._storedError):M(V._readableStreamController,d,A)}function or(c){return new TypeError("ReadableStreamBYOBReader.prototype."+c+" can only be used on a ReadableStreamBYOBReader")}function pr(c,d){var A=c.highWaterMark;if(A===void 0)return d;if(Er(A)||A<0)throw new RangeError("Invalid highWaterMark");return A}function lr(c){var d=c.size;return d||function(){return 1}}function hr(c,d){De(c,d);var A=c==null?void 0:c.highWaterMark,V=c==null?void 0:c.size;return{highWaterMark:A===void 0?void 0:Fe(A),size:V===void 0?void 0:U(V,d+" has member 'size' that")}}function U(c,d){return me(c,d),function(A){return Fe(c(A))}}function wr(c,d){De(c,d);var A=c==null?void 0:c.abort,V=c==null?void 0:c.close,te=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,d+" has member 'abort' that"),close:V===void 0?void 0:kr(V,c,d+" has member 'close' that"),start:te===void 0?void 0:vr(te,c,d+" has member 'start' that"),write:Ke===void 0?void 0:Ar(Ke,c,d+" has member 'write' that"),type:Te}}function Tr(c,d,A){return me(c,A),function(V){return I(c,d,[V])}}function kr(c,d,A){return me(c,A),function(){return I(c,d,[])}}function vr(c,d,A){return me(c,A),function(V){return D(c,d,[V])}}function Ar(c,d,A){return me(c,A),function(V,te){return I(c,d,[V,te])}}function _r(c,d){if(!F(c))throw new TypeError(d+" is not a WritableStream.")}var Vr=function(){function c(d,A){d===void 0&&(d={}),A===void 0&&(A={}),d===void 0?d=null:J(d,"First parameter");var V=hr(A,"Second parameter"),te=wr(d,"First parameter");E(this);var Te=te.type;if(Te!==void 0)throw new RangeError("Invalid type is specified");var Ke=lr(V),fr=pr(V,1);e4(this,te,fr,Ke)}return Object.defineProperty(c.prototype,"locked",{get:function(){if(!F(this))throw jc("locked");return G(this)},enumerable:!1,configurable:!0}),c.prototype.abort=function(d){return d===void 0&&(d=void 0),F(this)?G(this)?v(new TypeError("Cannot abort a stream that already has a writer")):pe(this,d):v(jc("abort"))},c.prototype.close=function(){return F(this)?G(this)?v(new TypeError("Cannot close a stream that already has a writer")):ha(this)?v(new TypeError("Cannot close an already-closing stream")):ge(this):v(jc("close"))},c.prototype.getWriter=function(){if(!F(this))throw jc("getWriter");return Fr(this)},c}();Object.defineProperties(Vr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Vr.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function Fr(c){return new Bs(c)}function j(c,d,A,V,te,Te){te===void 0&&(te=1),Te===void 0&&(Te=function(){return 1});var Ke=Object.create(Vr.prototype);E(Ke);var fr=Object.create(Fo.prototype);return s0(Ke,fr,c,d,A,V,te,Te),Ke}function E(c){c._state="writable",c._storedError=void 0,c._writer=void 0,c._writableStreamController=void 0,c._writeRequests=new W,c._inFlightWriteRequest=void 0,c._closeRequest=void 0,c._inFlightCloseRequest=void 0,c._pendingAbortRequest=void 0,c._backpressure=!1}function F(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_writableStreamController"))}function G(c){return c._writer!==void 0}function pe(c,d){var A=c._state;if(A==="closed"||A==="errored")return h(void 0);if(c._pendingAbortRequest!==void 0)return c._pendingAbortRequest._promise;var V=!1;A==="erroring"&&(V=!0,d=void 0);var te=m(function(Te,Ke){c._pendingAbortRequest={_promise:void 0,_resolve:Te,_reject:Ke,_reason:d,_wasAlreadyErroring:V}});return c._pendingAbortRequest._promise=te,V||Or(c,d),te}function ge(c){var d=c._state;if(d==="closed"||d==="errored")return v(new TypeError("The stream (in "+d+" state) is not in the writable state and cannot be closed"));var A=m(function(te,Te){var Ke={_resolve:te,_reject:Te};c._closeRequest=Ke}),V=c._writer;return V!==void 0&&c._backpressure&&d==="writable"&&ap(V),r4(c._writableStreamController),A}function Me(c){var d=m(function(A,V){var te={_resolve:A,_reject:V};c._writeRequests.push(te)});return d}function rr(c,d){var A=c._state;if(A==="writable"){Or(c,d);return}ua(c)}function Or(c,d){var A=c._writableStreamController;c._state="erroring",c._storedError=d;var V=c._writer;V!==void 0&&t0(V,d),!At(c)&&A._started&&ua(c)}function ua(c){c._state="errored",c._writableStreamController[le]();var d=c._storedError;if(c._writeRequests.forEach(function(te){te._reject(d)}),c._writeRequests=new W,c._pendingAbortRequest===void 0){Yi(c);return}var A=c._pendingAbortRequest;if(c._pendingAbortRequest=void 0,A._wasAlreadyErroring){A._reject(d),Yi(c);return}var V=c._writableStreamController[oe](A._reason);S(V,function(){A._resolve(),Yi(c)},function(te){A._reject(te),Yi(c)})}function ut(c){c._inFlightWriteRequest._resolve(void 0),c._inFlightWriteRequest=void 0}function tt(c,d){c._inFlightWriteRequest._reject(d),c._inFlightWriteRequest=void 0,rr(c,d)}function Mt(c){c._inFlightCloseRequest._resolve(void 0),c._inFlightCloseRequest=void 0;var d=c._state;d==="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&&f0(A)}function Jn(c,d){c._inFlightCloseRequest._reject(d),c._inFlightCloseRequest=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._reject(d),c._pendingAbortRequest=void 0),rr(c,d)}function ha(c){return!(c._closeRequest===void 0&&c._inFlightCloseRequest===void 0)}function At(c){return!(c._inFlightWriteRequest===void 0&&c._inFlightCloseRequest===void 0)}function Zn(c){c._inFlightCloseRequest=c._closeRequest,c._closeRequest=void 0}function ui(c){c._inFlightWriteRequest=c._writeRequests.shift()}function Yi(c){c._closeRequest!==void 0&&(c._closeRequest._reject(c._storedError),c._closeRequest=void 0);var d=c._writer;d!==void 0&&ep(d,c._storedError)}function wc(c,d){var A=c._writer;A!==void 0&&d!==c._backpressure&&(d?u4(A):ap(A)),c._backpressure=d}var Bs=function(){function c(d){if(ze(d,1,"WritableStreamDefaultWriter"),_r(d,"First parameter"),G(d))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=d,d._writer=this;var A=d._state;if(A==="writable")!ha(d)&&d._backpressure?Ec(this):p0(this),Sc(this);else if(A==="erroring")rp(this,d._storedError),Sc(this);else if(A==="closed")p0(this),o4(this);else{var V=d._storedError;rp(this,V),l0(this,V)}}return Object.defineProperty(c.prototype,"closed",{get:function(){return eo(this)?this._closedPromise:v(ro("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!eo(this))throw ro("desiredSize");if(this._ownerWritableStream===void 0)throw Ds("desiredSize");return Jj(this)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ready",{get:function(){return eo(this)?this._readyPromise:v(ro("ready"))},enumerable:!1,configurable:!0}),c.prototype.abort=function(d){return d===void 0&&(d=void 0),eo(this)?this._ownerWritableStream===void 0?v(Ds("abort")):Yj(this,d):v(ro("abort"))},c.prototype.close=function(){if(!eo(this))return v(ro("close"));var d=this._ownerWritableStream;return d===void 0?v(Ds("close")):ha(d)?v(new TypeError("Cannot close an already-closing stream")):a0(this)},c.prototype.releaseLock=function(){if(!eo(this))throw ro("releaseLock");var d=this._ownerWritableStream;d!==void 0&&i0(this)},c.prototype.write=function(d){return d===void 0&&(d=void 0),eo(this)?this._ownerWritableStream===void 0?v(Ds("write to")):n0(this,d):v(ro("write"))},c}();Object.defineProperties(Bs.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(Bs.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function eo(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_ownerWritableStream"))}function Yj(c,d){var A=c._ownerWritableStream;return pe(A,d)}function a0(c){var d=c._ownerWritableStream;return ge(d)}function Qj(c){var d=c._ownerWritableStream,A=d._state;return ha(d)||A==="closed"?h(void 0):A==="errored"?v(d._storedError):a0(c)}function Xj(c,d){c._closedPromiseState==="pending"?ep(c,d):s4(c,d)}function t0(c,d){c._readyPromiseState==="pending"?h0(c,d):c4(c,d)}function Jj(c){var d=c._ownerWritableStream,A=d._state;return A==="errored"||A==="erroring"?null:A==="closed"?0:u0(d._writableStreamController)}function i0(c){var d=c._ownerWritableStream,A=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");t0(c,A),Xj(c,A),d._writer=void 0,c._ownerWritableStream=void 0}function n0(c,d){var A=c._ownerWritableStream,V=A._writableStreamController,te=a4(V,d);if(A!==c._ownerWritableStream)return v(Ds("write to"));var Te=A._state;if(Te==="errored")return v(A._storedError);if(ha(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 t4(V,d,te),Ke}var o0={},Fo=function(){function c(){throw new TypeError("Illegal constructor")}return c.prototype.error=function(d){if(d===void 0&&(d=void 0),!Zj(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");var A=this._controlledWritableStream._state;A==="writable"&&c0(this,d)},c.prototype[oe]=function(d){var A=this._abortAlgorithm(d);return kc(this),A},c.prototype[le]=function(){Hr(this)},c}();Object.defineProperties(Fo.prototype,{error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Fo.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Zj(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledWritableStream"))}function s0(c,d,A,V,te,Te,Ke,fr){d._controlledWritableStream=c,c._writableStreamController=d,d._queue=void 0,d._queueTotalSize=void 0,Hr(d),d._started=!1,d._strategySizeAlgorithm=fr,d._strategyHWM=Ke,d._writeAlgorithm=V,d._closeAlgorithm=te,d._abortAlgorithm=Te;var Cr=Zf(d);wc(c,Cr);var ca=A(),da=h(ca);S(da,function(){d._started=!0,_c(d)},function(Ia){d._started=!0,rr(c,Ia)})}function e4(c,d,A,V){var te=Object.create(Fo.prototype),Te=function(){},Ke=function(){return h(void 0)},fr=function(){return h(void 0)},Cr=function(){return h(void 0)};d.start!==void 0&&(Te=function(){return d.start(te)}),d.write!==void 0&&(Ke=function(ca){return d.write(ca,te)}),d.close!==void 0&&(fr=function(){return d.close()}),d.abort!==void 0&&(Cr=function(ca){return d.abort(ca)}),s0(c,te,Te,Ke,fr,Cr,A,V)}function kc(c){c._writeAlgorithm=void 0,c._closeAlgorithm=void 0,c._abortAlgorithm=void 0,c._strategySizeAlgorithm=void 0}function r4(c){$r(c,o0,0),_c(c)}function a4(c,d){try{return c._strategySizeAlgorithm(d)}catch(A){return Jf(c,A),1}}function u0(c){return c._strategyHWM-c._queueTotalSize}function t4(c,d,A){try{$r(c,d,A)}catch(Te){Jf(c,Te);return}var V=c._controlledWritableStream;if(!ha(V)&&V._state==="writable"){var te=Zf(c);wc(V,te)}_c(c)}function _c(c){var d=c._controlledWritableStream;if(!!c._started&&d._inFlightWriteRequest===void 0){var A=d._state;if(A==="erroring"){ua(d);return}if(c._queue.length!==0){var V=Nr(c);V===o0?i4(c):n4(c,V)}}}function Jf(c,d){c._controlledWritableStream._state==="writable"&&c0(c,d)}function i4(c){var d=c._controlledWritableStream;Zn(d),br(c);var A=c._closeAlgorithm();kc(c),S(A,function(){Mt(d)},function(V){Jn(d,V)})}function n4(c,d){var A=c._controlledWritableStream;ui(A);var V=c._writeAlgorithm(d);S(V,function(){ut(A);var te=A._state;if(br(c),!ha(A)&&te==="writable"){var Te=Zf(c);wc(A,Te)}_c(c)},function(te){A._state==="writable"&&kc(c),tt(A,te)})}function Zf(c){var d=u0(c);return d<=0}function c0(c,d){var A=c._controlledWritableStream;kc(c),Or(A,d)}function jc(c){return new TypeError("WritableStream.prototype."+c+" can only be used on a WritableStream")}function ro(c){return new TypeError("WritableStreamDefaultWriter.prototype."+c+" can only be used on a WritableStreamDefaultWriter")}function Ds(c){return new TypeError("Cannot "+c+" a stream using a released writer")}function Sc(c){c._closedPromise=m(function(d,A){c._closedPromise_resolve=d,c._closedPromise_reject=A,c._closedPromiseState="pending"})}function l0(c,d){Sc(c),ep(c,d)}function o4(c){Sc(c),f0(c)}function ep(c,d){c._closedPromise_reject!==void 0&&(T(c._closedPromise),c._closedPromise_reject(d),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="rejected")}function s4(c,d){l0(c,d)}function f0(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 Ec(c){c._readyPromise=m(function(d,A){c._readyPromise_resolve=d,c._readyPromise_reject=A}),c._readyPromiseState="pending"}function rp(c,d){Ec(c),h0(c,d)}function p0(c){Ec(c),ap(c)}function h0(c,d){c._readyPromise_reject!==void 0&&(T(c._readyPromise),c._readyPromise_reject(d),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="rejected")}function u4(c){Ec(c)}function c4(c,d){rp(c,d)}function ap(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 l4(c){if(typeof c!="object"||c===null)return!1;try{return typeof c.aborted=="boolean"}catch{return!1}}var d0=typeof DOMException!="undefined"?DOMException:void 0;function f4(c){if(!(typeof c=="function"||typeof c=="object"))return!1;try{return new c,!0}catch{return!1}}function p4(){var c=function(A,V){this.message=A||"",this.name=V||"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 h4=f4(d0)?d0:p4();function m0(c,d,A,V,te,Te){var Ke=Se(c),fr=Fr(d);c._disturbed=!0;var Cr=!1,ca=h(void 0);return m(function(da,Ia){var it;if(Te!==void 0){if(it=function(){var Gr=new h4("Aborted","AbortError"),Ga=[];V||Ga.push(function(){return d._state==="writable"?pe(d,Gr):h(void 0)}),te||Ga.push(function(){return c._state==="readable"?to(c,Gr):h(void 0)}),oo(function(){return Promise.all(Ga.map(function(Tt){return Tt()}))},!0,Gr)},Te.aborted){it();return}Te.addEventListener("abort",it)}function Us(){return m(function(Gr,Ga){function Tt(Mc){Mc?Gr():x(sp(),Tt,Ga)}Tt(!1)})}function sp(){return Cr?h(!0):x(fr._readyPromise,function(){return m(function(Gr,Ga){he(Ke,{_chunkSteps:function(Tt){ca=x(n0(fr,Tt),void 0,a),Gr(!1)},_closeSteps:function(){return Gr(!0)},_errorSteps:Ga})})})}if(Qi(c,Ke._closedPromise,function(Gr){V?Lc(!0,Gr):oo(function(){return pe(d,Gr)},!0,Gr)}),Qi(d,fr._closedPromise,function(Gr){te?Lc(!0,Gr):oo(function(){return to(c,Gr)},!0,Gr)}),no(c,Ke._closedPromise,function(){A?Lc():oo(function(){return Qj(fr)})}),ha(d)||d._state==="closed"){var qo=new TypeError("the destination writable stream closed before all data could be piped to it");te?Lc(!0,qo):oo(function(){return to(c,qo)},!0,qo)}T(Us());function Pt(){var Gr=ca;return x(ca,function(){return Gr!==ca?Pt():void 0})}function Qi(Gr,Ga,Tt){Gr._state==="errored"?Tt(Gr._storedError):w(Ga,Tt)}function no(Gr,Ga,Tt){Gr._state==="closed"?Tt():b(Ga,Tt)}function oo(Gr,Ga,Tt){if(Cr)return;Cr=!0,d._state==="writable"&&!ha(d)?b(Pt(),Mc):Mc();function Mc(){S(Gr(),function(){return Nc(Ga,Tt)},function(U4){return Nc(!0,U4)})}}function Lc(Gr,Ga){Cr||(Cr=!0,d._state==="writable"&&!ha(d)?b(Pt(),function(){return Nc(Gr,Ga)}):Nc(Gr,Ga))}function Nc(Gr,Ga){i0(fr),Z(Ke),Te!==void 0&&Te.removeEventListener("abort",it),Gr?Ia(Ga):da(void 0)}})}var Co=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!Ac(this))throw Fc("desiredSize");return tp(this)},enumerable:!1,configurable:!0}),c.prototype.close=function(){if(!Ac(this))throw Fc("close");if(!Io(this))throw new TypeError("The stream is not in a state that permits close");Ls(this)},c.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Ac(this))throw Fc("enqueue");if(!Io(this))throw new TypeError("The stream is not in a state that permits enqueue");return Tc(this,d)},c.prototype.error=function(d){if(d===void 0&&(d=void 0),!Ac(this))throw Fc("error");xn(this,d)},c.prototype[Pe]=function(d){Hr(this);var A=this._cancelAlgorithm(d);return Pc(this),A},c.prototype[Oe]=function(d){var A=this._controlledReadableStream;if(this._queue.length>0){var V=br(this);this._closeRequested&&this._queue.length===0?(Pc(this),Ns(A)):zs(this),d._chunkSteps(V)}else Ae(A,d),zs(this)},c}();Object.defineProperties(Co.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Co.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Ac(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableStream"))}function zs(c){var d=v0(c);if(!!d){if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;var A=c._pullAlgorithm();S(A,function(){c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,zs(c))},function(V){xn(c,V)})}}function v0(c){var d=c._controlledReadableStream;if(!Io(c)||!c._started)return!1;if(kn(d)&&je(d)>0)return!0;var A=tp(c);return A>0}function Pc(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0,c._strategySizeAlgorithm=void 0}function Ls(c){if(!!Io(c)){var d=c._controlledReadableStream;c._closeRequested=!0,c._queue.length===0&&(Pc(c),Ns(d))}}function Tc(c,d){if(!!Io(c)){var A=c._controlledReadableStream;if(kn(A)&&je(A)>0)we(A,d,!1);else{var V=void 0;try{V=c._strategySizeAlgorithm(d)}catch(te){throw xn(c,te),te}try{$r(c,d,V)}catch(te){throw xn(c,te),te}}zs(c)}}function xn(c,d){var A=c._controlledReadableStream;A._state==="readable"&&(Hr(c),Pc(c),x0(A,d))}function tp(c){var d=c._controlledReadableStream._state;return d==="errored"?null:d==="closed"?0:c._strategyHWM-c._queueTotalSize}function d4(c){return!v0(c)}function Io(c){var d=c._controlledReadableStream._state;return!c._closeRequested&&d==="readable"}function g0(c,d,A,V,te,Te,Ke){d._controlledReadableStream=c,d._queue=void 0,d._queueTotalSize=void 0,Hr(d),d._started=!1,d._closeRequested=!1,d._pullAgain=!1,d._pulling=!1,d._strategySizeAlgorithm=Ke,d._strategyHWM=Te,d._pullAlgorithm=V,d._cancelAlgorithm=te,c._readableStreamController=d;var fr=A();S(h(fr),function(){d._started=!0,zs(d)},function(Cr){xn(d,Cr)})}function m4(c,d,A,V){var te=Object.create(Co.prototype),Te=function(){},Ke=function(){return h(void 0)},fr=function(){return h(void 0)};d.start!==void 0&&(Te=function(){return d.start(te)}),d.pull!==void 0&&(Ke=function(){return d.pull(te)}),d.cancel!==void 0&&(fr=function(Cr){return d.cancel(Cr)}),g0(c,te,Te,Ke,fr,A,V)}function Fc(c){return new TypeError("ReadableStreamDefaultController.prototype."+c+" can only be used on a ReadableStreamDefaultController")}function v4(c,d){var A=Se(c),V=!1,te=!1,Te=!1,Ke,fr,Cr,ca,da,Ia=m(function(Pt){da=Pt});function it(){if(V)return h(void 0);V=!0;var Pt={_chunkSteps:function(Qi){O(function(){V=!1;var no=Qi,oo=Qi;te||Tc(Cr._readableStreamController,no),Te||Tc(ca._readableStreamController,oo)})},_closeSteps:function(){V=!1,te||Ls(Cr._readableStreamController),Te||Ls(ca._readableStreamController),(!te||!Te)&&da(void 0)},_errorSteps:function(){V=!1}};return he(A,Pt),h(void 0)}function Us(Pt){if(te=!0,Ke=Pt,Te){var Qi=ta([Ke,fr]),no=to(c,Qi);da(no)}return Ia}function sp(Pt){if(Te=!0,fr=Pt,te){var Qi=ta([Ke,fr]),no=to(c,Qi);da(no)}return Ia}function qo(){}return Cr=ip(qo,it,Us),ca=ip(qo,it,sp),w(A._closedPromise,function(Pt){xn(Cr._readableStreamController,Pt),xn(ca._readableStreamController,Pt),(!te||!Te)&&da(void 0)}),[Cr,ca]}function g4(c,d){De(c,d);var A=c,V=A==null?void 0:A.autoAllocateChunkSize,te=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:V===void 0?void 0:Sr(V,d+" has member 'autoAllocateChunkSize' that"),cancel:te===void 0?void 0:b4(te,A,d+" has member 'cancel' that"),pull:Te===void 0?void 0:y4(Te,A,d+" has member 'pull' that"),start:Ke===void 0?void 0:x4(Ke,A,d+" has member 'start' that"),type:fr===void 0?void 0:w4(fr,d+" has member 'type' that")}}function b4(c,d,A){return me(c,A),function(V){return I(c,d,[V])}}function y4(c,d,A){return me(c,A),function(V){return I(c,d,[V])}}function x4(c,d,A){return me(c,A),function(V){return D(c,d,[V])}}function w4(c,d){if(c=""+c,c!=="bytes")throw new TypeError(d+" '"+c+"' is not a valid enumeration value for ReadableStreamType");return c}function k4(c,d){De(c,d);var A=c==null?void 0:c.mode;return{mode:A===void 0?void 0:_4(A,d+" has member 'mode' that")}}function _4(c,d){if(c=""+c,c!=="byob")throw new TypeError(d+" '"+c+"' is not a valid enumeration value for ReadableStreamReaderMode");return c}function j4(c,d){De(c,d);var A=c==null?void 0:c.preventCancel;return{preventCancel:Boolean(A)}}function b0(c,d){De(c,d);var A=c==null?void 0:c.preventAbort,V=c==null?void 0:c.preventCancel,te=c==null?void 0:c.preventClose,Te=c==null?void 0:c.signal;return Te!==void 0&&S4(Te,d+" has member 'signal' that"),{preventAbort:Boolean(A),preventCancel:Boolean(V),preventClose:Boolean(te),signal:Te}}function S4(c,d){if(!l4(c))throw new TypeError(d+" is not an AbortSignal.")}function E4(c,d){De(c,d);var A=c==null?void 0:c.readable;be(A,"readable","ReadableWritablePair"),N(A,d+" has member 'readable' that");var V=c==null?void 0:c.writable;return be(V,"writable","ReadableWritablePair"),_r(V,d+" has member 'writable' that"),{readable:A,writable:V}}var ao=function(){function c(d,A){d===void 0&&(d={}),A===void 0&&(A={}),d===void 0?d=null:J(d,"First parameter");var V=hr(A,"Second parameter"),te=g4(d,"First parameter");if(y0(this),te.type==="bytes"){if(V.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var Te=pr(V,0);Xe(this,te,Te)}else{var Ke=lr(V),Te=pr(V,1);m4(this,te,Te,Ke)}}return Object.defineProperty(c.prototype,"locked",{get:function(){if(!wn(this))throw io("locked");return kn(this)},enumerable:!1,configurable:!0}),c.prototype.cancel=function(d){return d===void 0&&(d=void 0),wn(this)?kn(this)?v(new TypeError("Cannot cancel a stream that already has a reader")):to(this,d):v(io("cancel"))},c.prototype.getReader=function(d){if(d===void 0&&(d=void 0),!wn(this))throw io("getReader");var A=k4(d,"First parameter");return A.mode===void 0?Se(this):ir(this)},c.prototype.pipeThrough=function(d,A){if(A===void 0&&(A={}),!wn(this))throw io("pipeThrough");ze(d,1,"pipeThrough");var V=E4(d,"First parameter"),te=b0(A,"Second parameter");if(kn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(G(V.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var Te=m0(this,V.writable,te.preventClose,te.preventAbort,te.preventCancel,te.signal);return T(Te),V.readable},c.prototype.pipeTo=function(d,A){if(A===void 0&&(A={}),!wn(this))return v(io("pipeTo"));if(d===void 0)return v("Parameter 1 is required in 'pipeTo'.");if(!F(d))return v(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var V;try{V=b0(A,"Second parameter")}catch(te){return v(te)}return kn(this)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):G(d)?v(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):m0(this,d,V.preventClose,V.preventAbort,V.preventCancel,V.signal)},c.prototype.tee=function(){if(!wn(this))throw io("tee");var d=v4(this);return ta(d)},c.prototype.values=function(d){if(d===void 0&&(d=void 0),!wn(this))throw io("values");var A=j4(d,"First parameter");return Ue(this,A.preventCancel)},c}();Object.defineProperties(ao.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(ao.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(ao.prototype,r.asyncIterator,{value:ao.prototype.values,writable:!0,configurable:!0});function ip(c,d,A,V,te){V===void 0&&(V=1),te===void 0&&(te=function(){return 1});var Te=Object.create(ao.prototype);y0(Te);var Ke=Object.create(Co.prototype);return g0(Te,Ke,c,d,A,V,te),Te}function y0(c){c._state="readable",c._reader=void 0,c._storedError=void 0,c._disturbed=!1}function wn(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readableStreamController"))}function kn(c){return c._reader!==void 0}function to(c,d){if(c._disturbed=!0,c._state==="closed")return h(void 0);if(c._state==="errored")return v(c._storedError);Ns(c);var A=c._readableStreamController[Pe](d);return P(A,a)}function Ns(c){c._state="closed";var d=c._reader;d!==void 0&&(_e(d),We(d)&&(d._readRequests.forEach(function(A){A._closeSteps()}),d._readRequests=new W))}function x0(c,d){c._state="errored",c._storedError=d;var A=c._reader;A!==void 0&&(ue(A,d),We(A)?(A._readRequests.forEach(function(V){V._errorSteps(d)}),A._readRequests=new W):(A._readIntoRequests.forEach(function(V){V._errorSteps(d)}),A._readIntoRequests=new W))}function io(c){return new TypeError("ReadableStream.prototype."+c+" can only be used on a ReadableStream")}function w0(c,d){De(c,d);var A=c==null?void 0:c.highWaterMark;return be(A,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Fe(A)}}var A4=function(d){return d.byteLength},Cc=function(){function c(d){ze(d,1,"ByteLengthQueuingStrategy"),d=w0(d,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(c.prototype,"highWaterMark",{get:function(){if(!_0(this))throw k0("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"size",{get:function(){if(!_0(this))throw k0("size");return A4},enumerable:!1,configurable:!0}),c}();Object.defineProperties(Cc.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Cc.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function k0(c){return new TypeError("ByteLengthQueuingStrategy.prototype."+c+" can only be used on a ByteLengthQueuingStrategy")}function _0(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_byteLengthQueuingStrategyHighWaterMark"))}var P4=function(){return 1},Ic=function(){function c(d){ze(d,1,"CountQueuingStrategy"),d=w0(d,"First parameter"),this._countQueuingStrategyHighWaterMark=d.highWaterMark}return Object.defineProperty(c.prototype,"highWaterMark",{get:function(){if(!S0(this))throw j0("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"size",{get:function(){if(!S0(this))throw j0("size");return P4},enumerable:!1,configurable:!0}),c}();Object.defineProperties(Ic.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ic.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function j0(c){return new TypeError("CountQueuingStrategy.prototype."+c+" can only be used on a CountQueuingStrategy")}function S0(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_countQueuingStrategyHighWaterMark"))}function T4(c,d){De(c,d);var A=c==null?void 0:c.flush,V=c==null?void 0:c.readableType,te=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:F4(A,c,d+" has member 'flush' that"),readableType:V,start:te===void 0?void 0:C4(te,c,d+" has member 'start' that"),transform:Te===void 0?void 0:I4(Te,c,d+" has member 'transform' that"),writableType:Ke}}function F4(c,d,A){return me(c,A),function(V){return I(c,d,[V])}}function C4(c,d,A){return me(c,A),function(V){return D(c,d,[V])}}function I4(c,d,A){return me(c,A),function(V,te){return I(c,d,[V,te])}}var qc=function(){function c(d,A,V){d===void 0&&(d={}),A===void 0&&(A={}),V===void 0&&(V={}),d===void 0&&(d=null);var te=hr(A,"Second parameter"),Te=hr(V,"Third parameter"),Ke=T4(d,"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),Cr=lr(Te),ca=pr(te,1),da=lr(te),Ia,it=m(function(Us){Ia=Us});q4(this,it,ca,da,fr,Cr),R4(this,Ke),Ke.start!==void 0?Ia(Ke.start(this._transformStreamController)):Ia(void 0)}return Object.defineProperty(c.prototype,"readable",{get:function(){if(!E0(this))throw F0("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"writable",{get:function(){if(!E0(this))throw F0("writable");return this._writable},enumerable:!1,configurable:!0}),c}();Object.defineProperties(qc.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(qc.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function q4(c,d,A,V,te,Te){function Ke(){return d}function fr(it){return z4(c,it)}function Cr(it){return L4(c,it)}function ca(){return N4(c)}c._writable=j(Ke,fr,ca,Cr,A,V);function da(){return M4(c)}function Ia(it){return Rc(c,it),h(void 0)}c._readable=ip(Ke,da,Ia,te,Te),c._backpressure=void 0,c._backpressureChangePromise=void 0,c._backpressureChangePromise_resolve=void 0,Bc(c,!0),c._transformStreamController=void 0}function E0(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_transformStreamController"))}function Oc(c,d){xn(c._readable._readableStreamController,d),Rc(c,d)}function Rc(c,d){A0(c._transformStreamController),Jf(c._writable._writableStreamController,d),c._backpressure&&Bc(c,!1)}function Bc(c,d){c._backpressureChangePromise!==void 0&&c._backpressureChangePromise_resolve(),c._backpressureChangePromise=m(function(A){c._backpressureChangePromise_resolve=A}),c._backpressure=d}var Ms=function(){function c(){throw new TypeError("Illegal constructor")}return Object.defineProperty(c.prototype,"desiredSize",{get:function(){if(!Dc(this))throw zc("desiredSize");var d=this._controlledTransformStream._readable._readableStreamController;return tp(d)},enumerable:!1,configurable:!0}),c.prototype.enqueue=function(d){if(d===void 0&&(d=void 0),!Dc(this))throw zc("enqueue");P0(this,d)},c.prototype.error=function(d){if(d===void 0&&(d=void 0),!Dc(this))throw zc("error");B4(this,d)},c.prototype.terminate=function(){if(!Dc(this))throw zc("terminate");D4(this)},c}();Object.defineProperties(Ms.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ms.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Dc(c){return!(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledTransformStream"))}function O4(c,d,A,V){d._controlledTransformStream=c,c._transformStreamController=d,d._transformAlgorithm=A,d._flushAlgorithm=V}function R4(c,d){var A=Object.create(Ms.prototype),V=function(Te){try{return P0(A,Te),h(void 0)}catch(Ke){return v(Ke)}},te=function(){return h(void 0)};d.transform!==void 0&&(V=function(Te){return d.transform(Te,A)}),d.flush!==void 0&&(te=function(){return d.flush(A)}),O4(c,A,V,te)}function A0(c){c._transformAlgorithm=void 0,c._flushAlgorithm=void 0}function P0(c,d){var A=c._controlledTransformStream,V=A._readable._readableStreamController;if(!Io(V))throw new TypeError("Readable side is not in a state that permits enqueue");try{Tc(V,d)}catch(Te){throw Rc(A,Te),A._readable._storedError}var te=d4(V);te!==A._backpressure&&Bc(A,!0)}function B4(c,d){Oc(c._controlledTransformStream,d)}function T0(c,d){var A=c._transformAlgorithm(d);return P(A,void 0,function(V){throw Oc(c._controlledTransformStream,V),V})}function D4(c){var d=c._controlledTransformStream,A=d._readable._readableStreamController;Ls(A);var V=new TypeError("TransformStream terminated");Rc(d,V)}function z4(c,d){var A=c._transformStreamController;if(c._backpressure){var V=c._backpressureChangePromise;return P(V,function(){var te=c._writable,Te=te._state;if(Te==="erroring")throw te._storedError;return T0(A,d)})}return T0(A,d)}function L4(c,d){return Oc(c,d),h(void 0)}function N4(c){var d=c._readable,A=c._transformStreamController,V=A._flushAlgorithm();return A0(A),P(V,function(){if(d._state==="errored")throw d._storedError;Ls(d._readableStreamController)},function(te){throw Oc(c,te),d._storedError})}function M4(c){return Bc(c,!1),c._backpressureChangePromise}function zc(c){return new TypeError("TransformStreamDefaultController.prototype."+c+" can only be used on a TransformStreamDefaultController")}function F0(c){return new TypeError("TransformStream.prototype."+c+" can only be used on a TransformStream")}var np={ReadableStream:ao,ReadableStreamDefaultController:Co,ReadableByteStreamController:pa,ReadableStreamBYOBRequest:fa,ReadableStreamDefaultReader:$e,ReadableStreamBYOBReader:ve,WritableStream:Vr,WritableStreamDefaultController:Fo,WritableStreamDefaultWriter:Bs,ByteLengthQueuingStrategy:Cc,CountQueuingStrategy:Ic,TransformStream:qc,TransformStreamDefaultController:Ms};if(typeof t!="undefined")for(var op in np)Object.prototype.hasOwnProperty.call(np,op)&&Object.defineProperty(t,op,{value:np[op],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=Cc,e.CountQueuingStrategy=Ic,e.ReadableByteStreamController=pa,e.ReadableStream=ao,e.ReadableStreamBYOBReader=ve,e.ReadableStreamBYOBRequest=fa,e.ReadableStreamDefaultController=Co,e.ReadableStreamDefaultReader=$e,e.TransformStream=qc,e.TransformStreamDefaultController=Ms,e.WritableStream=Vr,e.WritableStreamDefaultController=Fo,e.WritableStreamDefaultWriter=Bs,Object.defineProperty(e,"__esModule",{value:!0})})});var up="3.3.0-alpha.5";function R0(e,r){if(!e)throw new Error(r||"loaders.gl assertion failed.")}var Ti={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global,document:typeof document!="undefined"&&document},pN=Ti.self||Ti.window||Ti.global||{},hN=Ti.window||Ti.self||Ti.global||{},B0=Ti.global||Ti.self||Ti.window||{},dN=Ti.document||{};var so=typeof process!="object"||String(process)!=="[object process]"||process.browser,Vs=typeof importScripts=="function",mN=typeof window!="undefined"&&typeof window.orientation!="undefined",D0=typeof process!="undefined"&&process.version&&/v([0-9]*)/.exec(process.version),vN=D0&&parseFloat(D0[1])||0;function cp(e,r=!0,a){let i=a||new Set;if(e){if(z0(e))i.add(e);else if(z0(e.buffer))i.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(r&&typeof e=="object")for(let t in e)cp(e[t],r,i)}}return a===void 0?Array.from(i):[]}function z0(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 uo(){let parentPort;try{eval("globalThis.parentPort = require('worker_threads').parentPort"),parentPort=globalThis.parentPort}catch{}return parentPort}var lp=new Map,Kt=class{static inWorkerThread(){return typeof self!="undefined"||Boolean(uo())}static set onmessage(r){function a(t){let n=uo(),{type:o,payload:s}=n?t:t.data;r(o,s)}let i=uo();i?(i.on("message",a),i.on("exit",()=>console.debug("Node worker closing"))):globalThis.onmessage=a}static addEventListener(r){let a=lp.get(r);a||(a=t=>{if(!J4(t))return;let n=uo(),{type:o,payload:s}=n?t:t.data;r(o,s)}),uo()?console.error("not implemented"):globalThis.addEventListener("message",a)}static removeEventListener(r){let a=lp.get(r);lp.delete(r),uo()?console.error("not implemented"):globalThis.removeEventListener("message",a)}static postMessage(r,a){let i={source:"loaders.gl",type:r,payload:a},t=cp(a),n=uo();n?n.postMessage(i,t):globalThis.postMessage(i,t)}};function J4(e){let{type:r,data:a}=e;return r==="message"&&a&&typeof a.source=="string"&&a.source.startsWith("loaders.gl")}var hp={};Q4(hp,{requireFromFile:()=>pp,requireFromString:()=>Uc});var fp=Ft(require("module")),L0=Ft(require("path"));async function pp(e){if(e.startsWith("http")){let a=await(await fetch(e)).text();return Uc(a)}return e.startsWith("/")||(e=`${process.cwd()}/${e}`),require(e)}function Uc(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=fp.default._nodeModulePaths(L0.default.dirname(r)),t=module.parent,n=new fp.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 Z4="beta",eS=typeof up!="undefined"?up:Z4,dp={};async function $s(e,r=null,a={}){return r&&(e=N0(e,r,a)),dp[e]=dp[e]||rS(e),await dp[e]}function N0(e,r,a){if(e.startsWith("http"))return e;let i=a.modules||{};return i[e]?i[e]:so?a.CDN?(R0(a.CDN.startsWith("http")),`${a.CDN}/${r}@${eS}/dist/libs/${e}`):Vs?`../src/libs/${e}`:`modules/${r}/src/libs/${e}`:`modules/${r}/dist/libs/${e}`}async function rS(e){if(e.endsWith("wasm"))return await(await fetch(e)).arrayBuffer();if(!so)try{return hp&&pp&&await pp(e)}catch{return null}if(Vs)return importScripts(e);let a=await(await fetch(e)).text();return aS(a,e)}function aS(e,r){if(!so)return Uc&&Uc(e,r);if(Vs)return eval.call(B0,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 tS=0;function mp(e){!Kt.inWorkerThread()||(Kt.onmessage=async(r,a)=>{switch(r){case"process":try{let{input:i,options:t={},context:n={}}=a,o=await nS({loader:e,arrayBuffer:i,options:t,context:ci(Ut({},n),{parse:iS})});Kt.postMessage("done",{result:o})}catch(i){let t=i instanceof Error?i.message:"";Kt.postMessage("error",{error:t})}break;default:}})}function iS(e,r){return new Promise((a,i)=>{let t=tS++,n=(s,u)=>{if(u.id===t)switch(s){case"done":Kt.removeEventListener(n),a(u.result);break;case"error":Kt.removeEventListener(n),i(u.error);break;default:}};Kt.addEventListener(n);let o={id:t,input:e,options:r};Kt.postMessage("process",o)})}async function nS({loader:e,arrayBuffer:r,options:a,context:i}){let t,n;if(e.parseSync||e.parse)t=r,n=e.parseSync||e.parse;else if(e.parseTextSync)t=new TextDecoder().decode(r),n=e.parseTextSync;else throw new Error(`Could not load data with ${e.name} loader`);return a=ci(Ut({},a),{modules:e&&e.options&&e.options.modules||{},worker:!1}),await n(t,Ut({},a),i,e)}var Vv=Ft(Tg());var fi=typeof process!="object"||String(process)!=="[object process]"||process.browser,Cp={self:typeof self!="undefined"&&self,window:typeof window!="undefined"&&window,global:typeof global!="undefined"&&global},Sa=Cp.global||Cp.self||Cp.window;var Fg={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"]=Fg||{};function jr(e,r,a){return r<=e&&e<=a}function TS(e,r){return e.indexOf(r)!==-1}var Zi=Math.floor;function Jc(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function FS(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 CS(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 Yt(e){return 0<=e&&e<=127}var Qt=Yt,Rr=-1;function Ip(e){this.tokens=[].slice.call(e),this.tokens.reverse()}Ip.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 Zr=-1;function Br(e,r){if(e)throw TypeError("Decoder error");return r||65533}function pi(e){throw TypeError("The code point "+e+" could not be encoded.")}function IS(){}IS.prototype={handler:function(e,r){}};function qS(){}qS.prototype={handler:function(e,r){}};function qp(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(Op,e)?Op[e]:null}var Cg=[{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"}],Op={};Cg.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(a){Op[a]=r})})});var qt={},Ot={};function Uo(e,r){return r&&r[e]||null}function Ho(e,r){var a=r.indexOf(e);return a===-1?null:a}function xt(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 OS(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,a=0,i=xt("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 RS(e){if(e===59335)return 7457;var r=0,a=0,i=xt("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 BS(e){Rp=Rp||xt("jis0208").map(function(a,i){return jr(i,8272,8835)?null:a});var r=Rp;return r.indexOf(e)}var Rp;function DS(e){Bp=Bp||xt("big5").map(function(a,i){return i<(161-129)*157?null:a});var r=Bp;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):Ho(e,r)}var Bp,Ig="utf-8";function fo(e,r){if(!(this instanceof fo))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):Ig,r=Jc(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var a=qp(e);if(a===null||a.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Ot[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(fo.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(fo.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(fo.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));fo.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=Jc(a),this._do_not_flush||(this._decoder=Ot[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(a.stream);for(var t=new Ip(i),n=[],o;;){var s=t.read();if(s===Rr||(o=this._decoder.handler(t,s),o===Zr))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===Zr)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!t.endOfStream());this._decoder=null}function u(f){return TS(["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)),CS(f)}return u.call(this,n)};function nu(e,r){if(!(this instanceof nu))throw TypeError("Called as a function. Did you forget 'new'?");r=Jc(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):Ig;var i=qp(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!qt[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");a._encoding=i}else a._encoding=qp("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(nu.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});nu.prototype.encode=function(r,a){r=r===void 0?"":String(r),a=Jc(a),this._do_not_flush||(this._encoder=qt[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(a.stream);for(var i=new Ip(FS(r)),t=[],n;;){var o=i.read();if(o===Rr||(n=this._encoder.handler(i,o),n===Zr))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!==Zr;)Array.isArray(n)?t.push.apply(t,n):t.push(n);this._encoder=null}return new Uint8Array(t)};function zS(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 Zr;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 LS(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Zr;if(Qt(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}}qt["UTF-8"]=function(e){return new LS(e)};Ot["UTF-8"]=function(e){return new zS(e)};function NS(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Rr)return Zr;if(Yt(t))return t;var n=e[t-128];return n===null?Br(a):n}}function MS(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Rr)return Zr;if(Qt(t))return t;var n=Ho(t,e);return n===null&&pi(t),n+128}}(function(){"encoding-indexes"in global&&Cg.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var a=r.name,i=xt(a.toLowerCase());Ot[a]=function(t){return new NS(i,t)},qt[a]=function(t){return new MS(i,t)}})})})();Ot.GBK=function(e){return new qg(e)};qt.GBK=function(e){return new Og(e,!0)};function qg(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 Zr;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=OS((((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:Uo(p,xt("gb18030")),s===null&&Yt(o)&&n.prepend(o),s===null?Br(r):s}return Yt(o)?o:o===128?8364:jr(o,129,254)?(a=o,null):Br(r)}}function Og(e,r){var a=e.fatal;this.handler=function(i,t){if(t===Rr)return Zr;if(Qt(t))return t;if(t===58853)return pi(t);if(r&&t===8364)return 128;var n=Ho(t,xt("gb18030"));if(n!==null){var o=Zi(n/190)+129,s=n%190,u=s<63?64:65;return[o,s+u]}if(r)return pi(t);n=RS(t);var f=Zi(n/10/126/10);n=n-f*10*126*10;var p=Zi(n/10/126);n=n-p*10*126;var m=Zi(n/10),h=n-m*10;return[f+129,p+48,m+129,h+48]}}qt.gb18030=function(e){return new Og(e)};Ot.gb18030=function(e){return new qg(e)};function US(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 Zr;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:Uo(o,xt("big5"));return u===null&&Yt(t)&&i.prepend(t),u===null?Br(r):u}return Yt(t)?t:jr(t,129,254)?(a=t,null):Br(r)}}function HS(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Zr;if(Qt(i))return i;var t=DS(i);if(t===null)return pi(i);var n=Zi(t/157)+129;if(n<161)return pi(i);var o=t%157,s=o<63?64:98;return[n,o+s]}}qt.Big5=function(e){return new HS(e)};Ot.Big5=function(e){return new US(e)};function VS(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 Zr;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=Uo((o-161)*94+(n-161),xt(a?"jis0212":"jis0208"))),a=!1,jr(n,161,254)||t.prepend(n),s===null?Br(r):s}return Yt(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):Br(r)}}function $S(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Zr;if(Qt(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=Ho(i,xt("jis0208"));if(t===null)return pi(i);var n=Zi(t/94)+161,o=t%94+161;return[n,o]}}qt["EUC-JP"]=function(e){return new $S(e)};Ot["EUC-JP"]=function(e){return new VS(e)};function WS(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?Zr:(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?Zr:(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?Zr:(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?Zr:(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=Uo(f,xt("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 h=null;if(m===40&&u===66&&(h=a.ASCII),m===40&&u===74&&(h=a.Roman),m===40&&u===73&&(h=a.Katakana),m===36&&(u===64||u===66)&&(h=a.LeadByte),h!==null){i=i=h;var v=o;return o=!0,v?Br(r):null}return s.prepend([m,u]),o=!1,i=t,Br(r)}}}function GS(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 Zr;if((i===a.ASCII||i===a.Roman)&&(n===14||n===15||n===27))return pi(65533);if(i===a.ASCII&&Qt(n))return n;if(i===a.Roman&&(Qt(n)&&n!==92&&n!==126||n==165||n==8254)){if(Qt(n))return n;if(n===165)return 92;if(n===8254)return 126}if(Qt(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=Ho(n,xt("jis0208"));if(o===null)return pi(n);if(i!==a.jis0208)return t.prepend(n),i=a.jis0208,[27,36,66];var s=Zi(o/94)+33,u=o%94+33;return[s,u]}}qt["ISO-2022-JP"]=function(e){return new GS(e)};Ot["ISO-2022-JP"]=function(e){return new WS(e)};function KS(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 Zr;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:Uo(o,xt("jis0208"));return f===null&&Yt(t)&&i.prepend(t),f===null?Br(r):f}return Yt(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 YS(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Zr;if(Qt(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=BS(i);if(t===null)return pi(i);var n=Zi(t/188),o=n<31?129:193,s=t%188,u=s<63?64:65;return[n+o,s+u]}}qt.Shift_JIS=function(e){return new YS(e)};Ot.Shift_JIS=function(e){return new KS(e)};function QS(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 Zr;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:Uo(o,xt("euc-kr"));return o===null&&Yt(t)&&i.prepend(t),s===null?Br(r):s}return Yt(t)?t:jr(t,129,254)?(a=t,null):Br(r)}}function XS(e){var r=e.fatal;this.handler=function(a,i){if(i===Rr)return Zr;if(Qt(i))return i;var t=Ho(i,xt("euc-kr"));if(t===null)return pi(i);var n=Zi(t/190)+129,o=t%190+65;return[n,o]}}qt["EUC-KR"]=function(e){return new XS(e)};Ot["EUC-KR"]=function(e){return new QS(e)};function Zc(e,r){var a=e>>8,i=e&255;return r?[a,i]:[i,a]}function Rg(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 Zr;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(Zc(s,e)),Br(a))}return jr(s,55296,56319)?(t=s,null):jr(s,56320,57343)?Br(a):s}}function Bg(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Rr)return Zr;if(jr(t,0,65535))return Zc(t,e);var n=Zc((t-65536>>10)+55296,e),o=Zc((t-65536&1023)+56320,e);return n.concat(o)}}qt["UTF-16BE"]=function(e){return new Bg(!0,e)};Ot["UTF-16BE"]=function(e){return new Rg(!0,e)};qt["UTF-16LE"]=function(e){return new Bg(!1,e)};Ot["UTF-16LE"]=function(e){return new Rg(!1,e)};function JS(e){var r=e.fatal;this.handler=function(a,i){return i===Rr?Zr:Yt(i)?i:63360+i-128}}function ZS(e){var r=e.fatal;this.handler=function(a,i){return i===Rr?Zr:Qt(i)?i:jr(i,63360,63487)?i-63360+128:pi(i)}}qt["x-user-defined"]=function(e){return new ZS(e)};Ot["x-user-defined"]=function(e){return new JS(e)};var eE="rejected",rE="fulfilled";function Dg(e){let r=e.map(a=>a.then(i=>({status:rE,value:i})).catch(i=>({status:eE,reason:i})));return Promise.all(r)}function el(e){return Buffer.from(e).toString("base64")}function Dp(e){return Buffer.from(e,"base64").toString("ascii")}var hi=class{constructor(r){this.map={},r instanceof hi?r.forEach((a,i)=>this.append(i,a)):Array.isArray(r)?r.forEach(a=>this.append(a[0],a[1])):r&&Object.getOwnPropertyNames(r).forEach(a=>this.append(a,r[a]))}append(r,a){r=ou(r),a=zg(a);let i=this.map[r];this.map[r]=i?`${i}, ${a}`:a}delete(r){delete this.map[ou(r)]}get(r){return r=ou(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(ou(r))}set(r,a){this.map[ou(r)]=zg(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)}),zp(r)}values(){let r=[];return this.forEach(function(a){r.push(a)}),zp(r)}entries(){let r=[];return this.forEach(function(a,i){r.push([i,a])}),zp(r)}*[Symbol.iterator](){yield*this.entries()}};function ou(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e)||e==="")throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function zg(e){return typeof e!="string"&&(e=String(e)),e}function zp(e){let r={next(){let a=e.shift();return{done:a===void 0,value:a}}};return r[Symbol.iterator]=function(){return r},r}function su(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var Ng=Ft(require("fs")),Mg=Ft(require("http")),Ug=Ft(require("https")),rl=Ft(require("zlib"));var aE=e=>e&&e instanceof ArrayBuffer,tE=e=>e&&e instanceof Buffer;function Lg(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:Lp(a),mimeType:i}}function Lp(e){if(aE(e))return e;if(tE(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 iE(e){return e.startsWith("http:")||e.startsWith("https:")}async function Hg(e,r){if(!iE(e)){let a=e.split("?")[0];return await new Promise((i,t)=>{let n=Ng.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:")?Ug.default.request:Mg.default.request,n=nE(e,r),o=t(n,s=>a(s));o.on("error",s=>i(s)),o.end()})}function Vg(e,r){switch(r.get("content-encoding")){case"br":return e.pipe(rl.default.createBrotliDecompress());case"gzip":return e.pipe(rl.default.createGunzip());case"deflate":return e.pipe(rl.default.createDeflate());default:return e}}async function $g(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(Lp(t))}),e.on("end",()=>{let t=oE(r);a(t)})})}function nE(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 ci(Ut(Ut({hostname:t.hostname,path:t.pathname,method:"GET"},r),r==null?void 0:r.fetch),{headers:i,port:t.port})}function oE(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 Mp=Ft(require("stream")),sE=e=>typeof e=="boolean",Wg=e=>typeof e=="function",uE=e=>e!==null&&typeof e=="object",Np=e=>uE(e)&&Wg(e.read)&&Wg(e.pipe)&&sE(e.readable),en=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 hi((a==null?void 0:a.headers)||{}),Np(r)?this._body=Vg(r,i):typeof r=="string"?this._body=Mp.Readable.from([new TextEncoder().encode(r)]):this._body=Mp.Readable.from([r||new ArrayBuffer(0)])}get body(){return su(!this.bodyUsed),su(Np(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return Np(this._body)?await $g(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 Gg=Ft(require("fs"));var Kg=e=>e.startsWith("data:"),cE=e=>e.startsWith("http:")||e.startsWith("https:");async function Vo(e,r){try{if(Kg(e)){let{arrayBuffer:f,mimeType:p}=Lg(e);return new en(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 Hg(i,r),n=pE(e,t,a),{status:o,statusText:s}=fE(t),u=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&u){let f=lE(e,n.get("location"));return await Vo(f,r)}return new en(t,{headers:n,status:o,statusText:s,url:e})}catch(a){return new en(null,{status:400,statusText:String(a),url:e})}}function lE(e,r){if(r.startsWith("http"))return r;let a=new URL(e);return a.pathname=r,a.href}function fE(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function pE(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=hE(e);Number.isFinite(t)&&(i["content-length"]=t)}return Object.assign(i,a),new hi(i)}function hE(e){if(cE(e))return null;if(Kg(e))return e.length-"data:".length;try{let r=e.split("?")[0];return Gg.default.statSync(r).size}catch{}return null}var $y=Ft(Hy()),Wy=Ft(mu());function Vy(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function F7(e,r){let a=r.type?r.type.replace("image/",""):"jpeg",i=(0,Wy.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,$y.default)(i,a,r)}function Bh(e,r){let a=F7(e,r);return new Promise(i=>{let t=[];a.on("data",n=>t.push(n)),a.on("end",()=>{let n=Buffer.concat(t);i(Vy(n))})})}var Fj=Ft(Tj());var Cj=Ft(require("util"));async function Nv(e,r){su(r,"MIMEType is required to parse image under Node.js");let a=Cj.default.promisify(Fj.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 Oj=Ft(qj());delete global.ReadableStream;var cc=class extends Oj.ReadableStream{};var Mv=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 Uv=class extends cc{constructor(r){super(new Mv(r.values()),{type:"bytes"});this._chunks=r}async*[Symbol.asyncIterator](r){let a=this.getReader();yield*this._chunks,a.releaseLock()}};var Xn=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 Xn)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=FL(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 Xn([],{type:i});if(u===0)return f;let p=0,m=[];for(let h of n){let{byteLength:v}=h;if(o>0&&v<=o)o-=v,s-=v;else{let x=h.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 Uv(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 FL(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}var Hv=class extends Xn{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 IL=!fi||!("TextEncoder"in Sa);IL&&(Sa.TextEncoder=nu);var qL=!fi||!("TextDecoder"in Sa);qL&&(Sa.TextDecoder=fo);!fi&&!("atob"in Sa)&&el&&(Sa.atob=el);!fi&&!("btoa"in Sa)&&Dp&&(Sa.btoa=Dp);!fi&&!("Headers"in Sa)&&hi&&(Sa.Headers=hi);!fi&&!("Response"in Sa)&&en&&(Sa.Response=en);!fi&&!("fetch"in Sa)&&Vo&&(Sa.fetch=Vo);!fi&&!("DOMParser"in Sa)&&Vv.DOMParser&&(Sa.DOMParser=Vv.DOMParser);!fi&&!("_encodeImageNode"in Sa)&&Bh&&(Sa._encodeImageNode=Bh);!fi&&!("_parseImageNode"in Sa)&&Nv&&(Sa._parseImageNode=Nv);"allSettled"in Promise||(Promise.allSettled=Dg);var Rj="3.3.0-alpha.5";var OL={draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},Bj={name:"Draco",id:so?"draco":"draco-nodejs",module:"draco",shapes:["mesh"],version:Rj,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:OL};function $v(e){let r=1/0,a=1/0,i=1/0,t=-1/0,n=-1/0,o=-1/0,s=e.POSITION?e.POSITION.value:[],u=s&&s.length;for(let f=0;f<u;f+=3){let p=s[f],m=s[f+1],h=s[f+2];r=p<r?p:r,a=m<a?m:a,i=h<i?h:i,t=p>t?p:t,n=m>n?m:n,o=h>o?h:o}return[[r,a,i],[t,n,o]]}function Dj(e,r){if(!e)throw new Error(r||"loader assertion failed.")}var si=class{constructor(r,a){Dj(Array.isArray(r)),RL(r),this.fields=r,this.metadata=a||new Map}compareTo(r){if(this.metadata!==r.metadata||this.fields.length!==r.fields.length)return!1;for(let a=0;a<this.fields.length;++a)if(!this.fields[a].compareTo(r.fields[a]))return!1;return!0}select(...r){let a=Object.create(null);for(let t of r)a[t]=!0;let i=this.fields.filter(t=>a[t.name]);return new si(i,this.metadata)}selectAt(...r){let a=r.map(i=>this.fields[i]).filter(Boolean);return new si(a,this.metadata)}assign(r){let a,i=this.metadata;if(r instanceof si){let o=r;a=o.fields,i=zj(zj(new Map,this.metadata),o.metadata)}else a=r;let t=Object.create(null);for(let o of this.fields)t[o.name]=o;for(let o of a)t[o.name]=o;let n=Object.values(t);return new si(n,i)}};function RL(e){let r={};for(let a of e)r[a.name]&&console.warn("Schema: duplicated field name",a.name,a),r[a.name]=!0}function zj(e,r){return new Map([...e||new Map,...r||new Map])}var bn=class{constructor(r,a,i=!1,t=new Map){this.name=r,this.type=a,this.nullable=i,this.metadata=t}get typeId(){return this.type&&this.type.typeId}clone(){return new bn(this.name,this.type,this.nullable,this.metadata)}compareTo(r){return this.name===r.name&&this.type===r.type&&this.nullable===r.nullable&&this.metadata===r.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?`, metadata: ${this.metadata}`:""}`}};var Lr;(function(H){H[H.NONE=0]="NONE",H[H.Null=1]="Null",H[H.Int=2]="Int",H[H.Float=3]="Float",H[H.Binary=4]="Binary",H[H.Utf8=5]="Utf8",H[H.Bool=6]="Bool",H[H.Decimal=7]="Decimal",H[H.Date=8]="Date",H[H.Time=9]="Time",H[H.Timestamp=10]="Timestamp",H[H.Interval=11]="Interval",H[H.List=12]="List",H[H.Struct=13]="Struct",H[H.Union=14]="Union",H[H.FixedSizeBinary=15]="FixedSizeBinary",H[H.FixedSizeList=16]="FixedSizeList",H[H.Map=17]="Map",H[H.Dictionary=-1]="Dictionary",H[H.Int8=-2]="Int8",H[H.Int16=-3]="Int16",H[H.Int32=-4]="Int32",H[H.Int64=-5]="Int64",H[H.Uint8=-6]="Uint8",H[H.Uint16=-7]="Uint16",H[H.Uint32=-8]="Uint32",H[H.Uint64=-9]="Uint64",H[H.Float16=-10]="Float16",H[H.Float32=-11]="Float32",H[H.Float64=-12]="Float64",H[H.DateDay=-13]="DateDay",H[H.DateMillisecond=-14]="DateMillisecond",H[H.TimestampSecond=-15]="TimestampSecond",H[H.TimestampMillisecond=-16]="TimestampMillisecond",H[H.TimestampMicrosecond=-17]="TimestampMicrosecond",H[H.TimestampNanosecond=-18]="TimestampNanosecond",H[H.TimeSecond=-19]="TimeSecond",H[H.TimeMillisecond=-20]="TimeMillisecond",H[H.TimeMicrosecond=-21]="TimeMicrosecond",H[H.TimeNanosecond=-22]="TimeNanosecond",H[H.DenseUnion=-23]="DenseUnion",H[H.SparseUnion=-24]="SparseUnion",H[H.IntervalDayTime=-25]="IntervalDayTime",H[H.IntervalYearMonth=-26]="IntervalYearMonth"})(Lr||(Lr={}));var Et=class{static isNull(r){return r&&r.typeId===Lr.Null}static isInt(r){return r&&r.typeId===Lr.Int}static isFloat(r){return r&&r.typeId===Lr.Float}static isBinary(r){return r&&r.typeId===Lr.Binary}static isUtf8(r){return r&&r.typeId===Lr.Utf8}static isBool(r){return r&&r.typeId===Lr.Bool}static isDecimal(r){return r&&r.typeId===Lr.Decimal}static isDate(r){return r&&r.typeId===Lr.Date}static isTime(r){return r&&r.typeId===Lr.Time}static isTimestamp(r){return r&&r.typeId===Lr.Timestamp}static isInterval(r){return r&&r.typeId===Lr.Interval}static isList(r){return r&&r.typeId===Lr.List}static isStruct(r){return r&&r.typeId===Lr.Struct}static isUnion(r){return r&&r.typeId===Lr.Union}static isFixedSizeBinary(r){return r&&r.typeId===Lr.FixedSizeBinary}static isFixedSizeList(r){return r&&r.typeId===Lr.FixedSizeList}static isMap(r){return r&&r.typeId===Lr.Map}static isDictionary(r){return r&&r.typeId===Lr.Dictionary}get typeId(){return Lr.NONE}compareTo(r){return this===r}},Wv=class extends Et{get typeId(){return Lr.Null}get[Symbol.toStringTag](){return"Null"}toString(){return"Null"}},Gv=class extends Et{get typeId(){return Lr.Bool}get[Symbol.toStringTag](){return"Bool"}toString(){return"Bool"}},yn=class extends Et{constructor(r,a){super();this.isSigned=r,this.bitWidth=a}get typeId(){return Lr.Int}get[Symbol.toStringTag](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}},lc=class extends yn{constructor(){super(!0,8)}},fc=class extends yn{constructor(){super(!0,16)}},pc=class extends yn{constructor(){super(!0,32)}};var hc=class extends yn{constructor(){super(!1,8)}},dc=class extends yn{constructor(){super(!1,16)}},mc=class extends yn{constructor(){super(!1,32)}};var Lj={HALF:16,SINGLE:32,DOUBLE:64},vc=class extends Et{constructor(r){super();this.precision=r}get typeId(){return Lr.Float}get[Symbol.toStringTag](){return"Float"}toString(){return`Float${this.precision}`}};var gc=class extends vc{constructor(){super(Lj.SINGLE)}},bc=class extends vc{constructor(){super(Lj.DOUBLE)}},Kv=class extends Et{constructor(){super()}get typeId(){return Lr.Binary}toString(){return"Binary"}get[Symbol.toStringTag](){return"Binary"}},Yv=class extends Et{get typeId(){return Lr.Utf8}get[Symbol.toStringTag](){return"Utf8"}toString(){return"Utf8"}},BL={DAY:0,MILLISECOND:1},Qv=class extends Et{constructor(r){super();this.unit=r}get typeId(){return Lr.Date}get[Symbol.toStringTag](){return"Date"}toString(){return`Date${(this.unit+1)*32}<${BL[this.unit]}>`}};var Nj={SECOND:1,MILLISECOND:1e3,MICROSECOND:1e6,NANOSECOND:1e9},Xv=class extends Et{constructor(r,a){super();this.unit=r,this.bitWidth=a}get typeId(){return Lr.Time}toString(){return`Time${this.bitWidth}<${Nj[this.unit]}>`}get[Symbol.toStringTag](){return"Time"}};var Jv=class extends Et{constructor(r,a=null){super();this.unit=r,this.timezone=a}get typeId(){return Lr.Timestamp}get[Symbol.toStringTag](){return"Timestamp"}toString(){return`Timestamp<${Nj[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};var DL={DAY_TIME:0,YEAR_MONTH:1},Zv=class extends Et{constructor(r){super();this.unit=r}get typeId(){return Lr.Interval}get[Symbol.toStringTag](){return"Interval"}toString(){return`Interval<${DL[this.unit]}>`}};var yc=class extends Et{constructor(r,a){super();this.listSize=r,this.children=[a]}get typeId(){return Lr.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[Symbol.toStringTag](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}},e0=class extends Et{constructor(r){super();this.children=r}get typeId(){return Lr.Struct}toString(){return`Struct<{${this.children.map(r=>`${r.name}:${r.type}`).join(", ")}}>`}get[Symbol.toStringTag](){return"Struct"}};function Mj(e){switch(e.constructor){case Int8Array:return new lc;case Uint8Array:return new hc;case Int16Array:return new fc;case Uint16Array:return new dc;case Int32Array:return new pc;case Uint32Array:return new mc;case Float32Array:return new gc;case Float64Array:return new bc;default:throw new Error("array type not supported")}}function r0(e,r,a){let i=Mj(r.value),t=a||Uj(r);return new bn(e,new yc(r.size,new bn("value",i)),!1,t)}function Uj(e){let r=new Map;return"byteOffset"in e&&r.set("byteOffset",e.byteOffset.toString(10)),"byteStride"in e&&r.set("byteStride",e.byteStride.toString(10)),"normalized"in e&&r.set("normalized",e.normalized.toString()),r}function Hj(e,r,a){let i=$j(r.metadata),t=[],n=XL(r.attributes);for(let o in e){let s=e[o],u=Vj(o,s,n[o]);t.push(u)}if(a){let o=Vj("indices",a);t.push(o)}return new si(t,i)}function XL(e){let r={};for(let a in e){let i=e[a];r[i.name||"undefined"]=i}return r}function Vj(e,r,a){let i=a?$j(a.metadata):void 0;return r0(e,r,i)}function $j(e){let r=new Map;for(let a in e)r.set(`${a}.string`,JSON.stringify(e[a]));return r}var Wj={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},JL={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},ZL=4,Qf=class{constructor(r){this.draco=r,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(r,a={}){let i=new this.draco.DecoderBuffer;i.Init(new Int8Array(r),r.byteLength),this._disableAttributeTransforms(a);let t=this.decoder.GetEncodedGeometryType(i),n=t===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let o;switch(t){case this.draco.TRIANGULAR_MESH:o=this.decoder.DecodeBufferToMesh(i,n);break;case this.draco.POINT_CLOUD:o=this.decoder.DecodeBufferToPointCloud(i,n);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!o.ok()||!n.ptr){let h=`DRACO decompression failed: ${o.error_msg()}`;throw new Error(h)}let s=this._getDracoLoaderData(n,t,a),u=this._getMeshData(n,s,a),f=$v(u.attributes),p=Hj(u.attributes,s,u.indices);return ci(Ut({loader:"draco",loaderData:s,header:{vertexCount:n.num_points(),boundingBox:f}},u),{schema:p})}finally{this.draco.destroy(i),n&&this.draco.destroy(n)}}_getDracoLoaderData(r,a,i){let t=this._getTopLevelMetadata(r),n=this._getDracoAttributes(r,i);return{geometry_type:a,num_attributes:r.num_attributes(),num_points:r.num_points(),num_faces:r instanceof this.draco.Mesh?r.num_faces():0,metadata:t,attributes:n}}_getDracoAttributes(r,a){let i={};for(let t=0;t<r.num_attributes();t++){let n=this.decoder.GetAttribute(r,t),o=this._getAttributeMetadata(r,t);i[n.unique_id()]={unique_id:n.unique_id(),attribute_type:n.attribute_type(),data_type:n.data_type(),num_components:n.num_components(),byte_offset:n.byte_offset(),byte_stride:n.byte_stride(),normalized:n.normalized(),attribute_index:t,metadata:o};let s=this._getQuantizationTransform(n,a);s&&(i[n.unique_id()].quantization_transform=s);let u=this._getOctahedronTransform(n,a);u&&(i[n.unique_id()].octahedron_transform=u)}return i}_getMeshData(r,a,i){let t=this._getMeshAttributes(a,r,i);if(!t.POSITION)throw new Error("DRACO: No position attribute found.");if(r instanceof this.draco.Mesh)switch(i.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:t,indices:{value:this._getTriangleStripIndices(r),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:t,indices:{value:this._getTriangleListIndices(r),size:1}}}return{topology:"point-list",mode:0,attributes:t}}_getMeshAttributes(r,a,i){let t={};for(let n of Object.values(r.attributes)){let o=this._deduceAttributeName(n,i);n.name=o;let{value:s,size:u}=this._getAttributeValues(a,n);t[o]={value:s,size:u,byteOffset:n.byte_offset,byteStride:n.byte_stride,normalized:n.normalized}}return t}_getTriangleListIndices(r){let i=r.num_faces()*3,t=i*ZL,n=this.draco._malloc(t);try{return this.decoder.GetTrianglesUInt32Array(r,t,n),new Uint32Array(this.draco.HEAPF32.buffer,n,i).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(r){let a=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(r,a),aN(a)}finally{this.draco.destroy(a)}}_getAttributeValues(r,a){let i=JL[a.data_type],t=a.num_components,o=r.num_points()*t,s=o*i.BYTES_PER_ELEMENT,u=eN(this.draco,i),f,p=this.draco._malloc(s);try{let m=this.decoder.GetAttribute(r,a.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(r,m,u,s,p),f=new i(this.draco.HEAPF32.buffer,p,o).slice()}finally{this.draco._free(p)}return{value:f,size:t}}_deduceAttributeName(r,a){let i=r.unique_id;for(let[o,s]of Object.entries(a.extraAttributes||{}))if(s===i)return o;let t=r.attribute_type;for(let o in Wj)if(this.draco[o]===t)return Wj[o];let n=a.attributeNameEntry||"name";return r.metadata[n]?r.metadata[n].string:`CUSTOM_ATTRIBUTE_${i}`}_getTopLevelMetadata(r){let a=this.decoder.GetMetadata(r);return this._getDracoMetadata(a)}_getAttributeMetadata(r,a){let i=this.decoder.GetAttributeMetadata(r,a);return this._getDracoMetadata(i)}_getDracoMetadata(r){if(!r||!r.ptr)return{};let a={},i=this.metadataQuerier.NumEntries(r);for(let t=0;t<i;t++){let n=this.metadataQuerier.GetEntryName(r,t);a[n]=this._getDracoMetadataField(r,n)}return a}_getDracoMetadataField(r,a){let i=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(r,a,i);let t=rN(i);return{int:this.metadataQuerier.GetIntEntry(r,a),string:this.metadataQuerier.GetStringEntry(r,a),double:this.metadataQuerier.GetDoubleEntry(r,a),intArray:t}}finally{this.draco.destroy(i)}}_disableAttributeTransforms(r){let{quantizedAttributes:a=[],octahedronAttributes:i=[]}=r,t=[...a,...i];for(let n of t)this.decoder.SkipAttributeTransform(this.draco[n])}_getQuantizationTransform(r,a){let{quantizedAttributes:i=[]}=a,t=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(t)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits(),range:o.range(),min_values:new Float32Array([1,2,3]).map(s=>o.min_value(s))}}finally{this.draco.destroy(o)}}return null}_getOctahedronTransform(r,a){let{octahedronAttributes:i=[]}=a,t=r.attribute_type();if(i.map(o=>this.decoder[o]).includes(t)){let o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(r))return{quantization_bits:o.quantization_bits()}}finally{this.draco.destroy(o)}}return null}};function eN(e,r){switch(r){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32;default:return e.DT_INVALID}}function rN(e){let r=e.size(),a=new Int32Array(r);for(let i=0;i<r;i++)a[i]=e.GetValue(i);return a}function aN(e){let r=e.size(),a=new Int32Array(r);for(let i=0;i<r;i++)a[i]=e.GetValue(i);return a}var Xf="1.4.1",tN=`https://www.gstatic.com/draco/versioned/decoders/${Xf}/draco_decoder.js`,iN=`https://www.gstatic.com/draco/versioned/decoders/${Xf}/draco_wasm_wrapper.js`,nN=`https://www.gstatic.com/draco/versioned/decoders/${Xf}/draco_decoder.wasm`,SK=`https://raw.githubusercontent.com/google/draco/${Xf}/javascript/draco_encoder.js`,xc;async function Gj(e){let r=e.modules||{};return r.draco3d?xc=xc||r.draco3d.createDecoderModule({}).then(a=>({draco:a})):xc=xc||oN(e),await xc}async function oN(e){let r,a;switch(e.draco&&e.draco.decoderType){case"js":r=await $s(tN,"draco",e);break;case"wasm":default:[r,a]=await Promise.all([await $s(iN,"draco",e),await $s(nN,"draco",e)])}return r=r||globalThis.DracoDecoderModule,await sN(r,a)}function sN(e,r){let a={};return r&&(a.wasmBinary=r),new Promise(i=>{e(ci(Ut({},a),{onModuleLoaded:t=>i({draco:t})}))})}var Kj=ci(Ut({},Bj),{parse:uN});async function uN(e,r){let{draco:a}=await Gj(r),i=new Qf(a);try{return i.parseSync(e,r==null?void 0:r.draco)}finally{i.destroy()}}mp(Kj);
96
96
  /*!
97
97
  * Copyright 2010 LearnBoost <dev@learnboost.com>
98
98
  *