UNPKG

pdfmake

Version:

Client/server side PDF printing in pure JavaScript

2 lines 1.4 MB
/*! pdfmake v0.2.18, @license MIT, @link http://pdfmake.org */ !function webpackUniversalModuleDefinition(r,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var i=n();for(var o in i)("object"==typeof exports?exports:r)[o]=i[o]}}("undefined"!=typeof self?self:this,(function(){return function(){var r={84490:function(r,n){"use strict";n.OP=0,n.CL=1,n.CP=2,n.QU=3,n.GL=4,n.NS=5,n.EX=6,n.SY=7,n.IS=8,n.PR=9,n.PO=10,n.NU=11,n.AL=12,n.HL=13,n.ID=14,n.IN=15,n.HY=16,n.BA=17,n.BB=18,n.B2=19,n.ZW=20,n.CM=21,n.WJ=22,n.H2=23,n.H3=24,n.JL=25,n.JV=26,n.JT=27,n.RI=28,n.EB=29,n.EM=30,n.ZWJ=31,n.CB=32,n.AI=33,n.BK=34,n.CJ=35,n.CR=36,n.LF=37,n.NL=38,n.SA=39,n.SG=40,n.SP=41,n.XX=42},5303:function(r,n){"use strict";n.DI_BRK=0,n.IN_BRK=1,n.CI_BRK=2,n.CP_BRK=3,n.PR_BRK=4,n.pairTable=[[4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4,4,4,4,4],[0,4,4,1,1,4,4,4,4,1,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,4,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[4,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,1],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,1,0,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,1,1,1,1,0,0,4,2,4,1,1,1,1,1,0,1,1,1,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,0,1,4,4,4,0,0,1,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,0,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,4,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,1,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,1,1,1,1,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,1,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,1,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,1,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,0,4,4,4,0,0,0,0,0,0,0,0,0,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0]]},62420:function(r,n,i){"use strict";i(18756),n.EncodeStream=i(95291),n.DecodeStream=i(69591),n.Array=i(68332),n.LazyArray=i(11610),n.Bitfield=i(60480),n.Boolean=i(75041),n.Buffer=i(56711),n.Enum=i(36316),n.Optional=i(64241),n.Reserved=i(13549),n.String=i(52676),n.Struct=i(88152),n.VersionedStruct=i(99757);var o=i(18128),u=i(56128),p=i(9324);Object.assign(n,o,u,p)},68332:function(r,n,i){"use strict";function _createForOfIteratorHelperLoose(r,n){var i="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(i)return(i=i.call(r)).next.bind(i);if(Array.isArray(r)||(i=function _unsupportedIterableToArray(r,n){if(r){if("string"==typeof r)return _arrayLikeToArray(r,n);var i={}.toString.call(r).slice(8,-1);return"Object"===i&&r.constructor&&(i=r.constructor.name),"Map"===i||"Set"===i?Array.from(r):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(r,n):void 0}}(r))||n&&r&&"number"==typeof r.length){i&&(r=i);var o=0;return function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _arrayLikeToArray(r,n){(null==n||n>r.length)&&(n=r.length);for(var i=0,o=Array(n);i<n;i++)o[i]=r[i];return o}i(65292),i(73844),i(69330),i(11765),i(81755),i(20731),i(24863),i(14032),i(61726),i(57114),i(58281),i(94712);var o=i(56128).Number,u=i(18128),p=function(){function ArrayT(r,n,i){void 0===i&&(i="count"),this.type=r,this.length=n,this.lengthType=i}var r=ArrayT.prototype;return r.decode=function decode(r,n){var i,p=r.pos,g=[],y=n;if(null!=this.length&&(i=u.resolveLength(this.length,r,n)),this.length instanceof o&&(Object.defineProperties(g,{parent:{value:n},_startOffset:{value:p},_currentOffset:{value:0,writable:!0},_length:{value:i}}),y=g),null==i||"bytes"===this.lengthType)for(var w=null!=i?r.pos+i:(null!=n?n._length:void 0)?n._startOffset+n._length:r.length;r.pos<w;)g.push(this.type.decode(r,y));else for(var _=0,x=i;_<x;_++)g.push(this.type.decode(r,y));return g},r.size=function size(r,n){if(!r)return this.type.size(null,n)*u.resolveLength(this.length,null,n);var size=0;this.length instanceof o&&(size+=this.length.size(),n={parent:n});for(var i,p=_createForOfIteratorHelperLoose(r);!(i=p()).done;){var g=i.value;size+=this.type.size(g,n)}return size},r.encode=function encode(r,n,i){var u=i;this.length instanceof o&&((u={pointers:[],startOffset:r.pos,parent:i}).pointerOffset=r.pos+this.size(n,u),this.length.encode(r,n.length));for(var p,g=_createForOfIteratorHelperLoose(n);!(p=g()).done;){var y=p.value;this.type.encode(r,y,u)}if(this.length instanceof o)for(var w=0;w<u.pointers.length;){var _=u.pointers[w++];_.type.encode(r,_.val)}},ArrayT}();r.exports=p},60480:function(r,n,i){"use strict";i(74516);var o=function(){function Bitfield(r,n){void 0===n&&(n=[]),this.type=r,this.flags=n}var r=Bitfield.prototype;return r.decode=function decode(r){for(var n=this.type.decode(r),i={},o=0;o<this.flags.length;o++){var u=this.flags[o];null!=u&&(i[u]=!!(n&1<<o))}return i},r.size=function size(){return this.type.size()},r.encode=function encode(r,n){for(var i=0,o=0;o<this.flags.length;o++){var u=this.flags[o];null!=u&&n[u]&&(i|=1<<o)}return this.type.encode(r,i)},Bitfield}();r.exports=o},75041:function(r){"use strict";var n=function(){function BooleanT(r){this.type=r}var r=BooleanT.prototype;return r.decode=function decode(r,n){return!!this.type.decode(r,n)},r.size=function size(r,n){return this.type.size(r,n)},r.encode=function encode(r,n,i){return this.type.encode(r,+n,i)},BooleanT}();r.exports=n},56711:function(r,n,i){"use strict";var o=i(18128),u=i(56128).Number,p=function(){function BufferT(r){this.length=r}var r=BufferT.prototype;return r.decode=function decode(r,n){var i=o.resolveLength(this.length,r,n);return r.readBuffer(i)},r.size=function size(r,n){return r?r.length:o.resolveLength(this.length,null,n)},r.encode=function encode(r,n,i){return this.length instanceof u&&this.length.encode(r,n.length),r.writeBuffer(n)},BufferT}();r.exports=p},69591:function(r,n,i){"use strict";var o,u=i(14598).Buffer;i(20731),i(14032),i(61726),i(57114),i(46467);try{o=i(54171)}catch(r){}var p=function(){function DecodeStream(r){this.buffer=r,this.pos=0,this.length=this.buffer.length}var r=DecodeStream.prototype;return r.readString=function readString(r,n){switch(void 0===n&&(n="ascii"),n){case"utf16le":case"ucs2":case"utf8":case"ascii":return this.buffer.toString(n,this.pos,this.pos+=r);case"utf16be":for(var i=u.from(this.readBuffer(r)),p=0,g=i.length-1;p<g;p+=2){var y=i[p];i[p]=i[p+1],i[p+1]=y}return i.toString("utf16le");default:if(i=this.readBuffer(r),o)try{return o.decode(i,n)}catch(r){}return i}},r.readBuffer=function readBuffer(r){return this.buffer.slice(this.pos,this.pos+=r)},r.readUInt24BE=function readUInt24BE(){return(this.readUInt16BE()<<8)+this.readUInt8()},r.readUInt24LE=function readUInt24LE(){return this.readUInt16LE()+(this.readUInt8()<<16)},r.readInt24BE=function readInt24BE(){return(this.readInt16BE()<<8)+this.readUInt8()},r.readInt24LE=function readInt24LE(){return this.readUInt16LE()+(this.readInt8()<<16)},DecodeStream}();p.TYPES={UInt8:1,UInt16:2,UInt24:3,UInt32:4,Int8:1,Int16:2,Int24:3,Int32:4,Float:4,Double:8};var g=function _loop(r){if("read"===r.slice(0,4)){var n=p.TYPES[r.replace(/read|[BL]E/g,"")];p.prototype[r]=function(){var i=this.buffer[r](this.pos);return this.pos+=n,i}}};for(var y in u.prototype)g(y);r.exports=p},95291:function(r,n,i){"use strict";var o,u=i(14598).Buffer;function _setPrototypeOf(r,n){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},_setPrototypeOf(r,n)}i(41584),i(20731),i(61726),i(46467);var p=i(9760),g=i(69591);try{o=i(54171)}catch(r){}var y=function(r){function EncodeStream(n){var i;return void 0===n&&(n=65536),(i=r.apply(this,arguments)||this).buffer=u.alloc(n),i.bufferOffset=0,i.pos=0,i}!function _inheritsLoose(r,n){r.prototype=Object.create(n.prototype),r.prototype.constructor=r,_setPrototypeOf(r,n)}(EncodeStream,r);var n=EncodeStream.prototype;return n._read=function _read(){},n.ensure=function ensure(r){if(this.bufferOffset+r>this.buffer.length)return this.flush()},n.flush=function flush(){if(this.bufferOffset>0)return this.push(u.from(this.buffer.slice(0,this.bufferOffset))),this.bufferOffset=0},n.writeBuffer=function writeBuffer(r){return this.flush(),this.push(r),this.pos+=r.length},n.writeString=function writeString(r,n){switch(void 0===n&&(n="ascii"),n){case"utf16le":case"ucs2":case"utf8":case"ascii":return this.writeBuffer(u.from(r,n));case"utf16be":for(var i=u.from(r,"utf16le"),p=0,g=i.length-1;p<g;p+=2){var y=i[p];i[p]=i[p+1],i[p+1]=y}return this.writeBuffer(i);default:if(o)return this.writeBuffer(o.encode(r,n));throw new Error("Install iconv-lite to enable additional string encodings.")}},n.writeUInt24BE=function writeUInt24BE(r){return this.ensure(3),this.buffer[this.bufferOffset++]=r>>>16&255,this.buffer[this.bufferOffset++]=r>>>8&255,this.buffer[this.bufferOffset++]=255&r,this.pos+=3},n.writeUInt24LE=function writeUInt24LE(r){return this.ensure(3),this.buffer[this.bufferOffset++]=255&r,this.buffer[this.bufferOffset++]=r>>>8&255,this.buffer[this.bufferOffset++]=r>>>16&255,this.pos+=3},n.writeInt24BE=function writeInt24BE(r){return r>=0?this.writeUInt24BE(r):this.writeUInt24BE(r+16777215+1)},n.writeInt24LE=function writeInt24LE(r){return r>=0?this.writeUInt24LE(r):this.writeUInt24LE(r+16777215+1)},n.fill=function fill(r,n){if(n<this.buffer.length)return this.ensure(n),this.buffer.fill(r,this.bufferOffset,this.bufferOffset+n),this.bufferOffset+=n,this.pos+=n;var i=u.alloc(n);return i.fill(r),this.writeBuffer(i)},n.end=function end(){return this.flush(),this.push(null)},EncodeStream}(p.Readable),w=function _loop(r){if("write"===r.slice(0,5)){var n=+g.TYPES[r.replace(/write|[BL]E/g,"")];y.prototype[r]=function(i){return this.ensure(n),this.buffer[r](i,this.bufferOffset),this.bufferOffset+=n,this.pos+=n}}};for(var _ in u.prototype)w(_);r.exports=y},36316:function(r){"use strict";var n=function(){function Enum(r,n){void 0===n&&(n=[]),this.type=r,this.options=n}var r=Enum.prototype;return r.decode=function decode(r){var n=this.type.decode(r);return this.options[n]||n},r.size=function size(){return this.type.size()},r.encode=function encode(r,n){var i=this.options.indexOf(n);if(-1===i)throw new Error("Unknown option in enum: "+n);return this.type.encode(r,i)},Enum}();r.exports=n},11610:function(r,n,i){"use strict";function _setPrototypeOf(r,n){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},_setPrototypeOf(r,n)}i(14032),i(68067);var o=i(68332),u=i(56128).Number,p=i(18128),g=i(7187).inspect,y=function(r){function LazyArrayT(){return r.apply(this,arguments)||this}!function _inheritsLoose(r,n){r.prototype=Object.create(n.prototype),r.prototype.constructor=r,_setPrototypeOf(r,n)}(LazyArrayT,r);var n=LazyArrayT.prototype;return n.decode=function decode(r,n){var i=r.pos,o=p.resolveLength(this.length,r,n);this.length instanceof u&&(n={parent:n,_startOffset:i,_currentOffset:0,_length:o});var g=new w(this.type,o,r,n);return r.pos+=o*this.type.size(null,n),g},n.size=function size(n,i){return n instanceof w&&(n=n.toArray()),r.prototype.size.call(this,n,i)},n.encode=function encode(n,i,o){return i instanceof w&&(i=i.toArray()),r.prototype.encode.call(this,n,i,o)},LazyArrayT}(o),w=function(){function LazyArray(r,n,i,o){this.type=r,this.length=n,this.stream=i,this.ctx=o,this.base=this.stream.pos,this.items=[]}var r=LazyArray.prototype;return r.get=function get(r){if(!(r<0||r>=this.length)){if(null==this.items[r]){var n=this.stream.pos;this.stream.pos=this.base+this.type.size(null,this.ctx)*r,this.items[r]=this.type.decode(this.stream,this.ctx),this.stream.pos=n}return this.items[r]}},r.toArray=function toArray(){for(var r=[],n=0,i=this.length;n<i;n++)r.push(this.get(n));return r},r.inspect=function inspect(){return g(this.toArray())},LazyArray}();r.exports=y},56128:function(r,n,i){"use strict";function _setPrototypeOf(r,n){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},_setPrototypeOf(r,n)}var o=i(69591),u=function(){function NumberT(r,n){void 0===n&&(n="BE"),this.type=r,this.endian=n,this.fn=this.type,"8"!==this.type[this.type.length-1]&&(this.fn+=this.endian)}var r=NumberT.prototype;return r.size=function size(){return o.TYPES[this.type]},r.decode=function decode(r){return r["read"+this.fn]()},r.encode=function encode(r,n){return r["write"+this.fn](n)},NumberT}();n.Number=u,n.uint8=new u("UInt8"),n.uint16be=n.uint16=new u("UInt16","BE"),n.uint16le=new u("UInt16","LE"),n.uint24be=n.uint24=new u("UInt24","BE"),n.uint24le=new u("UInt24","LE"),n.uint32be=n.uint32=new u("UInt32","BE"),n.uint32le=new u("UInt32","LE"),n.int8=new u("Int8"),n.int16be=n.int16=new u("Int16","BE"),n.int16le=new u("Int16","LE"),n.int24be=n.int24=new u("Int24","BE"),n.int24le=new u("Int24","LE"),n.int32be=n.int32=new u("Int32","BE"),n.int32le=new u("Int32","LE"),n.floatbe=n.float=new u("Float","BE"),n.floatle=new u("Float","LE"),n.doublebe=n.double=new u("Double","BE"),n.doublele=new u("Double","LE");var p=function(r){function Fixed(n,i,o){var u;return void 0===o&&(o=n>>1),(u=r.call(this,"Int"+n,i)||this)._point=1<<o,u}!function _inheritsLoose(r,n){r.prototype=Object.create(n.prototype),r.prototype.constructor=r,_setPrototypeOf(r,n)}(Fixed,r);var n=Fixed.prototype;return n.decode=function decode(n){return r.prototype.decode.call(this,n)/this._point},n.encode=function encode(n,i){return r.prototype.encode.call(this,n,i*this._point|0)},Fixed}(u);n.Fixed=p,n.fixed16be=n.fixed16=new p(16,"BE"),n.fixed16le=new p(16,"LE"),n.fixed32be=n.fixed32=new p(32,"BE"),n.fixed32le=new p(32,"LE")},64241:function(r){"use strict";var n=function(){function Optional(r,n){void 0===n&&(n=!0),this.type=r,this.condition=n}var r=Optional.prototype;return r.decode=function decode(r,n){var i=this.condition;if("function"==typeof i&&(i=i.call(n,n)),i)return this.type.decode(r,n)},r.size=function size(r,n){var i=this.condition;return"function"==typeof i&&(i=i.call(n,n)),i?this.type.size(r,n):0},r.encode=function encode(r,n,i){var o=this.condition;if("function"==typeof o&&(o=o.call(i,i)),o)return this.type.encode(r,n,i)},Optional}();r.exports=n},9324:function(r,n,i){"use strict";var o=i(18128),u=function(){function Pointer(r,n,i){if(void 0===i&&(i={}),this.offsetType=r,this.type=n,this.options=i,"void"===this.type&&(this.type=null),null==this.options.type&&(this.options.type="local"),null==this.options.allowNull&&(this.options.allowNull=!0),null==this.options.nullValue&&(this.options.nullValue=0),null==this.options.lazy&&(this.options.lazy=!1),this.options.relativeTo){if("function"!=typeof this.options.relativeTo)throw new Error("relativeTo option must be a function");this.relativeToGetter=i.relativeTo}}var r=Pointer.prototype;return r.decode=function decode(r,n){var i,u=this,p=this.offsetType.decode(r,n);if(p===this.options.nullValue&&this.options.allowNull)return null;switch(this.options.type){case"local":i=n._startOffset;break;case"immediate":i=r.pos-this.offsetType.size();break;case"parent":i=n.parent._startOffset;break;default:for(var g=n;g.parent;)g=g.parent;i=g._startOffset||0}this.options.relativeTo&&(i+=this.relativeToGetter(n));var y=p+i;if(null!=this.type){var w=null,_=function decodeValue(){if(null!=w)return w;var i=r.pos;return r.pos=y,w=u.type.decode(r,n),r.pos=i,w};return this.options.lazy?new o.PropertyDescriptor({get:_}):_()}return y},r.size=function size(r,n){var i=n;switch(this.options.type){case"local":case"immediate":break;case"parent":n=n.parent;break;default:for(;n.parent;)n=n.parent}var o=this.type;if(null==o){if(!(r instanceof p))throw new Error("Must be a VoidPointer");o=r.type,r=r.value}return r&&n&&(n.pointerSize+=o.size(r,i)),this.offsetType.size()},r.encode=function encode(r,n,i){var o,u=i;if(null!=n){switch(this.options.type){case"local":o=i.startOffset;break;case"immediate":o=r.pos+this.offsetType.size(n,u);break;case"parent":o=(i=i.parent).startOffset;break;default:for(o=0;i.parent;)i=i.parent}this.options.relativeTo&&(o+=this.relativeToGetter(u.val)),this.offsetType.encode(r,i.pointerOffset-o);var g=this.type;if(null==g){if(!(n instanceof p))throw new Error("Must be a VoidPointer");g=n.type,n=n.value}return i.pointers.push({type:g,val:n,parent:u}),i.pointerOffset+=g.size(n,u)}this.offsetType.encode(r,this.options.nullValue)},Pointer}(),p=function VoidPointer(r,n){this.type=r,this.value=n};n.Pointer=u,n.VoidPointer=p},13549:function(r,n,i){"use strict";i(41584);var o=i(18128),u=function(){function Reserved(r,n){void 0===n&&(n=1),this.type=r,this.count=n}var r=Reserved.prototype;return r.decode=function decode(r,n){r.pos+=this.size(null,n)},r.size=function size(r,n){var i=o.resolveLength(this.count,null,n);return this.type.size()*i},r.encode=function encode(r,n,i){return r.fill(0,this.size(n,i))},Reserved}();r.exports=u},52676:function(r,n,i){"use strict";var o=i(14598).Buffer,u=i(56128).Number,p=i(18128),g=function(){function StringT(r,n){void 0===n&&(n="ascii"),this.length=r,this.encoding=n}var r=StringT.prototype;return r.decode=function decode(r,n){var i,o;if(null!=this.length)i=p.resolveLength(this.length,r,n);else{var u;for(u=r.buffer,i=r.length,o=r.pos;o<i&&0!==u[o];)++o;i=o-r.pos}var g=this.encoding;"function"==typeof g&&(g=g.call(n,n)||"ascii");var y=r.readString(i,g);return null==this.length&&r.pos<r.length&&r.pos++,y},r.size=function size(r,n){if(!r)return p.resolveLength(this.length,null,n);var i=this.encoding;"function"==typeof i&&(i=i.call(null!=n?n.val:void 0,null!=n?n.val:void 0)||"ascii"),"utf16be"===i&&(i="utf16le");var size=o.byteLength(r,i);return this.length instanceof u&&(size+=this.length.size()),null==this.length&&size++,size},r.encode=function encode(r,n,i){var p=this.encoding;if("function"==typeof p&&(p=p.call(null!=i?i.val:void 0,null!=i?i.val:void 0)||"ascii"),this.length instanceof u&&this.length.encode(r,o.byteLength(n,p)),r.writeString(n,p),null==this.length)return r.writeUInt8(0)},StringT}();r.exports=g},88152:function(r,n,i){"use strict";var o=i(18128),u=function(){function Struct(r){void 0===r&&(r={}),this.fields=r}var r=Struct.prototype;return r.decode=function decode(r,n,i){void 0===i&&(i=0);var o=this._setup(r,n,i);return this._parseFields(r,o,this.fields),null!=this.process&&this.process.call(o,r),o},r._setup=function _setup(r,n,i){var o={};return Object.defineProperties(o,{parent:{value:n},_startOffset:{value:r.pos},_currentOffset:{value:0,writable:!0},_length:{value:i}}),o},r._parseFields=function _parseFields(r,n,i){for(var u in i){var p,g=i[u];void 0!==(p="function"==typeof g?g.call(n,n):g.decode(r,n))&&(p instanceof o.PropertyDescriptor?Object.defineProperty(n,u,p):n[u]=p),n._currentOffset=r.pos-n._startOffset}},r.size=function size(r,n,i){null==r&&(r={}),null==i&&(i=!0);var o={parent:n,val:r,pointerSize:0},size=0;for(var u in this.fields){var p=this.fields[u];null!=p.size&&(size+=p.size(r[u],o))}return i&&(size+=o.pointerSize),size},r.encode=function encode(r,n,i){var o;null!=this.preEncode&&this.preEncode.call(n,r);var u={pointers:[],startOffset:r.pos,parent:i,val:n,pointerSize:0};for(var p in u.pointerOffset=r.pos+this.size(n,u,!1),this.fields)null!=(o=this.fields[p]).encode&&o.encode(r,n[p],u);for(var g=0;g<u.pointers.length;){var y=u.pointers[g++];y.type.encode(r,y.val,y.parent)}},Struct}();r.exports=u},99757:function(r,n,i){"use strict";function _setPrototypeOf(r,n){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},_setPrototypeOf(r,n)}i(14032);var o=i(88152),u=function(r){function VersionedStruct(n,i){var o;return void 0===i&&(i={}),(o=r.call(this)||this).type=n,o.versions=i,"string"==typeof n&&(o.versionPath=n.split(".")),o}!function _inheritsLoose(r,n){r.prototype=Object.create(n.prototype),r.prototype.constructor=r,_setPrototypeOf(r,n)}(VersionedStruct,r);var n=VersionedStruct.prototype;return n.decode=function decode(r,n,i){void 0===i&&(i=0);var o=this._setup(r,n,i);"string"==typeof this.type?o.version=function getPath(r,n){return n.reduce((function(r,n){return r&&r[n]}),r)}(n,this.versionPath):o.version=this.type.decode(r),this.versions.header&&this._parseFields(r,o,this.versions.header);var u=this.versions[o.version];if(null==u)throw new Error("Unknown version "+o.version);return u instanceof VersionedStruct?u.decode(r,n):(this._parseFields(r,o,u),null!=this.process&&this.process.call(o,r),o)},n.size=function size(r,n,i){var o,u;if(void 0===i&&(i=!0),!r)throw new Error("Not a fixed size");var p={parent:n,val:r,pointerSize:0},size=0;if("string"!=typeof this.type&&(size+=this.type.size(r.version,p)),this.versions.header)for(o in this.versions.header)null!=(u=this.versions.header[o]).size&&(size+=u.size(r[o],p));var g=this.versions[r.version];if(null==g)throw new Error("Unknown version "+r.version);for(o in g)null!=(u=g[o]).size&&(size+=u.size(r[o],p));return i&&(size+=p.pointerSize),size},n.encode=function encode(r,n,i){var o,u;null!=this.preEncode&&this.preEncode.call(n,r);var p={pointers:[],startOffset:r.pos,parent:i,val:n,pointerSize:0};if(p.pointerOffset=r.pos+this.size(n,p,!1),"string"!=typeof this.type&&this.type.encode(r,n.version),this.versions.header)for(o in this.versions.header)null!=(u=this.versions.header[o]).encode&&u.encode(r,n[o],p);var g=this.versions[n.version];for(o in g)null!=(u=g[o]).encode&&u.encode(r,n[o],p);for(var y=0;y<p.pointers.length;){var w=p.pointers[y++];w.type.encode(r,w.val,w.parent)}},VersionedStruct}(o);r.exports=u},18128:function(r,n,i){"use strict";var o=i(56128).Number;n.resolveLength=function(r,n,i){var u;if("number"==typeof r?u=r:"function"==typeof r?u=r.call(i,i):i&&"string"==typeof r?u=i[r]:n&&r instanceof o&&(u=r.decode(n)),isNaN(u))throw new Error("Not a fixed size");return u};n.PropertyDescriptor=function PropertyDescriptor(r){for(var n in void 0===r&&(r={}),this.enumerable=!0,this.configurable=!0,r){var i=r[n];this[n]=i}}},14598:function(r,n,i){"use strict";function _defineProperties(r,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,_toPropertyKey(o.key),o)}}function _toPropertyKey(r){var n=function _toPrimitive(r,n){if("object"!=typeof r||!r)return r;var i=r[Symbol.toPrimitive];if(void 0!==i){var o=i.call(r,n||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(r)}(r,"string");return"symbol"==typeof n?n:n+""}function _setPrototypeOf(r,n){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},_setPrototypeOf(r,n)}i(65292),i(73844),i(5597),i(39081),i(68626),i(41584),i(58028),i(81755),i(20731),i(8953),i(7585),i(24863),i(7283),i(2876),i(14032),i(61726),i(57114),i(47458),i(46467),i(72095),i(56912),i(73663),i(29883),i(35471),i(21012),i(88997),i(97464),i(2857),i(94715),i(13624),i(91132),i(62514),i(24597),i(88042),i(4660),i(92451),i(44206),i(66288),i(13250),i(3858),i(84538),i(64793),i(74202),i(52529);var o=i(32504),u=i(89029),p="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=Buffer,n.SlowBuffer=function SlowBuffer(r){+r!=r&&(r=0);return Buffer.alloc(+r)},n.INSPECT_MAX_BYTES=50;var g=2147483647;function createBuffer(r){if(r>g)throw new RangeError('The value "'+r+'" is invalid for option "size"');var n=new Uint8Array(r);return Object.setPrototypeOf(n,Buffer.prototype),n}function Buffer(r,n,i){if("number"==typeof r){if("string"==typeof n)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(r)}return from(r,n,i)}function from(r,n,i){if("string"==typeof r)return function fromString(r,n){"string"==typeof n&&""!==n||(n="utf8");if(!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var i=0|byteLength(r,n),o=createBuffer(i),u=o.write(r,n);u!==i&&(o=o.slice(0,u));return o}(r,n);if(ArrayBuffer.isView(r))return function fromArrayView(r){if(isInstance(r,Uint8Array)){var n=new Uint8Array(r);return fromArrayBuffer(n.buffer,n.byteOffset,n.byteLength)}return fromArrayLike(r)}(r);if(null==r)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(isInstance(r,ArrayBuffer)||r&&isInstance(r.buffer,ArrayBuffer))return fromArrayBuffer(r,n,i);if("undefined"!=typeof SharedArrayBuffer&&(isInstance(r,SharedArrayBuffer)||r&&isInstance(r.buffer,SharedArrayBuffer)))return fromArrayBuffer(r,n,i);if("number"==typeof r)throw new TypeError('The "value" argument must not be of type number. Received type number');var o=r.valueOf&&r.valueOf();if(null!=o&&o!==r)return Buffer.from(o,n,i);var u=function fromObject(r){if(Buffer.isBuffer(r)){var n=0|checked(r.length),i=createBuffer(n);return 0===i.length||r.copy(i,0,0,n),i}if(void 0!==r.length)return"number"!=typeof r.length||numberIsNaN(r.length)?createBuffer(0):fromArrayLike(r);if("Buffer"===r.type&&Array.isArray(r.data))return fromArrayLike(r.data)}(r);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof r[Symbol.toPrimitive])return Buffer.from(r[Symbol.toPrimitive]("string"),n,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}function assertSize(r){if("number"!=typeof r)throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function allocUnsafe(r){return assertSize(r),createBuffer(r<0?0:0|checked(r))}function fromArrayLike(r){for(var n=r.length<0?0:0|checked(r.length),i=createBuffer(n),o=0;o<n;o+=1)i[o]=255&r[o];return i}function fromArrayBuffer(r,n,i){if(n<0||r.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<n+(i||0))throw new RangeError('"length" is outside of buffer bounds');var o;return o=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),Object.setPrototypeOf(o,Buffer.prototype),o}function checked(r){if(r>=g)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g.toString(16)+" bytes");return 0|r}function byteLength(r,n){if(Buffer.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||isInstance(r,ArrayBuffer))return r.byteLength;if("string"!=typeof r)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);var i=r.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===i)return 0;for(var u=!1;;)switch(n){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return utf8ToBytes(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return base64ToBytes(r).length;default:if(u)return o?-1:utf8ToBytes(r).length;n=(""+n).toLowerCase(),u=!0}}function slowToString(r,n,i){var o=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(n>>>=0))return"";for(r||(r="utf8");;)switch(r){case"hex":return hexSlice(this,n,i);case"utf8":case"utf-8":return utf8Slice(this,n,i);case"ascii":return asciiSlice(this,n,i);case"latin1":case"binary":return latin1Slice(this,n,i);case"base64":return base64Slice(this,n,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,n,i);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),o=!0}}function swap(r,n,i){var o=r[n];r[n]=r[i],r[i]=o}function bidirectionalIndexOf(r,n,i,o,u){if(0===r.length)return-1;if("string"==typeof i?(o=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),numberIsNaN(i=+i)&&(i=u?0:r.length-1),i<0&&(i=r.length+i),i>=r.length){if(u)return-1;i=r.length-1}else if(i<0){if(!u)return-1;i=0}if("string"==typeof n&&(n=Buffer.from(n,o)),Buffer.isBuffer(n))return 0===n.length?-1:arrayIndexOf(r,n,i,o,u);if("number"==typeof n)return n&=255,"function"==typeof Uint8Array.prototype.indexOf?u?Uint8Array.prototype.indexOf.call(r,n,i):Uint8Array.prototype.lastIndexOf.call(r,n,i):arrayIndexOf(r,[n],i,o,u);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(r,n,i,o,u){var p,g=1,y=r.length,w=n.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(r.length<2||n.length<2)return-1;g=2,y/=2,w/=2,i/=2}function read(r,n){return 1===g?r[n]:r.readUInt16BE(n*g)}if(u){var _=-1;for(p=i;p<y;p++)if(read(r,p)===read(n,-1===_?0:p-_)){if(-1===_&&(_=p),p-_+1===w)return _*g}else-1!==_&&(p-=p-_),_=-1}else for(i+w>y&&(i=y-w),p=i;p>=0;p--){for(var x=!0,P=0;P<w;P++)if(read(r,p+P)!==read(n,P)){x=!1;break}if(x)return p}return-1}function hexWrite(r,n,i,o){i=Number(i)||0;var u=r.length-i;o?(o=Number(o))>u&&(o=u):o=u;var p,g=n.length;for(o>g/2&&(o=g/2),p=0;p<o;++p){var y=parseInt(n.substr(2*p,2),16);if(numberIsNaN(y))return p;r[i+p]=y}return p}function utf8Write(r,n,i,o){return blitBuffer(utf8ToBytes(n,r.length-i),r,i,o)}function asciiWrite(r,n,i,o){return blitBuffer(function asciiToBytes(r){for(var n=[],i=0;i<r.length;++i)n.push(255&r.charCodeAt(i));return n}(n),r,i,o)}function base64Write(r,n,i,o){return blitBuffer(base64ToBytes(n),r,i,o)}function ucs2Write(r,n,i,o){return blitBuffer(function utf16leToBytes(r,n){for(var i,o,u,p=[],g=0;g<r.length&&!((n-=2)<0);++g)o=(i=r.charCodeAt(g))>>8,u=i%256,p.push(u),p.push(o);return p}(n,r.length-i),r,i,o)}function base64Slice(r,n,i){return 0===n&&i===r.length?o.fromByteArray(r):o.fromByteArray(r.slice(n,i))}function utf8Slice(r,n,i){i=Math.min(r.length,i);for(var o=[],u=n;u<i;){var p=r[u],g=null,w=p>239?4:p>223?3:p>191?2:1;if(u+w<=i){var _=void 0,x=void 0,P=void 0,k=void 0;switch(w){case 1:p<128&&(g=p);break;case 2:128==(192&(_=r[u+1]))&&(k=(31&p)<<6|63&_)>127&&(g=k);break;case 3:_=r[u+1],x=r[u+2],128==(192&_)&&128==(192&x)&&(k=(15&p)<<12|(63&_)<<6|63&x)>2047&&(k<55296||k>57343)&&(g=k);break;case 4:_=r[u+1],x=r[u+2],P=r[u+3],128==(192&_)&&128==(192&x)&&128==(192&P)&&(k=(15&p)<<18|(63&_)<<12|(63&x)<<6|63&P)>65535&&k<1114112&&(g=k)}}null===g?(g=65533,w=1):g>65535&&(g-=65536,o.push(g>>>10&1023|55296),g=56320|1023&g),o.push(g),u+=w}return function decodeCodePointsArray(r){var n=r.length;if(n<=y)return String.fromCharCode.apply(String,r);var i="",o=0;for(;o<n;)i+=String.fromCharCode.apply(String,r.slice(o,o+=y));return i}(o)}n.kMaxLength=g,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){try{var r=new Uint8Array(1),n={foo:function foo(){return 42}};return Object.setPrototypeOf(n,Uint8Array.prototype),Object.setPrototypeOf(r,n),42===r.foo()}catch(r){return!1}}(),!Buffer.TYPED_ARRAY_SUPPORT&&"undefined"!=typeof console&&console.error,Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function get(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function get(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(r,n,i){return from(r,n,i)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(r,n,i){return function alloc(r,n,i){return assertSize(r),r<=0?createBuffer(r):void 0!==n?"string"==typeof i?createBuffer(r).fill(n,i):createBuffer(r).fill(n):createBuffer(r)}(r,n,i)},Buffer.allocUnsafe=function(r){return allocUnsafe(r)},Buffer.allocUnsafeSlow=function(r){return allocUnsafe(r)},Buffer.isBuffer=function isBuffer(r){return null!=r&&!0===r._isBuffer&&r!==Buffer.prototype},Buffer.compare=function compare(r,n){if(isInstance(r,Uint8Array)&&(r=Buffer.from(r,r.offset,r.byteLength)),isInstance(n,Uint8Array)&&(n=Buffer.from(n,n.offset,n.byteLength)),!Buffer.isBuffer(r)||!Buffer.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===n)return 0;for(var i=r.length,o=n.length,u=0,p=Math.min(i,o);u<p;++u)if(r[u]!==n[u]){i=r[u],o=n[u];break}return i<o?-1:o<i?1:0},Buffer.isEncoding=function isEncoding(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function concat(r,n){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(0===r.length)return Buffer.alloc(0);var i;if(void 0===n)for(n=0,i=0;i<r.length;++i)n+=r[i].length;var o=Buffer.allocUnsafe(n),u=0;for(i=0;i<r.length;++i){var p=r[i];if(isInstance(p,Uint8Array))u+p.length>o.length?(Buffer.isBuffer(p)||(p=Buffer.from(p)),p.copy(o,u)):Uint8Array.prototype.set.call(o,p,u);else{if(!Buffer.isBuffer(p))throw new TypeError('"list" argument must be an Array of Buffers');p.copy(o,u)}u+=p.length}return o},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){var r=this.length;if(r%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<r;n+=2)swap(this,n,n+1);return this},Buffer.prototype.swap32=function swap32(){var r=this.length;if(r%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<r;n+=4)swap(this,n,n+3),swap(this,n+1,n+2);return this},Buffer.prototype.swap64=function swap64(){var r=this.length;if(r%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<r;n+=8)swap(this,n,n+7),swap(this,n+1,n+6),swap(this,n+2,n+5),swap(this,n+3,n+4);return this},Buffer.prototype.toString=function toString(){var r=this.length;return 0===r?"":0===arguments.length?utf8Slice(this,0,r):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(r){if(!Buffer.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r||0===Buffer.compare(this,r)},Buffer.prototype.inspect=function inspect(){var r="",i=n.INSPECT_MAX_BYTES;return r=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(r+=" ... "),"<Buffer "+r+">"},p&&(Buffer.prototype[p]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(r,n,i,o,u){if(isInstance(r,Uint8Array)&&(r=Buffer.from(r,r.offset,r.byteLength)),!Buffer.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(void 0===n&&(n=0),void 0===i&&(i=r?r.length:0),void 0===o&&(o=0),void 0===u&&(u=this.length),n<0||i>r.length||o<0||u>this.length)throw new RangeError("out of range index");if(o>=u&&n>=i)return 0;if(o>=u)return-1;if(n>=i)return 1;if(this===r)return 0;for(var p=(u>>>=0)-(o>>>=0),g=(i>>>=0)-(n>>>=0),y=Math.min(p,g),w=this.slice(o,u),_=r.slice(n,i),x=0;x<y;++x)if(w[x]!==_[x]){p=w[x],g=_[x];break}return p<g?-1:g<p?1:0},Buffer.prototype.includes=function includes(r,n,i){return-1!==this.indexOf(r,n,i)},Buffer.prototype.indexOf=function indexOf(r,n,i){return bidirectionalIndexOf(this,r,n,i,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(r,n,i){return bidirectionalIndexOf(this,r,n,i,!1)},Buffer.prototype.write=function write(r,n,i,o){if(void 0===n)o="utf8",i=this.length,n=0;else if(void 0===i&&"string"==typeof n)o=n,i=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n>>>=0,isFinite(i)?(i>>>=0,void 0===o&&(o="utf8")):(o=i,i=void 0)}var u=this.length-n;if((void 0===i||i>u)&&(i=u),r.length>0&&(i<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var p=!1;;)switch(o){case"hex":return hexWrite(this,r,n,i);case"utf8":case"utf-8":return utf8Write(this,r,n,i);case"ascii":case"latin1":case"binary":return asciiWrite(this,r,n,i);case"base64":return base64Write(this,r,n,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,r,n,i);default:if(p)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),p=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var y=4096;function asciiSlice(r,n,i){var o="";i=Math.min(r.length,i);for(var u=n;u<i;++u)o+=String.fromCharCode(127&r[u]);return o}function latin1Slice(r,n,i){var o="";i=Math.min(r.length,i);for(var u=n;u<i;++u)o+=String.fromCharCode(r[u]);return o}function hexSlice(r,n,i){var o=r.length;(!n||n<0)&&(n=0),(!i||i<0||i>o)&&(i=o);for(var u="",p=n;p<i;++p)u+=x[r[p]];return u}function utf16leSlice(r,n,i){for(var o=r.slice(n,i),u="",p=0;p<o.length-1;p+=2)u+=String.fromCharCode(o[p]+256*o[p+1]);return u}function checkOffset(r,n,i){if(r%1!=0||r<0)throw new RangeError("offset is not uint");if(r+n>i)throw new RangeError("Trying to access beyond buffer length")}function checkInt(r,n,i,o,u,p){if(!Buffer.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>u||n<p)throw new RangeError('"value" argument is out of bounds');if(i+o>r.length)throw new RangeError("Index out of range")}function wrtBigUInt64LE(r,n,i,o,u){checkIntBI(n,o,u,r,i,7);var p=Number(n&BigInt(4294967295));r[i++]=p,p>>=8,r[i++]=p,p>>=8,r[i++]=p,p>>=8,r[i++]=p;var g=Number(n>>BigInt(32)&BigInt(4294967295));return r[i++]=g,g>>=8,r[i++]=g,g>>=8,r[i++]=g,g>>=8,r[i++]=g,i}function wrtBigUInt64BE(r,n,i,o,u){checkIntBI(n,o,u,r,i,7);var p=Number(n&BigInt(4294967295));r[i+7]=p,p>>=8,r[i+6]=p,p>>=8,r[i+5]=p,p>>=8,r[i+4]=p;var g=Number(n>>BigInt(32)&BigInt(4294967295));return r[i+3]=g,g>>=8,r[i+2]=g,g>>=8,r[i+1]=g,g>>=8,r[i]=g,i+8}function checkIEEE754(r,n,i,o,u,p){if(i+o>r.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function writeFloat(r,n,i,o,p){return n=+n,i>>>=0,p||checkIEEE754(r,0,i,4),u.write(r,n,i,o,23,4),i+4}function writeDouble(r,n,i,o,p){return n=+n,i>>>=0,p||checkIEEE754(r,0,i,8),u.write(r,n,i,o,52,8),i+8}Buffer.prototype.slice=function slice(r,n){var i=this.length;(r=~~r)<0?(r+=i)<0&&(r=0):r>i&&(r=i),(n=void 0===n?i:~~n)<0?(n+=i)<0&&(n=0):n>i&&(n=i),n<r&&(n=r);var o=this.subarray(r,n);return Object.setPrototypeOf(o,Buffer.prototype),o},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(r,n,i){r>>>=0,n>>>=0,i||checkOffset(r,n,this.length);for(var o=this[r],u=1,p=0;++p<n&&(u*=256);)o+=this[r+p]*u;return o},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(r,n,i){r>>>=0,n>>>=0,i||checkOffset(r,n,this.length);for(var o=this[r+--n],u=1;n>0&&(u*=256);)o+=this[r+--n]*u;return o},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(r,n){return r>>>=0,n||checkOffset(r,1,this.length),this[r]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(r,n){return r>>>=0,n||checkOffset(r,2,this.length),this[r]|this[r+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(r,n){return r>>>=0,n||checkOffset(r,2,this.length),this[r]<<8|this[r+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(r,n){return r>>>=0,n||checkOffset(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(r,n){return r>>>=0,n||checkOffset(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(r){validateNumber(r>>>=0,"offset");var n=this[r],i=this[r+7];void 0!==n&&void 0!==i||boundsError(r,this.length-8);var o=n+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,24),u=this[++r]+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+i*Math.pow(2,24);return BigInt(o)+(BigInt(u)<<BigInt(32))})),Buffer.prototype.readBigUInt64BE=defineBigIntMethod((function readBigUInt64BE(r){validateNumber(r>>>=0,"offset");var n=this[r],i=this[r+7];void 0!==n&&void 0!==i||boundsError(r,this.length-8);var o=n*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+this[++r],u=this[++r]*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+i;return(BigInt(o)<<BigInt(32))+BigInt(u)})),Buffer.prototype.readIntLE=function readIntLE(r,n,i){r>>>=0,n>>>=0,i||checkOffset(r,n,this.length);for(var o=this[r],u=1,p=0;++p<n&&(u*=256);)o+=this[r+p]*u;return o>=(u*=128)&&(o-=Math.pow(2,8*n)),o},Buffer.prototype.readIntBE=function readIntBE(r,n,i){r>>>=0,n>>>=0,i||checkOffset(r,n,this.length);for(var o=n,u=1,p=this[r+--o];o>0&&(u*=256);)p+=this[r+--o]*u;return p>=(u*=128)&&(p-=Math.pow(2,8*n)),p},Buffer.prototype.readInt8=function readInt8(r,n){return r>>>=0,n||checkOffset(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},Buffer.prototype.readInt16LE=function readInt16LE(r,n){r>>>=0,n||checkOffset(r,2,this.length);var i=this[r]|this[r+1]<<8;return 32768&i?4294901760|i:i},Buffer.prototype.readInt16BE=function readInt16BE(r,n){r>>>=0,n||checkOffset(r,2,this.length);var i=this[r+1]|this[r]<<8;return 32768&i?4294901760|i:i},Buffer.prototype.readInt32LE=function readInt32LE(r,n){return r>>>=0,n||checkOffset(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(r,n){return r>>>=0,n||checkOffset(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(r){validateNumber(r>>>=0,"offset");var n=this[r],i=this[r+7];void 0!==n&&void 0!==i||boundsError(r,this.length-8);var o=this[r+4]+this[r+5]*Math.pow(2,8)+this[r+6]*Math.pow(2,16)+(i<<24);return(BigInt(o)<<BigInt(32))+BigInt(n+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,24))})),Buffer.prototype.readBigInt64BE=defineBigIntMethod((function readBigInt64BE(r){validateNumber(r>>>=0,"offset");var n=this[r],i=this[r+7];void 0!==n&&void 0!==i||boundsError(r,this.length-8);var o=(n<<24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+this[++r];return(BigInt(o)<<BigInt(32))+BigInt(this[++r]*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+i)})),Buffer.prototype.readFloatLE=function readFloatLE(r,n){return r>>>=0,n||checkOffset(r,4,this.length),u.read(this,r,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(r,n){return r>>>=0,n||checkOffset(r,4,this.length),u.read(this,r,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(r,n){return r>>>=0,n||checkOffset(r,8,this.length),u.read(this,r,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(r,n){return r>>>=0,n||checkOffset(r,8,this.length),u.read(this,r,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(r,n,i,o){(r=+r,n>>>=0,i>>>=0,o)||checkInt(this,r,n,i,Math.pow(2,8*i)-1,0);var u=1,p=0;for(this[n]=255&r;++p<i&&(u*=256);)this[n+p]=r/u&255;return n+i},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(r,n,i,o){(r=+r,n>>>=0,i>>>=0,o)||checkInt(this,r,n,i,Math.pow(2,8*i)-1,0);var u=i-1,p=1;for(this[n+u]=255&r;--u>=0&&(p*=256);)this[n+u]=r/p&255;return n+i},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(r,n,i){return r=+r,n>>>=0,i||checkInt(this,r,n,1,255,0),this[n]=255&r,n+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(r,n,i){return r=+r,n>>>=0,i||checkInt(this,r,n,2,65535,0),this[n]=255&r,this[n+1]=r>>>8,n+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(r,n,i){return r=+r,n>>>=0,i||checkInt(this,r,n,2,65535,0),this[n]=r>>>8,this[n+1]=255&r,n+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(r,n,i){return r=+r,n>>>=0,i||checkInt(this,r,n,4,4294967295,0),this[n+3]=r>>>24,this[n+2]=r>>>16,this[n+1]=r>>>8,this[n]=255&r,n+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(r,n,i){return r=+r,n>>>=0,i||checkInt(this,r,n,4,4294967295,0),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=255&r,n+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(r,n){return void 0===n&&(n=0),wrtBigUInt64LE(this,r,n,BigInt(0),BigInt("0xffffffffffffffff"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(r,n){return void 0===n&&(n=0),wrtBigUInt64BE(this,r,n,BigInt(0),BigInt("0xffffffffffffffff"))})),Buffer.prototype.writeIntLE=function writeIntLE(r,n,i,o){if(r=+r,n>>>=0,!o){var u=Math.pow(2,8*i-1);checkInt(this,r,n,i,u-1,-u)}var p=0,g=1,y=0;for(this[n]=255&r;++p<i&&(g*=256);)r<0&&0===y&&0!==this[n+p-1]&&(y=1),this[n+p]=(r/g|0)-y&255;return n+i},Buffer.prototype.writeIntBE=function writeIntBE(r,n,i,o){if(r=+r,n>>>=0,!o){var u=Math.pow(2,8*i-1);checkInt(this,r,n,i,u-1,-u)}var p=i-1,g=1,y=0;for(this[n+p]=255&r;--p>=0&&(g*=256);)r<0&&0===y&&0!==this[n+p+1]&&(y=1),this[n+p]=(r/g|0)-y&255;return n+i},Buffer.prototype.writeInt8=function writeInt8(r,n,i){return r=+r,n>>>=0,i||checkInt(this,r,n,1,127,-128),r<0&&(r=255+r+1),this[n]=255&r,n+1},Buffer.prototype.writeInt16LE=function writeInt16LE(r,n,i){return r=+r,n>>>=0,i||checkInt(this,r,n,2,32767,-32768),this[n]=255&r,this[n+1]=r>>>8,n+2},Buffer.prototype.writeInt16BE=function writeInt16BE(r,n,i){return r=+r,n>>>=0,i||checkInt(this,r,n,2,32767,-32768),this[n]=r>>>8,this[n+1]=255&r,n+2},Buffer.prototype.writeInt32LE=function writeInt32LE(r,n,i){return r=+r,n>>>=0,i||checkInt(this,r,n,4,2147483647,-2147483648),this[n]=255&r,this[n+1]=r>>>8,this[n+2]=r>>>16,this[n+3]=r>>>24,n+4},Buffer.prototype.writeInt32BE=function writeInt32BE(r,n,i){return r=+r,n>>>=0,i||checkInt(this,r,n,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=255&r,n+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(r,n){return void 0===n&&(n=0),wrtBigUInt64LE(this,r,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(r,n){return void 0===n&&(n=0),wrtBigUInt64BE(this,r,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(r,n,i){return writeFloat(this,r,n,!0,i)},Buffer.prototype.writeFloatBE=function writeFloatBE(r,n,i){return writeFloat(this,r,n,!1,i)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(r,n,i){return writeDouble(this,r,n,!0,i)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(r,n,i){return writeDouble(this,r,n,!1,i)},Buffer.prototype.copy=function copy(r,n,i,o){if(!Buffer.isBuffer(r))throw new TypeError("argument should be a Buffer");if(i||(i=0),o||0===o||(o=this.length),n>=r.length&&(n=r.length),n||(n=0),o>0&&o<i&&(o=i),o===i)return 0;if(0===r.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),r.length-n<o-i&&(o=r.length-n+i);var u=o-i;return this===r&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(n,i,o):Uint8Array.prototype.set.call(r,this.subarray(i,o),n),u},Buffer.prototype.fill=function fill(r,n,i,o){if("string"==typeof r){if("string"==typeof n?(o=n,n=0,i=this.length):"string"==typeof i&&(o=i,i=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!Buffer.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(1===r.length){var u=r.charCodeAt(0);("utf8"===o&&u<128||"latin1"===o)&&(r=u)}}else"number"==typeof r?r&=255:"boolean"==typeof r&&(r=Number(r));if(n<0||this.length<n||this.length<i)throw new RangeError("Out of range index");if(i<=n)return this;var p;if(n>>>=0,i=void 0===i?this.length:i>>>0,r||(r=0),"number"==typeof r)for(p=n;p<i;++p)this[p]=r;else{var g=Buffer.isBuffer(r)?r:Buffer.from(r,o),y=g.length;if(0===y)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(p=0;p<i-n;++p)this[p+n]=g[p%y]}return this};var w={};function E(r,n,i){w[r]=function(i){function NodeError(){var o;return o=i.call(this)||this,Object.defineProperty(o,"message",{value:n.apply(o,arguments),writable:!0,configurable:!0}),o.name=o.name+" ["+r+"]",o.stack,delete o.name,o}return function _inheritsLoose(r,n){r.prototype=Object.create(n.prototype),r.prototype.constructor=r,_setPrototypeOf(r,n)}(NodeError,i),NodeError.prototype.toString=function toString(){return this.name+" ["+r+"]: "+this.message},function _createClass(r,n,i){return n&&_defineProperties(r.prototype,n),i&&_defineProperties(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}(NodeError,[{key:"code",get:function get(){return r},set:function set(r){Object.defineProperty(this,"co