UNPKG

@loaders.gl/i3s

Version:
1 lines 1.17 MB
"use strict";var UR=Object.create;var El=Object.defineProperty;var HR=Object.getOwnPropertyDescriptor;var GR=Object.getOwnPropertyNames;var VR=Object.getPrototypeOf,KR=Object.prototype.hasOwnProperty;var $R=(e,r,t)=>r in e?El(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var C=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),jl=(e,r)=>{for(var t in r)El(e,t,{get:r[t],enumerable:!0})},Qh=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of GR(r))!KR.call(e,a)&&a!==t&&El(e,a,{get:()=>r[a],enumerable:!(n=HR(r,a))||n.enumerable});return e},Rc=(e,r,t)=>(Qh(e,r,"default"),t&&Qh(t,r,"default")),Yt=(e,r,t)=>(t=e!=null?UR(VR(e)):{},Qh(r||!e||!e.__esModule?El(t,"default",{value:e,enumerable:!0}):t,e));var kb=(e,r,t)=>($R(e,typeof r!="symbol"?r+"":r,t),t);var Cb=C((hX,Fb)=>{Fb.exports=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"}});var cn=C(Xt=>{function yO(e){return Array.isArray?Array.isArray(e):Rl(e)==="[object Array]"}Xt.isArray=yO;function xO(e){return typeof e=="boolean"}Xt.isBoolean=xO;function wO(e){return e===null}Xt.isNull=wO;function _O(e){return e==null}Xt.isNullOrUndefined=_O;function kO(e){return typeof e=="number"}Xt.isNumber=kO;function SO(e){return typeof e=="string"}Xt.isString=SO;function EO(e){return typeof e=="symbol"}Xt.isSymbol=EO;function jO(e){return e===void 0}Xt.isUndefined=jO;function TO(e){return Rl(e)==="[object RegExp]"}Xt.isRegExp=TO;function AO(e){return typeof e=="object"&&e!==null}Xt.isObject=AO;function RO(e){return Rl(e)==="[object Date]"}Xt.isDate=RO;function OO(e){return Rl(e)==="[object Error]"||e instanceof Error}Xt.isError=OO;function PO(e){return typeof e=="function"}Xt.isFunction=PO;function FO(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}Xt.isPrimitive=FO;Xt.isBuffer=require("buffer").Buffer.isBuffer;function Rl(e){return Object.prototype.toString.call(e)}});var Bb=C((mX,nd)=>{typeof Object.create=="function"?nd.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:nd.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}});var un=C((gX,od)=>{try{if(id=require("util"),typeof id.inherits!="function")throw"";od.exports=id.inherits}catch{od.exports=Bb()}var id});var cd=C(Lb=>{var Ib=require("buffer").Buffer,CO=Ib.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function BO(e){if(e&&!CO(e))throw new Error("Unknown encoding: "+e)}var sd=Lb.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),BO(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=LO;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=MO;break;default:this.write=IO;return}this.charBuffer=new Ib(6),this.charReceived=0,this.charLength=0};sd.prototype.write=function(e){for(var r="";this.charLength;){var t=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,t),this.charReceived+=t,this.charReceived<this.charLength)return"";e=e.slice(t,e.length),r=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var a=r.charCodeAt(r.length-1);if(a>=55296&&a<=56319){this.charLength+=this.surrogateSize,r="";continue}if(this.charReceived=this.charLength=0,e.length===0)return r;break}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived),r+=e.toString(this.encoding,0,n);var n=r.length-1,a=r.charCodeAt(n);if(a>=55296&&a<=56319){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),e.copy(this.charBuffer,0,0,i),r.substring(0,n)}return r};sd.prototype.detectIncompleteChar=function(e){for(var r=e.length>=3?3:e.length;r>0;r--){var t=e[e.length-r];if(r==1&&t>>5==6){this.charLength=2;break}if(r<=2&&t>>4==14){this.charLength=3;break}if(r<=3&&t>>3==30){this.charLength=4;break}}this.charReceived=r};sd.prototype.end=function(e){var r="";if(e&&e.length&&(r=this.write(e)),this.charReceived){var t=this.charReceived,n=this.charBuffer,a=this.encoding;r+=n.slice(0,t).toString(a)}return r};function IO(e){return e.toString(this.encoding)}function LO(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function MO(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}});var hd=C((bX,Gb)=>{Gb.exports=St;var zO=Cb(),Ol=require("buffer").Buffer;St.ReadableState=Nb;var Pl=require("events").EventEmitter;Pl.listenerCount||(Pl.listenerCount=function(e,r){return e.listeners(r).length});var Fc=require("stream"),qb=cn();qb.inherits=un();var bs;qb.inherits(St,Fc);function Nb(e,r){e=e||{};var t=e.highWaterMark;this.highWaterMark=t||t===0?t:16*1024,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(bs||(bs=cd().StringDecoder),this.decoder=new bs(e.encoding),this.encoding=e.encoding)}function St(e){if(!(this instanceof St))return new St(e);this._readableState=new Nb(e,this),this.readable=!0,Fc.call(this)}St.prototype.push=function(e,r){var t=this._readableState;return typeof e=="string"&&!t.objectMode&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=new Ol(e,r),r="")),Ub(this,t,e,r,!1)};St.prototype.unshift=function(e){var r=this._readableState;return Ub(this,r,e,"",!0)};function Ub(e,r,t,n,a){var i=NO(r,t);if(i)e.emit("error",i);else if(t==null)r.reading=!1,r.ended||UO(e,r);else if(r.objectMode||t&&t.length>0)if(r.ended&&!a){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(r.endEmitted&&a){var o=new Error("stream.unshift() after end event");e.emit("error",o)}else r.decoder&&!a&&!n&&(t=r.decoder.write(t)),r.length+=r.objectMode?1:t.length,a?r.buffer.unshift(t):(r.reading=!1,r.buffer.push(t)),r.needReadable&&Fl(e),HO(e,r);else a||(r.reading=!1);return DO(r)}function DO(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}St.prototype.setEncoding=function(e){bs||(bs=cd().StringDecoder),this._readableState.decoder=new bs(e),this._readableState.encoding=e};var Mb=8388608;function qO(e){if(e>=Mb)e=Mb;else{e--;for(var r=1;r<32;r<<=1)e|=e>>r;e++}return e}function zb(e,r){return r.length===0&&r.ended?0:r.objectMode?e===0?0:1:e===null||isNaN(e)?r.flowing&&r.buffer.length?r.buffer[0].length:r.length:e<=0?0:(e>r.highWaterMark&&(r.highWaterMark=qO(e)),e>r.length?r.ended?r.length:(r.needReadable=!0,0):e)}St.prototype.read=function(e){var r=this._readableState;r.calledRead=!0;var t=e,n;if((typeof e!="number"||e>0)&&(r.emittedReadable=!1),e===0&&r.needReadable&&(r.length>=r.highWaterMark||r.ended))return Fl(this),null;if(e=zb(e,r),e===0&&r.ended)return n=null,r.length>0&&r.decoder&&(n=ld(e,r),r.length-=n.length),r.length===0&&fd(this),n;var a=r.needReadable;return r.length-e<=r.highWaterMark&&(a=!0),(r.ended||r.reading)&&(a=!1),a&&(r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1),a&&!r.reading&&(e=zb(t,r)),e>0?n=ld(e,r):n=null,n===null&&(r.needReadable=!0,e=0),r.length-=e,r.length===0&&!r.ended&&(r.needReadable=!0),r.ended&&!r.endEmitted&&r.length===0&&fd(this),n};function NO(e,r){var t=null;return!Ol.isBuffer(r)&&typeof r!="string"&&r!==null&&r!==void 0&&!e.objectMode&&(t=new TypeError("Invalid non-string/buffer chunk")),t}function UO(e,r){if(r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,r.length>0?Fl(e):fd(e)}function Fl(e){var r=e._readableState;r.needReadable=!1,!r.emittedReadable&&(r.emittedReadable=!0,r.sync?process.nextTick(function(){Db(e)}):Db(e))}function Db(e){e.emit("readable")}function HO(e,r){r.readingMore||(r.readingMore=!0,process.nextTick(function(){GO(e,r)}))}function GO(e,r){for(var t=r.length;!r.reading&&!r.flowing&&!r.ended&&r.length<r.highWaterMark&&(e.read(0),t!==r.length);)t=r.length;r.readingMore=!1}St.prototype._read=function(e){this.emit("error",new Error("not implemented"))};St.prototype.pipe=function(e,r){var t=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1;var a=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,i=a?s:u;n.endEmitted?process.nextTick(i):t.once("end",i),e.on("unpipe",o);function o(g){g===t&&u()}function s(){e.end()}var c=VO(t);e.on("drain",c);function u(){e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",l),e.removeListener("unpipe",o),t.removeListener("end",s),t.removeListener("end",u),(!e._writableState||e._writableState.needDrain)&&c()}function l(g){d(),e.removeListener("error",l),Pl.listenerCount(e,"error")===0&&e.emit("error",g)}!e._events||!e._events.error?e.on("error",l):zO(e._events.error)?e._events.error.unshift(l):e._events.error=[l,e._events.error];function h(){e.removeListener("finish",p),d()}e.once("close",h);function p(){e.removeListener("close",h),d()}e.once("finish",p);function d(){t.unpipe(e)}return e.emit("pipe",t),n.flowing||(this.on("readable",ud),n.flowing=!0,process.nextTick(function(){pd(t)})),e};function VO(e){return function(){var r=this,t=e._readableState;t.awaitDrain--,t.awaitDrain===0&&pd(e)}}function pd(e){var r=e._readableState,t;r.awaitDrain=0;function n(a,i,o){var s=a.write(t);s===!1&&r.awaitDrain++}for(;r.pipesCount&&(t=e.read())!==null;)if(r.pipesCount===1?n(r.pipes,0,null):Hb(r.pipes,n),e.emit("data",t),r.awaitDrain>0)return;if(r.pipesCount===0){r.flowing=!1,Pl.listenerCount(e,"data")>0&&Cl(e);return}r.ranOut=!0}function ud(){this._readableState.ranOut&&(this._readableState.ranOut=!1,pd(this))}St.prototype.unpipe=function(e){var r=this._readableState;if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,this.removeListener("readable",ud),r.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var t=r.pipes,n=r.pipesCount;r.pipes=null,r.pipesCount=0,this.removeListener("readable",ud),r.flowing=!1;for(var a=0;a<n;a++)t[a].emit("unpipe",this);return this}var a=KO(r.pipes,e);return a===-1?this:(r.pipes.splice(a,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this),this)};St.prototype.on=function(e,r){var t=Fc.prototype.on.call(this,e,r);if(e==="data"&&!this._readableState.flowing&&Cl(this),e==="readable"&&this.readable){var n=this._readableState;n.readableListening||(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading?n.length&&Fl(this,n):this.read(0))}return t};St.prototype.addListener=St.prototype.on;St.prototype.resume=function(){Cl(this),this.read(0),this.emit("resume")};St.prototype.pause=function(){Cl(this,!0),this.emit("pause")};function Cl(e,r){var t=e._readableState;if(t.flowing)throw new Error("Cannot switch to old mode now.");var n=r||!1,a=!1;e.readable=!0,e.pipe=Fc.prototype.pipe,e.on=e.addListener=Fc.prototype.on,e.on("readable",function(){a=!0;for(var i;!n&&(i=e.read())!==null;)e.emit("data",i);i===null&&(a=!1,e._readableState.needReadable=!0)}),e.pause=function(){n=!0,this.emit("pause")},e.resume=function(){n=!1,a?process.nextTick(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}St.prototype.wrap=function(e){var r=this._readableState,t=!1,n=this;e.on("end",function(){if(r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&n.push(o)}n.push(null)}),e.on("data",function(o){if(r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=n.push(o);s||(t=!0,e.pause())}});for(var a in e)typeof e[a]=="function"&&typeof this[a]>"u"&&(this[a]=function(o){return function(){return e[o].apply(e,arguments)}}(a));var i=["error","close","destroy","pause","resume"];return Hb(i,function(o){e.on(o,n.emit.bind(n,o))}),n._read=function(o){t&&(t=!1,e.resume())},n};St._fromList=ld;function ld(e,r){var t=r.buffer,n=r.length,a=!!r.decoder,i=!!r.objectMode,o;if(t.length===0)return null;if(n===0)o=null;else if(i)o=t.shift();else if(!e||e>=n)a?o=t.join(""):o=Ol.concat(t,n),t.length=0;else if(e<t[0].length){var s=t[0];o=s.slice(0,e),t[0]=s.slice(e)}else if(e===t[0].length)o=t.shift();else{a?o="":o=new Ol(e);for(var c=0,u=0,l=t.length;u<l&&c<e;u++){var s=t[0],h=Math.min(e-c,s.length);a?o+=s.slice(0,h):s.copy(o,c,0,h),h<s.length?t[0]=s.slice(h):t.shift(),c+=h}}return o}function fd(e){var r=e._readableState;if(r.length>0)throw new Error("endReadable called on non-empty stream");!r.endEmitted&&r.calledRead&&(r.ended=!0,process.nextTick(function(){!r.endEmitted&&r.length===0&&(r.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function Hb(e,r){for(var t=0,n=e.length;t<n;t++)r(e[t],t)}function KO(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var Bl=C((yX,$b)=>{$b.exports=ys;var $O=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r},Vb=cn();Vb.inherits=un();var Kb=hd(),dd=md();Vb.inherits(ys,Kb);YO($O(dd.prototype),function(e){ys.prototype[e]||(ys.prototype[e]=dd.prototype[e])});function ys(e){if(!(this instanceof ys))return new ys(e);Kb.call(this,e),dd.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",WO)}function WO(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function YO(e,r){for(var t=0,n=e.length;t<n;t++)r(e[t],t)}});var md=C((xX,ry)=>{ry.exports=fi;var Il=require("buffer").Buffer;fi.WritableState=Qb;var Yb=cn();Yb.inherits=un();var Xb=require("stream");Yb.inherits(fi,Xb);function XO(e,r,t){this.chunk=e,this.encoding=r,this.callback=t}function Qb(e,r){e=e||{};var t=e.highWaterMark;this.highWaterMark=t||t===0?t:16*1024,this.objectMode=!!e.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){aP(r,a)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function fi(e){var r=Bl();if(!(this instanceof fi)&&!(this instanceof r))return new fi(e);this._writableState=new Qb(e,this),this.writable=!0,Xb.call(this)}fi.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))};function QO(e,r,t){var n=new Error("write after end");e.emit("error",n),process.nextTick(function(){t(n)})}function JO(e,r,t,n){var a=!0;if(!Il.isBuffer(t)&&typeof t!="string"&&t!==null&&t!==void 0&&!r.objectMode){var i=new TypeError("Invalid non-string/buffer chunk");e.emit("error",i),process.nextTick(function(){n(i)}),a=!1}return a}fi.prototype.write=function(e,r,t){var n=this._writableState,a=!1;return typeof r=="function"&&(t=r,r=null),Il.isBuffer(e)?r="buffer":r||(r=n.defaultEncoding),typeof t!="function"&&(t=function(){}),n.ended?QO(this,n,t):JO(this,n,e,t)&&(a=eP(this,n,e,r,t)),a};function ZO(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=new Il(r,t)),r}function eP(e,r,t,n,a){t=ZO(r,t,n),Il.isBuffer(t)&&(n="buffer");var i=r.objectMode?1:t.length;r.length+=i;var o=r.length<r.highWaterMark;return o||(r.needDrain=!0),r.writing?r.buffer.push(new XO(t,n,a)):Jb(e,r,i,t,n,a),o}function Jb(e,r,t,n,a,i){r.writelen=t,r.writecb=i,r.writing=!0,r.sync=!0,e._write(n,a,r.onwrite),r.sync=!1}function rP(e,r,t,n,a){t?process.nextTick(function(){a(n)}):a(n),e._writableState.errorEmitted=!0,e.emit("error",n)}function tP(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function aP(e,r){var t=e._writableState,n=t.sync,a=t.writecb;if(tP(t),r)rP(e,t,n,r,a);else{var i=Zb(e,t);!i&&!t.bufferProcessing&&t.buffer.length&&iP(e,t),n?process.nextTick(function(){Wb(e,t,i,a)}):Wb(e,t,i,a)}}function Wb(e,r,t,n){t||nP(e,r),n(),t&&ey(e,r)}function nP(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function iP(e,r){r.bufferProcessing=!0;for(var t=0;t<r.buffer.length;t++){var n=r.buffer[t],a=n.chunk,i=n.encoding,o=n.callback,s=r.objectMode?1:a.length;if(Jb(e,r,s,a,i,o),r.writing){t++;break}}r.bufferProcessing=!1,t<r.buffer.length?r.buffer=r.buffer.slice(t):r.buffer.length=0}fi.prototype._write=function(e,r,t){t(new Error("not implemented"))};fi.prototype.end=function(e,r,t){var n=this._writableState;typeof e=="function"?(t=e,e=null,r=null):typeof r=="function"&&(t=r,r=null),typeof e<"u"&&e!==null&&this.write(e,r),!n.ending&&!n.finished&&oP(this,n,t)};function Zb(e,r){return r.ending&&r.length===0&&!r.finished&&!r.writing}function ey(e,r){var t=Zb(e,r);return t&&(r.finished=!0,e.emit("finish")),t}function oP(e,r,t){r.ending=!0,ey(e,r),t&&(r.finished?process.nextTick(t):e.once("finish",t)),r.ended=!0}});var vd=C((wX,ny)=>{ny.exports=Gi;var gd=Bl(),ay=cn();ay.inherits=un();ay.inherits(Gi,gd);function sP(e,r){this.afterTransform=function(t,n){return cP(r,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function cP(e,r,t){var n=e._transformState;n.transforming=!1;var a=n.writecb;if(!a)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,t!=null&&e.push(t),a&&a(r);var i=e._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&e._read(i.highWaterMark)}function Gi(e){if(!(this instanceof Gi))return new Gi(e);gd.call(this,e);var r=this._transformState=new sP(e,this),t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){typeof this._flush=="function"?this._flush(function(n){ty(t,n)}):ty(t)})}Gi.prototype.push=function(e,r){return this._transformState.needTransform=!1,gd.prototype.push.call(this,e,r)};Gi.prototype._transform=function(e,r,t){throw new Error("not implemented")};Gi.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var a=this._readableState;(n.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};Gi.prototype._read=function(e){var r=this._transformState;r.writechunk!==null&&r.writecb&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};function ty(e,r){if(r)return e.emit("error",r);var t=e._writableState,n=e._readableState,a=e._transformState;if(t.length)throw new Error("calling transform done when ws.length != 0");if(a.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}});var cy=C((_X,sy)=>{sy.exports=Cc;var iy=vd(),oy=cn();oy.inherits=un();oy.inherits(Cc,iy);function Cc(e){if(!(this instanceof Cc))return new Cc(e);iy.call(this,e)}Cc.prototype._transform=function(e,r,t){t(null,e)}});var uy=C((pi,bd)=>{var uP=require("stream");pi=bd.exports=hd();pi.Stream=uP;pi.Readable=pi;pi.Writable=md();pi.Duplex=Bl();pi.Transform=vd();pi.PassThrough=cy();!process.browser&&process.env.READABLE_STREAM==="disable"&&(bd.exports=require("stream"))});var py=C((kX,fy)=>{"use strict";var ly=uy().Readable,lP=require("util");fy.exports=Bc;function Bc(e,r){if(!(this instanceof Bc))return new Bc(e,r);ly.call(this,r),e==null&&(e=String(e)),this._obj=e}lP.inherits(Bc,ly);Bc.prototype._read=function(e){var r=this._obj;typeof r=="string"?this.push(new Buffer(r)):Buffer.isBuffer(r)?this.push(r):this.push(new Buffer(JSON.stringify(r))),this.push(null)}});var dy=C((SX,hy)=>{hy.exports=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"}});var xd=C((EX,_y)=>{_y.exports=Ua;var fP=require("buffer").Buffer;Ua.WritableState=by;var ja=cn();ja.inherits=un();var vy=require("stream");ja.inherits(Ua,vy);function pP(e,r,t){this.chunk=e,this.encoding=r,this.callback=t}function by(e,r){var t=jo();e=e||{};var n=e.highWaterMark,a=e.objectMode?16:16*1024;this.highWaterMark=n||n===0?n:a,this.objectMode=!!e.objectMode,r instanceof t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){yP(r,o)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function Ua(e){var r=jo();if(!(this instanceof Ua)&&!(this instanceof r))return new Ua(e);this._writableState=new by(e,this),this.writable=!0,vy.call(this)}Ua.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))};function hP(e,r,t){var n=new Error("write after end");e.emit("error",n),process.nextTick(function(){t(n)})}function dP(e,r,t,n){var a=!0;if(!ja.isBuffer(t)&&!ja.isString(t)&&!ja.isNullOrUndefined(t)&&!r.objectMode){var i=new TypeError("Invalid non-string/buffer chunk");e.emit("error",i),process.nextTick(function(){n(i)}),a=!1}return a}Ua.prototype.write=function(e,r,t){var n=this._writableState,a=!1;return ja.isFunction(r)&&(t=r,r=null),ja.isBuffer(e)?r="buffer":r||(r=n.defaultEncoding),ja.isFunction(t)||(t=function(){}),n.ended?hP(this,n,t):dP(this,n,e,t)&&(n.pendingcb++,a=gP(this,n,e,r,t)),a};Ua.prototype.cork=function(){var e=this._writableState;e.corked++};Ua.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.buffer.length&&yy(this,e))};function mP(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&ja.isString(r)&&(r=new fP(r,t)),r}function gP(e,r,t,n,a){t=mP(r,t,n),ja.isBuffer(t)&&(n="buffer");var i=r.objectMode?1:t.length;r.length+=i;var o=r.length<r.highWaterMark;return o||(r.needDrain=!0),r.writing||r.corked?r.buffer.push(new pP(t,n,a)):yd(e,r,!1,i,t,n,a),o}function yd(e,r,t,n,a,i,o){r.writelen=n,r.writecb=o,r.writing=!0,r.sync=!0,t?e._writev(a,r.onwrite):e._write(a,i,r.onwrite),r.sync=!1}function vP(e,r,t,n,a){t?process.nextTick(function(){r.pendingcb--,a(n)}):(r.pendingcb--,a(n)),e._writableState.errorEmitted=!0,e.emit("error",n)}function bP(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function yP(e,r){var t=e._writableState,n=t.sync,a=t.writecb;if(bP(t),r)vP(e,t,n,r,a);else{var i=xy(e,t);!i&&!t.corked&&!t.bufferProcessing&&t.buffer.length&&yy(e,t),n?process.nextTick(function(){my(e,t,i,a)}):my(e,t,i,a)}}function my(e,r,t,n){t||xP(e,r),r.pendingcb--,n(),wy(e,r)}function xP(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function yy(e,r){if(r.bufferProcessing=!0,e._writev&&r.buffer.length>1){for(var t=[],n=0;n<r.buffer.length;n++)t.push(r.buffer[n].callback);r.pendingcb++,yd(e,r,!0,r.length,r.buffer,"",function(u){for(var l=0;l<t.length;l++)r.pendingcb--,t[l](u)}),r.buffer=[]}else{for(var n=0;n<r.buffer.length;n++){var a=r.buffer[n],i=a.chunk,o=a.encoding,s=a.callback,c=r.objectMode?1:i.length;if(yd(e,r,!1,c,i,o,s),r.writing){n++;break}}n<r.buffer.length?r.buffer=r.buffer.slice(n):r.buffer.length=0}r.bufferProcessing=!1}Ua.prototype._write=function(e,r,t){t(new Error("not implemented"))};Ua.prototype._writev=null;Ua.prototype.end=function(e,r,t){var n=this._writableState;ja.isFunction(e)?(t=e,e=null,r=null):ja.isFunction(r)&&(t=r,r=null),ja.isNullOrUndefined(e)||this.write(e,r),n.corked&&(n.corked=1,this.uncork()),!n.ending&&!n.finished&&wP(this,n,t)};function xy(e,r){return r.ending&&r.length===0&&!r.finished&&!r.writing}function gy(e,r){r.prefinished||(r.prefinished=!0,e.emit("prefinish"))}function wy(e,r){var t=xy(e,r);return t&&(r.pendingcb===0?(gy(e,r),r.finished=!0,e.emit("finish")):gy(e,r)),t}function wP(e,r,t){r.ending=!0,wy(e,r),t&&(r.finished?process.nextTick(t):e.once("finish",t)),r.ended=!0}});var jo=C((jX,Ey)=>{Ey.exports=xs;var _P=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r},ky=cn();ky.inherits=un();var Sy=_d(),wd=xd();ky.inherits(xs,Sy);SP(_P(wd.prototype),function(e){xs.prototype[e]||(xs.prototype[e]=wd.prototype[e])});function xs(e){if(!(this instanceof xs))return new xs(e);Sy.call(this,e),wd.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",kP)}function kP(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function SP(e,r){for(var t=0,n=e.length;t<n;t++)r(e[t],t)}});var Sd=C(Ty=>{var jy=require("buffer").Buffer,EP=jy.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function jP(e){if(e&&!EP(e))throw new Error("Unknown encoding: "+e)}var kd=Ty.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),jP(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=AP;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=RP;break;default:this.write=TP;return}this.charBuffer=new jy(6),this.charReceived=0,this.charLength=0};kd.prototype.write=function(e){for(var r="";this.charLength;){var t=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,t),this.charReceived+=t,this.charReceived<this.charLength)return"";e=e.slice(t,e.length),r=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var a=r.charCodeAt(r.length-1);if(a>=55296&&a<=56319){this.charLength+=this.surrogateSize,r="";continue}if(this.charReceived=this.charLength=0,e.length===0)return r;break}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived),r+=e.toString(this.encoding,0,n);var n=r.length-1,a=r.charCodeAt(n);if(a>=55296&&a<=56319){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),e.copy(this.charBuffer,0,0,i),r.substring(0,n)}return r};kd.prototype.detectIncompleteChar=function(e){for(var r=e.length>=3?3:e.length;r>0;r--){var t=e[e.length-r];if(r==1&&t>>5==6){this.charLength=2;break}if(r<=2&&t>>4==14){this.charLength=3;break}if(r<=3&&t>>3==30){this.charLength=4;break}}this.charReceived=r};kd.prototype.end=function(e){var r="";if(e&&e.length&&(r=this.write(e)),this.charReceived){var t=this.charReceived,n=this.charBuffer,a=this.encoding;r+=n.slice(0,t).toString(a)}return r};function TP(e){return e.toString(this.encoding)}function AP(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function RP(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}});var _d=C((AX,By)=>{By.exports=Et;var OP=dy(),jd=require("buffer").Buffer;Et.ReadableState=Py;var Ll=require("events").EventEmitter;Ll.listenerCount||(Ll.listenerCount=function(e,r){return e.listeners(r).length});var Td=require("stream"),Ta=cn();Ta.inherits=un();var ws,Ar=require("util");Ar&&Ar.debuglog?Ar=Ar.debuglog("stream"):Ar=function(){};Ta.inherits(Et,Td);function Py(e,r){var t=jo();e=e||{};var n=e.highWaterMark,a=e.objectMode?16:16*1024;this.highWaterMark=n||n===0?n:a,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,r instanceof t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(ws||(ws=Sd().StringDecoder),this.decoder=new ws(e.encoding),this.encoding=e.encoding)}function Et(e){var r=jo();if(!(this instanceof Et))return new Et(e);this._readableState=new Py(e,this),this.readable=!0,Td.call(this)}Et.prototype.push=function(e,r){var t=this._readableState;return Ta.isString(e)&&!t.objectMode&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=new jd(e,r),r="")),Fy(this,t,e,r,!1)};Et.prototype.unshift=function(e){var r=this._readableState;return Fy(this,r,e,"",!0)};function Fy(e,r,t,n,a){var i=CP(r,t);if(i)e.emit("error",i);else if(Ta.isNullOrUndefined(t))r.reading=!1,r.ended||BP(e,r);else if(r.objectMode||t&&t.length>0)if(r.ended&&!a){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(r.endEmitted&&a){var o=new Error("stream.unshift() after end event");e.emit("error",o)}else r.decoder&&!a&&!n&&(t=r.decoder.write(t)),a||(r.reading=!1),r.flowing&&r.length===0&&!r.sync?(e.emit("data",t),e.read(0)):(r.length+=r.objectMode?1:t.length,a?r.buffer.unshift(t):r.buffer.push(t),r.needReadable&&Ml(e)),IP(e,r);else a||(r.reading=!1);return PP(r)}function PP(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Et.prototype.setEncoding=function(e){return ws||(ws=Sd().StringDecoder),this._readableState.decoder=new ws(e),this._readableState.encoding=e,this};var Ay=8388608;function FP(e){if(e>=Ay)e=Ay;else{e--;for(var r=1;r<32;r<<=1)e|=e>>r;e++}return e}function Ry(e,r){return r.length===0&&r.ended?0:r.objectMode?e===0?0:1:isNaN(e)||Ta.isNull(e)?r.flowing&&r.buffer.length?r.buffer[0].length:r.length:e<=0?0:(e>r.highWaterMark&&(r.highWaterMark=FP(e)),e>r.length?r.ended?r.length:(r.needReadable=!0,0):e)}Et.prototype.read=function(e){Ar("read",e);var r=this._readableState,t=e;if((!Ta.isNumber(e)||e>0)&&(r.emittedReadable=!1),e===0&&r.needReadable&&(r.length>=r.highWaterMark||r.ended))return Ar("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?Ed(this):Ml(this),null;if(e=Ry(e,r),e===0&&r.ended)return r.length===0&&Ed(this),null;var n=r.needReadable;Ar("need readable",n),(r.length===0||r.length-e<r.highWaterMark)&&(n=!0,Ar("length less than watermark",n)),(r.ended||r.reading)&&(n=!1,Ar("reading or ended",n)),n&&(Ar("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1),n&&!r.reading&&(e=Ry(t,r));var a;return e>0?a=Cy(e,r):a=null,Ta.isNull(a)&&(r.needReadable=!0,e=0),r.length-=e,r.length===0&&!r.ended&&(r.needReadable=!0),t!==e&&r.ended&&r.length===0&&Ed(this),Ta.isNull(a)||this.emit("data",a),a};function CP(e,r){var t=null;return!Ta.isBuffer(r)&&!Ta.isString(r)&&!Ta.isNullOrUndefined(r)&&!e.objectMode&&(t=new TypeError("Invalid non-string/buffer chunk")),t}function BP(e,r){if(r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,Ml(e)}function Ml(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(Ar("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?process.nextTick(function(){Oy(e)}):Oy(e))}function Oy(e){Ar("emit readable"),e.emit("readable"),Ad(e)}function IP(e,r){r.readingMore||(r.readingMore=!0,process.nextTick(function(){LP(e,r)}))}function LP(e,r){for(var t=r.length;!r.reading&&!r.flowing&&!r.ended&&r.length<r.highWaterMark&&(Ar("maybeReadMore read 0"),e.read(0),t!==r.length);)t=r.length;r.readingMore=!1}Et.prototype._read=function(e){this.emit("error",new Error("not implemented"))};Et.prototype.pipe=function(e,r){var t=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,Ar("pipe count=%d opts=%j",n.pipesCount,r);var a=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,i=a?s:u;n.endEmitted?process.nextTick(i):t.once("end",i),e.on("unpipe",o);function o(x){Ar("onunpipe"),x===t&&u()}function s(){Ar("onend"),e.end()}var c=MP(t);e.on("drain",c);function u(){Ar("cleanup"),e.removeListener("close",p),e.removeListener("finish",d),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",o),t.removeListener("end",s),t.removeListener("end",u),t.removeListener("data",l),n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c()}t.on("data",l);function l(x){Ar("ondata");var b=e.write(x);b===!1&&(Ar("false write response, pause",t._readableState.awaitDrain),t._readableState.awaitDrain++,t.pause())}function h(x){Ar("onerror",x),g(),e.removeListener("error",h),Ll.listenerCount(e,"error")===0&&e.emit("error",x)}!e._events||!e._events.error?e.on("error",h):OP(e._events.error)?e._events.error.unshift(h):e._events.error=[h,e._events.error];function p(){e.removeListener("finish",d),g()}e.once("close",p);function d(){Ar("onfinish"),e.removeListener("close",p),g()}e.once("finish",d);function g(){Ar("unpipe"),t.unpipe(e)}return e.emit("pipe",t),n.flowing||(Ar("pipe resume"),t.resume()),e};function MP(e){return function(){var r=e._readableState;Ar("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Ll.listenerCount(e,"data")&&(r.flowing=!0,Ad(e))}}Et.prototype.unpipe=function(e){var r=this._readableState;if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var t=r.pipes,n=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var a=0;a<n;a++)t[a].emit("unpipe",this);return this}var a=NP(r.pipes,e);return a===-1?this:(r.pipes.splice(a,1),r.pipesCount-=1,r.pipesCount===1&&(r.pipes=r.pipes[0]),e.emit("unpipe",this),this)};Et.prototype.on=function(e,r){var t=Td.prototype.on.call(this,e,r);if(e==="data"&&this._readableState.flowing!==!1&&this.resume(),e==="readable"&&this.readable){var n=this._readableState;if(!n.readableListening)if(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading)n.length&&Ml(this,n);else{var a=this;process.nextTick(function(){Ar("readable nexttick read 0"),a.read(0)})}}return t};Et.prototype.addListener=Et.prototype.on;Et.prototype.resume=function(){var e=this._readableState;return e.flowing||(Ar("resume"),e.flowing=!0,e.reading||(Ar("resume read 0"),this.read(0)),zP(this,e)),this};function zP(e,r){r.resumeScheduled||(r.resumeScheduled=!0,process.nextTick(function(){DP(e,r)}))}function DP(e,r){r.resumeScheduled=!1,e.emit("resume"),Ad(e),r.flowing&&!r.reading&&e.read(0)}Et.prototype.pause=function(){return Ar("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ar("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Ad(e){var r=e._readableState;if(Ar("flow",r.flowing),r.flowing)do var t=e.read();while(t!==null&&r.flowing)}Et.prototype.wrap=function(e){var r=this._readableState,t=!1,n=this;e.on("end",function(){if(Ar("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&n.push(o)}n.push(null)}),e.on("data",function(o){if(Ar("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(!o||!r.objectMode&&!o.length)){var s=n.push(o);s||(t=!0,e.pause())}});for(var a in e)Ta.isFunction(e[a])&&Ta.isUndefined(this[a])&&(this[a]=function(o){return function(){return e[o].apply(e,arguments)}}(a));var i=["error","close","destroy","pause","resume"];return qP(i,function(o){e.on(o,n.emit.bind(n,o))}),n._read=function(o){Ar("wrapped _read",o),t&&(t=!1,e.resume())},n};Et._fromList=Cy;function Cy(e,r){var t=r.buffer,n=r.length,a=!!r.decoder,i=!!r.objectMode,o;if(t.length===0)return null;if(n===0)o=null;else if(i)o=t.shift();else if(!e||e>=n)a?o=t.join(""):o=jd.concat(t,n),t.length=0;else if(e<t[0].length){var s=t[0];o=s.slice(0,e),t[0]=s.slice(e)}else if(e===t[0].length)o=t.shift();else{a?o="":o=new jd(e);for(var c=0,u=0,l=t.length;u<l&&c<e;u++){var s=t[0],h=Math.min(e-c,s.length);a?o+=s.slice(0,h):s.copy(o,c,0,h),h<s.length?t[0]=s.slice(h):t.shift(),c+=h}}return o}function Ed(e){var r=e._readableState;if(r.length>0)throw new Error("endReadable called on non-empty stream");r.endEmitted||(r.ended=!0,process.nextTick(function(){!r.endEmitted&&r.length===0&&(r.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function qP(e,r){for(var t=0,n=e.length;t<n;t++)r(e[t],t)}function NP(e,r){for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}});var Od=C((RX,Ly)=>{Ly.exports=Vi;var Rd=jo(),Ic=cn();Ic.inherits=un();Ic.inherits(Vi,Rd);function UP(e,r){this.afterTransform=function(t,n){return HP(r,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function HP(e,r,t){var n=e._transformState;n.transforming=!1;var a=n.writecb;if(!a)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,Ic.isNullOrUndefined(t)||e.push(t),a&&a(r);var i=e._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&e._read(i.highWaterMark)}function Vi(e){if(!(this instanceof Vi))return new Vi(e);Rd.call(this,e),this._transformState=new UP(e,this);var r=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){Ic.isFunction(this._flush)?this._flush(function(t){Iy(r,t)}):Iy(r)})}Vi.prototype.push=function(e,r){return this._transformState.needTransform=!1,Rd.prototype.push.call(this,e,r)};Vi.prototype._transform=function(e,r,t){throw new Error("not implemented")};Vi.prototype._write=function(e,r,t){var n=this._transformState;if(n.writecb=t,n.writechunk=e,n.writeencoding=r,!n.transforming){var a=this._readableState;(n.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};Vi.prototype._read=function(e){var r=this._transformState;!Ic.isNull(r.writechunk)&&r.writecb&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};function Iy(e,r){if(r)return e.emit("error",r);var t=e._writableState,n=e._transformState;if(t.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}});var qy=C((OX,Dy)=>{Dy.exports=Lc;var My=Od(),zy=cn();zy.inherits=un();zy.inherits(Lc,My);function Lc(e){if(!(this instanceof Lc))return new Lc(e);My.call(this,e)}Lc.prototype._transform=function(e,r,t){t(null,e)}});var Ny=C((hi,Pd)=>{hi=Pd.exports=_d();hi.Stream=require("stream");hi.Readable=hi;hi.Writable=xd();hi.Duplex=jo();hi.Transform=Od();hi.PassThrough=qy();!process.browser&&process.env.READABLE_STREAM==="disable"&&(Pd.exports=require("stream"))});var Jy=C((FX,Qy)=>{var GP=100,Bt=256,Uy=Bt-1,Ki=4,$y=16,Cd=1<<$y,Bd=10,PX=1<<Bd,Id=10,VP=Cd>>Id,KP=Cd<<Bd-Id,$P=Bt>>3,Fd=6,WP=1<<Fd,YP=$P*WP,XP=30,Wy=10,zl=1<<Wy,Yy=8,Hy=1<<Yy,QP=Wy+Yy,_s=1<<QP,Gy=499,Vy=491,Ky=487,Xy=503,JP=3*Xy;function ZP(e,r){var t,n,a,i,o;function s(){t=[],n=new Int32Array(256),a=new Int32Array(Bt),i=new Int32Array(Bt),o=new Int32Array(Bt>>3);var E,j;for(E=0;E<Bt;E++)j=(E<<Ki+8)/Bt,t[E]=new Float64Array([j,j,j,0]),i[E]=Cd/Bt,a[E]=0}function c(){for(var E=0;E<Bt;E++)t[E][0]>>=Ki,t[E][1]>>=Ki,t[E][2]>>=Ki,t[E][3]=E}function u(E,j,S,R,T){t[j][0]-=E*(t[j][0]-S)/zl,t[j][1]-=E*(t[j][1]-R)/zl,t[j][2]-=E*(t[j][2]-T)/zl}function l(E,j,S,R,T){for(var O=Math.abs(j-E),F=Math.min(j+E,Bt),M=j+1,B=j-1,I=1,L,G;M<F||B>O;)G=o[I++],M<F&&(L=t[M++],L[0]-=G*(L[0]-S)/_s,L[1]-=G*(L[1]-R)/_s,L[2]-=G*(L[2]-T)/_s),B>O&&(L=t[B--],L[0]-=G*(L[0]-S)/_s,L[1]-=G*(L[1]-R)/_s,L[2]-=G*(L[2]-T)/_s)}function h(E,j,S){var R=2147483647,T=R,O=-1,F=O,M,B,I,L,G;for(M=0;M<Bt;M++)B=t[M],I=Math.abs(B[0]-E)+Math.abs(B[1]-j)+Math.abs(B[2]-S),I<R&&(R=I,O=M),L=I-(a[M]>>$y-Ki),L<T&&(T=L,F=M),G=i[M]>>Id,i[M]-=G,a[M]+=G<<Bd;return i[O]+=VP,a[O]-=KP,F}function p(){var E,j,S,R,T,O,F=0,M=0;for(E=0;E<Bt;E++){for(S=t[E],T=E,O=S[1],j=E+1;j<Bt;j++)R=t[j],R[1]<O&&(T=j,O=R[1]);if(R=t[T],E!=T&&(j=R[0],R[0]=S[0],S[0]=j,j=R[1],R[1]=S[1],S[1]=j,j=R[2],R[2]=S[2],S[2]=j,j=R[3],R[3]=S[3],S[3]=j),O!=F){for(n[F]=M+E>>1,j=F+1;j<O;j++)n[j]=E;F=O,M=E}}for(n[F]=M+Uy>>1,j=F+1;j<256;j++)n[j]=Uy}function d(E,j,S){for(var R,T,O,F=1e3,M=-1,B=n[j],I=B-1;B<Bt||I>=0;)B<Bt&&(T=t[B],O=T[1]-j,O>=F?B=Bt:(B++,O<0&&(O=-O),R=T[0]-E,R<0&&(R=-R),O+=R,O<F&&(R=T[2]-S,R<0&&(R=-R),O+=R,O<F&&(F=O,M=T[3])))),I>=0&&(T=t[I],O=j-T[1],O>=F?I=-1:(I--,O<0&&(O=-O),R=T[0]-E,R<0&&(R=-R),O+=R,O<F&&(R=T[2]-S,R<0&&(R=-R),O+=R,O<F&&(F=O,M=T[3]))));return M}function g(){var E,j=e.length,S=30+(r-1)/3,R=j/(3*r),T=~~(R/GP),O=zl,F=YP,M=F>>Fd;for(M<=1&&(M=0),E=0;E<M;E++)o[E]=O*((M*M-E*E)*Hy/(M*M));var B;j<JP?(r=1,B=3):j%Gy!==0?B=3*Gy:j%Vy!==0?B=3*Vy:j%Ky!==0?B=3*Ky:B=3*Xy;var I,L,G,U,N=0;for(E=0;E<R;)if(I=(e[N]&255)<<Ki,L=(e[N+1]&255)<<Ki,G=(e[N+2]&255)<<Ki,U=h(I,L,G),u(O,U,I,L,G),M!==0&&l(M,U,I,L,G),N+=B,N>=j&&(N-=j),E++,T===0&&(T=1),E%T===0)for(O-=O/S,F-=F/XP,M=F>>Fd,M<=1&&(M=0),U=0;U<M;U++)o[U]=O*((M*M-U*U)*Hy/(M*M))}function x(){s(),g(),c(),p()}this.buildColormap=x;function b(){for(var E=[],j=[],S=0;S<Bt;S++)j[t[S][3]]=S;for(var R=0,T=0;T<Bt;T++){var O=j[T];E[R++]=t[O][0],E[R++]=t[O][1],E[R++]=t[O][2]}return E}this.getColormap=b,this.lookupRGB=d}Qy.exports=ZP});var rx=C((CX,ex)=>{var Zy=-1,Dl=12,Mc=5003,e9=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function r9(e,r,t,n){var a=Math.max(2,n),i=new Uint8Array(256),o=new Int32Array(Mc),s=new Int32Array(Mc),c,u=0,l,h=0,p,d,g,x,b=!1,E,j,S;function R(U,N){i[l++]=U,l>=254&&B(N)}function T(U){O(Mc),h=j+2,b=!0,G(j,U)}function O(U){for(var N=0;N<U;++N)o[N]=-1}function F(U,N){var K,ne,oe,ae,fe,ie,ce;for(E=U,b=!1,x=E,p=I(x),j=1<<U-1,S=j+1,h=j+2,l=0,ae=L(),ce=0,K=Mc;K<65536;K*=2)++ce;ce=8-ce,ie=Mc,O(ie),G(j,N);e:for(;(ne=L())!=Zy;){if(K=(ne<<Dl)+ae,oe=ne<<ce^ae,o[oe]===K){ae=s[oe];continue}else if(o[oe]>=0){fe=ie-oe,oe===0&&(fe=1);do if((oe-=fe)<0&&(oe+=ie),o[oe]===K){ae=s[oe];continue e}while(o[oe]>=0)}G(ae,N),ae=ne,h<1<<Dl?(s[oe]=h++,o[oe]=K):T(N)}G(ae,N),G(S,N)}function M(U){U.writeByte(a),d=e*r,g=0,F(a+1,U),U.writeByte(0)}function B(U){l>0&&(U.writeByte(l),U.writeBytes(i,0,l),l=0)}function I(U){return(1<<U)-1}function L(){if(d===0)return Zy;--d;var U=t[g++];return U&255}function G(U,N){for(c&=e9[u],u>0?c|=U<<u:c=U,u+=x;u>=8;)R(c&255,N),c>>=8,u-=8;if((h>p||b)&&(b?(p=I(x=E),b=!1):(++x,x==Dl?p=1<<Dl:p=I(x))),U==S){for(;u>0;)R(c&255,N),c>>=8,u-=8;B(N)}}this.encode=M}ex.exports=r9});var ix=C((LX,nx)=>{var BX=require("assert"),IX=require("events").EventEmitter,tx=Ny(),ax=require("util"),t9=Jy(),a9=rx();function Pn(e){tx.call(this,e),this.okayToPush=!0,this.resetData()}ax.inherits(Pn,tx);Pn.prototype._read=function(){this.okayToPush=!0};Pn.prototype.resetData=function(){this.data=[]};Pn.prototype.flushData=function(){if(!this.okayToPush){var e=new Error("GIF memory limit exceeded. Please `read` from GIF before writing additional frames/information.");return this.emit("error",e)}var r=new Buffer(this.data);this.resetData(),this.okayToPush=this.push(r)};Pn.prototype.writeByte=function(e){this.data.push(e)};Pn.prototype.writeUTFBytes=function(e){for(var r=e.length,t=0;t<r;t++)this.writeByte(e.charCodeAt(t))};Pn.prototype.writeBytes=function(e,r,t){for(var n=t||e.length,a=r||0;a<n;a++)this.writeByte(e[a])};function Hr(e,r,t){t=t||{};var n=t.highWaterMark;Pn.call(this,{highWaterMark:n||n===0?n:64*1024}),this.width=~~e,this.height=~~r,this.transparent=null,this.transIndex=0,this.repeat=-1,this.delay=0,this.pixels=null,this.indexedPixels=null,this.colorDepth=null,this.colorTab=null,this.usedEntry=[],this.palSize=7,this.dispose=-1,this.firstFrame=!0,this.sample=10;var a=this;function i(){a.flushData()}this.on("writeHeader#stop",i),this.on("frame#stop",i),this.on("finish#stop",function(){i(),a.push(null)})}ax.inherits(Hr,Pn);Hr.prototype.setDelay=function(e){this.delay=Math.round(e/10)};Hr.prototype.setFrameRate=function(e){this.delay=Math.round(100/e)};Hr.prototype.setDispose=function(e){e>=0&&(this.dispose=e)};Hr.prototype.setRepeat=function(e){this.repeat=e};Hr.prototype.setTransparent=function(e){this.transparent=e};Hr.prototype.analyzeImage=function(e){this.setImagePixels(this.removeAlphaChannel(e)),this.analyzePixels()};Hr.prototype.writeImageInfo=function(){this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.firstFrame=!1};Hr.prototype.outputImage=function(){this.writePixels()};Hr.prototype.addFrame=function(e){this.emit("frame#start"),this.analyzeImage(e),this.writeImageInfo(),this.outputImage(),this.emit("frame#stop")};Hr.prototype.finish=function(){this.emit("finish#start"),this.writeByte(59),this.emit("finish#stop")};Hr.prototype.setQuality=function(e){e<1&&(e=1),this.sample=e};Hr.prototype.writeHeader=function(){this.emit("writeHeader#start"),this.writeUTFBytes("GIF89a"),this.emit("writeHeader#stop")};Hr.prototype.analyzePixels=function(){var e=this.pixels.length,r=e/3;this.indexedPixels=new Uint8Array(r);var t=new t9(this.pixels,this.sample);t.buildColormap(),this.colorTab=t.getColormap();for(var n=0,a=0;a<r;a++){var i=t.lookupRGB(this.pixels[n++]&255,this.pixels[n++]&255,this.pixels[n++]&255);this.usedEntry[i]=!0,this.indexedPixels[a]=i}this.pixels=null,this.colorDepth=8,this.palSize=7,this.transparent!==null&&(this.transIndex=this.findClosest(this.transparent))};Hr.prototype.findClosest=function(e){if(this.colorTab===null)return-1;for(var r=(e&16711680)>>16,t=(e&65280)>>8,n=e&255,a=0,i=256*256*256,o=this.colorTab.length,s=0;s<o;){var c=r-(this.colorTab[s++]&255),u=t-(this.colorTab[s++]&255),l=n-(this.colorTab[s]&255),h=c*c+u*u+l*l,p=s/3;this.usedEntry[p]&&h<i&&(i=h,a=p),s++}return a};Hr.prototype.removeAlphaChannel=function(e){for(var r=this.width,t=this.height,n=new Uint8Array(r*t*3),a=0,i=0;i<t;i++)for(var o=0;o<r;o++){var s=i*r*4+o*4;n[a++]=e[s],n[a++]=e[s+1],n[a++]=e[s+2]}return n};Hr.prototype.setImagePixels=function(e){this.pixels=e};Hr.prototype.writeGraphicCtrlExt=function(){this.writeByte(33),this.writeByte(249),this.writeByte(4);var e,r;this.transparent===null?(e=0,r=0):(e=1,r=2),this.dispose>=0&&(r=dispose&7),r<<=2,this.writeByte(0|r|0|e),this.writeShort(this.delay),this.writeByte(this.transIndex),this.writeByte(0)};Hr.prototype.writeImageDesc=function(){this.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.writeByte(0):this.writeByte(128|this.palSize)};Hr.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.writeByte(240|this.palSize),this.writeByte(0),this.writeByte(0)};Hr.prototype.writeNetscapeExt=function(){this.writeByte(33),this.writeByte(255),this.writeByte(11),this.writeUTFBytes("NETSCAPE2.0"),this.writeByte(3),this.writeByte(1),this.writeShort(this.repeat),this.writeByte(0)};Hr.prototype.writePalette=function(){this.writeBytes(this.colorTab);for(var e=3*256-this.colorTab.length,r=0;r<e;r++)this.writeByte(0)};Hr.prototype.writeShort=function(e){this.writeByte(e&255),this.writeByte(e>>8&255)};Hr.prototype.writePixels=function(){var e=new a9(this.width,this.height,this.indexedPixels,this.colorDepth);e.encode(this)};Hr.prototype.stream=function(){return this};Hr.ByteCapacitor=Pn;nx.exports=Hr});var cx=C((MX,ql)=>{var sx=sx||function(e){return Buffer.from(e).toString("base64")};function n9(e){var r=this,t=Math.round,n=Math.floor,a=new Array(64),i=new Array(64),o=new Array(64),s=new Array(64),c,u,l,h,p=new Array(65535),d=new Array(65535),g=new Array(64),x=new Array(64),b=[],E=0,j=7,S=new Array(64),R=new Array(64),T=new Array(64),O=new Array(256),F=new Array(2048),M,B=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],I=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],G=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],U=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],N=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],K=[0,1,2,3,4,5,6,7,8,9,10,11],ne=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],oe=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ae(Y){for(var Ae=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],qe=0;qe<64;qe++){var Le=n((Ae[qe]*Y+50)/100);Le<1?Le=1:Le>255&&(Le=255),a[B[qe]]=Le}for(var Ue=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],Xe=0;Xe<64;Xe++){var er=n((Ue[Xe]*Y+50)/100);er<1?er=1:er>255&&(er=255),i[B[Xe]]=er}