@loaders.gl/i3s
Version:
i3s .
1 lines • 1.13 MB
JavaScript
"use strict";var WT=Object.create;var bl=Object.defineProperty;var XT=Object.getOwnPropertyDescriptor;var YT=Object.getOwnPropertyNames;var QT=Object.getPrototypeOf,JT=Object.prototype.hasOwnProperty;var ZT=(e,r,t)=>r in e?bl(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var B=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),xl=(e,r)=>{for(var t in r)bl(e,t,{get:r[t],enumerable:!0})},Mh=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of YT(r))!JT.call(e,a)&&a!==t&&bl(e,a,{get:()=>r[a],enumerable:!(i=XT(r,a))||i.enumerable});return e},kc=(e,r,t)=>(Mh(e,r,"default"),t&&Mh(t,r,"default")),Xt=(e,r,t)=>(t=e!=null?WT(QT(e)):{},Mh(r||!e||!e.__esModule?bl(t,"default",{value:e,enumerable:!0}):t,e));var ty=(e,r,t)=>(ZT(e,typeof r!="symbol"?r+"":r,t),t);var py=B((TW,fy)=>{fy.exports=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"}});var si=B(Yt=>{function ER(e){return Array.isArray?Array.isArray(e):kl(e)==="[object Array]"}Yt.isArray=ER;function AR(e){return typeof e=="boolean"}Yt.isBoolean=AR;function jR(e){return e===null}Yt.isNull=jR;function TR(e){return e==null}Yt.isNullOrUndefined=TR;function RR(e){return typeof e=="number"}Yt.isNumber=RR;function PR(e){return typeof e=="string"}Yt.isString=PR;function OR(e){return typeof e=="symbol"}Yt.isSymbol=OR;function CR(e){return e===void 0}Yt.isUndefined=CR;function BR(e){return kl(e)==="[object RegExp]"}Yt.isRegExp=BR;function FR(e){return typeof e=="object"&&e!==null}Yt.isObject=FR;function IR(e){return kl(e)==="[object Date]"}Yt.isDate=IR;function MR(e){return kl(e)==="[object Error]"||e instanceof Error}Yt.isError=MR;function LR(e){return typeof e=="function"}Yt.isFunction=LR;function DR(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}Yt.isPrimitive=DR;Yt.isBuffer=require("buffer").Buffer.isBuffer;function kl(e){return Object.prototype.toString.call(e)}});var hy=B((PW,Hh)=>{typeof Object.create=="function"?Hh.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Hh.exports=function(r,t){if(t){r.super_=t;var i=function(){};i.prototype=t.prototype,r.prototype=new i,r.prototype.constructor=r}}});var ci=B((OW,Gh)=>{try{if(Vh=require("util"),typeof Vh.inherits!="function")throw"";Gh.exports=Vh.inherits}catch{Gh.exports=hy()}var Vh});var Ac=B(my=>{var dy=require("buffer").Buffer,qR=dy.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 zR(e){if(e&&!qR(e))throw new Error("Unknown encoding: "+e)}var Kh=my.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),zR(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=UR;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=HR;break;default:this.write=NR;return}this.charBuffer=new dy(6),this.charReceived=0,this.charLength=0};Kh.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 i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),r+=e.toString(this.encoding,0,i);var i=r.length-1,a=r.charCodeAt(i);if(a>=55296&&a<=56319){var n=this.surrogateSize;return this.charLength+=n,this.charReceived+=n,this.charBuffer.copy(this.charBuffer,n,0,n),e.copy(this.charBuffer,0,0,n),r.substring(0,i)}return r};Kh.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};Kh.prototype.end=function(e){var r="";if(e&&e.length&&(r=this.write(e)),this.charReceived){var t=this.charReceived,i=this.charBuffer,a=this.encoding;r+=i.slice(0,t).toString(a)}return r};function NR(e){return e.toString(this.encoding)}function UR(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function HR(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}});var Qh=B((BW,ky)=>{ky.exports=St;var VR=py(),Sl=require("buffer").Buffer;St.ReadableState=xy;var El=require("events").EventEmitter;El.listenerCount||(El.listenerCount=function(e,r){return e.listeners(r).length});var jc=require("stream"),by=si();by.inherits=ci();var ms;by.inherits(St,jc);function xy(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&&(ms||(ms=Ac().StringDecoder),this.decoder=new ms(e.encoding),this.encoding=e.encoding)}function St(e){if(!(this instanceof St))return new St(e);this._readableState=new xy(e,this),this.readable=!0,jc.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 Sl(e,r),r="")),_y(this,t,e,r,!1)};St.prototype.unshift=function(e){var r=this._readableState;return _y(this,r,e,"",!0)};function _y(e,r,t,i,a){var n=$R(r,t);if(n)e.emit("error",n);else if(t==null)r.reading=!1,r.ended||WR(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&&!i&&(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&&Al(e),XR(e,r);else a||(r.reading=!1);return GR(r)}function GR(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}St.prototype.setEncoding=function(e){ms||(ms=Ac().StringDecoder),this._readableState.decoder=new ms(e),this._readableState.encoding=e};var gy=8388608;function KR(e){if(e>=gy)e=gy;else{e--;for(var r=1;r<32;r<<=1)e|=e>>r;e++}return e}function vy(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=KR(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,i;if((typeof e!="number"||e>0)&&(r.emittedReadable=!1),e===0&&r.needReadable&&(r.length>=r.highWaterMark||r.ended))return Al(this),null;if(e=vy(e,r),e===0&&r.ended)return i=null,r.length>0&&r.decoder&&(i=Wh(e,r),r.length-=i.length),r.length===0&&Xh(this),i;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=vy(t,r)),e>0?i=Wh(e,r):i=null,i===null&&(r.needReadable=!0,e=0),r.length-=e,r.length===0&&!r.ended&&(r.needReadable=!0),r.ended&&!r.endEmitted&&r.length===0&&Xh(this),i};function $R(e,r){var t=null;return!Sl.isBuffer(r)&&typeof r!="string"&&r!==null&&r!==void 0&&!e.objectMode&&(t=new TypeError("Invalid non-string/buffer chunk")),t}function WR(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?Al(e):Xh(e)}function Al(e){var r=e._readableState;r.needReadable=!1,!r.emittedReadable&&(r.emittedReadable=!0,r.sync?process.nextTick(function(){yy(e)}):yy(e))}function yy(e){e.emit("readable")}function XR(e,r){r.readingMore||(r.readingMore=!0,process.nextTick(function(){YR(e,r)}))}function YR(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,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1;var a=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,n=a?s:u;i.endEmitted?process.nextTick(n):t.once("end",n),e.on("unpipe",o);function o(v){v===t&&u()}function s(){e.end()}var c=QR(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(v){d(),e.removeListener("error",l),El.listenerCount(e,"error")===0&&e.emit("error",v)}!e._events||!e._events.error?e.on("error",l):VR(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),i.flowing||(this.on("readable",$h),i.flowing=!0,process.nextTick(function(){Yh(t)})),e};function QR(e){return function(){var r=this,t=e._readableState;t.awaitDrain--,t.awaitDrain===0&&Yh(e)}}function Yh(e){var r=e._readableState,t;r.awaitDrain=0;function i(a,n,o){var s=a.write(t);s===!1&&r.awaitDrain++}for(;r.pipesCount&&(t=e.read())!==null;)if(r.pipesCount===1?i(r.pipes,0,null):wy(r.pipes,i),e.emit("data",t),r.awaitDrain>0)return;if(r.pipesCount===0){r.flowing=!1,El.listenerCount(e,"data")>0&&jl(e);return}r.ranOut=!0}function $h(){this._readableState.ranOut&&(this._readableState.ranOut=!1,Yh(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",$h),r.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var t=r.pipes,i=r.pipesCount;r.pipes=null,r.pipesCount=0,this.removeListener("readable",$h),r.flowing=!1;for(var a=0;a<i;a++)t[a].emit("unpipe",this);return this}var a=JR(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=jc.prototype.on.call(this,e,r);if(e==="data"&&!this._readableState.flowing&&jl(this),e==="readable"&&this.readable){var i=this._readableState;i.readableListening||(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading?i.length&&Al(this,i):this.read(0))}return t};St.prototype.addListener=St.prototype.on;St.prototype.resume=function(){jl(this),this.read(0),this.emit("resume")};St.prototype.pause=function(){jl(this,!0),this.emit("pause")};function jl(e,r){var t=e._readableState;if(t.flowing)throw new Error("Cannot switch to old mode now.");var i=r||!1,a=!1;e.readable=!0,e.pipe=jc.prototype.pipe,e.on=e.addListener=jc.prototype.on,e.on("readable",function(){a=!0;for(var n;!i&&(n=e.read())!==null;)e.emit("data",n);n===null&&(a=!1,e._readableState.needReadable=!0)}),e.pause=function(){i=!0,this.emit("pause")},e.resume=function(){i=!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,i=this;e.on("end",function(){if(r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&i.push(o)}i.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=i.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 n=["error","close","destroy","pause","resume"];return wy(n,function(o){e.on(o,i.emit.bind(i,o))}),i._read=function(o){t&&(t=!1,e.resume())},i};St._fromList=Wh;function Wh(e,r){var t=r.buffer,i=r.length,a=!!r.decoder,n=!!r.objectMode,o;if(t.length===0)return null;if(i===0)o=null;else if(n)o=t.shift();else if(!e||e>=i)a?o=t.join(""):o=Sl.concat(t,i),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 Sl(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 Xh(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 wy(e,r){for(var t=0,i=e.length;t<i;t++)r(e[t],t)}function JR(e,r){for(var t=0,i=e.length;t<i;t++)if(e[t]===r)return t;return-1}});var Tl=B((FW,Ay)=>{Ay.exports=gs;var ZR=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r},Sy=si();Sy.inherits=ci();var Ey=Qh(),Jh=Zh();Sy.inherits(gs,Ey);rP(ZR(Jh.prototype),function(e){gs.prototype[e]||(gs.prototype[e]=Jh.prototype[e])});function gs(e){if(!(this instanceof gs))return new gs(e);Ey.call(this,e),Jh.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",eP)}function eP(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function rP(e,r){for(var t=0,i=e.length;t<i;t++)r(e[t],t)}});var Zh=B((IW,Fy)=>{Fy.exports=un;var Rl=require("buffer").Buffer;un.WritableState=Py;var Ty=si();Ty.inherits=ci();var Ry=require("stream");Ty.inherits(un,Ry);function tP(e,r,t){this.chunk=e,this.encoding=r,this.callback=t}function Py(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 i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){uP(r,a)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function un(e){var r=Tl();if(!(this instanceof un)&&!(this instanceof r))return new un(e);this._writableState=new Py(e,this),this.writable=!0,Ry.call(this)}un.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))};function aP(e,r,t){var i=new Error("write after end");e.emit("error",i),process.nextTick(function(){t(i)})}function iP(e,r,t,i){var a=!0;if(!Rl.isBuffer(t)&&typeof t!="string"&&t!==null&&t!==void 0&&!r.objectMode){var n=new TypeError("Invalid non-string/buffer chunk");e.emit("error",n),process.nextTick(function(){i(n)}),a=!1}return a}un.prototype.write=function(e,r,t){var i=this._writableState,a=!1;return typeof r=="function"&&(t=r,r=null),Rl.isBuffer(e)?r="buffer":r||(r=i.defaultEncoding),typeof t!="function"&&(t=function(){}),i.ended?aP(this,i,t):iP(this,i,e,t)&&(a=oP(this,i,e,r,t)),a};function nP(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=new Rl(r,t)),r}function oP(e,r,t,i,a){t=nP(r,t,i),Rl.isBuffer(t)&&(i="buffer");var n=r.objectMode?1:t.length;r.length+=n;var o=r.length<r.highWaterMark;return o||(r.needDrain=!0),r.writing?r.buffer.push(new tP(t,i,a)):Oy(e,r,n,t,i,a),o}function Oy(e,r,t,i,a,n){r.writelen=t,r.writecb=n,r.writing=!0,r.sync=!0,e._write(i,a,r.onwrite),r.sync=!1}function sP(e,r,t,i,a){t?process.nextTick(function(){a(i)}):a(i),e._writableState.errorEmitted=!0,e.emit("error",i)}function cP(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function uP(e,r){var t=e._writableState,i=t.sync,a=t.writecb;if(cP(t),r)sP(e,t,i,r,a);else{var n=Cy(e,t);!n&&!t.bufferProcessing&&t.buffer.length&&fP(e,t),i?process.nextTick(function(){jy(e,t,n,a)}):jy(e,t,n,a)}}function jy(e,r,t,i){t||lP(e,r),i(),t&&By(e,r)}function lP(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function fP(e,r){r.bufferProcessing=!0;for(var t=0;t<r.buffer.length;t++){var i=r.buffer[t],a=i.chunk,n=i.encoding,o=i.callback,s=r.objectMode?1:a.length;if(Oy(e,r,s,a,n,o),r.writing){t++;break}}r.bufferProcessing=!1,t<r.buffer.length?r.buffer=r.buffer.slice(t):r.buffer.length=0}un.prototype._write=function(e,r,t){t(new Error("not implemented"))};un.prototype.end=function(e,r,t){var i=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),!i.ending&&!i.finished&&pP(this,i,t)};function Cy(e,r){return r.ending&&r.length===0&&!r.finished&&!r.writing}function By(e,r){var t=Cy(e,r);return t&&(r.finished=!0,e.emit("finish")),t}function pP(e,r,t){r.ending=!0,By(e,r),t&&(r.finished?process.nextTick(t):e.once("finish",t)),r.ended=!0}});var rd=B((MW,Ly)=>{Ly.exports=zn;var ed=Tl(),My=si();My.inherits=ci();My.inherits(zn,ed);function hP(e,r){this.afterTransform=function(t,i){return dP(r,t,i)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function dP(e,r,t){var i=e._transformState;i.transforming=!1;var a=i.writecb;if(!a)return e.emit("error",new Error("no writecb in Transform class"));i.writechunk=null,i.writecb=null,t!=null&&e.push(t),a&&a(r);var n=e._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&e._read(n.highWaterMark)}function zn(e){if(!(this instanceof zn))return new zn(e);ed.call(this,e);var r=this._transformState=new hP(e,this),t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){typeof this._flush=="function"?this._flush(function(i){Iy(t,i)}):Iy(t)})}zn.prototype.push=function(e,r){return this._transformState.needTransform=!1,ed.prototype.push.call(this,e,r)};zn.prototype._transform=function(e,r,t){throw new Error("not implemented")};zn.prototype._write=function(e,r,t){var i=this._transformState;if(i.writecb=t,i.writechunk=e,i.writeencoding=r,!i.transforming){var a=this._readableState;(i.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};zn.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 Iy(e,r){if(r)return e.emit("error",r);var t=e._writableState,i=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 Ny=B((LW,zy)=>{zy.exports=Tc;var Dy=rd(),qy=si();qy.inherits=ci();qy.inherits(Tc,Dy);function Tc(e){if(!(this instanceof Tc))return new Tc(e);Dy.call(this,e)}Tc.prototype._transform=function(e,r,t){t(null,e)}});var Uy=B((ln,td)=>{var mP=require("stream");ln=td.exports=Qh();ln.Stream=mP;ln.Readable=ln;ln.Writable=Zh();ln.Duplex=Tl();ln.Transform=rd();ln.PassThrough=Ny();!process.browser&&process.env.READABLE_STREAM==="disable"&&(td.exports=require("stream"))});var Gy=B((DW,Vy)=>{"use strict";var Hy=Uy().Readable,gP=require("util");Vy.exports=Rc;function Rc(e,r){if(!(this instanceof Rc))return new Rc(e,r);Hy.call(this,r),e==null&&(e=String(e)),this._obj=e}gP.inherits(Rc,Hy);Rc.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 $y=B((qW,Ky)=>{Ky.exports=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"}});var id=B((zW,rb)=>{rb.exports=Na;var vP=require("buffer").Buffer;Na.WritableState=Qy;var ja=si();ja.inherits=ci();var Yy=require("stream");ja.inherits(Na,Yy);function yP(e,r,t){this.chunk=e,this.encoding=r,this.callback=t}function Qy(e,r){var t=ko();e=e||{};var i=e.highWaterMark,a=e.objectMode?16:16*1024;this.highWaterMark=i||i===0?i: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 n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){EP(r,o)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function Na(e){var r=ko();if(!(this instanceof Na)&&!(this instanceof r))return new Na(e);this._writableState=new Qy(e,this),this.writable=!0,Yy.call(this)}Na.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))};function bP(e,r,t){var i=new Error("write after end");e.emit("error",i),process.nextTick(function(){t(i)})}function xP(e,r,t,i){var a=!0;if(!ja.isBuffer(t)&&!ja.isString(t)&&!ja.isNullOrUndefined(t)&&!r.objectMode){var n=new TypeError("Invalid non-string/buffer chunk");e.emit("error",n),process.nextTick(function(){i(n)}),a=!1}return a}Na.prototype.write=function(e,r,t){var i=this._writableState,a=!1;return ja.isFunction(r)&&(t=r,r=null),ja.isBuffer(e)?r="buffer":r||(r=i.defaultEncoding),ja.isFunction(t)||(t=function(){}),i.ended?bP(this,i,t):xP(this,i,e,t)&&(i.pendingcb++,a=wP(this,i,e,r,t)),a};Na.prototype.cork=function(){var e=this._writableState;e.corked++};Na.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.buffer.length&&Jy(this,e))};function _P(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&ja.isString(r)&&(r=new vP(r,t)),r}function wP(e,r,t,i,a){t=_P(r,t,i),ja.isBuffer(t)&&(i="buffer");var n=r.objectMode?1:t.length;r.length+=n;var o=r.length<r.highWaterMark;return o||(r.needDrain=!0),r.writing||r.corked?r.buffer.push(new yP(t,i,a)):ad(e,r,!1,n,t,i,a),o}function ad(e,r,t,i,a,n,o){r.writelen=i,r.writecb=o,r.writing=!0,r.sync=!0,t?e._writev(a,r.onwrite):e._write(a,n,r.onwrite),r.sync=!1}function kP(e,r,t,i,a){t?process.nextTick(function(){r.pendingcb--,a(i)}):(r.pendingcb--,a(i)),e._writableState.errorEmitted=!0,e.emit("error",i)}function SP(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function EP(e,r){var t=e._writableState,i=t.sync,a=t.writecb;if(SP(t),r)kP(e,t,i,r,a);else{var n=Zy(e,t);!n&&!t.corked&&!t.bufferProcessing&&t.buffer.length&&Jy(e,t),i?process.nextTick(function(){Wy(e,t,n,a)}):Wy(e,t,n,a)}}function Wy(e,r,t,i){t||AP(e,r),r.pendingcb--,i(),eb(e,r)}function AP(e,r){r.length===0&&r.needDrain&&(r.needDrain=!1,e.emit("drain"))}function Jy(e,r){if(r.bufferProcessing=!0,e._writev&&r.buffer.length>1){for(var t=[],i=0;i<r.buffer.length;i++)t.push(r.buffer[i].callback);r.pendingcb++,ad(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 i=0;i<r.buffer.length;i++){var a=r.buffer[i],n=a.chunk,o=a.encoding,s=a.callback,c=r.objectMode?1:n.length;if(ad(e,r,!1,c,n,o,s),r.writing){i++;break}}i<r.buffer.length?r.buffer=r.buffer.slice(i):r.buffer.length=0}r.bufferProcessing=!1}Na.prototype._write=function(e,r,t){t(new Error("not implemented"))};Na.prototype._writev=null;Na.prototype.end=function(e,r,t){var i=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),i.corked&&(i.corked=1,this.uncork()),!i.ending&&!i.finished&&jP(this,i,t)};function Zy(e,r){return r.ending&&r.length===0&&!r.finished&&!r.writing}function Xy(e,r){r.prefinished||(r.prefinished=!0,e.emit("prefinish"))}function eb(e,r){var t=Zy(e,r);return t&&(r.pendingcb===0?(Xy(e,r),r.finished=!0,e.emit("finish")):Xy(e,r)),t}function jP(e,r,t){r.ending=!0,eb(e,r),t&&(r.finished?process.nextTick(t):e.once("finish",t)),r.ended=!0}});var ko=B((NW,ib)=>{ib.exports=vs;var TP=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r},tb=si();tb.inherits=ci();var ab=od(),nd=id();tb.inherits(vs,ab);PP(TP(nd.prototype),function(e){vs.prototype[e]||(vs.prototype[e]=nd.prototype[e])});function vs(e){if(!(this instanceof vs))return new vs(e);ab.call(this,e),nd.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",RP)}function RP(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function PP(e,r){for(var t=0,i=e.length;t<i;t++)r(e[t],t)}});var od=B((UW,fb)=>{fb.exports=Et;var OP=$y(),cd=require("buffer").Buffer;Et.ReadableState=cb;var Pl=require("events").EventEmitter;Pl.listenerCount||(Pl.listenerCount=function(e,r){return e.listeners(r).length});var ud=require("stream"),Ta=si();Ta.inherits=ci();var ys,Rr=require("util");Rr&&Rr.debuglog?Rr=Rr.debuglog("stream"):Rr=function(){};Ta.inherits(Et,ud);function cb(e,r){var t=ko();e=e||{};var i=e.highWaterMark,a=e.objectMode?16:16*1024;this.highWaterMark=i||i===0?i: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&&(ys||(ys=Ac().StringDecoder),this.decoder=new ys(e.encoding),this.encoding=e.encoding)}function Et(e){var r=ko();if(!(this instanceof Et))return new Et(e);this._readableState=new cb(e,this),this.readable=!0,ud.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 cd(e,r),r="")),ub(this,t,e,r,!1)};Et.prototype.unshift=function(e){var r=this._readableState;return ub(this,r,e,"",!0)};function ub(e,r,t,i,a){var n=FP(r,t);if(n)e.emit("error",n);else if(Ta.isNullOrUndefined(t))r.reading=!1,r.ended||IP(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&&!i&&(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&&Ol(e)),MP(e,r);else a||(r.reading=!1);return CP(r)}function CP(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Et.prototype.setEncoding=function(e){return ys||(ys=Ac().StringDecoder),this._readableState.decoder=new ys(e),this._readableState.encoding=e,this};var nb=8388608;function BP(e){if(e>=nb)e=nb;else{e--;for(var r=1;r<32;r<<=1)e|=e>>r;e++}return e}function ob(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=BP(e)),e>r.length?r.ended?r.length:(r.needReadable=!0,0):e)}Et.prototype.read=function(e){Rr("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 Rr("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?sd(this):Ol(this),null;if(e=ob(e,r),e===0&&r.ended)return r.length===0&&sd(this),null;var i=r.needReadable;Rr("need readable",i),(r.length===0||r.length-e<r.highWaterMark)&&(i=!0,Rr("length less than watermark",i)),(r.ended||r.reading)&&(i=!1,Rr("reading or ended",i)),i&&(Rr("do read"),r.reading=!0,r.sync=!0,r.length===0&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1),i&&!r.reading&&(e=ob(t,r));var a;return e>0?a=lb(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&&sd(this),Ta.isNull(a)||this.emit("data",a),a};function FP(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 IP(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,Ol(e)}function Ol(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(Rr("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?process.nextTick(function(){sb(e)}):sb(e))}function sb(e){Rr("emit readable"),e.emit("readable"),ld(e)}function MP(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&&(Rr("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,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,Rr("pipe count=%d opts=%j",i.pipesCount,r);var a=(!r||r.end!==!1)&&e!==process.stdout&&e!==process.stderr,n=a?s:u;i.endEmitted?process.nextTick(n):t.once("end",n),e.on("unpipe",o);function o(x){Rr("onunpipe"),x===t&&u()}function s(){Rr("onend"),e.end()}var c=DP(t);e.on("drain",c);function u(){Rr("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),i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c()}t.on("data",l);function l(x){Rr("ondata");var y=e.write(x);y===!1&&(Rr("false write response, pause",t._readableState.awaitDrain),t._readableState.awaitDrain++,t.pause())}function h(x){Rr("onerror",x),v(),e.removeListener("error",h),Pl.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),v()}e.once("close",p);function d(){Rr("onfinish"),e.removeListener("close",p),v()}e.once("finish",d);function v(){Rr("unpipe"),t.unpipe(e)}return e.emit("pipe",t),i.flowing||(Rr("pipe resume"),t.resume()),e};function DP(e){return function(){var r=e._readableState;Rr("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Pl.listenerCount(e,"data")&&(r.flowing=!0,ld(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,i=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var a=0;a<i;a++)t[a].emit("unpipe",this);return this}var a=UP(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=ud.prototype.on.call(this,e,r);if(e==="data"&&this._readableState.flowing!==!1&&this.resume(),e==="readable"&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&Ol(this,i);else{var a=this;process.nextTick(function(){Rr("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||(Rr("resume"),e.flowing=!0,e.reading||(Rr("resume read 0"),this.read(0)),qP(this,e)),this};function qP(e,r){r.resumeScheduled||(r.resumeScheduled=!0,process.nextTick(function(){zP(e,r)}))}function zP(e,r){r.resumeScheduled=!1,e.emit("resume"),ld(e),r.flowing&&!r.reading&&e.read(0)}Et.prototype.pause=function(){return Rr("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Rr("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ld(e){var r=e._readableState;if(Rr("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,i=this;e.on("end",function(){if(Rr("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&i.push(o)}i.push(null)}),e.on("data",function(o){if(Rr("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(!o||!r.objectMode&&!o.length)){var s=i.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 n=["error","close","destroy","pause","resume"];return NP(n,function(o){e.on(o,i.emit.bind(i,o))}),i._read=function(o){Rr("wrapped _read",o),t&&(t=!1,e.resume())},i};Et._fromList=lb;function lb(e,r){var t=r.buffer,i=r.length,a=!!r.decoder,n=!!r.objectMode,o;if(t.length===0)return null;if(i===0)o=null;else if(n)o=t.shift();else if(!e||e>=i)a?o=t.join(""):o=cd.concat(t,i),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 cd(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 sd(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 NP(e,r){for(var t=0,i=e.length;t<i;t++)r(e[t],t)}function UP(e,r){for(var t=0,i=e.length;t<i;t++)if(e[t]===r)return t;return-1}});var pd=B((HW,hb)=>{hb.exports=Nn;var fd=ko(),Pc=si();Pc.inherits=ci();Pc.inherits(Nn,fd);function HP(e,r){this.afterTransform=function(t,i){return VP(r,t,i)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function VP(e,r,t){var i=e._transformState;i.transforming=!1;var a=i.writecb;if(!a)return e.emit("error",new Error("no writecb in Transform class"));i.writechunk=null,i.writecb=null,Pc.isNullOrUndefined(t)||e.push(t),a&&a(r);var n=e._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&e._read(n.highWaterMark)}function Nn(e){if(!(this instanceof Nn))return new Nn(e);fd.call(this,e),this._transformState=new HP(e,this);var r=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){Pc.isFunction(this._flush)?this._flush(function(t){pb(r,t)}):pb(r)})}Nn.prototype.push=function(e,r){return this._transformState.needTransform=!1,fd.prototype.push.call(this,e,r)};Nn.prototype._transform=function(e,r,t){throw new Error("not implemented")};Nn.prototype._write=function(e,r,t){var i=this._transformState;if(i.writecb=t,i.writechunk=e,i.writeencoding=r,!i.transforming){var a=this._readableState;(i.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}};Nn.prototype._read=function(e){var r=this._transformState;!Pc.isNull(r.writechunk)&&r.writecb&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0};function pb(e,r){if(r)return e.emit("error",r);var t=e._writableState,i=e._transformState;if(t.length)throw new Error("calling transform done when ws.length != 0");if(i.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}});var vb=B((VW,gb)=>{gb.exports=Oc;var db=pd(),mb=si();mb.inherits=ci();mb.inherits(Oc,db);function Oc(e){if(!(this instanceof Oc))return new Oc(e);db.call(this,e)}Oc.prototype._transform=function(e,r,t){t(null,e)}});var yb=B((fn,hd)=>{fn=hd.exports=od();fn.Stream=require("stream");fn.Readable=fn;fn.Writable=id();fn.Duplex=ko();fn.Transform=pd();fn.PassThrough=vb();!process.browser&&process.env.READABLE_STREAM==="disable"&&(hd.exports=require("stream"))});var Rb=B((KW,Tb)=>{var GP=100,Ft=256,bb=Ft-1,Un=4,Sb=16,md=1<<Sb,gd=10,GW=1<<gd,vd=10,KP=md>>vd,$P=md<<gd-vd,WP=Ft>>3,dd=6,XP=1<<dd,YP=WP*XP,QP=30,Eb=10,Cl=1<<Eb,Ab=8,xb=1<<Ab,JP=Eb+Ab,bs=1<<JP,_b=499,wb=491,kb=487,jb=503,ZP=3*jb;function eO(e,r){var t,i,a,n,o;function s(){t=[],i=new Int32Array(256),a=new Int32Array(Ft),n=new Int32Array(Ft),o=new Int32Array(Ft>>3);var E,A;for(E=0;E<Ft;E++)A=(E<<Un+8)/Ft,t[E]=new Float64Array([A,A,A,0]),n[E]=md/Ft,a[E]=0}function c(){for(var E=0;E<Ft;E++)t[E][0]>>=Un,t[E][1]>>=Un,t[E][2]>>=Un,t[E][3]=E}function u(E,A,S,R,j){t[A][0]-=E*(t[A][0]-S)/Cl,t[A][1]-=E*(t[A][1]-R)/Cl,t[A][2]-=E*(t[A][2]-j)/Cl}function l(E,A,S,R,j){for(var P=Math.abs(A-E),C=Math.min(A+E,Ft),I=A+1,F=A-1,H=1,z,G;I<C||F>P;)G=o[H++],I<C&&(z=t[I++],z[0]-=G*(z[0]-S)/bs,z[1]-=G*(z[1]-R)/bs,z[2]-=G*(z[2]-j)/bs),F>P&&(z=t[F--],z[0]-=G*(z[0]-S)/bs,z[1]-=G*(z[1]-R)/bs,z[2]-=G*(z[2]-j)/bs)}function h(E,A,S){var R=2147483647,j=R,P=-1,C=P,I,F,H,z,G;for(I=0;I<Ft;I++)F=t[I],H=Math.abs(F[0]-E)+Math.abs(F[1]-A)+Math.abs(F[2]-S),H<R&&(R=H,P=I),z=H-(a[I]>>Sb-Un),z<j&&(j=z,C=I),G=n[I]>>vd,n[I]-=G,a[I]+=G<<gd;return n[P]+=KP,a[P]-=$P,C}function p(){var E,A,S,R,j,P,C=0,I=0;for(E=0;E<Ft;E++){for(S=t[E],j=E,P=S[1],A=E+1;A<Ft;A++)R=t[A],R[1]<P&&(j=A,P=R[1]);if(R=t[j],E!=j&&(A=R[0],R[0]=S[0],S[0]=A,A=R[1],R[1]=S[1],S[1]=A,A=R[2],R[2]=S[2],S[2]=A,A=R[3],R[3]=S[3],S[3]=A),P!=C){for(i[C]=I+E>>1,A=C+1;A<P;A++)i[A]=E;C=P,I=E}}for(i[C]=I+bb>>1,A=C+1;A<256;A++)i[A]=bb}function d(E,A,S){for(var R,j,P,C=1e3,I=-1,F=i[A],H=F-1;F<Ft||H>=0;)F<Ft&&(j=t[F],P=j[1]-A,P>=C?F=Ft:(F++,P<0&&(P=-P),R=j[0]-E,R<0&&(R=-R),P+=R,P<C&&(R=j[2]-S,R<0&&(R=-R),P+=R,P<C&&(C=P,I=j[3])))),H>=0&&(j=t[H],P=A-j[1],P>=C?H=-1:(H--,P<0&&(P=-P),R=j[0]-E,R<0&&(R=-R),P+=R,P<C&&(R=j[2]-S,R<0&&(R=-R),P+=R,P<C&&(C=P,I=j[3]))));return I}function v(){var E,A=e.length,S=30+(r-1)/3,R=A/(3*r),j=~~(R/GP),P=Cl,C=YP,I=C>>dd;for(I<=1&&(I=0),E=0;E<I;E++)o[E]=P*((I*I-E*E)*xb/(I*I));var F;A<ZP?(r=1,F=3):A%_b!==0?F=3*_b:A%wb!==0?F=3*wb:A%kb!==0?F=3*kb:F=3*jb;var H,z,G,D,V=0;for(E=0;E<R;)if(H=(e[V]&255)<<Un,z=(e[V+1]&255)<<Un,G=(e[V+2]&255)<<Un,D=h(H,z,G),u(P,D,H,z,G),I!==0&&l(I,D,H,z,G),V+=F,V>=A&&(V-=A),E++,j===0&&(j=1),E%j===0)for(P-=P/S,C-=C/QP,I=C>>dd,I<=1&&(I=0),D=0;D<I;D++)o[D]=P*((I*I-D*D)*xb/(I*I))}function x(){s(),v(),c(),p()}this.buildColormap=x;function y(){for(var E=[],A=[],S=0;S<Ft;S++)A[t[S][3]]=S;for(var R=0,j=0;j<Ft;j++){var P=A[j];E[R++]=t[P][0],E[R++]=t[P][1],E[R++]=t[P][2]}return E}this.getColormap=y,this.lookupRGB=d}Tb.exports=eO});var Cb=B(($W,Ob)=>{var Pb=-1,Bl=12,Cc=5003,rO=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function tO(e,r,t,i){var a=Math.max(2,i),n=new Uint8Array(256),o=new Int32Array(Cc),s=new Int32Array(Cc),c,u=0,l,h=0,p,d,v,x,y=!1,E,A,S;function R(D,V){n[l++]=D,l>=254&&F(V)}function j(D){P(Cc),h=A+2,y=!0,G(A,D)}function P(D){for(var V=0;V<D;++V)o[V]=-1}function C(D,V){var $,ge,le,oe,de,ie,we;for(E=D,y=!1,x=E,p=H(x),A=1<<D-1,S=A+1,h=A+2,l=0,oe=z(),we=0,$=Cc;$<65536;$*=2)++we;we=8-we,ie=Cc,P(ie),G(A,V);e:for(;(ge=z())!=Pb;){if($=(ge<<Bl)+oe,le=ge<<we^oe,o[le]===$){oe=s[le];continue}else if(o[le]>=0){de=ie-le,le===0&&(de=1);do if((le-=de)<0&&(le+=ie),o[le]===$){oe=s[le];continue e}while(o[le]>=0)}G(oe,V),oe=ge,h<1<<Bl?(s[le]=h++,o[le]=$):j(V)}G(oe,V),G(S,V)}function I(D){D.writeByte(a),d=e*r,v=0,C(a+1,D),D.writeByte(0)}function F(D){l>0&&(D.writeByte(l),D.writeBytes(n,0,l),l=0)}function H(D){return(1<<D)-1}function z(){if(d===0)return Pb;--d;var D=t[v++];return D&255}function G(D,V){for(c&=rO[u],u>0?c|=D<<u:c=D,u+=x;u>=8;)R(c&255,V),c>>=8,u-=8;if((h>p||y)&&(y?(p=H(x=E),y=!1):(++x,x==Bl?p=1<<Bl:p=H(x))),D==S){for(;u>0;)R(c&255,V),c>>=8,u-=8;F(V)}}this.encode=I}Ob.exports=tO});var Mb=B((YW,Ib)=>{var WW=require("assert"),XW=require("events").EventEmitter,Bb=yb(),Fb=require("util"),aO=Rb(),iO=Cb();function Ri(e){Bb.call(this,e),this.okayToPush=!0,this.resetData()}Fb.inherits(Ri,Bb);Ri.prototype._read=function(){this.okayToPush=!0};Ri.prototype.resetData=function(){this.data=[]};Ri.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)};Ri.prototype.writeByte=function(e){this.data.push(e)};Ri.prototype.writeUTFBytes=function(e){for(var r=e.length,t=0;t<r;t++)this.writeByte(e.charCodeAt(t))};Ri.prototype.writeBytes=function(e,r,t){for(var i=t||e.length,a=r||0;a<i;a++)this.writeByte(e[a])};function Vr(e,r,t){t=t||{};var i=t.highWaterMark;Ri.call(this,{highWaterMark:i||i===0?i: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 n(){a.flushData()}this.on("writeHeader#stop",n),this.on("frame#stop",n),this.on("finish#stop",function(){n(),a.push(null)})}Fb.inherits(Vr,Ri);Vr.prototype.setDelay=function(e){this.delay=Math.round(e/10)};Vr.prototype.setFrameRate=function(e){this.delay=Math.round(100/e)};Vr.prototype.setDispose=function(e){e>=0&&(this.dispose=e)};Vr.prototype.setRepeat=function(e){this.repeat=e};Vr.prototype.setTransparent=function(e){this.transparent=e};Vr.prototype.analyzeImage=function(e){this.setImagePixels(this.removeAlphaChannel(e)),this.analyzePixels()};Vr.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};Vr.prototype.outputImage=function(){this.writePixels()};Vr.prototype.addFrame=function(e){this.emit("frame#start"),this.analyzeImage(e),this.writeImageInfo(),this.outputImage(),this.emit("frame#stop")};Vr.prototype.finish=function(){this.emit("finish#start"),this.writeByte(59),this.emit("finish#stop")};Vr.prototype.setQuality=function(e){e<1&&(e=1),this.sample=e};Vr.prototype.writeHeader=function(){this.emit("writeHeader#start"),this.writeUTFBytes("GIF89a"),this.emit("writeHeader#stop")};Vr.prototype.analyzePixels=function(){var e=this.pixels.length,r=e/3;this.indexedPixels=new Uint8Array(r);var t=new aO(this.pixels,this.sample);t.buildColormap(),this.colorTab=t.getColormap();for(var i=0,a=0;a<r;a++){var n=t.lookupRGB(this.pixels[i++]&255,this.pixels[i++]&255,this.pixels[i++]&255);this.usedEntry[n]=!0,this.indexedPixels[a]=n}this.pixels=null,this.colorDepth=8,this.palSize=7,this.transparent!==null&&(this.transIndex=this.findClosest(this.transparent))};Vr.prototype.findClosest=function(e){if(this.colorTab===null)return-1;for(var r=(e&16711680)>>16,t=(e&65280)>>8,i=e&255,a=0,n=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=i-(this.colorTab[s]&255),h=c*c+u*u+l*l,p=s/3;this.usedEntry[p]&&h<n&&(n=h,a=p),s++}return a};Vr.prototype.removeAlphaChannel=function(e){for(var r=this.width,t=this.height,i=new Uint8Array(r*t*3),a=0,n=0;n<t;n++)for(var o=0;o<r;o++){var s=n*r*4+o*4;i[a++]=e[s],i[a++]=e[s+1],i[a++]=e[s+2]}return i};Vr.prototype.setImagePixels=function(e){this.pixels=e};Vr.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)};Vr.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)};Vr.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.writeByte(240|this.palSize),this.writeByte(0),this.writeByte(0)};Vr.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)};Vr.prototype.writePalette=function(){this.writeBytes(this.colorTab);for(var e=3*256-this.colorTab.length,r=0;r<e;r++)this.writeByte(0)};Vr.prototype.writeShort=function(e){this.writeByte(e&255),this.writeByte(e>>8&255)};Vr.prototype.writePixels=function(){var e=new iO(this.width,this.height,this.indexedPixels,this.colorDepth);e.encode(this)};Vr.prototype.stream=function(){return this};Vr.ByteCapacitor=Ri;Ib.exports=Vr});var qb=B((QW,Fl)=>{var Db=Db||function(e){return Buffer.from(e).toString("base64")};function nO(e){var r=this,t=Math.round,i=Math.floor,a=new Array(64),n=new Array(64),o=new Array(64),s=new Array(64),c,u,l,h,p=new Array(65535),d=new Array(65535),v=new Array(64),x=new Array(64),y=[],E=0,A=7,S=new Array(64),R=new Array(64),j=new Array(64),P=new Array(256),C=new Array(2048),I,F=[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],H=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],z=[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],D=[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],V=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],$=[0,1,2,3,4,5,6,7,8,9,10,11],ge=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],le=[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 oe(X){for(var Re=[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],Ne=0;Ne<64;Ne++){var Le=i((Re[Ne]*X+50)/100);Le<1?Le=1:Le>255&&(Le=255),a[F[Ne]]=Le}for(var He=[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],Qe=0;Qe<64;Qe++){var rr=i((He[Qe]*X+50)/100);rr<1?rr=1:rr>255&&(rr=255),n[F[Qe]]=rr}for(var fr=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Fr=0,pr=0;pr<8;pr++)for(var fe=0;fe<8;fe++)o[Fr]=1/(a[F[Fr]]*fr[pr]*fr[fe]*8),s[Fr]=1/(n[F[Fr]]*fr[pr]*fr[fe]*8),Fr++}function de(X,Re){for(var Ne=0,Le=0,He=new Array,Qe=1;Qe<=16;Qe++){for(var rr=1;rr<=X[Qe];rr++)He[Re[Le]]=[],He[Re[Le]][0]=Ne,He[Re[Le]][1]=Qe,Le++,Ne++;Ne*=2}return He}function ie(){c=de(H,z),u=de(V,$),l=de(G,D),h=de(ge,le)}function we(){for(var X=1,Re=2,Ne=1;Ne<=15;Ne++){for(var Le=X;Le<Re;Le++)d[32767+Le]=Ne,p[32767+Le]=[],p[32767+Le][1]=Ne,p[32767+Le][0]=Le;for(var He=-(Re-1);He<=-X;He++)d[32767+He]=Ne,p[32767+He]=[],p[32767+He][1]=Ne,p[32767+He][0]=Re-1+He;X<<=1,Re<<=1}}function Te(){for(var X=0;X<256;X++)C[X]=19595*X,C[X+256>>0]=38470*X,C[X+512>>0]=7471*X+32768,C[X+768>>0]=-11059*X,C[X+1024>>0]=-21709*X,C[X+1280>>0]=32768*X+8421375,C[X+1536>>0]=-27439*X,C[X+1792>>0]=-5329*X}function Se(X){for(var Re=X[0],Ne=X[1]-1;Ne>=0;)Re&1<<Ne&&(E|=1<<A),Ne--,A--,A<0&&(E==255?(U(255),U(0)):U(E),A=7,E=0)}function U(X){y.push(X)}function me(X){U(X>>8&255),U(X&255)}function We(X,Re){var Ne,Le,He,Qe,rr,fr,Fr,pr,fe=0,ze,ar=8,wr=64;for(ze=0;ze<ar;++ze){Ne=X[fe],Le=X[fe+1],He=X[fe+2],Qe=X[fe+3],rr=X[fe+4],fr=X[fe+5],Fr=X[fe+6],pr=X[fe+7];var ir=Ne+pr,lr=Ne-pr,vr=Le+Fr,Ze=Le-Fr,sr=He+fr,Ur=He-fr,Er=Qe+rr,vt=Qe-rr,Ut=ir+Er,Ea=ir-Er,Ia=vr+sr,Yr=vr-sr;X[fe]=Ut+Ia,X[fe+4]=Ut-Ia;var Ht=(Yr+Ea)*.707106781;X[fe+2]=Ea+Ht,X[fe+6]=Ea-Ht,Ut=vt+Ur,Ia=Ur+Ze,Yr=Ze+lr;var Vt=(Ut-Yr)*.382683433,Ma=.5411961*Ut+Vt,na=1.306562965*Yr+Vt,Aa=Ia*.707106781,ii=lr+Aa,et=lr-Aa;X[fe+5]=et+Ma,X[fe+3]=et-Ma,X[fe+1]=ii+na,X[fe+7]=ii-na,fe+=8}for(fe=0,ze=0;ze<ar;++ze){Ne=X[fe],Le=X[fe+8],He=X[fe+16],Qe=X[fe+24],rr=X[fe+32],fr=X[fe+40],Fr=X[fe+48],pr=X[fe+56];var on=Ne+pr,b=Ne-pr,g=Le+Fr,m=Le-Fr,f=He+fr,_=He-fr,O=Qe+rr,L=Qe-rr,K=on+O,Q=on-O,se=g+f,ue=g-f;X[fe]=K+se,X[fe+32]=K-se;var Be=(ue+Q)*.707106781;X[fe+16]=Q+Be,X[fe+48]=Q-Be,K=L+_,se=_+m,ue=m+b;var he=(K-ue)*.382683433,Fe=.5411961*K+he,Pe=1.306562965*ue+he,xe=se*.707106781,Me=b+xe,Ee=b-xe;X[fe+40]=Ee+Fe,X[fe+24]=Ee-Fe,X[fe+8]=Me+Pe,X[fe+56]=Me-Pe,fe++}var Ke;for(ze=0;ze<wr;++ze)Ke=X[ze]*Re[ze],v[ze]=Ke>0?Ke+.5|0:Ke-.5|0;return v}function Xe(){me(65504),me(16),U(74),U(70),U(73),U(70),U(0),U(1),U(1),U(0),me(1),me(1),U(0),U(0)}function De(X){if(X){me(65505),X[0]===69&&X[1]===120&&X[2