diff --git a/dist/article-extractor.esm.js b/dist/article-extractor.esm.js index a3aa4993..596df70a 100644 --- a/dist/article-extractor.esm.js +++ b/dist/article-extractor.esm.js @@ -1,4 +1,4 @@ -// @extractus/article-extractor@7.2.13, by @extractus - built with esbuild at 2023-04-11T16:52:27.052Z - published under MIT license +// @extractus/article-extractor@7.2.14, by @extractus - built with esbuild at 2023-04-18T01:10:09.624Z - published under MIT license var _a=Object.create;var Fr=Object.defineProperty;var Ea=Object.getOwnPropertyDescriptor;var Ta=Object.getOwnPropertyNames;var Aa=Object.getPrototypeOf,Sa=Object.prototype.hasOwnProperty;var v=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Na=(t,e,u,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ta(e))!Sa.call(t,i)&&i!==u&&Fr(t,i,{get:()=>e[i],enumerable:!(r=Ea(e,i))||r.enumerable});return t};var Vt=(t,e,u)=>(u=t!=null?_a(Aa(t)):{},Na(e||!t||!t.__esModule?Fr(u,"default",{value:t,enumerable:!0}):u,t));var Zr=v((Ae,Qr)=>{var Yr=typeof self<"u"?self:Ae,Wt=function(){function t(){this.fetch=!1,this.DOMException=Yr.DOMException}return t.prototype=Yr,new t}();(function(t){var e=function(u){var r={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function i(l){return l&&DataView.prototype.isPrototypeOf(l)}if(r.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(l){return l&&n.indexOf(Object.prototype.toString.call(l))>-1};function a(l){if(typeof l!="string"&&(l=String(l)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(l))throw new TypeError("Invalid character in header field name");return l.toLowerCase()}function o(l){return typeof l!="string"&&(l=String(l)),l}function c(l){var p={next:function(){var S=l.shift();return{done:S===void 0,value:S}}};return r.iterable&&(p[Symbol.iterator]=function(){return p}),p}function d(l){this.map={},l instanceof d?l.forEach(function(p,S){this.append(S,p)},this):Array.isArray(l)?l.forEach(function(p){this.append(p[0],p[1])},this):l&&Object.getOwnPropertyNames(l).forEach(function(p){this.append(p,l[p])},this)}d.prototype.append=function(l,p){l=a(l),p=o(p);var S=this.map[l];this.map[l]=S?S+", "+p:p},d.prototype.delete=function(l){delete this.map[a(l)]},d.prototype.get=function(l){return l=a(l),this.has(l)?this.map[l]:null},d.prototype.has=function(l){return this.map.hasOwnProperty(a(l))},d.prototype.set=function(l,p){this.map[a(l)]=o(p)},d.prototype.forEach=function(l,p){for(var S in this.map)this.map.hasOwnProperty(S)&&l.call(p,this.map[S],S,this)},d.prototype.keys=function(){var l=[];return this.forEach(function(p,S){l.push(S)}),c(l)},d.prototype.values=function(){var l=[];return this.forEach(function(p){l.push(p)}),c(l)},d.prototype.entries=function(){var l=[];return this.forEach(function(p,S){l.push([S,p])}),c(l)},r.iterable&&(d.prototype[Symbol.iterator]=d.prototype.entries);function y(l){if(l.bodyUsed)return Promise.reject(new TypeError("Already read"));l.bodyUsed=!0}function b(l){return new Promise(function(p,S){l.onload=function(){p(l.result)},l.onerror=function(){S(l.error)}})}function E(l){var p=new FileReader,S=b(p);return p.readAsArrayBuffer(l),S}function _(l){var p=new FileReader,S=b(p);return p.readAsText(l),S}function I(l){for(var p=new Uint8Array(l),S=new Array(p.length),Y=0;Y
1&&arguments[1]!==void 0?arguments[1]:{},u=a.size;let r=u===void 0?0:u;var i=a.timeout;let s=i===void 0?0:i;t==null?t=null:mo(t)?t=Buffer.from(t.toString()):F0(t)||Buffer.isBuffer(t)||(Object.prototype.toString.call(t)==="[object ArrayBuffer]"?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof Bt||(t=Buffer.from(String(t)))),this[T1]={body:t,disturbed:!1,error:null},this.size=r,this.timeout=s,t instanceof Bt&&t.on("error",function(p){let n=p.name==="AbortError"?p:new He(`Invalid response body while trying to fetch ${e.url}: ${p.message}`,"system",p);e[T1].error=n})}Ve.prototype={get body(){return this[T1].body},get bodyUsed(){return this[T1].disturbed},arrayBuffer(){return ja.call(this).then(function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)})},blob(){let t=this.headers&&this.headers.get("content-type")||"";return ja.call(this).then(function(e){return Object.assign(new W1([],{type:t.toLowerCase()}),{[S1]:e})})},json(){var t=this;return ja.call(this).then(function(e){try{return JSON.parse(e.toString())}catch(a){return Ve.Promise.reject(new He(`invalid json response body at ${t.url} reason: ${a.message}`,"invalid-json"))}})},text(){return ja.call(this).then(function(t){return t.toString()})},buffer(){return ja.call(this)},textConverted(){var t=this;return ja.call(this).then(function(e){return F5(e,t.headers)})}};Object.defineProperties(Ve.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});Ve.mixIn=function(t){for(let e of Object.getOwnPropertyNames(Ve.prototype))if(!(e in t)){let a=Object.getOwnPropertyDescriptor(Ve.prototype,e);Object.defineProperty(t,e,a)}};function ja(){var t=this;if(this[T1].disturbed)return Ve.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[T1].disturbed=!0,this[T1].error)return Ve.Promise.reject(this[T1].error);let e=this.body;if(e===null)return Ve.Promise.resolve(Buffer.alloc(0));if(F0(e)&&(e=e.stream()),Buffer.isBuffer(e))return Ve.Promise.resolve(e);if(!(e instanceof Bt))return Ve.Promise.resolve(Buffer.alloc(0));let a=[],u=0,r=!1;return new Ve.Promise(function(i,s){let p;t.timeout&&(p=setTimeout(function(){r=!0,s(new He(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))},t.timeout)),e.on("error",function(n){n.name==="AbortError"?(r=!0,s(n)):s(new He(`Invalid response body while trying to fetch ${t.url}: ${n.message}`,"system",n))}),e.on("data",function(n){if(!(r||n===null)){if(t.size&&u+n.length>t.size){r=!0,s(new He(`content size at ${t.url} over limit: ${t.size}`,"max-size"));return}u+=n.length,a.push(n)}}),e.on("end",function(){if(!r){clearTimeout(p);try{i(Buffer.concat(a,u))}catch(n){s(new He(`Could not create Buffer from response body for ${t.url}: ${n.message}`,"system",n))}}})})}function F5(t,e){if(typeof Rn!="function")throw new Error("The package `encoding` must be installed to use the textConverted() function");let a=e.get("content-type"),u="utf-8",r,i;return a&&(r=/charset=([^;]*)/i.exec(a)),i=t.slice(0,1024).toString(),!r&&i&&(r=/