UNPKG

minidev

Version:

支付宝小程序开发 cli(minidev)提供了常用的支付宝系小程序开发指令,能够方便地在各类平台上快速进行小程序的开发、预览、上传等操作。

2 lines 1.57 MB
/*! For license information please see rw_host.js.LICENSE.txt */ (()=>{var __webpack_modules__={15:t=>{"use strict";t.exports=EvalError},1676:(t,e,r)=>{"use strict";var n=r(18772);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(51750)),o=n(r(46997)),a=r(35236);function s(t,e,r,n){for(var i=[0,0,0],o=(e.length-1)/2,a=0;a<e.length;a+=1)for(var s=0;s<e[a].length;s+=1){var c=t.getPixelIndex(r+a-o,n+s-o);i[0]+=t.bitmap.data[c]*e[a][s],i[1]+=t.bitmap.data[c+1]*e[a][s],i[2]+=t.bitmap.data[c+2]*e[a][s]}return i}var c=function(t){return null!=t};function u(t){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,r){var n=parseInt(.2126*this.bitmap.data[r]+.7152*this.bitmap.data[r+1]+.0722*this.bitmap.data[r+2],10);this.bitmap.data[r]=n,this.bitmap.data[r+1]=n,this.bitmap.data[r+2]=n})),(0,a.isNodePattern)(t)&&t.call(this,null,this),this}function l(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50;return{r:(e.r-t.r)*(r/100)+t.r,g:(e.g-t.g)*(r/100)+t.g,b:(e.b-t.b)*(r/100)+t.b}}function p(t,e){var r=this;return t&&Array.isArray(t)?(t=t.map((function(t){return"xor"!==t.apply&&"mix"!==t.apply||(t.params[0]=(0,o.default)(t.params[0]).toRgb()),t})),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(n,s,c){var u={r:r.bitmap.data[c],g:r.bitmap.data[c+1],b:r.bitmap.data[c+2]},p=function(t,e){return r.constructor.limit255(u[t]+e)};t.forEach((function(t){if("mix"===t.apply)u=l(u,t.params[0],t.params[1]);else if("tint"===t.apply)u=l(u,{r:255,g:255,b:255},t.params[0]);else if("shade"===t.apply)u=l(u,{r:0,g:0,b:0},t.params[0]);else if("xor"===t.apply)u={r:u.r^t.params[0].r,g:u.g^t.params[0].g,b:u.b^t.params[0].b};else if("red"===t.apply)u.r=p("r",t.params[0]);else if("green"===t.apply)u.g=p("g",t.params[0]);else if("blue"===t.apply)u.b=p("b",t.params[0]);else{var n;if("hue"===t.apply&&(t.apply="spin"),!(u=(0,o.default)(u))[t.apply])return a.throwError.call(r,"action "+t.apply+" not supported",e);u=(n=u)[t.apply].apply(n,(0,i.default)(t.params)).toRgb()}})),r.bitmap.data[c]=u.r,r.bitmap.data[c+1]=u.g,r.bitmap.data[c+2]=u.b})),(0,a.isNodePattern)(e)&&e.call(this,null,this),this):a.throwError.call(this,"actions must be an array",e)}e.default=function(){return{brightness:function(t,e){return"number"!=typeof t?a.throwError.call(this,"val must be numbers",e):t<-1||t>1?a.throwError.call(this,"val must be a number between -1 and +1",e):(this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,r,n){t<0?(this.bitmap.data[n]*=1+t,this.bitmap.data[n+1]*=1+t,this.bitmap.data[n+2]*=1+t):(this.bitmap.data[n]+=(255-this.bitmap.data[n])*t,this.bitmap.data[n+1]+=(255-this.bitmap.data[n+1])*t,this.bitmap.data[n+2]+=(255-this.bitmap.data[n+2])*t)})),(0,a.isNodePattern)(e)&&e.call(this,null,this),this)},contrast:function(t,e){if("number"!=typeof t)return a.throwError.call(this,"val must be numbers",e);if(t<-1||t>1)return a.throwError.call(this,"val must be a number between -1 and +1",e);var r=(t+1)/(1-t);function n(t){return(t=Math.floor(r*(t-127)+127))<0?0:t>255?255:t}return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,r){this.bitmap.data[r]=n(this.bitmap.data[r]),this.bitmap.data[r+1]=n(this.bitmap.data[r+1]),this.bitmap.data[r+2]=n(this.bitmap.data[r+2])})),(0,a.isNodePattern)(e)&&e.call(this,null,this),this},posterize:function(t,e){return"number"!=typeof t?a.throwError.call(this,"n must be numbers",e):(t<2&&(t=2),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,r,n){this.bitmap.data[n]=Math.floor(this.bitmap.data[n]/255*(t-1))/(t-1)*255,this.bitmap.data[n+1]=Math.floor(this.bitmap.data[n+1]/255*(t-1))/(t-1)*255,this.bitmap.data[n+2]=Math.floor(this.bitmap.data[n+2]/255*(t-1))/(t-1)*255})),(0,a.isNodePattern)(e)&&e.call(this,null,this),this)},greyscale:u,grayscale:u,opacity:function(t,e){return"number"!=typeof t?a.throwError.call(this,"f must be a number",e):t<0||t>1?a.throwError.call(this,"f must be a number from 0 to 1",e):(this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,r,n){var i=this.bitmap.data[n+3]*t;this.bitmap.data[n+3]=i})),(0,a.isNodePattern)(e)&&e.call(this,null,this),this)},sepia:function(t){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,r){var n=this.bitmap.data[r],i=this.bitmap.data[r+1],o=this.bitmap.data[r+2];o=.272*(n=.393*n+.769*i+.189*o)+.534*(i=.349*n+.686*i+.168*o)+.131*o,this.bitmap.data[r]=n<255?n:255,this.bitmap.data[r+1]=i<255?i:255,this.bitmap.data[r+2]=o<255?o:255})),(0,a.isNodePattern)(t)&&t.call(this,null,this),this},fade:function(t,e){return"number"!=typeof t?a.throwError.call(this,"f must be a number",e):t<0||t>1?a.throwError.call(this,"f must be a number from 0 to 1",e):(this.opacity(1-t),(0,a.isNodePattern)(e)&&e.call(this,null,this),this)},convolution:function(t,e,r){"function"==typeof e&&void 0===r&&(r=e,e=null),e||(e=this.constructor.EDGE_EXTEND);var n,i,o,s,c,u,l,p,f,h,d=Buffer.from(this.bitmap.data),m=t.length,v=t[0].length,y=Math.floor(m/2),b=Math.floor(v/2),g=-y,w=-b;return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(r,a,m){s=0,o=0,i=0;for(var v=g;v<=y;v++)for(var x=w;x<=b;x++)p=r+x,f=a+v,n=t[v+y][x+b],-1===(h=this.getPixelIndex(p,f,e))?(l=0,u=0,c=0):(c=this.bitmap.data[h+0],u=this.bitmap.data[h+1],l=this.bitmap.data[h+2]),i+=n*c,o+=n*u,s+=n*l;i<0&&(i=0),o<0&&(o=0),s<0&&(s=0),i>255&&(i=255),o>255&&(o=255),s>255&&(s=255),d[m+0]=i,d[m+1]=o,d[m+2]=s})),this.bitmap.data=d,(0,a.isNodePattern)(r)&&r.call(this,null,this),this},opaque:function(t){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,r){this.bitmap.data[r+3]=255})),(0,a.isNodePattern)(t)&&t.call(this,null,this),this},pixelate:function(t,e,r,n,i,o){if("function"==typeof e)o=e,i=null,n=null,r=null,e=null;else{if("number"!=typeof t)return a.throwError.call(this,"size must be a number",o);if(c(e)&&"number"!=typeof e)return a.throwError.call(this,"x must be a number",o);if(c(r)&&"number"!=typeof r)return a.throwError.call(this,"y must be a number",o);if(c(n)&&"number"!=typeof n)return a.throwError.call(this,"w must be a number",o);if(c(i)&&"number"!=typeof i)return a.throwError.call(this,"h must be a number",o)}var u=[[1/16,2/16,1/16],[2/16,.25,2/16],[1/16,2/16,1/16]];e=e||0,r=r||0,n=c(n)?n:this.bitmap.width-e,i=c(i)?i:this.bitmap.height-r;var l=this.cloneQuiet();return this.scanQuiet(e,r,n,i,(function(e,r,n){e=t*Math.floor(e/t),r=t*Math.floor(r/t);var i=s(l,u,e,r);this.bitmap.data[n]=i[0],this.bitmap.data[n+1]=i[1],this.bitmap.data[n+2]=i[2]})),(0,a.isNodePattern)(o)&&o.call(this,null,this),this},convolute:function(t,e,r,n,i,o){if(!Array.isArray(t))return a.throwError.call(this,"the kernel must be an array",o);if("function"==typeof e)o=e,e=null,r=null,n=null,i=null;else{if(c(e)&&"number"!=typeof e)return a.throwError.call(this,"x must be a number",o);if(c(r)&&"number"!=typeof r)return a.throwError.call(this,"y must be a number",o);if(c(n)&&"number"!=typeof n)return a.throwError.call(this,"w must be a number",o);if(c(i)&&"number"!=typeof i)return a.throwError.call(this,"h must be a number",o)}var u=(t.length-1)/2;e=c(e)?e:u,r=c(r)?r:u,n=c(n)?n:this.bitmap.width-e,i=c(i)?i:this.bitmap.height-r;var l=this.cloneQuiet();return this.scanQuiet(e,r,n,i,(function(e,r,n){var i=s(l,t,e,r);this.bitmap.data[n]=this.constructor.limit255(i[0]),this.bitmap.data[n+1]=this.constructor.limit255(i[1]),this.bitmap.data[n+2]=this.constructor.limit255(i[2])})),(0,a.isNodePattern)(o)&&o.call(this,null,this),this},color:p,colour:p}},t.exports=e.default},1953:t=>{"use strict";t.exports=TypeError},2014:t=>{function e(t,e,r,n,i,o){this.global=i,e=e||0,r=r||t.byteLength-e,this.arrayBuffer=t.slice(e,e+r),this.view=new i.DataView(this.arrayBuffer,0,this.arrayBuffer.byteLength),this.setBigEndian(n),this.offset=0,this.parentOffset=(o||0)+e}e.prototype={setBigEndian:function(t){this.littleEndian=!t},nextUInt8:function(){var t=this.view.getUint8(this.offset);return this.offset+=1,t},nextInt8:function(){var t=this.view.getInt8(this.offset);return this.offset+=1,t},nextUInt16:function(){var t=this.view.getUint16(this.offset,this.littleEndian);return this.offset+=2,t},nextUInt32:function(){var t=this.view.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},nextInt16:function(){var t=this.view.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},nextInt32:function(){var t=this.view.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},nextFloat:function(){var t=this.view.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},nextDouble:function(){var t=this.view.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},nextBuffer:function(t){var e=this.arrayBuffer.slice(this.offset,this.offset+t);return this.offset+=t,e},remainingLength:function(){return this.arrayBuffer.byteLength-this.offset},nextString:function(t){var e=this.arrayBuffer.slice(this.offset,this.offset+t);return e=String.fromCharCode.apply(null,new this.global.Uint8Array(e)),this.offset+=t,e},mark:function(){var t=this;return{openWithOffset:function(r){return r=(r||0)+this.offset,new e(t.arrayBuffer,r,t.arrayBuffer.byteLength-r,!t.littleEndian,t.global,t.parentOffset)},offset:this.offset,getParentOffset:function(){return t.parentOffset}}},offsetFrom:function(t){return this.parentOffset+this.offset-(t.offset+t.getParentOffset())},skip:function(t){this.offset+=t},branch:function(t,r){return r="number"==typeof r?r:this.arrayBuffer.byteLength-(this.offset+t),new e(this.arrayBuffer,this.offset+t,r,!this.littleEndian,this.global,this.parentOffset)}},t.exports=e},2203:t=>{"use strict";t.exports=require("stream")},2280:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(53949),o=Object.prototype.hasOwnProperty,a=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),c=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r},u=1024;t.exports={arrayToObject:c,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],i=0;i<e.length;++i)for(var o=e[i],s=o.obj[o.prop],c=Object.keys(s),u=0;u<c.length;++u){var l=c[u],p=s[l];"object"===n(p)&&null!==p&&-1===r.indexOf(p)&&(e.push({obj:s,prop:l}),r.push(p))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(a(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(t,e,r,o,a){if(0===t.length)return t;var c=t;if("symbol"===n(t)?c=Symbol.prototype.toString.call(t):"string"!=typeof t&&(c=String(t)),"iso-8859-1"===r)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var l="",p=0;p<c.length;p+=u){for(var f=c.length>=u?c.slice(p,p+u):c,h=[],d=0;d<f.length;++d){var m=f.charCodeAt(d);45===m||46===m||95===m||126===m||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||a===i.RFC1738&&(40===m||41===m)?h[h.length]=f.charAt(d):m<128?h[h.length]=s[m]:m<2048?h[h.length]=s[192|m>>6]+s[128|63&m]:m<55296||m>=57344?h[h.length]=s[224|m>>12]+s[128|m>>6&63]+s[128|63&m]:(d+=1,m=65536+((1023&m)<<10|1023&f.charCodeAt(d)),h[h.length]=s[240|m>>18]+s[128|m>>12&63]+s[128|m>>6&63]+s[128|63&m])}l+=h.join("")}return l},isBuffer:function(t){return!(!t||"object"!==n(t)||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(a(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,i){if(!r)return e;if("object"!==n(r)){if(a(e))e.push(r);else{if(!e||"object"!==n(e))return[e,r];(i&&(i.plainObjects||i.allowPrototypes)||!o.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!==n(e))return[e].concat(r);var s=e;return a(e)&&!a(r)&&(s=c(e,i)),a(e)&&a(r)?(r.forEach((function(r,a){if(o.call(e,a)){var s=e[a];s&&"object"===n(s)&&r&&"object"===n(r)?e[a]=t(s,r,i):e.push(r)}else e[a]=r})),e):Object.keys(r).reduce((function(e,n){var a=r[n];return o.call(e,n)?e[n]=t(e[n],a,i):e[n]=a,e}),s)}}},2564:(t,e,r)=>{"use strict";var n=r(42613).ok,i=r(43106),o=r(39023),a=r(20181).kMaxLength;function s(t){if(!(this instanceof s))return new s(t);t&&t.chunkSize<i.Z_MIN_CHUNK&&(t.chunkSize=i.Z_MIN_CHUNK),i.Inflate.call(this,t),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,t&&null!=t.maxLength&&(this._maxLength=t.maxLength)}function c(t,e){e&&process.nextTick(e),t._handle&&(t._handle.close(),t._handle=null)}function u(t,e){return function(t,e){if("string"==typeof e&&(e=Buffer.from(e)),!(e instanceof Buffer))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return null==r&&(r=i.Z_FINISH),t._processChunk(e,r)}(new s(e),t)}s.prototype._processChunk=function(t,e,r){if("function"==typeof r)return i.Inflate._processChunk.call(this,t,e,r);var o,s=this,u=t&&t.length,l=this._chunkSize-this._offset,p=this._maxLength,f=0,h=[],d=0;function m(t,e){if(!s._hadError){var r=l-e;if(n(r>=0,"have should not go down"),r>0){var i=s._buffer.slice(s._offset,s._offset+r);if(s._offset+=r,i.length>p&&(i=i.slice(0,p)),h.push(i),d+=i.length,0==(p-=i.length))return!1}return(0===e||s._offset>=s._chunkSize)&&(l=s._chunkSize,s._offset=0,s._buffer=Buffer.allocUnsafe(s._chunkSize)),0===e&&(f+=u-t,u=t,!0)}}this.on("error",(function(t){o=t})),n(this._handle,"zlib binding closed");do{var v=this._handle.writeSync(e,t,f,u,this._buffer,this._offset,l);v=v||this._writeState}while(!this._hadError&&m(v[0],v[1]));if(this._hadError)throw o;if(d>=a)throw c(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+a.toString(16)+" bytes");var y=Buffer.concat(h,d);return c(this),y},o.inherits(s,i.Inflate),t.exports=e=u,e.Inflate=s,e.createInflate=function(t){return new s(t)},e.inflateSync=u},2739:t=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(r=function(){return!!t})()}function n(t){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var o={};function a(t,a,s){function c(t,e,r){return"string"==typeof a?a:a(t,e,r)}s||(s=Error);var u=function(t){function o(t,i,a){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,i,o){return i=n(i),function(t,r){if(r&&("object"==e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,r()?Reflect.construct(i,o||[],n(t).constructor):i.apply(t,o))}(this,o,[c(t,i,a)])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(o,t),a=o,Object.defineProperty(a,"prototype",{writable:!1}),a;var a}(s);u.prototype.name=s.name,u.prototype.code=t,o[t]=u}function s(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}a("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(t,r,n){var i,o,a,c,u;if("string"==typeof r&&(o="not ",r.substr(0,4)===o)?(i="must not be",r=r.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))a="The ".concat(t," ").concat(i," ").concat(s(r,"type"));else{var l=("number"!=typeof u&&(u=0),u+1>(c=t).length||-1===c.indexOf(".",u)?"argument":"property");a='The "'.concat(t,'" ').concat(l," ").concat(i," ").concat(s(r,"type"))}return a+". Received type ".concat(e(n))}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.F=o},3441:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var i=r(38299),o=r(13190),a=r(48657),s=r(13221),c=r(1953),u=i("%WeakMap%",!0),l=o("WeakMap.prototype.get",!0),p=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),h=o("WeakMap.prototype.delete",!0);t.exports=u?function(){var t,e,r={assert:function(t){if(!r.has(t))throw new c("Side channel does not contain "+a(t))},delete:function(r){if(u&&r&&("object"===n(r)||"function"==typeof r)){if(t)return h(t,r)}else if(s&&e)return e.delete(r);return!1},get:function(r){return u&&r&&("object"===n(r)||"function"==typeof r)&&t?l(t,r):e&&e.get(r)},has:function(r){return u&&r&&("object"===n(r)||"function"==typeof r)&&t?f(t,r):!!e&&e.has(r)},set:function(r,i){u&&r&&("object"===n(r)||"function"==typeof r)?(t||(t=new u),p(t,r,i)):s&&(e||(e=s()),e.set(r,i))}};return r}:s},3766:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function o(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function a(){a=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new M(n||[]);return o(a,"_invoke",{value:T(t,r,s)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var d="suspendedStart",m="suspendedYield",v="executing",y="completed",b={};function g(){}function w(){}function x(){}var _={};p(_,c,(function(){return this}));var E=Object.getPrototypeOf,k=E&&E(E(L([])));k&&k!==r&&i.call(k,c)&&(_=k);var S=x.prototype=g.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,s,c){var u=h(t[o],t,a);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==n(p)&&i.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(p).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function T(e,r,n){var i=d;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var c=P(s,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var u=h(e,r,n);if("normal"===u.type){if(i=n.done?y:m,u.arg===b)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=y,n.method="throw",n.arg=u.arg)}}}function P(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return w.prototype=x,o(S,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=p(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,p(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},O(j.prototype),p(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new j(f(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(S),p(S,l,"Generator"),p(S,c,(function(){return this})),p(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}Object.defineProperty(e,"__esModule",{value:!0}),e.JSRuntimeEngineServer=e.createEngine=void 0;var s=r(76513),c=r(90297),u=s.__importStar(r(16928)),l=r(28167);function p(t){return s.__awaiter(this,void 0,void 0,a().mark((function e(){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={inspectorHost:t.inspectorHost,logLevel:t.logLevel4Worker},n=new l.Worker(require("path").join(__dirname,"./worker.js")||u.resolve(__dirname,"../worker.js"),{workerData:r}),e.next=4,new Promise((function(t){n.once("message",t)}));case 4:return e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))}e.createEngine=p;var f=function(){return t=function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.createEngineOptions=r,this.logger=n,this.proxy2engine=new c.RpcSocket("proxy2engine",(0,c.createPortFromWebSocket)(e),this.onEngineMessage.bind(this),this.logger),this.createEngineOptions=r,this.mutex=new c.StringMutex(new SharedArrayBuffer(c.MAX_SHARED_ARRAY_BUFFER_SIZE))},(e=[{key:"onInspectorCreated",value:function(t){this.onInspectorCreatedCallback=t}},{key:"onWorkerMessage",value:function(t){return s.__awaiter(this,void 0,void 0,a().mark((function e(){var r,n,i,o,s,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.logger.info("[Proxy] onWorkerMessage ".concat(JSON.stringify(t))),r=this.proxy2engine,e.t0=t.type,e.next="FetchSync"===e.t0?5:"ForwardMessageAsync"===e.t0?6:"ForwardCallSync"===e.t0?8:"InspectorCreated"===e.t0?14:"ForwardImportScriptsSync"===e.t0?17:23;break;case 5:return e.abrupt("break",23);case 6:return r.sendMessage("MessageAsync",t.payload,!1),e.abrupt("break",23);case 8:return n=t,e.next=11,r.sendMessage("CallSync",n.payload,!0);case 11:return i=e.sent,this.mutex.writeMemory(JSON.stringify(i)),e.abrupt("return",i);case 14:return o=t,"function"==typeof this.onInspectorCreatedCallback&&this.onInspectorCreatedCallback(o.payload.remoteWorkerInspectorUrl),e.abrupt("break",23);case 17:return s=t,e.next=20,r.sendMessage("ImportScriptsSync",s.payload,!0);case 20:return c=e.sent,this.mutex.writeMemory(JSON.stringify(c)),e.abrupt("return",c);case 23:case"end":return e.stop()}}),e,this)})))}},{key:"onEngineMessage",value:function(t){return s.__awaiter(this,void 0,void 0,a().mark((function e(){var r,n,i,o,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.info("[Proxy] onEngineMessage ".concat(JSON.stringify(t))),e.next=3,this.getProxy2Worker();case 3:r=e.sent,e.t0=t.type,e.next="PreloadScript"===e.t0?7:"CreateEngine"===e.t0?10:"EvaluateScript"===e.t0?14:"EvaluateScript2GroupVariable"===e.t0?18:"Destroy"===e.t0?22:24;break;case 7:return n=t,r.sendMessage("PreloadScript",n.payload,!1),e.abrupt("break",24);case 10:return i=t,e.next=13,r.sendMessage("InitializeJSRuntime",{arrayBuffer:{memory:this.mutex.memory.sharedArrayBuffer,mutex:this.mutex.mutex.sharedArrayBuffer},id:i.payload.id,name:i.payload.name,stopAtEntry:!1},!0);case 13:case 17:case 21:return e.abrupt("return",e.sent);case 14:return o=t,e.next=17,this.proxy2worker.sendMessage("EvaluateScript",{code:o.payload.code,engineId:o.payload.engineId,scriptUrl:o.payload.scriptUrl},!0);case 18:return s=t,e.next=21,this.proxy2worker.sendMessage("EvaluateScript2GroupVariable",{code:s.payload.code,engineId:s.payload.engineId,scriptUrl:s.payload.scriptUrl},!0);case 22:return this.engine.terminate(),e.abrupt("break",24);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"destroy",value:function(){this.engine&&this.engine.terminate()}},{key:"getProxy2Worker",value:function(){return s.__awaiter(this,void 0,void 0,a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.proxy2worker){t.next=6;break}return t.next=3,p(this.createEngineOptions);case 3:this.engine=t.sent,this.logger.info("create worker finish"),this.proxy2worker=new c.RpcSocket("proxy2worker",(0,c.createPortFromWorkerPort)(this.engine),this.onWorkerMessage.bind(this),this.logger);case 6:return t.abrupt("return",this.proxy2worker);case 7:case"end":return t.stop()}}),t,this)})))}}])&&i(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.JSRuntimeEngineServer=f},3791:(t,e,r)=>{var n=r(9430);t.exports=function(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},3908:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(35236);function i(t,e){var r=(t%=360)*Math.PI/180,n=Math.cos(r),i=Math.sin(r),o=this.bitmap.width,a=this.bitmap.height;if(!0===e||"string"==typeof e){(o=Math.ceil(Math.abs(this.bitmap.width*n)+Math.abs(this.bitmap.height*i))+1)%2!=0&&o++,(a=Math.ceil(Math.abs(this.bitmap.width*i)+Math.abs(this.bitmap.height*n))+1)%2!=0&&a++;var s=this.cloneQuiet();this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,r){this.bitmap.data.writeUInt32BE(this._background,r)}));var c=Math.max(o,a,this.bitmap.width,this.bitmap.height);this.resize(c,c,e),this.blit(s,this.bitmap.width/2-s.bitmap.width/2,this.bitmap.height/2-s.bitmap.height/2)}var u=this.bitmap.width,l=this.bitmap.height,p=Buffer.alloc(this.bitmap.data.length);function f(t,e){return function(r,n){return{x:r+t,y:n+e}}}for(var h=f(-u/2,-l/2),d=f(u/2+.5,l/2+.5),m=1;m<=l;m++)for(var v=1;v<=u;v++){var y=h(v,m),b=d(n*y.x-i*y.y,n*y.y+i*y.x),g=u*(m-1)+v-1<<2;if(b.x>=0&&b.x<u&&b.y>=0&&b.y<l){var w=u*(0|b.y)+b.x<<2,x=this.bitmap.data.readUInt32BE(w);p.writeUInt32BE(x,g)}else p.writeUInt32BE(this._background,g)}if(this.bitmap.data=p,!0===e||"string"==typeof e){var _=u/2-o/2,E=l/2-a/2;this.crop(_,E,o,a)}}e.default=function(){return{rotate:function(t,e,r){return null==e&&(e=!0),"function"==typeof e&&void 0===r&&(r=e,e=!0),"number"!=typeof t?n.throwError.call(this,"deg must be a number",r):"boolean"!=typeof e&&"string"!=typeof e?n.throwError.call(this,"mode must be a boolean or a string",r):(i.call(this,t,e,r),(0,n.isNodePattern)(r)&&r.call(this,null,this),this)}}},t.exports=e.default},3990:(t,e,r)=>{"use strict";var n=r(16074),i=r(24820),o=i.Gif,a=i.GifError,s=r(86124).GifCodec,c=r(68051).GifFrame,u=r(49248);t.exports={BitmapImage:n,Gif:o,GifCodec:s,GifFrame:c,GifUtil:u,GifError:a}},4387:t=>{!function(){"use strict";var e=Array.apply(null,new Array(256)).map((function(t,e){return"[38;5;"+e+"m"})),r=Array.apply(null,new Array(256)).map((function(t,e){return"[48;5;"+e+"m"})),n=t.exports.fg={codes:e,standard:e.slice(0,8),bright:e.slice(8,16),rgb:e.slice(16,232),grayscale:e.slice(232,256),getRgb:function(t,e,r){return n.rgb[36*t+6*e+r]}},i=t.exports.bg={codes:r,standard:r.slice(0,8),bright:r.slice(8,16),rgb:r.slice(16,232),grayscale:r.slice(232,256),getRgb:function(t,e,r){return i.rgb[36*t+6*e+r]}};t.exports.reset=""}()},4834:t=>{function e(t,e){if(this.pos=0,this.buffer=t,this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=this.buffer.toString("utf-8",0,this.pos+=2),"BM"!=this.flag)throw new Error("Invalid BMP File");this.parseHeader(),this.parseRGBA()}e.prototype.parseHeader=function(){if(this.fileSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.reserved=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.offset=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.headerSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.width=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.height=this.buffer.readInt32LE(this.pos),this.pos+=4,this.planes=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.bitPP=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.compress=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.rawSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.hr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.vr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.colors=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.importantColors=this.buffer.readUInt32LE(this.pos),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++);this.palette[e]={red:i,green:n,blue:r,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},e.prototype.parseRGBA=function(){var t="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Buffer(e),this[t]()},e.prototype.bit1=function(){var t=Math.ceil(this.width/8),e=t%4,r=this.height>=0?this.height-1:-this.height;for(r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<t;i++)for(var o=this.buffer.readUInt8(this.pos++),a=n*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var c=this.palette[o>>7-s&1];this.data[a+4*s]=0,this.data[a+4*s+1]=c.blue,this.data[a+4*s+2]=c.green,this.data[a+4*s+3]=c.red}0!=e&&(this.pos+=4-e)}},e.prototype.bit4=function(){if(2==this.compress){var t=function(t){var r=this.palette[t];this.data[e]=0,this.data[e+1]=r.blue,this.data[e+2]=r.green,this.data[e+3]=r.red,e+=4};this.data.fill(255);for(var e=0,r=this.bottom_up?this.height-1:0,n=!1;e<this.data.length;){var i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++);if(0==i){if(0==o){this.bottom_up?r--:r++,e=r*this.width*4,n=!1;continue}if(1==o)break;if(2==o){var a=this.buffer.readUInt8(this.pos++),s=this.buffer.readUInt8(this.pos++);this.bottom_up?r-=s:r+=s,e+=s*this.width*4+4*a}else{for(var c=this.buffer.readUInt8(this.pos++),u=0;u<o;u++)t.call(this,n?15&c:(240&c)>>4),1&u&&u+1<o&&(c=this.buffer.readUInt8(this.pos++)),n=!n;1==(o+1>>1&1)&&this.pos++}}else for(u=0;u<i;u++)t.call(this,n?15&o:(240&o)>>4),n=!n}}else{var l=Math.ceil(this.width/2),p=l%4;for(s=this.height-1;s>=0;s--){var f=this.bottom_up?s:this.height-1-s;for(a=0;a<l;a++){o=this.buffer.readUInt8(this.pos++),e=f*this.width*4+2*a*4;var h=o>>4,d=15&o,m=this.palette[h];if(this.data[e]=0,this.data[e+1]=m.blue,this.data[e+2]=m.green,this.data[e+3]=m.red,2*a+1>=this.width)break;m=this.palette[d],this.data[e+4]=0,this.data[e+4+1]=m.blue,this.data[e+4+2]=m.green,this.data[e+4+3]=m.red}0!=p&&(this.pos+=4-p)}}},e.prototype.bit8=function(){if(1==this.compress){var t=function(t){var r=this.palette[t];this.data[e]=0,this.data[e+1]=r.blue,this.data[e+2]=r.green,this.data[e+3]=r.red,e+=4};this.data.fill(255);for(var e=0,r=this.bottom_up?this.height-1:0;e<this.data.length;){var n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++);if(0==n){if(0==i){this.bottom_up?r--:r++,e=r*this.width*4;continue}if(1==i)break;if(2==i){var o=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++);this.bottom_up?r-=a:r+=a,e+=a*this.width*4+4*o}else{for(var s=0;s<i;s++){var c=this.buffer.readUInt8(this.pos++);t.call(this,c)}!0&i&&this.pos++}}else for(s=0;s<n;s++)t.call(this,i)}}else{var u=this.width%4;for(a=this.height-1;a>=0;a--){var l=this.bottom_up?a:this.height-1-a;for(o=0;o<this.width;o++)if(i=this.buffer.readUInt8(this.pos++),e=l*this.width*4+4*o,i<this.palette.length){var p=this.palette[i];this.data[e]=0,this.data[e+1]=p.blue,this.data[e+2]=p.green,this.data[e+3]=p.red}else this.data[e]=0,this.data[e+1]=255,this.data[e+2]=255,this.data[e+3]=255;0!=u&&(this.pos+=4-u)}}},e.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var o=this.buffer.readUInt16LE(this.pos);this.pos+=2;var a=(o&e)/e*255|0,s=(o>>5&e)/e*255|0,c=(o>>10&e)/e*255|0,u=o>>15?255:0,l=n*this.width*4+4*i;this.data[l]=u,this.data[l+1]=a,this.data[l+2]=s,this.data[l+3]=c}this.pos+=t}},e.prototype.bit16=function(){var t=this.width%2*2;this.maskRed=31744,this.maskGreen=992,this.maskBlue=31,this.mask0=0,3==this.compress&&(this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4);for(var e=[0,0,0],r=0;r<16;r++)this.maskRed>>r&1&&e[0]++,this.maskGreen>>r&1&&e[1]++,this.maskBlue>>r&1&&e[2]++;e[1]+=e[0],e[2]+=e[1],e[0]=8-e[0],e[1]-=8,e[2]-=8;for(var n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,o=0;o<this.width;o++){var a=this.buffer.readUInt16LE(this.pos);this.pos+=2;var s=(a&this.maskBlue)<<e[0],c=(a&this.maskGreen)>>e[1],u=(a&this.maskRed)>>e[2],l=i*this.width*4+4*o;this.data[l]=0,this.data[l+1]=s,this.data[l+2]=c,this.data[l+3]=u}this.pos+=t}},e.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),a=e*this.width*4+4*r;this.data[a]=0,this.data[a+1]=n,this.data[a+2]=i,this.data[a+3]=o}this.pos+=this.width%4}},e.prototype.bit32=function(){if(3==this.compress){this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4;for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++),s=e*this.width*4+4*r;this.data[s]=n,this.data[s+1]=i,this.data[s+2]=o,this.data[s+3]=a}}else for(t=this.height-1;t>=0;t--)for(e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++)i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),s=e*this.width*4+4*r,this.data[s]=n,this.data[s+1]=i,this.data[s+2]=o,this.data[s+3]=a},e.prototype.getData=function(){return this.data},t.exports=function(t){return new e(t)}},4872:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function a(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.AnsiStringType=e.StringType=e.BufferType=e.Uint8ArrayType=e.IgnoreType=e.Float80_LE=e.Float80_BE=e.Float64_LE=e.Float64_BE=e.Float32_LE=e.Float32_BE=e.Float16_LE=e.Float16_BE=e.INT64_BE=e.UINT64_BE=e.INT64_LE=e.UINT64_LE=e.INT32_LE=e.INT32_BE=e.INT24_BE=e.INT24_LE=e.INT16_LE=e.INT16_BE=e.INT8=e.UINT32_BE=e.UINT32_LE=e.UINT24_BE=e.UINT24_LE=e.UINT16_BE=e.UINT16_LE=e.UINT8=void 0;var c=r(66773);function u(t){return new DataView(t.buffer,t.byteOffset)}e.UINT8={len:1,get:function(t,e){return u(t).getUint8(e)},put:function(t,e,r){return u(t).setUint8(e,r),e+1}},e.UINT16_LE={len:2,get:function(t,e){return u(t).getUint16(e,!0)},put:function(t,e,r){return u(t).setUint16(e,r,!0),e+2}},e.UINT16_BE={len:2,get:function(t,e){return u(t).getUint16(e)},put:function(t,e,r){return u(t).setUint16(e,r),e+2}},e.UINT24_LE={len:3,get:function(t,e){var r=u(t);return r.getUint8(e)+(r.getUint16(e+1,!0)<<8)},put:function(t,e,r){var n=u(t);return n.setUint8(e,255&r),n.setUint16(e+1,r>>8,!0),e+3}},e.UINT24_BE={len:3,get:function(t,e){var r=u(t);return(r.getUint16(e)<<8)+r.getUint8(e+2)},put:function(t,e,r){var n=u(t);return n.setUint16(e,r>>8),n.setUint8(e+2,255&r),e+3}},e.UINT32_LE={len:4,get:function(t,e){return u(t).getUint32(e,!0)},put:function(t,e,r){return u(t).setUint32(e,r,!0),e+4}},e.UINT32_BE={len:4,get:function(t,e){return u(t).getUint32(e)},put:function(t,e,r){return u(t).setUint32(e,r),e+4}},e.INT8={len:1,get:function(t,e){return u(t).getInt8(e)},put:function(t,e,r){return u(t).setInt8(e,r),e+1}},e.INT16_BE={len:2,get:function(t,e){return u(t).getInt16(e)},put:function(t,e,r){return u(t).setInt16(e,r),e+2}},e.INT16_LE={len:2,get:function(t,e){return u(t).getInt16(e,!0)},put:function(t,e,r){return u(t).setInt16(e,r,!0),e+2}},e.INT24_LE={len:3,get:function(t,r){var n=e.UINT24_LE.get(t,r);return n>8388607?n-16777216:n},put:function(t,e,r){var n=u(t);return n.setUint8(e,255&r),n.setUint16(e+1,r>>8,!0),e+3}},e.INT24_BE={len:3,get:function(t,r){var n=e.UINT24_BE.get(t,r);return n>8388607?n-16777216:n},put:function(t,e,r){var n=u(t);return n.setUint16(e,r>>8),n.setUint8(e+2,255&r),e+3}},e.INT32_BE={len:4,get:function(t,e){return u(t).getInt32(e)},put:function(t,e,r){return u(t).setInt32(e,r),e+4}},e.INT32_LE={len:4,get:function(t,e){return u(t).getInt32(e,!0)},put:function(t,e,r){return u(t).setInt32(e,r,!0),e+4}},e.UINT64_LE={len:8,get:function(t,e){return u(t).getBigUint64(e,!0)},put:function(t,e,r){return u(t).setBigUint64(e,r,!0),e+8}},e.INT64_LE={len:8,get:function(t,e){return u(t).getBigInt64(e,!0)},put:function(t,e,r){return u(t).setBigInt64(e,r,!0),e+8}},e.UINT64_BE={len:8,get:function(t,e){return u(t).getBigUint64(e)},put:function(t,e,r){return u(t).setBigUint64(e,r),e+8}},e.INT64_BE={len:8,get:function(t,e){return u(t).getBigInt64(e)},put:function(t,e,r){return u(t).setBigInt64(e,r),e+8}},e.Float16_BE={len:2,get:function(t,e){return c.read(t,e,!1,10,this.len)},put:function(t,e,r){return c.write(t,r,e,!1,10,this.len),e+this.len}},e.Float16_LE={len:2,get:function(t,e){return c.read(t,e,!0,10,this.len)},put:function(t,e,r){return c.write(t,r,e,!0,10,this.len),e+this.len}},e.Float32_BE={len:4,get:function(t,e){return u(t).getFloat32(e)},put:function(t,e,r){return u(t).setFloat32(e,r),e+4}},e.Float32_LE={len:4,get:function(t,e){return u(t).getFloat32(e,!0)},put:function(t,e,r){return u(t).setFloat32(e,r,!0),e+4}},e.Float64_BE={len:8,get:function(t,e){return u(t).getFloat64(e)},put:function(t,e,r){return u(t).setFloat64(e,r),e+8}},e.Float64_LE={len:8,get:function(t,e){return u(t).getFloat64(e,!0)},put:function(t,e,r){return u(t).setFloat64(e,r,!0),e+8}},e.Float80_BE={len:10,get:function(t,e){return c.read(t,e,!1,63,this.len)},put:function(t,e,r){return c.write(t,r,e,!1,63,this.len),e+this.len}},e.Float80_LE={len:10,get:function(t,e){return c.read(t,e,!0,63,this.len)},put:function(t,e,r){return c.write(t,r,e,!0,63,this.len),e+this.len}};var l=function(){return a((function t(e){i(this,t),this.len=e}),[{key:"get",value:function(t,e){}}])}();e.IgnoreType=l;var p=function(){return a((function t(e){i(this,t),this.len=e}),[{key:"get",value:function(t,e){return t.subarray(e,e+this.len)}}])}();e.Uint8ArrayType=p;var f=function(){return a((function t(e){i(this,t),this.len=e}),[{key:"get",value:function(t,e){return Buffer.from(t.subarray(e,e+this.len))}}])}();e.BufferType=f;var h=function(){return a((function t(e,r){i(this,t),this.len=e,this.encoding=r}),[{key:"get",value:function(t,e){return Buffer.from(t).toString(this.encoding,e,e+this.len)}}])}();e.StringType=h;var d=function(){function t(e){i(this,t),this.len=e}return a(t,[{key:"get",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.decode(e,r,r+this.len)}}],[{key:"decode",value:function(e,r,n){for(var i="",o=r;o<n;++o)i+=t.codePointToString(t.singleByteDecoder(e[o]));return i}},{key:"inRange",value:function(t,e,r){return e<=t&&t<=r}},{key:"codePointToString",value:function(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}},{key:"singleByteDecoder",value:function(e){if(t.inRange(e,0,127))return e;var r=t.windows1252[e-128];if(null===r)throw Error("invaliding encoding");return r}}])}();e.AnsiStringType=d,d.windows1252=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},4913:function(t,e,r){(function(){var e,n,i={}.hasOwnProperty;n=r(66522),e=r(13523),t.exports=function(t){function r(t,n,i,o,a,s){if(r.__super__.constructor.call(this,t),null==n)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==i)throw new Error("Missing DTD attribute name. "+this.debugInfo(n));if(!o)throw new Error("Missing DTD attribute type. "+this.debugInfo(n));if(!a)throw new Error("Missing DTD attribute default. "+this.debugInfo(n));if(0!==a.indexOf("#")&&(a="#"+a),!a.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(n));if(s&&!a.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(n));this.elementName=this.stringify.name(n),this.type=e.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(o),s&&(this.defaultValue=this.stringify.dtdAttDefault(s)),this.defaultValueType=a}return function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,t),r.prototype.toString=function(t){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(t))},r}(n)}).call(this)},4974:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(){i=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,o=Object.create(i.prototype),s=new M(n||[]);return a(o,"_invoke",{value:T(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var d="suspendedStart",m="suspendedYield",v="executing",y="completed",b={};function g(){}function w(){}function x(){}var _={};p(_,c,(function(){return this}));var E=Object.getPrototypeOf,k=E&&E(E(L([])));k&&k!==r&&o.call(k,c)&&(_=k);var S=x.prototype=g.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(i,a,s,c){var u=h(t[i],t,a);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==n(p)&&o.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(p).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,c)}))}c(u.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=d;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if