Home
last modified time | relevance | path

Searched defs:abs (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(thi 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(thi 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(thi method
[all...]

Completed in 24 milliseconds