Home
last modified time | relevance | path

Searched defs:_captureStackTrace (Results 1 - 3 of 3) sorted by relevance

/interface/sdk-js/build-tools/dts_parser/package/
H A DJS_API_OPTIMIZE_PLUGIN.js1 /*! version:1.0.0 */(()=>{var __webpack_modules__={93062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvFormatterStream=void 0;const n=r(12781),i=r(49947);class a extends n.Transform{constructor(e){super({writableObjectMode:e.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=e,this.rowFormatter=new i.RowFormatter(e),this.hasWrittenBOM=!e.writeBOM}transform(e){return this.rowFormatter.rowTransform=e,this}_transform(e,t,r){let n=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(e,((e,t)=>e?(n=!0,r(e)):(t&&t.forEach((e=>{this.push(Buffer.from(e,"utf8"))})),n=!0,r())))}catch(e){if(n)throw e;r(e)}}_flush(e){this.rowFormatter.finish(((t,r)=>t?e(t):(r&&r.forEach((e=>{this.push(Buffer.from(e,"utf8"))})),e())))}}t.CsvFormatterStream=a},26763:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormatterOptions=void 0;t.FormatterOptions=class{constructor(e={}){var t;this.objectMode=!0,this.delimiter=",",this.rowDelimiter="\n",this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\ufeff",this.alwaysWriteHeaders=!1,Object.assign(this,e||{}),void 0===(null==e?void 0:e.quoteHeaders)&&(this.quoteHeaders=this.quoteColumns),!0===(null==e?void 0:e.quote)?this.quote='"':!1===(null==e?void 0:e.quote)&&(this.quote=""),"string"!=typeof(null==e?void 0:e.escape)&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&(null===(t=e.writeHeaders)||void 0===t||t),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},92607:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=void 0;const i=n(r(48094)),a=n(r(59722)),o=n(r(91658));t.FieldFormatter=class{constructor(e){this._headers=null,this.formatterOptions=e,null!==e.headers&&(this.headers=e.headers),this.REPLACE_REGEXP=new RegExp(e.quote,"g");const t=`[${e.delimiter}${o.default(e.rowDelimiter)}|\r|\n]`;this.ESCAPE_REGEXP=new RegExp(t)}set headers(e){this._headers=e}shouldQuote(e,t){const r=t?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return i.default(r)?r:Array.isArray(r)?r[e]:null!==this._headers&&r[this._headers[e]]}format(e,t,r){const n=`${a.default(e)?"":e}`.replace(/\0/g,""),{formatterOptions:i}=this;if(""!==i.quote){if(-1!==n.indexOf(i.quote))return this.quoteField(n.replace(this.REPLACE_REGEXP,i.escapedQuote))}return-1!==n.search(this.ESCAPE_REGEXP)||this.shouldQuote(t,r)?this.quoteField(n):n}quoteField(e){const{quote:t}=this.formatterOptions;return`${t}${e}${t}`}}},17181:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowFormatter=void 0;const i=n(r(98423)),a=n(r(72307)),o=r(92607),s=r(24692);class c{constructor(e){this.rowCount=0,this.formatterOptions=e,this.fieldFormatter=new o.FieldFormatter(e),this.headers=e.headers,this.shouldWriteHeaders=e.shouldWriteHeaders,this.hasWrittenHeaders=!1,null!==this.headers&&(this.fieldFormatter.headers=this.headers),e.transform&&(this.rowTransform=e.transform)}static isRowHashArray(e){return!!Array.isArray(e)&&(Array.isArray(e[0])&&2===e[0].length)}static isRowArray(e){return Array.isArray(e)&&!this.isRowHashArray(e)}static gatherHeaders(e){return c.isRowHashArray(e)?e.map((e=>e[0])):Array.isArray(e)?e:Object.keys(e)}static createTransform(e){return s.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(e){return r(e)}return r(null,n)}:(t,r)=>{e(t,r)}}set rowTransform(e){if(!i.default(e))throw new TypeError("The transform should be a function");this._rowTransform=c.createTransform(e)}format(e,t){this.callTransformer(e,((r,n)=>{if(r)return t(r);if(!e)return t(null);const i=[];if(n){const{shouldFormatColumns:e,headers:t}=this.checkHeaders(n);if(this.shouldWriteHeaders&&t&&!this.hasWrittenHeaders&&(i.push(this.formatColumns(t,!0)),this.hasWrittenHeaders=!0),e){const e=this.gatherColumns(n);i.push(this.formatColumns(e,!1))}}return t(null,i)}))}finish(e){const t=[];if(this.formatterOptions.alwaysWriteHeaders&&0===this.rowCount){if(!this.headers)return e(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));t.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&t.push(this.formatterOptions.rowDelimiter),e(null,t)}checkHeaders(e){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const t=c.gatherHeaders(e);return this.headers=t,this.fieldFormatter.headers=t,this.shouldWriteHeaders?{shouldFormatColumns:!a.default(t,e),headers:t}:{shouldFormatColumns:!0,headers:null}}gatherColumns(e){if(null===this.headers)throw new Error("Headers is currently null");return Array.isArray(e)?c.isRowHashArray(e)?this.headers.map(((t,r)=>{const n=e[r];return n?n[1]:""})):c.isRowArray(e)&&!this.shouldWriteHeaders?e:this.headers.map(((t,r)=>e[r])):this.headers.map((t=>e[t]))}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}formatColumns(e,t){const r=e.map(((e,r)=>this.fieldFormatter.format(e,r,t))).join(this.formatterOptions.delimiter),{rowCount:n}=this;return this.rowCount+=1,n?[this.formatterOptions.rowDelimiter,r].join(""):r}}t.RowFormatter=c},49947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=t.RowFormatter=void 0;var n=r(17181);Object.defineProperty(t,"RowFormatter",{enumerable:!0,get:function(){return n.RowFormatter}});var i=r(92607);Object.defineProperty(t,"FieldFormatter",{enumerable:!0,get:function(){return i.FieldFormatter}})},47201:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.writeToPath=t.writeToString=t.writeToBuffer=t.writeToStream=t.write=t.format=t.FormatterOptions=t.CsvFormatterStream=void 0;const s=r(73837),c=r(12781),l=a(r(57147)),u=r(26763),d=r(93062);o(r(24692),t);var p=r(93062);Object.defineProperty(t,"CsvFormatterStream",{enumerable:!0,get:function(){return p.CsvFormatterStream}});var f=r(26763);Object.defineProperty(t,"FormatterOptions",{enumerable:!0,get:function(){return f.FormatterOptions}}),t.format=e=>new d.CsvFormatterStream(new u.FormatterOptions(e)),t.write=(e,r)=>{const n=t.format(r),i=s.promisify(((e,t)=>{n.write(e,void 0,t)}));return e.reduce(((e,t)=>e.then((()=>i(t)))),Promise.resolve()).then((()=>n.end())).catch((e=>{n.emit("error",e)})),n},t.writeToStream=(e,r,n)=>t.write(r,n).pipe(e),t.writeToBuffer=(e,r={})=>{const n=[],i=new c.Writable({write(e,t,r){n.push(e),r()}});return new Promise(((a,o)=>{i.on("error",o).on("finish",(()=>a(Buffer.concat(n)))),t.write(e,r).pipe(i)}))},t.writeToString=(e,r)=>t.writeToBuffer(e,r).then((e=>e.toString())),t.writeToPath=(e,r,n)=>{const i=l.createWriteStream(e,{encoding:"utf8"});return t.write(r,n).pipe(i)}},24692:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncTransform=void 0,t.isSyncTransform=e=>1===e.length},47410:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvParserStream=void 0;const n=r(71576),i=r(12781),a=r(23962),o=r(5147);class s extends i.Transform{constructor(e){super({objectMode:e.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=e,this.parser=new o.Parser(e),this.headerTransformer=new a.HeaderTransformer(e),this.decoder=new n.StringDecoder(e.encoding),this.rowTransformerValidator=new a.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(e){return this.rowTransformerValidator.rowTransform=e,this}validate(e){return this.rowTransformerValidator.rowValidator=e,this}emit(e,...t){return"end"===e?(this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1):super.emit(e,...t)}_transform(e,t,r){if(this.hasHitRowLimit)return r();const n=s.wrapDoneCallback(r);try{const{lines:t}=this,r=t+this.decoder.write(e),i=this.parse(r,!0);return this.processRows(i,n)}catch(e){return n(e)}}_flush(e){const t=s.wrapDoneCallback(e);if(this.hasHitRowLimit)return t();try{const e=this.lines+this.decoder.end(),r=this.parse(e,!1);return this.processRows(r,t)}catch(e){return t(e)}}parse(e,t){if(!e)return[];const{line:r,rows:n}=this.parser.parse(e,t);return this.lines=r,n}processRows(e,t){const r=e.length,n=i=>{const a=e=>e?t(e):i%100!=0?n(i+1):void setImmediate((()=>n(i+1)));if(this.checkAndEmitHeaders(),i>=r||this.hasHitRowLimit)return t();if(this.parsedLineCount+=1,this.shouldSkipLine)return a();const o=e[i];this.rowCount+=1,this.parsedRowCount+=1;const s=this.rowCount;return this.transformRow(o,((e,t)=>{if(e)return this.rowCount-=1,a(e);if(!t)return a(new Error("expected transform result"));if(t.isValid){if(t.row)return this.pushRow(t.row,a)}else this.emit("data-invalid",t.row,s,t.reason);return a()}))};n(0)}transformRow(e,t){try{this.headerTransformer.transform(e,((r,n)=>r?t(r):n?n.isValid?n.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(n.row,t):this.skipRow(t):(this.rowCount-=1,this.parsedRowCount-=1,t(null,{row:null,isValid:!0})):this.shouldEmitRows?t(null,{isValid:!1,row:e}):this.skipRow(t):t(new Error("Expected result from header transform"))))}catch(e){t(e)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(e){return this.rowCount-=1,e(null,{row:null,isValid:!0})}pushRow(e,t){try{this.parserOptions.objectMode?this.push(e):this.push(JSON.stringify(e)),t()}catch(e){t(e)}}static wrapDoneCallback(e){let t=!1;return(r,...n)=>{if(r){if(t)throw r;return t=!0,void e(r)}e(...n)}}}t.CsvParserStream=s},49042:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserOptions=void 0;const i=n(r(91658)),a=n(r(59722));t.ParserOptions=class{constructor(e){var t;if(this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,e||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=null!==(t=this.escape)&&void 0!==t?t:this.quote,this.supportsComments=!a.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},85455:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseString=t.parseFile=t.parseStream=t.parse=t.ParserOptions=t.CsvParserStream=void 0;const s=a(r(57147)),c=r(12781),l=r(49042),u=r(47410);o(r(53154),t);var d=r(47410);Object.defineProperty(t,"CsvParserStream",{enumerable:!0,get:function(){return d.CsvParserStream}});var p=r(49042);Object.defineProperty(t,"ParserOptions",{enumerable:!0,get:function(){return p.ParserOptions}}),t.parse=e=>new u.CsvParserStream(new l.ParserOptions(e)),t.parseStream=(e,t)=>e.pipe(new u.CsvParserStream(new l.ParserOptions(t))),t.parseFile=(e,t={})=>s.createReadStream(e).pipe(new u.CsvParserStream(new l.ParserOptions(t))),t.parseString=(e,t)=>{const r=new c.Readable;return r.push(e),r.push(null),r.pipe(new u.CsvParserStream(new l.ParserOptions(t)))}},46366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;const n=r(90203),i=r(40478),a=r(98661);class o{constructor(e){this.parserOptions=e,this.rowParser=new i.RowParser(this.parserOptions)}static removeBOM(e){return e&&65279===e.charCodeAt(0)?e.slice(1):e}parse(e,t){const r=new n.Scanner({line:o.removeBOM(e),parserOptions:this.parserOptions,hasMoreData:t});return this.parserOptions.supportsComments?this.parseWithComments(r):this.parseWithoutComments(r)}parseWithoutComments(e){const t=[];let r=!0;for(;r;)r=this.parseRow(e,t);return{line:e.line,rows:t}}parseWithComments(e){const{parserOptions:t}=this,r=[];for(let n=e.nextCharacterToken;null!==n;n=e.nextCharacterToken)if(a.Token.isTokenComment(n,t)){if(null===e.advancePastLine())return{line:e.lineFromCursor,rows:r};if(!e.hasMoreCharacters)return{line:e.lineFromCursor,rows:r};e.truncateToCursor()}else if(!this.parseRow(e,r))break;return{line:e.line,rows:r}}parseRow(e,t){if(!e.nextNonSpaceToken)return!1;const r=this.rowParser.parse(e);return null!==r&&(this.parserOptions.ignoreEmpty&&i.RowParser.isEmptyRow(r)||t.push(r),!0)}}t.Parser=o},40478:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RowParser=void 0;const n=r(83525),i=r(98661);t.RowParser=class{constructor(e){this.parserOptions=e,this.columnParser=new n.ColumnParser(e)}static isEmptyRow(e){return""===e.join("").replace(/\s+/g,"")}parse(e){const{parserOptions:t}=this,{hasMoreData:r}=e,n=e,a=[];let o=this.getStartToken(n,a);for(;o;){if(i.Token.isTokenRowDelimiter(o))return n.advancePastToken(o),!n.hasMoreCharacters&&i.Token.isTokenCarriageReturn(o,t)&&r?null:(n.truncateToCursor(),a);if(!this.shouldSkipColumnParse(n,o,a)){const e=this.columnParser.parse(n);if(null===e)return null;a.push(e)}o=n.nextNonSpaceToken}return r?null:(n.truncateToCursor(),a)}getStartToken(e,t){const r=e.nextNonSpaceToken;return null!==r&&i.Token.isTokenDelimiter(r,this.parserOptions)?(t.push(""),e.nextNonSpaceToken):r}shouldSkipColumnParse(e,t,r){const{parserOptions:n}=this;if(i.Token.isTokenDelimiter(t,n)){e.advancePastToken(t);const a=e.nextCharacterToken;if(!e.hasMoreCharacters||null!==a&&i.Token.isTokenRowDelimiter(a))return r.push(""),!0;if(null!==a&&i.Token.isTokenDelimiter(a,n))return r.push(""),!0}return!1}}},90203:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scanner=void 0;const n=r(98661),i=/((?:\r\n)|\n|\r)/;t.Scanner=class{constructor(e){this.cursor=0,this.line=e.line,this.lineLength=this.line.length,this.parserOptions=e.parserOptions,this.hasMoreData=e.hasMoreData,this.cursor=e.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:e}=this,t=this.parserOptions.NEXT_TOKEN_REGEXP;if(-1===e.search(t))return null;const r=t.exec(e);if(null==r)return null;const i=r[1],a=this.cursor+(r.index||0);return new n.Token({token:i,startCursor:a,endCursor:a+i.length-1})}get nextCharacterToken(){const{cursor:e,lineLength:t}=this;return t<=e?null:new n.Token({token:this.line[e],startCursor:e,endCursor:e})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const e=i.exec(this.lineFromCursor);return e?(this.cursor+=(e.index||0)+e[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(e){return this.cursor=e,this}advanceToToken(e){return this.cursor=e.startCursor,this}advancePastToken(e){return this.cursor=e.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},98661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Token=void 0;t.Token=class{constructor(e){this.token=e.token,this.startCursor=e.startCursor,this.endCursor=e.endCursor}static isTokenRowDelimiter(e){const t=e.token;return"\r"===t||"\n"===t||"\r\n"===t}static isTokenCarriageReturn(e,t){return e.token===t.carriageReturn}static isTokenComment(e,t){return t.supportsComments&&!!e&&e.token===t.comment}static isTokenEscapeCharacter(e,t){return e.token===t.escapeChar}static isTokenQuote(e,t){return e.token===t.quote}static isTokenDelimiter(e,t){return e.token===t.delimiter}}},37165:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnFormatter=void 0;t.ColumnFormatter=class{constructor(e){e.trim?this.format=e=>e.trim():e.ltrim?this.format=e=>e.trimLeft():e.rtrim?this.format=e=>e.trimRight():this.format=e=>e}}},46231:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnParser=void 0;const n=r(75586),i=r(16443),a=r(98661);t.ColumnParser=class{constructor(e){this.parserOptions=e,this.quotedColumnParser=new i.QuotedColumnParser(e),this.nonQuotedColumnParser=new n.NonQuotedColumnParser(e)}parse(e){const{nextNonSpaceToken:t}=e;return null!==t&&a.Token.isTokenQuote(t,this.parserOptions)?(e.advanceToToken(t),this.quotedColumnParser.parse(e)):this.nonQuotedColumnParser.parse(e)}}},75586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonQuotedColumnParser=void 0;const n=r(37165),i=r(98661);t.NonQuotedColumnParser=class{constructor(e){this.parserOptions=e,this.columnFormatter=new n.ColumnFormatter(e)}parse(e){if(!e.hasMoreCharacters)return null;const{parserOptions:t}=this,r=[];let n=e.nextCharacterToken;for(;n&&(!i.Token.isTokenDelimiter(n,t)&&!i.Token.isTokenRowDelimiter(n));n=e.nextCharacterToken)r.push(n.token),e.advancePastToken(n);return this.columnFormatter.format(r.join(""))}}},16443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotedColumnParser=void 0;const n=r(37165),i=r(98661);t.QuotedColumnParser=class{constructor(e){this.parserOptions=e,this.columnFormatter=new n.ColumnFormatter(e)}parse(e){if(!e.hasMoreCharacters)return null;const t=e.cursor,{foundClosingQuote:r,col:n}=this.gatherDataBetweenQuotes(e);if(!r){if(e.advanceTo(t),!e.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${e.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(e),n}gatherDataBetweenQuotes(e){const{parserOptions:t}=this;let r=!1,n=!1;const a=[];let o=e.nextCharacterToken;for(;!n&&null!==o;o=e.nextCharacterToken){const s=i.Token.isTokenQuote(o,t);if(!r&&s)r=!0;else if(r)if(i.Token.isTokenEscapeCharacter(o,t)){e.advancePastToken(o);const r=e.nextCharacterToken;null!==r&&(i.Token.isTokenQuote(r,t)||i.Token.isTokenEscapeCharacter(r,t))?(a.push(r.token),o=r):s?n=!0:a.push(o.token)}else s?n=!0:a.push(o.token);e.advancePastToken(o)}return{col:this.columnFormatter.format(a.join("")),foundClosingQuote:n}}checkForMalformedColumn(e){const{parserOptions:t}=this,{nextNonSpaceToken:r}=e;if(r){const n=i.Token.isTokenDelimiter(r,t),a=i.Token.isTokenRowDelimiter(r);if(!n&&!a){const n=e.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${t.escapedDelimiter}' OR new line got: '${r.token}'. at '${n}`)}e.advanceToToken(r)}else e.hasMoreData||e.advancePastLine()}}},83525:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnFormatter=t.QuotedColumnParser=t.NonQuotedColumnParser=t.ColumnParser=void 0;var n=r(46231);Object.defineProperty(t,"ColumnParser",{enumerable:!0,get:function(){return n.ColumnParser}});var i=r(75586);Object.defineProperty(t,"NonQuotedColumnParser",{enumerable:!0,get:function(){return i.NonQuotedColumnParser}});var a=r(16443);Object.defineProperty(t,"QuotedColumnParser",{enumerable:!0,get:function(){return a.QuotedColumnParser}});var o=r(37165);Object.defineProperty(t,"ColumnFormatter",{enumerable:!0,get:function(){return o.ColumnFormatter}})},5147:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotedColumnParser=t.NonQuotedColumnParser=t.ColumnParser=t.Token=t.Scanner=t.RowParser=t.Parser=void 0;var n=r(46366);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return n.Parser}});var i=r(40478);Object.defineProperty(t,"RowParser",{enumerable:!0,get:function(){return i.RowParser}});var a=r(90203);Object.defineProperty(t,"Scanner",{enumerable:!0,get:function(){return a.Scanner}});var o=r(98661);Object.defineProperty(t,"Token",{enumerable:!0,get:function(){return o.Token}});var s=r(83525);Object.defineProperty(t,"ColumnParser",{enumerable:!0,get:function(){return s.ColumnParser}}),Object.defineProperty(t,"NonQuotedColumnParser",{enumerable:!0,get:function(){return s.NonQuotedColumnParser}}),Object.defineProperty(t,"QuotedColumnParser",{enumerable:!0,get:function(){return s.QuotedColumnParser}})},18255:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderTransformer=void 0;const i=n(r(28801)),a=n(r(98423)),o=n(r(97644)),s=n(r(20276));t.HeaderTransformer=class{constructor(e){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=e,!0===e.headers?this.shouldUseFirstRow=!0:Array.isArray(e.headers)?this.setHeaders(e.headers):a.default(e.headers)&&(this.headersTransform=e.headers)}transform(e,t){return this.shouldMapRow(e)?t(null,this.processRow(e)):t(null,{row:null,isValid:!0})}shouldMapRow(e){const{parserOptions:t}=this;if(!this.headersTransform&&t.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(e)){if(this.headersTransform)this.setHeaders(this.headersTransform(e));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(e)}return!1}return!0}processRow(e){if(!this.headers)return{row:e,isValid:!0};const{parserOptions:t}=this;if(!t.discardUnmappedColumns&&e.length>this.headersLength){if(!t.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${e.length}`);return{row:e,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`}}return t.strictColumnHandling&&e.length<this.headersLength?{row:e,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`}:{row:this.mapHeaders(e),isValid:!0}}mapHeaders(e){const t={},{headers:r,headersLength:n}=this;for(let a=0;a<n;a+=1){const n=r[a];if(!i.default(n)){const r=e[a];i.default(r)?t[n]="":t[n]=r}}return t}setHeaders(e){var t;const r=e.filter((e=>!!e));if(o.default(r).length!==r.length){const e=s.default(r),t=Object.keys(e).filter((t=>e[t].length>1));throw new Error(`Duplicate headers found ${JSON.stringify(t)}`)}this.headers=e,this.receivedHeaders=!0,this.headersLength=(null===(t=this.headers)||void 0===t?void 0:t.length)||0}}},39529:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowTransformerValidator=void 0;const i=n(r(98423)),a=r(53154);class o{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(e){return a.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(e){return r(e)}return r(null,n)}:e}static createValidator(e){return a.isSyncValidate(e)?(t,r)=>{r(null,{row:t,isValid:e(t)})}:(t,r)=>{e(t,((e,n,i)=>e?r(e):r(null,n?{row:t,isValid:n,reason:i}:{row:t,isValid:!1,reason:i})))}}set rowTransform(e){if(!i.default(e))throw new TypeError("The transform should be a function");this._rowTransform=o.createTransform(e)}set rowValidator(e){if(!i.default(e))throw new TypeError("The validate should be a function");this._rowValidator=o.createValidator(e)}transformAndValidate(e,t){return this.callTransformer(e,((e,r)=>e?t(e):r?this.callValidator(r,((e,n)=>e?t(e):n&&!n.isValid?t(null,{row:r,isValid:!1,reason:n.reason}):t(null,{row:r,isValid:!0}))):t(null,{row:null,isValid:!0})))}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}callValidator(e,t){return this._rowValidator?this._rowValidator(e,t):t(null,{row:e,isValid:!0})}}t.RowTransformerValidator=o},23962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderTransformer=t.RowTransformerValidator=void 0;var n=r(39529);Object.defineProperty(t,"RowTransformerValidator",{enumerable:!0,get:function(){return n.RowTransformerValidator}});var i=r(18255);Object.defineProperty(t,"HeaderTransformer",{enumerable:!0,get:function(){return i.HeaderTransformer}})},53154:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncValidate=t.isSyncTransform=void 0,t.isSyncTransform=e=>1===e.length,t.isSyncValidate=e=>1===e.length},5623:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=r(e,i)),t instanceof RegExp&&(t=r(t,i));var a=n(e,t,i);return a&&{start:a[0],end:a[1],pre:i.slice(0,a[0]),body:i.slice(a[0]+e.length,a[1]),post:i.slice(a[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function n(e,t,r){var n,i,a,o,s,c=r.indexOf(e),l=r.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(n=[],a=r.length;u>=0&&!s;)u==c?(n.push(u),c=r.indexOf(e,u+1)):1==n.length?s=[n.pop(),l]:((i=n.pop())<a&&(a=i,o=l),l=r.indexOf(t,u+1)),u=c<l&&c>=0?c:l;n.length&&(s=[a,o])}return s}e.exports=t,t.range=n},24736:(e,t,r)=>{var n;e=r.nmd(e);var i=function(e){"use strict";var t=1e7,r=7,n=9007199254740992,a=f(n),o="0123456789abcdefghijklmnopqrstuvwxyz",s="function"==typeof BigInt;function c(e,t,r,n){return void 0===e?c[0]:void 0!==t&&(10!=+t||r)?K(e,t,r,n):X(e)}function l(e,t){this.value=e,this.sign=t,this.isSmall=!1}function u(e){this.value=e,this.sign=e<0,this.isSmall=!0}function d(e){this.value=e}function p(e){return-n<e&&e<n}function f(e){return e<1e7?[e]:e<1e14?[e%1e7,Math.floor(e/1e7)]:[e%1e7,Math.floor(e/1e7)%1e7,Math.floor(e/1e14)]}function m(e){g(e);var r=e.length;if(r<4&&P(e,a)<0)switch(r){case 0:return 0;case 1:return e[0];case 2:return e[0]+e[1]*t;default:return e[0]+(e[1]+e[2]*t)*t}return e}function g(e){for(var t=e.length;0===e[--t];);e.length=t+1}function _(e){for(var t=new Array(e),r=-1;++r<e;)t[r]=0;return t}function h(e){return e>0?Math.floor(e):Math.ceil(e)}function y(e,r){var n,i,a=e.length,o=r.length,s=new Array(a),c=0,l=t;for(i=0;i<o;i++)c=(n=e[i]+r[i]+c)>=l?1:0,s[i]=n-c*l;for(;i<a;)c=(n=e[i]+c)===l?1:0,s[i++]=n-c*l;return c>0&&s.push(c),s}function v(e,t){return e.length>=t.length?y(e,t):y(t,e)}function b(e,r){var n,i,a=e.length,o=new Array(a),s=t;for(i=0;i<a;i++)n=e[i]-s+r,r=Math.floor(n/s),o[i]=n-r*s,r+=1;for(;r>0;)o[i++]=r%s,r=Math.floor(r/s);return o}function k(e,r){var n,i,a=e.length,o=r.length,s=new Array(a),c=0,l=t;for(n=0;n<o;n++)(i=e[n]-c-r[n])<0?(i+=l,c=1):c=0,s[n]=i;for(n=o;n<a;n++){if(!((i=e[n]-c)<0)){s[n++]=i;break}i+=l,s[n]=i}for(;n<a;n++)s[n]=e[n];return g(s),s}function x(e,r,n){var i,a,o=e.length,s=new Array(o),c=-r,d=t;for(i=0;i<o;i++)a=e[i]+c,c=Math.floor(a/d),a%=d,s[i]=a<0?a+d:a;return"number"==typeof(s=m(s))?(n&&(s=-s),new u(s)):new l(s,n)}function E(e,r){var n,i,a,o,s=e.length,c=r.length,l=_(s+c),u=t;for(a=0;a<s;++a){o=e[a];for(var d=0;d<c;++d)n=o*r[d]+l[a+d],i=Math.floor(n/u),l[a+d]=n-i*u,l[a+d+1]+=i}return g(l),l}function S(e,r){var n,i,a=e.length,o=new Array(a),s=t,c=0;for(i=0;i<a;i++)n=e[i]*r+c,c=Math.floor(n/s),o[i]=n-c*s;for(;c>0;)o[i++]=c%s,c=Math.floor(c/s);return o}function D(e,t){for(var r=[];t-- >0;)r.push(0);return r.concat(e)}function w(e,t){var r=Math.max(e.length,t.length);if(r<=30)return E(e,t);r=Math.ceil(r/2);var n=e.slice(r),i=e.slice(0,r),a=t.slice(r),o=t.slice(0,r),s=w(i,o),c=w(n,a),l=w(v(i,n),v(o,a)),u=v(v(s,D(k(k(l,s),c),r)),D(c,2*r));return g(u),u}function T(e,r,n){return new l(e<t?S(r,e):E(r,f(e)),n)}function C(e){var r,n,i,a,o=e.length,s=_(o+o),c=t;for(i=0;i<o;i++){n=0-(a=e[i])*a;for(var l=i;l<o;l++)r=a*e[l]*2+s[i+l]+n,n=Math.floor(r/c),s[i+l]=r-n*c;s[i+o]=n}return g(s),s}function A(e,r){var n,i,a,o,s=e.length,c=_(s),l=t;for(a=0,n=s-1;n>=0;--n)a=(o=a*l+e[n])-(i=h(o/r))*r,c[n]=0|i;return[c,0|a]}function N(e,r){var n,i=X(r);if(s)return[new d(e.value/i.value),new d(e.value%i.value)];var a,o=e.value,p=i.value;if(0===p)throw new Error("Cannot divide by zero");if(e.isSmall)return i.isSmall?[new u(h(o/p)),new u(o%p)]:[c[0],e];if(i.isSmall){if(1===p)return[e,c[0]];if(-1==p)return[e.negate(),c[0]];var y=Math.abs(p);if(y<t){a=m((n=A(o,y))[0]);var v=n[1];return e.sign&&(v=-v),"number"==typeof a?(e.sign!==i.sign&&(a=-a),[new u(a),new u(v)]):[new l(a,e.sign!==i.sign),new u(v)]}p=f(y)}var b=P(o,p);if(-1===b)return[c[0],e];if(0===b)return[c[e.sign===i.sign?1:-1],c[0]];n=o.length+p.length<=200?function(e,r){var n,i,a,o,s,c,l,u=e.length,d=r.length,p=t,f=_(r.length),g=r[d-1],h=Math.ceil(p/(2*g)),y=S(e,h),v=S(r,h);for(y.length<=u&&y.push(0),v.push(0),g=v[d-1],i=u-d;i>=0;i--){for(n=p-1,y[i+d]!==g&&(n=Math.floor((y[i+d]*p+y[i+d-1])/g)),a=0,o=0,c=v.length,s=0;s<c;s++)a+=n*v[s],l=Math.floor(a/p),o+=y[i+s]-(a-l*p),a=l,o<0?(y[i+s]=o+p,o=-1):(y[i+s]=o,o=0);for(;0!==o;){for(n-=1,a=0,s=0;s<c;s++)(a+=y[i+s]-p+v[s])<0?(y[i+s]=a+p,a=0):(y[i+s]=a,a=1);o+=a}f[i]=n}return y=A(y,h)[0],[m(f),m(y)]}(o,p):function(e,r){for(var n,i,a,o,s,c=e.length,l=r.length,u=[],d=[],p=t;c;)if(d.unshift(e[--c]),g(d),P(d,r)<0)u.push(0);else{a=d[(i=d.length)-1]*p+d[i-2],o=r[l-1]*p+r[l-2],i>l&&(a=(a+1)*p),n=Math.ceil(a/o);do{if(P(s=S(r,n),d)<=0)break;n--}while(n);u.push(n),d=k(d,s)}return u.reverse(),[m(u),m(d)]}(o,p),a=n[0];var x=e.sign!==i.sign,E=n[1],D=e.sign;return"number"==typeof a?(x&&(a=-a),a=new u(a)):a=new l(a,x),"number"==typeof E?(D&&(E=-E),E=new u(E)):E=new l(E,D),[a,E]}function P(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var r=e.length-1;r>=0;r--)if(e[r]!==t[r])return e[r]>t[r]?1:-1;return 0}function I(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function F(e,t){for(var r,n,a,o=e.prev(),s=o,c=0;s.isEven();)s=s.divide(2),c++;e:for(n=0;n<t.length;n++)if(!e.lesser(t[n])&&!(a=i(t[n]).modPow(s,e)).isUnit()&&!a.equals(o)){for(r=c-1;0!=r;r--){if((a=a.square().mod(e)).isUnit())return!1;if(a.equals(o))continue e}return!1}return!0}l.prototype=Object.create(c.prototype),u.prototype=Object.create(c.prototype),d.prototype=Object.create(c.prototype),l.prototype.add=function(e){var t=X(e);if(this.sign!==t.sign)return this.subtract(t.negate());var r=this.value,n=t.value;return t.isSmall?new l(b(r,Math.abs(n)),this.sign):new l(v(r,n),this.sign)},l.prototype.plus=l.prototype.add,u.prototype.add=function(e){var t=X(e),r=this.value;if(r<0!==t.sign)return this.subtract(t.negate());var n=t.value;if(t.isSmall){if(p(r+n))return new u(r+n);n=f(Math.abs(n))}return new l(b(n,Math.abs(r)),r<0)},u.prototype.plus=u.prototype.add,d.prototype.add=function(e){return new d(this.value+X(e).value)},d.prototype.plus=d.prototype.add,l.prototype.subtract=function(e){var t=X(e);if(this.sign!==t.sign)return this.add(t.negate());var r=this.value,n=t.value;return t.isSmall?x(r,Math.abs(n),this.sign):function(e,t,r){var n;return P(e,t)>=0?n=k(e,t):(n=k(t,e),r=!r),"number"==typeof(n=m(n))?(r&&(n=-n),new u(n)):new l(n,r)}(r,n,this.sign)},l.prototype.minus=l.prototype.subtract,u.prototype.subtract=function(e){var t=X(e),r=this.value;if(r<0!==t.sign)return this.add(t.negate());var n=t.value;return t.isSmall?new u(r-n):x(n,Math.abs(r),r>=0)},u.prototype.minus=u.prototype.subtract,d.prototype.subtract=function(e){return new d(this.value-X(e).value)},d.prototype.minus=d.prototype.subtract,l.prototype.negate=function(){return new l(this.value,!this.sign)},u.prototype.negate=function(){var e=this.sign,t=new u(-this.value);return t.sign=!e,t},d.prototype.negate=function(){return new d(-this.value)},l.prototype.abs=function(){return new l(this.value,!1)},u.prototype.abs=function(){return new u(Math.abs(this.value))},d.prototype.abs=function(){return new d(this.value>=0?this.value:-this.value)},l.prototype.multiply=function(e){var r,n,i,a=X(e),o=this.value,s=a.value,u=this.sign!==a.sign;if(a.isSmall){if(0===s)return c[0];if(1===s)return this;if(-1===s)return this.negate();if((r=Math.abs(s))<t)return new l(S(o,r),u);s=f(r)}return n=o.length,i=s.length,new l(-.012*n-.012*i+15e-6*n*i>0?w(o,s):E(o,s),u)},l.prototype.times=l.prototype.multiply,u.prototype._multiplyBySmall=function(e){return p(e.value*this.value)?new u(e.value*this.value):T(Math.abs(e.value),f(Math.abs(this.value)),this.sign!==e.sign)},l.prototype._multiplyBySmall=function(e){return 0===e.value?c[0]:1===e.value?this:-1===e.value?this.negate():T(Math.abs(e.value),this.value,this.sign!==e.sign)},u.prototype.multiply=function(e){return X(e)._multiplyBySmall(this)},u.prototype.times=u.prototype.multiply,d.prototype.multiply=function(e){return new d(this.value*X(e).value)},d.prototype.times=d.prototype.multiply,l.prototype.square=function(){return new l(C(this.value),!1)},u.prototype.square=function(){var e=this.value*this.value;return p(e)?new u(e):new l(C(f(Math.abs(this.value))),!1)},d.prototype.square=function(e){return new d(this.value*this.value)},l.prototype.divmod=function(e){var t=N(this,e);return{quotient:t[0],remainder:t[1]}},d.prototype.divmod=u.prototype.divmod=l.prototype.divmod,l.prototype.divide=function(e){return N(this,e)[0]},d.prototype.over=d.prototype.divide=function(e){return new d(this.value/X(e).value)},u.prototype.over=u.prototype.divide=l.prototype.over=l.prototype.divide,l.prototype.mod=function(e){return N(this,e)[1]},d.prototype.mod=d.prototype.remainder=function(e){return new d(this.value%X(e).value)},u.prototype.remainder=u.prototype.mod=l.prototype.remainder=l.prototype.mod,l.prototype.pow=function(e){var t,r,n,i=X(e),a=this.value,o=i.value;if(0===o)return c[1];if(0===a)return c[0];if(1===a)return c[1];if(-1===a)return i.isEven()?c[1]:c[-1];if(i.sign)return c[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&p(t=Math.pow(a,o)))return new u(h(t));for(r=this,n=c[1];!0&o&&(n=n.times(r),--o),0!==o;)o/=2,r=r.square();return n},u.prototype.pow=l.prototype.pow,d.prototype.pow=function(e){var t=X(e),r=this.value,n=t.value,i=BigInt(0),a=BigInt(1),o=BigInt(2);if(n===i)return c[1];if(r===i)return c[0];if(r===a)return c[1];if(r===BigInt(-1))return t.isEven()?c[1]:c[-1];if(t.isNegative())return new d(i);for(var s=this,l=c[1];(n&a)===a&&(l=l.times(s),--n),n!==i;)n/=o,s=s.square();return l},l.prototype.modPow=function(e,t){if(e=X(e),(t=X(t)).isZero())throw new Error("Cannot take modPow with modulus 0");var r=c[1],n=this.mod(t);for(e.isNegative()&&(e=e.multiply(c[-1]),n=n.modInv(t));e.isPositive();){if(n.isZero())return c[0];e.isOdd()&&(r=r.multiply(n).mod(t)),e=e.divide(2),n=n.square().mod(t)}return r},d.prototype.modPow=u.prototype.modPow=l.prototype.modPow,l.prototype.compareAbs=function(e){var t=X(e),r=this.value,n=t.value;return t.isSmall?1:P(r,n)},u.prototype.compareAbs=function(e){var t=X(e),r=Math.abs(this.value),n=t.value;return t.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},d.prototype.compareAbs=function(e){var t=this.value,r=X(e).value;return(t=t>=0?t:-t)===(r=r>=0?r:-r)?0:t>r?1:-1},l.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=X(e),r=this.value,n=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:P(r,n)*(this.sign?-1:1)},l.prototype.compareTo=l.prototype.compare,u.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=X(e),r=this.value,n=t.value;return t.isSmall?r==n?0:r>n?1:-1:r<0!==t.sign?r<0?-1:1:r<0?1:-1},u.prototype.compareTo=u.prototype.compare,d.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=this.value,r=X(e).value;return t===r?0:t>r?1:-1},d.prototype.compareTo=d.prototype.compare,l.prototype.equals=function(e){return 0===this.compare(e)},d.prototype.eq=d.prototype.equals=u.prototype.eq=u.prototype.equals=l.prototype.eq=l.prototype.equals,l.prototype.notEquals=function(e){return 0!==this.compare(e)},d.prototype.neq=d.prototype.notEquals=u.prototype.neq=u.prototype.notEquals=l.prototype.neq=l.prototype.notEquals,l.prototype.greater=function(e){return this.compare(e)>0},d.prototype.gt=d.prototype.greater=u.prototype.gt=u.prototype.greater=l.prototype.gt=l.prototype.greater,l.prototype.lesser=function(e){return this.compare(e)<0},d.prototype.lt=d.prototype.lesser=u.prototype.lt=u.prototype.lesser=l.prototype.lt=l.prototype.lesser,l.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},d.prototype.geq=d.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals=l.prototype.geq=l.prototype.greaterOrEquals,l.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},d.prototype.leq=d.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals=l.prototype.leq=l.prototype.lesserOrEquals,l.prototype.isEven=function(){return 0==(1&this.value[0])},u.prototype.isEven=function(){return 0==(1&this.value)},d.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},l.prototype.isOdd=function(){return 1==(1&this.value[0])},u.prototype.isOdd=function(){return 1==(1&this.value)},d.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},l.prototype.isPositive=function(){return!this.sign},u.prototype.isPositive=function(){return this.value>0},d.prototype.isPositive=u.prototype.isPositive,l.prototype.isNegative=function(){return this.sign},u.prototype.isNegative=function(){return this.value<0},d.prototype.isNegative=u.prototype.isNegative,l.prototype.isUnit=function(){return!1},u.prototype.isUnit=function(){return 1===Math.abs(this.value)},d.prototype.isUnit=function(){return this.abs().value===BigInt(1)},l.prototype.isZero=function(){return!1},u.prototype.isZero=function(){return 0===this.value},d.prototype.isZero=function(){return this.value===BigInt(0)},l.prototype.isDivisibleBy=function(e){var t=X(e);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()))},d.prototype.isDivisibleBy=u.prototype.isDivisibleBy=l.prototype.isDivisibleBy,l.prototype.isPrime=function(t){var r=I(this);if(r!==e)return r;var n=this.abs(),a=n.bitLength();if(a<=64)return F(n,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var o=Math.log(2)*a.toJSNumber(),s=Math.ceil(!0===t?2*Math.pow(o,2):o),c=[],l=0;l<s;l++)c.push(i(l+2));return F(n,c)},d.prototype.isPrime=u.prototype.isPrime=l.prototype.isPrime,l.prototype.isProbablePrime=function(t,r){var n=I(this);if(n!==e)return n;for(var a=this.abs(),o=t===e?5:t,s=[],c=0;c<o;c++)s.push(i.randBetween(2,a.minus(2),r));return F(a,s)},d.prototype.isProbablePrime=u.prototype.isProbablePrime=l.prototype.isProbablePrime,l.prototype.modInv=function(e){for(var t,r,n,a=i.zero,o=i.one,s=X(e),c=this.abs();!c.isZero();)t=s.divide(c),r=a,n=s,a=o,s=c,o=r.subtract(t.multiply(o)),c=n.subtract(t.multiply(c));if(!s.isUnit())throw new Error(this.toString()+" and "+e.toString()+" are not co-prime");return-1===a.compare(0)&&(a=a.add(e)),this.isNegative()?a.negate():a},d.prototype.modInv=u.prototype.modInv=l.prototype.modInv,l.prototype.next=function(){var e=this.value;return this.sign?x(e,1,this.sign):new l(b(e,1),this.sign)},u.prototype.next=function(){var e=this.value;return e+1<n?new u(e+1):new l(a,!1)},d.prototype.next=function(){return new d(this.value+BigInt(1))},l.prototype.prev=function(){var e=this.value;return this.sign?new l(b(e,1),!0):x(e,1,this.sign)},u.prototype.prev=function(){var e=this.value;return e-1>-n?new u(e-1):new l(a,!0)},d.prototype.prev=function(){return new d(this.value-BigInt(1))};for(var O=[1];2*O[O.length-1]<=t;)O.push(2*O[O.length-1]);var R=O.length,M=O[R-1];function L(e){return Math.abs(e)<=t}function j(e,t,r){t=X(t);for(var n=e.isNegative(),a=t.isNegative(),o=n?e.not():e,s=a?t.not():t,c=0,l=0,u=null,d=null,p=[];!o.isZero()||!s.isZero();)c=(u=N(o,M))[1].toJSNumber(),n&&(c=M-1-c),l=(d=N(s,M))[1].toJSNumber(),a&&(l=M-1-l),o=u[0],s=d[0],p.push(r(c,l));for(var f=0!==r(n?1:0,a?1:0)?i(-1):i(0),m=p.length-1;m>=0;m-=1)f=f.multiply(M).add(i(p[m]));return f}l.prototype.shiftLeft=function(e){var t=X(e).toJSNumber();if(!L(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;for(;t>=R;)r=r.multiply(M),t-=R-1;return r.multiply(O[t])},d.prototype.shiftLeft=u.prototype.shiftLeft=l.prototype.shiftLeft,l.prototype.shiftRight=function(e){var t,r=X(e).toJSNumber();if(!L(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;r>=R;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(t=N(n,M))[1].isNegative()?t[0].prev():t[0],r-=R-1}return(t=N(n,O[r]))[1].isNegative()?t[0].prev():t[0]},d.prototype.shiftRight=u.prototype.shiftRight=l.prototype.shiftRight,l.prototype.not=function(){return this.negate().prev()},d.prototype.not=u.prototype.not=l.prototype.not,l.prototype.and=function(e){return j(this,e,(function(e,t){return e&t}))},d.prototype.and=u.prototype.and=l.prototype.and,l.prototype.or=function(e){return j(this,e,(function(e,t){return e|t}))},d.prototype.or=u.prototype.or=l.prototype.or,l.prototype.xor=function(e){return j(this,e,(function(e,t){return e^t}))},d.prototype.xor=u.prototype.xor=l.prototype.xor;var B=1<<30,z=(t&-t)*(t&-t)|B;function U(e){var r=e.value,n="number"==typeof r?r|B:"bigint"==typeof r?r|BigInt(B):r[0]+r[1]*t|z;return n&-n}function q(e,t){if(t.compareTo(e)<=0){var r=q(e,t.square(t)),n=r.p,a=r.e,o=n.multiply(t);return o.compareTo(e)<=0?{p:o,e:2*a+1}:{p:n,e:2*a}}return{p:i(1),e:0}}function J(e,t){return e=X(e),t=X(t),e.greater(t)?e:t}function V(e,t){return e=X(e),t=X(t),e.lesser(t)?e:t}function H(e,t){if(e=X(e).abs(),t=X(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var r,n,i=c[1];e.isEven()&&t.isEven();)r=V(U(e),U(t)),e=e.divide(r),t=t.divide(r),i=i.multiply(r);for(;e.isEven();)e=e.divide(U(e));do{for(;t.isEven();)t=t.divide(U(t));e.greater(t)&&(n=t,t=e,e=n),t=t.subtract(e)}while(!t.isZero());return i.isUnit()?e:e.multiply(i)}l.prototype.bitLength=function(){var e=this;return e.compareTo(i(0))<0&&(e=e.negate().subtract(i(1))),0===e.compareTo(i(0))?i(0):i(q(e,i(2)).e).add(i(1))},d.prototype.bitLength=u.prototype.bitLength=l.prototype.bitLength;var K=function(e,t,r,n){r=r||o,e=String(e),n||(e=e.toLowerCase(),r=r.toLowerCase());var i,a=e.length,s=Math.abs(t),c={};for(i=0;i<r.length;i++)c[r[i]]=i;for(i=0;i<a;i++){if("-"!==(d=e[i])&&(d in c&&c[d]>=s)){if("1"===d&&1===s)continue;throw new Error(d+" is not a valid digit in base "+t+".")}}t=X(t);var l=[],u="-"===e[0];for(i=u?1:0;i<e.length;i++){var d;if((d=e[i])in c)l.push(X(c[d]));else{if("<"!==d)throw new Error(d+" is not a valid character");var p=i;do{i++}while(">"!==e[i]&&i<e.length);l.push(X(e.slice(p+1,i)))}}return W(l,t,u)};function W(e,t,r){var n,i=c[0],a=c[1];for(n=e.length-1;n>=0;n--)i=i.add(e[n].times(a)),a=a.times(t);return r?i.negate():i}function G(e,t){if((t=i(t)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(e.isNegative()&&t.isPositive()&&(n=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n};for(var a,o=[],s=e;s.isNegative()||s.compareAbs(t)>=0;){a=s.divmod(t),s=a.quotient;var c=a.remainder;c.isNegative()&&(c=t.minus(c).abs(),s=s.next()),o.push(c.toJSNumber())}return o.push(s.toJSNumber()),{value:o.reverse(),isNegative:n}}function $(e,t,r){var n=G(e,t);return(n.isNegative?"-":"")+n.value.map((function(e){return function(e,t){return e<(t=t||o).length?t[e]:"<"+e+">"}(e,r)})).join("")}function Y(e){if(p(+e)){var t=+e;if(t===h(t))return s?new d(BigInt(t)):new u(t);throw new Error("Invalid integer: "+e)}var n="-"===e[0];n&&(e=e.slice(1));var i=e.split(/e/i);if(i.length>2)throw new Error("Invalid integer: "+i.join("e"));if(2===i.length){var a=i[1];if("+"===a[0]&&(a=a.slice(1)),(a=+a)!==h(a)||!p(a))throw new Error("Invalid integer: "+a+" is not a valid exponent.");var o=i[0],c=o.indexOf(".");if(c>=0&&(a-=o.length-c-1,o=o.slice(0,c)+o.slice(c+1)),a<0)throw new Error("Cannot include negative exponent part for integers");e=o+=new Array(a+1).join("0")}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(s)return new d(BigInt(n?"-"+e:e));for(var f=[],m=e.length,_=r,y=m-_;m>0;)f.push(+e.slice(y,m)),(y-=_)<0&&(y=0),m-=_;return g(f),new l(f,n)}function X(e){return"number"==typeof e?function(e){if(s)return new d(BigInt(e));if(p(e)){if(e!==h(e))throw new Error(e+" is not an integer.");return new u(e)}return Y(e.toString())}(e):"string"==typeof e?Y(e):"bigint"==typeof e?new d(e):e}l.prototype.toArray=function(e){return G(this,e)},u.prototype.toArray=function(e){return G(this,e)},d.prototype.toArray=function(e){return G(this,e)},l.prototype.toString=function(t,r){if(t===e&&(t=10),10!==t)return $(this,t,r);for(var n,i=this.value,a=i.length,o=String(i[--a]);--a>=0;)n=String(i[a]),o+="0000000".slice(n.length)+n;return(this.sign?"-":"")+o},u.prototype.toString=function(t,r){return t===e&&(t=10),10!=t?$(this,t,r):String(this.value)},d.prototype.toString=u.prototype.toString,d.prototype.toJSON=l.prototype.toJSON=u.prototype.toJSON=function(){return this.toString()},l.prototype.valueOf=function(){return parseInt(this.toString(),10)},l.prototype.toJSNumber=l.prototype.valueOf,u.prototype.valueOf=function(){return this.value},u.prototype.toJSNumber=u.prototype.valueOf,d.prototype.valueOf=d.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var Q=0;Q<1e3;Q++)c[Q]=X(Q),Q>0&&(c[-Q]=X(-Q));return c.one=c[1],c.zero=c[0],c.minusOne=c[-1],c.max=J,c.min=V,c.gcd=H,c.lcm=function(e,t){return e=X(e).abs(),t=X(t).abs(),e.divide(H(e,t)).multiply(t)},c.isInstance=function(e){return e instanceof l||e instanceof u||e instanceof d},c.randBetween=function(e,r,n){e=X(e),r=X(r);var i=n||Math.random,a=V(e,r),o=J(e,r).subtract(a).add(1);if(o.isSmall)return a.add(Math.floor(i()*o));for(var s=G(o,t).value,l=[],u=!0,d=0;d<s.length;d++){var p=u?s[d]+(d+1<s.length?s[d+1]/t:0):t,f=h(i()*p);l.push(f),f<s[d]&&(u=!1)}return a.add(c.fromArray(l,t,!1))},c.fromArray=function(e,t,r){return W(e.map(X),X(t||10),r)},c}();e.hasOwnProperty("exports")&&(e.exports=i),void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},67740:(e,t,r)=>{var n=r(4077),i=r(82361).EventEmitter,a=r(75289),o=r(77962),s=r(12781).Stream;function c(e){for(var t=0,r=0;r<e.length;r++)t+=Math.pow(256,r)*e[r];return t}function l(e){for(var t=0,r=0;r<e.length;r++)t+=Math.pow(256,e.length-r-1)*e[r];return t}function u(e){var t=l(e);return 128==(128&e[0])&&(t-=Math.pow(256,e.length)),t}function d(e){var t=c(e);return 128==(128&e[e.length-1])&&(t-=Math.pow(256,e.length)),t}function p(e){var t={};return[1,2,4,8].forEach((function(r){var n=8*r;t["word"+n+"le"]=t["word"+n+"lu"]=e(r,c),t["word"+n+"ls"]=e(r,d),t["word"+n+"be"]=t["word"+n+"bu"]=e(r,l),t["word"+n+"bs"]=e(r,u)})),t.word8=t.word8u=t.word8be,t.word8s=t.word8bs,t}(t=e.exports=function(e,r){if(Buffer.isBuffer(e))return t.parse(e);var n=t.stream();return e&&e.pipe?e.pipe(n):e&&(e.on(r||"data",(function(e){n.write(e)})),e.on("end",(function(){n.end()}))),n}).stream=function(e){if(e)return t.apply(null,arguments);var r=null;function c(e,t,n){r={bytes:e,skip:n,cb:function(e){r=null,t(e)}},u()}var l=null;function u(){if(r)if("function"==typeof r)r();else{var e,t=l+r.bytes;if(f.length>=t)null==l?(e=f.splice(0,t),r.skip||(e=e.slice())):(r.skip||(e=f.slice(l,t)),l=t),r.skip?r.cb():r.cb(e)}else _&&(g=!0)}var d=n.light((function(e){function t(){g||e.next()}var n=p((function(e,r){return function(n){c(e,(function(e){m.set(n,r(e)),t()}))}}));return n.tap=function(t){e.nest(t,m.store)},n.into=function(t,r){m.get(t)||m.set(t,{});var n=m;m=o(n.get(t)),e.nest((function(){r.apply(this,arguments),this.tap((function(){m=n}))}),m.store)},n.flush=function(){m.store={},t()},n.loop=function(r){var n=!1;e.nest(!1,(function i(){this.vars=m.store,r.call(this,(function(){n=!0,t()}),m.store),this.tap(function(){n?e.next():i.call(this)}.bind(this))}),m.store)},n.buffer=function(e,r){"string"==typeof r&&(r=m.get(r)),c(r,(function(r){m.set(e,r),t()}))},n.skip=function(e){"string"==typeof e&&(e=m.get(e)),c(e,(function(){t()}))},n.scan=function(e,n){if("string"==typeof n)n=new Buffer(n);else if(!Buffer.isBuffer(n))throw new Error("search must be a Buffer or a string");var i=0;r=function(){var a=f.indexOf(n,l+i),o=a-l-i;-1!==a?(r=null,null!=l?(m.set(e,f.slice(l,l+i+o)),l+=i+o+n.length):(m.set(e,f.slice(0,i+o)),f.splice(0,i+o+n.length)),t(),u()):o=Math.max(f.length-n.length-l-i,0),i+=o},u()},n.peek=function(t){l=0,e.nest((function(){t.call(this,m.store),this.tap((function(){l=null}))}))},n}));d.writable=!0;var f=a();d.write=function(e){f.push(e),u()};var m=o(),g=!1,_=!1;return d.end=function(){_=!0},d.pipe=s.prototype.pipe,Object.getOwnPropertyNames(i.prototype).forEach((function(e){d[e]=i.prototype[e]})),d},t.parse=function(e){var t=p((function(i,a){return function(o){if(r+i<=e.length){var s=e.slice(r,r+i);r+=i,n.set(o,a(s))}else n.set(o,null);return t}})),r=0,n=o();return t.vars=n.store,t.tap=function(e){return e.call(t,n.store),t},t.into=function(e,r){n.get(e)||n.set(e,{});var i=n;return n=o(i.get(e)),r.call(t,n.store),n=i,t},t.loop=function(e){for(var r=!1,i=function(){r=!0};!1===r;)e.call(t,i,n.store);return t},t.buffer=function(i,a){"string"==typeof a&&(a=n.get(a));var o=e.slice(r,Math.min(e.length,r+a));return r+=a,n.set(i,o),t},t.skip=function(e){return"string"==typeof e&&(e=n.get(e)),r+=e,t},t.scan=function(i,a){if("string"==typeof a)a=new Buffer(a);else if(!Buffer.isBuffer(a))throw new Error("search must be a Buffer or a string");n.set(i,null);for(var o=0;o+r<=e.length-a.length+1;o++){for(var s=0;s<a.length&&e[r+o+s]===a[s];s++);if(s===a.length)break}return n.set(i,e.slice(r,r+o)),r+=o+a.length,t},t.peek=function(e){var i=r;return e.call(t,n.store),r=i,t},t.flush=function(){return n.store={},t},t.eof=function(){return r>=e.length},t}},77962:e=>{e.exports=function(e){function t(e,t){var n=r.store,i=e.split(".");i.slice(0,-1).forEach((function(e){void 0===n[e]&&(n[e]={}),n=n[e]}));var a=i[i.length-1];return 1==arguments.length?n[a]:n[a]=t}var r={get:function(e){return t(e)},set:function(e,r){return t(e,r)},store:e||{}};return r}},9668:(e,t,r)=>{"use strict";const{Buffer:n}=r(14300),i=Symbol.for("BufferList");function a(e){if(!(this instanceof a))return new a(e);a._init.call(this,e)}a._init=function(e){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)},a.prototype._new=function(e){return new a(e)},a.prototype._offset=function(e){if(0===e)return[0,0];let t=0;for(let r=0;r<this._bufs.length;r++){const n=t+this._bufs[r].length;if(e<n||r===this._bufs.length-1)return[r,e-t];t=n}},a.prototype._reverseOffset=function(e){const t=e[0];let r=e[1];for(let e=0;e<t;e++)r+=this._bufs[e].length;return r},a.prototype.get=function(e){if(e>this.length||e<0)return;const t=this._offset(e);return this._bufs[t[0]][t[1]]},a.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},a.prototype.copy=function(e,t,r,i){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof i||i>this.length)&&(i=this.length),r>=this.length)return e||n.alloc(0);if(i<=0)return e||n.alloc(0);const a=!!e,o=this._offset(r),s=i-r;let c=s,l=a&&t||0,u=o[1];if(0===r&&i===this.length){if(!a)return 1===this._bufs.length?this._bufs[0]:n.concat(this._bufs,this.length);for(let t=0;t<this._bufs.length;t++)this._bufs[t].copy(e,l),l+=this._bufs[t].length;return e}if(c<=this._bufs[o[0]].length-u)return a?this._bufs[o[0]].copy(e,t,u,u+c):this._bufs[o[0]].slice(u,u+c);a||(e=n.allocUnsafe(s));for(let t=o[0];t<this._bufs.length;t++){const r=this._bufs[t].length-u;if(!(c>r)){this._bufs[t].copy(e,l,u,u+c),l+=r;break}this._bufs[t].copy(e,l,u),l+=r,c-=r,u&&(u=0)}return e.length>l?e.slice(0,l):e},a.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return this._new();const r=this._offset(e),n=this._offset(t),i=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!==r[1]&&(i[0]=i[0].slice(r[1])),this._new(i)},a.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},a.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){const e=this._new();for(let t=0;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},a.prototype.append=function(e){if(null==e)return this;if(e.buffer)this._appendBuffer(n.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let t=0;t<e.length;t++)this.append(e[t]);else if(this._isBufferList(e))for(let t=0;t<e._bufs.length;t++)this.append(e._bufs[t]);else"number"==typeof e&&(e=e.toString()),this._appendBuffer(n.from(e));return this},a.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},a.prototype.indexOf=function(e,t,r){if(void 0===r&&"string"==typeof t&&(r=t,t=void 0),"function"==typeof e||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof e?e=n.from([e]):"string"==typeof e?e=n.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=n.from(e.buffer,e.byteOffset,e.byteLength):n.isBuffer(e)||(e=n.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;const i=this._offset(t);let a=i[0],o=i[1];for(;a<this._bufs.length;a++){const t=this._bufs[a];for(;o<t.length;){if(t.length-o>=e.length){const r=t.indexOf(e,o);if(-1!==r)return this._reverseOffset([a,r]);o=t.length-e.length+1}else{const t=this._reverseOffset([a,o]);if(this._match(t,e))return t;o++}}o=0}return-1},a.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0},function(){const e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const t in e)!function(t){a.prototype[t]=null===e[t]?function(e,r){return this.slice(e,e+r)[t](0,r)}:function(r=0){return this.slice(r,r+e[t])[t](0)}}(t)}(),a.prototype._isBufferList=function(e){return e instanceof a||a.isBufferList(e)},a.isBufferList=function(e){return null!=e&&e[i]},e.exports=a},10022:(e,t,r)=>{"use strict";const n=r(11451).Duplex,i=r(94378),a=r(9668);function o(e){if(!(this instanceof o))return new o(e);if("function"==typeof e){this._callback=e;const t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)})),e=null}a._init.call(this,e),n.call(this)}i(o,n),Object.assign(o.prototype,a.prototype),o.prototype._new=function(e){return new o(e)},o.prototype._write=function(e,t,r){this._appendBuffer(e),"function"==typeof r&&r()},o.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},o.prototype.end=function(e){n.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},o.prototype._destroy=function(e,t){this._bufs.length=0,this.length=0,t(e)},o.prototype._isBufferList=function(e){return e instanceof o||e instanceof a||o.isBufferList(e)},o.isBufferList=a.isBufferList,e.exports=o,e.exports.BufferListStream=o,e.exports.BufferList=a},89846:e=>{"use strict";e.exports=function(e){var t=e._SomePromiseArray;function r(e){var r=new t(e),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}e.any=function(e){return r(e)},e.prototype.any=function(){return r(this)}}},4601:(e,t,r)=>{"use strict";var n;try{throw new Error}catch(e){n=e}var i=r(10679),a=r(7824),o=r(75942);function s(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new a(16),this._normalQueue=new a(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=i}function c(e,t,r){this._lateQueue.push(e,t,r),this._queueTick()}function l(e,t,r){this._normalQueue.push(e,t,r),this._queueTick()}function u(e){this._normalQueue._pushOne(e),this._queueTick()}s.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},s.prototype.hasCustomScheduler=function(){return this._customScheduler},s.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},s.prototype.disableTrampolineIfNecessary=function(){o.hasDevTools&&(this._trampolineEnabled=!1)},s.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},s.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},s.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout((function(){e(t)}),0);else try{this._schedule((function(){e(t)}))}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},o.hasDevTools?(s.prototype.invokeLater=function(e,t,r){this._trampolineEnabled?c.call(this,e,t,r):this._schedule((function(){setTimeout((function(){e.call(t,r)}),100)}))},s.prototype.invoke=function(e,t,r){this._trampolineEnabled?l.call(this,e,t,r):this._schedule((function(){e.call(t,r)}))},s.prototype.settlePromises=function(e){this._trampolineEnabled?u.call(this,e):this._schedule((function(){e._settlePromises()}))}):(s.prototype.invokeLater=c,s.prototype.invoke=l,s.prototype.settlePromises=u),s.prototype._drainQueue=function(e){for(;e.length()>0;){var t=e.shift();if("function"==typeof t){var r=e.shift(),n=e.shift();t.call(r,n)}else t._settlePromises()}},s.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},s.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},s.prototype._reset=function(){this._isTickUsed=!1},e.exports=s,e.exports.firstLineError=n},23635:e=>{"use strict";e.exports=function(e,t,r,n){var i=!1,a=function(e,t){this._reject(t)},o=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(a,a,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},c=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(a){i||(i=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var l=r(a),u=new e(t);u._propagateFrom(this,1);var d=this._target();if(u._setBoundTo(l),l instanceof e){var p={promiseRejectionQueued:!1,promise:u,target:d,bindingPromise:l};d._then(t,o,void 0,u,p),l._then(s,c,void 0,u,p),u._setOnCancel(l)}else u._resolveCallback(d);return u},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,r){return e.resolve(r).bind(t)}}},93786:(e,t,r)=>{"use strict";var n;"undefined"!=typeof Promise&&(n=Promise);var i=r(7502)();i.noConflict=function(){try{Promise===i&&(Promise=n)}catch(e){}return i},e.exports=i},12293:(e,t,r)=>{"use strict";var n=Object.create;if(n){var i=n(null),a=n(null);i[" size"]=a[" size"]=0}e.exports=function(e){var t,n,o=r(75942),s=o.canEvaluate,c=o.isIdentifier,l=function(e){return new Function("ensureMethod"," \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g,e))(p)},u=function(e){return new Function("obj"," \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName",e))},d=function(e,t,r){var n=r[e];if("function"!=typeof n){if(!c(e))return null;if(n=t(e),r[e]=n,r[" size"]++,r[" size"]>512){for(var i=Object.keys(r),a=0;a<256;++a)delete r[i[a]];r[" size"]=i.length-256}}return n};function p(t,r){var n;if(null!=t&&(n=t[r]),"function"!=typeof n){var i="Object "+o.classString(t)+" has no method '"+o.toString(r)+"'";throw new e.TypeError(i)}return n}function f(e){return p(e,this.pop()).apply(e,this)}function m(e){return e[this]}function g(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}t=function(e){return d(e,l,i)},n=function(e){return d(e,u,a)},e.prototype.call=function(e){for(var r=arguments.length,n=new Array(Math.max(r-1,0)),i=1;i<r;++i)n[i-1]=arguments[i];if(s){var a=t(e);if(null!==a)return this._then(a,void 0,void 0,n,void 0)}return n.push(e),this._then(f,void 0,void 0,n,void 0)},e.prototype.get=function(e){var t;if("number"==typeof e)t=g;else if(s){var r=n(e);t=null!==r?r:m}else t=m;return this._then(t,void 0,void 0,e,void 0)}}},11735:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i){var a=r(75942),o=a.tryCatch,s=a.errorObj,c=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var r=e._cancellationParent;if(null==r||!r._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=r}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(e,t){if(a.isArray(e))for(var r=0;r<e.length;++r)this._doInvokeOnCancel(e[r],t);else if(void 0!==e)if("function"==typeof e){if(!t){var n=o(e).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),c.throwLater(n.e))}}else e._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var e=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,e)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},89976:(e,t,r)=>{"use strict";e.exports=function(e){var t=r(75942),n=r(89571).keys,i=t.tryCatch,a=t.errorObj;return function(r,o,s){return function(c){var l=s._boundValue();e:for(var u=0;u<r.length;++u){var d=r[u];if(d===Error||null!=d&&d.prototype instanceof Error){if(c instanceof d)return i(o).call(l,c)}else if("function"==typeof d){var p=i(d).call(l,c);if(p===a)return p;if(p)return i(o).call(l,c)}else if(t.isObject(c)){for(var f=n(d),m=0;m<f.length;++m){var g=f[m];if(d[g]!=c[g])continue e}return i(o).call(l,c)}}return e}}}},75910:e=>{"use strict";e.exports=function(e){var t=!1,r=[];function n(){this._trace=new n.CapturedTrace(i())}function i(){var e=r.length-1;if(e>=0)return r[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},n.CapturedTrace=null,n.create=function(){if(t)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=e.prototype._pushContext,a=e.prototype._popContext,o=e._peekContext,s=e.prototype._peekContext,c=e.prototype._promiseCreated;n.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=a,e._peekContext=o,e.prototype._peekContext=s,e.prototype._promiseCreated=c,t=!1},t=!0,e.prototype._pushContext=n.prototype._pushContext,e.prototype._popContext=n.prototype._popContext,e._peekContext=e.prototype._peekContext=i,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},n}},90461:(e,t,r)=>{"use strict";e.exports=function(e,t){var n,i,a,o=e._getDomain,s=e._async,c=r(57621).Warning,l=r(75942),u=l.canAttachTrace,d=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,p=/\((?:timers\.js):\d+:\d+\)/,f=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,m=null,g=null,_=!1,h=!(0==l.env("BLUEBIRD_DEBUG")||!l.env("BLUEBIRD_DEBUG")&&"development"!==l.env("NODE_ENV")),y=!(0==l.env("BLUEBIRD_WARNINGS")||!h&&!l.env("BLUEBIRD_WARNINGS")),v=!(0==l.env("BLUEBIRD_LONG_STACK_TRACES")||!h&&!l.env("BLUEBIRD_LONG_STACK_TRACES")),b=0!=l.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(y||!!l.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),s.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){q("rejectionHandled",n,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),q("unhandledRejection",i,e,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(e,t,r){return j(e,t,r||this)},e.onPossiblyUnhandledRejection=function(e){var t=o();i="function"==typeof e?null===t?e:l.domainBind(t,e):void 0},e.onUnhandledRejectionHandled=function(e){var t=o();n="function"==typeof e?null===t?e:l.domainBind(t,e):void 0};var k=function(){};e.longStackTraces=function(){if(s.haveItemsQueued()&&!Y.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!Y.longStackTraces&&V()){var r=e.prototype._captureStackTrace,n=e.prototype._attachExtraTrace;Y.longStackTraces=!0,k=function(){if(s.haveItemsQueued()&&!Y.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=r,e.prototype._attachExtraTrace=n,t.deactivateLongStackTraces(),s.enableTrampoline(),Y.longStackTraces=!1},e.prototype._captureStackTrace=M,e.prototype._attachExtraTrace=L,t.activateLongStackTraces(),s.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return Y.longStackTraces&&V()};var x=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return l.global.dispatchEvent(e),function(e,t){var r=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:!0});return!l.global.dispatchEvent(r)}}if("function"==typeof Event){e=new Event("CustomEvent");return l.global.dispatchEvent(e),function(e,t){var r=new Event(e.toLowerCase(),{cancelable:!0});return r.detail=t,!l.global.dispatchEvent(r)}}return(e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),l.global.dispatchEvent(e),function(e,t){var r=document.createEvent("CustomEvent");return r.initCustomEvent(e.toLowerCase(),!1,!0,t),!l.global.dispatchEvent(r)}}catch(e){}return function(){return!1}}(),E=l.isNode?function(){return process.emit.apply(process,arguments)}:l.global?function(e){var t="on"+e.toLowerCase(),r=l.global[t];return!!r&&(r.apply(l.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function S(e,t){return{promise:t}}var D={promiseCreated:S,promiseFulfilled:S,promiseRejected:S,promiseResolved:S,promiseCancelled:S,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:S},w=function(e){var t=!1;try{t=E.apply(null,arguments)}catch(e){s.throwLater(e),t=!0}var r=!1;try{r=x(e,D[e].apply(null,arguments))}catch(e){s.throwLater(e),r=!0}return r||t};function T(){return!1}function C(e,t,r){var n=this;try{e(t,r,(function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+l.toString(e));n._attachCancellationCallback(e)}))}catch(e){return e}}function A(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?l.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function N(){return this._onCancelField}function P(e){this._onCancelField=e}function I(){this._cancellationParent=void 0,this._onCancelField=void 0}function F(e,t){if(0!=(1&t)){this._cancellationParent=e;var r=e._branchesRemainingToCancel;void 0===r&&(r=0),e._branchesRemainingToCancel=r+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}e.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&k()),"warnings"in t){var r=t.warnings;Y.warnings=!!r,b=Y.warnings,l.isObject(r)&&"wForgottenReturn"in r&&(b=!!r.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!Y.cancellation){if(s.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=I,e.prototype._propagateFrom=F,e.prototype._onCancel=N,e.prototype._setOnCancel=P,e.prototype._attachCancellationCallback=A,e.prototype._execute=C,O=F,Y.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!Y.monitoring?(Y.monitoring=!0,e.prototype._fireEvent=w):!t.monitoring&&Y.monitoring&&(Y.monitoring=!1,e.prototype._fireEvent=T)),e},e.prototype._fireEvent=T,e.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(e){},e.prototype._attachCancellationCallback=function(e){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(e,t){};var O=function(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)};function R(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function M(){this._trace=new G(this._peekContext())}function L(e,t){if(u(e)){var r=this._trace;if(void 0!==r&&t&&(r=r._parent),void 0!==r)r.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=z(e);l.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),l.notEnumerableProp(e,"__stackCleaned__",!0)}}}function j(t,r,n){if(Y.warnings){var i,a=new c(t);if(r)n._attachExtraTrace(a);else if(Y.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(a);else{var o=z(a);a.stack=o.message+"\n"+o.stack.join("\n")}w("warning",a)||U(a,"",!0)}}function B(e){for(var t=[],r=0;r<e.length;++r){var n=e[r],i=" (No stack trace)"===n||m.test(n),a=i&&H(n);i&&!a&&(_&&" "!==n.charAt(0)&&(n=" "+n),t.push(n))}return t}function z(e){var t=e.stack,r=e.toString();return t="string"==typeof t&&t.length>0?function(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),r=0;r<t.length;++r){var n=t[r];if(" (No stack trace)"===n||m.test(n))break}return r>0&&"SyntaxError"!=e.name&&(t=t.slice(r)),t}(e):[" (No stack trace)"],{message:r,stack:"SyntaxError"==e.name?t:B(t)}}function U(e,t,r){if("undefined"!=typeof console){var n;if(l.isObject(e)){var i=e.stack;n=t+g(i,e)}else n=t+String(e);"function"==typeof a?a(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function q(e,t,r,n){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(n):t(r,n))}catch(e){s.throwLater(e)}"unhandledRejection"===e?w(e,r,n)||i||U(r,"Unhandled rejection "):w(e,n)}function J(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():l.toString(e);if(/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+function(e){var t=41;if(e.length<t)return e;return e.substr(0,t-3)+"..."}(t)+">, no stack trace)"}function V(){return"function"==typeof $}var H=function(){return!1},K=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function W(e){var t=e.match(K);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function G(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);$(this,G),t>32&&this.uncycle()}l.inherits(G,Error),t.CapturedTrace=G,G.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},n=0,i=this;void 0!==i;++n)t.push(i),i=i._parent;for(n=(e=this._length=n)-1;n>=0;--n){var a=t[n].stack;void 0===r[a]&&(r[a]=n)}for(n=0;n<e;++n){var o=r[t[n].stack];if(void 0!==o&&o!==n){o>0&&(t[o-1]._parent=void 0,t[o-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var s=n>0?t[n-1]:this;o<e-1?(s._parent=t[o+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var c=s._length+1,l=n-2;l>=0;--l)t[l]._length=c,c++;return}}}},G.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=z(e),r=t.message,n=[t.stack],i=this;void 0!==i;)n.push(B(i.stack.split("\n"))),i=i._parent;!function(e){for(var t=e[0],r=1;r<e.length;++r){for(var n=e[r],i=t.length-1,a=t[i],o=-1,s=n.length-1;s>=0;--s)if(n[s]===a){o=s;break}for(s=o;s>=0;--s){var c=n[s];if(t[i]!==c)break;t.pop(),i--}t=n}}(n),function(e){for(var t=0;t<e.length;++t)(0===e[t].length||t+1<e.length&&e[t][0]===e[t+1][0])&&(e.splice(t,1),t--)}(n),l.notEnumerableProp(e,"stack",function(e,t){for(var r=0;r<t.length-1;++r)t[r].push("From previous event:"),t[r]=t[r].join("\n");return r<t.length&&(t[r]=t[r].join("\n")),e+"\n"+t.join("\n")}(r,n)),l.notEnumerableProp(e,"__stackCleaned__",!0)}};var $=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():J(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,m=e,g=t;var r=Error.captureStackTrace;return H=function(e){return d.test(e)},function(e,t){Error.stackTraceLimit+=6,r(e,t),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return m=/@/,g=t,_=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){n="stack"in e}return!("stack"in i)&&n&&"number"==typeof Error.stackTraceLimit?(m=e,g=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6}):(g=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?J(t):t.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(a=function(e){console.warn(e)},l.isNode&&process.stderr.isTTY?a=function(e,t){var r=t?"":"";console.warn(r+e+"\n")}:l.isNode||"string"!=typeof(new Error).stack||(a=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var Y={warnings:y,longStackTraces:!1,cancellation:!1,monitoring:!1};return v&&e.longStackTraces(),{longStackTraces:function(){return Y.longStackTraces},warnings:function(){return Y.warnings},cancellation:function(){return Y.cancellation},monitoring:function(){return Y.monitoring},propagateFromFunction:function(){return O},boundValueFunction:function(){return R},checkForgottenReturns:function(e,t,r,n,i){if(void 0===e&&null!==t&&b){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=" ");var a="",o="";if(t._trace){for(var s=t._trace.stack.split("\n"),c=B(s),l=c.length-1;l>=0;--l){var u=c[l];if(!p.test(u)){var d=u.match(f);d&&(a="at "+d[1]+":"+d[2]+":"+d[3]+" ");break}}if(c.length>0){var m=c[0];for(l=0;l<s.length;++l)if(s[l]===m){l>0&&(o="\n"+s[l-1]);break}}}var g="a promise was created in a "+r+"handler "+a+"but was not returned from it, see http://goo.gl/rRqMUw"+o;n._warn(g,!0,t)}},setBounds:function(e,t){if(V()){for(var r,n,i=e.stack.split("\n"),a=t.stack.split("\n"),o=-1,s=-1,c=0;c<i.length;++c){if(l=W(i[c])){r=l.fileName,o=l.line;break}}for(c=0;c<a.length;++c){var l;if(l=W(a[c])){n=l.fileName,s=l.line;break}}o<0||s<0||!r||!n||r!==n||o>=s||(H=function(e){if(d.test(e))return!0;var t=W(e);return!!(t&&t.fileName===r&&o<=t.line&&t.line<=s)})}},warn:j,deprecated:function(e,t){var r=e+" is deprecated and will be removed in a future version.";return t&&(r+=" Use "+t+" instead."),j(r)},CapturedTrace:G,fireDomEvent:x,fireGlobalEvent:E}}},45632:e=>{"use strict";e.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(r){return r instanceof e&&r.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:r},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(r,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:e},void 0);var t=arguments[1];return this.caught(e,(function(){throw t}))},e.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof e&&r.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:r},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();return this.caught(r,(function(){return n}))}}},6574:e=>{"use strict";e.exports=function(e,t){var r=e.reduce,n=e.all;function i(){return n(this)}e.prototype.each=function(e){return r(this,e,t,0)._then(i,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,n){return r(e,n,t,0)._then(i,void 0,void 0,e,void 0)},e.mapSeries=function(e,n){return r(e,n,t,t)}}},57621:(e,t,r)=>{"use strict";var n,i,a=r(89571),o=a.freeze,s=r(75942),c=s.inherits,l=s.notEnumerableProp;function u(e,t){function r(n){if(!(this instanceof r))return new r(n);l(this,"message","string"==typeof n?n:t),l(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return c(r,Error),r}var d=u("Warning","warning"),p=u("CancellationError","cancellation error"),f=u("TimeoutError","timeout error"),m=u("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(e){n=u("TypeError","type error"),i=u("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),_=0;_<g.length;++_)"function"==typeof Array.prototype[g[_]]&&(m.prototype[g[_]]=Array.prototype[g[_]]);a.defineProperty(m.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),m.prototype.isOperational=!0;var h=0;function y(e){if(!(this instanceof y))return new y(e);l(this,"name","OperationalError"),l(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(l(this,"message",e.message),l(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}m.prototype.toString=function(){var e=Array(4*h+1).join(" "),t="\n"+e+"AggregateError of:\n";h++,e=Array(4*h+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),a=0;a<i.length;++a)i[a]=e+i[a];t+=(n=i.join("\n"))+"\n"}return h--,t},c(y,Error);var v=Error.__BluebirdErrorTypes__;v||(v=o({CancellationError:p,TimeoutError:f,OperationalError:y,RejectionError:y,AggregateError:m}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:v,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error,TypeError:n,RangeError:i,CancellationError:v.CancellationError,OperationalError:v.OperationalError,TimeoutError:v.TimeoutError,AggregateError:v.AggregateError,Warning:d}},89571:e=>{var t=function(){"use strict";return void 0===this}();if(t)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:t,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!(r&&!r.writable&&!r.set)}};else{var r={}.hasOwnProperty,n={}.toString,i={}.constructor.prototype,a=function(e){var t=[];for(var n in e)r.call(e,n)&&t.push(n);return t};e.exports={isArray:function(e){try{return"[object Array]"===n.call(e)}catch(e){return!1}},keys:a,names:a,defineProperty:function(e,t,r){return e[t]=r.value,e},getDescriptor:function(e,t){return{value:e[t]}},freeze:function(e){return e},getPrototypeOf:function(e){try{return Object(e).constructor.prototype}catch(e){return i}},isES5:t,propertyIsWritable:function(){return!0}}}},66777:e=>{"use strict";e.exports=function(e,t){var r=e.map;e.prototype.filter=function(e,n){return r(this,e,n,t)},e.filter=function(e,n,i){return r(e,n,i,t)}}},87707:(e,t,r)=>{"use strict";e.exports=function(e,t){var n=r(75942),i=e.CancellationError,a=n.errorObj;function o(e,t,r){this.promise=e,this.type=t,this.handler=r,this.called=!1,this.cancelPromise=null}function s(e){this.finallyHandler=e}function c(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function l(){return d.call(this,this.promise._target()._settledValue())}function u(e){if(!c(this,e))return a.e=e,a}function d(r){var n=this.promise,o=this.handler;if(!this.called){this.called=!0;var d=this.isFinallyHandler()?o.call(n._boundValue()):o.call(n._boundValue(),r);if(void 0!==d){n._setReturnedNonUndefined();var p=t(d,n);if(p instanceof e){if(null!=this.cancelPromise){if(p._isCancelled()){var f=new i("late cancellation observer");return n._attachExtraTrace(f),a.e=f,a}p.isPending()&&p._attachCancellationCallback(new s(this))}return p._then(l,u,void 0,this,void 0)}}}return n.isRejected()?(c(this),a.e=r,a):(c(this),r)}return o.prototype.isFinallyHandler=function(){return 0===this.type},s.prototype._resultCancelled=function(){c(this.finallyHandler)},e.prototype._passThrough=function(e,t,r,n){return"function"!=typeof e?this.then():this._then(r,n,void 0,new o(this,t,e),void 0)},e.prototype.lastly=e.prototype.finally=function(e){return this._passThrough(e,0,d,d)},e.prototype.tap=function(e){return this._passThrough(e,1,d)},o}},60687:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i,a,o){var s=r(57621).TypeError,c=r(75942),l=c.errorObj,u=c.tryCatch,d=[];function p(t,r,i,a){if(o.cancellation()){var s=new e(n),c=this._finallyPromise=new e(n);this._promise=s.lastly((function(){return c})),s._captureStackTrace(),s._setOnCancel(this)}else{(this._promise=new e(n))._captureStackTrace()}this._stack=a,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(d):d,this._yieldedPromise=null,this._cancellationPhase=!1}c.inherits(p,a),p.prototype._isResolved=function(){return null===this._promise},p.prototype._cleanup=function(){this._promise=this._generator=null,o.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},p.prototype._promiseCancelled=function(){if(!this._isResolved()){var t;if(void 0!==this._generator.return)this._promise._pushContext(),t=u(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=u(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},p.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=u(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},p.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=u(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},p.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},p.prototype.promise=function(){return this._promise},p.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},p.prototype._continue=function(t){var r=this._promise;if(t===l)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(t.e,!1);var n=t.value;if(!0===t.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var a=i(n,this._promise);if(a instanceof e||(a=function(t,r,n){for(var a=0;a<r.length;++a){n._pushContext();var o=u(r[a])(t);if(n._popContext(),o===l){n._pushContext();var s=e.reject(l.e);return n._popContext(),s}var c=i(o,n);if(c instanceof e)return c}return null}(a,this._yieldHandlers,this._promise),null!==a)){var o=(a=a._target())._bitField;0==(50397184&o)?(this._yieldedPromise=a,a._proxy(this,null)):0!=(33554432&o)?e._async.invoke(this._promiseFulfilled,this,a._value()):0!=(16777216&o)?e._async.invoke(this._promiseRejected,this,a._reason()):this._promiseCancelled()}else this._promiseRejected(new s("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",n)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},e.coroutine=function(e,t){if("function"!=typeof e)throw new s("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(t).yieldHandler,n=p,i=(new Error).stack;return function(){var t=e.apply(this,arguments),a=new n(void 0,void 0,r,i),o=a.promise();return a._generator=t,a._promiseFulfilled(void 0),o}},e.coroutine.addYieldHandler=function(e){if("function"!=typeof e)throw new s("expecting a function but got "+c.classString(e));d.push(e)},e.spawn=function(r){if(o.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof r)return t("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new p(r,this),i=n.promise();return n._run(e.spawn),i}}},17717:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i,a,o){var s,c=r(75942),l=c.canEvaluate,u=c.tryCatch,d=c.errorObj;if(l){for(var p=function(e){return new Function("value","holder"," \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g,e))},f=function(e){return new Function("promise","holder"," \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g,e))},m=function(t){for(var r=new Array(t),n=0;n<r.length;++n)r[n]="this.p"+(n+1);var i=r.join(" = ")+" = null;",o="var promise;\n"+r.map((function(e){return" \n promise = "+e+"; \n if (promise instanceof Promise) { \n promise.cancel(); \n } \n "})).join("\n"),s=r.join(", "),c="Holder$"+t,l="return function(tryCatch, errorObj, Promise, async) { \n 'use strict'; \n function [TheName](fn) { \n [TheProperties] \n this.fn = fn; \n this.asyncNeeded = true; \n this.now = 0; \n } \n \n [TheName].prototype._callFunction = function(promise) { \n promise._pushContext(); \n var ret = tryCatch(this.fn)([ThePassedArguments]); \n promise._popContext(); \n if (ret === errorObj) { \n promise._rejectCallback(ret.e, false); \n } else { \n promise._resolveCallback(ret); \n } \n }; \n \n [TheName].prototype.checkFulfillment = function(promise) { \n var now = ++this.now; \n if (now === [TheTotal]) { \n if (this.asyncNeeded) { \n async.invoke(this._callFunction, this, promise); \n } else { \n this._callFunction(promise); \n } \n \n } \n }; \n \n [TheName].prototype._resultCancelled = function() { \n [CancellationCode] \n }; \n \n return [TheName]; \n }(tryCatch, errorObj, Promise, async); \n ";return l=l.replace(/\[TheName\]/g,c).replace(/\[TheTotal\]/g,t).replace(/\[ThePassedArguments\]/g,s).replace(/\[TheProperties\]/g,i).replace(/\[CancellationCode\]/g,o),new Function("tryCatch","errorObj","Promise","async",l)(u,d,e,a)},g=[],_=[],h=[],y=0;y<8;++y)g.push(m(y+1)),_.push(p(y+1)),h.push(f(y+1));s=function(e){this._reject(e)}}e.join=function(){var r,a=arguments.length-1;if(a>0&&"function"==typeof arguments[a]&&(r=arguments[a],a<=8&&l)){(x=new e(i))._captureStackTrace();for(var u=new(0,g[a-1])(r),d=_,p=0;p<a;++p){var f=n(arguments[p],x);if(f instanceof e){var m=(f=f._target())._bitField;0==(50397184&m)?(f._then(d[p],s,void 0,x,u),h[p](f,u),u.asyncNeeded=!1):0!=(33554432&m)?d[p].call(x,f._value(),u):0!=(16777216&m)?x._reject(f._reason()):x._cancel()}else d[p].call(x,f,u)}if(!x._isFateSealed()){if(u.asyncNeeded){var y=o();null!==y&&(u.fn=c.domainBind(y,u.fn))}x._setAsyncGuaranteed(),x._setOnCancel(u)}return x}for(var v=arguments.length,b=new Array(v),k=0;k<v;++k)b[k]=arguments[k];r&&b.pop();var x=new t(b).promise();return void 0!==r?x.spread(r):x}}},6343:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i,a,o){var s=e._getDomain,c=r(75942),l=c.tryCatch,u=c.errorObj,d=e._async;function p(e,t,r,n){this.constructor$(e),this._promise._captureStackTrace();var i=s();this._callback=null===i?t:c.domainBind(i,t),this._preservedValues=n===a?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],d.invoke(this._asyncInit,this,void 0)}function f(t,r,i,a){if("function"!=typeof r)return n("expecting a function but got "+c.classString(r));var o=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+c.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+c.classString(i.concurrency)));o=i.concurrency}return new p(t,r,o="number"==typeof o&&isFinite(o)&&o>=1?o:0,a).promise()}c.inherits(p,t),p.prototype._asyncInit=function(){this._init$(void 0,-2)},p.prototype._init=function(){},p.prototype._promiseFulfilled=function(t,r){var n=this._values,a=this.length(),s=this._preservedValues,c=this._limit;if(r<0){if(n[r=-1*r-1]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return n[r]=t,this._queue.push(r),!1;null!==s&&(s[r]=t);var d=this._promise,p=this._callback,f=d._boundValue();d._pushContext();var m=l(p).call(f,t,r,a),g=d._popContext();if(o.checkForgottenReturns(m,g,null!==s?"Promise.filter":"Promise.map",d),m===u)return this._reject(m.e),!0;var _=i(m,this._promise);if(_ instanceof e){var h=(_=_._target())._bitField;if(0==(50397184&h))return c>=1&&this._inFlight++,n[r]=_,_._proxy(this,-1*(r+1)),!1;if(0==(33554432&h))return 0!=(16777216&h)?(this._reject(_._reason()),!0):(this._cancel(),!0);m=_._value()}n[r]=m}return++this._totalResolved>=a&&(null!==s?this._filter(n,s):this._resolve(n),!0)},p.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight<t;){if(this._isResolved())return;var n=e.pop();this._promiseFulfilled(r[n],n)}},p.prototype._filter=function(e,t){for(var r=t.length,n=new Array(r),i=0,a=0;a<r;++a)e[a]&&(n[i++]=t[a]);n.length=i,this._resolve(n)},p.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(e,t){return f(this,e,t,null)},e.map=function(e,t,r,n){return f(e,t,r,n)}}},96926:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i,a){var o=r(75942),s=o.tryCatch;e.method=function(r){if("function"!=typeof r)throw new e.TypeError("expecting a function but got "+o.classString(r));return function(){var n=new e(t);n._captureStackTrace(),n._pushContext();var i=s(r).apply(this,arguments),o=n._popContext();return a.checkForgottenReturns(i,o,"Promise.method",n),n._resolveFromSyncValue(i),n}},e.attempt=e.try=function(r){if("function"!=typeof r)return i("expecting a function but got "+o.classString(r));var n,c=new e(t);if(c._captureStackTrace(), method
[all...]
H A DJS_API_CHECK.js1 /*! version:1.0.0 */(()=>{var __webpack_modules__={49792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvFormatterStream=void 0;const n=r(2203),i=r(17693);class a extends n.Transform{constructor(e){super({writableObjectMode:e.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=e,this.rowFormatter=new i.RowFormatter(e),this.hasWrittenBOM=!e.writeBOM}transform(e){return this.rowFormatter.rowTransform=e,this}_transform(e,t,r){let n=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(e,((e,t)=>e?(n=!0,r(e)):(t&&t.forEach((e=>{this.push(Buffer.from(e,"utf8"))})),n=!0,r())))}catch(e){if(n)throw e;r(e)}}_flush(e){this.rowFormatter.finish(((t,r)=>t?e(t):(r&&r.forEach((e=>{this.push(Buffer.from(e,"utf8"))})),e())))}}t.CsvFormatterStream=a},68502:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormatterOptions=void 0;t.FormatterOptions=class{constructor(e={}){var t;this.objectMode=!0,this.delimiter=",",this.rowDelimiter="\n",this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\ufeff",this.alwaysWriteHeaders=!1,Object.assign(this,e||{}),void 0===(null==e?void 0:e.quoteHeaders)&&(this.quoteHeaders=this.quoteColumns),!0===(null==e?void 0:e.quote)?this.quote='"':!1===(null==e?void 0:e.quote)&&(this.quote=""),"string"!=typeof(null==e?void 0:e.escape)&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&(null===(t=e.writeHeaders)||void 0===t||t),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},68091:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=void 0;const i=n(r(87914)),a=n(r(74733)),o=n(r(10912));t.FieldFormatter=class{constructor(e){this._headers=null,this.formatterOptions=e,null!==e.headers&&(this.headers=e.headers),this.REPLACE_REGEXP=new RegExp(e.quote,"g");const t=`[${e.delimiter}${o.default(e.rowDelimiter)}|\r|\n]`;this.ESCAPE_REGEXP=new RegExp(t)}set headers(e){this._headers=e}shouldQuote(e,t){const r=t?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return i.default(r)?r:Array.isArray(r)?r[e]:null!==this._headers&&r[this._headers[e]]}format(e,t,r){const n=`${a.default(e)?"":e}`.replace(/\0/g,""),{formatterOptions:i}=this;if(""!==i.quote){if(-1!==n.indexOf(i.quote))return this.quoteField(n.replace(this.REPLACE_REGEXP,i.escapedQuote))}return-1!==n.search(this.ESCAPE_REGEXP)||this.shouldQuote(t,r)?this.quoteField(n):n}quoteField(e){const{quote:t}=this.formatterOptions;return`${t}${e}${t}`}}},50803:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowFormatter=void 0;const i=n(r(85710)),a=n(r(8142)),o=r(68091),s=r(90565);class c{constructor(e){this.rowCount=0,this.formatterOptions=e,this.fieldFormatter=new o.FieldFormatter(e),this.headers=e.headers,this.shouldWriteHeaders=e.shouldWriteHeaders,this.hasWrittenHeaders=!1,null!==this.headers&&(this.fieldFormatter.headers=this.headers),e.transform&&(this.rowTransform=e.transform)}static isRowHashArray(e){return!!Array.isArray(e)&&(Array.isArray(e[0])&&2===e[0].length)}static isRowArray(e){return Array.isArray(e)&&!this.isRowHashArray(e)}static gatherHeaders(e){return c.isRowHashArray(e)?e.map((e=>e[0])):Array.isArray(e)?e:Object.keys(e)}static createTransform(e){return s.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(e){return r(e)}return r(null,n)}:(t,r)=>{e(t,r)}}set rowTransform(e){if(!i.default(e))throw new TypeError("The transform should be a function");this._rowTransform=c.createTransform(e)}format(e,t){this.callTransformer(e,((r,n)=>{if(r)return t(r);if(!e)return t(null);const i=[];if(n){const{shouldFormatColumns:e,headers:t}=this.checkHeaders(n);if(this.shouldWriteHeaders&&t&&!this.hasWrittenHeaders&&(i.push(this.formatColumns(t,!0)),this.hasWrittenHeaders=!0),e){const e=this.gatherColumns(n);i.push(this.formatColumns(e,!1))}}return t(null,i)}))}finish(e){const t=[];if(this.formatterOptions.alwaysWriteHeaders&&0===this.rowCount){if(!this.headers)return e(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));t.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&t.push(this.formatterOptions.rowDelimiter),e(null,t)}checkHeaders(e){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const t=c.gatherHeaders(e);return this.headers=t,this.fieldFormatter.headers=t,this.shouldWriteHeaders?{shouldFormatColumns:!a.default(t,e),headers:t}:{shouldFormatColumns:!0,headers:null}}gatherColumns(e){if(null===this.headers)throw new Error("Headers is currently null");return Array.isArray(e)?c.isRowHashArray(e)?this.headers.map(((t,r)=>{const n=e[r];return n?n[1]:""})):c.isRowArray(e)&&!this.shouldWriteHeaders?e:this.headers.map(((t,r)=>e[r])):this.headers.map((t=>e[t]))}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}formatColumns(e,t){const r=e.map(((e,r)=>this.fieldFormatter.format(e,r,t))).join(this.formatterOptions.delimiter),{rowCount:n}=this;return this.rowCount+=1,n?[this.formatterOptions.rowDelimiter,r].join(""):r}}t.RowFormatter=c},17693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=t.RowFormatter=void 0;var n=r(50803);Object.defineProperty(t,"RowFormatter",{enumerable:!0,get:function(){return n.RowFormatter}});var i=r(68091);Object.defineProperty(t,"FieldFormatter",{enumerable:!0,get:function(){return i.FieldFormatter}})},1696:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.writeToPath=t.writeToString=t.writeToBuffer=t.writeToStream=t.write=t.format=t.FormatterOptions=t.CsvFormatterStream=void 0;const s=r(39023),c=r(2203),l=a(r(79896)),u=r(68502),d=r(49792);o(r(90565),t);var p=r(49792);Object.defineProperty(t,"CsvFormatterStream",{enumerable:!0,get:function(){return p.CsvFormatterStream}});var f=r(68502);Object.defineProperty(t,"FormatterOptions",{enumerable:!0,get:function(){return f.FormatterOptions}}),t.format=e=>new d.CsvFormatterStream(new u.FormatterOptions(e)),t.write=(e,r)=>{const n=t.format(r),i=s.promisify(((e,t)=>{n.write(e,void 0,t)}));return e.reduce(((e,t)=>e.then((()=>i(t)))),Promise.resolve()).then((()=>n.end())).catch((e=>{n.emit("error",e)})),n},t.writeToStream=(e,r,n)=>t.write(r,n).pipe(e),t.writeToBuffer=(e,r={})=>{const n=[],i=new c.Writable({write(e,t,r){n.push(e),r()}});return new Promise(((a,o)=>{i.on("error",o).on("finish",(()=>a(Buffer.concat(n)))),t.write(e,r).pipe(i)}))},t.writeToString=(e,r)=>t.writeToBuffer(e,r).then((e=>e.toString())),t.writeToPath=(e,r,n)=>{const i=l.createWriteStream(e,{encoding:"utf8"});return t.write(r,n).pipe(i)}},90565:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncTransform=void 0,t.isSyncTransform=e=>1===e.length},68273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvParserStream=void 0;const n=r(13193),i=r(2203),a=r(55698),o=r(65856);class s extends i.Transform{constructor(e){super({objectMode:e.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=e,this.parser=new o.Parser(e),this.headerTransformer=new a.HeaderTransformer(e),this.decoder=new n.StringDecoder(e.encoding),this.rowTransformerValidator=new a.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(e){return this.rowTransformerValidator.rowTransform=e,this}validate(e){return this.rowTransformerValidator.rowValidator=e,this}emit(e,...t){return"end"===e?(this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1):super.emit(e,...t)}_transform(e,t,r){if(this.hasHitRowLimit)return r();const n=s.wrapDoneCallback(r);try{const{lines:t}=this,r=t+this.decoder.write(e),i=this.parse(r,!0);return this.processRows(i,n)}catch(e){return n(e)}}_flush(e){const t=s.wrapDoneCallback(e);if(this.hasHitRowLimit)return t();try{const e=this.lines+this.decoder.end(),r=this.parse(e,!1);return this.processRows(r,t)}catch(e){return t(e)}}parse(e,t){if(!e)return[];const{line:r,rows:n}=this.parser.parse(e,t);return this.lines=r,n}processRows(e,t){const r=e.length,n=i=>{const a=e=>e?t(e):i%100!=0?n(i+1):void setImmediate((()=>n(i+1)));if(this.checkAndEmitHeaders(),i>=r||this.hasHitRowLimit)return t();if(this.parsedLineCount+=1,this.shouldSkipLine)return a();const o=e[i];this.rowCount+=1,this.parsedRowCount+=1;const s=this.rowCount;return this.transformRow(o,((e,t)=>{if(e)return this.rowCount-=1,a(e);if(!t)return a(new Error("expected transform result"));if(t.isValid){if(t.row)return this.pushRow(t.row,a)}else this.emit("data-invalid",t.row,s,t.reason);return a()}))};n(0)}transformRow(e,t){try{this.headerTransformer.transform(e,((r,n)=>r?t(r):n?n.isValid?n.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(n.row,t):this.skipRow(t):(this.rowCount-=1,this.parsedRowCount-=1,t(null,{row:null,isValid:!0})):this.shouldEmitRows?t(null,{isValid:!1,row:e}):this.skipRow(t):t(new Error("Expected result from header transform"))))}catch(e){t(e)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(e){return this.rowCount-=1,e(null,{row:null,isValid:!0})}pushRow(e,t){try{this.parserOptions.objectMode?this.push(e):this.push(JSON.stringify(e)),t()}catch(e){t(e)}}static wrapDoneCallback(e){let t=!1;return(r,...n)=>{if(r){if(t)throw r;return t=!0,void e(r)}e(...n)}}}t.CsvParserStream=s},96793:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserOptions=void 0;const i=n(r(10912)),a=n(r(74733));t.ParserOptions=class{constructor(e){var t;if(this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,e||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=null!==(t=this.escape)&&void 0!==t?t:this.quote,this.supportsComments=!a.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},77190:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseString=t.parseFile=t.parseStream=t.parse=t.ParserOptions=t.CsvParserStream=void 0;const s=a(r(79896)),c=r(2203),l=r(96793),u=r(68273);o(r(50331),t);var d=r(68273);Object.defineProperty(t,"CsvParserStream",{enumerable:!0,get:function(){return d.CsvParserStream}});var p=r(96793);Object.defineProperty(t,"ParserOptions",{enumerable:!0,get:function(){return p.ParserOptions}}),t.parse=e=>new u.CsvParserStream(new l.ParserOptions(e)),t.parseStream=(e,t)=>e.pipe(new u.CsvParserStream(new l.ParserOptions(t))),t.parseFile=(e,t={})=>s.createReadStream(e).pipe(new u.CsvParserStream(new l.ParserOptions(t))),t.parseString=(e,t)=>{const r=new c.Readable;return r.push(e),r.push(null),r.pipe(new u.CsvParserStream(new l.ParserOptions(t)))}},1381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;const n=r(77366),i=r(57291),a=r(7757);class o{constructor(e){this.parserOptions=e,this.rowParser=new i.RowParser(this.parserOptions)}static removeBOM(e){return e&&65279===e.charCodeAt(0)?e.slice(1):e}parse(e,t){const r=new n.Scanner({line:o.removeBOM(e),parserOptions:this.parserOptions,hasMoreData:t});return this.parserOptions.supportsComments?this.parseWithComments(r):this.parseWithoutComments(r)}parseWithoutComments(e){const t=[];let r=!0;for(;r;)r=this.parseRow(e,t);return{line:e.line,rows:t}}parseWithComments(e){const{parserOptions:t}=this,r=[];for(let n=e.nextCharacterToken;null!==n;n=e.nextCharacterToken)if(a.Token.isTokenComment(n,t)){if(null===e.advancePastLine())return{line:e.lineFromCursor,rows:r};if(!e.hasMoreCharacters)return{line:e.lineFromCursor,rows:r};e.truncateToCursor()}else if(!this.parseRow(e,r))break;return{line:e.line,rows:r}}parseRow(e,t){if(!e.nextNonSpaceToken)return!1;const r=this.rowParser.parse(e);return null!==r&&(this.parserOptions.ignoreEmpty&&i.RowParser.isEmptyRow(r)||t.push(r),!0)}}t.Parser=o},57291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RowParser=void 0;const n=r(95779),i=r(7757);t.RowParser=class{constructor(e){this.parserOptions=e,this.columnParser=new n.ColumnParser(e)}static isEmptyRow(e){return""===e.join("").replace(/\s+/g,"")}parse(e){const{parserOptions:t}=this,{hasMoreData:r}=e,n=e,a=[];let o=this.getStartToken(n,a);for(;o;){if(i.Token.isTokenRowDelimiter(o))return n.advancePastToken(o),!n.hasMoreCharacters&&i.Token.isTokenCarriageReturn(o,t)&&r?null:(n.truncateToCursor(),a);if(!this.shouldSkipColumnParse(n,o,a)){const e=this.columnParser.parse(n);if(null===e)return null;a.push(e)}o=n.nextNonSpaceToken}return r?null:(n.truncateToCursor(),a)}getStartToken(e,t){const r=e.nextNonSpaceToken;return null!==r&&i.Token.isTokenDelimiter(r,this.parserOptions)?(t.push(""),e.nextNonSpaceToken):r}shouldSkipColumnParse(e,t,r){const{parserOptions:n}=this;if(i.Token.isTokenDelimiter(t,n)){e.advancePastToken(t);const a=e.nextCharacterToken;if(!e.hasMoreCharacters||null!==a&&i.Token.isTokenRowDelimiter(a))return r.push(""),!0;if(null!==a&&i.Token.isTokenDelimiter(a,n))return r.push(""),!0}return!1}}},77366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scanner=void 0;const n=r(7757),i=/((?:\r\n)|\n|\r)/;t.Scanner=class{constructor(e){this.cursor=0,this.line=e.line,this.lineLength=this.line.length,this.parserOptions=e.parserOptions,this.hasMoreData=e.hasMoreData,this.cursor=e.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:e}=this,t=this.parserOptions.NEXT_TOKEN_REGEXP;if(-1===e.search(t))return null;const r=t.exec(e);if(null==r)return null;const i=r[1],a=this.cursor+(r.index||0);return new n.Token({token:i,startCursor:a,endCursor:a+i.length-1})}get nextCharacterToken(){const{cursor:e,lineLength:t}=this;return t<=e?null:new n.Token({token:this.line[e],startCursor:e,endCursor:e})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const e=i.exec(this.lineFromCursor);return e?(this.cursor+=(e.index||0)+e[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(e){return this.cursor=e,this}advanceToToken(e){return this.cursor=e.startCursor,this}advancePastToken(e){return this.cursor=e.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},7757:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Token=void 0;t.Token=class{constructor(e){this.token=e.token,this.startCursor=e.startCursor,this.endCursor=e.endCursor}static isTokenRowDelimiter(e){const t=e.token;return"\r"===t||"\n"===t||"\r\n"===t}static isTokenCarriageReturn(e,t){return e.token===t.carriageReturn}static isTokenComment(e,t){return t.supportsComments&&!!e&&e.token===t.comment}static isTokenEscapeCharacter(e,t){return e.token===t.escapeChar}static isTokenQuote(e,t){return e.token===t.quote}static isTokenDelimiter(e,t){return e.token===t.delimiter}}},9651:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnFormatter=void 0;t.ColumnFormatter=class{constructor(e){e.trim?this.format=e=>e.trim():e.ltrim?this.format=e=>e.trimLeft():e.rtrim?this.format=e=>e.trimRight():this.format=e=>e}}},25454:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnParser=void 0;const n=r(73353),i=r(13830),a=r(7757);t.ColumnParser=class{constructor(e){this.parserOptions=e,this.quotedColumnParser=new i.QuotedColumnParser(e),this.nonQuotedColumnParser=new n.NonQuotedColumnParser(e)}parse(e){const{nextNonSpaceToken:t}=e;return null!==t&&a.Token.isTokenQuote(t,this.parserOptions)?(e.advanceToToken(t),this.quotedColumnParser.parse(e)):this.nonQuotedColumnParser.parse(e)}}},73353:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonQuotedColumnParser=void 0;const n=r(9651),i=r(7757);t.NonQuotedColumnParser=class{constructor(e){this.parserOptions=e,this.columnFormatter=new n.ColumnFormatter(e)}parse(e){if(!e.hasMoreCharacters)return null;const{parserOptions:t}=this,r=[];let n=e.nextCharacterToken;for(;n&&(!i.Token.isTokenDelimiter(n,t)&&!i.Token.isTokenRowDelimiter(n));n=e.nextCharacterToken)r.push(n.token),e.advancePastToken(n);return this.columnFormatter.format(r.join(""))}}},13830:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotedColumnParser=void 0;const n=r(9651),i=r(7757);t.QuotedColumnParser=class{constructor(e){this.parserOptions=e,this.columnFormatter=new n.ColumnFormatter(e)}parse(e){if(!e.hasMoreCharacters)return null;const t=e.cursor,{foundClosingQuote:r,col:n}=this.gatherDataBetweenQuotes(e);if(!r){if(e.advanceTo(t),!e.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${e.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(e),n}gatherDataBetweenQuotes(e){const{parserOptions:t}=this;let r=!1,n=!1;const a=[];let o=e.nextCharacterToken;for(;!n&&null!==o;o=e.nextCharacterToken){const s=i.Token.isTokenQuote(o,t);if(!r&&s)r=!0;else if(r)if(i.Token.isTokenEscapeCharacter(o,t)){e.advancePastToken(o);const r=e.nextCharacterToken;null!==r&&(i.Token.isTokenQuote(r,t)||i.Token.isTokenEscapeCharacter(r,t))?(a.push(r.token),o=r):s?n=!0:a.push(o.token)}else s?n=!0:a.push(o.token);e.advancePastToken(o)}return{col:this.columnFormatter.format(a.join("")),foundClosingQuote:n}}checkForMalformedColumn(e){const{parserOptions:t}=this,{nextNonSpaceToken:r}=e;if(r){const n=i.Token.isTokenDelimiter(r,t),a=i.Token.isTokenRowDelimiter(r);if(!n&&!a){const n=e.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${t.escapedDelimiter}' OR new line got: '${r.token}'. at '${n}`)}e.advanceToToken(r)}else e.hasMoreData||e.advancePastLine()}}},95779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnFormatter=t.QuotedColumnParser=t.NonQuotedColumnParser=t.ColumnParser=void 0;var n=r(25454);Object.defineProperty(t,"ColumnParser",{enumerable:!0,get:function(){return n.ColumnParser}});var i=r(73353);Object.defineProperty(t,"NonQuotedColumnParser",{enumerable:!0,get:function(){return i.NonQuotedColumnParser}});var a=r(13830);Object.defineProperty(t,"QuotedColumnParser",{enumerable:!0,get:function(){return a.QuotedColumnParser}});var o=r(9651);Object.defineProperty(t,"ColumnFormatter",{enumerable:!0,get:function(){return o.ColumnFormatter}})},65856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotedColumnParser=t.NonQuotedColumnParser=t.ColumnParser=t.Token=t.Scanner=t.RowParser=t.Parser=void 0;var n=r(1381);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return n.Parser}});var i=r(57291);Object.defineProperty(t,"RowParser",{enumerable:!0,get:function(){return i.RowParser}});var a=r(77366);Object.defineProperty(t,"Scanner",{enumerable:!0,get:function(){return a.Scanner}});var o=r(7757);Object.defineProperty(t,"Token",{enumerable:!0,get:function(){return o.Token}});var s=r(95779);Object.defineProperty(t,"ColumnParser",{enumerable:!0,get:function(){return s.ColumnParser}}),Object.defineProperty(t,"NonQuotedColumnParser",{enumerable:!0,get:function(){return s.NonQuotedColumnParser}}),Object.defineProperty(t,"QuotedColumnParser",{enumerable:!0,get:function(){return s.QuotedColumnParser}})},57854:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderTransformer=void 0;const i=n(r(58254)),a=n(r(85710)),o=n(r(90879)),s=n(r(31324));t.HeaderTransformer=class{constructor(e){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=e,!0===e.headers?this.shouldUseFirstRow=!0:Array.isArray(e.headers)?this.setHeaders(e.headers):a.default(e.headers)&&(this.headersTransform=e.headers)}transform(e,t){return this.shouldMapRow(e)?t(null,this.processRow(e)):t(null,{row:null,isValid:!0})}shouldMapRow(e){const{parserOptions:t}=this;if(!this.headersTransform&&t.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(e)){if(this.headersTransform)this.setHeaders(this.headersTransform(e));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(e)}return!1}return!0}processRow(e){if(!this.headers)return{row:e,isValid:!0};const{parserOptions:t}=this;if(!t.discardUnmappedColumns&&e.length>this.headersLength){if(!t.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${e.length}`);return{row:e,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`}}return t.strictColumnHandling&&e.length<this.headersLength?{row:e,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`}:{row:this.mapHeaders(e),isValid:!0}}mapHeaders(e){const t={},{headers:r,headersLength:n}=this;for(let a=0;a<n;a+=1){const n=r[a];if(!i.default(n)){const r=e[a];i.default(r)?t[n]="":t[n]=r}}return t}setHeaders(e){var t;const r=e.filter((e=>!!e));if(o.default(r).length!==r.length){const e=s.default(r),t=Object.keys(e).filter((t=>e[t].length>1));throw new Error(`Duplicate headers found ${JSON.stringify(t)}`)}this.headers=e,this.receivedHeaders=!0,this.headersLength=(null===(t=this.headers)||void 0===t?void 0:t.length)||0}}},77701:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowTransformerValidator=void 0;const i=n(r(85710)),a=r(50331);class o{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(e){return a.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(e){return r(e)}return r(null,n)}:e}static createValidator(e){return a.isSyncValidate(e)?(t,r)=>{r(null,{row:t,isValid:e(t)})}:(t,r)=>{e(t,((e,n,i)=>e?r(e):r(null,n?{row:t,isValid:n,reason:i}:{row:t,isValid:!1,reason:i})))}}set rowTransform(e){if(!i.default(e))throw new TypeError("The transform should be a function");this._rowTransform=o.createTransform(e)}set rowValidator(e){if(!i.default(e))throw new TypeError("The validate should be a function");this._rowValidator=o.createValidator(e)}transformAndValidate(e,t){return this.callTransformer(e,((e,r)=>e?t(e):r?this.callValidator(r,((e,n)=>e?t(e):n&&!n.isValid?t(null,{row:r,isValid:!1,reason:n.reason}):t(null,{row:r,isValid:!0}))):t(null,{row:null,isValid:!0})))}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}callValidator(e,t){return this._rowValidator?this._rowValidator(e,t):t(null,{row:e,isValid:!0})}}t.RowTransformerValidator=o},55698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderTransformer=t.RowTransformerValidator=void 0;var n=r(77701);Object.defineProperty(t,"RowTransformerValidator",{enumerable:!0,get:function(){return n.RowTransformerValidator}});var i=r(57854);Object.defineProperty(t,"HeaderTransformer",{enumerable:!0,get:function(){return i.HeaderTransformer}})},50331:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncValidate=t.isSyncTransform=void 0,t.isSyncTransform=e=>1===e.length,t.isSyncValidate=e=>1===e.length},8505:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=r(e,i)),t instanceof RegExp&&(t=r(t,i));var a=n(e,t,i);return a&&{start:a[0],end:a[1],pre:i.slice(0,a[0]),body:i.slice(a[0]+e.length,a[1]),post:i.slice(a[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function n(e,t,r){var n,i,a,o,s,c=r.indexOf(e),l=r.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(n=[],a=r.length;u>=0&&!s;)u==c?(n.push(u),c=r.indexOf(e,u+1)):1==n.length?s=[n.pop(),l]:((i=n.pop())<a&&(a=i,o=l),l=r.indexOf(t,u+1)),u=c<l&&c>=0?c:l;n.length&&(s=[a,o])}return s}e.exports=t,t.range=n},92096:(e,t,r)=>{var n;e=r.nmd(e);var i=function(e){"use strict";var t=1e7,r=7,n=9007199254740992,a=f(n),o="0123456789abcdefghijklmnopqrstuvwxyz",s="function"==typeof BigInt;function c(e,t,r,n){return void 0===e?c[0]:void 0!==t&&(10!=+t||r)?K(e,t,r,n):X(e)}function l(e,t){this.value=e,this.sign=t,this.isSmall=!1}function u(e){this.value=e,this.sign=e<0,this.isSmall=!0}function d(e){this.value=e}function p(e){return-n<e&&e<n}function f(e){return e<1e7?[e]:e<1e14?[e%1e7,Math.floor(e/1e7)]:[e%1e7,Math.floor(e/1e7)%1e7,Math.floor(e/1e14)]}function m(e){g(e);var r=e.length;if(r<4&&P(e,a)<0)switch(r){case 0:return 0;case 1:return e[0];case 2:return e[0]+e[1]*t;default:return e[0]+(e[1]+e[2]*t)*t}return e}function g(e){for(var t=e.length;0===e[--t];);e.length=t+1}function _(e){for(var t=new Array(e),r=-1;++r<e;)t[r]=0;return t}function h(e){return e>0?Math.floor(e):Math.ceil(e)}function y(e,r){var n,i,a=e.length,o=r.length,s=new Array(a),c=0,l=t;for(i=0;i<o;i++)c=(n=e[i]+r[i]+c)>=l?1:0,s[i]=n-c*l;for(;i<a;)c=(n=e[i]+c)===l?1:0,s[i++]=n-c*l;return c>0&&s.push(c),s}function v(e,t){return e.length>=t.length?y(e,t):y(t,e)}function b(e,r){var n,i,a=e.length,o=new Array(a),s=t;for(i=0;i<a;i++)n=e[i]-s+r,r=Math.floor(n/s),o[i]=n-r*s,r+=1;for(;r>0;)o[i++]=r%s,r=Math.floor(r/s);return o}function k(e,r){var n,i,a=e.length,o=r.length,s=new Array(a),c=0,l=t;for(n=0;n<o;n++)(i=e[n]-c-r[n])<0?(i+=l,c=1):c=0,s[n]=i;for(n=o;n<a;n++){if(!((i=e[n]-c)<0)){s[n++]=i;break}i+=l,s[n]=i}for(;n<a;n++)s[n]=e[n];return g(s),s}function x(e,r,n){var i,a,o=e.length,s=new Array(o),c=-r,d=t;for(i=0;i<o;i++)a=e[i]+c,c=Math.floor(a/d),a%=d,s[i]=a<0?a+d:a;return"number"==typeof(s=m(s))?(n&&(s=-s),new u(s)):new l(s,n)}function E(e,r){var n,i,a,o,s=e.length,c=r.length,l=_(s+c),u=t;for(a=0;a<s;++a){o=e[a];for(var d=0;d<c;++d)n=o*r[d]+l[a+d],i=Math.floor(n/u),l[a+d]=n-i*u,l[a+d+1]+=i}return g(l),l}function S(e,r){var n,i,a=e.length,o=new Array(a),s=t,c=0;for(i=0;i<a;i++)n=e[i]*r+c,c=Math.floor(n/s),o[i]=n-c*s;for(;c>0;)o[i++]=c%s,c=Math.floor(c/s);return o}function D(e,t){for(var r=[];t-- >0;)r.push(0);return r.concat(e)}function w(e,t){var r=Math.max(e.length,t.length);if(r<=30)return E(e,t);r=Math.ceil(r/2);var n=e.slice(r),i=e.slice(0,r),a=t.slice(r),o=t.slice(0,r),s=w(i,o),c=w(n,a),l=w(v(i,n),v(o,a)),u=v(v(s,D(k(k(l,s),c),r)),D(c,2*r));return g(u),u}function T(e,r,n){return new l(e<t?S(r,e):E(r,f(e)),n)}function C(e){var r,n,i,a,o=e.length,s=_(o+o),c=t;for(i=0;i<o;i++){n=0-(a=e[i])*a;for(var l=i;l<o;l++)r=a*e[l]*2+s[i+l]+n,n=Math.floor(r/c),s[i+l]=r-n*c;s[i+o]=n}return g(s),s}function A(e,r){var n,i,a,o,s=e.length,c=_(s),l=t;for(a=0,n=s-1;n>=0;--n)a=(o=a*l+e[n])-(i=h(o/r))*r,c[n]=0|i;return[c,0|a]}function N(e,r){var n,i=X(r);if(s)return[new d(e.value/i.value),new d(e.value%i.value)];var a,o=e.value,p=i.value;if(0===p)throw new Error("Cannot divide by zero");if(e.isSmall)return i.isSmall?[new u(h(o/p)),new u(o%p)]:[c[0],e];if(i.isSmall){if(1===p)return[e,c[0]];if(-1==p)return[e.negate(),c[0]];var y=Math.abs(p);if(y<t){a=m((n=A(o,y))[0]);var v=n[1];return e.sign&&(v=-v),"number"==typeof a?(e.sign!==i.sign&&(a=-a),[new u(a),new u(v)]):[new l(a,e.sign!==i.sign),new u(v)]}p=f(y)}var b=P(o,p);if(-1===b)return[c[0],e];if(0===b)return[c[e.sign===i.sign?1:-1],c[0]];n=o.length+p.length<=200?function(e,r){var n,i,a,o,s,c,l,u=e.length,d=r.length,p=t,f=_(r.length),g=r[d-1],h=Math.ceil(p/(2*g)),y=S(e,h),v=S(r,h);for(y.length<=u&&y.push(0),v.push(0),g=v[d-1],i=u-d;i>=0;i--){for(n=p-1,y[i+d]!==g&&(n=Math.floor((y[i+d]*p+y[i+d-1])/g)),a=0,o=0,c=v.length,s=0;s<c;s++)a+=n*v[s],l=Math.floor(a/p),o+=y[i+s]-(a-l*p),a=l,o<0?(y[i+s]=o+p,o=-1):(y[i+s]=o,o=0);for(;0!==o;){for(n-=1,a=0,s=0;s<c;s++)(a+=y[i+s]-p+v[s])<0?(y[i+s]=a+p,a=0):(y[i+s]=a,a=1);o+=a}f[i]=n}return y=A(y,h)[0],[m(f),m(y)]}(o,p):function(e,r){for(var n,i,a,o,s,c=e.length,l=r.length,u=[],d=[],p=t;c;)if(d.unshift(e[--c]),g(d),P(d,r)<0)u.push(0);else{a=d[(i=d.length)-1]*p+d[i-2],o=r[l-1]*p+r[l-2],i>l&&(a=(a+1)*p),n=Math.ceil(a/o);do{if(P(s=S(r,n),d)<=0)break;n--}while(n);u.push(n),d=k(d,s)}return u.reverse(),[m(u),m(d)]}(o,p),a=n[0];var x=e.sign!==i.sign,E=n[1],D=e.sign;return"number"==typeof a?(x&&(a=-a),a=new u(a)):a=new l(a,x),"number"==typeof E?(D&&(E=-E),E=new u(E)):E=new l(E,D),[a,E]}function P(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var r=e.length-1;r>=0;r--)if(e[r]!==t[r])return e[r]>t[r]?1:-1;return 0}function I(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function F(e,t){for(var r,n,a,o=e.prev(),s=o,c=0;s.isEven();)s=s.divide(2),c++;e:for(n=0;n<t.length;n++)if(!e.lesser(t[n])&&!(a=i(t[n]).modPow(s,e)).isUnit()&&!a.equals(o)){for(r=c-1;0!=r;r--){if((a=a.square().mod(e)).isUnit())return!1;if(a.equals(o))continue e}return!1}return!0}l.prototype=Object.create(c.prototype),u.prototype=Object.create(c.prototype),d.prototype=Object.create(c.prototype),l.prototype.add=function(e){var t=X(e);if(this.sign!==t.sign)return this.subtract(t.negate());var r=this.value,n=t.value;return t.isSmall?new l(b(r,Math.abs(n)),this.sign):new l(v(r,n),this.sign)},l.prototype.plus=l.prototype.add,u.prototype.add=function(e){var t=X(e),r=this.value;if(r<0!==t.sign)return this.subtract(t.negate());var n=t.value;if(t.isSmall){if(p(r+n))return new u(r+n);n=f(Math.abs(n))}return new l(b(n,Math.abs(r)),r<0)},u.prototype.plus=u.prototype.add,d.prototype.add=function(e){return new d(this.value+X(e).value)},d.prototype.plus=d.prototype.add,l.prototype.subtract=function(e){var t=X(e);if(this.sign!==t.sign)return this.add(t.negate());var r=this.value,n=t.value;return t.isSmall?x(r,Math.abs(n),this.sign):function(e,t,r){var n;return P(e,t)>=0?n=k(e,t):(n=k(t,e),r=!r),"number"==typeof(n=m(n))?(r&&(n=-n),new u(n)):new l(n,r)}(r,n,this.sign)},l.prototype.minus=l.prototype.subtract,u.prototype.subtract=function(e){var t=X(e),r=this.value;if(r<0!==t.sign)return this.add(t.negate());var n=t.value;return t.isSmall?new u(r-n):x(n,Math.abs(r),r>=0)},u.prototype.minus=u.prototype.subtract,d.prototype.subtract=function(e){return new d(this.value-X(e).value)},d.prototype.minus=d.prototype.subtract,l.prototype.negate=function(){return new l(this.value,!this.sign)},u.prototype.negate=function(){var e=this.sign,t=new u(-this.value);return t.sign=!e,t},d.prototype.negate=function(){return new d(-this.value)},l.prototype.abs=function(){return new l(this.value,!1)},u.prototype.abs=function(){return new u(Math.abs(this.value))},d.prototype.abs=function(){return new d(this.value>=0?this.value:-this.value)},l.prototype.multiply=function(e){var r,n,i,a=X(e),o=this.value,s=a.value,u=this.sign!==a.sign;if(a.isSmall){if(0===s)return c[0];if(1===s)return this;if(-1===s)return this.negate();if((r=Math.abs(s))<t)return new l(S(o,r),u);s=f(r)}return n=o.length,i=s.length,new l(-.012*n-.012*i+15e-6*n*i>0?w(o,s):E(o,s),u)},l.prototype.times=l.prototype.multiply,u.prototype._multiplyBySmall=function(e){return p(e.value*this.value)?new u(e.value*this.value):T(Math.abs(e.value),f(Math.abs(this.value)),this.sign!==e.sign)},l.prototype._multiplyBySmall=function(e){return 0===e.value?c[0]:1===e.value?this:-1===e.value?this.negate():T(Math.abs(e.value),this.value,this.sign!==e.sign)},u.prototype.multiply=function(e){return X(e)._multiplyBySmall(this)},u.prototype.times=u.prototype.multiply,d.prototype.multiply=function(e){return new d(this.value*X(e).value)},d.prototype.times=d.prototype.multiply,l.prototype.square=function(){return new l(C(this.value),!1)},u.prototype.square=function(){var e=this.value*this.value;return p(e)?new u(e):new l(C(f(Math.abs(this.value))),!1)},d.prototype.square=function(e){return new d(this.value*this.value)},l.prototype.divmod=function(e){var t=N(this,e);return{quotient:t[0],remainder:t[1]}},d.prototype.divmod=u.prototype.divmod=l.prototype.divmod,l.prototype.divide=function(e){return N(this,e)[0]},d.prototype.over=d.prototype.divide=function(e){return new d(this.value/X(e).value)},u.prototype.over=u.prototype.divide=l.prototype.over=l.prototype.divide,l.prototype.mod=function(e){return N(this,e)[1]},d.prototype.mod=d.prototype.remainder=function(e){return new d(this.value%X(e).value)},u.prototype.remainder=u.prototype.mod=l.prototype.remainder=l.prototype.mod,l.prototype.pow=function(e){var t,r,n,i=X(e),a=this.value,o=i.value;if(0===o)return c[1];if(0===a)return c[0];if(1===a)return c[1];if(-1===a)return i.isEven()?c[1]:c[-1];if(i.sign)return c[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&p(t=Math.pow(a,o)))return new u(h(t));for(r=this,n=c[1];!0&o&&(n=n.times(r),--o),0!==o;)o/=2,r=r.square();return n},u.prototype.pow=l.prototype.pow,d.prototype.pow=function(e){var t=X(e),r=this.value,n=t.value,i=BigInt(0),a=BigInt(1),o=BigInt(2);if(n===i)return c[1];if(r===i)return c[0];if(r===a)return c[1];if(r===BigInt(-1))return t.isEven()?c[1]:c[-1];if(t.isNegative())return new d(i);for(var s=this,l=c[1];(n&a)===a&&(l=l.times(s),--n),n!==i;)n/=o,s=s.square();return l},l.prototype.modPow=function(e,t){if(e=X(e),(t=X(t)).isZero())throw new Error("Cannot take modPow with modulus 0");var r=c[1],n=this.mod(t);for(e.isNegative()&&(e=e.multiply(c[-1]),n=n.modInv(t));e.isPositive();){if(n.isZero())return c[0];e.isOdd()&&(r=r.multiply(n).mod(t)),e=e.divide(2),n=n.square().mod(t)}return r},d.prototype.modPow=u.prototype.modPow=l.prototype.modPow,l.prototype.compareAbs=function(e){var t=X(e),r=this.value,n=t.value;return t.isSmall?1:P(r,n)},u.prototype.compareAbs=function(e){var t=X(e),r=Math.abs(this.value),n=t.value;return t.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},d.prototype.compareAbs=function(e){var t=this.value,r=X(e).value;return(t=t>=0?t:-t)===(r=r>=0?r:-r)?0:t>r?1:-1},l.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=X(e),r=this.value,n=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:P(r,n)*(this.sign?-1:1)},l.prototype.compareTo=l.prototype.compare,u.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=X(e),r=this.value,n=t.value;return t.isSmall?r==n?0:r>n?1:-1:r<0!==t.sign?r<0?-1:1:r<0?1:-1},u.prototype.compareTo=u.prototype.compare,d.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=this.value,r=X(e).value;return t===r?0:t>r?1:-1},d.prototype.compareTo=d.prototype.compare,l.prototype.equals=function(e){return 0===this.compare(e)},d.prototype.eq=d.prototype.equals=u.prototype.eq=u.prototype.equals=l.prototype.eq=l.prototype.equals,l.prototype.notEquals=function(e){return 0!==this.compare(e)},d.prototype.neq=d.prototype.notEquals=u.prototype.neq=u.prototype.notEquals=l.prototype.neq=l.prototype.notEquals,l.prototype.greater=function(e){return this.compare(e)>0},d.prototype.gt=d.prototype.greater=u.prototype.gt=u.prototype.greater=l.prototype.gt=l.prototype.greater,l.prototype.lesser=function(e){return this.compare(e)<0},d.prototype.lt=d.prototype.lesser=u.prototype.lt=u.prototype.lesser=l.prototype.lt=l.prototype.lesser,l.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},d.prototype.geq=d.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals=l.prototype.geq=l.prototype.greaterOrEquals,l.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},d.prototype.leq=d.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals=l.prototype.leq=l.prototype.lesserOrEquals,l.prototype.isEven=function(){return!(1&this.value[0])},u.prototype.isEven=function(){return!(1&this.value)},d.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},l.prototype.isOdd=function(){return!(1&~this.value[0])},u.prototype.isOdd=function(){return!(1&~this.value)},d.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},l.prototype.isPositive=function(){return!this.sign},u.prototype.isPositive=function(){return this.value>0},d.prototype.isPositive=u.prototype.isPositive,l.prototype.isNegative=function(){return this.sign},u.prototype.isNegative=function(){return this.value<0},d.prototype.isNegative=u.prototype.isNegative,l.prototype.isUnit=function(){return!1},u.prototype.isUnit=function(){return 1===Math.abs(this.value)},d.prototype.isUnit=function(){return this.abs().value===BigInt(1)},l.prototype.isZero=function(){return!1},u.prototype.isZero=function(){return 0===this.value},d.prototype.isZero=function(){return this.value===BigInt(0)},l.prototype.isDivisibleBy=function(e){var t=X(e);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()))},d.prototype.isDivisibleBy=u.prototype.isDivisibleBy=l.prototype.isDivisibleBy,l.prototype.isPrime=function(t){var r=I(this);if(r!==e)return r;var n=this.abs(),a=n.bitLength();if(a<=64)return F(n,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var o=Math.log(2)*a.toJSNumber(),s=Math.ceil(!0===t?2*Math.pow(o,2):o),c=[],l=0;l<s;l++)c.push(i(l+2));return F(n,c)},d.prototype.isPrime=u.prototype.isPrime=l.prototype.isPrime,l.prototype.isProbablePrime=function(t,r){var n=I(this);if(n!==e)return n;for(var a=this.abs(),o=t===e?5:t,s=[],c=0;c<o;c++)s.push(i.randBetween(2,a.minus(2),r));return F(a,s)},d.prototype.isProbablePrime=u.prototype.isProbablePrime=l.prototype.isProbablePrime,l.prototype.modInv=function(e){for(var t,r,n,a=i.zero,o=i.one,s=X(e),c=this.abs();!c.isZero();)t=s.divide(c),r=a,n=s,a=o,s=c,o=r.subtract(t.multiply(o)),c=n.subtract(t.multiply(c));if(!s.isUnit())throw new Error(this.toString()+" and "+e.toString()+" are not co-prime");return-1===a.compare(0)&&(a=a.add(e)),this.isNegative()?a.negate():a},d.prototype.modInv=u.prototype.modInv=l.prototype.modInv,l.prototype.next=function(){var e=this.value;return this.sign?x(e,1,this.sign):new l(b(e,1),this.sign)},u.prototype.next=function(){var e=this.value;return e+1<n?new u(e+1):new l(a,!1)},d.prototype.next=function(){return new d(this.value+BigInt(1))},l.prototype.prev=function(){var e=this.value;return this.sign?new l(b(e,1),!0):x(e,1,this.sign)},u.prototype.prev=function(){var e=this.value;return e-1>-n?new u(e-1):new l(a,!0)},d.prototype.prev=function(){return new d(this.value-BigInt(1))};for(var O=[1];2*O[O.length-1]<=t;)O.push(2*O[O.length-1]);var R=O.length,M=O[R-1];function L(e){return Math.abs(e)<=t}function j(e,t,r){t=X(t);for(var n=e.isNegative(),a=t.isNegative(),o=n?e.not():e,s=a?t.not():t,c=0,l=0,u=null,d=null,p=[];!o.isZero()||!s.isZero();)c=(u=N(o,M))[1].toJSNumber(),n&&(c=M-1-c),l=(d=N(s,M))[1].toJSNumber(),a&&(l=M-1-l),o=u[0],s=d[0],p.push(r(c,l));for(var f=0!==r(n?1:0,a?1:0)?i(-1):i(0),m=p.length-1;m>=0;m-=1)f=f.multiply(M).add(i(p[m]));return f}l.prototype.shiftLeft=function(e){var t=X(e).toJSNumber();if(!L(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;for(;t>=R;)r=r.multiply(M),t-=R-1;return r.multiply(O[t])},d.prototype.shiftLeft=u.prototype.shiftLeft=l.prototype.shiftLeft,l.prototype.shiftRight=function(e){var t,r=X(e).toJSNumber();if(!L(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;r>=R;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(t=N(n,M))[1].isNegative()?t[0].prev():t[0],r-=R-1}return(t=N(n,O[r]))[1].isNegative()?t[0].prev():t[0]},d.prototype.shiftRight=u.prototype.shiftRight=l.prototype.shiftRight,l.prototype.not=function(){return this.negate().prev()},d.prototype.not=u.prototype.not=l.prototype.not,l.prototype.and=function(e){return j(this,e,(function(e,t){return e&t}))},d.prototype.and=u.prototype.and=l.prototype.and,l.prototype.or=function(e){return j(this,e,(function(e,t){return e|t}))},d.prototype.or=u.prototype.or=l.prototype.or,l.prototype.xor=function(e){return j(this,e,(function(e,t){return e^t}))},d.prototype.xor=u.prototype.xor=l.prototype.xor;var B=1<<30,z=(t&-t)*(t&-t)|B;function U(e){var r=e.value,n="number"==typeof r?r|B:"bigint"==typeof r?r|BigInt(B):r[0]+r[1]*t|z;return n&-n}function q(e,t){if(t.compareTo(e)<=0){var r=q(e,t.square(t)),n=r.p,a=r.e,o=n.multiply(t);return o.compareTo(e)<=0?{p:o,e:2*a+1}:{p:n,e:2*a}}return{p:i(1),e:0}}function J(e,t){return e=X(e),t=X(t),e.greater(t)?e:t}function V(e,t){return e=X(e),t=X(t),e.lesser(t)?e:t}function H(e,t){if(e=X(e).abs(),t=X(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var r,n,i=c[1];e.isEven()&&t.isEven();)r=V(U(e),U(t)),e=e.divide(r),t=t.divide(r),i=i.multiply(r);for(;e.isEven();)e=e.divide(U(e));do{for(;t.isEven();)t=t.divide(U(t));e.greater(t)&&(n=t,t=e,e=n),t=t.subtract(e)}while(!t.isZero());return i.isUnit()?e:e.multiply(i)}l.prototype.bitLength=function(){var e=this;return e.compareTo(i(0))<0&&(e=e.negate().subtract(i(1))),0===e.compareTo(i(0))?i(0):i(q(e,i(2)).e).add(i(1))},d.prototype.bitLength=u.prototype.bitLength=l.prototype.bitLength;var K=function(e,t,r,n){r=r||o,e=String(e),n||(e=e.toLowerCase(),r=r.toLowerCase());var i,a=e.length,s=Math.abs(t),c={};for(i=0;i<r.length;i++)c[r[i]]=i;for(i=0;i<a;i++){if("-"!==(d=e[i])&&(d in c&&c[d]>=s)){if("1"===d&&1===s)continue;throw new Error(d+" is not a valid digit in base "+t+".")}}t=X(t);var l=[],u="-"===e[0];for(i=u?1:0;i<e.length;i++){var d;if((d=e[i])in c)l.push(X(c[d]));else{if("<"!==d)throw new Error(d+" is not a valid character");var p=i;do{i++}while(">"!==e[i]&&i<e.length);l.push(X(e.slice(p+1,i)))}}return W(l,t,u)};function W(e,t,r){var n,i=c[0],a=c[1];for(n=e.length-1;n>=0;n--)i=i.add(e[n].times(a)),a=a.times(t);return r?i.negate():i}function G(e,t){if((t=i(t)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(e.isNegative()&&t.isPositive()&&(n=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n};for(var a,o=[],s=e;s.isNegative()||s.compareAbs(t)>=0;){a=s.divmod(t),s=a.quotient;var c=a.remainder;c.isNegative()&&(c=t.minus(c).abs(),s=s.next()),o.push(c.toJSNumber())}return o.push(s.toJSNumber()),{value:o.reverse(),isNegative:n}}function $(e,t,r){var n=G(e,t);return(n.isNegative?"-":"")+n.value.map((function(e){return function(e,t){return e<(t=t||o).length?t[e]:"<"+e+">"}(e,r)})).join("")}function Y(e){if(p(+e)){var t=+e;if(t===h(t))return s?new d(BigInt(t)):new u(t);throw new Error("Invalid integer: "+e)}var n="-"===e[0];n&&(e=e.slice(1));var i=e.split(/e/i);if(i.length>2)throw new Error("Invalid integer: "+i.join("e"));if(2===i.length){var a=i[1];if("+"===a[0]&&(a=a.slice(1)),(a=+a)!==h(a)||!p(a))throw new Error("Invalid integer: "+a+" is not a valid exponent.");var o=i[0],c=o.indexOf(".");if(c>=0&&(a-=o.length-c-1,o=o.slice(0,c)+o.slice(c+1)),a<0)throw new Error("Cannot include negative exponent part for integers");e=o+=new Array(a+1).join("0")}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(s)return new d(BigInt(n?"-"+e:e));for(var f=[],m=e.length,_=r,y=m-_;m>0;)f.push(+e.slice(y,m)),(y-=_)<0&&(y=0),m-=_;return g(f),new l(f,n)}function X(e){return"number"==typeof e?function(e){if(s)return new d(BigInt(e));if(p(e)){if(e!==h(e))throw new Error(e+" is not an integer.");return new u(e)}return Y(e.toString())}(e):"string"==typeof e?Y(e):"bigint"==typeof e?new d(e):e}l.prototype.toArray=function(e){return G(this,e)},u.prototype.toArray=function(e){return G(this,e)},d.prototype.toArray=function(e){return G(this,e)},l.prototype.toString=function(t,r){if(t===e&&(t=10),10!==t||r)return $(this,t,r);for(var n,i=this.value,a=i.length,o=String(i[--a]);--a>=0;)n=String(i[a]),o+="0000000".slice(n.length)+n;return(this.sign?"-":"")+o},u.prototype.toString=function(t,r){return t===e&&(t=10),10!=t||r?$(this,t,r):String(this.value)},d.prototype.toString=u.prototype.toString,d.prototype.toJSON=l.prototype.toJSON=u.prototype.toJSON=function(){return this.toString()},l.prototype.valueOf=function(){return parseInt(this.toString(),10)},l.prototype.toJSNumber=l.prototype.valueOf,u.prototype.valueOf=function(){return this.value},u.prototype.toJSNumber=u.prototype.valueOf,d.prototype.valueOf=d.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var Q=0;Q<1e3;Q++)c[Q]=X(Q),Q>0&&(c[-Q]=X(-Q));return c.one=c[1],c.zero=c[0],c.minusOne=c[-1],c.max=J,c.min=V,c.gcd=H,c.lcm=function(e,t){return e=X(e).abs(),t=X(t).abs(),e.divide(H(e,t)).multiply(t)},c.isInstance=function(e){return e instanceof l||e instanceof u||e instanceof d},c.randBetween=function(e,r,n){e=X(e),r=X(r);var i=n||Math.random,a=V(e,r),o=J(e,r).subtract(a).add(1);if(o.isSmall)return a.add(Math.floor(i()*o));for(var s=G(o,t).value,l=[],u=!0,d=0;d<s.length;d++){var p=u?s[d]+(d+1<s.length?s[d+1]/t:0):t,f=h(i()*p);l.push(f),f<s[d]&&(u=!1)}return a.add(c.fromArray(l,t,!1))},c.fromArray=function(e,t,r){return W(e.map(X),X(t||10),r)},c}();e.hasOwnProperty("exports")&&(e.exports=i),void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},46892:(e,t,r)=>{var n=r(54787),i=r(24434).EventEmitter,a=r(86512),o=r(94644),s=r(2203).Stream;function c(e){for(var t=0,r=0;r<e.length;r++)t+=Math.pow(256,r)*e[r];return t}function l(e){for(var t=0,r=0;r<e.length;r++)t+=Math.pow(256,e.length-r-1)*e[r];return t}function u(e){var t=l(e);return 128&~e[0]||(t-=Math.pow(256,e.length)),t}function d(e){var t=c(e);return 128&~e[e.length-1]||(t-=Math.pow(256,e.length)),t}function p(e){var t={};return[1,2,4,8].forEach((function(r){var n=8*r;t["word"+n+"le"]=t["word"+n+"lu"]=e(r,c),t["word"+n+"ls"]=e(r,d),t["word"+n+"be"]=t["word"+n+"bu"]=e(r,l),t["word"+n+"bs"]=e(r,u)})),t.word8=t.word8u=t.word8be,t.word8s=t.word8bs,t}(t=e.exports=function(e,r){if(Buffer.isBuffer(e))return t.parse(e);var n=t.stream();return e&&e.pipe?e.pipe(n):e&&(e.on(r||"data",(function(e){n.write(e)})),e.on("end",(function(){n.end()}))),n}).stream=function(e){if(e)return t.apply(null,arguments);var r=null;function c(e,t,n){r={bytes:e,skip:n,cb:function(e){r=null,t(e)}},u()}var l=null;function u(){if(r)if("function"==typeof r)r();else{var e,t=l+r.bytes;if(f.length>=t)null==l?(e=f.splice(0,t),r.skip||(e=e.slice())):(r.skip||(e=f.slice(l,t)),l=t),r.skip?r.cb():r.cb(e)}else _&&(g=!0)}var d=n.light((function(e){function t(){g||e.next()}var n=p((function(e,r){return function(n){c(e,(function(e){m.set(n,r(e)),t()}))}}));return n.tap=function(t){e.nest(t,m.store)},n.into=function(t,r){m.get(t)||m.set(t,{});var n=m;m=o(n.get(t)),e.nest((function(){r.apply(this,arguments),this.tap((function(){m=n}))}),m.store)},n.flush=function(){m.store={},t()},n.loop=function(r){var n=!1;e.nest(!1,(function i(){this.vars=m.store,r.call(this,(function(){n=!0,t()}),m.store),this.tap(function(){n?e.next():i.call(this)}.bind(this))}),m.store)},n.buffer=function(e,r){"string"==typeof r&&(r=m.get(r)),c(r,(function(r){m.set(e,r),t()}))},n.skip=function(e){"string"==typeof e&&(e=m.get(e)),c(e,(function(){t()}))},n.scan=function(e,n){if("string"==typeof n)n=new Buffer(n);else if(!Buffer.isBuffer(n))throw new Error("search must be a Buffer or a string");var i=0;r=function(){var a=f.indexOf(n,l+i),o=a-l-i;-1!==a?(r=null,null!=l?(m.set(e,f.slice(l,l+i+o)),l+=i+o+n.length):(m.set(e,f.slice(0,i+o)),f.splice(0,i+o+n.length)),t(),u()):o=Math.max(f.length-n.length-l-i,0),i+=o},u()},n.peek=function(t){l=0,e.nest((function(){t.call(this,m.store),this.tap((function(){l=null}))}))},n}));d.writable=!0;var f=a();d.write=function(e){f.push(e),u()};var m=o(),g=!1,_=!1;return d.end=function(){_=!0},d.pipe=s.prototype.pipe,Object.getOwnPropertyNames(i.prototype).forEach((function(e){d[e]=i.prototype[e]})),d},t.parse=function(e){var t=p((function(i,a){return function(o){if(r+i<=e.length){var s=e.slice(r,r+i);r+=i,n.set(o,a(s))}else n.set(o,null);return t}})),r=0,n=o();return t.vars=n.store,t.tap=function(e){return e.call(t,n.store),t},t.into=function(e,r){n.get(e)||n.set(e,{});var i=n;return n=o(i.get(e)),r.call(t,n.store),n=i,t},t.loop=function(e){for(var r=!1,i=function(){r=!0};!1===r;)e.call(t,i,n.store);return t},t.buffer=function(i,a){"string"==typeof a&&(a=n.get(a));var o=e.slice(r,Math.min(e.length,r+a));return r+=a,n.set(i,o),t},t.skip=function(e){return"string"==typeof e&&(e=n.get(e)),r+=e,t},t.scan=function(i,a){if("string"==typeof a)a=new Buffer(a);else if(!Buffer.isBuffer(a))throw new Error("search must be a Buffer or a string");n.set(i,null);for(var o=0;o+r<=e.length-a.length+1;o++){for(var s=0;s<a.length&&e[r+o+s]===a[s];s++);if(s===a.length)break}return n.set(i,e.slice(r,r+o)),r+=o+a.length,t},t.peek=function(e){var i=r;return e.call(t,n.store),r=i,t},t.flush=function(){return n.store={},t},t.eof=function(){return r>=e.length},t}},94644:e=>{e.exports=function(e){function t(e,t){var n=r.store,i=e.split(".");i.slice(0,-1).forEach((function(e){void 0===n[e]&&(n[e]={}),n=n[e]}));var a=i[i.length-1];return 1==arguments.length?n[a]:n[a]=t}var r={get:function(e){return t(e)},set:function(e,r){return t(e,r)},store:e||{}};return r}},87813:(e,t,r)=>{"use strict";const{Buffer:n}=r(20181),i=Symbol.for("BufferList");function a(e){if(!(this instanceof a))return new a(e);a._init.call(this,e)}a._init=function(e){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)},a.prototype._new=function(e){return new a(e)},a.prototype._offset=function(e){if(0===e)return[0,0];let t=0;for(let r=0;r<this._bufs.length;r++){const n=t+this._bufs[r].length;if(e<n||r===this._bufs.length-1)return[r,e-t];t=n}},a.prototype._reverseOffset=function(e){const t=e[0];let r=e[1];for(let e=0;e<t;e++)r+=this._bufs[e].length;return r},a.prototype.get=function(e){if(e>this.length||e<0)return;const t=this._offset(e);return this._bufs[t[0]][t[1]]},a.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},a.prototype.copy=function(e,t,r,i){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof i||i>this.length)&&(i=this.length),r>=this.length)return e||n.alloc(0);if(i<=0)return e||n.alloc(0);const a=!!e,o=this._offset(r),s=i-r;let c=s,l=a&&t||0,u=o[1];if(0===r&&i===this.length){if(!a)return 1===this._bufs.length?this._bufs[0]:n.concat(this._bufs,this.length);for(let t=0;t<this._bufs.length;t++)this._bufs[t].copy(e,l),l+=this._bufs[t].length;return e}if(c<=this._bufs[o[0]].length-u)return a?this._bufs[o[0]].copy(e,t,u,u+c):this._bufs[o[0]].slice(u,u+c);a||(e=n.allocUnsafe(s));for(let t=o[0];t<this._bufs.length;t++){const r=this._bufs[t].length-u;if(!(c>r)){this._bufs[t].copy(e,l,u,u+c),l+=r;break}this._bufs[t].copy(e,l,u),l+=r,c-=r,u&&(u=0)}return e.length>l?e.slice(0,l):e},a.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return this._new();const r=this._offset(e),n=this._offset(t),i=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!==r[1]&&(i[0]=i[0].slice(r[1])),this._new(i)},a.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},a.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){const e=this._new();for(let t=0;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},a.prototype.append=function(e){if(null==e)return this;if(e.buffer)this._appendBuffer(n.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let t=0;t<e.length;t++)this.append(e[t]);else if(this._isBufferList(e))for(let t=0;t<e._bufs.length;t++)this.append(e._bufs[t]);else"number"==typeof e&&(e=e.toString()),this._appendBuffer(n.from(e));return this},a.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},a.prototype.indexOf=function(e,t,r){if(void 0===r&&"string"==typeof t&&(r=t,t=void 0),"function"==typeof e||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof e?e=n.from([e]):"string"==typeof e?e=n.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=n.from(e.buffer,e.byteOffset,e.byteLength):n.isBuffer(e)||(e=n.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;const i=this._offset(t);let a=i[0],o=i[1];for(;a<this._bufs.length;a++){const t=this._bufs[a];for(;o<t.length;){if(t.length-o>=e.length){const r=t.indexOf(e,o);if(-1!==r)return this._reverseOffset([a,r]);o=t.length-e.length+1}else{const t=this._reverseOffset([a,o]);if(this._match(t,e))return t;o++}}o=0}return-1},a.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0},function(){const e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const t in e)!function(t){a.prototype[t]=null===e[t]?function(e,r){return this.slice(e,e+r)[t](0,r)}:function(r=0){return this.slice(r,r+e[t])[t](0)}}(t)}(),a.prototype._isBufferList=function(e){return e instanceof a||a.isBufferList(e)},a.isBufferList=function(e){return null!=e&&e[i]},e.exports=a},44829:(e,t,r)=>{"use strict";const n=r(34198).Duplex,i=r(72017),a=r(87813);function o(e){if(!(this instanceof o))return new o(e);if("function"==typeof e){this._callback=e;const t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)})),e=null}a._init.call(this,e),n.call(this)}i(o,n),Object.assign(o.prototype,a.prototype),o.prototype._new=function(e){return new o(e)},o.prototype._write=function(e,t,r){this._appendBuffer(e),"function"==typeof r&&r()},o.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},o.prototype.end=function(e){n.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},o.prototype._destroy=function(e,t){this._bufs.length=0,this.length=0,t(e)},o.prototype._isBufferList=function(e){return e instanceof o||e instanceof a||o.isBufferList(e)},o.isBufferList=a.isBufferList,e.exports=o,e.exports.BufferListStream=o,e.exports.BufferList=a},7988:e=>{"use strict";e.exports=function(e){var t=e._SomePromiseArray;function r(e){var r=new t(e),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}e.any=function(e){return r(e)},e.prototype.any=function(){return r(this)}}},28210:(e,t,r)=>{"use strict";var n;try{throw new Error}catch(e){n=e}var i=r(71065),a=r(49937),o=r(92208);function s(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new a(16),this._normalQueue=new a(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=i}function c(e,t,r){this._lateQueue.push(e,t,r),this._queueTick()}function l(e,t,r){this._normalQueue.push(e,t,r),this._queueTick()}function u(e){this._normalQueue._pushOne(e),this._queueTick()}s.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},s.prototype.hasCustomScheduler=function(){return this._customScheduler},s.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},s.prototype.disableTrampolineIfNecessary=function(){o.hasDevTools&&(this._trampolineEnabled=!1)},s.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},s.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},s.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout((function(){e(t)}),0);else try{this._schedule((function(){e(t)}))}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},o.hasDevTools?(s.prototype.invokeLater=function(e,t,r){this._trampolineEnabled?c.call(this,e,t,r):this._schedule((function(){setTimeout((function(){e.call(t,r)}),100)}))},s.prototype.invoke=function(e,t,r){this._trampolineEnabled?l.call(this,e,t,r):this._schedule((function(){e.call(t,r)}))},s.prototype.settlePromises=function(e){this._trampolineEnabled?u.call(this,e):this._schedule((function(){e._settlePromises()}))}):(s.prototype.invokeLater=c,s.prototype.invoke=l,s.prototype.settlePromises=u),s.prototype._drainQueue=function(e){for(;e.length()>0;){var t=e.shift();if("function"==typeof t){var r=e.shift(),n=e.shift();t.call(r,n)}else t._settlePromises()}},s.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},s.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},s.prototype._reset=function(){this._isTickUsed=!1},e.exports=s,e.exports.firstLineError=n},54271:e=>{"use strict";e.exports=function(e,t,r,n){var i=!1,a=function(e,t){this._reject(t)},o=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(a,a,null,this,e)},s=function(e,t){50397184&this._bitField||this._resolveCallback(t.target)},c=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(a){i||(i=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var l=r(a),u=new e(t);u._propagateFrom(this,1);var d=this._target();if(u._setBoundTo(l),l instanceof e){var p={promiseRejectionQueued:!1,promise:u,target:d,bindingPromise:l};d._then(t,o,void 0,u,p),l._then(s,c,void 0,u,p),u._setOnCancel(l)}else u._resolveCallback(d);return u},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return!(2097152&~this._bitField)},e.bind=function(t,r){return e.resolve(r).bind(t)}}},51007:(e,t,r)=>{"use strict";var n;"undefined"!=typeof Promise&&(n=Promise);var i=r(39979)();i.noConflict=function(){try{Promise===i&&(Promise=n)}catch(e){}return i},e.exports=i},31675:(e,t,r)=>{"use strict";var n=Object.create;if(n){var i=n(null),a=n(null);i[" size"]=a[" size"]=0}e.exports=function(e){var t,n,o=r(92208),s=o.canEvaluate,c=o.isIdentifier,l=function(e){return new Function("ensureMethod"," \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g,e))(p)},u=function(e){return new Function("obj"," \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName",e))},d=function(e,t,r){var n=r[e];if("function"!=typeof n){if(!c(e))return null;if(n=t(e),r[e]=n,r[" size"]++,r[" size"]>512){for(var i=Object.keys(r),a=0;a<256;++a)delete r[i[a]];r[" size"]=i.length-256}}return n};function p(t,r){var n;if(null!=t&&(n=t[r]),"function"!=typeof n){var i="Object "+o.classString(t)+" has no method '"+o.toString(r)+"'";throw new e.TypeError(i)}return n}function f(e){return p(e,this.pop()).apply(e,this)}function m(e){return e[this]}function g(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}t=function(e){return d(e,l,i)},n=function(e){return d(e,u,a)},e.prototype.call=function(e){for(var r=arguments.length,n=new Array(Math.max(r-1,0)),i=1;i<r;++i)n[i-1]=arguments[i];if(s){var a=t(e);if(null!==a)return this._then(a,void 0,void 0,n,void 0)}return n.push(e),this._then(f,void 0,void 0,n,void 0)},e.prototype.get=function(e){var t;if("number"==typeof e)t=g;else if(s){var r=n(e);t=null!==r?r:m}else t=m;return this._then(t,void 0,void 0,e,void 0)}}},2994:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i){var a=r(92208),o=a.tryCatch,s=a.errorObj,c=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var r=e._cancellationParent;if(null==r||!r._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=r}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(e,t){if(a.isArray(e))for(var r=0;r<e.length;++r)this._doInvokeOnCancel(e[r],t);else if(void 0!==e)if("function"==typeof e){if(!t){var n=o(e).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),c.throwLater(n.e))}}else e._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var e=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,e)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},91674:(e,t,r)=>{"use strict";e.exports=function(e){var t=r(92208),n=r(7585).keys,i=t.tryCatch,a=t.errorObj;return function(r,o,s){return function(c){var l=s._boundValue();e:for(var u=0;u<r.length;++u){var d=r[u];if(d===Error||null!=d&&d.prototype instanceof Error){if(c instanceof d)return i(o).call(l,c)}else if("function"==typeof d){var p=i(d).call(l,c);if(p===a)return p;if(p)return i(o).call(l,c)}else if(t.isObject(c)){for(var f=n(d),m=0;m<f.length;++m){var g=f[m];if(d[g]!=c[g])continue e}return i(o).call(l,c)}}return e}}}},30297:e=>{"use strict";e.exports=function(e){var t=!1,r=[];function n(){this._trace=new n.CapturedTrace(i())}function i(){var e=r.length-1;if(e>=0)return r[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},n.CapturedTrace=null,n.create=function(){if(t)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=e.prototype._pushContext,a=e.prototype._popContext,o=e._peekContext,s=e.prototype._peekContext,c=e.prototype._promiseCreated;n.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=a,e._peekContext=o,e.prototype._peekContext=s,e.prototype._promiseCreated=c,t=!1},t=!0,e.prototype._pushContext=n.prototype._pushContext,e.prototype._popContext=n.prototype._popContext,e._peekContext=e.prototype._peekContext=i,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},n}},6636:(e,t,r)=>{"use strict";e.exports=function(e,t){var n,i,a,o=e._getDomain,s=e._async,c=r(90403).Warning,l=r(92208),u=l.canAttachTrace,d=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,p=/\((?:timers\.js):\d+:\d+\)/,f=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,m=null,g=null,_=!1,h=!(0==l.env("BLUEBIRD_DEBUG")||!l.env("BLUEBIRD_DEBUG")&&"development"!==l.env("NODE_ENV")),y=!(0==l.env("BLUEBIRD_WARNINGS")||!h&&!l.env("BLUEBIRD_WARNINGS")),v=!(0==l.env("BLUEBIRD_LONG_STACK_TRACES")||!h&&!l.env("BLUEBIRD_LONG_STACK_TRACES")),b=0!=l.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(y||!!l.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){524288&this._bitField||(this._setRejectionIsUnhandled(),s.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){q("rejectionHandled",n,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return!!(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),q("unhandledRejection",i,e,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(e,t,r){return j(e,t,r||this)},e.onPossiblyUnhandledRejection=function(e){var t=o();i="function"==typeof e?null===t?e:l.domainBind(t,e):void 0},e.onUnhandledRejectionHandled=function(e){var t=o();n="function"==typeof e?null===t?e:l.domainBind(t,e):void 0};var k=function(){};e.longStackTraces=function(){if(s.haveItemsQueued()&&!Y.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!Y.longStackTraces&&V()){var r=e.prototype._captureStackTrace,n=e.prototype._attachExtraTrace;Y.longStackTraces=!0,k=function(){if(s.haveItemsQueued()&&!Y.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=r,e.prototype._attachExtraTrace=n,t.deactivateLongStackTraces(),s.enableTrampoline(),Y.longStackTraces=!1},e.prototype._captureStackTrace=M,e.prototype._attachExtraTrace=L,t.activateLongStackTraces(),s.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return Y.longStackTraces&&V()};var x=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return l.global.dispatchEvent(e),function(e,t){var r=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:!0});return!l.global.dispatchEvent(r)}}if("function"==typeof Event){e=new Event("CustomEvent");return l.global.dispatchEvent(e),function(e,t){var r=new Event(e.toLowerCase(),{cancelable:!0});return r.detail=t,!l.global.dispatchEvent(r)}}return(e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),l.global.dispatchEvent(e),function(e,t){var r=document.createEvent("CustomEvent");return r.initCustomEvent(e.toLowerCase(),!1,!0,t),!l.global.dispatchEvent(r)}}catch(e){}return function(){return!1}}(),E=l.isNode?function(){return process.emit.apply(process,arguments)}:l.global?function(e){var t="on"+e.toLowerCase(),r=l.global[t];return!!r&&(r.apply(l.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function S(e,t){return{promise:t}}var D={promiseCreated:S,promiseFulfilled:S,promiseRejected:S,promiseResolved:S,promiseCancelled:S,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:S},w=function(e){var t=!1;try{t=E.apply(null,arguments)}catch(e){s.throwLater(e),t=!0}var r=!1;try{r=x(e,D[e].apply(null,arguments))}catch(e){s.throwLater(e),r=!0}return r||t};function T(){return!1}function C(e,t,r){var n=this;try{e(t,r,(function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+l.toString(e));n._attachCancellationCallback(e)}))}catch(e){return e}}function A(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?l.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function N(){return this._onCancelField}function P(e){this._onCancelField=e}function I(){this._cancellationParent=void 0,this._onCancelField=void 0}function F(e,t){if(1&t){this._cancellationParent=e;var r=e._branchesRemainingToCancel;void 0===r&&(r=0),e._branchesRemainingToCancel=r+1}2&t&&e._isBound()&&this._setBoundTo(e._boundTo)}e.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&k()),"warnings"in t){var r=t.warnings;Y.warnings=!!r,b=Y.warnings,l.isObject(r)&&"wForgottenReturn"in r&&(b=!!r.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!Y.cancellation){if(s.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=I,e.prototype._propagateFrom=F,e.prototype._onCancel=N,e.prototype._setOnCancel=P,e.prototype._attachCancellationCallback=A,e.prototype._execute=C,O=F,Y.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!Y.monitoring?(Y.monitoring=!0,e.prototype._fireEvent=w):!t.monitoring&&Y.monitoring&&(Y.monitoring=!1,e.prototype._fireEvent=T)),e},e.prototype._fireEvent=T,e.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(e){},e.prototype._attachCancellationCallback=function(e){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(e,t){};var O=function(e,t){2&t&&e._isBound()&&this._setBoundTo(e._boundTo)};function R(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function M(){this._trace=new G(this._peekContext())}function L(e,t){if(u(e)){var r=this._trace;if(void 0!==r&&t&&(r=r._parent),void 0!==r)r.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=z(e);l.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),l.notEnumerableProp(e,"__stackCleaned__",!0)}}}function j(t,r,n){if(Y.warnings){var i,a=new c(t);if(r)n._attachExtraTrace(a);else if(Y.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(a);else{var o=z(a);a.stack=o.message+"\n"+o.stack.join("\n")}w("warning",a)||U(a,"",!0)}}function B(e){for(var t=[],r=0;r<e.length;++r){var n=e[r],i=" (No stack trace)"===n||m.test(n),a=i&&H(n);i&&!a&&(_&&" "!==n.charAt(0)&&(n=" "+n),t.push(n))}return t}function z(e){var t=e.stack,r=e.toString();return t="string"==typeof t&&t.length>0?function(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),r=0;r<t.length;++r){var n=t[r];if(" (No stack trace)"===n||m.test(n))break}return r>0&&"SyntaxError"!=e.name&&(t=t.slice(r)),t}(e):[" (No stack trace)"],{message:r,stack:"SyntaxError"==e.name?t:B(t)}}function U(e,t,r){if("undefined"!=typeof console){var n;if(l.isObject(e)){var i=e.stack;n=t+g(i,e)}else n=t+String(e);"function"==typeof a?a(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function q(e,t,r,n){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(n):t(r,n))}catch(e){s.throwLater(e)}"unhandledRejection"===e?w(e,r,n)||i||U(r,"Unhandled rejection "):w(e,n)}function J(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():l.toString(e);if(/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+function(e){var t=41;if(e.length<t)return e;return e.substr(0,t-3)+"..."}(t)+">, no stack trace)"}function V(){return"function"==typeof $}var H=function(){return!1},K=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function W(e){var t=e.match(K);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function G(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);$(this,G),t>32&&this.uncycle()}l.inherits(G,Error),t.CapturedTrace=G,G.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},n=0,i=this;void 0!==i;++n)t.push(i),i=i._parent;for(n=(e=this._length=n)-1;n>=0;--n){var a=t[n].stack;void 0===r[a]&&(r[a]=n)}for(n=0;n<e;++n){var o=r[t[n].stack];if(void 0!==o&&o!==n){o>0&&(t[o-1]._parent=void 0,t[o-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var s=n>0?t[n-1]:this;o<e-1?(s._parent=t[o+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var c=s._length+1,l=n-2;l>=0;--l)t[l]._length=c,c++;return}}}},G.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=z(e),r=t.message,n=[t.stack],i=this;void 0!==i;)n.push(B(i.stack.split("\n"))),i=i._parent;!function(e){for(var t=e[0],r=1;r<e.length;++r){for(var n=e[r],i=t.length-1,a=t[i],o=-1,s=n.length-1;s>=0;--s)if(n[s]===a){o=s;break}for(s=o;s>=0;--s){var c=n[s];if(t[i]!==c)break;t.pop(),i--}t=n}}(n),function(e){for(var t=0;t<e.length;++t)(0===e[t].length||t+1<e.length&&e[t][0]===e[t+1][0])&&(e.splice(t,1),t--)}(n),l.notEnumerableProp(e,"stack",function(e,t){for(var r=0;r<t.length-1;++r)t[r].push("From previous event:"),t[r]=t[r].join("\n");return r<t.length&&(t[r]=t[r].join("\n")),e+"\n"+t.join("\n")}(r,n)),l.notEnumerableProp(e,"__stackCleaned__",!0)}};var $=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():J(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,m=e,g=t;var r=Error.captureStackTrace;return H=function(e){return d.test(e)},function(e,t){Error.stackTraceLimit+=6,r(e,t),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return m=/@/,g=t,_=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){n="stack"in e}return!("stack"in i)&&n&&"number"==typeof Error.stackTraceLimit?(m=e,g=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6}):(g=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?J(t):t.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(a=function(e){console.warn(e)},l.isNode&&process.stderr.isTTY?a=function(e,t){var r=t?"":"";console.warn(r+e+"\n")}:l.isNode||"string"!=typeof(new Error).stack||(a=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var Y={warnings:y,longStackTraces:!1,cancellation:!1,monitoring:!1};return v&&e.longStackTraces(),{longStackTraces:function(){return Y.longStackTraces},warnings:function(){return Y.warnings},cancellation:function(){return Y.cancellation},monitoring:function(){return Y.monitoring},propagateFromFunction:function(){return O},boundValueFunction:function(){return R},checkForgottenReturns:function(e,t,r,n,i){if(void 0===e&&null!==t&&b){if(void 0!==i&&i._returnedNonUndefined())return;if(!(65535&n._bitField))return;r&&(r+=" ");var a="",o="";if(t._trace){for(var s=t._trace.stack.split("\n"),c=B(s),l=c.length-1;l>=0;--l){var u=c[l];if(!p.test(u)){var d=u.match(f);d&&(a="at "+d[1]+":"+d[2]+":"+d[3]+" ");break}}if(c.length>0){var m=c[0];for(l=0;l<s.length;++l)if(s[l]===m){l>0&&(o="\n"+s[l-1]);break}}}var g="a promise was created in a "+r+"handler "+a+"but was not returned from it, see http://goo.gl/rRqMUw"+o;n._warn(g,!0,t)}},setBounds:function(e,t){if(V()){for(var r,n,i=e.stack.split("\n"),a=t.stack.split("\n"),o=-1,s=-1,c=0;c<i.length;++c){if(l=W(i[c])){r=l.fileName,o=l.line;break}}for(c=0;c<a.length;++c){var l;if(l=W(a[c])){n=l.fileName,s=l.line;break}}o<0||s<0||!r||!n||r!==n||o>=s||(H=function(e){if(d.test(e))return!0;var t=W(e);return!!(t&&t.fileName===r&&o<=t.line&&t.line<=s)})}},warn:j,deprecated:function(e,t){var r=e+" is deprecated and will be removed in a future version.";return t&&(r+=" Use "+t+" instead."),j(r)},CapturedTrace:G,fireDomEvent:x,fireGlobalEvent:E}}},56774:e=>{"use strict";e.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(r){return r instanceof e&&r.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:r},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(r,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:e},void 0);var t=arguments[1];return this.caught(e,(function(){throw t}))},e.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof e&&r.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:r},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();return this.caught(r,(function(){return n}))}}},93425:e=>{"use strict";e.exports=function(e,t){var r=e.reduce,n=e.all;function i(){return n(this)}e.prototype.each=function(e){return r(this,e,t,0)._then(i,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,n){return r(e,n,t,0)._then(i,void 0,void 0,e,void 0)},e.mapSeries=function(e,n){return r(e,n,t,t)}}},90403:(e,t,r)=>{"use strict";var n,i,a=r(7585),o=a.freeze,s=r(92208),c=s.inherits,l=s.notEnumerableProp;function u(e,t){function r(n){if(!(this instanceof r))return new r(n);l(this,"message","string"==typeof n?n:t),l(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return c(r,Error),r}var d=u("Warning","warning"),p=u("CancellationError","cancellation error"),f=u("TimeoutError","timeout error"),m=u("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(e){n=u("TypeError","type error"),i=u("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),_=0;_<g.length;++_)"function"==typeof Array.prototype[g[_]]&&(m.prototype[g[_]]=Array.prototype[g[_]]);a.defineProperty(m.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),m.prototype.isOperational=!0;var h=0;function y(e){if(!(this instanceof y))return new y(e);l(this,"name","OperationalError"),l(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(l(this,"message",e.message),l(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}m.prototype.toString=function(){var e=Array(4*h+1).join(" "),t="\n"+e+"AggregateError of:\n";h++,e=Array(4*h+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),a=0;a<i.length;++a)i[a]=e+i[a];t+=(n=i.join("\n"))+"\n"}return h--,t},c(y,Error);var v=Error.__BluebirdErrorTypes__;v||(v=o({CancellationError:p,TimeoutError:f,OperationalError:y,RejectionError:y,AggregateError:m}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:v,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error,TypeError:n,RangeError:i,CancellationError:v.CancellationError,OperationalError:v.OperationalError,TimeoutError:v.TimeoutError,AggregateError:v.AggregateError,Warning:d}},7585:e=>{var t=function(){"use strict";return void 0===this}();if(t)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:t,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!(r&&!r.writable&&!r.set)}};else{var r={}.hasOwnProperty,n={}.toString,i={}.constructor.prototype,a=function(e){var t=[];for(var n in e)r.call(e,n)&&t.push(n);return t};e.exports={isArray:function(e){try{return"[object Array]"===n.call(e)}catch(e){return!1}},keys:a,names:a,defineProperty:function(e,t,r){return e[t]=r.value,e},getDescriptor:function(e,t){return{value:e[t]}},freeze:function(e){return e},getPrototypeOf:function(e){try{return Object(e).constructor.prototype}catch(e){return i}},isES5:t,propertyIsWritable:function(){return!0}}}},72730:e=>{"use strict";e.exports=function(e,t){var r=e.map;e.prototype.filter=function(e,n){return r(this,e,n,t)},e.filter=function(e,n,i){return r(e,n,i,t)}}},90401:(e,t,r)=>{"use strict";e.exports=function(e,t){var n=r(92208),i=e.CancellationError,a=n.errorObj;function o(e,t,r){this.promise=e,this.type=t,this.handler=r,this.called=!1,this.cancelPromise=null}function s(e){this.finallyHandler=e}function c(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function l(){return d.call(this,this.promise._target()._settledValue())}function u(e){if(!c(this,e))return a.e=e,a}function d(r){var n=this.promise,o=this.handler;if(!this.called){this.called=!0;var d=this.isFinallyHandler()?o.call(n._boundValue()):o.call(n._boundValue(),r);if(void 0!==d){n._setReturnedNonUndefined();var p=t(d,n);if(p instanceof e){if(null!=this.cancelPromise){if(p._isCancelled()){var f=new i("late cancellation observer");return n._attachExtraTrace(f),a.e=f,a}p.isPending()&&p._attachCancellationCallback(new s(this))}return p._then(l,u,void 0,this,void 0)}}}return n.isRejected()?(c(this),a.e=r,a):(c(this),r)}return o.prototype.isFinallyHandler=function(){return 0===this.type},s.prototype._resultCancelled=function(){c(this.finallyHandler)},e.prototype._passThrough=function(e,t,r,n){return"function"!=typeof e?this.then():this._then(r,n,void 0,new o(this,t,e),void 0)},e.prototype.lastly=e.prototype.finally=function(e){return this._passThrough(e,0,d,d)},e.prototype.tap=function(e){return this._passThrough(e,1,d)},o}},65734:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i,a,o){var s=r(90403).TypeError,c=r(92208),l=c.errorObj,u=c.tryCatch,d=[];function p(t,r,i,a){if(o.cancellation()){var s=new e(n),c=this._finallyPromise=new e(n);this._promise=s.lastly((function(){return c})),s._captureStackTrace(),s._setOnCancel(this)}else{(this._promise=new e(n))._captureStackTrace()}this._stack=a,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(d):d,this._yieldedPromise=null,this._cancellationPhase=!1}c.inherits(p,a),p.prototype._isResolved=function(){return null===this._promise},p.prototype._cleanup=function(){this._promise=this._generator=null,o.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},p.prototype._promiseCancelled=function(){if(!this._isResolved()){var t;if(void 0!==this._generator.return)this._promise._pushContext(),t=u(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=u(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},p.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=u(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},p.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=u(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},p.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},p.prototype.promise=function(){return this._promise},p.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},p.prototype._continue=function(t){var r=this._promise;if(t===l)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(t.e,!1);var n=t.value;if(!0===t.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var a=i(n,this._promise);if(a instanceof e||(a=function(t,r,n){for(var a=0;a<r.length;++a){n._pushContext();var o=u(r[a])(t);if(n._popContext(),o===l){n._pushContext();var s=e.reject(l.e);return n._popContext(),s}var c=i(o,n);if(c instanceof e)return c}return null}(a,this._yieldHandlers,this._promise),null!==a)){var o=(a=a._target())._bitField;50397184&o?33554432&o?e._async.invoke(this._promiseFulfilled,this,a._value()):16777216&o?e._async.invoke(this._promiseRejected,this,a._reason()):this._promiseCancelled():(this._yieldedPromise=a,a._proxy(this,null))}else this._promiseRejected(new s("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",n)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},e.coroutine=function(e,t){if("function"!=typeof e)throw new s("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(t).yieldHandler,n=p,i=(new Error).stack;return function(){var t=e.apply(this,arguments),a=new n(void 0,void 0,r,i),o=a.promise();return a._generator=t,a._promiseFulfilled(void 0),o}},e.coroutine.addYieldHandler=function(e){if("function"!=typeof e)throw new s("expecting a function but got "+c.classString(e));d.push(e)},e.spawn=function(r){if(o.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof r)return t("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new p(r,this),i=n.promise();return n._run(e.spawn),i}}},46564:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i,a,o){var s,c=r(92208),l=c.canEvaluate,u=c.tryCatch,d=c.errorObj;if(l){for(var p=function(e){return new Function("value","holder"," \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g,e))},f=function(e){return new Function("promise","holder"," \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g,e))},m=function(t){for(var r=new Array(t),n=0;n<r.length;++n)r[n]="this.p"+(n+1);var i=r.join(" = ")+" = null;",o="var promise;\n"+r.map((function(e){return" \n promise = "+e+"; \n if (promise instanceof Promise) { \n promise.cancel(); \n } \n "})).join("\n"),s=r.join(", "),c="Holder$"+t,l="return function(tryCatch, errorObj, Promise, async) { \n 'use strict'; \n function [TheName](fn) { \n [TheProperties] \n this.fn = fn; \n this.asyncNeeded = true; \n this.now = 0; \n } \n \n [TheName].prototype._callFunction = function(promise) { \n promise._pushContext(); \n var ret = tryCatch(this.fn)([ThePassedArguments]); \n promise._popContext(); \n if (ret === errorObj) { \n promise._rejectCallback(ret.e, false); \n } else { \n promise._resolveCallback(ret); \n } \n }; \n \n [TheName].prototype.checkFulfillment = function(promise) { \n var now = ++this.now; \n if (now === [TheTotal]) { \n if (this.asyncNeeded) { \n async.invoke(this._callFunction, this, promise); \n } else { \n this._callFunction(promise); \n } \n \n } \n }; \n \n [TheName].prototype._resultCancelled = function() { \n [CancellationCode] \n }; \n \n return [TheName]; \n }(tryCatch, errorObj, Promise, async); \n ";return l=l.replace(/\[TheName\]/g,c).replace(/\[TheTotal\]/g,t).replace(/\[ThePassedArguments\]/g,s).replace(/\[TheProperties\]/g,i).replace(/\[CancellationCode\]/g,o),new Function("tryCatch","errorObj","Promise","async",l)(u,d,e,a)},g=[],_=[],h=[],y=0;y<8;++y)g.push(m(y+1)),_.push(p(y+1)),h.push(f(y+1));s=function(e){this._reject(e)}}e.join=function(){var r,a=arguments.length-1;if(a>0&&"function"==typeof arguments[a]&&(r=arguments[a],a<=8&&l)){(x=new e(i))._captureStackTrace();for(var u=new(0,g[a-1])(r),d=_,p=0;p<a;++p){var f=n(arguments[p],x);if(f instanceof e){var m=(f=f._target())._bitField;50397184&m?33554432&m?d[p].call(x,f._value(),u):16777216&m?x._reject(f._reason()):x._cancel():(f._then(d[p],s,void 0,x,u),h[p](f,u),u.asyncNeeded=!1)}else d[p].call(x,f,u)}if(!x._isFateSealed()){if(u.asyncNeeded){var y=o();null!==y&&(u.fn=c.domainBind(y,u.fn))}x._setAsyncGuaranteed(),x._setOnCancel(u)}return x}for(var v=arguments.length,b=new Array(v),k=0;k<v;++k)b[k]=arguments[k];r&&b.pop();var x=new t(b).promise();return void 0!==r?x.spread(r):x}}},35956:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i,a,o){var s=e._getDomain,c=r(92208),l=c.tryCatch,u=c.errorObj,d=e._async;function p(e,t,r,n){this.constructor$(e),this._promise._captureStackTrace();var i=s();this._callback=null===i?t:c.domainBind(i,t),this._preservedValues=n===a?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],d.invoke(this._asyncInit,this,void 0)}function f(t,r,i,a){if("function"!=typeof r)return n("expecting a function but got "+c.classString(r));var o=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+c.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+c.classString(i.concurrency)));o=i.concurrency}return new p(t,r,o="number"==typeof o&&isFinite(o)&&o>=1?o:0,a).promise()}c.inherits(p,t),p.prototype._asyncInit=function(){this._init$(void 0,-2)},p.prototype._init=function(){},p.prototype._promiseFulfilled=function(t,r){var n=this._values,a=this.length(),s=this._preservedValues,c=this._limit;if(r<0){if(n[r=-1*r-1]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return n[r]=t,this._queue.push(r),!1;null!==s&&(s[r]=t);var d=this._promise,p=this._callback,f=d._boundValue();d._pushContext();var m=l(p).call(f,t,r,a),g=d._popContext();if(o.checkForgottenReturns(m,g,null!==s?"Promise.filter":"Promise.map",d),m===u)return this._reject(m.e),!0;var _=i(m,this._promise);if(_ instanceof e){var h=(_=_._target())._bitField;if(!(50397184&h))return c>=1&&this._inFlight++,n[r]=_,_._proxy(this,-1*(r+1)),!1;if(!(33554432&h))return 16777216&h?(this._reject(_._reason()),!0):(this._cancel(),!0);m=_._value()}n[r]=m}return++this._totalResolved>=a&&(null!==s?this._filter(n,s):this._resolve(n),!0)},p.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight<t;){if(this._isResolved())return;var n=e.pop();this._promiseFulfilled(r[n],n)}},p.prototype._filter=function(e,t){for(var r=t.length,n=new Array(r),i=0,a=0;a<r;++a)e[a]&&(n[i++]=t[a]);n.length=i,this._resolve(n)},p.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(e,t){return f(this,e,t,null)},e.map=function(e,t,r,n){return f(e,t,r,n)}}},6241:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i,a){var o=r(92208),s=o.tryCatch;e.method=function(r){if("function"!=typeof r)throw new e.TypeError("expecting a function but got "+o.classString(r));return function(){var n=new e(t);n._captureStackTrace(),n._pushContext();var i=s(r).apply(this,arguments),o=n._popContext();return a.checkForgottenReturns(i,o,"Promise.method",n),n._resolveFromSyncValue(i),n}},e.attempt=e.try=function(r){if("function"!=typeof r)return i("expecting a function but got "+o.classString(r));var n,c=new e(t);if(c._captureStackTrace(), method
[all...]
/interface/sdk-js/build-tools/dts_parser/build_package/
H A DJS_API_COUNT.js49 var n=r(48919),i=r(91789),a=function(e){if(!(this instanceof a))return new a(e);e=this.options=i.defaults(e,{comment:"",forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new n(e)};a.prototype.append=function(e,t,r){this.engine.entry(e,t,r)},a.prototype.finalize=function(){this.engine.finalize()},a.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},a.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)},a.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)},e.exports=a},8505:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=r(e,i)),t instanceof RegExp&&(t=r(t,i));var a=n(e,t,i);return a&&{start:a[0],end:a[1],pre:i.slice(0,a[0]),body:i.slice(a[0]+e.length,a[1]),post:i.slice(a[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function n(e,t,r){var n,i,a,o,s,c=r.indexOf(e),l=r.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(n=[],a=r.length;u>=0&&!s;)u==c?(n.push(u),c=r.indexOf(e,u+1)):1==n.length?s=[n.pop(),l]:((i=n.pop())<a&&(a=i,o=l),l=r.indexOf(t,u+1)),u=c<l&&c>=0?c:l;n.length&&(s=[a,o])}return s}e.exports=t,t.range=n},92096:(e,t,r)=>{var n;e=r.nmd(e);var i=function(e){"use strict";var t=1e7,r=7,n=9007199254740992,a=f(n),o="0123456789abcdefghijklmnopqrstuvwxyz",s="function"==typeof BigInt;function c(e,t,r,n){return void 0===e?c[0]:void 0!==t&&(10!=+t||r)?K(e,t,r,n):X(e)}function l(e,t){this.value=e,this.sign=t,this.isSmall=!1}function u(e){this.value=e,this.sign=e<0,this.isSmall=!0}function d(e){this.value=e}function p(e){return-n<e&&e<n}function f(e){return e<1e7?[e]:e<1e14?[e%1e7,Math.floor(e/1e7)]:[e%1e7,Math.floor(e/1e7)%1e7,Math.floor(e/1e14)]}function m(e){g(e);var r=e.length;if(r<4&&P(e,a)<0)switch(r){case 0:return 0;case 1:return e[0];case 2:return e[0]+e[1]*t;default:return e[0]+(e[1]+e[2]*t)*t}return e}function g(e){for(var t=e.length;0===e[--t];);e.length=t+1}function _(e){for(var t=new Array(e),r=-1;++r<e;)t[r]=0;return t}function h(e){return e>0?Math.floor(e):Math.ceil(e)}function y(e,r){var n,i,a=e.length,o=r.length,s=new Array(a),c=0,l=t;for(i=0;i<o;i++)c=(n=e[i]+r[i]+c)>=l?1:0,s[i]=n-c*l;for(;i<a;)c=(n=e[i]+c)===l?1:0,s[i++]=n-c*l;return c>0&&s.push(c),s}function v(e,t){return e.length>=t.length?y(e,t):y(t,e)}function b(e,r){var n,i,a=e.length,o=new Array(a),s=t;for(i=0;i<a;i++)n=e[i]-s+r,r=Math.floor(n/s),o[i]=n-r*s,r+=1;for(;r>0;)o[i++]=r%s,r=Math.floor(r/s);return o}function k(e,r){var n,i,a=e.length,o=r.length,s=new Array(a),c=0,l=t;for(n=0;n<o;n++)(i=e[n]-c-r[n])<0?(i+=l,c=1):c=0,s[n]=i;for(n=o;n<a;n++){if(!((i=e[n]-c)<0)){s[n++]=i;break}i+=l,s[n]=i}for(;n<a;n++)s[n]=e[n];return g(s),s}function x(e,r,n){var i,a,o=e.length,s=new Array(o),c=-r,d=t;for(i=0;i<o;i++)a=e[i]+c,c=Math.floor(a/d),a%=d,s[i]=a<0?a+d:a;return"number"==typeof(s=m(s))?(n&&(s=-s),new u(s)):new l(s,n)}function S(e,r){var n,i,a,o,s=e.length,c=r.length,l=_(s+c),u=t;for(a=0;a<s;++a){o=e[a];for(var d=0;d<c;++d)n=o*r[d]+l[a+d],i=Math.floor(n/u),l[a+d]=n-i*u,l[a+d+1]+=i}return g(l),l}function w(e,r){var n,i,a=e.length,o=new Array(a),s=t,c=0;for(i=0;i<a;i++)n=e[i]*r+c,c=Math.floor(n/s),o[i]=n-c*s;for(;c>0;)o[i++]=c%s,c=Math.floor(c/s);return o}function D(e,t){for(var r=[];t-- >0;)r.push(0);return r.concat(e)}function E(e,t){var r=Math.max(e.length,t.length);if(r<=30)return S(e,t);r=Math.ceil(r/2);var n=e.slice(r),i=e.slice(0,r),a=t.slice(r),o=t.slice(0,r),s=E(i,o),c=E(n,a),l=E(v(i,n),v(o,a)),u=v(v(s,D(k(k(l,s),c),r)),D(c,2*r));return g(u),u}function T(e,r,n){return new l(e<t?w(r,e):S(r,f(e)),n)}function C(e){var r,n,i,a,o=e.length,s=_(o+o),c=t;for(i=0;i<o;i++){n=0-(a=e[i])*a;for(var l=i;l<o;l++)r=a*e[l]*2+s[i+l]+n,n=Math.floor(r/c),s[i+l]=r-n*c;s[i+o]=n}return g(s),s}function A(e,r){var n,i,a,o,s=e.length,c=_(s),l=t;for(a=0,n=s-1;n>=0;--n)a=(o=a*l+e[n])-(i=h(o/r))*r,c[n]=0|i;return[c,0|a]}function N(e,r){var n,i=X(r);if(s)return[new d(e.value/i.value),new d(e.value%i.value)];var a,o=e.value,p=i.value;if(0===p)throw new Error("Cannot divide by zero");if(e.isSmall)return i.isSmall?[new u(h(o/p)),new u(o%p)]:[c[0],e];if(i.isSmall){if(1===p)return[e,c[0]];if(-1==p)return[e.negate(),c[0]];var y=Math.abs(p);if(y<t){a=m((n=A(o,y))[0]);var v=n[1];return e.sign&&(v=-v),"number"==typeof a?(e.sign!==i.sign&&(a=-a),[new u(a),new u(v)]):[new l(a,e.sign!==i.sign),new u(v)]}p=f(y)}var b=P(o,p);if(-1===b)return[c[0],e];if(0===b)return[c[e.sign===i.sign?1:-1],c[0]];n=o.length+p.length<=200?function(e,r){var n,i,a,o,s,c,l,u=e.length,d=r.length,p=t,f=_(r.length),g=r[d-1],h=Math.ceil(p/(2*g)),y=w(e,h),v=w(r,h);for(y.length<=u&&y.push(0),v.push(0),g=v[d-1],i=u-d;i>=0;i--){for(n=p-1,y[i+d]!==g&&(n=Math.floor((y[i+d]*p+y[i+d-1])/g)),a=0,o=0,c=v.length,s=0;s<c;s++)a+=n*v[s],l=Math.floor(a/p),o+=y[i+s]-(a-l*p),a=l,o<0?(y[i+s]=o+p,o=-1):(y[i+s]=o,o=0);for(;0!==o;){for(n-=1,a=0,s=0;s<c;s++)(a+=y[i+s]-p+v[s])<0?(y[i+s]=a+p,a=0):(y[i+s]=a,a=1);o+=a}f[i]=n}return y=A(y,h)[0],[m(f),m(y)]}(o,p):function(e,r){for(var n,i,a,o,s,c=e.length,l=r.length,u=[],d=[],p=t;c;)if(d.unshift(e[--c]),g(d),P(d,r)<0)u.push(0);else{a=d[(i=d.length)-1]*p+d[i-2],o=r[l-1]*p+r[l-2],i>l&&(a=(a+1)*p),n=Math.ceil(a/o);do{if(P(s=w(r,n),d)<=0)break;n--}while(n);u.push(n),d=k(d,s)}return u.reverse(),[m(u),m(d)]}(o,p),a=n[0];var x=e.sign!==i.sign,S=n[1],D=e.sign;return"number"==typeof a?(x&&(a=-a),a=new u(a)):a=new l(a,x),"number"==typeof S?(D&&(S=-S),S=new u(S)):S=new l(S,D),[a,S]}function P(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var r=e.length-1;r>=0;r--)if(e[r]!==t[r])return e[r]>t[r]?1:-1;return 0}function I(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function F(e,t){for(var r,n,a,o=e.prev(),s=o,c=0;s.isEven();)s=s.divide(2),c++;e:for(n=0;n<t.length;n++)if(!e.lesser(t[n])&&!(a=i(t[n]).modPow(s,e)).isUnit()&&!a.equals(o)){for(r=c-1;0!=r;r--){if((a=a.square().mod(e)).isUnit())return!1;if(a.equals(o))continue e}return!1}return!0}l.prototype=Object.create(c.prototype),u.prototype=Object.create(c.prototype),d.prototype=Object.create(c.prototype),l.prototype.add=function(e){var t=X(e);if(this.sign!==t.sign)return this.subtract(t.negate());var r=this.value,n=t.value;return t.isSmall?new l(b(r,Math.abs(n)),this.sign):new l(v(r,n),this.sign)},l.prototype.plus=l.prototype.add,u.prototype.add=function(e){var t=X(e),r=this.value;if(r<0!==t.sign)return this.subtract(t.negate());var n=t.value;if(t.isSmall){if(p(r+n))return new u(r+n);n=f(Math.abs(n))}return new l(b(n,Math.abs(r)),r<0)},u.prototype.plus=u.prototype.add,d.prototype.add=function(e){return new d(this.value+X(e).value)},d.prototype.plus=d.prototype.add,l.prototype.subtract=function(e){var t=X(e);if(this.sign!==t.sign)return this.add(t.negate());var r=this.value,n=t.value;return t.isSmall?x(r,Math.abs(n),this.sign):function(e,t,r){var n;return P(e,t)>=0?n=k(e,t):(n=k(t,e),r=!r),"number"==typeof(n=m(n))?(r&&(n=-n),new u(n)):new l(n,r)}(r,n,this.sign)},l.prototype.minus=l.prototype.subtract,u.prototype.subtract=function(e){var t=X(e),r=this.value;if(r<0!==t.sign)return this.add(t.negate());var n=t.value;return t.isSmall?new u(r-n):x(n,Math.abs(r),r>=0)},u.prototype.minus=u.prototype.subtract,d.prototype.subtract=function(e){return new d(this.value-X(e).value)},d.prototype.minus=d.prototype.subtract,l.prototype.negate=function(){return new l(this.value,!this.sign)},u.prototype.negate=function(){var e=this.sign,t=new u(-this.value);return t.sign=!e,t},d.prototype.negate=function(){return new d(-this.value)},l.prototype.abs=function(){return new l(this.value,!1)},u.prototype.abs=function(){return new u(Math.abs(this.value))},d.prototype.abs=function(){return new d(this.value>=0?this.value:-this.value)},l.prototype.multiply=function(e){var r,n,i,a=X(e),o=this.value,s=a.value,u=this.sign!==a.sign;if(a.isSmall){if(0===s)return c[0];if(1===s)return this;if(-1===s)return this.negate();if((r=Math.abs(s))<t)return new l(w(o,r),u);s=f(r)}return n=o.length,i=s.length,new l(-.012*n-.012*i+15e-6*n*i>0?E(o,s):S(o,s),u)},l.prototype.times=l.prototype.multiply,u.prototype._multiplyBySmall=function(e){return p(e.value*this.value)?new u(e.value*this.value):T(Math.abs(e.value),f(Math.abs(this.value)),this.sign!==e.sign)},l.prototype._multiplyBySmall=function(e){return 0===e.value?c[0]:1===e.value?this:-1===e.value?this.negate():T(Math.abs(e.value),this.value,this.sign!==e.sign)},u.prototype.multiply=function(e){return X(e)._multiplyBySmall(this)},u.prototype.times=u.prototype.multiply,d.prototype.multiply=function(e){return new d(this.value*X(e).value)},d.prototype.times=d.prototype.multiply,l.prototype.square=function(){return new l(C(this.value),!1)},u.prototype.square=function(){var e=this.value*this.value;return p(e)?new u(e):new l(C(f(Math.abs(this.value))),!1)},d.prototype.square=function(e){return new d(this.value*this.value)},l.prototype.divmod=function(e){var t=N(this,e);return{quotient:t[0],remainder:t[1]}},d.prototype.divmod=u.prototype.divmod=l.prototype.divmod,l.prototype.divide=function(e){return N(this,e)[0]},d.prototype.over=d.prototype.divide=function(e){return new d(this.value/X(e).value)},u.prototype.over=u.prototype.divide=l.prototype.over=l.prototype.divide,l.prototype.mod=function(e){return N(this,e)[1]},d.prototype.mod=d.prototype.remainder=function(e){return new d(this.value%X(e).value)},u.prototype.remainder=u.prototype.mod=l.prototype.remainder=l.prototype.mod,l.prototype.pow=function(e){var t,r,n,i=X(e),a=this.value,o=i.value;if(0===o)return c[1];if(0===a)return c[0];if(1===a)return c[1];if(-1===a)return i.isEven()?c[1]:c[-1];if(i.sign)return c[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&p(t=Math.pow(a,o)))return new u(h(t));for(r=this,n=c[1];!0&o&&(n=n.times(r),--o),0!==o;)o/=2,r=r.square();return n},u.prototype.pow=l.prototype.pow,d.prototype.pow=function(e){var t=X(e),r=this.value,n=t.value,i=BigInt(0),a=BigInt(1),o=BigInt(2);if(n===i)return c[1];if(r===i)return c[0];if(r===a)return c[1];if(r===BigInt(-1))return t.isEven()?c[1]:c[-1];if(t.isNegative())return new d(i);for(var s=this,l=c[1];(n&a)===a&&(l=l.times(s),--n),n!==i;)n/=o,s=s.square();return l},l.prototype.modPow=function(e,t){if(e=X(e),(t=X(t)).isZero())throw new Error("Cannot take modPow with modulus 0");var r=c[1],n=this.mod(t);for(e.isNegative()&&(e=e.multiply(c[-1]),n=n.modInv(t));e.isPositive();){if(n.isZero())return c[0];e.isOdd()&&(r=r.multiply(n).mod(t)),e=e.divide(2),n=n.square().mod(t)}return r},d.prototype.modPow=u.prototype.modPow=l.prototype.modPow,l.prototype.compareAbs=function(e){var t=X(e),r=this.value,n=t.value;return t.isSmall?1:P(r,n)},u.prototype.compareAbs=function(e){var t=X(e),r=Math.abs(this.value),n=t.value;return t.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},d.prototype.compareAbs=function(e){var t=this.value,r=X(e).value;return(t=t>=0?t:-t)===(r=r>=0?r:-r)?0:t>r?1:-1},l.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=X(e),r=this.value,n=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:P(r,n)*(this.sign?-1:1)},l.prototype.compareTo=l.prototype.compare,u.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=X(e),r=this.value,n=t.value;return t.isSmall?r==n?0:r>n?1:-1:r<0!==t.sign?r<0?-1:1:r<0?1:-1},u.prototype.compareTo=u.prototype.compare,d.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=this.value,r=X(e).value;return t===r?0:t>r?1:-1},d.prototype.compareTo=d.prototype.compare,l.prototype.equals=function(e){return 0===this.compare(e)},d.prototype.eq=d.prototype.equals=u.prototype.eq=u.prototype.equals=l.prototype.eq=l.prototype.equals,l.prototype.notEquals=function(e){return 0!==this.compare(e)},d.prototype.neq=d.prototype.notEquals=u.prototype.neq=u.prototype.notEquals=l.prototype.neq=l.prototype.notEquals,l.prototype.greater=function(e){return this.compare(e)>0},d.prototype.gt=d.prototype.greater=u.prototype.gt=u.prototype.greater=l.prototype.gt=l.prototype.greater,l.prototype.lesser=function(e){return this.compare(e)<0},d.prototype.lt=d.prototype.lesser=u.prototype.lt=u.prototype.lesser=l.prototype.lt=l.prototype.lesser,l.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},d.prototype.geq=d.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals=l.prototype.geq=l.prototype.greaterOrEquals,l.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},d.prototype.leq=d.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals=l.prototype.leq=l.prototype.lesserOrEquals,l.prototype.isEven=function(){return!(1&this.value[0])},u.prototype.isEven=function(){return!(1&this.value)},d.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},l.prototype.isOdd=function(){return!(1&~this.value[0])},u.prototype.isOdd=function(){return!(1&~this.value)},d.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},l.prototype.isPositive=function(){return!this.sign},u.prototype.isPositive=function(){return this.value>0},d.prototype.isPositive=u.prototype.isPositive,l.prototype.isNegative=function(){return this.sign},u.prototype.isNegative=function(){return this.value<0},d.prototype.isNegative=u.prototype.isNegative,l.prototype.isUnit=function(){return!1},u.prototype.isUnit=function(){return 1===Math.abs(this.value)},d.prototype.isUnit=function(){return this.abs().value===BigInt(1)},l.prototype.isZero=function(){return!1},u.prototype.isZero=function(){return 0===this.value},d.prototype.isZero=function(){return this.value===BigInt(0)},l.prototype.isDivisibleBy=function(e){var t=X(e);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()))},d.prototype.isDivisibleBy=u.prototype.isDivisibleBy=l.prototype.isDivisibleBy,l.prototype.isPrime=function(t){var r=I(this);if(r!==e)return r;var n=this.abs(),a=n.bitLength();if(a<=64)return F(n,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var o=Math.log(2)*a.toJSNumber(),s=Math.ceil(!0===t?2*Math.pow(o,2):o),c=[],l=0;l<s;l++)c.push(i(l+2));return F(n,c)},d.prototype.isPrime=u.prototype.isPrime=l.prototype.isPrime,l.prototype.isProbablePrime=function(t,r){var n=I(this);if(n!==e)return n;for(var a=this.abs(),o=t===e?5:t,s=[],c=0;c<o;c++)s.push(i.randBetween(2,a.minus(2),r));return F(a,s)},d.prototype.isProbablePrime=u.prototype.isProbablePrime=l.prototype.isProbablePrime,l.prototype.modInv=function(e){for(var t,r,n,a=i.zero,o=i.one,s=X(e),c=this.abs();!c.isZero();)t=s.divide(c),r=a,n=s,a=o,s=c,o=r.subtract(t.multiply(o)),c=n.subtract(t.multiply(c));if(!s.isUnit())throw new Error(this.toString()+" and "+e.toString()+" are not co-prime");return-1===a.compare(0)&&(a=a.add(e)),this.isNegative()?a.negate():a},d.prototype.modInv=u.prototype.modInv=l.prototype.modInv,l.prototype.next=function(){var e=this.value;return this.sign?x(e,1,this.sign):new l(b(e,1),this.sign)},u.prototype.next=function(){var e=this.value;return e+1<n?new u(e+1):new l(a,!1)},d.prototype.next=function(){return new d(this.value+BigInt(1))},l.prototype.prev=function(){var e=this.value;return this.sign?new l(b(e,1),!0):x(e,1,this.sign)},u.prototype.prev=function(){var e=this.value;return e-1>-n?new u(e-1):new l(a,!0)},d.prototype.prev=function(){return new d(this.value-BigInt(1))};for(var O=[1];2*O[O.length-1]<=t;)O.push(2*O[O.length-1]);var R=O.length,M=O[R-1];function L(e){return Math.abs(e)<=t}function j(e,t,r){t=X(t);for(var n=e.isNegative(),a=t.isNegative(),o=n?e.not():e,s=a?t.not():t,c=0,l=0,u=null,d=null,p=[];!o.isZero()||!s.isZero();)c=(u=N(o,M))[1].toJSNumber(),n&&(c=M-1-c),l=(d=N(s,M))[1].toJSNumber(),a&&(l=M-1-l),o=u[0],s=d[0],p.push(r(c,l));for(var f=0!==r(n?1:0,a?1:0)?i(-1):i(0),m=p.length-1;m>=0;m-=1)f=f.multiply(M).add(i(p[m]));return f}l.prototype.shiftLeft=function(e){var t=X(e).toJSNumber();if(!L(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;for(;t>=R;)r=r.multiply(M),t-=R-1;return r.multiply(O[t])},d.prototype.shiftLeft=u.prototype.shiftLeft=l.prototype.shiftLeft,l.prototype.shiftRight=function(e){var t,r=X(e).toJSNumber();if(!L(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;r>=R;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(t=N(n,M))[1].isNegative()?t[0].prev():t[0],r-=R-1}return(t=N(n,O[r]))[1].isNegative()?t[0].prev():t[0]},d.prototype.shiftRight=u.prototype.shiftRight=l.prototype.shiftRight,l.prototype.not=function(){return this.negate().prev()},d.prototype.not=u.prototype.not=l.prototype.not,l.prototype.and=function(e){return j(this,e,(function(e,t){return e&t}))},d.prototype.and=u.prototype.and=l.prototype.and,l.prototype.or=function(e){return j(this,e,(function(e,t){return e|t}))},d.prototype.or=u.prototype.or=l.prototype.or,l.prototype.xor=function(e){return j(this,e,(function(e,t){return e^t}))},d.prototype.xor=u.prototype.xor=l.prototype.xor;var B=1<<30,z=(t&-t)*(t&-t)|B;function U(e){var r=e.value,n="number"==typeof r?r|B:"bigint"==typeof r?r|BigInt(B):r[0]+r[1]*t|z;return n&-n}function q(e,t){if(t.compareTo(e)<=0){var r=q(e,t.square(t)),n=r.p,a=r.e,o=n.multiply(t);return o.compareTo(e)<=0?{p:o,e:2*a+1}:{p:n,e:2*a}}return{p:i(1),e:0}}function J(e,t){return e=X(e),t=X(t),e.greater(t)?e:t}function V(e,t){return e=X(e),t=X(t),e.lesser(t)?e:t}function H(e,t){if(e=X(e).abs(),t=X(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var r,n,i=c[1];e.isEven()&&t.isEven();)r=V(U(e),U(t)),e=e.divide(r),t=t.divide(r),i=i.multiply(r);for(;e.isEven();)e=e.divide(U(e));do{for(;t.isEven();)t=t.divide(U(t));e.greater(t)&&(n=t,t=e,e=n),t=t.subtract(e)}while(!t.isZero());return i.isUnit()?e:e.multiply(i)}l.prototype.bitLength=function(){var e=this;return e.compareTo(i(0))<0&&(e=e.negate().subtract(i(1))),0===e.compareTo(i(0))?i(0):i(q(e,i(2)).e).add(i(1))},d.prototype.bitLength=u.prototype.bitLength=l.prototype.bitLength;var K=function(e,t,r,n){r=r||o,e=String(e),n||(e=e.toLowerCase(),r=r.toLowerCase());var i,a=e.length,s=Math.abs(t),c={};for(i=0;i<r.length;i++)c[r[i]]=i;for(i=0;i<a;i++){if("-"!==(d=e[i])&&(d in c&&c[d]>=s)){if("1"===d&&1===s)continue;throw new Error(d+" is not a valid digit in base "+t+".")}}t=X(t);var l=[],u="-"===e[0];for(i=u?1:0;i<e.length;i++){var d;if((d=e[i])in c)l.push(X(c[d]));else{if("<"!==d)throw new Error(d+" is not a valid character");var p=i;do{i++}while(">"!==e[i]&&i<e.length);l.push(X(e.slice(p+1,i)))}}return W(l,t,u)};function W(e,t,r){var n,i=c[0],a=c[1];for(n=e.length-1;n>=0;n--)i=i.add(e[n].times(a)),a=a.times(t);return r?i.negate():i}function G(e,t){if((t=i(t)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(e.isNegative()&&t.isPositive()&&(n=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n};for(var a,o=[],s=e;s.isNegative()||s.compareAbs(t)>=0;){a=s.divmod(t),s=a.quotient;var c=a.remainder;c.isNegative()&&(c=t.minus(c).abs(),s=s.next()),o.push(c.toJSNumber())}return o.push(s.toJSNumber()),{value:o.reverse(),isNegative:n}}function $(e,t,r){var n=G(e,t);return(n.isNegative?"-":"")+n.value.map((function(e){return function(e,t){return e<(t=t||o).length?t[e]:"<"+e+">"}(e,r)})).join("")}function Y(e){if(p(+e)){var t=+e;if(t===h(t))return s?new d(BigInt(t)):new u(t);throw new Error("Invalid integer: "+e)}var n="-"===e[0];n&&(e=e.slice(1));var i=e.split(/e/i);if(i.length>2)throw new Error("Invalid integer: "+i.join("e"));if(2===i.length){var a=i[1];if("+"===a[0]&&(a=a.slice(1)),(a=+a)!==h(a)||!p(a))throw new Error("Invalid integer: "+a+" is not a valid exponent.");var o=i[0],c=o.indexOf(".");if(c>=0&&(a-=o.length-c-1,o=o.slice(0,c)+o.slice(c+1)),a<0)throw new Error("Cannot include negative exponent part for integers");e=o+=new Array(a+1).join("0")}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(s)return new d(BigInt(n?"-"+e:e));for(var f=[],m=e.length,_=r,y=m-_;m>0;)f.push(+e.slice(y,m)),(y-=_)<0&&(y=0),m-=_;return g(f),new l(f,n)}function X(e){return"number"==typeof e?function(e){if(s)return new d(BigInt(e));if(p(e)){if(e!==h(e))throw new Error(e+" is not an integer.");return new u(e)}return Y(e.toString())}(e):"string"==typeof e?Y(e):"bigint"==typeof e?new d(e):e}l.prototype.toArray=function(e){return G(this,e)},u.prototype.toArray=function(e){return G(this,e)},d.prototype.toArray=function(e){return G(this,e)},l.prototype.toString=function(t,r){if(t===e&&(t=10),10!==t||r)return $(this,t,r);for(var n,i=this.value,a=i.length,o=String(i[--a]);--a>=0;)n=String(i[a]),o+="0000000".slice(n.length)+n;return(this.sign?"-":"")+o},u.prototype.toString=function(t,r){return t===e&&(t=10),10!=t||r?$(this,t,r):String(this.value)},d.prototype.toString=u.prototype.toString,d.prototype.toJSON=l.prototype.toJSON=u.prototype.toJSON=function(){return this.toString()},l.prototype.valueOf=function(){return parseInt(this.toString(),10)},l.prototype.toJSNumber=l.prototype.valueOf,u.prototype.valueOf=function(){return this.value},u.prototype.toJSNumber=u.prototype.valueOf,d.prototype.valueOf=d.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var Q=0;Q<1e3;Q++)c[Q]=X(Q),Q>0&&(c[-Q]=X(-Q));return c.one=c[1],c.zero=c[0],c.minusOne=c[-1],c.max=J,c.min=V,c.gcd=H,c.lcm=function(e,t){return e=X(e).abs(),t=X(t).abs(),e.divide(H(e,t)).multiply(t)},c.isInstance=function(e){return e instanceof l||e instanceof u||e instanceof d},c.randBetween=function(e,r,n){e=X(e),r=X(r);var i=n||Math.random,a=V(e,r),o=J(e,r).subtract(a).add(1);if(o.isSmall)return a.add(Math.floor(i()*o));for(var s=G(o,t).value,l=[],u=!0,d=0;d<s.length;d++){var p=u?s[d]+(d+1<s.length?s[d+1]/t:0):t,f=h(i()*p);l.push(f),f<s[d]&&(u=!1)}return a.add(c.fromArray(l,t,!1))},c.fromArray=function(e,t,r){return W(e.map(X),X(t||10),r)},c}();e.hasOwnProperty("exports")&&(e.exports=i),void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},46892:(e,t,r)=>{var n=r(54787),i=r(24434).EventEmitter,a=r(86512),o=r(94644),s=r(2203).Stream;function c(e){for(var t=0,r=0;r<e.length;r++)t+=Math.pow(256,r)*e[r];return t}function l(e){for(var t=0,r=0;r<e.length;r++)t+=Math.pow(256,e.length-r-1)*e[r];return t}function u(e){var t=l(e);return 128&~e[0]||(t-=Math.pow(256,e.length)),t}function d(e){var t=c(e);return 128&~e[e.length-1]||(t-=Math.pow(256,e.length)),t}function p(e){var t={};return[1,2,4,8].forEach((function(r){var n=8*r;t["word"+n+"le"]=t["word"+n+"lu"]=e(r,c),t["word"+n+"ls"]=e(r,d),t["word"+n+"be"]=t["word"+n+"bu"]=e(r,l),t["word"+n+"bs"]=e(r,u)})),t.word8=t.word8u=t.word8be,t.word8s=t.word8bs,t}(t=e.exports=function(e,r){if(Buffer.isBuffer(e))return t.parse(e);var n=t.stream();return e&&e.pipe?e.pipe(n):e&&(e.on(r||"data",(function(e){n.write(e)})),e.on("end",(function(){n.end()}))),n}).stream=function(e){if(e)return t.apply(null,arguments);var r=null;function c(e,t,n){r={bytes:e,skip:n,cb:function(e){r=null,t(e)}},u()}var l=null;function u(){if(r)if("function"==typeof r)r();else{var e,t=l+r.bytes;if(f.length>=t)null==l?(e=f.splice(0,t),r.skip||(e=e.slice())):(r.skip||(e=f.slice(l,t)),l=t),r.skip?r.cb():r.cb(e)}else _&&(g=!0)}var d=n.light((function(e){function t(){g||e.next()}var n=p((function(e,r){return function(n){c(e,(function(e){m.set(n,r(e)),t()}))}}));return n.tap=function(t){e.nest(t,m.store)},n.into=function(t,r){m.get(t)||m.set(t,{});var n=m;m=o(n.get(t)),e.nest((function(){r.apply(this,arguments),this.tap((function(){m=n}))}),m.store)},n.flush=function(){m.store={},t()},n.loop=function(r){var n=!1;e.nest(!1,(function i(){this.vars=m.store,r.call(this,(function(){n=!0,t()}),m.store),this.tap(function(){n?e.next():i.call(this)}.bind(this))}),m.store)},n.buffer=function(e,r){"string"==typeof r&&(r=m.get(r)),c(r,(function(r){m.set(e,r),t()}))},n.skip=function(e){"string"==typeof e&&(e=m.get(e)),c(e,(function(){t()}))},n.scan=function(e,n){if("string"==typeof n)n=new Buffer(n);else if(!Buffer.isBuffer(n))throw new Error("search must be a Buffer or a string");var i=0;r=function(){var a=f.indexOf(n,l+i),o=a-l-i;-1!==a?(r=null,null!=l?(m.set(e,f.slice(l,l+i+o)),l+=i+o+n.length):(m.set(e,f.slice(0,i+o)),f.splice(0,i+o+n.length)),t(),u()):o=Math.max(f.length-n.length-l-i,0),i+=o},u()},n.peek=function(t){l=0,e.nest((function(){t.call(this,m.store),this.tap((function(){l=null}))}))},n}));d.writable=!0;var f=a();d.write=function(e){f.push(e),u()};var m=o(),g=!1,_=!1;return d.end=function(){_=!0},d.pipe=s.prototype.pipe,Object.getOwnPropertyNames(i.prototype).forEach((function(e){d[e]=i.prototype[e]})),d},t.parse=function(e){var t=p((function(i,a){return function(o){if(r+i<=e.length){var s=e.slice(r,r+i);r+=i,n.set(o,a(s))}else n.set(o,null);return t}})),r=0,n=o();return t.vars=n.store,t.tap=function(e){return e.call(t,n.store),t},t.into=function(e,r){n.get(e)||n.set(e,{});var i=n;return n=o(i.get(e)),r.call(t,n.store),n=i,t},t.loop=function(e){for(var r=!1,i=function(){r=!0};!1===r;)e.call(t,i,n.store);return t},t.buffer=function(i,a){"string"==typeof a&&(a=n.get(a));var o=e.slice(r,Math.min(e.length,r+a));return r+=a,n.set(i,o),t},t.skip=function(e){return"string"==typeof e&&(e=n.get(e)),r+=e,t},t.scan=function(i,a){if("string"==typeof a)a=new Buffer(a);else if(!Buffer.isBuffer(a))throw new Error("search must be a Buffer or a string");n.set(i,null);for(var o=0;o+r<=e.length-a.length+1;o++){for(var s=0;s<a.length&&e[r+o+s]===a[s];s++);if(s===a.length)break}return n.set(i,e.slice(r,r+o)),r+=o+a.length,t},t.peek=function(e){var i=r;return e.call(t,n.store),r=i,t},t.flush=function(){return n.store={},t},t.eof=function(){return r>=e.length},t}},94644:e=>{e.exports=function(e){function t(e,t){var n=r.store,i=e.split(".");i.slice(0,-1).forEach((function(e){void 0===n[e]&&(n[e]={}),n=n[e]}));var a=i[i.length-1];return 1==arguments.length?n[a]:n[a]=t}var r={get:function(e){return t(e)},set:function(e,r){return t(e,r)},store:e||{}};return r}},87813:(e,t,r)=>{"use strict";const{Buffer:n}=r(20181),i=Symbol.for("BufferList");function a(e){if(!(this instanceof a))return new a(e);a._init.call(this,e)}a._init=function(e){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)},a.prototype._new=function(e){return new a(e)},a.prototype._offset=function(e){if(0===e)return[0,0];let t=0;for(let r=0;r<this._bufs.length;r++){const n=t+this._bufs[r].length;if(e<n||r===this._bufs.length-1)return[r,e-t];t=n}},a.prototype._reverseOffset=function(e){const t=e[0];let r=e[1];for(let e=0;e<t;e++)r+=this._bufs[e].length;return r},a.prototype.get=function(e){if(e>this.length||e<0)return;const t=this._offset(e);return this._bufs[t[0]][t[1]]},a.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},a.prototype.copy=function(e,t,r,i){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof i||i>this.length)&&(i=this.length),r>=this.length)return e||n.alloc(0);if(i<=0)return e||n.alloc(0);const a=!!e,o=this._offset(r),s=i-r;let c=s,l=a&&t||0,u=o[1];if(0===r&&i===this.length){if(!a)return 1===this._bufs.length?this._bufs[0]:n.concat(this._bufs,this.length);for(let t=0;t<this._bufs.length;t++)this._bufs[t].copy(e,l),l+=this._bufs[t].length;return e}if(c<=this._bufs[o[0]].length-u)return a?this._bufs[o[0]].copy(e,t,u,u+c):this._bufs[o[0]].slice(u,u+c);a||(e=n.allocUnsafe(s));for(let t=o[0];t<this._bufs.length;t++){const r=this._bufs[t].length-u;if(!(c>r)){this._bufs[t].copy(e,l,u,u+c),l+=r;break}this._bufs[t].copy(e,l,u),l+=r,c-=r,u&&(u=0)}return e.length>l?e.slice(0,l):e},a.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return this._new();const r=this._offset(e),n=this._offset(t),i=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!==r[1]&&(i[0]=i[0].slice(r[1])),this._new(i)},a.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},a.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){const e=this._new();for(let t=0;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},a.prototype.append=function(e){if(null==e)return this;if(e.buffer)this._appendBuffer(n.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let t=0;t<e.length;t++)this.append(e[t]);else if(this._isBufferList(e))for(let t=0;t<e._bufs.length;t++)this.append(e._bufs[t]);else"number"==typeof e&&(e=e.toString()),this._appendBuffer(n.from(e));return this},a.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},a.prototype.indexOf=function(e,t,r){if(void 0===r&&"string"==typeof t&&(r=t,t=void 0),"function"==typeof e||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof e?e=n.from([e]):"string"==typeof e?e=n.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=n.from(e.buffer,e.byteOffset,e.byteLength):n.isBuffer(e)||(e=n.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;const i=this._offset(t);let a=i[0],o=i[1];for(;a<this._bufs.length;a++){const t=this._bufs[a];for(;o<t.length;){if(t.length-o>=e.length){const r=t.indexOf(e,o);if(-1!==r)return this._reverseOffset([a,r]);o=t.length-e.length+1}else{const t=this._reverseOffset([a,o]);if(this._match(t,e))return t;o++}}o=0}return-1},a.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0},function(){const e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const t in e)!function(t){a.prototype[t]=null===e[t]?function(e,r){return this.slice(e,e+r)[t](0,r)}:function(r=0){return this.slice(r,r+e[t])[t](0)}}(t)}(),a.prototype._isBufferList=function(e){return e instanceof a||a.isBufferList(e)},a.isBufferList=function(e){return null!=e&&e[i]},e.exports=a},44829:(e,t,r)=>{"use strict";const n=r(34198).Duplex,i=r(72017),a=r(87813);function o(e){if(!(this instanceof o))return new o(e);if("function"==typeof e){this._callback=e;const t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)})),e=null}a._init.call(this,e),n.call(this)}i(o,n),Object.assign(o.prototype,a.prototype),o.prototype._new=function(e){return new o(e)},o.prototype._write=function(e,t,r){this._appendBuffer(e),"function"==typeof r&&r()},o.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},o.prototype.end=function(e){n.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},o.prototype._destroy=function(e,t){this._bufs.length=0,this.length=0,t(e)},o.prototype._isBufferList=function(e){return e instanceof o||e instanceof a||o.isBufferList(e)},o.isBufferList=a.isBufferList,e.exports=o,e.exports.BufferListStream=o,e.exports.BufferList=a},7988:e=>{"use strict";e.exports=function(e){var t=e._SomePromiseArray;function r(e){var r=new t(e),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}e.any=function(e){return r(e)},e.prototype.any=function(){return r(this)}}},28210:(e,t,r)=>{"use strict";var n;try{throw new Error}catch(e){n=e}var i=r(71065),a=r(49937),o=r(92208);function s(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new a(16),this._normalQueue=new a(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=i}function c(e,t,r){this._lateQueue.push(e,t,r),this._queueTick()}function l(e,t,r){this._normalQueue.push(e,t,r),this._queueTick()}function u(e){this._normalQueue._pushOne(e),this._queueTick()}s.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},s.prototype.hasCustomScheduler=function(){return this._customScheduler},s.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},s.prototype.disableTrampolineIfNecessary=function(){o.hasDevTools&&(this._trampolineEnabled=!1)},s.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},s.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},s.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout((function(){e(t)}),0);else try{this._schedule((function(){e(t)}))}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},o.hasDevTools?(s.prototype.invokeLater=function(e,t,r){this._trampolineEnabled?c.call(this,e,t,r):this._schedule((function(){setTimeout((function(){e.call(t,r)}),100)}))},s.prototype.invoke=function(e,t,r){this._trampolineEnabled?l.call(this,e,t,r):this._schedule((function(){e.call(t,r)}))},s.prototype.settlePromises=function(e){this._trampolineEnabled?u.call(this,e):this._schedule((function(){e._settlePromises()}))}):(s.prototype.invokeLater=c,s.prototype.invoke=l,s.prototype.settlePromises=u),s.prototype._drainQueue=function(e){for(;e.length()>0;){var t=e.shift();if("function"==typeof t){var r=e.shift(),n=e.shift();t.call(r,n)}else t._settlePromises()}},s.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},s.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},s.prototype._reset=function(){this._isTickUsed=!1},e.exports=s,e.exports.firstLineError=n},54271:e=>{"use strict";e.exports=function(e,t,r,n){var i=!1,a=function(e,t){this._reject(t)},o=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(a,a,null,this,e)},s=function(e,t){50397184&this._bitField||this._resolveCallback(t.target)},c=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(a){i||(i=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var l=r(a),u=new e(t);u._propagateFrom(this,1);var d=this._target();if(u._setBoundTo(l),l instanceof e){var p={promiseRejectionQueued:!1,promise:u,target:d,bindingPromise:l};d._then(t,o,void 0,u,p),l._then(s,c,void 0,u,p),u._setOnCancel(l)}else u._resolveCallback(d);return u},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return!(2097152&~this._bitField)},e.bind=function(t,r){return e.resolve(r).bind(t)}}},51007:(e,t,r)=>{"use strict";var n;"undefined"!=typeof Promise&&(n=Promise);var i=r(39979)();i.noConflict=function(){try{Promise===i&&(Promise=n)}catch(e){}return i},e.exports=i},31675:(e,t,r)=>{"use strict";var n=Object.create;if(n){var i=n(null),a=n(null);i[" size"]=a[" size"]=0}e.exports=function(e){var t,n,o=r(92208),s=o.canEvaluate,c=o.isIdentifier,l=function(e){return new Function("ensureMethod"," \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g,e))(p)},u=function(e){return new Function("obj"," \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName",e))},d=function(e,t,r){var n=r[e];if("function"!=typeof n){if(!c(e))return null;if(n=t(e),r[e]=n,r[" size"]++,r[" size"]>512){for(var i=Object.keys(r),a=0;a<256;++a)delete r[i[a]];r[" size"]=i.length-256}}return n};function p(t,r){var n;if(null!=t&&(n=t[r]),"function"!=typeof n){var i="Object "+o.classString(t)+" has no method '"+o.toString(r)+"'";throw new e.TypeError(i)}return n}function f(e){return p(e,this.pop()).apply(e,this)}function m(e){return e[this]}function g(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}t=function(e){return d(e,l,i)},n=function(e){return d(e,u,a)},e.prototype.call=function(e){for(var r=arguments.length,n=new Array(Math.max(r-1,0)),i=1;i<r;++i)n[i-1]=arguments[i];if(s){var a=t(e);if(null!==a)return this._then(a,void 0,void 0,n,void 0)}return n.push(e),this._then(f,void 0,void 0,n,void 0)},e.prototype.get=function(e){var t;if("number"==typeof e)t=g;else if(s){var r=n(e);t=null!==r?r:m}else t=m;return this._then(t,void 0,void 0,e,void 0)}}},2994:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i){var a=r(92208),o=a.tryCatch,s=a.errorObj,c=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var r=e._cancellationParent;if(null==r||!r._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=r}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(e,t){if(a.isArray(e))for(var r=0;r<e.length;++r)this._doInvokeOnCancel(e[r],t);else if(void 0!==e)if("function"==typeof e){if(!t){var n=o(e).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),c.throwLater(n.e))}}else e._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var e=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,e)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},91674:(e,t,r)=>{"use strict";e.exports=function(e){var t=r(92208),n=r(7585).keys,i=t.tryCatch,a=t.errorObj;return function(r,o,s){return function(c){var l=s._boundValue();e:for(var u=0;u<r.length;++u){var d=r[u];if(d===Error||null!=d&&d.prototype instanceof Error){if(c instanceof d)return i(o).call(l,c)}else if("function"==typeof d){var p=i(d).call(l,c);if(p===a)return p;if(p)return i(o).call(l,c)}else if(t.isObject(c)){for(var f=n(d),m=0;m<f.length;++m){var g=f[m];if(d[g]!=c[g])continue e}return i(o).call(l,c)}}return e}}}},30297:e=>{"use strict";e.exports=function(e){var t=!1,r=[];function n(){this._trace=new n.CapturedTrace(i())}function i(){var e=r.length-1;if(e>=0)return r[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},n.CapturedTrace=null,n.create=function(){if(t)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=e.prototype._pushContext,a=e.prototype._popContext,o=e._peekContext,s=e.prototype._peekContext,c=e.prototype._promiseCreated;n.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=a,e._peekContext=o,e.prototype._peekContext=s,e.prototype._promiseCreated=c,t=!1},t=!0,e.prototype._pushContext=n.prototype._pushContext,e.prototype._popContext=n.prototype._popContext,e._peekContext=e.prototype._peekContext=i,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},n}},6636:(e,t,r)=>{"use strict";e.exports=function(e,t){var n,i,a,o=e._getDomain,s=e._async,c=r(90403).Warning,l=r(92208),u=l.canAttachTrace,d=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,p=/\((?:timers\.js):\d+:\d+\)/,f=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,m=null,g=null,_=!1,h=!(0==l.env("BLUEBIRD_DEBUG")||!l.env("BLUEBIRD_DEBUG")&&"development"!==l.env("NODE_ENV")),y=!(0==l.env("BLUEBIRD_WARNINGS")||!h&&!l.env("BLUEBIRD_WARNINGS")),v=!(0==l.env("BLUEBIRD_LONG_STACK_TRACES")||!h&&!l.env("BLUEBIRD_LONG_STACK_TRACES")),b=0!=l.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(y||!!l.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){524288&this._bitField||(this._setRejectionIsUnhandled(),s.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){q("rejectionHandled",n,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return!!(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),q("unhandledRejection",i,e,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(e,t,r){return j(e,t,r||this)},e.onPossiblyUnhandledRejection=function(e){var t=o();i="function"==typeof e?null===t?e:l.domainBind(t,e):void 0},e.onUnhandledRejectionHandled=function(e){var t=o();n="function"==typeof e?null===t?e:l.domainBind(t,e):void 0};var k=function(){};e.longStackTraces=function(){if(s.haveItemsQueued()&&!Y.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!Y.longStackTraces&&V()){var r=e.prototype._captureStackTrace,n=e.prototype._attachExtraTrace;Y.longStackTraces=!0,k=function(){if(s.haveItemsQueued()&&!Y.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=r,e.prototype._attachExtraTrace=n,t.deactivateLongStackTraces(),s.enableTrampoline(),Y.longStackTraces=!1},e.prototype._captureStackTrace=M,e.prototype._attachExtraTrace=L,t.activateLongStackTraces(),s.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return Y.longStackTraces&&V()};var x=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return l.global.dispatchEvent(e),function(e,t){var r=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:!0});return!l.global.dispatchEvent(r)}}if("function"==typeof Event){e=new Event("CustomEvent");return l.global.dispatchEvent(e),function(e,t){var r=new Event(e.toLowerCase(),{cancelable:!0});return r.detail=t,!l.global.dispatchEvent(r)}}return(e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),l.global.dispatchEvent(e),function(e,t){var r=document.createEvent("CustomEvent");return r.initCustomEvent(e.toLowerCase(),!1,!0,t),!l.global.dispatchEvent(r)}}catch(e){}return function(){return!1}}(),S=l.isNode?function(){return process.emit.apply(process,arguments)}:l.global?function(e){var t="on"+e.toLowerCase(),r=l.global[t];return!!r&&(r.apply(l.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function w(e,t){return{promise:t}}var D={promiseCreated:w,promiseFulfilled:w,promiseRejected:w,promiseResolved:w,promiseCancelled:w,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:w},E=function(e){var t=!1;try{t=S.apply(null,arguments)}catch(e){s.throwLater(e),t=!0}var r=!1;try{r=x(e,D[e].apply(null,arguments))}catch(e){s.throwLater(e),r=!0}return r||t};function T(){return!1}function C(e,t,r){var n=this;try{e(t,r,(function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+l.toString(e));n._attachCancellationCallback(e)}))}catch(e){return e}}function A(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?l.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function N(){return this._onCancelField}function P(e){this._onCancelField=e}function I(){this._cancellationParent=void 0,this._onCancelField=void 0}function F(e,t){if(1&t){this._cancellationParent=e;var r=e._branchesRemainingToCancel;void 0===r&&(r=0),e._branchesRemainingToCancel=r+1}2&t&&e._isBound()&&this._setBoundTo(e._boundTo)}e.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&k()),"warnings"in t){var r=t.warnings;Y.warnings=!!r,b=Y.warnings,l.isObject(r)&&"wForgottenReturn"in r&&(b=!!r.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!Y.cancellation){if(s.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=I,e.prototype._propagateFrom=F,e.prototype._onCancel=N,e.prototype._setOnCancel=P,e.prototype._attachCancellationCallback=A,e.prototype._execute=C,O=F,Y.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!Y.monitoring?(Y.monitoring=!0,e.prototype._fireEvent=E):!t.monitoring&&Y.monitoring&&(Y.monitoring=!1,e.prototype._fireEvent=T)),e},e.prototype._fireEvent=T,e.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(e){},e.prototype._attachCancellationCallback=function(e){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(e,t){};var O=function(e,t){2&t&&e._isBound()&&this._setBoundTo(e._boundTo)};function R(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function M(){this._trace=new G(this._peekContext())}function L(e,t){if(u(e)){var r=this._trace;if(void 0!==r&&t&&(r=r._parent),void 0!==r)r.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=z(e);l.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),l.notEnumerableProp(e,"__stackCleaned__",!0)}}}function j(t,r,n){if(Y.warnings){var i,a=new c(t);if(r)n._attachExtraTrace(a);else if(Y.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(a);else{var o=z(a);a.stack=o.message+"\n"+o.stack.join("\n")}E("warning",a)||U(a,"",!0)}}function B(e){for(var t=[],r=0;r<e.length;++r){var n=e[r],i=" (No stack trace)"===n||m.test(n),a=i&&H(n);i&&!a&&(_&&" "!==n.charAt(0)&&(n=" "+n),t.push(n))}return t}function z(e){var t=e.stack,r=e.toString();return t="string"==typeof t&&t.length>0?function(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),r=0;r<t.length;++r){var n=t[r];if(" (No stack trace)"===n||m.test(n))break}return r>0&&"SyntaxError"!=e.name&&(t=t.slice(r)),t}(e):[" (No stack trace)"],{message:r,stack:"SyntaxError"==e.name?t:B(t)}}function U(e,t,r){if("undefined"!=typeof console){var n;if(l.isObject(e)){var i=e.stack;n=t+g(i,e)}else n=t+String(e);"function"==typeof a?a(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function q(e,t,r,n){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(n):t(r,n))}catch(e){s.throwLater(e)}"unhandledRejection"===e?E(e,r,n)||i||U(r,"Unhandled rejection "):E(e,n)}function J(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():l.toString(e);if(/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+function(e){var t=41;if(e.length<t)return e;return e.substr(0,t-3)+"..."}(t)+">, no stack trace)"}function V(){return"function"==typeof $}var H=function(){return!1},K=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function W(e){var t=e.match(K);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function G(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);$(this,G),t>32&&this.uncycle()}l.inherits(G,Error),t.CapturedTrace=G,G.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},n=0,i=this;void 0!==i;++n)t.push(i),i=i._parent;for(n=(e=this._length=n)-1;n>=0;--n){var a=t[n].stack;void 0===r[a]&&(r[a]=n)}for(n=0;n<e;++n){var o=r[t[n].stack];if(void 0!==o&&o!==n){o>0&&(t[o-1]._parent=void 0,t[o-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var s=n>0?t[n-1]:this;o<e-1?(s._parent=t[o+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var c=s._length+1,l=n-2;l>=0;--l)t[l]._length=c,c++;return}}}},G.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=z(e),r=t.message,n=[t.stack],i=this;void 0!==i;)n.push(B(i.stack.split("\n"))),i=i._parent;!function(e){for(var t=e[0],r=1;r<e.length;++r){for(var n=e[r],i=t.length-1,a=t[i],o=-1,s=n.length-1;s>=0;--s)if(n[s]===a){o=s;break}for(s=o;s>=0;--s){var c=n[s];if(t[i]!==c)break;t.pop(),i--}t=n}}(n),function(e){for(var t=0;t<e.length;++t)(0===e[t].length||t+1<e.length&&e[t][0]===e[t+1][0])&&(e.splice(t,1),t--)}(n),l.notEnumerableProp(e,"stack",function(e,t){for(var r=0;r<t.length-1;++r)t[r].push("From previous event:"),t[r]=t[r].join("\n");return r<t.length&&(t[r]=t[r].join("\n")),e+"\n"+t.join("\n")}(r,n)),l.notEnumerableProp(e,"__stackCleaned__",!0)}};var $=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():J(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,m=e,g=t;var r=Error.captureStackTrace;return H=function(e){return d.test(e)},function(e,t){Error.stackTraceLimit+=6,r(e,t),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return m=/@/,g=t,_=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){n="stack"in e}return!("stack"in i)&&n&&"number"==typeof Error.stackTraceLimit?(m=e,g=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6}):(g=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?J(t):t.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(a=function(e){console.warn(e)},l.isNode&&process.stderr.isTTY?a=function(e,t){var r=t?"":"";console.warn(r+e+"\n")}:l.isNode||"string"!=typeof(new Error).stack||(a=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var Y={warnings:y,longStackTraces:!1,cancellation:!1,monitoring:!1};return v&&e.longStackTraces(),{longStackTraces:function(){return Y.longStackTraces},warnings:function(){return Y.warnings},cancellation:function(){return Y.cancellation},monitoring:function(){return Y.monitoring},propagateFromFunction:function(){return O},boundValueFunction:function(){return R},checkForgottenReturns:function(e,t,r,n,i){if(void 0===e&&null!==t&&b){if(void 0!==i&&i._returnedNonUndefined())return;if(!(65535&n._bitField))return;r&&(r+=" ");var a="",o="";if(t._trace){for(var s=t._trace.stack.split("\n"),c=B(s),l=c.length-1;l>=0;--l){var u=c[l];if(!p.test(u)){var d=u.match(f);d&&(a="at "+d[1]+":"+d[2]+":"+d[3]+" ");break}}if(c.length>0){var m=c[0];for(l=0;l<s.length;++l)if(s[l]===m){l>0&&(o="\n"+s[l-1]);break}}}var g="a promise was created in a "+r+"handler "+a+"but was not returned from it, see http://goo.gl/rRqMUw"+o;n._warn(g,!0,t)}},setBounds:function(e,t){if(V()){for(var r,n,i=e.stack.split("\n"),a=t.stack.split("\n"),o=-1,s=-1,c=0;c<i.length;++c){if(l=W(i[c])){r=l.fileName,o=l.line;break}}for(c=0;c<a.length;++c){var l;if(l=W(a[c])){n=l.fileName,s=l.line;break}}o<0||s<0||!r||!n||r!==n||o>=s||(H=function(e){if(d.test(e))return!0;var t=W(e);return!!(t&&t.fileName===r&&o<=t.line&&t.line<=s)})}},warn:j,deprecated:function(e,t){var r=e+" is deprecated and will be removed in a future version.";return t&&(r+=" Use "+t+" instead."),j(r)},CapturedTrace:G,fireDomEvent:x,fireGlobalEvent:S}}},56774:e=>{"use strict";e.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(r){return r instanceof e&&r.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:r},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(r,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:e},void 0);var t=arguments[1];return this.caught(e,(function(){throw t}))},e.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof e&&r.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:r},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();return this.caught(r,(function(){return n}))}}},93425:e=>{"use strict";e.exports=function(e,t){var r=e.reduce,n=e.all;function i(){return n(this)}e.prototype.each=function(e){return r(this,e,t,0)._then(i,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,n){return r(e,n,t,0)._then(i,void 0,void 0,e,void 0)},e.mapSeries=function(e,n){return r(e,n,t,t)}}},90403:(e,t,r)=>{"use strict";var n,i,a=r(7585),o=a.freeze,s=r(92208),c=s.inherits,l=s.notEnumerableProp;function u(e,t){function r(n){if(!(this instanceof r))return new r(n);l(this,"message","string"==typeof n?n:t),l(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return c(r,Error),r}var d=u("Warning","warning"),p=u("CancellationError","cancellation error"),f=u("TimeoutError","timeout error"),m=u("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(e){n=u("TypeError","type error"),i=u("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),_=0;_<g.length;++_)"function"==typeof Array.prototype[g[_]]&&(m.prototype[g[_]]=Array.prototype[g[_]]);a.defineProperty(m.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),m.prototype.isOperational=!0;var h=0;function y(e){if(!(this instanceof y))return new y(e);l(this,"name","OperationalError"),l(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(l(this,"message",e.message),l(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}m.prototype.toString=function(){var e=Array(4*h+1).join(" "),t="\n"+e+"AggregateError of:\n";h++,e=Array(4*h+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),a=0;a<i.length;++a)i[a]=e+i[a];t+=(n=i.join("\n"))+"\n"}return h--,t},c(y,Error);var v=Error.__BluebirdErrorTypes__;v||(v=o({CancellationError:p,TimeoutError:f,OperationalError:y,RejectionError:y,AggregateError:m}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:v,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error,TypeError:n,RangeError:i,CancellationError:v.CancellationError,OperationalError:v.OperationalError,TimeoutError:v.TimeoutError,AggregateError:v.AggregateError,Warning:d}},7585:e=>{var t=function(){"use strict";return void 0===this}();if(t)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:t,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!(r&&!r.writable&&!r.set)}};else{var r={}.hasOwnProperty,n={}.toString,i={}.constructor.prototype,a=function(e){var t=[];for(var n in e)r.call(e,n)&&t.push(n);return t};e.exports={isArray:function(e){try{return"[object Array]"===n.call(e)}catch(e){return!1}},keys:a,names:a,defineProperty:function(e,t,r){return e[t]=r.value,e},getDescriptor:function(e,t){return{value:e[t]}},freeze:function(e){return e},getPrototypeOf:function(e){try{return Object(e).constructor.prototype}catch(e){return i}},isES5:t,propertyIsWritable:function(){return!0}}}},72730:e=>{"use strict";e.exports=function(e,t){var r=e.map;e.prototype.filter=function(e,n){return r(this,e,n,t)},e.filter=function(e,n,i){return r(e,n,i,t)}}},90401:(e,t,r)=>{"use strict";e.exports=function(e,t){var n=r(92208),i=e.CancellationError,a=n.errorObj;function o(e,t,r){this.promise=e,this.type=t,this.handler=r,this.called=!1,this.cancelPromise=null}function s(e){this.finallyHandler=e}function c(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function l(){return d.call(this,this.promise._target()._settledValue())}function u(e){if(!c(this,e))return a.e=e,a}function d(r){var n=this.promise,o=this.handler;if(!this.called){this.called=!0;var d=this.isFinallyHandler()?o.call(n._boundValue()):o.call(n._boundValue(),r);if(void 0!==d){n._setReturnedNonUndefined();var p=t(d,n);if(p instanceof e){if(null!=this.cancelPromise){if(p._isCancelled()){var f=new i("late cancellation observer");return n._attachExtraTrace(f),a.e=f,a}p.isPending()&&p._attachCancellationCallback(new s(this))}return p._then(l,u,void 0,this,void 0)}}}return n.isRejected()?(c(this),a.e=r,a):(c(this),r)}return o.prototype.isFinallyHandler=function(){return 0===this.type},s.prototype._resultCancelled=function(){c(this.finallyHandler)},e.prototype._passThrough=function(e,t,r,n){return"function"!=typeof e?this.then():this._then(r,n,void 0,new o(this,t,e),void 0)},e.prototype.lastly=e.prototype.finally=function(e){return this._passThrough(e,0,d,d)},e.prototype.tap=function(e){return this._passThrough(e,1,d)},o}},65734:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i,a,o){var s=r(90403).TypeError,c=r(92208),l=c.errorObj,u=c.tryCatch,d=[];function p(t,r,i,a){if(o.cancellation()){var s=new e(n),c=this._finallyPromise=new e(n);this._promise=s.lastly((function(){return c})),s._captureStackTrace(),s._setOnCancel(this)}else{(this._promise=new e(n))._captureStackTrace()}this._stack=a,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(d):d,this._yieldedPromise=null,this._cancellationPhase=!1}c.inherits(p,a),p.prototype._isResolved=function(){return null===this._promise},p.prototype._cleanup=function(){this._promise=this._generator=null,o.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},p.prototype._promiseCancelled=function(){if(!this._isResolved()){var t;if(void 0!==this._generator.return)this._promise._pushContext(),t=u(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=u(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},p.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=u(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},p.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=u(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},p.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},p.prototype.promise=function(){return this._promise},p.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},p.prototype._continue=function(t){var r=this._promise;if(t===l)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(t.e,!1);var n=t.value;if(!0===t.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var a=i(n,this._promise);if(a instanceof e||(a=function(t,r,n){for(var a=0;a<r.length;++a){n._pushContext();var o=u(r[a])(t);if(n._popContext(),o===l){n._pushContext();var s=e.reject(l.e);return n._popContext(),s}var c=i(o,n);if(c instanceof e)return c}return null}(a,this._yieldHandlers,this._promise),null!==a)){var o=(a=a._target())._bitField;50397184&o?33554432&o?e._async.invoke(this._promiseFulfilled,this,a._value()):16777216&o?e._async.invoke(this._promiseRejected,this,a._reason()):this._promiseCancelled():(this._yieldedPromise=a,a._proxy(this,null))}else this._promiseRejected(new s("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",n)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},e.coroutine=function(e,t){if("function"!=typeof e)throw new s("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(t).yieldHandler,n=p,i=(new Error).stack;return function(){var t=e.apply(this,arguments),a=new n(void 0,void 0,r,i),o=a.promise();return a._generator=t,a._promiseFulfilled(void 0),o}},e.coroutine.addYieldHandler=function(e){if("function"!=typeof e)throw new s("expecting a function but got "+c.classString(e));d.push(e)},e.spawn=function(r){if(o.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof r)return t("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new p(r,this),i=n.promise();return n._run(e.spawn),i}}},46564:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i,a,o){var s,c=r(92208),l=c.canEvaluate,u=c.tryCatch,d=c.errorObj;if(l){for(var p=function(e){return new Function("value","holder"," \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g,e))},f=function(e){return new Function("promise","holder"," \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g,e))},m=function(t){for(var r=new Array(t),n=0;n<r.length;++n)r[n]="this.p"+(n+1);var i=r.join(" = ")+" = null;",o="var promise;\n"+r.map((function(e){return" \n promise = "+e+"; \n if (promise instanceof Promise) { \n promise.cancel(); \n } \n "})).join("\n"),s=r.join(", "),c="Holder$"+t,l="return function(tryCatch, errorObj, Promise, async) { \n 'use strict'; \n function [TheName](fn) { \n [TheProperties] \n this.fn = fn; \n this.asyncNeeded = true; \n this.now = 0; \n } \n \n [TheName].prototype._callFunction = function(promise) { \n promise._pushContext(); \n var ret = tryCatch(this.fn)([ThePassedArguments]); \n promise._popContext(); \n if (ret === errorObj) { \n promise._rejectCallback(ret.e, false); \n } else { \n promise._resolveCallback(ret); \n } \n }; \n \n [TheName].prototype.checkFulfillment = function(promise) { \n var now = ++this.now; \n if (now === [TheTotal]) { \n if (this.asyncNeeded) { \n async.invoke(this._callFunction, this, promise); \n } else { \n this._callFunction(promise); \n } \n \n } \n }; \n \n [TheName].prototype._resultCancelled = function() { \n [CancellationCode] \n }; \n \n return [TheName]; \n }(tryCatch, errorObj, Promise, async); \n ";return l=l.replace(/\[TheName\]/g,c).replace(/\[TheTotal\]/g,t).replace(/\[ThePassedArguments\]/g,s).replace(/\[TheProperties\]/g,i).replace(/\[CancellationCode\]/g,o),new Function("tryCatch","errorObj","Promise","async",l)(u,d,e,a)},g=[],_=[],h=[],y=0;y<8;++y)g.push(m(y+1)),_.push(p(y+1)),h.push(f(y+1));s=function(e){this._reject(e)}}e.join=function(){var r,a=arguments.length-1;if(a>0&&"function"==typeof arguments[a]&&(r=arguments[a],a<=8&&l)){(x=new e(i))._captureStackTrace();for(var u=new(0,g[a-1])(r),d=_,p=0;p<a;++p){var f=n(arguments[p],x);if(f instanceof e){var m=(f=f._target())._bitField;50397184&m?33554432&m?d[p].call(x,f._value(),u):16777216&m?x._reject(f._reason()):x._cancel():(f._then(d[p],s,void 0,x,u),h[p](f,u),u.asyncNeeded=!1)}else d[p].call(x,f,u)}if(!x._isFateSealed()){if(u.asyncNeeded){var y=o();null!==y&&(u.fn=c.domainBind(y,u.fn))}x._setAsyncGuaranteed(),x._setOnCancel(u)}return x}for(var v=arguments.length,b=new Array(v),k=0;k<v;++k)b[k]=arguments[k];r&&b.pop();var x=new t(b).promise();return void 0!==r?x.spread(r):x}}},35956:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i,a,o){var s=e._getDomain,c=r(92208),l=c.tryCatch,u=c.errorObj,d=e._async;function p(e,t,r,n){this.constructor$(e),this._promise._captureStackTrace();var i=s();this._callback=null===i?t:c.domainBind(i,t),this._preservedValues=n===a?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],d.invoke(this._asyncInit,this,void 0)}function f(t,r,i,a){if("function"!=typeof r)return n("expecting a function but got "+c.classString(r));var o=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+c.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+c.classString(i.concurrency)));o=i.concurrency}return new p(t,r,o="number"==typeof o&&isFinite(o)&&o>=1?o:0,a).promise()}c.inherits(p,t),p.prototype._asyncInit=function(){this._init$(void 0,-2)},p.prototype._init=function(){},p.prototype._promiseFulfilled=function(t,r){var n=this._values,a=this.length(),s=this._preservedValues,c=this._limit;if(r<0){if(n[r=-1*r-1]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return n[r]=t,this._queue.push(r),!1;null!==s&&(s[r]=t);var d=this._promise,p=this._callback,f=d._boundValue();d._pushContext();var m=l(p).call(f,t,r,a),g=d._popContext();if(o.checkForgottenReturns(m,g,null!==s?"Promise.filter":"Promise.map",d),m===u)return this._reject(m.e),!0;var _=i(m,this._promise);if(_ instanceof e){var h=(_=_._target())._bitField;if(!(50397184&h))return c>=1&&this._inFlight++,n[r]=_,_._proxy(this,-1*(r+1)),!1;if(!(33554432&h))return 16777216&h?(this._reject(_._reason()),!0):(this._cancel(),!0);m=_._value()}n[r]=m}return++this._totalResolved>=a&&(null!==s?this._filter(n,s):this._resolve(n),!0)},p.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight<t;){if(this._isResolved())return;var n=e.pop();this._promiseFulfilled(r[n],n)}},p.prototype._filter=function(e,t){for(var r=t.length,n=new Array(r),i=0,a=0;a<r;++a)e[a]&&(n[i++]=t[a]);n.length=i,this._resolve(n)},p.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(e,t){return f(this,e,t,null)},e.map=function(e,t,r,n){return f(e,t,r,n)}}},6241:(e,t,r)=>{"use strict";e.exports=function(e,t,n,i,a){var o=r(92208),s=o.tryCatch;e.method=function(r){if("function"!=typeof r)throw new e.TypeError("expecting a function but got "+o.classString(r));return function(){var n=new e(t);n._captureStackTrace(),n._pushContext();var i=s(r).apply(this,arguments),o=n._popContext();return a.checkForgottenReturns(i,o,"Promise.method",n),n._resolveFromSyncValue(i),n}},e.attempt=e.try=function(r){if("function"!=typeof r)return i("expecting a function but got "+o.classString(r));var n,c=new e(t);if(c._captureStackTrace(), method
[all...]

Completed in 45 milliseconds